Make configure compile.
--- a/make/autoconf/flags.m4 Mon Feb 19 23:09:18 2018 +0100
+++ b/make/autoconf/flags.m4 Mon Feb 19 23:25:11 2018 +0100
@@ -377,25 +377,25 @@
FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER
- FLAGS_OS=OPENJDK_TARGET_OS
- FLAGS_OS_TYPE=OPENJDK_TARGET_OS_TYPE
- FLAGS_CPU=OPENJDK_TARGET_CPU
- FLAGS_CPU_ARCH=OPENJDK_TARGET_CPU_ARCH
- FLAGS_CPU_BITS=OPENJDK_TARGET_CPU_BITS
- FLAGS_CPU_ENDIAN=OPENJDK_TARGET_CPU_ENDIAN
- FLAGS_CPU_LEGACY=OPENJDK_TARGET_CPU_LEGACY
- FLAGS_ADD_LP64=OPENJDK_TARGET_ADD_LP64
+ FLAGS_OS=$OPENJDK_TARGET_OS
+ FLAGS_OS_TYPE=$OPENJDK_TARGET_OS_TYPE
+ FLAGS_CPU=$OPENJDK_TARGET_CPU
+ FLAGS_CPU_ARCH=$OPENJDK_TARGET_CPU_ARCH
+ FLAGS_CPU_BITS=$OPENJDK_TARGET_CPU_BITS
+ FLAGS_CPU_ENDIAN=$OPENJDK_TARGET_CPU_ENDIAN
+ FLAGS_CPU_LEGACY=$OPENJDK_TARGET_CPU_LEGACY
+ FLAGS_ADD_LP64=$OPENJDK_TARGET_ADD_LP64
FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_CPU_DEP([TARGET])
- FLAGS_OS=OPENJDK_BUILD_OS
- FLAGS_OS_TYPE=OPENJDK_BUILD_OS_TYPE
- FLAGS_CPU=OPENJDK_BUILD_CPU
- FLAGS_CPU_ARCH=OPENJDK_BUILD_CPU_ARCH
- FLAGS_CPU_BITS=OPENJDK_BUILD_CPU_BITS
- FLAGS_CPU_ENDIAN=OPENJDK_BUILD_CPU_ENDIAN
- FLAGS_CPU_LEGACY=OPENJDK_BUILD_CPU_LEGACY
- FLAGS_ADD_LP64=OPENJDK_BUILD_ADD_LP64=
+ FLAGS_OS=$OPENJDK_BUILD_OS
+ FLAGS_OS_TYPE=$OPENJDK_BUILD_OS_TYPE
+ FLAGS_CPU=$OPENJDK_BUILD_CPU
+ FLAGS_CPU_ARCH=$OPENJDK_BUILD_CPU_ARCH
+ FLAGS_CPU_BITS=$OPENJDK_BUILD_CPU_BITS
+ FLAGS_CPU_ENDIAN=$OPENJDK_BUILD_CPU_ENDIAN
+ FLAGS_CPU_LEGACY=$OPENJDK_BUILD_CPU_LEGACY
+ FLAGS_ADD_LP64=$OPENJDK_BUILD_ADD_LP64
FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_CPU_DEP([BUILD], [OPENJDK_BUILD_])
@@ -430,26 +430,26 @@
AC_DEFUN([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER],
[
#### OS DEFINES, these should be independent on toolchain
- if test "x$FLAGS_OS" = xlinux; then
+ if test "x$OPENJDK_TARGET_OS" = xlinux; then
CFLAGS_OS_DEF_JVM="-DLINUX"
CFLAGS_OS_DEF_JDK="-D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
- elif test "x$FLAGS_OS" = xsolaris; then
+ elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
CFLAGS_OS_DEF_JVM="-DSOLARIS"
CFLAGS_OS_DEF_JDK="-D__solaris__"
- elif test "x$FLAGS_OS" = xmacosx; then
+ elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
CFLAGS_OS_DEF_JVM="-D_ALLBSD_SOURCE -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
CFLAGS_OS_DEF_JDK="-D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
- elif test "x$FLAGS_OS" = xaix; then
+ elif test "x$OPENJDK_TARGET_OS" = xaix; then
CFLAGS_OS_DEF_JVM="-DAIX"
- elif test "x$FLAGS_OS" = xbsd; then
+ elif test "x$OPENJDK_TARGET_OS" = xbsd; then
CFLAGS_OS_DEF_JDK="-D_ALLBSD_SOURCE"
- elif test "x$FLAGS_OS" = xwindows; then
+ elif test "x$OPENJDK_TARGET_OS" = xwindows; then
CFLAGS_OS_DEF_JVM="-D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
fi
# Setup target OS define. Use OS target name but in upper case.
- FLAGS_OS_UPPERCASE=`$ECHO $FLAGS_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- CFLAGS_OS_DEF_JDK="$CFLAGS_OS_DEF_JDK -D$FLAGS_OS_UPPERCASE"
+ OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ CFLAGS_OS_DEF_JDK="$CFLAGS_OS_DEF_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
#### GLOBAL DEFINES
# Set some common defines. These works for all compilers, but assume
@@ -463,7 +463,7 @@
-I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
-I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base/\$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR) \
-I${TOPDIR}/src/java.base/share/native/libjava \
- -I${TOPDIR}/src/java.base/$FLAGS_OS_TYPE/native/libjava \
+ -I${TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava \
-I${TOPDIR}/src/hotspot/share/include \
-I${TOPDIR}/src/hotspot/os/${HOTSPOT_TARGET_OS_TYPE}/include"
@@ -473,7 +473,7 @@
# Setup debug/release defines
if test "x$DEBUG_LEVEL" = xrelease; then
DEBUG_CFLAGS_JDK="-DNDEBUG"
- if test "x$FLAGS_OS" = xsolaris; then
+ if test "x$OPENJDK_TARGET_OS" = xsolaris; then
DEBUG_CFLAGS_JDK="$DEBUG_CFLAGS_JDK -DTRIMMED"
fi
else
@@ -525,7 +525,7 @@
TOOLCHAIN_CFLAGS_JDK="-pipe"
TOOLCHAIN_CFLAGS_JDK_CONLY="-fno-strict-aliasing" # technically NOT for CXX (but since this gives *worse* performance, use no-strict-aliasing everywhere!)
- CXXSTD_CXXFLAG="-std=gnu++98" # only for CXX and JVM
+ CXXSTD_CXXFLAG="-std=gnu++98"
FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$CXXSTD_CXXFLAG -Werror],
IF_FALSE: [CXXSTD_CXXFLAG=""])
TOOLCHAIN_CFLAGS_JDK_CXXONLY="$CXXSTD_CXXFLAG"
@@ -539,7 +539,7 @@
# (see http://llvm.org/bugs/show_bug.cgi?id=7554)
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -flimit-debug-info"
- if test "x$FLAGS_OS" = xlinux; then
+ if test "x$OPENJDK_TARGET_OS" = xlinux; then
TOOLCHAIN_CFLAGS_JDK="-pipe"
TOOLCHAIN_CFLAGS_JDK_CONLY="-fno-strict-aliasing" # technically NOT for CXX
fi
@@ -580,7 +580,7 @@
fi
elif test "x$TOOLCHAIN_TYPE" = xclang; then
WARNING_CFLAGS_JVM="$WARNING_CFLAGS_JVM -Wno-deprecated"
- if test "x$FLAGS_OS" = xlinux; then
+ if test "x$OPENJDK_TARGET_OS" = xlinux; then
WARNING_CFLAGS_JVM="$WARNING_CFLAGS_JVM -Wno-sometimes-uninitialized"
WARNING_CFLAGS_JDK="-Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2"
fi
@@ -596,7 +596,7 @@
# Set some additional per-OS defines.
# Additional macosx handling
- if test "x$FLAGS_OS" = xmacosx; then
+ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
# Let the flags variables get resolved in make for easier override on make
# command line. AvailabilityMacros.h versions have no dots, ex: 1070.
OS_CFLAGS="-DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
@@ -609,9 +609,9 @@
fi
# Where does this really belong??
- if test "x$FLAGS_OS" = xlinux; then
+ if test "x$OPENJDK_TARGET_OS" = xlinux; then
OS_CFLAGS_JVM="$OS_CFLAGS_JVM $PICFLAG"
- elif test "x$FLAGS_OS" = xmacosx; then
+ elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
OS_CFLAGS_JVM="$OS_CFLAGS_JVM -mno-omit-leaf-frame-pointer -mstack-alignment=16"
fi
# Optional POSIX functionality needed by the VM
@@ -733,7 +733,7 @@
if test "x$TOOLCHAIN_TYPE" = xgcc; then
TOOLCHAIN_CHECK_COMPILER_VERSION(VERSION: 6, PREFIX: $2, IF_AT_LEAST: FLAGS_SETUP_GCC6_COMPILER_FLAGS($1))
- $1_TOOLCHAIN_CFLAGS="$1_GCC6_CFLAGS"
+ $1_TOOLCHAIN_CFLAGS="${$1_GCC6_CFLAGS}"
TOOLCHAIN_CHECK_COMPILER_VERSION(VERSION: [4.8], PREFIX: $2,
IF_AT_LEAST: [
@@ -756,8 +756,8 @@
CFLAGS_JDK_COMMON_CXXONLY="$ALWAYS_DEFINES_JDK_CXXONLY $TOOLCHAIN_CFLAGS_JDK_CXXONLY \
$WARNING_CFLAGS_JDK_CXXONLY $EXTRA_CXXFLAGS"
- $1_CFLAGS_JVM="$1_DEFINES_CPU_JVM $1_CFLAGS_CPU $1_CFLAGS_CPU_JVM $1_TOOLCHAIN_CFLAGS $1_WARNING_CFLAGS_JVM"
- $1_CFLAGS_JDK="$1_DEFINES_CPU_JDK $1_CFLAGS_CPU $1_CFLAGS_CPU_JDK $1_TOOLCHAIN_CFLAGS"
+ $1_CFLAGS_JVM="${$1_DEFINES_CPU_JVM} ${$1_CFLAGS_CPU} ${$1_CFLAGS_CPU_JVM} ${$1_TOOLCHAIN_CFLAGS} ${$1_WARNING_CFLAGS_JVM}"
+ $1_CFLAGS_JDK="${$1_DEFINES_CPU_JDK} ${$1_CFLAGS_CPU} ${$1_CFLAGS_CPU_JDK} ${$1_TOOLCHAIN_CFLAGS}"
$2JVM_CFLAGS="$CFLAGS_JVM_COMMON ${$1_CFLAGS_JVM}"