[m-rev.] diff: Determine when to pass --restricted-command-line
Peter Ross
pro at missioncriticalit.com
Wed Oct 8 13:57:13 AEDT 2008
Hi,
===================================================================
Estimated hours taken: 0.5
Branches: main
Automatically determine if we should pass --restricted-command-line
to mmc.
configure.in:
If we are using the MSVC compiler or MinGW compiler then
we should use --restricted-command-line when building.
scripts/Mercury.config.in:
Pass --restricted-command-line.
Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.527
diff -u -r1.527 configure.in
--- configure.in 7 Oct 2008 05:27:43 -0000 1.527
+++ configure.in 8 Oct 2008 02:53:40 -0000
@@ -835,6 +835,25 @@
AC_MSG_RESULT([no])
fi
+# Determine if we are on a system which has a restricted
+# command line length. This is true if we are building
+# under mingw or using the MS C compiler
+RESTRICTED_COMMAND_LINE_OPT=
+case "$host" in
+ *mingw*)
+ RESTRICTED_COMMAND_LINE_OPT=--restricted-command-line
+ ;;
+ *)
+ if test "$ac_microsoft" = "yes"
+ then
+ RESTRICTED_COMMAND_LINE_OPT=--restricted-command-line
+ else
+ RESTRICTED_COMMAND_LINE_OPT=
+ fi
+ ;;
+esac
+AC_SUBST(RESTRICTED_COMMAND_LINE_OPT)
+
LDFLAGS_FOR_TRACE=
LD_LIBFLAGS_FOR_TRACE=
if test "$ac_microsoft" = "yes" ; then
Index: scripts/Mercury.config.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/Mercury.config.in,v
retrieving revision 1.20
diff -u -r1.20 Mercury.config.in
--- scripts/Mercury.config.in 23 Jan 2008 13:12:17 -0000 1.20
+++ scripts/Mercury.config.in 8 Oct 2008 02:53:47 -0000
@@ -118,6 +118,7 @@
--bytes-per-word "@BYTES_PER_WORD@" \
--sync-term-size "@SYNC_TERM_SIZE@" \
--dotnet-library-version "@MS_DOTNET_LIBRARY_VERSION@" \
+ @RESTRICTED_COMMAND_LINE_OPT@ \
@HAVE_DELAY_SLOT@ \
@HAVE_BOXED_FLOATS@ \
@MCFLAGS_FOR_CC@ \
--------------------------------------------------------------------------
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