This commit is contained in:
J. Duke 2017-07-05 18:48:42 +02:00
commit 2e33ccc7eb
18 changed files with 1004 additions and 294 deletions

View File

@ -205,3 +205,4 @@ fd1a5574cf68af24bfd52decc37ac6361afb278a jdk8-b78
145dbc56f931c134e837b675b9e6e7bf08902e93 jdk8-b81 145dbc56f931c134e837b675b9e6e7bf08902e93 jdk8-b81
29153d0df68f84162ffe8c2cf4f402a3f2245e85 jdk8-b82 29153d0df68f84162ffe8c2cf4f402a3f2245e85 jdk8-b82
466685ba01bfb7bc1e1ac61490fd8c0f3cc18763 jdk8-b83 466685ba01bfb7bc1e1ac61490fd8c0f3cc18763 jdk8-b83
01f631f89fa392b4e484d0812c40ea8f9d2353aa jdk8-b84

View File

@ -43,8 +43,8 @@ fi
custom_hook=$custom_script_dir/custom-hook.m4 custom_hook=$custom_script_dir/custom-hook.m4
AUTOCONF=$(which autoconf 2> /dev/null); AUTOCONF="`which autoconf 2> /dev/null | grep -v '^no autoconf in'`"
AUTOCONF_267=$(which autoconf-2.67 2> /dev/null); AUTOCONF_267="`which autoconf-2.67 2> /dev/null | grep -v '^no autoconf-2.67 in'`"
echo "Autoconf found: ${AUTOCONF}" echo "Autoconf found: ${AUTOCONF}"
echo "Autoconf-2.67 found: ${AUTOCONF_267}" echo "Autoconf-2.67 found: ${AUTOCONF_267}"

View File

@ -602,6 +602,10 @@ AC_PATH_PROG(TIME, time)
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
BASIC_REQUIRE_PROG(COMM, comm) BASIC_REQUIRE_PROG(COMM, comm)
fi fi
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
BASIC_REQUIRE_PROG(XATTR, xattr)
fi
]) ])
# Check if build directory is on local disk. If not possible to determine, # Check if build directory is on local disk. If not possible to determine,

View File

@ -29,9 +29,16 @@
include @SPEC@ include @SPEC@
# Check that the user did not try to specify a different java to use for compiling. # Check that the user did not try to specify a different java to use for compiling.
ifneq ($(firstword $(SJAVAC_SERVER_JAVA)),$(firstword $(JAVA))) # On windows we need to account for fixpath being first word.
$(error Bootcycle builds are not possible if --with-sjavac-server-java is specified) ifeq ($(firstword $(JAVA)),$(FIXPATH))
JAVA_EXEC_POS=2
else
JAVA_EXEC_POS=1
endif endif
ifneq ($(word $(JAVA_EXEC_POS),$(SJAVAC_SERVER_JAVA)),$(word $(JAVA_EXEC_POS),$(JAVA)))
$(error Bootcycle builds are not possible if --with-sjavac-server-java is specified)
endif
# Override specific values to do a boot cycle build # Override specific values to do a boot cycle build
@ -39,5 +46,8 @@ endif
BUILD_OUTPUT:=@BUILD_OUTPUT@/bootcycle-build BUILD_OUTPUT:=@BUILD_OUTPUT@/bootcycle-build
# Use a different Boot JDK # Use a different Boot JDK
OLD_BOOT_JDK:=$(BOOT_JDK)
BOOT_JDK:=@BUILD_OUTPUT@/images/j2sdk-image BOOT_JDK:=@BUILD_OUTPUT@/images/j2sdk-image
BOOT_RTJAR:=@BUILD_OUTPUT@/images/j2sdk-image/jre/lib/rt.jar BOOT_RTJAR:=@BUILD_OUTPUT@/images/j2sdk-image/jre/lib/rt.jar
SJAVAC_SERVER_JAVA:=$(subst $(OLD_BOOT_JDK),$(BOOT_JDK),$(SJAVAC_SERVER_JAVA))

View File

@ -49,7 +49,7 @@ JAVAP="@FIXPATH@ @BOOT_JDK@/bin/javap"
LDD="@LDD@" LDD="@LDD@"
MKDIR="@MKDIR@" MKDIR="@MKDIR@"
NAWK="@NAWK@" NAWK="@NAWK@"
NM="@NM@" NM="@GNM@"
OBJDUMP="@OBJDUMP@" OBJDUMP="@OBJDUMP@"
OTOOL="@OTOOL@" OTOOL="@OTOOL@"
PRINTF="@PRINTF@" PRINTF="@PRINTF@"

File diff suppressed because it is too large Load Diff

View File

@ -75,6 +75,19 @@ ARCH=$(OPENJDK_TARGET_CPU_LEGACY)
# If yes then this expands to _LP64:=1 # If yes then this expands to _LP64:=1
@LP64@ @LP64@
# Legacy settings for zero
ZERO_ENDIANNESS=$(OPENJDK_TARGET_CPU_ENDIAN)
ZERO_LIBARCH=$(OPENJDK_TARGET_CPU_LEGACY_LIB)
ZERO_ARCHDEF=@ZERO_ARCHDEF@
ZERO_ARCHFLAG=@ZERO_ARCHFLAG@
LIBFFI_CFLAGS=@LIBFFI_CFLAGS@
LIBFFI_LIBS=@LIBFFI_LIBS@
# Legacy settings for zeroshark
LLVM_CFLAGS=@LLVM_CFLAGS@
LLVM_LIBS=@LLVM_LIBS@
LLVM_LDFLAGS=@LLVM_LDFLAGS@
ALT_OUTPUTDIR=$(HOTSPOT_OUTPUTDIR) ALT_OUTPUTDIR=$(HOTSPOT_OUTPUTDIR)
ALT_EXPORT_PATH=$(HOTSPOT_DIST) ALT_EXPORT_PATH=$(HOTSPOT_DIST)

View File

@ -121,6 +121,15 @@ AC_SUBST(JVM_VARIANT_KERNEL)
AC_SUBST(JVM_VARIANT_ZERO) AC_SUBST(JVM_VARIANT_ZERO)
AC_SUBST(JVM_VARIANT_ZEROSHARK) AC_SUBST(JVM_VARIANT_ZEROSHARK)
INCLUDE_SA=true
if test "x$JVM_VARIANT_ZERO" = xtrue ; then
INCLUDE_SA=false
fi
if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
INCLUDE_SA=false
fi
AC_SUBST(INCLUDE_SA)
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
MACOSX_UNIVERSAL="true" MACOSX_UNIVERSAL="true"
fi fi

View File

@ -687,7 +687,7 @@ if test "x$OPENJDK_TARGET_OS" = xlinux; then
AC_MSG_CHECKING([how to link with libstdc++]) AC_MSG_CHECKING([how to link with libstdc++])
# If dynamic was requested, it's available since it would fail above otherwise. # If dynamic was requested, it's available since it would fail above otherwise.
# If dynamic wasn't requested, go with static unless it isn't available. # If dynamic wasn't requested, go with static unless it isn't available.
if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
LIBCXX="$LIBCXX -lstdc++" LIBCXX="$LIBCXX -lstdc++"
LDCXX="$CXX" LDCXX="$CXX"
STATIC_CXX_SETTING="STATIC_CXX=false" STATIC_CXX_SETTING="STATIC_CXX=false"
@ -701,6 +701,59 @@ if test "x$OPENJDK_TARGET_OS" = xlinux; then
fi fi
AC_SUBST(STATIC_CXX_SETTING) AC_SUBST(STATIC_CXX_SETTING)
if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
# Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
PKG_CHECK_MODULES([LIBFFI], [libffi])
fi
if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
AC_CHECK_PROG([LLVM_CONFIG], [llvm-config], [llvm-config])
if test "x$LLVM_CONFIG" != xllvm-config; then
AC_MSG_ERROR([llvm-config not found in $PATH.])
fi
llvm_components="jit mcjit engine nativecodegen native"
unset LLVM_CFLAGS
for flag in $("$LLVM_CONFIG" --cxxflags); do
if echo "${flag}" | grep -q '^-@<:@ID@:>@'; then
if test "${flag}" != "-D_DEBUG" ; then
if test "${LLVM_CFLAGS}" != "" ; then
LLVM_CFLAGS="${LLVM_CFLAGS} "
fi
LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
fi
fi
done
llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
unset LLVM_LDFLAGS
for flag in $("${LLVM_CONFIG}" --ldflags); do
if echo "${flag}" | grep -q '^-L'; then
if test "${LLVM_LDFLAGS}" != ""; then
LLVM_LDFLAGS="${LLVM_LDFLAGS} "
fi
LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
fi
done
unset LLVM_LIBS
for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
if echo "${flag}" | grep -q '^-l'; then
if test "${LLVM_LIBS}" != ""; then
LLVM_LIBS="${LLVM_LIBS} "
fi
LLVM_LIBS="${LLVM_LIBS}${flag}"
fi
done
AC_SUBST(LLVM_CFLAGS)
AC_SUBST(LLVM_LDFLAGS)
AC_SUBST(LLVM_LIBS)
fi
# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so) # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1" LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"

View File

@ -332,6 +332,29 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS],
DEFINE_CROSS_COMPILE_ARCH="" DEFINE_CROSS_COMPILE_ARCH=""
fi fi
AC_SUBST(DEFINE_CROSS_COMPILE_ARCH) AC_SUBST(DEFINE_CROSS_COMPILE_ARCH)
# Some Zero and Shark settings.
# ZERO_ARCHFLAG tells the compiler which mode to build for
case "${OPENJDK_TARGET_CPU}" in
s390)
ZERO_ARCHFLAG="-m31"
;;
*)
ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
esac
AC_SUBST(ZERO_ARCHFLAG)
# ZERO_ARCHDEF is used to enable architecture-specific code
case "${OPENJDK_TARGET_CPU}" in
ppc*) ZERO_ARCHDEF=PPC ;;
s390*) ZERO_ARCHDEF=S390 ;;
sparc*) ZERO_ARCHDEF=SPARC ;;
x86_64*) ZERO_ARCHDEF=AMD64 ;;
x86) ZERO_ARCHDEF=IA32 ;;
*) ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
esac
AC_SUBST(ZERO_ARCHDEF)
]) ])
AC_DEFUN([PLATFORM_SET_RELEASE_FILE_OS_VALUES], AC_DEFUN([PLATFORM_SET_RELEASE_FILE_OS_VALUES],

View File

@ -225,6 +225,7 @@ BUILD_VARIANT_RELEASE:=@BUILD_VARIANT_RELEASE@
# directory. # directory.
BUILD_OUTPUT:=@BUILD_OUTPUT@ BUILD_OUTPUT:=@BUILD_OUTPUT@
# Colon left out to be able to override IMAGES_OUTPUTDIR for bootcycle-images
LANGTOOLS_OUTPUTDIR=$(BUILD_OUTPUT)/langtools LANGTOOLS_OUTPUTDIR=$(BUILD_OUTPUT)/langtools
CORBA_OUTPUTDIR=$(BUILD_OUTPUT)/corba CORBA_OUTPUTDIR=$(BUILD_OUTPUT)/corba
JAXP_OUTPUTDIR=$(BUILD_OUTPUT)/jaxp JAXP_OUTPUTDIR=$(BUILD_OUTPUT)/jaxp
@ -376,6 +377,7 @@ AR:=@FIXPATH@ @AR@
ARFLAGS:=@ARFLAGS@ ARFLAGS:=@ARFLAGS@
NM:=@NM@ NM:=@NM@
GNM:=@GNM@
STRIP:=@STRIP@ STRIP:=@STRIP@
MCS:=@MCS@ MCS:=@MCS@
@ -522,6 +524,7 @@ FILE:=@FILE@
HG:=@HG@ HG:=@HG@
OBJCOPY:=@OBJCOPY@ OBJCOPY:=@OBJCOPY@
SETFILE:=@SETFILE@ SETFILE:=@SETFILE@
XATTR:=@XATTR@
FIXPATH:=@FIXPATH@ FIXPATH:=@FIXPATH@
@ -634,6 +637,8 @@ INSTALL_SYSCONFDIR=@sysconfdir@
# Name of Service Agent library # Name of Service Agent library
SALIB_NAME=@SALIB_NAME@ SALIB_NAME=@SALIB_NAME@
INCLUDE_SA=@INCLUDE_SA@
OS_VERSION_MAJOR:=@OS_VERSION_MAJOR@ OS_VERSION_MAJOR:=@OS_VERSION_MAJOR@
OS_VERSION_MINOR:=@OS_VERSION_MINOR@ OS_VERSION_MINOR:=@OS_VERSION_MINOR@
OS_VERSION_MICRO:=@OS_VERSION_MICRO@ OS_VERSION_MICRO:=@OS_VERSION_MICRO@
@ -643,16 +648,17 @@ JDK_IMAGE_SUBDIR:=j2sdk-image
JRE_IMAGE_SUBDIR:=j2re-image JRE_IMAGE_SUBDIR:=j2re-image
JDK_OVERLAY_IMAGE_SUBDIR:=j2sdk-overlay-image JDK_OVERLAY_IMAGE_SUBDIR:=j2sdk-overlay-image
JRE_OVERLAY_IMAGE_SUBDIR:=j2re-overlay-image JRE_OVERLAY_IMAGE_SUBDIR:=j2re-overlay-image
JDK_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/$(JDK_IMAGE_SUBDIR) # Colon left out to be able to override output dir for bootcycle-images
JRE_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/$(JRE_IMAGE_SUBDIR) JDK_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_IMAGE_SUBDIR)
JDK_OVERLAY_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/$(JDK_OVERLAY_IMAGE_SUBDIR) JRE_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_IMAGE_SUBDIR)
JRE_OVERLAY_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/$(JRE_OVERLAY_IMAGE_SUBDIR) JDK_OVERLAY_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_OVERLAY_IMAGE_SUBDIR)
JRE_OVERLAY_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_OVERLAY_IMAGE_SUBDIR)
# Macosx bundles directory definitions # Macosx bundles directory definitions
JDK_BUNDLE_SUBDIR:=j2sdk-bundle/jdk$(JDK_VERSION).jdk/Contents JDK_BUNDLE_SUBDIR=j2sdk-bundle/jdk$(JDK_VERSION).jdk/Contents
JRE_BUNDLE_SUBDIR:=j2re-bundle/jre$(JDK_VERSION).jre/Contents JRE_BUNDLE_SUBDIR=j2re-bundle/jre$(JDK_VERSION).jre/Contents
JDK_BUNDLE_DIR:=$(IMAGES_OUTPUTDIR)/$(JDK_BUNDLE_SUBDIR) JDK_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_BUNDLE_SUBDIR)
JRE_BUNDLE_DIR:=$(IMAGES_OUTPUTDIR)/$(JRE_BUNDLE_SUBDIR) JRE_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_BUNDLE_SUBDIR)
# Include the custom-spec.gmk file if it exists # Include the custom-spec.gmk file if it exists
-include $(dir @SPEC@)/custom-spec.gmk -include $(dir @SPEC@)/custom-spec.gmk

View File

@ -441,8 +441,10 @@ fi
AC_SUBST(AS) AC_SUBST(AS)
if test "x$OPENJDK_TARGET_OS" = xsolaris; then if test "x$OPENJDK_TARGET_OS" = xsolaris; then
AC_PATH_PROGS(NM, [gnm nm]) AC_PATH_PROG(NM, nm)
BASIC_FIXUP_EXECUTABLE(NM) BASIC_FIXUP_EXECUTABLE(NM)
AC_PATH_PROG(GNM, gnm)
BASIC_FIXUP_EXECUTABLE(GNM)
AC_PATH_PROG(STRIP, strip) AC_PATH_PROG(STRIP, strip)
BASIC_FIXUP_EXECUTABLE(STRIP) BASIC_FIXUP_EXECUTABLE(STRIP)
AC_PATH_PROG(MCS, mcs) AC_PATH_PROG(MCS, mcs)
@ -450,6 +452,8 @@ if test "x$OPENJDK_TARGET_OS" = xsolaris; then
elif test "x$OPENJDK_TARGET_OS" != xwindows; then elif test "x$OPENJDK_TARGET_OS" != xwindows; then
AC_CHECK_TOOL(NM, nm) AC_CHECK_TOOL(NM, nm)
BASIC_FIXUP_EXECUTABLE(NM) BASIC_FIXUP_EXECUTABLE(NM)
GNM="$NM"
AC_SUBST(GNM)
AC_CHECK_TOOL(STRIP, strip) AC_CHECK_TOOL(STRIP, strip)
BASIC_FIXUP_EXECUTABLE(STRIP) BASIC_FIXUP_EXECUTABLE(STRIP)
fi fi

View File

@ -70,7 +70,7 @@ define add_idl_package
$(PREFIXES) \ $(PREFIXES) \
$4 $4
$(RM) -f $$(addprefix $3/$$($4_TMPDIR)/,$6) $(RM) -f $$(addprefix $3/$$($4_TMPDIR)/,$6)
$(CP) -rp $3/$$($4_TMPDIR)/* $3 $(CP) -r $3/$$($4_TMPDIR)/* $3
($(CD) $3/$$($4_TMPDIR) && $(FIND) . -type f | $(SED) 's!\./!$3/!g' | $(NAWK) '{ print $$$$1 ": $4" }' > $5) ($(CD) $3/$$($4_TMPDIR) && $(FIND) . -type f | $(SED) 's!\./!$3/!g' | $(NAWK) '{ print $$$$1 ": $4" }' > $5)
$(RM) -rf $3/$$($4_TMPDIR) $(RM) -rf $3/$$($4_TMPDIR)
endef endef

View File

@ -86,7 +86,7 @@ define SetupArchive
# NOTE: $2 is dependencies, not a named argument! # NOTE: $2 is dependencies, not a named argument!
$(foreach i,3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE)) $(foreach i,3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
$(call LogSetupMacroEntry,SetupArchive($1),<dependencies>,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15)) $(call LogSetupMacroEntry,SetupArchive($1),<dependencies>,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
$(if $(findstring $(LOG),debug trace), $(info *[2] <dependencies> = $(strip $2))) $(if $(findstring $(LOG_LEVEL),debug trace), $(info *[2] <dependencies> = $(strip $2)))
$(if $(16),$(error Internal makefile error: Too many arguments to SetupArchive, please update JavaCompilation.gmk)) $(if $(16),$(error Internal makefile error: Too many arguments to SetupArchive, please update JavaCompilation.gmk))
$1_JARMAIN:=$(strip $$($1_JARMAIN)) $1_JARMAIN:=$(strip $$($1_JARMAIN))
@ -505,7 +505,7 @@ define SetupJavaCompilation
--permit-unidentified-artifacts \ --permit-unidentified-artifacts \
--permit-sources-without-package \ --permit-sources-without-package \
--compare-found-sources $$($1_BIN)/_the.batch.tmp \ --compare-found-sources $$($1_BIN)/_the.batch.tmp \
--log=$(LOG) \ --log=$(LOG_LEVEL) \
$$($1_SJAVAC_ARGS) \ $$($1_SJAVAC_ARGS) \
$$($1_FLAGS) \ $$($1_FLAGS) \
$$($1_HEADERS_ARG) \ $$($1_HEADERS_ARG) \

View File

@ -64,6 +64,10 @@ HOTSPOT_AVAILABLE := $(if $(wildcard $(root_dir)/hotspot),true,false)
# Build with the configure bridge. After running configure, restart make # Build with the configure bridge. After running configure, restart make
# to parse the new spec file. # to parse the new spec file.
BRIDGE_TARGETS := all BRIDGE_TARGETS := all
# Add bootcycle-images target if legacy variable is set.
ifeq ($(SKIP_BOOT_CYCLE),false)
BRIDGE_TARGETS += bootcycle-images
endif
bridgeBuild: bridge2configure bridgeBuild: bridge2configure
@cd $(root_dir) && $(MAKE) -f NewMakefile.gmk $(BRIDGE_TARGETS) @cd $(root_dir) && $(MAKE) -f NewMakefile.gmk $(BRIDGE_TARGETS)
@ -99,6 +103,9 @@ endif
ifdef ALT_FREETYPE_HEADERS_PATH ifdef ALT_FREETYPE_HEADERS_PATH
@$(ECHO) " --with-freetype=$(call UnixPath,$(ALT_FREETYPE_HEADERS_PATH)/..) " >> $@.tmp @$(ECHO) " --with-freetype=$(call UnixPath,$(ALT_FREETYPE_HEADERS_PATH)/..) " >> $@.tmp
endif endif
ifdef ENABLE_SJAVAC
@$(ECHO) " --enable-sjavac" >> $@.tmp
endif
ifeq ($(HOTSPOT_AVAILABLE),false) ifeq ($(HOTSPOT_AVAILABLE),false)
ifdef ALT_JDK_IMPORT_PATH ifdef ALT_JDK_IMPORT_PATH
@$(ECHO) " --with-import-hotspot=$(call UnixPath,$(ALT_JDK_IMPORT_PATH)) " >> $@.tmp @$(ECHO) " --with-import-hotspot=$(call UnixPath,$(ALT_JDK_IMPORT_PATH)) " >> $@.tmp

View File

@ -175,9 +175,8 @@ sign-jars-only: start-make
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk sign-jars) @($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk sign-jars)
@$(call TargetExit) @$(call TargetExit)
bootcycle-images: bootcycle-images: images bootcycle-images-only
@$(ECHO) Boot cycle build step 1: Building the JDK image normally bootcycle-images-only: start-make
@($(CD) $(SRC_ROOT)/common/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) SPEC=$(SPEC) images)
@$(ECHO) Boot cycle build step 2: Building a new JDK image using previously built image @$(ECHO) Boot cycle build step 2: Building a new JDK image using previously built image
@($(CD) $(SRC_ROOT)/common/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) SPEC=$(dir $(SPEC))bootcycle-spec.gmk images) @($(CD) $(SRC_ROOT)/common/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) SPEC=$(dir $(SPEC))bootcycle-spec.gmk images)

View File

@ -328,7 +328,7 @@ $(ECHO) $1/$(HGTIP_FILENAME)
endef endef
define SetupLogging define SetupLogging
ifeq ($$(LOG), trace) ifeq ($$(LOG_LEVEL),trace)
# Shell redefinition trick inspired by http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make # Shell redefinition trick inspired by http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make
# For each target executed, will print # For each target executed, will print
# Building <TARGET> (from <FIRST PREREQUISITE>) (<ALL NEWER PREREQUISITES> newer) # Building <TARGET> (from <FIRST PREREQUISITE>) (<ALL NEWER PREREQUISITES> newer)
@ -339,17 +339,17 @@ define SetupLogging
endif endif
# Never remove warning messages; this is just for completeness # Never remove warning messages; this is just for completeness
LOG_WARN= LOG_WARN=
ifneq ($$(findstring $$(LOG),info debug trace),) ifneq ($$(findstring $$(LOG_LEVEL),info debug trace),)
LOG_INFO= LOG_INFO=
else else
LOG_INFO=> /dev/null LOG_INFO=> /dev/null
endif endif
ifneq ($$(findstring $$(LOG),debug trace),) ifneq ($$(findstring $$(LOG_LEVEL),debug trace),)
LOG_DEBUG= LOG_DEBUG=
else else
LOG_DEBUG=> /dev/null LOG_DEBUG=> /dev/null
endif endif
ifneq ($$(findstring $$(LOG),trace),) ifneq ($$(findstring $$(LOG_LEVEL),trace),)
LOG_TRACE= LOG_TRACE=
else else
LOG_TRACE=> /dev/null LOG_TRACE=> /dev/null
@ -362,7 +362,7 @@ $(eval $(call SetupLogging))
# This is to be called by all SetupFoo macros # This is to be called by all SetupFoo macros
define LogSetupMacroEntry define LogSetupMacroEntry
$(if $(26),$(error Internal makefile error: Too many arguments to LogSetupMacroEntry, please update MakeBase.gmk)) $(if $(26),$(error Internal makefile error: Too many arguments to LogSetupMacroEntry, please update MakeBase.gmk))
$(if $(findstring $(LOG),debug trace), $(info $1 $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25,$(if $($i),$(NEWLINE) $(strip [$i] $($i)))))) $(if $(findstring $(LOG_LEVEL),debug trace), $(info $1 $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25,$(if $($i),$(NEWLINE) $(strip [$i] $($i))))))
endef endef
# Make directory without forking mkdir if not needed # Make directory without forking mkdir if not needed
@ -374,15 +374,24 @@ endef
ifeq ($(OPENJDK_TARGET_OS),solaris) ifeq ($(OPENJDK_TARGET_OS),solaris)
# On Solaris, if the target is a symlink and exists, cp won't overwrite. # On Solaris, if the target is a symlink and exists, cp won't overwrite.
# Cp has to operate in recursive mode to allow for -P flag, to preserve soft links. If the
# name of the target file differs from the source file, rename after copy.
define install-file define install-file
$(MKDIR) -p $(@D) $(MKDIR) -p $(@D)
$(RM) '$@' $(RM) '$@'
$(CP) -f -r -P '$<' '$(@D)' $(CP) -f -r -P '$<' '$(@D)'
if [ "$(@F)" != "$(<F)" ]; then $(MV) '$(@D)/$(<F)' '$@'; fi
endef endef
else ifeq ($(OPENJDK_TARGET_OS),macosx) else ifeq ($(OPENJDK_TARGET_OS),macosx)
# On mac, extended attributes sometimes creep into the source files, which may later
# cause the creation of ._* files which confuses testing. Clear these with xattr if
# set. Some files get their write permissions removed after being copied to the
# output dir. When these are copied again to images, xattr would fail. By only clearing
# attributes when they are present, failing on this is avoided.
define install-file define install-file
$(MKDIR) -p $(@D) $(MKDIR) -p $(@D)
$(CP) -fpRP '$<' '$@' $(CP) -fRP '$<' '$@'
if [ -n "`$(XATTR) -l '$@'`" ]; then $(XATTR) -c '$@'; fi
endef endef
else else
define install-file define install-file

View File

@ -184,26 +184,34 @@ define ParseLogLevel
LOG_STRIPPED2=$$(subst nofile,,$$(LOG_STRIPPED1)) LOG_STRIPPED2=$$(subst nofile,,$$(LOG_STRIPPED1))
# We might have ended up with a leading comma. Remove it # We might have ended up with a leading comma. Remove it
LOG_STRIPPED3=$$(strip $$(patsubst $$(COMMA)%,%,$$(LOG_STRIPPED2))) LOG_STRIPPED3=$$(strip $$(patsubst $$(COMMA)%,%,$$(LOG_STRIPPED2)))
override LOG:=$$(LOG_STRIPPED3) LOG_LEVEL:=$$(LOG_STRIPPED3)
else
LOG_LEVEL:=$$(LOG)
endif endif
ifeq ($$(LOG),) ifeq ($$(LOG_LEVEL),)
# Set LOG to "warn" as default if not set (and no VERBOSE given) # Set LOG to "warn" as default if not set (and no VERBOSE given)
override LOG=warn override LOG_LEVEL=warn
endif endif
ifeq ($$(LOG),warn) ifeq ($$(LOG_LEVEL),warn)
VERBOSE=-s VERBOSE=-s
else ifeq ($$(LOG),info) else ifeq ($$(LOG_LEVEL),info)
VERBOSE=-s VERBOSE=-s
else ifeq ($$(LOG),debug) else ifeq ($$(LOG_LEVEL),debug)
VERBOSE= VERBOSE=
else ifeq ($$(LOG),trace) else ifeq ($$(LOG_LEVEL),trace)
VERBOSE= VERBOSE=
else else
$$(info Error: LOG must be one of: warn, info, debug or trace.) $$(info Error: LOG must be one of: warn, info, debug or trace.)
$$(eval $$(call FatalError)) $$(eval $$(call FatalError))
endif endif
else else
# Provide resonable interpretations of LOG_LEVEL if VERBOSE is given.
ifeq ($(VERBOSE),)
LOG_LEVEL:=debug
else
LOG_LEVEL:=warn
endif
ifneq ($$(LOG),) ifneq ($$(LOG),)
# We have both a VERBOSE and a LOG argument. This is OK only if this is a repeated call by ourselves, # We have both a VERBOSE and a LOG argument. This is OK only if this is a repeated call by ourselves,
# but complain if this is the top-level make call. # but complain if this is the top-level make call.