Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7174861

all/OPT jdk build on Solaris with FDS enabled sets wrong options

XMLWordPrintable

    • b43
    • generic
    • solaris

        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.

              dcubed Daniel Daugherty
              dcubed Daniel Daugherty
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: