3.[234] PATCH: Fix Tru64 UNIX V5.1B bootstrap failure

Rainer Orth ro@TechFak.Uni-Bielefeld.DE
Fri Feb 21 13:50:00 GMT 2003


Rainer Orth writes:

> Thanks.  I'll probably need an ok for the osf.h part from an alpha
> maintainer.  Richard?
> 
> 	http://gcc.gnu.org/ml/gcc-patches/2003-02/msg01732.html

Stupid me: after comparing testsuite results, I noticed that two additional
patch hunks are necessary.  Here's the updated patch.

Ok for 3.[234] now?

	Rainer

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


Fri Feb 21 14:32:29 2003  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* config/alpha/osf.h (TARGET_OS_CPP_BUILTINS): Rename
	__EXTERN_PREFIX to __PRAGMA_EXTERN_PREFIX.
	* doc/extend.texi (Tru64 Pragmas): Reflect this.

	* fixinc/inclhack.def (alpha___extern_prefix): Indicate #pragma
	extern_prefix support for Tru64 UNIX V5 <sys/stat.h>. 
	* fixinc/fixincl.x: Regenerate.
	* fixinc/tests/base/sys/stat.h [ALPHA___EXTERN_PREFIX_CHECK]: New
	testcase.
	Fixes PR c/5059, c/6126, other/9671.

	testsuite:
	* g++.dg/other/pragma-ep-1.C: Test for __PRAGMA_EXTERN_PREFIX.
	* gcc.dg/pragma-ep-1.c: Likewise.
	
Index: config/alpha/osf.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/osf.h,v
retrieving revision 1.29
diff -u -p -b -r1.29 osf.h
--- config/alpha/osf.h	26 Nov 2002 04:54:47 -0000	1.29
+++ config/alpha/osf.h	21 Feb 2003 13:45:42 -0000
@@ -39,7 +39,7 @@ Boston, MA 02111-1307, USA.  */
 	builtin_define ("_SYSTYPE_BSD");	\
 	builtin_define ("__osf__");		\
 	builtin_define ("_LONGLONG");		\
-	builtin_define ("__EXTERN_PREFIX");	\
+	builtin_define ("__PRAGMA_EXTERN_PREFIX");	\
 	builtin_assert ("system=unix");		\
 	builtin_assert ("system=xpg4");		\
 	/* Tru64 UNIX V5 has a 16 byte long	\
Index: fixinc/inclhack.def
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fixinc/inclhack.def,v
retrieving revision 1.139.4.2
diff -u -p -b -r1.139.4.2 inclhack.def
--- fixinc/inclhack.def	14 Feb 2003 04:34:35 -0000	1.139.4.2
+++ fixinc/inclhack.def	21 Feb 2003 13:45:43 -0000
@@ -599,6 +599,22 @@ fix = {
 
 
 /*
+ *  Obey __PRAGMA_EXTERN_PREFIX for Tru64 UNIX V5 <sys/stat.h>.
+ */
+fix = {
+    hackname  = alpha___extern_prefix;
+    files     = sys/stat.h;
+    select    = "#[ \t]*if[ \t]*defined\\(__DECC\\)";
+
+    mach      = "alpha*-dec-osf5*";
+    c_fix     = format;
+    c_fix_arg = "%0 || defined(__PRAGMA_EXTERN_PREFIX)";
+
+    test_text = "#   if defined(__DECC)";
+};
+
+
+/*
  *  Fix assert macro in assert.h on Alpha OSF/1.
  *  The superfluous int cast breaks C++.
  */
Index: doc/extend.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/extend.texi,v
retrieving revision 1.109.2.3
diff -u -p -b -r1.109.2.3 extend.texi
--- doc/extend.texi	27 Jan 2003 10:48:18 -0000	1.109.2.3
+++ doc/extend.texi	21 Feb 2003 13:45:43 -0000
@@ -6465,7 +6465,8 @@ empty string.
 This pragma is similar in intent to to the asm labels extension
 (@pxref{Asm Labels}) in that the system programmer wants to change
 the assembly-level ABI without changing the source-level API.  The
-preprocessor defines @code{__EXTERN_PREFIX} if the pragma is available.
+preprocessor defines @code{__PRAGMA_EXTERN_PREFIX} if the pragma is
+available.
 @end table
 
 @node Unnamed Fields
Index: testsuite/g++.dg/other/pragma-ep-1.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.dg/other/pragma-ep-1.C,v
retrieving revision 1.2
diff -u -p -b -r1.2 pragma-ep-1.C
--- testsuite/g++.dg/other/pragma-ep-1.C	22 Mar 2002 22:51:47 -0000	1.2
+++ testsuite/g++.dg/other/pragma-ep-1.C	21 Feb 2003 13:45:43 -0000
@@ -5,7 +5,7 @@
 /* { dg-final { scan-assembler "four" } } */
 /* { dg-final { scan-assembler-not "_four" } } */
 
-#ifndef __EXTERN_PREFIX
+#ifndef __PRAGMA_EXTERN_PREFIX
 #error
 #endif
 
Index: testsuite/gcc.dg/pragma-ep-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/pragma-ep-1.c,v
retrieving revision 1.2
diff -u -p -b -r1.2 pragma-ep-1.c
--- testsuite/gcc.dg/pragma-ep-1.c	22 Mar 2002 22:51:47 -0000	1.2
+++ testsuite/gcc.dg/pragma-ep-1.c	21 Feb 2003 13:45:43 -0000
@@ -5,7 +5,7 @@
 /* { dg-final { scan-assembler "four" } } */
 /* { dg-final { scan-assembler-not "_four" } } */
 
-#ifndef __EXTERN_PREFIX
+#ifndef __PRAGMA_EXTERN_PREFIX
 #error
 #endif
 
	* config/alpha/osf.h (CPP_SUBTARGET_SPEC): Rename
	__EXTERN_PREFIX to __PRAGMA_EXTERN_PREFIX.

Index: config/alpha/osf.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/osf.h,v
retrieving revision 1.22.14.3
diff -u -p -b -r1.22.14.3 osf.h
--- config/alpha/osf.h	12 Apr 2002 22:16:56 -0000	1.22.14.3
+++ config/alpha/osf.h	21 Feb 2003 13:48:19 -0000
@@ -48,7 +48,7 @@ Boston, MA 02111-1307, USA.  */
 #undef CPP_SUBTARGET_SPEC
 #define CPP_SUBTARGET_SPEC \
 "%{pthread|threads:-D_REENTRANT} %{threads:-D_PTHREAD_USE_D4} %(cpp_xfloat) \
--D__EXTERN_PREFIX"
+-D__PRAGMA_EXTERN_PREFIX"
 
 /* Under OSF4, -p and -pg require -lprof1, and -lprof1 requires -lpdf.  */
 



More information about the Gcc-patches mailing list