From 143e6a4fbb20f39d856e77eb1f838cf5d15a4cdc Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 26 Sep 2023 02:38:20 -0600 Subject: Always apply Python unixcompilers.py `rpath` fix, not just on cray (#39929) * Rename var/spack/repos/builtin/packages/python/cray-rpath-3.1.patch as var/spack/repos/builtin/packages/python/rpath-non-gcc.patch and apply unconditionally * Update var/spack/repos/builtin/packages/python/package.py Co-authored-by: Adam J. Stewart --------- Co-authored-by: Adam J. Stewart --- .../repos/builtin/packages/python/cray-rpath-3.1.patch | 15 --------------- var/spack/repos/builtin/packages/python/package.py | 4 ++-- .../repos/builtin/packages/python/rpath-non-gcc.patch | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 17 deletions(-) delete mode 100644 var/spack/repos/builtin/packages/python/cray-rpath-3.1.patch create mode 100644 var/spack/repos/builtin/packages/python/rpath-non-gcc.patch (limited to 'var') 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 deleted file mode 100644 index f203bbbaa5..0000000000 --- a/var/spack/repos/builtin/packages/python/cray-rpath-3.1.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- 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 28803dfe65..2a904c7386 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -282,8 +282,8 @@ class Python(Package): patch("tkinter-3.10.patch", when="@3.10.0:3.10 ~tkinter") patch("tkinter-3.11.patch", when="@3.11.0:3.11 ~tkinter") - # Ensure that distutils chooses correct compiler option for RPATH on cray: - patch("cray-rpath-3.1.patch", when="@3 platform=cray") + # Ensure that distutils chooses correct compiler option for RPATH: + patch("rpath-non-gcc.patch", when="@:3.11") # Ensure that distutils chooses correct compiler option for RPATH on fj: patch("fj-rpath-3.1.patch", when="@:3.9.7,3.10.0 %fj") diff --git a/var/spack/repos/builtin/packages/python/rpath-non-gcc.patch b/var/spack/repos/builtin/packages/python/rpath-non-gcc.patch new file mode 100644 index 0000000000..f203bbbaa5 --- /dev/null +++ b/var/spack/repos/builtin/packages/python/rpath-non-gcc.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 -- cgit v1.2.3-70-g09d2