Skip to content

Ticket 960 intelccomppiler #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions numpy/distutils/ccompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,10 +494,13 @@ def CCompiler_cxx_compiler(self):
"Intel C Compiler for 32-bit applications")
compiler_class['intele'] = ('intelccompiler','IntelItaniumCCompiler',
"Intel C Itanium Compiler for Itanium-based applications")
compiler_class['intelem'] = ('intelccompiler','IntelEM64TCCompiler',
"Intel C Compiler for 64-bit applications")
compiler_class['pathcc'] = ('pathccompiler','PathScaleCCompiler',
"PathScale Compiler for SiCortex-based applications")
ccompiler._default_compilers += (('linux.*','intel'),
('linux.*','intele'),
('linux.*','intelem'),
('linux.*','pathcc'))

if sys.platform == 'win32':
Expand Down
20 changes: 20 additions & 0 deletions numpy/distutils/intelccompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ class IntelCCompiler(UnixCCompiler):

compiler_type = 'intel'
cc_exe = 'icc'
cc_args = 'fPIC'

def __init__ (self, verbose=0, dry_run=0, force=0):
UnixCCompiler.__init__ (self, verbose,dry_run, force)
self.cc_exe = 'icc -fPIC'
compiler = self.cc_exe
self.set_executables(compiler=compiler,
compiler_so=compiler,
Expand All @@ -27,3 +29,21 @@ class IntelItaniumCCompiler(IntelCCompiler):
for cc_exe in map(find_executable,['icc','ecc']):
if cc_exe:
break

class IntelEM64TCCompiler(UnixCCompiler):

""" A modified Intel x86_64 compiler compatible with a 64bit gcc built Python.
"""

compiler_type = 'intelem'
cc_exe = 'icc -m64 -fPIC'
cc_args = "-fPIC"
def __init__ (self, verbose=0, dry_run=0, force=0):
UnixCCompiler.__init__ (self, verbose,dry_run, force)
self.cc_exe = 'icc -m64 -fPIC'
compiler = self.cc_exe
self.set_executables(compiler=compiler,
compiler_so=compiler,
compiler_cxx=compiler,
linker_exe=compiler,
linker_so=compiler + ' -shared')