summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorMilton Woods <miltonjwoods@gmail.com>2017-05-29 02:17:16 +1000
committerGregory Lee <lee218@llnl.gov>2017-05-28 09:17:16 -0700
commit7ea0e143c5e923b80b0c3fa3db321cc93adf02fd (patch)
treeabee6aaef757e8b8c54b08bc8a30e088c486fe79 /var
parent87ebb0fc157731ac2a52aeb9ce09ad375ad8103d (diff)
downloadspack-7ea0e143c5e923b80b0c3fa3db321cc93adf02fd.tar.gz
spack-7ea0e143c5e923b80b0c3fa3db321cc93adf02fd.tar.bz2
spack-7ea0e143c5e923b80b0c3fa3db321cc93adf02fd.tar.xz
spack-7ea0e143c5e923b80b0c3fa3db321cc93adf02fd.zip
python: RPATH on Cray (#4209)
* python: ensure that distutils sets valid compiler options for RPATH on cray * python: add cray-rpath patches for python@2.3:3.0.1 and python@3.1: * python: in patch(..., when="@a:b platform=c"), limit b must be specified * python: assume that python@4 will break the cray patches
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/python/cray-rpath-2.3.patch12
-rw-r--r--var/spack/repos/builtin/packages/python/cray-rpath-3.1.patch15
-rw-r--r--var/spack/repos/builtin/packages/python/package.py4
3 files changed, 31 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/python/cray-rpath-2.3.patch b/var/spack/repos/builtin/packages/python/cray-rpath-2.3.patch
new file mode 100644
index 0000000000..54a85cc64a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/python/cray-rpath-2.3.patch
@@ -0,0 +1,12 @@
+--- a/Lib/distutils/unixccompiler.py 2003-06-02 05:27:40.000000000 +1000
++++ b/Lib/distutils/unixccompiler.py 2017-05-13 13:52:45.554213616 +1000
+@@ -208,7 +208,8 @@
+ elif compiler[:3] == "gcc" or compiler[:3] == "g++":
+ return "-Wl,-R" + dir
+ else:
+- return "-R" + dir
++ # Patched by spack to use gcc syntax by default:
++ return "-Wl,-R" + dir
+
+ def library_option(self, lib):
+ return "-l" + lib
diff --git a/var/spack/repos/builtin/packages/python/cray-rpath-3.1.patch b/var/spack/repos/builtin/packages/python/cray-rpath-3.1.patch
new file mode 100644
index 0000000000..f203bbbaa5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/python/cray-rpath-3.1.patch
@@ -0,0 +1,15 @@
+--- a/Lib/distutils/unixccompiler.py 2009-05-09 21:55:12.000000000 +1000
++++ b/Lib/distutils/unixccompiler.py 2017-05-13 14:30:18.077518999 +1000
+@@ -299,10 +299,8 @@
+ else:
+ return "-Wl,-R" + dir
+ else:
+- # No idea how --enable-new-dtags would be passed on to
+- # ld if this system was using GNU ld. Don't know if a
+- # system like this even exists.
+- return "-R" + dir
++ # Patched by spack to use gcc syntax by default:
++ return "-Wl,-R" + dir
+
+ def library_option(self, lib):
+ return "-l" + lib
diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py
index c5f0f23d6d..e7dede8ecc 100644
--- a/var/spack/repos/builtin/packages/python/package.py
+++ b/var/spack/repos/builtin/packages/python/package.py
@@ -92,6 +92,10 @@ class Python(AutotoolsPackage):
# Patch does not work for Python 3.1
patch('ncurses.patch', when='@:2.8,3.2:')
+ # Ensure that distutils chooses correct compiler option for RPATH on cray:
+ patch('cray-rpath-2.3.patch', when="@2.3:3.0.1 platform=cray")
+ patch('cray-rpath-3.1.patch', when="@3.1:3.99 platform=cray")
+
_DISTUTIL_VARS_TO_SAVE = ['LDSHARED']
_DISTUTIL_CACHE_FILENAME = 'sysconfig.json'
_distutil_vars = None