This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Two questions about multilib, libstdc++.so, /lib/nof, and gcc-3.4-20030813
- From: Dan Kegel <dank at kegel dot com>
- To: GCC Mailing List <gcc at gcc dot gnu dot org>
- Date: Sun, 17 Aug 2003 13:17:44 -0700
- Subject: Two questions about multilib, libstdc++.so, /lib/nof, and gcc-3.4-20030813
I'm a bit fuzzy on multilibbing, so when I wrote my
script to build gcc and glibc cross-toolchains, I ducked
the issue and tried to tell gcc and glibc to build for just
one architecture. e.g. I configure gcc with
--target=powerpc-linux --with-cpu=405 --enable-cxx-flags=-mcpu=405
when I'm building for the ppc405 in order to get libstdc++
compiled right for that chip. Once that more or less worked,
I stopped thinking about it.
Now that I'm trying to build a toolchain with gcc-3.4-20030813,
though, it looks like I have to think about it again.
When I build gcc-3.3.1 and below for ppc405 (which no FPU), or
when I build gcc (any version) for ppc750 (which has an FPU),
a libstdc++.so* is created in both /lib and /lib/nof.
One difference between the two is that the one in lib/nof says
0x00000001 (NEEDED) Shared library: [libgcc_s_nof.so.1]
whereas the one in lib says
0x00000001 (NEEDED) Shared library: [libgcc_s.so.1]
gcc-3.4-20030813 does not create libstdc++.so* in /lib on ppc405.
That makes sense, more or less, as the version in /lib probably uses
the FPU and thus should never get used on the ppc405, I would think.
Question #1:
What's the "right" way to deal with this when setting up userland --
should I just know whether the processor has an FPU, and if so,
copy /lib/nof to /lib?
It'd be nice to be able to leave /lib and /lib/nof as they are,
and just do something like
# /sbin/ldconfig -v /lib/nof
/lib/nof:
libstdc++.so.6 -> libstdc++.so.6.0.0
/lib:
libstdc++.so.6 -> libstdc++.so.6.0.0
...
and have ld.so magically pick the right libstdc++.so.
http://sources.redhat.com/ml/libc-hacker/1999-04/msg00134.html implies
that, at least at one point, people were thinking about making ld.so
pick from between lib and lib/nof at runtime based on ELF header flags.
Question #2:
Did this ever happen?
- Dan
--
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045