summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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