changeset 2089:559c65fe6b56

8154251: ANSI-C Quoting bug in hotspot.m4 during configure on SLES 10 and 11 Reviewed-by: erikj
author simonis
date Tue, 19 Apr 2016 13:19:41 +0200
parents 645c48292130
children 4a67e08031be e51a92f0f1ac
files common/autoconf/generated-configure.sh common/autoconf/hotspot.m4
diffstat 2 files changed, 21 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/common/autoconf/generated-configure.sh	Thu Apr 14 19:55:39 2016 -0700
+++ b/common/autoconf/generated-configure.sh	Tue Apr 19 13:19:41 2016 +0200
@@ -5056,7 +5056,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1460538705
+DATE_WHEN_GENERATED=1461064700
 
 ###############################################################################
 #
@@ -16277,7 +16277,10 @@
   # Check that the selected variants are valid
 
   # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
-  INVALID_VARIANTS=`$GREP -Fvx "${VALID_JVM_VARIANTS// /$'\n'}" <<< "${JVM_VARIANTS// /$'\n'}"`
+  # Notice that the original variant failes on SLES 10 and 11
+  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
+  STACK=${JVM_VARIANTS// /$'\n'}
+  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
   if test "x$INVALID_VARIANTS" != x; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
 $as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
@@ -16286,7 +16289,9 @@
 
   # All "special" variants share the same output directory ("server")
   VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
-  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}" <<< "${JVM_VARIANTS// /$'\n'}"`
+  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
+  STACK=${JVM_VARIANTS// /$'\n'}
+  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
   if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
     as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
   fi
@@ -65556,7 +65561,9 @@
     JVM_FEATURES_TO_TEST=${!features_var_name}
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
 $as_echo "$JVM_FEATURES_TO_TEST" >&6; }
-    INVALID_FEATURES=`$GREP -Fvx "${VALID_JVM_FEATURES// /$'\n'}" <<< "${JVM_FEATURES_TO_TEST// /$'\n'}"`
+    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
+    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
+    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
     if test "x$INVALID_FEATURES" != x; then
       as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
     fi
--- a/common/autoconf/hotspot.m4	Thu Apr 14 19:55:39 2016 -0700
+++ b/common/autoconf/hotspot.m4	Tue Apr 19 13:19:41 2016 +0200
@@ -93,7 +93,10 @@
   # Check that the selected variants are valid
 
   # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
-  INVALID_VARIANTS=`$GREP -Fvx "${VALID_JVM_VARIANTS// /$'\n'}" <<< "${JVM_VARIANTS// /$'\n'}"`
+  # Notice that the original variant failes on SLES 10 and 11
+  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
+  STACK=${JVM_VARIANTS// /$'\n'}
+  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
   if test "x$INVALID_VARIANTS" != x; then
     AC_MSG_NOTICE([Unknown variant(s) specified: $INVALID_VARIANTS])
     AC_MSG_ERROR([The available JVM variants are: $VALID_JVM_VARIANTS])
@@ -101,7 +104,9 @@
 
   # All "special" variants share the same output directory ("server")
   VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
-  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}" <<< "${JVM_VARIANTS// /$'\n'}"`
+  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
+  STACK=${JVM_VARIANTS// /$'\n'}
+  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
   if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
     AC_MSG_ERROR([You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS.])
   fi
@@ -293,7 +298,9 @@
     features_var_name=JVM_FEATURES_$variant
     JVM_FEATURES_TO_TEST=${!features_var_name}
     AC_MSG_RESULT([$JVM_FEATURES_TO_TEST])
-    INVALID_FEATURES=`$GREP -Fvx "${VALID_JVM_FEATURES// /$'\n'}" <<< "${JVM_FEATURES_TO_TEST// /$'\n'}"`
+    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
+    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
+    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
     if test "x$INVALID_FEATURES" != x; then
       AC_MSG_ERROR([Invalid JVM feature(s): $INVALID_FEATURES])
     fi