Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v5.0.x: ompi_setup_fc.m4: use -Wl,-ld_classic if supported #12664

Merged

Conversation

jsquyres
Copy link
Member

Per #12427, on MacOS, add -Wl,-ld_classic to the Fortran wrapper compiler if that flag is needed.

Specifically, Open MPI has used -Wl,-commons,use_dylibs for decades to support common symbols (e.g., MPI_BOTTOM) in the Fortran bindings. There is a window of Xcode versions where this switch was effectively disabled; it effectively required the additional -Wl,-ld_classic switch to force the use of the "old" Apple linker (that still supported -Wl,-commons,use_dylibs). Update the configury to test whether we need -Wl,-ld_classic or not.

Signed-off-by: Jeff Squyres jeff@squyres.com
(cherry picked from commit 84555f0)

This is the v5.0.x PR corresponding to the main PR #12650.

Refs #12427

FYI @jeffhammond @fxcoudert @ggouaillardet

Per open-mpi#12427, on MacOS, add
-Wl,-ld_classic to the Fortran wrapper compiler if that flag is
needed.

Specifically, Open MPI has used -Wl,-commons,use_dylibs for decades to
support common symbols (e.g., MPI_BOTTOM) in the Fortran bindings.
There is a window of Xcode versions where this switch was effectively
disabled; it effectively required the additional -Wl,-ld_classic
switch to force the use of the "old" Apple linker (that still
supported -Wl,-commons,use_dylibs).  Update the configury to test
whether we need -Wl,-ld_classic or not.

Signed-off-by: Jeff Squyres <jeff@squyres.com>
(cherry picked from commit 84555f0)
@jsquyres jsquyres requested a review from bwbarrett July 10, 2024 14:15
@github-actions github-actions bot added this to the v5.0.4 milestone Jul 10, 2024
@wenduwan wenduwan merged commit bab59a2 into open-mpi:v5.0.x Jul 11, 2024
14 checks passed
@jsquyres jsquyres deleted the pr/v5.0.x/macos-fortran-ld-classic branch July 11, 2024 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants