8142907: Integration of minor fixes from the build-infra project
Reviewed-by: erikj, dholmes
This commit is contained in:
parent
7a0c72ef9c
commit
a3410ef323
@ -309,7 +309,7 @@ define SetupBuildJvmtiDemoBody
|
|||||||
|
|
||||||
ifeq ($$($1_TOOLCHAIN), TOOLCHAIN_LINK_CXX)
|
ifeq ($$($1_TOOLCHAIN), TOOLCHAIN_LINK_CXX)
|
||||||
# For C++, we also need some special treatment.
|
# For C++, we also need some special treatment.
|
||||||
$1_LDFLAGS := $(LDFLAGS_CXX_JDK)
|
$1_LDFLAGS := $$(LDFLAGS_CXX_JDK)
|
||||||
$1_LIBS := $(LIBCXX)
|
$1_LIBS := $(LIBCXX)
|
||||||
|
|
||||||
ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
|
ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
|
||||||
@ -324,9 +324,9 @@ define SetupBuildJvmtiDemoBody
|
|||||||
OPTIMIZATION := LOW, \
|
OPTIMIZATION := LOW, \
|
||||||
CFLAGS := $$($1_CFLAGS_INCLUDE) $$(CFLAGS_JDKLIB) $$(CFLAGS_DEBUG_SYMBOLS), \
|
CFLAGS := $$($1_CFLAGS_INCLUDE) $$(CFLAGS_JDKLIB) $$(CFLAGS_DEBUG_SYMBOLS), \
|
||||||
CXXFLAGS := $$($1_CXXFLAGS), \
|
CXXFLAGS := $$($1_CXXFLAGS), \
|
||||||
LDFLAGS := $(filter-out -incremental:no -opt:ref, $(LDFLAGS_JDKLIB)) \
|
LDFLAGS := $(filter-out -incremental:no -opt:ref, $$(LDFLAGS_JDKLIB)) \
|
||||||
$$($1_LDFLAGS), \
|
$$($1_LDFLAGS), \
|
||||||
LDFLAGS_macosx := $(call SET_EXECUTABLE_ORIGIN), \
|
LDFLAGS_macosx := $$(call SET_EXECUTABLE_ORIGIN), \
|
||||||
LIBS := $$($1_LIBS), \
|
LIBS := $$($1_LIBS), \
|
||||||
LIBS_solaris := -lc, \
|
LIBS_solaris := -lc, \
|
||||||
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
|
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
|
||||||
|
@ -127,8 +127,7 @@ ifneq ($(BUILD_JEXEC_SRC), )
|
|||||||
$(BUILD_JEXEC_INC), \
|
$(BUILD_JEXEC_INC), \
|
||||||
CFLAGS_linux := -fPIC, \
|
CFLAGS_linux := -fPIC, \
|
||||||
CFLAGS_solaris := -KPIC, \
|
CFLAGS_solaris := -KPIC, \
|
||||||
LDFLAGS := $(LDFLAGS_JDKEXE) \
|
LDFLAGS := $(LDFLAGS_JDKEXE), \
|
||||||
$(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)), \
|
|
||||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jexec_obj, \
|
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jexec_obj, \
|
||||||
OUTPUT_DIR := $(BUILD_JEXEC_DST_DIR), \
|
OUTPUT_DIR := $(BUILD_JEXEC_DST_DIR), \
|
||||||
DEBUG_SYMBOLS := true, \
|
DEBUG_SYMBOLS := true, \
|
||||||
|
@ -89,7 +89,6 @@ $(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE, \
|
|||||||
MAPFILE := $(UNPACK_MAPFILE),\
|
MAPFILE := $(UNPACK_MAPFILE),\
|
||||||
LDFLAGS := $(UNPACKEXE_ZIPOBJS) \
|
LDFLAGS := $(UNPACKEXE_ZIPOBJS) \
|
||||||
$(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \
|
$(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \
|
||||||
$(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)unpack$(SHARED_LIBRARY_SUFFIX)) \
|
|
||||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||||
LIBS := $(UNPACKEXE_LIBS) $(LIBCXX), \
|
LIBS := $(UNPACKEXE_LIBS) $(LIBCXX), \
|
||||||
LIBS_solaris := -lc, \
|
LIBS_solaris := -lc, \
|
||||||
|
@ -25,6 +25,12 @@
|
|||||||
|
|
||||||
include NativeCompilation.gmk
|
include NativeCompilation.gmk
|
||||||
|
|
||||||
|
# SetupNativeCompilation now supports debug symbols on macosx for hotspot.
|
||||||
|
# Disable it here for the jdk binaries until we decide to enable them.
|
||||||
|
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||||
|
ENABLE_DEBUG_SYMBOLS := false
|
||||||
|
endif
|
||||||
|
|
||||||
# Prepare the find cache.
|
# Prepare the find cache.
|
||||||
$(eval $(call FillCacheFind, $(JDK_TOPDIR)/src/java.base/share/native/launcher))
|
$(eval $(call FillCacheFind, $(JDK_TOPDIR)/src/java.base/share/native/launcher))
|
||||||
|
|
||||||
@ -180,15 +186,12 @@ define SetupBuildLauncherBody
|
|||||||
CFLAGS_linux := -fPIC, \
|
CFLAGS_linux := -fPIC, \
|
||||||
CFLAGS_solaris := -KPIC -DHAVE_GETHRTIME, \
|
CFLAGS_solaris := -KPIC -DHAVE_GETHRTIME, \
|
||||||
CFLAGS_windows := $$($1_CFLAGS_windows), \
|
CFLAGS_windows := $$($1_CFLAGS_windows), \
|
||||||
LDFLAGS := $(LDFLAGS_JDKEXE) \
|
LDFLAGS := $$(LDFLAGS_JDKEXE) \
|
||||||
$$(ORIGIN_ARG) \
|
$$(ORIGIN_ARG) \
|
||||||
$$($1_LDFLAGS), \
|
$$($1_LDFLAGS), \
|
||||||
LDFLAGS_linux := \
|
LDFLAGS_linux := \
|
||||||
$(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)) \
|
|
||||||
-L$(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)/jli, \
|
-L$(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)/jli, \
|
||||||
LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_NAME,$1), \
|
|
||||||
LDFLAGS_solaris := $$($1_LDFLAGS_solaris) \
|
LDFLAGS_solaris := $$($1_LDFLAGS_solaris) \
|
||||||
$(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)) \
|
|
||||||
-L$(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)/jli, \
|
-L$(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)/jli, \
|
||||||
MAPFILE := $$($1_MAPFILE), \
|
MAPFILE := $$($1_MAPFILE), \
|
||||||
LIBS := $(JDKEXE_LIBS) $$($1_LIBS), \
|
LIBS := $(JDKEXE_LIBS) $$($1_LIBS), \
|
||||||
|
@ -683,7 +683,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \
|
|||||||
WARNINGS_AS_ERRORS_gcc := false, \
|
WARNINGS_AS_ERRORS_gcc := false, \
|
||||||
WARNINGS_AS_ERRORS_solstudio := false, \
|
WARNINGS_AS_ERRORS_solstudio := false, \
|
||||||
MAPFILE := $(BUILD_LIBFONTMANAGER_MAPFILE), \
|
MAPFILE := $(BUILD_LIBFONTMANAGER_MAPFILE), \
|
||||||
LDFLAGS := $(subst -Xlinker -z -Xlinker defs,,$(LDFLAGS_JDKLIB)) $(LDFLAGS_CXX_JDK) \
|
LDFLAGS := $(subst -Wl$(COMMA)-z$(COMMA)defs,,$(LDFLAGS_JDKLIB)) $(LDFLAGS_CXX_JDK) \
|
||||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||||
LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
|
LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
|
||||||
LDFLAGS_macosx := -undefined dynamic_lookup, \
|
LDFLAGS_macosx := -undefined dynamic_lookup, \
|
||||||
@ -799,7 +799,7 @@ else # OPENJDK_TARGET_OS not windows
|
|||||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||||
LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
|
LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
|
||||||
LDFLAGS_macosx := -Xlinker -rpath -Xlinker @loader_path, \
|
LDFLAGS_macosx := -Wl$(COMMA)-rpath$(COMMA)@loader_path, \
|
||||||
LIBS_unix := $(JAWT_LIBS) $(JDKLIB_LIBS), \
|
LIBS_unix := $(JAWT_LIBS) $(JDKLIB_LIBS), \
|
||||||
LIBS_solaris := $(X_LIBS) -lXrender, \
|
LIBS_solaris := $(X_LIBS) -lXrender, \
|
||||||
LIBS_macosx := -framework Cocoa, \
|
LIBS_macosx := -framework Cocoa, \
|
||||||
@ -1034,7 +1034,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
|
|||||||
-I$(SUPPORT_OUTPUTDIR)/headers/java.desktop, \
|
-I$(SUPPORT_OUTPUTDIR)/headers/java.desktop, \
|
||||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||||
$(call SET_SHARED_LIBRARY_ORIGIN) \
|
$(call SET_SHARED_LIBRARY_ORIGIN) \
|
||||||
-Xlinker -rpath -Xlinker @loader_path \
|
-Wl$(COMMA)-rpath$(COMMA)@loader_path \
|
||||||
-L$(INSTALL_LIBRARIES_HERE), \
|
-L$(INSTALL_LIBRARIES_HERE), \
|
||||||
LIBS := -lawt -losxapp -lawt_lwawt \
|
LIBS := -lawt -losxapp -lawt_lwawt \
|
||||||
-framework Cocoa \
|
-framework Cocoa \
|
||||||
|
@ -65,7 +65,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBINSTRUMENT, \
|
|||||||
-L$(call FindLibDirForModule, java.base)/jli, \
|
-L$(call FindLibDirForModule, java.base)/jli, \
|
||||||
LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/jli) \
|
LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/jli) \
|
||||||
-L$(call FindLibDirForModule, java.base)/jli, \
|
-L$(call FindLibDirForModule, java.base)/jli, \
|
||||||
LDFLAGS_macosx := -Xlinker -all_load $(SUPPORT_OUTPUTDIR)/native/java.base/libjli_static.a, \
|
LDFLAGS_macosx := -Wl$(COMMA)-all_load, \
|
||||||
LDFLAGS_aix := -L$(SUPPORT_OUTPUTDIR)/native/java.base, \
|
LDFLAGS_aix := -L$(SUPPORT_OUTPUTDIR)/native/java.base, \
|
||||||
LDFLAGS_windows := -export:Agent_OnAttach, \
|
LDFLAGS_windows := -export:Agent_OnAttach, \
|
||||||
LIBS := $(JDKLIB_LIBS), \
|
LIBS := $(JDKLIB_LIBS), \
|
||||||
@ -74,7 +74,8 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBINSTRUMENT, \
|
|||||||
LIBS_solaris := -ljli $(LIBDL), \
|
LIBS_solaris := -ljli $(LIBDL), \
|
||||||
LIBS_aix := -liconv -ljli_static $(LIBDL), \
|
LIBS_aix := -liconv -ljli_static $(LIBDL), \
|
||||||
LIBS_macosx := -liconv -framework Cocoa -framework Security \
|
LIBS_macosx := -liconv -framework Cocoa -framework Security \
|
||||||
-framework ApplicationServices, \
|
-framework ApplicationServices \
|
||||||
|
$(SUPPORT_OUTPUTDIR)/native/java.base/libjli_static.a, \
|
||||||
LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib \
|
LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib \
|
||||||
$(SUPPORT_OUTPUTDIR)/native/java.base/jli_static.lib, \
|
$(SUPPORT_OUTPUTDIR)/native/java.base/jli_static.lib, \
|
||||||
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
|
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
|
||||||
|
@ -46,6 +46,12 @@ else
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# SetupNativeCompilation now supports debug symbols on macosx for hotspot.
|
||||||
|
# Disable it here for the jdk libraries until we decide to enable them.
|
||||||
|
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||||
|
ENABLE_DEBUG_SYMBOLS := false
|
||||||
|
endif
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Find the default set of src dirs for a native library.
|
# Find the default set of src dirs for a native library.
|
||||||
# Param 1 - module name
|
# Param 1 - module name
|
||||||
|
Loading…
Reference in New Issue
Block a user