Commit:     260c0cb886c304b760835b6033bf876a7701eb91
Parent:     3963333fe6767f15141ab2dc3b933721c636c212
Author:     Jeff Dike <[EMAIL PROTECTED]>
AuthorDate: Mon Feb 4 22:31:02 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Feb 5 09:44:29 2008 -0800

    uml: fx command-line CFLAGS and LDFLAGS support
    UML still needed some work in order to allow CFLAGS to be passed in from the
    command line.
    USER_CFLAGS is produced from KBUILD_CFLAGS in part by removing all the -I
    switches.  This is so that kernel headers don't accidentally get pulled into
    libc files.  However, a common use of command-line CFLAGS would be to add -I
    switches to the build.  This patch specifically adds any command-line -I 
    back to USER_CFLAGS.
    I also corrected the spelling of LFLAGS to LDFLAGS.
    Signed-off-by: Jeff Dike <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 arch/um/Makefile |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/um/Makefile b/arch/um/Makefile
index e44fd6a..fb8854a 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -49,7 +49,7 @@ SYS_DIR               := $(ARCH_DIR)/include/sysdep-$(SUBARCH)
 # These apply to USER_CFLAGS to.
-KBUILD_CFLAGS += $(CFLAGS-y) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\"    \
+KBUILD_CFLAGS += $(CFLAGS) $(CFLAGS-y) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\" \
        $(ARCH_INCLUDE) $(MODE_INCLUDE) -Dvmap=kernel_vmap      \
        -Din6addr_loopback=kernel_in6addr_loopback \
@@ -58,7 +58,7 @@ KBUILD_AFLAGS += $(ARCH_INCLUDE)
 USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -D__KERNEL__,,\
        $(patsubst -I%,,$(KBUILD_CFLAGS)))) $(ARCH_INCLUDE) $(MODE_INCLUDE) \
-       -D_FILE_OFFSET_BITS=64
+       $(filter -I%,$(CFLAGS)) -D_FILE_OFFSET_BITS=64
 include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH)
@@ -130,7 +130,7 @@ = -U$(SUBARCH) -DSTART=$(START) 
 # The wrappers will select whether using "malloc" or the kernel allocator.
 LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc
-LD_FLAGS_CMDLINE = $(foreach opt,$(LFLAGS),-Wl,$(opt))
+LD_FLAGS_CMDLINE = $(foreach opt,$(LDFLAGS),-Wl,$(opt))
 define cmd_vmlinux__
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to