Hi,

Bob wanted to add -msg_disable badboundchk,unusedincl to his CFLAGS on
Tru64 5.1 using the native compiler, there was a problem though. We have
a rule that lets all, otherwise unknown flags beginning with -m through
to the linker. However, we don't expect -mfoo to have an argument, so we
do not let through the argument. This results in a link error for Bob.

This patch lets libtool know about all flags beginning with -msg_ and
says to not pass them through to the linker.

There are some questions, do any other compilers use flags beginning
with -msg_ that do not take an argument and that need to be passed
through to the linker? If that is the case then this patch is wrong. I
think, however, that since we pass -m* through we should take the chance
on this, rather than staying with the status-quo on the off-chance that
there might be a system somewhere that requires -msg_something being
passed to the linker.

I won't apply this without explicit approval from someone !Bob (sorry
Bob).

Thoughts? Are there any real systems that this would break?

Peter

2007-07-05  Peter O'Gorman  <[EMAIL PROTECTED]

	* libltdl/config/libtool.m4sh: Don't pass -msg_* through to the
	linker.
	Reported by Bob Friesenhahn  <[EMAIL PROTECTED]>
 
 	* libltdl/lt__alloc.c, libltdl/loaders/preopen.c,
Index: libltdl/config/ltmain.m4sh
===================================================================
diff -u -r1.82 ltmain.m4sh
--- libltdl/config/ltmain.m4sh	24 Jun 2007 20:46:46 -0000	1.82
+++ libltdl/config/ltmain.m4sh	6 Jul 2007 02:54:44 -0000
@@ -3755,6 +3755,12 @@
 	continue
 	;;
 
+      # -msg_* for osf cc 
+      -msg_*)
+	func_quote_for_eval "$arg"
+	arg="$func_quote_for_eval_result"
+	;;
+
       # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
       # -r[0-9][0-9]* specifies the processor on the SGI compiler
       # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler

Reply via email to