8328177: Move LDFLAGS_JDK[LIB/EXE] to JdkNativeCompilation.gmk

Reviewed-by: erikj
This commit is contained in:
Magnus Ihse Bursie 2024-03-18 14:41:51 +00:00
parent f3af91815a
commit 9e98118f28
32 changed files with 56 additions and 126 deletions

View File

@ -39,7 +39,6 @@ REAL_HSDIS_NAME := hsdis-$(OPENJDK_TARGET_CPU_LEGACY_LIB)$(SHARED_LIBRARY_SUFFIX
BUILT_HSDIS_LIB := $(HSDIS_OUTPUT_DIR)/$(REAL_HSDIS_NAME)
HSDIS_LINK_TYPE := C
HSDIS_TOOLCHAIN_LDFLAGS := $(LDFLAGS_JDKLIB)
ifeq ($(HSDIS_BACKEND), capstone)
ifeq ($(call isTargetCpuArch, x86), true)
@ -127,7 +126,8 @@ ifeq ($(HSDIS_BACKEND), binutils)
SHARED_LIBRARY_FLAGS := -shared
HSDIS_TOOLCHAIN_DEFAULT_CFLAGS := false
HSDIS_TOOLCHAIN_LDFLAGS := -L$(MINGW_GCC_LIB_PATH) -L$(MINGW_SYSROOT_LIB_PATH)
HSDIS_TOOLCHAIN_DEFAULT_LDFLAGS := false
HSDIS_LDFLAGS += -L$(MINGW_GCC_LIB_PATH) -L$(MINGW_SYSROOT_LIB_PATH)
MINGW_DLLCRT := $(MINGW_SYSROOT_LIB_PATH)/dllcrt2.o
HSDIS_TOOLCHAIN_LIBS := $(MINGW_DLLCRT) -lmingw32 -lgcc -lgcc_eh -lmoldname \
-lmingwex -lmsvcrt -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32
@ -148,7 +148,9 @@ $(eval $(call SetupJdkLibrary, BUILD_HSDIS, \
DEFAULT_CFLAGS := $(HSDIS_TOOLCHAIN_DEFAULT_CFLAGS), \
CFLAGS := $(HSDIS_CFLAGS), \
CXXFLAGS := $(HSDIS_CFLAGS), \
LDFLAGS := $(HSDIS_TOOLCHAIN_LDFLAGS) $(HSDIS_LDFLAGS) $(SHARED_LIBRARY_FLAGS), \
LD_SET_ORIGIN := false, \
DEFAULT_LDFLAGS := $(HSDIS_TOOLCHAIN_DEFAULT_LDFLAGS), \
LDFLAGS := $(HSDIS_LDFLAGS) $(SHARED_LIBRARY_FLAGS), \
LIBS := $(HSDIS_LIBS) $(HSDIS_TOOLCHAIN_LIBS), \
))

View File

@ -211,6 +211,18 @@ define SetupJdkLibraryBody
$1_CFLAGS += $$($1_SRC_HEADER_FLAGS) $$($1_EXTRA_HEADER_FLAGS)
endif
ifneq ($$($1_DEFAULT_LDFLAGS), false)
# Set the default flags first to be able to override
$1_LDFLAGS := $$(filter-out $$($1_LDFLAGS_FILTER_OUT), $$(LDFLAGS_JDKLIB)) $$($1_LDFLAGS)
endif
ifneq ($$($1_LD_SET_ORIGIN), false)
$1_LDFLAGS += $$(call SET_SHARED_LIBRARY_ORIGIN)
endif
# APPEND_LDFLAGS, if it exists, must be set after the origin flags
# This is a workaround to keep existing behavior
$1_LDFLAGS += $$($1_APPEND_LDFLAGS)
# Since we reuse the rule name ($1), all our arguments will pass through.
# We lose in transparency, but gain in brevity in this call...
$$(eval $$(call SetupNativeCompilation, $1, ))
@ -269,6 +281,15 @@ define SetupJdkExecutableBody
$1_CXXFLAGS := $$(filter-out $$($1_CXXFLAGS_FILTER_OUT), $$(CXXFLAGS_JDKEXE)) $$($1_CXXFLAGS)
endif
ifneq ($$($1_DEFAULT_LDFLAGS), false)
# Set the default flags first to be able to override
$1_LDFLAGS := $$(filter-out $$($1_LDFLAGS_FILTER_OUT), $$(LDFLAGS_JDKEXE)) $$($1_LDFLAGS)
endif
ifneq ($$($1_LD_SET_ORIGIN), false)
$1_LDFLAGS += $$(call SET_EXECUTABLE_ORIGIN)
endif
# Since we reuse the rule name ($1), all our arguments will pass through.
# We lose in transparency, but gain in brevity in this call...
$$(eval $$(call SetupNativeCompilation, $1))

View File

@ -149,9 +149,7 @@ define SetupBuildLauncherBody
$$($1_CFLAGS), \
CFLAGS_windows := $$($1_CFLAGS_windows), \
DISABLED_WARNINGS_gcc := unused-function, \
LDFLAGS := $$(LDFLAGS_JDKEXE) \
$$(call SET_EXECUTABLE_ORIGIN) \
$$($1_LDFLAGS), \
LDFLAGS := $$($1_LDFLAGS), \
LDFLAGS_linux := $$(call SET_EXECUTABLE_ORIGIN,/../lib) \
-L$(call FindLibDirForModule, java.base), \
LDFLAGS_macosx := $$(call SET_EXECUTABLE_ORIGIN,/../lib) \

View File

@ -105,6 +105,8 @@ $(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBJVM, \
DISABLED_WARNINGS_clang_test_g1ServiceThread.cpp := delete-abstract-non-virtual-dtor, \
DISABLED_WARNINGS_clang_test_logDecorations.cpp := missing-field-initializers, \
DISABLED_WARNINGS_microsoft := $(DISABLED_WARNINGS_microsoft), \
LD_SET_ORIGIN := false, \
DEFAULT_LDFLAGS := false, \
LDFLAGS := $(JVM_LDFLAGS), \
LDFLAGS_unix := -L$(JVM_OUTPUTDIR)/libgtest, \
LIBS := $(JVM_LIBS), \
@ -142,7 +144,7 @@ $(eval $(call SetupJdkExecutable, BUILD_GTEST_LAUNCHER, \
-I$(GTEST_FRAMEWORK_SRC)/googletest/include \
-I$(GTEST_FRAMEWORK_SRC)/googlemock \
-I$(GTEST_FRAMEWORK_SRC)/googlemock/include, \
LDFLAGS := $(LDFLAGS_JDKEXE), \
LD_SET_ORIGIN := false, \
LDFLAGS_unix := -L$(JVM_OUTPUTDIR)/gtest $(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_unix := -ljvm, \
LIBS_windows := $(JVM_OUTPUTDIR)/gtest/objs/jvm.lib, \

View File

@ -203,6 +203,8 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJVM, \
DISABLED_WARNINGS_clang_aix_osThread_aix.cpp := tautological-undefined-compare, \
DISABLED_WARNINGS_microsoft := $(DISABLED_WARNINGS_microsoft), \
ASFLAGS := $(JVM_ASFLAGS), \
LD_SET_ORIGIN := false, \
DEFAULT_LDFLAGS := false, \
LDFLAGS := $(JVM_LDFLAGS), \
LIBS := $(JVM_LIBS), \
OPTIMIZATION := $(JVM_OPTIMIZATION), \

View File

@ -63,7 +63,7 @@ ifeq ($(call isTargetOs, linux), true)
OPTIMIZATION := LOW, \
CFLAGS := -I$(TOPDIR)/src/$(MODULE)/share/native/libjli, \
CFLAGS_linux := -fPIC, \
LDFLAGS := $(LDFLAGS_JDKEXE), \
LD_SET_ORIGIN := false, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \
))
@ -80,7 +80,7 @@ ifeq ($(call isTargetOsType, unix), true)
CFLAGS := $(VERSION_CFLAGS) \
-I$(TOPDIR)/src/$(MODULE)/unix/native/libjava, \
EXTRA_OBJECT_FILES := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava/childproc$(OBJ_SUFFIX), \
LDFLAGS := $(LDFLAGS_JDKEXE), \
LD_SET_ORIGIN := false, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \
))

View File

@ -49,8 +49,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBNET, \
DISABLED_WARNINGS_clang_aix_NetworkInterface.c := gnu-pointer-arith, \
DISABLED_WARNINGS_microsoft_InetAddress.c := 4244, \
DISABLED_WARNINGS_microsoft_ResolverConfigurationImpl.c := 4996, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_windows := -delayload:secur32.dll -delayload:iphlpapi.dll \
-delayload:winhttp.dll, \
LIBS_unix := -ljvm -ljava, \
@ -75,8 +73,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBNIO, \
libnio/ch \
libnio/fs \
libnet, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_unix := -ljava -lnet, \
LIBS_linux := -lpthread $(LIBDL), \
LIBS_aix := $(LIBDL), \
@ -100,9 +96,7 @@ ifeq ($(call isTargetOs, macosx), true)
NAME := osxsecurity, \
OPTIMIZATION := LOW, \
DISABLED_WARNINGS_clang_KeystoreImpl.m := deprecated-declarations, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
-L$(SUPPORT_OUTPUTDIR)/modules_libs/java.base \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS := -L$(SUPPORT_OUTPUTDIR)/modules_libs/java.base,\
LIBS := \
-lobjc \
-framework CoreServices \
@ -126,8 +120,6 @@ ifeq ($(call isTargetOsType, unix), true)
NAME := jsig, \
OPTIMIZATION := LOW, \
jsig.c_CFLAGS := -DHOTSPOT_VM_DISTRO='"$(HOTSPOT_VM_DISTRO)"', \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_linux := $(LIBDL), \
LIBS_aix := $(LIBDL), \
))
@ -204,7 +196,7 @@ endif
$(eval $(call SetupJdkLibrary, BUILD_SYSLOOKUPLIB, \
NAME := syslookup, \
LDFLAGS := $(LDFLAGS_JDKLIB), \
LD_SET_ORIGIN := false, \
LDFLAGS_linux := -Wl$(COMMA)--no-as-needed, \
LDFLAGS_aix := -brtl -bexpfull, \
LIBS_linux := -lm -ldl, \
@ -220,8 +212,6 @@ ifeq ($(ENABLE_FALLBACK_LINKER), true)
$(eval $(call SetupJdkLibrary, BUILD_LIBFALLBACKLINKER, \
NAME := fallbackLinker, \
CFLAGS := $(LIBFFI_CFLAGS), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := $(LIBFFI_LIBS), \
LIBS_windows := $(LIBFFI_LIBS) ws2_32.lib, \
))
@ -237,8 +227,6 @@ ifeq ($(call isTargetOs, linux)+$(call isTargetCpu, x86_64)+$(INCLUDE_COMPILER2)
LINK_TYPE := C++, \
OPTIMIZATION := HIGH, \
CXXFLAGS := -std=c++17, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_linux := -lm -ldl, \
))

View File

@ -35,8 +35,6 @@ endif
$(eval $(call SetupJdkLibrary, BUILD_LIBVERIFY, \
NAME := verify, \
OPTIMIZATION := $(LIBVERIFY_OPTIMIZATION), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_unix := -ljvm, \
LIBS_windows := jvm.lib, \
))
@ -57,8 +55,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJAVA, \
ProcessImpl_md.c_CFLAGS := $(VERSION_CFLAGS), \
java_props_md.c_CFLAGS := -DARCHPROPNAME='"$(OPENJDK_TARGET_CPU_OSARCH)"', \
DISABLED_WARNINGS_gcc_ProcessImpl_md.c := unused-result, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_macosx := -L$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/, \
LIBS_unix := -ljvm, \
LIBS_linux := $(LIBDL), \
@ -96,8 +92,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBZIP, \
DISABLED_WARNINGS_gcc_zip_util.c := unused-function, \
DISABLED_WARNINGS_clang := deprecated-non-prototype, \
DISABLED_WARNINGS_clang_gzwrite.c := format-nonliteral, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_unix := -ljvm -ljava $(LIBZ_LIBS), \
LIBS_windows := jvm.lib $(WIN_JAVA_LIB), \
))
@ -113,8 +107,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJIMAGE, \
LINK_TYPE := C++, \
OPTIMIZATION := LOW, \
CFLAGS_unix := -UDEBUG, \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS := $(LDFLAGS_CXX_JDK), \
LIBS_unix := -ljvm -ldl, \
LIBS_windows := jvm.lib, \
))
@ -169,8 +162,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJLI, \
CFLAGS := $(LIBJLI_CFLAGS), \
DISABLED_WARNINGS_gcc := unused-function, \
DISABLED_WARNINGS_clang := format-nonliteral deprecated-non-prototype, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_unix := $(LIBZ_LIBS), \
LIBS_linux := $(LIBDL) -lpthread, \
LIBS_aix := $(LIBDL),\

View File

@ -64,8 +64,6 @@ ifeq ($(call isTargetOs, aix), false)
CXXFLAGS := $(LIBJSOUND_CFLAGS), \
DISABLED_WARNINGS_gcc := undef, \
DISABLED_WARNINGS_clang := undef, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_unix := -ljava -ljvm, \
LIBS_linux := $(ALSA_LIBS), \
LIBS_macosx := -framework CoreAudio -framework CoreFoundation \
@ -90,8 +88,6 @@ ifeq ($(call isTargetOs, macosx), true)
OPTIMIZATION := LOW, \
DISABLED_WARNINGS_clang_NSApplicationAWT.m := deprecated-declarations format-nonliteral, \
DISABLED_WARNINGS_clang_QueuingApplicationDelegate.m := objc-method-access, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := \
-ljava \
-framework Accelerate \
@ -118,9 +114,7 @@ ifeq ($(call isTargetOs, macosx), true)
OPTIMIZATION := LOW, \
EXTRA_HEADER_DIRS := libosxapp, \
DISABLED_WARNINGS_clang_CFileManager.m := deprecated-declarations, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
-L$(SUPPORT_OUTPUTDIR)/modules_libs/java.desktop \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS := -L$(SUPPORT_OUTPUTDIR)/modules_libs/java.desktop, \
LIBS := \
-losxapp \
-framework Cocoa \

View File

@ -50,8 +50,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBMLIB_IMAGE, \
OPTIMIZATION := HIGHEST, \
CFLAGS := $(BUILD_LIBMLIB_CFLAGS), \
DISABLED_WARNINGS_gcc := unused-function, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := $(JDKLIB_LIBS), \
LIBS_unix := $(LIBM) $(LIBDL), \
))
@ -145,7 +143,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBAWT, \
DISABLED_WARNINGS_clang_TransformHelper.c := sign-compare, \
DISABLED_WARNINGS_microsoft := 4244 4996, \
DISABLED_WARNINGS_microsoft_awt_Toolkit.cpp := 4267, \
LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_macosx := -L$(INSTALL_LIBRARIES_HERE), \
LDFLAGS_windows := -delayload:user32.dll -delayload:gdi32.dll \
-delayload:shell32.dll -delayload:winmm.dll \
@ -266,10 +263,8 @@ ifeq ($(call isTargetOs, windows macosx), false)
DISABLED_WARNINGS_clang_aix_gtk3_interface.c := parentheses logical-op-parentheses, \
DISABLED_WARNINGS_clang_aix_sun_awt_X11_GtkFileDialogPeer.c := parentheses, \
DISABLED_WARNINGS_clang_aix_awt_InputMethod.c := sign-compare, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN) \
-L$(INSTALL_LIBRARIES_HERE), \
LIBS := $(X_LIBS) $(LIBAWT_XAWT_LIBS), \
LDFLAGS := -L$(INSTALL_LIBRARIES_HERE), \
LIBS := $(X_LIBS) $(LIBAWT_XAWT_LIBS), \
STATIC_LIB_EXCLUDE_OBJS := $(LIBAWT_XAWT_STATIC_EXCLUDE_OBJS), \
))
@ -317,8 +312,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBLCMS, \
HEADERS_FROM_SRC := $(LIBLCMS_HEADERS_FROM_SRC), \
DISABLED_WARNINGS_gcc := format-nonliteral type-limits stringop-truncation, \
DISABLED_WARNINGS_clang := format-nonliteral, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
LIBS_unix := -lawt -ljvm -ljava $(LCMS_LIBS) $(LIBM), \
LIBS_windows := $(WIN_AWT_LIB) $(WIN_JAVA_LIB), \
@ -359,8 +352,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJAVAJPEG, \
DISABLED_WARNINGS_gcc_imageioJPEG.c := clobbered array-bounds, \
DISABLED_WARNINGS_gcc_jcmaster.c := implicit-fallthrough, \
DISABLED_WARNINGS_gcc_jdphuff.c := shift-negative-value, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := $(LIBJPEG_LIBS) $(JDKLIB_LIBS), \
LIBS_windows := $(WIN_JAVA_LIB) jvm.lib, \
))
@ -409,8 +400,6 @@ ifeq ($(call isTargetOs, windows macosx), false)
EXTRA_HEADER_DIRS := $(LIBAWT_HEADLESS_EXTRA_HEADER_DIRS), \
DISABLED_WARNINGS_gcc_X11Renderer.c := unused-function, \
DISABLED_WARNINGS_gcc_X11SurfaceData.c := unused-function, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
LIBS_unix := -lawt -ljvm -ljava, \
LIBS_linux := $(LIBM) $(LIBDL), \
@ -450,8 +439,6 @@ else
EXTRA_HEADER_DIRS := $(BUILD_LIBFREETYPE_HEADER_DIRS), \
DISABLED_WARNINGS_microsoft := 4267 4244 4996, \
DISABLED_WARNINGS_gcc := dangling-pointer stringop-overflow, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
))
TARGETS += $(BUILD_LIBFREETYPE)
@ -560,9 +547,8 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBFONTMANAGER, \
DISABLED_WARNINGS_CXX_gcc := $(HARFBUZZ_DISABLED_WARNINGS_CXX_gcc), \
DISABLED_WARNINGS_clang := $(HARFBUZZ_DISABLED_WARNINGS_clang), \
DISABLED_WARNINGS_microsoft := $(HARFBUZZ_DISABLED_WARNINGS_microsoft), \
LDFLAGS := $(subst -Xlinker -z -Xlinker defs,, \
$(subst -Wl$(COMMA)-z$(COMMA)defs,,$(LDFLAGS_JDKLIB))) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS := $(LDFLAGS_CXX_JDK), \
LDFLAGS_FILTER_OUT :=-Wl$(COMMA)-z$(COMMA)defs, \
LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
LDFLAGS_aix := -Wl$(COMMA)-berok, \
LIBS := $(BUILD_LIBFONTMANAGER_FONTLIB), \
@ -611,7 +597,7 @@ ifeq ($(call isTargetOs, windows), true)
CFLAGS := $(LIBJAWT_CFLAGS), \
CXXFLAGS := $(LIBJAWT_CFLAGS), \
EXTRA_HEADER_DIRS := $(LIBJAWT_EXTRA_HEADER_DIRS), \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \
LDFLAGS := $(LDFLAGS_CXX_JDK), \
LIBS := $(JDKLIB_LIBS) $(KERNEL32_LIB) advapi32.lib $(WIN_AWT_LIB), \
))
@ -657,8 +643,6 @@ else # not windows
EXTRA_HEADER_DIRS := \
include \
common/awt, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
LDFLAGS_macosx := -Wl$(COMMA)-rpath$(COMMA)@loader_path, \
LIBS_unix := $(JAWT_LIBS) $(JDKLIB_LIBS), \
@ -811,8 +795,6 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
DISABLED_WARNINGS_microsoft_splashscreen_impl.c := 4018 4267 4244, \
DISABLED_WARNINGS_microsoft_splashscreen_png.c := 4267, \
DISABLED_WARNINGS_microsoft_splashscreen_sys.c := 4267 4244, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_macosx := -L$(INSTALL_LIBRARIES_HERE), \
LDFLAGS_windows := -delayload:user32.dll, \
LIBS := $(JDKLIB_LIBS) $(LIBSPLASHSCREEN_LIBS) $(LIBZ_LIBS) \
@ -878,9 +860,7 @@ ifeq ($(call isTargetOs, macosx), true)
DISABLED_WARNINGS_clang_OGLBufImgOps.c := format-nonliteral, \
DISABLED_WARNINGS_clang_OGLPaints.c := format-nonliteral, \
DISABLED_WARNINGS_clang_PrinterView.m := enum-conversion, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN) \
-L$(INSTALL_LIBRARIES_HERE), \
LDFLAGS := -L$(INSTALL_LIBRARIES_HERE), \
LIBS := -lawt -lmlib_image -losxapp -ljvm $(LIBM) \
-framework Accelerate \
-framework ApplicationServices \
@ -943,10 +923,8 @@ ifeq ($(call isTargetOs, macosx), true)
libosxapp, \
DISABLED_WARNINGS_clang_AquaFileView.m := deprecated-declarations sign-compare, \
DISABLED_WARNINGS_clang_ScreenMenu.m := deprecated-declarations, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN) \
-Wl$(COMMA)-rpath$(COMMA)@loader_path \
-L$(INSTALL_LIBRARIES_HERE), \
APPEND_LDFLAGS := -Wl$(COMMA)-rpath$(COMMA)@loader_path, \
LDFLAGS := -L$(INSTALL_LIBRARIES_HERE), \
LIBS := -lawt -losxapp -lawt_lwawt \
-framework Cocoa \
-framework Metal \

View File

@ -40,9 +40,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBINSTRUMENT, \
CFLAGS_debug := -DJPLIS_LOGGING, \
CFLAGS_release := -DNO_JPLIS_LOGGING, \
EXTRA_HEADER_DIRS := java.base:libjli, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN) \
$(LIBINSTRUMENT_LDFLAGS), \
LDFLAGS_linux := -L$(call FindLibDirForModule, java.base), \
LDFLAGS_macosx := -L$(call FindLibDirForModule, java.base), \
LDFLAGS_aix := -L$(SUPPORT_OUTPUTDIR)/native/java.base, \

View File

@ -37,8 +37,6 @@ endif
$(eval $(call SetupJdkLibrary, BUILD_LIBMANAGEMENT, \
NAME := management, \
OPTIMIZATION := $(LIBMANAGEMENT_OPTIMIZATION), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := $(JDKLIB_LIBS), \
LIBS_aix := -lperfstat,\
LIBS_windows := jvm.lib psapi.lib $(WIN_JAVA_LIB) advapi32.lib, \

View File

@ -36,8 +36,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBPREFS, \
NAME := prefs, \
EXCLUDE_SRC_PATTERNS := $(LIBPREFS_EXCLUDE_SRC_PATTERNS), \
OPTIMIZATION := HIGH, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_unix := -ljvm, \
LIBS_linux := -ljava, \
LIBS_aix := -ljava, \

View File

@ -30,8 +30,6 @@ include LibCommon.gmk
$(eval $(call SetupJdkLibrary, BUILD_LIBRMI, \
NAME := rmi, \
OPTIMIZATION := LOW, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_unix := -ljvm, \
LIBS_windows := jvm.lib, \
))

View File

@ -33,8 +33,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJ2GSS, \
DISABLED_WARNINGS_gcc := undef, \
DISABLED_WARNINGS_clang_aix := undef, \
DISABLED_WARNINGS_clang := undef, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := $(LIBDL), \
))
@ -45,8 +43,6 @@ ifeq ($(call isTargetOs, windows), true)
NAME := sspi_bridge, \
OPTIMIZATION := LOW, \
EXTRA_HEADER_DIRS := libj2gss, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := Secur32.lib, \
))
@ -61,8 +57,6 @@ ifneq ($(BUILD_CRYPTO), false)
$(eval $(call SetupJdkLibrary, BUILD_LIBW2K_LSA_AUTH, \
NAME := w2k_lsa_auth, \
OPTIMIZATION := LOW, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := advapi32.lib Secur32.lib kernel32.lib ws2_32.lib, \
))
@ -76,8 +70,6 @@ ifneq ($(BUILD_CRYPTO), false)
NAME := osxkrb5, \
OPTIMIZATION := LOW, \
DISABLED_WARNINGS_clang_nativeccache.c := deprecated-declarations, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := -framework Cocoa -framework SystemConfiguration \
-framework Kerberos, \
))

View File

@ -32,8 +32,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJ2PCSC, \
CFLAGS_unix := -D__sun_jdk, \
EXTRA_HEADER_DIRS := libj2pcsc/MUSCLE, \
OPTIMIZATION := LOW, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_unix := $(LIBDL), \
LIBS_windows := winscard.lib, \
))

View File

@ -47,7 +47,6 @@ ifeq ($(call isTargetOs, windows), true)
CXXFLAGS := -Zc:wchar_t -analyze- -Od -Gd -D_WINDOWS -D_UNICODE \
-DUNICODE -RTC1 -EHsc, \
DISABLED_WARNINGS_microsoft_jabswitch.cpp := 4267 4996, \
LDFLAGS := $(LDFLAGS_JDKEXE), \
LIBS := advapi32.lib version.lib user32.lib, \
VERSIONINFO_RESOURCE := $(ACCESSIBILITY_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
MANIFEST := $(ACCESSIBILITY_SRCDIR)/jabswitch/jabswitch.manifest, \
@ -69,7 +68,7 @@ ifeq ($(call isTargetOs, windows), true)
$(ACCESSIBILITY_SRCDIR)/toolscommon $(ACCESSIBILITY_SRCDIR)/bridge, \
CFLAGS := $(TOOLS_CFLAGS) -DACCESSBRIDGE_ARCH_$2 -EHsc, \
CXXFLAGS := $(TOOLS_CFLAGS) -DACCESSBRIDGE_ARCH_$2 -EHsc, \
LDFLAGS := $$(LDFLAGS_JDKEXE) -stack:655360, \
LDFLAGS := -stack:655360, \
LIBS := advapi32.lib user32.lib, \
VERSIONINFO_RESOURCE := $(ACCESSIBILITY_SRCDIR)/jaccessinspector/jaccessinspectorWindow.rc, \
))
@ -91,7 +90,7 @@ ifeq ($(call isTargetOs, windows), true)
$(ACCESSIBILITY_SRCDIR)/toolscommon $(ACCESSIBILITY_SRCDIR)/bridge, \
CFLAGS := $(TOOLS_CFLAGS) -DACCESSBRIDGE_ARCH_$2 -EHsc, \
CXXFLAGS := $(TOOLS_CFLAGS) -DACCESSBRIDGE_ARCH_$2 -EHsc, \
LDFLAGS := $$(LDFLAGS_JDKEXE) -stack:655360, \
LDFLAGS := -stack:655360, \
LIBS := advapi32.lib comctl32.lib gdi32.lib user32.lib, \
VERSIONINFO_RESOURCE := $(ACCESSIBILITY_SRCDIR)/jaccesswalker/jaccesswalkerWindow.rc, \
))

View File

@ -48,7 +48,6 @@ ifeq ($(call isTargetOs, windows), true)
EXTRA_HEADER_DIRS := \
include/bridge \
java.desktop:include, \
LDFLAGS := $(LDFLAGS_JDKLIB), \
LIBS := kernel32.lib user32.lib gdi32.lib \
winspool.lib comdlg32.lib advapi32.lib shell32.lib \
$(SUPPORT_OUTPUTDIR)/native/java.desktop/libjawt/jawt.lib \
@ -74,7 +73,7 @@ ifeq ($(call isTargetOs, windows), true)
CXXFLAGS := -DACCESSBRIDGE_ARCH_$2, \
EXTRA_HEADER_DIRS := \
include/bridge, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
LDFLAGS := \
-def:$(ACCESSIBILITY_SRCDIR)/libwindowsaccessbridge/WinAccessBridge.DEF, \
LIBS := kernel32.lib user32.lib gdi32.lib \
winspool.lib comdlg32.lib advapi32.lib shell32.lib \
@ -91,7 +90,6 @@ ifeq ($(call isTargetOs, windows), true)
$(call SetupJdkLibrary, BUILD_ACCESSBRIDGESYSINFO, \
NAME := jabsysinfo, \
OPTIMIZATION := LOW, \
LDFLAGS := $(LDFLAGS_JDKLIB), \
VERSIONINFO_RESOURCE := $(ACCESSIBILITY_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
)

View File

@ -39,8 +39,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBATTACH, \
OPTIMIZATION := LOW, \
CFLAGS := $(LIBATTACH_CFLAGS), \
CFLAGS_windows := /Gy, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := $(JDKLIB_LIBS), \
LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib psapi.lib, \
))

View File

@ -31,8 +31,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJ2PKCS11, \
NAME := j2pkcs11, \
OPTIMIZATION := LOW, \
DISABLED_WARNINGS_clang_p11_util.c := format-nonliteral, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_unix := $(LIBDL), \
))

View File

@ -32,8 +32,7 @@ ifeq ($(call isTargetOs, windows), true)
$(eval $(call SetupJdkLibrary, BUILD_LIBSUNMSCAPI, \
NAME := sunmscapi, \
OPTIMIZATION := LOW, \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS := $(LDFLAGS_CXX_JDK), \
LIBS := crypt32.lib advapi32.lib ncrypt.lib, \
))

View File

@ -65,7 +65,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBSA, \
CFLAGS := $(SA_CFLAGS), \
CXXFLAGS := $(SA_CFLAGS) $(SA_CXXFLAGS), \
EXTRA_SRC := $(LIBSA_EXTRA_SRC), \
LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_unix := -ljava, \
LIBS_linux := $(LIBDL), \
LIBS_macosx := -framework Foundation \

View File

@ -30,8 +30,6 @@ include LibCommon.gmk
ifeq ($(call isTargetOs, linux windows)+$(call isTargetCpu, x86_64)+$(INCLUDE_COMPILER2), true+true+true)
$(eval $(call SetupJdkLibrary, BUILD_LIBJSVML, \
NAME := jsvml, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_windows := -defaultlib:msvcrt, \
))

View File

@ -33,7 +33,7 @@ ifeq ($(call isTargetOs, linux macosx windows), true)
NAME := le, \
LINK_TYPE := C++, \
OPTIMIZATION := LOW, \
LDFLAGS := $(LDFLAGS_JDKLIB), \
LD_SET_ORIGIN := false, \
LIBS_unix := $(JDKLIB_LIBS), \
LIBS_windows := $(JDKLIB_LIBS) user32.lib, \
))

View File

@ -35,7 +35,6 @@ ifeq ($(call isTargetOs, windows), true)
EXTRA_HEADER_DIRS := \
jdk.jdwp.agent:include \
jdk.jdwp.agent:libjdwp/export, \
LDFLAGS := $(LDFLAGS_JDKLIB), \
LIBS := $(JDKLIB_LIBS), \
))

View File

@ -34,8 +34,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBDT_SOCKET, \
EXTRA_HEADER_DIRS := \
include \
libjdwp/export, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_linux := -lpthread, \
LIBS_windows := $(JDKLIB_LIBS) ws2_32.lib iphlpapi.lib, \
))
@ -60,8 +58,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJDWP, \
EXTRA_HEADER_DIRS := \
include \
libjdwp/export, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := $(JDKLIB_LIBS), \
LIBS_linux := $(LIBDL), \
LIBS_macosx := -liconv, \

View File

@ -64,7 +64,7 @@ $(eval $(call SetupJdkExecutable, BUILD_JPACKAGE_APPLAUNCHEREXE, \
CFLAGS_macosx := -Wno-format-nonliteral, \
CXXFLAGS_windows := $(JPACKAGE_CXXFLAGS_windows), \
CFLAGS_windows := $(JPACKAGE_CFLAGS_windows), \
LDFLAGS := $(LDFLAGS_JDKEXE), \
LD_SET_ORIGIN := false, \
LIBS_macosx := -framework Cocoa -rpath @executable_path/../Frameworks/ -rpath @executable_path/../PlugIns/, \
LIBS_windows := user32.lib ole32.lib msi.lib shlwapi.lib \
Shell32.lib, \
@ -99,7 +99,7 @@ ifeq ($(call isTargetOs, linux), true)
DISABLED_WARNINGS_clang_tstrings.cpp := format-nonliteral, \
CXXFLAGS := $(JPACKAGE_LIBAPPLAUNCHER_INCLUDES), \
CFLAGS := $(JPACKAGE_LIBAPPLAUNCHER_INCLUDES), \
LDFLAGS := $(LDFLAGS_JDKLIB), \
LD_SET_ORIGIN := false, \
LIBS := -ldl, \
))
@ -117,8 +117,7 @@ ifeq ($(call isTargetOs, windows), true)
OPTIMIZATION := LOW, \
EXTRA_SRC := jdk.jpackage:common, \
CXXFLAGS_windows := $(JPACKAGE_CXXFLAGS_windows), \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS := $(LDFLAGS_CXX_JDK), \
LIBS := advapi32.lib ole32.lib msi.lib user32.lib \
shlwapi.lib Shell32.lib, \
))
@ -140,7 +139,7 @@ ifeq ($(call isTargetOs, windows), true)
CXXFLAGS_FILTER_OUT := -MD, \
CXXFLAGS := -MT $(addprefix -I, $(JPACKAGE_WIXHELPER_SRC)), \
CXXFLAGS_windows := $(JPACKAGE_CXXFLAGS_windows), \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \
LDFLAGS := $(LDFLAGS_CXX_JDK), \
LIBS := ole32.lib msi.lib User32.lib shlwapi.lib \
Shell32.lib, \
))
@ -160,7 +159,6 @@ ifeq ($(call isTargetOs, windows), true)
CXXFLAGS_FILTER_OUT := -MD, \
CXXFLAGS := -MT $(addprefix -I, $(JPACKAGE_MSIWRAPPER_SRC)), \
CXXFLAGS_windows := $(JPACKAGE_CXXFLAGS_windows), \
LDFLAGS := $(LDFLAGS_JDKEXE), \
LIBS := ole32.lib msi.lib user32.lib shlwapi.lib Shell32.lib, \
))
@ -178,6 +176,7 @@ ifeq ($(call isTargetOs, windows), true)
CXXFLAGS_windows := $(BUILD_JPACKAGE_APPLAUNCHEREXE_CXXFLAGS_windows) -DJP_LAUNCHERW, \
CFLAGS := $(BUILD_JPACKAGE_APPLAUNCHEREXE_CFLAGS), \
CFLAGS_windows := $(BUILD_JPACKAGE_APPLAUNCHEREXE_CFLAGS_windows) -DJP_LAUNCHERW, \
LD_SET_ORIGIN := $(BUILD_JPACKAGE_APPLAUNCHEREXE_LD_SET_ORIGIN), \
LDFLAGS := $(BUILD_JPACKAGE_APPLAUNCHEREXE_LDFLAGS), \
LIBS := $(BUILD_JPACKAGE_APPLAUNCHEREXE_LIBS), \
LIBS_windows := $(BUILD_JPACKAGE_APPLAUNCHEREXE_LIBS_windows), \

View File

@ -30,8 +30,6 @@ include LibCommon.gmk
$(eval $(call SetupJdkLibrary, BUILD_LIBMANAGEMENT_AGENT, \
NAME := management_agent, \
OPTIMIZATION := LOW, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := $(JDKLIB_LIBS), \
LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib, \
))

View File

@ -46,8 +46,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBMANAGEMENT_EXT, \
OPTIMIZATION := $(LIBMANAGEMENT_EXT_OPTIMIZATION), \
DISABLED_WARNINGS_clang_UnixOperatingSystem.c := format-nonliteral, \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBMANAGEMENT_EXT_CFLAGS), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := $(JDKLIB_LIBS), \
LIBS_aix := -lperfstat,\
LIBS_windows := jvm.lib psapi.lib $(WIN_JAVA_LIB) advapi32.lib, \

View File

@ -32,8 +32,6 @@ ifeq ($(call isTargetOs, linux macosx windows aix), true)
$(eval $(call SetupJdkLibrary, BUILD_LIBEXTNET, \
NAME := extnet, \
OPTIMIZATION := LOW, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_unix := -ljava, \
LIBS_linux := -ljvm, \
LIBS_windows := jvm.lib ws2_32.lib $(WIN_JAVA_LIB), \

View File

@ -37,8 +37,6 @@ ifeq ($(call isTargetOsType, unix), true)
$(call GetJavaHeaderDir, java.base) \
java.base:libnet \
java.base:libnio/ch, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_unix := -lnio -lnet -ljava -ljvm, \
LIBS_linux := -lpthread $(LIBDL), \
))

View File

@ -30,8 +30,6 @@ include LibCommon.gmk
$(eval $(call SetupJdkLibrary, BUILD_LIBJAAS, \
NAME := jaas, \
OPTIMIZATION := LOW, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_windows := netapi32.lib user32.lib mpr.lib advapi32.lib $(JDKLIB_LIBS), \
))