# HG changeset patch # User erikj # Date 1445508752 -7200 # Node ID ed708a0e34821f587e539663a3b2955367bc4ab7 # Parent 9a65d47fef723aa0ab0f20edaa1f93b0616ba433 8140223: fix the build with a toolchain with a linker defaulting to ld --as-needed Reviewed-by: erikj, ihse Contributed-by: doko@ubuntu.com diff -r 9a65d47fef72 -r ed708a0e3482 jdk/make/launcher/Launcher-jdk.pack200.gmk --- a/jdk/make/launcher/Launcher-jdk.pack200.gmk Wed Oct 21 18:40:22 2015 -0700 +++ b/jdk/make/launcher/Launcher-jdk.pack200.gmk Thu Oct 22 12:12:32 2015 +0200 @@ -40,7 +40,7 @@ ifeq ($(USE_EXTERNAL_LIBZ), true) UNPACKEXE_CFLAGS += -DSYSTEM_ZLIB - UNPACKEXE_ZIPOBJS := -lz + UNPACKEXE_LIBS := -lz else UNPACKEXE_CFLAGS += -I$(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib-1.2.8 UNPACKEXE_ZIPOBJS := $(SUPPORT_OUTPUTDIR)/native/java.base/libzip/zcrc32$(OBJ_SUFFIX) \ @@ -90,9 +90,9 @@ $(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \ $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)unpack$(SHARED_LIBRARY_SUFFIX)) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ - LDFLAGS_linux := -lc, \ + LDFLAGS_linux := , \ LDFLAGS_solaris := $(UNPACKEXE_LDFLAGS_solaris) -lc, \ - LDFLAGS_SUFFIX := $(LIBCXX), \ + LDFLAGS_SUFFIX := $(UNPACKEXE_LIBS) $(LIBCXX), \ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/unpackexe$(OUTPUT_SUBDIR), \ OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_cmds/$(MODULE), \ PROGRAM := unpack200, \ diff -r 9a65d47fef72 -r ed708a0e3482 jdk/make/lib/Awt2dLibraries.gmk --- a/jdk/make/lib/Awt2dLibraries.gmk Wed Oct 21 18:40:22 2015 -0700 +++ b/jdk/make/lib/Awt2dLibraries.gmk Thu Oct 22 12:12:32 2015 +0200 @@ -500,10 +500,10 @@ DISABLED_WARNINGS_clang := logical-op-parentheses, \ DISABLED_WARNINGS_microsoft := 4267, \ MAPFILE := $(BUILD_LIBJAVAJPEG_MAPFILE), \ - LDFLAGS := $(LDFLAGS_JDKLIB) $(LIBJPEG_LIBS) \ + LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LDFLAGS_windows := $(WIN_JAVA_LIB) jvm.lib, \ - LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \ + LDFLAGS_SUFFIX := $(LIBJPEG_LIBS) $(LDFLAGS_JDKLIB_SUFFIX), \ VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ RC_FLAGS := $(RC_FLAGS) \ -D "JDK_FNAME=javajpeg.dll" \