This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Compiling binutils-2.14: -dynamic-linker ignored for libraries
- From: Peter Hartlich <peter at hartlich dot com>
- To: binutils at sources dot redhat dot com
- Date: Sat, 14 Jun 2003 21:12:52
- Subject: Compiling binutils-2.14: -dynamic-linker ignored for libraries
Hello!
[I posted this to news:gnu.help.utils a few days ago. Since nobody
answered there, I guess it's more appropriate on this list.]
I'm currently trying to compile binutils 2.14 (or 2.13, for that
matter) on a system with a slashpackage[1]-like filesystem layout.
glibc 2.3.2 is installed at /pkg/glibc-2.3.2, /pkg/glibc is a
symbolic link to this directory.
gcc's specs file correctly points to the the dynamic linker at:
/pkg/glibc/lib/ld-linux.so.2
First I tried to compile and install binutils to /pkg/binutils-2.14
using the following CFLAGS:
-Wl,-rpath -Wl,/pkg/glibc/lib -Wl,-rpath-link -Wl,/pkg/glibc/lib
-Wl,-L/pkg/glibc/lib
and:
../binutils-2.14/configure --prefix=/pkg/binutils-2.14
--enable-shared --disable-nls
However, ldd /pkg/binutils-2.14/bin/* /pkg/binutils-2.14/lib/*
showed the following output:
...
libc.so.6 => /pkg/glibc/lib/libc.so.6 (0x40017000)
/pkg/glibc-2.3.2/lib/ld-linux.so.2 =>
/pkg/glibc-2.3.2/lib/ld-linux.so.2 (0x40000000)
...
So the dynamic linker wouldn't be found anymore after even a minor
upgrade of the glibc. I then explicitly added
-Wl,-dynamic-linker -Wl,/pkg/glibc/lib/ld-linux.so.2
to the CFLAGS mentioned above. Now, everything at
/pkg/binutils-2.14/bin is fine:
$ ldd /pkg/binutils-2.14/bin/*
...
libc.so.6 => /pkg/glibc/lib/libc.so.6 (0x40017000)
/pkg/glibc/lib/ld-linux.so.2 => /pkg/glibc/lib/ld-linux.so.2
(0x40000000)
...
But at /pkg/binutils-2.14/lib, the problem still persists:
$ ldd /pkg/binutils-2.14/lib/*
...
libc.so.6 => /pkg/glibc/lib/libc.so.6 (0x40017000)
/pkg/glibc-2.3.2/lib/ld-linux.so.2 =>
/pkg/glibc-2.3.2/lib/ld-linux.so.2
(0x40000000)
...
Is there any way to get lib/* to use the right dynamic linker?
(My host system is being set up by loosely following
<http://linuxfromscratch.org/view/cvs/>. I'm now at the beginning
of chapter 6. If that helps anything.)
[1] <http://cr.yp.to/slashpackage.html>
Regards,
Peter Hartlich