libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] ltmain.in: don't suppress output for PIC compilations


From: Ileana Dumitrescu
Subject: Re: [PATCH] ltmain.in: don't suppress output for PIC compilations
Date: Thu, 15 Aug 2024 21:13:30 +0300
User-agent: Mozilla Thunderbird

On 15/08/2024 20:37, Sam James wrote:
Nick Bowler <nbowler@draconx.ca> writes:

On 2024-08-15 12:13, Sam James wrote:
Ileana Dumitrescu <ileanadumitrescu95@gmail.com> writes:
However, you could also just specify '-no-suppress' when compiling
rather than changing the default behaviour.

(Is there a way to do this globally? If I put it in CFLAGS globally,
won't this break if libtool isn't used for a package, given GCC or Clang
will see it and bail out?)

Automake provides LIBTOOLFLAGS and AM_LIBTOOLFLAGS for this kind of
purpose but unfortunately it is not in the right position to pass
mode-specific options like -no-suppress.

I think it would be a big improvement to allow most mode-specific options
to appear earlier on the libtool command line.  Then you could just do

   make LIBTOOLFLAGS=-no-suppress

and it'd work.

Ah, thanks. This is a good idea.


There is a relevant bug filed in Automake discussing this:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=54020


I really feel like the current behaviour is unexpected and surprising,
and perhaps it was based on the (wrong) idea that the -fPIC vs non-PIC
build will produce identical warnings and if one fails, the other will
fail, but that's not true at least with modern compilers.

Can we fix the compilers instead?  Why does PIC compilation suppress
warnings?  That behaviour seems unexpected and surprising.

Because PIC can substantially affect generated output. Not only that, as
in the GCC bug I linked to, this behaviour hid a compiler crash.

The same thing could be true if an error is only emitted without PIC.


That's the part I want to discuss -- does anyone actually think the
suppression is still a good idea?

Duplicate output sounds very annoying so yes, I think it is a good idea
to suppress duplicate output.

More annoying to have an error suppressed that is not obvious to debug,
especially if one isn't aware of this behaviour.


If you change the default, maybe just print the differences on the
second run.  This might be as simple as just running diff on the
output of both runs.

Yeah, that might be a good compromise.

Printing the differences on the second run seems like a better default,
while keeping the option for -no-suppress for the complete log. Maybe
adding an informational message about -no-suppress with the diff
would help resolve some confusion?

However, I also wonder if the suppression should be decided by a
verbosity option/variable rather than a compile mode option.


Cheers,
   Nick

--
Ileana Dumitrescu

GPG Public Key: FA26 CA78 4BE1 8892 7F22 B99F 6570 EA01 146F 7354

Attachment: OpenPGP_0x6570EA01146F7354.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]