patch: add thread tracing to SVR5

Robert Lipe robertl@sco.com
Tue Jan 11 07:09:00 GMT 2000


Systems based on SVR5 (such as UnixWare 7) offer the ability to trace
threads by linking with a different library.  This patch enables that in
GCC.

BTW, Is there a better way to do this?  Specs syntax makes my head hurt.

	* sysv5.h (CPP_SPEC, LIBSPEC): Add -pthreadT.

Index: sysv5.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/sysv5.h,v
retrieving revision 1.2
diff -u -p -r1.2 sysv5.h
--- sysv5.h     1999/04/29 20:20:15     1.2
+++ sysv5.h     2000/01/11 15:04:44
@@ -29,7 +29,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Add -lcrt for Dwarf2 abbreviation table */
 #undef  LIB_SPEC
-#define LIB_SPEC "%{pthread:-lthread} %{!shared:%{!symbolic:-lc -lcrt}}"
+#define LIB_SPEC "%{pthread:-lthread} %{pthreadT:-lthreadT} \
+       %{!shared:%{!symbolic:-lc -lcrt}}"
 
 #undef CPP_SPEC
-#define CPP_SPEC "%{pthread:-D_REENTRANT}"
+#define CPP_SPEC "%{pthread:-D_REENTRANT} %{pthreadT:-D_REENTRANT}"



More information about the Gcc-patches mailing list