This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Problem when building a crosscompiler for arm-linux target


 Hello Yves,
and thank you for the reply.
This is interesting:
followed your instructions and end up with the same problem.

The steps needed to build the toolchain and kernel are according to my
findings/guessings.

1. build the toolchain for arm-linux
1a   binutils 
1b   crosscompiler for the target without libc support so it is possible to
build glibc later. 
Note, I have copied the LINUX header files according to instructions.
	depending on configuration, ie with or with out newlib.
	I allways end up with the same problem crti.o not found.
	with the '--with-newlib' option at configure time I don't have
        add '-Dinhibit_libc' when building.
        Without the '--with-newlib' option at configure time I have to
        add '-Dinhibit_libc' to a few make variables in the Makfile
        in the gcc directory.
  This makes me wonder what with-newlib really does/means.

1c   glibc
1d   crosscompiler again this time with glibc support.

2 compile the kernel

3 compile all other stuff needed

/david Westberg


-----Original Message-----
From: Yves Rutschle
To: 'David Westberg'; 'crossgcc@sources.redhat.com'
Sent: 2/7/01 12:30 PM
Subject: RE: Problem when building a crosscompiler for arm-linux target


Hello David,

> Building the Crosscompiler is the problem. Configuring goes 
> without any
> problem.
> mkdir gcc-20010205-cross
> cd gcc-20010205-cross
> .../gcc-20010205/configure --host=i586-pc-linux-gnu --target=arm-linux
> --prefix=/home/davwes/ipaq/tools --disable-threads 
> --with-cpu=strongarm110
> --enable-languages=c --with-newlib
> make all-gcc
> 
> the build stops with the following message:

--with-newlib is to compile with, well, newlib, which isn't what
you want for arm-linux (linux will require glibc. I think you can
use other libs instead, but let's start with the standard things :) ).

At the same time, the compiler needs to know about your
linux kernel (to interface properly to system calls and that
kind of things).

Therefore, before compiling gcc, you have to unpack and configure
a linux kernel. This will provide you with a bunch of headers
(in linux/include), some of which are needed to compile the compiler.
Just copy linux/include/asm and linux/include/linux to
$prefix/$target/include
(would be /home/davwes/ipaq/tools/arm-linux/include in you case, I
think).

And then you can configure and 'make all-gcc LANGUAGES="c"' should
work fine.

Good luck,
Yves

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]