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

Re: Using -Werror in CFLAGS for a debian package build



Wouter Verhelst wrote:

> I was working on nbd-server upstream, and so had ran ./configure with
> CFLAGS='-Wall -Werror', which I consider good practice when writing C
> code.
> 
> What I didn't notice immediately was that gcc was emitting some
> warnings, but that the -Werror option was not honored for those
> warnings. Investigating turned up #615157 (Cc'd): the gcc maintainers
> have decided to disable -Werror for some new warnings, because otherwise
> it would cause FTBFS bugs in packages that have -Werror set in their
> debian/rules file.

Wouldn't it be possible to use the dpkg-buildflags framework for this? As 
far as I understand it, this framework sets the gcc options used to build 
Debian packages. Using it would allow to have an upstream-like gcc for the 
whole system, and Debian-specific options when building packages.

(It would also have the side-effect of making sure all packages actually 
work fine when dpkg-buildflags sets something different as usually 
expected.)

Opinions ?


Reply to: