[m-rev.] diff: workaround seg. fault in srcdist on 64-bit machines

Julien Fischer juliensf at csse.unimelb.edu.au
Tue Jun 29 18:37:35 AEST 2010


Disable --smart-indexing when generating the C files for the source
distribution.  We appear to be generating non-portable code for some types of
switches that causes the compiler (actually the lexer) to seg. fault, when it
is built from the source distribution C files on a 64-bit machine.

A proper fix would be to disable the generation of non-portable code for
switches when --cross-compiling is enabled.

tools/test_mercury:
 	Make the above change.

Julien.

Index: test_mercury
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/tools/test_mercury,v
retrieving revision 1.372
diff -u -r1.372 test_mercury
--- test_mercury	28 Jun 2010 05:52:19 -0000	1.372
+++ test_mercury	29 Jun 2010 08:29:46 -0000
@@ -828,6 +828,12 @@
      # files in the distribution are built in a low-level C grade.
      # We use asm_fast rather than none or reg because the configure script
      # will prefer the use of the hlc grades if they are the base grade.
+    #
+    # --smart-indexing is disabled for the source distribution because we
+    # currently generate non-portable code for some types of switches when
+    # it is enabled.  (See bug #115 for further details -- it should be re-enbled
+    # once bug #115 has been fixed.)
+    #
      { cd $DIR/mercury &&
      $MMAKE realclean MMAKEFLAGS=$PARALLEL &&
      (cd $DIR/tests &&
@@ -840,7 +846,7 @@
      mercury_cv_bits_per_word=32 \
      mercury_cv_unboxed_floats=no \
      sh configure --with-llds-base-grade=asm_fast --prefix=$INSTALL_DIR &&
-    $MMAKE MMAKEFLAGS="EXTRA_MCFLAGS='-O5 --opt-space --cross-compiling' $PARALLEL" tar &&
+    $MMAKE MMAKEFLAGS="EXTRA_MCFLAGS='-O5 --opt-space --cross-compiling --no-smart-indexing' $PARALLEL" tar &&
      cd .. &&
      rm -f $UNSTABLE/* &&
      cp mercury/NEWS $UNSTABLE/mercury-NEWS-$version-unstable.txt &&

--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list