[m-dev.] diff: enable --object-file-extension and -c-flag-to-name-object-file

Peter Ross petdr at cs.mu.OZ.AU
Fri Jul 7 21:14:56 AEST 2000


Hi,


===================================================================


Estimated hours taken: 0.25

Enable the options --c-flag-to-name-object-file and --object-file-extension.
These changes are tagged with bootstrap_20000707_obj_ext.

configure.in:
    The bootstrap compiler is only recent enough if it accepts the
    --object-file-extension flag.

scripts/mmc.in:
    Used the autoconfed values to set -c-flag-to-name-object-file and
    --object-file-extension defaults.

Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.212
diff -u -r1.212 configure.in
--- configure.in	2000/06/29 09:55:33	1.212
+++ configure.in	2000/07/07 10:30:51
@@ -77,32 +77,22 @@
 	cat > conftest.m << EOF
 		% this module contains features which didn't work in
 		% previous versions of the Mercury compiler
+		% We may also test to see if the installed compiler is
+		% recent enough by checking what flags mmc takes.
 		% Use [[ ]] for lists.
 		:- module conftest.
 		:- interface.
 		:- import_module io.
 		:- pred main(io__state::di, io__state::uo) is det.
 		:- implementation.
-		:- import_module list.
-
-		% Check that record syntax is recognised.
-		:- type foo ---> foo(field1::int).
-
-		% Check that promise declarations can be parsed
-		% and that every variable in the assertion doesn't
-		% need to be explicitly quantified.
-		:- promise all [[H,T,L]] (list__last([[H|T]], L)).
 		main --> 
-			{ Foo = foo(1) },
-			( { Foo ^ field1 = 1 } ->
-				print("Hello, world\n")
-			;
-				[[]]
-			).
+				% Currently we test that mmc accepts
+				% the --object-file-extension flag.
+			print("Hello, world\n").
 EOF
 	if
 	 	 echo $BOOTSTRAP_MC conftest >&AC_FD_CC 2>&1 &&
-	 	 $BOOTSTRAP_MC --high-level-code conftest \
+	 	 $BOOTSTRAP_MC --object-file-extension "o" conftest \
 		 	</dev/null >&AC_FD_CC 2>&1 &&
 		 test "`./conftest 2>&1 | tr -d '\015'`" = "Hello, world"
 	then
Index: scripts/mmc.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/mmc.in,v
retrieving revision 1.11
diff -u -r1.11 mmc.in
--- scripts/mmc.in	2000/06/20 08:02:55	1.11
+++ scripts/mmc.in	2000/07/07 10:30:56
@@ -37,16 +37,14 @@
 # The default optimization level should be after
 # all the options that describe the machine configuration.
 
-		# Need a version of the compiler which understands these
-		# options first.
-		# --c-flag-to-name-object-file "$CFLAG_TO_NAME_OBJECT_FILE" \
-		# --object-file-extension "$OBJECT_FILE_EXTENSION" \
 case $# in
 	0) exec $MC \
 		$MERC_ALL_MC_C_INCL_DIRS \
 		--cc "$CC" --grade "$DEFAULT_GRADE" \
 		--cflags-for-regs "$CFLAGS_FOR_REGS" \
 		--cflags-for-gotos "$CFLAGS_FOR_GOTOS" \
+		--c-flag-to-name-object-file "$CFLAG_TO_NAME_OBJECT_FILE" \
+		--object-file-extension "$OBJECT_FILE_EXTENSION" \
 		--num-real-r-regs "$NUM_REAL_R_REGS" \
 		--num-real-r-temps "$NUM_REAL_R_TEMPS" \
 		--conf-low-tag-bits "$LOW_TAG_BITS" \
@@ -62,6 +60,8 @@
 		--cc "$CC" --grade "$DEFAULT_GRADE" \
 		--cflags-for-regs "$CFLAGS_FOR_REGS" \
 		--cflags-for-gotos "$CFLAGS_FOR_GOTOS" \
+		--c-flag-to-name-object-file "$CFLAG_TO_NAME_OBJECT_FILE" \
+		--object-file-extension "$OBJECT_FILE_EXTENSION" \
 		--num-real-r-regs "$NUM_REAL_R_REGS" \
 		--num-real-r-temps "$NUM_REAL_R_TEMPS" \
 		--conf-low-tag-bits "$LOW_TAG_BITS" \

--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list