Bug in FDS for Solaris?

Daniel D. Daugherty daniel.daugherty at oracle.com
Tue May 29 17:26:21 UTC 2012

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)
     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

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


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 ($(VARIANT), OPT)
>     endif
>   endif
> endif
> However, much further down in the file is the following:
> # Default optimization settings based on 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

More information about the build-dev mailing list