hi, during building binutils for crosstoolchain with --sys-root option i'm observing that binutils-2.20.51.0.8.20100412 installs 'ld' as $sysroot/$target/bin/$target-ld. ar,as,nm and others are installed without '$target-' prefix in that directory. this prefixed ld binary causes error in gcc: collect2: cannot find 'ld' for older binutils-2.19.51.0.14.20090722 the 'ld' binary is installed in $sysroot/$target/bin/ without prefix and works fine.
Please provide the full configure option you used.
CONFIG_SHELL=/bin/bash \ ./configure \ --target=${TARGET} \ --prefix=${TOOLDIR} \ --with-sysroot=${TOOLDIR} \ --libdir=${LIBDIR} \ --libexecdir=${LIBDIR} \ --disable-shared \ --enable-static \ --disable-nls \ --disable-debug \ --disable-werror where: TARGET=x86_64-gnu-linux TOOLDIR=/local/devel/toolchain45/${TARGET}.host${HOST_BITS} LIBDIR=${TOOLDIR}/${LIB}
When I use --target=x86_64-gnu-linux, I got checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... x86_64-gnu-linux-gnu Since target != build, it was configured as cross-binutils. "make install" gave me: [hjl@gnu-6 release]$ ls ./local/devel/toolchain45/x86_64-gnu-linux.host/bin x86_64-gnu-linux-addr2line x86_64-gnu-linux-gprof x86_64-gnu-linux-ranlib x86_64-gnu-linux-ar x86_64-gnu-linux-ld x86_64-gnu-linux-readelf x86_64-gnu-linux-as x86_64-gnu-linux-nm x86_64-gnu-linux-size x86_64-gnu-linux-c++filt x86_64-gnu-linux-objcopy x86_64-gnu-linux-strings x86_64-gnu-linux-elfedit x86_64-gnu-linux-objdump x86_64-gnu-linux-strip Everything has the $target- prefix. Can you find out why your are different?
(In reply to comment #3) > When I use --target=x86_64-gnu-linux, I got > > checking build system type... x86_64-unknown-linux-gnu > checking host system type... x86_64-unknown-linux-gnu > checking target system type... x86_64-gnu-linux-gnu > > Since target != build, it was configured as cross-binutils. > "make install" gave me: > > [hjl@gnu-6 release]$ ls ./local/devel/toolchain45/x86_64-gnu-linux.host/bin please look deeper at the /local/devel/toolchain45/x86_64-gnu-linux.host/x86_64-gnu-linux/bin ^^^^^^^^^^^^^^^^^^^^
Created attachment 4733 [details] A patch Please try it.
It has nothing to do with --sys-root. It is when --target=XXX configures binutils as cross binutils.
(In reply to comment #5) > Created an attachment (id=4733) > A patch > > Please try it. works fine.
(In reply to comment #7) > (In reply to comment #5) > > Created an attachment (id=4733) > > A patch > > > > Please try it. > > works fine. I will make a new release soon. Thanks.
Fixed on trunk.