Hopefully all flags are OK on unix platforms now. ihse-cflags-rewrite-branch
authorihse
Mon, 26 Feb 2018 15:07:23 +0100
branchihse-cflags-rewrite-branch
changeset 56182 42c84b4c2918
parent 56181 8caab5c24dcf
child 56188 321c18a6b256
Hopefully all flags are OK on unix platforms now.
make/autoconf/flags-ldflags.m4
make/autoconf/flags-other.m4
--- a/make/autoconf/flags-ldflags.m4	Mon Feb 26 14:43:22 2018 +0100
+++ b/make/autoconf/flags-ldflags.m4	Mon Feb 26 15:07:23 2018 +0100
@@ -217,7 +217,7 @@
 
   # Export variables according to old definitions, prefix with $2 if present.
   LDFLAGS_JDK_COMMON="$BASIC_LDFLAGS $BASIC_LDFLAGS_JDK_ONLY \
-      $OS_LDFLAGS_JDK_ONLY $DEBUGLEVEL_LDFLAGS_JDK_ONLY $EXTRA_LDFLAGS"
+      $OS_LDFLAGS_JDK_ONLY $DEBUGLEVEL_LDFLAGS_JDK_ONLY ${$2EXTRA_LDFLAGS}"
   $2LDFLAGS_JDKLIB="$LDFLAGS_JDK_COMMON $BASIC_LDFLAGS_JDK_LIB_ONLY \
       ${$1_LDFLAGS_JDK_LIBPATH} $SHARED_LIBRARY_FLAGS"
   $2LDFLAGS_JDKEXE="$LDFLAGS_JDK_COMMON $EXECUTABLE_LDFLAGS \
@@ -225,7 +225,7 @@
 
   $2JVM_LDFLAGS="$BASIC_LDFLAGS $BASIC_LDFLAGS_JVM_ONLY $OS_LDFLAGS_JVM_ONLY \
       $DEBUGLEVEL_LDFLAGS $DEBUGLEVEL_LDFLAGS_JVM_ONLY $BASIC_LDFLAGS_ONLYCXX \
-      ${$1_CPU_LDFLAGS} ${$1_CPU_LDFLAGS_JVM_ONLY} $EXTRA_LDFLAGS"
+      ${$1_CPU_LDFLAGS} ${$1_CPU_LDFLAGS_JVM_ONLY} ${$2EXTRA_LDFLAGS}"
 
   AC_SUBST($2LDFLAGS_JDKLIB)
   AC_SUBST($2LDFLAGS_JDKEXE)
--- a/make/autoconf/flags-other.m4	Mon Feb 26 14:43:22 2018 +0100
+++ b/make/autoconf/flags-other.m4	Mon Feb 26 15:07:23 2018 +0100
@@ -108,7 +108,7 @@
 AC_DEFUN([FLAGS_SETUP_ASFLAGS],
 [
   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
-    JVM_ASFLAGS="-x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
+    JVM_BASIC_ASFLAGS="-x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
   fi
 ])
 
@@ -118,12 +118,8 @@
 # $2 - Optional prefix for each variable defined.
 AC_DEFUN([FLAGS_SETUP_ASFLAGS_CPU_DEP],
 [
-  # NOTE: This test should be generalized, but for now keep old behavior.
-  if test "x$1" = "xTARGET"; then
-    $1_JVM_ASFLAGS_CPU="$MACHINE_FLAG"
-  fi
-
-  $2JVM_ASFLAGS="$JVM_ASFLAGS ${$1_JVM_ASFLAGS_CPU}"
+  # Misuse EXTRA_CFLAGS to mimic old behavior
+  $2JVM_ASFLAGS="$JVM_BASIC_ASFLAGS ${$2EXTRA_CFLAGS}"
 
   AC_SUBST($2JVM_ASFLAGS)
 ])