bug-glibc
[Top][All Lists]
Advanced

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

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


From: Nick Patavalis
Subject: Re: glibc 2.3.2 targeting arm-linux, failed to cross-compile.
Date: Wed, 14 May 2003 16:20:02 +0300
User-agent: Mutt/1.4i

On Wed, May 14, 2003 at 05:37:44PM +0800, Hu, Boris wrote:
> > 
> > On Tue, May 13, 2003 at 05:54:48PM +0800, Hu, Boris wrote:
> > > linuxthreads/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
> > > ENTRY(name) --> ENTRY(name); 
> > > It is fixed in Daniel Jacobowitz patch.
> 

Thanks! I applied the patch, and rebuilt everything. GLIBC now builds,
*seemingly*, ok; but when I try to compile a full cross-gcc-3.2.3,
directing it to use the newly compiled target glibc, I get the
following error:

/opt/xdvl/toolchain/bin2.13.2-gcc3.2.3-glibc2.3.2/bin/arm-linux-ld:/opt/xdvl/toolchain/bin2.13.2-gcc3.2.3-glibc2.3.2/arm-linux/lib/libc.so:
 file format not recognized; treating as linker script
/opt/xdvl/toolchain/bin2.13.2-gcc3.2.3-glibc2.3.2/bin/arm-linux-ld:/opt/xdvl/toolchain/bin2.13.2-gcc3.2.3-glibc2.3.2/arm-linux/lib/libc.so:4:
 parse error

And obviously the contents of my new "libc.so" are buggy:

/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
*** BUG in libc/scripts/output-format.sed *** elf32-bigarm,elf32-littlearm
GROUP ( /opt/xdvl/arm-linux-glibc/2.3.2/lib/libc.so.6 
/opt/xdvl/arm-linux-glibc/2.3.2/lib/libc_nonshared.a )

Searching the build-output logs produced when building GLIBC, for
"output-format.sed" I found the following relevant stuff:

arm-linux-gcc  -shared  
-Wl,-dynamic-linker=/opt/xdvl/arm-linux-glibc/2.3.2/lib/ld-linux.so.2 
-Wl,-z,combreloc \
  -x c /dev/null -o 
/mnt/disk3/home/npat/ian/infra/xdvl/unpacked/xdvl-arm-bin2.13.2-gcc3.2.3-glc2.3.2/work/glibc-build/format.lds.so
 -Wl,--verbose -v 2>&1 \
| sed -n -f scripts/output-format.sed > 
/mnt/disk3/home/npat/ian/infra/xdvl/unpacked/xdvl-arm-bin2.13.2-gcc3.2.3-glc2.3.2/work/glibc-build/format.lds.new
rm -f 
/mnt/disk3/home/npat/ian/infra/xdvl/unpacked/xdvl-arm-bin2.13.2-gcc3.2.3-glc2.3.2/work/glibc-build/format.lds.so
mv -f 
/mnt/disk3/home/npat/ian/infra/xdvl/unpacked/xdvl-arm-bin2.13.2-gcc3.2.3-glc2.3.2/work/glibc-build/format.lds.new
 
/mnt/disk3/home/npat/ian/infra/xdvl/unpacked/xdvl-arm-bin2.13.2-gcc3.2.3-glc2.3.2/work/glibc-build/format.lds
(echo '/* GNU ld script';\
 echo '   Use the shared library, but some functions are only in';\
 echo '   the static library, so try that secondarily.  */';\
 cat 
/mnt/disk3/home/npat/ian/infra/xdvl/unpacked/xdvl-arm-bin2.13.2-gcc3.2.3-glc2.3.2/work/glibc-build/format.lds;
 \
 echo 'GROUP ( /opt/xdvl/arm-linux-glibc/2.3.2/lib/libc.so.6' \
      '/opt/xdvl/arm-linux-glibc/2.3.2/lib/libc_nonshared.a'\
      ')' \
) > /opt/xdvl/arm-linux-glibc/2.3.2/lib/libc.so.new
mv -f /opt/xdvl/arm-linux-glibc/2.3.2/lib/libc.so.new 
/opt/xdvl/arm-linux-glibc/2.3.2/lib/libc.so

The contents of "format.lds" (found in the glibc-build directory) are:

*** BUG in libc/scripts/output-format.sed *** elf32-bigarm,elf32-littlearm

Could this be due to a buggy sed?

sed --version
  
  GNU sed version 3.02

ldd `which sed`

  libc.so.6 => /lib/libc.so.6 (0x2aac8000)
  /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x2aaab000)

ls -l /lib/libc.so.6

  /lib/libc.so.6 -> libc-2.1.3.so*

Thanks again
/npat

Recaping for those tuned-in lately:

I was trying to cross-compile GLIB-2.3.2 tagering arm-linux (and
hosted on a i386 linux machine). I used a recently built
cross-toolchain targeting arm-linux, comprising of binutils 2.13.2 and
a minimal GCC-3.2.3. Initially the assembler chocked at some point. I
applied the patch mentioned in the quoted text above and...

-- 
They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety.
  -- Benjamin Franklin, Historical Review of Pennsylvania, 1759.




reply via email to

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