[m-rev.] diff: make low-level C .par grades work on MinGW

Julien Fischer juliensf at csse.unimelb.edu.au
Wed Sep 14 14:15:24 AEST 2011


Branches: main, 11.07

Make the low-level C .par grades work on MinGW.

configure.in:
 	On MinGW set the target architecture to i686 in .par grades
 	so that the GCC built-in atomic ops are available.

Julien.

Index: configure.in
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/configure.in,v
retrieving revision 1.588
diff -u -r1.588 configure.in
--- configure.in	12 Sep 2011 16:29:54 -0000	1.588
+++ configure.in	14 Sep 2011 04:13:01 -0000
@@ -3046,7 +3046,11 @@
                  LD_LIBFLAGS_FOR_THREADS="/MD"
                  ;;
              *)
-                CFLAGS_FOR_THREADS="-DMR_THREAD_SAFE $WIN32_GC_THREADLIB"
+                # By default the MinGW port of GCC targets the i386
+                # architecture.  We need to tell it to target a later
+                # architecture for the GCC built-in atomic ops to be available.
+                CFLAGS_FOR_THREADS="-DMR_THREAD_SAFE $WIN32_GC_THREADLIB \
+                    -march=i686"
                  THREAD_LIBS="-lpthread"
                  ;;
          esac

--------------------------------------------------------------------------
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