git: 454c8b425b28 - main - sysutils/fluent-bit: fix build on powerpc

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Tue, 16 Nov 2021 12:11:20 UTC
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=454c8b425b28bb2cece5c12ffffc87dffb6a6d06

commit 454c8b425b28bb2cece5c12ffffc87dffb6a6d06
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2021-11-16 12:04:08 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2021-11-16 12:04:08 +0000

    sysutils/fluent-bit: fix build on powerpc
    
    /usr/local/bin/ld: bss-plt forced due to ../lib/libluajit.a(lj_vm.o)
    /usr/local/bin/ld: ../library/libcmetrics.a(cmt_atomic_gcc.c.o): in function `cmt_atomic_compare_exchange':
    cmt_atomic_gcc.c:(.text+0x50): undefined reference to `__atomic_compare_exchange_8'
    /usr/local/bin/ld: ../library/libcmetrics.a(cmt_atomic_gcc.c.o): in function `cmt_atomic_store':
    cmt_atomic_gcc.c:(.text+0x8c): undefined reference to `__atomic_store_8'
    /usr/local/bin/ld: ../library/libcmetrics.a(cmt_atomic_gcc.c.o): in function `cmt_atomic_load':
    cmt_atomic_gcc.c:(.text+0xc8): undefined reference to `__atomic_load_8'
---
 sysutils/fluent-bit/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sysutils/fluent-bit/Makefile b/sysutils/fluent-bit/Makefile
index e810bc4ea752..47b4cb649c12 100644
--- a/sysutils/fluent-bit/Makefile
+++ b/sysutils/fluent-bit/Makefile
@@ -43,6 +43,7 @@ USE_RC_SUBR=	${PORTNAME}
 .if ${ARCH:Mpowerpc64*}
 CMAKE_ARGS+=	-DFLB_LUAJIT:BOOL=OFF
 .elif ${ARCH} == powerpc
+LDFLAGS+=	-latomic
 USES+=		compiler:gcc-c++11-lib
 .else
 USES+=		compiler:c11