-
Notifications
You must be signed in to change notification settings - Fork 1
Building RISC V Chez
The current Chez is being ported to RISC-V 64bits. The backend target is trv64le (threaded) and rv64le (non-threaded).
First we need to cross compile Chez using Mf-cross
.
Assuming we are on Linux, 64bits:
$ cd Chez
Chez/ $ ./configure && make
At this point we should have a a6le
folder with boot files and scheme binary. If you want to build with OS threads support, pass --threads
to ./configure
and then your folder should be ta6le
- if building on a x86_64
linux based system.
Then we call the cross compile Makefile
:
Chez/ $ cd ta6le/s
Chez/s $ make -f Mf-cross m=ta6le xm=trv64le Scheme="../../ta6le/bin/scheme -b ../../ta6le/boot/ta6le/petite.boot -b ../../ta6le/boot/ta6le/scheme.boot"
At the moment there is, I think, a bug in Mf-cross such that the include of the target makefile is done incorrectly and this file needs editing before it works.
At the moment, I am manually editing the include Mf-$(xm)
to include $(base)/s/Mf-$(xm)
.
Alternatively, I was pointed to https://programmingpraxis.com/2017/09/15/compile-chez-scheme-on-android-arm/ by @mflatt however this doesn't work at the moment failing when calling make on Mf-boot
:
$ make -f Mf-boot trv64le.boot
( cd .. ; ./workarea trv64le xc-trv64le )
( cd ../xc-trv64le/s ; make -f Mf-cross base=../../ta6le --jobs=2 m=ta6le xm=trv64le )
make[1]: Entering directory '/home/pmatos/Projects/ChezScheme-RISCV/xc-trv64le/s'
ln -s ../../s/patch.ss patch.ss
ln -s ../../s/cmacros.ss cmacros.ss
make[1]: *** No rule to make target 'machine.def', needed by 'cmacros.so'. Stop.
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/pmatos/Projects/ChezScheme-RISCV/xc-trv64le/s'
make: *** [Mf-boot:22: trv64le.boot] Error 2