From c7ac49bfb69758ca98f00512f50a665360372701 Mon Sep 17 00:00:00 2001 From: Mikhail Novosyolov Date: Mon, 6 Jul 2020 02:32:55 +0300 Subject: [PATCH] Use ldflags from Fedora because %optflags are inside %ldflags in ROSA and OMV and confuse build sscripts --- java-11-openjdk.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/java-11-openjdk.spec b/java-11-openjdk.spec index a9a1774..cd3d91b 100644 --- a/java-11-openjdk.spec +++ b/java-11-openjdk.spec @@ -139,7 +139,10 @@ # We filter out -fexceptions as the HotSpot build explicitly does -fno-exceptions and it's otherwise the default for C++ %global ourflags %(echo %optflags | sed -e 's|-Wall|-Wformat -Wno-cpp|' | sed -r -e 's|-O[0-9]*||') %global ourcppflags %(echo %ourflags | sed -e 's|-fexceptions||') -%global ourldflags %{__global_ldflags} + +# As discussed with bero@, optflags are duplicated in ldflags for e.g. LTO, but it consuses OpenJDK build scripts +#%%global ourldflags %{__global_ldflags} +%global ourldflags -Wl,-z,relro -Wl,--as-needed -Wl,-z,now # With disabled nss is NSS deactivated, so NSS_LIBDIR can contain the wrong path # the initialization must be here. Later the pkg-config have buggy behavior