On Mon, 7 Oct 2019 15:50:14 -0000 (UTC) Christian Weisgerber wrote: > On 2019-10-06, Charlene Wendling <juliana...@posteo.jp> wrote: > > > Upstream introduced since 1.1.4 a cmake flag allowing the use of > > __atomic* functions instead of unsupported __sync* ones. > > > > Once provided, it builds fine on macppc [0]. I have not bumped > > REVISION, it never had a package built before that. > > I admit I haven't followed the subject of __atomic* at all. > What's the reason to enable the use of these primitives only for > powerpc/hppa and not on all archs?
GCC has no 64-bits __sync* operators support on macppc and hppa, the newer __atomic* ones have it. We sure can enable __atomic* for all archs, it works at least on amd64, but may break somewhere else - upstream's intention was to provide a workaround [0]. I'm joining an alternate diff that i tried on amd64. Charlène. > -- > Christian "naddy" Weisgerber > na...@mips.inka.de > [0] https://github.com/pavel-odintsov/fastnetmon/issues/703#issuecomment-362906382 Index: Makefile =================================================================== RCS file: /cvs/ports/net/fastnetmon/Makefile,v retrieving revision 1.6 diff -u -p -r1.6 Makefile --- Makefile 12 Jul 2019 20:48:26 -0000 1.6 +++ Makefile 7 Oct 2019 23:32:06 -0000 @@ -5,6 +5,7 @@ COMMENT = DDoS detector with multiple p GH_ACCOUNT = pavel-odintsov GH_PROJECT = fastnetmon GH_TAGNAME = v1.1.4 +REVISION = 0 HOMEPAGE = https://fastnetmon.com/guides/ @@ -35,6 +36,13 @@ CONFIGURE_ARGS += -DENABLE_LUA_SUPPORT=O -DLOG4CPP_INCLUDES_FOLDER="${LOCALBASE}/include/log4cpp" \ -DJSONC_INCLUDES_FOLDER="${LOCALBASE}/include/json-c" \ -DHIREDIS_INCLUDES_FOLDER="${LOCALBASE}/include/hiredis" + +# Use __atomic* function instead of __sync* ones, allowing to build on +# the following archs. +CONFIGURE_ARGS += -DUSE_NEW_ATOMIC_BUILTINS=On +.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "hppa" +WANTLIB += atomic +.endif WRKSRC = ${WRKDIST}/src