[M3devel] INTEGER vs. LONGINT vs. Target.Int in m3cg?

Jay K jay.krell at cornell.edu
Fri Oct 1 13:30:52 CEST 2010


Yes and no. For most people's point of view, no.


I regularly cross build just enough to build cm3 -- m3core/libm3/m3quake/cm3/m3middle/m3front/m3linker.


The missing pieces:
  - you can't the entire system, there are a small number of errors
  - What this is doing is getting as far as generating assembly source.
   Assemble, compiler C (including having C library headers), link C (including having C libraries) are left
  as an exercise, and is of varying difficulty.


If you want to cross to Linux, then it isn't too difficult. But I haven't done it much.
If you want to cross to mingw or cygwin it probably isn't too difficult.
If you want to cross to NetBSD, it probably isn't too difficult.
But all these "isn't too difficult" aren't necessarily the same.


The problem is needing a cross C compiler, cross assembler, cross linker, C libraries and C headers.
A cross C compiler that only generates assembly is as easy as Modula-3 -- use gcc.
Cross assembler and linker can often but not always be GNU binutils.
C libraries and C headers can be glibc or newlib or uclibc, shouldn't be too difficult.
For other systems, you copy /usr/lib and /usr/include.
  I have cross compiled to Solaris from Cygwin for example, and from something (I forgot) to Irix I think.
  I have a cross compiler for alpha-vms on my Mac. But finding the headers/libraries was a bit challenging.


On the other hand, on systems like Fedora, Gentoo, Debian, people are somewhat busy as I understand providing
prebuilt cross toolset packages, apt-get install whatever.


As well for iPhone and Android the "native" toolsets are cross.
So these should be easy.


Android looked a bit daunting to get started with though.
I haven't so much as done hello world in Java or C running in an emulator or on hardware.
If someone can walk me through hello world in C running in an emulator, I'd be in a better position to get Modula-3 there.


I also find anything that involves Eclipse daunting. There are too many to choise from, and while I like
that they have an install-free option, it is nice to have an installer when first starting out.



Now then, there is the question of what should Modula-3 distribution format be?
I think the 3.6 format is a good model to strive for.
Distribute a bunch of assembly files and assemble, compile C, link, on the target.
That equates to "useful to just Jay" becoming more useful.
However Olaf's point is valid. We'd need just one 64bit host to cross build all the 64bit distributions.
And there is other work needed to make this so.
 Mainly some scripting to package stuff up.
  Actually Olaf's "workspace" packages might be close to it. But I really don't like there
  being cm3-ws-web, cm3-ws-games, cm3-ws-comm, etc. Too many. Confusing.
 I want just one cm3-target.tar.gz, and I want the web page to sniff my browser
  and point me at the right one (like Firefox download does). Really, I find our
  download pages very hard to wade through. Huge lists of stuff to download.

Anyway.


 - Jay

----------------------------------------
> From: dragisha at m3w.org
> To: jay.krell at cornell.edu
> Date: Fri, 1 Oct 2010 13:17:16 +0200
> CC: m3devel at elegosoft.com
> Subject: Re: [M3devel] INTEGER vs. LONGINT vs. Target.Int in m3cg?
>
> Can we cross-develop on regular basis now?
>
> For example, I would like to develop for Android (what happened with
> it?) and just upload packages.
>
> Possible?
>
> On Fri, 2010-10-01 at 10:17 +0000, Jay K wrote:
> > Huh? You mean hack, cross once, unhack?
> > I want to cross build as a regular occurence. The entire system.
> > I already do actually. But currently only enough to get cm3.
> > The problems occur if you try to build the entire system.
> > Ok, right, I left one of the hacks in actually.
> > Like TEXTs have a 2GB size limit or such.
> --
> Dragiša Durić 
>
 		 	   		  


More information about the M3devel mailing list