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 ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
  ifeq ($(LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS),1)
    ifeq ($(VARIANT), OPT)
      CC_OPT   = -g  -xs $(CC_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL))
      CXX_OPT  = -g0 -xs $(CXX_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL))
    endif
  endif
endif

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.

/Magnus

Reply via email to