common/autoconf/generated-configure.sh
changeset 32810 8203e52cd373
parent 32809 a24b5324b595
child 32813 407e8f8bd95b
--- a/common/autoconf/generated-configure.sh	Wed Sep 30 11:38:01 2015 +0200
+++ b/common/autoconf/generated-configure.sh	Mon Oct 05 13:44:40 2015 +0200
@@ -705,9 +705,6 @@
 CFLAGS_JDKEXE
 CFLAGS_JDKLIB
 MACOSX_VERSION_MIN
-LEGACY_EXTRA_LDFLAGS
-LEGACY_EXTRA_CXXFLAGS
-LEGACY_EXTRA_CFLAGS
 CXX_O_FLAG_NONE
 CXX_O_FLAG_DEBUG
 CXX_O_FLAG_NORM
@@ -728,8 +725,6 @@
 SET_EXECUTABLE_ORIGIN
 CXX_FLAG_REORDER
 C_FLAG_REORDER
-SYSROOT_LDFLAGS
-SYSROOT_CFLAGS
 RC_FLAGS
 AR_OUT_OPTION
 LD_OUT_OPTION
@@ -747,6 +742,8 @@
 HOTSPOT_CXX
 HOTSPOT_RC
 HOTSPOT_MT
+BUILD_SYSROOT_LDFLAGS
+BUILD_SYSROOT_CFLAGS
 BUILD_LD
 BUILD_CXX
 BUILD_CC
@@ -793,6 +790,11 @@
 VS_INCLUDE
 VS_PATH
 CYGWIN_LINK
+SYSROOT_LDFLAGS
+SYSROOT_CFLAGS
+LEGACY_EXTRA_LDFLAGS
+LEGACY_EXTRA_CXXFLAGS
+LEGACY_EXTRA_CFLAGS
 EXE_SUFFIX
 OBJ_SUFFIX
 STATIC_LIBRARY
@@ -1078,11 +1080,11 @@
 with_override_jdk
 with_import_hotspot
 with_toolchain_type
-with_toolchain_version
-with_jtreg
 with_extra_cflags
 with_extra_cxxflags
 with_extra_ldflags
+with_toolchain_version
+with_jtreg
 enable_warnings_as_errors
 enable_debug_symbols
 enable_zip_debug_info
@@ -1937,14 +1939,14 @@
                           source
   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
                           to show possible values [platform dependent]
+  --with-extra-cflags     extra flags to be used when compiling jdk c-files
+  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
+  --with-extra-ldflags    extra flags to be used when linking jdk
   --with-toolchain-version
                           the version of the toolchain to look for, use
                           '--help' to show possible values [platform
                           dependent]
   --with-jtreg            Regression Test Harness [probed]
-  --with-extra-cflags     extra flags to be used when compiling jdk c-files
-  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
-  --with-extra-ldflags    extra flags to be used when linking jdk
   --with-x                use the X Window System
   --with-cups             specify prefix directory for the cups package
                           (expecting the headers under PATH/include)
@@ -3767,6 +3769,15 @@
 # questions.
 #
 
+# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
+# corresponding configure arguments instead
+
+
+# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
+# that configure can use them while detecting compilers.
+# TOOLCHAIN_TYPE is available here.
+
+
 
 
 
@@ -4364,7 +4375,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1443605847
+DATE_WHEN_GENERATED=1444045451
 
 ###############################################################################
 #
@@ -26827,6 +26838,109 @@
   fi
 
 
+# User supplied flags should be used when configure detects compilers
+
+  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
+$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
+  fi
+
+  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
+$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
+  fi
+
+  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
+$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
+  fi
+
+
+# Check whether --with-extra-cflags was given.
+if test "${with_extra_cflags+set}" = set; then :
+  withval=$with_extra_cflags;
+fi
+
+
+
+# Check whether --with-extra-cxxflags was given.
+if test "${with_extra_cxxflags+set}" = set; then :
+  withval=$with_extra_cxxflags;
+fi
+
+
+
+# Check whether --with-extra-ldflags was given.
+if test "${with_extra_ldflags+set}" = set; then :
+  withval=$with_extra_ldflags;
+fi
+
+
+  EXTRA_CFLAGS="$with_extra_cflags"
+  EXTRA_CXXFLAGS="$with_extra_cxxflags"
+  EXTRA_LDFLAGS="$with_extra_ldflags"
+
+  # Hotspot needs these set in their legacy form
+  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
+  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
+  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
+
+
+
+
+
+  # The global CFLAGS and LDLAGS variables are used by configure tests and
+  # should include the extra parameters
+  CFLAGS="$EXTRA_CFLAGS"
+  CXXFLAGS="$EXTRA_CXXFLAGS"
+  LDFLAGS="$EXTRA_LDFLAGS"
+  CPPFLAGS=""
+
+# The sysroot cflags are needed for configure to be able to run the compilers
+
+  if test "x$SYSROOT" != "x"; then
+    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+      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"
+        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"
+      fi
+    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
+      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
+      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
+    elif test "x$TOOLCHAIN_TYPE" = xclang; then
+      SYSROOT_CFLAGS="-isysroot $SYSROOT"
+      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
+    fi
+    # Propagate the sysroot args to hotspot
+    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
+    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
+    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
+    # The global CFLAGS and LDFLAGS variables need these for configure to function
+    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
+    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
+    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
+    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
+  fi
+
+  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+    # We also need -iframework<path>/System/Library/Frameworks
+    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
+    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
+    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
+    # set this here so it doesn't have to be peppered throughout the forest
+    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
+    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
+  fi
+
+
+
+
+
 # Then detect the actual binaries needed
 
   # FIXME: Is this needed?
@@ -40557,13 +40671,19 @@
     fi
   fi
 
+    BUILD_SYSROOT_CFLAGS=""
+    BUILD_SYSROOT_LDFLAGS=""
   else
     # If we are not cross compiling, use the normal target compilers for
     # building the build platform executables.
     BUILD_CC="$CC"
     BUILD_CXX="$CXX"
     BUILD_LD="$LD"
-  fi
+    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
+    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
+  fi
+
+
 
 
 
@@ -41308,44 +41428,6 @@
     COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
   fi
 
-  if test "x$SYSROOT" != "x"; then
-    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
-      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"
-        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"
-      fi
-    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
-      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
-      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
-      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
-    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
-      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
-      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
-    elif test "x$TOOLCHAIN_TYPE" = xclang; then
-      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
-      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
-    fi
-    # Propagate the sysroot args to hotspot
-    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
-    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
-    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
-  fi
-
-  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
-  # set this here so it doesn't have to be peppered throughout the forest
-  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
-    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
-    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
-  fi
-
-
-
-
 
 # FIXME: Currently we must test this after toolchain but before flags. Fix!
 
@@ -42338,54 +42420,9 @@
     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
   fi
 
-  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
-$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
-  fi
-
-  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
-$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
-  fi
-
-  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
-$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
-  fi
-
-
-# Check whether --with-extra-cflags was given.
-if test "${with_extra_cflags+set}" = set; then :
-  withval=$with_extra_cflags;
-fi
-
-
-
-# Check whether --with-extra-cxxflags was given.
-if test "${with_extra_cxxflags+set}" = set; then :
-  withval=$with_extra_cxxflags;
-fi
-
-
-
-# Check whether --with-extra-ldflags was given.
-if test "${with_extra_ldflags+set}" = set; then :
-  withval=$with_extra_ldflags;
-fi
-
-
-  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
-  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
-  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
-
-  # Hotspot needs these set in their legacy form
-  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
-  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
-  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
-
-
-
-
+  CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
+  CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
+  LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
 
   ###############################################################################
   #