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]

3.0 PATCH: Tru64 UNIX V5(.1) fixes (revised)


This is an updated version of

	http://gcc.gnu.org/ml/gcc-patches/2001-04/msg00213.html
and
	http://gcc.gnu.org/ml/gcc-patches/2001-02/msg01448.html

incorporating Mark's comments

	http://gcc.gnu.org/ml/gcc/2001-05/msg01107.html

and further cleaning up the way the specs additions are done (what I think
is more in line with the rest of the specs system).

The first patch is necessary to allow libstdc++ v3 to build on Tru64 UNIX
V5.0 and up, the second allows bootstrapping on Tru64 UNIX V5.1 by avoiding
the new assembler for the moment.

I've combined them into one patch since they both define or add to the new
SUBTARGET_EXTRA_SPECS.

	Rainer

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

Email: ro@TechFak.Uni-Bielefeld.DE


Mon May 28 14:56:26 2001  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* alpha/osf5.h (CPP_XFLOAT_SPEC): Override default definition.
	(ASM_OLDAS_SPEC): Likewise.

	* alpha/osf.h (CPP_XFLOAT_SPEC): Define.
	(CPP_SUBTARGET_SPEC): Use it.
	(ASM_OLDAS_SPEC): Define.
	(ASM_SPEC): Use it.
	(SUBTARGET_EXTRA_SPECS): Define, declare the new specs above.

Index: gcc/config/alpha/osf.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/osf.h,v
retrieving revision 1.15
diff -u -p -r1.15 osf.h
--- osf.h	2001/01/13 12:34:02	1.15
+++ osf.h	2001/05/28 12:45:27
@@ -36,13 +36,18 @@ Boston, MA 02111-1307, USA.  */
 -Dunix -D__osf__ -D_LONGLONG -DSYSTYPE_BSD \
 -D_SYSTYPE_BSD -Asystem=unix -Asystem=xpg4"
 
+/* Tru64 UNIX V5 requires additional definitions for 16 byte long double
+   support.  Empty by default.  */
+
+#define CPP_XFLOAT_SPEC ""
+
 /* Accept DEC C flags for multithreaded programs.  We use _PTHREAD_USE_D4
    instead of PTHREAD_USE_D4 since both have the same effect and the former
    doesn't invade the users' namespace.  */
 
 #undef CPP_SUBTARGET_SPEC
 #define CPP_SUBTARGET_SPEC \
-"%{pthread|threads:-D_REENTRANT} %{threads:-D_PTHREAD_USE_D4}"
+"%{pthread|threads:-D_REENTRANT} %{threads:-D_PTHREAD_USE_D4} %(cpp_xfloat)"
 
 /* Under OSF4, -p and -pg require -lprof1, and -lprof1 requires -lpdf.  */
 
@@ -79,10 +84,14 @@ Boston, MA 02111-1307, USA.  */
   ASM_OUTPUT_SOURCE_FILENAME (FILE, main_input_filename);	\
 }
 
+/* Tru64 UNIX V5.1 requires a special as flag.  Empty by default.  */
+
+#define ASM_OLDAS_SPEC ""
+
 /* No point in running CPP on our assembler output.  */
 #if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_GAS) != 0
 /* Don't pass -g to GNU as, because some versions don't accept this option.  */
-#define ASM_SPEC "%{malpha-as:-g} -nocpp %{pg}"
+#define ASM_SPEC "%{malpha-as:-g %(asm_oldas)} -nocpp %{pg}"
 #else
 /* In OSF/1 v3.2c, the assembler by default does not output file names which
    causes mips-tfile to fail.  Passing -g to the assembler fixes this problem.
@@ -91,7 +100,7 @@ Boston, MA 02111-1307, USA.  */
    if the user does not specify -g.  If we don't pass -g, then mips-tfile
    will need to be fixed to work in this case.  Pass -O0 since some
    optimization are broken and don't help us anyway.  */
-#define ASM_SPEC "%{!mgas:-g} -nocpp %{pg} -O0"
+#define ASM_SPEC "%{!mgas:-g %(asm_oldas)} -nocpp %{pg} -O0"
 #endif
 
 /* Specify to run a post-processor, mips-tfile after the assembler
@@ -119,6 +128,11 @@ Boston, MA 02111-1307, USA.  */
 		%{.s:%i} %{!.s:%g.s}}}"
 
 #endif
+
+#undef SUBTARGET_EXTRA_SPECS
+#define SUBTARGET_EXTRA_SPECS		\
+  { "cpp_xfloat", CPP_XFLOAT_SPEC },	\
+  { "asm_oldas", ASM_OLDAS_SPEC }
 
 /* Indicate that we have a stamp.h to use.  */
 #ifndef CROSS_COMPILE
Index: gcc/config/alpha/osf5.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/osf5.h,v
retrieving revision 1.1
diff -u -p -r1.1 osf5.h
--- osf5.h	2000/01/24 04:02:40	1.1
+++ osf5.h	2001/05/28 12:45:27
@@ -20,3 +20,25 @@
 
 #undef LONG_DOUBLE_TYPE_SIZE
 #define LONG_DOUBLE_TYPE_SIZE  128
+
+/* Tru64 UNIX V5 has a 16 byte long double type and requires __X_FLOAT to be
+   defined to get the appropriate prototypes for the long double functions
+   in <math.h>.  */
+
+#undef CPP_XFLOAT_SPEC
+#define CPP_XFLOAT_SPEC "-D__X_FLOAT"
+
+/* In Tru64 UNIX V5.1, Compaq introduced a new assembler
+   (/usr/lib/cmplrs/cc/adu) which currently (versions between 3.04.29 and
+   3.04.32) breaks mips-tfile.  Passing the undocumented -oldas flag reverts
+   to using the old assembler (/usr/lib/cmplrs/cc/as[01]).
+
+   The V5.0 and V5.0A assemblers silently ignore -oldas, so it can be
+   specified here.
+
+   It is clearly not desirable to depend on this undocumented flag, and
+   Compaq wants -oldas to go away soon, but until they have released a
+   new adu that works with mips-tfile, this is the only option.  */
+
+#undef ASM_OLDAS_SPEC
+#define ASM_OLDAS_SPEC "-oldas"


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