summaryrefslogtreecommitdiffstats
path: root/solenv
diff options
context:
space:
mode:
authorLubos Lunak <l.lunak@suse.cz>2012-10-19 17:00:46 +0200
committerLuboš Luňák <l.lunak@suse.cz>2012-10-22 14:56:20 +0200
commit40763e05acac832a274c194564ff1b182ee01d3f (patch)
tree47ce8ce4c32124ae6048ff2ff512643caec44abc /solenv
parentallow LDFLAGS from gbuild to be selective too (diff)
downloadcore-40763e05acac832a274c194564ff1b182ee01d3f.tar.gz
core-40763e05acac832a274c194564ff1b182ee01d3f.zip
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
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/platform/solaris.mk5
-rw-r--r--solenv/gbuild/platform/unxgcc.mk5
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