openblas@0.3.21: fix misdetection of gfortran on cray (#33444)

This commit is contained in:
eugeneswalker 2022-10-22 17:53:52 -07:00 committed by GitHub
parent 8e2696172b
commit afc33518e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 57 additions and 0 deletions

View File

@ -0,0 +1,54 @@
diff -ruN spack-src/f_check spack-src-patched/f_check
--- spack-src/f_check 2022-08-07 16:36:26.000000000 -0400
+++ spack-src-patched/f_check 2022-10-20 15:06:34.296845220 -0400
@@ -82,10 +82,6 @@
vendor=FUJITSU
openmp='-Kopenmp'
;;
- *Cray*)
- vendor=CRAY
- openmp='-fopenmp'
- ;;
*GNU*|*GCC*)
v="${data#*GCC: *\) }"
@@ -117,6 +113,10 @@
esac
fi
;;
+ *Cray*)
+ vendor=CRAY
+ openmp='-fopenmp'
+ ;;
*g95*)
vendor=G95
openmp=''
diff -ruN spack-src/f_check.pl spack-src-patched/f_check.pl
--- spack-src/f_check.pl 2022-08-07 16:36:26.000000000 -0400
+++ spack-src-patched/f_check.pl 2022-10-20 15:07:50.884794505 -0400
@@ -76,11 +76,6 @@
$vendor = FUJITSU;
$openmp = "-Kopenmp";
- } elsif ($data =~ /Cray/) {
-
- $vendor = CRAY;
- $openmp = "-fopenmp";
-
} elsif ($data =~ /GNU/ || $data =~ /GCC/ ) {
$data =~ s/\(+.*?\)+//g;
@@ -106,8 +101,12 @@
$openmp = "";
}
}
+ } elsif ($data =~ /Cray/) {
+
+ $vendor = CRAY;
+ $openmp = "-fopenmp";
- }
+ }
if ($data =~ /g95/) {
$vendor = G95;

View File

@ -89,6 +89,9 @@ class Openblas(MakefilePackage):
# https://github.com/xianyi/OpenBLAS/pull/3712 # https://github.com/xianyi/OpenBLAS/pull/3712
patch("cce.patch", when="@0.3.20 %cce") patch("cce.patch", when="@0.3.20 %cce")
# https://github.com/xianyi/OpenBLAS/pull/3778
patch("fix-cray-fortran-detection-pr3778.patch", when="@0.3.21")
# https://github.com/spack/spack/issues/31732 # https://github.com/spack/spack/issues/31732
patch("f_check-oneapi.patch", when="@0.3.20 %oneapi") patch("f_check-oneapi.patch", when="@0.3.20 %oneapi")