diff --git a/lapack.changes b/lapack.changes index 82a13ca..2b21c94 100644 --- a/lapack.changes +++ b/lapack.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Feb 23 16:58:25 UTC 2023 - Egbert Eich + +- Set -ffloat-store for the entire build on ix86 platforms. + This helps to avoid effects from excess precision that + can be seen in the test suite. + ------------------------------------------------------------------- Wed Feb 15 08:51:06 UTC 2023 - Egbert Eich diff --git a/lapack.spec b/lapack.spec index 609c928..835df47 100644 --- a/lapack.spec +++ b/lapack.spec @@ -213,6 +213,10 @@ The cblas-devel-static package contains the CBLAS static libraries for -static linking. You do not need these, unless you link statically, which is highly discouraged. +%ifarch %{ix86} +%global precflags "-ffloat-store" +%endif + %prep %setup -q %autopatch -p1 @@ -221,9 +225,6 @@ sed -i -e '1 s@env python@python3@' lapack_testing.py %build %global _lto_cflags %{_lto_cflags} -ffat-lto-objects %global optflags_f %{optflags} -%ifarch %{ix86} -%global test_precflags "-ffloat-store" -%endif cp make.inc.example make.inc # for ABI compatibility we need to build the deprecated interfaces @@ -232,7 +233,7 @@ echo 'BUILD_DEPRECATED = Yes' >> make.inc %make_build cleanlib %make_build blaslib \ - FFLAGS="%{optflags_f} -fPIC" + FFLAGS="%{optflags_f} %{?precflags} -fPIC" mkdir tmp ( cd tmp; ar x ../librefblas.a ) gfortran -shared -Wl,-soname=libblas.so.3 -o libblas.so.%{version} -Wl,--no-undefined tmp/*.o @@ -240,7 +241,7 @@ ln -s libblas.so.%{version} libblas.so rm -rf tmp %make_build cblaslib \ - CFLAGS="%{optflags} -fPIC -DADD_ " + CFLAGS="%{optflags} %{?precflags} -fPIC -DADD_ " mkdir tmp ( cd tmp; ar x ../libcblas.a ) gfortran -shared -Wl,-soname=libcblas.so.3 -o libcblas.so.%{version} -Wl,--no-undefined tmp/*.o -L. -lblas @@ -248,10 +249,10 @@ ln -s libcblas.so.%{version} libcblas.so rm -rf tmp # May need to be included in liblapack -%make_build -C TESTING/MATGEN FFLAGS="%{optflags_f} %{?test_precflags} %{?with_tmg:-fPIC}" +%make_build -C TESTING/MATGEN FFLAGS="%{optflags_f} %{?precflags} %{?with_tmg:-fPIC}" %make_build lapacklib \ - FFLAGS="%{optflags_f} -fPIC" + FFLAGS="%{optflags_f} %{?precflags} -fPIC" mkdir tmp ( cd tmp; ar x ../liblapack.a; %{?with_tmg: ar x ../libtmglib.a; ar cr ../liblapack.a *.o; ranlib ../liblapack.a }) gfortran -shared -Wl,-soname=liblapack.so.3 -o liblapack.so.%{version} -Wl,--no-undefined tmp/*.o -L. -lblas @@ -259,7 +260,7 @@ ln -s liblapack.so.%{version} liblapack.so rm -rf tmp make %{?_smp_mflags} lapackelib \ - CFLAGS="%{optflags} -fPIC -DADD_ -DHAVE_LAPACK_CONFIG_H -DLAPACK_COMPLEX_STRUCTURE" + CFLAGS="%{optflags} %{?precflags} -fPIC -DADD_ -DHAVE_LAPACK_CONFIG_H -DLAPACK_COMPLEX_STRUCTURE" mkdir tmp ( cd tmp; ar x ../liblapacke.a ) gfortran -shared -Wl,-soname=liblapacke.so.3 -o liblapacke.so.%{version} -Wl,--no-undefined tmp/*.o -L. -llapack @@ -267,12 +268,12 @@ ln -s liblapacke.so.%{version} liblapacke.so rm -rf tmp # Build test binaries - blas -%make_build -C BLAS/TESTING FFLAGS="%{optflags_f} %{?test_precflags}" +%make_build -C BLAS/TESTING FFLAGS="%{optflags_f} %{?precflags}" # Build test binaries - cblas -%make_build -C CBLAS/testing FFLAGS="%{optflags_f} %{?test_precflags}" +%make_build -C CBLAS/testing FFLAGS="%{optflags_f} %{?precflags}" # Build test binaries - lapack -%make_build -C TESTING/LIN FFLAGS="%{optflags_f} %{?test_precflags}" -%make_build -C TESTING/EIG FFLAGS="%{optflags_f} %{?test_precflags}" +%make_build -C TESTING/LIN FFLAGS="%{optflags_f} %{?precflags}" +%make_build -C TESTING/EIG FFLAGS="%{optflags_f} %{?precflags}" %check # Increase stack size, required for xeigtstz, see @@ -280,7 +281,7 @@ rm -rf tmp # Remove for lapack > 3.9 ulimit -s 16384 -%make_build blas_testing FFLAGS="%{optflags_f} %{?test_precflags}" +%make_build blas_testing FFLAGS="%{optflags_f} %{?precflags}" if grep -B15 -A15 FAIL BLAS/TESTING/*.out; then echo echo "blas_testing FAILED" @@ -290,7 +291,7 @@ fi %make_build cblas_testing CFLAGS="%{optflags} -fPIC" grep -B15 -A15 FAIL CBLAS/testing/*.out && false -%make_build lapack_testing FFLAGS="%{optflags_f} %{?test_precflags}" +%make_build lapack_testing FFLAGS="%{optflags_f} %{?precflags}" if grep -B15 -A15 FAIL TESTING/*.out; then echo echo "lapack_testing FAILED"