Skip to content

Commit

Permalink
h8300/boot: Use POSIX "$((..))" instead of bashism "$[...]"
Browse files Browse the repository at this point in the history
On Ubuntu, where /bin/sh -> dash, "make ARCH=h8300 clean" gives:

printf: 1: $[0x00400000+0x00140000]: expected numeric value

Replace the bash-specific "$[...]" by POSIX "$((..))" for arithmetic
expansion to fix this.
Note that according to the bash 4.1 manpage, "$[...]" is deprecated, and
will be removed in upcoming versions of bash.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
  • Loading branch information
Geert Uytterhoeven committed Jun 23, 2013
1 parent a4cb378 commit fbc21c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/h8300/boot/compressed/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ OBJECTS = $(obj)/head.o $(obj)/misc.o
#
CONFIG_MEMORY_START ?= 0x00400000
CONFIG_BOOT_LINK_OFFSET ?= 0x00140000
IMAGE_OFFSET := $(shell printf "0x%08x" $$[$(CONFIG_MEMORY_START)+$(CONFIG_BOOT_LINK_OFFSET)])
IMAGE_OFFSET := $(shell printf "0x%08x" $$(($(CONFIG_MEMORY_START)+$(CONFIG_BOOT_LINK_OFFSET))))

LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -estartup $(obj)/vmlinux.lds

Expand Down

0 comments on commit fbc21c0

Please sign in to comment.