Fix HOST_CFLAGS breaking C++ on GCC 13 and add multi-GCC CI#2018
Merged
Fix HOST_CFLAGS breaking C++ on GCC 13 and add multi-GCC CI#2018
Conversation
Remove `export HOST_CFLAGS ?= -O2 -std=gnu11` from Makefile — Buildroot appends HOST_CFLAGS into HOST_CXXFLAGS, so the C-only `-std=gnu11` flag leaks into C++ compilation, breaking CMake's C++11 feature check on GCC 13.3.0 (Ubuntu 24.04 / WSL). The unifdef patches already handle the GCC 15 constexpr issue at source level, making this line redundant. Add gcc-compat CI workflow that builds gk7205v200_lite inside GCC 12–15 Docker containers on PRs touching build-system files, weekly, and on manual dispatch. Closes #2007 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Buildroot's host-tar configure refuses to run as root, which is the default user inside gcc:N Docker containers. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
GCC 15 defaults to C++23 where <cstdint> is no longer transitively included. CMake 3.28.3's bundled cmcppdap uses uint32_t in dap/network.h without including <cstdint>, causing a build failure. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
export HOST_CFLAGS ?= -O2 -std=gnu11from Makefile — Buildroot appendsHOST_CFLAGSintoHOST_CXXFLAGS, so the C-only-std=gnu11flag leaks into C++ host tool compilation, breaking CMake's C++11 feature check on GCC 13.3.0 (Ubuntu 24.04 / WSL). The unifdef patches already fix the GCC 15constexprissue at source level.gcc-compatCI workflow that buildsgk7205v200_liteinside GCC 12–15 Docker containers, triggered on PRs touching build-system files, weekly on Sundays, and on manual dispatch.Closes #2007
Test plan
Makefile)buildworkflow still passes on ubuntu-latest🤖 Generated with Claude Code