Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 24 additions & 12 deletions scram-tools.file/tools/gcc/ofast-flag.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
<tool name="ofast-flag" version="1.0" revision="1">
<flags CXXFLAGS="-Ofast -fno-reciprocal-math"/>
<ifarch match="ppc64le|amd64|x86_64">
<flags CXXFLAGS="-mrecip=none"/>
</ifarch>
<ifarchitecture name="slc6_">
<ifcompiler name="llvm">
<flags CXXFLAGS="-fno-builtin"/>
</ifcompiler>
</ifarchitecture>
<flags NO_RECURSIVE_EXPORT="1"/>
</tool>
<tool name="ofast-flag" version="2.0" revision="1">
<!--
As of GCC version 13.3.0, `-Ofast` enables (directly or indirectly):
- `-fallow-store-data-races`
- `-fno-semantic-interposition`
- `-fno-math-errno`
- `-funsafe-math-optimizations`
- `-ffinite-math-only`
- `-fno-rounding-math` (enabled by default)
- `-fno-signaling-nans` (enabled by default)
- `-fcx-limited-range`
- `-fexcess-precision=fast`
- `-fno-signed-zeros`
- `-fno-trapping-math`
- `-fassociative-math`
- `-freciprocal-math` (disabled in cms-sw/cmsdist#8280)
We disable `-fallow-store-data-races`, `-funsafe-math-optimizations`, `-ffinite-math-only` and `-freciprocal-math` (see cms-sw/cmsdist#8280).
-->
<flags CXXFLAGS="-fno-semantic-interposition -fno-math-errno -fno-rounding-math -fno-signaling-nans -fexcess-precision=fast -fno-signed-zeros -fno-trapping-math -fassociative-math -fno-reciprocal-math"/>
<ifarch match="ppc64le|amd64|x86_64">
<flags CXXFLAGS="-mrecip=none"/>
</ifarch>
<flags NO_RECURSIVE_EXPORT="1"/>
</tool>
2 changes: 1 addition & 1 deletion xz-bootstrap.spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Source0: http://tukaani.org/xz/xz-%{realversion}.tar.gz
%setup -n xz-%{realversion}

%build
./configure CFLAGS='-fPIC -D_FILE_OFFSET_BITS=64 -Ofast' --prefix=%{i} --disable-static
./configure CFLAGS='-fPIC -D_FILE_OFFSET_BITS=64 -O3' --prefix=%{i} --disable-static
make %{makeprocesses}

%install
Expand Down
2 changes: 1 addition & 1 deletion xz.spec
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ BuildRequires: autotools
%setup -n %{n}-%{realversion}

%build
./configure CFLAGS='-fPIC -Ofast' --prefix=%{i} --disable-static --disable-nls --disable-rpath --disable-dependency-tracking --disable-doc
./configure CFLAGS='-fPIC -O3' --prefix=%{i} --disable-static --disable-nls --disable-rpath --disable-dependency-tracking --disable-doc
make %{makeprocesses}

%install
Expand Down