bug-glibc
[Top][All Lists]
Advanced

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

glibc 2.3.2 targeting arm-linux, failed to cross-compile.


From: Nick Patavalis
Subject: glibc 2.3.2 targeting arm-linux, failed to cross-compile.
Date: Tue, 13 May 2003 03:34:47 +0300
User-agent: Mutt/1.4i

I'm trying to cross-compile glibc 2.3.2, targeting the arm-linux
platfom. I'm using gcc-3.2.3 and binutils-2.13.2, as my
cross-toolchain.

I have just built binutils-2.13.2 for my target, and a minimal
(c-only) cross gcc-3.2.3. When I try to build glibc with these tools
I get the following error:

(echo '#include <sysdep-cancel.h>'; \
 echo 'PSEUDO (__libc_pause, pause, 0)'; \
 echo ' ret'; \
 echo 'PSEUDO_END(__libc_pause)'; \
 echo 'libc_hidden_def (__libc_pause)'; \
 echo 'weak_alias (__libc_pause, pause)'; \
 echo 'libc_hidden_weak (pause)'; \
) | arm-linux-gcc -c  -I../include -I. -I/mnt/disk3/home/npat/ian/infra/xdvl/
unpacked/xdvl-arm-bin2.13.2-gcc3.2.3-glc2.3.2/work/glibc-build/posix 
-I.. -I../libio  -I/mnt/disk3/home/npat/ian/infra/xdvl/unpacked/
xdvl-arm-bin2.13.2-gcc3.2.3-glc2.3.2/work/glibc-build 
-I../sysdeps/arm/elf -I../linuxthreads/sysdeps/unix/sysv/linux/arm 
-I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread 
-I../sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv 
-I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/arm 
-I../sysdeps/unix/sysv/linux/arm -I../sysdeps/unix/sysv/linux 
-I../sysdeps/gnu -I../sysdeps/unix/common 
-I../sysdeps/unix/mman -I../sysdeps/unix/inet 
-I../sysdeps/unix/sysv -I../sysdeps/unix/arm -I../sysdeps/unix 
-I../sysdeps/posix -I../sysdeps/arm/fpu -I../sysdeps/arm 
-I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 
-I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic/elf 
-I../sysdeps/generic  -nostdinc -isystem /mnt/disk3/home/npat/ian/infra/
xdvl/unpacked/xdvl-arm-bin2.13.2-gcc3.2.3-glc2.3.2/work/gcc1/lib/gcc-lib/
arm-linux/3.2.3/include -isystem /mnt/disk3/home/npat/ian/infra/xdvl/
unpacked/xdvl-arm-bin2.13.2-gcc3.2.3-glc2.3.2/linux-headers/include 
-D_LIBC_REENTRANT -include ../include/libc-symbols.h  
-DPROF      -DASSEMBLER   -x assembler-with-cpp 
-o /mnt/disk3/home/npat/ian/infra/xdvl/unpacked/
xdvl-arm-bin2.13.2-gcc3.2.3-glc2.3.2/work/glibc-build/posix/pause.op -
<stdin>: Assembler messages:
<stdin>:2: Error: garbage following instruction -- 
`ldr lr,[sp],#4 ldr ip,=__libc_multiple_threads'
make[2]: *** [/mnt/disk3/home/npat/ian/infra/xdvl/unpacked/
xdvl-arm-bin2.13.2-gcc3.2.3-glc2.3.2/work/glibc-build/posix/pause.op] 
Error 1

(some lines broken to fit in 80 cols)

The command used to configure glibc was:

  ../glibc-"$libv"/configure \
    --prefix=/opt/xdvl/arm-linux-glibc/2.3.2 \
    --enable-shared \
    --enable-add-ons \
    --enable-kernel=2.4.18 \
    --build=i386-linux --host=arm-linux \
    --with-headers=..../linux-headers/include

I'm---obviously---suspecting "binutils" for being the culprit, but my
magic can go no further than this. I've searched the archives, and I
have also googled the error-sting, but to no avail. Has anybody
managed to build this mix?  Is it supposed to be working?

Please notice that in order to build gcc without having a target-glibc
I had to apply the "inhibit_libc" patch (as I have done countless
times, with other gcc versions):

diff -urN gcc-3.2.3/gcc/config/arm/t-linux 
gcc-3.2.3-inhibit_libc/gcc/config/arm/t-linux
--- gcc-3.2.3/gcc/config/arm/t-linux    Thu May 17 06:15:49 2001
+++ gcc-3.2.3-inhibit_libc/gcc/config/arm/t-linux       Mon May 12 23:21:10 
2003@@ -1,6 +1,7 @@
 # Just for these, we omit the frame pointer since it makes such a big
 # difference.  It is then pointless adding debugging.
-TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer -fPIC
+T_CFLAGS = -Dinhibit_libc
+TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer -fPIC -Dinhibit_libc 
 LIBGCC2_DEBUG_CFLAGS = -g0

My binutils are unpatched.

Any help would be greatly appreciated.

Thanks in advance
/npat

-- 
There are two major products that come out of Berkeley: LSD and UNIX.
We don't believe this to be a coincidence.
  -- Jeremy S. Anderson




reply via email to

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