This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] mips*-linux: Always imply -lpthread for -pthread
- From: Nick Clifton <nickc at redhat dot com>
- To: Thiemo Seufer <ths at networkno dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 19 Jun 2007 11:36:13 +0100
- Subject: Re: [PATCH] mips*-linux: Always imply -lpthread for -pthread
- References: <20070613195442.GD8584@networkno.de>
Hi Thiemo,
The appended patch changes LIB_SPEC for mips*-linux systems to always
imply -lpthread when the -pthread argument is given. A similiar change
was done over the last years for most other architectures.
(I notice the m32r linux has the same problem, I left it alone because
I'm not sure what the intended effect of the "#undef LIB_SPEC" in
config/m32r/m32r.h is.)
If I remember correctly this was because the definition of LIB_SPEC in
svr4.h brings in -lc and Mitshubishi at the time wanted to have a
toolchain which did not need a C library at all.
2007-06-13 Thiemo Seufer <ths@networkno.de>
* config/mips/linux.h, config/mips/linux64.h (LIB_SPEC): Always
imply -lpthread for -pthread.
I will apply the equivalent patch for the M32R.
Cheers
Nick
gcc/ChangeLog
2007-06-19 Nick Clifton <nickc@redhat.com>
* config/m32r/linux.h (LIB_SPEC): Always imply -lpthread for
-pthread.
Index: gcc/config/m32r/linux.h
===================================================================
--- gcc/config/m32r/linux.h (revision 125844)
+++ gcc/config/m32r/linux.h (working copy)
@@ -82,9 +82,11 @@
#undef LIB_SPEC
#define LIB_SPEC \
- "%{shared: -lc} \
- %{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \
- %{profile:-lc_p} %{!profile: -lc}}"
+ "%{pthread:-lpthread} \
+ %{shared: -lc} \
+ %{!shared: \
+ %{mieee-fp:-lieee} \
+ %{profile:-lc_p} %{!profile: -lc}}"
#undef STARTFILE_SPEC
#if defined HAVE_LD_PIE