This is the mail archive of the 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.4 PATCH: Fix IRIX 6 Ada bootstrap failure

I've just tried to bootstrap current mainline on mips-sgi-irix6.5 with GNAT
3.15p as bootstrap compiler.  Unfortunately, I ran into a couple of

* I still need to remove -g from STAGE1_CFLAGS as described in PR ada/6669.

* The stage1 gcc ICEs building libgcc:

/.vol/gcc/src/gcc-dist/gcc/libgcc2.c: In function `__udivdi3':
/.vol/gcc/src/gcc-dist/gcc/libgcc2.c:1111: internal compiler error: in fixup_reorder_chain, at cfglayout.c:616

./cc1 -fpreprocessed libgcc2.i -quiet -dumpbase libgcc2.c -auxbase-strip libgcc/./_udivdi3.o -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -version -fexceptions -fnon-call-exceptions -o libgcc2.s

  This happens even with

./cc1 libgcc2.i -O2

  Removing the -O2 (from LIBGCC2_CFLAGS and BOOT_CFLAGS) allows the
  bootstrap to continue.  This is most likely a bug in the bootstrap

* There are several compilation failures, fixed by the patch below:

/.vol/gcc/src/gcc-dist/gcc/ada/cstreams.c: In function `__gnat_full_name':
/.vol/gcc/src/gcc-dist/gcc/ada/cstreams.c:165: warning: unused variable `p'

/.vol/gcc/src/gcc-dist/gcc/ada/cstreams.c: In function `__gnat_full_name':
/.vol/gcc/src/gcc-dist/gcc/ada/cstreams.c:235: warning: control reaches end of non-void function

  There are more instances of this problem for other other targets.  I
  haven't bothered to fix them since I cannot test any of those.

/.vol/gcc/src/gcc-dist/gcc/ada/init.c: In function `__gnat_error_handler':
/.vol/gcc/src/gcc-dist/gcc/ada/init.c:1075: warning: assignment discards qualifiers from pointer target type

/.vol/gcc/src/gcc-dist/gcc/ada/init.c:1067: warning: unused variable `i'

/.vol/gcc/src/gcc-dist/gcc/ada/init.c: In function `__gnat_install_handler':
/.vol/gcc/src/gcc-dist/gcc/ada/init.c:1145: warning: unused variable `ss'

* With these changes, the bootstrap proper finishes successfully, but I
  need to build the runtime lib like so:

  make GNATLIBCFLAGS=-g gnatlib_and_tools

  otherwise cc1 seems to get into an infinite loop compiling adaint.c (-Q
  reveals that this happens compiling __gnat_locate_regular_file).  Without
  -O2, that file compiles, but later on I get again the ICE described

* Finally, I hit PR ada/6552 again.

Anyway, ok for mainline to fix the obvious bootstrap problems?


Rainer Orth, Faculty of Technology, Bielefeld University

Tue Oct 21 20:19:17 2003  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* init.c [sgi] (__gnat_error_handler): Remove i, unused.
	Change msg to const char *.
	(__gnat_install_handler): Remove ss, unused.
	* cstreams.c (__gnat_full_name): Only declare p if used.
	(__gnat_full_name) [sgi] Return buffer.

Index: gcc/ada/init.c
RCS file: /cvs/gcc/gcc/gcc/ada/init.c,v
retrieving revision 1.16
diff -u -p -r1.16 init.c
--- gcc/ada/init.c	21 Oct 2003 13:42:09 -0000	1.16
+++ gcc/ada/init.c	21 Oct 2003 19:46:44 -0000
@@ -1062,9 +1062,7 @@ __gnat_error_handler (sig, code, sc)
   struct Machine_State  *mstate;
   struct Exception_Data *exception;
-  char *msg;
-  int i;
+  const char *msg;
   switch (sig)
@@ -1142,7 +1140,6 @@ __gnat_error_handler (sig, code, sc)
 __gnat_install_handler ()
-  stack_t ss;
   struct sigaction act;
   /* Setup signal handler to map synchronous signals to appropriate
Index: gcc/ada/cstreams.c
RCS file: /cvs/gcc/gcc/gcc/ada/cstreams.c,v
retrieving revision 1.7
diff -u -p -r1.7 cstreams.c
--- gcc/ada/cstreams.c	21 Oct 2003 13:41:58 -0000	1.7
+++ gcc/ada/cstreams.c	21 Oct 2003 19:46:44 -0000
@@ -162,7 +162,9 @@ __gnat_full_name (nam, buffer)
      char *nam;
      char *buffer;
+#if !defined (MSDOS) && !defined (sgi) && !defined(VMS)
   char *p;
 #if defined(__EMX__) || defined (__MINGW32__)
   /* If this is a device file return it as is; under Windows NT and
@@ -189,6 +191,7 @@ __gnat_full_name (nam, buffer)
      getcwd approach instead. */
   realpath (nam, buffer);
+  return buffer;
 #elif defined (VMS)
   strncpy (buffer, __gnat_to_canonical_file_spec (nam), __gnat_max_path_len);

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