diff --git a/gambit-c.spec b/gambit-c.spec index cb7403a..464eaf5 100644 --- a/gambit-c.spec +++ b/gambit-c.spec @@ -9,6 +9,7 @@ %if 0%{?el6} %ifarch ppc64 %if ! %{with ppc64opt2} +%global disable_c_opt 1 %global optflags %(echo %{optflags} | sed 's/-O2 /-O1 /') %endif %endif # ppc64 @@ -79,9 +80,29 @@ chmod -x lib/*.{c,h} %build # disable expensive optimizations on specified platforms # see INSTALL.txt +%ifarch s390 %{arm} +%global disable_gcc_opts 1 +%endif + +%if 0%{?fedora} +%if 0%{?fedora} <= 21 +%global disable_gcc_opts 1 +%endif +%endif + +%if 0%{?rhel} +%if 0%{?rhel} <= 7 +%global disable_gcc_opts 1 +%endif +%endif + %configure --enable-single-host \ +%if 0%{?disable_c_opt:1} +%else --enable-c-opt \ -%ifnarch s390 %{arm} +%endif +%if 0%{?disable_gcc_opts:1} +%else --enable-gcc-opts \ %endif --bindir=%{_libdir}/%{name}/bin \