1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-09 06:51:44 +00:00

biology/seqwish: disable march=native, fixing build on non-x86

Contrary to the removed comment, it doesn't break compilation, tested on amd64.
This commit is contained in:
Piotr Kubaj 2024-12-11 14:37:31 +01:00
parent f26a053fe0
commit 440dfcc986
2 changed files with 27 additions and 1 deletions

View File

@ -1,6 +1,7 @@
PORTNAME= seqwish
DISTVERSIONPREFIX= v
DISTVERSION= 0.7.11
PORTREVISION= 1
CATEGORIES= biology
MASTER_SITES= https://github.com/ekg/seqwish/releases/download/v${DISTVERSION}/
@ -16,7 +17,7 @@ BROKEN_i386= compilation fails: error: use of undeclared identifier '_pdep_u64'
USES= cmake:noninja compiler:c++14-lang
#CMAKE_ARGS= -DEXTRA_FLAGS="" # disable -march=native ; this causes the link failure: undefined symbol: __sync_val_compare_and_swap_16, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274927
CMAKE_ARGS= -DEXTRA_FLAGS="" # disable -march=native
PLIST_FILES= bin/${PORTNAME}

View File

@ -0,0 +1,25 @@
--- deps/paryfor/paryfor.hpp.orig 2024-10-15 18:25:21 UTC
+++ deps/paryfor/paryfor.hpp
@@ -51,7 +51,22 @@ static inline void spin_loop_pause() noexcept {
}
} // namespace atomic_queue
} // namespace paryfor
+#elif defined(__ppc64__) || defined(__powerpc64__)
+namespace paryfor {
+namespace atomic_queue {
+constexpr int CACHE_LINE_SIZE = 128; // TODO: Review that this is the correct value.
+static inline void spin_loop_pause() noexcept {
+ asm volatile("or 31,31,31 # very low priority"); // TODO: Review and benchmark that this is the right instruction.
+}
+} // namespace atomic_queue
+} // namespace paryfor
#else
+namespace paryfor {
+namespace atomic_queue {
+constexpr int CACHE_LINE_SIZE = 64; // TODO: Review that this is the correct value.
+static inline void spin_loop_pause() noexcept {}
+} // namespace atomic_queue
+} // namespace paryfor
#error "Unknown CPU architecture."
#endif