mirror of
https://github.com/torvalds/linux.git
synced 2024-12-30 23:02:08 +00:00
51b563fc93
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>
48 lines
1.4 KiB
Makefile
48 lines
1.4 KiB
Makefile
#
|
|
# Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux,intel}.com)
|
|
# Licensed under the GPL
|
|
#
|
|
|
|
CPPFLAGS_vmlinux.lds := -U$(SUBARCH) -DSTART=$(LDS_START) \
|
|
-DELF_ARCH=$(LDS_ELF_ARCH) \
|
|
-DELF_FORMAT=$(LDS_ELF_FORMAT)
|
|
extra-y := vmlinux.lds
|
|
clean-files :=
|
|
|
|
obj-y = config.o exec.o exitcode.o init_task.o irq.o ksyms.o mem.o \
|
|
physmem.o process.o ptrace.o reboot.o sigio.o \
|
|
signal.o smp.o syscall.o sysrq.o time.o tlb.o trap.o uaccess.o \
|
|
um_arch.o umid.o skas/
|
|
|
|
obj-$(CONFIG_BLK_DEV_INITRD) += initrd.o
|
|
obj-$(CONFIG_GPROF) += gprof_syms.o
|
|
obj-$(CONFIG_GCOV) += gmon_syms.o
|
|
|
|
USER_OBJS := config.o
|
|
|
|
include arch/um/scripts/Makefile.rules
|
|
|
|
targets := config.c config.tmp
|
|
|
|
# Be careful with the below Sed code - sed is pitfall-rich!
|
|
# We use sed to lower build requirements, for "embedded" builders for instance.
|
|
|
|
$(obj)/config.tmp: $(objtree)/.config FORCE
|
|
$(call if_changed,quote1)
|
|
|
|
quiet_cmd_quote1 = QUOTE $@
|
|
cmd_quote1 = sed -e 's/"/\\"/g' -e 's/^/"/' -e 's/$$/\\n",/' \
|
|
$< > $@
|
|
|
|
$(obj)/config.c: $(src)/config.c.in $(obj)/config.tmp FORCE
|
|
$(call if_changed,quote2)
|
|
|
|
quiet_cmd_quote2 = QUOTE $@
|
|
cmd_quote2 = sed -e '/CONFIG/{' \
|
|
-e 's/"CONFIG"//' \
|
|
-e 'r $(obj)/config.tmp' \
|
|
-e 'a \' \
|
|
-e '""' \
|
|
-e '}' \
|
|
$< > $@
|