summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authoreugeneswalker <38933153+eugeneswalker@users.noreply.github.com>2022-10-22 17:53:52 -0700
committerGitHub <noreply@github.com>2022-10-22 18:53:52 -0600
commitafc33518e642784326a5a40df2e29a38d6907e22 (patch)
tree79ade21981daf0911c64ce15e0a3083cd521a6ac /var
parent8e2696172b4638239a56dad7fb22bc872a0e1356 (diff)
downloadspack-afc33518e642784326a5a40df2e29a38d6907e22.tar.gz
spack-afc33518e642784326a5a40df2e29a38d6907e22.tar.bz2
spack-afc33518e642784326a5a40df2e29a38d6907e22.tar.xz
spack-afc33518e642784326a5a40df2e29a38d6907e22.zip
openblas@0.3.21: fix misdetection of gfortran on cray (#33444)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/openblas/fix-cray-fortran-detection-pr3778.patch54
-rw-r--r--var/spack/repos/builtin/packages/openblas/package.py3
2 files changed, 57 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/openblas/fix-cray-fortran-detection-pr3778.patch b/var/spack/repos/builtin/packages/openblas/fix-cray-fortran-detection-pr3778.patch
new file mode 100644
index 0000000000..0d87eafb8e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/openblas/fix-cray-fortran-detection-pr3778.patch
@@ -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;
diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py
index bfb6d3e7d5..0b8d7591f9 100644
--- a/var/spack/repos/builtin/packages/openblas/package.py
+++ b/var/spack/repos/builtin/packages/openblas/package.py
@@ -89,6 +89,9 @@ class Openblas(MakefilePackage):
# https://github.com/xianyi/OpenBLAS/pull/3712
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
patch("f_check-oneapi.patch", when="@0.3.20 %oneapi")