diff --git a/make/UpdateX11Wrappers.gmk b/make/UpdateX11Wrappers.gmk index aede23afbb6..2dea0ab4803 100644 --- a/make/UpdateX11Wrappers.gmk +++ b/make/UpdateX11Wrappers.gmk @@ -78,7 +78,7 @@ $(eval $(call SetupNativeCompilation, BUILD_DATA_GENERATOR, \ EXTRA_FILES := $(X11WRAPPERS_OUTPUT)/src/data_generator.c, \ CFLAGS := $(X_CFLAGS) $(DATA_GENERATOR_INCLUDES) $(CFLAGS_JDKEXE), \ LDFLAGS := $(LDFLAGS_JDKEXE), \ - LIBS := $(X_LIBS) -lc, \ + LIBS := $(X_LIBS), \ OBJECT_DIR := $(X11WRAPPERS_OUTPUT)/objs, \ )) diff --git a/make/autoconf/libraries.m4 b/make/autoconf/libraries.m4 index 910ae543fa6..2c62d94d7ae 100644 --- a/make/autoconf/libraries.m4 +++ b/make/autoconf/libraries.m4 @@ -103,16 +103,16 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES], LIB_SETUP_SOLARIS_STLPORT if test "x$TOOLCHAIN_TYPE" = xsolstudio; then - ALWAYS_LIBS="-lc" + GLOBAL_LIBS="-lc" else - ALWAYS_LIBS="" + GLOBAL_LIBS="" fi BASIC_JDKLIB_LIBS="" if test "x$TOOLCHAIN_TYPE" != xmicrosoft; then BASIC_JDKLIB_LIBS="-ljava -ljvm" fi - BASIC_JDKLIB_LIBS="$BASIC_JDKLIB_LIBS $ALWAYS_LIBS" + BASIC_JDKLIB_LIBS="$BASIC_JDKLIB_LIBS" # Math library if test "x$OPENJDK_TARGET_OS" != xsolaris; then @@ -150,7 +150,6 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES], comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \ wsock32.lib winmm.lib version.lib psapi.lib" fi - BASIC_JVM_LIBS="$BASIC_JVM_LIBS $ALWAYS_LIBS" JDKLIB_LIBS="$BASIC_JDKLIB_LIBS" JDKEXE_LIBS="" @@ -163,6 +162,7 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES], AC_SUBST(JVM_LIBS) AC_SUBST(OPENJDK_BUILD_JDKLIB_LIBS) AC_SUBST(OPENJDK_BUILD_JVM_LIBS) + AC_SUBST(GLOBAL_LIBS) ]) ################################################################################ diff --git a/make/autoconf/spec.gmk.in b/make/autoconf/spec.gmk.in index 9b30d6d0c15..1addb740e58 100644 --- a/make/autoconf/spec.gmk.in +++ b/make/autoconf/spec.gmk.in @@ -467,6 +467,7 @@ USING_BROKEN_SUSE_LD:=@USING_BROKEN_SUSE_LD@ # LDFLAGS used to link the jdk native libraries (C-code) LDFLAGS_JDKLIB:=@LDFLAGS_JDKLIB@ JDKLIB_LIBS:=@JDKLIB_LIBS@ +GLOBAL_LIBS:=@GLOBAL_LIBS@ # LDFLAGS used to link the jdk native launchers (C-code) LDFLAGS_JDKEXE:=@LDFLAGS_JDKEXE@ diff --git a/make/common/NativeCompilation.gmk b/make/common/NativeCompilation.gmk index 7bad65bb680..747428c225a 100644 --- a/make/common/NativeCompilation.gmk +++ b/make/common/NativeCompilation.gmk @@ -870,7 +870,7 @@ define SetupNativeCompilationBody endif $1_VARDEPS := $$($1_LD) $$($1_SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) \ - $$($1_LIBS) $$($1_EXTRA_LIBS) $$($1_CREATE_DEBUGINFO_CMDS) \ + $$(GLOBAL_LIBS) $$($1_LIBS) $$($1_EXTRA_LIBS) $$($1_CREATE_DEBUGINFO_CMDS) \ $$($1_STRIP_CMD) $1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \ $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps) @@ -924,8 +924,8 @@ define SetupNativeCompilationBody ifeq ($(OPENJDK_TARGET_OS), windows) $$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \ $$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \ - $(LD_OUT_OPTION)$$@ $$($1_LD_OBJ_ARG) $$($1_RES) $$($1_LIBS) \ - $$($1_EXTRA_LIBS)) \ + $(LD_OUT_OPTION)$$@ $$($1_LD_OBJ_ARG) $$($1_RES) $$(GLOBAL_LIBS) \ + $$($1_LIBS) $$($1_EXTRA_LIBS)) \ | $(GREP) -v "^ Creating library .*\.lib and object .*\.exp" || \ test "$$$$?" = "1" ; \ $$($1_CREATE_DEBUGINFO_CMDS) @@ -934,8 +934,8 @@ define SetupNativeCompilationBody $$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \ $$(if $$($1_LINK_OBJS_RELATIVE), $$(CD) $$(OUTPUTDIR) ; ) \ $$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \ - $(LD_OUT_OPTION)$$@ $$($1_LD_OBJ_ARG) $$($1_RES) $$($1_LIBS) \ - $$($1_EXTRA_LIBS)) ; \ + $(LD_OUT_OPTION)$$@ $$($1_LD_OBJ_ARG) $$($1_RES) $$(GLOBAL_LIBS) \ + $$($1_LIBS) $$($1_EXTRA_LIBS)) ; \ $$($1_CREATE_DEBUGINFO_CMDS) $$($1_STRIP_CMD) endif @@ -972,7 +972,7 @@ define SetupNativeCompilationBody ifeq ($$($1_TYPE), EXECUTABLE) # A executable binary has been specified, setup the target for it. $1_VARDEPS := $$($1_LD) $$($1_SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) \ - $$($1_LIBS) $$($1_EXTRA_LIBS) $$($1_MT) \ + $$(GLOBAL_LIBS) $$($1_LIBS) $$($1_EXTRA_LIBS) $$($1_MT) \ $$($1_CODESIGN) $$($1_CREATE_DEBUGINFO_CMDS) $$($1_MANIFEST_VERSION) \ $$($1_STRIP_CMD) $1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \ @@ -991,7 +991,7 @@ define SetupNativeCompilationBody $$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \ $(EXE_OUT_OPTION)$$($1_TARGET) \ $$($1_ALL_OBJS) $$($1_RES) \ - $$($1_LIBS) $$($1_EXTRA_LIBS)) + $$(GLOBAL_LIBS) $$($1_LIBS) $$($1_EXTRA_LIBS)) ifeq ($(OPENJDK_TARGET_OS), windows) ifneq ($$($1_MANIFEST), ) $$($1_MT) -nologo -manifest $$($1_MANIFEST) -identity:"$$($1_NAME).exe, version=$$($1_MANIFEST_VERSION)" -outputresource:$$@;#1 diff --git a/make/hotspot/lib/CompileDtracePostJvm.gmk b/make/hotspot/lib/CompileDtracePostJvm.gmk index 2a3c6bab1e8..ad0b23ef9b9 100644 --- a/make/hotspot/lib/CompileDtracePostJvm.gmk +++ b/make/hotspot/lib/CompileDtracePostJvm.gmk @@ -175,7 +175,7 @@ ifeq ($(call check-jvm-feature, dtrace), true) SRC := $(TOPDIR)/src/java.base/solaris/native/libjvm_dtrace, \ CFLAGS := -m64 -G -mt -KPIC, \ LDFLAGS := -m64 -mt -xnolib $(SHARED_LIBRARY_FLAGS), \ - LIBS := $(LIBDL) -lc -lthread -ldoor, \ + LIBS := $(LIBDL) -lthread -ldoor, \ MAPFILE := $(TOPDIR)/make/mapfiles/libjvm_dtrace/mapfile-vers, \ OBJECT_DIR := $(LIBJVM_DTRACE_OUTPUTDIR)/objs, \ )) @@ -191,7 +191,6 @@ ifeq ($(call check-jvm-feature, dtrace), true) CFLAGS := -I$(JVM_VARIANT_OUTPUTDIR)/gensrc -I$(DTRACE_SUPPORT_DIR) \ -m64 -G -mt -KPIC, \ LDFLAGS := -m64 -mt -xnolib $(SHARED_LIBRARY_FLAGS), \ - LIBS := -lc, \ MAPFILE := $(TOPDIR)/make/mapfiles/libjvm_db/mapfile-vers, \ OBJECT_DIR := $(LIBJVM_DB_OUTPUTDIR)/objs, \ )) diff --git a/make/launcher/Launcher-jdk.pack.gmk b/make/launcher/Launcher-jdk.pack.gmk index 1825b6f9a49..f8dd72a9fbf 100644 --- a/make/launcher/Launcher-jdk.pack.gmk +++ b/make/launcher/Launcher-jdk.pack.gmk @@ -90,7 +90,6 @@ $(eval $(call SetupNativeCompilation, BUILD_UNPACKEXE, \ $(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LIBS := $(UNPACKEXE_LIBS) $(LIBCXX), \ - LIBS_solaris := -lc, \ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/unpackexe, \ OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_cmds/$(MODULE), \ VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ diff --git a/make/launcher/LauncherCommon.gmk b/make/launcher/LauncherCommon.gmk index 88e34792b6a..427f08b7d2f 100644 --- a/make/launcher/LauncherCommon.gmk +++ b/make/launcher/LauncherCommon.gmk @@ -206,8 +206,8 @@ define SetupBuildLauncherBody MAPFILE := $$($1_MAPFILE), \ LIBS := $(JDKEXE_LIBS) $$($1_LIBS), \ LIBS_unix := $$($1_LIBS_unix), \ - LIBS_linux := -lpthread -ljli $(LIBDL) -lc, \ - LIBS_solaris := -ljli -lthread $(LIBDL) -lc, \ + LIBS_linux := -lpthread -ljli $(LIBDL), \ + LIBS_solaris := -ljli -lthread $(LIBDL), \ LIBS_windows := $$($1_WINDOWS_JLI_LIB) \ $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib advapi32.lib \ $$($1_LIBS_windows), \ diff --git a/make/lib/Awt2dLibraries.gmk b/make/lib/Awt2dLibraries.gmk index e402d30de0e..aa66f616977 100644 --- a/make/lib/Awt2dLibraries.gmk +++ b/make/lib/Awt2dLibraries.gmk @@ -61,7 +61,6 @@ $(eval $(call SetupNativeCompilation, BUILD_LIBMLIB_IMAGE, \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LIBS := $(BUILD_LIBMLIB_LDLIBS) \ $(JDKLIB_LIBS), \ - LIBS_solaris := -lc, \ VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ RC_FLAGS := $(RC_FLAGS) \ -D "JDK_FNAME=mlib_image.dll" \ @@ -119,7 +118,7 @@ ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc) MAPFILE := $(BUILD_LIBMLIB_IMAGE_MAPFILE), \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ - LIBS := -ljava -ljvm -lc $(BUILD_LIBMLIB_LDLIBS), \ + LIBS := -ljava -ljvm $(BUILD_LIBMLIB_LDLIBS), \ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libmlib_image_v, \ )) @@ -250,7 +249,7 @@ $(eval $(call SetupNativeCompilation, BUILD_LIBAWT, \ -delayload:comctl32.dll -delayload:shlwapi.dll, \ LIBS_unix := -ljvm -ljava $(LIBM), \ LIBS_linux := $(LIBDL), \ - LIBS_solaris := $(LIBDL) -lc, \ + LIBS_solaris := $(LIBDL), \ LIBS_aix := $(LIBDL),\ LIBS_macosx := -lmlib_image \ -framework Cocoa \ @@ -330,7 +329,7 @@ ifeq ($(findstring $(OPENJDK_TARGET_OS),windows macosx),) endif endif - LIBAWT_XAWT_LIBS := $(LIBM) -lawt -lXext -lX11 -lXrender $(LIBDL) -lXtst -lXi -ljava -ljvm -lc + LIBAWT_XAWT_LIBS := $(LIBM) -lawt -lXext -lX11 -lXrender $(LIBDL) -lXtst -lXi -ljava -ljvm ifeq ($(OPENJDK_TARGET_OS), linux) LIBAWT_XAWT_LIBS += -lpthread @@ -429,7 +428,6 @@ $(eval $(call SetupNativeCompilation, BUILD_LIBLCMS, \ LIBS_unix := -lawt -ljvm -ljava $(LCMS_LIBS), \ LIBS_linux := $(LIBM), \ LIBS_macosx := $(LIBM), \ - LIBS_solaris := -lc, \ LIBS_aix := $(LIBM),\ LIBS_windows := $(WIN_AWT_LIB) $(WIN_JAVA_LIB), \ VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ @@ -569,7 +567,7 @@ ifeq ($(findstring $(OPENJDK_TARGET_OS), windows macosx),) REORDER := $(LIBAWT_HEADLESS_REORDER), \ LIBS_unix := -lawt -ljvm -ljava, \ LIBS_linux := $(LIBM) $(LIBDL), \ - LIBS_solaris := $(LIBM) $(LIBDL) $(LIBCXX) -lc, \ + LIBS_solaris := $(LIBM) $(LIBDL) $(LIBCXX), \ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt_headless, \ )) @@ -611,7 +609,6 @@ else DISABLED_WARNINGS_microsoft := 4267 2220 4244, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ - LIBS_solaris := -lc, \ VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ RC_FLAGS := $(RC_FLAGS) \ -D "JDK_FNAME=freetype.dll" \ @@ -730,8 +727,6 @@ $(eval $(call SetupNativeCompilation, BUILD_LIBFONTMANAGER, \ LDFLAGS_macosx := -undefined dynamic_lookup, \ LIBS := $(BUILD_LIBFONTMANAGER_FONTLIB), \ LIBS_unix := -lawt -ljava -ljvm $(LIBM) $(LIBCXX), \ - LIBS_linux := -lc, \ - LIBS_solaris := -lc, \ LIBS_aix := -lawt_headless,\ LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib user32.lib gdi32.lib \ $(WIN_AWT_LIB), \ diff --git a/make/lib/CoreLibraries.gmk b/make/lib/CoreLibraries.gmk index 07a4e49297f..4d7cc8d7300 100644 --- a/make/lib/CoreLibraries.gmk +++ b/make/lib/CoreLibraries.gmk @@ -119,7 +119,7 @@ $(eval $(call SetupNativeCompilation, BUILD_LIBVERIFY, \ MAPFILE := $(TOPDIR)/make/mapfiles/libverify/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ - LIBS_unix := -ljvm -lc, \ + LIBS_unix := -ljvm, \ LIBS_windows := jvm.lib, \ VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ RC_FLAGS := $(RC_FLAGS) \ @@ -177,7 +177,7 @@ $(eval $(call SetupNativeCompilation, BUILD_LIBJAVA, \ -export:getErrorString -delayload:shell32.dll, \ LIBS_unix := -ljvm -lverify, \ LIBS_linux := $(LIBDL) $(BUILD_LIBFDLIBM), \ - LIBS_solaris := -lsocket -lnsl -lscf $(LIBDL) $(BUILD_LIBFDLIBM) -lc, \ + LIBS_solaris := -lsocket -lnsl -lscf $(LIBDL) $(BUILD_LIBFDLIBM), \ LIBS_aix := $(LIBDL) $(BUILD_LIBFDLIBM) $(LIBM),\ LIBS_macosx := -lfdlibm \ -framework CoreFoundation \ @@ -240,7 +240,6 @@ $(eval $(call SetupNativeCompilation, BUILD_LIBZIP, \ -export:ZIP_ReadEntry -export:ZIP_GetNextEntry \ -export:ZIP_InflateFully -export:ZIP_CRC32 -export:ZIP_FreeEntry, \ LIBS_unix := -ljvm -ljava $(LIBZ_LIBS), \ - LIBS_solaris := -lc, \ LIBS_windows := jvm.lib $(WIN_JAVA_LIB), \ VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ RC_FLAGS := $(RC_FLAGS) \ @@ -283,7 +282,6 @@ $(eval $(call SetupNativeCompilation, BUILD_LIBJIMAGE, \ -export:JIMAGE_FindResource -export:JIMAGE_GetResource \ -export:JIMAGE_ResourceIterator -export:JIMAGE_ResourcePath, \ LIBS_unix := -ljvm -ldl $(LIBCXX), \ - LIBS_solaris := -lc, \ LIBS_macosx := -lc++, \ LIBS_windows := jvm.lib, \ VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ @@ -397,8 +395,8 @@ $(eval $(call SetupNativeCompilation, BUILD_LIBJLI, \ -export:JLI_AddArgsFromEnvVar \ -export:JLI_GetAppArgIndex, \ LIBS_unix := $(LIBZ_LIBS), \ - LIBS_linux := $(LIBDL) -lc -lpthread, \ - LIBS_solaris := $(LIBDL) -lc, \ + LIBS_linux := $(LIBDL) -lpthread, \ + LIBS_solaris := $(LIBDL), \ LIBS_aix := $(LIBDL),\ LIBS_macosx := -framework Cocoa -framework Security -framework ApplicationServices, \ LIBS_windows := advapi32.lib comctl32.lib user32.lib, \ diff --git a/make/lib/Lib-java.prefs.gmk b/make/lib/Lib-java.prefs.gmk index e10d723b654..2510f7e9159 100644 --- a/make/lib/Lib-java.prefs.gmk +++ b/make/lib/Lib-java.prefs.gmk @@ -45,7 +45,7 @@ $(eval $(call SetupNativeCompilation, BUILD_LIBPREFS, \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LIBS_unix := -ljvm, \ LIBS_linux := -ljava, \ - LIBS_solaris := -ljava -lc, \ + LIBS_solaris := -ljava, \ LIBS_aix := -ljava, \ LIBS_macosx := -framework CoreFoundation -framework Foundation, \ LIBS_windows := advapi32.lib jvm.lib $(WIN_JAVA_LIB), \ diff --git a/make/lib/Lib-java.security.jgss.gmk b/make/lib/Lib-java.security.jgss.gmk index bf9f30f5051..9b8ad544acc 100644 --- a/make/lib/Lib-java.security.jgss.gmk +++ b/make/lib/Lib-java.security.jgss.gmk @@ -44,7 +44,6 @@ ifneq ($(OPENJDK_TARGET_OS), windows) LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LIBS := $(LIBDL), \ - LIBS_solaris := -lc, \ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libj2gss, \ )) diff --git a/make/lib/Lib-java.smartcardio.gmk b/make/lib/Lib-java.smartcardio.gmk index d3798237210..4ff006cba2e 100644 --- a/make/lib/Lib-java.smartcardio.gmk +++ b/make/lib/Lib-java.smartcardio.gmk @@ -44,7 +44,6 @@ $(eval $(call SetupNativeCompilation, BUILD_LIBJ2PCSC, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LIBS_unix := $(LIBDL), \ - LIBS_solaris := -lc, \ LIBS_windows := winscard.lib, \ VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ RC_FLAGS := $(RC_FLAGS) \ diff --git a/make/lib/Lib-jdk.crypto.cryptoki.gmk b/make/lib/Lib-jdk.crypto.cryptoki.gmk index 5a5fed05ac0..d1c96235698 100644 --- a/make/lib/Lib-jdk.crypto.cryptoki.gmk +++ b/make/lib/Lib-jdk.crypto.cryptoki.gmk @@ -42,7 +42,6 @@ $(eval $(call SetupNativeCompilation, BUILD_LIBJ2PKCS11, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LIBS_unix := $(LIBDL), \ - LIBS_solaris := -lc, \ VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ RC_FLAGS := $(RC_FLAGS) \ -D "JDK_FNAME=j2pkcs11.dll" \ diff --git a/make/lib/Lib-jdk.crypto.ec.gmk b/make/lib/Lib-jdk.crypto.ec.gmk index 3b65468b924..41a41a07ea8 100644 --- a/make/lib/Lib-jdk.crypto.ec.gmk +++ b/make/lib/Lib-jdk.crypto.ec.gmk @@ -60,8 +60,6 @@ ifeq ($(ENABLE_INTREE_EC), true) LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \ LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN), \ LIBS := $(LIBCXX), \ - LIBS_linux := -lc, \ - LIBS_solaris := -lc, \ VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ RC_FLAGS := $(RC_FLAGS) \ -D "JDK_FNAME=sunec.dll" \ diff --git a/make/lib/Lib-jdk.crypto.ucrypto.gmk b/make/lib/Lib-jdk.crypto.ucrypto.gmk index 76459cbf216..e863fa3028e 100644 --- a/make/lib/Lib-jdk.crypto.ucrypto.gmk +++ b/make/lib/Lib-jdk.crypto.ucrypto.gmk @@ -41,7 +41,6 @@ ifeq ($(OPENJDK_TARGET_OS), solaris) MAPFILE := $(TOPDIR)/make/mapfiles/libj2ucrypto/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB), \ LIBS := $(LIBDL), \ - LIBS_solaris := -lc, \ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libj2ucrypto, \ )) diff --git a/make/lib/Lib-jdk.hotspot.agent.gmk b/make/lib/Lib-jdk.hotspot.agent.gmk index af38613e9ad..2f053038216 100644 --- a/make/lib/Lib-jdk.hotspot.agent.gmk +++ b/make/lib/Lib-jdk.hotspot.agent.gmk @@ -59,7 +59,7 @@ else ifeq ($(OPENJDK_TARGET_OS), solaris) SA_CFLAGS := $(CFLAGS_JDKLIB) SA_CXXFLAGS := $(CXXFLAGS_JDKLIB) SA_LDFLAGS := -mt $(LDFLAGS_CXX_JDK) - SA_LIBS := -ldl -ldemangle -lthread -lc -lproc + SA_LIBS := -ldl -ldemangle -lthread -lproc else ifeq ($(OPENJDK_TARGET_OS), macosx) SA_EXCLUDE_FILES := BsdDebuggerLocal.c ps_proc.c salibelf.c StubDebuggerLocal.c diff --git a/make/lib/Lib-jdk.jdwp.agent.gmk b/make/lib/Lib-jdk.jdwp.agent.gmk index 95b3082f84a..959947fc32b 100644 --- a/make/lib/Lib-jdk.jdwp.agent.gmk +++ b/make/lib/Lib-jdk.jdwp.agent.gmk @@ -48,7 +48,7 @@ $(eval $(call SetupNativeCompilation, BUILD_LIBDT_SOCKET, \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LDFLAGS_windows := -export:jdwpTransport_OnLoad, \ LIBS_linux := -lpthread, \ - LIBS_solaris := -lnsl -lsocket -lc, \ + LIBS_solaris := -lnsl -lsocket, \ LIBS_windows := $(JDKLIB_LIBS) ws2_32.lib, \ VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ RC_FLAGS := $(RC_FLAGS) \ diff --git a/make/lib/Lib-jdk.net.gmk b/make/lib/Lib-jdk.net.gmk index e20dc66e7b2..1e685a87162 100644 --- a/make/lib/Lib-jdk.net.gmk +++ b/make/lib/Lib-jdk.net.gmk @@ -38,7 +38,7 @@ ifeq ($(OPENJDK_TARGET_OS), solaris) MAPFILE := $(TOPDIR)/make/mapfiles/libextnet/mapfile-solaris, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ - LIBS := -lsocket -lc -ljava, \ + LIBS := -lsocket -ljava, \ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libextnet, \ )) @@ -59,7 +59,7 @@ ifeq ($(OPENJDK_TARGET_OS), linux) MAPFILE := $(TOPDIR)/make/mapfiles/libextnet/mapfile-linux, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ - LIBS := -ljvm -ljava -lc, \ + LIBS := -ljvm -ljava, \ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libextnet, \ )) diff --git a/make/lib/Lib-jdk.pack.gmk b/make/lib/Lib-jdk.pack.gmk index f025e19831b..58f238fa844 100644 --- a/make/lib/Lib-jdk.pack.gmk +++ b/make/lib/Lib-jdk.pack.gmk @@ -45,7 +45,7 @@ $(eval $(call SetupNativeCompilation, BUILD_LIBUNPACK, \ LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LDFLAGS_windows := -map:$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/unpack.map -debug, \ - LIBS_unix := -ljvm $(LIBCXX) -ljava -lc, \ + LIBS_unix := -ljvm $(LIBCXX) -ljava, \ LIBS_windows := jvm.lib $(WIN_JAVA_LIB), \ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libunpack, \ VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ diff --git a/make/lib/Lib-jdk.sctp.gmk b/make/lib/Lib-jdk.sctp.gmk index 5e3e842ac45..4649d2b41f3 100644 --- a/make/lib/Lib-jdk.sctp.gmk +++ b/make/lib/Lib-jdk.sctp.gmk @@ -47,7 +47,7 @@ ifeq ($(OPENJDK_TARGET_OS_TYPE), unix) $(call SET_SHARED_LIBRARY_ORIGIN), \ LIBS_unix := -lnio -lnet -ljava -ljvm, \ LIBS_linux := -lpthread $(LIBDL), \ - LIBS_solaris := -lsocket -lc, \ + LIBS_solaris := -lsocket, \ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libsctp, \ )) diff --git a/make/lib/Lib-jdk.security.auth.gmk b/make/lib/Lib-jdk.security.auth.gmk index fefbe87cbf2..3ff2ea3d883 100644 --- a/make/lib/Lib-jdk.security.auth.gmk +++ b/make/lib/Lib-jdk.security.auth.gmk @@ -47,7 +47,6 @@ $(eval $(call SetupNativeCompilation, BUILD_LIBJAAS, \ MAPFILE := $(LIBJAAS_MAPFILE), \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ - LIBS_solaris := -lc, \ LIBS_windows := netapi32.lib user32.lib mpr.lib advapi32.lib $(JDKLIB_LIBS), \ VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ RC_FLAGS := $(RC_FLAGS) \ diff --git a/make/lib/NetworkingLibraries.gmk b/make/lib/NetworkingLibraries.gmk index 2f02f1577cf..dc487a47d9e 100644 --- a/make/lib/NetworkingLibraries.gmk +++ b/make/lib/NetworkingLibraries.gmk @@ -42,7 +42,7 @@ $(eval $(call SetupNativeCompilation, BUILD_LIBNET, \ LDFLAGS_windows := -delayload:secur32.dll -delayload:iphlpapi.dll, \ LIBS_unix := -ljvm -ljava, \ LIBS_linux := $(LIBDL) -lpthread, \ - LIBS_solaris := -lnsl -lsocket $(LIBDL) -lc, \ + LIBS_solaris := -lnsl -lsocket $(LIBDL), \ LIBS_aix := $(LIBDL),\ LIBS_windows := ws2_32.lib jvm.lib secur32.lib iphlpapi.lib winhttp.lib \ delayimp.lib $(WIN_JAVA_LIB) advapi32.lib, \ diff --git a/make/lib/NioLibraries.gmk b/make/lib/NioLibraries.gmk index a345c93f063..42c60fd89a3 100644 --- a/make/lib/NioLibraries.gmk +++ b/make/lib/NioLibraries.gmk @@ -71,7 +71,7 @@ $(eval $(call SetupNativeCompilation, BUILD_LIBNIO, \ LIBS_unix := -ljava -lnet, \ LIBS_linux := -lpthread $(LIBDL), \ LIBS_solaris := -ljvm -lsocket -lposix4 $(LIBDL) \ - -lsendfile -lc, \ + -lsendfile, \ LIBS_aix := $(LIBDL), \ LIBS_macosx := \ -framework CoreFoundation -framework CoreServices, \ diff --git a/make/lib/SoundLibraries.gmk b/make/lib/SoundLibraries.gmk index ee17b0cb158..b72fd71ceed 100644 --- a/make/lib/SoundLibraries.gmk +++ b/make/lib/SoundLibraries.gmk @@ -128,7 +128,6 @@ $(eval $(call SetupNativeCompilation, BUILD_LIBJSOUND, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LIBS_unix := -ljava -ljvm, \ - LIBS_solaris := -lc, \ LIBS_macosx := -framework CoreAudio -framework CoreFoundation \ -framework CoreServices -framework AudioUnit $(LIBCXX) \ -framework CoreMIDI -framework AudioToolbox, \ diff --git a/make/test/JtregNativeHotspot.gmk b/make/test/JtregNativeHotspot.gmk index 70f9884eafb..78fa0dbcd04 100644 --- a/make/test/JtregNativeHotspot.gmk +++ b/make/test/JtregNativeHotspot.gmk @@ -99,29 +99,6 @@ BUILD_HOTSPOT_JTREG_NATIVE_SRC += \ $(TOPDIR)/test/hotspot/jtreg/runtime/StackGuardPages endif -ifeq ($(TOOLCHAIN_TYPE), solstudio) - BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_liboverflow := -lc - BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libSimpleClassFileLoadHook := -lc - BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libCanGenerateAllClassHook := -lc - BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libGetOwnedMonitorInfoTest := -lc - BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libGetOwnedMonitorStackDepthInfoTest := -lc - BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libGetNamedModuleTest := -lc - BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libIsModifiableModuleTest := -lc - BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libAddModuleReadsTest := -lc - BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libAddModuleExportsAndOpensTest := -lc - BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libAddModuleUsesAndProvidesTest := -lc - BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libMAAClassFileLoadHook := -lc - BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libMAAClassLoadPrepare := -lc - BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libMAAThreadStart := -lc - BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libAllowedFunctions := -lc - BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libRedefineDoubleDelete := -lc - BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libHandshakeTransitionTest := -lc - BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libHasNoEntryPoint := -lc - BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libReturnError := -lc - BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libCNLookUp := -lc - BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libTestCheckedEnsureLocalCapacity := -lc -endif - ifeq ($(OPENJDK_TARGET_OS), linux) BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libtest-rw := -z noexecstack BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libtest-rwx := -z execstack diff --git a/make/test/JtregNativeJdk.gmk b/make/test/JtregNativeJdk.gmk index 9eca095bc0f..9d835d7eaea 100644 --- a/make/test/JtregNativeJdk.gmk +++ b/make/test/JtregNativeJdk.gmk @@ -49,8 +49,8 @@ BUILD_JDK_JTREG_NATIVE_SRC += \ # ifneq ($(OPENJDK_TARGET_OS), windows) - BUILD_JDK_JTREG_NATIVE_SRC += $(TOPDIR)/test/jdk/java/nio/channels/FileChannel/directio - BUILD_JDK_JTREG_NATIVE_SRC += $(TOPDIR)/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel + BUILD_JDK_JTREG_NATIVE_SRC += $(TOPDIR)/test/jdk/java/nio/channels/FileChannel/directio + BUILD_JDK_JTREG_NATIVE_SRC += $(TOPDIR)/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel endif BUILD_JDK_JTREG_OUTPUT_DIR := $(OUTPUTDIR)/support/test/jdk/jtreg/native @@ -58,19 +58,16 @@ BUILD_JDK_JTREG_OUTPUT_DIR := $(OUTPUTDIR)/support/test/jdk/jtreg/native BUILD_JDK_JTREG_IMAGE_DIR := $(TEST_IMAGE_DIR)/jdk/jtreg ifeq ($(OPENJDK_TARGET_OS), windows) - WIN_LIB_JAVA := $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib - BUILD_JDK_JTREG_LIBRARIES_LIBS_libstringPlatformChars := $(WIN_LIB_JAVA) -else ifeq ($(OPENJDK_TARGET_OS), linux) - BUILD_JDK_JTREG_LIBRARIES_LIBS_libstringPlatformChars := -ljava - BUILD_JDK_JTREG_LIBRARIES_LIBS_libDirectIO := -ljava - BUILD_JDK_JTREG_LIBRARIES_LIBS_libInheritedChannel := -ljava -else ifeq ($(OPENJDK_TARGET_OS), solaris) - BUILD_JDK_JTREG_LIBRARIES_LIBS_libstringPlatformChars := -ljava -lc - BUILD_JDK_JTREG_LIBRARIES_LIBS_libDirectIO := -ljava -lc - BUILD_JDK_JTREG_LIBRARIES_LIBS_libInheritedChannel := -ljava -lc + WIN_LIB_JAVA := $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib + BUILD_JDK_JTREG_LIBRARIES_LIBS_libstringPlatformChars := $(WIN_LIB_JAVA) else - BUILD_JDK_JTREG_LIBRARIES_LIBS_libstringPlatformChars := -ljava - BUILD_JDK_JTREG_LIBRARIES_LIBS_libDirectIO := -ljava + BUILD_JDK_JTREG_LIBRARIES_LIBS_libstringPlatformChars := -ljava + BUILD_JDK_JTREG_LIBRARIES_LIBS_libDirectIO := -ljava + ifeq ($(OPENJDK_TARGET_OS), linux) + BUILD_JDK_JTREG_LIBRARIES_LIBS_libInheritedChannel := -ljava + else ifeq ($(OPENJDK_TARGET_OS), solaris) + BUILD_JDK_JTREG_LIBRARIES_LIBS_libInheritedChannel := -ljava + endif endif $(eval $(call SetupTestFilesCompilation, BUILD_JDK_JTREG_LIBRARIES, \