1 $NetBSD: patch-common_autoconf_generated-configure.sh,v 1.18 2019/11/02 21:31:14 tnn Exp $
3 BOOT_JDK_VERSION part: pkg/51221 (Build error with OpenJDK8 and i386) and
6 --- common/autoconf/generated-configure.sh.orig 2019-10-16 01:41:55.000000000 +0000
7 +++ common/autoconf/generated-configure.sh
8 @@ -4185,7 +4185,7 @@ VALID_TOOLCHAINS_all="gcc clang solstudi
9 # These toolchains are valid on different platforms
10 VALID_TOOLCHAINS_bsd="clang gcc"
11 VALID_TOOLCHAINS_linux="gcc clang"
12 -VALID_TOOLCHAINS_solaris="solstudio"
13 +VALID_TOOLCHAINS_solaris="gcc solstudio"
14 VALID_TOOLCHAINS_macosx="gcc clang"
15 VALID_TOOLCHAINS_aix="xlc"
16 VALID_TOOLCHAINS_windows="microsoft"
17 @@ -15479,9 +15479,6 @@ done
18 # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
19 if test "x$MAKE" != x; then
20 # User has supplied a make, test it.
21 - if test ! -f "$MAKE"; then
22 - as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
25 MAKE_CANDIDATE=""$MAKE""
26 DESCRIPTION="user supplied MAKE=$MAKE"
27 @@ -20134,7 +20131,7 @@ $as_echo "$as_me: Potential Boot JDK fou
30 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
31 - BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
32 + BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | grep version`
34 # Extra M4 quote needed to protect [] in grep expression.
35 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
36 @@ -20466,7 +20463,7 @@ $as_echo "$as_me: Potential Boot JDK fou
39 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
40 - BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
41 + BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | grep version`
43 # Extra M4 quote needed to protect [] in grep expression.
44 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
45 @@ -20784,7 +20781,7 @@ $as_echo "$as_me: Potential Boot JDK fou
48 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
49 - BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
50 + BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | grep version`
52 # Extra M4 quote needed to protect [] in grep expression.
53 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
54 @@ -20972,7 +20969,7 @@ $as_echo "$as_me: Potential Boot JDK fou
57 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
58 - BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
59 + BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | grep version`
61 # Extra M4 quote needed to protect [] in grep expression.
62 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
63 @@ -21250,7 +21247,7 @@ fi
64 # Resolve file symlinks
65 while test $COUNTER -lt 20; do
66 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
67 - if test "x$ISLINK" == x; then
68 + if test "x$ISLINK" = x; then
69 # This is not a symbolic link! We are done!
72 @@ -21300,7 +21297,7 @@ $as_echo "$as_me: Potential Boot JDK fou
75 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
76 - BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
77 + BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | grep version`
79 # Extra M4 quote needed to protect [] in grep expression.
80 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
81 @@ -21515,7 +21512,7 @@ $as_echo "$as_me: Potential Boot JDK fou
84 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
85 - BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
86 + BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | grep version`
88 # Extra M4 quote needed to protect [] in grep expression.
89 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
90 @@ -21695,7 +21692,7 @@ $as_echo "$as_me: Potential Boot JDK fou
93 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
94 - BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
95 + BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | grep version`
97 # Extra M4 quote needed to protect [] in grep expression.
98 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
99 @@ -21903,7 +21900,7 @@ $as_echo "$as_me: Potential Boot JDK fou
102 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
103 - BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
104 + BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | grep version`
106 # Extra M4 quote needed to protect [] in grep expression.
107 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
108 @@ -22083,7 +22080,7 @@ $as_echo "$as_me: Potential Boot JDK fou
111 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
112 - BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
113 + BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | grep version`
115 # Extra M4 quote needed to protect [] in grep expression.
116 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
117 @@ -22291,7 +22288,7 @@ $as_echo "$as_me: Potential Boot JDK fou
120 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
121 - BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
122 + BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | grep version`
124 # Extra M4 quote needed to protect [] in grep expression.
125 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
126 @@ -22471,7 +22468,7 @@ $as_echo "$as_me: Potential Boot JDK fou
129 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
130 - BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
131 + BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | grep version`
133 # Extra M4 quote needed to protect [] in grep expression.
134 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
135 @@ -22679,7 +22676,7 @@ $as_echo "$as_me: Potential Boot JDK fou
138 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
139 - BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
140 + BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | grep version`
142 # Extra M4 quote needed to protect [] in grep expression.
143 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
144 @@ -22859,7 +22856,7 @@ $as_echo "$as_me: Potential Boot JDK fou
147 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
148 - BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
149 + BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | grep version`
151 # Extra M4 quote needed to protect [] in grep expression.
152 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
153 @@ -23054,7 +23051,7 @@ $as_echo "$as_me: Potential Boot JDK fou
156 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
157 - BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
158 + BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | grep version`
160 # Extra M4 quote needed to protect [] in grep expression.
161 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
162 @@ -23232,7 +23229,7 @@ $as_echo "$as_me: Potential Boot JDK fou
165 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
166 - BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
167 + BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | grep version`
169 # Extra M4 quote needed to protect [] in grep expression.
170 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
171 @@ -23428,7 +23425,7 @@ $as_echo "$as_me: Potential Boot JDK fou
174 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
175 - BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
176 + BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | grep version`
178 # Extra M4 quote needed to protect [] in grep expression.
179 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
180 @@ -23606,7 +23603,7 @@ $as_echo "$as_me: Potential Boot JDK fou
183 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
184 - BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
185 + BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | grep version`
187 # Extra M4 quote needed to protect [] in grep expression.
188 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
189 @@ -23801,7 +23798,7 @@ $as_echo "$as_me: Potential Boot JDK fou
192 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
193 - BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
194 + BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | grep version`
196 # Extra M4 quote needed to protect [] in grep expression.
197 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
198 @@ -23979,7 +23976,7 @@ $as_echo "$as_me: Potential Boot JDK fou
201 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
202 - BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
203 + BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | grep version`
205 # Extra M4 quote needed to protect [] in grep expression.
206 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
207 @@ -24175,7 +24172,7 @@ $as_echo "$as_me: Potential Boot JDK fou
210 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
211 - BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
212 + BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | grep version`
214 # Extra M4 quote needed to protect [] in grep expression.
215 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
216 @@ -24353,7 +24350,7 @@ $as_echo "$as_me: Potential Boot JDK fou
219 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
220 - BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
221 + BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | grep version`
223 # Extra M4 quote needed to protect [] in grep expression.
224 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
225 @@ -24530,7 +24527,7 @@ $as_echo "$as_me: Potential Boot JDK fou
228 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
229 - BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
230 + BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | grep version`
232 # Extra M4 quote needed to protect [] in grep expression.
233 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
234 @@ -24936,16 +24933,15 @@ $as_echo_n "checking flags for boot jdk
235 # Maximum amount of heap memory.
236 # Maximum stack size.
237 if test "x$BOOT_JDK_BITS" = x32; then
241 # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
242 # pointers are used. Apparently, we need to increase the heap and stack
243 # space for the jvm. More specifically, when running javac to build huge
250 $ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
251 $ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
252 @@ -27479,7 +27475,7 @@ $as_echo_n "checking resolved symbolic l
253 # Resolve file symlinks
254 while test $COUNTER -lt 20; do
255 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
256 - if test "x$ISLINK" == x; then
257 + if test "x$ISLINK" = x; then
258 # This is not a symbolic link! We are done!
261 @@ -27934,7 +27930,7 @@ $as_echo_n "checking for resolved symbol
262 # Resolve file symlinks
263 while test $COUNTER -lt 20; do
264 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
265 - if test "x$ISLINK" == x; then
266 + if test "x$ISLINK" = x; then
267 # This is not a symbolic link! We are done!
270 @@ -29220,7 +29216,7 @@ $as_echo_n "checking resolved symbolic l
271 # Resolve file symlinks
272 while test $COUNTER -lt 20; do
273 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
274 - if test "x$ISLINK" == x; then
275 + if test "x$ISLINK" = x; then
276 # This is not a symbolic link! We are done!
279 @@ -29675,7 +29671,7 @@ $as_echo_n "checking for resolved symbol
280 # Resolve file symlinks
281 while test $COUNTER -lt 20; do
282 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
283 - if test "x$ISLINK" == x; then
284 + if test "x$ISLINK" = x; then
285 # This is not a symbolic link! We are done!
288 @@ -41391,6 +41387,12 @@ $as_echo "$ac_cv_c_bigendian" >&6; }
289 SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
290 SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
291 SET_SHARED_LIBRARY_MAPFILE=''
292 + elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
293 + SHARED_LIBRARY_FLAGS="-shared"
294 + SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
295 + SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
296 + SET_SHARED_LIBRARY_NAME=''
297 + SET_SHARED_LIBRARY_MAPFILE=''
299 # Default works for linux, might work on other platforms as well.
300 SHARED_LIBRARY_FLAGS='-shared'
301 @@ -41439,7 +41441,9 @@ $as_echo "$ac_cv_c_bigendian" >&6; }
302 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
303 CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
304 CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
305 + if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
306 CFLAGS_JDKLIB_EXTRA='-xstrconst'
309 # The (cross) compiler is now configured, we can now test capabilities
310 # of the target platform.
311 @@ -41580,7 +41584,7 @@ $as_echo "$ac_cv_c_bigendian" >&6; }
312 elif test "x$TOOLCHAIN_TYPE" = xgcc; then
313 LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS -fstack-protector"
314 LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS -fstack-protector"
315 - if test "x$OPENJDK_TARGET_OS" != xmacosx; then
316 + if test "x$OPENJDK_TARGET_OS" != xmacosx -a test "x$OPENJDK_TARGET_OS" != xsolaris; then
317 LDFLAGS_JDK="$LDFLAGS_JDK -Wl,-z,relro"
318 LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS -Wl,-z,relro"
320 @@ -44028,7 +44033,7 @@ $as_echo "$as_me: WARNING: Can't find pr
323 # Now check if configure found a version of 'msbuild.exe'
324 - if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
325 + if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" = x ; then
326 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&5
327 $as_echo "$as_me: WARNING: Can't find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&2;}
329 @@ -44444,7 +44449,11 @@ $as_echo "$as_me: WARNING: --with-freety
331 # Allow --with-freetype-lib and --with-freetype-include to override
332 if test "x$with_freetype_include" != x; then
333 - POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
334 + POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
335 + # deal w/ freetype2 in new location
336 + if test -f "$with_freetype_include"/freetype2/ft2build.h; then
337 + POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"/freetype2
340 if test "x$with_freetype_lib" != x; then
341 POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
342 @@ -47554,7 +47563,7 @@ $as_echo "$as_me: The path of FREETYPE_I
343 FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
346 - if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
347 + if test -d $FREETYPE_INCLUDE_PATH/freetype2; then
348 FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
350 FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
351 @@ -47687,7 +47696,7 @@ $as_echo "$as_me: The path of FREETYPE_L
352 if test "x$OPENJDK_TARGET_OS" = xwindows; then
353 FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
355 - FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
356 + FREETYPE_LIBS="-Xlinker -R$FREETYPE_LIB_PATH -L$FREETYPE_LIB_PATH -lfreetype"
360 @@ -49024,9 +49033,6 @@ fi
364 - if test "x$LLVM_CONFIG" != xllvm-config; then
365 - as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
368 llvm_components="jit mcjit engine nativecodegen native"
370 @@ -49069,7 +49075,7 @@ fi
373 # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
374 - if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
375 + if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x && test "x$GCC" = "xno"; then
376 LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"