[csw-maintainers] GCC 4.6 progress
Maciej Bliziński
maciej at opencsw.org
Tue Sep 6 18:48:55 CEST 2011
I'm currently stuck. The problem is that the gcc build does not pass
the -R/opt/csw/lib flag when linking libstdc++.so.6, and in effect
libstdc++.so.6 is not able (on its own) find libgcc_s.so.1. The same
problem applies to many other shared libraries.
One way of going about it would be to override the errors. GCC
developers say that everything that depends on libstdc++.so.6 also
depends on libgcc_s.so.1, so libstdc++.so.6 will be always found. But
this means that this library is found by coincidence, and I don't want
our dynamic linking depend on coincidences.
When I talked to gcc-help, they told me I'm nuts[1], but they also
provided some information[2]. However, they didn't provide a solution
that would be satisfactory for me. What I'm looking for is passing
-R/opt/csw/lib when linking shared libraries. Unfortunately, the gcc
build system is quite complex, where there are multiple subinvocations
of ./configure inside subdirectories during a single phase, and there
are three building phases. It's quite hard to figure out what exact
inputs influence the outcome.
To facilitate looking for the problem, I created a special branch
which only has c and c++ frontends enabled (for quicker compilation).
If you check out the code and build it, you'll see soname-not-found
errors from checkpkg. When you run /usr/ccs/bin/dump -Lv against the
libstdc++.so.6 file, you'll see that RPATH is missing. We need to put
it there.
I've already tried using LDFLAGS, --with-boot-ldflags,
LDFLAGS_FOR_TARGET and LD_OPTIONS, nothing worked.
If there's anyone with good knowledge of the GCC build system, I would
greatly appreciate any help. To get started:
svn co https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/pkg/gcc4/branches/ldflags-problem
cd ldflags-problem
mgar package
Maciej
[1] http://gcc.gnu.org/ml/gcc-help/2011-09/msg00028.html
[2] http://gcc.gnu.org/ml/gcc-help/2011-09/msg00038.html
[3] https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/pkg/gcc4/branches/ldflags-problem/
More information about the maintainers
mailing list