Skip to content

configury: fix support for flang on OSX #13142

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

Merged
merged 1 commit into from
Mar 23, 2025

Conversation

ggouaillardet
Copy link
Contributor

Refs. #13137

  • replace -framework foo with -Wl,-framework,foo
  • replace -dynamiclib with --shared when flang is used
  • use -Wl when needed

jsquyres
jsquyres previously approved these changes Mar 14, 2025
Copy link
Member

@jsquyres jsquyres left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed: now flang works for me on macos.

@jsquyres jsquyres marked this pull request as ready for review March 14, 2025 13:46
@jsquyres
Copy link
Member

Any reason not to merge and PR to v5.0.x?

Do we need this in v4.1.x, too?

@ggouaillardet
Copy link
Contributor Author

Currently the generated *.la files contains -Wl,-framework,foo instead of -framework foo regardless they were generated with a C or a Fortran compiler. FWIW, that did not break gfortran.

I hope I can improve that, but meanwhile, I let you judge whether this is ready for primetime.
Note I had to adjust the config/ltmain_flang_darwin.patch when moving from 5.0.x to main.
I only tested with homebrew provided autotools, and did not try the autotools we are using, so I cannot guarantee the generated tarball will be ok.

@ggouaillardet ggouaillardet force-pushed the topic/darwin_flang branch 2 times, most recently from 7f5ff2a to 161fc6f Compare March 17, 2025 04:01
Refs. open-mpi#13137

- replace -framework foo with -Wl,-framework,foo
- replace -dynamiclib with --shared when flang is used
- use -Wl when needed

Signed-off-by: Gilles Gouaillardet <[email protected]>
@ggouaillardet
Copy link
Contributor Author

The PR is much better now since the *.la generated files do not contain -Wl,-framework,foo but -framework foo as before. @jsquyres can you please give it a final review and merge it? I will then backport to the release branches after I double check the nightly tarball is can be used as-is on OSX.

Copy link
Member

@jsquyres jsquyres left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works!

@jsquyres jsquyres merged commit 42600bd into open-mpi:main Mar 23, 2025
15 checks passed
@ggouaillardet
Copy link
Contributor Author

Thanks Jeff!

The latest nightly tarball was generated on February 15th (!), can you please have a look?

@jsquyres
Copy link
Member

The latest nightly tarball was generated on February 15th (!), can you please have a look?

Yoinks... checking...

@jsquyres
Copy link
Member

Ok, should be fixed now.

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