[m-rev.] diff: update GCC back-end for GCC 3.0

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Jul 10 04:07:50 AEST 2001


I'll commit most of this now, but I'll wait a couple of days
before committing the change to the web page.

Estimated hours taken: 3
Branches: main

tools/test_mercury:
	Use GCC 3.0 rather than the old snapshot that we were using previously.

gcc/mercury/mercury-gcc.c:
	Update for GCC 3.0:
	- use set_internal_error_function() rather than the old
	  (and now deleted) set_fatal_function()
	- use SET_DECL_ASSEMBLER_NAME() rather than "DECL_ASSEMBLER_NAME() =",
	  to avoid compiler warning

gcc/mercury/config-lang.in:
	Fix a bug that could have affected the Windows port:
	append $(exeext) after mercury1 in $(stagestuff).

w3/download/include/gcc-backend.inc:
	Update the documentation now that Mercury 0.10 and 0.10.1 been
	released.  Also update to say that the release-of-the-day releases
	are based on GCC 3.0.

Index: gcc/mercury/mercury-gcc.c
===================================================================
RCS file: /home/mercury1/repository/gcc/mercury/mercury-gcc.c,v
retrieving revision 1.29
diff -u -d -u -r1.29 mercury-gcc.c
--- gcc/mercury/mercury-gcc.c	28 May 2001 06:34:15 -0000	1.29
+++ gcc/mercury/mercury-gcc.c	9 Jul 2001 17:36:42 -0000
@@ -69,7 +69,7 @@
 static tree merc_convert PARAMS((tree type, tree expr));
 static tree merc_promote_type PARAMS((tree type));
 static void merc_init_builtin_functions PARAMS((void));
-static void merc_handle_fatal_error PARAMS((const char *msg, va_list *args));
+static void merc_handle_internal_error PARAMS((const char *msg, va_list *args));
 static int merc_call_mercury_compiler PARAMS((void));
 static void merc_push_type_decl PARAMS((tree id, tree type));
 static void merc_push_atomic_type_decl PARAMS((tree id, tree type));
@@ -317,7 +317,7 @@
 
   /* Now make the function decl.  */
   fndecl = build_decl (FUNCTION_DECL, get_identifier (name), fntype);
-  DECL_ASSEMBLER_NAME (fndecl) = get_identifier (asm_name);
+  SET_DECL_ASSEMBLER_NAME (fndecl, get_identifier (asm_name));
   DECL_EXTERNAL (fndecl) = 0;
   TREE_PUBLIC (fndecl) = 1; /* XXX */
   TREE_STATIC (fndecl) = 1;
@@ -791,22 +791,22 @@
 void 
 finish_parse (void)
 {
-  return;
+  /* Nothing to do. */
 }
 
 static void 
 merc_lang_init_options (void)
 {
-  return;
+  /* Nothing to do. */
 }
 
 void 
-lang_print_xnode (file, t, i)
+lang_print_xnode (file, node, indent)
      FILE *file ATTRIBUTE_UNUSED;
-     tree t ATTRIBUTE_UNUSED;
-     int i ATTRIBUTE_UNUSED;
+     tree node ATTRIBUTE_UNUSED;
+     int indent ATTRIBUTE_UNUSED;
 {
-  return;
+  /* Nothing to do */
 }
 
 

@@ -850,7 +850,7 @@
 static void
 merc_lang_init ()
 {
-  set_fatal_function (merc_handle_fatal_error);
+  set_internal_error_function (merc_handle_internal_error);
 }
 
 /* Perform all the finalization steps that are language-specific.  */
@@ -1413,7 +1413,7 @@
    a different email address for bugs reports.  */
 
 static void
-merc_handle_fatal_error (msg, args)
+merc_handle_internal_error (msg, args)
   const char *msg;
   va_list *args;
 {
@@ -1732,7 +1732,7 @@
   if (flag_traditional && name[0] != '_')
     DECL_BUILT_IN_NONANSI (decl) = 1;
   if (library_name)
-    DECL_ASSEMBLER_NAME (decl) = get_identifier (library_name);
+    SET_DECL_ASSEMBLER_NAME (decl, get_identifier (library_name));
   make_decl_rtl (decl, NULL_PTR);
   pushdecl (decl);
   DECL_BUILT_IN_CLASS (decl) = class;
Index: gcc/mercury/config-lang.in
===================================================================
RCS file: /home/mercury1/repository/gcc/mercury/config-lang.in,v
retrieving revision 1.2
diff -u -d -u -r1.2 config-lang.in
--- gcc/mercury/config-lang.in	30 Jan 2001 16:55:09 -0000	1.2
+++ gcc/mercury/config-lang.in	9 Jul 2001 13:26:17 -0000
@@ -35,7 +35,7 @@
 
 compilers="mercury1\$(exeext)"
 
-stagestuff="mercury1"
+stagestuff="mercury1\$(exeext)"
 
 diff_excludes=
 
Index: mercury/tools/test_mercury
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/test_mercury,v
retrieving revision 1.154
diff -u -d -u -r1.154 test_mercury
--- mercury/tools/test_mercury	1 Jun 2001 16:45:53 -0000	1.154
+++ mercury/tools/test_mercury	9 Jul 2001 17:42:59 -0000
@@ -398,14 +398,14 @@
 		# Once it is done once, it will be saved in the user's
 		# ~/.cvspass file, so it doesn't need to be done again.
 		#
-		# XXX This is commented out for now, to save bandwidth,
+		# XXX This should be commented out soon, to save bandwidth,
 		#     since currently we're using a fixed snapshot
-		#     (`-r gcc_ss_20010129') anyway.
+		#     (`-r gcc_3_0_release') anyway.
 		#     Eventually this should change to use
 		#     `-r gcc_latest_snapshot'.
-		###date
-		###cvs -d :pserver:anoncvs at gcc.gnu.org:/cvs/gcc -z 9 \
-		###	checkout -r gcc_ss_20010129 gcc || { false; exit 1; }
+		date
+		cvs -d :pserver:anoncvs at gcc.gnu.org:/cvs/gcc -z 9 \
+		 	checkout -r gcc_3_0_release gcc || { false; exit 1; }
 		date
 		# Link the Mercury gcc back-end interface sources
 		# into the appropriate place in the gcc sources
Index: mercury/w3/download/include/gcc-backend.inc
===================================================================
RCS file: /home/mercury1/repository/w3/download/include/gcc-backend.inc,v
retrieving revision 1.5
diff -u -d -u -r1.5 gcc-backend.inc
--- mercury/w3/download/include/gcc-backend.inc	24 Jun 2001 02:18:10 -0000	1.5
+++ mercury/w3/download/include/gcc-backend.inc	9 Jul 2001 17:24:25 -0000
@@ -12,29 +12,45 @@
 <p>
 <H3>Status</H3>
 
-The current version of the Mercury native code compiler should be
-considered a beta release.  It is based on an unreleased snapshot
-version of the GCC back-end.  Currently it has only been tested on
-i686-pc-linux-gnu (Intel x86 PCs running GNU/Linux).
+A beta release of the native-code compiler was included in
+Mercury 0.10 and 0.10.1.  However, there were some problems
+in both of these releases, some of which are only fixed in
+our release-of-the-day distributions, so if you want to use
+the native code compiler for anything other than experimental use,
+we recommend that you get a release-of-the-day distribution.
 
-<p>
+<H4>Release-of-the-day</H4>
 
-The native code compiler bootstraps, and passes all of the tests in
-our test suite, except for those that use nested modules or tabled
-evaluation, which are not yet implemented.
+The version of the Mercury native code compiler included in the Mercury
+release-of-the-day distributions is is based on GCC 3.0.  It is better
+than the versions included in Mercury 0.10 or Mercury 0.10.1, and is
+nearing release quality, but it should still be considered a beta release
+at this point.
 
 <p>
 
-The version of the GCC back-end interface included in Mercury 0.10
-had a bug that often caused the compiler to abort.  The work-around
-for that is to compile with `--no-optimize-initializations'.
-This is fixed in our CVS repository and in recent release-of-the-day
-snapshots.
+Currently it has only been tested on
+i686-pc-linux-gnu (Intel x86 PCs running GNU/Linux).
+On this configuration,
+it bootstraps (i.e. we can compile the Mercury compiler itself using
+the native-code back-end), and it passes all of the tests in our test suite.
 
-<p>
+<H4>Mercury 0.10.1</H4>
 
-For more information, see the file gcc/mercury/README
-in the mercury-gcc distribution (see below).
+The version of the Mercury native code compiler included in Mercury 0.10.1
+should be considered a beta release.  It is based on an unreleased snapshot
+version (gcc_ss_20010129) of the GCC back-end, and it does not support nested
+modules or position-independent code.  We do not recommend using it for
+production use.
+
+<H4>Mercury 0.10</H4>
+
+This was the first official release of the Mercury compiler that
+included the native-code compiler.  As well as the problems in Mercury 0.10.1,
+the version of the GCC back-end interface included in Mercury 0.10
+also had a bug that often caused the compiler to abort.  The work-around
+for that is to compile with `--no-optimize-initializations'.
+This bug was fixed in Mercury 0.10.1.
 
 <p>
 <H3>Sources</H3>
@@ -47,9 +63,9 @@
 This contains the Mercury compiler front-end (about 225,000 lines
 of Mercury), as well as the Mercury standard library (about 50,000
 lines of Mercury), runtime system (about 30,000 lines of C), etc.
-You'll need either version 0.10 (not yet released at the time of
-writing), or a release-of-the-day version dated February 2001 or
-later.  You can get this from the <a href="<?echo
+You'll need either version 0.10.1, or a recent release-of-the-day version
+(for the native code compiler we recommend the latter).
+You can get this from the <a href="<?echo
 $root?>/download.html">Download</a> section of the Mercury web site.
 
 <li>
@@ -58,14 +74,18 @@
 GCC web site</A>.  Or you can get it from the
 <A HREF="ftp://ftp.mercury.cs.mu.OZ.AU/pub/mercury/beta-releases/">
 Mercury ftp site</A>.
-Currently you'll need the 20010129 shapshot of gcc,
+<p>
+For Mercury 0.10.1, you'll need the 20010129 shapshot of gcc,
 which you can get from the GCC cvs repository
 (use the option `-rgcc_ss_20010129' when checking it out),
 or from the Mercury ftp site.
 One small <A HREF="http://gcc.gnu.org/ml/gcc-patches/2001-01/msg00577.html">
 patch</a> must be applied to the GCC sources
 to make them work with the Mercury compiler.
-
+<p>
+For recent release-of-the-data releases, you'll need version 3.0 of gcc,
+which you can get from the <a href="http://gcc.gnu.org/">GCC web site</a>
+or its many <a href="http://gcc.gnu.org/mirrors.html">mirrors</a>.
 <li>
 The third part is the <b>mercury-gcc</b> distribution, which provides
 some C code that interfaces between the Mercury compiler front-end
@@ -85,7 +105,17 @@
 specifically the ones named "*i686-pc-linux-gnu-O4*"
 (but NOT the ones named "*i686-pc-linux-gnu-O4-hlc")
 currently include the native-code compiler.
+These are available from the Mercury
+<a href="ftp://ftp.mercury.cs.mu.oz.au/pub/mercury/beta-releases/">ftp</a>
+and <a href="http://www.cs.mu.oz.au/research/mercury/download/files/beta-releases/">web</a> sites.
 
-We also hope to include the native-code compiler in the
-binary distributions for Mercury 0.10.
+The native-code compiler is also included in the "*i686-pc-linux-gnu-O4*"
+binary distribution of Mercury 0.10.1, which is available from the Mercury
+<a href="ftp://ftp.mercury.cs.mu.oz.au/pub/mercury/mercury-0.10.1.i686-pc-linux-libc2.1-gnu-O4.tar.gz">ftp</a> and
+and <a href="http://www.cs.mu.oz.au/research/mercury/download/files/mercury-0.10.1.i686-pc-linux-libc2.1-gnu-O4.tar.gz">web</a> sites.
+
+<H3>See also</H3>
+
+For more information, see the file gcc/mercury/README
+in the mercury-gcc distribution.
Index: mercury/w3/download/include/gcc-backend.inc
===================================================================
RCS file: /home/mercury1/repository/w3/download/include/gcc-backend.inc,v
retrieving revision 1.5
diff -u -d -u -r1.5 gcc-backend.inc
--- mercury/w3/download/include/gcc-backend.inc	24 Jun 2001 02:18:10 -0000	1.5
+++ mercury/w3/download/include/gcc-backend.inc	9 Jul 2001 18:05:04 -0000
@@ -12,29 +12,45 @@
 <p>
 <H3>Status</H3>
 
-The current version of the Mercury native code compiler should be
-considered a beta release.  It is based on an unreleased snapshot
-version of the GCC back-end.  Currently it has only been tested on
-i686-pc-linux-gnu (Intel x86 PCs running GNU/Linux).
+A beta release of the native-code compiler was included in
+Mercury 0.10 and 0.10.1.  However, there were some problems
+in both of these releases, some of which are only fixed in
+our release-of-the-day distributions, so if you want to use
+the native code compiler for anything other than experimental use,
+we recommend that you get a release-of-the-day distribution.
 
-<p>
+<H4>Release-of-the-day</H4>
 
-The native code compiler bootstraps, and passes all of the tests in
-our test suite, except for those that use nested modules or tabled
-evaluation, which are not yet implemented.
+The version of the Mercury native code compiler included in the Mercury
+release-of-the-day distributions is is based on GCC 3.0.  It is better
+than the versions included in Mercury 0.10 or Mercury 0.10.1, and is
+nearing release quality, but it should still be considered a beta release
+at this point.
 
 <p>
 
-The version of the GCC back-end interface included in Mercury 0.10
-had a bug that often caused the compiler to abort.  The work-around
-for that is to compile with `--no-optimize-initializations'.
-This is fixed in our CVS repository and in recent release-of-the-day
-snapshots.
+Currently it has only been tested on
+i686-pc-linux-gnu (Intel x86 PCs running GNU/Linux).
+On this configuration,
+it bootstraps (i.e. we can compile the Mercury compiler itself using
+the native-code back-end), and it passes all of the tests in our test suite.
 
-<p>
+<H4>Mercury 0.10.1</H4>
 
-For more information, see the file gcc/mercury/README
-in the mercury-gcc distribution (see below).
+The version of the Mercury native code compiler included in Mercury 0.10.1
+should be considered a beta release.  It is based on an unreleased snapshot
+version (gcc_ss_20010129) of the GCC back-end, and it does not support nested
+modules or position-independent code.  We do not recommend using it for
+production use.
+
+<H4>Mercury 0.10</H4>
+
+This was the first official release of the Mercury compiler that
+included the native-code compiler.  As well as the problems in Mercury 0.10.1,
+the version of the GCC back-end interface included in Mercury 0.10
+also had a bug that often caused the compiler to abort.  The work-around
+for that is to compile with `--no-optimize-initializations'.
+This bug was fixed in Mercury 0.10.1.
 
 <p>
 <H3>Sources</H3>
@@ -47,9 +63,9 @@
 This contains the Mercury compiler front-end (about 225,000 lines
 of Mercury), as well as the Mercury standard library (about 50,000
 lines of Mercury), runtime system (about 30,000 lines of C), etc.
-You'll need either version 0.10 (not yet released at the time of
-writing), or a release-of-the-day version dated February 2001 or
-later.  You can get this from the <a href="<?echo
+You'll need either version 0.10.1, or a recent release-of-the-day version
+(for the native code compiler we recommend the latter).
+You can get this from the <a href="<?echo
 $root?>/download.html">Download</a> section of the Mercury web site.
 
 <li>
@@ -58,14 +74,22 @@
 GCC web site</A>.  Or you can get it from the
 <A HREF="ftp://ftp.mercury.cs.mu.OZ.AU/pub/mercury/beta-releases/">
 Mercury ftp site</A>.
-Currently you'll need the 20010129 shapshot of gcc,
+<p>
+For Mercury 0.10.1, you'll need the 20010129 shapshot of gcc,
 which you can get from the GCC cvs repository
 (use the option `-rgcc_ss_20010129' when checking it out),
 or from the Mercury ftp site.
 One small <A HREF="http://gcc.gnu.org/ml/gcc-patches/2001-01/msg00577.html">
-patch</a> must be applied to the GCC sources
+patch</a> must be applied to the GCC 20010129 snapshot sources
+to make them work with the Mercury compiler.
+<p>
+For recent release-of-the-data releases, you'll need version 3.0 of gcc,
+which you can get from the <a href="http://gcc.gnu.org/">GCC web site</a>
+or its many <a href="http://gcc.gnu.org/mirrors.html">mirrors</a>.
+Another small <A
+HREF="ftp://ftp.cs.mu.oz.au/pub/mercury/gcc-3.0.patch-for-mercury">
+patch</a> must be applied to the GCC 3.0 sources
 to make them work with the Mercury compiler.
-
 <li>
 The third part is the <b>mercury-gcc</b> distribution, which provides
 some C code that interfaces between the Mercury compiler front-end
@@ -85,7 +109,17 @@
 specifically the ones named "*i686-pc-linux-gnu-O4*"
 (but NOT the ones named "*i686-pc-linux-gnu-O4-hlc")
 currently include the native-code compiler.
+These are available from the Mercury
+<a href="ftp://ftp.mercury.cs.mu.oz.au/pub/mercury/beta-releases/">ftp</a>
+and <a href="http://www.cs.mu.oz.au/research/mercury/download/files/beta-releases/">web</a> sites.
 
-We also hope to include the native-code compiler in the
-binary distributions for Mercury 0.10.
+The native-code compiler is also included in the "*i686-pc-linux-gnu-O4*"
+binary distribution of Mercury 0.10.1, which is available from the Mercury
+<a href="ftp://ftp.mercury.cs.mu.oz.au/pub/mercury/mercury-0.10.1.i686-pc-linux-libc2.1-gnu-O4.tar.gz">ftp</a> and
+and <a href="http://www.cs.mu.oz.au/research/mercury/download/files/mercury-0.10.1.i686-pc-linux-libc2.1-gnu-O4.tar.gz">web</a> sites.
+
+<H3>See also</H3>
+
+For more information, see the file gcc/mercury/README
+in the mercury-gcc distribution.
 
-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list