diff options
author | Lubos Lunak <l.lunak@suse.cz> | 2012-10-19 17:00:46 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-10-22 14:56:20 +0200 |
commit | 40763e05acac832a274c194564ff1b182ee01d3f (patch) | |
tree | 47ce8ce4c32124ae6048ff2ff512643caec44abc | |
parent | 84b4293e3dc6edd59e7d09383320361aaeed9e87 (diff) |
disable gb_COMPILEROPTFLAGS in debug mode
This means that modules where --enable-selective-debuginfo disables -g
do not revert back to -O just because -g is not wanted there. As this
will presumably happen with modules the developer does not care about,
there's no gain from the -O and the compile there would take longer.
Change-Id: Ied84d2f69035d6580279b0657c5a5ba5440c6f16
-rw-r--r-- | solenv/gbuild/platform/solaris.mk | 5 | ||||
-rw-r--r-- | solenv/gbuild/platform/unxgcc.mk | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk index 9a17541ec82d..fc6783d2a233 100644 --- a/solenv/gbuild/platform/solaris.mk +++ b/solenv/gbuild/platform/solaris.mk @@ -154,7 +154,12 @@ endif gb_DEBUG_CFLAGS := -ggdb2 -finline-limit=0 -fno-inline -fno-default-inline +ifneq ($(gb_DEBUGLEVEL),0) +gb_COMPILEROPTFLAGS := +else gb_COMPILEROPTFLAGS := $(gb_COMPILERDEFAULTOPTFLAGS) +endif + gb_COMPILERNOOPTFLAGS := -O0 # LinkTarget class diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk index c5c7a30b7b71..f90963e989cc 100644 --- a/solenv/gbuild/platform/unxgcc.mk +++ b/solenv/gbuild/platform/unxgcc.mk @@ -153,7 +153,12 @@ else gb_LINKEROPTFLAGS := -Wl,-O1 endif +ifneq ($(gb_DEBUGLEVEL),0) +gb_COMPILEROPTFLAGS := +else gb_COMPILEROPTFLAGS := $(gb_COMPILERDEFAULTOPTFLAGS) +endif + gb_COMPILERNOOPTFLAGS := -O0 gb_LINKERSTRIPDEBUGFLAGS := -Wl,-S |