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
This commit is contained in:
parent
3ed820108d
commit
071c6bdd22
1 changed files with 14 additions and 0 deletions
14
math/oink/files/patch-src_lace.h
Normal file
14
math/oink/files/patch-src_lace.h
Normal file
|
@ -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 */
|
Loading…
Reference in a new issue