aboutsummaryrefslogtreecommitdiff
path: root/Makefile.flags
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.flags')
-rw-r--r--Makefile.flags13
1 files changed, 10 insertions, 3 deletions
diff --git a/Makefile.flags b/Makefile.flags
index e9405476b..0ffc05c35 100644
--- a/Makefile.flags
+++ b/Makefile.flags
@@ -35,7 +35,7 @@ endif
35# gcc 3.x emits bogus "old style proto" warning on find.c:alloc_action() 35# gcc 3.x emits bogus "old style proto" warning on find.c:alloc_action()
36CFLAGS += $(call cc-ifversion, -ge, 0400, -Wold-style-definition) 36CFLAGS += $(call cc-ifversion, -ge, 0400, -Wold-style-definition)
37 37
38CFLAGS += $(call cc-option,-Os -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections,) 38CFLAGS += $(call cc-option,-fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections,)
39# -fno-guess-branch-probability: prohibit pseudo-random guessing 39# -fno-guess-branch-probability: prohibit pseudo-random guessing
40# of branch probabilities (hopefully makes bloatcheck more stable): 40# of branch probabilities (hopefully makes bloatcheck more stable):
41CFLAGS += $(call cc-option,-fno-guess-branch-probability,) 41CFLAGS += $(call cc-option,-fno-guess-branch-probability,)
@@ -46,8 +46,15 @@ CFLAGS += $(call cc-option,-falign-functions=1 -falign-jumps=1 -falign-labels=1
46# be fixed.. 46# be fixed..
47#CFLAGS+=$(call cc-option,-Wconversion,) 47#CFLAGS+=$(call cc-option,-Wconversion,)
48 48
49ifeq ($(CONFIG_DEBUG),y) 49ifneq ($(CONFIG_DEBUG),y)
50CFLAGS += $(call cc-option,-g) 50CFLAGS += $(call cc-option,-Os,)
51else
52CFLAGS += $(call cc-option,-g,)
53ifeq ($(CONFIG_DEBUG_PESSIMIZE),y)
54CFLAGS += $(call cc-option,-O0,)
55else
56CFLAGS += $(call cc-option,-Os,)
57endif
51endif 58endif
52 59
53# If arch/$(ARCH)/Makefile did not override it (with, say, -fPIC)... 60# If arch/$(ARCH)/Makefile did not override it (with, say, -fPIC)...