git: 071c6bdd226b - main - math/oink: fix build on powerpc*
Piotr Kubaj
pkubaj at FreeBSD.org
Tue Jul 13 09:28:08 UTC 2021
The branch main has been updated by pkubaj:
URL: https://cgit.FreeBSD.org/ports/commit/?id=071c6bdd226bfa35ee38c24b9a9216562b8ac81f
commit 071c6bdd226bfa35ee38c24b9a9216562b8ac81f
Author: Piotr Kubaj <pkubaj at FreeBSD.org>
AuthorDate: 2021-07-13 09:26:23 +0000
Commit: Piotr Kubaj <pkubaj at FreeBSD.org>
CommitDate: 2021-07-13 09:26:23 +0000
math/oink: fix build on powerpc*
/wrkdirs/usr/ports/math/oink/work/oink-c1259fe/src/lace.c:973:9: error: invalid instruction
mfence();
^
/wrkdirs/usr/ports/math/oink/work/oink-c1259fe/src/lace.h:296:33: note: expanded from macro 'mfence'
^
<inline asm>:1:2: note: instantiated into assembly here
mfence
---
math/oink/files/patch-src_lace.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/math/oink/files/patch-src_lace.h b/math/oink/files/patch-src_lace.h
new file mode 100644
index 000000000000..86d901ac1df4
--- /dev/null
+++ b/math/oink/files/patch-src_lace.h
@@ -0,0 +1,14 @@
+--- src/lace.h.orig 2021-07-12 11:27:04 UTC
++++ src/lace.h
+@@ -293,7 +293,11 @@ void lace_yield(WorkerP *__lace_worker, Task *__lace_d
+ #endif
+
+ #ifndef mfence
++#ifdef __amd64__
+ #define mfence() { asm volatile("mfence" ::: "memory"); }
++#elif defined(__powerpc__)
++#define mfence() { asm volatile("sync" ::: "memory"); }
++#endif
+ #endif
+
+ /* Compiler specific branch prediction optimization */
More information about the dev-commits-ports-all
mailing list