[PATCH] GDB: Fix detection of ELF support when configuring with -Werror

Simon Marchi simark@simark.ca
Sat Nov 28 16:50:08 GMT 2020


On 2020-11-20 10:54 a.m., Tom Tromey wrote:
>>>>>> "Alex" == Alexander Richardson via Binutils <binutils@sourceware.org> writes:
>
> Alex> I was configuring GDB with -Werror=implicit-function-definition in
> Alex> CFLAGS and the --disable-werror configure argument.
> Alex> I've dropped that flag from my build scripts for now, but I would like
> Alex> to add it again if this patch is accepted.
>
> It's kind of lame that we can't (AFAIK) specify one set of flags for
> configure and another set for the build itself.  Maybe this could be
> added to the top-level Makefile somehow.

I don't know, having multiple set of flags would make it even more
confusing I think.  And it would be risky to have configure take some
decisions based on some set of flags and compile the code using some
different set of flags.

Anyhow, I've pushed Alexander's patch, since it can't really hurt and
it fixes the problem for now.  I adjusted the commit message a bit to
mention explicitly that it was caused by -Wimplicit-function-declaration
(it's mentioned in the compiler error message, but I think it's good to
make it clear, in case someone tries to reproduce the problem).

Simon


More information about the Binutils mailing list