diff options
author | Jeff Dike <jdike@addtoit.com> | 2008-02-05 01:31:02 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-05 12:44:29 -0500 |
commit | 260c0cb886c304b760835b6033bf876a7701eb91 (patch) | |
tree | 7d24edab780da2ed0192146ce6453fd9454b9671 /arch/um/Makefile | |
parent | 3963333fe6767f15141ab2dc3b933721c636c212 (diff) |
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 flags
back to USER_CFLAGS.
I also corrected the spelling of LFLAGS to LDFLAGS.
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/Makefile')
-rw-r--r-- | arch/um/Makefile | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/um/Makefile b/arch/um/Makefile index e44fd6a58375..fb8854a9a542 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile | |||
@@ -49,7 +49,7 @@ SYS_DIR := $(ARCH_DIR)/include/sysdep-$(SUBARCH) | |||
49 | # | 49 | # |
50 | # These apply to USER_CFLAGS to. | 50 | # These apply to USER_CFLAGS to. |
51 | 51 | ||
52 | KBUILD_CFLAGS += $(CFLAGS-y) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\" \ | 52 | KBUILD_CFLAGS += $(CFLAGS) $(CFLAGS-y) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\" \ |
53 | $(ARCH_INCLUDE) $(MODE_INCLUDE) -Dvmap=kernel_vmap \ | 53 | $(ARCH_INCLUDE) $(MODE_INCLUDE) -Dvmap=kernel_vmap \ |
54 | -Din6addr_loopback=kernel_in6addr_loopback \ | 54 | -Din6addr_loopback=kernel_in6addr_loopback \ |
55 | -Din6addr_any=kernel_in6addr_any | 55 | -Din6addr_any=kernel_in6addr_any |
@@ -58,7 +58,7 @@ KBUILD_AFLAGS += $(ARCH_INCLUDE) | |||
58 | 58 | ||
59 | USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -D__KERNEL__,,\ | 59 | USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -D__KERNEL__,,\ |
60 | $(patsubst -I%,,$(KBUILD_CFLAGS)))) $(ARCH_INCLUDE) $(MODE_INCLUDE) \ | 60 | $(patsubst -I%,,$(KBUILD_CFLAGS)))) $(ARCH_INCLUDE) $(MODE_INCLUDE) \ |
61 | -D_FILE_OFFSET_BITS=64 | 61 | $(filter -I%,$(CFLAGS)) -D_FILE_OFFSET_BITS=64 |
62 | 62 | ||
63 | include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH) | 63 | include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH) |
64 | 64 | ||
@@ -130,7 +130,7 @@ CPPFLAGS_vmlinux.lds = -U$(SUBARCH) -DSTART=$(START) -DELF_ARCH=$(ELF_ARCH) \ | |||
130 | # The wrappers will select whether using "malloc" or the kernel allocator. | 130 | # The wrappers will select whether using "malloc" or the kernel allocator. |
131 | LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc | 131 | LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc |
132 | 132 | ||
133 | LD_FLAGS_CMDLINE = $(foreach opt,$(LFLAGS),-Wl,$(opt)) | 133 | LD_FLAGS_CMDLINE = $(foreach opt,$(LDFLAGS),-Wl,$(opt)) |
134 | 134 | ||
135 | CFLAGS_vmlinux := $(LINK-y) $(LINK_WRAPS) $(LD_FLAGS_CMDLINE) | 135 | CFLAGS_vmlinux := $(LINK-y) $(LINK_WRAPS) $(LD_FLAGS_CMDLINE) |
136 | define cmd_vmlinux__ | 136 | define cmd_vmlinux__ |