8065913: Various improvements in SetupNativeCompilation

Reviewed-by: erikj
This commit is contained in:
Magnus Ihse Bursie 2014-11-26 15:14:14 +01:00
parent e9f4e57a6b
commit 88f336ba40
4 changed files with 121 additions and 72 deletions

View File

@ -94,9 +94,9 @@ AC_DEFUN_ONCE([FLAGS_SETUP_INIT_FLAGS],
# On Windows, we need to set RC flags.
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
RC_FLAGS="-nologo -l 0x409 -r"
RC_FLAGS="-nologo -l0x409"
if test "x$VARIANT" = xOPT; then
RC_FLAGS="$RC_FLAGS -d NDEBUG"
RC_FLAGS="$RC_FLAGS -DNDEBUG"
fi
# The version variables used to create RC_FLAGS may be overridden
@ -105,13 +105,13 @@ AC_DEFUN_ONCE([FLAGS_SETUP_INIT_FLAGS],
# The \$ are escaped to the shell, and the $(...) variables
# are evaluated by make.
RC_FLAGS="$RC_FLAGS \
-d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
-d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
-d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
-d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
-d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
-d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
-d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
-D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
-D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
-D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
-D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
-D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
-D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
-D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
fi
AC_SUBST(RC_FLAGS)

View File

@ -4331,7 +4331,7 @@ TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
DATE_WHEN_GENERATED=1416582658
DATE_WHEN_GENERATED=1417011146
###############################################################################
#
@ -41641,9 +41641,9 @@ $as_echo "$tool_specified" >&6; }
# On Windows, we need to set RC flags.
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
RC_FLAGS="-nologo -l 0x409 -r"
RC_FLAGS="-nologo -l0x409"
if test "x$VARIANT" = xOPT; then
RC_FLAGS="$RC_FLAGS -d NDEBUG"
RC_FLAGS="$RC_FLAGS -DNDEBUG"
fi
# The version variables used to create RC_FLAGS may be overridden
@ -41652,13 +41652,13 @@ $as_echo "$tool_specified" >&6; }
# The \$ are escaped to the shell, and the $(...) variables
# are evaluated by make.
RC_FLAGS="$RC_FLAGS \
-d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
-d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
-d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
-d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
-d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
-d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
-d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
-D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
-D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
-D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
-D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
-D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
-D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
-D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
fi

View File

@ -36,6 +36,7 @@
X:=
SPACE:=$(X) $(X)
COMMA:=,
DOLLAR:=$$
HASH:=\#
LEFT_PAREN:=(
RIGHT_PAREN:=)

View File

@ -34,17 +34,18 @@ ifeq (,$(_MAKEBASE_GMK))
$(error You must include MakeBase.gmk prior to including NativeCompilation.gmk)
endif
ifneq ($(TOOLCHAIN_TYPE), microsoft)
COMPILING_MSG=echo $(LOG_INFO) "Compiling $(notdir $1) (for $(notdir $2))"
LINKING_MSG=echo $(LOG_INFO) "Linking $1"
LINKING_EXE_MSG=echo $(LOG_INFO) "Linking executable $1"
ARCHIVING_MSG=echo $(LOG_INFO) "Archiving $1"
else
COMPILING_MSG=
LINKING_MSG=
LINKING_EXE_MSG=
ARCHIVING_MSG=
endif
# Extensions of files handled by this macro.
NATIVE_SOURCE_EXTENSIONS := %.s %.c %.cpp %.m %.mm
# Replaces native source extensions with the object file extension in a string.
# Param 1: the string containing source file names with extensions
# The surrounding strip is needed to keep additional whitespace out
define replace_with_obj_extension
$(strip \
$(foreach extension, $(NATIVE_SOURCE_EXTENSIONS), \
$(patsubst $(extension),%$(OBJ_SUFFIX),$(filter $(extension),$1))) \
)
endef
ifeq ($(OPENJDK_BUILD_OS_ENV), windows.cygwin)
UNIX_PATH_PREFIX := /cygdrive
@ -52,6 +53,15 @@ else ifeq ($(OPENJDK_BUILD_OS_ENV), windows.msys)
UNIX_PATH_PREFIX :=
endif
WINDOWS_SHOWINCLUDE_SED_PATTERN := \
-e '/^Note: including file:/!d' \
-e 's|Note: including file: *||' \
-e 's|\\|/|g' \
-e 's|^\([a-zA-Z]\):|$(UNIX_PATH_PREFIX)/\1|g' \
-e '/$(subst /,\/,$(TOPDIR))/!d' \
-e 's|$$$$| \\|g' \
#
define add_native_source
# param 1 = BUILD_MYPACKAGE
# parma 2 = the source file name (..../alfa.c or .../beta.cpp)
@ -60,7 +70,8 @@ define add_native_source
# param 5 = the c compiler
# param 6 = the c++ flags to the compiler
# param 7 = the c++ compiler
# param 8 = the flags to the assembler
# param 8 = the objc compiler
# param 9 = the flags to the assembler
ifneq (,$$(filter %.c,$2))
# Compile as a C file
@ -70,25 +81,27 @@ define add_native_source
else ifneq (,$$(filter %.m,$2))
# Compile as a objective-c file
$1_$2_FLAGS=-x objective-c $4 $$($1_$(notdir $2)_CFLAGS) -DTHIS_FILE='"$$(<F)"' -c
$1_$2_COMP=$5
$1_$2_COMP=$8
$1_$2_DEP_FLAG:=$(C_FLAG_DEPS)
else ifneq (,$$(filter %.s,$2))
# Compile as assembler file
$1_$2_FLAGS=$8 -DTHIS_FILE='"$$(<F)"'
$1_$2_FLAGS=$9 -DTHIS_FILE='"$$(<F)"'
$1_$2_COMP=$(AS)
$1_$2_DEP_FLAG:=
else
else ifneq (,$$(filter %.cpp,$2)$$(filter %.mm,$2))
# Compile as a C++ file
$1_$2_FLAGS=$6 $$($1_$(notdir $2)_CXXFLAGS) -DTHIS_FILE='"$$(<F)"' -c
$1_$2_COMP=$7
$1_$2_DEP_FLAG:=$(CXX_FLAG_DEPS)
else
$$(error Internal error in NativeCompilation.gmk: no compiler for file $2)
endif
# Generate the .o (.obj) file name and place it in the bin dir.
$1_$2_OBJ:=$3/$$(patsubst %.cpp,%$(OBJ_SUFFIX),$$(patsubst %.c,%$(OBJ_SUFFIX),$$(patsubst %.m,%$(OBJ_SUFFIX),$$(patsubst %.s,%$(OBJ_SUFFIX),$$(notdir $2)))))
$1_$2_OBJ := $3/$$(call replace_with_obj_extension, $$(notdir $2))
# Only continue if this object file hasn't been processed already. This lets the first found
# source file override any other with the same name.
ifeq (,$$(findstring $$($1_$2_OBJ),$$($1_OBJS_SO_FAR)))
$1_OBJS_SO_FAR+=$$($1_$2_OBJ)
ifeq (,$$(findstring $$($1_$2_OBJ),$$($1_ALL_OBJS)))
$1_ALL_OBJS+=$$($1_$2_OBJ)
ifeq (,$$(filter %.s,$2))
# And this is the dependency file for this obj file.
$1_$2_DEP:=$$(patsubst %$(OBJ_SUFFIX),%.d,$$($1_$2_OBJ))
@ -101,9 +114,9 @@ define add_native_source
endif
endif
$$($1_$2_OBJ) : $2
$$($1_$2_OBJ) : $2 | $$($1_BUILD_INFO)
$(ECHO) $(LOG_INFO) "Compiling $$(notdir $2) (for $$(notdir $$($1_TARGET)))"
ifneq ($(TOOLCHAIN_TYPE), microsoft)
$$(call COMPILING_MSG,$2,$$($1_TARGET))
# The Solaris studio compiler doesn't output the full path to the object file in the
# generated deps files. Fixing it with sed. If compiling assembly, don't try this.
ifeq ($(TOOLCHAIN_TYPE)$$(filter %.s,$2), solstudio)
@ -119,17 +132,11 @@ define add_native_source
ifeq ($(TOOLCHAIN_TYPE), microsoft)
($$($1_$2_COMP) $$($1_$2_FLAGS) -showIncludes $$($1_$2_DEBUG_OUT_FLAGS) \
$(CC_OUT_OPTION)$$($1_$2_OBJ) $2 ; echo $$$$? > $$($1_$2_DEP).exitvalue) \
| $(TEE) $$($1_$2_DEP).raw | $(GREP) -v "^Note: including file:" \
&& exit `cat $$($1_$2_DEP).exitvalue`
| $(TEE) $$($1_$2_DEP).raw | $(GREP) -v -e "^Note: including file:" \
-e "^$(notdir $2)$$$$" ; exit `cat $$($1_$2_DEP).exitvalue`
$(RM) $$($1_$2_DEP).exitvalue
($(ECHO) $$@: \\ \
&& $(SED) -e '/^Note: including file:/!d' \
-e 's|Note: including file: *||' \
-e 's|\\|/|g' \
-e 's|^\([a-zA-Z]\):|$(UNIX_PATH_PREFIX)/\1|g' \
-e '/$(subst /,\/,$(TOPDIR))/!d' \
-e 's|$$$$| \\|g' \
$$($1_$2_DEP).raw) > $$($1_$2_DEP)
&& $(SED) $(WINDOWS_SHOWINCLUDE_SED_PATTERN) $$($1_$2_DEP).raw) > $$($1_$2_DEP)
endif
endif
endef
@ -204,7 +211,11 @@ define SetupNativeCompilationInner
$$(error LIBRARY should be specified without LIBRARY_PREFIX: $(LIBRARY_PREFIX))
endif
$1_BASENAME:=$(LIBRARY_PREFIX)$$($1_LIBRARY)$(SHARED_LIBRARY_SUFFIX)
ifeq ($$($1_SUFFIX), )
$1_SUFFIX := $(SHARED_LIBRARY_SUFFIX)
endif
$1_BASENAME:=$(LIBRARY_PREFIX)$$($1_LIBRARY)$$($1_SUFFIX)
$1_TARGET:=$$($1_OUTPUT_DIR)/$$($1_BASENAME)
$1_NOSUFFIX:=$(LIBRARY_PREFIX)$$($1_LIBRARY)
endif
@ -226,7 +237,11 @@ define SetupNativeCompilationInner
$$(error STATIC_LIBRARY should be specified without LIBRARY_PREFIX: $(LIBRARY_PREFIX))
endif
$1_BASENAME:=$(LIBRARY_PREFIX)$$($1_STATIC_LIBRARY)$(STATIC_LIBRARY_SUFFIX)
ifeq ($$($1_SUFFIX), )
$1_SUFFIX := $(STATIC_LIBRARY_SUFFIX)
endif
$1_BASENAME:=$(LIBRARY_PREFIX)$$($1_STATIC_LIBRARY)$$($1_SUFFIX)
$1_TARGET:=$$($1_OUTPUT_DIR)/$$($1_BASENAME)
$1_NOSUFFIX:=$(LIBRARY_PREFIX)$$($1_STATIC_LIBRARY)
endif
@ -244,7 +259,11 @@ define SetupNativeCompilationInner
$$(error PROGRAM should be specified without EXE_SUFFIX: $(EXE_SUFFIX))
endif
$1_BASENAME:=$$($1_PROGRAM)$(EXE_SUFFIX)
ifeq ($$($1_SUFFIX), )
$1_SUFFIX := $(EXE_SUFFIX)
endif
$1_BASENAME:=$$($1_PROGRAM)$$($1_SUFFIX)
$1_TARGET:=$$($1_OUTPUT_DIR)/$$($1_BASENAME)
$1_NOSUFFIX:=$$($1_PROGRAM)
endif
@ -260,11 +279,17 @@ define SetupNativeCompilationInner
ifeq ($$($1_LDEXE),)
$1_LDEXE:=$(LDEXE)
endif
$1_LD:=$(LD)
ifeq ($$($1_LD),)
$1_LD:=$(LD)
endif
else
ifeq (C++,$$($1_LANG))
$1_LD:=$(LDCXX)
$1_LDEXE:=$(LDEXECXX)
ifeq ($$($1_LD),)
$1_LD:=$(LDCXX)
endif
ifeq ($$($1_LDEXE),)
$1_LDEXE:=$(LDEXECXX)
endif
else
$$(error Unknown native language $$($1_LANG) for $1)
endif
@ -273,6 +298,12 @@ define SetupNativeCompilationInner
ifeq ($$($1_CC),)
$1_CC:=$(CC)
endif
ifeq ($$($1_CXX),)
$1_CXX:=$(CXX)
endif
ifeq ($$($1_OBJC),)
$1_OBJC:=$(OBJC)
endif
# Make sure the dirs exist.
$$(eval $$(call MakeDir,$$($1_OBJECT_DIR) $$($1_OUTPUT_DIR)))
@ -286,7 +317,7 @@ define SetupNativeCompilationInner
ifneq ($$($1_EXCLUDE_FILES),)
$1_EXCLUDE_FILES:=$$(addprefix %,$$($1_EXCLUDE_FILES))
endif
$1_SRCS := $$(filter-out $$($1_EXCLUDE_FILES),$$(filter %.s %.c %.cpp %.m,$$($1_ALL_SRCS)))
$1_SRCS := $$(filter-out $$($1_EXCLUDE_FILES),$$(filter $$(NATIVE_SOURCE_EXTENSIONS),$$($1_ALL_SRCS)))
ifneq (,$$(strip $$($1_INCLUDE_FILES)))
$1_SRCS := $$(filter $$($1_INCLUDE_FILES),$$($1_SRCS))
endif
@ -309,9 +340,12 @@ define SetupNativeCompilationInner
$1_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_SRCS))
endif
$1_SRCS += $$($1_EXTRA_FILES)
# Calculate the expected output from compiling the sources (sort to remove duplicates. Also provides
# a reproducable order on the input files to the linker).
$1_EXPECTED_OBJS:=$$(sort $$(addprefix $$($1_OBJECT_DIR)/,$$(patsubst %.cpp,%$(OBJ_SUFFIX),$$(patsubst %.c,%$(OBJ_SUFFIX),$$(patsubst %.m,%$(OBJ_SUFFIX),$$(patsubst %.s,%$(OBJ_SUFFIX),$$(notdir $$($1_SRCS))))))))
$1_EXPECTED_OBJS_FILENAMES := $$(call replace_with_obj_extension, $$(notdir $$($1_SRCS)))
$1_EXPECTED_OBJS:=$$(sort $$(addprefix $$($1_OBJECT_DIR)/,$$($1_EXPECTED_OBJS_FILENAMES)))
# Are there too many object files on disk? Perhaps because some source file was removed?
$1_SUPERFLOUS_OBJS:=$$(sort $$(filter-out $$($1_EXPECTED_OBJS),$$($1_BINS)))
# Clean out the superfluous object files.
@ -345,7 +379,7 @@ define SetupNativeCompilationInner
$1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_release)
endif
ifneq (,$$($1_DEBUG_SYMBOLS))
ifeq ($$($1_DEBUG_SYMBOLS), true)
ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
ifdef OPENJDK
# Always add debug symbols
@ -390,22 +424,38 @@ define SetupNativeCompilationInner
$$(error Unknown value for OPTIMIZATION: $$($1_OPTIMIZATION))
endif
# Add sys root specific cflags last
$1_EXTRA_CFLAGS += $(SYSROOT_CFLAGS)
$1_EXTRA_CXXFLAGS += $(SYSROOT_CFLAGS)
$1_BUILD_INFO := $$($1_OBJECT_DIR)/_build-info.marker
# Setup rule for printing progress info when compiling source files.
# This is a rough heuristic and may not always print accurate information.
$$($1_BUILD_INFO): $$($1_SRCS)
ifeq ($$(wildcard $$($1_TARGET)),)
$(ECHO) 'Creating $$($1_BASENAME) from $$(words $$?) file(s)'
else
$(ECHO) 'Updating $$($1_BASENAME) from $$(words $$?) file(s)'
endif
$(TOUCH) $$@
# Now call add_native_source for each source file we are going to compile.
$$(foreach p,$$($1_SRCS), \
$$(eval $$(call add_native_source,$1,$$p,$$($1_OBJECT_DIR), \
$$($1_CFLAGS) $$($1_EXTRA_CFLAGS),$$($1_CC), \
$$($1_CXXFLAGS) $$($1_EXTRA_CXXFLAGS),$(CXX),$$($1_ASFLAGS))))
$(SYSROOT_CFLAGS) $$($1_CFLAGS) $$($1_EXTRA_CFLAGS),$$($1_CC), \
$(SYSROOT_CFLAGS) $$($1_CXXFLAGS) $$($1_EXTRA_CXXFLAGS),$$($1_CXX),$$($1_OBJC),$$($1_ASFLAGS))))
# On windows we need to create a resource file
ifeq ($(OPENJDK_TARGET_OS), windows)
ifneq (,$$($1_VERSIONINFO_RESOURCE))
$1_RES:=$$($1_OBJECT_DIR)/$$($1_BASENAME).res
$1_RES_DEP:=$$($1_RES).d
-include $$($1_RES_DEP)
$$($1_RES): $$($1_VERSIONINFO_RESOURCE)
$(ECHO) $(LOG_INFO) "Compiling resource $$(notdir $$($1_VERSIONINFO_RESOURCE)) (for $$(notdir $$($1_TARGET)))"
$(RC) $$($1_RC_FLAGS) $(CC_OUT_OPTION)$$@ $$($1_VERSIONINFO_RESOURCE)
# Windows RC compiler does not support -showIncludes, so we mis-use CL for this.
$(CC) $$($1_RC_FLAGS) -showIncludes -nologo -TC \
$(CC_OUT_OPTION)$$($1_RES_DEP).obj $$($1_VERSIONINFO_RESOURCE) > $$($1_RES_DEP).raw 2>&1 || exit 0
($(ECHO) $$($1_RES): \\ \
&& $(SED) $(WINDOWS_SHOWINCLUDE_SED_PATTERN) $$($1_RES_DEP).raw) > $$($1_RES_DEP)
endif
ifneq (,$$($1_MANIFEST))
$1_GEN_MANIFEST:=$$($1_OBJECT_DIR)/$$($1_PROGRAM).manifest
@ -439,12 +489,10 @@ define SetupNativeCompilationInner
$1_EXTRA_LDFLAGS += $(call SET_SHARED_LIBRARY_MAPFILE,$$($1_REAL_MAPFILE))
endif
$1_EXTRA_LDFLAGS += $(SYSROOT_LDFLAGS)
# Need to make sure TARGET is first on list
$1 := $$($1_TARGET)
ifeq ($$($1_STATIC_LIBRARY),)
ifneq ($$($1_DEBUG_SYMBOLS),)
ifeq ($$($1_DEBUG_SYMBOLS), true)
ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
ifneq ($(OPENJDK_TARGET_OS), macosx) # no MacOS X support yet
ifneq ($$($1_OUTPUT_DIR),$$($1_OBJECT_DIR))
@ -523,10 +571,10 @@ define SetupNativeCompilationInner
$1_EXTRA_LDFLAGS_SUFFIX += $(GLOBAL_LDFLAGS_SUFFIX)
$$($1_TARGET) : $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_REAL_MAPFILE)
$$(call LINKING_MSG,$$($1_BASENAME))
$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $(LD_OUT_OPTION)$$@ \
$$($1_EXPECTED_OBJS) $$($1_RES) $$($1_LDFLAGS_SUFFIX) \
$$($1_EXTRA_LDFLAGS_SUFFIX)
$(ECHO) $(LOG_INFO) "Linking $$($1_BASENAME)"
$$($1_LD) $(SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $(LD_OUT_OPTION)$$@ \
$$($1_EXPECTED_OBJS) $$($1_RES) $$($1_LDFLAGS_SUFFIX) \
$$($1_EXTRA_LDFLAGS_SUFFIX)
# Touch target to make sure it has a later time stamp than the debug
# symbol files to avoid unnecessary relinking on rebuild.
ifeq ($(OPENJDK_TARGET_OS), windows)
@ -538,7 +586,7 @@ define SetupNativeCompilationInner
ifneq (,$$($1_STATIC_LIBRARY))
# Generating a static library, ie object file archive.
$$($1_TARGET) : $$($1_EXPECTED_OBJS) $$($1_RES)
$$(call ARCHIVING_MSG,$$($1_LIBRARY))
$(ECHO) $(LOG_INFO) "Archiving $$($1_STATIC_LIBRARY)"
$(AR) $$($1_ARFLAGS) $(AR_OUT_OPTION)$$($1_TARGET) $$($1_EXPECTED_OBJS) \
$$($1_RES) $$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX)
endif
@ -548,8 +596,8 @@ define SetupNativeCompilationInner
$1_EXTRA_LDFLAGS_SUFFIX += $(GLOBAL_LDFLAGS_SUFFIX)
$$($1_TARGET) : $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_GEN_MANIFEST)
$$(call LINKING_EXE_MSG,$$($1_BASENAME))
$$($1_LDEXE) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $(EXE_OUT_OPTION)$$($1_TARGET) \
$(ECHO) $(LOG_INFO) "Linking executable $$($1_BASENAME)"
$$($1_LDEXE) $(SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $(EXE_OUT_OPTION)$$($1_TARGET) \
$$($1_EXPECTED_OBJS) $$($1_RES) $$($1_LDFLAGS_SUFFIX) \
$$($1_EXTRA_LDFLAGS_SUFFIX)
ifneq (,$$($1_GEN_MANIFEST))