autoconf
[Top][All Lists]
Advanced

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

Re: Question about CFLAGS


From: Sérgio Durigan Júnior
Subject: Re: Question about CFLAGS
Date: Wed, 16 Apr 2008 13:51:18 -0300

Hi Bob,

On Wed, 2008-04-16 at 11:24 -0500, Bob Friesenhahn wrote:

> > Does that mean that CFLAGS is a variable only for the user? Well, let's
> > say that, for some strong reason, the configure is actually modifying
> > it. What would be the correct behaviour in this case? FYI, I'm talking
> > specifically about Python's build system, which uses 3 internal
> > variables ($BASECFLAGS, $OPT and $EXTRA_CFLAGS), but strangely ignores
> > the value of CFLAGS provided by the user. It's causing some troubles,
> > and we're trying to fix it. More information can be found at
> > http://bugs.python.org/issue1628484 .
> 
> That would seem to be a bug in Python's configure script.  When it 
> comes to the variables listed at the tail of configure's --help 
> output:

Yes, it is a bug. What we want to know is if we should append $CFLAGS to
$BASECFLAGS (i.e., BASECFLAGS="$BASECFLAGS @CFLAGS@") or use *only*
$CFLAGS when the user provides it.

> user provided options should always be treated with respect and should 
> be honored in such a way that the user provided options will have most 
> useful effect.  For example, if you add -I options to CPPFLAGS, then 
> the user-provided portion should be prepended so that the user can use 
> CPPFLAGS to override a default inclusion.  For CFLAGS, the user 
> provided part should likely be appended so that the user can override 
> the defaults.
> 
> If a package is using Automake, then it is useful to take advantage of 
> AM_ prefixed variables in order to taint user-provided input as little 
> as possible.

Unfortunately, Python doesn't use AM_* flags at all. In fact, it seems
it doesn't use Automake too.

> Regardless, I seem to have built a 64-bit version of Python in an 
> environment which defaults to 32-bits by defining 'CC' rather than 
> 'CFLAGS'.

Yes, that's possible indeed. Actually, we're thinking in just use CC and
forget the whole CFLAGS thing... Maybe that's the most intelligent
approach.

Thanks,

-- 
Sérgio Durigan Júnior
Linux on Power Toolchain - Software Engineer
Linux Technology Center - LTC
IBM Brazil





reply via email to

[Prev in Thread] Current Thread [Next in Thread]