ghc_set_gcc_flags: only reduce GCC for s390x for ghc < 9.2

This should really just be for unregisterised ghc

$ ghc --info | grep reg
 ,("Unregisterised","NO")
This commit is contained in:
Jens Petersen 2023-09-18 17:40:03 +08:00
parent 4c6ae99d0a
commit 05a5bef533

View File

@ -78,11 +78,12 @@ fi\
%ghc_set_gcc_flags\
%global _lto_cflags %{nil}\
%global __brp_strip_lto %{nil}\
# -Wunused-label is extremely noisy\
%ifarch s390x\
CFLAGS="$(echo ${CFLAGS:-%optflags} | sed -e 's/-Wall //' -e 's/-Werror=format-security //')"\
%else\
CFLAGS="${CFLAGS:-%optflags}"\
%ifarch s390x\
%if %[v"%{ghc_version}" < v"9.2"]\
# -Wunused-label is extremely noisy\
CFLAGS="$(echo ${CFLAGS:-%optflags} | sed -e 's/-Wall //' -e 's/-Werror=format-security //')"\
%endif\
%endif\
export CFLAGS\
%undefine _package_note_flags\