[m-rev.] for review: Do not use gcc-3.4 to compile mercury on some machines.

Paul Bone pbone at csse.unimelb.edu.au
Mon Jun 28 12:10:54 AEST 2010


For review by Julien.

Is there a problem with my changes to bob's configuration?  Should I have
changed saturn's configuration?

Thanks.

---

Do not build Mercury using gcc-3.4 on some of our systems.  At present the
Mercury installations on taura, saturn and bob are configured to use gcc-3.4.

taura:
    taura's version of Ubuntu doesn't supply gcc-3.4, we where using a
    back-ported package which is now unnecessary.  When using gcc-3.4 taura
    would compile in handwritten atomic instructions since gcc-3.4 doesn't
    support the correct intrinsics.  We now define MR_AVOID_COMPILER_INTRINSICS
    to ensure that the handwritten instructions are still exercised.

    Also enable --profile-for-implicit-parallelism for the test suite.

bob:
    bob's --with-cc line was spelt incorrectly, and probably wasn't having an
    effect.  Using my best judgment I removed this option.

saturn:
    saturn's configuration includes a comment saying that the use of gcc-3.4
    avoids a bug.  I'm not sure if this is still true.  However I have not
    modified saturn's configuration because of this comment.

tools/test_mercury:
    As above.

Index: tools/test_mercury
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/test_mercury,v
retrieving revision 1.371
diff -u -p -b -r1.371 test_mercury
--- tools/test_mercury	18 Mar 2010 07:26:40 -0000	1.371
+++ tools/test_mercury	28 Jun 2010 02:01:53 -0000
@@ -224,8 +224,11 @@ rm -f $TEST_ERROR_FILE $FAILED_TESTS_FIL
 use_cp_opt=""
 # EXTRA_INSTALL_MCFLAGS can be used to customise INSTALL_MCFLAGS
 EXTRA_INSTALL_MCFLAGS=""
-# The same is true for EXTRA_INSTALL_CFLAGS
+# The same is true for EXTRA_TEST_MCFLAGS, EXTRA_INSTALL_CFLAGS and
+# EXTRA_TEST_CFLAGS
+EXTRA_TEST_MCFLAGS=""
 EXTRA_INSTALL_CFLAGS=""
+EXTRA_TEST_CFLAGS=""
 case $HOST in
     # test things at different optimization levels...
 
@@ -252,12 +255,17 @@ case $HOST in
         ;;
 
     taura)
+        OPTIMIZE="-O5 --intermodule-optimization"
         # Set --profile-for-implicit-parallelism so that the deep profiling
         # version of the standard library is suitable for Paul's implicit
         # parallelism work.  This is not enabled by default because it enables
         # inlining which is confusing for programmers using the deep profiler.
-        OPTIMIZE="-O5 --intermodule-optimization"
         EXTRA_INSTALL_MCFLAGS="--profile-for-implicit-parallelism"
+        EXTRA_TEST_MCFLAGS="--profile-for-implicit-parallelism"
+        # Exercise handwritten assembler in runtime/mercury_atomic_ops.h that
+        # is usually unused with GCC versions >= 4.1
+        EXTRA_INSTALL_CFLAGS="-DMR_AVOID_COMPILER_INTRINSICS=1"
+        EXTRA_TEST_CFLAGS="-DMR_AVOID_COMPILER_INTRINSICS=1"
         ;;
 
     goliath)
@@ -282,9 +290,9 @@ INSTALL_CFLAGS="$EXTRA_INSTALL_CFLAGS"
 INSTALL_MLFLAGS=""
 
 # Flags for running the tests.
-TEST_MCFLAGS="$OPTIMIZE --opt-space"
+TEST_MCFLAGS="$OPTIMIZE --opt-space $EXTRA_TEST_MCFLAGS"
 TEST_MGNUCFLAGS=""
-TEST_CFLAGS=""
+TEST_CFLAGS="$EXTRA_TEST_CFLAGS"
 TEST_MLFLAGS=""
 
 case $FULLARCH in
@@ -482,7 +490,7 @@ case $HOST in
             java"
         ;;
     taura)
-        CONFIG_OPTS="--with-cc=/usr/bin/gcc-3.4"
+        CONFIG_OPTS=""
         INSTALL_LIBGRADES="asm_fast.gc  \
             asm_fast.par.gc             \
             asm_fast.gc.profdeep        \
@@ -513,7 +521,7 @@ case $HOST in
         # bob (a VM on spelter) is used by the G12 group for doing builds of
         # the MiniZinc distribution.  We only need to install the grades that
         # are required for that.
-        CONFIG_OPTS="--wiht-cc=/usr/bin/gcc-3.4"
+        CONFIG_OPTS=""
         INSTALL_LIBGRADES="asm_fast.gc  \
             hlc.gc                      \
             hlc.gc.trseg"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 489 bytes
Desc: Digital signature
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20100628/b3fa02b8/attachment.sig>


More information about the reviews mailing list