diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-06-12 20:23:03 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-06-12 20:23:03 +0000 |
commit | bd8390a872ae42751ff441180017b2d3c76dbe03 (patch) | |
tree | b17dd9976205b20247b3d5787ff49b41848b7361 | |
parent | fdddab0c61c55c25d4218d4370e2b16a7936a794 (diff) | |
download | busybox-w32-bd8390a872ae42751ff441180017b2d3c76dbe03.tar.gz busybox-w32-bd8390a872ae42751ff441180017b2d3c76dbe03.tar.bz2 busybox-w32-bd8390a872ae42751ff441180017b2d3c76dbe03.zip |
Reinstate DEBUG_PESSIMIZE (by Christian Ionescu-Idbohrn)
-rw-r--r-- | Config.in | 23 | ||||
-rw-r--r-- | Makefile.flags | 13 |
2 files changed, 21 insertions, 15 deletions
@@ -396,6 +396,17 @@ config DEBUG | |||
396 | 396 | ||
397 | Most people should answer N. | 397 | Most people should answer N. |
398 | 398 | ||
399 | config 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 | |||
399 | config WERROR | 410 | config 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 | |||
419 | choice | 418 | choice |
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() |
36 | CFLAGS += $(call cc-ifversion, -ge, 0400, -Wold-style-definition) | 36 | CFLAGS += $(call cc-ifversion, -ge, 0400, -Wold-style-definition) |
37 | 37 | ||
38 | CFLAGS += $(call cc-option,-Os -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections,) | 38 | CFLAGS += $(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): |
41 | CFLAGS += $(call cc-option,-fno-guess-branch-probability,) | 41 | 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 | |||
46 | # be fixed.. | 46 | # be fixed.. |
47 | #CFLAGS+=$(call cc-option,-Wconversion,) | 47 | #CFLAGS+=$(call cc-option,-Wconversion,) |
48 | 48 | ||
49 | ifeq ($(CONFIG_DEBUG),y) | 49 | ifneq ($(CONFIG_DEBUG),y) |
50 | CFLAGS += $(call cc-option,-g) | 50 | CFLAGS += $(call cc-option,-Os,) |
51 | else | ||
52 | CFLAGS += $(call cc-option,-g,) | ||
53 | ifeq ($(CONFIG_DEBUG_PESSIMIZE),y) | ||
54 | CFLAGS += $(call cc-option,-O0,) | ||
55 | else | ||
56 | CFLAGS += $(call cc-option,-Os,) | ||
57 | endif | ||
51 | endif | 58 | endif |
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)... |