changeset 1939:3ca929279adb

8148929: Suboptimal code generated when setting sysroot include with Solaris Studio Reviewed-by: ihse, dholmes
author erikj
date Fri, 05 Feb 2016 09:41:16 +0100
parents 6de443df8af9
children be58b02c11f9
files common/autoconf/flags.m4 common/autoconf/generated-configure.sh
diffstat 2 files changed, 10 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/common/autoconf/flags.m4	Thu Feb 04 16:47:55 2016 -0800
+++ b/common/autoconf/flags.m4	Fri Feb 05 09:41:16 2016 +0100
@@ -80,8 +80,9 @@
       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
         # Solaris Studio does not have a concept of sysroot. Instead we must
         # make sure the default include and lib dirs are appended to each
-        # compile and link command line.
-        $1SYSROOT_CFLAGS="-I[$]$1SYSROOT/usr/include"
+        # compile and link command line. Must also add -I-xbuiltin to enable
+        # inlining of system functions and intrinsics.
+        $1SYSROOT_CFLAGS="-I-xbuiltin -I[$]$1SYSROOT/usr/include"
         $1SYSROOT_LDFLAGS="-L[$]$1SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
             -L[$]$1SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
             -L[$]$1SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
--- a/common/autoconf/generated-configure.sh	Thu Feb 04 16:47:55 2016 -0800
+++ b/common/autoconf/generated-configure.sh	Fri Feb 05 09:41:16 2016 +0100
@@ -4836,7 +4836,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1454436146
+DATE_WHEN_GENERATED=1454661656
 
 ###############################################################################
 #
@@ -29973,8 +29973,9 @@
       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
         # Solaris Studio does not have a concept of sysroot. Instead we must
         # make sure the default include and lib dirs are appended to each
-        # compile and link command line.
-        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
+        # compile and link command line. Must also add -I-xbuiltin to enable
+        # inlining of system functions and intrinsics.
+        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
             -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
@@ -42366,8 +42367,9 @@
       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
         # Solaris Studio does not have a concept of sysroot. Instead we must
         # make sure the default include and lib dirs are appended to each
-        # compile and link command line.
-        BUILD_SYSROOT_CFLAGS="-I$BUILD_SYSROOT/usr/include"
+        # compile and link command line. Must also add -I-xbuiltin to enable
+        # inlining of system functions and intrinsics.
+        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
         BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
             -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
             -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"