I get the following error when attempting to install psycopg2
via pip on Mavericks 10.9:
clang: error: unknown argument: \'-mno-fused-madd\' [-W
I also edited the system python's notion of its original compile flags (as @user3405479 did). Instead of an editor I used command line tools to edit the file "in place" (the inode does change). I also compiled new pyo and pyc files instead of leaving them deleted.
The following commands are run as root, for example under sudo -i
pushd /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
sed 's/-mno-fused-madd//g' _sysconfigdata.py \
| diff -p _sysconfigdata.py - | patch -b
python -m py_compile _sysconfigdata.py
python -OO -m py_compile _sysconfigdata.py
popd