[Python-Dev] what environment variable should contain compiler warning suppression flags?
Barry Warsaw
barry at python.org
Tue Jun 29 16:50:12 CEST 2010
On Jun 28, 2010, at 05:28 PM, M.-A. Lemburg wrote:
>How many Python users will compile Python in debug mode ?
How many Python users compile Python at all? :)
>The point is that the default build of Python should use
>the correct production settings for the C compiler out of
>the box and that's what AC_PROG_CC is all about.
Sure.
>I'm pretty sure that Python developers who want to use a
>debug build have enough code foo to get the -O2 turned into a -O0
>either by adjust OPT and/or by providing their own CFLAGS env var.
Yes, but it's a PITA for several reasons, IMO:
* It's pretty underdocumented
* It's obscure
* It's hard to remember the exact fu needed because you do it infrequently
* I usually only remember my mistake when gdb acts funny
I strongly suggest that --with-pydebug should be all you need to ensure the
best debugging environment, which means turning off compiler optimization.
Last time I tried, the -O0 was added and it worked well. (I know this has
been in flux though.)
>Also note that in some cases you may actually want to have
>a debug build with optimizations turned on, e.g. to track down
>a compiler optimization bug.
Yes, but that's *much* more rare than wanting to step through some bit of C
code without going crazy.
-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-dev/attachments/20100629/5b97110c/attachment.pgp>
More information about the Python-Dev
mailing list