Removing --enable-miltiarch has no effect, but it somehow successfully builds if I set prefix to $(MY_SYSROOT). Why does it even matter if I have --with-sysroot option? 2016-12-20 17:29 GMT+03:00 Jonathan Wakely <jwakely.gcc@xxxxxxxxx>: > On 20 December 2016 at 11:46, Dmitry Perov wrote: >> Hi everyone, >> >> I'm trying to build a gcc 4.9.3 cross-toolchain for x86_64-*-linux-gnu >> target and get weird errors during configuration of libstdc++-v3. >> Assuming that I have my sysroot under $(MY_SYSROOT) I have cross >> binutils installed there and glibc-2.13 installed under >> $(MY_SYSROOT)/lib and $(MY_SYSROOT)/lib64 for 32- and 64-bit versions >> respectively. For some reason ld won't search for libc under >> $(MY_SYSROOT)/lib64: >> >>> configure:3898: /home/dima/projects/linux-x86_64/build/toolchain/gcc/build/./gcc/xgcc -B/home/dima/projects/linux-x86_64/build/toolchain/gcc/build/./gcc/ -B$(MY_SYSROOT)/bin/ -B$(MY_SYSROOT)/lib/ -isystem $(MY_SYSROOT)/include -isystem $(MY_SYSROOT)/sys-include -o conftest -g -O2 -pipe conftest.c >&5 >>> $(MY_SYSROOT)/bin/ld: skipping incompatible $(MY_SYSROOT)/lib/libc.so when searching for -lc >>> $(MY_SYSROOT)/bin/ld: skipping incompatible $(MY_SYSROOT)/lib/libc.a when searching for -lc >>> $(MY_SYSROOT)/bin/ld: cannot find -lc >>> collect2: error: ld returned 1 exit status >>> configure:3901: $? = 1 >> >> >> The part of config.log for libstdc++-v3 up to this place is attached. >> What could be the issue and how can I fix this? > > I think this is probably because you used --enable-multiarch -- C уважением, Дмитрий Перов.