8196516: libfontmanager must be built with LDFLAGS allowing unresolved symbols

Fixes build failures on some sustems with custom LDFLAGS settings.

Reviewed-by: erikj, ihse, serb
This commit is contained in:
Severin Gehwolf 2018-04-09 13:28:47 +02:00
parent bd2fef5689
commit 0a0fd44713

View File

@ -623,6 +623,10 @@ ifeq ($(TOOLCHAIN_TYPE), gcc)
BUILD_LIBFONTMANAGER_ExtensionSubtables.cpp_CXXFLAGS := -fno-strict-aliasing
endif
# LDFLAGS clarification:
# Filter relevant linker flags disallowing unresolved symbols as we cannot
# build-time decide to which library to link against (libawt_headless or
# libawt_xawt). See JDK-8196516 for details.
$(eval $(call SetupJdkLibrary, BUILD_LIBFONTMANAGER, \
NAME := fontmanager, \
SRC := $(LIBFONTMANAGER_SRC), \
@ -648,7 +652,8 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBFONTMANAGER, \
truncwarn wvarhidenmem wvarhidemem wbadlkginit identexpected \
hidevf w_novirtualdescr arrowrtn2, \
DISABLED_WARNINGS_microsoft := 4267 4244 4018 4090 4996 4146 4334 4819 4101, \
LDFLAGS := $(subst -Wl$(COMMA)-z$(COMMA)defs,,$(LDFLAGS_JDKLIB)) $(LDFLAGS_CXX_JDK) \
LDFLAGS := $(subst -Xlinker -z -Xlinker defs,, \
$(subst -Wl$(COMMA)-z$(COMMA)defs,,$(LDFLAGS_JDKLIB))) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
LIBS := $(BUILD_LIBFONTMANAGER_FONTLIB), \