-
Notifications
You must be signed in to change notification settings - Fork 71
SuperH: cannot add block to an imported function
#419
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
Comments
Ok, I'll attempt to do this tomorrow. In the meantime, please follow the instructions here as the instructions linked from the wiki are outdated. I opened a PR to build a libgccjit cross-compiler for SuperH. In case you don't want to build a cross-compiling libgccjit yourself (although it's easy with |
I very much appreciate you looking into this. To clarify, the error above happens in all 3 scenarios: 1) following along with the old Dockerfile, 2) when I build an SH4 toolchain with our Sega Dreamcast toolchain building scripts but from your git repo's GCC sources, and 3) when using a toolchain built with |
Could you please share your Edit: A JSON target spec would also be useful, if you have one. Edit 2: Ok, I'm able to reproduce the issue locally. I'd still appreciate those files just to make sure. Edit 3: I'm not done investigating, but here are my results so far. This seems to be caused by the fact that some builtin functions are defined in this case. We can go further in the sysroot build by removing But then, I ran into this error which I'm not sure what to do about:
|
Here's what I'm using for
(in that patch dir I have this patch required for and my JSON target:
I can confirm on my end that removing |
The build.rs of libstd has an allow list of supported targets. You need to modify the source of libstd to add this target to the allow list. |
By commenting out When I get some time in the next few days I'll re-trace my steps here and put together instructions so others can follow along. Thank you both for your help, it is much appreciated! |
I'll go ahead and close this issue -- it seems that I've been using rustc_codegen_gcc to target the Sega Dreamcast for the past 3 or so weeks and it's been working very well! It's definitely a huge upgrade from the limited functionality of the I put together a tutorial on how to target Dreamcast here: https://dreamcast.wiki/Rust_on_Dreamcast Feel free to put any of that in the wiki under SuperH if you'd like. |
Nice! Btw, I saw this patch and that makes me wondered if you knew that arguments sent to |
You are right -- I had not realized this! |
Hi,
I'm attempting to get
rustc_codegen_gcc
to generate code for SuperH (specifically SH4) for Sega Dreamcast.I'm very interested in Rust on Dreamcast -- I am a maintainer for the KallistiOS Dreamcast toolchain and if I can get this working I'd add it to my regular testing. We've already done some interesting stuff with
gccrs
including a 3D cube demo calling C and Fortran functions but because it is in such early stages I'd like to see if we can userustc_codegen_gcc
instead.Unfortunately the SuperH dockerfile that was used to generate a rustc_codegen_gcc toolchain for Casio calculators (referenced in the wiki) no longer works, its author hasn't been able to update it, and trying to alter it to get it to work ended up resulting in this same error as I'm receiving now attempting the process manually from scratch.
When I run the
y.sh build
step, I receive the following error. Any ideas?The text was updated successfully, but these errors were encountered: