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]

Status of ACT GNAT with GCC mainline

I've just tried to bootstrap GCC mainline with ACT GNAT sources from the
gcc-head branch:

I tried four platforms:

	alpha-dec-osf5.1, sparc-sun-solaris2.8, i386-pc-solaris2.9, and

On the first three, I started with GCC 3.1 as the bootstrap compiler, while
I had to use GNAT 3.13p on IRIX 6 (more below).

I ran into a few problems, one generic and some platform specific:

* lang.opt is missing from the repository, so original couldn't
  extract the necessary information.  Fixed by copying from the FSF gcc/ada

* Bootstrap on Solaris 8/SPARC originally failed with
  warnings-turned-to-errors in ada/init.c and ada/tracebak.c:

gcc/ada/init.c: In function `__gnat_error_handler':
gcc/ada/init.c:1222: warning: assignment discards qualifiers from pointer target type
gcc/ada/init.c:1234: warning: assignment discards qualifiers from pointer target type
gcc/ada/init.c:1240: warning: assignment discards qualifiers from pointer target type
gcc/ada/init.c:1245: warning: assignment discards qualifiers from pointer target type
gcc/ada/init.c:1250: warning: assignment discards qualifiers from pointer target type

gcc/ada/tracebak.c:330:1: warning: "MAX" redefined
In file included from /vol/gnu/src/gcc/gcc-dist/gcc/ada/tracebak.c:58:
gcc/system.h:245:1: warning: this is the location of the previous definition

  The following trivial patch fixes this:

Thu Jul 17 22:23:43 2003  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* tracebak.c (MAX): Avoid redefinition warning.

	* init.c (__gnat_error_handler): Change msg to const char *.

Index: gcc/ada/init.c
RCS file: /anoncvs/gnat/init.c,v
retrieving revision 1.34
diff -u -p -r1.34 init.c
--- gcc/ada/init.c	12 Jun 2003 17:44:19 -0000	1.34
+++ gcc/ada/init.c	18 Jul 2003 18:06:13 -0000
@@ -1194,7 +1194,7 @@ __gnat_error_handler (sig, sip)
   struct Exception_Data *exception;
   static int recurse = 0;
-  char *msg;
+  const char *msg;
   /* If this was an explicit signal from a "kill", just resignal it.  */
   if (SI_FROMUSER (sip))
Index: gcc/ada/tracebak.c
RCS file: /anoncvs/gnat/tracebak.c,v
retrieving revision 1.17
diff -u -p -r1.17 tracebak.c
--- gcc/ada/tracebak.c	4 Jun 2003 13:04:00 -0000	1.17
+++ gcc/ada/tracebak.c	18 Jul 2003 18:06:13 -0000
@@ -327,7 +327,9 @@ extern unsigned int _image_base__;
 #define VALID_STACK_FRAME(ptr) 1
+#ifndef MAX
 #define MAX(x,y) ((x) > (y) ? (x) : (y))
 /* Define a dummy function to call if FORCE_CALL is defined.  Don't
    define it otherwise, as this could lead to "defined but not used"

  After this change, bootstrap and make gnatlib_and_tools almost completed,
  except for building gnatmem, which failed due to lack of -laddr2line and
  -lbfd.  This needs to be autoconfed, of course.

* Bootstrap etc. on Solaris 9/Intel was completely seamless.

* Bootstrap on Tru64 UNIX V5.1 was moderately easy.  When starting with GCC
  3.1, some binaries created during stage1 (xnmake, xsinfo, xeinfo,
  xtreeprs, like xgnatug during a FSF bootstrap) get into an infinite
  loop.  I avoided this problem by copying over gcc/ada/{[bs],
  einfo.h, sinfo.h,} from one of the other builds.  After that,
  bootstrap finished seamlessly, except again for the lack of -laddr2line.

* Bootstrap on IRIX 6.5 was a nightmare, and provided no useful result,
  though: I had to start off GNAT 3.13p since GCC 3.1 (or any other FSF
  release of GCC 3) doesn't provide a working GNAT on IRIX 6.  This is
  documented in PR ada/6552, which has been completely ignored to date.  To
  avoid the GNAT 3.13p bug described in PR ada/6669, I had to remove -g
  from STAGE1_CFLAGS.  Even so, bootstrap fails at the end of stage1,
  building libgcc:

gcc/libgcc2.c: In function `__divdi3':
gcc/libgcc2.c:1066: internal compiler error: in fixup_reorder_chain, at cfglayout.c:592

  It looks like GNAT 3.13p/GCC 2.8.1 miscompiled the stage1 compiler.  The
  same happens when I try GNAT 3.15p instead.

  As a last resort, I tried to go via GNAT 5.01h with the GCC 3.2 branch
  and the patches in gcc-32.dif, i.e. bootstrap that one starting with GNAT
  3.13p and then try to bootstrap GNAT 5.01w with GCC mainline.
  Unfortunately, while the bootstrap completed, I ran into PR ada/6552
  again, so I get no usable Ada runtime library either and cannot attempt
  the second step to get to GNAT 5.01w.

  So GNAT on IRIX seems to be completely hosed in any combination of tools
  and sources ;-(

Btw., what are the current plans for merging ACT GNAT sources with the FSF


Rainer Orth, Faculty of Technology, Bielefeld University

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