3630
3631
3632 # Test: Is there a JDK installed in default, well-known locations?
3633
3634
3635 # Check that a command-line tool in the Boot JDK is correct
3636 # $1 = name of variable to assign
3637 # $2 = name of binary
3638
3639
3640 ###############################################################################
3641 #
3642 # We need a Boot JDK to bootstrap the build.
3643 #
3644
3645
3646
3647
3648
3649 #
3650 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
3651 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3652 #
3653 # This code is free software; you can redistribute it and/or modify it
3654 # under the terms of the GNU General Public License version 2 only, as
3655 # published by the Free Software Foundation. Oracle designates this
3656 # particular file as subject to the "Classpath" exception as provided
3657 # by Oracle in the LICENSE file that accompanied this code.
3658 #
3659 # This code is distributed in the hope that it will be useful, but WITHOUT
3660 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3661 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3662 # version 2 for more details (a copy is included in the LICENSE file that
3663 # accompanied this code).
3664 #
3665 # You should have received a copy of the GNU General Public License version
3666 # 2 along with this work; if not, write to the Free Software Foundation,
3667 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3668 #
3669 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3670 # or visit www.oracle.com if you need additional information or have any
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373 # This line needs to be here, verbatim, after all includes and the dummy hook
4374 # definitions. It is replaced with custom functionality when building
4375 # custom sources.
4376 #CUSTOM_AUTOCONF_INCLUDE
4377
4378 # Do not change or remove the following line, it is needed for consistency checks:
4379 DATE_WHEN_GENERATED=1560366811
4380
4381 ###############################################################################
4382 #
4383 # Initialization / Boot-strapping
4384 #
4385 # The bootstrapping process needs to solve the "chicken or the egg" problem,
4386 # thus it jumps back and forth, each time gaining something needed later on.
4387 #
4388 ###############################################################################
4389
4390 # If we are requested to print additional help, do that and then exit.
4391 # This must be the very first call.
4392
4393 if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4394 $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4395 $PRINTF "Which are valid to use depends on the build platform.\n"
4396 for toolchain in $VALID_TOOLCHAINS_all; do
4397 # Use indirect variable referencing
4398 toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4399 TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
51961 # The number of cores were not specified, try to probe them.
51962
51963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
51964 $as_echo_n "checking for number of cores... " >&6; }
51965 NUM_CORES=1
51966 FOUND_CORES=no
51967
51968 if test -f /proc/cpuinfo; then
51969 # Looks like a Linux (or cygwin) system
51970 NUM_CORES=`cat /proc/cpuinfo | grep -c processor`
51971 FOUND_CORES=yes
51972 elif test -x /usr/sbin/psrinfo; then
51973 # Looks like a Solaris system
51974 NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
51975 FOUND_CORES=yes
51976 elif test -x /usr/sbin/system_profiler; then
51977 # Looks like a MacOSX system
51978 NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk '{print $5}'`
51979 FOUND_CORES=yes
51980 elif test "x$OPENJDK_BUILD_OS" = xaix ; then
51981 NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
51982 FOUND_CORES=yes
51983 elif test -n "$NUMBER_OF_PROCESSORS"; then
51984 # On windows, look in the env
51985 NUM_CORES=$NUMBER_OF_PROCESSORS
51986 FOUND_CORES=yes
51987 fi
51988
51989 if test "x$FOUND_CORES" = xyes; then
51990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
51991 $as_echo "$NUM_CORES" >&6; }
51992 else
51993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
51994 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
51995 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
51996 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
51997 fi
51998
51999 else
52000 NUM_CORES=$with_num_cores
52001 fi
52002
|
3630
3631
3632 # Test: Is there a JDK installed in default, well-known locations?
3633
3634
3635 # Check that a command-line tool in the Boot JDK is correct
3636 # $1 = name of variable to assign
3637 # $2 = name of binary
3638
3639
3640 ###############################################################################
3641 #
3642 # We need a Boot JDK to bootstrap the build.
3643 #
3644
3645
3646
3647
3648
3649 #
3650 # Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
3651 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3652 #
3653 # This code is free software; you can redistribute it and/or modify it
3654 # under the terms of the GNU General Public License version 2 only, as
3655 # published by the Free Software Foundation. Oracle designates this
3656 # particular file as subject to the "Classpath" exception as provided
3657 # by Oracle in the LICENSE file that accompanied this code.
3658 #
3659 # This code is distributed in the hope that it will be useful, but WITHOUT
3660 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3661 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3662 # version 2 for more details (a copy is included in the LICENSE file that
3663 # accompanied this code).
3664 #
3665 # You should have received a copy of the GNU General Public License version
3666 # 2 along with this work; if not, write to the Free Software Foundation,
3667 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3668 #
3669 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3670 # or visit www.oracle.com if you need additional information or have any
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373 # This line needs to be here, verbatim, after all includes and the dummy hook
4374 # definitions. It is replaced with custom functionality when building
4375 # custom sources.
4376 #CUSTOM_AUTOCONF_INCLUDE
4377
4378 # Do not change or remove the following line, it is needed for consistency checks:
4379 DATE_WHEN_GENERATED=1565358475
4380
4381 ###############################################################################
4382 #
4383 # Initialization / Boot-strapping
4384 #
4385 # The bootstrapping process needs to solve the "chicken or the egg" problem,
4386 # thus it jumps back and forth, each time gaining something needed later on.
4387 #
4388 ###############################################################################
4389
4390 # If we are requested to print additional help, do that and then exit.
4391 # This must be the very first call.
4392
4393 if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4394 $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4395 $PRINTF "Which are valid to use depends on the build platform.\n"
4396 for toolchain in $VALID_TOOLCHAINS_all; do
4397 # Use indirect variable referencing
4398 toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4399 TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
51961 # The number of cores were not specified, try to probe them.
51962
51963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
51964 $as_echo_n "checking for number of cores... " >&6; }
51965 NUM_CORES=1
51966 FOUND_CORES=no
51967
51968 if test -f /proc/cpuinfo; then
51969 # Looks like a Linux (or cygwin) system
51970 NUM_CORES=`cat /proc/cpuinfo | grep -c processor`
51971 FOUND_CORES=yes
51972 elif test -x /usr/sbin/psrinfo; then
51973 # Looks like a Solaris system
51974 NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
51975 FOUND_CORES=yes
51976 elif test -x /usr/sbin/system_profiler; then
51977 # Looks like a MacOSX system
51978 NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk '{print $5}'`
51979 FOUND_CORES=yes
51980 elif test "x$OPENJDK_BUILD_OS" = xaix ; then
51981 NUM_LCPU=`lparstat -m 2> /dev/null | $GREP -o "lcpu=[0-9]*" | $CUT -d "=" -f 2`
51982 if test -n "$NUM_LCPU"; then
51983 NUM_CORES=$NUM_LCPU
51984 FOUND_CORES=yes
51985 fi
51986 elif test -n "$NUMBER_OF_PROCESSORS"; then
51987 # On windows, look in the env
51988 NUM_CORES=$NUMBER_OF_PROCESSORS
51989 FOUND_CORES=yes
51990 fi
51991
51992 if test "x$FOUND_CORES" = xyes; then
51993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
51994 $as_echo "$NUM_CORES" >&6; }
51995 else
51996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
51997 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
51998 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
51999 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
52000 fi
52001
52002 else
52003 NUM_CORES=$with_num_cores
52004 fi
52005
|