From 8919677faf400a6fbdbe717057ad4fc7de3508f8 Mon Sep 17 00:00:00 2001 From: Chris Marsh Date: Wed, 5 Jun 2024 03:16:52 -0600 Subject: Work around the linker incompatibility that exists with fortran and apple-clang (#44547) --- var/spack/repos/builtin/packages/openmpi/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index f8a6c3c884..1eacea683e 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -986,6 +986,11 @@ class Openmpi(AutotoolsPackage, CudaPackage): spec = self.spec config_args = ["--enable-shared", "--disable-silent-rules", "--disable-sphinx"] + # Work around incompatibility with new apple-clang linker + # https://github.com/open-mpi/ompi/issues/12427 + if spec.satisfies("@5: %apple-clang@15:"): + config_args.append("--with-wrapper-fcflags=-Wl,-ld_classic") + # All rpath flags should be appended with self.compiler.cc_rpath_arg. # Later, we might need to update share/openmpi/mpic++-wrapper-data.txt # and mpifort-wrapper-data.txt (see filter_rpaths()). -- cgit v1.2.3-70-g09d2