Closed darcagn closed 7 months ago
I figured out by checking @YakoYakoYokuYoku's AVR issue #406 that the proper fix here is to add the following:
default-jit.o: config/default-jit.cc
$(COMPILE) $<
$(POSTCOMPILE)
to gcc/Makefile.in
. As he plans on upstreaming that change, I'll close this issue as a duplicate and continue on in my quest. Thanks.
I've sent this to fix your issue, thanks for reporting anyways.
Hi all, I'm a Sega Dreamcast developer attempting to deliver Rust support to the platform (Dreamcast uses the SuperH SH4). I've already had some success creating a Rust demo on the Dreamcast using gccrs, but I would really like to get rustc_codegen_gcc working since it's much further along, as I understand it. I'm also a maintainer of the toolchain for our platform so if I can get this working, I'll create a configuration that I can help test over time.
I've tried to build @antoyo's GCC fork both with our own toolchain building scripts and also with crosstool-ng, but I receive the error
ld: cannot find default-jit.o: No such file or directory
I don't receive this error building libgccjit with standard GCC versions.
I can open
gcc/jit/default-jit.cc
and see that the only code it contains is:struct gcc_targetjitm targetjitm = TARGETJITM_INITIALIZER;
So as a workaround, I can open
gcc/config.gcc
and removedefault-jit.o
from the following section:so it no longer complains about the missing
default-jit.o
, and then findgcc/jit/jit-target.cc
and add the following code:and then it successfully compiles and functions (though I haven't managed to get Rust itself compiled with the resulting compiler yet, but I'll attempt to troubleshoot that next).