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