From 1828873b3eb61bfb31284c4a7d0856e299be22dc Mon Sep 17 00:00:00 2001 From: Severin Gehwolf Date: Wed, 29 Aug 2018 12:12:49 +0200 Subject: [PATCH] Adjust system NSS patch for -Wl,--as-needed. redhat-rpm-config package turned on -Wl,--as-needed linker flag by default, breaking the SunEC via system NSS provider build. This fixes it by filtering -Wl,--as-needed from linker flags when SunEC provider is being built. Resolves: RHBZ#1623399 --- RHBZ-1565658-system-nss-SunEC.patch | 9 +++++++-- java-openjdk.spec | 7 ++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/RHBZ-1565658-system-nss-SunEC.patch b/RHBZ-1565658-system-nss-SunEC.patch index 7b1d4aa..376b847 100644 --- a/RHBZ-1565658-system-nss-SunEC.patch +++ b/RHBZ-1565658-system-nss-SunEC.patch @@ -99,8 +99,13 @@ diff --git openjdk/make/lib/Lib-jdk.crypto.ec.gmk openjdk/make/lib/Lib-jdk.crypt # # On sol-sparc...all libraries are compiled with -xregs=no%appl # (set in CFLAGS_REQUIRED_sparc) -@@ -60,7 +66,7 @@ - LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \ +@@ -57,10 +63,11 @@ + DISABLED_WARNINGS_gcc := sign-compare, \ + DISABLED_WARNINGS_microsoft := 4101 4244 4146 4018, \ + MAPFILE := $(TOPDIR)/make/mapfiles/libsunec/mapfile-vers, \ +- LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \ ++ LDFLAGS := $(subst -Xlinker --as-needed,, \ ++ $(subst -Wl$(COMMA)--as-needed,, $(LDFLAGS_JDKLIB))) $(LDFLAGS_CXX_JDK), \ LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN), \ LIBS := $(LIBCXX), \ - LIBS_linux := -lc, \ diff --git a/java-openjdk.spec b/java-openjdk.spec index 95d7635..1df00ee 100644 --- a/java-openjdk.spec +++ b/java-openjdk.spec @@ -861,7 +861,7 @@ Provides: java-%{javaver}-%{origin}-src%{?1} = %{epoch}:%{version}-%{release} Name: java-%{origin} Version: %{newjavaver}.%{buildver} -Release: 7%{?dist} +Release: 8%{?dist} # java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons # and this change was brought into RHEL-4. java-1.5.0-ibm packages # also included the epoch in their virtual provides. This created a @@ -1763,6 +1763,11 @@ require "copy_jdk_configs.lua" %changelog +* Wed Aug 29 2018 Severin Gehwolf - 1:10.0.3.13-8 +- Adjust system NSS patch, RHBZ-1565658-system-nss-SunEC.patch, so + as to account for -Wl,--as-needed default linker flag by filtering + it. Resolves RHBZ#1623399. + * Thu Aug 23 2018 Jiri Vanek - 1:10.0.3.13-6 - dissabled accessibility, fixed provides for main package's debug variant - now buildrequires javapackages-filesystem as the issue with macros should be fixed