public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "unlvsur at live dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug bootstrap/104057] cross compiler multilibs libs path too chaos
Date: Mon, 17 Jan 2022 01:02:30 +0000	[thread overview]
Message-ID: <bug-104057-4-njBAG0moEA@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-104057-4@http.gcc.gnu.org/bugzilla/>

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

  parent reply	other threads:[~2022-01-17  1:02 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-16 23:27 [Bug bootstrap/104057] New: " unlvsur at live dot com
2022-01-16 23:37 ` [Bug bootstrap/104057] " pinskia at gcc dot gnu.org
2022-01-17  1:02 ` unlvsur at live dot com [this message]
2022-01-17  1:03 ` unlvsur at live dot com
2022-01-17  1:14 ` pinskia at gcc dot gnu.org
2022-01-17  1:15 ` unlvsur at live dot com
2022-01-17  1:18 ` pinskia at gcc dot gnu.org
2022-01-17  1:19 ` unlvsur at live dot com
2022-01-17  1:20 ` unlvsur at live dot com
2022-01-17  1:20 ` pinskia at gcc dot gnu.org
2022-01-17  1:22 ` pinskia at gcc dot gnu.org
2022-01-17  1:24 ` unlvsur at live dot com
2022-01-17  1:28 ` pinskia at gcc dot gnu.org
2022-01-17  1:34 ` unlvsur at live dot com
2022-01-17  1:35 ` unlvsur at live dot com
2022-01-17  1:40 ` unlvsur at live dot com
2022-01-17  1:40 ` pinskia at gcc dot gnu.org
2022-01-17  1:41 ` pinskia at gcc dot gnu.org
2022-01-17  1:43 ` unlvsur at live dot com
2022-01-17  1:45 ` unlvsur at live dot com
2022-01-17  1:45 ` unlvsur at live dot com
2022-01-17  1:46 ` unlvsur at live dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-104057-4-njBAG0moEA@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).