summaryrefslogtreecommitdiff
path: root/Makefile.flags
diff options
context:
space:
mode:
authorDenis Vlasenko2008-06-12 20:23:03 +0000
committerDenis Vlasenko2008-06-12 20:23:03 +0000
commitbd8390a872ae42751ff441180017b2d3c76dbe03 (patch)
treeb17dd9976205b20247b3d5787ff49b41848b7361 /Makefile.flags
parentfdddab0c61c55c25d4218d4370e2b16a7936a794 (diff)
downloadbusybox-bd8390a872ae42751ff441180017b2d3c76dbe03.zip
busybox-bd8390a872ae42751ff441180017b2d3c76dbe03.tar.gz
Reinstate DEBUG_PESSIMIZE (by Christian Ionescu-Idbohrn)
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 e940547..0ffc05c 100644
--- a/Makefile.flags
+++ b/Makefile.flags
@@ -35,7 +35,7 @@ endif
# gcc 3.x emits bogus "old style proto" warning on find.c:alloc_action()
CFLAGS += $(call cc-ifversion, -ge, 0400, -Wold-style-definition)
-CFLAGS += $(call cc-option,-Os -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections,)
+CFLAGS += $(call cc-option,-fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections,)
# -fno-guess-branch-probability: prohibit pseudo-random guessing
# of branch probabilities (hopefully makes bloatcheck more stable):
CFLAGS += $(call cc-option,-fno-guess-branch-probability,)
@@ -46,8 +46,15 @@ CFLAGS += $(call cc-option,-falign-functions=1 -falign-jumps=1 -falign-labels=1
# be fixed..
#CFLAGS+=$(call cc-option,-Wconversion,)
-ifeq ($(CONFIG_DEBUG),y)
-CFLAGS += $(call cc-option,-g)
+ifneq ($(CONFIG_DEBUG),y)
+CFLAGS += $(call cc-option,-Os,)
+else
+CFLAGS += $(call cc-option,-g,)
+ifeq ($(CONFIG_DEBUG_PESSIMIZE),y)
+CFLAGS += $(call cc-option,-O0,)
+else
+CFLAGS += $(call cc-option,-Os,)
+endif
endif
# If arch/$(ARCH)/Makefile did not override it (with, say, -fPIC)...