-
Notifications
You must be signed in to change notification settings - Fork 46
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
error: unable to get target for 'riscv32imac-unknown-none-elf' #17
Labels
Milestone
Comments
cc @rust-embedded/riscv |
Makes me wish we had kept the rust arch name as "riscv" instead of "riscv32" ... but there is no nice solution here, the GNU toolchain insists it is "riscv32" or "riscv64" not "riscv". :-( |
Also working on this while I work on #15 |
japaric
added a commit
that referenced
this issue
Aug 25, 2018
infer the arch-name from the output of `rustc --print cfg` is more robust than just using the target name for the -triple flag. fixes #17
I noticed readelf is missing, how come?
…On Sat, Aug 25, 2018, 20:38 Jorge Aparicio ***@***.***> wrote:
Also working on this while I work on #15
<#15>
—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAtRr7UveBkJ0_D_DZeHeriOF0nbagThks5uUZmegaJpZM4VzRk_>
.
|
@dvc94ch probably because no one asked for it. You can send a PR to add it. You can use rust-lang/rust#51962 as a reference. |
Good to know. Put it on my Todo list, thanks.
…On Sun, Aug 26, 2018, 11:25 Jorge Aparicio ***@***.***> wrote:
@dvc94ch <https://github.com/dvc94ch> probably because no one asked for
it. You can send a PR to add it. You can use rust-lang/rust#51962
<rust-lang/rust#51962> as a reference.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAtRr3OWQC-Jd9H51jgA-2yRfp3RBouLks5uUmmJgaJpZM4VzRk_>
.
|
PR #19 fixes this |
bors bot
added a commit
that referenced
this issue
Aug 28, 2018
19: objdump: use -arch-name instead of -triple r=therealprof a=japaric infer the arch-name from the output of `rustc --print cfg` is more robust than just using the target name for the -triple flag. fixes #17 r? @rust-embedded/tools (anyone) cc @danc86 Co-authored-by: Jorge Aparicio <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
STR
$ cat src/lib.rs
The problem is that the triple passed to llvm-objdump is not a valid LLVM triple;
riscv32imac
is not a valid LLVM architecture name.A solution to this problem would be to use pass
-arch-name
, instead of-triple
, to llvm-objdump. The argument to pass would then have to be a valid LLVM architecture (seecargo objdump -- -version
) so we would need to map the Rust architecture (seerustc --target $T --print cfg
) into a LLVM architecture. We have to be careful with thethumbv*
targets which havetarget_arch: "arm"
but actually map to "thumb" LLVM architecture.The text was updated successfully, but these errors were encountered: