diff options
author | jdp <jdp@FreeBSD.org> | 2001-01-25 18:57:13 +0000 |
---|---|---|
committer | jdp <jdp@FreeBSD.org> | 2001-01-25 18:57:13 +0000 |
commit | b0eae7994f106dd8e1cb1a55651e518f194984ce (patch) | |
tree | 5d743b6675b365385cafcd1b1fe64c1ea91066e4 /contrib | |
parent | 3b449212d5650d9047f8dabcb8484262a80ab8c8 (diff) | |
download | FreeBSD-src-b0eae7994f106dd8e1cb1a55651e518f194984ce.zip FreeBSD-src-b0eae7994f106dd8e1cb1a55651e518f194984ce.tar.gz |
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.
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/gcc/config/freebsd.h | 11 |
1 files changed, 4 insertions, 7 deletions
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} \ }" |