Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl3/gcc/dist/gcc/config Libtsan intercepts the pth...
details: https://anonhg.NetBSD.org/src/rev/fa9a9a4b6be2
branches: trunk
changeset: 1024828:fa9a9a4b6be2
user: hannken <hannken%NetBSD.org@localhost>
date: Sun Nov 07 09:22:58 2021 +0000
description:
Libtsan intercepts the pthread exported functions with
dlsym(RTLD_NEXT, func_name). This fails for pthread_join() as it
is present both as a stub in libc and as real operation in libpthread
and the search order is "libtsan.so libc.so libpthread.so".
Force the order "libtsan.so libpthread.so libc.so" so symbols
get intercepted from libpthread first.
Ok: Matthew Green <mrg%netbsd.org@localhost>
diffstat:
external/gpl3/gcc/dist/gcc/config/netbsd.h | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diffs (13 lines):
diff -r c398824f7c0e -r fa9a9a4b6be2 external/gpl3/gcc/dist/gcc/config/netbsd.h
--- a/external/gpl3/gcc/dist/gcc/config/netbsd.h Sun Nov 07 08:41:13 2021 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/netbsd.h Sun Nov 07 09:22:58 2021 +0000
@@ -203,3 +203,9 @@
do { \
netbsd_patch_builtins (); \
} while(0)
+
+#if defined(HAVE_LD_STATIC_DYNAMIC)
+#undef LIBTSAN_EARLY_SPEC
+#define LIBTSAN_EARLY_SPEC "%{static-libtsan:" LD_STATIC_OPTION "}" \
+ " -ltsan %{static-libtsan:" LD_DYNAMIC_OPTION "} -lpthread"
+#endif
Home |
Main Index |
Thread Index |
Old Index