summaryrefslogtreecommitdiffstats
path: root/lib/librthread
diff options
context:
space:
mode:
authormatthew <matthew@openbsd.org>2012-08-15 18:08:22 +0000
committermatthew <matthew@openbsd.org>2012-08-15 18:08:22 +0000
commit6b29d47733811d30d045bb770f5a57f121cb0ffe (patch)
tree2c6bc1839092b7023d6d83c7d317109616d1f476 /lib/librthread
parent- remove some redundancy within the sendmail text (diff)
downloadwireguard-openbsd-6b29d47733811d30d045bb770f5a57f121cb0ffe.tar.xz
wireguard-openbsd-6b29d47733811d30d045bb770f5a57f121cb0ffe.zip
A couple small but long anticipated changes:
- Link libpthread.so with -znodlopen. Because libpthread overrides the weak symbols in libc, we can't allow it to be dynamically loaded or else libc's weak symbols might have already been resolved by ld.so. (Also, major bump because this is technically a backwards incompat change in behavior, although dlopen()ing libpthread never really worked.) - Link libc.so with -nodefaultlibs -lgcc. This ensures that libc doesn't try to link against itself (which ld.so wouldn't like). - Change GCC 4 to link shared objects with -lpthread and -lc as appropriate, now that there's no issues with doing so. This means that it's no longer necessary to patch software to use -pthread instead of -lpthread. (Ports tree rejoice!) Also, to preemptively answer this question: No, this does not eliminate the need for LD_PRELOAD=libpthread.so. That's a separate issue that won't be resolved until we eliminate libc's weak symbols. Discussed extensively on email and icb over the past few months. ok deraadt
Diffstat (limited to 'lib/librthread')
-rw-r--r--lib/librthread/Makefile4
-rw-r--r--lib/librthread/shlib_version2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/librthread/Makefile b/lib/librthread/Makefile
index aa9be7bab36..f81484f838a 100644
--- a/lib/librthread/Makefile
+++ b/lib/librthread/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.31 2012/08/02 13:38:39 okan Exp $
+# $OpenBSD: Makefile,v 1.32 2012/08/15 18:08:22 matthew Exp $
# For ``COMPILER_VERSION''
.include <bsd.own.mk>
@@ -13,7 +13,7 @@ CFLAGS+=-Wmissing-prototypes
CFLAGS+=-Wstrict-prototypes
CFLAGS+=-Wsign-compare
CFLAGS+=-I${LIBCSRCDIR}/arch/${MACHINE_CPU} -I${LIBCSRCDIR}/include
-LDADD = -Wl,-znodelete,-zinitfirst
+LDADD = -Wl,-znodelete,-zinitfirst,-znodlopen
.PATH: ${.CURDIR}/arch/${MACHINE_CPU}
SRCS= rthread.c \
diff --git a/lib/librthread/shlib_version b/lib/librthread/shlib_version
index 84e2c2920d7..ffdd3d2d569 100644
--- a/lib/librthread/shlib_version
+++ b/lib/librthread/shlib_version
@@ -1,2 +1,2 @@
-major=16
+major=17
minor=0