[m-rev.] diff; more MSVC fixes

Julien Fischer juliensf at csse.unimelb.edu.au
Sat Sep 10 05:22:24 AEST 2011


With the following, the stage 1 compiler now builds (again) with MSVC in
the hlc.gc grade. (However, it aborts while trying to build the
interface files for the standard library in hlc.gc.trseg.)

Branches: main, 11.07

Various fixes for MSVC.

configure.in:
 	Use -link instead of /link with MSVC since the latter
 	form causes trouble for MSYS.

scripts/ml.in:
 	As above, but for the -DEBUG option.

scripts/parse_ml_options.sh-subr.in:
 	Don't strip executables on MinGW for the moment.
 	(XXX We should re-enable this for the MinGW / GCC
 	combination and probably also check what the current
 	situation on Cygwin and Darwin is.)

library/store.m:
 	Shut up a warning from MSVC about a local variable
 	that is used without being initialised.

Julien.

Index: configure.in
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/configure.in,v
retrieving revision 1.586
diff -u -r1.586 configure.in
--- configure.in	25 Aug 2011 17:48:32 -0000	1.586
+++ configure.in	9 Sep 2011 19:04:24 -0000
@@ -1033,7 +1033,7 @@
      LIB_LIBPATH="/LIBPATH:"
      LINK_LIB=""
      LINK_LIB_SUFFIX=".lib"
-    LINK_OPT_SEP="/link"
+    LINK_OPT_SEP="-link"

      OBJFILE_OPT="-Fo"
      AR="lib"
Index: library/store.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/store.m,v
retrieving revision 1.76
diff -u -r1.76 store.m
--- library/store.m	6 Sep 2011 05:20:44 -0000	1.76
+++ library/store.m	9 Sep 2011 17:43:36 -0000
@@ -291,7 +291,7 @@
      store.do_init(_S0::uo),
      [will_not_call_mercury, promise_pure, will_not_modify_trail],
  "
-    /* TypeInfo_for_S */
+    TypeInfo_for_S = 0;
  ").
  :- pragma foreign_proc("C#",
      store.do_init(_S0::uo),
Index: scripts/ml.in
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/scripts/ml.in,v
retrieving revision 1.124
diff -u -r1.124 ml.in
--- scripts/ml.in	25 Aug 2011 14:16:53 -0000	1.124
+++ scripts/ml.in	9 Sep 2011 19:01:03 -0000
@@ -343,7 +343,7 @@
  # MSVC.
  if test $strip = "false" -a $COMPILER = "cl"
  then
-	DEBUG_FLAG="/DEBUG"
+	DEBUG_FLAG="-DEBUG"
  else
  	DEBUG_FLAG=""
  fi
Index: scripts/parse_ml_options.sh-subr.in
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/scripts/parse_ml_options.sh-subr.in,v
retrieving revision 1.14
diff -u -r1.14 parse_ml_options.sh-subr.in
--- scripts/parse_ml_options.sh-subr.in	2 Dec 2010 03:36:38 -0000	1.14
+++ scripts/parse_ml_options.sh-subr.in	9 Sep 2011 19:13:45 -0000
@@ -28,8 +28,10 @@
  ssdb=false
  readline=true
  case $FULLARCH in
-	*-win95|*-winnt|*-win32|*-cygwin32|*-cygwin)
+	*-win95|*-winnt|*-win32|*-cygwin32|*-cygwin|*mingw*)
  		# `gcc -s' is broken in gnu-win32
+		# XXX actually strip = true is fine for MinGW / GCC, but
+		# MSVC doesn't like it.
  		strip=false
  		;;
  	*-darwin*)

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