public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mkrupcale at matthewkrupcale dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug bootstrap/87858] Building old multilib bootstrap GCC: stage1 32-bit libstdc++ fails to build after building 64-bit libstdc++
Date: Sat, 24 Jul 2021 22:07:07 +0000	[thread overview]
Message-ID: <bug-87858-4-NlLeZQbVHz@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-87858-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #6 from Matthew Krupcale <mkrupcale at matthewkrupcale dot com> ---
(In reply to Andrew Pinski from comment #5)
> Best way to support this really is to build a 4.8 cross compiler and then
> build a canandian cross GCC 4.8 and then bootstrap a 4.8.x using that newly
> build canandian cross compiler.

I'm not sure I follow exactly because I wasn't trying to build a cross
compiler, although I suppose once you have a GCC 4.8 compiler built (cross or
not), you wouldn't have a problem building 4.8.x with it in theory. But the
problem is building that initial GCC 4.8 (cross or not) with the newer GCC
version.

> New enough GCC uses -static-libstdc++ and that avoids the shared library
> problem mentioned here.

This won't help during stage1 of the bootstrap build if you don't have the
static libstdc++ library installed on the build host. Once the static libstdc++
library is built, this problem won't happen during the later stages. For
stage1, however, GCC will currently attempt to use the build host libstdc++ and
its newer symbols for building host executables. When the old libstdc++ is
built then--and in the absence of a static libstdc++ on the build host--the
host executables will fail to load due to the old libstdc++ being on
LD_LIBRARY_PATH and lacking the newer symbols required by the host executables.

Note that as far as I'm aware, this issue still exists in modern versions of
GCC and is not exclusive to building only GCC 4.8. As shown by comment 3 and
comment 4, this problem is demonstrable by building GCC v8.2.1 or v10 with GCC
11 and possibly other versions. I was also able to confirm in comment 3 that my
patch for GCC 8.2 did resolve the issue when building with GCC 11.

  parent reply	other threads:[~2021-07-24 22:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-87858-4@http.gcc.gnu.org/bugzilla/>
2020-12-21 18:36 ` mkrupcale at matthewkrupcale dot com
2021-04-01 13:48 ` libor.bukata at oracle dot com
2021-07-24 20:31 ` pinskia at gcc dot gnu.org
2021-07-24 22:07 ` mkrupcale at matthewkrupcale dot com [this message]
2021-07-24 22:23 ` pinskia at gcc dot gnu.org
2021-07-24 23:18 ` mkrupcale at matthewkrupcale dot com
2022-06-18 23:13 ` edgargar at unam dot mx
2023-05-29 17:59 ` mkrupcale at matthewkrupcale dot com
2023-05-29 18:00 ` mkrupcale at matthewkrupcale dot com
2023-05-29 18:10 ` mkrupcale at matthewkrupcale dot com
2023-12-30 11:57 ` xry111 at gcc dot gnu.org
2023-12-30 12:02 ` xry111 at gcc dot gnu.org
2023-12-30 19:32 ` eyalroz1 at gmx 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-87858-4-NlLeZQbVHz@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).