提交 362e63ec authored 作者: nouiz's avatar nouiz

Merge pull request #575 from gwtaylor/macfix

Fix for CUDA 4.1 on OS X, prevent -no_pie flag
...@@ -243,6 +243,13 @@ class NVCC_compiler(object): ...@@ -243,6 +243,13 @@ class NVCC_compiler(object):
# Fix for MacOS X. # Fix for MacOS X.
cmd = remove_python_framework_dir(cmd) cmd = remove_python_framework_dir(cmd)
# CUDA Toolkit v4.1 Known Issues:
# Host linker on Mac OS 10.7 (and 10.6 for me) passes -no_pie option to nvcc
# this option is not recognized and generates an error
# http://stackoverflow.com/questions/9327265/nvcc-unknown-option-no-pie
# Passing -Xlinker -pie stops -no_pie from getting passed
if sys.platform == 'darwin' and nvcc_version >= '4.1':
cmd.extend(['-Xlinker', '-pie'])
#cmd.append("--ptxas-options=-v") #uncomment this to see register and shared-mem requirements #cmd.append("--ptxas-options=-v") #uncomment this to see register and shared-mem requirements
_logger.debug('Running cmd %s', ' '.join(cmd)) _logger.debug('Running cmd %s', ' '.join(cmd))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论