[m-rev.] diff: avoid linker warning on Mac OS 10.5

Julien Fischer juliensf at csse.unimelb.edu.au
Tue Jan 29 17:23:15 AEDT 2008


Estimated hours taken: 0.1
Branches: main

configure.in:
 	Do not pass `-s' to the linker on Mac OS 10.5 since it is deprecated
 	and just causes the linker to emit a warning (about the flag being
 	deprecated.)

Julien.

Index: configure.in
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/configure.in,v
retrieving revision 1.516
diff -u -r1.516 configure.in
--- configure.in	24 Jan 2008 07:36:44 -0000	1.516
+++ configure.in	29 Jan 2008 06:17:33 -0000
@@ -807,12 +807,12 @@
  	esac
  	FIX_PATH_FOR_CC="$CYGPATH"

-		# MS doesn't use a ranlib.
+	# MS doesn't use a ranlib.
  	RANLIB="echo"
  	RANLIBFLAGS=""
  	AC_SUBST(RANLIB)
  else
-	# Use Unix-style file names and command-line options
+	# Use Unix-style file names and command-line options.
  	OBJ_SUFFIX="o"
  	LIB_SUFFIX="a"
  	LIB_PREFIX=""
@@ -827,10 +827,17 @@
  	AR_LIBFILE_OPT=""

  	LD_STRIP_FLAG="-s"
+
+	# Suppress a warning from the linker on Darwin 9.  `-s' is deprecated on it
+	# and has no effect other than causing the linker to emit a warning.
+	#
+	case "$host" in *apple*darwin*9*)
+		LD_STRIP_FLAG="" ;;
+	esac
+
  	LDFLAGS_FOR_DEBUG="-g"
  	LD_LIBFLAGS_FOR_DEBUG="-g"

-	#
  	# On Linux ELF, the linker option `-export-dynamic' is needed to make
  	# symbols exported for use in code linked in with dlopen(),
  	# which is used for interactive queries in the
@@ -861,7 +868,7 @@
  	# do not get included in the archive table of contents, and so
  	# don't get found during linking.  Whose !@#$ing idea was it to make
  	# that brain-damaged and non-standard-conforming mode the default?
-
+	#
  	case "$host" in *apple*darwin*)
  		RANLIBFLAGS="-c"
  		;;

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