diff options
author | Seth R. Johnson <johnsonsr@ornl.gov> | 2020-02-18 15:23:54 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-18 14:23:54 -0600 |
commit | 893f76da53f2ca53fc18f3a08e370b4dfd80ebb4 (patch) | |
tree | 7cb0026878d925a5a3f1774fdff46a6f1de48140 /var | |
parent | 975acd4dfb6173e13922ce1599b8a20fb6b7dda8 (diff) | |
download | spack-893f76da53f2ca53fc18f3a08e370b4dfd80ebb4.tar.gz spack-893f76da53f2ca53fc18f3a08e370b4dfd80ebb4.tar.bz2 spack-893f76da53f2ca53fc18f3a08e370b4dfd80ebb4.tar.xz spack-893f76da53f2ca53fc18f3a08e370b4dfd80ebb4.zip |
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
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/openblas/openblas-0.3.8-darwin.patch | 23 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/openblas/package.py | 4 |
2 files changed, 27 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/openblas/openblas-0.3.8-darwin.patch b/var/spack/repos/builtin/packages/openblas/openblas-0.3.8-darwin.patch new file mode 100644 index 0000000000..e844e0be24 --- /dev/null +++ b/var/spack/repos/builtin/packages/openblas/openblas-0.3.8-darwin.patch @@ -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; + diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 607a41e85d..0ad58605c4 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -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') |