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>
This commit is contained in:
@@ -627,16 +627,6 @@ endif
|
||||
cflags-y += -I$(srctree)/arch/mips/include/asm/mach-generic
|
||||
drivers-$(CONFIG_PCI) += arch/mips/pci/
|
||||
|
||||
ifdef CONFIG_32BIT
|
||||
ifdef CONFIG_CPU_LITTLE_ENDIAN
|
||||
JIFFIES = jiffies_64
|
||||
else
|
||||
JIFFIES = jiffies_64 + 4
|
||||
endif
|
||||
else
|
||||
JIFFIES = jiffies_64
|
||||
endif
|
||||
|
||||
#
|
||||
# Automatically detect the build format. By default we choose
|
||||
# the elf format according to the load address.
|
||||
@@ -660,8 +650,9 @@ ifdef CONFIG_64BIT
|
||||
endif
|
||||
|
||||
KBUILD_AFLAGS += $(cflags-y)
|
||||
KBUILD_CFLAGS += $(cflags-y) \
|
||||
-D"VMLINUX_LOAD_ADDRESS=$(load-y)"
|
||||
KBUILD_CFLAGS += $(cflags-y)
|
||||
KBUILD_CPPFLAGS += -D"VMLINUX_LOAD_ADDRESS=$(load-y)"
|
||||
KBUILD_CPPFLAGS += -D"DATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)"
|
||||
|
||||
LDFLAGS += -m $(ld-emul)
|
||||
|
||||
@@ -676,18 +667,6 @@ endif
|
||||
|
||||
OBJCOPYFLAGS += --remove-section=.reginfo
|
||||
|
||||
#
|
||||
# Choosing incompatible machines durings configuration will result in
|
||||
# error messages during linking. Select a default linkscript if
|
||||
# none has been choosen above.
|
||||
#
|
||||
|
||||
CPPFLAGS_vmlinux.lds := \
|
||||
$(KBUILD_CFLAGS) \
|
||||
-D"LOADADDR=$(load-y)" \
|
||||
-D"JIFFIES=$(JIFFIES)" \
|
||||
-D"DATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)"
|
||||
|
||||
head-y := arch/mips/kernel/head.o arch/mips/kernel/init_task.o
|
||||
|
||||
libs-y += arch/mips/lib/
|
||||
|
@@ -10,7 +10,16 @@ PHDRS {
|
||||
text PT_LOAD FLAGS(7); /* RWX */
|
||||
note PT_NOTE FLAGS(4); /* R__ */
|
||||
}
|
||||
jiffies = JIFFIES;
|
||||
|
||||
ifdef CONFIG_32BIT
|
||||
ifdef CONFIG_CPU_LITTLE_ENDIAN
|
||||
jiffies = jiffies_64;
|
||||
else
|
||||
jiffies = jiffies_64 + 4;
|
||||
endif
|
||||
else
|
||||
jiffies = jiffies_64;
|
||||
endif
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
@@ -29,7 +38,7 @@ SECTIONS
|
||||
/* . = 0xa800000000300000; */
|
||||
. = 0xffffffff80300000;
|
||||
#endif
|
||||
. = LOADADDR;
|
||||
. = VMLINUX_LOAD_ADDRESS;
|
||||
/* read-only */
|
||||
_text = .; /* Text and read-only data */
|
||||
.text : {
|
||||
|
Reference in New Issue
Block a user