OpenJDK / jdk / jdk
changeset 13996:e9f4fefc32e1
Merge
author | lana |
---|---|
date | Fri, 28 Sep 2012 10:54:12 -0700 |
parents | 903cc17d889c 479d3302a26d |
children | 8889b37053e6 |
files | hotspot/agent/src/share/classes/sun/jvm/hotspot/ci/ciArrayKlassKlass.java hotspot/agent/src/share/classes/sun/jvm/hotspot/ci/ciInstanceKlassKlass.java hotspot/agent/src/share/classes/sun/jvm/hotspot/ci/ciKlassKlass.java hotspot/agent/src/share/classes/sun/jvm/hotspot/ci/ciMethodKlass.java hotspot/agent/src/share/classes/sun/jvm/hotspot/ci/ciObjArrayKlassKlass.java hotspot/agent/src/share/classes/sun/jvm/hotspot/ci/ciTypeArrayKlassKlass.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/parallelScavenge/PSPermGen.java hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/CMSPermGen.java hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/CMSPermGenGen.java hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/CompactingPermGen.java hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/CompactingPermGenGen.java hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/ContigPermSpace.java hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/PermGen.java hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ArrayKlassKlass.java hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/CompiledICHolderKlass.java hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ConstMethodKlass.java hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ConstantPoolCacheKlass.java hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ConstantPoolKlass.java hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/InstanceKlassKlass.java hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/KlassKlass.java hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/MethodDataKlass.java hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/MethodKlass.java hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ObjArrayKlassKlass.java hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/TypeArrayKlassKlass.java hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/tree/BadOopTreeNodeAdapter.java hotspot/make/solaris/makefiles/reorder_COMPILER1_amd64 hotspot/make/solaris/makefiles/reorder_COMPILER1_i486 hotspot/make/solaris/makefiles/reorder_COMPILER1_sparc hotspot/make/solaris/makefiles/reorder_COMPILER1_sparcv9 hotspot/make/solaris/makefiles/reorder_COMPILER2_amd64 hotspot/make/solaris/makefiles/reorder_COMPILER2_i486 hotspot/make/solaris/makefiles/reorder_COMPILER2_sparc hotspot/make/solaris/makefiles/reorder_COMPILER2_sparcv9 hotspot/make/solaris/makefiles/reorder_CORE_i486 hotspot/make/solaris/makefiles/reorder_CORE_sparc hotspot/make/solaris/makefiles/reorder_CORE_sparcv9 hotspot/make/solaris/makefiles/reorder_TIERED_amd64 hotspot/make/solaris/makefiles/reorder_TIERED_i486 hotspot/make/solaris/makefiles/reorder_TIERED_sparc hotspot/make/solaris/makefiles/reorder_TIERED_sparcv9 hotspot/make/solaris/reorder.sh hotspot/src/cpu/sparc/vm/dump_sparc.cpp hotspot/src/cpu/x86/vm/dump_x86_32.cpp hotspot/src/cpu/x86/vm/dump_x86_64.cpp hotspot/src/cpu/zero/vm/dump_zero.cpp hotspot/src/share/vm/ci/ciArrayKlassKlass.hpp hotspot/src/share/vm/ci/ciCPCache.cpp hotspot/src/share/vm/ci/ciCPCache.hpp hotspot/src/share/vm/ci/ciInstanceKlassKlass.cpp hotspot/src/share/vm/ci/ciInstanceKlassKlass.hpp hotspot/src/share/vm/ci/ciKlassKlass.cpp hotspot/src/share/vm/ci/ciKlassKlass.hpp hotspot/src/share/vm/ci/ciMethodKlass.cpp hotspot/src/share/vm/ci/ciMethodKlass.hpp hotspot/src/share/vm/ci/ciObjArrayKlassKlass.cpp hotspot/src/share/vm/ci/ciObjArrayKlassKlass.hpp hotspot/src/share/vm/ci/ciTypeArrayKlassKlass.cpp hotspot/src/share/vm/ci/ciTypeArrayKlassKlass.hpp hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsPermGen.cpp hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsPermGen.hpp hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.hpp hotspot/src/share/vm/memory/classify.cpp hotspot/src/share/vm/memory/classify.hpp hotspot/src/share/vm/memory/compactPermGen.hpp hotspot/src/share/vm/memory/compactingPermGenGen.cpp hotspot/src/share/vm/memory/compactingPermGenGen.hpp hotspot/src/share/vm/memory/dump.cpp hotspot/src/share/vm/memory/permGen.cpp hotspot/src/share/vm/memory/permGen.hpp hotspot/src/share/vm/memory/restore.cpp hotspot/src/share/vm/memory/serialize.cpp hotspot/src/share/vm/oops/arrayKlassKlass.cpp hotspot/src/share/vm/oops/arrayKlassKlass.hpp hotspot/src/share/vm/oops/compiledICHolderKlass.cpp hotspot/src/share/vm/oops/compiledICHolderKlass.hpp hotspot/src/share/vm/oops/compiledICHolderOop.cpp hotspot/src/share/vm/oops/compiledICHolderOop.hpp hotspot/src/share/vm/oops/constMethodKlass.cpp hotspot/src/share/vm/oops/constMethodKlass.hpp hotspot/src/share/vm/oops/constMethodOop.cpp hotspot/src/share/vm/oops/constMethodOop.hpp hotspot/src/share/vm/oops/constantPoolKlass.cpp hotspot/src/share/vm/oops/constantPoolKlass.hpp hotspot/src/share/vm/oops/constantPoolOop.cpp hotspot/src/share/vm/oops/constantPoolOop.hpp hotspot/src/share/vm/oops/cpCacheKlass.cpp hotspot/src/share/vm/oops/cpCacheKlass.hpp hotspot/src/share/vm/oops/cpCacheOop.cpp hotspot/src/share/vm/oops/cpCacheOop.hpp hotspot/src/share/vm/oops/instanceKlassKlass.cpp hotspot/src/share/vm/oops/instanceKlassKlass.hpp hotspot/src/share/vm/oops/klassKlass.cpp hotspot/src/share/vm/oops/klassKlass.hpp hotspot/src/share/vm/oops/klassOop.cpp hotspot/src/share/vm/oops/klassOop.hpp hotspot/src/share/vm/oops/methodDataKlass.cpp hotspot/src/share/vm/oops/methodDataKlass.hpp hotspot/src/share/vm/oops/methodDataOop.cpp hotspot/src/share/vm/oops/methodDataOop.hpp hotspot/src/share/vm/oops/methodKlass.cpp hotspot/src/share/vm/oops/methodKlass.hpp hotspot/src/share/vm/oops/methodOop.cpp hotspot/src/share/vm/oops/methodOop.hpp hotspot/src/share/vm/oops/objArrayKlassKlass.cpp hotspot/src/share/vm/oops/objArrayKlassKlass.hpp hotspot/src/share/vm/oops/typeArrayKlassKlass.cpp hotspot/src/share/vm/oops/typeArrayKlassKlass.hpp jdk/make/common/Defs-embedded.gmk jdk/make/common/Release-embedded.gmk jdk/src/share/classes/sun/management/LockDataConverter.java jdk/src/share/classes/sun/management/LockDataConverterMXBean.java jdk/src/share/classes/sun/security/x509/CertificateIssuerUniqueIdentity.java jdk/src/share/classes/sun/security/x509/CertificateSubjectUniqueIdentity.java jdk/test/sun/misc/URLClassPath/ClassnameCharTest.sh jdk/test/sun/net/www/httptest/HttpServer.java jdk/test/sun/security/ssl/sun/net/www/httpstest/HttpServer.java |
diffstat | 1176 files changed, 55697 insertions(+), 103515 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgignore Fri Sep 28 14:54:04 2012 +0400 +++ b/.hgignore Fri Sep 28 10:54:12 2012 -0700 @@ -1,6 +1,7 @@ ^build/ ^dist/ -/nbproject/private/ +nbproject/private/ ^webrev ^.hgtip +^.bridge2 .DS_Store
--- a/.hgtags Fri Sep 28 14:54:04 2012 +0400 +++ b/.hgtags Fri Sep 28 10:54:12 2012 -0700 @@ -177,3 +177,5 @@ c7aa5cca1c01689a7b1a92411daf83684af05a33 jdk8-b53 7c6aa31ff1b2ae48c1c686ebe1aadf0c3da5be15 jdk8-b54 319f583f66db47395fa86127dd3ddb729eb7c64f jdk8-b55 +ffe6bce5a521be40146af2ac03c509b7bac30595 jdk8-b56 +2c21c080b11b93efb3851e39e1363e45da805943 jdk8-b57
--- a/.hgtags-top-repo Fri Sep 28 14:54:04 2012 +0400 +++ b/.hgtags-top-repo Fri Sep 28 10:54:12 2012 -0700 @@ -177,3 +177,5 @@ febd7ff5280067ca482faaeb9418ae88764c1a35 jdk8-b53 c1a277c6022affbc6855bdfb039511e73fbe2395 jdk8-b54 b85b44cced2406792cfb9baab1377ff03e7001d8 jdk8-b55 +76844579fa4b30929731115b237e477181a82394 jdk8-b56 +522dfac8ca4d07c0b74025d4ac3b6e5feefbb829 jdk8-b57
--- a/Makefile Fri Sep 28 14:54:04 2012 +0400 +++ b/Makefile Fri Sep 28 10:54:12 2012 -0700 @@ -1,5 +1,5 @@ # -# Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,16 @@ # questions. # +# If NEWBUILD is defined, use the new build-infra Makefiles and configure. +# See NewMakefile.gmk for more information. + +ifeq ($(NEWBUILD),true) + + # The new top level Makefile + include NewMakefile.gmk + +else # Original Makefile logic + BUILD_PARENT_DIRECTORY=. # Basename of any originally supplied ALT_OUTPUTDIR directory @@ -557,3 +567,5 @@ # Force target FRC: +endif # Original Makefile logic +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NewMakefile.gmk Fri Sep 28 10:54:12 2012 -0700 @@ -0,0 +1,211 @@ +# +# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. +# 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. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the LICENSE file that accompanied this code. +# +# 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. +# + +# Utilities used in this Makefile +BASENAME=basename +CAT=cat +CD=cd +CMP=cmp +CP=cp +ECHO=echo +MKDIR=mkdir +PWD=pwd +SH=sh +ifeq ($(PLATFORM),windows) + ZIP=zip +else + # store symbolic links as the link + ZIP=zip -y +endif +# Insure we have a path that looks like it came from pwd +# (This is mostly for Windows sake and drive letters) +define UnixPath # path +$(shell (cd "$1" && $(PWD))) +endef + +# Current root directory +CURRENT_DIRECTORY := $(shell $(PWD)) + +# Build directory root +BUILD_DIR_ROOT = $(CURRENT_DIRECTORY)/build + +# All configured Makefiles to run +ALL_MAKEFILES = $(wildcard $(BUILD_DIR_ROOT)/*-*/Makefile) + +# All bundles to create +ALL_IMAGE_DIRS = $(wildcard $(BUILD_DIR_ROOT)/*-*/images/*-image) + +# Build all the standard 'all', 'images', and 'clean' targets +all images clean: checks + @if [ "$(ALL_MAKEFILES)" = "" ] ; then \ + $(ECHO) "ERROR: No configurations to build"; exit 1; \ + fi + @for bdir in $(dir $(ALL_MAKEFILES)) ; do \ + $(ECHO) "$(CD) $${bdir} && $(MAKE) $(EXTRA_MAKE_ARGS) $@" ; \ + $(CD) $${bdir} && $(MAKE) $(EXTRA_MAKE_ARGS) $@ ; \ + done + +# Bundle creation +bundles: + @if [ "$(ALL_IMAGE_DIRS)" = "" ] ; then \ + $(ECHO) "ERROR: No images to bundle"; exit 1; \ + fi + @for i in $(ALL_IMAGE_DIRS) ; do \ + $(MKDIR) -p $${i}/../../bundles && \ + $(RM) $${i}/../../bundles/`$(BASENAME) $${i}`.zip && \ + $(ECHO) "$(CD) $${i} && $(ZIP) -q -r ../../bundles/`$(BASENAME) $${i}`.zip ." && \ + $(CD) $${i} && $(ZIP) -q -r ../../bundles/`$(BASENAME) $${i}`.zip . ; \ + done + +# Clobber all the built files +clobber:: + $(RM) -r $(BUILD_DIR_ROOT) + +# Make various checks to insure the build will be successful +# Possibilities: +# * Check that if any closed repo is provided, they all must be. +# * Check that all open repos exist, at least until we are ready for some +# kind of partial build. +checks: + @$(ECHO) "No checks yet" + +# Keep track of phony targets +PHONY_LIST += all images clean clobber checks + +########################################################################### +# To help in adoption of the new configure&&make build process, a bridge +# build will use the old settings to run configure and do the build. + +# Build with the configure bridge +bridgeBuild: bridge2configure images + +# Bridge from old Makefile ALT settings to configure options +bridge2configure: .bridge2configureOpts + $(CD) common/makefiles && sh ../autoconf/configure $(strip $(shell $(CAT) $<)) + +# Create a file with configure options created from old Makefile mechanisms. +.bridge2configureOpts: .bridge2configureOptsLatest + $(RM) $@ + $(CP) $< $@ + +# In case make was invoked from a specific path +_MAKE_COMMAND_PATH:=$(firstword $(MAKE)) +ifneq ($(dir $(_MAKE_COMMAND_PATH)),./) + # This could be removed someday if JPRT was fixed and we could assume that + # the path to make was always in PATH. + MAKE_BINDIR:=$(call UnixPath,$(dir $(_MAKE_COMMAND_PATH))) + NEWPATH:=$(MAKE_BINDIR):${PATH} + PATH:=$(NEWPATH) + export PATH + MAKE_COMMAND=$(MAKE_BINDIR)/$(notdir $(_MAKE_COMMAND_PATH)) +else + MAKE_COMMAND=$(_MAKE_COMMAND_PATH) +endif + +# Use this file to only change when obvious things have changed +.bridge2configureOptsLatest: FRC + $(RM) $@.tmp + @$(ECHO) " MAKE=$(MAKE_COMMAND) " >> $@.tmp + @$(ECHO) " --with-debug-level=$(if $(DEBUG_LEVEL),$(DEBUG_LEVEL),release) " >> $@.tmp +ifdef ARCH_DATA_MODEL + @$(ECHO) " --with-target-bits=$(ARCH_DATA_MODEL) " >> $@.tmp +endif +ifdef ALT_PARALLEL_COMPILE_JOBS + @$(ECHO) " --with-num-cores=$(ALT_PARALLEL_COMPILE_JOBS) " >> $@.tmp +endif +ifdef ALT_BOOTDIR + @$(ECHO) " --with-boot-jdk=$(call UnixPath,$(ALT_BOOTDIR)) " >> $@.tmp +endif +ifdef ALT_CUPS_HEADERS_PATH + @$(ECHO) " --with-cups-include=$(call UnixPath,$(ALT_CUPS_HEADERS_PATH)) " >> $@.tmp +endif +ifdef ALT_FREETYPE_HEADERS_PATH + @$(ECHO) " --with-freetype=$(call UnixPath,$(ALT_FREETYPE_HEADERS_PATH)/..) " >> $@.tmp +endif + @if [ -f $@ ] ; then \ + if ! $(CMP) $@ $@.tmp > /dev/null ; then \ + $(CP) $@.tmp $@ ; \ + fi ; \ + else \ + $(CP) $@.tmp $@ ; \ + fi + $(RM) $@.tmp + +# Clobber all the built files +clobber:: bridge2clobber +bridge2clobber:: + $(RM) .bridge2* + +# Keep track of phony targets +PHONY_LIST += bridge2configure bridgeBuild bridge2clobber + +########################################################################### +# Javadocs +# + +javadocs: + cd common/makefiles && $(MAKE) -f MakefileJavadoc.gmk + +# Keep track of phony targets +PHONY_LIST += javadocs + +########################################################################### +# JPRT targets + +ifndef JPRT_ARCHIVE_BUNDLE + JPRT_ARCHIVE_BUNDLE=/tmp/jprt_bundles/j2sdk-image.zip +endif + +jprt_build_product: DEBUG_LEVEL=release +jprt_build_product: BUILD_DIRNAME=*-release +jprt_build_product: jprt_build_generic + +jprt_build_fastdebug: DEBUG_LEVEL=fastdebug +jprt_build_fastdebug: BUILD_DIRNAME=*-fastdebug +jprt_build_fastdebug: jprt_build_generic + +jprt_build_debug: DEBUG_LEVEL=slowdebug +jprt_build_debug: BUILD_DIRNAME=*-debug +jprt_build_debug: jprt_build_generic + +jprt_build_generic: EXTRA_MAKE_ARGS=LOG=nofile,info +jprt_build_generic: $(JPRT_ARCHIVE_BUNDLE) + +$(JPRT_ARCHIVE_BUNDLE): bridgeBuild bundles + $(MKDIR) -p $(@D) + $(RM) $@ + $(CP) $(BUILD_DIR_ROOT)/$(BUILD_DIRNAME)/bundles/j2sdk-image.zip $@ + +# Keep track of phony targets +PHONY_LIST += jprt_build_product jprt_build_fastdebug jprt_build_debug \ + jprt_build_generic + +########################################################################### +# Phony targets +.PHONY: $(PHONY_LIST) + +# Force target +FRC: +
--- a/common/autoconf/autogen.sh Fri Sep 28 14:54:04 2012 +0400 +++ b/common/autoconf/autogen.sh Fri Sep 28 10:54:12 2012 -0700 @@ -23,18 +23,38 @@ # script_dir=`dirname $0` -closed_script_dir="$script_dir/../../jdk/make/closed/autoconf" # Create a timestamp as seconds since epoch -TIMESTAMP=`date +%s` +if test "x`uname -s`" = "xSunOS"; then + # date +%s is not available on Solaris, use this workaround + # from http://solarisjedi.blogspot.co.uk/2006/06/solaris-date-command-and-epoch-time.html + TIMESTAMP=`/usr/bin/truss /usr/bin/date 2>&1 | nawk -F= '/^time\(\)/ {gsub(/ /,"",$2);print $2}'` + # On Solaris /bin/sh doesn't support test -e but /usr/bin/test does. + TEST=`which test` +else + TIMESTAMP=`date +%s` + TEST="test" +fi +if $TEST "$CUSTOM_CONFIG_DIR" = ""; then + custom_script_dir="$script_dir/../../jdk/make/closed/autoconf" +else + custom_script_dir=$CUSTOM_CONFIG_DIR +fi + +custom_hook=$custom_script_dir/custom-hook.m4 + +echo Generating generated-configure.sh cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | autoconf -W all -I$script_dir - > $script_dir/generated-configure.sh rm -rf autom4te.cache -if test -e $closed_script_dir/closed-hook.m4; then - # We have closed sources available; also generate configure script - # with closed hooks compiled in. +if $TEST -e $custom_hook; then + echo Generating custom generated-configure.sh + # We have custom sources available; also generate configure script + # with custom hooks compiled in. cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | \ - sed -e "s|AC_DEFUN_ONCE(\[CLOSED_HOOK\])|m4_include([$closed_script_dir/closed-hook.m4])|" | autoconf -W all -I$script_dir - > $closed_script_dir/generated-configure.sh + sed -e "s|AC_DEFUN_ONCE(\[CUSTOM_HOOK\])|m4_include([$custom_hook])|" | autoconf -W all -I$script_dir - > $custom_script_dir/generated-configure.sh rm -rf autom4te.cache +else + echo No custom hook found: $custom_hook fi
--- a/common/autoconf/basics.m4 Fri Sep 28 14:54:04 2012 +0400 +++ b/common/autoconf/basics.m4 Fri Sep 28 10:54:12 2012 -0700 @@ -34,7 +34,7 @@ fi ]) -AC_DEFUN([WHICHCMD], +AC_DEFUN([SET_FULL_PATH], [ # Translate "gcc -E" into "`which gcc` -E" ie # extract the full path to the binary and at the @@ -46,7 +46,7 @@ cdr="${tmp#* }" # On windows we want paths without spaces. if test "x$OPENJDK_BUILD_OS" = "xwindows"; then - WHICHCMD_SPACESAFE(car) + SET_FULL_PATH_SPACESAFE(car) else # "which" is not portable, but is used here # because we know that the command exists! @@ -66,15 +66,19 @@ HAS_SPACE=`echo "[$]$1" | grep " "` if test "x$HAS_SPACE" != x; then if test "x$OPENJDK_BUILD_OS" = "xwindows"; then + # First convert it to DOS-style, short mode (no spaces) $1=`$CYGPATH -s -m -a "[$]$1"` - $1=`$CYGPATH -u "[$]$1"` + # Now it's case insensitive; let's make it lowercase to improve readability + $1=`$ECHO "[$]$1" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'` + # Now convert it back to Unix-stile (cygpath) + $1=`$CYGPATH -u "[$]$1"` else AC_MSG_ERROR([You cannot have spaces in $2! "[$]$1"]) fi fi ]) -AC_DEFUN([WHICHCMD_SPACESAFE], +AC_DEFUN([SET_FULL_PATH_SPACESAFE], [ # Translate long cygdrive or C:\sdfsf path # into a short mixed mode path that has no @@ -148,15 +152,16 @@ AC_SUBST(CONFIGURE_COMMAND_LINE) DATE_WHEN_CONFIGURED=`LANG=C date` AC_SUBST(DATE_WHEN_CONFIGURED) +]) +# Setup basic configuration paths, and platform-specific stuff related to PATHs. +AC_DEFUN_ONCE([BASIC_SETUP_PATHS], +[ # Locate the directory of this script. SCRIPT="[$]0" -REMOVE_SYMBOLIC_LINKS(SCRIPT) +REMOVE_SYMBOLIC_LINKS(SCRIPT) AUTOCONF_DIR=`dirname [$]0` -]) -AC_DEFUN_ONCE([BASIC_SETUP_PATHS], -[ # Where is the source? It is located two levels above the configure script. CURDIR="$PWD" cd "$AUTOCONF_DIR/../.." @@ -172,18 +177,12 @@ SPACESAFE(SRC_ROOT,[the path to the source root]) SPACESAFE(CURDIR,[the path to the current directory]) -]) -AC_DEFUN_ONCE([BASIC_SETUP_SEARCHPATH], -[ if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then # Add extra search paths on solaris for utilities like ar and as etc... PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin" fi -]) -AC_DEFUN_ONCE([BASIC_SETUP_PATH_SEP], -[ # For cygwin we need cygpath first, since it is used everywhere. AC_PATH_PROG(CYGPATH, cygpath) PATH_SEP=":" @@ -194,6 +193,36 @@ PATH_SEP=";" fi AC_SUBST(PATH_SEP) + +# You can force the sys-root if the sys-root encoded into the cross compiler tools +# is not correct. +AC_ARG_WITH(sys-root, [AS_HELP_STRING([--with-sys-root], + [pass this sys-root to the compilers and linker (useful if the sys-root encoded in + the cross compiler tools is incorrect)])]) + +if test "x$with_sys_root" != x; then + SYS_ROOT=$with_sys_root +else + SYS_ROOT=/ +fi +AC_SUBST(SYS_ROOT) + +AC_ARG_WITH([tools-dir], [AS_HELP_STRING([--with-tools-dir], + [search this directory for (cross-compiling) compilers and tools])], [TOOLS_DIR=$with_tools_dir]) + +AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit], + [use this directory as base for tools-dir and sys-root (for cross-compiling)])], + [ + if test "x$with_sys_root" != x; then + AC_MSG_ERROR([Cannot specify both --with-devkit and --with-sys-root at the same time]) + fi + if test "x$with_tools_dir" != x; then + AC_MSG_ERROR([Cannot specify both --with-devkit and --with-tools-dir at the same time]) + fi + TOOLS_DIR=$with_devkit/bin + SYS_ROOT=$with_devkit/$host_alias/libc + ]) + ]) AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR], @@ -236,7 +265,13 @@ AC_CONFIG_HEADERS([$OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in]) # The spec.gmk file contains all variables for the make system. AC_CONFIG_FILES([$OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in]) -# The spec.sh file contains variables for compare{images|-objects}.sh scrips. +# The hotspot-spec.gmk file contains legacy variables for the hotspot make system. +AC_CONFIG_FILES([$OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in]) +# The bootcycle-spec.gmk file contains support for boot cycle builds. +AC_CONFIG_FILES([$OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in]) +# The compare.sh is used to compare the build output to other builds. +AC_CONFIG_FILES([$OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in]) +# Spec.sh is currently used by compare-objects.sh AC_CONFIG_FILES([$OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in]) # The generated Makefile knows where the spec.gmk is and where the source is. # You can run make from the OUTPUT_ROOT, or from the top-level Makefile @@ -261,6 +296,79 @@ #%%% Simple tools %%% +# Check if we have found a usable version of make +# $1: the path to a potential make binary (or empty) +# $2: the description on how we found this +AC_DEFUN([BASIC_CHECK_MAKE_VERSION], +[ + MAKE_CANDIDATE="$1" + DESCRIPTION="$2" + if test "x$MAKE_CANDIDATE" != x; then + AC_MSG_NOTICE([Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION]) + SET_FULL_PATH(MAKE_CANDIDATE) + MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1` + IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'` + if test "x$IS_GNU_MAKE" = x; then + AC_MSG_NOTICE([Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring.]) + else + IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[[12346789]]'` + if test "x$IS_MODERN_MAKE" = x; then + AC_MSG_NOTICE([Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring.]) + else + FOUND_MAKE=$MAKE_CANDIDATE + fi + fi + fi +]) + +# Goes looking for a usable version of GNU make. +AC_DEFUN([BASIC_CHECK_GNU_MAKE], +[ + # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky. + if test "x$MAKE" != x; then + # User has supplied a make, test it. + if test ! -f "$MAKE"; then + AC_MSG_ERROR([The specified make (by MAKE=$MAKE) is not found.]) + fi + BASIC_CHECK_MAKE_VERSION("$MAKE", [user supplied MAKE=]) + if test "x$FOUND_MAKE" = x; then + AC_MSG_ERROR([The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer.]) + fi + else + # Try our hardest to locate a correct version of GNU make + AC_PATH_PROGS(CHECK_GMAKE, gmake) + BASIC_CHECK_MAKE_VERSION("$CHECK_GMAKE", [gmake in PATH]) + + if test "x$FOUND_MAKE" = x; then + AC_PATH_PROGS(CHECK_MAKE, make) + BASIC_CHECK_MAKE_VERSION("$CHECK_MAKE", [make in PATH]) + fi + + if test "x$FOUND_MAKE" = x; then + if test "x$TOOLS_DIR" != x; then + # We have a tools-dir, check that as well before giving up. + OLD_PATH=$PATH + PATH=$TOOLS_DIR:$PATH + AC_PATH_PROGS(CHECK_TOOLSDIR_GMAKE, gmake) + BASIC_CHECK_MAKE_VERSION("$CHECK_TOOLSDIR_GMAKE", [gmake in tools-dir]) + if test "x$FOUND_MAKE" = x; then + AC_PATH_PROGS(CHECK_TOOLSDIR_MAKE, make) + BASIC_CHECK_MAKE_VERSION("$CHECK_TOOLSDIR_MAKE", [make in tools-dir]) + fi + PATH=$OLD_PATH + fi + fi + + if test "x$FOUND_MAKE" = x; then + AC_MSG_ERROR([Cannot find GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure.]) + fi + fi + + MAKE=$FOUND_MAKE + AC_SUBST(MAKE) + AC_MSG_NOTICE([Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)]) +]) + AC_DEFUN([BASIC_CHECK_FIND_DELETE], [ # Test if find supports -delete @@ -283,10 +391,30 @@ rmdir $DELETEDIR ]) +# Test that variable $1 denoting a program is not empty. If empty, exit with an error. +# $1: variable to check +# $2: executable name to print in warning (optional) AC_DEFUN([CHECK_NONEMPTY], [ - # Test that variable $1 is not empty. - if test "" = "[$]$1"; then AC_MSG_ERROR(Could not find translit($1,A-Z,a-z) !); fi + if test "x[$]$1" = x; then + if test "x$2" = x; then + PROG_NAME=translit($1,A-Z,a-z) + else + PROG_NAME=$2 + fi + AC_MSG_NOTICE([Could not find $PROG_NAME!]) + AC_MSG_ERROR([Cannot continue]) + fi +]) + +# Does AC_PATH_PROG followed by CHECK_NONEMPTY. +# Arguments as AC_PATH_PROG: +# $1: variable to set +# $2: executable name to look for +AC_DEFUN([BASIC_REQUIRE_PROG], +[ + AC_PATH_PROGS($1, $2) + CHECK_NONEMPTY($1, $2) ]) AC_DEFUN_ONCE([BASIC_SETUP_TOOLS], @@ -295,90 +423,68 @@ # and can be expected to be found in the default PATH. These tools are # used by configure. Nor are these tools expected to be found in the # devkit from the builddeps server either, since they are -# needed to download the devkit. +# needed to download the devkit. + +# First are all the simple required tools. +BASIC_REQUIRE_PROG(BASENAME, basename) +BASIC_REQUIRE_PROG(CAT, cat) +BASIC_REQUIRE_PROG(CHMOD, chmod) +BASIC_REQUIRE_PROG(CMP, cmp) +BASIC_REQUIRE_PROG(CP, cp) +BASIC_REQUIRE_PROG(CPIO, cpio) +BASIC_REQUIRE_PROG(CUT, cut) +BASIC_REQUIRE_PROG(DATE, date) +BASIC_REQUIRE_PROG(DF, df) +BASIC_REQUIRE_PROG(DIFF, [gdiff diff]) +BASIC_REQUIRE_PROG(ECHO, echo) +BASIC_REQUIRE_PROG(EXPR, expr) +BASIC_REQUIRE_PROG(FILE, file) +BASIC_REQUIRE_PROG(FIND, find) +BASIC_REQUIRE_PROG(HEAD, head) +BASIC_REQUIRE_PROG(LN, ln) +BASIC_REQUIRE_PROG(LS, ls) +BASIC_REQUIRE_PROG(MKDIR, mkdir) +BASIC_REQUIRE_PROG(MV, mv) +BASIC_REQUIRE_PROG(PRINTF, printf) +BASIC_REQUIRE_PROG(SH, sh) +BASIC_REQUIRE_PROG(SORT, sort) +BASIC_REQUIRE_PROG(TAIL, tail) +BASIC_REQUIRE_PROG(TAR, tar) +BASIC_REQUIRE_PROG(TEE, tee) +BASIC_REQUIRE_PROG(TOUCH, touch) +BASIC_REQUIRE_PROG(TR, tr) +BASIC_REQUIRE_PROG(UNIQ, uniq) +BASIC_REQUIRE_PROG(UNZIP, unzip) +BASIC_REQUIRE_PROG(WC, wc) +BASIC_REQUIRE_PROG(XARGS, xargs) +BASIC_REQUIRE_PROG(ZIP, zip) + +# Then required tools that require some special treatment. AC_PROG_AWK CHECK_NONEMPTY(AWK) -AC_PATH_PROG(CAT, cat) -CHECK_NONEMPTY(CAT) -AC_PATH_PROG(CHMOD, chmod) -CHECK_NONEMPTY(CHMOD) -AC_PATH_PROG(CP, cp) -CHECK_NONEMPTY(CP) -AC_PATH_PROG(CPIO, cpio) -CHECK_NONEMPTY(CPIO) -AC_PATH_PROG(CUT, cut) -CHECK_NONEMPTY(CUT) -AC_PATH_PROG(DATE, date) -CHECK_NONEMPTY(DATE) -AC_PATH_PROG(DF, df) -CHECK_NONEMPTY(DF) -AC_PATH_PROG(DIFF, diff) -CHECK_NONEMPTY(DIFF) -# Warning echo is really, really unportable!!!!! Different -# behaviour in bash and dash and in a lot of other shells! -# Use printf for serious work! -AC_PATH_PROG(ECHO, echo) -CHECK_NONEMPTY(ECHO) +AC_PROG_GREP +CHECK_NONEMPTY(GREP) AC_PROG_EGREP CHECK_NONEMPTY(EGREP) AC_PROG_FGREP CHECK_NONEMPTY(FGREP) +AC_PROG_SED +CHECK_NONEMPTY(SED) -AC_PATH_PROG(FIND, find) -CHECK_NONEMPTY(FIND) +AC_PATH_PROGS(NAWK, [nawk gawk awk]) +CHECK_NONEMPTY(NAWK) + +BASIC_CHECK_GNU_MAKE + +BASIC_REQUIRE_PROG(RM, rm) +RM="$RM -f" + BASIC_CHECK_FIND_DELETE AC_SUBST(FIND_DELETE) -AC_PROG_GREP -CHECK_NONEMPTY(GREP) -AC_PATH_PROG(HEAD, head) -CHECK_NONEMPTY(HEAD) -AC_PATH_PROG(LN, ln) -CHECK_NONEMPTY(LN) -AC_PATH_PROG(LS, ls) -CHECK_NONEMPTY(LS) -AC_PATH_PROGS(MAKE, [gmake make]) -CHECK_NONEMPTY(MAKE) -MAKE_VERSION=`$MAKE --version | head -n 1 | grep '3.8[[12346789]]'` -if test "x$MAKE_VERSION" = x; then - AC_MSG_ERROR([You must use GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure.]) -fi -AC_PATH_PROG(MKDIR, mkdir) -CHECK_NONEMPTY(MKDIR) -AC_PATH_PROG(MV, mv) -CHECK_NONEMPTY(MV) -AC_PATH_PROGS(NAWK, [nawk gawk awk]) -CHECK_NONEMPTY(NAWK) -AC_PATH_PROG(PRINTF, printf) -CHECK_NONEMPTY(PRINTF) +# Non-required basic tools + AC_PATH_PROG(THEPWDCMD, pwd) -AC_PATH_PROG(RM, rm) -CHECK_NONEMPTY(RM) -RM="$RM -f" -AC_PROG_SED -CHECK_NONEMPTY(SED) -AC_PATH_PROG(SH, sh) -CHECK_NONEMPTY(SH) -AC_PATH_PROG(SORT, sort) -CHECK_NONEMPTY(SORT) -AC_PATH_PROG(TAR, tar) -CHECK_NONEMPTY(TAR) -AC_PATH_PROG(TAIL, tail) -CHECK_NONEMPTY(TAIL) -AC_PATH_PROG(TEE, tee) -CHECK_NONEMPTY(TEE) -AC_PATH_PROG(TR, tr) -CHECK_NONEMPTY(TR) -AC_PATH_PROG(TOUCH, touch) -CHECK_NONEMPTY(TOUCH) -AC_PATH_PROG(WC, wc) -CHECK_NONEMPTY(WC) -AC_PATH_PROG(XARGS, xargs) -CHECK_NONEMPTY(XARGS) -AC_PATH_PROG(ZIP, zip) -CHECK_NONEMPTY(ZIP) -AC_PATH_PROG(UNZIP, unzip) -CHECK_NONEMPTY(UNZIP) AC_PATH_PROG(LDD, ldd) if test "x$LDD" = "x"; then # List shared lib dependencies is used for @@ -390,16 +496,11 @@ if test "x$OTOOL" = "x"; then OTOOL="true" fi -AC_PATH_PROG(READELF, readelf) -AC_PATH_PROG(EXPR, expr) -CHECK_NONEMPTY(EXPR) -AC_PATH_PROG(FILE, file) -CHECK_NONEMPTY(FILE) +AC_PATH_PROGS(READELF, [readelf greadelf]) +AC_PATH_PROGS(OBJDUMP, [objdump gobjdump]) AC_PATH_PROG(HG, hg) ]) - - AC_DEFUN_ONCE([BASIC_COMPILE_UNCYGDRIVE], [ # When using cygwin, we need a wrapper binary that renames @@ -433,6 +534,8 @@ fi AC_MSG_RESULT([yes]) rm -f $OUTPUT_ROOT/uncygdrive?.??? $OUTPUT_ROOT/uncygdrive.obj + # The path to uncygdrive to use should be Unix-style + UNCYGDRIVE="$OUTPUT_ROOT/uncygdrive.exe" fi AC_SUBST(UNCYGDRIVE)
--- a/common/autoconf/boot-jdk.m4 Fri Sep 28 14:54:04 2012 +0400 +++ b/common/autoconf/boot-jdk.m4 Fri Sep 28 10:54:12 2012 -0700 @@ -23,22 +23,186 @@ # questions. # -# Fixes paths on windows to be mixed mode short. -AC_DEFUN([BOOTJDK_WIN_FIX_PATH], +# Execute the check given as argument, and verify the result +# If the Boot JDK was previously found, do nothing +# $1 A command line (typically autoconf macro) to execute +AC_DEFUN([BOOTJDK_DO_CHECK], [ - if test "x$OPENJDK_BUILD_OS" = "xwindows"; then - AC_PATH_PROG(CYGPATH, cygpath) - tmp="[$]$1" - # Convert to C:/ mixed style path without spaces. - tmp=`$CYGPATH -s -m "$tmp"` - $1="$tmp" + if test "x$BOOT_JDK_FOUND" = xno; then + # Now execute the test + $1 + + # If previous step claimed to have found a JDK, check it to see if it seems to be valid. + if test "x$BOOT_JDK_FOUND" = xmaybe; then + # Do we have a bin/java? + if test ! -x "$BOOT_JDK/bin/java"; then + AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring]) + BOOT_JDK_FOUND=no + else + # Do we have a bin/javac? + if test ! -x "$BOOT_JDK/bin/javac"; then + AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring]) + AC_MSG_NOTICE([(This might be an JRE instead of an JDK)]) + BOOT_JDK_FOUND=no + else + # Do we have an rt.jar? (On MacOSX it is called classes.jar) + if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then + AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring]) + BOOT_JDK_FOUND=no + else + # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? + BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` + + # Extra M4 quote needed to protect [] in grep expression. + [FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`] + if test "x$FOUND_VERSION_78" = x; then + AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring]) + AC_MSG_NOTICE([(Your Boot JDK must be version 7 or 8)]) + BOOT_JDK_FOUND=no + else + # We're done! :-) + BOOT_JDK_FOUND=yes + SPACESAFE(BOOT_JDK,[the path to the Boot JDK]) + AC_MSG_CHECKING([for Boot JDK]) + AC_MSG_RESULT([$BOOT_JDK ($BOOT_JDK_VERSION)]) + fi # end check jdk version + fi # end check rt.jar + fi # end check javac + fi # end check java + fi # end check boot jdk found + fi +]) + +# Test: Is bootjdk explicitely set by command line arguments? +AC_DEFUN([BOOTJDK_CHECK_ARGUMENTS], +[ +if test "x$with_boot_jdk" != x; then + BOOT_JDK=$with_boot_jdk + BOOT_JDK_FOUND=maybe + AC_MSG_NOTICE([Found potential Boot JDK using configure arguments]) +fi +]) + +# Test: Is bootjdk available from builddeps? +AC_DEFUN([BOOTJDK_CHECK_BUILDDEPS], +[ + BDEPS_CHECK_MODULE(BOOT_JDK, bootjdk, xxx, [BOOT_JDK_FOUND=maybe], [BOOT_JDK_FOUND=no]) +]) + +# Test: Is $JAVA_HOME set? +AC_DEFUN([BOOTJDK_CHECK_JAVA_HOME], +[ + if test "x$JAVA_HOME" != x; then + if test "x$OPENJDK_TARGET_OS" = xwindows; then + # On Windows, JAVA_HOME is likely in DOS-style + JAVA_HOME_PROCESSED="`$CYGPATH -u "$JAVA_HOME"`" + else + JAVA_HOME_PROCESSED="$JAVA_HOME" + fi + if test ! -d "$JAVA_HOME_PROCESSED"; then + AC_MSG_NOTICE([Your JAVA_HOME points to a non-existing directory!]) + else + # Aha, the user has set a JAVA_HOME + # let us use that as the Boot JDK. + BOOT_JDK="$JAVA_HOME_PROCESSED" + BOOT_JDK_FOUND=maybe + AC_MSG_NOTICE([Found potential Boot JDK using JAVA_HOME]) + fi fi ]) -AC_DEFUN([BOOTJDK_MISSING_ERROR], +# Test: Is there a java or javac in the PATH, which is a symlink to the JDK? +AC_DEFUN([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK], [ - AC_MSG_NOTICE([This might be fixed by explicitely setting --with-boot-jdk]) - AC_MSG_ERROR([Cannot continue]) + AC_PATH_PROG(JAVAC_CHECK, javac) + AC_PATH_PROG(JAVA_CHECK, java) + BINARY="$JAVAC_CHECK" + if test "x$JAVAC_CHECK" = x; then + BINARY="$JAVA_CHECK" + fi + if test "x$BINARY" != x; then + # So there is a java(c) binary, it might be part of a JDK. + # Lets find the JDK/JRE directory by following symbolic links. + # Linux/GNU systems often have links from /usr/bin/java to + # /etc/alternatives/java to the real JDK binary. + SET_FULL_PATH_SPACESAFE(BINARY) + REMOVE_SYMBOLIC_LINKS(BINARY) + BOOT_JDK=`dirname "$BINARY"` + BOOT_JDK=`cd "$BOOT_JDK/.."; pwd` + if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then + # Looks like we found ourselves an JDK + BOOT_JDK_FOUND=maybe + AC_MSG_NOTICE([Found potential Boot JDK using java(c) in PATH]) + fi + fi +]) + +# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX) +AC_DEFUN([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME], +[ + if test -x /usr/libexec/java_home; then + BOOT_JDK=`/usr/libexec/java_home` + BOOT_JDK_FOUND=maybe + AC_MSG_NOTICE([Found potential Boot JDK using /usr/libexec/java_home]) + fi +]) + +# Look for a jdk in the given path. If there are multiple, try to select the newest. +# If found, set BOOT_JDK and BOOT_JDK_FOUND. +# $1 = Path to directory containing jdk installations. +# $2 = String to append to the found JDK directory to get the proper JDK home +AC_DEFUN([BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY], +[ + BOOT_JDK_PREFIX="$1" + BOOT_JDK_SUFFIX="$2" + BEST_JDK_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $GREP jdk | $SORT -r | $HEAD -n 1 ` + if test "x$BEST_JDK_FOUND" != x; then + BOOT_JDK="${BOOT_JDK_PREFIX}/${BEST_JDK_FOUND}${BOOT_JDK_SUFFIX}" + if test -d "$BOOT_JDK"; then + BOOT_JDK_FOUND=maybe + AC_MSG_NOTICE([Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX)]) + fi + fi +]) + +# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given +# environmental variable as base for where to look. +# $1 Name of an environmal variable, assumed to point to the Program Files directory. +AC_DEFUN([BOOTJDK_FIND_BEST_JDK_IN_WINDOWS_VIRTUAL_DIRECTORY], +[ + if test "x[$]$1" != x; then + BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY([`$CYGPATH -u "[$]$1"`/Java]) + fi +]) + +# Test: Is there a JDK installed in default, well-known locations? +AC_DEFUN([BOOTJDK_CHECK_WELL_KNOWN_LOCATIONS], +[ + if test "x$OPENJDK_TARGET_OS" = xwindows; then + BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_WINDOWS_VIRTUAL_DIRECTORY([ProgramW6432])]) + BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_WINDOWS_VIRTUAL_DIRECTORY([PROGRAMW6432])]) + BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_WINDOWS_VIRTUAL_DIRECTORY([PROGRAMFILES])]) + BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_WINDOWS_VIRTUAL_DIRECTORY([ProgramFiles])]) + BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY([/cygdrive/c/Program Files/Java])]) + elif test "x$OPENJDK_TARGET_OS" = xmacosx; then + BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY([/Library/Java/JavaVirtualMachines],[/Contents/Home])]) + BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY([/System/Library/Java/JavaVirtualMachines],[/Contents/Home])]) + fi +]) + +# Check that a command-line tool in the Boot JDK is correct +# $1 = name of variable to assign +# $2 = name of binary +AC_DEFUN([BOOTJDK_CHECK_TOOL_IN_BOOTJDK], +[ + AC_MSG_CHECKING([for $2 in Boot JDK]) + $1=$BOOT_JDK/bin/$2 + if test ! -x [$]$1; then + AC_MSG_RESULT(not found) + AC_MSG_NOTICE([Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk]) + AC_MSG_ERROR([Could not find $2 in the Boot JDK]) + fi + AC_MSG_RESULT(ok) ]) ############################################################################### @@ -51,204 +215,74 @@ BOOT_JDK_FOUND=no AC_ARG_WITH(boot-jdk, [AS_HELP_STRING([--with-boot-jdk], [path to Boot JDK (used to bootstrap build) @<:@probed@:>@])]) - -if test "x$with_boot_jdk" != x; then - BOOT_JDK=$with_boot_jdk - BOOT_JDK_FOUND=yes -fi -if test "x$BOOT_JDK_FOUND" = xno; then - BDEPS_CHECK_MODULE(BOOT_JDK, boot-jdk, xxx, [BOOT_JDK_FOUND=yes], [BOOT_JDK_FOUND=no]) + +# We look for the Boot JDK through various means, going from more certain to +# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if +# we detected something (if so, the path to the jdk is in BOOT_JDK). But we +# must check if this is indeed valid; otherwise we'll continue looking. + +# Test: Is bootjdk explicitely set by command line arguments? +BOOTJDK_DO_CHECK([BOOTJDK_CHECK_ARGUMENTS]) +if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then + # Having specified an argument which is incorrect will produce an instant failure; + # we should not go on looking + AC_MSG_ERROR([The path given by --with-boot-jdk does not contain a valid Boot JDK]) fi +# Test: Is bootjdk available from builddeps? +BOOTJDK_DO_CHECK([BOOTJDK_CHECK_BUILDDEPS]) + +# Test: Is $JAVA_HOME set? +BOOTJDK_DO_CHECK([BOOTJDK_CHECK_JAVA_HOME]) + +# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX) +BOOTJDK_DO_CHECK([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME]) + +# Test: Is there a java or javac in the PATH, which is a symlink to the JDK? +BOOTJDK_DO_CHECK([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK]) + +# Test: Is there a JDK installed in default, well-known locations? +BOOTJDK_DO_CHECK([BOOTJDK_CHECK_WELL_KNOWN_LOCATIONS]) + +# If we haven't found anything yet, we've truly lost. Give up. if test "x$BOOT_JDK_FOUND" = xno; then - if test "x$JAVA_HOME" != x; then - if test ! -d "$JAVA_HOME"; then - AC_MSG_NOTICE([Your JAVA_HOME points to a non-existing directory!]) - BOOTJDK_MISSING_ERROR - fi - # Aha, the user has set a JAVA_HOME - # let us use that as the Boot JDK. - BOOT_JDK="$JAVA_HOME" - BOOT_JDK_FOUND=yes - # To be on the safe side, lets check that it is a JDK. - if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then - JAVAC="$BOOT_JDK/bin/javac" - JAVA="$BOOT_JDK/bin/java" - BOOT_JDK_FOUND=yes - else - AC_MSG_NOTICE([Your JAVA_HOME points to a JRE! The build needs a JDK! Please point JAVA_HOME to a JDK. JAVA_HOME=[$]JAVA_HOME]) - BOOTJDK_MISSING_ERROR - fi + HELP_MSG_MISSING_DEPENDENCY([openjdk]) + AC_MSG_NOTICE([Could not find a valid Boot JDK. $HELP_MSG]) + AC_MSG_NOTICE([This might be fixed by explicitely setting --with-boot-jdk]) + AC_MSG_ERROR([Cannot continue]) +fi + +# Setup proper paths for what we found +BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar" +if test ! -f "$BOOT_RTJAR"; then + # On MacOSX it is called classes.jar + BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar" + if test -f "$BOOT_RTJAR"; then + # Remove the .. + BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}" fi fi - -if test "x$BOOT_JDK_FOUND" = xno; then - AC_PATH_PROG(JAVAC_CHECK, javac) - AC_PATH_PROG(JAVA_CHECK, java) - BINARY="$JAVAC_CHECK" - if test "x$JAVAC_CHECK" = x; then - BINARY="$JAVA_CHECK" - fi - if test "x$BINARY" != x; then - # So there is a java(c) binary, it might be part of a JDK. - # Lets find the JDK/JRE directory by following symbolic links. - # Linux/GNU systems often have links from /usr/bin/java to - # /etc/alternatives/java to the real JDK binary. - WHICHCMD_SPACESAFE(BINARY,[path to javac]) - REMOVE_SYMBOLIC_LINKS(BINARY) - BOOT_JDK=`dirname $BINARY` - BOOT_JDK=`cd $BOOT_JDK/..; pwd` - if test -x $BOOT_JDK/bin/javac && test -x $BOOT_JDK/bin/java; then - JAVAC=$BOOT_JDK/bin/javac - JAVA=$BOOT_JDK/bin/java - BOOT_JDK_FOUND=yes - fi - fi -fi - -if test "x$BOOT_JDK_FOUND" = xno; then - # Try the MacOSX way. - if test -x /usr/libexec/java_home; then - BOOT_JDK=`/usr/libexec/java_home` - if test -x $BOOT_JDK/bin/javac && test -x $BOOT_JDK/bin/java; then - JAVAC=$BOOT_JDK/bin/javac - JAVA=$BOOT_JDK/bin/java - BOOT_JDK_FOUND=yes - fi - fi -fi - -if test "x$BOOT_JDK_FOUND" = xno; then - AC_PATH_PROG(JAVA_CHECK, java) - if test "x$JAVA_CHECK" != x; then - # There is a java in the path. But apparently we have not found a javac - # in the path, since that would have been tested earlier. - if test "x$OPENJDK_TARGET_OS" = xwindows; then - # Now if this is a windows platform. The default installation of a JDK - # actually puts the JRE in the path and keeps the JDK out of the path! - # Go look in the default installation location. - BOOT_JDK=/cygdrive/c/Program\ Files/Java/`ls /cygdrive/c/Program\ Files/Java | grep jdk | sort -r | head --lines 1` - if test -d "$BOOT_JDK"; then - BOOT_JDK_FOUND=yes - fi - fi - if test "x$BOOT_JDK_FOUND" = xno; then - HELP_MSG_MISSING_DEPENDENCY([openjdk]) - AC_MSG_NOTICE([Found a JRE, not not a JDK! Please remove the JRE from your path and put a JDK there instead. $HELP_MSG]) - BOOTJDK_MISSING_ERROR - fi - else - HELP_MSG_MISSING_DEPENDENCY([openjdk]) - AC_MSG_NOTICE([Could not find a JDK. $HELP_MSG]) - BOOTJDK_MISSING_ERROR - fi -fi - -BOOTJDK_WIN_FIX_PATH(BOOT_JDK) - -# Now see if we can find the rt.jar, or its nearest equivalent. -BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar" -SPACESAFE(BOOT_RTJAR,[the path to the Boot JDK rt.jar (or nearest equivalent)]) - BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar" -SPACESAFE(BOOT_TOOLSJAR,[the path to the Boot JDK tools.jar (or nearest equivalent)]) - -if test ! -f $BOOT_RTJAR; then - # On MacOSX it is called classes.jar - BOOT_RTJAR=$BOOT_JDK/../Classes/classes.jar - if test ! -f $BOOT_RTJAR; then - AC_MSG_NOTICE([Cannot find the rt.jar or its equivalent!]) - AC_MSG_NOTICE([This typically means that configure failed to automatically find a suitable Boot JDK]) - BOOTJDK_MISSING_ERROR - fi - # Remove the .. - BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}" - # The tools.jar is part of classes.jar - BOOT_TOOLSJAR="$BOOT_RTJAR" -fi - -AC_SUBST(BOOT_JDK) +BOOT_JDK="$BOOT_JDK" AC_SUBST(BOOT_RTJAR) AC_SUBST(BOOT_TOOLSJAR) -AC_MSG_CHECKING([for Boot JDK]) -AC_MSG_RESULT([$BOOT_JDK]) -AC_MSG_CHECKING([for Boot rt.jar]) -AC_MSG_RESULT([$BOOT_RTJAR]) -AC_MSG_CHECKING([for Boot tools.jar]) -AC_MSG_RESULT([$BOOT_TOOLSJAR]) +AC_SUBST(BOOT_JDK) -# Use the java tool from the Boot JDK. -AC_MSG_CHECKING([for java in Boot JDK]) -JAVA=$BOOT_JDK/bin/java -if test ! -x $JAVA; then - AC_MSG_NOTICE([Could not find a working java]) - BOOTJDK_MISSING_ERROR -fi -BOOT_JDK_VERSION=`$JAVA -version 2>&1 | head -n 1` -AC_MSG_RESULT([yes $BOOT_JDK_VERSION]) -AC_SUBST(JAVA) +# Setup tools from the Boot JDK. +BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVA,java) +BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAC,javac) +BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAH,javah) +BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAP,javap) +BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAR,jar) +BOOTJDK_CHECK_TOOL_IN_BOOTJDK(RMIC,rmic) +BOOTJDK_CHECK_TOOL_IN_BOOTJDK(NATIVE2ASCII,native2ascii) -# Extra M4 quote needed to protect [] in grep expression. -[FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`] -if test "x$FOUND_VERSION_78" = x; then - HELP_MSG_MISSING_DEPENDENCY([openjdk]) - AC_MSG_NOTICE([Your boot-jdk must be version 7 or 8. $HELP_MSG]) - BOOTJDK_MISSING_ERROR -fi +# Finally, set some other options... # When compiling code to be executed by the Boot JDK, force jdk7 compatibility. BOOT_JDK_SOURCETARGET="-source 7 -target 7" AC_SUBST(BOOT_JDK_SOURCETARGET) - -# Use the javac tool from the Boot JDK. -AC_MSG_CHECKING([for javac in Boot JDK]) -JAVAC=$BOOT_JDK/bin/javac -if test ! -x $JAVAC; then - AC_MSG_ERROR([Could not find a working javac]) -fi -AC_MSG_RESULT(yes) -AC_SUBST(JAVAC) AC_SUBST(JAVAC_FLAGS) - -# Use the javah tool from the Boot JDK. -AC_MSG_CHECKING([for javah in Boot JDK]) -JAVAH=$BOOT_JDK/bin/javah -if test ! -x $JAVAH; then - AC_MSG_NOTICE([Could not find a working javah]) - BOOTJDK_MISSING_ERROR -fi -AC_MSG_RESULT(yes) -AC_SUBST(JAVAH) - -# Use the jar tool from the Boot JDK. -AC_MSG_CHECKING([for jar in Boot JDK]) -JAR=$BOOT_JDK/bin/jar -if test ! -x $JAR; then - AC_MSG_NOTICE([Could not find a working jar]) - BOOTJDK_MISSING_ERROR -fi -AC_SUBST(JAR) -AC_MSG_RESULT(yes) - -# Use the rmic tool from the Boot JDK. -AC_MSG_CHECKING([for rmic in Boot JDK]) -RMIC=$BOOT_JDK/bin/rmic -if test ! -x $RMIC; then - AC_MSG_NOTICE([Could not find a working rmic]) - BOOTJDK_MISSING_ERROR -fi -AC_SUBST(RMIC) -AC_MSG_RESULT(yes) - -# Use the native2ascii tool from the Boot JDK. -AC_MSG_CHECKING([for native2ascii in Boot JDK]) -NATIVE2ASCII=$BOOT_JDK/bin/native2ascii -if test ! -x $NATIVE2ASCII; then - AC_MSG_NOTICE([Could not find a working native2ascii]) - BOOTJDK_MISSING_ERROR -fi -AC_MSG_RESULT(yes) -AC_SUBST(NATIVE2ASCII) ]) AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/autoconf/bootcycle-spec.gmk.in Fri Sep 28 10:54:12 2012 -0700 @@ -0,0 +1,43 @@ +# +# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. +# 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. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the LICENSE file that accompanied this code. +# +# 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. +# + +# Support for building boot cycle builds + +# First include the real base spec.gmk file +include @SPEC@ + +# Check that the user did not try to specify a different java to use for compiling. +ifneq ($(firstword $(SJAVAC_SERVER_JAVA)),$(firstword $(JAVA))) + $(error Bootcycle builds are not possible if --with-sjavac-server-java is specified) +endif + +# Override specific values to do a boot cycle build + +# The bootcycle build has a different output directory +BUILD_OUTPUT:=@BUILD_OUTPUT@/bootcycle-build + +# Use a different Boot JDK +BOOT_JDK:=@BUILD_OUTPUT@/images/j2sdk-image +BOOT_RTJAR:=@BUILD_OUTPUT@/images/j2sdk-image/jre/lib/rt.jar
--- a/common/autoconf/build-aux/config.guess Fri Sep 28 14:54:04 2012 +0400 +++ b/common/autoconf/build-aux/config.guess Fri Sep 28 10:54:12 2012 -0700 @@ -22,17 +22,39 @@ # questions. # -# This is a wrapper for the config.guess from autoconf. The latter does not properly -# detect amd64 systems, since that require isainfo instead of uname. Instead of patching -# the autoconf system (which might easily get lost in a future update), we wrap it and -# fix the broken property, if needed. +# This is a wrapper for the config.guess from autoconf. The latter does not +# properly detect 64 bit systems on all platforms. Instead of patching the +# autoconf system (which might easily get lost in a future update), we wrap it +# and fix the broken property, if needed. DIR=`dirname $0` OUT=`. $DIR/autoconf-config.guess` + +# Test and fix solaris on x86_64 echo $OUT | grep i386-pc-solaris > /dev/null 2> /dev/null if test $? = 0; then - # isainfo -n returns either i386 or amd64 on Intel systems + # isainfo -n returns either i386 or amd64 REAL_CPU=`isainfo -n` OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'` fi + +# Test and fix solaris on sparcv9 +echo $OUT | grep sparc-sun-solaris > /dev/null 2> /dev/null +if test $? = 0; then + # isainfo -n returns either sparc or sparcv9 + REAL_CPU=`isainfo -n` + OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'` +fi + +# Test and fix cygwin on x86_64 +echo $OUT | grep 86-pc-cygwin > /dev/null 2> /dev/null +if test $? = 0; then + case `echo $PROCESSOR_IDENTIFIER | cut -f1 -d' '` in + intel64|Intel64|INTEL64|em64t|EM64T|amd64|AMD64|8664|x86_64) + REAL_CPU=x86_64 + OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'` + ;; + esac +fi + echo $OUT
--- a/common/autoconf/build-performance.m4 Fri Sep 28 14:54:04 2012 +0400 +++ b/common/autoconf/build-performance.m4 Fri Sep 28 10:54:12 2012 -0700 @@ -30,27 +30,19 @@ FOUND_CORES=no if test -f /proc/cpuinfo; then - # Looks like a Linux system + # Looks like a Linux (or cygwin) system NUM_CORES=`cat /proc/cpuinfo | grep -c processor` FOUND_CORES=yes - fi - - if test -x /usr/sbin/psrinfo; then + elif test -x /usr/sbin/psrinfo; then # Looks like a Solaris system NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line` FOUND_CORES=yes - fi - - if test -x /usr/sbin/system_profiler; then + elif test -x /usr/sbin/system_profiler; then # Looks like a MacOSX system NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk '{print [$]5}'` FOUND_CORES=yes fi - if test "x$build_os" = xwindows; then - NUM_CORES=4 - fi - # For c/c++ code we run twice as many concurrent build # jobs than we have cores, otherwise we will stall on io. CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2` @@ -66,31 +58,26 @@ AC_DEFUN([BPERF_CHECK_MEMORY_SIZE], [ AC_MSG_CHECKING([for memory size]) - # Default to 1024MB + # Default to 1024 MB MEMORY_SIZE=1024 FOUND_MEM=no - if test -f /proc/cpuinfo; then - # Looks like a Linux system + if test -f /proc/meminfo; then + # Looks like a Linux (or cygwin) system MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print [$]2}'` MEMORY_SIZE=`expr $MEMORY_SIZE / 1024` FOUND_MEM=yes - fi - - if test -x /usr/sbin/prtconf; then + elif test -x /usr/sbin/prtconf; then # Looks like a Solaris system MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print [$]3 }'` FOUND_MEM=yes - fi - - if test -x /usr/sbin/system_profiler; then + elif test -x /usr/sbin/system_profiler; then # Looks like a MacOSX system MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk '{print [$]2}'` MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024` FOUND_MEM=yes - fi - - if test "x$build_os" = xwindows; then + elif test "x$build_os" = xwindows; then + # Windows, but without cygwin MEMORY_SIZE=`systeminfo | grep 'Total Physical Memory:' | awk '{ print [$]4 }' | sed 's/,//'` FOUND_MEM=yes fi @@ -98,7 +85,7 @@ if test "x$FOUND_MEM" = xyes; then AC_MSG_RESULT([$MEMORY_SIZE MB]) else - AC_MSG_RESULT([could not detect memory size defaulting to 1024MB!]) + AC_MSG_RESULT([could not detect memory size defaulting to 1024 MB!]) fi ]) @@ -240,46 +227,30 @@ AC_DEFUN_ONCE([BPERF_SETUP_SMART_JAVAC], [ -AC_ARG_WITH(server-java, [AS_HELP_STRING([--with-server-java], - [use this java binary for running the javac background server and other long running java tasks in the build process, - e.g. ---with-server-java="/opt/jrockit/bin/java -server"])]) +AC_ARG_WITH(sjavac-server-java, [AS_HELP_STRING([--with-sjavac-server-java], + [use this java binary for running the sjavac background server and other long running java tasks in the build process, + e.g. ---with-sjavac-server-java="/opt/jrockit/bin/java -server"])]) -if test "x$with_server_java" != x; then - SERVER_JAVA="$with_server_java" - FOUND_VERSION=`$SERVER_JAVA -version 2>&1 | grep " version \""` +if test "x$with_sjavac_server_java" != x; then + SJAVAC_SERVER_JAVA="$with_sjavac_server_java" + FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""` if test "x$FOUND_VERSION" = x; then - AC_MSG_ERROR([Could not execute server java: $SERVER_JAVA]) + AC_MSG_ERROR([Could not execute server java: $SJAVAC_SERVER_JAVA]) fi else - SERVER_JAVA="" + SJAVAC_SERVER_JAVA="" # Hotspot specific options. - ADD_JVM_ARG_IF_OK([-XX:+UseParallelOldGC],SERVER_JAVA,[$JAVA]) - ADD_JVM_ARG_IF_OK([-verbosegc],SERVER_JAVA,[$JAVA]) + ADD_JVM_ARG_IF_OK([-verbosegc],SJAVAC_SERVER_JAVA,[$JAVA]) # JRockit specific options. - ADD_JVM_ARG_IF_OK([-Xverbose:gc],SERVER_JAVA,[$JAVA]) - SERVER_JAVA="$JAVA $SERVER_JAVA" + ADD_JVM_ARG_IF_OK([-Xverbose:gc],SJAVAC_SERVER_JAVA,[$JAVA]) + SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA" fi -AC_SUBST(SERVER_JAVA) +AC_SUBST(SJAVAC_SERVER_JAVA) -AC_MSG_CHECKING([whether to use shared server for javac]) -AC_ARG_ENABLE([javac-server], [AS_HELP_STRING([--enable-javac-server], - [enable the shared javac server during the build process @<:@disabled@:>@])], - [ENABLE_JAVAC_SERVER="${enableval}"], [ENABLE_JAVAC_SERVER='no']) -AC_MSG_RESULT([$ENABLE_JAVAC_SERVER]) -if test "x$ENABLE_JAVAC_SERVER" = xyes; then - JAVAC_USE_REMOTE=true - JAVAC_SERVERS="$OUTPUT_ROOT/javacservers" -else - JAVAC_USE_REMOTE=false - JAVAC_SERVERS= -fi -AC_SUBST(JAVAC_USE_REMOTE) -AC_SUBST(JAVAC_SERVERS) - -AC_ARG_WITH(javac-server-cores, [AS_HELP_STRING([--with-javac-server-cores], - [use at most this number of concurrent threads on the javac server @<:@probed@:>@])]) -if test "x$with_javac_server_cores" != x; then - JAVAC_SERVER_CORES="$with_javac_server_cores" +AC_ARG_WITH(sjavac-server-cores, [AS_HELP_STRING([--with-sjavac-server-cores], + [use at most this number of concurrent threads on the sjavac server @<:@probed@:>@])]) +if test "x$with_sjavac_server_cores" != x; then + SJAVAC_SERVER_CORES="$with_sjavac_server_cores" else if test "$NUM_CORES" -gt 16; then # We set this arbitrary limit because we want to limit the heap @@ -287,86 +258,49 @@ # In the future we will make the javac compilers in the server # share more and more state, thus enabling us to use more and # more concurrent threads in the server. - JAVAC_SERVER_CORES="16" + SJAVAC_SERVER_CORES="16" else - JAVAC_SERVER_CORES="$NUM_CORES" + SJAVAC_SERVER_CORES="$NUM_CORES" fi if test "$MEMORY_SIZE" -gt "17000"; then MAX_HEAP_MEM=10000 - ADD_JVM_ARG_IF_OK([-d64],SERVER_JAVA,[$SERVER_JAVA]) - ADD_JVM_ARG_IF_OK([-Xms10G -Xmx10G],SERVER_JAVA,[$SERVER_JAVA]) - ADD_JVM_ARG_IF_OK([-Xmn2G],SERVER_JAVA,[$SERVER_JAVA]) + ADD_JVM_ARG_IF_OK([-d64],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA]) + ADD_JVM_ARG_IF_OK([-Xms10G -Xmx10G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA]) elif test "$MEMORY_SIZE" -gt "10000"; then MAX_HEAP_MEM=6000 - ADD_JVM_ARG_IF_OK([-d64],SERVER_JAVA,[$SERVER_JAVA]) - ADD_JVM_ARG_IF_OK([-Xms6G -Xmx6G],SERVER_JAVA,[$SERVER_JAVA]) - ADD_JVM_ARG_IF_OK([-Xmn1G],SERVER_JAVA,[$SERVER_JAVA]) + ADD_JVM_ARG_IF_OK([-d64],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA]) + ADD_JVM_ARG_IF_OK([-Xms6G -Xmx6G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA]) elif test "$MEMORY_SIZE" -gt "5000"; then MAX_HEAP_MEM=3000 - ADD_JVM_ARG_IF_OK([-d64],SERVER_JAVA,[$SERVER_JAVA]) - ADD_JVM_ARG_IF_OK([-Xms1G -Xmx3G],SERVER_JAVA,[$SERVER_JAVA]) - ADD_JVM_ARG_IF_OK([-Xmn256M],SERVER_JAVA,[$SERVER_JAVA]) + ADD_JVM_ARG_IF_OK([-d64],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA]) + ADD_JVM_ARG_IF_OK([-Xms1G -Xmx3G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA]) elif test "$MEMORY_SIZE" -gt "3800"; then MAX_HEAP_MEM=2500 - ADD_JVM_ARG_IF_OK([-Xms1G -Xmx2500M],SERVER_JAVA,[$SERVER_JAVA]) - ADD_JVM_ARG_IF_OK([-Xmn256M],SERVER_JAVA,[$SERVER_JAVA]) + ADD_JVM_ARG_IF_OK([-Xms1G -Xmx2500M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA]) elif test "$MEMORY_SIZE" -gt "1900"; then MAX_HEAP_MEM=1200 - ADD_JVM_ARG_IF_OK([-Xms700M -Xmx1200M],SERVER_JAVA,[$SERVER_JAVA]) - ADD_JVM_ARG_IF_OK([-Xmn256M],SERVER_JAVA,[$SERVER_JAVA]) + ADD_JVM_ARG_IF_OK([-Xms700M -Xmx1400M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA]) elif test "$MEMORY_SIZE" -gt "1000"; then MAX_HEAP_MEM=900 - ADD_JVM_ARG_IF_OK([-Xms400M -Xmx900M],SERVER_JAVA,[$SERVER_JAVA]) - ADD_JVM_ARG_IF_OK([-Xmn128M],SERVER_JAVA,[$SERVER_JAVA]) + ADD_JVM_ARG_IF_OK([-Xms400M -Xmx1100M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA]) else MAX_HEAP_MEM=512 - ADD_JVM_ARG_IF_OK([-Xms256M -Xmx512M],SERVER_JAVA,[$SERVER_JAVA]) - ADD_JVM_ARG_IF_OK([-Xmn128M],SERVER_JAVA,[$SERVER_JAVA]) + ADD_JVM_ARG_IF_OK([-Xms256M -Xmx512M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA]) fi + ADD_JVM_ARG_IF_OK([-XX:PermSize=32m],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA]) + ADD_JVM_ARG_IF_OK([-XX:MaxPermSize=160m],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA]) + ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA]) + MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501` - if test "$JAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then + if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then AC_MSG_CHECKING([if number of server cores must be reduced]) - JAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP" - AC_MSG_RESULT([yes, to $JAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB]) + SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP" + AC_MSG_RESULT([yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB]) fi fi -AC_SUBST(JAVAC_SERVER_CORES) - -AC_MSG_CHECKING([whether to track dependencies between Java packages]) -AC_ARG_ENABLE([javac-deps], [AS_HELP_STRING([--enable-javac-deps], - [enable the dependency tracking between Java packages @<:@disabled@:>@])], - [ENABLE_JAVAC_DEPS="${enableval}"], [ENABLE_JAVAC_DEPS='no']) -AC_MSG_RESULT([$ENABLE_JAVAC_DEPS]) -if test "x$ENABLE_JAVAC_DEPS" = xyes; then - JAVAC_USE_DEPS=true -else - JAVAC_USE_DEPS=false -fi -AC_SUBST(JAVAC_USE_DEPS) - -AC_MSG_CHECKING([whether to use multiple cores for javac compilation]) -AC_ARG_ENABLE([javac-multi-core], [AS_HELP_STRING([--enable-javac-multi-core], - [compile Java packages concurrently @<:@disabled@:>@])], - [ENABLE_JAVAC_MULTICORE="${enableval}"], [ENABLE_JAVAC_MULTICORE='no']) -AC_MSG_RESULT([$ENABLE_JAVAC_MULTICORE]) -if test "x$ENABLE_JAVAC_MULTICORE" = xyes; then - JAVAC_USE_MODE=MULTI_CORE_CONCURRENT -else - JAVAC_USE_MODE=SINGLE_THREADED_BATCH - if test "x$ENABLE_JAVAC_DEPS" = xyes; then - AC_MSG_WARN([Dependency tracking is not supported with single threaded batch compiles of Java source roots. Please add --disable-javac-deps to your configure options.]) - AC_MSG_WARN([Disabling dependency tracking for you now.]) - JAVAC_USE_DEPS=false - fi - if test "x$ENABLE_JAVAC_SERVER" = xyes; then - AC_MSG_WARN([The javac server will not be used since single threaded batch compiles are run within their own JVM. Please add --disable-javac-server to your configure options.]) - AC_MSG_WARN([Disabling javac server for you now.]) - JAVAC_USE_REMOTE=false - fi -fi -AC_SUBST(JAVAC_USE_MODE) +AC_SUBST(SJAVAC_SERVER_CORES) AC_MSG_CHECKING([whether to use sjavac]) AC_ARG_ENABLE([sjavac], [AS_HELP_STRING([--enable-sjavac], @@ -375,4 +309,11 @@ AC_MSG_RESULT([$ENABLE_SJAVAC]) AC_SUBST(ENABLE_SJAVAC) +if test "x$ENABLE_SJAVAC" = xyes; then + SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers" +else + SJAVAC_SERVER_DIR= +fi +AC_SUBST(SJAVAC_SERVER_DIR) + ])
--- a/common/autoconf/builddeps.conf.example Fri Sep 28 14:54:04 2012 +0400 +++ b/common/autoconf/builddeps.conf.example Fri Sep 28 10:54:12 2012 -0700 @@ -31,7 +31,7 @@ # Translate a configuration triplet/quadruplet into something # known by this configuration file. -# If no rewrite was found, then rewritten_target=${OPENJDK_TARGET_SYSTEM} +# If no rewrite was found, then rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME} REWRITE_i686_pc_linux_gnu=i686-unknown-linux-gnu REWRITE_i386_pc_solaris2_10=i686-sun-solaris2_10
--- a/common/autoconf/builddeps.m4 Fri Sep 28 14:54:04 2012 +0400 +++ b/common/autoconf/builddeps.m4 Fri Sep 28 10:54:12 2012 -0700 @@ -52,19 +52,19 @@ fi # Create build and target names that use _ instead of "-" and ".". # This is necessary to use them in variable names. - build_var=`echo ${OPENJDK_BUILD_SYSTEM} | tr '-' '_' | tr '.' '_'` - target_var=`echo ${OPENJDK_TARGET_SYSTEM} | tr '-' '_' | tr '.' '_'` + build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'` + target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'` # Extract rewrite information for build and target eval rewritten_build=\${REWRITE_${build_var}} if test "x$rewritten_build" = x; then - rewritten_build=${OPENJDK_BUILD_SYSTEM} + rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME} echo Build stays the same $rewritten_build else echo Rewriting build for builddeps into $rewritten_build fi eval rewritten_target=\${REWRITE_${target_var}} if test "x$rewritten_target" = x; then - rewritten_target=${OPENJDK_TARGET_SYSTEM} + rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME} echo Target stays the same $rewritten_target else echo Rewriting target for builddeps into $rewritten_target
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/autoconf/compare.sh.in Fri Sep 28 10:54:12 2012 -0700 @@ -0,0 +1,1669 @@ +#!/bin/bash +# +# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. +# 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. +# + +# This script is processed by configure before it's usable. It is run from +# the root of the build directory. + + +########################################################################################## +# Substitutions from autoconf + +LEGACY_BUILD_DIR=@OPENJDK_TARGET_OS@-@OPENJDK_TARGET_CPU_LEGACY@ + +OPENJDK_TARGET_OS="@OPENJDK_TARGET_OS@" +OPENJDK_TARGET_CPU="@OPENJDK_TARGET_CPU@" + +AWK="@AWK@" +CAT="@CAT@" +CMP="@CMP@" +CP="@CP@" +CUT="@CUT@" +DIFF="@DIFF@" +DUMPBIN="@UNCYGDRIVE@ @DUMPBIN@" +EXPR="@EXPR@" +FILE="@FILE@" +FIND="@FIND@" +GREP="@GREP@" +JAVAP="@UNCYGDRIVE@ @BOOT_JDK@/bin/javap" +LDD="@LDD@" +MKDIR="@MKDIR@" +NM="@NM@" +OBJDUMP="@OBJDUMP@" +OTOOL="@OTOOL@" +PRINTF="@PRINTF@" +READELF="@READELF@" +RM="@RM@" +SED="@SED@" +SORT="@SORT@" +STRIP="@POST_STRIP_CMD@" +TEE="@TEE@" +UNIQ="@UNIQ@" +UNZIP="@UNZIP@" + +SRC_ROOT="@SRC_ROOT@" + +if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then + READELF_CMD="otool -v -V -h -X -t -d" +elif [ -n "$READELF" ] && [ "$OPENJDK_TARGET_OS" != "windows" ]; then + READELF_CMD="$READELF -a" +fi + +if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then + LDD_CMD="$OTOOL -L" +elif [ -n "$LDD" ]; then + LDD_CMD="$LDD" +fi + +########################################################################################## +# Diff exceptions + +if [ "$OPENJDK_TARGET_OS" = "linux" ] && [ "$OPENJDK_TARGET_CPU" = "x86_64" ]; then +STRIP_BEFORE_COMPARE=" +./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so +./demo/jvmti/gctest/lib/libgctest.so +./demo/jvmti/heapTracker/lib/libheapTracker.so +./demo/jvmti/heapViewer/lib/libheapViewer.so +./demo/jvmti/hprof/lib/libhprof.so +./demo/jvmti/minst/lib/libminst.so +./demo/jvmti/mtrace/lib/libmtrace.so +./demo/jvmti/versionCheck/lib/libversionCheck.so +./demo/jvmti/waiters/lib/libwaiters.so +" + +KNOWN_BIN_DIFF=" +" + +ACCEPTED_BIN_DIFF=" +./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so +./demo/jvmti/gctest/lib/libgctest.so +./demo/jvmti/heapTracker/lib/libheapTracker.so +./demo/jvmti/heapViewer/lib/libheapViewer.so +./demo/jvmti/hprof/lib/libhprof.so +./demo/jvmti/minst/lib/libminst.so +./demo/jvmti/mtrace/lib/libmtrace.so +./demo/jvmti/versionCheck/lib/libversionCheck.so +./demo/jvmti/waiters/lib/libwaiters.so +./jre/lib/amd64/libattach.so +./jre/lib/amd64/libdt_socket.so +./jre/lib/amd64/libhprof.so +./jre/lib/amd64/libinstrument.so +./jre/lib/amd64/libjava_crw_demo.so +./jre/lib/amd64/libjsdt.so +./jre/lib/amd64/libjsig.so +./jre/lib/amd64/libmanagement.so +./jre/lib/amd64/libnpt.so +./jre/lib/amd64/libsaproc.so +./jre/lib/amd64/libverify.so +./jre/lib/amd64/server/libjsig.so +./jre/lib/amd64/server/libjvm.so +./bin/appletviewer +./bin/extcheck +./bin/idlj +./bin/jar +./bin/jarsigner +./bin/java +./bin/javac +./bin/javadoc +./bin/javah +./bin/javap +./bin/jcmd +./bin/jconsole +./bin/jdb +./bin/jhat +./bin/jinfo +./bin/jmap +./bin/jps +./bin/jrunscript +./bin/jsadebugd +./bin/jstack +./bin/jstat +./bin/jstatd +./bin/keytool +./bin/native2ascii +./bin/orbd +./bin/pack200 +./bin/policytool +./bin/rmic +./bin/rmid +./bin/rmiregistry +./bin/schemagen +./bin/serialver +./bin/servertool +./bin/tnameserv +./bin/wsgen +./bin/wsimport +./bin/xjc +./jre/bin/java +./jre/bin/keytool +./jre/bin/orbd +./jre/bin/pack200 +./jre/bin/policytool +./jre/bin/rmid +./jre/bin/rmiregistry +./jre/bin/servertool +./jre/bin/tnameserv +" + +KNOWN_SIZE_DIFF=" +" + +KNOWN_SYM_DIFF=" +" + +KNOWN_ELF_DIFF=" +./demo/jvmti/heapTracker/lib/libheapTracker.so +./demo/jvmti/hprof/lib/libhprof.so +./demo/jvmti/waiters/lib/libwaiters.so +" +fi + +if [ "$OPENJDK_TARGET_OS" = "solaris" ] && [ "$OPENJDK_TARGET_CPU" = "x86" ]; then + +STRIP_BEFORE_COMPARE=" +./demo/jni/Poller/lib/libPoller.so +./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so +./demo/jvmti/gctest/lib/libgctest.so +./demo/jvmti/heapTracker/lib/libheapTracker.so +./demo/jvmti/heapViewer/lib/libheapViewer.so +./demo/jvmti/hprof/lib/libhprof.so +./demo/jvmti/minst/lib/libminst.so +./demo/jvmti/mtrace/lib/libmtrace.so +./demo/jvmti/versionCheck/lib/libversionCheck.so +./demo/jvmti/waiters/lib/libwaiters.so +./jre/lib/i386/jexec +" + +SORT_SYMBOLS=" +./jre/lib/i386/client/libjvm.so +./jre/lib/i386/server/libjvm.so +" + +SKIP_BIN_DIFF="true" + +ACCEPTED_SMALL_SIZE_DIFF=" +./demo/jni/Poller/lib/libPoller.so +./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so +./demo/jvmti/gctest/lib/libgctest.so +./demo/jvmti/heapTracker/lib/libheapTracker.so +./demo/jvmti/heapViewer/lib/libheapViewer.so +./demo/jvmti/hprof/lib/libhprof.so +./demo/jvmti/minst/lib/libminst.so +./demo/jvmti/mtrace/lib/libmtrace.so +./demo/jvmti/versionCheck/lib/libversionCheck.so +./demo/jvmti/waiters/lib/libwaiters.so +./jre/lib/i386/client/libjvm.so +./jre/lib/i386/jli/libjli.so +./jre/lib/i386/libJdbcOdbc.so +./jre/lib/i386/libattach.so +./jre/lib/i386/libawt.so +./jre/lib/i386/libawt_headless.so +./jre/lib/i386/libawt_xawt.so +./jre/lib/i386/libdcpr.so +./jre/lib/i386/libdt_socket.so +./jre/lib/i386/libfontmanager.so +./jre/lib/i386/libhprof.so +./jre/lib/i386/libinstrument.so +./jre/lib/i386/libj2gss.so +./jre/lib/i386/libj2pcsc.so +./jre/lib/i386/libj2pkcs11.so +./jre/lib/i386/libj2ucrypto.so +./jre/lib/i386/libjaas_unix.so +./jre/lib/i386/libjava.so +./jre/lib/i386/libjava_crw_demo.so +./jre/lib/i386/libjawt.so +./jre/lib/i386/libjdwp.so +./jre/lib/i386/libjfr.so +./jre/lib/i386/libjpeg.so +./jre/lib/i386/libjsdt.so +./jre/lib/i386/libjsound.so +./jre/lib/i386/libkcms.so +./jre/lib/i386/libmanagement.so +./jre/lib/i386/libmlib_image.so +./jre/lib/i386/libnet.so +./jre/lib/i386/libnio.so +./jre/lib/i386/libnpt.so +./jre/lib/i386/libsctp.so +./jre/lib/i386/libsplashscreen.so +./jre/lib/i386/libsunec.so +./jre/lib/i386/libsunwjdga.so +./jre/lib/i386/libt2k.so +./jre/lib/i386/libunpack.so +./jre/lib/i386/libverify.so +./jre/lib/i386/libzip.so +./jre/lib/i386/server/libjvm.so +./bin/appletviewer +./bin/extcheck +./bin/idlj +./bin/jar +./bin/jarsigner +./bin/java +./bin/javac +./bin/javadoc +./bin/javah +./bin/javap +./bin/jcmd +./bin/jconsole +./bin/jdb +./bin/jhat +./bin/jinfo +./bin/jmap +./bin/jps +./bin/jrunscript +./bin/jsadebugd +./bin/jstack +./bin/jstat +./bin/jstatd +./bin/keytool +./bin/native2ascii +./bin/orbd +./bin/pack200 +./bin/policytool +./bin/rmic +./bin/rmid +./bin/rmiregistry +./bin/schemagen +./bin/serialver +./bin/servertool +./bin/tnameserv +./bin/unpack200 +./bin/wsgen +./bin/wsimport +./bin/xjc +./jre/bin/java +./jre/bin/keytool +./jre/bin/orbd +./jre/bin/pack200 +./jre/bin/policytool +./jre/bin/rmid +./jre/bin/rmiregistry +./jre/bin/servertool +./jre/bin/tnameserv +./jre/bin/unpack200 +./jre/lib/i386/jexec +" + +SKIP_ELF_DIFF="true" + +# libjvm.so differs in the random 15 char prefix on some symbols. +ACCEPTED_DIS_DIFF=" +./jre/lib/i386/client/libjvm.so +./jre/lib/i386/server/libjvm.so +" + +fi + +if [ "$OPENJDK_TARGET_OS" = "solaris" ] && [ "$OPENJDK_TARGET_CPU" = "x86_64" ]; then + +STRIP_BEFORE_COMPARE=" +./demo/jni/Poller/lib/amd64/libPoller.so +./demo/jvmti/compiledMethodLoad/lib/amd64/libcompiledMethodLoad.so +./demo/jvmti/gctest/lib/amd64/libgctest.so +./demo/jvmti/heapTracker/lib/amd64/libheapTracker.so +./demo/jvmti/heapViewer/lib/amd64/libheapViewer.so +./demo/jvmti/hprof/lib/amd64/libhprof.so +./demo/jvmti/minst/lib/amd64/libminst.so +./demo/jvmti/mtrace/lib/amd64/libmtrace.so +./demo/jvmti/versionCheck/lib/amd64/libversionCheck.so +./demo/jvmti/waiters/lib/amd64/libwaiters.so +" + +SORT_SYMBOLS=" +./jre/lib/amd64/server/libjvm.so +" + +SKIP_BIN_DIFF="true" + +ACCEPTED_SMALL_SIZE_DIFF=" +./demo/jni/Poller/lib/amd64/libPoller.so +./demo/jvmti/compiledMethodLoad/lib/amd64/libcompiledMethodLoad.so +./demo/jvmti/gctest/lib/amd64/libgctest.so +./demo/jvmti/heapTracker/lib/amd64/libheapTracker.so +./demo/jvmti/heapViewer/lib/amd64/libheapViewer.so +./demo/jvmti/hprof/lib/amd64/libhprof.so +./demo/jvmti/minst/lib/amd64/libminst.so +./demo/jvmti/mtrace/lib/amd64/libmtrace.so +./demo/jvmti/versionCheck/lib/amd64/libversionCheck.so +./demo/jvmti/waiters/lib/amd64/libwaiters.so +./jre/lib/amd64/jli/libjli.so +./jre/lib/amd64/libJdbcOdbc.so +./jre/lib/amd64/libattach.so +./jre/lib/amd64/libawt.so +./jre/lib/amd64/libawt_headless.so +./jre/lib/amd64/libawt_xawt.so +./jre/lib/amd64/libdcpr.so +./jre/lib/amd64/libdt_socket.so +./jre/lib/amd64/libfontmanager.so +./jre/lib/amd64/libhprof.so +./jre/lib/amd64/libinstrument.so +./jre/lib/amd64/libj2gss.so +./jre/lib/amd64/libj2pcsc.so +./jre/lib/amd64/libj2pkcs11.so +./jre/lib/amd64/libj2ucrypto.so +./jre/lib/amd64/libjaas_unix.so +./jre/lib/amd64/libjava.so +./jre/lib/amd64/libjava_crw_demo.so +./jre/lib/amd64/libjawt.so +./jre/lib/amd64/libjdwp.so +./jre/lib/amd64/libjfr.so +./jre/lib/amd64/libjpeg.so +./jre/lib/amd64/libjsdt.so +./jre/lib/amd64/libjsound.so +./jre/lib/amd64/libkcms.so +./jre/lib/amd64/libmanagement.so +./jre/lib/amd64/libmlib_image.so +./jre/lib/amd64/libnet.so +./jre/lib/amd64/libnio.so +./jre/lib/amd64/libnpt.so +./jre/lib/amd64/libsctp.so +./jre/lib/amd64/libsplashscreen.so +./jre/lib/amd64/libsunec.so +./jre/lib/amd64/libsunwjdga.so +./jre/lib/amd64/libt2k.so +./jre/lib/amd64/libunpack.so +./jre/lib/amd64/libverify.so +./jre/lib/amd64/libzip.so +./jre/lib/amd64/server/64/libjvm_db.so +./jre/lib/amd64/server/64/libjvm_dtrace.so +./bin/amd64/appletviewer +./bin/amd64/extcheck +./bin/amd64/idlj +./bin/amd64/jar +./bin/amd64/jarsigner +./bin/amd64/java +./bin/amd64/javac +./bin/amd64/javadoc +./bin/amd64/javah +./bin/amd64/javap +./bin/amd64/jcmd +./bin/amd64/jconsole +./bin/amd64/jdb +./bin/amd64/jhat +./bin/amd64/jinfo +./bin/amd64/jmap +./bin/amd64/jps +./bin/amd64/jrunscript +./bin/amd64/jsadebugd +./bin/amd64/jstack +./bin/amd64/jstat +./bin/amd64/jstatd +./bin/amd64/keytool +./bin/amd64/native2ascii +./bin/amd64/orbd +./bin/amd64/pack200 +./bin/amd64/policytool +./bin/amd64/rmic +./bin/amd64/rmid +./bin/amd64/rmiregistry +./bin/amd64/schemagen +./bin/amd64/serialver +./bin/amd64/servertool +./bin/amd64/tnameserv +./bin/amd64/unpack200 +./bin/amd64/wsgen +./bin/amd64/wsimport +./bin/amd64/xjc +./jre/bin/amd64/java +./jre/bin/amd64/keytool +./jre/bin/amd64/orbd +./jre/bin/amd64/pack200 +./jre/bin/amd64/policytool +./jre/bin/amd64/rmid +./jre/bin/amd64/rmiregistry +./jre/bin/amd64/servertool +./jre/bin/amd64/tnameserv +./jre/bin/amd64/unpack200 +./jre/lib/amd64/jexec +" + +SKIP_ELF_DIFF="true" + +# Can't find an explaination for the diff in libmlib_image.so. +KNOWN_DIS_DIFF=" +./jre/lib/amd64/libmlib_image.so +" +# libjvm.so differs in the random 15 char prefix on some symbols. +ACCEPTED_DIS_DIFF=" +./jre/lib/amd64/server/libjvm.so +" + +fi + +if [ "$OPENJDK_TARGET_OS" = "windows" ] && [ "$OPENJDK_TARGET_CPU" = "x86_64" ]; then + +ACCEPTED_BIN_DIFF=" +./bin/jli.dll +./demo/jvmti/compiledMethodLoad/lib/compiledMethodLoad.dll +./demo/jvmti/gctest/lib/gctest.dll +./demo/jvmti/heapTracker/lib/heapTracker.dll +./demo/jvmti/heapViewer/lib/heapViewer.dll +./demo/jvmti/hprof/lib/hprof.dll +./demo/jvmti/minst/lib/minst.dll +./demo/jvmti/mtrace/lib/mtrace.dll +./demo/jvmti/versionCheck/lib/versionCheck.dll +./demo/jvmti/waiters/lib/waiters.dll +./jre/bin/attach.dll +./jre/bin/awt.dll +./jre/bin/dcpr.dll +./jre/bin/dt_shmem.dll +./jre/bin/dt_socket.dll +./jre/bin/fontmanager.dll +./jre/bin/hprof.dll +./jre/bin/instrument.dll +./jre/bin/j2pcsc.dll +./jre/bin/j2pkcs11.dll +./jre/bin/jaas_nt.dll +./jre/bin/java.dll +./jre/bin/java_crw_demo.dll +./jre/bin/jawt.dll +./jre/bin/JdbcOdbc.dll +./jre/bin/jdwp.dll +./jre/bin/jfr.dll +./jre/bin/jli.dll +./jre/bin/jpeg.dll +./jre/bin/jsdt.dll +./jre/bin/jsound.dll +./jre/bin/jsoundds.dll +./jre/bin/kcms.dll +./jre/bin/management.dll +./jre/bin/mlib_image.dll +./jre/bin/net.dll +./jre/bin/nio.dll +./jre/bin/npt.dll +./jre/bin/sawindbg.dll +./jre/bin/server/jvm.dll +./jre/bin/splashscreen.dll +./jre/bin/sunec.dll +./jre/bin/sunmscapi.dll +./jre/bin/t2k.dll +./jre/bin/unpack.dll +./jre/bin/verify.dll +./jre/bin/w2k_lsa_auth.dll +./jre/bin/zip.dll +./bin/appletviewer.exe +./bin/extcheck.exe +./bin/idlj.exe +./bin/jar.exe +./bin/jarsigner.exe +./bin/java.exe +./bin/javac.exe +./bin/javadoc.exe +./bin/javah.exe +./bin/javap.exe +./bin/java-rmi.exe +./bin/javaw.exe +./bin/jcmd.exe +./bin/jconsole.exe +./bin/jdb.exe +./bin/jhat.exe +./bin/jinfo.exe +./bin/jmap.exe +./bin/jps.exe +./bin/jrunscript.exe +./bin/jsadebugd.exe +./bin/jstack.exe +./bin/jstat.exe +./bin/jstatd.exe +./bin/keytool.exe +./bin/kinit.exe +./bin/klist.exe +./bin/ktab.exe +./bin/native2ascii.exe +./bin/orbd.exe +./bin/pack200.exe +./bin/policytool.exe +./bin/rmic.exe +./bin/rmid.exe +./bin/rmiregistry.exe +./bin/schemagen.exe +./bin/serialver.exe +./bin/servertool.exe +./bin/tnameserv.exe +./bin/unpack200.exe +./bin/wsgen.exe +./bin/wsimport.exe +./bin/xjc.exe +./jre/bin/java.exe +./jre/bin/java-rmi.exe +./jre/bin/javaw.exe +./jre/bin/keytool.exe +./jre/bin/kinit.exe +./jre/bin/klist.exe +./jre/bin/ktab.exe +./jre/bin/orbd.exe +./jre/bin/pack200.exe +./jre/bin/policytool.exe +./jre/bin/rmid.exe +./jre/bin/rmiregistry.exe +./jre/bin/servertool.exe +./jre/bin/tnameserv.exe +./jre/bin/unpack200.exe +" + +KNOWN_SIZE_DIFF=" +./demo/jvmti/heapTracker/lib/heapTracker.dll +./demo/jvmti/minst/lib/minst.dll +./jre/bin/awt.dll +./jre/bin/java_crw_demo.dll +./bin/java.exe +./bin/javaw.exe +./bin/unpack200.exe +./jre/bin/java.exe +./jre/bin/javaw.exe +./jre/bin/unpack200.exe +" + +KNOWN_SYM_DIFF=" +./jre/bin/awt.dll +./jre/bin/java_crw_demo.dll +" +fi + + + +if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then +ACCEPTED_JARZIP_CONTENTS=" +/META-INF/INDEX.LIST +" + +KNOWN_BIN_DIFF=" +./jre/lib/libJObjC.dylib +./jre/lib/libsaproc.dylib +./jre/lib/server/libjvm.dylib +" + +ACCEPTED_BIN_DIFF=" +./bin/appletviewer +./bin/extcheck +./bin/idlj +./bin/jar +./bin/jarsigner +./bin/java +./bin/javac +./bin/javadoc +./bin/javah +./bin/javap +./bin/jcmd +./bin/jconsole +./bin/jdb +./bin/jhat +./bin/jinfo +./bin/jmap +./bin/jps +./bin/jrunscript +./bin/jsadebugd +./bin/jstack +./bin/jstat +./bin/jstatd +./bin/keytool +./bin/native2ascii +./bin/orbd +./bin/pack200 +./bin/policytool +./bin/rmic +./bin/rmid +./bin/rmiregistry +./bin/schemagen +./bin/serialver +./bin/servertool +./bin/tnameserv +./bin/wsgen +./bin/wsimport +./bin/xjc +./jre/bin/java +./jre/bin/keytool +./jre/bin/orbd +./jre/bin/pack200 +./jre/bin/policytool +./jre/bin/rmid +./jre/bin/rmiregistry +./jre/bin/servertool +./jre/bin/tnameserv +" + +KNOWN_SIZE_DIFF=" +./jre/lib/libJObjC.dylib +./jre/lib/server/libjvm.dylib +" + +KNOWN_SYM_DIFF=" +./jre/lib/libJObjC.dylib +./jre/lib/server/libjvm.dylib +" + +KNOWN_ELF_DIFF=" +./jre/lib/libJObjC.dylib +./jre/lib/server/libjvm.dylib +" + +SKIP_DIS_DIFF="true" + +fi + +########################################################################################## +# Compare text files and ignore specific differences: +# +# * Timestamps in Java sources generated by idl2java +# * Sorting order and cleanup style in .properties files + +diff_text() { + OTHER_FILE=$1 + THIS_FILE=$2 + + SUFFIX="${THIS_FILE##*.}" + + TMP=1 + + if [[ "$THIS_FILE" = *"META-INF/MANIFEST.MF" ]]; then + TMP=$(LANG=C $DIFF $OTHER_FILE $THIS_FILE | \ + $GREP '^[<>]' | \ + $SED -e '/[<>] Ant-Version: Apache Ant .*/d' \ + -e '/[<>] Created-By: .* (Oracle Corporation).*/d') + fi + if test "x$SUFFIX" = "xjava"; then + TMP=$(LANG=C $DIFF $OTHER_FILE $THIS_FILE | \ + $GREP '^[<>]' | \ + $SED -e '/[<>] \* from.*\.idl/d' \ + -e '/[<>] \*.*[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}.*/d' \ + -e '/[<>] \*.*[0-9]\{4\} [0-9][0-9]*:[0-9]\{2\}:[0-9]\{2\}.*/d' \ + -e '/\/\/ Generated from input file.*/d' \ + -e '/\/\/ This file was generated AUTOMATICALLY from a template file.*/d' \ + -e '/\/\/ java GenerateCharacter.*/d') + fi + # Ignore date strings in class files. + # On Macosx the system sources for generated java classes produce different output on + # consequtive invokations seemingly randomly. + # For example a method parameter randomly named "thePoint" or "aPoint". Ignore this. + if test "x$SUFFIX" = "xclass"; 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 '/[<>].*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') + fi + if test "x$SUFFIX" = "xproperties"; then + $CAT $OTHER_FILE | $SED -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' -e 's/#.*/#/g' \ + | $SED -f "$SRC_ROOT/common/bin/unicode2x.sed" \ + | $SED -e '/^#/d' -e '/^$/d' \ + -e :a -e '/\\$/N; s/\\\n//; ta' \ + -e 's/^[ \t]*//;s/[ \t]*$//' \ + -e 's/\\=/=/' | LANG=C $SORT > $OTHER_FILE.cleaned + TMP=$(LANG=C $DIFF $OTHER_FILE.cleaned $THIS_FILE) + fi + if test -n "$TMP"; then + echo Files $OTHER_FILE and $THIS_FILE differ + return 1 + fi + + return 0 +} + +########################################################################################## +# Compare directory structure + +compare_dirs() { + THIS_DIR=$1 + OTHER_DIR=$2 + WORK_DIR=$3 + + mkdir -p $WORK_DIR + + (cd $OTHER_DIR && $FIND . -type d | $SORT > $WORK_DIR/other_dirs) + (cd $THIS_DIR && $FIND . -type d | $SORT > $WORK_DIR/this_dirs) + + echo -n Directory structure... + if $DIFF $WORK_DIR/other_dirs $WORK_DIR/this_dirs > /dev/null; then + echo Identical! + else + echo Differences found. + REGRESSIONS=true + # Differences in directories found. + ONLY_OTHER=$($DIFF $WORK_DIR/other_dirs $WORK_DIR/this_dirs | $GREP '<') + if [ "$ONLY_OTHER" ]; then + echo Only in $OTHER + echo $ONLY_OTHER | $SED 's|< ./|\t|g' | $SED 's/ /\n/g' + fi + # Differences in directories found. + ONLY_THIS=$($DIFF $WORK_DIR/other_dirs $WORK_DIR/this_dirs | $GREP '>') + if [ "$ONLY_THIS" ]; then + echo Only in $THIS + echo $ONLY_THIS | $SED 's|> ./|\t|g' | $SED 's/ /\n/g' + fi + fi +} + + +########################################################################################## +# Compare file structure + +compare_files() { + THIS_DIR=$1 + OTHER_DIR=$2 + WORK_DIR=$3 + + mkdir -p $WORK_DIR + + (cd $OTHER_DIR && $FIND . -type f | $SORT > $WORK_DIR/other_files) + (cd $THIS_DIR && $FIND . -type f | $SORT > $WORK_DIR/this_files) + + echo -n File names... + if diff $WORK_DIR/other_files $WORK_DIR/this_files > /dev/null; then + echo Identical! + else + echo Differences found. + REGRESSIONS=true + # Differences in directories found. + ONLY_OTHER=$(diff $WORK_DIR/other_files $WORK_DIR/this_files | $GREP '<') + if [ "$ONLY_OTHER" ]; then + echo Only in $OTHER + echo "$ONLY_OTHER" | sed 's|< ./| |g' + fi + # Differences in directories found. + ONLY_THIS=$(diff $WORK_DIR/other_files $WORK_DIR/this_files | $GREP '>') + if [ "$ONLY_THIS" ]; then + echo Only in $THIS + echo "$ONLY_THIS" | sed 's|> ./| |g' + fi + fi +} + + +########################################################################################## +# Compare permissions + +compare_permissions() { + THIS_DIR=$1 + OTHER_DIR=$2 + WORK_DIR=$3 + + mkdir -p $WORK_DIR + + echo -n Permissions... + found="" + for f in `cd $OTHER_DIR && $FIND . -type f` + do + if [ ! -f ${OTHER_DIR}/$f ]; then continue; fi + if [ ! -f ${THIS_DIR}/$f ]; then continue; fi + OP=`ls -l ${OTHER_DIR}/$f | awk '{printf("%.10s\n", $1);}'` + 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" + fi + done + if [ -z "$found" ]; then + echo "Identical!" + else + REGRESSIONS=true + fi +} + +########################################################################################## +# Compare file command output + +compare_file_types() { + THIS_DIR=$1 + OTHER_DIR=$2 + WORK_DIR=$3 + + $MKDIR -p $WORK_DIR + + echo -n File types... + found="" + for f in `cd $OTHER_DIR && $FIND . -type f` + do + if [ ! -f ${OTHER_DIR}/$f ]; then continue; fi + if [ ! -f ${THIS_DIR}/$f ]; then continue; fi + OF=`cd ${OTHER_DIR} && $FILE $f` + TF=`cd ${THIS_DIR} && $FILE $f` + if [ "$f" = "./src.zip" ] || [ "$f" = "./jre/lib/JObjC.jar" ] || [ "$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" + fi + done + if [ -z "$found" ]; then + echo "Identical!" + else + REGRESSIONS=true + fi +} + +########################################################################################## +# Compare the rest of the files + +compare_general_files() { + THIS_DIR=$1 + OTHER_DIR=$2 + WORK_DIR=$3 + + 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 "*.pdb" ! -name "*.exp" ! -name "*.ilk" \ + ! -name "*.lib" \ + | $GREP -v "./bin/" | $SORT | $FILTER) + + echo General files... + for f in $GENERAL_FILES + do + if [ -e $OTHER_DIR/$f ]; then + DIFF_OUT=$($DIFF $OTHER_DIR/$f $THIS_DIR/$f 2>&1) + if [ -n "$DIFF_OUT" ]; then + echo $f + REGRESSIONS=true + if [ "$SHOW_DIFFS" = "true" ]; then + echo "$DIFF_OUT" + fi + fi + fi + done + + +} + +########################################################################################## +# Compare zip file + +compare_zip_file() { + THIS_DIR=$1 + OTHER_DIR=$2 + WORK_DIR=$3 + ZIP_FILE=$4 + + THIS_ZIP=$THIS_DIR/$ZIP_FILE + OTHER_ZIP=$OTHER_DIR/$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! + return 2 + fi + + UNARCHIVE="$UNZIP -q" + + TYPE="$THIS_SUFFIX" + + if $CMP $OTHER_ZIP $THIS_ZIP > /dev/null + then + return 0 + fi + # Not quite identical, the might still contain the same data. + # Unpack the jar/zip files in temp dirs + + THIS_UNZIPDIR=$WORK_DIR/$ZIP_FILE.this + OTHER_UNZIPDIR=$WORK_DIR/$ZIP_FILE.other + $RM -rf $THIS_UNZIPDIR $OTHER_UNZIPDIR + $MKDIR -p $THIS_UNZIPDIR + $MKDIR -p $OTHER_UNZIPDIR + (cd $THIS_UNZIPDIR && $UNARCHIVE $THIS_ZIP) + (cd $OTHER_UNZIPDIR && $UNARCHIVE $OTHER_ZIP) + + CONTENTS_DIFF_FILE=$WORK_DIR/$ZIP_FILE.diff + LANG=C $DIFF -rq $OTHER_UNZIPDIR $THIS_UNZIPDIR > $CONTENTS_DIFF_FILE + + ONLY_OTHER=$($GREP "^Only in $OTHER_UNZIPDIR" $CONTENTS_DIFF_FILE) + ONLY_THIS=$($GREP "^Only in $THIS_UNZIPDIR" $CONTENTS_DIFF_FILE) + + return_value=0 + + if [ -n "$ONLY_OTHER" ]; then + echo " Only OTHER $ZIP_FILE contains:" + echo "$ONLY_OTHER" | sed "s|Only in $OTHER_UNZIPDIR| |"g | sed 's|: |/|g' + return_value=1 + fi + + if [ -n "$ONLY_THIS" ]; then + echo " Only THIS $ZIP_FILE contains:" + echo "$ONLY_THIS" | sed "s|Only in $THIS_UNZIPDIR| |"g | sed 's|: |/|g' + return_value=1 + fi + + DIFFING_FILES=$($GREP differ $CONTENTS_DIFF_FILE | $CUT -f 2 -d ' ' | $SED "s|$OTHER_UNZIPDIR/||g") + + $RM -f $WORK_DIR/$ZIP_FILE.diffs + for file in $DIFFING_FILES; do + if [[ "$ACCEPTED_JARZIP_CONTENTS" != *"$file"* ]]; then + diff_text $OTHER_UNZIPDIR/$file $THIS_UNZIPDIR/$file >> $WORK_DIR/$ZIP_FILE.diffs + fi + done + + if [ -s "$WORK_DIR/$ZIP_FILE.diffs" ]; then + return_value=1 + echo " Differing files in $ZIP_FILE" + $CAT $WORK_DIR/$ZIP_FILE.diffs | $GREP differ | cut -f 2 -d ' ' | \ + $SED "s|$OTHER_UNZIPDIR| |g" > $WORK_DIR/$ZIP_FILE.difflist + $CAT $WORK_DIR/$ZIP_FILE.difflist + + if [ -n "$SHOW_DIFFS" ]; then + for i in $(cat $WORK_DIR/$ZIP_FILE.difflist) ; do + if [ -f "${OTHER_UNZIPDIR}/$i.javap" ]; then + LANG=C $DIFF ${OTHER_UNZIPDIR}/$i.javap ${THIS_UNZIPDIR}/$i.javap + elif [ -f "${OTHER_UNZIPDIR}/$i.cleaned" ]; then + LANG=C $DIFF ${OTHER_UNZIPDIR}/$i.cleaned ${THIS_UNZIPDIR}/$i + else + LANG=C $DIFF ${OTHER_UNZIPDIR}/$i ${THIS_UNZIPDIR}/$i + fi + done + fi + fi + + return $return_value +} + + +########################################################################################## +# Compare all zip files + +compare_all_zip_files() { + THIS_DIR=$1 + OTHER_DIR=$2 + WORK_DIR=$3 + + ZIPS=$(cd $THIS_DIR && $FIND . -type f -name "*.zip" | $SORT | $FILTER ) + + if [ -n "$ZIPS" ]; then + echo Zip files... + + return_value=0 + for f in $ZIPS; do + if [ -f "$OTHER_DIR/$f" ]; then + compare_zip_file $THIS_DIR $OTHER_DIR $WORK_DIR $f + if [ "$?" != "0" ]; then + return_value=1 + REGRESSIONS=true + fi + fi + done + fi + + return $return_value +} + +########################################################################################## +# Compare all jar files + +compare_all_jar_files() { + THIS_DIR=$1 + OTHER_DIR=$2 + WORK_DIR=$3 + + # TODO filter? + ZIPS=$(cd $THIS_DIR && $FIND . -type f -name "*.jar" | $SORT | $FILTER) + + if [ -n "$ZIPS" ]; then + echo Jar files... + + return_value=0 + for f in $ZIPS; do + if [ -f "$OTHER_DIR/$f" ]; then + compare_zip_file $THIS_DIR $OTHER_DIR $WORK_DIR $f + if [ "$?" != "0" ]; then + return_value=1 + REGRESSIONS=true + fi + fi + done + fi + + return $return_value +} + +########################################################################################## +# Compare binary (executable/library) file + +compare_bin_file() { + THIS_DIR=$1 + OTHER_DIR=$2 + WORK_DIR=$3 + BIN_FILE=$4 + + THIS_FILE=$THIS_DIR/$BIN_FILE + OTHER_FILE=$OTHER_DIR/$BIN_FILE + NAME=$(basename $BIN_FILE) + WORK_FILE_BASE=$WORK_DIR/$BIN_FILE + FILE_WORK_DIR=$(dirname $WORK_FILE_BASE) + + $MKDIR -p $FILE_WORK_DIR + + ORIG_THIS_FILE="$THIS_FILE" + ORIG_OTHER_FILE="$OTHER_FILE" + + if [[ "$STRIP_BEFORE_COMPARE" = *"$BIN_FILE"* ]]; then + THIS_STRIPPED_FILE=$FILE_WORK_DIR/this/$NAME + OTHER_STRIPPED_FILE=$FILE_WORK_DIR/other/$NAME + $MKDIR -p $FILE_WORK_DIR/this $FILE_WORK_DIR/other + $CP $THIS_FILE $THIS_STRIPPED_FILE + $CP $OTHER_FILE $OTHER_STRIPPED_FILE + $STRIP $THIS_STRIPPED_FILE + $STRIP $OTHER_STRIPPED_FILE + THIS_FILE="$THIS_STRIPPED_FILE" + OTHER_FILE="$OTHER_STRIPPED_FILE" + 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" + fi + return 0 + fi + BIN_MSG=" diff " + if [[ "$ACCEPTED_BIN_DIFF" != *"$BIN_FILE"* ]]; then + DIFF_BIN=true + if [[ "$KNOWN_BIN_DIFF" != *"$BIN_FILE"* ]]; then + BIN_MSG="*$BIN_MSG*" + REGRESSIONS=true + else + BIN_MSG=" $BIN_MSG " + fi + else + BIN_MSG="($BIN_MSG)" + DIFF_BIN= + fi + fi + + THIS_SIZE=$(ls -l "$THIS_FILE" | awk '{ print $5 }') + OTHER_SIZE=$(ls -l "$OTHER_FILE" | awk '{ print $5 }') + if [ $THIS_SIZE -ne $OTHER_SIZE ]; then + DIFF_SIZE_NUM=$($EXPR $THIS_SIZE - $OTHER_SIZE) + 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 + SIZE_MSG="($SIZE_MSG)" + DIFF_SIZE= + else + if [[ "$ACCEPTED_SIZE_DIFF" != *"$BIN_FILE"* ]]; then + DIFF_SIZE=true + if [[ "$KNOWN_SIZE_DIFF" != *"$BIN_FILE"* ]]; then + SIZE_MSG="*$SIZE_MSG*" + REGRESSIONS=true + else + SIZE_MSG=" $SIZE_MSG " + fi + else + SIZE_MSG="($SIZE_MSG)" + DIFF_SIZE= + fi + fi + else + SIZE_MSG=" " + DIFF_SIZE= + if [[ "$KNOWN_SIZE_DIFF $ACCEPTED_SIZE_DIFF" = *"$BIN_FILE"* ]]; then + SIZE_MSG=" ! " + fi + fi + + if [[ "$SORT_SYMBOLS" = *"$BIN_FILE"* ]]; then + SYM_SORT_CMD="sort" + else + SYM_SORT_CMD="cat" + fi + + # Check symbols + if [ "$OPENJDK_TARGET_OS" = "windows" ]; then + $DUMPBIN -exports $OTHER_FILE | $GREP " = " | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.other + $DUMPBIN -exports $THIS_FILE | $GREP " = " | $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 | $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 | $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 | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.other + $NM -a $ORIG_THIS_FILE | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.this + fi + + LANG=C $DIFF $WORK_FILE_BASE.symbols.other $WORK_FILE_BASE.symbols.this > $WORK_FILE_BASE.symbols.diff + if [ -s $WORK_FILE_BASE.symbols.diff ]; then + SYM_MSG=" diff " + if [[ "$ACCEPTED_SYM_DIFF" != *"$BIN_FILE"* ]]; then + DIFF_SYM=true + if [[ "$KNOWN_SYM_DIFF" != *"$BIN_FILE"* ]]; then + SYM_MSG="*$SYM_MSG*" + REGRESSIONS=true + else + SYM_MSG=" $SYM_MSG " + fi + else + SYM_MSG="($SYM_MSG)" + DIFF_SYM= + fi + else + SYM_MSG=" " + DIFF_SYM= + if [[ "$KNOWN_SYM_DIFF $ACCEPTED_SYM_DIFF" = *"$BIN_FILE"* ]]; then + SYM_MSG=" ! " + fi + fi + + # Check dependencies + if [ -n "$LDD_CMD" ];then + (cd $FILE_WORK_DIR && $CP $OTHER_FILE . && $LDD_CMD $NAME | $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 | $AWK '{ print $1;}' | $SORT | $TEE $WORK_FILE_BASE.deps.this | $UNIQ > $WORK_FILE_BASE.deps.this.uniq) + (cd $FILE_WORK_DIR && $RM -f $NAME) + + LANG=C $DIFF $WORK_FILE_BASE.deps.other $WORK_FILE_BASE.deps.this > $WORK_FILE_BASE.deps.diff + LANG=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.uniq ]; then + DEP_MSG=" diff " + else + DEP_MSG=" redun " + fi + if [[ "$ACCEPTED_DEP_DIFF" != *"$BIN_FILE"* ]]; then + DIFF_DEP=true + if [[ "$KNOWN_DEP_DIFF" != *"$BIN_FILE"* ]]; then + DEP_MSG="*$DEP_MSG*" + REGRESSIONS=true + else + DEP_MSG=" $DEP_MSG " + fi + else + DEP_MSG="($DEP_MSG)" + DIFF_DEP= + fi + else + DEP_MSG=" " + DIFF_DEP= + if [[ "$KNOWN_DEP_DIFF $ACCEPTED_DEP_DIFF" = *"$BIN_FILE"* ]]; then + DEP_MSG=" ! " + fi + fi + fi + + # Compare readelf output + if [ -n "$READELF_CMD" ] && [ -z "$SKIP_ELF_DIFF" ]; then + $READELF_CMD $OTHER_FILE > $WORK_FILE_BASE.readelf.other 2>&1 + $READELF_CMD $THIS_FILE > $WORK_FILE_BASE.readelf.this 2>&1 + + LANG=C $DIFF $WORK_FILE_BASE.readelf.other $WORK_FILE_BASE.readelf.this > $WORK_FILE_BASE.readelf.diff + + if [ -s $WORK_FILE_BASE.readelf.diff ]; then + ELF_DIFF_SIZE=$(ls -n $WORK_FILE_BASE.readelf.diff | awk '{print $5}') + ELF_MSG=$($PRINTF "%8d" $ELF_DIFF_SIZE) + if [[ "$ACCEPTED_ELF_DIFF" != *"$BIN_FILE"* ]]; then + DIFF_ELF=true + if [[ "$KNOWN_ELF_DIFF" != *"$BIN_FILE"* ]]; then + ELF_MSG="*$ELF_MSG*" + REGRESSIONS=true + else + ELF_MSG=" $ELF_MSG " + fi + else + ELF_MSG="($ELF_MSG)" + DIFF_ELF= + fi + else + ELF_MSG=" " + DIFF_ELF= + if [[ "$KNOWN_DEP_DIFF $ACCEPTED_DEP_DIFF" = *"$BIN_FILE"* ]]; then + ELF_MSG=" ! " + fi + fi + fi + + # Compare disassemble output + if [ -f "$OBJDUMP" ] && [ -z "$SKIP_DIS_DIFF" ]; then + $OBJDUMP -d $OTHER_FILE | $GREP -v $NAME > $WORK_FILE_BASE.dis.other 2>&1 + $OBJDUMP -d $THIS_FILE | $GREP -v $NAME > $WORK_FILE_BASE.dis.this 2>&1 + + LANG=C $DIFF $WORK_FILE_BASE.dis.other $WORK_FILE_BASE.dis.this > $WORK_FILE_BASE.dis.diff + + if [ -s $WORK_FILE_BASE.dis.diff ]; then + DIS_DIFF_SIZE=$(ls -n $WORK_FILE_BASE.dis.diff | awk '{print $5}') + DIS_MSG=$($PRINTF "%8d" $DIS_DIFF_SIZE) + if [[ "$ACCEPTED_DIS_DIFF" != *"$BIN_FILE"* ]]; then + DIFF_DIS=true + if [[ "$KNOWN_DIS_DIFF" != *"$BIN_FILE"* ]]; then + DIS_MSG="*$DIS_MSG*" + REGRESSIONS=true + else + DIS_MSG=" $DIS_MSG " + fi + else + DIS_MSG="($DIS_MSG)" + DIFF_DIS= + fi + else + DIS_MSG=" " + DIFF_DIS= + if [[ "$KNOWN_DEP_DIFF $ACCEPTED_DEP_DIFF" = *"$BIN_FILE"* ]]; then + DIS_MSG=" ! " + fi + fi + fi + + + if [ -n "$DIFF_BIN$DIFF_SIZE$DIFF_SYM$DIFF_DEP$DIFF_ELF$DIFF_DIS" ] || [ -n "$VERBOSE" ]; then + if [ -n "$BIN_MSG" ]; then echo -n "$BIN_MSG:"; fi + if [ -n "$SIZE_MSG" ]; then echo -n "$SIZE_MSG:"; fi + if [ -n "$SYM_MSG" ]; then echo -n "$SYM_MSG:"; fi + if [ -n "$DEP_MSG" ]; then echo -n "$DEP_MSG:"; fi + if [ -n "$ELF_MSG" ]; then echo -n "$ELF_MSG:"; fi + if [ -n "$DIS_MSG" ]; then echo -n "$DIS_MSG:"; fi + echo " $BIN_FILE" + if [ "$SHOW_DIFFS" = "true" ]; then + if [ -s "$WORK_FILE_BASE.symbols.diff" ]; then + echo "Symbols diff:" + $CAT $WORK_FILE_BASE.symbols.diff + fi + if [ -s "$WORK_FILE_BASE.deps.diff" ]; then + echo "Deps diff:" + $CAT $WORK_FILE_BASE.deps.diff + fi + if [ -s "$WORK_FILE_BASE.readelf.diff" ]; then + echo "Readelf diff:" + $CAT $WORK_FILE_BASE.readelf.diff + fi + if [ -s "$WORK_FILE_BASE.dis.diff" ]; then + echo "Disassembly diff:" + $CAT $WORK_FILE_BASE.dis.diff + fi + fi + return 1 + fi + return 0 +} + +########################################################################################## +# Print binary diff header + +print_binary_diff_header() { + if [ -z "$SKIP_BIN_DIFF" ]; then echo -n " Binary :"; fi + if [ -z "$SKIP_SIZE_DIFF" ]; then echo -n " Size :"; fi + if [ -z "$SKIP_SYM_DIFF" ]; then echo -n " Symbols :"; fi + if [ -z "$SKIP_DEP_DIFF" ]; then echo -n " Deps :"; fi + if [ -z "$SKIP_ELF_DIFF" ]; then echo -n " Readelf :"; fi + if [ -z "$SKIP_DIS_DIFF" ]; then echo -n " Disass :"; fi + echo +} + +########################################################################################## +# Compare all libraries + +compare_all_libs() { + THIS_DIR=$1 + OTHER_DIR=$2 + WORK_DIR=$3 + + LIBS=$(cd $THIS_DIR && $FIND . -name 'lib*.so' -o -name '*.dylib' -o -name '*.dll' | $SORT | $FILTER) + + if [ -n "$LIBS" ]; then + echo Libraries... + print_binary_diff_header + for l in $LIBS; do + if [ -f "$OTHER_DIR/$l" ]; then + compare_bin_file $THIS_DIR $OTHER_DIR $WORK_DIR $l + if [ "$?" != "0" ]; then + return_value=1 + fi + fi + done + fi + + return $return_value +} + +########################################################################################## +# Compare all executables + +compare_all_execs() { + THIS_DIR=$1 + OTHER_DIR=$2 + WORK_DIR=$3 + + if [ "$OPENJDK_TARGET_OS" = "windows" ]; then + EXECS=$(cd $THIS_DIR && $FIND . -type f -name '*.exe' | $SORT | $FILTER) + else + EXECS=$(cd $THIS_DIR && $FIND . -name db -prune -o -type f -perm -100 \! \( -name '*.so' -o -name '*.dylib' -o -name '*.dll' -o -name '*.cgi' \) | $SORT | $FILTER) + fi + + if [ -n "$EXECS" ]; then + echo Executables... + print_binary_diff_header + for e in $EXECS; do + if [ -f "$OTHER_DIR/$e" ]; then + compare_bin_file $THIS_DIR $OTHER_DIR $WORK_DIR $e + if [ "$?" != "0" ]; then + return_value=1 + fi + fi + done + fi + + return $return_value +} + +########################################################################################## +# Initiate configuration + +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) + fi +fi + +THIS="$( cd "$( dirname "$0" )" && pwd )" +echo "$THIS" +THIS_SCRIPT="$0" + +if [ -z "$1" ] || [ "$1" = "-h" ] || [ "$1" = "-?" ] || [ "$1" = "/h" ] || [ "$1" = "/?" ] || [ "$1" = "-help" ] || [ "$1" = "--help" ]; then + echo "bash ./compare.sh [OPTIONS] [FILTER]" + echo "" + echo "-all Compare all files in all known ways" + echo "-names Compare the file names and directory structure" + echo "-perms Compare the permission bits on all files and directories" + echo "-types Compare the output of the file command on all files" + echo "-general Compare the files not convered by the specialized comparisons" + echo "-zips Compare the contents of all zip files" + echo "-jars Compare the contents of all jar files" + echo "-libs Compare all native libraries" + echo "-execs Compare all executables" + echo "-v Verbose output, does not hide known differences" + echo "-vv More verbose output, shows diff output of all comparisons" + echo "-o [OTHER] Compare with build in other directory. Will default to the old build directory" + echo "" + echo "[FILTER] List filenames in the image to compare, works for jars, zips, libs and execs" + echo "Example:" + echo "bash ./common/bin/compareimages.sh CodePointIM.jar" + exit 10 +fi + +CMP_NAMES=false +CMP_PERMS=false +CMP_TYPES=false +CMP_GENERAL=false +CMP_ZIPS=false +CMP_JARS=false +CMP_LIBS=false +CMP_EXECS=false + +while [ -n "$1" ]; do + case "$1" in + -v) + VERBOSE=true + ;; + -vv) + VERBOSE=true + SHOW_DIFFS=true + ;; + -o) + OTHER=$2 + shift + ;; + -all) + CMP_NAMES=true + if [ "$OPENJDK_TARGET_OS" != "windows" ]; then + CMP_PERMS=true + fi + CMP_TYPES=true + CMP_GENERAL=true + CMP_ZIPS=true + CMP_JARS=true + CMP_LIBS=true + CMP_EXECS=true + ;; + -names) + CMP_NAMES=true + ;; + -perms) + CMP_PERMS=true + ;; + -types) + CMP_TYPES=true + ;; + -general) + CMP_GENERAL=true + ;; + -zips) + CMP_ZIPS=true + ;; + -jars) + CMP_JARS=true + ;; + -libs) + CMP_LIBS=true + ;; + -execs) + CMP_EXECS=true + ;; + *) + CMP_NAMES=false + CMP_PERMS=false + CMP_TYPES=false + CMP_ZIPS=true + CMP_JARS=true + CMP_LIBS=true + CMP_EXECS=true + + if [ -z "$FILTER" ]; then + FILTER="$GREP" + fi + FILTER="$FILTER -e $1" + ;; + esac + shift +done + +if [ "$CMP_NAMES" = "false" ] && [ "$CMP_TYPES" = "false" ] && [ "$CMP_PERMS" = "false" ] && [ "$CMP_GENERAL" = "false" ] && [ "$CMP_ZIPS" = "false" ] && [ "$CMP_JARS" = "false" ] && [ "$CMP_LIBS" = "false" ] && [ "$CMP_EXECS" = "false" ]; then + CMP_NAMES=true + CMP_PERMS=true + CMP_TYPES=true + CMP_GENERAL=true + CMP_ZIPS=true + CMP_JARS=true + CMP_LIBS=true + CMP_EXECS=true +fi + +if [ -z "$FILTER" ]; then + FILTER="$CAT" +fi + +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" + fi + echo "Comparing to default old build:" + echo "$OTHER" + echo +else + echo "Comparing to:" + echo "$OTHER" + echo +fi + +if [ ! -d "$OTHER" ]; then + echo "Other build directory does not exist:" + echo "$OTHER" + exit 1; +fi + +# Figure out the layout of the new build. Which kinds of images have been produced +if [ -d "$THIS/images/j2sdk-image" ]; then + THIS_J2SDK="$THIS/images/j2sdk-image" + THIS_J2RE="$THIS/images/j2re-image" +fi +if [ -d "$THIS/images/j2sdk-overlay-image" ]; then + THIS_J2SDK_OVERLAY="$THIS/images/j2sdk-overlay-image" + THIS_J2RE_OVERLAY="$THIS/images/j2re-overlay-image" +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" + else + OTHER_J2SDK_OVERLAY="$OTHER/j2sdk-image" + OTHER_J2RE_OVERLAY="$OTHER/j2re-image" + 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!" + exit 1 +fi + + +########################################################################################## +# Do the work + +if [ "$CMP_NAMES" = "true" ]; then + if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then + echo -n "J2SDK " + compare_dirs $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk + echo -n "J2RE " + compare_dirs $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re + + echo -n "J2SDK " + compare_files $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk + 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 +fi + +if [ "$CMP_PERMS" = "true" ]; then + if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then + echo -n "J2SDK " + compare_permissions $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk + 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 +fi + +if [ "$CMP_TYPES" = "true" ]; then + if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then + echo -n "J2SDK " + compare_file_types $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk + 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 +fi + +if [ "$CMP_GENERAL" = "true" ]; then + if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then + echo -n "J2SDK " + compare_general_files $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk + 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 +fi + +if [ "$CMP_ZIPS" = "true" ]; then + if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then + compare_all_zip_files $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk + fi +fi + +if [ "$CMP_JARS" = "true" ]; then + if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then + compare_all_jar_files $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk + fi +fi + +if [ "$CMP_LIBS" = "true" ]; then + if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then + compare_all_libs $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk + fi + if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then + echo -n "Overlay " + compare_all_libs $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay + 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 + fi +fi + +echo + +if [ -n "$REGRESSIONS" ]; then + echo "REGRESSIONS FOUND!" + echo + exit 1 +else + echo "No regressions found" + echo + exit 0 +fi
--- a/common/autoconf/configure Fri Sep 28 14:54:04 2012 +0400 +++ b/common/autoconf/configure Fri Sep 28 10:54:12 2012 -0700 @@ -2,7 +2,12 @@ CONFIGURE_COMMAND_LINE="$@" conf_script_dir=`dirname $0` -conf_closed_script_dir="$conf_script_dir/../../jdk/make/closed/autoconf" + +if [ "$CUSTOM_CONFIG_DIR" = "" ]; then + conf_custom_script_dir="$conf_script_dir/../../jdk/make/closed/autoconf" +else + conf_custom_script_dir=$CUSTOM_CONFIG_DIR +fi ### ### Test that the generated configure is up-to-date @@ -14,8 +19,12 @@ print_error_not_up_to_date() { echo "Error: The configure source files is newer than the generated files." echo "Please run 'sh autogen.sh' to update the generated files." + echo "Note that this test might trigger incorrectly sometimes due to hg timestamps". } +# NOTE: This test can occasionally go wrong due to the way mercurial handles +# timestamps. It it supposed to aid during development of build-infra, but should +# go away before making this the default build system. for file in configure.ac *.m4 ; do if $TEST $file -nt generated-configure.sh; then print_error_not_up_to_date @@ -23,26 +32,32 @@ fi done -if $TEST -e $conf_closed_script_dir/generated-configure.sh; then - # If closed source configure is available, make sure it is up-to-date as well. - for file in configure.ac *.m4 $conf_closed_script_dir/*.m4; do - if $TEST $file -nt $conf_closed_script_dir/generated-configure.sh; then +if $TEST -e $conf_custom_script_dir/generated-configure.sh; then + # If custom source configure is available, make sure it is up-to-date as well. + for file in configure.ac *.m4 $conf_custom_script_dir/*.m4; do + if $TEST $file -nt $conf_custom_script_dir/generated-configure.sh; then print_error_not_up_to_date exit 1 fi done - # Test if open configure is newer than closed configure, if so, closed needs to - # be regenerated. + # Test if open configure is newer than custom configure, if so, custom needs to + # be regenerated. This test is required to ensure consistency with custom source. conf_open_configure_timestamp=`grep DATE_WHEN_GENERATED: $conf_script_dir/generated-configure.sh | cut -d" " -f 3` - conf_closed_configure_timestamp=`grep DATE_WHEN_GENERATED: $conf_closed_script_dir/generated-configure.sh | cut -d" " -f 3` - if $TEST $conf_open_configure_timestamp -gt $conf_closed_configure_timestamp; then - print_error_not_up_to_date + conf_custom_configure_timestamp=`grep DATE_WHEN_GENERATED: $conf_custom_script_dir/generated-configure.sh | cut -d" " -f 3` + if $TEST $conf_open_configure_timestamp -gt $conf_custom_configure_timestamp; then + echo "Error: The generated configure file contains changes not present in the custom generated file." + echo "Please run 'sh autogen.sh' to update the generated files." exit 1 fi fi +# Autoconf calls the configure script recursively sometimes. +# Don't start logging twice in that case +if $TEST "x$conf_debug_configure" = xtrue; then + conf_debug_configure=recursive +fi ### ### Process command-line arguments ### @@ -63,6 +78,12 @@ --with-extra-cxxflags=*) conf_extra_cxxflags=`expr "X$conf_option" : '[^=]*=\(.*\)'` continue ;; + --debug-configure) + if $TEST "x$conf_debug_configure" != xrecursive; then + conf_debug_configure=true + export conf_debug_configure + fi + continue ;; *) conf_processed_arguments="$conf_processed_arguments $conf_option" ;; esac @@ -104,13 +125,29 @@ ### ### Call the configure script ### -if $TEST -e $conf_closed_script_dir/generated-configure.sh; then - # Closed source configure available; run that instead - . $conf_closed_script_dir/generated-configure.sh $conf_processed_arguments --with-extra-cflags="$conf_extra_cflags" --with-extra-cxxflags="$conf_extra_cxxflags" +if $TEST -e $conf_custom_script_dir/generated-configure.sh; then + # Custom source configure available; run that instead + echo Running custom generated-configure.sh + conf_script_to_run=$conf_custom_script_dir/generated-configure.sh else - . $conf_script_dir/generated-configure.sh $conf_processed_arguments --with-extra-cflags="$conf_extra_cflags" --with-extra-cxxflags="$conf_extra_cxxflags" + echo Running generated-configure.sh + conf_script_to_run=$conf_script_dir/generated-configure.sh +fi + +if $TEST "x$conf_debug_configure" != x; then + # Turn on shell debug output if requested (initial or recursive) + set -x fi +if $TEST "x$conf_debug_configure" = xtrue; then + # Turn on logging, but don't turn on twice when called recursive + conf_debug_logfile=./debug-configure.log + (exec 3>&1 ; (. $conf_script_to_run $conf_processed_arguments --with-extra-cflags="$conf_extra_cflags" --with-extra-cxxflags="$conf_extra_cxxflags" 2>&1 1>&3 ) | tee -a $conf_debug_logfile 1>&2 ; exec 3>&-) | tee -a $conf_debug_logfile +else + . $conf_script_to_run $conf_processed_arguments --with-extra-cflags="$conf_extra_cflags" --with-extra-cxxflags="$conf_extra_cxxflags" +fi + +conf_result_code=$? ### ### Post-processing ### @@ -119,3 +156,5 @@ if $TEST -d "$OUTPUT_ROOT"; then mv -f config.log "$OUTPUT_ROOT" 2> /dev/null fi + +exit $conf_result_code
--- a/common/autoconf/configure.ac Fri Sep 28 14:54:04 2012 +0400 +++ b/common/autoconf/configure.ac Fri Sep 28 10:54:12 2012 -0700 @@ -53,9 +53,9 @@ m4_include([toolchain.m4]) # This line needs to be here, verbatim, after all includes. -# It is replaced with closed functionality when building -# closed sources. -AC_DEFUN_ONCE([CLOSED_HOOK]) +# It is replaced with custom functionality when building +# custom sources. +AC_DEFUN_ONCE([CUSTOM_HOOK]) ############################################################################### # @@ -65,6 +65,12 @@ # Basic initialization that must happen first of all BASIC_INIT + +# Now we can determine OpenJDK build and target platforms. This is required to +# have early on. +PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET + +# Continue setting up basic stuff. BASIC_SETUP_PATHS BASIC_SETUP_LOGGING @@ -75,28 +81,18 @@ # Without these, we can't properly run the rest of the configure script. BASIC_SETUP_TOOLS +# Check if pkg-config is available. +PKG_PROG_PKG_CONFIG + +# After basic tools have been setup, we can check build os specific details. +PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION + # Setup builddeps, for automatic downloading of tools we need. # This is needed before we can call BDEPS_CHECK_MODULE, which is done in # boot-jdk setup, but we need to have basic tools setup first. BDEPS_CONFIGURE_BUILDDEPS BDEPS_SCAN_FOR_BUILDDEPS -# Check if pkg-config is available. -PKG_PROG_PKG_CONFIG - -############################################################################### -# -# Determine OpenJDK build and target platforms. -# -############################################################################### - -PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET -PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION - -# With knowledge of the build platform, setup more basic things. -BASIC_SETUP_PATH_SEP -BASIC_SETUP_SEARCHPATH - ############################################################################### # # Determine OpenJDK variants, options and version numbers. @@ -148,7 +144,7 @@ # FIXME: Currently we must test this after paths but before flags. Fix! # And we can test some aspects on the target using configure macros. -PLATFORM_TEST_OPENJDK_TARGET_BITS +PLATFORM_SETUP_OPENJDK_TARGET_BITS PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS # Configure flags for the tools @@ -213,8 +209,8 @@ # Check for some common pitfalls BASIC_TEST_USABILITY_ISSUES -# At the end, call the closed hook. (Dummy macro if no closed sources available) -CLOSED_HOOK +# At the end, call the custom hook. (Dummy macro if no custom sources available) +CUSTOM_HOOK # We're messing a bit with internal autoconf variables to put the config.status # in the output directory instead of the current directory. @@ -222,5 +218,8 @@ # Create the actual output files. Now the main work of configure is done. AC_OUTPUT +# Make the compare script executable +$CHMOD +x $OUTPUT_ROOT/compare.sh + # Finally output some useful information to the user HELP_PRINT_SUMMARY_AND_WARNINGS
--- a/common/autoconf/generated-configure.sh Fri Sep 28 14:54:04 2012 +0400 +++ b/common/autoconf/generated-configure.sh Fri Sep 28 10:54:12 2012 -0700 @@ -597,13 +597,10 @@ LIBOBJS CCACHE USE_PRECOMPILED_HEADER +SJAVAC_SERVER_DIR ENABLE_SJAVAC -JAVAC_USE_MODE -JAVAC_USE_DEPS -JAVAC_SERVER_CORES -JAVAC_SERVERS -JAVAC_USE_REMOTE -SERVER_JAVA +SJAVAC_SERVER_CORES +SJAVAC_SERVER_JAVA MEMORY_SIZE CONCURRENT_BUILD_JOBS NUM_CORES @@ -635,6 +632,7 @@ ZIP_DEBUGINFO_FILES ENABLE_DEBUG_SYMBOLS UNCYGDRIVE +LDFLAGS_CXX_JDK LDFLAGS_JDKEXE_SUFFIX LDFLAGS_JDKLIB_SUFFIX LDFLAGS_JDKEXE @@ -644,6 +642,9 @@ CFLAGS_JDKEXE CFLAGS_JDKLIB PACKAGE_PATH +LEGACY_EXTRA_LDFLAGS +LEGACY_EXTRA_CXXFLAGS +LEGACY_EXTRA_CFLAGS CXX_FLAG_DEPS C_FLAG_DEPS CXX_O_FLAG_NONE @@ -656,6 +657,7 @@ C_O_FLAG_HIGHEST POST_MCS_CMD POST_STRIP_CMD +SET_EXECUTABLE_ORIGIN SET_SHARED_LIBRARY_ORIGIN CXX_FLAG_REORDER C_FLAG_REORDER @@ -669,14 +671,11 @@ STATIC_LIBRARY SHARED_LIBRARY OBJ_SUFFIX -ENDIAN -ARCH_DATA_MODEL -LP64 +LIPO OBJCOPY MCS STRIP NM -ASFLAGS AS CXXCPP CPP @@ -706,30 +705,18 @@ LDFLAGS CFLAGS CC -HOSTLD -HOSTCXX -HOSTCC -DEFINE_CROSS_COMPILE_ARCH +BUILD_LD +BUILD_CXX +BUILD_CC MSVCR100DLL CHECK_FOR_VCINSTALLDIR SETUPDEVENV +CYGWIN_LINK AR_OUT_OPTION LD_OUT_OPTION EXE_OUT_OPTION CC_OUT_OPTION -SYS_ROOT -HOTSPOT_DIST -JAXWS_DIST -JAXP_DIST -CORBA_DIST -LANGTOOLS_DIST -IMAGES_OUTPUTDIR -JDK_OUTPUTDIR -HOTSPOT_OUTPUTDIR -JAXWS_OUTPUTDIR -JAXP_OUTPUTDIR -CORBA_OUTPUTDIR -LANGTOOLS_OUTPUTDIR +BUILD_OUTPUT OVERRIDE_SRC_ROOT ADD_SRC_ROOT JDK_TOPDIR @@ -739,17 +726,11 @@ CORBA_TOPDIR LANGTOOLS_TOPDIR BOOT_JDK_JVMARGS -NATIVE2ASCII -RMIC -JAR -JAVAH JAVAC_FLAGS -JAVAC BOOT_JDK_SOURCETARGET -JAVA +BOOT_JDK BOOT_TOOLSJAR BOOT_RTJAR -BOOT_JDK JAVA_CHECK JAVAC_CHECK OUTPUT_ROOT @@ -777,9 +758,6 @@ CACERTS_FILE TEST_IN_BUILD DISABLE_NIMBUS -GENERATE_DOCS -ENABLE_DOCS -BUILD_HEADLESS_ONLY BUILD_HEADLESS SUPPORT_HEADFUL SUPPORT_HEADLESS @@ -790,6 +768,7 @@ FASTDEBUG VARIANT DEBUG_LEVEL +MACOSX_UNIVERSAL JVM_VARIANT_ZEROSHARK JVM_VARIANT_ZERO JVM_VARIANT_KERNEL @@ -797,39 +776,98 @@ JVM_VARIANT_SERVER JVM_VARIANTS JDK_VARIANT -MINIMIZE_RAM_USAGE -JAVASE_EMBEDDED -PATH_SEP -CYGPATH +BDEPS_FTP +BDEPS_UNZIP OS_VERSION_MICRO OS_VERSION_MINOR OS_VERSION_MAJOR +PKG_CONFIG +HG +OBJDUMP +READELF +OTOOL +LDD +THEPWDCMD +FIND_DELETE +RM +MAKE +CHECK_TOOLSDIR_MAKE +CHECK_TOOLSDIR_GMAKE +CHECK_MAKE +CHECK_GMAKE +NAWK +SED +FGREP +EGREP +GREP +AWK +ZIP +XARGS +WC +UNZIP +UNIQ +TR +TOUCH +TEE +TAR +TAIL +SORT +SH +PRINTF +MV +MKDIR +LS +LN +HEAD +FIND +FILE +EXPR +ECHO +DIFF +DF +DATE +CUT +CPIO +CP +CMP +CHMOD +CAT +BASENAME +PKGHANDLER +BUILD_LOG_WRAPPER +BUILD_LOG_PREVIOUS +BUILD_LOG +SYS_ROOT +PATH_SEP +CYGPATH +SRC_ROOT +READLINK +DEFINE_CROSS_COMPILE_ARCH +LP64 +OPENJDK_TARGET_OS_API_DIR +OPENJDK_TARGET_CPU_JLI_CFLAGS +OPENJDK_TARGET_CPU_OSARCH +OPENJDK_TARGET_CPU_ISADIR +OPENJDK_TARGET_CPU_LIBDIR +OPENJDK_TARGET_CPU_LEGACY_LIB +OPENJDK_TARGET_CPU_LEGACY REQUIRED_OS_VERSION REQUIRED_OS_NAME -LEGACY_OPENJDK_BUILD_CPU3 -LEGACY_OPENJDK_BUILD_CPU2 -LEGACY_OPENJDK_BUILD_CPU1 +COMPILE_TYPE OPENJDK_BUILD_CPU_ENDIAN OPENJDK_BUILD_CPU_BITS OPENJDK_BUILD_CPU_ARCH OPENJDK_BUILD_CPU -LEGACY_OPENJDK_BUILD_OS_API OPENJDK_BUILD_OS_API -OPENJDK_BUILD_OS_FAMILY OPENJDK_BUILD_OS -LEGACY_OPENJDK_TARGET_CPU3 -LEGACY_OPENJDK_TARGET_CPU2 -LEGACY_OPENJDK_TARGET_CPU1 OPENJDK_TARGET_CPU_ENDIAN OPENJDK_TARGET_CPU_BITS OPENJDK_TARGET_CPU_ARCH OPENJDK_TARGET_CPU -LEGACY_OPENJDK_TARGET_OS_API OPENJDK_TARGET_OS_API -OPENJDK_TARGET_OS_FAMILY OPENJDK_TARGET_OS -OPENJDK_BUILD_SYSTEM -OPENJDK_TARGET_SYSTEM +OPENJDK_BUILD_AUTOCONF_NAME +OPENJDK_TARGET_AUTOCONF_NAME target_os target_vendor target_cpu @@ -842,60 +880,9 @@ build_vendor build_cpu build -PKG_CONFIG -BDEPS_FTP -BDEPS_UNZIP -HG -FILE -EXPR -READELF -OTOOL -LDD -UNZIP -ZIP -XARGS -WC -TOUCH -TR -TEE -TAIL -TAR -SORT -SH -SED -RM -THEPWDCMD -PRINTF -NAWK -MV -MKDIR -MAKE -LS -LN -HEAD -FIND_DELETE -FIND -FGREP -EGREP -GREP -ECHO -DIFF -DF -DATE -CUT -CPIO -CP -CHMOD -CAT -AWK -PKGHANDLER -BUILD_LOG_WRAPPER -BUILD_LOG_PREVIOUS -BUILD_LOG -SRC_ROOT -READLINK DATE_WHEN_CONFIGURED CONFIGURE_COMMAND_LINE +CUSTOM_MAKE_DIR target_alias host_alias build_alias @@ -937,12 +924,16 @@ ac_subst_files='' ac_user_opts=' enable_option_checking +with_custom_make_dir +with_target_bits +with_sys_root +with_tools_dir +with_devkit with_builddeps_conf with_builddeps_server with_builddeps_dir with_builddeps_group enable_list_builddeps -with_target_bits with_jdk_variant with_jvm_variants enable_debug @@ -950,7 +941,6 @@ enable_openjdk_only enable_jigsaw enable_headful -enable_docs enable_nimbus enable_hotspot_test_in_build with_cacerts_file @@ -968,9 +958,6 @@ with_override_hotspot with_override_jdk with_msvcr100dll -with_sys_root -with_tools_dir -with_devkit with_extra_cflags with_extra_cxxflags with_extra_ldflags @@ -989,11 +976,8 @@ enable_static_link_stdc__ with_num_cores with_memory_size -with_server_java -enable_javac_server -with_javac_server_cores -enable_javac_deps -enable_javac_multi_core +with_sjavac_server_java +with_sjavac_server_cores enable_sjavac enable_precompiled_headers enable_ccache @@ -1649,8 +1633,6 @@ --enable-jigsaw build Jigsaw images (not yet available) [disabled] --disable-headful build headful support (graphical UI support) [enabled] - --enable-docs enable generation of Javadoc documentation - [disabled] --disable-nimbus disable Nimbus L&F [enabled] --enable-hotspot-test-in-build enable running of Queens test after Hotspot build @@ -1666,12 +1648,6 @@ --disable-static-link-stdc++ disable static linking of the C++ runtime on Linux [enabled] - --enable-javac-server enable the shared javac server during the build - process [disabled] - --enable-javac-deps enable the dependency tracking between Java packages - [disabled] - --enable-javac-multi-core - compile Java packages concurrently [disabled] --enable-sjavac use sjavac to do fast incremental compiles [disabled] --disable-precompiled-headers @@ -1681,6 +1657,16 @@ Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-custom-make-dir directory containing custom build/make files + --with-target-bits build 32-bit or 64-bit binaries (for platforms that + support it), e.g. --with-target-bits=32 [guessed] + --with-sys-root pass this sys-root to the compilers and linker + (useful if the sys-root encoded in the cross + compiler tools is incorrect) + --with-tools-dir search this directory for (cross-compiling) + compilers and tools + --with-devkit use this directory as base for tools-dir and + sys-root (for cross-compiling) --with-builddeps-conf use this configuration file for the builddeps --with-builddeps-server download and use build dependencies from this server url, e.g. @@ -1689,9 +1675,7 @@ [d/localhome/builddeps] --with-builddeps-group chgrp the downloaded build dependencies to this group - --with-target-bits build 32-bit or 64-bit binaries (for platforms that - support it), e.g. --with-target-bits=32 [guessed] - --with-jdk-variant JDK variant to build (normal, embedded) [normal] + --with-jdk-variant JDK variant to build (normal) [normal] --with-jvm-variants JVM variants (separated by commas) to build (server, client, kernel, zero, zeroshark) [server] --with-debug-level set the debug level (release, fastdebug, slowdebug) @@ -1724,12 +1708,6 @@ --with-override-hotspot use this hotspot dir for the build --with-override-jdk use this jdk dir for the build --with-msvcr100dll copy this msvcr100.dll into the built JDK - --with-sys-root pass this sys-root to the compilers and linker - (useful if the sys-root encoded in the cross - compiler tools is incorrect) - --with-tools-dir search this directory for compilers and tools - --with-devkit use this directory as base for tools-dir and - sys-root --with-extra-cflags extra flags to be used when compiling jdk c-files --with-extra-cxxflags extra flags to be used when compiling jdk c++-files --with-extra-ldflags extra flags to be used when linking jdk @@ -1753,13 +1731,15 @@ --with-num-cores=8 [probed] --with-memory-size memory (in MB) available in the build system, e.g. --with-memory-size=1024 [probed] - --with-server-java use this java binary for running the javac + --with-sjavac-server-java + use this java binary for running the sjavac background server and other long running java tasks in the build process, e.g. - ---with-server-java="/opt/jrockit/bin/java -server" - --with-javac-server-cores + ---with-sjavac-server-java="/opt/jrockit/bin/java + -server" + --with-sjavac-server-cores use at most this number of concurrent threads on the - javac server [probed] + sjavac server [probed] --with-ccache-dir where to store ccache files [~/.ccache] Some influential environment variables: @@ -2053,6 +2033,97 @@ } # ac_fn_cxx_try_cpp +# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES +# --------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_cxx_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval "test \"\${$3+set}\"" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## ----------------------------------------- ## +## Report this to build-dev@openjdk.java.net ## +## ----------------------------------------- ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_cxx_check_header_mongrel + # ac_fn_cxx_try_run LINENO # ------------------------ # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes @@ -2095,6 +2166,37 @@ } # ac_fn_cxx_try_run +# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES +# --------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_cxx_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_cxx_check_header_compile + # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES # ---------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes @@ -2273,37 +2375,6 @@ } # ac_fn_cxx_compute_int -# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES -# --------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_cxx_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_cxx_check_header_compile - # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. @@ -2507,97 +2578,6 @@ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_mongrel - -# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES -# --------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_cxx_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval "test \"\${$3+set}\"" = set; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ----------------------------------------- ## -## Report this to build-dev@openjdk.java.net ## -## ----------------------------------------- ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_cxx_check_header_mongrel cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. @@ -2952,7 +2932,7 @@ # Do not change or remove the following line, it is needed for consistency checks: -# DATE_WHEN_GENERATED: 1341161875 +# DATE_WHEN_GENERATED: 1347963060 ac_aux_dir= for ac_dir in build-aux "$srcdir"/build-aux; do @@ -3083,10 +3063,7 @@ - - - - +# Setup basic configuration paths, and platform-specific stuff related to PATHs. @@ -3096,10 +3073,25 @@ #%%% Simple tools %%% - - - - +# Check if we have found a usable version of make +# $1: the path to a potential make binary (or empty) +# $2: the description on how we found this + + +# Goes looking for a usable version of GNU make. + + + + +# Test that variable $1 denoting a program is not empty. If empty, exit with an error. +# $1: variable to check +# $2: executable name to print in warning (optional) + + +# Does AC_PATH_PROG followed by CHECK_NONEMPTY. +# Arguments as AC_PATH_PROG: +# $1: variable to set +# $2: executable name to look for @@ -3176,9 +3168,43 @@ # questions. # -# Fixes paths on windows to be mixed mode short. - - +# Execute the check given as argument, and verify the result +# If the Boot JDK was previously found, do nothing +# $1 A command line (typically autoconf macro) to execute + + +# Test: Is bootjdk explicitely set by command line arguments? + + +# Test: Is bootjdk available from builddeps? + + +# Test: Is $JAVA_HOME set? + + +# Test: Is there a java or javac in the PATH, which is a symlink to the JDK? + + +# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX) + + +# Look for a jdk in the given path. If there are multiple, try to select the newest. +# If found, set BOOT_JDK and BOOT_JDK_FOUND. +# $1 = Path to directory containing jdk installations. +# $2 = String to append to the found JDK directory to get the proper JDK home + + +# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given +# environmental variable as base for where to look. +# $1 Name of an environmal variable, assumed to point to the Program Files directory. + + +# Test: Is there a JDK installed in default, well-known locations? + + +# Check that a command-line tool in the Boot JDK is correct +# $1 = name of variable to assign +# $2 = name of binary ############################################################################### @@ -3360,6 +3386,18 @@ +# Support for customization of the build process. Some build files +# will include counterparts from this location, if they exist. This allows +# for a degree of customization of the build targets and the rules/recipes +# to create them + +# Check whether --with-custom-make-dir was given. +if test "${with_custom_make_dir+set}" = set; then : + withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir +fi + + + # # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -3424,14 +3462,31 @@ # questions. # - - - - - - - - +# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD. +# Converts autoconf style CPU name to OpenJDK style, into +# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN. + + +# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD. +# Converts autoconf style OS name to OpenJDK style, into +# VAR_OS and VAR_OS_API. + + +# Expects $host_os $host_cpu $build_os and $build_cpu +# and $with_target_bits to have been setup! +# +# Translate the standard triplet(quadruplet) definition +# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU, +# OPENJDK_BUILD_OS, etc. + + +# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour +# accordingly. Must be done after setting up build and target system, but before +# doing anything else with these values. + + + # Setup the legacy variables, for controlling the old makefiles. + # @@ -3441,6 +3496,8 @@ +# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS. +# Add -mX to various FLAGS variables. @@ -3519,8 +3576,8 @@ # This line needs to be here, verbatim, after all includes. -# It is replaced with closed functionality when building -# closed sources. +# It is replaced with custom functionality when building +# custom sources. ############################################################################### @@ -3536,6 +3593,501 @@ DATE_WHEN_CONFIGURED=`LANG=C date` + +# Now we can determine OpenJDK build and target platforms. This is required to +# have early on. +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if test "${ac_cv_build+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if test "${ac_cv_host+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 +$as_echo_n "checking target system type... " >&6; } +if test "${ac_cv_target+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "x$target_alias" = x; then + ac_cv_target=$ac_cv_host +else + ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 +$as_echo "$ac_cv_target" >&6; } +case $ac_cv_target in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;; +esac +target=$ac_cv_target +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_target +shift +target_cpu=$1 +target_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +target_os=$* +IFS=$ac_save_IFS +case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac + + +# The aliases save the names the user supplied, while $host etc. +# will get canonicalized. +test -n "$target_alias" && + test "$program_prefix$program_suffix$program_transform_name" = \ + NONENONEs,x,x, && + program_prefix=${target_alias}- + +# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target" +# is confusing; it assumes you are cross-compiling a cross-compiler (!) and "target" is thus the target of the +# product you're building. The target of this build is called "host". Since this is confusing to most people, we +# have not adopted that system, but use "target" as the platform we are building for. In some places though we need +# to use the configure naming style. + + + + + + # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME + # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME + # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build, + # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME. + OPENJDK_TARGET_AUTOCONF_NAME="$host" + OPENJDK_BUILD_AUTOCONF_NAME="$build" + + + + # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables. + + case "$host_os" in + *linux*) + VAR_OS=linux + VAR_OS_API=posix + ;; + *solaris*) + VAR_OS=solaris + VAR_OS_API=posix + ;; + *darwin*) + VAR_OS=macosx + VAR_OS_API=posix + ;; + *bsd*) + VAR_OS=bsd + VAR_OS_API=posix + ;; + *cygwin*|*windows*) + VAR_OS=windows + VAR_OS_API=winapi + ;; + *) + as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5 + ;; + esac + + + # First argument is the cpu name from the trip/quad + case "$host_cpu" in + x86_64) + VAR_CPU=x86_64 + VAR_CPU_ARCH=x86 + VAR_CPU_BITS=64 + VAR_CPU_ENDIAN=little + ;; + i?86) + VAR_CPU=x86 + VAR_CPU_ARCH=x86 + VAR_CPU_BITS=32 + VAR_CPU_ENDIAN=little + ;; + arm*) + VAR_CPU=arm + VAR_CPU_ARCH=arm + VAR_CPU_BITS=32 + VAR_CPU_ENDIAN=little + ;; + powerpc) + VAR_CPU=ppc + VAR_CPU_ARCH=ppc + VAR_CPU_BITS=32 + VAR_CPU_ENDIAN=big + ;; + powerpc64) + VAR_CPU=ppc64 + VAR_CPU_ARCH=ppc + VAR_CPU_BITS=64 + VAR_CPU_ENDIAN=big + ;; + sparc) + VAR_CPU=sparc + VAR_CPU_ARCH=sparc + VAR_CPU_BITS=32 + VAR_CPU_ENDIAN=big + ;; + sparcv9) + VAR_CPU=sparcv9 + VAR_CPU_ARCH=sparc + VAR_CPU_BITS=64 + VAR_CPU_ENDIAN=big + ;; + *) + as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5 + ;; + esac + + # ... and setup our own variables. (Do this explicitely to facilitate searching) + OPENJDK_TARGET_OS="$VAR_OS" + OPENJDK_TARGET_OS_API="$VAR_OS_API" + OPENJDK_TARGET_CPU="$VAR_CPU" + OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH" + OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS" + OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN" + + + + + + + + # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables. + + case "$build_os" in + *linux*) + VAR_OS=linux + VAR_OS_API=posix + ;; + *solaris*) + VAR_OS=solaris + VAR_OS_API=posix + ;; + *darwin*) + VAR_OS=macosx + VAR_OS_API=posix + ;; + *bsd*) + VAR_OS=bsd + VAR_OS_API=posix + ;; + *cygwin*|*windows*) + VAR_OS=windows + VAR_OS_API=winapi + ;; + *) + as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5 + ;; + esac + + + # First argument is the cpu name from the trip/quad + case "$build_cpu" in + x86_64) + VAR_CPU=x86_64 + VAR_CPU_ARCH=x86 + VAR_CPU_BITS=64 + VAR_CPU_ENDIAN=little + ;; + i?86) + VAR_CPU=x86 + VAR_CPU_ARCH=x86 + VAR_CPU_BITS=32 + VAR_CPU_ENDIAN=little + ;; + arm*) + VAR_CPU=arm + VAR_CPU_ARCH=arm + VAR_CPU_BITS=32 + VAR_CPU_ENDIAN=little + ;; + powerpc) + VAR_CPU=ppc + VAR_CPU_ARCH=ppc + VAR_CPU_BITS=32 + VAR_CPU_ENDIAN=big + ;; + powerpc64) + VAR_CPU=ppc64 + VAR_CPU_ARCH=ppc + VAR_CPU_BITS=64 + VAR_CPU_ENDIAN=big + ;; + sparc) + VAR_CPU=sparc + VAR_CPU_ARCH=sparc + VAR_CPU_BITS=32 + VAR_CPU_ENDIAN=big + ;; + sparcv9) + VAR_CPU=sparcv9 + VAR_CPU_ARCH=sparc + VAR_CPU_BITS=64 + VAR_CPU_ENDIAN=big + ;; + *) + as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5 + ;; + esac + + # ..and setup our own variables. (Do this explicitely to facilitate searching) + OPENJDK_BUILD_OS="$VAR_OS" + OPENJDK_BUILD_OS_API="$VAR_OS_API" + OPENJDK_BUILD_CPU="$VAR_CPU" + OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH" + OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS" + OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN" + + + + + + + + + +# Check whether --with-target-bits was given. +if test "${with_target_bits+set}" = set; then : + withval=$with_target_bits; +fi + + + # We have three types of compiles: + # native == normal compilation, target system == build system + # cross == traditional cross compilation, target system != build system; special toolchain needed + # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines + # + if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then + # We're doing a proper cross-compilation + COMPILE_TYPE="cross" + else + COMPILE_TYPE="native" + fi + + if test "x$with_target_bits" != x; then + if test "x$COMPILE_TYPE" = "xcross"; then + as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5 + fi + + if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then + # A reduced build is requested + COMPILE_TYPE="reduced" + OPENJDK_TARGET_CPU_BITS=32 + if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then + OPENJDK_TARGET_CPU=x86 + elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then + OPENJDK_TARGET_CPU=sparc + else + as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5 + fi + elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then + as_fn_error $? "It is not possible to use --with-target-bits=64 on a 32 bit system. Use proper cross-compilation instead." "$LINENO" 5 + elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5 +$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;} + else + as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5 + fi + fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compilation type" >&5 +$as_echo_n "checking for compilation type... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5 +$as_echo "$COMPILE_TYPE" >&6; } + + + if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then + REQUIRED_OS_NAME=SunOS + REQUIRED_OS_VERSION=5.10 + fi + if test "x$OPENJDK_TARGET_OS" = "xlinux"; then + REQUIRED_OS_NAME=Linux + REQUIRED_OS_VERSION=2.6 + fi + if test "x$OPENJDK_TARGET_OS" = "xwindows"; then + REQUIRED_OS_NAME=Windows + if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then + REQUIRED_OS_VERSION=5.2 + else + REQUIRED_OS_VERSION=5.1 + fi + fi + if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then + REQUIRED_OS_NAME=Darwin + REQUIRED_OS_VERSION=11.2 + fi + + + + + + # Also store the legacy naming of the cpu. + # Ie i586 and amd64 instead of x86 and x86_64 + OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU" + if test "x$OPENJDK_TARGET_CPU" = xx86; then + OPENJDK_TARGET_CPU_LEGACY="i586" + elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then + # On all platforms except MacOSX replace x86_64 with amd64. + OPENJDK_TARGET_CPU_LEGACY="amd64" + fi + + + # And the second legacy naming of the cpu. + # Ie i386 and amd64 instead of x86 and x86_64. + OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU" + if test "x$OPENJDK_TARGET_CPU" = xx86; then + OPENJDK_TARGET_CPU_LEGACY_LIB="i386" + elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then + OPENJDK_TARGET_CPU_LEGACY_LIB="amd64" + fi + + + # This is the name of the cpu (but using i386 and amd64 instead of + # x86 and x86_64, respectively), preceeded by a /, to be used when + # locating libraries. On macosx, it's empty, though. + OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB" + if test "x$OPENJDK_TARGET_OS" = xmacosx; then + OPENJDK_TARGET_CPU_LIBDIR="" + fi + + + # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to + # /amd64 or /sparcv9. This string is appended to some library paths, like this: + # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so + OPENJDK_TARGET_CPU_ISADIR="" + if test "x$OPENJDK_TARGET_OS" = xsolaris; then + if test "x$OPENJDK_TARGET_CPU" = xx86_64; then + OPENJDK_TARGET_CPU_ISADIR="/amd64" + elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then + OPENJDK_TARGET_CPU_ISADIR="/sparcv9" + fi + fi + + + # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property + OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU" + if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then + # On linux only, we replace x86 with i386. + OPENJDK_TARGET_CPU_OSARCH="i386" + elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then + # On all platforms except macosx, we replace x86_64 with amd64. + OPENJDK_TARGET_CPU_OSARCH="amd64" + fi + + + OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU" + if test "x$OPENJDK_TARGET_CPU" = xx86; then + OPENJDK_TARGET_CPU_JLI="i386" + elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then + # On all platforms except macosx, we replace x86_64 with amd64. + OPENJDK_TARGET_CPU_JLI="amd64" + fi + # Now setup the -D flags for building libjli. + OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'" + if test "x$OPENJDK_TARGET_OS" = xsolaris; then + if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then + OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'" + elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then + OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'" + fi + fi + + + # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths. + if test "x$OPENJDK_TARGET_OS_API" = xposix; then + OPENJDK_TARGET_OS_API_DIR="solaris" + fi + if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then + OPENJDK_TARGET_OS_API_DIR="windows" + fi + + + if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then + A_LP64="LP64:=" + ADD_LP64="-D_LP64=1" + fi + LP64=$A_LP64 + + + if test "x$COMPILE_TYPE" = "xcross"; then + # FIXME: ... or should this include reduced builds..? + DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY" + else + DEFINE_CROSS_COMPILE_ARCH="" + fi + + + + +# Continue setting up basic stuff. + # Locate the directory of this script. SCRIPT="$0" @@ -3622,7 +4174,6 @@ AUTOCONF_DIR=`dirname $0` - # Where is the source? It is located two levels above the configure script. CURDIR="$PWD" cd "$AUTOCONF_DIR/../.." @@ -3642,7 +4193,11 @@ HAS_SPACE=`echo "$SRC_ROOT" | grep " "` if test "x$HAS_SPACE" != x; then if test "x$OPENJDK_BUILD_OS" = "xwindows"; then + # First convert it to DOS-style, short mode (no spaces) SRC_ROOT=`$CYGPATH -s -m -a "$SRC_ROOT"` + # Now it's case insensitive; let's make it lowercase to improve readability + SRC_ROOT=`$ECHO "$SRC_ROOT" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'` + # Now convert it back to Unix-stile (cygpath) SRC_ROOT=`$CYGPATH -u "$SRC_ROOT"` else as_fn_error $? "You cannot have spaces in the path to the source root! \"$SRC_ROOT\"" "$LINENO" 5 @@ -3655,7 +4210,11 @@ HAS_SPACE=`echo "$CURDIR" | grep " "` if test "x$HAS_SPACE" != x; then if test "x$OPENJDK_BUILD_OS" = "xwindows"; then + # First convert it to DOS-style, short mode (no spaces) CURDIR=`$CYGPATH -s -m -a "$CURDIR"` + # Now it's case insensitive; let's make it lowercase to improve readability + CURDIR=`$ECHO "$CURDIR" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'` + # Now convert it back to Unix-stile (cygpath) CURDIR=`$CYGPATH -u "$CURDIR"` else as_fn_error $? "You cannot have spaces in the path to the current directory! \"$CURDIR\"" "$LINENO" 5 @@ -3663,6 +4222,101 @@ fi +if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then + # Add extra search paths on solaris for utilities like ar and as etc... + PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin" +fi + +# For cygwin we need cygpath first, since it is used everywhere. +# Extract the first word of "cygpath", so it can be a program name with args. +set dummy cygpath; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_CYGPATH+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $CYGPATH in + [\\/]* | ?:[\\/]*) + ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +CYGPATH=$ac_cv_path_CYGPATH +if test -n "$CYGPATH"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5 +$as_echo "$CYGPATH" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +PATH_SEP=":" +if test "x$OPENJDK_BUILD_OS" = "xwindows"; then + if test "x$CYGPATH" = x; then + as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5 + fi + PATH_SEP=";" +fi + + +# You can force the sys-root if the sys-root encoded into the cross compiler tools +# is not correct. + +# Check whether --with-sys-root was given. +if test "${with_sys_root+set}" = set; then : + withval=$with_sys_root; +fi + + +if test "x$with_sys_root" != x; then + SYS_ROOT=$with_sys_root +else + SYS_ROOT=/ +fi + + + +# Check whether --with-tools-dir was given. +if test "${with_tools_dir+set}" = set; then : + withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir +fi + + + +# Check whether --with-devkit was given. +if test "${with_devkit+set}" = set; then : + withval=$with_devkit; + if test "x$with_sys_root" != x; then + as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5 + fi + if test "x$with_tools_dir" != x; then + as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5 + fi + TOOLS_DIR=$with_devkit/bin + SYS_ROOT=$with_devkit/$host_alias/libc + +fi + + + # Setup default logging of stdout and stderr to build.log in the output root. BUILD_LOG='$(OUTPUT_ROOT)/build.log' @@ -3721,6 +4375,1958 @@ # Setup simple tools, that do not need have cross compilation support. # Without these, we can't properly run the rest of the configure script. + +# Start with tools that do not need have cross compilation support +# and can be expected to be found in the default PATH. These tools are +# used by configure. Nor are these tools expected to be found in the +# devkit from the builddeps server either, since they are +# needed to download the devkit. + +# First are all the simple required tools. + + for ac_prog in basename +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_BASENAME+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $BASENAME in + [\\/]* | ?:[\\/]*) + ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +BASENAME=$ac_cv_path_BASENAME +if test -n "$BASENAME"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5 +$as_echo "$BASENAME" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$BASENAME" && break +done + + + if test "x$BASENAME" = x; then + if test "xbasename" = x; then + PROG_NAME=basename + else + PROG_NAME=basename + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 +$as_echo "$as_me: Could not find $PROG_NAME!" >&6;} + as_fn_error $? "Cannot continue" "$LINENO" 5 + fi + + + + for ac_prog in cat +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_CAT+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $CAT in + [\\/]* | ?:[\\/]*) + ac_cv_path_CAT="$CAT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +CAT=$ac_cv_path_CAT +if test -n "$CAT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5 +$as_echo "$CAT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CAT" && break +done + + + if test "x$CAT" = x; then + if test "xcat" = x; then + PROG_NAME=cat + else + PROG_NAME=cat + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 +$as_echo "$as_me: Could not find $PROG_NAME!" >&6;} + as_fn_error $? "Cannot continue" "$LINENO" 5 + fi + + + + for ac_prog in chmod +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_CHMOD+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $CHMOD in + [\\/]* | ?:[\\/]*) + ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +CHMOD=$ac_cv_path_CHMOD +if test -n "$CHMOD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5 +$as_echo "$CHMOD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CHMOD" && break +done + + + if test "x$CHMOD" = x; then + if test "xchmod" = x; then + PROG_NAME=chmod + else + PROG_NAME=chmod + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 +$as_echo "$as_me: Could not find $PROG_NAME!" >&6;} + as_fn_error $? "Cannot continue" "$LINENO" 5 + fi + + + + for ac_prog in cmp +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_CMP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $CMP in + [\\/]* | ?:[\\/]*) + ac_cv_path_CMP="$CMP" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +CMP=$ac_cv_path_CMP +if test -n "$CMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5 +$as_echo "$CMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CMP" && break +done + + + if test "x$CMP" = x; then + if test "xcmp" = x; then + PROG_NAME=cmp + else + PROG_NAME=cmp + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 +$as_echo "$as_me: Could not find $PROG_NAME!" >&6;} + as_fn_error $? "Cannot continue" "$LINENO" 5 + fi + + + + for ac_prog in cp +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_CP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $CP in + [\\/]* | ?:[\\/]*) + ac_cv_path_CP="$CP" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +CP=$ac_cv_path_CP +if test -n "$CP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5 +$as_echo "$CP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CP" && break +done + + + if test "x$CP" = x; then + if test "xcp" = x; then + PROG_NAME=cp + else + PROG_NAME=cp + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 +$as_echo "$as_me: Could not find $PROG_NAME!" >&6;} + as_fn_error $? "Cannot continue" "$LINENO" 5 + fi + + + + for ac_prog in cpio +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_CPIO+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $CPIO in + [\\/]* | ?:[\\/]*) + ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +CPIO=$ac_cv_path_CPIO +if test -n "$CPIO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5 +$as_echo "$CPIO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CPIO" && break +done + + + if test "x$CPIO" = x; then + if test "xcpio" = x; then + PROG_NAME=cpio + else + PROG_NAME=cpio + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 +$as_echo "$as_me: Could not find $PROG_NAME!" >&6;} + as_fn_error $? "Cannot continue" "$LINENO" 5 + fi + + + + for ac_prog in cut +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_CUT+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $CUT in + [\\/]* | ?:[\\/]*) + ac_cv_path_CUT="$CUT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +CUT=$ac_cv_path_CUT +if test -n "$CUT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5 +$as_echo "$CUT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CUT" && break +done + + + if test "x$CUT" = x; then + if test "xcut" = x; then + PROG_NAME=cut + else + PROG_NAME=cut + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 +$as_echo "$as_me: Could not find $PROG_NAME!" >&6;} + as_fn_error $? "Cannot continue" "$LINENO" 5 + fi + + + + for ac_prog in date +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_DATE+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $DATE in + [\\/]* | ?:[\\/]*) + ac_cv_path_DATE="$DATE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +DATE=$ac_cv_path_DATE +if test -n "$DATE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5 +$as_echo "$DATE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DATE" && break +done + + + if test "x$DATE" = x; then + if test "xdate" = x; then + PROG_NAME=date + else + PROG_NAME=date + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 +$as_echo "$as_me: Could not find $PROG_NAME!" >&6;} + as_fn_error $? "Cannot continue" "$LINENO" 5 + fi + + + + for ac_prog in df +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_DF+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $DF in + [\\/]* | ?:[\\/]*) + ac_cv_path_DF="$DF" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +DF=$ac_cv_path_DF +if test -n "$DF"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5 +$as_echo "$DF" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DF" && break +done + + + if test "x$DF" = x; then + if test "xdf" = x; then + PROG_NAME=df + else + PROG_NAME=df + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 +$as_echo "$as_me: Could not find $PROG_NAME!" >&6;} + as_fn_error $? "Cannot continue" "$LINENO" 5 + fi + + + + for ac_prog in gdiff diff +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_DIFF+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $DIFF in + [\\/]* | ?:[\\/]*) + ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +DIFF=$ac_cv_path_DIFF +if test -n "$DIFF"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5 +$as_echo "$DIFF" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DIFF" && break +done + + + if test "x$DIFF" = x; then + if test "xgdiff diff" = x; then + PROG_NAME=diff + else + PROG_NAME=gdiff diff + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 +$as_echo "$as_me: Could not find $PROG_NAME!" >&6;} + as_fn_error $? "Cannot continue" "$LINENO" 5 + fi + + + + for ac_prog in echo +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_ECHO+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $ECHO in + [\\/]* | ?:[\\/]*) + ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ECHO=$ac_cv_path_ECHO +if test -n "$ECHO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5 +$as_echo "$ECHO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ECHO" && break +done + + + if test "x$ECHO" = x; then + if test "xecho" = x; then + PROG_NAME=echo + else + PROG_NAME=echo + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 +$as_echo "$as_me: Could not find $PROG_NAME!" >&6;} + as_fn_error $? "Cannot continue" "$LINENO" 5 + fi + + + + for ac_prog in expr +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_EXPR+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $EXPR in + [\\/]* | ?:[\\/]*) + ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +EXPR=$ac_cv_path_EXPR +if test -n "$EXPR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5 +$as_echo "$EXPR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$EXPR" && break +done + + + if test "x$EXPR" = x; then + if test "xexpr" = x; then + PROG_NAME=expr + else + PROG_NAME=expr + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 +$as_echo "$as_me: Could not find $PROG_NAME!" >&6;} + as_fn_error $? "Cannot continue" "$LINENO" 5 + fi + + + + for ac_prog in file +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_FILE+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $FILE in + [\\/]* | ?:[\\/]*) + ac_cv_path_FILE="$FILE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +FILE=$ac_cv_path_FILE +if test -n "$FILE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5 +$as_echo "$FILE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$FILE" && break +done + + + if test "x$FILE" = x; then + if test "xfile" = x; then + PROG_NAME=file + else + PROG_NAME=file + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 +$as_echo "$as_me: Could not find $PROG_NAME!" >&6;} + as_fn_error $? "Cannot continue" "$LINENO" 5 + fi + + + + for ac_prog in find +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_FIND+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $FIND in + [\\/]* | ?:[\\/]*) + ac_cv_path_FIND="$FIND" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +FIND=$ac_cv_path_FIND +if test -n "$FIND"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5 +$as_echo "$FIND" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$FIND" && break +done + + + if test "x$FIND" = x; then + if test "xfind" = x; then + PROG_NAME=find + else + PROG_NAME=find + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 +$as_echo "$as_me: Could not find $PROG_NAME!" >&6;} + as_fn_error $? "Cannot continue" "$LINENO" 5 + fi + + + + for ac_prog in head +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_HEAD+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $HEAD in + [\\/]* | ?:[\\/]*) + ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +HEAD=$ac_cv_path_HEAD +if test -n "$HEAD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5 +$as_echo "$HEAD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$HEAD" && break +done + + + if test "x$HEAD" = x; then + if test "xhead" = x; then + PROG_NAME=head + else + PROG_NAME=head + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 +$as_echo "$as_me: Could not find $PROG_NAME!" >&6;} + as_fn_error $? "Cannot continue" "$LINENO" 5 + fi + + + + for ac_prog in ln +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_LN+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $LN in + [\\/]* | ?:[\\/]*) + ac_cv_path_LN="$LN" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +LN=$ac_cv_path_LN +if test -n "$LN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5 +$as_echo "$LN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$LN" && break +done + + + if test "x$LN" = x; then + if test "xln" = x; then + PROG_NAME=ln + else + PROG_NAME=ln + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 +$as_echo "$as_me: Could not find $PROG_NAME!" >&6;} + as_fn_error $? "Cannot continue" "$LINENO" 5 + fi + + + + for ac_prog in ls +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_LS+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $LS in + [\\/]* | ?:[\\/]*) + ac_cv_path_LS="$LS" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +LS=$ac_cv_path_LS +if test -n "$LS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5 +$as_echo "$LS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$LS" && break +done + + + if test "x$LS" = x; then + if test "xls" = x; then + PROG_NAME=ls + else + PROG_NAME=ls + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 +$as_echo "$as_me: Could not find $PROG_NAME!" >&6;} + as_fn_error $? "Cannot continue" "$LINENO" 5 + fi + + + + for ac_prog in mkdir +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; }