Skip to content

__atomic_load_8 might not be available on some platforms #339

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

Open
antoyo opened this issue Sep 20, 2023 · 4 comments
Open

__atomic_load_8 might not be available on some platforms #339

antoyo opened this issue Sep 20, 2023 · 4 comments

Comments

@antoyo
Copy link
Contributor

antoyo commented Sep 20, 2023

https://users.rust-lang.org/t/for-arc-elf32-target-get-undefined-reference-to-debug-lower-hex-when-using-alloc-crate/99234/16

@antoyo antoyo mentioned this issue Oct 18, 2023
@antoyo
Copy link
Contributor Author

antoyo commented Oct 22, 2023

@jonathanbcarlson: I have the feeling there's nothing to be done on the codegen side.
I think you should just set the appropriate max-atomic-width in your target spec JSON file.
Can you please try and see if it works for you?

Btw, I also made the cross-compilation case much easier with this PR.
You can see the updated instructions and I'll soon write some instructions on how to build a cross-compiler easily with crosstool-ng in this repo.

It might not be easy for now to use a target spec file, but I'll fix this soon.

I hope this helps!

@jonathanbcarlson
Copy link

@antoyo, thanks for all the improvements!
I'm pretty busy this week but I'll have more time in the coming weeks to try the changes out.

@antoyo
Copy link
Contributor Author

antoyo commented Oct 24, 2023

Good.
With this PR it should now be possible to use a target specification file.

@antoyo
Copy link
Contributor Author

antoyo commented Oct 27, 2023

I tried to do a test with a different arch in the target specification file and I'm unable to compile a project. It gives this error:

  = note: /opt/m68k-unknown-linux-gnu/bin/../lib/gcc/m68k-unknown-linux-gnu/13.0.0/../../../../m68k-unknown-linux-gnu/bin/ld: unknown architecture of input file `/tmp/rustcEH8UCo/symbols.o' is incompatible with m68k output

Is this why this wrapper was used for?

I'd like to make the experience as simple as possible. I think now that most patches in this repo aren't necessary anymore.
Also, I believe most flags you need to send to gcc can be added with -C llvm-args which sends the args to gcc with context.add_command_line_option().

When you have time, we can take a look at fixing that and whatever else is missing.

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

2 participants