open-mpi / ompi

Open MPI main development repository
https://www.open-mpi.org
Other
2.07k stars 844 forks source link

ompi_setup_fc.m4: use -Wl,-ld_classic if supported #12650

Open jsquyres opened 2 days ago

jsquyres commented 2 days ago

Per https://github.com/open-mpi/ompi/issues/12427, on MacOS, add -Wl,-ld_classic to the Fortran wrapper compiler if that flag is supported. This is needed to support the -Wl,-commons,use_dylibs linker flag, which is needed for common Fortran symbols on MaxOS.

Refs #12427

FYI @jeffhammond @fxcoudert @ggouaillardet

fxcoudert commented 1 day ago

I think that, with Xcode 16 beta, the support of -commons use_dylibs was added to the new linker. So -ld_classic really should only be passed if -commons use_dylibs is otherwise rejected.