Hi!

NBlood being based on EDuke32, i've spotted the same atomics issue
later during the current bulk:

> enet.cpp:(.text+0x2e20): undefined reference to `__atomic_load_8'
> enet.cpp:(.text+0x2e98): undefined reference to `__atomic_compare_exchange_8'

It builds fine [0] on powerpc once proper LDFLAGS are added. REVISION
bump is not needed: that new version never built on powerpc.

OK? 

Charlène.


[0] https://bin.charlenew.xyz/eduke32.log


Index: Makefile
===================================================================
RCS file: /cvs/ports/games/eduke32/Makefile,v
retrieving revision 1.24
diff -u -p -u -p -r1.24 Makefile
--- Makefile    4 Jan 2020 05:44:39 -0000       1.24
+++ Makefile    25 Jan 2020 22:56:41 -0000
@@ -60,6 +60,12 @@ WRKDIST =    ${WRKDIR}/eduke32_${RDATE}-${R
 MAKE_FLAGS +=  LTO=0
 .endif
 
+# Fix "undefined reference to `__atomic_load_8'"
+.if ${MACHINE_ARCH:Mpowerpc} || ${MACHINE_ARCH:Mhppa}
+WANTLIB +=     atomic
+MAKE_FLAGS +=  LDFLAGS="${LDFLAGS} -latomic"
+.endif
+
 post-extract:
        # check for data files in correct location
        @sed -i "s,/usr/share/games/eduke32,${TRUEPREFIX}/share/duke3d," \

Reply via email to