From 295c9c071316f3b80d04d39748c038615efebb10 Mon Sep 17 00:00:00 2001 From: Simon Schubert Date: Tue, 17 Apr 2007 12:18:37 +0000 Subject: [PATCH] Change the compilers to alias -pthread to -lpthread. Now threaded programs do not get linked to libc_r anymore, but to the proxy lib libpthread. As soon as all programs and libraries are relinked to use libpthread exclusively (and not libc_r.so anymore), threading libs can be switched by changing the /usr/lib/libpthread.so.0 symlink. Use the following command to find all packages still linking to libc_r: find /usr/pkg/bin /usr/pkg/sbin /usr/pkg/lib /usr/pkg/libexec -type f \ -exec sh -c '\ objdump -p $0 2>/dev/null | grep -q "NEEDED.*libc_r\.so" || exit 0; \ pkg_info -F -e $0' {} \; | sort | uniq --- gnu/usr.bin/cc34/cc_prep/config/dragonfly-spec.h | 4 ++-- gnu/usr.bin/cc41/cc_prep/config/dragonfly-spec.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gnu/usr.bin/cc34/cc_prep/config/dragonfly-spec.h b/gnu/usr.bin/cc34/cc_prep/config/dragonfly-spec.h index 02fde8befe..b49eae1c4f 100644 --- a/gnu/usr.bin/cc34/cc_prep/config/dragonfly-spec.h +++ b/gnu/usr.bin/cc34/cc_prep/config/dragonfly-spec.h @@ -1,4 +1,4 @@ -/* $DragonFly: src/gnu/usr.bin/cc34/cc_prep/config/dragonfly-spec.h,v 1.12 2007/01/15 18:01:44 corecode Exp $ */ +/* $DragonFly: src/gnu/usr.bin/cc34/cc_prep/config/dragonfly-spec.h,v 1.13 2007/04/17 12:18:37 corecode Exp $ */ /* Base configuration file for all DragonFly targets. Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. @@ -126,7 +126,7 @@ is built with the --enable-threads configure-time option.} \ }" #else #define DFBSD_LIB_SPEC " \ - %{!shared: %{pthread:-lc_r}} \ + %{!shared: %{pthread:-lpthread}} \ %{!nostdlib: %{!nostartfiles: %{!nolibc: -lc}}} \ " #endif diff --git a/gnu/usr.bin/cc41/cc_prep/config/dragonfly-spec.h b/gnu/usr.bin/cc41/cc_prep/config/dragonfly-spec.h index 9a2590b32b..56968bf230 100644 --- a/gnu/usr.bin/cc41/cc_prep/config/dragonfly-spec.h +++ b/gnu/usr.bin/cc41/cc_prep/config/dragonfly-spec.h @@ -1,4 +1,4 @@ -/* $DragonFly: src/gnu/usr.bin/cc41/cc_prep/config/dragonfly-spec.h,v 1.3 2007/01/15 18:01:44 corecode Exp $ */ +/* $DragonFly: src/gnu/usr.bin/cc41/cc_prep/config/dragonfly-spec.h,v 1.4 2007/04/17 12:18:37 corecode Exp $ */ /* Base configuration file for all DragonFly targets. Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. @@ -125,7 +125,7 @@ is built with the --enable-threads configure-time option.} \ }" #else #define DFBSD_LIB_SPEC " \ - %{!shared: %{pthread:-lc_r}} \ + %{!shared: %{pthread:-lpthread}} \ %{!nostdlib: %{!nostartfiles: %{!nolibc: -lc}}} \ " #endif -- 2.11.4.GIT