textproc/difftastic: fix build on powerpc

= note: ld: error: undefined symbol: __atomic_fetch_add_8
>>> referenced by static.c
>>>               static.o:(mi_stat_update) in archive /wrkdirs/usr/ports/textproc/difftastic/work/rustc5gqLZw/liblibmimalloc_sys-3697f752fef9d30f.rlib
>>> referenced by static.c
>>>               static.o:(mi_stat_update) in archive /wrkdirs/usr/ports/textproc/difftastic/work/rustc5gqLZw/liblibmimalloc_sys-3697f752fef9d30f.rlib
>>> referenced by static.c
>>>               static.o:(mi_stats_merge_from) in archive /wrkdirs/usr/ports/textproc/difftastic/work/rustc5gqLZw/liblibmimalloc_sys-3697f752fef9d30f.rlib
>>> referenced 75 more times
ld: error: undefined symbol: __atomic_load_8
>>> referenced by static.c
>>>               static.o:(mi_stat_update) in archive /wrkdirs/usr/ports/textproc/difftastic/work/rustc5gqLZw/liblibmimalloc_sys-3697f752fef9d30f.rlib
>>> referenced by static.c
>>>               static.o:(_mi_stats_print) in archive /wrkdirs/usr/ports/textproc/difftastic/work/rustc5gqLZw/liblibmimalloc_sys-3697f752fef9d30f.rlib
>>> referenced by static.c
>>>               static.o:(_mi_stats_print) in archive /wrkdirs/usr/ports/textproc/difftastic/work/rustc5gqLZw/liblibmimalloc_sys-3697f752fef9d30f.rlib
ld: error: undefined symbol: __atomic_compare_exchange_8
>>> referenced by static.c
>>>               static.o:(mi_stat_update) in archive /wrkdirs/usr/ports/textproc/difftastic/work/rustc5gqLZw/liblibmimalloc_sys-3697f752fef9d30f.rlib
cc: error: linker command failed with exit code 1 (use -v to see invocation)
This commit is contained in:
Piotr Kubaj 2022-12-01 22:57:57 +00:00
parent 6609a596db
commit b5d76553f1

View file

@ -109,6 +109,13 @@ PORTDOCS= *
OPTIONS_DEFINE= DOCS
.include <bsd.port.options.mk>
.if ${ARCH} == powerpc
LIB_DEPENDS+= libatomic.so:lang/gcc${GCC_DEFAULT}
LDFLAGS+= -L/usr/local/lib/gcc${GCC_DEFAULT} -latomic
.endif
post-install:
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/difft