Ran in to this issue when trying to update gcc in cenbuild on Fedora 34. Running 'rebuild' results in a build failure, and when looking in /home/cendio/cenbuild/repo/rpmbuild/build.log I see this error: > ../../gcc/reload1.c: In function 'void init_reload()': > ../../gcc/reload1.c:115:24: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17 > 115 | (this_target_reload->x_spill_indirect_levels) > | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ This error will likely happen on all distributions where we try to run .c-files with a too high version of C++. How to reproduce: 1. Update gcc in cenbuild 2. Run 'rebuild'
This simple fix seems to be sufficient to resolve things: diff --git a/build/gcc.spec b/build/gcc.spec index 1c1d8cd..8595ede 100644 --- a/build/gcc.spec +++ b/build/gcc.spec @@ -298,6 +298,10 @@ if [ "%{_cendio_host}" == "%{_cendio_target}" ]; then fi %endif +%if 0%{?prebootstrap} || 0%{?bootstrap} +export CXXFLAGS="$CXXFLAGS -std=c++11" +%endif + # We don't use %%{_cendio_configure} as gcc does its own magic with # regard to libdir. This is also how Red Hat configures their gcc. %{cbrun} ../configure \
Should be fixed now that we've upgrade gcc in bug 8361.
Does indeed work now. Tested on Fedora 41 (with workaround for bug 8644).
Tested this as part of bug 8644. I was able to successfully do a no-repo build of gcc on Fedora 41 without issues.