RFR: JDK-8019729: JDK build HIGHEST compiler optimisation setting isn't valid for Sun C++ compiler

Erik Joelsson erik.joelsson at oracle.com
Tue Mar 4 09:31:36 UTC 2014


Hello,

The compiler flag "-xalias_level=basic" is not valid for the Solaris 
Studio C++ compiler on Solaris, but is currently set for both C and C++ 
highest optimization flags. Since there are currently no C++ libraries 
using the highest setting on Solaris, we should just remove the flag for 
C++.

Bug: https://bugs.openjdk.java.net/browse/JDK-8019729

Patch inline:

diff --git a/common/autoconf/flags.m4 b/common/autoconf/flags.m4
--- a/common/autoconf/flags.m4
+++ b/common/autoconf/flags.m4
@@ -272,11 +272,11 @@

    # Optimization levels
    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
-    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xalias_level=basic 
-xbuiltin=%all -xdepend -xrestrict -xlibmil"
+    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all 
-xdepend -xrestrict -xlibmil"

      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
        # FIXME: seems we always set -xregs=no%frameptr; put it 
elsewhere more global?
-      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
+      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic 
-xregs=no%frameptr"
        C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
        C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
        C_O_FLAG_NONE="-xregs=no%frameptr"
@@ -289,7 +289,7 @@
          CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
        fi
      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
-      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST 
-xprefetch=auto,explicit -xchip=ultra"
+      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST 
-xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
        C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
        C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
        C_O_FLAG_NONE=""


/Erik



More information about the build-dev mailing list