public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* problems building an ARM cross-compiler
@ 2001-09-20 20:27 Brian Young
  2001-09-28 17:11 ` Alexandre Oliva
  0 siblings, 1 reply; 2+ messages in thread
From: Brian Young @ 2001-09-20 20:27 UTC (permalink / raw)
  To: gcc-help

I'm attempting to build a linux x86 hosted cross-compiler targetting
an ARM platform.  I've tried arm-aout and arm-linux (I'd heard arm-elf
was a bit rough).

The directory structure I'm working from looks like:

drwxrwxr-x   14 brian    brian        4096 Sep 19 23:18 binutils-2.11.2
-rwxrw-r--    1 brian    brian         661 Sep 20 23:17 build
drwxrwxr-x   16 brian    brian        4096 Aug 19 23:53 gcc-3.0.1
drwxrwxr-x   15 brian    brian        4096 Sep 19 23:12 gdb-5.0
drwxrwxr-x    9 brian    brian        4096 Sep 20 00:52 install
drwxr-xr-x    7 brian    brian        4096 Dec 14  2000 newlib-1.9.0

Here's the script ('build') I've been using to build:

==============
TARGET=arm-linux
PREFIX=$PWD/install

PATH=$PREFIX/bin:$PATH

# binutils
rm -rf build-binutils
mkdir build-binutils
cd build-binutils
../binutils-2.11.2/configure --target=$TARGET --prefix=$PREFIX -v
make all install
cd ..

# gcc
rm -rf build-gcc
mkdir build-gcc
cd build-gcc
../gcc-3.0.1/configure --target=$TARGET --prefix=$PREFIX -v
make all install
cd ..
==============

When I try arm-aout for TARGET I get a failure when building gcc (binutils
appears to build fine):

==============
Testing libgcc1.  Ignore linker warning messages.
/home/brian/home/gcc-arm/build-gcc/gcc/xgcc -B/home/brian/home/gcc-arm/build-gcc/gcc/ -B/home/brian/home/gcc-arm/install/arm-aout/bin/ -B/home/brian/home/gcc-arm/install/arm-aout/lib/ -isystem /home/brian/home/gcc-arm/install/arm-aout/include -DCROSS_COMPILE -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include  libgcc1-test.o -o libgcc1-test \
  -nostartfiles -nostdlib `/home/brian/home/gcc-arm/build-gcc/gcc/xgcc -B/home/brian/home/gcc-arm/build-gcc/gcc/ -B/home/brian/home/gcc-arm/install/arm-aout/bin/ -B/home/brian/home/gcc-arm/install/arm-aout/lib/ -isystem /home/brian/home/gcc-arm/install/arm-aout/include --print-libgcc-file-name`
/home/brian/home/gcc-arm/install/arm-aout/bin/nm: libgcc1-test: File in wrong format
collect2: /home/brian/home/gcc-arm/install/arm-aout/bin/nm returned 1 exit status
make[1]: *** [libgcc1-test] Error 1
make[1]: Leaving directory `/home/brian/home/gcc-arm/build-gcc/gcc'
make: *** [all-gcc] Error 2
==============

When I try arm-linux I also get a build failure in gcc:

==============
/home/brian/home/gcc-arm/build-gcc/gcc/xgcc -B/home/brian/home/gcc-arm/build-gcc/gcc/ -B/home/brian/home/gcc-arm/install/arm-linux/bin/ -B/home/brian/home/gcc-arm/install/arm-linux/lib/ -isystem /home/brian/home/gcc-arm/install/arm-linux/include -O2  -DCROSS_COMPILE -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include  -fomit-frame-pointer -fPIC -g0 -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I../../gcc-3.0.1/gcc -I../../gcc-3.0.1/gcc/. -I../../gcc-3.0.1/gcc/config -I../../gcc-3.0.1/gcc/../include -DL_dvmd_lnx -xassembler-with-cpp -c ../../gcc-3.0.1/gcc/config/arm/lib1funcs.asm -o libgcc/./_dvmd_lnx.o
../../gcc-3.0.1/gcc/config/arm/lib1funcs.asm:633:24: asm/unistd.h: No such file or directory
make[2]: *** [libgcc/./_dvmd_lnx.o] Error 1
make[2]: Leaving directory `/home/brian/home/gcc-arm/build-gcc/gcc'
make[1]: *** [libgcc.a] Error 2
make[1]: Leaving directory `/home/brian/home/gcc-arm/build-gcc/gcc'
make: *** [all-gcc] Error 2
===============

Can any kind soul shed any light on either of these problems?

Eventually I'd like to be able to build an ARM executable of some
sort and run it under the gdb ARM simulator.  Is what I'm doing
crazy?  What target might be best for this?

Later,
Brian.

-- 
brian@tildeslash.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: problems building an ARM cross-compiler
  2001-09-20 20:27 problems building an ARM cross-compiler Brian Young
@ 2001-09-28 17:11 ` Alexandre Oliva
  0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Oliva @ 2001-09-28 17:11 UTC (permalink / raw)
  To: Brian Young; +Cc: gcc-help

On Sep 21, 2001, Brian Young <brian@tildeslash.org> wrote:

> /home/brian/home/gcc-arm/install/arm-aout/bin/nm: libgcc1-test: File in wrong format

Dunno about this one.

> ../../gcc-3.0.1/gcc/config/arm/lib1funcs.asm:633:24: asm/unistd.h: No such file or directory

You need kernel and glibc headers to build a *-linux-gnu target.

> Eventually I'd like to be able to build an ARM executable of some
> sort and run it under the gdb ARM simulator.

Try arm-elf, and make sure you get newlib too.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-09-28 17:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-20 20:27 problems building an ARM cross-compiler Brian Young
2001-09-28 17:11 ` Alexandre Oliva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).