Use ldflags from Fedora because %optflags are inside %ldflags in ROSA and OMV and confuse build sscripts

This commit is contained in:
Mikhail Novosyolov 2020-07-06 02:32:55 +03:00
parent a34c4e4243
commit c7ac49bfb6

View file

@ -139,7 +139,10 @@
# We filter out -fexceptions as the HotSpot build explicitly does -fno-exceptions and it's otherwise the default for C++ # 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 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 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 # 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 # the initialization must be here. Later the pkg-config have buggy behavior