libstdc++.so depends on libstdc++.so
tp@fonz.de
tp@fonz.de
Mon Mar 3 22:04:00 GMT 2008
Hi,
I'm cross-compiling gcc (with c++ enabled) to run on an arm target.
Overall it works well, except:
$ arm-unknown-linux-uclibc-readelf -d libstdc++.so.6.0.8
...
0x00000001 (NEEDED) Shared library: [libstdc++.so.6]
0x0000000e (SONAME) Library soname: [libstdc++.so.6]
0x0000000f (RPATH) Library rpath: [/home/.../arm-unknown-linux-uclibc/lib]
The resulting libstdc++ depends on libstdc++ and has an rpath into the
cross-tools directory. I've had the same with a glibc-based toolchain
and with gcc 3.4, 4.1 and 4.2.
Comments in the configure scripts and Makefiles indicate that
libstdc++ is not to be linked with target-g++, because that includes
-lstdc++. But it's exactly doing that. I haven't found a way to make
it do the right thing, except dirty sed'ding various libtool and
configure scripts.
Another annoyance appears when libiconv is installed in the target
sysroot. If gcc's configure detects iconv.h there, the
target-sysroot/include path ends up in CPPFLAGS in gcc/Makefile, which
in turn is used to build gcc/build/gen* - which of course fails
(mixing glibc host headers and uclibc target headers). None of
--without-iconv-prefix, --with-iconv-prefix=/target-sysroot or
--with-iconv-prefix=/usr helped. Sed'ding gcc/Makefile (remove
CPPFLAGS from BUILD_CFLAGS) helps.
Thanks in advance for explanations on how this should really work,
Tobias
More information about the Gcc-help
mailing list