Bug in FDS for Solaris?
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Tue May 29 08:50:13 UTC 2012
When converting old makefiles to the new build-infra, we discovered what
seems to be a bug for Full Debug Symbols on Solaris.
In the file make/common/Defs-solaris.gmk, the following code (somewhat
edited) was added:
ifeq ($(VARIANT), OPT)
CC_OPT = -g -xs $(CC_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL))
CXX_OPT = -g0 -xs $(CXX_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL))
However, much further down in the file is the following:
# Default optimization settings based on level.
CC_OPT = $(CC_OPT/$(OPTIMIZATION_LEVEL))
CXX_OPT = $(CXX_OPT/$(OPTIMIZATION_LEVEL))
This is an unconditional assignment to CC[XX]_OPT, which completely
overrides the FDS specialization.
So, either this is unintended (seems most likely), or the FDS stanza is
unnecessary. The net result is anyway that, as far as we call tell, even
with FDS, compilations on Solaris happens without -g.
More information about the build-dev