disabling -Werror on a autotools based build
rc040203 at freenet.de
Sun Mar 27 15:16:50 UTC 2011
On 03/27/2011 11:22 AM, giallu at gmail.com wrote:
> I'm trying to rebuild a package with an autotools based toolchain and
> it's failing because they use -Werror and gcc 4.6 spits out few new
> warnings on the code.
Packages adding -Werror by themselves are poorly designed. Contact their
upstreams and tell them they are doing it wrong.
> Now, is it possible to quickly disable -Werror from the ./configure
> command line?
Theoretically, configure CFLAGS=<whatever> should always work.
However, packages whose authors are adding -Werror inside of a configure
script, they also get this wrong.
In some (rare) cases, packages adding -Werror have --disable-werror
option or similar.
> Right now the only solution I found (short of fixing the
> code...) is to patch Makefile.in but that does seem very robust.
What to do depends upon the details of a package.
For packages which are based on autoconf only, patching Makefile.ins
could be a solution (the Makefile.ins are source files), in
automake-based packages, the appropriate files to patch would be the
Makefile.am (The Makefile.in's are generated).
More information about the devel