gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gm2] cross compile gm2 for rpi arm?


From: Gaius Mulley
Subject: Re: [Gm2] cross compile gm2 for rpi arm?
Date: Tue, 27 May 2014 12:20:35 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

Charles Bradshaw <address@hidden> writes:

> I see some attempts to do a native compile of gm2 on the pi, but this
> takes "> 7 days" !
>
> Surely it makes more sense to cross compile? After all, we could get
> errors during the 7 day run only to have to repeat N times before
> getting it to work.
>
> The purpose of RPI gm2 is to provide beginner programmers the
> opportunity to experience the "obvious!" advantages of Modula 2.
>
> Ultimately compiling anything non trivial (the whole purpose of Modula
> 2) on the RPI is fraught. The final step, therefore, is a cross gm2
> targeting the pi.
>
> Please help...
>
> On Sat, 2014-05-24 at 11:55 +0100, Charles Bradshaw wrote:
>> I have a successful install of crosstool-ng for the RPI arm processor.
>> 
>> During the configuration I see some options for compiling optional GNU
>> front ends, fortran etc, but not gm2.
>> 
>> My native gm2 is based on gcc 4.1.2
>> 
>> I'm hoping to cross compile gm2 using the arm tool chain from the above
>> install, but the gcc version is 4.7.2
>> 
>> $  arm-unknown-linux-gnueabi-gcc -v
>> ...
>> Thread model: posix
>> gcc version 4.7.2 (crosstool-NG 1.18.0)
>> 
>> 
>> I would be grateful if someone could give me some pointers how to cross
>> compile gm2 with the arm tool chain.

Hi Charles,

I like the idea of using crosstool-ng to generate a cross compiler for
the pi.  I'd start by building the C, C++ cross compilers (I suspect you
have done this).  Then I would unpack the gm2 4.1.2 branch and overlay
the gcc-4.1.2/gcc/gm2 tree on top of your crosstool-ng tree.  gm2 does
have a few patches for 4.1.2 - see the sub directories:
gcc-4.1.2/gcc/gm2/patches.  You may need to apply some of these.
After that I'd attempt to build gm2 using the cross tool source tree
carefully using the configure command which crosstool uses and just
adding gm2 as an extra language.

hope this helps,
Gaius



reply via email to

[Prev in Thread] Current Thread [Next in Thread]