Module Name: src
Committed By: riastradh
Date: Fri Nov 22 15:12:38 UTC 2024
Modified Files:
src/external/bsd/file/lib: Makefile
Log Message:
libmagic: Don't export libzstd symbols.
Fixes part of:
PR lib/58842: libmagic leaks private and zstd symbols
Prompted by work on:
PR lib/58838: shared libraries in base should all have expsym lists
To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/external/bsd/file/lib/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/file/lib/Makefile
diff -u src/external/bsd/file/lib/Makefile:1.19 src/external/bsd/file/lib/Makefile:1.20
--- src/external/bsd/file/lib/Makefile:1.19 Sat Nov 2 22:02:39 2024
+++ src/external/bsd/file/lib/Makefile Fri Nov 22 15:12:38 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2024/11/02 22:02:39 christos Exp $
+# $NetBSD: Makefile,v 1.20 2024/11/22 15:12:38 riastradh Exp $
#
USE_FORT?= yes # data driven bugs?
@@ -11,6 +11,12 @@ LIB= magic
LIBDPLIBS+= ${DPLIBS}
CPPFLAGS+=-I.
+# XXX Avoid exporting symbols of statically linked deps like zstd.
+# XXX Should do this in bsd.lib.mk, perhaps.
+.for _lib _dir in ${LIBDPLIBS}
+LDADD+= -Wl,--exclude-libs,lib${_lib}
+.endfor
+
.if ${MACHINE_ARCH} == "i386"
# Set lint to exit on warnings
# XXX: Soon