On Wed, Apr 21, 2010 at 09:10:54AM +0200, Raphael Hertzog wrote:
> Package: debian-policy
> Severity: wishlist
> 
> The desired outcome is that all package grab the values directly from
> dpkg-buildflags and that we can stop exporting the variables from
> dpkg-buildpackage. That way calling debian/rules directly and via
> dpkg-buildpackage should give the same result.
> 
> Please modify the policy to recommend the usage of dpkg-buildflags (I would
> suggest to push that policy change just at the start of squeeze+1).
> 
> CFLAGS=$(shell dpkg-buildflags --get CFLAGS)

There should be some documentation about how thoses variables should be used,
whether they should replace or augment the value set by debian/rules, before or
after the upstream makefile change, etc...
Currently it is impossible to use them at all in a reliable way.

For example suppose debian/rules do
CFLAGS="-O2 -Wall -g"
and upstream configure do 
CFLAGS="$CFLAGS -fno-strict-aliasing"
before writing the Makefile so C files are built with
gcc -O2 -Wall -g -fno-strict-aliasing foo.c

Suppose user set CFLAGS to XXX. How C files should build ?
gcc XXX foo.c
gcc XXX -fno-strict-aliasing foo.c
gcc XXX -O2 -Wall -g -fno-strict-aliasing foo.c
gcc XXX -g -fno-strict-aliasing foo.c

Should it depends of some properties of the package, if yes which ?

Cheers,
-- 
Bill. <ballo...@debian.org>

Imagine a large red swirl here. 



-- 
To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20100421184328.gk3...@yellowpig

Reply via email to