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>
This commit is contained in:
parent
b76289c1fe
commit
d93226a983
@ -73,16 +73,32 @@ Boston, MA 02111-1307, USA. */
|
|||||||
#undef CPP_SPEC
|
#undef CPP_SPEC
|
||||||
#define CPP_SPEC FBSD_CPP_SPEC
|
#define CPP_SPEC FBSD_CPP_SPEC
|
||||||
|
|
||||||
/* Provide a LIB_SPEC appropriate for FreeBSD. Just select the appropriate
|
/* Provide a LIB_SPEC appropriate for FreeBSD. Before
|
||||||
libc, depending on whether we're doing profiling or need threads support.
|
__FreeBSD_version 500016, select the appropriate libc, depending on
|
||||||
(simular to the default, except no -lg, and no -p). */
|
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
|
#undef LIB_SPEC
|
||||||
|
#include <sys/param.h>
|
||||||
|
#if __FreeBSD_version >= 500016
|
||||||
#define LIB_SPEC " \
|
#define LIB_SPEC " \
|
||||||
%{!shared: \
|
%{!shared: \
|
||||||
%{!pg: %{pthread:-lc_r} -lc} \
|
%{!pg: %{pthread:-lc_r} -lc} \
|
||||||
%{pg: %{pthread:-lc_r_p} -lc_p} \
|
%{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 ]***********************************/
|
/************************[ Target stuff ]***********************************/
|
||||||
|
Loading…
Reference in New Issue
Block a user