[m-rev.] diff: work around configuration problem on murlibobo

Simon Taylor stayl at cs.mu.OZ.AU
Tue Sep 4 18:32:39 AEST 2001


Estimated hours taken: 0.25
Branches: main, release

configure.in:
	When checking whether the installed compiler is up-to-date
	on murlibobo, the statically linked conftest executable fails
	with a message such as "sh: Cannot allocate space for bss.",
	so dynamically link it instead.

Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.276
diff -u -u -r1.276 configure.in
--- configure.in	2001/08/07 02:15:55	1.276
+++ configure.in	2001/09/04 08:21:40
@@ -72,6 +72,18 @@
 		;;
 esac
 #-----------------------------------------------------------------------------#
+
+# When statically linked on Compaq Tru64 UNIX V5.1, the conftest executable
+# fails with message "sh: Cannot allocate space for bss."
+case "$host" in
+	alpha*-osf5*)
+		link_flags=
+		;;
+	*)	
+		link_flags='--link-flags "--static"'
+		;;
+esac
+	
 MERCURY_MSG("looking for an already installed Mercury compiler to bootstrap with...")
 AC_PATH_PROG(BOOTSTRAP_MC,mmc)
 if test "$BOOTSTRAP_MC" != ""; then
@@ -112,7 +124,7 @@
 		# to be compatible with scripts/Mmake.rules.
 	 	echo $BOOTSTRAP_MC conftest >&AC_FD_CC 2>&1 &&
 	 	$BOOTSTRAP_MC \
-			--halt-at-warn --link-flags "--static" conftest \
+			--halt-at-warn $link_flags conftest \
 		 	</dev/null >&AC_FD_CC 2>&1 &&
 		test -f ./conftest.c_date &&
 		test "`./conftest 2>&1 | tr -d '\015'`" = "Hello, world"
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list