Sam James <s...@gentoo.org> writes: > When working on xz, I set `-Werror=suggest-attribute=returns_nonnull`, and > the build failed (as I expected it to), but with no visible error from > the compiler. There's a mysterious '>/dev/null 2>&1' on the second line where > liblzma_la-common.o is built without PIC. > > With -fPIC, IPA doesn't end up doing attribute discovery. Without it, > it does. This behaviour is IMO undesirable and we should patch it out. > > This also affects building GCC and is particularly unfortunate if we hit > an ICE. > > See https://bugs.gentoo.org/135865 and > https://lists.gnu.org/archive/html/libtool-patches/2024-08/msg00000.html. > > * ltmain.sh (func_mode_compile): Don't suppress stdout/stderr for no-PIC > build. > --- > I've proposed this upstream and it ended up being bikeshedded a bit. I've > been running this locally for nearly a year now and on IRC, others > expressed interest in this, as it causes pain when debugging.
ping > > ltmain.sh | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/ltmain.sh b/ltmain.sh > index 1a710177fb26..79cd7c57f42e 100644 > --- a/ltmain.sh > +++ b/ltmain.sh > @@ -1576,8 +1576,6 @@ compiler." > command="$command -o $obj" > fi > > - # Suppress compiler output if we already did a PIC compilation. > - command="$command$suppress_output" > func_show_eval_locale "$command" \ > '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'