mpich: fix rpath flags in mpif90 when building with oneapi (#33319)
Co-authored-by: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com>
This commit is contained in:
parent
83b49070e6
commit
29f1e8395c
4 changed files with 23 additions and 32 deletions
|
@ -1,30 +0,0 @@
|
|||
diff -ruN spack-src/confdb/config.rpath spack-src-patched/confdb/config.rpath
|
||||
--- spack-src/confdb/config.rpath 2022-03-29 15:13:49.000000000 -0700
|
||||
+++ spack-src-patched/confdb/config.rpath 2022-07-25 17:54:14.638367460 -0700
|
||||
@@ -76,7 +76,7 @@
|
||||
ecc*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
- icc* | ifort*)
|
||||
+ icc* | icx* | ifort* | ifx*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
lf95*)
|
||||
@@ -233,7 +233,7 @@
|
||||
enable_dtags_flag="${wl}--enable-new-dtags"
|
||||
disable_dtags_flag="${wl}--disable-new-dtags"
|
||||
else
|
||||
- case $cc_basename in ifort*)
|
||||
+ case $cc_basename in ifort* | ifx*)
|
||||
enable_dtags_flag="${wl}--enable-new-dtags"
|
||||
disable_dtags_flag="${wl}--disable-new-dtags"
|
||||
;;
|
||||
@@ -380,7 +380,7 @@
|
||||
;;
|
||||
darwin* | rhapsody*)
|
||||
hardcode_direct=no
|
||||
- if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then
|
||||
+ if { case $cc_basename in ifort* | ifx*) true;; *) test "$GCC" = yes;; esac; }; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
|
@ -0,0 +1,9 @@
|
|||
# This patch is applicable starting at least version 3.0.
|
||||
--- a/confdb/config.rpath
|
||||
+++ b/confdb/config.rpath
|
||||
@@ -79 +79 @@ else
|
||||
- icc* | ifort*)
|
||||
+ icc* | icx* | ifort* | ifx*)
|
||||
@@ -383 +383 @@ else
|
||||
- if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then
|
||||
+ if { case $cc_basename in ifort* | ifx*) true;; *) test "$GCC" = yes;; esac; }; then
|
|
@ -0,0 +1,6 @@
|
|||
# This patch is applicable starting version 3.1.1.
|
||||
--- a/confdb/config.rpath
|
||||
+++ b/confdb/config.rpath
|
||||
@@ -236 +236 @@ if test "$with_gnu_ld" = yes; then
|
||||
- case $cc_basename in ifort*)
|
||||
+ case $cc_basename in ifort* | ifx*)
|
|
@ -150,8 +150,14 @@ class Mpich(AutotoolsPackage, CudaPackage, ROCmPackage):
|
|||
|
||||
filter_compiler_wrappers("mpicc", "mpicxx", "mpif77", "mpif90", "mpifort", relative_root="bin")
|
||||
|
||||
# https://github.com/spack/spack/issues/31678
|
||||
patch("mpich-oneapi-config-rpath.patch", when="@4.0.2 %oneapi")
|
||||
# Set correct rpath flags for Intel Fortran Compiler (%oneapi)
|
||||
# See https://github.com/pmodels/mpich/pull/5824
|
||||
# and https://github.com/spack/spack/issues/31678
|
||||
# We do not fetch the patch from the upstream repo because it cannot be applied to older
|
||||
# versions.
|
||||
with when("%oneapi"):
|
||||
patch("mpich-oneapi-config-rpath/step1.patch", when="@:4.0.2")
|
||||
patch("mpich-oneapi-config-rpath/step2.patch", when="@3.1.1:4.0.2")
|
||||
|
||||
# Fix using an external hwloc
|
||||
# See https://github.com/pmodels/mpich/issues/4038
|
||||
|
|
Loading…
Reference in a new issue