I noticed a couple of cleanup opportunities in iris6.h:

* TARGET_NEWABI and TARGET_IRIX6 are always true in iris6.h.

* I'm avoiding an inline expansion of INT_TYPE_SIZE.

Bootstrapped without regressions on mips-sgi-irix6.5, installed on
mainline.

There may be more, though:

* Perhaps I can define _XOPEN_SOURCE=500 for C++ and remove
  __EXTENSIONS__, _SGI_SOURCE at the same time.  Given how sensitive
  target headers usually are to such changes, I'd like to keep such a
  patch separate.

* I'll have to check if libprof1.a exists anywhere, otherwise the specs
  can be simplified.

        Rainer



diff --git a/gcc/config/mips/iris6.h b/gcc/config/mips/iris6.h
--- a/gcc/config/mips/iris6.h
+++ b/gcc/config/mips/iris6.h
@@ -79,7 +79,7 @@ along with GCC; see the file COPYING3.  
   while (0)
 
 #undef LOCAL_LABEL_PREFIX
-#define LOCAL_LABEL_PREFIX (TARGET_NEWABI ? "." : "$")
+#define LOCAL_LABEL_PREFIX "."
 
 #undef ASM_DECLARE_OBJECT_NAME
 #define ASM_DECLARE_OBJECT_NAME mips_declare_object_name
@@ -106,7 +106,7 @@ along with GCC; see the file COPYING3.  
 #define WINT_TYPE (Pmode == DImode ? "int" : "long int")
 
 #undef WINT_TYPE_SIZE
-#define WINT_TYPE_SIZE 32
+#define WINT_TYPE_SIZE INT_TYPE_SIZE
 
 /* C99 stdint.h types.  */
 #define INT8_TYPE "signed char"
@@ -177,16 +177,15 @@ along with GCC; see the file COPYING3.  
       /* IRIX 6.5.18 and above provide many ISO C99            \
         features protected by the __c99 macro.                 \
         libstdc++ v3 needs them as well.  */                   \
-      if (TARGET_IRIX6)                                                \
-       if (flag_isoc99 || c_dialect_cxx ())                    \
-         builtin_define ("__c99");                             \
+      if (flag_isoc99 || c_dialect_cxx ())                     \
+       builtin_define ("__c99");                               \
                                                                \
       /* The GNU C++ standard library requires that            \
         __EXTENSIONS__ and _SGI_SOURCE be defined on at        \
         least IRIX 6.2 and probably all IRIX 6 prior to 6.5.   \
         We don't need this on IRIX 6.5 itself, but it          \
         shouldn't hurt other than the namespace pollution.  */ \
-      if (!flag_iso || (TARGET_IRIX6 && c_dialect_cxx ()))     \
+      if (!flag_iso || c_dialect_cxx ())                       \
        {                                                       \
          builtin_define ("__EXTENSIONS__");                    \
          builtin_define ("_SGI_SOURCE");                       \


-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to