Commit 47113650 authored by Paolo \'Blaisorblade\' Giarrusso's avatar Paolo \'Blaisorblade\' Giarrusso Committed by Linus Torvalds

[PATCH] uml: Set cflags before including arch Makefile

If arch/$(ARCH)/Makefile is included before adding -O2 (and the rest) to
CFLAGS, I must duplicate the addition of it to USER_CFLAGS for UML.  So let's
fix this.  Also, the below code is useless, since if CONFIG_DEBUG_INFO is y,
then CONFIG_FRAME_POINTER is always y.

ifeq ($(CONFIG_DEBUG_INFO),y)
CFLAGS := $(subst -fomit-frame-pointer,,$(CFLAGS))
endif
Signed-off-by: default avatarPaolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 68ec5265
...@@ -13,10 +13,6 @@ OS := $(shell uname -s) ...@@ -13,10 +13,6 @@ OS := $(shell uname -s)
# EXTRAVERSION... # EXTRAVERSION...
MODLIB := $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE) MODLIB := $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
ifeq ($(CONFIG_DEBUG_INFO),y)
CFLAGS := $(subst -fomit-frame-pointer,,$(CFLAGS))
endif
core-y += $(ARCH_DIR)/kernel/ \ core-y += $(ARCH_DIR)/kernel/ \
$(ARCH_DIR)/drivers/ \ $(ARCH_DIR)/drivers/ \
$(ARCH_DIR)/sys-$(SUBARCH)/ $(ARCH_DIR)/sys-$(SUBARCH)/
...@@ -135,23 +131,6 @@ USER_CFLAGS := $(patsubst -D__KERNEL__,,$(USER_CFLAGS)) $(ARCH_INCLUDE) \ ...@@ -135,23 +131,6 @@ USER_CFLAGS := $(patsubst -D__KERNEL__,,$(USER_CFLAGS)) $(ARCH_INCLUDE) \
# To get a definition of F_SETSIG # To get a definition of F_SETSIG
USER_CFLAGS += -D_GNU_SOURCE USER_CFLAGS += -D_GNU_SOURCE
# From main Makefile, these options are set after including the ARCH makefile.
# So copy them here.
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
USER_CFLAGS += -Os
else
USER_CFLAGS += -O2
endif
ifndef CONFIG_FRAME_POINTER
USER_CFLAGS += -fomit-frame-pointer
endif
ifdef CONFIG_DEBUG_INFO
USER_CFLAGS += -g
endif
CLEAN_FILES += linux x.i gmon.out $(ARCH_DIR)/uml.lds \ CLEAN_FILES += linux x.i gmon.out $(ARCH_DIR)/uml.lds \
$(ARCH_DIR)/dyn_link.ld.s $(ARCH_DIR)/include/uml-config.h \ $(ARCH_DIR)/dyn_link.ld.s $(ARCH_DIR)/include/uml-config.h \
$(GEN_HEADERS) $(GEN_HEADERS)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment