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

Undefined reference to compare_and_swap #150

Open
peacememories opened this issue Sep 21, 2019 · 5 comments
Open

Undefined reference to compare_and_swap #150

peacememories opened this issue Sep 21, 2019 · 5 comments

Comments

@peacememories
Copy link

When I try to use AtomicBool::compare_and_swap I get the following linker error:

undefined reference to `__sync_val_compare_and_swap_1'

Is the compare_and_swap intrinsic not implemented in this compiler, or is there something I could do to fix this?

@dylanmckay
Copy link
Member

Perhaps similar to rust-lang#58500

@dylanmckay
Copy link
Member

@peacememories would you please be able to attach an LLVM IR file so I can reproduce this?

@peacememories
Copy link
Author

I’d be glad to. Where do I find the relevant files you need? :)

@Rahix
Copy link

Rahix commented Sep 28, 2019

Generate them with cargo rustc ... -- --emit=llvm-ir -o<...> (if I recall everything correctly)

@peacememories
Copy link
Author

Okay, sadly I think I'll have to fix my rust-avr installation before I can do that. In my effort to eliminate error sources I updated it and it's broken right now (see #151)

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

No branches or pull requests

3 participants