[v0.9] Set relocation-model: static and panic-strategy: abort and fix .intel_syntax warnings#185
Conversation
josephlr
left a comment
There was a problem hiding this comment.
I also ran into this bug (as a dependency for the blog_os project), this seems to resolve the issue.
|
Thanks a lot and sorry for the delay! Does this mean that the relocation model option was ignored before? Or was it renamed on the rustc side? |
I think it was being ignored, but that the the default (at least in this case) happened to be |
|
Hmm, from the rust source code it seems like the general default is pic: https://github.com/rust-lang/rust/blob/aadd6189ad5c81f50d942c584ed1c1b49892765f/compiler/rustc_target/src/spec/mod.rs#L1363. I haven't found anything yet that indicates that custom targets use static by default... |
Oh ya, you're definitely right, I guess things were working because |
|
Yeah, that's what I thought. So this PR (and #186) will effectively change the relocation model from |
relocation-model: static and panic-strategy: abort and fix .intel_syntax warnings
|
Published as v0.9.19. |
|
Sorry about that, should be fixed now! |
|
The release is now available 🎉 Thanks 👍 |
Hello, I get some warnings on the 0.9.18 version when compiling MOROS (https://github.com/vinc/moros)
And also
The fixes for
intel_syntaxandpanicalready exist for the main branch so I adapted them.I also removed
relocation_modelfrom the JSON target file and tested it on my OS with Bosch, QEMU, and VirtualBox but not yet on real hardware so I'm unsure about that one.Edit: I renamed the later to
relocation-modelto fix the warning thanks to @bjorn3 (see https://doc.rust-lang.org/rustc/codegen-options/index.html#relocation-model)