This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to choose the right libstdc++.so with soft-float?


On Fri, 2007-01-05 at 14:37 +0000, Andrew Haley wrote:

Thanks for your replies Andrew!

> When you do a "make install" the soft-float directories are supposed
> to be installed in $PREFIX.  Does this really not work?

I've done another build from scratch.  It turns out they ARE installed,
into lib/nof.  So the fully installed pathnames are lib/libstdc++.so*
for the hard-float versions and lib/nof/libstdc++.so* for the soft-float
versions.

> It ought to be possible for ld.so to sort this out based on flags in
> the object files, but this is a binutils/glibc issue.

Well, this is definitely not happening on my system unfortunately :(.
I've added /lib/nof/libstdc++.so* and also /usr/lib/nof/libstdc++.so*,
but ldd always shows ld.so choosing the /usr/lib/libstdc++.so* version,
even though it does choose libgcc_s-soft-float.so so I know it was
linked with -msoft-float.

Neither readelf nor objdump with any options I could conjure showed me
any difference in the ELF flags, etc. that would give a hint to the
dynamic linker as whether to choose the soft- or hard-float versions, or
whether the current app was built with soft- or hard-float options.

It's also suspicious that libgcc is handled the way it is, with
different filenames and different sonames, if indeed it's possible for
the dynamic linker to DTRT without that.

I'll send an email to the binutils and glibc folks asking them about
this.  Barring further information though it appears to me that this is
a problem with GCC and needs a GCC solution (a la libgcc_s).

Cheers!

-- 
-----------------------------------------------------------------------------
 Paul D. Smith <psmith@netezza.com>                       http://netezza.com
 "Please remain calm--I may be mad, but I am a professional."--Mad Scientist
-----------------------------------------------------------------------------
      These are my opinions--Netezza takes no responsibility for them.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]