diff options
| author | Sam Ravnborg <sam@ravnborg.org> | 2009-09-20 06:28:22 -0400 |
|---|---|---|
| committer | Sam Ravnborg <sam@ravnborg.org> | 2009-09-20 06:28:22 -0400 |
| commit | 51b563fc93c8cb5bff1d67a0a71c374e4a4ea049 (patch) | |
| tree | 38c6a6d185183b30b8dbe59d5b8fa78815a1fdd4 /arch/sparc | |
| parent | 4356f4890792a678936c93c9196e8f7742e04535 (diff) | |
arm, cris, mips, sparc, powerpc, um, xtensa: fix build with bash 4.0
Albin Tonnerre <albin.tonnerre@free-electrons.com> reported:
Bash 4 filters out variables which contain a dot in them.
This happends to be the case of CPPFLAGS_vmlinux.lds.
This is rather unfortunate, as it now causes
build failures when using SHELL=/bin/bash to compile,
or when bash happens to be used by make (eg when it's /bin/sh)
Remove the common definition of CPPFLAGS_vmlinux.lds by
pushing relevant stuff to either Makefile.build or the
arch specific kernel/Makefile where we build the linker script.
This is also nice cleanup as we move the information out where
it is used.
Notes for the different architectures touched:
arm - we use an already exported symbol
cris - we use a config symbol aleady available
[Not build tested]
mips - the jiffies complexity has moved to vmlinux.lds.S where we need it.
Added a few variables to CPPFLAGS - they are only used by
the linker script.
[Not build tested]
powerpc - removed assignment that is not needed
[not build tested]
sparc - simplified it using $(BITS)
um - introduced a few new exported variables to deal with this
xtensa - added options to CPP invocation
[not build tested]
Cc: Albin Tonnerre <albin.tonnerre@free-electrons.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Chris Zankel <chris@zankel.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'arch/sparc')
| -rw-r--r-- | arch/sparc/Makefile | 4 | ||||
| -rw-r--r-- | arch/sparc/kernel/Makefile | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile index 467221dd5702..dfe272d14465 100644 --- a/arch/sparc/Makefile +++ b/arch/sparc/Makefile | |||
| @@ -31,7 +31,6 @@ export BITS := 32 | |||
| 31 | #KBUILD_CFLAGS += -g -pipe -fcall-used-g5 -fcall-used-g7 | 31 | #KBUILD_CFLAGS += -g -pipe -fcall-used-g5 -fcall-used-g7 |
| 32 | KBUILD_CFLAGS += -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7 | 32 | KBUILD_CFLAGS += -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7 |
| 33 | KBUILD_AFLAGS += -m32 | 33 | KBUILD_AFLAGS += -m32 |
| 34 | CPPFLAGS_vmlinux.lds += -m32 | ||
| 35 | 34 | ||
| 36 | #LDFLAGS_vmlinux = -N -Ttext 0xf0004000 | 35 | #LDFLAGS_vmlinux = -N -Ttext 0xf0004000 |
| 37 | # Since 2.5.40, the first stage is left not btfix-ed. | 36 | # Since 2.5.40, the first stage is left not btfix-ed. |
| @@ -45,9 +44,6 @@ else | |||
| 45 | 44 | ||
| 46 | CHECKFLAGS += -D__sparc__ -D__sparc_v9__ -D__arch64__ -m64 | 45 | CHECKFLAGS += -D__sparc__ -D__sparc_v9__ -D__arch64__ -m64 |
| 47 | 46 | ||
| 48 | # Undefine sparc when processing vmlinux.lds - it is used | ||
| 49 | # And teach CPP we are doing 64 bit builds (for this case) | ||
| 50 | CPPFLAGS_vmlinux.lds += -m64 -Usparc | ||
| 51 | LDFLAGS := -m elf64_sparc | 47 | LDFLAGS := -m elf64_sparc |
| 52 | export BITS := 64 | 48 | export BITS := 64 |
| 53 | 49 | ||
diff --git a/arch/sparc/kernel/Makefile b/arch/sparc/kernel/Makefile index 247cc620cee5..96aad394cd30 100644 --- a/arch/sparc/kernel/Makefile +++ b/arch/sparc/kernel/Makefile | |||
| @@ -7,7 +7,11 @@ ccflags-y := -Werror | |||
| 7 | 7 | ||
| 8 | extra-y := head_$(BITS).o | 8 | extra-y := head_$(BITS).o |
| 9 | extra-y += init_task.o | 9 | extra-y += init_task.o |
| 10 | extra-y += vmlinux.lds | 10 | |
| 11 | # Undefine sparc when processing vmlinux.lds - it is used | ||
| 12 | # And teach CPP we are doing $(BITS) builds (for this case) | ||
| 13 | CPPFLAGS_vmlinux.lds := -Usparc -m$(BITS) | ||
| 14 | extra-y += vmlinux.lds | ||
| 11 | 15 | ||
| 12 | obj-$(CONFIG_SPARC32) += entry.o wof.o wuf.o | 16 | obj-$(CONFIG_SPARC32) += entry.o wof.o wuf.o |
| 13 | obj-$(CONFIG_SPARC32) += etrap_32.o | 17 | obj-$(CONFIG_SPARC32) += etrap_32.o |
