[m-dev.] Re: SourceForge task #24396 "Add new feature check to configure.in"

Zoltan Somogyi zs at cs.mu.OZ.AU
Wed Feb 21 16:51:49 AEDT 2001


On 21-Feb-2001, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> I don't have a release of the day. The closest I've got is a workspace from
> December 19, 2000 (/home/aditi_db1/stayl/opt/mercury).

Unless someone objects in the next hour or so, I intend to commit the following
diff on both branches, since it correctly detects the compiler in Simon's
workspace as being too old.

runtime/mercury_bootstrap.h:
	Make this file define nothing unless MR_EXTRA_BACKWARDS_COMPAT is
	defined. This should help keep our system namespace clean.

configure.in:
	Check whether the installed compiler is generating namespace-clean
	code; if it isn't, it is not considered up to date. The test
	checks for some non-namespace-clean code generated by the
	last non-namespace-clean version of the compiler.

Zoltan.

cvs diff: Diffing .
Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.247
diff -u -b -r1.247 configure.in
--- configure.in	2001/02/08 16:48:31	1.247
+++ configure.in	2001/02/21 04:49:46
@@ -112,7 +112,31 @@
 		 	</dev/null >&AC_FD_CC 2>&1 &&
 		 test "`./conftest 2>&1 | tr -d '\015'`" = "Hello, world"
 	then
+		rm -f conftest*
+		cat > conftest.m << EOF
+			% This module generates an assignment of the address of
+			% the MR_do_fail label to a redoip slot.
+			:- module conftest.
+
+			:- interface.
+
+			:- pred p(int::out) is multi.
+
+			:- implementation.
+
+			p(1).
+			p(2).
+EOF
+		if 
+			$BOOTSTRAP_MC --compile-to-c --grade asm_fast.gc -O0 \
+				conftest </dev/null >&AC_FD_CC 2>&1 &&
+			grep "MR_ENTRY(MR_do_fail);" conftest.c >/dev/null 2>&1
+		then
 		AC_MSG_RESULT(yes)
+		else
+			BOOTSTRAP_MC=
+			AC_MSG_RESULT(no)
+		fi
 	else
 		BOOTSTRAP_MC=
 		AC_MSG_RESULT(no)
cvs diff: Diffing bindist
cvs diff: Diffing boehm_gc
cvs diff: Diffing boehm_gc/Mac_files
cvs diff: Diffing boehm_gc/cord
cvs diff: Diffing boehm_gc/cord/private
cvs diff: Diffing boehm_gc/include
cvs diff: Diffing boehm_gc/include/private
cvs diff: Diffing browser
cvs diff: Diffing bytecode
cvs diff: Diffing compiler
cvs diff: Diffing compiler/notes
cvs diff: Diffing debian
cvs diff: Diffing doc
cvs diff: Diffing extras
cvs diff: Diffing extras/aditi
cvs diff: Diffing extras/cgi
cvs diff: Diffing extras/complex_numbers
cvs diff: Diffing extras/complex_numbers/samples
cvs diff: Diffing extras/complex_numbers/tests
cvs diff: Diffing extras/concurrency
cvs diff: Diffing extras/curses
cvs diff: Diffing extras/curses/sample
cvs diff: Diffing extras/dynamic_linking
cvs diff: Diffing extras/graphics
cvs diff: Diffing extras/graphics/mercury_opengl
cvs diff: Diffing extras/graphics/mercury_tcltk
cvs diff: Diffing extras/graphics/samples
cvs diff: Diffing extras/graphics/samples/calc
cvs diff: Diffing extras/graphics/samples/maze
cvs diff: Diffing extras/graphics/samples/pent
cvs diff: Diffing extras/lazy_evaluation
cvs diff: Diffing extras/logged_output
cvs diff: Diffing extras/moose
cvs diff: Diffing extras/moose/samples
cvs diff: Diffing extras/morphine
cvs diff: Diffing extras/morphine/non-regression-tests
cvs diff: Diffing extras/morphine/scripts
cvs diff: Diffing extras/morphine/source
cvs diff: Diffing extras/odbc
cvs diff: Diffing extras/posix
cvs diff: Diffing extras/references
cvs diff: Diffing extras/references/samples
cvs diff: Diffing extras/references/tests
cvs diff: Diffing extras/stream
cvs diff: Diffing extras/trailed_update
cvs diff: Diffing extras/trailed_update/samples
cvs diff: Diffing extras/trailed_update/tests
cvs diff: Diffing extras/xml
cvs diff: Diffing extras/xml/samples
cvs diff: Diffing library
cvs diff: Diffing profiler
cvs diff: Diffing robdd
cvs diff: Diffing runtime
Index: runtime/mercury_bootstrap.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_bootstrap.h,v
retrieving revision 1.20
diff -u -b -r1.20 mercury_bootstrap.h
--- runtime/mercury_bootstrap.h	2000/12/07 01:00:05	1.20
+++ runtime/mercury_bootstrap.h	2001/02/21 04:37:51
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 1999-2000 The University of Melbourne.
+** Copyright (C) 1999-2001 The University of Melbourne.
 ** This file may only be copied under the terms of the GNU Library General
 ** Public License - see the file COPYING.LIB in the Mercury distribution.
 */
@@ -23,6 +23,13 @@
 #define do_not_reached			MR_do_not_reached
 #define exception_handler_do_fail	MR_exception_handler_do_fail
 
+/*
+** This stuff is enabled by default,
+** but you can disable it by defining MR_NO_BACKWARDS_COMPAT.
+*/
+
+#ifndef MR_NO_BACKWARDS_COMPAT
+
 #define	r1				MR_r1
 #define	r2				MR_r2
 #define	r3				MR_r3
@@ -224,14 +231,8 @@
 #endif
 
 /*---------------------------------------------------------------------------*/
-/*
-** This stuff is enabled by default,
-** but you can disable it by defining MR_NO_BACKWARDS_COMPAT.
-*/
 
 #define MR_TypeCtorInfo_struct  MR_TypeCtorInfo_Struct
-
-#ifndef MR_NO_BACKWARDS_COMPAT
 
 #define	save_regs_to_mem(save_area)					\
 				MR_save_regs_to_mem(save_area)
cvs diff: Diffing runtime/GETOPT
cvs diff: Diffing runtime/machdeps
cvs diff: Diffing samples
cvs diff: Diffing samples/c_interface
cvs diff: Diffing samples/c_interface/c_calls_mercury
cvs diff: Diffing samples/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/mercury_calls_c
cvs diff: Diffing samples/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/diff
cvs diff: Diffing samples/muz
cvs diff: Diffing samples/rot13
cvs diff: Diffing samples/solutions
cvs diff: Diffing samples/tests
cvs diff: Diffing samples/tests/c_interface
cvs diff: Diffing samples/tests/c_interface/c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/tests/c_interface/mercury_calls_c
cvs diff: Diffing samples/tests/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/tests/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/tests/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/tests/diff
cvs diff: Diffing samples/tests/muz
cvs diff: Diffing samples/tests/rot13
cvs diff: Diffing samples/tests/solutions
cvs diff: Diffing samples/tests/toplevel
cvs diff: Diffing scripts
cvs diff: Diffing tools
cvs diff: Diffing trace
cvs diff: Diffing util
--------------------------------------------------------------------------
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