[issue969718] BASECFLAGS are not passed to module build line

Antoine Pitrou report at bugs.python.org
Sun Feb 6 16:58:13 CET 2011


Antoine Pitrou <pitrou at free.fr> added the comment:

> I am not convinced that the minimal patch would work for my original
> issue. I wanted to be able to override the -march option which shows
> up in OPT on Fedora. I was cross-compiling to a target architecture
> that does not support the -march option so I would not be able to
> provide a different one as override. 

I don't understand how you can cross-compile using the host Python
Makefile. Could you explain?

> The proposed minimal patch would leave the OPT value and make it
> unchangeable because CFLAGS would pull out a value for OPT from the
> Makefile which shows as in my current Ubuntu system:
> 
> OPT=        -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes
> BASECFLAGS=  -fno-strict-aliasing
> CFLAGS=     $(BASECFLAGS) $(OPT) $(EXTRA_CFLAGS)
> 
> The debian-sysconfig-flags looks the most correct because it allows
> override at any point by emulating the CFLAGS = $(BASECFLAGS) $(OPT)
> $(EXTRA_CFLAGS) logic.
> 
> It still looks like it needs an override for EXTRA_CFLAGS

EXTRA_CFLAGS is not defined in the Makefile so it would probably be
taken from the environment anyway (if my understand of Makefiles is
right). That seems to explain the name "EXTRA_CFLAGS", but I'm no
specialist of the jungle that have building systems become under Unix.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue969718>
_______________________________________


More information about the Python-bugs-list mailing list