From a5fd815c392f6b7a05e52a94be4e873eb21cce73 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Sep 06 2015 17:07:11 +0000 Subject: - also disable gcc opts on F21 and RHEL <= 7 - clean up PPC64 handling on el6 --- 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 \