diff options
author | obrien <obrien@FreeBSD.org> | 2001-05-12 04:57:49 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2001-05-12 04:57:49 +0000 |
commit | a7ff9d32492a0e8057063d126015ca0d7aac5179 (patch) | |
tree | 9def6b3fe94a21a8b2461fb61e2abdcd2b1b3f9f /contrib/gcc/config | |
parent | c816adba95ee5640776d78f7bdb7f999c5976022 (diff) | |
download | FreeBSD-src-a7ff9d32492a0e8057063d126015ca0d7aac5179.zip FreeBSD-src-a7ff9d32492a0e8057063d126015ca0d7aac5179.tar.gz |
Choose the right LIB_SPEC for threads based on "__FreeBSD_version".
This allows someone with an older -current to update their compiler [only].
Inspired by: Loren James Rittle <rittle@rsch.comm.mot.com>
Diffstat (limited to 'contrib/gcc/config')
-rw-r--r-- | contrib/gcc/config/freebsd.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/contrib/gcc/config/freebsd.h b/contrib/gcc/config/freebsd.h index f52cca2..13a099d 100644 --- a/contrib/gcc/config/freebsd.h +++ b/contrib/gcc/config/freebsd.h @@ -73,16 +73,32 @@ Boston, MA 02111-1307, USA. */ #undef CPP_SPEC #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 or need threads support. - (simular to the default, except no -lg, and no -p). */ +/* Provide a LIB_SPEC appropriate for FreeBSD. Before + __FreeBSD_version 500016, select the appropriate libc, depending on + whether we're doing profiling or need threads support. (similar to + the default, except no -lg, and no -p). At __FreeBSD_version + 500016 and later, when threads support is requested include both + -lc and -lc_r instead of only -lc_r. */ #undef LIB_SPEC +#include <sys/param.h> +#if __FreeBSD_version >= 500016 #define LIB_SPEC " \ %{!shared: \ %{!pg: %{pthread:-lc_r} -lc} \ %{pg: %{pthread:-lc_r_p} -lc_p} \ }" +#else +#define LIB_SPEC " \ + %{!shared: \ + %{!pg: \ + %{!pthread:-lc} \ + %{pthread:-lc_r}} \ + %{pg: \ + %{!pthread:-lc_p} \ + %{pthread:-lc_r_p}} \ + }" +#endif /************************[ Target stuff ]***********************************/ |