I get the following error when attempting to install psycopg2 via pip on Mavericks 10.9:
clang: error: unknown argument: \'-mno-fused-madd\' [-W
Here is a work around that involves removing the flag from the python installation.
In /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_sysconfigdata.py are several places where the -mfused-madd / -mno-fused-madd flag is set.
Edit this file and remove all of the references to that flag your compilation should work:
sudo sed -i '.old' 's/ -m\(no-\)\{0,1\}fused-madd //g' /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_sysconfigdata.py
You need to delete the corresponding _sysconfigdata.pyc and _sysconfigdata.pyo files as well - at least on my system these files did not automatically get rebuilt:
cd /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
sudo rm _sysconfigdata.pyo _sysconfigdata.pyc
Note that have to use root access to make those changes.