<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'> Cool. <br><br><br> > to upload an archive or something, to let other intrepid Raspber <br><br><br> scripts/make-dist.py ?<br> And then you can scp the results to modula3.elegosoft.com/var/www/cm3/uploaded-archives. <br><br><br> Feel free to do that for whatever are your favorite systems, maybe switching<br> them to the C backend as you go. :)<br><br><br> > SYSTEM_CC and SYSTEM_AS are set up for cross building <br><br> <br> Only for ARM. I thought only ARM_DARWIN. <br> I guess that wasn't ideal in retrospect. <br> Or rather, there is more work to do here, so we have<br> a complete native and cross story with reasonable ease of use. <br> I am so tempted to throw out quake and the config files and just<br> generate a little automake/autoconf/cmake input and let them<br> deal with it.. <br><br> <br> > MIPSEL_LINUX <br><br><br> Why is MIPS relevant? <br> I guess I didn't get far there, on my Loongson I replaced Debian with OpenBSD. <br> Anyway, with the C backend, it likely just works.<br><br><br> Did you mean ARMEL_LINUX? And the pragma thing? I fixed that. <br> Problem is, when upgrading cm3cg, one I guess should build for every target, to catch this. <br> I guess I should do that. But this is hopefully going away. <br> I built some cm3cg backends last night..and hit OpenBSD missing in 4.7..<br><br><br> > I'd say the hardest thing for me to figure out was actually how to upgrade<br><br><br> Upgrade.py?<br><br><br> The version sensitivity has always been there, it is just that we go long durations<br> without changing things. But things are changable and do get changed. Tony added LONGINT <br> and the atomics. Good. And upgrade.py deals with that. <br> I modified the M3CG enum slightly. Upgrade.py deals with that. <br><br><br> It isn't a bunch of special cases, it is just a particular ordering. <br> We depend on a working system to give us cm3, m3core, and libm3. <br> That is all you need for a native upgrade. <br><br><br> One thing upgrade.py is touchy about is, that someone hit recently,<br> is that I replaced upgrade.h's uname use with looking at what cm3's host is.<br> But older cm3 doesn't report it. So he didn't use ugprade.py. <br><br><br> If you don't have native cm3, then you can cross build cm3. <br><br><br> You went through both of those paths. Good! <br> I'm hoping additional people can become comfortable with this, so more people <br> can work on it. <br><br><br> And maybe we need to restructure some. In particular, upgrade should not be so in-place. <br> make-dist.py does this better -- it builds a whole new system, but w/o changing the <br> existing one at all. At the end you can copy the new onto the old. <br><br><br> Realize upgrade.py was based on upgrade.sh, for better and worse. <br> I did miss that upgrade.sh built everything and not just cm3/m3core/libm3, so upgrade.py <br> doesn't build everything. <br><br><br> > Finally, SYSTEM_CC and SYSTEM_AS are set up for cross building in the<br> > configs. That leads to a ton more editing (as the settings propagate<br> > to a few places).<br><br><br> There is a version of cm3.cfg that reachs back into the CVS checkout. <br> I did that as a response to my often editing the wrong files. <br> But this also is hazardous sometimes wrt upgrade, sometimes these<br> need to be separate. <br><br><br> - Jay<br><br><br><div>> To: m3devel@elegosoft.com; jay.krell@cornell.edu<br>> Subject: Well, I'm impressed!<br>> Date: Tue, 15 Oct 2013 15:49:49 -0700<br>> From: mika@async.caltech.edu<br>> <br>> Jay,<br>> <br>> Yes I am impressed!<br>> <br>> raspberrypi:/big/home/mika/xxx# cat Hello.m3 <br>> MODULE Hello EXPORTS Main;<br>> IMPORT IO;<br>> <br>> BEGIN<br>> IO.Put("Hi!\n");<br>> END Hello.<br>> raspberrypi:/big/home/mika/xxx# cm3 <br>> --- building in ARMEL_LINUX ---<br>> <br>> new source -> compiling Hello.m3<br>> -> linking prog<br>> raspberrypi:/big/home/mika/xxx# ARMEL_LINUX/prog <br>> Hi!<br>> raspberrypi:/big/home/mika/xxx# <br>> <br>> It's slow, that's for sure... not done rebuilding the compiler yet.<br>> <br>> A few notes:<br>> <br>> I'd say the hardest thing for me to figure out was actually how to upgrade<br>> the compiler on the AMD64 system. When I tried to rebuild cm3 first,<br>> I got tons of errors. When I tried to rebuild cm3cg first, I also got<br>> tons of errors! What gives? Well... you can do it by realizing that<br>> while upgrading cm3 makes a broken compiler, it's still good enough to<br>> run the bit of quake code needed to recompile cm3cg.<br>> <br>> Or you can compile cm3cg, and keep it around, not install it, and<br>> then recompile cm3, and only at that point copy cm3cg into place.<br>> That works too.<br>> <br>> Then recompile everything with the matching toolsets.<br>> <br>> To be honest I wouldn't even have been able to guess a method to solve<br>> this problem without reading between the lines of your emails. Totally<br>> non-obvious.<br>> <br>> On the Raspberry, yes, you were right, the jmpbuf was wrong size. I already<br>> fixed this in Target.m3 (committed to CVS). I added some extra padding for<br>> good measure. "49" looks too weird. 64 it is.<br>> <br>> I had to update ARMEL_LINUX config file to have<br>> <br>> M3_BACKEND_MODE="C"<br>> M3_FRONT_FLAGS += ["-unfold_nested_procs"]<br>> <br>> I noticed things are VERY touchy with versioning at this point.<br>> Everything has to match closely (much more so than I'm used to with<br>> Modula-3) to bootstrap properly.<br>> <br>> The fact that cm3cg/m3cc won't build right on MIPSEL_LINUX is a big<br>> hassle. It's in pkginfo.txt. Then it's in build2.sh. Then it's in<br>> various other places. It has to be removed from everywhere before<br>> rebuilding.<br>> <br>> Finally, SYSTEM_CC and SYSTEM_AS are set up for cross building in the<br>> configs. That leads to a ton more editing (as the settings propagate<br>> to a few places).<br>> <br>> The system is slow but does seem to work. It's not through building<br>> anything much yet, it looks like it will run for the rest of the day.<br>> <br>> Thanks for some very good work, Jay. This seems very promising, but of<br>> course I can't promise I won't be emailing m3devel a lot more soon.<br>> <br>> Is there anything I can do, assuming all works well, to upload an<br>> archive or something, to let other intrepid Raspberry users skip most<br>> of the steps?<br>> <br>> Mika<br>> ~<br></div> </div></body>
</html>