Re: Cross compiling

Bernd Paysan <[email protected]> Sun, 28 Feb 2021 18:51:04 +0100
Newsgroups gmane.comp.lang.forth.gforth
Message-ID <2050464.lfZdBJBsjK@liubei>
Am Sonntag, 28. Februar 2021, 17:04:16 CET schrieb Francesco Ariis:
> Hello forthers,
> 
>     I was reading the manual section on cross-compiling [1], but the
> documentation seems a bit outdated (e.g. `kernl-8086.fi` target is not
> present in my `gforth-0.7.3`).

Yes, it is. It's a kernl-%.fi: target. It will expand to

./preforth -p ".:~+:." -e 's" arch/8086/mach.fs"' ./kernel/main.fs -e "save-
cross kernl-8086.fi- /usr/local/bin/gforth-0.7.3 bye"

> I tried:
> 
>     s" ../mach16l.fs"  ok
>     include main.fs
>     in file included from main.fs:43
>     ../cross.fs:1160: No such file or directory
>     U<<<@
>     Backtrace:
>     $7F984F9A4A08 throw
> 
> Generally speaking, how difficult is it to cross compile the interpreter
> for another architecture?
> Can I do that even for older hardware as the Z80 or the Sharp LH79520?
> Or would I be better off bootstrapping forth myself in assembly?

For such older hardware, you need to port an assembler and the primitives 
(which is exactly what Klaus Kohl-Schöpe did for the 8086).

-- 
Bernd Paysan
"If you want it done right, you have to do it yourself"
net2o id: kQusJzA;7*?t=uy@X}1GWr!+0qqp_Cn176t4(dQ*
https://net2o.de/
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEERJ1NDqPQRwYnwBjr9y2Uk5MtoGcFAmA72AgACgkQ9y2Uk5Mt
oGfJkg//Y1cIARRqzK8LBEBfTHZFClGnOA6KrwsrCKsmS16PDHfmN59nZ+vyCbhh
RkGuq+hij5qKsl72yk7JFcjoqdlA1bhpJi99pOm2hGEF4GyzTF4b3f9Z9DSOSGrg
EjD1YBtPEWQRqCRE47TvYhdMIAE9fXIwjLeLPM/pKb42KtOWzgTRQEoWHY+GTuyB
awrykZJP6FhtLRhbBiJT+i6Bqqs3/rEEBu2lvFPJFIMoaiyFFhZkvOotAPYsW21+
aXwNCQ1wAjlFIDJkUXJrFRs+W/NSbVaQhNCG+UaQT+msDVdIVjzNXVjMlc199QXF
F7Xng6Qna0jALQMZxCHCIkKAaEHE9RgVwebr2NLeGcBjRAHidJ9UrPa1mfjBdHlC
uAki8yYLq0YD46TOoRBb2geWWgWNtIlyFjY8xPIM8CvF000oWk46BLWOq5sNqeud
W6t/tUhVC//dVvoHpF62ZpTtijFil3JJrMC9jo0stShCfW+s8pBbULUezh8umTDf
5Iv6JxC9CF15wkWWp9pntehndaEP/XURs5trZ5oByCAgFji/WvfyznHDisJVolnr
sjsrg6x+2P16pHsONW5t/EgRhCzbjLkgVpYihVnoG55TxmLy4HWxjbwUbGdmIAtV
K9qXfc3BfqXvhOrAkbiDVyll/n4ClOGQXwKPsGxZ08frXkjcsv0=
=4lHY
-----END PGP SIGNATURE-----