Skip to content

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 [email protected]
(cherry picked from commit 84555f0)

This is the v4.1.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 <[email protected]>
(cherry picked from commit 84555f0)
@jsquyres jsquyres requested a review from bwbarrett July 10, 2024 14:14
@github-actions github-actions bot added this to the v4.1.7 milestone Jul 10, 2024
@jsquyres jsquyres merged commit 59b9e78 into open-mpi:v4.1.x Jul 10, 2024
@jsquyres jsquyres deleted the pr/v4.1.x/macos-fortran-ld-classic branch July 10, 2024 16:03
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.

2 participants