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

--- Comment #8 from Matthew Krupcale <mkrupcale at matthewkrupcale dot com> ---
(In reply to Andrew Pinski from comment #7)
> You misunderstood.  Building a cross compiler and a canadian cross is so the
> new 4.8 compiler is NOT exposing to the bootstrap issue you mentioned.

Fair enough, that seems likely to work as well. But you still need to build
that initial compiler with the newer compiler.

> 4.8 and 8.x are no longer maintained so fixing those are out of the question.

I'm not suggesting to patch 4.8 or 8.x series. I'm suggesting that the issue
still likely exists on the latest GCC. Of course you won't be able to verify
that unless you intentionally create some new ABI in libstdc++ which is also
used by the host programs and then try to build the old ABI libstdc++ with the
the new one on the build host. That's why it took so long to verify that GCC 8
had the issue (as well as all versions between 4.8 and 8) and is likely still
in the latest version.

> stage1 of gcc does not require the LD_LIBRARY_PATH to be set at all

I may be using the wrong name--perhaps it's not LD_LIBRARY_PATH specifically,
but the effect is similar. My patch actually modifies the RPATH_ENVVAR to not
include the target libstdc++ path during stage1 of the bootstrap since the
stage1 host binaries depend on the build host libstdc++. Then in stages 2 and 3
the RPATH_ENVVAR can include the target libstdc++ path and build successfully.

Reply via email to