5

I have python2.7 installed using macports gcc-4.6. When I build an extension module (python setup.py build_ext) the correct gcc (/opt/local/bin/gcc) gets called but the wrong linker (it call /Developer/usr/bin/clang). Is there a way to override the call that python is linking with?

aterrel
  • 1,992
  • 1
  • 14
  • 23

1 Answers1

10

You can customize the linker used with LDSHARED environment variable:

LDSHARED=/usr/bin/ld python setup.py build_ext
tito
  • 12,990
  • 1
  • 55
  • 75