<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'><div>I suspect using Debian or Ubuntu is the quickest route to a suite of cross tools.</div><div><br></div><div><br></div><div> https://wiki.debian.org/CrossToolchains </div><div><br></div><div>at least to Linux, not necessarily to BSD/NT/Solaris/Mac.</div><div><br></div><div><br></div><div>We could add "support" to that -- having the default config notice</div><div>that host = is debian or ubuntu and host != target and target is linux and invoke those tools</div><div>and tell you to apt-get install whatever if they aren't present..</div><div><br></div><div><br></div><div>But I still think the "fair" / "flat" / "consistent" story is to make boot archives something like 3.6</div><div>and user then completes the build on the target with native tools.</div><div><br></div><div><br></div><div>We'd distribute like three archives per target:</div><div>   boot -- no binaries, all assembly/C source, to just cm3/libm3/m3core (not just cm3 like current) </div><div>   binmin -- binaries -- cm3, cm3cg (except for NT386), m3core (maybe just static), libm3 (ditto) </div><div>   binall -- all binaries, nothing to build </div><div><br></div><div><br></div><div>The C source might be somewhat target-independent, but getting it to be fully target-independent</div><div>I can't yet commit to.</div><div><br></div><div>binmin has a pretty narrow use case, maybe strike it </div><div> </div><div> - Jay<br><br><br></div><div><hr id="stopSpelling">From: jay.krell@cornell.edu<br>To: hendrik@topoi.pooq.com; m3devel@elegosoft.com<br>Date: Tue, 11 Aug 2015 22:33:22 +0000<br>Subject: Re: [M3devel] multi-threaded m3front?<br><br>

<style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}

.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}

--></style>
<div dir="ltr"><div>Hendrik: exactly</div><div><br></div><div><br></div><div>My longer blurbe from earlier.</div><div><br></div><div><br></div><div> > https://github.com/modula3/cm3/blob/master/m3-sys/m3cc/src/buildmany.sh</div><div><br></div><div><br></div><div><br></div><div>builds cm3cg for every target.</div><div><br></div><div><br></div><div>Seems like overkill, but which ones?<br>Do we make a bunch of single file downloads?<br>Notice how buildmany.sh is trivial.<br>m3cc/src/m3makefile does the "real" work, and it isn't complicated.<br>And, btw, I didn't write it. It's been there "forever".</div><div><br></div><div><br> https://github.com/modula3/cm3/blob/master/m3-sys/cminstall/src/config-no-install/cm3cfg.common </div><div><br></div><div> look for the lines: "for cross builds" </div><div><br></div><div> knows about the *unshipped* structure that </div><div><br></div><div> https://github.com/modula3/cm3/blob/master/m3-sys/m3cc/src/m3makefile </div><div><br></div><div> creates for cross cm3cg -- instead of host-target/cm3cg.</div><div><br></div><div><br> We could consider: <br>   always buildmany (all) and ship them <br>   and adapt cm3cg.common to look in the shipped location instead, <br>   like bin/target/cm3cg.</div><div><br></div><div><b><br></b></div><div><b><font size="5"> But is this useful though? <br> <br> <br>i.e. w/o the cross-c-compiler/linker/assembler? </font></b></div><div><br></div><div><br> There are larger problems. <br><b> "Many things are configurable".</b>  More than people often consider.<br> "Linux" could be using glibc, or eglibc, or newlib, etc. <br> For the most part, they are probably ABI-compatible. <br> But are they completely? <br> Is struct stat always the same? <br> Do all the libcs even have pthreads? (I doubt lacking pthreads is a useful system though.)</div><div><br></div><div><br> This is why, btw, I had proposed, like m3core/src/thread/<b>linux.</b></div><div><br></div><div><br> to replace, on Linux, m3core/src/PTHREAD, <br> to skip through the varying libc's and go to the less varying kernel. <br> The futexes and clone and all that. </div><div><br></div><div><br> Maybe research the packages that Debian and Gentoo have? <br> And just recommend whatever apt-get, and invoke gcc/ld/as by the names <br> we know they use? </div><div><br></div><div><br>They likely have mingw in there, so you can cross from Linux to NT.</div><div><br></div><div><br>I believe Debian has a general story btw, of using cross building compilers to<br>bootstrap, but then giving up on cross building otherwise. Too many autoconf's depend on being native builds.<br>And using qemu if it is faster than the native hardware.</div><div><br></div><div><br>Really, I think the problem is cross compilation of C. Solve/automate that, and finishing<br>the Modula-3 work shouldn't be difficult.</div><div><br></div><div><br> You can go the other way, but I don't want to: <br>  - eliminate all C (undoing everything I did in m3core/src/unix) <br>  - write all integrated backends <br>  - write our own linker  <br>  - including writing our own startup code and pthreads (the futex/clone proposal) </div><div><br></div><div><br></div><div>But if you look into this, esp. the startup code and syscall stubs, you realize it is a very large task</div><div>for very little payoff. </div><div><br></div><div><br></div><div> - Jay<br><br><br><br><br></div><div>> Date: Tue, 11 Aug 2015 16:57:21 -0400<br>> From: hendrik@topoi.pooq.com<br>> To: m3devel@elegosoft.com<br>> Subject: Re: [M3devel] multi-threaded m3front?<br>> <br>> On Tue, Aug 11, 2015 at 06:56:03PM +0000, Jay K wrote:<br>> >  The problem with cross compiling is you need: <br>> >   a working cross-compiler for C/C++  <br>> <br>> Slightly clumsier is just haveing a C/C++ compiler on the target system.<br>> But it's often easier to get that than a cross-compiler. <br>> <br>> -- hendrik<br>> <br>> _______________________________________________<br>> M3devel mailing list<br>> M3devel@elegosoft.com<br>> https://mail.elegosoft.com/cgi-bin/mailman/listinfo/m3devel<br></div>                                        </div>
<br>_______________________________________________
M3devel mailing list
M3devel@elegosoft.com
https://mail.elegosoft.com/cgi-bin/mailman/listinfo/m3devel</div>                                           </div></body>
</html>