comp.lang.ada
 help / color / mirror / Atom feed
From: Stephane Carrez <stcarrez@nerim.fr>
To: Wojtek Narczynski <wojtek@power.com.pl>
Subject: Re: Building GCC 3.3 cross compiler
Date: Fri, 06 Jun 2003 22:00:23 +0200
Date: 2003-06-06T22:00:23+02:00	[thread overview]
Message-ID: <3EE0F2D7.3070405@nerim.fr> (raw)
In-Reply-To: 5ad0dd8a.0306060826.4a691bb3@posting.google.com

Hi!

Wojtek Narczynski wrote:
> Hello,
> 
> Has anybody managed to build GCC 3.3-release cross compiler with Ada
> support? I'm getting various errors. My host = i686-linux, target =
> arm-linux. I'm trying to build it for Sharp Zaurus.
> 
> For example:
> 
> make[2]: Entering directory `/usr/src/packages/BUILD/gcc-3.3-obj/gcc'
> ./gengenrtl -h > tmp-genrtl.h
> /bin/sh: line 1: ./gengenrtl: cannot execute binary file
> 
> linux:/usr/src/packages/BUILD/gcc-3.3-obj # file gcc/gengenrtl  
> gcc/gengenrtl: ELF 32-bit LSB executable, ARM, version 1 (ARM),
> dynamically linked (uses shared libs), not stripped
> 
> Would CVS sources from ACT or GNU give me a better chance for success?
> 
> Regards,
> Wojtek

How did you configured and built gcc?

It seems that it uses the target compiler (arm) to create the host gcc tools.
gengenrtl and the like should be compiled by the native compiler.  Not the cross compiler.

I can't tell much about arm-linux but to create the 68HC11 cross compiler
I use the following:

1/ I make sure that the native Ada compiler is in my path
    (I'm using gcc 3.3, compiled with --enable-languages=c,c++,ada)
    Check this with 'gcc -v', you should see something like:

/usr/local/3.3/bin/gcc -v
Reading specs from /usr/local/3.3/lib/gcc-lib/i686-pc-linux-gnu/3.3/specs
Configured with: ../gcc-3.3/configure --enable-languages=c,c++,ada --prefix=/usr/local/3.3
Thread model: posix
gcc version 3.3

2/ I make sure that the target (68HC11) binutils are available in my path too

3/ Configure the cross compiler:

    ./configure --target=m6811-elf --enable-languages=c,ada --prefix=m6811-elf-

4/ Build the stuff

    make
  or
    make bootstrap

  [Note: I don't remember if 'make bootstrap' works for building a cross compiler;
         It is absolutely mandatory when building a native compiler]

For an arm, it should be fairly similar,

Hope this helps,
	Stephane

-- 
         Home                           Office
E-mail: stcarrez@nerim.fr              Stephane.Carrez@solsoft.com
WWW:    http://stcarrez.nerim.net      http://www.solsoft.com
         Free the Software!             Simplifying Security Policy Management




  reply	other threads:[~2003-06-06 20:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-06 16:26 Building GCC 3.3 cross compiler Wojtek Narczynski
2003-06-06 20:00 ` Stephane Carrez [this message]
2003-06-07 13:22   ` Wojtek Narczynski
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox