Patchwork libtool -- don't print warnings with --silent

login
register
mail settings
Submitter Peter O'Gorman
Date Aug. 29, 2011, 4:14 p.m.
Message ID <4E5BBAFA.5020600@pogma.com>
Download mbox | patch
Permalink /patch/112108/
State New
Headers show

Comments

Peter O'Gorman - Aug. 29, 2011, 4:14 p.m.
On 07/29/2011 07:55 PM, John David Anglin wrote:
> Ping?

Hi Dave,

ltmain.sh is a generated file, so this patch is not correct. Perhaps 
something like (pasted in mail, so wrapped):


This turns off warnings for --silent (and turns them on again for 
--verbose).

But I am not sure that --silent was meant to imply "no warnings", rather 
it turns off the verbose compile/link messages.

Would a new --no-warnings option be more appropriate?

Peter

>
> On 9-Jul-11, at 7:03 PM, John David Anglin wrote:
>
>> The attached patch fixes the boehm-gc testsuite on hppa2.0w-hp-hpux11.11.
>> Without it, libtool always generates an informational warning when
>> linking
>> causing the entire boehm-gc testsuite to fail.
>>
>> Ok? Ralf would you please install in libtool tree if ok.
>>
>> 2011-07-09 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
>>
>> PR boehm-gc/48494
>> * ltmain.sh (func_warning): Don't print warnings if opt_silent is true.
>>
>> Index: ltmain.sh
>> ===================================================================
>> --- ltmain.sh (revision 176045)
>> +++ ltmain.sh (working copy)
>> @@ -437,7 +437,9 @@
>> # Echo program name prefixed warning message to standard error.
>> func_warning ()
>> {
>> - $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"}
>> 1>&2
>> + ${opt_silent-false} || {
>> + $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"}
>> 1>&2
>> + }
>>
>> # bash bug again:
>> :
>>
>> Dave
>> --
>> J. David Anglin dave.anglin@nrc-cnrc.gc.ca
>> National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
>
>

Patch

diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index 9358ec5..bd5736c 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -377,9 +377,11 @@  M4SH_GETOPTS(
         func_append preserve_args " $opt"],
    [],          [--silent|--quiet],             [],                     [
         func_append preserve_args " $opt"
+        opt_warning=false
          opt_verbose=false],
    [v],         [--verbose],                    [],                     [
         func_append preserve_args " $opt"
+        opt_warning=:
         opt_silent=false],
    [!],         [--tag],                        [],                     [
         func_append preserve_args " $opt $optarg"