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

remove MI_USE_LIBATOMIC and properly find libatomic #898

Closed
wants to merge 1 commit into from

Conversation

mojyack
Copy link

@mojyack mojyack commented May 16, 2024

In some systems, libatomic.so is at gcc specific dir(e.g. /lib/gcc/powerpc-unknown-linux-gnu/13), rather than the system library path.
In this case, find_library cannot find libatomic.
Use check_linker_flag to fix this, and remove unused MI_USE_LIBATOMIC option.
May fix #798

Tested in:
x86_64-pc-linux-musl
aarch64-unknown-linux-musl
armv6j-unknown-linux-musleabihf
powerpc-unknown-linux-gnu

daanx added a commit that referenced this pull request May 19, 2024
daanx added a commit that referenced this pull request May 19, 2024
…lag first before using find_library (see also issue #898
@daanx
Copy link
Collaborator

daanx commented May 19, 2024

Thanks so much! I refactored the cmake code to use the library flag check always first and fall back to find_library after that.

@daanx daanx closed this May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fails to build on mipsel / m68k / powerpc / sh4
2 participants