United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7174861 all/OPT jdk build on Solaris with FDS enabled sets wrong options
JDK-7174861 : all/OPT jdk build on Solaris with FDS enabled sets wrong options

Details
Type:
Bug
Submit Date:
2012-06-06
Status:
Resolved
Updated Date:
2012-06-12
Project Name:
JDK
Resolved Date:
2012-06-12
Component:
infrastructure
OS:
solaris
Sub-Component:
build
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
8
Fixed Versions:

Related Reports
Backport:
Relates:

Sub Tasks

Description
E-mail from Magnus describing the issue:

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.

                                    

Comments
PUBLIC COMMENTS

E-mail review request from Magnus:

As previously discussed here, there is a bug basically disabling FDS on Solaris.

Here is a webrev for a patch from Jonas Oreland (###@###.###; he's not on this list though).

http://cr.openjdk.java.net/~ihse/fds-solaris-bugfix/webrev.00/

Jonas has done some reasonable amount of testing, looking at command lines and making sure they seem alright, and checking that debug information is added to output.

I have reviewed it myself and find it OK.

Kelly: if this get's OK in the reviews (for my part I'm satisfied if Daniel says OK), can you push it into the build forest? 


The entire review thread is here:
http://mail.openjdk.java.net/pipermail/build-dev/2012-June/006241.html
                                     
2012-06-06
EVALUATION

Apply the patch that Jonas provided.
                                     
2012-06-06
EVALUATION

http://hg.openjdk.java.net/jdk8/tl/jdk/rev/181175887d24
                                     
2012-06-07



Hardware and Software, Engineered to Work Together