Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Dec 2024 17:34:12 GMT
From:      Piotr Kubaj <pkubaj@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 440dfcc986d1 - main - biology/seqwish: disable march=native, fixing build on non-x86
Message-ID:  <202412111734.4BBHYCEP029299@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=440dfcc986d1b3e205cfc758956a646f1719eeca

commit 440dfcc986d1b3e205cfc758956a646f1719eeca
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2024-12-11 13:37:31 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2024-12-11 17:29:07 +0000

    biology/seqwish: disable march=native, fixing build on non-x86
    
    Contrary to the removed comment, it doesn't break compilation, tested on amd64.
---
 biology/seqwish/Makefile                           |  3 ++-
 .../seqwish/files/patch-deps_paryfor_paryfor.hpp   | 25 ++++++++++++++++++++++
 2 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/biology/seqwish/Makefile b/biology/seqwish/Makefile
index a00135305a4b..0bbf8c64b169 100644
--- a/biology/seqwish/Makefile
+++ b/biology/seqwish/Makefile
@@ -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}
 
diff --git a/biology/seqwish/files/patch-deps_paryfor_paryfor.hpp b/biology/seqwish/files/patch-deps_paryfor_paryfor.hpp
new file mode 100644
index 000000000000..c8a0fc7b928d
--- /dev/null
+++ b/biology/seqwish/files/patch-deps_paryfor_paryfor.hpp
@@ -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
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202412111734.4BBHYCEP029299>