aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-06-12 20:23:03 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-06-12 20:23:03 +0000
commitbd8390a872ae42751ff441180017b2d3c76dbe03 (patch)
treeb17dd9976205b20247b3d5787ff49b41848b7361
parentfdddab0c61c55c25d4218d4370e2b16a7936a794 (diff)
downloadbusybox-w32-bd8390a872ae42751ff441180017b2d3c76dbe03.tar.gz
busybox-w32-bd8390a872ae42751ff441180017b2d3c76dbe03.tar.bz2
busybox-w32-bd8390a872ae42751ff441180017b2d3c76dbe03.zip
Reinstate DEBUG_PESSIMIZE (by Christian Ionescu-Idbohrn)
-rw-r--r--Config.in23
-rw-r--r--Makefile.flags13
2 files changed, 21 insertions, 15 deletions
diff --git a/Config.in b/Config.in
index 3b374967b..0a7edf84c 100644
--- a/Config.in
+++ b/Config.in
@@ -396,6 +396,17 @@ config DEBUG
396 396
397 Most people should answer N. 397 Most people should answer N.
398 398
399config DEBUG_PESSIMIZE
400 bool "Disable compiler optimizations."
401 default n
402 depends on DEBUG
403 help
404 The compiler's optimization of source code can eliminate and reorder
405 code, resulting in an executable that's hard to understand when
406 stepping through it with a debugger. This switches it off, resulting
407 in a much bigger executable that more closely matches the source
408 code.
409
399config WERROR 410config WERROR
400 bool "Abort compilation on any warning" 411 bool "Abort compilation on any warning"
401 default n 412 default n
@@ -404,18 +415,6 @@ config WERROR
404 415
405 Most people should answer N. 416 Most people should answer N.
406 417
407# Seems to be unused
408#config DEBUG_PESSIMIZE
409# bool "Disable compiler optimizations."
410# default n
411# depends on DEBUG
412# help
413# The compiler's optimization of source code can eliminate and reorder
414# code, resulting in an executable that's hard to understand when
415# stepping through it with a debugger. This switches it off, resulting
416# in a much bigger executable that more closely matches the source
417# code.
418
419choice 418choice
420 prompt "Additional debugging library" 419 prompt "Additional debugging library"
421 default NO_DEBUG_LIB 420 default NO_DEBUG_LIB
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)...