diff --git a/math/OpenBLAS/Portfile b/math/OpenBLAS/Portfile
index a97dc353392..d87645ed597 100644
a
|
b
|
if {${os.major} >= 11 && ${os.major} <= 17} { |
30 | 30 | set blas_arch "CORE2" |
31 | 31 | } |
32 | 32 | #OS 10.14 supports down to Mac Pro 5,1 that has Nehalem architecture |
33 | | if {${os.major} >= 18} { |
34 | | set blas_arch "NEHALEM" |
35 | | } |
| 33 | if {${os.major} >= 18} { |
| 34 | if {${os.arch} eq "arm"} { |
| 35 | # FIXME use correct arch name |
| 36 | #set blas_arch "???" |
| 37 | } else { |
| 38 | set blas_arch "NEHALEM" |
| 39 | } |
| 40 | } |
36 | 41 | if {![info exists blas_arch]} { |
37 | 42 | #For older versions, we force native variant as there is no PPCG3 target in OpenBLAS |
38 | 43 | default_variants-append +native |
39 | 44 | } |
40 | | if {${build_arch} eq "arm64" } { |
41 | | #currently require native builds for Apple Silicon |
42 | | default_variants-append +native |
43 | | } |
44 | 45 | |
45 | 46 | subport OpenBLAS-devel {} |
46 | 47 | if {[string first "-devel" $subport] > 0} { |
… |
… |
pre-build { |
113 | 114 | puts $makeINC "CC = ${configure.cc}" |
114 | 115 | puts $makeINC "FC = ${configure.fc}" |
115 | 116 | |
116 | | if {${arch} eq "x86_64" || ${arch} eq "ppc64"} { |
| 117 | if {${arch} in [list arm64 ppc64 x86_64]} { |
117 | 118 | puts $makeINC "BINARY = 64" |
118 | 119 | } else { |
119 | 120 | puts $makeINC "BINARY = 32" |
… |
… |
pre-build { |
135 | 136 | } |
136 | 137 | } |
137 | 138 | |
138 | | if {${build_arch} eq "ppc" || ${build_arch} eq "ppc64"} { |
139 | | # on a PPC of some sort; just disable AVX |
| 139 | if {${build_arch} ni [list i386 x86_64]} { |
| 140 | # not on x86 of some sort; just disable AVX |
140 | 141 | puts $makeINC "NO_AVX = 1" |
141 | 142 | puts $makeINC "NO_AVX2 = 1" |
142 | 143 | puts $makeINC "NO_AVX512 = 1" |
… |
… |
pre-build { |
172 | 173 | puts $makeINC "CC = ${configure.cc}" |
173 | 174 | puts $makeINC "FC = ${configure.fc}" |
174 | 175 | |
175 | | if {${build_arch} eq "x86_64" || ${build_arch} eq "ppc64"} { |
| 176 | if {${build_arch} in [list arm64 ppc64 x86_64]} { |
176 | 177 | puts $makeINC "BINARY = 64" |
177 | 178 | } else { |
178 | 179 | puts $makeINC "BINARY = 32" |
… |
… |
pre-build { |
191 | 192 | } |
192 | 193 | |
193 | 194 | #Setting up build flags |
194 | | if {${build_arch} eq "ppc" || ${build_arch} eq "ppc64"} { |
195 | | # on a PPC of some sort; just disable AVX |
| 195 | if {${build_arch} ni [list i386 x86_64]} { |
| 196 | # not on x86 of some sort; just disable AVX |
196 | 197 | puts $makeINC "NO_AVX = 1" |
197 | 198 | puts $makeINC "NO_AVX2 = 1" |
198 | 199 | puts $makeINC "NO_AVX512 = 1" |