This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
threads support committed to UnixWare 7.
- To: egcs-patches at cygnus dot com
- Subject: threads support committed to UnixWare 7.
- From: Robert Lipe <robertlipe at usa dot net>
- Date: Thu, 29 Apr 1999 22:23:24 -0500
Even though all the SVR4.2's had UI threads, all the 4.0's didn't. EGCS
doesn't differentiate between them. It does differentiate SVR5. I care
about SVR5. I need threads. I'm a selfish man. EGCS now interfaces to
the native threads system. :-)
As a side note, if we configure --enable-threads the objc tests all fail
to link becuase the testsuite doesn't know what flag to pass to GCC to
turn this on. This is normal or is there something in the testsuite
code that I need to tell about this?
RJL
* configure.in (i?86-UnixWare7*-sysv): Set thread_file to 'posix'
--enable-threads[={yes,pthreads,posix}] is passed as a command
line parameter to configure.
* config/i386/sysv5.h (LIB_SPEC): Add support for '-pthread'.
(CPP_SPEC): Likewise.
Index: config/i386/sysv5.h
===================================================================
RCS file: /cvs/egcs/egcs/gcc/config/i386/sysv5.h,v
retrieving revision 1.1
diff -u -p -r1.1 sysv5.h
--- sysv5.h 1999/03/28 10:28:29 1.1
+++ sysv5.h 1999/04/30 03:11:40
@@ -29,4 +29,7 @@ Boston, MA 02111-1307, USA. */
/* Add -lcrt for Dwarf2 abbreviation table */
#undef LIB_SPEC
-#define LIB_SPEC "%{!shared:%{!symbolic:-lc -lcrt}}"
+#define LIB_SPEC "%{pthread:-lthread} %{!shared:%{!symbolic:-lc -lcrt}}"
+
+#undef CPP_SPEC
+#define CPP_SPEC "%{pthread:-D_REENTRANT}"
Index: sysv5.h
===================================================================
RCS file: /cvs/egcs/egcs/gcc/config/i386/sysv5.h,v
retrieving revision 1.1
diff -u -p -r1.1 sysv5.h
--- sysv5.h 1999/03/28 10:28:29 1.1
+++ sysv5.h 1999/04/30 03:12:07
@@ -29,4 +29,7 @@ Boston, MA 02111-1307, USA. */
/* Add -lcrt for Dwarf2 abbreviation table */
#undef LIB_SPEC
-#define LIB_SPEC "%{!shared:%{!symbolic:-lc -lcrt}}"
+#define LIB_SPEC "%{pthread:-lthread} %{!shared:%{!symbolic:-lc -lcrt}}"
+
+#undef CPP_SPEC
+#define CPP_SPEC "%{pthread:-D_REENTRANT}"
Index: configure.in
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/configure.in,v
retrieving revision 1.243
diff -u -p -r1.243 configure.in
--- configure.in 1999/04/26 01:01:37 1.243
+++ configure.in 1999/04/27 00:18:04
@@ -1408,6 +1408,9 @@ changequote([,])dnl
tmake_file=i386/t-crtpic
xmake_file=x-svr4
extra_parts="crtbegin.o crtend.o"
+ if test x$enable_threads = xyes; then
+ thread_file='posix'
+ fi
;;
changequote(,)dnl
i[34567]86-*-sysv4*) # Intel 80386's running system V.4