This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug driver/36485] New: gcc driver incorrectly assumes existence of $(prefix)/usr/lib
- From: "pluto at agmk dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Jun 2008 11:23:08 -0000
- Subject: [Bug driver/36485] New: gcc driver incorrectly assumes existence of $(prefix)/usr/lib
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
i've configured gcc in this way:
$ ./xgcc -B. -v
Reading specs from ./specs
Target: x86_64-gnu-linux
Configured with: ../configure --target=x86_64-gnu-linux --with-arch=k8
--prefix=/local/devel/toolchain43/x86_64-gnu-linux
--with-sysroot=/local/devel/toolchain43/x86_64-gnu-linux
--libdir=/local/devel/toolchain43/x86_64-gnu-linux/lib64
--libexecdir=/local/devel/toolchain43/x86_64-gnu-linux/lib64
--with-slibdir=/local/devel/toolchain43/x86_64-gnu-linux/lib64
--with-gmp-include=/home/users/builder/toolchain/trunk/linux/gcc-math-runtime/include
--with-gmp-lib=/home/users/builder/toolchain/trunk/linux/gcc-math-runtime/lib64
--with-mpfr-include=/home/users/builder/toolchain/trunk/linux/gcc-math-runtime/include
--with-mpfr-lib=/home/users/builder/toolchain/trunk/linux/gcc-math-runtime/lib64
--disable-multilib --disable-nls --disable-libgomp --disable-libmudflap
--disable-libssp --disable-libstdcxx-pch --enable-c99 --enable-long-long
--enable-linux-futex --enable-threads=posix --enable-__cxa_atexit
--enable-languages=c,c++ --enable-symvers=gnu --with-long-double-128
--disable-cld --disable-bootstrap
Thread model: posix
gcc version 4.3.1 (GCC)
afaics, the collect2 contains LIBRARY_PATH=./:
/local/devel/toolchain43/x86_64-gnu-linux/usr/lib/../lib64/:
/local/devel/toolchain43/x86_64-gnu-linux/usr/lib/
which uses $(prefix)/usr/lib directory (which may not exist in sysroot!)
to access stuff in lib64. in my case, this directory doesn't exist,
linker fails and libstdc++ configure reports errors.
imho using $(readlink -m) to canonicalize builtin search paths
is a good solution.
--
Summary: gcc driver incorrectly assumes existence of
$(prefix)/usr/lib
Product: gcc
Version: 4.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: driver
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pluto at agmk dot net
GCC target triplet: x86_64-gnu-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36485