summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2015-10-15 14:00:58 -0600
committerCharles Harris <charlesr.harris@gmail.com>2015-10-15 14:00:58 -0600
commitde591ba203d8f795dac2edb31b6f8fb236680b9c (patch)
tree8cfd51eff964d976b52f25ebd3a4402cfb943cc9
parent7ca2cea5656fd88c39a547c3db7d91e363952893 (diff)
parent5c0cd1b23e1a6797cf3af04c5c3cfb41312f1750 (diff)
downloadnumpy-de591ba203d8f795dac2edb31b6f8fb236680b9c.tar.gz
Merge pull request #6478 from ChristopherHogan/intel_osx
BUG: Fix Intel compiler flags for OS X build
-rw-r--r--numpy/distutils/intelccompiler.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/numpy/distutils/intelccompiler.py b/numpy/distutils/intelccompiler.py
index 1f49dc4b4..20c6d2ba4 100644
--- a/numpy/distutils/intelccompiler.py
+++ b/numpy/distutils/intelccompiler.py
@@ -20,12 +20,17 @@ class IntelCCompiler(UnixCCompiler):
self.cc_exe = ('icc -fPIC -fp-model strict -O3 '
'-fomit-frame-pointer -openmp')
compiler = self.cc_exe
+ if platform.system() == 'Darwin':
+ shared_flag = '-Wl,-undefined,dynamic_lookup'
+ else:
+ shared_flag = '-shared'
self.set_executables(compiler=compiler,
compiler_so=compiler,
compiler_cxx=compiler,
archiver='xiar' + ' cru',
linker_exe=compiler + ' -shared-intel',
- linker_so=compiler + ' -shared -shared-intel')
+ linker_so=compiler + ' ' + shared_flag +
+ ' -shared-intel')
class IntelItaniumCCompiler(IntelCCompiler):
@@ -51,12 +56,17 @@ class IntelEM64TCCompiler(UnixCCompiler):
self.cc_exe = ('icc -m64 -fPIC -fp-model strict -O3 '
'-fomit-frame-pointer -openmp -xSSE4.2')
compiler = self.cc_exe
+ if platform.system() == 'Darwin':
+ shared_flag = '-Wl,-undefined,dynamic_lookup'
+ else:
+ shared_flag = '-shared'
self.set_executables(compiler=compiler,
compiler_so=compiler,
compiler_cxx=compiler,
archiver='xiar' + ' cru',
linker_exe=compiler + ' -shared-intel',
- linker_so=compiler + ' -shared -shared-intel')
+ linker_so=compiler + ' ' + shared_flag +
+ ' -shared-intel')
if platform.system() == 'Windows':