Skip to content

Commit

Permalink
textproc/difftastic: fix build on powerpc
Browse files Browse the repository at this point in the history
= 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)
  • Loading branch information
pkubaj committed Dec 1, 2022
1 parent 6609a59 commit b5d7655
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions textproc/difftastic/Makefile
Expand Up @@ -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

Expand Down

0 comments on commit b5d7655

Please sign in to comment.