This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Add IRIX support for -pthread
- From: Roger Sayle <roger at eyesopen dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Richard Sandiford <richard at codesourcery dot com>
- Date: Tue, 20 Jun 2006 16:44:37 -0600 (MDT)
- Subject: [PATCH] Add IRIX support for -pthread
My apologies that the bootstrap and regression testing and fixes to GNU
ld and baseline bootstrap and regression test and patch rebootstrap and
regression test for this have taken so long. I promise the patch itself
was written before stage3 (infact shortly after the TImode libgcc affair),
its just that my MIPS box is so slow its taken a few weeks :-(
The following patch adds support for the -pthread command line option
on IRIX. This resolves 636 libgomp failures, 75 libgfortran failures,
and mysteriously adds 331 more gcc PASSes, and 322 more g++ PASSes.
These latter two were so surprising that I'd assumed that I was using
an incorrect baseline, so I "svn update"d a second time, and retested
adding another 96 hours :-(
At worst, due to problems with some versions of GNU ld and/or some
versions of IRIX 6.5, this patch transforms an unrecognized command
line option failure, into a link-time failure. However, for most
people it should help significantly. For me, with this change the
default build on IRIX no longer looks like its regressed significantly
since gcc 4.1.
As explained above, the following patch has been tested on
mips-sgi-irix6.5 (multiple times), with a full "make bootstrap",
all default languages, and regression tested with a top-level
"make -k check" with no new failures.
Ok for mainline?
2006-06-20 Roger Sayle <roger@eyesopen.com>
* config/mips/iris6.h (LIB_SPEC): Add support for -pthread.
(SUBTARGET_CPP_SPEC): Define _REENTERANT if -pthread specified.
Index: iris6.h
===================================================================
*** iris6.h (revision 114118)
--- iris6.h (working copy)
***************
*** 1,6 ****
/* Definitions of target machine for GNU compiler. IRIX version 6.
Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004,
! 2005
Free Software Foundation, Inc.
This file is part of GCC.
--- 1,6 ----
/* Definitions of target machine for GNU compiler. IRIX version 6.
Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004,
! 2005, 2006
Free Software Foundation, Inc.
This file is part of GCC.
*************** Boston, MA 02110-1301, USA. */
*** 93,99 ****
-L/usr/lib64} \
%{!shared:" \
SUBTARGET_DONT_WARN_UNUSED_SPEC \
! " %{p:libprof1.a%s}%{pg:libprof1.a%s} -lc " \
SUBTARGET_WARN_UNUSED_SPEC "}"
/* Avoid getting two warnings for libgcc.a everytime we link. */
--- 93,99 ----
-L/usr/lib64} \
%{!shared:" \
SUBTARGET_DONT_WARN_UNUSED_SPEC \
! " %{pthread:-lpthread} %{p:libprof1.a%s}%{pg:libprof1.a%s} -lc " \
SUBTARGET_WARN_UNUSED_SPEC "}"
/* Avoid getting two warnings for libgcc.a everytime we link. */
*************** Boston, MA 02110-1301, USA. */
*** 112,114 ****
--- 112,118 ----
%{!mips4:/usr/lib64/mips3/crtn.o%s}}}"
#define MIPS_TFMODE_FORMAT mips_extended_format
+
+ #undef SUBTARGET_CPP_SPEC
+ #define SUBTARGET_CPP_SPEC "%{pthread:-D_REENTRANT}"
+
Roger
--