Subject: egcs compilation

From: Chris Rutter <[email-masked]>
Date: Wed, 24 Feb 1999 21:02:05 +0000 (GMT)

Okay; applied latest egcs patches to egcs 1.1.1.

    % ./configure --target=arm-linux --prefix=/usr
    % cd gcc; make LANGUAGES="cc"

Eventually I get an abort with:

    libgcc1.S:430: asm/unistd.h: No such file or directory

which I presume means I need the ARM headers somewhere, so it can
get the syscall numbers.  Can someone tell me where I can find
instructions on which to do; it looks like I more or less follow
the section "If you are building on a Linux/ARM system...", except
that I'm running i386 Linux.  Any ideas?

-- 
Chris <[email-masked]>                         ( http://www.fluff.org/chris )

unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: Philip Blundell <[email-masked]>
Date: Wed, 24 Feb 1999 22:11:58 +0000

>get the syscall numbers.

That's right.  Unpack the sources somewhere and make the appropriate symlinks 
into /usr/arm-linux/include/{asm,linux}.  You need to configure the kernel 
tree too.

>that I'm running i386 Linux.  Any ideas?

Actually, I probably intended to write `if you're building *for* a Linux/ARM 
system' there.  You do indeed want to follow those instructions except that 
obviously the kernel in /usr/src/linux is unlikely to be the one you want.

p.

---

From: Chris Rutter <[email-masked]>
Date: Wed, 24 Feb 1999 22:39:55 +0000 (GMT)

> into /usr/arm-linux/include/{asm,linux}.  You need to configure the kernel 

Done that; I got some temporary error about <asm/limits.h>, but I
kicked it and it worked.  Builds okay, `make install' fine.  Now
onto `/usr/src/linux-2.0.36-arm'.

`make menuconfig', having set `CROSS_COMPILE' to `arm-linux-' in
the top-level Makefile (or do I want `/usr/arm-linux/'?), ran
`make zImage'.  Appears to work, but:

    cc1: warning: Option '-m3' deprecated.  Use: '-mapcs-26' or -mcpu=<proc>

and a few whinges from egcs.  (I'm building for an A5000, so I want
to make a toolchain for `armv2-linux'?)

Okay, however, fatal:

    perl extractinfo.perl arm-linux-objdump > getconstants.h
    /usr/bin/gcc -I/usr/src/linux-2.0.36-arm/include -D__KERNEL__ -o getconstants getconstants.c
    In file included from getconstants.c:17:
    getconstants.h:4: parse error before `='
    getconstants.h:6: parse error before `='
    getconstants.h:8: parse error before `='
    getconstants.h:10: parse error before `='
    getconstants.h:12: parse error before `='
    getconstants.h:14: parse error before `='
    getconstants.c: In function `main':
    getconstants.c:52: `tss_memmap' undeclared (first use this function)
    getconstants.c:52: (Each undeclared identifier is reported only once
    getconstants.c:52: for each function it appears in.)
    getconstants.c:53: `tss_save' undeclared (first use this function)
    getconstants.c:57: `tss_fpesave' undeclared (first use this function)
    getconstants.c:58: `mm' undeclared (first use this function)
    getconstants.c:59: `pgd' undeclared (first use this function)
    make[2]: *** [getconstants] Error 1
    make[2]: Leaving directory `/usr/src/linux-2.0.36-arm/arch/arm/lib'
    make[1]: *** [../lib/constants.h] Error 2  
    make[1]: Leaving directory `/usr/src/linux-2.0.36-arm/arch/arm/kernel'
    make: *** [linuxsubdirs] Error 2

What now?

> obviously the kernel in /usr/src/linux is unlikely to be the one you want.

Sure; `/usr/src/linux-2.0.36-arm' is mine.