8065914: Various improvements and cleanup of build system

Reviewed-by: erikj
This commit is contained in:
Magnus Ihse Bursie 2014-11-27 15:41:56 +01:00
parent 2f10adad63
commit c4ced97793
29 changed files with 422 additions and 424 deletions

View File

@ -33,7 +33,7 @@ default:
# The shell code below will be executed on /usr/ccs/bin/make on Solaris, but not in GNU make.
# /usr/ccs/bin/make lacks basically every other flow control mechanism.
TEST_FOR_NON_GNUMAKE:sh=echo You are not using GNU make/gmake, this is a requirement. Check your path. 1>&2 && exit 1
.TEST_FOR_NON_GNUMAKE:sh=echo You are not using GNU make/gmake, this is a requirement. Check your path. 1>&2 && exit 1
# Assume we have GNU make, but check version.
ifeq ($(strip $(foreach v, 3.81% 3.82% 4.%, $(filter $v, $(MAKE_VERSION)))), )
@ -46,7 +46,17 @@ ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),)
else
makefile_path:=$(lastword $(MAKEFILE_LIST))
endif
root_dir:=$(dir $(makefile_path))
root_dir:=$(patsubst %/,%,$(dir $(makefile_path)))
ifneq ($(findstring qp,$(MAKEFLAGS)),)
# When called with -qp, assume an external part (e.g. bash completion) is trying
# to understand our targets.
# Duplication of global targets, needed before ParseConfAndSpec in case we have
# no configurations.
help:
# If CONF is not set, look for all available configurations
CONF?=
endif
# ... and then we can include our helper functions
include $(root_dir)/make/MakeHelpers.gmk
@ -89,6 +99,7 @@ else
# The wrapper target was called so we now have a single configuration. Load the spec file
# and call the real Main.gmk.
include $(SPEC)
include $(SRC_ROOT)/make/common/MakeBase.gmk
### Clean up from previous run
# Remove any build.log from a previous run, if they exist

View File

@ -57,4 +57,3 @@ JAR_CMD:=$(BOOT_JDK)/bin/jar
NATIVE2ASCII_CMD:=$(BOOT_JDK)/bin/native2ascii
JARSIGNER_CMD:=$(BOOT_JDK)/bin/jarsigner
SJAVAC_SERVER_JAVA_CMD:=$(JAVA_CMD)

View File

@ -47,6 +47,7 @@ FIND="@FIND@"
GREP="@GREP@"
JAVAP="@FIXPATH@ @BOOT_JDK@/bin/javap @JAVA_TOOL_FLAGS_SMALL@"
LDD="@LDD@"
LN="@LN@"
MKDIR="@MKDIR@"
NAWK="@NAWK@"
NM="@GNM@"

View File

@ -4331,7 +4331,7 @@ TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
DATE_WHEN_GENERATED=1417016445
DATE_WHEN_GENERATED=1417099232
###############################################################################
#

View File

@ -76,10 +76,13 @@ diff_text() {
TMP=1
if [[ "$THIS_FILE" = *"META-INF/MANIFEST.MF" ]]; then
# Filter out date string, ant version and java version differences.
TMP=$(LC_ALL=C $DIFF $OTHER_FILE $THIS_FILE | \
$GREP '^[<>]' | \
$SED -e '/[<>] Ant-Version: Apache Ant .*/d' \
-e '/[<>] Created-By: .* (Oracle Corporation).*/d')
-e '/[<>] Created-By: .* (Oracle [Corpatin)]*/d' \
-e '/[<>] [Corpatin]*)/d' \
-e '/[<>].*[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}.*/d')
fi
if test "x$SUFFIX" = "xjava"; then
TMP=$(LC_ALL=C $DIFF $OTHER_FILE $THIS_FILE | \
@ -100,18 +103,18 @@ diff_text() {
# To improve performance when large diffs are found, do a rough filtering of classes
# elibeble for these exceptions
if $GREP -R -e '[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}' \
-e '[0-9]\{2\}/[0-9]\{2\}/[0-9]\{4\}' \
-e thePoint -e aPoint -e setItemsPtr \
-e '[0-9]\{2\}/[0-9]\{2\}/[0-9]\{4\}' \
-e thePoint -e aPoint -e setItemsPtr \
-e 'lambda\$[a-zA-Z0-9]*\$[0-9]' ${THIS_FILE} > /dev/null; then
$JAVAP -c -constants -l -p ${OTHER_FILE} > ${OTHER_FILE}.javap
$JAVAP -c -constants -l -p ${THIS_FILE} > ${THIS_FILE}.javap
TMP=$($DIFF ${OTHER_FILE}.javap ${THIS_FILE}.javap | \
$GREP '^[<>]' | \
$SED -e '/[<>].*[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}.*/d' \
-e '/[0-9]\{2\}\/[0-9]\{2\}\/[0-9]\{4\}/d' \
-e '/[<>].*Point Lcom\/apple\/jobjc\/foundation\/NSPoint;/d' \
-e '/[<>].*public com\.apple\.jobjc\.Pointer<com\.apple\.jobjc\..*itemsPtr();/d' \
-e '/[<>].*public void setItemsPtr(com\.apple\.jobjc\.Pointer<com\.apple\.jobjc\..*);/d' \
-e '/[0-9]\{2\}\/[0-9]\{2\}\/[0-9]\{4\}/d' \
-e '/[<>].*Point Lcom\/apple\/jobjc\/foundation\/NSPoint;/d' \
-e '/[<>].*public com\.apple\.jobjc\.Pointer<com\.apple\.jobjc\..*itemsPtr();/d' \
-e '/[<>].*public void setItemsPtr(com\.apple\.jobjc\.Pointer<com\.apple\.jobjc\..*);/d' \
-e '/[<>].*lambda\$[a-zA-Z0-9]*\$[0-9]*/d')
fi
fi
@ -121,20 +124,19 @@ diff_text() {
# Disable this exception since we aren't changing the properties cleaning method yet.
# $CAT $OTHER_FILE | $SED -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' -e 's/#.*/#/g' \
# | $SED -f "$SRC_ROOT/common/makefiles/support/unicode2x.sed" \
# | $SED -e '/^#/d' -e '/^$/d' \
# | $SED -e '/^#/d' -e '/^$/d' \
# -e :a -e '/\\$/N; s/\\\n//; ta' \
# -e 's/^[ \t]*//;s/[ \t]*$//' \
# -e 's/\\=/=/' | LC_ALL=C $SORT > $OTHER_FILE.cleaned
# -e 's/^[ \t]*//;s/[ \t]*$//' \
# -e 's/\\=/=/' | LC_ALL=C $SORT > $OTHER_FILE.cleaned
# Filter out date string differences.
TMP=$(LC_ALL=C $DIFF $OTHER_FILE.cleaned $THIS_FILE | \
$GREP '^[<>]' | \
$SED -e '/[<>].*[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}.*/d')
fi
if test "x$SUFFIX" = "xMF"; then
# Filter out date string differences.
if test "x$SUFFIX" = "xhtml"; then
TMP=$(LC_ALL=C $DIFF $OTHER_FILE $THIS_FILE | \
$GREP '^[<>]' | \
$SED -e '/[<>].*[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}.*/d')
$SED -e '/[<>] <!-- Generated by javadoc .* on .* -->/d' )
fi
if test -n "$TMP"; then
echo Files $OTHER_FILE and $THIS_FILE differ
@ -236,8 +238,8 @@ compare_permissions() {
TP=`ls -l ${THIS_DIR}/$f | awk '{printf("%.10s\n", $1);}'`
if [ "$OP" != "$TP" ]
then
if [ -z "$found" ]; then echo ; found="yes"; fi
$PRINTF "\told: ${OP} new: ${TP}\t$f\n"
if [ -z "$found" ]; then echo ; found="yes"; fi
$PRINTF "\tother: ${OP} this: ${TP}\t$f\n"
fi
done
if [ -z "$found" ]; then
@ -265,21 +267,19 @@ compare_file_types() {
if [ ! -f ${THIS_DIR}/$f ]; then continue; fi
OF=`cd ${OTHER_DIR} && $FILE -h $f | $SED 's/BuildID[^,]*//g'`
TF=`cd ${THIS_DIR} && $FILE -h $f | $SED 's/BuildID[^,]*//g'`
if [ "$f" = "./src.zip" ] || [[ "$f" = *"/Home/src.zip" ]] || [[ "$f" = *"/lib/JObjC.jar" ]]
then
if [ "`echo $OF | $GREP -ic zip`" -gt 0 -a "`echo $TF | $GREP -ic zip`" -gt 0 ]
then
# the way we produces zip-files make it so that directories are stored in old file
# but not in new (only files with full-path)
# this makes file-5.09 report them as different
continue;
fi
fi
if [ "$OF" != "$TF" ]
then
if [ -z "$found" ]; then echo ; found="yes"; fi
$PRINTF "\tother: ${OF}\n\tthis : ${TF}\n"
if [ "`echo $OF | $GREP -c 'Zip archive data'`" -gt 0 ] \
&& [ "`echo $TF | $GREP -c 'Zip archive data'`" -gt 0 ]
then
# the way we produce zip-files make it so that directories are stored in
# old file but not in new (only files with full-path) this makes file
# report them as different
continue
else
if [ -z "$found" ]; then echo ; found="yes"; fi
$PRINTF "\tother: ${OF}\n\tthis : ${TF}\n"
fi
fi
done
if [ -z "$found" ]; then
@ -299,9 +299,10 @@ compare_general_files() {
GENERAL_FILES=$(cd $THIS_DIR && $FIND . -type f ! -name "*.so" ! -name "*.jar" ! -name "*.zip" \
! -name "*.debuginfo" ! -name "*.dylib" ! -name "jexec" \
! -name "ct.sym" ! -name "*.diz" ! -name "*.dll" \
! -name "ct.sym" ! -name "*.diz" ! -name "*.dll" ! -name "*.cpl" \
! -name "*.pdb" ! -name "*.exp" ! -name "*.ilk" \
! -name "*.lib" ! -name "*.war" ! -name "JavaControlPanel" \
! -name "*.lib" ! -name "*.war" ! -name "JavaControlPanel" ! -name "*.jmod" \
! -name "*.obj" ! -name "*.o" ! -name "JavaControlPanelHelper" ! -name "JavaUpdater" \
| $GREP -v "./bin/" | $SORT | $FILTER)
echo General files...
@ -377,7 +378,7 @@ compare_zip_file() {
THIS_SUFFIX="${THIS_ZIP##*.}"
OTHER_SUFFIX="${OTHER_ZIP##*.}"
if [ "$THIS_SUFFIX" != "$OTHER_SUFFIX" ]; then
echo The files do not have the same suffix type!
echo "The files do not have the same suffix type! ($THIS_SUFFIX != $OTHER_SUFFIX)"
return 2
fi
@ -458,9 +459,9 @@ compare_zip_file() {
$RM -f $WORK_DIR/$ZIP_FILE.diffs
for file in $DIFFING_FILES; do
if [[ "$ACCEPTED_JARZIP_CONTENTS $EXCEPTIONS" != *"$file"* ]]; then
if [[ "$ACCEPTED_JARZIP_CONTENTS $EXCEPTIONS" != *"$file"* ]]; then
diff_text $OTHER_UNZIPDIR/$file $THIS_UNZIPDIR/$file >> $WORK_DIR/$ZIP_FILE.diffs
fi
fi
done
if [ -s "$WORK_DIR/$ZIP_FILE.diffs" ]; then
@ -567,6 +568,10 @@ compare_bin_file() {
$MKDIR -p $FILE_WORK_DIR
# Make soft links to original files from work dir to facilitate debugging
$LN -f -s $THIS_FILE $WORK_FILE_BASE.this
$LN -f -s $OTHER_FILE $WORK_FILE_BASE.other
ORIG_THIS_FILE="$THIS_FILE"
ORIG_OTHER_FILE="$OTHER_FILE"
@ -583,57 +588,58 @@ compare_bin_file() {
fi
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
unset _NT_SYMBOL_PATH
# On windows we need to unzip the debug symbols, if present
OTHER_FILE_BASE=${OTHER_FILE/.dll/}
OTHER_FILE_BASE=${OTHER_FILE_BASE/.exe/}
DIZ_NAME=$(basename $OTHER_FILE_BASE).diz
unset _NT_SYMBOL_PATH
# On windows we need to unzip the debug symbols, if present
OTHER_FILE_BASE=${OTHER_FILE/.dll/}
OTHER_FILE_BASE=${OTHER_FILE_BASE/.exe/}
OTHER_FILE_BASE=${OTHER_FILE_BASE/.cpl/}
DIZ_NAME=$(basename $OTHER_FILE_BASE).diz
# java.exe and java.dll diz files will have the same name. Have to
# make sure java.exe gets the right one. This is only needed for
# OTHER since in the new build, all pdb files are left around.
if [ "$NAME" = "java.exe" ] && [ -f "$OTHER/tmp/java/java/obj64/java.diz" ]; then
OTHER_DIZ_FILE="$OTHER/tmp/java/java/obj64/java.diz"
elif [ -f "${OTHER_FILE_BASE}.diz" ]; then
OTHER_DIZ_FILE=${OTHER_FILE_BASE}.diz
else
# make sure java.exe gets the right one. This is only needed for
# OTHER since in the new build, all pdb files are left around.
if [ "$NAME" = "java.exe" ] && [ -f "$OTHER/tmp/java/java/obj64/java.diz" ]; then
OTHER_DIZ_FILE="$OTHER/tmp/java/java/obj64/java.diz"
elif [ -f "${OTHER_FILE_BASE}.diz" ]; then
OTHER_DIZ_FILE=${OTHER_FILE_BASE}.diz
else
# Some files, jli.dll, appears twice in the image but only one of
# thme has a diz file next to it.
OTHER_DIZ_FILE="$($FIND $OTHER_DIR -name $DIZ_NAME | $SED 1q)"
if [ ! -f "$OTHER_DIZ_FILE" ]; then
# As a last resort, look for diz file in the whole build output
# dir.
OTHER_DIZ_FILE="$($FIND $OTHER -name $DIZ_NAME | $SED 1q)"
fi
fi
if [ -n "$OTHER_DIZ_FILE" ]; then
$MKDIR -p $FILE_WORK_DIR/other
(cd $FILE_WORK_DIR/other ; $UNARCHIVE -o $OTHER_DIZ_FILE)
export _NT_SYMBOL_PATH="$FILE_WORK_DIR/other"
fi
THIS_FILE_BASE=${THIS_FILE/.dll/}
THIS_FILE_BASE=${THIS_FILE_BASE/.exe/}
if [ -f "${THIS_FILE/.dll/}.diz" ]; then
THIS_DIZ_FILE=${THIS_FILE/.dll/}.diz
else
THIS_DIZ_FILE="$($FIND $THIS_DIR -name $DIZ_NAME | $SED 1q)"
if [ ! -f "$THIS_DIZ_FILE" ]; then
# As a last resort, look for diz file in the whole build output
# dir.
THIS_DIZ_FILE="$($FIND $THIS -name $DIZ_NAME | $SED 1q)"
fi
fi
if [ -n "$THIS_DIZ_FILE" ]; then
$MKDIR -p $FILE_WORK_DIR/this
(cd $FILE_WORK_DIR/this ; $UNARCHIVE -o $THIS_DIZ_FILE)
export _NT_SYMBOL_PATH="$_NT_SYMBOL_PATH;$FILE_WORK_DIR/this"
fi
# thme has a diz file next to it.
OTHER_DIZ_FILE="$($FIND $OTHER_DIR -name $DIZ_NAME | $SED 1q)"
if [ ! -f "$OTHER_DIZ_FILE" ]; then
# As a last resort, look for diz file in the whole build output
# dir.
OTHER_DIZ_FILE="$($FIND $OTHER -name $DIZ_NAME | $SED 1q)"
fi
fi
if [ -n "$OTHER_DIZ_FILE" ]; then
$MKDIR -p $FILE_WORK_DIR/other
(cd $FILE_WORK_DIR/other ; $UNARCHIVE -o $OTHER_DIZ_FILE)
export _NT_SYMBOL_PATH="$FILE_WORK_DIR/other"
fi
THIS_FILE_BASE=${THIS_FILE/.dll/}
THIS_FILE_BASE=${THIS_FILE_BASE/.exe/}
if [ -f "${THIS_FILE/.dll/}.diz" ]; then
THIS_DIZ_FILE=${THIS_FILE/.dll/}.diz
else
THIS_DIZ_FILE="$($FIND $THIS_DIR -name $DIZ_NAME | $SED 1q)"
if [ ! -f "$THIS_DIZ_FILE" ]; then
# As a last resort, look for diz file in the whole build output
# dir.
THIS_DIZ_FILE="$($FIND $THIS -name $DIZ_NAME | $SED 1q)"
fi
fi
if [ -n "$THIS_DIZ_FILE" ]; then
$MKDIR -p $FILE_WORK_DIR/this
(cd $FILE_WORK_DIR/this ; $UNARCHIVE -o $THIS_DIZ_FILE)
export _NT_SYMBOL_PATH="$_NT_SYMBOL_PATH;$FILE_WORK_DIR/this"
fi
fi
if [ -z "$SKIP_BIN_DIFF" ]; then
if cmp $OTHER_FILE $THIS_FILE > /dev/null; then
# The files were bytewise identical.
if [ -n "$VERBOSE" ]; then
echo " : : : : : $BIN_FILE"
echo " : : : : : : $BIN_FILE"
fi
return 0
fi
@ -664,19 +670,19 @@ compare_bin_file() {
DIFF_SIZE_REL=$($EXPR $THIS_SIZE \* 100 / $OTHER_SIZE)
SIZE_MSG=$($PRINTF "%3d%% %4d" $DIFF_SIZE_REL $DIFF_SIZE_NUM)
if [[ "$ACCEPTED_SMALL_SIZE_DIFF" = *"$BIN_FILE"* ]] && [ "$DIFF_SIZE_REL" -gt 98 ] \
&& [ "$DIFF_SIZE_REL" -lt 102 ]; then
&& [ "$DIFF_SIZE_REL" -lt 102 ]; then
SIZE_MSG="($SIZE_MSG)"
DIFF_SIZE=
elif [ "$OPENJDK_TARGET_OS" = "windows" ] \
&& [[ "$ACCEPTED_SMALL_SIZE_DIFF" = *"$BIN_FILE"* ]] \
&& [ "$DIFF_SIZE_NUM" = 512 ]; then
# On windows, size of binaries increase in 512 increments.
&& [[ "$ACCEPTED_SMALL_SIZE_DIFF" = *"$BIN_FILE"* ]] \
&& [ "$DIFF_SIZE_NUM" = 512 ]; then
# On windows, size of binaries increase in 512 increments.
SIZE_MSG="($SIZE_MSG)"
DIFF_SIZE=
elif [ "$OPENJDK_TARGET_OS" = "windows" ] \
&& [[ "$ACCEPTED_SMALL_SIZE_DIFF" = *"$BIN_FILE"* ]] \
&& [ "$DIFF_SIZE_NUM" = -512 ]; then
# On windows, size of binaries increase in 512 increments.
&& [[ "$ACCEPTED_SMALL_SIZE_DIFF" = *"$BIN_FILE"* ]] \
&& [ "$DIFF_SIZE_NUM" = -512 ]; then
# On windows, size of binaries increase in 512 increments.
SIZE_MSG="($SIZE_MSG)"
DIFF_SIZE=
else
@ -711,16 +717,16 @@ compare_bin_file() {
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
# The output from dumpbin on windows differs depending on if the debug symbol
# files are still around at the location the binary is pointing too. Need
# to filter out that extra information.
$DUMPBIN -exports $OTHER_FILE | $GREP -E '^ +[0-9A-F]+ +[0-9A-F]+ [0-9A-F]+' | sed 's/ = .*//g' | cut -c27- | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.other
$DUMPBIN -exports $THIS_FILE | $GREP -E '^ +[0-9A-F]+ +[0-9A-F]+ [0-9A-F]+' | sed 's/ = .*//g' | cut -c27- | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.this
# to filter out that extra information.
$DUMPBIN -exports $OTHER_FILE | $GREP -E '^ +[0-9A-F]+ +[0-9A-F]+ [0-9A-F]+' | sed 's/ = .*//g' | cut -c27- | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.other
$DUMPBIN -exports $THIS_FILE | $GREP -E '^ +[0-9A-F]+ +[0-9A-F]+ [0-9A-F]+' | sed 's/ = .*//g' | cut -c27- | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.this
elif [ "$OPENJDK_TARGET_OS" = "solaris" ]; then
# Some symbols get seemingly random 15 character prefixes. Filter them out.
$NM -a $ORIG_OTHER_FILE 2> /dev/null | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SED 's/^\([a-zA-Z] [\.\$]\)[a-zA-Z0-9_\$]\{15,15\}\./\1./g' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.other
$NM -a $ORIG_THIS_FILE 2> /dev/null | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SED 's/^\([a-zA-Z] [\.\$]\)[a-zA-Z0-9_\$]\{15,15\}\./\1./g' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.this
$NM -a $ORIG_THIS_FILE 2> /dev/null | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SED 's/^\([a-zA-Z] [\.\$]\)[a-zA-Z0-9_\$]\{15,15\}\./\1./g' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.this
else
$NM -a $ORIG_OTHER_FILE 2> /dev/null | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.other
$NM -a $ORIG_THIS_FILE 2> /dev/null | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.this
$NM -a $ORIG_OTHER_FILE 2> /dev/null | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.other
$NM -a $ORIG_THIS_FILE 2> /dev/null | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.this
fi
LC_ALL=C $DIFF $WORK_FILE_BASE.symbols.other $WORK_FILE_BASE.symbols.this > $WORK_FILE_BASE.symbols.diff
@ -748,40 +754,40 @@ compare_bin_file() {
# Check dependencies
if [ -n "$LDD_CMD" ]; then
(cd $FILE_WORK_DIR && $CP $OTHER_FILE . && $LDD_CMD $NAME 2>/dev/null | $AWK '{ print $1;}' | $SORT | $TEE $WORK_FILE_BASE.deps.other | $UNIQ > $WORK_FILE_BASE.deps.other.uniq)
(cd $FILE_WORK_DIR && $CP $THIS_FILE . && $LDD_CMD $NAME 2</dev/null | $AWK '{ print $1;}' | $SORT | $TEE $WORK_FILE_BASE.deps.this | $UNIQ > $WORK_FILE_BASE.deps.this.uniq)
(cd $FILE_WORK_DIR && $RM -f $NAME)
(cd $FILE_WORK_DIR && $CP $OTHER_FILE . && $LDD_CMD $NAME 2>/dev/null | $AWK '{ print $1;}' | $SORT | $TEE $WORK_FILE_BASE.deps.other | $UNIQ > $WORK_FILE_BASE.deps.other.uniq)
(cd $FILE_WORK_DIR && $CP $THIS_FILE . && $LDD_CMD $NAME 2</dev/null | $AWK '{ print $1;}' | $SORT | $TEE $WORK_FILE_BASE.deps.this | $UNIQ > $WORK_FILE_BASE.deps.this.uniq)
(cd $FILE_WORK_DIR && $RM -f $NAME)
LC_ALL=C $DIFF $WORK_FILE_BASE.deps.other $WORK_FILE_BASE.deps.this > $WORK_FILE_BASE.deps.diff
LC_ALL=C $DIFF $WORK_FILE_BASE.deps.other.uniq $WORK_FILE_BASE.deps.this.uniq > $WORK_FILE_BASE.deps.diff.uniq
LC_ALL=C $DIFF $WORK_FILE_BASE.deps.other $WORK_FILE_BASE.deps.this > $WORK_FILE_BASE.deps.diff
LC_ALL=C $DIFF $WORK_FILE_BASE.deps.other.uniq $WORK_FILE_BASE.deps.this.uniq > $WORK_FILE_BASE.deps.diff.uniq
if [ -s $WORK_FILE_BASE.deps.diff ]; then
if [ -s $WORK_FILE_BASE.deps.diff ]; then
if [ -s $WORK_FILE_BASE.deps.diff.uniq ]; then
DEP_MSG=" diff "
DEP_MSG=" diff "
else
DEP_MSG=" redun "
DEP_MSG=" redun "
fi
if [[ "$ACCEPTED_DEP_DIFF" != *"$BIN_FILE"* ]]; then
DIFF_DEP=true
if [[ "$KNOWN_DEP_DIFF" != *"$BIN_FILE"* ]]; then
DIFF_DEP=true
if [[ "$KNOWN_DEP_DIFF" != *"$BIN_FILE"* ]]; then
DEP_MSG="*$DEP_MSG*"
REGRESSIONS=true
else
else
DEP_MSG=" $DEP_MSG "
fi
fi
else
DEP_MSG="($DEP_MSG)"
DIFF_DEP=
DEP_MSG="($DEP_MSG)"
DIFF_DEP=
fi
else
DEP_MSG=" "
DIFF_DEP=
else
DEP_MSG=" "
DIFF_DEP=
if [[ "$KNOWN_DEP_DIFF $ACCEPTED_DEP_DIFF" = *"$BIN_FILE"* ]]; then
DEP_MSG=" ! "
fi
fi
fi
else
DEP_MSG=" - "
DEP_MSG=" - "
fi
# Compare fulldump output
@ -816,11 +822,14 @@ compare_bin_file() {
# Compare disassemble output
if [ -n "$DIS_CMD" ] && [ -z "$SKIP_DIS_DIFF" ]; then
if [ -z "$DIS_DIFF_FILTER" ]; then
DIS_DIFF_FILTER="$CAT"
fi
$DIS_CMD $OTHER_FILE | $GREP -v $NAME | $DIS_DIFF_FILTER > $WORK_FILE_BASE.dis.other 2>&1
$DIS_CMD $THIS_FILE | $GREP -v $NAME | $DIS_DIFF_FILTER > $WORK_FILE_BASE.dis.this 2>&1
# By default we filter out differences that include references to symbols.
# To get a raw diff with the complete disassembly, set
# DIS_DIFF_FILTER="$CAT"
if [ -z "$DIS_DIFF_FILTER" ]; then
DIS_DIFF_FILTER="$GREP -v ' # .* <.*>$'"
fi
$DIS_CMD $OTHER_FILE | $GREP -v $NAME | eval "$DIS_DIFF_FILTER" > $WORK_FILE_BASE.dis.other 2>&1
$DIS_CMD $THIS_FILE | $GREP -v $NAME | eval "$DIS_DIFF_FILTER" > $WORK_FILE_BASE.dis.this 2>&1
LC_ALL=C $DIFF $WORK_FILE_BASE.dis.other $WORK_FILE_BASE.dis.this > $WORK_FILE_BASE.dis.diff
@ -901,7 +910,9 @@ compare_all_libs() {
OTHER_DIR=$2
WORK_DIR=$3
LIBS=$(cd $THIS_DIR && $FIND . -type f \( -name 'lib*.so' -o -name '*.dylib' -o -name '*.dll' -o -name 'JavaControlPanel' \) | $SORT | $FILTER)
LIBS=$(cd $THIS_DIR && $FIND . -type f \( -name 'lib*.so' -o -name '*.dylib' \
-o -name '*.dll' -o -name '*.obj' -o -name '*.o' \
-o -name '*.cpl' \) | $SORT | $FILTER)
if [ -n "$LIBS" ]; then
echo Libraries...
@ -961,7 +972,7 @@ COMPARE_ROOT=/tmp/cimages.$USER
$MKDIR -p $COMPARE_ROOT
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
if [ "$(uname -o)" = "Cygwin" ]; then
COMPARE_ROOT=$(cygpath -msa $COMPARE_ROOT)
COMPARE_ROOT=$(cygpath -msa $COMPARE_ROOT)
fi
fi
@ -1136,17 +1147,8 @@ fi
if [ "$SKIP_DEFAULT" != "true" ]; then
if [ -z "$OTHER" ]; then
OTHER="$THIS/../$LEGACY_BUILD_DIR"
if [ -d "$OTHER" ]; then
OTHER="$( cd "$OTHER" && pwd )"
else
echo "Default old build directory does not exist:"
echo "$OTHER"
exit 1
fi
echo "Comparing to default old build:"
echo "$OTHER"
echo
echo "Nothing to compare to, set with -o"
exit 1
else
if [ ! -d "$OTHER" ]; then
echo "Other build directory does not exist:"
@ -1160,90 +1162,47 @@ if [ "$SKIP_DEFAULT" != "true" ]; then
fi
# Figure out the layout of the this build. Which kinds of images have been produced
if [ -d "$THIS/install/j2sdk-image" ]; then
# Find the common images to compare, prioritizing later build stages
if [ -d "$THIS/install/j2sdk-image" ] && [ -d "$OTHER/install/j2sdk-image" ]; then
THIS_J2SDK="$THIS/install/j2sdk-image"
THIS_J2RE="$THIS/install/j2re-image"
echo "Selecting install images in this build"
elif [ -d "$THIS/deploy/j2sdk-image" ]; then
THIS_J2SDK="$THIS/deploy/j2sdk-image"
THIS_J2RE="$THIS/deploy/j2re-image"
echo "Selecting deploy images in this build"
elif [ -d "$THIS/images/j2sdk-image" ]; then
THIS_J2SDK="$THIS/images/j2sdk-image"
THIS_J2RE="$THIS/images/j2re-image"
echo "Selecting jdk images in this build"
fi
if [ -d "$THIS/images/j2sdk-overlay-image" ]; then
if [ -d "$THIS/install/j2sdk-image" ]; then
# If there is an install image, prefer that, it's also overlay
THIS_J2SDK_OVERLAY="$THIS/install/j2sdk-image"
THIS_J2RE_OVERLAY="$THIS/install/j2re-image"
echo "Selecting install overlay images in this build"
else
THIS_J2SDK_OVERLAY="$THIS/images/j2sdk-overlay-image"
THIS_J2RE_OVERLAY="$THIS/images/j2re-overlay-image"
echo "Selecting jdk overlay images in this build"
fi
fi
if [ -d "$THIS/images/j2sdk-bundle" ]; then
THIS_J2SDK_BUNDLE="$THIS/images/j2sdk-bundle"
THIS_J2RE_BUNDLE="$THIS/images/j2re-bundle"
echo "Selecting bundles in this build"
fi
# Figure out the layout of the other build (old or new, normal or overlay image)
if [ -d "$OTHER/j2sdk-image" ]; then
if [ -f "$OTHER/j2sdk-image/LICENSE" ]; then
OTHER_J2SDK="$OTHER/j2sdk-image"
OTHER_J2RE="$OTHER/j2re-image"
echo "Selecting old-style images in other build"
else
OTHER_J2SDK_OVERLAY="$OTHER/j2sdk-image"
OTHER_J2RE_OVERLAY="$OTHER/j2re-image"
echo "Selecting overlay images in other build"
fi
elif [ -d "$OTHER/install/j2sdk-image" ]; then
OTHER_J2SDK="$OTHER/install/j2sdk-image"
OTHER_J2RE="$OTHER/install/j2re-image"
echo "Selecting install images in other build"
elif [ -d "$OTHER/deploy/j2sdk-image" ]; then
echo "Selecting install images for compare"
elif [ -d "$THIS/deploy/j2sdk-image" ] && [ -d "$OTHER/deploy/j2sdk-image" ]; then
THIS_J2SDK="$THIS/deploy/j2sdk-image"
THIS_J2RE="$THIS/deploy/j2re-image"
OTHER_J2SDK="$OTHER/deploy/j2sdk-image"
OTHER_J2RE="$OTHER/deploy/j2re-image"
echo "Selecting deploy images in other build"
elif [ -d "$OTHER/images/j2sdk-image" ]; then
echo "Selecting deploy images for compare"
elif [ -d "$THIS/images/j2sdk-image" ] && [ -d "$OTHER/images/j2sdk-image" ]; then
THIS_J2SDK="$THIS/images/j2sdk-image"
THIS_J2RE="$THIS/images/j2re-image"
OTHER_J2SDK="$OTHER/images/j2sdk-image"
OTHER_J2RE="$OTHER/images/j2re-image"
echo "Selecting jdk images in other build"
fi
if [ -d "$OTHER/j2sdk-bundle" ]; then
OTHER_J2SDK_BUNDLE="$OTHER/j2sdk-bundle"
OTHER_J2RE_BUNDLE="$OTHER/j2re-bundle"
echo "Selecting bundles in other build"
elif [ -d "$OTHER/images/j2sdk-bundle" ]; then
OTHER_J2SDK_BUNDLE="$OTHER/images/j2sdk-bundle"
OTHER_J2RE_BUNDLE="$OTHER/images/j2re-bundle"
echo "Selecting jdk bundles in other build"
fi
if [ -z "$THIS_J2SDK" ] || [ -z "$THIS_J2RE" ]; then
if [ -z "$THIS_J2SDK_OVERLAY" ]; then
echo "Cannot locate images for this build. Are you sure you have run 'make images'?"
exit 1
fi
fi
if [ -z "$OTHER_J2SDK" ] && [ -n "$OTHER_J2SDK_OVERLAY" ] && [ -z "$THIS_J2SDK_OVERLAY" ]; then
echo "OTHER build only has an overlay image while this build does not. Nothing to compare!"
echo "Selecting jdk images for compare"
else
echo "No common images found."
exit 1
fi
if [ -z "$THIS_J2SDK_BUNDLE" ] && [ -n "$OTHER_J2SDK_BUNDLE" ]; then
echo "WARNING! OTHER build has bundles built while this build does not."
echo "Skipping bundle compare!"
if [ -d "$THIS/images/j2sdk-bundle" ] && [ -d "$OTHER/images/j2sdk-bundle" ]; then
THIS_J2SDK_BUNDLE="$THIS/images/j2sdk-bundle"
THIS_J2RE_BUNDLE="$THIS/images/j2re-bundle"
OTHER_J2SDK_BUNDLE="$OTHER/images/j2sdk-bundle"
OTHER_J2RE_BUNDLE="$OTHER/images/j2re-bundle"
echo "Also comparing macosx bundles"
fi
if [ -d "$THIS/deploy" ] && [ -d "$OTHER/deploy" ]; then
THIS_DEPLOY_BUNDLE_DIR="$THIS/deploy/dist/installer/bundles"
OTHER_DEPLOY_BUNDLE_DIR="$OTHER/deploy/bundles"
echo "Also comparing deploy/bundles"
if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
THIS_DEPLOY_APPLET_PLUGIN_DIR="$THIS/deploy/JavaAppletPlugin.plugin"
OTHER_DEPLOY_APPLET_PLUGIN_DIR="$OTHER/deploy/JavaAppletPlugin.plugin"
echo "Also comparing JavaAppletPlugin"
fi
fi
if [ -d "$OTHER/images" ]; then
@ -1266,22 +1225,13 @@ if [ "$SKIP_DEFAULT" != "true" ]; then
THIS_JGSS_WINDOWS_BIN="$THIS_SEC_DIR/$JGSS_WINDOWS_BIN"
fi
if [ -d "$THIS/docs" ]; then
if [ -d "$THIS/docs" ] && [ -d "$OTHER/docs" ]; then
THIS_DOCS="$THIS/docs"
fi
if [ -d "$OTHER/docs" ]; then
OTHER_DOCS="$OTHER/docs"
fi
if [ -z "$THIS_DOCS" ]; then
echo "Also comparing docs"
else
echo "WARNING! Docs haven't been built and won't be compared."
fi
if [ -z "$OTHER_DOCS" ]; then
echo "WARNING! Other build doesn't contain docs, skipping doc compare."
fi
fi
##########################################################################################
@ -1299,17 +1249,6 @@ if [ "$CMP_NAMES" = "true" ]; then
echo -n "J2RE "
compare_files $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
fi
if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then
echo -n "J2SDK Overlay "
compare_dirs $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay
echo -n "J2RE Overlay "
compare_dirs $THIS_J2RE_OVERLAY $OTHER_J2RE_OVERLAY $COMPARE_ROOT/j2re-overlay
echo -n "J2SDK Overlay "
compare_files $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay
echo -n "J2RE Overlay "
compare_files $THIS_J2RE_OVERLAY $OTHER_J2RE_OVERLAY $COMPARE_ROOT/j2re-overlay
fi
if [ -n "$THIS_J2SDK_BUNDLE" ] && [ -n "$OTHER_J2SDK_BUNDLE" ]; then
echo -n "J2SDK Bundle "
compare_dirs $THIS_J2SDK_BUNDLE $OTHER_J2SDK_BUNDLE $COMPARE_ROOT/j2sdk-bundle
@ -1331,6 +1270,12 @@ if [ "$CMP_NAMES" = "true" ]; then
compare_dirs $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
compare_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
fi
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then
echo -n "JavaAppletPlugin "
compare_dirs $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
echo -n "JavaAppletPlugin "
compare_files $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
fi
fi
if [ "$CMP_PERMS" = "true" ]; then
@ -1340,21 +1285,13 @@ if [ "$CMP_PERMS" = "true" ]; then
echo -n "J2RE "
compare_permissions $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
fi
if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then
echo -n "J2SDK Overlay "
compare_permissions $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay
echo -n "J2RE Overlay "
compare_permissions $THIS_J2RE_OVERLAY $OTHER_J2RE_OVERLAY $COMPARE_ROOT/j2re-overlay
fi
if [ -n "$THIS_J2SDK_BUNDLE" ] && [ -n "$OTHER_J2SDK_BUNDLE" ]; then
echo -n "J2SDK Bundle "
compare_permissions $THIS_J2SDK_BUNDLE $OTHER_J2SDK_BUNDLE $COMPARE_ROOT/j2sdk-bundle
echo -n "J2RE Bundle "
compare_permissions $THIS_J2RE_BUNDLE $OTHER_J2RE_BUNDLE $COMPARE_ROOT/j2re-bundle
fi
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
compare_permissions $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
fi
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then
echo -n "JavaAppletPlugin "
compare_permissions $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
fi
fi
if [ "$CMP_TYPES" = "true" ]; then
@ -1364,12 +1301,6 @@ if [ "$CMP_TYPES" = "true" ]; then
echo -n "J2RE "
compare_file_types $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
fi
if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then
echo -n "J2SDK Overlay "
compare_file_types $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay
echo -n "J2RE Overlay "
compare_file_types $THIS_J2RE_OVERLAY $OTHER_J2RE_OVERLAY $COMPARE_ROOT/j2re-overlay
fi
if [ -n "$THIS_J2SDK_BUNDLE" ] && [ -n "$OTHER_J2SDK_BUNDLE" ]; then
echo -n "J2SDK Bundle "
compare_file_types $THIS_J2SDK_BUNDLE $OTHER_J2SDK_BUNDLE $COMPARE_ROOT/j2sdk-bundle
@ -1379,6 +1310,10 @@ if [ "$CMP_TYPES" = "true" ]; then
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
compare_file_types $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
fi
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then
echo -n "JavaAppletPlugin "
compare_file_types $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
fi
fi
if [ "$CMP_GENERAL" = "true" ]; then
@ -1388,12 +1323,6 @@ if [ "$CMP_GENERAL" = "true" ]; then
echo -n "J2RE "
compare_general_files $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
fi
if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then
echo -n "J2SDK Overlay "
compare_general_files $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay
echo -n "J2RE Overlay "
compare_general_files $THIS_J2RE_OVERLAY $OTHER_J2RE_OVERLAY $COMPARE_ROOT/j2re-overlay
fi
if [ -n "$THIS_J2SDK_BUNDLE" ] && [ -n "$OTHER_J2SDK_BUNDLE" ]; then
echo -n "J2SDK Bundle "
compare_general_files $THIS_J2SDK_BUNDLE $OTHER_J2SDK_BUNDLE $COMPARE_ROOT/j2sdk-bundle
@ -1407,6 +1336,10 @@ if [ "$CMP_GENERAL" = "true" ]; then
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
compare_general_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
fi
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then
echo -n "JavaAppletPlugin "
compare_general_files $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
fi
fi
if [ "$CMP_ZIPS" = "true" ]; then
@ -1434,6 +1367,12 @@ if [ "$CMP_ZIPS" = "true" ]; then
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
compare_all_zip_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
fi
if [ -n "$THIS_DEPLOY_BUNDLE_DIR" ] && [ -n "$OTHER_DEPLOY_BUNDLE_DIR" ]; then
compare_all_zip_files $THIS_DEPLOY_BUNDLE_DIR $OTHER_DEPLOY_BUNDLE_DIR $COMPARE_ROOT/deploy-bundle
fi
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then
compare_all_zip_files $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
fi
fi
if [ "$CMP_JARS" = "true" ]; then
@ -1443,6 +1382,9 @@ if [ "$CMP_JARS" = "true" ]; then
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
compare_all_jar_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
fi
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then
compare_all_jar_files $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
fi
fi
if [ "$CMP_LIBS" = "true" ]; then
@ -1454,26 +1396,30 @@ if [ "$CMP_LIBS" = "true" ]; then
compare_all_libs $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
fi
fi
if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then
echo -n "Bundle "
compare_all_libs $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay
fi
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
compare_all_libs $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
fi
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then
echo -n "JavaAppletPlugin "
compare_all_libs $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
fi
fi
if [ "$CMP_EXECS" = "true" ]; then
if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then
compare_all_execs $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
fi
if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then
echo -n "Overlay "
compare_all_execs $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay
if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
echo -n "J2RE "
compare_all_execs $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
fi
fi
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
compare_all_execs $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
fi
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then
echo -n "JavaAppletPlugin "
compare_all_execs $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
fi
fi
echo

View File

@ -85,6 +85,7 @@ ACCEPTED_BIN_DIFF="
./bin/jdb
./bin/jhat
./bin/jinfo
./bin/jjs
./bin/jmap
./bin/jps
./bin/jrunscript
@ -108,6 +109,7 @@ ACCEPTED_BIN_DIFF="
./bin/wsimport
./bin/xjc
./jre/bin/java
./jre/bin/jjs
./jre/bin/keytool
./jre/bin/orbd
./jre/bin/pack200
@ -172,6 +174,7 @@ ACCEPTED_BIN_DIFF="
./bin/jdb
./bin/jhat
./bin/jinfo
./bin/jjs
./bin/jmap
./bin/jps
./bin/jrunscript
@ -195,6 +198,7 @@ ACCEPTED_BIN_DIFF="
./bin/wsimport
./bin/xjc
./jre/bin/java
./jre/bin/jjs
./jre/bin/keytool
./jre/bin/orbd
./jre/bin/pack200
@ -910,11 +914,6 @@ ACCEPTED_JARZIP_CONTENTS="
/META-INF/INDEX.LIST
"
KNOWN_BIN_DIFF="
./jre/lib/libJObjC.dylib
./lib/libJObjC.dylib
"
ACCEPTED_BIN_DIFF="
./bin/appletviewer
./bin/idlj
@ -964,34 +963,82 @@ ACCEPTED_BIN_DIFF="
./jre/bin/tnameserv
./jre/lib/libsaproc.dylib
./jre/lib/server/libjvm.dylib
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.dylib
./demo/jvmti/gctest/lib/libgctest.dylib
./demo/jvmti/heapTracker/lib/libheapTracker.dylib
./demo/jvmti/heapViewer/lib/libheapViewer.dylib
./demo/jvmti/minst/lib/libminst.dylib
./demo/jvmti/mtrace/lib/libmtrace.dylib
./demo/jvmti/versionCheck/lib/libversionCheck.dylib
./demo/jvmti/waiters/lib/libwaiters.dylib
./Contents/Home/lib/libAppleScriptEngine.dylib
./Contents/Home/lib/libattach.dylib
./Contents/Home/lib/libawt_lwawt.dylib
./Contents/Home/lib/libdeploy.dylib
./Contents/Home/lib/libdt_socket.dylib
./Contents/Home/lib/libhprof.dylib
./Contents/Home/lib/libinstrument.dylib
./Contents/Home/lib/libjava_crw_demo.dylib
./Contents/Home/lib/libjdwp.dylib
./Contents/Home/lib/libjsdt.dylib
./Contents/Home/lib/libjsig.dylib
./Contents/Home/lib/libmanagement.dylib
./Contents/Home/lib/libnpjp2.dylib
./Contents/Home/lib/libosx.dylib
./Contents/Home/lib/libosxapp.dylib
./Contents/Home/lib/libsaproc.dylib
./Contents/Home/lib/libsplashscreen.dylib
./Contents/Home/lib/libverify.dylib
./Contents/Home/lib/server/libjsig.dylib
./Contents/Home/lib/server/libjvm.dylib
./jre/lib/libAppleScriptEngine.dylib
./jre/lib/libattach.dylib
./jre/lib/libawt_lwawt.dylib
./jre/lib/libdeploy.dylib
./jre/lib/libdt_socket.dylib
./jre/lib/libhprof.dylib
./jre/lib/libinstrument.dylib
./jre/lib/libjava_crw_demo.dylib
./jre/lib/libjdwp.dylib
./jre/lib/libjsdt.dylib
./jre/lib/libjsig.dylib
./jre/lib/libmanagement.dylib
./jre/lib/libosx.dylib
./jre/lib/libosxapp.dylib
./jre/lib/libsaproc.dylib
./jre/lib/libsplashscreen.dylib
./jre/lib/libverify.dylib
./jre/lib/server/libjvm.dylib
./lib/libAppleScriptEngine.dylib
./lib/libattach.dylib
./lib/libawt_lwawt.dylib
./lib/libdeploy.dylib
./lib/libdt_socket.dylib
./lib/libhprof.dylib
./lib/libinstrument.dylib
./lib/libjava_crw_demo.dylib
./lib/libjdwp.dylib
./lib/libjsdt.dylib
./lib/libjsig.dylib
./lib/libmanagement.dylib
./lib/libnpjp2.dylib
./lib/libosx.dylib
./lib/libosxapp.dylib
./lib/libverify.dylib
./lib/libsaproc.dylib
./lib/libsplashscreen.dylib
./lib/server/libjvm.dylib
./lib/deploy/JavaControlPanel.prefPane/Contents/MacOS/JavaControlPanel
"
KNOWN_SIZE_DIFF="
./jre/lib/libJObjC.dylib
./lib/libJObjC.dylib
"
SORT_SYMBOLS="
./jre/lib/libJObjC.dylib
./lib/libJObjC.dylib
./Contents/Home/lib/libsaproc.dylib
./jre/lib/libsaproc.dylib
./lib/libsaproc.dylib
"
KNOWN_SYM_DIFF="
./jre/lib/libJObjC.dylib
./lib/libJObjC.dylib
ACCEPTED_SMALL_SIZE_DIFF="
./bin/javaws
./Contents/Home/bin/_javaws
"
KNOWN_ELF_DIFF="
./jre/lib/libJObjC.dylib
./lib/libJObjC.dylib
"
KNOWN_DIS_DIFF="
./jre/lib/libJObjC.dylib
./lib/libJObjC.dylib
"
fi

View File

@ -181,4 +181,3 @@ checkErrors
checkErrors
exit 0

View File

@ -200,4 +200,3 @@ do
printf "%s\n" "$line" >> $output
fi
done < "$input"

View File

@ -228,25 +228,26 @@ define ParseConfAndSpec
# If we only have global targets, no need to bother with SPEC or CONF
ifneq ($$(origin SPEC),undefined)
# We have been given a SPEC, check that it works out properly
ifeq ($$(wildcard $$(SPEC)),)
$$(info Cannot locate spec.gmk, given by SPEC=$$(SPEC))
$$(eval $$(call FatalError))
endif
ifneq ($$(origin CONF),undefined)
# We also have a CONF argument. This is OK only if this is a repeated call by ourselves,
# but complain if this is the top-level make call.
ifeq ($$(MAKELEVEL),0)
$$(info Cannot use CONF=$$(CONF) and SPEC=$$(SPEC) at the same time. Choose one.)
$$(info Error: Cannot use CONF=$$(CONF) and SPEC=$$(SPEC) at the same time. Choose one.)
$$(eval $$(call FatalError))
endif
endif
ifeq ($$(wildcard $$(SPEC)),)
$$(info Error: Cannot locate spec.gmk, given by SPEC=$$(SPEC).)
$$(eval $$(call FatalError))
endif
# ... OK, we're satisfied, we'll use this SPEC later on
else
# Find all spec.gmk files in the build output directory
output_dir=$$(root_dir)/build
all_spec_files=$$(wildcard $$(output_dir)/*/spec.gmk)
ifeq ($$(all_spec_files),)
$$(info No configurations found for $$(root_dir)! Please run configure to create a configuration.)
$$(info Error: No configurations found for $$(root_dir).)
$$(info Please run 'bash configure' to create a configuration.)
$$(eval $$(call FatalError))
endif
# Extract the configuration names from the path
@ -262,15 +263,15 @@ define ParseConfAndSpec
matching_confs=$$(strip $$(foreach var,$$(all_confs),$$(if $$(findstring $$(CONF),$$(var)),$$(var))))
endif
ifeq ($$(matching_confs),)
$$(info No configurations found matching CONF=$$(CONF))
$$(info Available configurations:)
$$(info Error: No configurations found matching CONF=$$(CONF).)
$$(info Available configurations in $$(output_dir):)
$$(foreach var,$$(all_confs),$$(info * $$(var)))
$$(eval $$(call FatalError))
else
ifeq ($$(words $$(matching_confs)),1)
$$(info Building '$$(matching_confs)' (matching CONF=$$(CONF)))
else
$$(info Building target '$(call GetRealTarget)' in the following configurations (matching CONF=$$(CONF)):)
$$(info Building target '$(call GetRealTarget)' in these configurations (matching CONF=$$(CONF)):)
$$(foreach var,$$(matching_confs),$$(info * $$(var)))
endif
endif
@ -280,10 +281,10 @@ define ParseConfAndSpec
else
# No CONF or SPEC given, check the available configurations
ifneq ($$(words $$(all_spec_files)),1)
$$(info No CONF given, but more than one configuration found in $$(output_dir).)
$$(info Available configurations:)
$$(info Error: No CONF given, but more than one configuration found.)
$$(info Available configurations in $$(output_dir):)
$$(foreach var,$$(all_confs),$$(info * $$(var)))
$$(info Please retry building with CONF=<config pattern> (or SPEC=<specfile>))
$$(info Please retry building with CONF=<config pattern> (or SPEC=<specfile>).)
$$(eval $$(call FatalError))
endif

View File

@ -405,7 +405,7 @@ ifeq ($(OPENJDK_TARGET_OS),solaris)
# 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
$(MKDIR) -p $(@D)
$(MKDIR) -p '$(@D)'
$(RM) '$@'
if [ "$(@D)" != "$(<D)" ]; then \
$(CP) -f -r -P '$<' '$(@D)'; \
@ -427,7 +427,7 @@ else ifeq ($(OPENJDK_TARGET_OS),macosx)
# output dir. When these are copied again to images, xattr would fail. By only clearing
# attributes when they are present, failing on this is avoided.
define install-file
$(MKDIR) -p $(@D)
$(MKDIR) -p '$(@D)'
$(CP) -fRP '$<' '$@'
if [ -n "`$(XATTR) -l '$@'`" ]; then $(XATTR) -c '$@'; fi
endef
@ -435,7 +435,7 @@ else
# Running mkdir and cp in the same shell speeds up copy intensive tasks in Cygwin
# significantly.
define install-file
$(MKDIR) -p $(@D) && $(CP) -fP '$<' '$@'
$(MKDIR) -p '$(@D)' && $(CP) -fP '$<' '$@'
endef
endif

View File

@ -87,11 +87,9 @@ define SetupRMICompilationInner
$$($1_DEP_FILE): $$($1_CLASS_FILES)
$(MKDIR) -p $$($1_STUB_CLASSES_DIR)
if [ "x$$($1_ARGS)" != "x" ]; then \
$(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS) for $$($1_DOLLAR_SAFE_CLASSES) && \
$(RMIC) $$($1_ARGS) -classpath "$$($1_CLASSES_DIR)" \
-d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES); \
fi;
$(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS) for $$($1_DOLLAR_SAFE_CLASSES) && \
$(RMIC) $$($1_ARGS) -classpath "$$($1_CLASSES_DIR)" \
-d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES); \
if [ "x$$($1_ARGS2)" != "x" ]; then \
$(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS2) for $$($1_DOLLAR_SAFE_CLASSES) && \
$(RMIC) $$($1_ARGS2) -classpath "$$($1_CLASSES_DIR)" \

View File

@ -73,9 +73,9 @@ endef
# REPLACEMENTS one or more text replacement patterns, using the syntax:
# PATTERN => REPLACEMENT_TEXT ; ...
#
# At least one of INCLUDES or REPLACEMENTS must be present. If both are
# present, then the includes will be processed first, and replacements will be
# done on the included fragments as well.
# If both INCLUDES or REPLACEMENTS are present, then the includes will be
# processed first, and replacements will be done on the included fragments as well.
# If neither is present, the files will just be copied without modifications.
#
define SetupTextFileProcessing
$(if $(16),$(error Internal makefile error: Too many arguments to SetupTextFileProcessing, please update TextFileProcessing.gmk))
@ -87,10 +87,6 @@ define SetupTextFileProcessingInner
$(call LogSetupMacroEntry,SetupTextFileProcessing($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
$(if $(16),$(error Internal makefile error: Too many arguments to SetupTextFileProcessing, please update TextFileProcessing.gmk))
ifeq ($$($1_REPLACEMENTS)$$($1_INCLUDES),)
$$(error At least one of REPLACEMENTS or INCLUDES are required for $1)
endif
ifneq ($$($1_SOURCE_FILES),)
ifneq ($$($1_SOURCE_DIRS),)
$$(error Cannot use both SOURCE_FILES and SOURCE_DIRS (in $1))
@ -102,6 +98,9 @@ define SetupTextFileProcessingInner
$$(error Cannot INCLUDE/EXCLUDE_FILES with SOURCE_FILES (in $1))
endif
else
ifeq ($$($1_SOURCE_DIRS),)
$$(error Must specify either SOURCE_FILES or SOURCE_DIRS (in $1))
endif
# Find all files in the source trees. Sort to remove duplicates.
$$(foreach src, $$($1_SOURCE_DIRS), $$(if $$(wildcard $$(src)), , \
$$(error SOURCE_DIRS contains missing directory $$(src) (in $1))))
@ -163,9 +162,9 @@ define SetupTextFileProcessingInner
# Convert the REPLACEMENTS syntax ( A => B ; C => D ; ...) to a sed command
# line (-e "s/A/B/" -e "s/C/D/" ...), basically by replacing '=>' with '/'
# and ';' with '/" -e "s/', and adjusting for edge cases.
$1_REPLACEMENTS_COMMAND_LINE := $(SED) -e "s$$($1_SEP)$$(subst $$(SPACE);$$(SPACE),$$($1_SEP)" \
-e "s$$($1_SEP),$$(subst $$(SPACE)=>$$(SPACE),$$($1_SEP),$$(subst $$(SPACE)=>$$(SPACE);$$(SPACE),//" \
-e "s$$($1_SEP),$$(strip $$($1_REPLACEMENTS)))))$$($1_SEP)"
$1_REPLACEMENTS_COMMAND_LINE := $(SED) -e 's$$($1_SEP)$$(subst $$(SPACE);$$(SPACE),$$($1_SEP)' \
-e 's$$($1_SEP),$$(subst $$(SPACE)=>$$(SPACE),$$($1_SEP),$$(subst $$(SPACE)=>$$(SPACE);$$(SPACE),$$($1_SEP)$$($1_SEP)' \
-e 's$$($1_SEP),$$(strip $$($1_REPLACEMENTS)))))$$($1_SEP)'
else
# We don't have any replacements, just pipe the file through cat.
$1_REPLACEMENTS_COMMAND_LINE := $(CAT)
@ -204,7 +203,7 @@ define SetupTextFileProcessingInner
# Note that $1 is space sensitive and must disobey whitespace rules
$$(eval $$(call SetupSingleTextFileForProcessing,$1, $$($1_SOURCE_FILES), \
$$(dir $$($1_OUTPUT_FILE)), $$(notdir $$($1_OUTPUT_FILE))))
$$(patsubst %/, %, $$(dir $$($1_OUTPUT_FILE))), $$(notdir $$($1_OUTPUT_FILE))))
else
ifeq ($$($1_OUTPUT_DIR),)
$$(error Neither OUTPUT_FILE nor OUTPUT_DIR was specified (in $1))
@ -217,14 +216,15 @@ define SetupTextFileProcessingInner
# rules.
$$(foreach src, $$($1_SOURCE_FILES), \
$$(eval $$(call SetupSingleTextFileForProcessing,$1, $$(src), \
$$($1_OUTPUT_DIR), $$(notdir $$(src)))))
$$(patsubst %/, %, $$($1_OUTPUT_DIR)), $$(notdir $$(src)))))
else
# With a base dir, extract the relative portion of the path. Note that $1
# is space sensitive and must disobey whitespace rules, and so is the
# arguments to patsubst.
$$(foreach src, $$($1_SOURCE_FILES), \
$$(eval $$(call SetupSingleTextFileForProcessing,$1, $$(src), \
$$($1_OUTPUT_DIR), $$(patsubst $$($1_SOURCE_BASE_DIR)/%,%,$$(src)))))
$$(patsubst %/, %, $$($1_OUTPUT_DIR)), \
$$(patsubst $$($1_SOURCE_BASE_DIR)/%,%,$$(src)))))
endif
endif
endef

View File

@ -204,5 +204,3 @@ sub usage {
print "Examples:\n";
print " normalizer.pl -e c,cpp,h,hpp .\n";
}

View File

@ -196,4 +196,3 @@ fi
# Cleanup
rm -f -r ${tmp}
exit 0