[m-rev.] diff: make it possible to bootstrap using the Java version of the compiler

Julien Fischer jfischer at opturion.com
Fri Sep 4 20:47:28 AEST 2015


Make it possible to bootstrap using the Java version of the compiler.

scripts/mercury_compile.sh-java:
     Bump up the stack size to 32M since the default is too low to build the
     Mercury compiler.

configure.ac:
      Workaround a problem that causes the configure check for an installed
      Mercury compiler to fail if the installed Mercury compiler is built in
      a non-C grade, specifically the non-C backends do not provide an equivalent
      of MR_RTTI_VERSION.

Julien.

diff --git a/configure.ac b/configure.ac
index 9f7f1d9..a9938bf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -381,6 +381,9 @@ then
              q(T, _),
              get_global_var(Global, !IO),
              (
+                % If you change the minimum RTTI version, you also
+                % need to update the Mercury clause for return_rtti_version
+                % below.
                  Version >= 8,
                  ac(2) ^ elem(3, 5) = 17,
                  (1 .. 2) = [[1, 2]],
@@ -458,6 +461,10 @@ then
              Version = MR_RTTI_VERSION;
          ").

+        % XXX the non-C backends do not currently define an equivalent
+        % to MR_RTTI_VERSION.
+        return_rtti_version(8).
+
          % The code below is the hard_coded/disjs_in_switch test case.
          % The compiler now depends on the installed compiler handling
          % code like this test case correctly.
diff --git a/scripts/mercury_compile.sh-java b/scripts/mercury_compile.sh-java
index d5e27fc..a0d6725 100755
--- a/scripts/mercury_compile.sh-java
+++ b/scripts/mercury_compile.sh-java
@@ -13,4 +13,4 @@ JARDIR="$DIR/../lib/mercury/lib/java"
  CLASSPATH="$DIR/top_level.jar"${SEP}$CLASSPATH${SEP}$JARDIR/mer_rt.jar${SEP}$JARDIR/mer_std.jar${SEP}$JARDIR/mer_browser.jar${SEP}$JARDIR/mer_mdbcomp.jar
  export CLASSPATH
  JAVA=${JAVA:-java}
-exec "$JAVA" jmercury.top_level "$@"
+exec "$JAVA" -Xss32M jmercury.top_level "$@"



More information about the reviews mailing list