On 05.01.2016 14:07, Christos Zoulas wrote: > Module Name: src > Committed By: christos > Date: Tue Jan 5 13:07:47 UTC 2016 > > Modified Files: > src/external/bsd/blacklist/lib: Makefile > src/external/bsd/elftoolchain/lib/libdwarf: Makefile > src/external/bsd/fetch/lib: Makefile > src/external/bsd/libc++/lib: Makefile > src/external/gpl2/lvm2/lib/liblvm: Makefile > src/external/gpl3/gcc.old/lib/libtsan: Makefile > src/external/gpl3/gcc/lib/libtsan: Makefile > src/external/mit/xorg/lib/libfontenc: Makefile > src/external/mit/xorg/lib/libglut: Makefile > src/external/mit/xorg/lib/libpciaccess: Makefile > src/external/public-domain/xz/lib: Makefile > src/lib/libnpf: Makefile > src/sys/rump/kern/lib/libsljit: Makefile > > Log Message: > - Change LDADD/DPADD in library dependencies to LIBDPLIBS > - Fix some LDADD abuse and remove useless dependencies > - include <bsd.init.mk> in the right place where appropriate > From Rin Okuyama > In this commit: > Index: src/external/bsd/libc++/lib/Makefile > diff -u src/external/bsd/libc++/lib/Makefile:1.7 src/external/bsd/libc++/lib/Makefile:1.8 > --- src/external/bsd/libc++/lib/Makefile:1.7 Wed Aug 20 11:19:39 2014 > +++ src/external/bsd/libc++/lib/Makefile Tue Jan 5 08:07:46 2016 > @@ -1,4 +1,4 @@ > -# $NetBSD: Makefile,v 1.7 2014/08/20 15:19:39 joerg Exp $ > +# $NetBSD: Makefile,v 1.8 2016/01/05 13:07:46 christos Exp $ > > LIB= c++ > WARNS= 4 > @@ -44,6 +44,6 @@ CWARNFLAGS.clang+= -Wno-error=missing-pr > CWARNFLAGS.clang+= -Wno-error=missing-field-initializers -Wno-error=switch > CWARNFLAGS.clang+= -Wno-error=implicit-exception-spec-mismatch > > -LDADD+= -Wl,-z,defs > +LDFLAGS+= -Wl,-z,defs > > .include <bsd.lib.mk> > I know that this -z defs was added by Joerg earlier, but what's the purpose of it? Do we really need it? Can we drop it? It breaks building libc++ with sanitizers. This flag is explicitly adviced against being used at least for ASan and MSan (and certainly others): When linking shared libraries, the AddressSanitizer run-time is not linked, so -Wl,-z,defs may cause link errors (don’t use it with AddressSanitizer). https://clang.llvm.org/docs/AddressSanitizer.html When linking shared libraries, the MemorySanitizer run-time is not linked, so -Wl,-z,defs may cause link errors (don’t use it with MemorySanitizer). https://clang.llvm.org/docs/MemorySanitizer.html Removal of this -Wl,-z,defs, allows us to build libcxx under MSan.
Attachment:
signature.asc
Description: OpenPGP digital signature