[Bug libstdc++/5291] Bad reference to build directory in libstdc++.la
peb at mppmu dot mpg dot de
gcc-bugzilla@gcc.gnu.org
Tue Apr 3 09:24:00 GMT 2007
------- Comment #20 from peb at mppmu dot mpg dot de 2007-04-03 10:24 -------
After some investigation I found that the problem of libtool & build paths has
three aspects:
(1) Build paths stored in installed c++ libraries (libstdc++.la and
libsupc++.la) and then propagated to other libraries and possibly as
rpath/runpath into binaries
(2) Build paths stored in installed java libraries (libgij.la)
(3) Missing LD_LIBRARY_PATH when running gcj-dbtool to produce classmap.db
(this may fail resulting in an empty classmap.db file)
================
(1) and (2) are due to
(A) explicit -L's when building libraries or executables
(B) implicit -L's due to ltcf-cxx.sh when building libraries
================
For (3) gcj-bdtool (and others) should use some run-time environment as used
for the test suite.
================
Attached are three patches addressing (A) and (B), i.e., (1) and (2) without
making (3) any worse than at present. I have successfully tested them in a
bootstrap build for i686-linux-gnu as well as x86_64-linux-gnu but more testing
would certainly be required. Here a short description:
1. patch-03-libstdc++-lt-paths-root
introduces a new make variable RAW_CXX_FOR_TARGET_LIB (as RAW_CXX_FOR_TARGET
but without explicit -L's) in the toplevel Makefile, to be passed as
CXX_FOR_TARGET_LIB to the libstdc++ and libjava modules.
2. patch-03-libstdc++-lt-paths-libstdc++
Initialize CXX_FOR_LIB from CXX_FOR_TARGET_LIB (as passed from toplevel) and
use it to build libraries.
Replace --tag CXX by --tag CC when building libraries.
3. patch-03-libstdc++-lt-paths-libjava
Initialize CXX_FOR_LIB as above
Replace --tag CXX as above
Replace dependencies, e.g., -L$(here)/.libs libgcj.la by libgcj.la when
building libgij
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=5291
More information about the Gcc-bugs
mailing list