mirror of
https://github.com/sheumann/hush.git
synced 2024-12-26 10:32:02 +00:00
Reinstate DEBUG_PESSIMIZE (by Christian Ionescu-Idbohrn)
This commit is contained in:
parent
fdddab0c61
commit
bd8390a872
23
Config.in
23
Config.in
@ -396,6 +396,17 @@ config DEBUG
|
|||||||
|
|
||||||
Most people should answer N.
|
Most people should answer N.
|
||||||
|
|
||||||
|
config DEBUG_PESSIMIZE
|
||||||
|
bool "Disable compiler optimizations."
|
||||||
|
default n
|
||||||
|
depends on DEBUG
|
||||||
|
help
|
||||||
|
The compiler's optimization of source code can eliminate and reorder
|
||||||
|
code, resulting in an executable that's hard to understand when
|
||||||
|
stepping through it with a debugger. This switches it off, resulting
|
||||||
|
in a much bigger executable that more closely matches the source
|
||||||
|
code.
|
||||||
|
|
||||||
config WERROR
|
config WERROR
|
||||||
bool "Abort compilation on any warning"
|
bool "Abort compilation on any warning"
|
||||||
default n
|
default n
|
||||||
@ -404,18 +415,6 @@ config WERROR
|
|||||||
|
|
||||||
Most people should answer N.
|
Most people should answer N.
|
||||||
|
|
||||||
# Seems to be unused
|
|
||||||
#config DEBUG_PESSIMIZE
|
|
||||||
# bool "Disable compiler optimizations."
|
|
||||||
# default n
|
|
||||||
# depends on DEBUG
|
|
||||||
# help
|
|
||||||
# The compiler's optimization of source code can eliminate and reorder
|
|
||||||
# code, resulting in an executable that's hard to understand when
|
|
||||||
# stepping through it with a debugger. This switches it off, resulting
|
|
||||||
# in a much bigger executable that more closely matches the source
|
|
||||||
# code.
|
|
||||||
|
|
||||||
choice
|
choice
|
||||||
prompt "Additional debugging library"
|
prompt "Additional debugging library"
|
||||||
default NO_DEBUG_LIB
|
default NO_DEBUG_LIB
|
||||||
|
@ -35,7 +35,7 @@ endif
|
|||||||
# gcc 3.x emits bogus "old style proto" warning on find.c:alloc_action()
|
# 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-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
|
# -fno-guess-branch-probability: prohibit pseudo-random guessing
|
||||||
# of branch probabilities (hopefully makes bloatcheck more stable):
|
# of branch probabilities (hopefully makes bloatcheck more stable):
|
||||||
CFLAGS += $(call cc-option,-fno-guess-branch-probability,)
|
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..
|
# be fixed..
|
||||||
#CFLAGS+=$(call cc-option,-Wconversion,)
|
#CFLAGS+=$(call cc-option,-Wconversion,)
|
||||||
|
|
||||||
ifeq ($(CONFIG_DEBUG),y)
|
ifneq ($(CONFIG_DEBUG),y)
|
||||||
CFLAGS += $(call cc-option,-g)
|
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
|
endif
|
||||||
|
|
||||||
# If arch/$(ARCH)/Makefile did not override it (with, say, -fPIC)...
|
# If arch/$(ARCH)/Makefile did not override it (with, say, -fPIC)...
|
||||||
|
Loading…
Reference in New Issue
Block a user