This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

3.3.2/3.4 PATCH: Fix Tru64 UNIX V5.1B bootstrap failure (PR bootstrap/9330)


Both mainline and the 3.3 branch fail to bootstrap on Tru64 UNIX V5.1B due
to the second bug reported in PR bootstrap/9330:

	http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9330#c10

The following patch fixes this.  It allowed bootstrap to go beyond the
compilation of gthr-posix.c where it failed before.  Due to PR
target/12609, mainline bootstrap fails shortly thereafter.

On the 3.3 branch, this problem in the vendor <pthread.h> may not cause a
bootstrap failure (since gthr-posix.c isn't included in libgcc), but will
make pthread.h unusable with gcc, so the fix is still desirable.

Bootstrap for 3.3 branch in progress, ok for branch and mainline if it
passes?

	Rainer

-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University


Tue Oct 14 02:12:23 2003  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* fixinc/inclhack.def (alpha_pthread_gcc): New fix.
	* fixinc/fixincl.x: Regenerate.
	* fixinc/tests/base/pthread.h [ALPHA_PTHREAD_GCC_CHECK]: New
	testcase. 
	Fixes PR bootstrap/9330.

Index: gcc/fixinc/inclhack.def
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fixinc/inclhack.def,v
retrieving revision 1.182
diff -u -p -r1.182 inclhack.def
--- gcc/fixinc/inclhack.def	6 Oct 2003 20:49:24 -0000	1.182
+++ gcc/fixinc/inclhack.def	14 Oct 2003 01:26:50 -0000
@@ -599,6 +599,27 @@ fix = {
 
 
 /*
+ *  Recognize GCC in Tru64 UNIX V5.1B <pthread.h>.
+ */
+fix = {
+    hackname  = alpha_pthread_gcc;
+    files     = pthread.h;
+    select    = "#else\n# error <pthread.h>: unrecognized compiler.";
+
+    mach      = "alpha*-dec-osf*";
+    c_fix     = format;
+    c_fix_arg = "#elif defined (__GNUC__)\n"
+		"# define _PTHREAD_ENV_GCC\n"
+    		"%0";
+
+    test_text = "# define _PTHREAD_ENV_INTELC\n"
+		"#else\n"
+		"# error <pthread.h>: unrecognized compiler.\n"
+		"#endif";
+};
+
+
+/*
  *  Fix return value of sbrk in unistd.h on Alpha OSF/1 V2.0
  *  And OpenBSD.
  */
Index: gcc/fixinc/tests/base/pthread.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fixinc/tests/base/pthread.h,v
retrieving revision 1.10
diff -u -p -r1.10 pthread.h
--- gcc/fixinc/tests/base/pthread.h	31 Jul 2003 12:01:07 -0000	1.10
+++ gcc/fixinc/tests/base/pthread.h	14 Oct 2003 01:26:50 -0000
@@ -22,6 +22,16 @@
 #endif  /* ALPHA_PTHREAD_CHECK */
 
 
+#if defined( ALPHA_PTHREAD_GCC_CHECK )
+# define _PTHREAD_ENV_INTELC
+#elif defined (__GNUC__)
+# define _PTHREAD_ENV_GCC
+#else
+# error <pthread.h>: unrecognized compiler.
+#endif
+#endif  /* ALPHA_PTHREAD_GCC_CHECK */
+
+
 #if defined( PTHREAD_PAGE_SIZE_CHECK )
 extern int __page_size;
 #endif  /* PTHREAD_PAGE_SIZE_CHECK */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]