https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104057
--- Comment #3 from cqwrteur <unlvsur at live dot com> --- (In reply to Andrew Pinski from comment #1) > Can you give an example? > There are two different directories where multilib is there. > One is based on the multilib name and the other is the OS multi-lib > directory name. > > the one that matters to GCC depends on the context of the directory. > For an example ${prefix}/lib and ${prefix}/lib64 are OS directory names. > While things under ${prefix}/lib/gcc/${triplet}/${version}/ are the > multi-lib path. > > Are you using --with-sysroot to use the normal OS directory structure? Correct behavior should be the same. When build GCC, GCC would find libs in $HOME/cross/x86_64-ubuntu-linux-gnu/x86_64-ubuntu-linux-gnu/lib for all targets $HOME/cross/x86_64-ubuntu-linux-gnu/x86_64-ubuntu-linux-gnu/lib64 for 64 bit targets $HOME/cross/x86_64-ubuntu-linux-gnu/x86_64-ubuntu-linux-gnu/libx32 for x32 bit targets However, after building gcc, GCC would find libs in $HOME/cross/x86_64-ubuntu-linux-gnu/x86_64-ubuntu-linux-gnu/lib for all targets $HOME/cross/x86_64-ubuntu-linux-gnu/x86_64-ubuntu-linux-gnu/lib64 for 64 bit targets $HOME/cross/x86_64-ubuntu-linux-gnu/x86_64-ubuntu-linux-gnu/libx32 for x32 bit targets