When running the tests on OS X 10.8 with the system CPython, every test that compiles C code with
The reason for this is that distutils uses the same compiler flags that have been used to compile the interpreter, specifically these are:
>>> from distutils.sysconfig import get_config_var >>> get_config_var("PY_CFLAGS") '-fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -I. -IInclude -I./Include -pipe -DPy_BUILD_CORE -arch i386 -arch x86_64'
One of those
-mno-fused-madd is unsupported by clang, which clang warns about (
clang: error: argument unused during compilation: '-mno-fused-madd') leading to the observed test failures.
One possible solution to this problem is to pass
extra_compile_args to silence the warning. A better one would probably to make distutils not pass
-mno-fused-madd to clang but I haven't been able to find a documented way to do that.