[M3devel] Well, I'm impressed!
mika at async.caltech.edu
mika at async.caltech.edu
Wed Oct 16 00:49:49 CEST 2013
Jay,
Yes I am impressed!
raspberrypi:/big/home/mika/xxx# cat Hello.m3
MODULE Hello EXPORTS Main;
IMPORT IO;
BEGIN
IO.Put("Hi!\n");
END Hello.
raspberrypi:/big/home/mika/xxx# cm3
--- building in ARMEL_LINUX ---
new source -> compiling Hello.m3
-> linking prog
raspberrypi:/big/home/mika/xxx# ARMEL_LINUX/prog
Hi!
raspberrypi:/big/home/mika/xxx#
It's slow, that's for sure... not done rebuilding the compiler yet.
A few notes:
I'd say the hardest thing for me to figure out was actually how to upgrade
the compiler on the AMD64 system. When I tried to rebuild cm3 first,
I got tons of errors. When I tried to rebuild cm3cg first, I also got
tons of errors! What gives? Well... you can do it by realizing that
while upgrading cm3 makes a broken compiler, it's still good enough to
run the bit of quake code needed to recompile cm3cg.
Or you can compile cm3cg, and keep it around, not install it, and
then recompile cm3, and only at that point copy cm3cg into place.
That works too.
Then recompile everything with the matching toolsets.
To be honest I wouldn't even have been able to guess a method to solve
this problem without reading between the lines of your emails. Totally
non-obvious.
On the Raspberry, yes, you were right, the jmpbuf was wrong size. I already
fixed this in Target.m3 (committed to CVS). I added some extra padding for
good measure. "49" looks too weird. 64 it is.
I had to update ARMEL_LINUX config file to have
M3_BACKEND_MODE="C"
M3_FRONT_FLAGS += ["-unfold_nested_procs"]
I noticed things are VERY touchy with versioning at this point.
Everything has to match closely (much more so than I'm used to with
Modula-3) to bootstrap properly.
The fact that cm3cg/m3cc won't build right on MIPSEL_LINUX is a big
hassle. It's in pkginfo.txt. Then it's in build2.sh. Then it's in
various other places. It has to be removed from everywhere before
rebuilding.
Finally, SYSTEM_CC and SYSTEM_AS are set up for cross building in the
configs. That leads to a ton more editing (as the settings propagate
to a few places).
The system is slow but does seem to work. It's not through building
anything much yet, it looks like it will run for the rest of the day.
Thanks for some very good work, Jay. This seems very promising, but of
course I can't promise I won't be emailing m3devel a lot more soon.
Is there anything I can do, assuming all works well, to upload an
archive or something, to let other intrepid Raspberry users skip most
of the steps?
Mika
~
~
~
~
More information about the M3devel
mailing list