Skip to content

ci: compiler-compat matrix (gcc 14-16, clang 18-21; arm64/s390x) + fixes - #45

Merged
Jo5ta merged 3 commits into
mainfrom
jo5ta/ci-compiler-compat-matrix
Jul 20, 2026
Merged

ci: compiler-compat matrix (gcc 14-16, clang 18-21; arm64/s390x) + fixes#45
Jo5ta merged 3 commits into
mainfrom
jo5ta/ci-compiler-compat-matrix

Conversation

@Jo5ta

@Jo5ta Jo5ta commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Adds a compiler-compat CI leg that compiles, links, and runs a minimal tracing example against every supported GCC and clang version, plus the small library fix that portability across clang versions requires.

What the leg does

  • Matrix over pinned official images: gcc:14/15/16, silkeh/clang:18/19/20/21 (7 legs, fail-fast: false).
  • Each runs scripts/ci-cd/step_compat.sh: minimal CMake configure (tracing library + simple_c/simple_cpp only — CLI tool, decoders, snapshot, kernel module, tests off, so no external deps), build the two examples, run them with CLLTK_TRACING_PATH set, and verify each writes a .clltk_trace file.
  • Library -Werror kept on so new-compiler warnings surface.
  • Runnable locally: CC=gcc-14 CXX=g++-14 ./scripts/ci-cd/step_compat.sh.

Supported-compiler floor (discovered while building this)

The tracepoint macros use the Ws inline-asm constraint (symbol+offset, for the _metaptr metadata sections). It only exists in GCC ≥14 and clang ≥18; older compilers reject the build with impossible/invalid constraint in 'asm'. So the matrix starts at those floors, and the requirement is now documented in the README.

Library fix

tracing_library/CMakeLists.txt listed -Wno-pre-c11-compat for all clang, but older clang doesn't know that flag and errors under -Werror -Wunknown-warning-option. Added -Wno-unknown-warning-option first so clang silently ignores any -Wno-* it doesn't recognise — needed for clang 18 to pass.

Testing

Every matrix leg was run locally in its real image (docker): gcc 14/15/16 and clang 18/19/20/21 all build, run, and produce trace files. Also confirmed the floor: gcc 12/13 and clang 16/17 fail on the Ws constraint as expected.


Also included: kernel-module build dnf refresh

step_build_kernel_module.sh installed kernel-devel with a plain dnf install, hitting the same stale-metadata 404 that was fixed for step_kernel_runtime.sh. Applied the same dnf --refresh + retry treatment, so the build-kernel-module job stops flaking on pruned Fedora kernel packages.

The clang flag list includes -Wno-pre-c11-compat, which older clang releases do
not recognise; under -Werror they fail the build with
-Wunknown-warning-option. Add -Wno-unknown-warning-option first so clang
silently ignores any -Wno-* flag it does not know (supported across all clang
versions we target), keeping the newer suppressions without breaking older
clang.

Signed-off-by: Jo5ta <Jo5ta@mail.de>
@Jo5ta
Jo5ta force-pushed the jo5ta/ci-compiler-compat-matrix branch from cdf55f7 to d39c3f7 Compare July 20, 2026 10:49
@Jo5ta Jo5ta changed the title ci: add compiler-compatibility matrix (gcc 12-15, clang 16-19) ci: compiler-compatibility matrix (gcc 14-16, clang 18-21) + clang flag fix Jul 20, 2026
@Jo5ta
Jo5ta force-pushed the jo5ta/ci-compiler-compat-matrix branch from d39c3f7 to 0e5ae91 Compare July 20, 2026 10:52
Add a compiler-compat CI leg that compiles, links, and runs a minimal tracing
example against every released GCC (>=14) and clang (>=18) - the cheap gate that
a consumer can use a tracepoint on a given compiler, without the full test
suite. Each matrix entry runs in a pinned official compiler image and invokes
scripts/ci-cd/step_compat.sh, which configures a minimal build (tracing library
+ simple_c/simple_cpp only; no external deps), builds and runs the examples,
and verifies each produces a .clltk_trace file.

The floors (GCC 14, clang 18) are set by the Ws inline-asm constraint the
tracepoint macros use for their _metaptr metadata sections; older compilers
reject it with impossible/invalid-constraint errors. Documented in the README.

Runnable locally: CC=gcc-14 CXX=g++-14 ./scripts/ci-cd/step_compat.sh

Signed-off-by: Jo5ta <Jo5ta@mail.de>
@Jo5ta
Jo5ta force-pushed the jo5ta/ci-compiler-compat-matrix branch from 0e5ae91 to ed102ac Compare July 20, 2026 11:14
step_build_kernel_module.sh installed kernel-devel with a plain 'dnf install',
which hits the same stale-metadata failure fixed for step_kernel_runtime.sh:
the weekly-cached container metadata can reference a kernel-devel NEVRA Fedora
has pruned from its mirrors, so the install 404s on every mirror. Apply the
same 'dnf --refresh' + retry treatment.

Signed-off-by: Jo5ta <Jo5ta@mail.de>
@Jo5ta Jo5ta changed the title ci: compiler-compatibility matrix (gcc 14-16, clang 18-21) + clang flag fix ci: compiler-compat matrix (gcc 14-16, clang 18-21; arm64/s390x) + fixes Jul 20, 2026
@Jo5ta
Jo5ta merged commit c9289da into main Jul 20, 2026
23 checks passed
@Jo5ta
Jo5ta deleted the jo5ta/ci-compiler-compat-matrix branch July 20, 2026 11:47
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.

1 participant