Patchwork Avoid overriding LIB_THREAD_LDFLAGS_SPEC on Solaris 8 (PR target/49541)

login
register
mail settings
Submitter Rainer Orth
Date July 15, 2011, 9:42 a.m.
Message ID <yddlivzop6p.fsf@manam.CeBiTec.Uni-Bielefeld.DE>
Download mbox | patch
Permalink /patch/104780/
State New
Headers show

Comments

Rainer Orth - July 15, 2011, 9:42 a.m.
Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:

> Installed on mainline, will backport to the 4.6 branch after testing.

Here's the 4.6 branch version I've just installed after
i386-pc-solaris2.8 and sparc-sun-solaris2.8 testing by Eric and myself.

	Rainer


2011-07-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	Backport from mainline:
	2011-07-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	PR target/49541
	* config/sol2.h (LIB_SPEC): Simplify.
	Move LIB_THREAD_LDFLAGS_SPEC ...
	(LINK_SPEC): ... here.

Patch

diff --git a/gcc/config/sol2.h b/gcc/config/sol2.h
--- a/gcc/config/sol2.h
+++ b/gcc/config/sol2.h
@@ -132,10 +132,8 @@  along with GCC; see the file COPYING3.  
 #define LIB_SPEC \
   "%{compat-bsd:-lucb -lsocket -lnsl -lelf -laio} \
    %{!symbolic:\
-     %{pthreads|pthread:" \
-        LIB_THREAD_LDFLAGS_SPEC " -lpthread " LIB_TLS_SPEC "} \
-     %{!pthreads:%{!pthread:%{threads:" \
-	LIB_THREAD_LDFLAGS_SPEC " -lthread}}} \
+     %{pthreads|pthread:-lpthread " LIB_TLS_SPEC "} \
+     %{!pthreads:%{!pthread:%{threads:-lthread}}} \
      %{p|pg:-ldl} -lc}"
 
 #undef  ENDFILE_SPEC
@@ -185,6 +183,7 @@  along with GCC; see the file COPYING3.  
    %{static:-dn -Bstatic} \
    %{shared:-G -dy %{!mimpure-text:-z text}} \
    %{symbolic:-Bsymbolic -G -dy -z text} \
+   %{pthreads|pthread|threads:" LIB_THREAD_LDFLAGS_SPEC "} \
    %(link_arch) \
    %{Qy:} %{!Qn:-Qy}"