1 commit 67dac695a1f33716f3e35c2292e7391410d58751
2 Author: Paul Bolle <pebolle@tiscali.nl>
3 Date: Sun Sep 6 14:36:01 2009 +0200
5 um: add work around for build problems with bash 4
7 Building User Mode Linux fails with bash 4. The UML Makefiles use an
8 environment variable called CPPFLAGS_vmlinux.lds but bash 4 does not
9 export environment variables with a dot in their name. Add a hack to
10 allow building UML with bash 4 (which should not affect other shells).
12 Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
14 --- a/arch/um/Makefile
15 +++ b/arch/um/Makefile
16 @@ -99,9 +99,6 @@ CFLAGS_NO_HARDENING := $(call cc-option,
17 CONFIG_KERNEL_STACK_ORDER ?= 2
18 STACK_SIZE := $(shell echo $$[ 4096 * (1 << $(CONFIG_KERNEL_STACK_ORDER)) ] )
20 -CPPFLAGS_vmlinux.lds = -U$(SUBARCH) -DSTART=$(START) -DELF_ARCH=$(ELF_ARCH) \
21 - -DELF_FORMAT="$(ELF_FORMAT)" -DKERNEL_STACK_SIZE=$(STACK_SIZE)
23 # The wrappers will select whether using "malloc" or the kernel allocator.
24 LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc
26 @@ -152,4 +149,5 @@ $(SHARED_HEADERS)/kern_constants.h:
27 $(Q)mkdir -p $(dir $@)
28 $(Q)echo '#include "../../../../include/asm/asm-offsets.h"' >$@
30 -export SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS HEADER_ARCH DEV_NULL_PATH
31 +export SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS HEADER_ARCH DEV_NULL_PATH \
32 + ELF_ARCH ELF_FORMAT STACK_SIZE START
33 --- a/arch/um/kernel/Makefile
34 +++ b/arch/um/kernel/Makefile
36 # Licensed under the GPL
39 +CPPFLAGS_vmlinux.lds = -P -C -U$(ARCH) -U$(SUBARCH) -DSTART=$(START) \
40 + -DELF_ARCH=$(ELF_ARCH) -DELF_FORMAT="$(ELF_FORMAT)" \
41 + -DKERNEL_STACK_SIZE=$(STACK_SIZE)
43 extra-y := vmlinux.lds