mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 19:44:41 +02:00
Merge
This commit is contained in:
commit
56aa026ea6
9 changed files with 536 additions and 109 deletions
|
@ -247,3 +247,4 @@ cd3825b2983045784d6fc6d1729c799b08215752 jdk8-b120
|
||||||
135f0c7af57ebace31383d8877f47e32172759ff jdk9-b02
|
135f0c7af57ebace31383d8877f47e32172759ff jdk9-b02
|
||||||
fd8d51bdf9aadf7ae83e65e8655c53581017c363 jdk9-b03
|
fd8d51bdf9aadf7ae83e65e8655c53581017c363 jdk9-b03
|
||||||
cb4c3440bc2748101923e2488506e61009ab1bf5 jdk9-b04
|
cb4c3440bc2748101923e2488506e61009ab1bf5 jdk9-b04
|
||||||
|
8c63f0b6ada282f27e3a80125e53c3be603f9af7 jdk9-b05
|
||||||
|
|
|
@ -350,8 +350,23 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
|
||||||
|
|
||||||
AC_MSG_CHECKING([flags for boot jdk java command] )
|
AC_MSG_CHECKING([flags for boot jdk java command] )
|
||||||
|
|
||||||
|
# Disable special log output when a debug build is used as Boot JDK...
|
||||||
|
ADD_JVM_ARG_IF_OK([-XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput],boot_jdk_jvmargs,[$JAVA])
|
||||||
|
|
||||||
|
# Apply user provided options.
|
||||||
|
ADD_JVM_ARG_IF_OK([$with_boot_jdk_jvmargs],boot_jdk_jvmargs,[$JAVA])
|
||||||
|
|
||||||
|
AC_MSG_RESULT([$boot_jdk_jvmargs])
|
||||||
|
|
||||||
|
# For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
|
||||||
|
JAVA_FLAGS=$boot_jdk_jvmargs
|
||||||
|
AC_SUBST(JAVA_FLAGS)
|
||||||
|
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([flags for boot jdk java command for big workloads])
|
||||||
|
|
||||||
# Starting amount of heap memory.
|
# Starting amount of heap memory.
|
||||||
ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs,[$JAVA])
|
ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs_big,[$JAVA])
|
||||||
|
|
||||||
# Maximum amount of heap memory.
|
# Maximum amount of heap memory.
|
||||||
# Maximum stack size.
|
# Maximum stack size.
|
||||||
|
@ -366,20 +381,24 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
|
||||||
JVM_MAX_HEAP=1600M
|
JVM_MAX_HEAP=1600M
|
||||||
STACK_SIZE=1536
|
STACK_SIZE=1536
|
||||||
fi
|
fi
|
||||||
ADD_JVM_ARG_IF_OK([-Xmx$JVM_MAX_HEAP],boot_jdk_jvmargs,[$JAVA])
|
ADD_JVM_ARG_IF_OK([-Xmx$JVM_MAX_HEAP],boot_jdk_jvmargs_big,[$JAVA])
|
||||||
ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs,[$JAVA])
|
ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs_big,[$JAVA])
|
||||||
|
|
||||||
# Disable special log output when a debug build is used as Boot JDK...
|
AC_MSG_RESULT([$boot_jdk_jvmargs_big])
|
||||||
ADD_JVM_ARG_IF_OK([-XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput],boot_jdk_jvmargs,[$JAVA])
|
|
||||||
|
|
||||||
# Apply user provided options.
|
JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
|
||||||
ADD_JVM_ARG_IF_OK([$with_boot_jdk_jvmargs],boot_jdk_jvmargs,[$JAVA])
|
AC_SUBST(JAVA_FLAGS_BIG)
|
||||||
|
|
||||||
AC_MSG_RESULT([$boot_jdk_jvmargs])
|
|
||||||
|
|
||||||
# For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
|
AC_MSG_CHECKING([flags for boot jdk java command for small workloads])
|
||||||
JAVA_FLAGS=$boot_jdk_jvmargs
|
|
||||||
|
|
||||||
AC_SUBST(BOOT_JDK_JVMARGS, $boot_jdk_jvmargs)
|
# Use serial gc for small short lived tools if possible
|
||||||
AC_SUBST(JAVA_FLAGS, $JAVA_FLAGS)
|
ADD_JVM_ARG_IF_OK([-XX:+UseSerialGC],boot_jdk_jvmargs_small,[$JAVA])
|
||||||
|
ADD_JVM_ARG_IF_OK([-Xms32M],boot_jdk_jvmargs_small,[$JAVA])
|
||||||
|
ADD_JVM_ARG_IF_OK([-Xmx512M],boot_jdk_jvmargs_small,[$JAVA])
|
||||||
|
|
||||||
|
AC_MSG_RESULT([$boot_jdk_jvmargs_small])
|
||||||
|
|
||||||
|
JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
|
||||||
|
AC_SUBST(JAVA_FLAGS_SMALL)
|
||||||
])
|
])
|
||||||
|
|
|
@ -133,6 +133,26 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_LIBS],
|
||||||
C_FLAG_REORDER=''
|
C_FLAG_REORDER=''
|
||||||
CXX_FLAG_REORDER=''
|
CXX_FLAG_REORDER=''
|
||||||
|
|
||||||
|
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||||
|
# Linking is different on MacOSX
|
||||||
|
SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
|
||||||
|
SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
|
||||||
|
SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
|
||||||
|
SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/[$]1'
|
||||||
|
SET_SHARED_LIBRARY_MAPFILE=''
|
||||||
|
else
|
||||||
|
# Default works for linux, might work on other platforms as well.
|
||||||
|
SHARED_LIBRARY_FLAGS='-shared'
|
||||||
|
SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN[$]1'
|
||||||
|
SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
|
||||||
|
SET_SHARED_LIBRARY_NAME='-Xlinker -soname=[$]1'
|
||||||
|
SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=[$]1'
|
||||||
|
fi
|
||||||
|
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||||
|
PICFLAG=''
|
||||||
|
C_FLAG_REORDER=''
|
||||||
|
CXX_FLAG_REORDER=''
|
||||||
|
|
||||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||||
# Linking is different on MacOSX
|
# Linking is different on MacOSX
|
||||||
SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
|
SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
|
||||||
|
@ -242,6 +262,8 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION],
|
||||||
# Generate make dependency files
|
# Generate make dependency files
|
||||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||||
C_FLAG_DEPS="-MMD -MF"
|
C_FLAG_DEPS="-MMD -MF"
|
||||||
|
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||||
|
C_FLAG_DEPS="-MMD -MF"
|
||||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||||
C_FLAG_DEPS="-xMMD -xMF"
|
C_FLAG_DEPS="-xMMD -xMF"
|
||||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||||
|
@ -260,6 +282,9 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION],
|
||||||
CFLAGS_DEBUG_SYMBOLS="-g"
|
CFLAGS_DEBUG_SYMBOLS="-g"
|
||||||
CXXFLAGS_DEBUG_SYMBOLS="-g"
|
CXXFLAGS_DEBUG_SYMBOLS="-g"
|
||||||
fi
|
fi
|
||||||
|
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||||
|
CFLAGS_DEBUG_SYMBOLS="-g"
|
||||||
|
CXXFLAGS_DEBUG_SYMBOLS="-g"
|
||||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||||
CFLAGS_DEBUG_SYMBOLS="-g -xs"
|
CFLAGS_DEBUG_SYMBOLS="-g -xs"
|
||||||
CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
|
CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
|
||||||
|
@ -315,6 +340,20 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION],
|
||||||
C_O_FLAG_NORM="-O2"
|
C_O_FLAG_NORM="-O2"
|
||||||
C_O_FLAG_NONE="-O0"
|
C_O_FLAG_NONE="-O0"
|
||||||
fi
|
fi
|
||||||
|
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||||
|
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||||
|
# On MacOSX we optimize for size, something
|
||||||
|
# we should do for all platforms?
|
||||||
|
C_O_FLAG_HIGHEST="-Os"
|
||||||
|
C_O_FLAG_HI="-Os"
|
||||||
|
C_O_FLAG_NORM="-Os"
|
||||||
|
C_O_FLAG_NONE=""
|
||||||
|
else
|
||||||
|
C_O_FLAG_HIGHEST="-O3"
|
||||||
|
C_O_FLAG_HI="-O3"
|
||||||
|
C_O_FLAG_NORM="-O2"
|
||||||
|
C_O_FLAG_NONE="-O0"
|
||||||
|
fi
|
||||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||||
C_O_FLAG_HIGHEST="-O3"
|
C_O_FLAG_HIGHEST="-O3"
|
||||||
C_O_FLAG_HI="-O3 -qstrict"
|
C_O_FLAG_HI="-O3 -qstrict"
|
||||||
|
|
|
@ -653,6 +653,9 @@ LIBDL
|
||||||
LIBM
|
LIBM
|
||||||
LIBZIP_CAN_USE_MMAP
|
LIBZIP_CAN_USE_MMAP
|
||||||
USE_EXTERNAL_LIBZ
|
USE_EXTERNAL_LIBZ
|
||||||
|
USE_EXTERNAL_LIBPNG
|
||||||
|
PNG_LIBS
|
||||||
|
PNG_CFLAGS
|
||||||
USE_EXTERNAL_LIBGIF
|
USE_EXTERNAL_LIBGIF
|
||||||
USE_EXTERNAL_LIBJPEG
|
USE_EXTERNAL_LIBJPEG
|
||||||
ALSA_LIBS
|
ALSA_LIBS
|
||||||
|
@ -793,8 +796,9 @@ JAXWS_TOPDIR
|
||||||
JAXP_TOPDIR
|
JAXP_TOPDIR
|
||||||
CORBA_TOPDIR
|
CORBA_TOPDIR
|
||||||
LANGTOOLS_TOPDIR
|
LANGTOOLS_TOPDIR
|
||||||
|
JAVA_FLAGS_SMALL
|
||||||
|
JAVA_FLAGS_BIG
|
||||||
JAVA_FLAGS
|
JAVA_FLAGS
|
||||||
BOOT_JDK_JVMARGS
|
|
||||||
JAVAC_FLAGS
|
JAVAC_FLAGS
|
||||||
BOOT_JDK_SOURCETARGET
|
BOOT_JDK_SOURCETARGET
|
||||||
JARSIGNER
|
JARSIGNER
|
||||||
|
@ -1071,6 +1075,7 @@ with_alsa
|
||||||
with_alsa_include
|
with_alsa_include
|
||||||
with_alsa_lib
|
with_alsa_lib
|
||||||
with_giflib
|
with_giflib
|
||||||
|
with_libpng
|
||||||
with_zlib
|
with_zlib
|
||||||
with_stdc__lib
|
with_stdc__lib
|
||||||
with_msvcr_dll
|
with_msvcr_dll
|
||||||
|
@ -1183,6 +1188,8 @@ FREETYPE_CFLAGS
|
||||||
FREETYPE_LIBS
|
FREETYPE_LIBS
|
||||||
ALSA_CFLAGS
|
ALSA_CFLAGS
|
||||||
ALSA_LIBS
|
ALSA_LIBS
|
||||||
|
PNG_CFLAGS
|
||||||
|
PNG_LIBS
|
||||||
LIBFFI_CFLAGS
|
LIBFFI_CFLAGS
|
||||||
LIBFFI_LIBS
|
LIBFFI_LIBS
|
||||||
CCACHE'
|
CCACHE'
|
||||||
|
@ -1921,6 +1928,8 @@ Optional Packages:
|
||||||
--with-alsa-lib specify directory for the alsa library
|
--with-alsa-lib specify directory for the alsa library
|
||||||
--with-giflib use giflib from build system or OpenJDK source
|
--with-giflib use giflib from build system or OpenJDK source
|
||||||
(system, bundled) [bundled]
|
(system, bundled) [bundled]
|
||||||
|
--with-libpng use libpng from build system or OpenJDK source
|
||||||
|
(system, bundled) [bundled]
|
||||||
--with-zlib use zlib from build system or OpenJDK source
|
--with-zlib use zlib from build system or OpenJDK source
|
||||||
(system, bundled) [bundled]
|
(system, bundled) [bundled]
|
||||||
--with-stdc++lib=<static>,<dynamic>,<default>
|
--with-stdc++lib=<static>,<dynamic>,<default>
|
||||||
|
@ -2045,6 +2054,8 @@ Some influential environment variables:
|
||||||
linker flags for FREETYPE, overriding pkg-config
|
linker flags for FREETYPE, overriding pkg-config
|
||||||
ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
|
ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
|
||||||
ALSA_LIBS linker flags for ALSA, overriding pkg-config
|
ALSA_LIBS linker flags for ALSA, overriding pkg-config
|
||||||
|
PNG_CFLAGS C compiler flags for PNG, overriding pkg-config
|
||||||
|
PNG_LIBS linker flags for PNG, overriding pkg-config
|
||||||
LIBFFI_CFLAGS
|
LIBFFI_CFLAGS
|
||||||
C compiler flags for LIBFFI, overriding pkg-config
|
C compiler flags for LIBFFI, overriding pkg-config
|
||||||
LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
|
LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
|
||||||
|
@ -4221,7 +4232,7 @@ TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
|
||||||
#CUSTOM_AUTOCONF_INCLUDE
|
#CUSTOM_AUTOCONF_INCLUDE
|
||||||
|
|
||||||
# Do not change or remove the following line, it is needed for consistency checks:
|
# Do not change or remove the following line, it is needed for consistency checks:
|
||||||
DATE_WHEN_GENERATED=1394011255
|
DATE_WHEN_GENERATED=1394794899
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
|
@ -25856,67 +25867,6 @@ fi
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
|
||||||
$as_echo_n "checking flags for boot jdk java command ... " >&6; }
|
$as_echo_n "checking flags for boot jdk java command ... " >&6; }
|
||||||
|
|
||||||
# Starting amount of heap memory.
|
|
||||||
|
|
||||||
$ECHO "Check if jvm arg is ok: -Xms64M" >&5
|
|
||||||
$ECHO "Command: $JAVA -Xms64M -version" >&5
|
|
||||||
OUTPUT=`$JAVA -Xms64M -version 2>&1`
|
|
||||||
FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
|
|
||||||
FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
|
|
||||||
if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
|
|
||||||
boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
|
|
||||||
JVM_ARG_OK=true
|
|
||||||
else
|
|
||||||
$ECHO "Arg failed:" >&5
|
|
||||||
$ECHO "$OUTPUT" >&5
|
|
||||||
JVM_ARG_OK=false
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Maximum amount of heap memory.
|
|
||||||
# Maximum stack size.
|
|
||||||
if test "x$BUILD_NUM_BITS" = x32; then
|
|
||||||
JVM_MAX_HEAP=1100M
|
|
||||||
STACK_SIZE=768
|
|
||||||
else
|
|
||||||
# Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
|
|
||||||
# pointers are used. Apparently, we need to increase the heap and stack
|
|
||||||
# space for the jvm. More specifically, when running javac to build huge
|
|
||||||
# jdk batch
|
|
||||||
JVM_MAX_HEAP=1600M
|
|
||||||
STACK_SIZE=1536
|
|
||||||
fi
|
|
||||||
|
|
||||||
$ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
|
|
||||||
$ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
|
|
||||||
OUTPUT=`$JAVA -Xmx$JVM_MAX_HEAP -version 2>&1`
|
|
||||||
FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
|
|
||||||
FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
|
|
||||||
if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
|
|
||||||
boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx$JVM_MAX_HEAP"
|
|
||||||
JVM_ARG_OK=true
|
|
||||||
else
|
|
||||||
$ECHO "Arg failed:" >&5
|
|
||||||
$ECHO "$OUTPUT" >&5
|
|
||||||
JVM_ARG_OK=false
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
$ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
|
|
||||||
$ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
|
|
||||||
OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
|
|
||||||
FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
|
|
||||||
FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
|
|
||||||
if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
|
|
||||||
boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
|
|
||||||
JVM_ARG_OK=true
|
|
||||||
else
|
|
||||||
$ECHO "Arg failed:" >&5
|
|
||||||
$ECHO "$OUTPUT" >&5
|
|
||||||
JVM_ARG_OK=false
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Disable special log output when a debug build is used as Boot JDK...
|
# Disable special log output when a debug build is used as Boot JDK...
|
||||||
|
|
||||||
$ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
|
$ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
|
||||||
|
@ -25957,9 +25907,133 @@ $as_echo "$boot_jdk_jvmargs" >&6; }
|
||||||
# For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
|
# For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
|
||||||
JAVA_FLAGS=$boot_jdk_jvmargs
|
JAVA_FLAGS=$boot_jdk_jvmargs
|
||||||
|
|
||||||
BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
|
|
||||||
|
|
||||||
JAVA_FLAGS=$JAVA_FLAGS
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
|
||||||
|
$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
|
||||||
|
|
||||||
|
# Starting amount of heap memory.
|
||||||
|
|
||||||
|
$ECHO "Check if jvm arg is ok: -Xms64M" >&5
|
||||||
|
$ECHO "Command: $JAVA -Xms64M -version" >&5
|
||||||
|
OUTPUT=`$JAVA -Xms64M -version 2>&1`
|
||||||
|
FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
|
||||||
|
FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
|
||||||
|
if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
|
||||||
|
boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
|
||||||
|
JVM_ARG_OK=true
|
||||||
|
else
|
||||||
|
$ECHO "Arg failed:" >&5
|
||||||
|
$ECHO "$OUTPUT" >&5
|
||||||
|
JVM_ARG_OK=false
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Maximum amount of heap memory.
|
||||||
|
# Maximum stack size.
|
||||||
|
if test "x$BUILD_NUM_BITS" = x32; then
|
||||||
|
JVM_MAX_HEAP=1100M
|
||||||
|
STACK_SIZE=768
|
||||||
|
else
|
||||||
|
# Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
|
||||||
|
# pointers are used. Apparently, we need to increase the heap and stack
|
||||||
|
# space for the jvm. More specifically, when running javac to build huge
|
||||||
|
# jdk batch
|
||||||
|
JVM_MAX_HEAP=1600M
|
||||||
|
STACK_SIZE=1536
|
||||||
|
fi
|
||||||
|
|
||||||
|
$ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
|
||||||
|
$ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
|
||||||
|
OUTPUT=`$JAVA -Xmx$JVM_MAX_HEAP -version 2>&1`
|
||||||
|
FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
|
||||||
|
FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
|
||||||
|
if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
|
||||||
|
boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx$JVM_MAX_HEAP"
|
||||||
|
JVM_ARG_OK=true
|
||||||
|
else
|
||||||
|
$ECHO "Arg failed:" >&5
|
||||||
|
$ECHO "$OUTPUT" >&5
|
||||||
|
JVM_ARG_OK=false
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
$ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
|
||||||
|
$ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
|
||||||
|
OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
|
||||||
|
FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
|
||||||
|
FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
|
||||||
|
if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
|
||||||
|
boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
|
||||||
|
JVM_ARG_OK=true
|
||||||
|
else
|
||||||
|
$ECHO "Arg failed:" >&5
|
||||||
|
$ECHO "$OUTPUT" >&5
|
||||||
|
JVM_ARG_OK=false
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
|
||||||
|
$as_echo "$boot_jdk_jvmargs_big" >&6; }
|
||||||
|
|
||||||
|
JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
|
||||||
|
$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
|
||||||
|
|
||||||
|
# Use serial gc for small short lived tools if possible
|
||||||
|
|
||||||
|
$ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
|
||||||
|
$ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
|
||||||
|
OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
|
||||||
|
FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
|
||||||
|
FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
|
||||||
|
if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
|
||||||
|
boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
|
||||||
|
JVM_ARG_OK=true
|
||||||
|
else
|
||||||
|
$ECHO "Arg failed:" >&5
|
||||||
|
$ECHO "$OUTPUT" >&5
|
||||||
|
JVM_ARG_OK=false
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
$ECHO "Check if jvm arg is ok: -Xms32M" >&5
|
||||||
|
$ECHO "Command: $JAVA -Xms32M -version" >&5
|
||||||
|
OUTPUT=`$JAVA -Xms32M -version 2>&1`
|
||||||
|
FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
|
||||||
|
FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
|
||||||
|
if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
|
||||||
|
boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
|
||||||
|
JVM_ARG_OK=true
|
||||||
|
else
|
||||||
|
$ECHO "Arg failed:" >&5
|
||||||
|
$ECHO "$OUTPUT" >&5
|
||||||
|
JVM_ARG_OK=false
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
$ECHO "Check if jvm arg is ok: -Xmx512M" >&5
|
||||||
|
$ECHO "Command: $JAVA -Xmx512M -version" >&5
|
||||||
|
OUTPUT=`$JAVA -Xmx512M -version 2>&1`
|
||||||
|
FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
|
||||||
|
FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
|
||||||
|
if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
|
||||||
|
boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
|
||||||
|
JVM_ARG_OK=true
|
||||||
|
else
|
||||||
|
$ECHO "Arg failed:" >&5
|
||||||
|
$ECHO "$OUTPUT" >&5
|
||||||
|
JVM_ARG_OK=false
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
|
||||||
|
$as_echo "$boot_jdk_jvmargs_small" >&6; }
|
||||||
|
|
||||||
|
JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -26297,8 +26371,28 @@ fi
|
||||||
# Use indirect variable referencing
|
# Use indirect variable referencing
|
||||||
toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
|
toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
|
||||||
VALID_TOOLCHAINS=${!toolchain_var_name}
|
VALID_TOOLCHAINS=${!toolchain_var_name}
|
||||||
|
|
||||||
|
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||||
|
# On Mac OS X, default toolchain to clang after Xcode 5
|
||||||
|
XCODE_VERSION_OUTPUT=`xcodebuild -version 2>&1 | $HEAD -n 1`
|
||||||
|
$ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
|
||||||
|
if test $? -ne 0; then
|
||||||
|
as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
|
||||||
|
fi
|
||||||
|
XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
|
||||||
|
$SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
|
||||||
|
$CUT -f 1 -d .`
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
|
||||||
|
$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
|
||||||
|
if test $XCODE_MAJOR_VERSION -ge 5; then
|
||||||
|
DEFAULT_TOOLCHAIN="clang"
|
||||||
|
else
|
||||||
|
DEFAULT_TOOLCHAIN="gcc"
|
||||||
|
fi
|
||||||
|
else
|
||||||
# First toolchain type in the list is the default
|
# First toolchain type in the list is the default
|
||||||
DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
|
DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
|
||||||
|
fi
|
||||||
|
|
||||||
if test "x$with_toolchain_type" = xlist; then
|
if test "x$with_toolchain_type" = xlist; then
|
||||||
# List all toolchains
|
# List all toolchains
|
||||||
|
@ -41221,6 +41315,26 @@ $as_echo "$ac_cv_c_bigendian" >&6; }
|
||||||
C_FLAG_REORDER=''
|
C_FLAG_REORDER=''
|
||||||
CXX_FLAG_REORDER=''
|
CXX_FLAG_REORDER=''
|
||||||
|
|
||||||
|
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||||
|
# Linking is different on MacOSX
|
||||||
|
SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
|
||||||
|
SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
|
||||||
|
SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
|
||||||
|
SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
|
||||||
|
SET_SHARED_LIBRARY_MAPFILE=''
|
||||||
|
else
|
||||||
|
# Default works for linux, might work on other platforms as well.
|
||||||
|
SHARED_LIBRARY_FLAGS='-shared'
|
||||||
|
SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
|
||||||
|
SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
|
||||||
|
SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
|
||||||
|
SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
|
||||||
|
fi
|
||||||
|
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||||
|
PICFLAG=''
|
||||||
|
C_FLAG_REORDER=''
|
||||||
|
CXX_FLAG_REORDER=''
|
||||||
|
|
||||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||||
# Linking is different on MacOSX
|
# Linking is different on MacOSX
|
||||||
SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
|
SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
|
||||||
|
@ -41297,6 +41411,8 @@ $as_echo "$ac_cv_c_bigendian" >&6; }
|
||||||
# Generate make dependency files
|
# Generate make dependency files
|
||||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||||
C_FLAG_DEPS="-MMD -MF"
|
C_FLAG_DEPS="-MMD -MF"
|
||||||
|
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||||
|
C_FLAG_DEPS="-MMD -MF"
|
||||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||||
C_FLAG_DEPS="-xMMD -xMF"
|
C_FLAG_DEPS="-xMMD -xMF"
|
||||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||||
|
@ -41315,6 +41431,9 @@ $as_echo "$ac_cv_c_bigendian" >&6; }
|
||||||
CFLAGS_DEBUG_SYMBOLS="-g"
|
CFLAGS_DEBUG_SYMBOLS="-g"
|
||||||
CXXFLAGS_DEBUG_SYMBOLS="-g"
|
CXXFLAGS_DEBUG_SYMBOLS="-g"
|
||||||
fi
|
fi
|
||||||
|
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||||
|
CFLAGS_DEBUG_SYMBOLS="-g"
|
||||||
|
CXXFLAGS_DEBUG_SYMBOLS="-g"
|
||||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||||
CFLAGS_DEBUG_SYMBOLS="-g -xs"
|
CFLAGS_DEBUG_SYMBOLS="-g -xs"
|
||||||
CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
|
CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
|
||||||
|
@ -41370,6 +41489,20 @@ $as_echo "$ac_cv_c_bigendian" >&6; }
|
||||||
C_O_FLAG_NORM="-O2"
|
C_O_FLAG_NORM="-O2"
|
||||||
C_O_FLAG_NONE="-O0"
|
C_O_FLAG_NONE="-O0"
|
||||||
fi
|
fi
|
||||||
|
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||||
|
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||||
|
# On MacOSX we optimize for size, something
|
||||||
|
# we should do for all platforms?
|
||||||
|
C_O_FLAG_HIGHEST="-Os"
|
||||||
|
C_O_FLAG_HI="-Os"
|
||||||
|
C_O_FLAG_NORM="-Os"
|
||||||
|
C_O_FLAG_NONE=""
|
||||||
|
else
|
||||||
|
C_O_FLAG_HIGHEST="-O3"
|
||||||
|
C_O_FLAG_HI="-O3"
|
||||||
|
C_O_FLAG_NORM="-O2"
|
||||||
|
C_O_FLAG_NONE="-O0"
|
||||||
|
fi
|
||||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||||
C_O_FLAG_HIGHEST="-O3"
|
C_O_FLAG_HIGHEST="-O3"
|
||||||
C_O_FLAG_HI="-O3 -qstrict"
|
C_O_FLAG_HI="-O3 -qstrict"
|
||||||
|
@ -46789,6 +46922,118 @@ fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# Check for the png library
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
# Check whether --with-libpng was given.
|
||||||
|
if test "${with_libpng+set}" = set; then :
|
||||||
|
withval=$with_libpng;
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
|
||||||
|
$as_echo_n "checking for which libpng to use... " >&6; }
|
||||||
|
|
||||||
|
# default is bundled
|
||||||
|
DEFAULT_LIBPNG=bundled
|
||||||
|
|
||||||
|
#
|
||||||
|
# if user didn't specify, use DEFAULT_LIBPNG
|
||||||
|
#
|
||||||
|
if test "x${with_libpng}" = "x"; then
|
||||||
|
with_libpng=${DEFAULT_LIBPNG}
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x${with_libpng}" = "xbundled"; then
|
||||||
|
USE_EXTERNAL_LIBPNG=false
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
|
||||||
|
$as_echo "bundled" >&6; }
|
||||||
|
elif test "x${with_libpng}" = "xsystem"; then
|
||||||
|
|
||||||
|
pkg_failed=no
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
|
||||||
|
$as_echo_n "checking for PNG... " >&6; }
|
||||||
|
|
||||||
|
if test -n "$PNG_CFLAGS"; then
|
||||||
|
pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
|
||||||
|
elif test -n "$PKG_CONFIG"; then
|
||||||
|
if test -n "$PKG_CONFIG" && \
|
||||||
|
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
|
||||||
|
($PKG_CONFIG --exists --print-errors "libpng") 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||||
|
test $ac_status = 0; }; then
|
||||||
|
pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
|
||||||
|
else
|
||||||
|
pkg_failed=yes
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
pkg_failed=untried
|
||||||
|
fi
|
||||||
|
if test -n "$PNG_LIBS"; then
|
||||||
|
pkg_cv_PNG_LIBS="$PNG_LIBS"
|
||||||
|
elif test -n "$PKG_CONFIG"; then
|
||||||
|
if test -n "$PKG_CONFIG" && \
|
||||||
|
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
|
||||||
|
($PKG_CONFIG --exists --print-errors "libpng") 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||||
|
test $ac_status = 0; }; then
|
||||||
|
pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
|
||||||
|
else
|
||||||
|
pkg_failed=yes
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
pkg_failed=untried
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if test $pkg_failed = yes; then
|
||||||
|
|
||||||
|
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||||
|
_pkg_short_errors_supported=yes
|
||||||
|
else
|
||||||
|
_pkg_short_errors_supported=no
|
||||||
|
fi
|
||||||
|
if test $_pkg_short_errors_supported = yes; then
|
||||||
|
PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
|
||||||
|
else
|
||||||
|
PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
|
||||||
|
fi
|
||||||
|
# Put the nasty error message in config.log where it belongs
|
||||||
|
echo "$PNG_PKG_ERRORS" >&5
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
|
$as_echo "no" >&6; }
|
||||||
|
LIBPNG_FOUND=no
|
||||||
|
elif test $pkg_failed = untried; then
|
||||||
|
LIBPNG_FOUND=no
|
||||||
|
else
|
||||||
|
PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
|
||||||
|
PNG_LIBS=$pkg_cv_PNG_LIBS
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||||
|
$as_echo "yes" >&6; }
|
||||||
|
LIBPNG_FOUND=yes
|
||||||
|
fi
|
||||||
|
if test "x${LIBPNG_FOUND}" = "xyes"; then
|
||||||
|
USE_EXTERNAL_LIBPNG=true
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
|
||||||
|
$as_echo "system" >&6; }
|
||||||
|
else
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
|
||||||
|
$as_echo "system not found" >&6; }
|
||||||
|
as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
# Check for the zlib library
|
# Check for the zlib library
|
||||||
|
|
|
@ -652,6 +652,46 @@ AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS],
|
||||||
fi
|
fi
|
||||||
AC_SUBST(USE_EXTERNAL_LIBGIF)
|
AC_SUBST(USE_EXTERNAL_LIBGIF)
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# Check for the png library
|
||||||
|
#
|
||||||
|
|
||||||
|
AC_ARG_WITH(libpng, [AS_HELP_STRING([--with-libpng],
|
||||||
|
[use libpng from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
|
||||||
|
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for which libpng to use])
|
||||||
|
|
||||||
|
# default is bundled
|
||||||
|
DEFAULT_LIBPNG=bundled
|
||||||
|
|
||||||
|
#
|
||||||
|
# if user didn't specify, use DEFAULT_LIBPNG
|
||||||
|
#
|
||||||
|
if test "x${with_libpng}" = "x"; then
|
||||||
|
with_libpng=${DEFAULT_LIBPNG}
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x${with_libpng}" = "xbundled"; then
|
||||||
|
USE_EXTERNAL_LIBPNG=false
|
||||||
|
AC_MSG_RESULT([bundled])
|
||||||
|
elif test "x${with_libpng}" = "xsystem"; then
|
||||||
|
PKG_CHECK_MODULES(PNG, libpng,
|
||||||
|
[ LIBPNG_FOUND=yes ],
|
||||||
|
[ LIBPNG_FOUND=no ])
|
||||||
|
if test "x${LIBPNG_FOUND}" = "xyes"; then
|
||||||
|
USE_EXTERNAL_LIBPNG=true
|
||||||
|
AC_MSG_RESULT([system])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([system not found])
|
||||||
|
AC_MSG_ERROR([--with-libpng=system specified, but no libpng found!])
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
AC_MSG_ERROR([Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'])
|
||||||
|
fi
|
||||||
|
AC_SUBST(USE_EXTERNAL_LIBPNG)
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
# Check for the zlib library
|
# Check for the zlib library
|
||||||
|
|
|
@ -254,7 +254,6 @@ BUILD_HOTSPOT=@BUILD_HOTSPOT@
|
||||||
|
|
||||||
# The boot jdk to use
|
# The boot jdk to use
|
||||||
BOOT_JDK:=@BOOT_JDK@
|
BOOT_JDK:=@BOOT_JDK@
|
||||||
BOOT_JDK_JVMARGS:=@BOOT_JDK_JVMARGS@
|
|
||||||
BOOT_RTJAR:=@BOOT_RTJAR@
|
BOOT_RTJAR:=@BOOT_RTJAR@
|
||||||
BOOT_TOOLSJAR=$(BOOT_JDK)/lib/tools.jar
|
BOOT_TOOLSJAR=$(BOOT_JDK)/lib/tools.jar
|
||||||
|
|
||||||
|
@ -442,8 +441,11 @@ POST_STRIP_CMD:=@POST_STRIP_CMD@
|
||||||
POST_MCS_CMD:=@POST_MCS_CMD@
|
POST_MCS_CMD:=@POST_MCS_CMD@
|
||||||
|
|
||||||
JAVA_FLAGS:=@JAVA_FLAGS@
|
JAVA_FLAGS:=@JAVA_FLAGS@
|
||||||
|
JAVA_FLAGS_BIG:=@JAVA_FLAGS_BIG@
|
||||||
|
JAVA_FLAGS_SMALL:=@JAVA_FLAGS_SMALL@
|
||||||
|
|
||||||
JAVA=@FIXPATH@ @JAVA@ $(JAVA_FLAGS)
|
JAVA=@FIXPATH@ @JAVA@ $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
|
||||||
|
JAVA_SMALL=@FIXPATH@ @JAVA@ $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS)
|
||||||
|
|
||||||
JAVAC:=@FIXPATH@ @JAVAC@
|
JAVAC:=@FIXPATH@ @JAVAC@
|
||||||
# Hotspot sets this variable before reading the SPEC when compiling sa-jdi.jar. Avoid
|
# Hotspot sets this variable before reading the SPEC when compiling sa-jdi.jar. Avoid
|
||||||
|
@ -454,7 +456,7 @@ JAVAH:=@FIXPATH@ @JAVAH@
|
||||||
|
|
||||||
JAR:=@FIXPATH@ @JAR@
|
JAR:=@FIXPATH@ @JAR@
|
||||||
|
|
||||||
NATIVE2ASCII:=@FIXPATH@ @NATIVE2ASCII@
|
NATIVE2ASCII:=@FIXPATH@ @NATIVE2ASCII@ $(addprefix -J, $(JAVA_FLAGS_SMALL))
|
||||||
|
|
||||||
JARSIGNER:=@FIXPATH@ @JARSIGNER@
|
JARSIGNER:=@FIXPATH@ @JARSIGNER@
|
||||||
|
|
||||||
|
@ -645,6 +647,15 @@ INSTALL_SHAREDSTATEDIR=@sharedstatedir@
|
||||||
# Read-only single-machine data
|
# Read-only single-machine data
|
||||||
INSTALL_SYSCONFDIR=@sysconfdir@
|
INSTALL_SYSCONFDIR=@sysconfdir@
|
||||||
|
|
||||||
|
####################################################
|
||||||
|
#
|
||||||
|
# Libraries
|
||||||
|
#
|
||||||
|
|
||||||
|
USE_EXTERNAL_LIBPNG:=@USE_EXTERNAL_LIBPNG@
|
||||||
|
PNG_LIBS:=@PNG_LIBS@
|
||||||
|
PNG_CFLAGS:=@PNG_CFLAGS@
|
||||||
|
|
||||||
|
|
||||||
####################################################
|
####################################################
|
||||||
#
|
#
|
||||||
|
|
|
@ -96,8 +96,27 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETERMINE_TOOLCHAIN_TYPE],
|
||||||
# Use indirect variable referencing
|
# Use indirect variable referencing
|
||||||
toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
|
toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
|
||||||
VALID_TOOLCHAINS=${!toolchain_var_name}
|
VALID_TOOLCHAINS=${!toolchain_var_name}
|
||||||
|
|
||||||
|
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||||
|
# On Mac OS X, default toolchain to clang after Xcode 5
|
||||||
|
XCODE_VERSION_OUTPUT=`xcodebuild -version 2>&1 | $HEAD -n 1`
|
||||||
|
$ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
|
||||||
|
if test $? -ne 0; then
|
||||||
|
AC_MSG_ERROR([Failed to determine Xcode version.])
|
||||||
|
fi
|
||||||
|
XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
|
||||||
|
$SED -e 's/^Xcode \(@<:@1-9@:>@@<:@0-9.@:>@*\)/\1/' | \
|
||||||
|
$CUT -f 1 -d .`
|
||||||
|
AC_MSG_NOTICE([Xcode major version: $XCODE_MAJOR_VERSION])
|
||||||
|
if test $XCODE_MAJOR_VERSION -ge 5; then
|
||||||
|
DEFAULT_TOOLCHAIN="clang"
|
||||||
|
else
|
||||||
|
DEFAULT_TOOLCHAIN="gcc"
|
||||||
|
fi
|
||||||
|
else
|
||||||
# First toolchain type in the list is the default
|
# First toolchain type in the list is the default
|
||||||
DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
|
DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
|
||||||
|
fi
|
||||||
|
|
||||||
if test "x$with_toolchain_type" = xlist; then
|
if test "x$with_toolchain_type" = xlist; then
|
||||||
# List all toolchains
|
# List all toolchains
|
||||||
|
|
|
@ -143,6 +143,9 @@ define SetupArchive
|
||||||
ifneq (,$2)
|
ifneq (,$2)
|
||||||
$1_DEPS:=$2
|
$1_DEPS:=$2
|
||||||
else
|
else
|
||||||
|
# Add all source roots to the find cache since we are likely going to run find
|
||||||
|
# on these more than once. The cache will only be updated if necessary.
|
||||||
|
$$(eval $$(call FillCacheFind, $$($1_FIND_LIST)))
|
||||||
$1_DEPS:=$$(filter $$(addprefix %,$$($1_SUFFIXES)), \
|
$1_DEPS:=$$(filter $$(addprefix %,$$($1_SUFFIXES)), \
|
||||||
$$(call CacheFind,$$($1_SRCS)))
|
$$(call CacheFind,$$($1_SRCS)))
|
||||||
ifneq (,$$($1_GREP_INCLUDE_PATTERNS))
|
ifneq (,$$($1_GREP_INCLUDE_PATTERNS))
|
||||||
|
@ -158,6 +161,10 @@ define SetupArchive
|
||||||
$1_DEPS+=$$(call CacheFind,$$(wildcard $$(addsuffix /META-INF,$$($1_SRCS))))
|
$1_DEPS+=$$(call CacheFind,$$(wildcard $$(addsuffix /META-INF,$$($1_SRCS))))
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
# The dependency list should never be empty
|
||||||
|
ifeq ($$(strip $$($1_DEPS)), )
|
||||||
|
$$(warning No dependencies found for $1)
|
||||||
|
endif
|
||||||
|
|
||||||
# Utility macros, to make the shell script receipt somewhat easier to decipher.
|
# Utility macros, to make the shell script receipt somewhat easier to decipher.
|
||||||
|
|
||||||
|
@ -336,7 +343,20 @@ endef
|
||||||
# Previously this was inconsistently done in different repositories.
|
# Previously this was inconsistently done in different repositories.
|
||||||
# This is the new clean standard. Though it is to be superseded by
|
# This is the new clean standard. Though it is to be superseded by
|
||||||
# a standard annotation processor from with sjavac.
|
# a standard annotation processor from with sjavac.
|
||||||
define add_file_to_copy_and_clean
|
#
|
||||||
|
# The sed expression does this:
|
||||||
|
# 1. Add a backslash before any :, = or ! that do not have a backslash already.
|
||||||
|
# 2. Apply the file unicode2x.sed which does a whole bunch of \u00XX to \xXX
|
||||||
|
# conversions.
|
||||||
|
# 3. Delete all lines starting with #.
|
||||||
|
# 4. Delete empty lines.
|
||||||
|
# 5. Append lines ending with \ with the next line.
|
||||||
|
# 6. Remove leading and trailing white space.
|
||||||
|
# 7. Replace the first \= with just =.
|
||||||
|
# 8. Finally it's all sorted to create a stable output.
|
||||||
|
#
|
||||||
|
# It is assumed that = is the character used for separating names and values.
|
||||||
|
define add_file_to_clean
|
||||||
# param 1 = BUILD_MYPACKAGE
|
# param 1 = BUILD_MYPACKAGE
|
||||||
# parma 2 = The source file to copy and clean.
|
# parma 2 = The source file to copy and clean.
|
||||||
$2_TARGET:=$2
|
$2_TARGET:=$2
|
||||||
|
@ -345,12 +365,13 @@ define add_file_to_copy_and_clean
|
||||||
# Now we can setup the depency that will trigger the copying.
|
# Now we can setup the depency that will trigger the copying.
|
||||||
$$($1_BIN)$$($2_TARGET) : $2
|
$$($1_BIN)$$($2_TARGET) : $2
|
||||||
$(MKDIR) -p $$(@D)
|
$(MKDIR) -p $$(@D)
|
||||||
$(CAT) $$< | $(SED) -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' -e 's/#.*/#/g' \
|
$(CAT) $$< | $(SED) -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' \
|
||||||
|
-e 's/\([^\\]\)!/\1\\!/g' -e 's/#.*/#/g' \
|
||||||
| $(SED) -f "$(SRC_ROOT)/make/common/support/unicode2x.sed" \
|
| $(SED) -f "$(SRC_ROOT)/make/common/support/unicode2x.sed" \
|
||||||
| $(SED) -e '/^#/d' -e '/^$$$$/d' \
|
| $(SED) -e '/^#/d' -e '/^$$$$/d' \
|
||||||
-e :a -e '/\\$$$$/N; s/\\\n//; ta' \
|
-e :a -e '/\\$$$$/N; s/\\\n//; ta' \
|
||||||
-e 's/^[ \t]*//;s/[ \t]*$$$$//' \
|
-e 's/^[ \t]*//;s/[ \t]*$$$$//' \
|
||||||
-e 's/\\=/=/' | LANG=C $(SORT) > $$@
|
-e 's/\\=/=/' | LC_ALL=C $(SORT) > $$@
|
||||||
$(CHMOD) -f ug+w $$@
|
$(CHMOD) -f ug+w $$@
|
||||||
|
|
||||||
# And do not forget this target
|
# And do not forget this target
|
||||||
|
@ -376,8 +397,9 @@ define SetupJavaCompilation
|
||||||
# INCLUDES:=myapp.foo means will only compile java files in myapp.foo or any of its sub-packages.
|
# INCLUDES:=myapp.foo means will only compile java files in myapp.foo or any of its sub-packages.
|
||||||
# EXCLUDES:=myapp.foo means will do not compile java files in myapp.foo or any of its sub-packages.
|
# EXCLUDES:=myapp.foo means will do not compile java files in myapp.foo or any of its sub-packages.
|
||||||
# COPY:=.prp means copy all prp files to the corresponding package in BIN.
|
# COPY:=.prp means copy all prp files to the corresponding package in BIN.
|
||||||
# CLEAN:=.properties means copy and clean all properties file to the corresponding package in BIN.
|
|
||||||
# COPY_FILES:=myapp/foo/setting.txt means copy this file over to the package myapp/foo
|
# COPY_FILES:=myapp/foo/setting.txt means copy this file over to the package myapp/foo
|
||||||
|
# CLEAN:=.properties means copy and clean all properties file to the corresponding package in BIN.
|
||||||
|
# CLEAN_FILES:=myapp/foo/setting.txt means clean this file over to the package myapp/foo
|
||||||
# SRCZIP:=Create a src.zip based on the found sources and copied files.
|
# SRCZIP:=Create a src.zip based on the found sources and copied files.
|
||||||
# INCLUDE_FILES:="com/sun/SolarisFoobar.java" means only compile this file!
|
# INCLUDE_FILES:="com/sun/SolarisFoobar.java" means only compile this file!
|
||||||
# EXCLUDE_FILES:="com/sun/SolarisFoobar.java" means do not compile this particular file!
|
# EXCLUDE_FILES:="com/sun/SolarisFoobar.java" means do not compile this particular file!
|
||||||
|
@ -405,6 +427,9 @@ define SetupJavaCompilation
|
||||||
# Make sure the dirs exist.
|
# Make sure the dirs exist.
|
||||||
$$(foreach d,$$($1_SRC), $$(if $$(wildcard $$d),,$$(error SRC specified to SetupJavaCompilation $1 contains missing directory $$d)))
|
$$(foreach d,$$($1_SRC), $$(if $$(wildcard $$d),,$$(error SRC specified to SetupJavaCompilation $1 contains missing directory $$d)))
|
||||||
$$(eval $$(call MakeDir,$$($1_BIN)))
|
$$(eval $$(call MakeDir,$$($1_BIN)))
|
||||||
|
# Add all source roots to the find cache since we are likely going to run find
|
||||||
|
# on these more than once. The cache will only be updated if necessary.
|
||||||
|
$$(eval $$(call FillCacheFind,$$($1_SRC)))
|
||||||
# Find all files in the source trees.
|
# Find all files in the source trees.
|
||||||
$1_ALL_SRCS += $$(filter-out $(OVR_SRCS),$$(call CacheFind,$$($1_SRC)))
|
$1_ALL_SRCS += $$(filter-out $(OVR_SRCS),$$(call CacheFind,$$($1_SRC)))
|
||||||
# Extract the java files.
|
# Extract the java files.
|
||||||
|
@ -437,7 +462,7 @@ define SetupJavaCompilation
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Find all files to be copied from source to bin.
|
# Find all files to be copied from source to bin.
|
||||||
ifneq (,$$($1_COPY))
|
ifneq (,$$($1_COPY)$$($1_COPY_FILES))
|
||||||
# Search for all files to be copied.
|
# Search for all files to be copied.
|
||||||
$1_ALL_COPIES := $$(filter $$(addprefix %,$$($1_COPY)),$$($1_ALL_SRCS))
|
$1_ALL_COPIES := $$(filter $$(addprefix %,$$($1_COPY)),$$($1_ALL_SRCS))
|
||||||
# Copy these explicitly
|
# Copy these explicitly
|
||||||
|
@ -452,6 +477,7 @@ define SetupJavaCompilation
|
||||||
ifneq (,$$($1_EXCLUDE_FILES))
|
ifneq (,$$($1_EXCLUDE_FILES))
|
||||||
$1_ALL_COPIES := $$(filter-out $$($1_EXCLUDE_FILES_PATTERN),$$($1_ALL_COPIES))
|
$1_ALL_COPIES := $$(filter-out $$($1_EXCLUDE_FILES_PATTERN),$$($1_ALL_COPIES))
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
# All files below META-INF are always copied.
|
# All files below META-INF are always copied.
|
||||||
$1_ALL_COPIES += $$(filter $$(addsuffix /META-INF%,$$($1_SRC)),$$($1_ALL_SRCS))
|
$1_ALL_COPIES += $$(filter $$(addsuffix /META-INF%,$$($1_SRC)),$$($1_ALL_SRCS))
|
||||||
ifneq (,$$($1_ALL_COPIES))
|
ifneq (,$$($1_ALL_COPIES))
|
||||||
|
@ -460,12 +486,13 @@ define SetupJavaCompilation
|
||||||
$$(foreach i,$$($1_ALL_COPIES),$$(eval $$(call add_file_to_copy,$1,$$i)))
|
$$(foreach i,$$($1_ALL_COPIES),$$(eval $$(call add_file_to_copy,$1,$$i)))
|
||||||
# Now we can depend on $$($1_ALL_COPY_TARGETS) to copy all files!
|
# Now we can depend on $$($1_ALL_COPY_TARGETS) to copy all files!
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
|
|
||||||
# Find all property files to be copied and cleaned from source to bin.
|
# Find all property files to be copied and cleaned from source to bin.
|
||||||
ifneq (,$$($1_CLEAN))
|
ifneq (,$$($1_CLEAN)$$($1_CLEAN_FILES))
|
||||||
# Search for all files to be copied.
|
# Search for all files to be copied.
|
||||||
$1_ALL_CLEANS := $$(filter $$(addprefix %,$$($1_CLEAN)),$$($1_ALL_SRCS))
|
$1_ALL_CLEANS := $$(filter $$(addprefix %,$$($1_CLEAN)),$$($1_ALL_SRCS))
|
||||||
|
# Clean these explicitly
|
||||||
|
$1_ALL_CLEANS += $$($1_CLEAN_FILES)
|
||||||
# Copy and clean must also respect filters.
|
# Copy and clean must also respect filters.
|
||||||
ifneq (,$$($1_INCLUDES))
|
ifneq (,$$($1_INCLUDES))
|
||||||
$1_ALL_CLEANS := $$(filter $$($1_SRC_INCLUDES),$$($1_ALL_CLEANS))
|
$1_ALL_CLEANS := $$(filter $$($1_SRC_INCLUDES),$$($1_ALL_CLEANS))
|
||||||
|
@ -479,7 +506,7 @@ define SetupJavaCompilation
|
||||||
ifneq (,$$($1_ALL_CLEANS))
|
ifneq (,$$($1_ALL_CLEANS))
|
||||||
# Yep, there are files to be copied and cleaned!
|
# Yep, there are files to be copied and cleaned!
|
||||||
$1_ALL_COPY_CLEAN_TARGETS:=
|
$1_ALL_COPY_CLEAN_TARGETS:=
|
||||||
$$(foreach i,$$($1_ALL_CLEANS),$$(eval $$(call add_file_to_copy_and_clean,$1,$$i)))
|
$$(foreach i,$$($1_ALL_CLEANS),$$(eval $$(call add_file_to_clean,$1,$$i)))
|
||||||
# Now we can depend on $$($1_ALL_COPY_CLEAN_TARGETS) to copy all files!
|
# Now we can depend on $$($1_ALL_COPY_CLEAN_TARGETS) to copy all files!
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -380,11 +380,23 @@ ifeq ($(OPENJDK_TARGET_OS),solaris)
|
||||||
# On Solaris, if the target is a symlink and exists, cp won't overwrite.
|
# On Solaris, if the target is a symlink and exists, cp won't overwrite.
|
||||||
# Cp has to operate in recursive mode to allow for -P flag, to preserve soft links. If the
|
# Cp has to operate in recursive mode to allow for -P flag, to preserve soft links. If the
|
||||||
# name of the target file differs from the source file, rename after copy.
|
# name of the target file differs from the source file, rename after copy.
|
||||||
|
# If the source and target parent directories are the same, recursive copy doesn't work
|
||||||
|
# so we fall back on regular copy, which isn't preserving symlinks.
|
||||||
define install-file
|
define install-file
|
||||||
$(MKDIR) -p $(@D)
|
$(MKDIR) -p $(@D)
|
||||||
$(RM) '$@'
|
$(RM) '$@'
|
||||||
$(CP) -f -r -P '$<' '$(@D)'
|
if [ "$(@D)" != "$(<D)" ]; then \
|
||||||
if [ "$(@F)" != "$(<F)" ]; then $(MV) '$(@D)/$(<F)' '$@'; fi
|
$(CP) -f -r -P '$<' '$(@D)'; \
|
||||||
|
if [ "$(@F)" != "$(<F)" ]; then \
|
||||||
|
$(MV) '$(@D)/$(<F)' '$@'; \
|
||||||
|
fi; \
|
||||||
|
else \
|
||||||
|
if [ -L '$<' ]; then \
|
||||||
|
$(ECHO) "Source file is a symlink and target is in the same directory: $< $@" ; \
|
||||||
|
exit 1; \
|
||||||
|
fi; \
|
||||||
|
$(CP) -f '$<' '$@'; \
|
||||||
|
fi
|
||||||
endef
|
endef
|
||||||
else ifeq ($(OPENJDK_TARGET_OS),macosx)
|
else ifeq ($(OPENJDK_TARGET_OS),macosx)
|
||||||
# On mac, extended attributes sometimes creep into the source files, which may later
|
# On mac, extended attributes sometimes creep into the source files, which may later
|
||||||
|
@ -408,6 +420,7 @@ endif
|
||||||
containing = $(foreach v,$2,$(if $(findstring $1,$v),$v))
|
containing = $(foreach v,$2,$(if $(findstring $1,$v),$v))
|
||||||
not-containing = $(foreach v,$2,$(if $(findstring $1,$v),,$v))
|
not-containing = $(foreach v,$2,$(if $(findstring $1,$v),,$v))
|
||||||
|
|
||||||
|
ifneq ($(DISABLE_CACHE_FIND), true)
|
||||||
################################################################################
|
################################################################################
|
||||||
# In Cygwin, finds are very costly, both because of expensive forks and because
|
# In Cygwin, finds are very costly, both because of expensive forks and because
|
||||||
# of bad file system caching. Find is used extensively in $(shell) commands to
|
# of bad file system caching. Find is used extensively in $(shell) commands to
|
||||||
|
@ -421,16 +434,23 @@ not-containing = $(foreach v,$2,$(if $(findstring $1,$v),,$v))
|
||||||
#
|
#
|
||||||
# Needs to be called with $(eval )
|
# Needs to be called with $(eval )
|
||||||
#
|
#
|
||||||
|
# Even if the performance benifit is negligible on other platforms, keep the
|
||||||
|
# functionality active unless explicitly disabled to exercise it more.
|
||||||
|
#
|
||||||
|
# Initialize FIND_CACHE_DIRS with := to make it a non recursively-expanded variable
|
||||||
|
FIND_CACHE_DIRS :=
|
||||||
# Param 1 - Dir to find in
|
# Param 1 - Dir to find in
|
||||||
ifeq ($(OPENJDK_BUILD_OS),windows)
|
|
||||||
define FillCacheFind
|
define FillCacheFind
|
||||||
FIND_CACHE_DIR += $1
|
# Filter out already cached dirs. The - is needed when FIND_CACHE_DIR is empty
|
||||||
FIND_CACHE := $$(sort $$(FIND_CACHE) $$(shell $(FIND) $1 -type f -o -type l))
|
# since filter out will then return empty.
|
||||||
|
FIND_CACHE_NEW_DIRS := $$(filter-out $$(addsuffix /%,\
|
||||||
|
- $(FIND_CACHE_DIRS)) $(FIND_CACHE_DIRS), $1)
|
||||||
|
ifneq ($$(FIND_CACHE_NEW_DIRS), )
|
||||||
|
# Remove any trailing slash from dirs in the cache dir list
|
||||||
|
FIND_CACHE_DIRS += $$(patsubst %/,%, $$(FIND_CACHE_NEW_DIRS))
|
||||||
|
FIND_CACHE := $$(sort $$(FIND_CACHE) $$(shell $(FIND) $$(FIND_CACHE_NEW_DIRS) -type f -o -type l))
|
||||||
|
endif
|
||||||
endef
|
endef
|
||||||
else
|
|
||||||
define FillCacheFind
|
|
||||||
endef
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Mimics find by looking in the cache if all of the directories have been cached.
|
# Mimics find by looking in the cache if all of the directories have been cached.
|
||||||
# Otherwise reverts to shell find. This is safe to call on all platforms, even if
|
# Otherwise reverts to shell find. This is safe to call on all platforms, even if
|
||||||
|
@ -439,10 +459,16 @@ endif
|
||||||
# The extra - is needed when FIND_CACHE_DIR is empty but should be harmless.
|
# The extra - is needed when FIND_CACHE_DIR is empty but should be harmless.
|
||||||
# Param 1 - Dirs to find in
|
# Param 1 - Dirs to find in
|
||||||
define CacheFind
|
define CacheFind
|
||||||
$(if $(filter-out $(addsuffix %,- $(FIND_CACHE_DIR)),$1), \
|
$(if $(filter-out $(addsuffix /%,- $(FIND_CACHE_DIRS)) $(FIND_CACHE_DIRS),$1), \
|
||||||
$(shell $(FIND) $1 -type f -o -type l), \
|
$(shell $(FIND) $1 -type f -o -type l), \
|
||||||
$(filter $(addsuffix %,$1),$(FIND_CACHE)))
|
$(filter $(addsuffix %,$1),$(FIND_CACHE)))
|
||||||
endef
|
endef
|
||||||
|
else
|
||||||
|
# If CacheFind is disabled, just run the find command.
|
||||||
|
define CacheFind
|
||||||
|
$(shell $(FIND) $1 -type f -o -type l)
|
||||||
|
endef
|
||||||
|
endif
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue