python: RPATH on fj (#17783)
* python: RPATH on fj * python: patch _is_gcc
This commit is contained in:
parent
ac433134e5
commit
a480507a92
12
var/spack/repos/builtin/packages/python/fj-rpath-2.3.patch
Normal file
12
var/spack/repos/builtin/packages/python/fj-rpath-2.3.patch
Normal file
@ -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 GNU ld syntax by default:
|
||||
+ return "-Wl,--enable-new-dtags,-R" + dir
|
||||
|
||||
def library_option(self, lib):
|
||||
return "-l" + lib
|
13
var/spack/repos/builtin/packages/python/fj-rpath-3.1.patch
Normal file
13
var/spack/repos/builtin/packages/python/fj-rpath-3.1.patch
Normal file
@ -0,0 +1,13 @@
|
||||
--- 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
|
||||
@@ -215,7 +211,8 @@
|
||||
return "-L" + dir
|
||||
|
||||
def _is_gcc(self, compiler_name):
|
||||
- return "gcc" in compiler_name or "g++" in compiler_name
|
||||
+ return "gcc" in compiler_name or "g++" in compiler_name \
|
||||
+ or "fcc" in compiler_name or "FCC" in compiler_name
|
||||
|
||||
def runtime_library_dir_option(self, dir):
|
||||
# XXX Hackish, at the very least. See Python bug #445902:
|
||||
|
@ -186,6 +186,10 @@ class Python(AutotoolsPackage):
|
||||
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')
|
||||
|
||||
# Ensure that distutils chooses correct compiler option for RPATH on fj:
|
||||
patch('fj-rpath-2.3.patch', when='@2.3:3.0.1 %fj')
|
||||
patch('fj-rpath-3.1.patch', when='@3.1:3.99 %fj')
|
||||
|
||||
# Fixes an alignment problem with more aggressive optimization in gcc8
|
||||
# https://github.com/python/cpython/commit/0b91f8a668201fc58fa732b8acc496caedfdbae0
|
||||
patch('gcc-8-2.7.14.patch', when='@2.7.14 %gcc@8:')
|
||||
|
Loading…
Reference in New Issue
Block a user