This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.araujo
Recipients Arfrever, brett.cannon, eric.araujo, georg.brandl, jwilk, jyasskin, lambacck, lemburg, loewis, lukasz.langa, marienz, mark.dickinson, nyogtha, pitrou, ronaldoussoren, rpetrov, skrah, tarek, vaxhacker
Date 2011-02-04.01:18:17
SpamBayes Score 5.2176144e-08
Marked as misclassified No
Message-id <1296782299.2.0.606040475156.issue969718@psf.upfronthosting.co.za>
In-reply-to
Content
Duplicate report from Stephan Krah:

When CFLAGS are set, distutils drops -fno-strict-aliasing (among other
flags):


$ python2.7 setup.py build
...
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I./src -I/usr/local/include -I/usr/local/include/python2.7 -c src/gmpy.c -o build/temp.linux-x86_64-2.7/src/gmpy.o
...

$ CFLAGS="-fomit-frame-pointer" python2.7 setup.py build
...
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fomit-frame-pointer -fPIC -I./src -I/usr/local/include -I/usr/local/include/python2.7 -c src/gmpy.c -o build/temp.linux-x86_64-2.7/src/gmpy.o
src/gmpy.c: In function ‘_cmp_to_object’:
src/gmpy.c:4692: warning: dereferencing type-punned pointer will break strict-aliasing rules
...

I'm not sure if this is intentional. The documentation says:

"Compiler flags can also be supplied through setting the CFLAGS
environment variable. If set, the contents of CFLAGS will be added
to the compiler flags specified in the Setup file."

To me, this sounds as if they should be appended to the regular flags.
History
Date User Action Args
2011-02-04 01:18:19eric.araujosetrecipients: + eric.araujo, lemburg, loewis, brett.cannon, georg.brandl, ronaldoussoren, mark.dickinson, vaxhacker, nyogtha, marienz, pitrou, jyasskin, tarek, jwilk, rpetrov, Arfrever, lambacck, skrah, lukasz.langa
2011-02-04 01:18:19eric.araujosetmessageid: <1296782299.2.0.606040475156.issue969718@psf.upfronthosting.co.za>
2011-02-04 01:18:18eric.araujolinkissue969718 messages
2011-02-04 01:18:17eric.araujocreate