2012-09-18 18:29:16 +00:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
2024-03-14 07:30:42 +00:00
|
|
|
# Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved.
|
2012-09-18 18:29:16 +00:00
|
|
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
#
|
|
|
|
# This code is free software; you can redistribute it and/or modify it
|
|
|
|
# under the terms of the GNU General Public License version 2 only, as
|
|
|
|
# published by the Free Software Foundation.
|
|
|
|
#
|
|
|
|
# This code is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
# version 2 for more details (a copy is included in the LICENSE file that
|
|
|
|
# accompanied this code).
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License version
|
|
|
|
# 2 along with this work; if not, write to the Free Software Foundation,
|
|
|
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
#
|
|
|
|
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
|
|
# or visit www.oracle.com if you need additional information or have any
|
|
|
|
# questions.
|
|
|
|
#
|
|
|
|
|
2013-10-10 12:58:19 +00:00
|
|
|
# This script is processed by configure before it's usable. It is run from
|
2012-09-18 18:29:16 +00:00
|
|
|
# the root of the build directory.
|
|
|
|
|
|
|
|
|
2024-09-03 15:31:09 +00:00
|
|
|
################################################################################
|
2012-09-18 18:29:16 +00:00
|
|
|
# Substitutions from autoconf
|
|
|
|
|
2015-09-23 08:17:38 +00:00
|
|
|
export LEGACY_BUILD_DIR=@OPENJDK_TARGET_OS@-@OPENJDK_TARGET_CPU_LEGACY@
|
2012-09-18 18:29:16 +00:00
|
|
|
|
2019-01-02 11:59:26 +00:00
|
|
|
export OPENJDK_BUILD_OS_ENV="@OPENJDK_BUILD_OS_ENV@"
|
2016-04-28 14:18:59 +00:00
|
|
|
export OPENJDK_TARGET_OS="@OPENJDK_TARGET_OS@"
|
2015-09-23 08:17:38 +00:00
|
|
|
export OPENJDK_TARGET_CPU="@OPENJDK_TARGET_CPU@"
|
2016-04-06 09:16:37 +00:00
|
|
|
export DEBUG_LEVEL="@DEBUG_LEVEL@"
|
2012-09-18 18:29:16 +00:00
|
|
|
|
2015-09-23 08:17:38 +00:00
|
|
|
export AWK="@AWK@"
|
|
|
|
export BASH="@BASH@"
|
|
|
|
export CAT="@CAT@"
|
|
|
|
export CMP="@CMP@"
|
2022-10-05 12:42:05 +00:00
|
|
|
export CODESIGN="@CODESIGN@"
|
2015-09-23 08:17:38 +00:00
|
|
|
export CP="@CP@"
|
|
|
|
export CUT="@CUT@"
|
|
|
|
export DIFF="@DIFF@"
|
2020-12-07 15:55:53 +00:00
|
|
|
export DUMPBIN="@DUMPBIN@"
|
2024-03-14 07:30:42 +00:00
|
|
|
export ECHO="@ECHO@"
|
2015-09-23 08:17:38 +00:00
|
|
|
export EXPR="@EXPR@"
|
|
|
|
export FILE="@FILE@"
|
|
|
|
export FIND="@FIND@"
|
|
|
|
export GREP="@GREP@"
|
2016-05-04 13:29:01 +00:00
|
|
|
export GUNZIP="@GUNZIP@"
|
2024-03-14 07:30:42 +00:00
|
|
|
export HEAD="@HEAD@"
|
2015-09-23 08:17:38 +00:00
|
|
|
export LDD="@LDD@"
|
|
|
|
export LN="@LN@"
|
|
|
|
export MKDIR="@MKDIR@"
|
|
|
|
export MV="@MV@"
|
2022-02-22 16:06:52 +00:00
|
|
|
export NM="@NM@"
|
2015-09-23 08:17:38 +00:00
|
|
|
export OBJDUMP="@OBJDUMP@"
|
|
|
|
export OTOOL="@OTOOL@"
|
|
|
|
export PRINTF="@PRINTF@"
|
|
|
|
export READELF="@READELF@"
|
|
|
|
export RM="@RM@"
|
|
|
|
export SED="@SED@"
|
|
|
|
export SORT="@SORT@"
|
|
|
|
export STAT="@STAT@"
|
2015-09-28 20:10:03 +00:00
|
|
|
export STRIP="@STRIP@ @STRIPFLAGS@"
|
2016-05-04 13:29:01 +00:00
|
|
|
export TAR="@TAR@"
|
2015-09-23 08:17:38 +00:00
|
|
|
export TEE="@TEE@"
|
|
|
|
export UNIQ="@UNIQ@"
|
2016-05-04 13:29:01 +00:00
|
|
|
export UNARCHIVE="@UNZIP@ -q -o"
|
2012-09-18 18:29:16 +00:00
|
|
|
|
2017-09-25 08:21:23 +00:00
|
|
|
export TOPDIR="@TOPDIR@"
|
2017-09-25 08:32:00 +00:00
|
|
|
export OUTPUTDIR="@OUTPUTDIR@"
|
2012-09-18 18:29:16 +00:00
|
|
|
|
2016-04-06 09:16:37 +00:00
|
|
|
if [ "@COMPILE_TYPE@" != "cross" ]; then
|
2019-01-02 11:59:26 +00:00
|
|
|
export JAVAP="@FIXPATH@ $OUTPUTDIR/jdk/bin/javap @JAVA_TOOL_FLAGS_SMALL@"
|
|
|
|
export JIMAGE="@FIXPATH@ $OUTPUTDIR/jdk/bin/jimage"
|
2019-01-30 17:27:40 +00:00
|
|
|
export JMOD="@FIXPATH@ $OUTPUTDIR/jdk/bin/jmod"
|
2016-04-06 09:16:37 +00:00
|
|
|
elif [ "@CREATE_BUILDJDK@" = "true" ]; then
|
2019-01-02 11:59:26 +00:00
|
|
|
export JAVAP="@FIXPATH@ $OUTPUTDIR/buildjdk/jdk/bin/javap @JAVA_TOOL_FLAGS_SMALL@"
|
|
|
|
export JIMAGE="@FIXPATH@ $OUTPUTDIR/buildjdk/jdk/bin/jimage"
|
2019-01-30 17:27:40 +00:00
|
|
|
export JMOD="@FIXPATH@ $OUTPUTDIR/buildjdk/jdk/bin/jmod"
|
2016-04-06 09:16:37 +00:00
|
|
|
else
|
2019-01-02 11:59:26 +00:00
|
|
|
export JAVAP="@FIXPATH@ @BUILD_JDK@/bin/javap @JAVA_TOOL_FLAGS_SMALL@"
|
|
|
|
export JIMAGE="@FIXPATH@ @BUILD_JDK@/bin/jimage"
|
2019-01-30 17:27:40 +00:00
|
|
|
export JMOD="@FIXPATH@ @BUILD_JDK@/bin/jmod"
|
2016-04-06 09:16:37 +00:00
|
|
|
fi
|
|
|
|
|
2012-09-18 18:29:16 +00:00
|
|
|
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
|
2020-12-07 15:55:53 +00:00
|
|
|
if [[ $OPENJDK_BUILD_OS_ENV =~ ^windows.wsl ]]; then
|
|
|
|
export WSLENV=PATH/l
|
2019-01-02 11:59:26 +00:00
|
|
|
fi
|
2020-12-07 15:55:53 +00:00
|
|
|
export PATH="$PATH:@TOOLCHAIN_PATH@"
|
2012-09-18 18:29:16 +00:00
|
|
|
fi
|
|
|
|
|
2020-03-23 09:29:04 +00:00
|
|
|
export USE_PRECOMPILED_HEADER="@USE_PRECOMPILED_HEADER@"
|
|
|
|
|
2012-10-26 21:29:57 +00:00
|
|
|
# Now locate the main script and run it.
|
2017-09-25 08:21:23 +00:00
|
|
|
REAL_COMPARE_SCRIPT="$TOPDIR/make/scripts/compare.sh"
|
2012-10-26 21:29:57 +00:00
|
|
|
if [ ! -e "$REAL_COMPARE_SCRIPT" ]; then
|
2013-10-10 12:58:19 +00:00
|
|
|
echo "Error: Cannot locate compare script, it should have been in $REAL_COMPARE_SCRIPT"
|
|
|
|
exit 1
|
2012-09-18 18:29:16 +00:00
|
|
|
fi
|
|
|
|
|
2015-09-23 08:17:38 +00:00
|
|
|
# Rotate logs
|
2017-09-25 08:32:00 +00:00
|
|
|
$RM $OUTPUTDIR/compare.log.old 2> /dev/null
|
|
|
|
$MV $OUTPUTDIR/compare.log $OUTPUTDIR/compare.log.old 2> /dev/null
|
2015-09-23 08:17:38 +00:00
|
|
|
|
2015-11-05 09:58:53 +00:00
|
|
|
export SCRIPT_DIR="$( cd "$( dirname "$0" )" > /dev/null && pwd )"
|
|
|
|
|
2017-09-25 08:32:00 +00:00
|
|
|
$BASH $TOPDIR/make/scripts/logger.sh $OUTPUTDIR/compare.log $BASH "$REAL_COMPARE_SCRIPT" "$@"
|