]> git.hungrycats.org Git - linux/commitdiff
[PATCH] uml: Set cflags before including arch Makefile
authorPaolo \'Blaisorblade\' Giarrusso <blaisorblade_spam@yahoo.it>
Wed, 13 Oct 2004 14:29:34 +0000 (07:29 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 13 Oct 2004 14:29:34 +0000 (07:29 -0700)
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: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/um/Makefile

index f400ac083770ea85bd66983b57f127854af4c359..87afbb1512e8ead53a22289cbf9baaeb8279472e 100644 (file)
@@ -13,10 +13,6 @@ OS := $(shell uname -s)
 # EXTRAVERSION...
 MODLIB := $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
 
-ifeq ($(CONFIG_DEBUG_INFO),y)
-CFLAGS := $(subst -fomit-frame-pointer,,$(CFLAGS))
-endif
-
 core-y                 += $(ARCH_DIR)/kernel/           \
                           $(ARCH_DIR)/drivers/          \
                           $(ARCH_DIR)/sys-$(SUBARCH)/
@@ -135,23 +131,6 @@ USER_CFLAGS := $(patsubst -D__KERNEL__,,$(USER_CFLAGS)) $(ARCH_INCLUDE) \
 # To get a definition of F_SETSIG
 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 \
        $(ARCH_DIR)/dyn_link.ld.s $(ARCH_DIR)/include/uml-config.h \
        $(GEN_HEADERS)