https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104057

--- Comment #2 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?

Example 1: target=x86_64-ubuntu-linux-gnu

Let's assume prefix is $HOME/cross/x86_64-ubuntu-linux-gnu

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/lib/64 for 64 bit
target
$HOME/cross/x86_64-ubuntu-linux-gnu/x86_64-ubuntu-linux-gnu/lib/x32 for x32
target.

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

Example 2: target=x86_64-w64-mingw32

Let's assume prefix is $HOME/cross/x86_64-w64-mingw32

When build GCC, GCC would find libs in
$HOME/cross/x86_64-w64-mingw32/x86_64-w64-mingw32/lib for all targets
$HOME/cross/x86_64-w64-mingw32/x86_64-w64-mingw32/lib/32 for 32 bit target

However, after building gcc, GCC would find libs in
$HOME/cross/x86_64-w64-mingw32/x86_64-w64-mingw32/lib for all targets
$HOME/cross/x86_64-w64-mingw32/x86_64-w64-mingw32/lib32 for 32 bit targets

Reply via email to