aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuhammad Moinur Rahman <bofh@FreeBSD.org>2023-12-30 05:52:53 +0000
committerMuhammad Moinur Rahman <bofh@FreeBSD.org>2023-12-30 07:16:43 +0000
commit637ee716d9ee3d36fbd6c4944a937806cd1b4608 (patch)
tree399a63a7e2eb5a9a45e8f4d84d3abd6802553b2f
parent58b1b5c9820d58b30e95a202907af5623f74ee07 (diff)
downloadports-637ee716d9ee3d36fbd6c4944a937806cd1b4608.tar.gz
ports-637ee716d9ee3d36fbd6c4944a937806cd1b4608.zip
net/samba416: Fix build with lld 17
Building net/samba416 with lld 17 results in the following link errors: runner ['cc', '-Wl,--as-needed', '-Wl,--version-script=/wrkdirs/share/dim/ports/net/samba413/work/samba-4.13.17/bin/default/lib/replace/replace.vscript', '-shared', 'lib/replace/replace.c.2.o', 'lib/replace/strptime.c.2.o', 'lib/replace/cwrap.c.2.o', 'lib/replace/xattr.c.2.o', '-o/wrkdirs/share/dim/ports/net/samba413/work/samba-4.13.17/bin/default/lib/replace/libreplace-samba4.so', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-L/usr/local/lib', '-L/usr/local/lib', '-fstack-protector-strong', '-L/usr/local/lib', '-Wl,-z,relro,-z,now', '-Wl,-no-undefined', '-Wl,--export-dynamic'] 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) Since the linker version scripts are generated dynamically, suppress errors with lld >= 17 due to these undefined symbols. Same patch from 8bc0f1e by dim@ to unbreak build on FreeBSD 15. This is required as the DEFAULT version of sambe is being switched. Approved by: portmgr (blanket)
-rw-r--r--net/samba416/Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/samba416/Makefile b/net/samba416/Makefile
index 91962ceac147..3509bbf20e90 100644
--- a/net/samba416/Makefile
+++ b/net/samba416/Makefile
@@ -558,6 +558,10 @@ MAKE_ENV+= RPCGEN_CPP="${CPP}"
#.if ${readline_ARGS} == port
#CFLAGS+= -D_FUNCTION_DEF
#.endif
+# Some symbols in samba'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
SAMBA4_SUB= SAMBA4_LOGDIR="${SAMBA4_LOGDIR}" \
SAMBA4_RUNDIR="${SAMBA4_RUNDIR}" \