be less strict with the workaround

This commit is contained in:
Dan Horák 2018-06-07 09:14:31 +02:00
parent 9ba6e190ee
commit a304e9b4df

View File

@ -309,7 +309,7 @@ rm -rf mcs/class/lib/monolite/*
# workaround a gcc bug - https://bugzilla.redhat.com/show_bug.cgi?id=1397948
RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | sed -e 's/-march=z[[:alnum:]]\+/-march=z9-109/g' -e 's/-mtune=z[[:alnum:]]\+/-mtune=z10/g')
# so either mono C code relies on undefined behaviour or gcc is even more broken than earlier
RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | sed -e 's/-O2 /-O0 /g')
RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | sed -e 's/-O2 /-O1 /g')
%endif
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"