summaryrefslogtreecommitdiff
path: root/lib/libc/Makefile
diff options
context:
space:
mode:
authorMatthew Dempsky <matthew@cvs.openbsd.org>2012-08-15 18:08:23 +0000
committerMatthew Dempsky <matthew@cvs.openbsd.org>2012-08-15 18:08:23 +0000
commita674a01d727c6ad840cd1284e1bcb9217a93823f (patch)
tree5c99dd5efd60f2c64f8e6117f6676ccc30e14bed /lib/libc/Makefile
parent2d83e16befda8ed92a0b0f464fca548fa1e0747c (diff)
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/libc/Makefile')
-rw-r--r--lib/libc/Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/Makefile b/lib/libc/Makefile
index 54746afbaae..dda879185c7 100644
--- a/lib/libc/Makefile
+++ b/lib/libc/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.30 2012/08/02 13:38:38 okan Exp $
+# $OpenBSD: Makefile,v 1.31 2012/08/15 18:08:22 matthew Exp $
#
# The NLS (message catalog) functions are always in libc. To choose that
# strerror(), perror(), strsignal(), psignal(), etc. actually call the NLS
@@ -12,6 +12,7 @@
LIB=c
CLEANFILES+=tags
#CFLAGS+=-Werror
+LDADD=-nodefaultlibs -lgcc
LIBCSRCDIR=${.CURDIR}
.include "${LIBCSRCDIR}/Makefile.inc"