8144278: [TESTBUG] hotspot/runtime/StackGuardPages/testme.sh should use native library build support
Reviewed-by: erikj, dsamersoff, dholmes
--- a/common/autoconf/flags.m4 Sun Jul 10 22:00:03 2016 +0100
+++ b/common/autoconf/flags.m4 Fri Jul 15 16:52:33 2016 -0700
@@ -684,7 +684,7 @@
AC_SUBST(CXXFLAGS_TESTEXE)
LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
- LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
+ LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
AC_SUBST(LDFLAGS_TESTLIB)
AC_SUBST(LDFLAGS_TESTEXE)
@@ -1148,11 +1148,11 @@
$2LDFLAGS_JDKLIB="${$2LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
- $2LDFLAGS_JDKLIB="${$2LDFLAGS_JDKLIB} \
+ $2JAVA_BASE_LDFLAGS="${$2JAVA_BASE_LDFLAGS} \
-libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
$2JDKLIB_LIBS=""
else
- $2LDFLAGS_JDKLIB="${$2LDFLAGS_JDKLIB} \
+ $2JAVA_BASE_LDFLAGS="${$2JAVA_BASE_LDFLAGS} \
-L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_$1_CPU_LIBDIR)"
if test "x$1" = "xTARGET"; then
@@ -1161,17 +1161,17 @@
# Only add client/minimal dir if client/minimal is being built.
# Default to server for other variants.
if HOTSPOT_CHECK_JVM_VARIANT(server); then
- $2LDFLAGS_JDKLIB="${$2LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_$1_CPU_LIBDIR)/server"
+ $2JAVA_BASE_LDFLAGS="${$2JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_$1_CPU_LIBDIR)/server"
elif HOTSPOT_CHECK_JVM_VARIANT(client); then
- $2LDFLAGS_JDKLIB="${$2LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_$1_CPU_LIBDIR)/client"
+ $2JAVA_BASE_LDFLAGS="${$2JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_$1_CPU_LIBDIR)/client"
elif HOTSPOT_CHECK_JVM_VARIANT(minimal); then
- $2LDFLAGS_JDKLIB="${$2LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_$1_CPU_LIBDIR)/minimal"
+ $2JAVA_BASE_LDFLAGS="${$2JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_$1_CPU_LIBDIR)/minimal"
else
- $2LDFLAGS_JDKLIB="${$2LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_$1_CPU_LIBDIR)/server"
+ $2JAVA_BASE_LDFLAGS="${$2JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_$1_CPU_LIBDIR)/server"
fi
elif test "x$1" = "xBUILD"; then
# When building a buildjdk, it's always only the server variant
- $2LDFLAGS_JDKLIB="${$2LDFLAGS_JDKLIB} \
+ $2JAVA_BASE_LDFLAGS="${$2JAVA_BASE_LDFLAGS} \
-L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_$1_CPU_LIBDIR)/server"
fi
@@ -1182,6 +1182,8 @@
fi
+$2LDFLAGS_JDKLIB="${$2LDFLAGS_JDKLIB} ${$2JAVA_BASE_LDFLAGS}"
+
# Set $2JVM_LIBS (per os)
if test "x$OPENJDK_$1_OS" = xlinux; then
$2JVM_LIBS="[$]$2JVM_LIBS -lm -ldl -lpthread"
--- a/common/autoconf/generated-configure.sh Sun Jul 10 22:00:03 2016 +0100
+++ b/common/autoconf/generated-configure.sh Fri Jul 15 16:52:33 2016 -0700
@@ -50429,11 +50429,11 @@
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
- LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
+ JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
-libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
JDKLIB_LIBS=""
else
- LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
+ JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
-L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
if test "xTARGET" = "xTARGET"; then
@@ -50442,17 +50442,17 @@
# Only add client/minimal dir if client/minimal is being built.
# Default to server for other variants.
if [[ " $JVM_VARIANTS " =~ " server " ]] ; then
- LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
+ JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
elif [[ " $JVM_VARIANTS " =~ " client " ]] ; then
- LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
+ JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
elif [[ " $JVM_VARIANTS " =~ " minimal " ]] ; then
- LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
- else
- LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
+ JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
+ else
+ JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
fi
elif test "xTARGET" = "xBUILD"; then
# When building a buildjdk, it's always only the server variant
- LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
+ JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
-L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
fi
@@ -50463,6 +50463,8 @@
fi
+LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
+
# Set JVM_LIBS (per os)
if test "x$OPENJDK_TARGET_OS" = xlinux; then
JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
@@ -51246,11 +51248,11 @@
OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
- OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
+ OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
-libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
OPENJDK_BUILD_JDKLIB_LIBS=""
else
- OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
+ OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
-L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
if test "xBUILD" = "xTARGET"; then
@@ -51259,17 +51261,17 @@
# Only add client/minimal dir if client/minimal is being built.
# Default to server for other variants.
if [[ " $JVM_VARIANTS " =~ " server " ]] ; then
- OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
+ OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
elif [[ " $JVM_VARIANTS " =~ " client " ]] ; then
- OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
+ OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
elif [[ " $JVM_VARIANTS " =~ " minimal " ]] ; then
- OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
- else
- OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
+ OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
+ else
+ OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
fi
elif test "xBUILD" = "xBUILD"; then
# When building a buildjdk, it's always only the server variant
- OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
+ OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
-L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
fi
@@ -51280,6 +51282,8 @@
fi
+OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
+
# Set OPENJDK_BUILD_JVM_LIBS (per os)
if test "x$OPENJDK_BUILD_OS" = xlinux; then
OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
@@ -51344,7 +51348,7 @@
LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
- LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
+ LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
--- a/make/Main.gmk Sun Jul 10 22:00:03 2016 +0100
+++ b/make/Main.gmk Fri Jul 15 16:52:33 2016 -0700
@@ -704,7 +704,7 @@
test-image-failure-handler: build-test-failure-handler
- build-test-hotspot-jtreg-native: buildtools-jdk
+ build-test-hotspot-jtreg-native: buildtools-jdk import-hotspot
build-test-jdk-jtreg-native: buildtools-jdk