Skip to content

Fix HOST_CFLAGS breaking C++ on GCC 13 and add multi-GCC CI#2018

Merged
widgetii merged 3 commits intomasterfrom
fix/gcc-compat-ci
Apr 21, 2026
Merged

Fix HOST_CFLAGS breaking C++ on GCC 13 and add multi-GCC CI#2018
widgetii merged 3 commits intomasterfrom
fix/gcc-compat-ci

Conversation

@widgetii
Copy link
Copy Markdown
Member

Summary

  • 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++ 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 15 constexpr issue at source level.
  • Add gcc-compat CI workflow that builds gk7205v200_lite inside GCC 12–15 Docker containers, triggered on PRs touching build-system files, weekly on Sundays, and on manual dispatch.

Closes #2007

Test plan

  • gcc-compat workflow runs on this PR (touches Makefile)
  • All 4 GCC versions (12, 13, 14, 15) build successfully
  • Existing build workflow still passes on ubuntu-latest

🤖 Generated with Claude Code

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>
widgetii and others added 2 commits April 21, 2026 19:55
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>
@widgetii widgetii merged commit 8d1cd58 into master Apr 21, 2026
92 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Trying to build firmware using the repo

1 participant