Fix OpenBLAS 0.3.8 build on darwin (#15041)

* Fix OpenBLAS 0.3.8 build on darwin

See https://github.com/xianyi/OpenBLAS/issues/2431, patched in
https://github.com/xianyi/OpenBLAS/issues/2431 .

* Add references for patchfile
This commit is contained in:
Seth R. Johnson 2020-02-18 15:23:54 -05:00 committed by GitHub
parent 975acd4dfb
commit 893f76da53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,23 @@
diff --git a/c_check b/c_check
index fbd1838a..e10def2e 100644
--- a/c_check
+++ b/c_check
@@ -263,18 +263,6 @@ if ($architecture ne $hostarch) {
$cross = 1 if ($os ne $hostos);
-# rework cross suffix and architecture if we are on OSX cross-compiling for ARMV8-based IOS
-# the initial autodetection will have been confused by the command-line arguments to clang
-# and the cross-compiler apparently still claims to build for x86_64 in its CC -E output
-if (($os eq "Darwin") && ($cross_suffix ne "")) {
- my $tmpnam = `xcrun --sdk iphoneos --find clang`;
- $cross_suffix = substr($tmpnam, 0, rindex($tmpnam, "/")+1 );
-# this should produce something like $cross_suffix="/Applications/Xcode-10.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/";
- $cross =1;
- $architecture = arm64;
-}
-
-
$openmp = "" if $ENV{USE_OPENMP} != 1;

View File

@ -86,6 +86,10 @@ class Openblas(MakefilePackage):
sha256='f1b066a4481a50678caeb7656bf3e6764f45619686ac465f257c8017a2dc1ff0',
when='@0.3.0:0.3.3')
# Fix https://github.com/xianyi/OpenBLAS/issues/2431
# Patch derived from https://github.com/xianyi/OpenBLAS/pull/2424
patch('openblas-0.3.8-darwin.patch', when='@0.3.8 platform=darwin')
# Add conditions to f_check to determine the Fujitsu compiler
patch('openblas_fujitsu.patch', when='%fj')