Definitely something wrong here... When I originally did these
changes, here was the thinking:

    230 # If Full Debug Symbols is enabled, then we want the same debug and
    231 # optimization flags as used by FASTDEBUG. We also want all the
    232 # debug info in one place (-xs).
    233 #
    234 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
    235   ifeq ($(LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS),1)
    236     ifeq ($(VARIANT), OPT)
    237       CC_OPT   = -g  -xs $(CC_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL))
    238       CXX_OPT  = -g0 -xs $(CXX_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL))
    239     endif
    240     CFLAGS_DEBUG_OPTION    += -xs
    241     CXXFLAGS_DEBUG_OPTION  += -xs
    242   endif
    243 endif

and a little bit lower:

    257 # Optimization flags
    258 CFLAGS_OPT      = $(CC_OPT)

and a little bit lower:

    295 CXXFLAGS_OPT    = $(CXX_OPT)

so my early settings of CC_OPT and CXX_OPT were squirreled away in
the early CFLAGS_OPT and CXXFLAGS_OPT settings. That used to work...

However, that little trick no longer seems to be working... confirmed
by grep'ing for the '-g' option in my most recent JPRT build log on
Solaris...

Thanks for spotting this... Do you happen to already have a suggested
fix for this?

Dan


On 5/29/12 2:50 AM, Magnus Ihse Bursie wrote:
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