disabling -Werror on a autotools based build

Jan Kratochvil jan.kratochvil at redhat.com
Sun Mar 27 11:12:51 UTC 2011


On Sun, 27 Mar 2011 11:22:48 +0200, 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.

You should fix those erors and and submit them upstream.


> Now, is it possible to quickly disable -Werror from the ./configure
> command line? Right now the only solution I found (short of fixing the
> code...) is to patch Makefile.in but that does seem very robust.

It depends on the specific package.  For example GDB has --disable-werror:
$ ./configure --help|grep werror
  --enable-werror         treat compile warnings as errors

Or if there is Makefile.am you should patch it instead of Makefile.in.

If -Werror is contained in Makefile.in and there is no Makefile.am then your
choice is the best way how to disable it (but you should fix the errors
instead).


Regards,
Jan


More information about the devel mailing list