PATCH: Unobsolete IRIX 5/6

Rainer Orth ro@techfak.uni-bielefeld.de
Tue Nov 18 19:02:00 GMT 2008


The following patch unobsoletes the mips-sgi-irix[56] ports by removing
their use of fixproto.

Before the patch, fixproto changed the following files:

* mips-sgi-irix5.3:

  curses.h
  cursesBSD.h
  ctype.h
  dirent.h
  fcntl.h
  grp.h
  locale.h
  pwd.h
  sys/stat.h
  sys/times.h
  sys/utsname.h
  sys/wait.h
  termios.h
  utime.h
  sys/dirent.h
  sys/termios.h
  sys/mkdev.h

* mips-sgi-irix6.5:

  X11/Xfuncs.h
  curses.h

After removing the use fixproto as below, the bootstraps still completed
without regressions.

I've tested that both sets of headers are warning-clean by moving them to
some file fixproto-irix[56].c (resp. .cc) and compiling them with

  ./xgcc -B./ -Wall -I./include -I./include-fixed -c fixproto-irix[56].c

and repeating with -Wall -ansi, -Wall -ansi -pedantic, and -Wall alone for
the .cc variant.  I tried this both in the fixproto tree and the current
one without fixproto.  There were no warnings, with two exceptions

* On IRIX 5.3, compiling as C++, in the fixproto tree I get

./include-fixed/curses.h:326: error: previous declaration of 'int delwin(WINDOW*)' with 'C++' linkage
./include-fixed/curses.h:1317: error: conflicts with new declaration with 'C' linkage

  This happens because fixproto added prototypes for all curses functions
  inside extern "C", and the system header lacked extern "C".  In the
  post-fixproto tree, the warning is gone, but now all curses functions are
  compiled with C++ linkage, which won't work.  Since this is no
  regression, I'll fix this in a separate fixincludes patch.

* On IRIX 6.5, I get both pre and post fixproto:

In file included from ./include-fixed/X11/Xfuncs.h:49,
                 from /homes/ro/fixproto-irix6.c:1:
./include-fixed/memory.h:13:2: warning: #ident is a GCC extension

Given all that, I think I can apply the following patch as (although mostly
inactive ;-) IRIX maintainer.  If anyone objects, please speak up.

Is there any other place where the unobsoletion needs to be documented?

	Rainer

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



Tue Nov 11 12:16:59 2008  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* config.gcc: Unobsolete mips-sgi-irix[56]*.
	(mips-sgi-irix[56]*): No need to use fixproto.
	
Index: gcc/config.gcc
===================================================================
--- gcc/config.gcc	(revision 141745)
+++ gcc/config.gcc	(working copy)
@@ -217,7 +217,6 @@ case ${target} in
  | m68k-*-aout*		\
  | m68k-*-coff*		\
  | sh-*-*		\
- | mips-sgi-irix[56]*	\
  | pdp11-*-bsd		\
  | rs6000-ibm-aix4.[12]* \
  | powerpc-ibm-aix4.[12]* \
@@ -1539,7 +1541,6 @@ mips-sgi-irix[56]*)
 	case ${enable_threads}:${have_pthread_h} in
 	  "":yes | yes:yes ) thread_file=posix ;;
 	esac
-	use_fixproto=yes
 	;;
 mips*-*-netbsd*)			# NetBSD/mips, either endian.
 	target_cpu_default="MASK_ABICALLS"



More information about the Gcc-patches mailing list