dotgnu-general
[Top][All Lists]
Advanced

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

Re: [DotGNU]porting dotGNU to ARM


From: Rhys Weatherley
Subject: Re: [DotGNU]porting dotGNU to ARM
Date: Wed, 16 Apr 2003 22:11:42 +1000
User-agent: KMail/1.4.3

On Wednesday 16 April 2003 09:15 pm, imateos wrote:

> Before compiling the "pnet" package with the correct options, it is
> needed to compile the "treec" one, isn't it?

Yep.

> I've tried but when I try to execute "make for "treec" after executing
> the "configure", I obtained the next output:
>
> ../treec -o expr_c.c -h expr_c.h ./expr_c.tc
>
> ../treec: ../treec: cannot execute binary file

Ah!  I see the problem.  You need to compile treecc for the host system, not 
the cross-compiler target system, because treecc runs on the host.

So, compile treecc normally for your host platform, with no special CC 
redirections, and then "make install" that on your host.  Then configure pnet 
using the CC redirection.

You probably don't want to do a "make install" on pnet, because that will 
install it on your host, when you really want it to be installed on the 
target system.  You can use the "--prefix" option to configure to force it to 
install in a target-specific directory instead if you wish.

You probably do want to build and install a separate host installation of pnet 
so that you can build pnetlib on the host prior to copying the .dll's to the 
target system.  Here's the full script to get both host and target versions:

    # Build host treecc
    cd treecc
    ./configure
    make
    make install

    # Build host pnet
    cd pnet
    ./configure
    make
    make install

    # Build target pnet (separate copy in pnet-target)
    cd pnet-target
    CC=/usr/.../arm-linux-gcc ./configure --prefix=$HOME/target
    make
    make install

    # Build host pnetlib (using host version of cscc)
    cd pnetlib
    ./configure
    make
    make install

    # Copy host pnetlib to target
    cp -pr /usr/local/lib/cscc/lib $HOME/target/lib/cscc
    # (or you could build pnetlib again with --prefix=$HOME/target this time)

The host version will now be in /usr/local and the target in $HOME/target.

Cross-compiling is fun! :-)

Cheers,

Rhys.



reply via email to

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