Skip to content
Permalink
Browse files

OpenBLAS: enable build on Apple i386

  • Loading branch information
kencu committed Apr 13, 2019
1 parent 9444d21 commit bd10d11a93fdd3e94d2e34b5dbe6860b7de0ad4e
Showing with 27 additions and 2 deletions.
  1. +4 −2 math/OpenBLAS/Portfile
  2. +23 −0 math/OpenBLAS/files/patch-OpenBLAS-i386-Apple.diff
@@ -41,7 +41,8 @@ if {[string first "-devel" $subport] > 0} {
conflicts OpenBLAS

patchfiles patch-libnoarch.devel.diff \
patch-linkLib.devel.diff
patch-linkLib.devel.diff \
patch-OpenBLAS-i386-Apple.diff

github.livecheck.branch develop

@@ -57,7 +58,8 @@ if {[string first "-devel" $subport] > 0} {
patchfiles patch-libnoarch.release.diff \
patch-linkLib.release.diff \
patch-darwin-powerpc.diff \
patch-openblas-powermac970-fix.diff
patch-openblas-powermac970-fix.diff \
patch-OpenBLAS-i386-Apple.diff
}

compilers.choose fc
@@ -0,0 +1,23 @@
diff --git cpuid_x86.c cpuid_x86.c
index eb986b6..c5c02f5 100644
--- cpuid_x86.c
+++ cpuid_x86.c
@@ -87,10 +87,6 @@ void cpuid_count(int op, int count, int *eax, int *ebx, int *ecx, int *edx)

#ifndef CPUIDEMU

-#if defined(__APPLE__) && defined(__i386__)
-void cpuid(int op, int *eax, int *ebx, int *ecx, int *edx);
-void cpuid_count(int op, int count, int *eax, int *ebx, int *ecx, int *edx);
-#else
static C_INLINE void cpuid(int op, int *eax, int *ebx, int *ecx, int *edx){
#if defined(__i386__) && defined(__PIC__)
__asm__ __volatile__
@@ -116,7 +112,6 @@ static C_INLINE void cpuid_count(int op, int count ,int *eax, int *ebx, int *ecx
("cpuid": "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx) : "0" (op), "2" (count) : "cc");
#endif
}
-#endif

#else

0 comments on commit bd10d11

Please sign in to comment.
You can’t perform that action at this time.