Skip to content

Commit

Permalink
devel/talloc: fix build with lld 17
Browse files Browse the repository at this point in the history
Building devel/talloc with lld 17 results in the following link error:

  08:58:52 runner ['cc', '-Wl,--version-script=/wrkdirs/usr/ports/devel/talloc/work/talloc-2.3.4/bin/default/talloc.vscript', '-shared', '-Wl,-h,libtalloc.so.2', 'talloc.c.6.o', 'lib/replace/replace.c.2.o', 'lib/replace/strptime.c.2.o', 'lib/replace/xattr.c.2.o', '-o/wrkdirs/usr/ports/devel/talloc/work/talloc-2.3.4/bin/default/libtalloc.so', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-fstack-protector-strong', '-Wl,-no-undefined']
  ld: error: version script assignment of 'local' to symbol '_end' failed: symbol not defined
  ld: error: version script assignment of 'local' to symbol '__bss_start' failed: symbol not defined
  ld: error: version script assignment of 'local' to symbol '_edata' failed: symbol not defined
  cc: error: linker command failed with exit code 1 (use -v to see invocation)
  script file to fix the error.

Since the linker version scripts are generated dynamically, suppress
errors with lld >= 17 due to these undefined symbols.

PR:		274000
Approved by:	maintainer timeout (2 weeks)
MFH:		2023Q4
  • Loading branch information
DimitryAndric committed Oct 6, 2023
1 parent 1a59d78 commit 641e12a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions devel/talloc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ CFLAGS+= ${CFLAGS_${CHOSEN_COMPILER_TYPE}}
CFLAGS_clang= -fno-color-diagnostics
CONFIGURE_ENV+= NOCOLOR=yes
MAKE_ENV+= NOCOLOR=yes
# Some symbols in talloc's linker version scripts are not defined, but since the
# scripts are generated dynamically, suppress errors with lld >= 17 due to these
# undefined symbols.
LDFLAGS+= -Wl,--undefined-version

post-patch:
@${REINPLACE_CMD} -e 's|%%PKGCONFIGDIR%%|${PKGCONFIGDIR}|g' \
Expand Down

0 comments on commit 641e12a

Please sign in to comment.