summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/openblas/linktest.patch21
-rw-r--r--var/spack/repos/builtin/packages/openblas/package.py4
2 files changed, 25 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/openblas/linktest.patch b/var/spack/repos/builtin/packages/openblas/linktest.patch
new file mode 100644
index 0000000000..6ec5f7fff8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/openblas/linktest.patch
@@ -0,0 +1,21 @@
+--- a/exports/gensymbol
++++ b/exports/gensymbol
+@@ -3914,6 +3914,18 @@
+ @underscore_objs = (@underscore_objs, @misc_common_objs);
+ @no_underscore_objs = (@no_underscore_objs, @misc_common_objs);
+
++ foreach $objs (@underscore_objs) {
++ print "void ", $symbolprefix, $objs, $bu, $symbolsuffix, "();\n" if $objs ne "xerbla";
++ }
++
++ foreach $objs (@need_2underscore_objs) {
++ print "void ", $symbolprefix, $objs, $bu, $bu, $symbolsuffix, "();\n";
++ }
++
++ foreach $objs (@no_underscore_objs) {
++ print "void ", $symbolprefix, $objs, $symbolsuffix, "();\n";
++ }
++
+ print "int main(void){\n";
+ foreach $objs (@underscore_objs) {
+ print $symbolprefix, $objs, $bu, $symbolsuffix, "();\n" if $objs ne "xerbla";
diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py
index c1ac5ac24e..b8a0d16d5a 100644
--- a/var/spack/repos/builtin/packages/openblas/package.py
+++ b/var/spack/repos/builtin/packages/openblas/package.py
@@ -153,6 +153,10 @@ class Openblas(MakefilePackage):
# Use /usr/bin/env perl in build scripts
patch("0001-use-usr-bin-env-perl.patch", when="@:0.3.13")
+ # Declare external functions in linktest
+ # See <https://github.com/xianyi/OpenBLAS/issues/3760>
+ patch("linktest.patch", when="@0.3.20")
+
# See https://github.com/spack/spack/issues/19932#issuecomment-733452619
conflicts("%gcc@7.0.0:7.3,8.0.0:8.2", when="@0.3.11:")