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

Re: Some upcoming dpkg changes, test and feedback welcome



On Wed, 2011-07-20 at 14:32:50 +0200, Raphael Hertzog wrote:
> On Wed, 20 Jul 2011, Guillem Jover wrote:
> > > I have also decided to not export the build flags in the environment by
> > > default. If the caller really wants this, he should set
> > > DPKG_EXPORT_BUILDFLAGS.
> > 
> > Why?
> 
> Because many people believe that the correct way to pass CFLAGS to the
> build system is on the ./configure command line and not through the
> environment.
> 
> And debian/rules doesn't know all variables that buildflags.mk might
> set so it can't reliably call unexport on all variables. Instead it should
> use a flag that controls the behaviour of buildvars.mk.

Ok, that makes sense.

> That said if you believe the correct default is to export the variables
> I'm happy to reverse the test and ask people who don't want it in the
> environment to set DPKG_DONT_EXPORT_BUILDFLAGS.
> 
> I really don't have any personal preference here.

I find having to define DPKG_EXPORT_BUILDFLAGS a bit ugly (less than
DPKG_DONT_EXPORT_BUILDFLAGS though). What about shifting completely
the responsibility to the includer over what specific variables to
export instead. As in:

-include /usr/share/dpkg/buildflags.mk

export CFLAGS CPPFLAGS CXXFLAGS LDFLAGS

? Some packages might need to do that in any case, so it seems like a
nicer interface, with a bit less magic and more explicit.

regards,
guillem


Reply to: