um: add work around for build problem with bash 4
PATCH 1/1 um: add work around for build problem with bash 4
Building User Mode Linux fails with bash 4 (see
http://bugzilla.kernel.org/show_bug.cgi?id=13343 ). The UML Makefiles use an environment variable called CPPFLAGS_vmlinux.lds but bash 4 does not export environment variables with a dot in their name. Add a hack to allow building UML with bash 4 (which should not affect other shells).
Signed-off-by Paul Bolle <[email protected]>
Tested-by Florian Fainelli <[email protected]>
---
Could this quick hack, which is the simplest work around I could think of for this issue, be considered for inclusion in v.2.6.31?
Makefile | 6 ++---- arch/um/kernel/Makefile | 4 ++++ 2 files changed, 6 insertions(+), 4 deletions(-)
arch/um/Makefile +2 -4
@@ -99,9 +99,6 @@ CFLAGS_NO_HARDENING := $(call cc-option, -fno-PIC,) $(call cc-option, -fno-pic,) CONFIG_KERNEL_STACK_ORDER ?= 2 STACK_SIZE := $(shell echo $$[ 4096 * (1 << $(CONFIG_KERNEL_STACK_ORDER)) ] ) -CPPFLAGS_vmlinux.lds = -U$(SUBARCH) -DSTART=$(START) -DELF_ARCH=$(ELF_ARCH) \ - -DELF_FORMAT="$(ELF_FORMAT)" -DKERNEL_STACK_SIZE=$(STACK_SIZE) - # The wrappers will select whether using "malloc" or the kernel allocator. LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc
@@ -152,4 +149,5 @@ $(SHARED_HEADERS)/kern_constants.h: $(Q)mkdir -p $(dir $@) $(Q)echo '#include "../../../../include/asm/asm-offsets.h"' >$@ -export SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS HEADER_ARCH DEV_NULL_PATH +export SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS HEADER_ARCH DEV_NULL_PATH \ + ELF_ARCH ELF_FORMAT STACK_SIZE START
arch/um/kernel/Makefile +4 -0
@@ -3,6 +3,10 @@ # Licensed under the GPL # +CPPFLAGS_vmlinux.lds = -P -C -U$(ARCH) -U$(SUBARCH) -DSTART=$(START) \ + -DELF_ARCH=$(ELF_ARCH) -DELF_FORMAT="$(ELF_FORMAT)" \ + -DKERNEL_STACK_SIZE=$(STACK_SIZE) + extra-y := vmlinux.lds clean-files :=
Signature · 1 line
1.6.4.2