[Numpy-svn] r4540 - trunk/numpy/distutils/fcompiler
numpy-svn at scipy.org
numpy-svn at scipy.org
Tue Dec 4 02:58:39 EST 2007
Author: rkern
Date: 2007-12-04 01:58:37 -0600 (Tue, 04 Dec 2007)
New Revision: 4540
Modified:
trunk/numpy/distutils/fcompiler/intel.py
Log:
Use the correct link parameters for shared libraries with Intel Fortran on OS X.
Modified: trunk/numpy/distutils/fcompiler/intel.py
===================================================================
--- trunk/numpy/distutils/fcompiler/intel.py 2007-12-04 07:50:25 UTC (rev 4539)
+++ trunk/numpy/distutils/fcompiler/intel.py 2007-12-04 07:58:37 UTC (rev 4540)
@@ -3,6 +3,8 @@
# of intele
# http://developer.intel.com/software/products/compilers/flin/
+import sys
+
from numpy.distutils.cpuinfo import cpu
from numpy.distutils.ccompiler import simple_version_match
from numpy.distutils.fcompiler import FCompiler, dummy_fortran_file
@@ -105,6 +107,14 @@
v = self.get_version()
if v and v >= '8.0':
opt.append('-nofor_main')
+ if sys.platform == 'darwin':
+ # Here, it's -dynamiclib
+ try:
+ idx = opt.index('-shared')
+ opt.remove('-shared')
+ except ValueError:
+ idx = 0
+ opt[idx:idx] = ['-dynamiclib', 'Wl,-undefined,dynamic_lookup']
return opt
class IntelItaniumFCompiler(IntelFCompiler):
More information about the Numpy-svn
mailing list