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

            Bug ID: 96612
           Summary: [11 Regression][submitted patch] Fails to bootstrap
                    with older --build= than --host= compiler due to
                    missing -std=c++11
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Keywords: build, patch
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
  Target Milestone: ---

Patch: https://gcc.gnu.org/pipermail/gcc-patches/2020-August/551900.html

The issue occurs when doing a cross build with
 --build= being a GCC 5.2 compiler
 --host= being a GCC 8.2 compiler

While the latter supports C++11 out of the box, GCC 5 still needs --std=c++11
in order to compile C++11. The configure check only checks the ${host} compiler
but not the ${build} / CXX_FOR_BUILD compiler – hence, no flag is added.

I think the proper solution is to do the C++11 check also for the CXX_FOR_BUILD
compiler, as done in the patch linked above,
https://gcc.gnu.org/pipermail/gcc-patches/2020-August/551900.html

... but technically it is a regression as reverting the following commits also
fixes the build:
  commit https://gcc.gnu.org/g:d59a576b8b5e12c3a56f0262912090e2921f5daa
  Redefine NULL to nullptr
  2020-06-30

plus the three patches
  commit https://gcc.gnu.org/g:20a2e6afa82c165bcd1a8749478e9402a25088a4
  recog: Restore builds with Clang
  Workaround forhttps://bugs.llvm.org/show_bug.cgi?id=46377
  2020-06-22
 which was the follow up to
  commit https://gcc.gnu.org/g:4e49b994de060d4a6c9318d0ed52ef038153426e
  recog: Tweak insn_gen_fn::operator() definition
  2020-06-17
 which was the follow-up patch to
  commit https://gcc.gnu.org/g:3a179232a743b2b1987b21034cd5bb3bc660ee85
  recog: Use parameter packs for operator()
  2020-06-12

Reply via email to