From b0eae7994f106dd8e1cb1a55651e518f194984ce Mon Sep 17 00:00:00 2001 From: jdp Date: Thu, 25 Jan 2001 18:57:13 +0000 Subject: Make the "-pthread" option work again, now that libc_r has to be linked in addition to libc rather than instead of libc. Ideally, "-pthread" would now be equivalent to adding "-lc_r" to the end of the link command. But it is slightly different in this implementation. Adding "-lc_r" to the link command would produce a "ld" command line containing this: ... -lc_r /usr/lib/libgcc.a -lc /usr/lib/libgcc.a ... but this implementation of the "-pthread" option produces this: ... /usr/lib/libgcc.a -lc_r -lc /usr/lib/libgcc.a ... It would be possible to make them identical, but that doesn't fit as nicely into GCC's way of doing things. I don't think the ordering change will make any difference in practice. --- contrib/gcc/config/freebsd.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'contrib/gcc/config') diff --git a/contrib/gcc/config/freebsd.h b/contrib/gcc/config/freebsd.h index 3cf3bad..2e52b9f 100644 --- a/contrib/gcc/config/freebsd.h +++ b/contrib/gcc/config/freebsd.h @@ -71,17 +71,14 @@ Boston, MA 02111-1307, USA. */ #define CPP_SPEC FBSD_CPP_SPEC /* Provide a LIB_SPEC appropriate for FreeBSD. Just select the appropriate - libc, depending on whether we're doing profiling. + libc, depending on whether we're doing profiling. Add the appropriate + libc_r if supporting threads. (like the default, except no -lg, and no -p). */ #undef LIB_SPEC #define LIB_SPEC "\ %{!shared: \ - %{!pg: \ - %{!pthread:-lc} \ - %{pthread:-lc_r}} \ - %{pg: \ - %{!pthread:-lc_p} \ - %{pthread:-lc_r_p}} \ + %{!pg: %{pthread:-lc_r} -lc} \ + %{pg: %{pthread:-lc_r_p} -lc_p} \ }" -- cgit v1.1