java-1.8.0-openjdk/rhbz_1538767_fix_linking.patch
Severin Gehwolf bceb750daf Fix FTBFS due to link failure of libfontmanager.so
A recent change in redhat-rpm-config makes the
hardened builds link with -Wl,-z,defs.

See RHBZ#1535422 for the bug which introduced this
change in redhat-rpm-config.

That change, in turn, provokes a build failure due
to a missing lib not being listed when linking
libfontmanager.so.

Resolves RHBZ#1538767
2018-01-26 11:43:14 +01:00

22 lines
1020 B
Diff

diff --git a/make/lib/Awt2dLibraries.gmk b/make/lib/Awt2dLibraries.gmk
--- a/make/lib/Awt2dLibraries.gmk
+++ b/make/lib/Awt2dLibraries.gmk
@@ -921,7 +921,7 @@
LDFLAGS := $(subst -Xlinker -z -Xlinker defs,,$(LDFLAGS_JDKLIB)) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := $(BUILD_LIBFONTMANAGER_FONTLIB), \
- LDFLAGS_SUFFIX_linux := -lawt $(LIBM) $(LIBCXX) -ljava -ljvm -lc, \
+ LDFLAGS_SUFFIX_linux := -lawt_headless -lawt $(LIBM) $(LIBCXX) -ljava -ljvm -lc, \
LDFLAGS_SUFFIX_solaris := -lawt -lawt_headless -lc $(LIBM) $(LIBCXX) -ljava -ljvm, \
LDFLAGS_SUFFIX_aix := -lawt -lawt_headless $(LIBM) $(LIBCXX) -ljava -ljvm,\
LDFLAGS_SUFFIX_macosx := -lawt $(LIBM) $(LIBCXX) -undefined dynamic_lookup \
@@ -938,7 +938,7 @@
$(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT)
-ifneq (, $(findstring $(OPENJDK_TARGET_OS), solaris aix))
+ifneq (, $(findstring $(OPENJDK_TARGET_OS), solaris aix linux))
$(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT_HEADLESS)
endif