From: Jeff Dike Date: Mon, 5 Nov 2007 22:50:59 +0000 (-0800) Subject: uml: correctly strip kernel defines from userspace CFLAGS X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f15cf5151c3ecfe4073fb4478f686cb396bc2b17;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git uml: correctly strip kernel defines from userspace CFLAGS KERNEL_DEFINES needs whitespace trimmed, otherwise the whitespace crunching done by make fools the patsubst which is used to remove KERNEL_DEFINES from USER_CFLAGS. Signed-off-by: Jeff Dike Cc: Sam Ravnborg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/um/Makefile b/arch/um/Makefile index 82c2ac48040d..768a5d14b755 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile @@ -70,9 +70,12 @@ include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS) # in KBUILD_CFLAGS. Otherwise, it would cause ld to complain about the two different # errnos. # These apply to kernelspace only. +# +# strip leading and trailing whitespace to make the USER_CFLAGS removal of these +# defines more robust -KERNEL_DEFINES = -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \ - -Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES) +KERNEL_DEFINES = $(strip -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \ + -Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES)) KBUILD_CFLAGS += $(KERNEL_DEFINES) KBUILD_CFLAGS += $(call cc-option,-fno-unit-at-a-time,)