[Bug libstdc++/87858] New: Building old multilib bootstrap GCC: stage1 32-bit libstdc++ fails to build after building 64-bit libstdc++

mkrupcale at matthewkrupcale dot com gcc-bugzilla@gcc.gnu.org
Thu Nov 1 23:13:00 GMT 2018


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

            Bug ID: 87858
           Summary: Building old multilib bootstrap GCC: stage1 32-bit
                    libstdc++ fails to build after building 64-bit
                    libstdc++
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mkrupcale at matthewkrupcale dot com
  Target Milestone: ---

Created attachment 44944
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44944&action=edit
Makefile.tpl patch portion which allowed me to build GCC 4.8.3 using GCC 8.1

This is related to building multilib bootstrap GCC version 4.8.3 using GCC 8.1.
Particularly, the stage1 host module cc1plus would fail to load libstdc++ after
building the target 64-bit libstdc++ because this was placed in
LD_LIBRARY_PATH, but stage1 cc1plus depends on the newer build libstdc++, and
the older target libstdc++ does not provide the required version definitions.

I suspect this issue is not specific to these versions or even to building old
GCC with new GCC because the stage1 host modules will always depend on the
build libstdc++ and therefore should not try to use the target libstdc++ built
during stage1.

Attached are two patches:

1) gcc48-stage1-build-libstdc++.patch: Makefile.tpl patch portion
which allowed me to build GCC 4.8.3 using GCC 8.1
2) gcc82-stage1-build-libstdc++.patch: analogous patch for GCC 8.2
potentially allowing future GCC to build GCC 8.2 (untested).

What they do is add the target libstdc++ to the target exports LD_LIBRARY_PATH
only after stage1.

Additional information / mailing list patches:

[1] https://gcc.gnu.org/ml/gcc-patches/2018-09/msg00176.html
[2] https://gcc.gnu.org/ml/gcc-patches/2018-10/msg01978.html


More information about the Gcc-bugs mailing list