Fix -pthread for PowerPC/Linux shared libraries

Daniel Jacobowitz drow@mvista.com
Wed Sep 17 13:44:00 GMT 2003


Pointed out by Marcin Owsiany - this is needed for correct linkage, and with
-z defs.  Is this OK?  How about for 3.3?

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

2003-09-17  Daniel Jacobowitz  <drow@mvista.com>

	* config/rs6000/sysv4.h (LIB_LINUX_SPEC): Make -pthread apply
	to shared libraries.

Index: sysv4.h
===================================================================
RCS file: /big/fsf/rsync/gcc-cvs/gcc/gcc/config/rs6000/sysv4.h,v
retrieving revision 1.135
diff -u -p -r1.135 sysv4.h
--- sysv4.h	19 Jun 2003 21:47:22 -0000	1.135
+++ sysv4.h	17 Sep 2003 13:41:52 -0000
@@ -1065,7 +1065,7 @@ extern int fixuplabelno;
 
 /* GNU/Linux support.  */
 #define LIB_LINUX_SPEC "%{mnewlib: --start-group -llinux -lc --end-group } \
-%{!mnewlib: %{shared:-lc} %{!shared: %{pthread:-lpthread } \
+%{!mnewlib: %{shared:-lc} %{pthread:-lpthread } %{!shared: \
 %{profile:-lc_p} %{!profile:-lc}}}"
 
 #ifdef HAVE_LD_PIE



More information about the Gcc-patches mailing list