openblas: Allow building linktest.c with clang@15 (#32597)

This commit is contained in:
Erik Schnetter 2022-09-12 14:17:49 -04:00 committed by GitHub
parent 6a5d247d7c
commit 6e5dc7374c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 0 deletions

View File

@ -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";

View File

@ -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:")