spec: Rely on default -flto values instead of using auto
According to the GCC docs[1], -flto=auto does: > Use -flto=auto to use GNU make’s job server, if available, or > otherwise fall back to autodetection of the number of CPU threads > present in your system. clang does not support -flto=auto (or -flto=jobserver for that matter), so using this option breaks the build with non-gcc compilers. Pass just -flto instead and rely on gcc doing the right thing. [1] https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
This commit is contained in:
parent
f82faf5f58
commit
0f98426a15
10
octave.spec
10
octave.spec
@ -22,7 +22,7 @@
|
|||||||
%global relsuf .rc%{?rcver}
|
%global relsuf .rc%{?rcver}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%global optflags %{optflags} -flto=auto
|
%global optflags %{optflags}
|
||||||
%global build_ldflags %{build_ldflags} -flto
|
%global build_ldflags %{build_ldflags} -flto
|
||||||
|
|
||||||
Name: octave
|
Name: octave
|
||||||
@ -240,6 +240,14 @@ export CPPFLAGS=-I%{_includedir}/suitesparse
|
|||||||
# Disable _GLIBCXX_ASSERTIONS for now
|
# Disable _GLIBCXX_ASSERTIONS for now
|
||||||
# https://savannah.gnu.org/bugs/?55547
|
# https://savannah.gnu.org/bugs/?55547
|
||||||
export CXXFLAGS="$(echo %optflags | sed s/-Wp,-D_GLIBCXX_ASSERTIONS//)"
|
export CXXFLAGS="$(echo %optflags | sed s/-Wp,-D_GLIBCXX_ASSERTIONS//)"
|
||||||
|
|
||||||
|
verstr=$(%{__cxx} --version | head -1)
|
||||||
|
if [[ "$verstr" == *"GCC"* ]]; then
|
||||||
|
CXXFLAGS="$CXXFLAGS -flto=auto"
|
||||||
|
else
|
||||||
|
CXXFLAGS="$CXXFLAGS -flto"
|
||||||
|
fi
|
||||||
|
|
||||||
%configure --enable-shared --disable-static \
|
%configure --enable-shared --disable-static \
|
||||||
--enable-float-truncate \
|
--enable-float-truncate \
|
||||||
%{?disabledocs} \
|
%{?disabledocs} \
|
||||||
|
Loading…
Reference in New Issue
Block a user