Repository navigation
Build the static world with -fcf-protection=none - #13
Open
buyemune-sys wants to merge 2 commits into
Open
buyemune-sys wants to merge 2 commits into
buyemune-sys wants to merge 2 commits into
Conversation
Security updates replaced libapparmor1 4.0.1really4.0.1-0ubuntu0.24.04.7 with .9 and libexpat1 2.6.1-2ubuntu0.4 with ubuntu0.6, and the pool kept only the new files, so the cold-cache Fetch x86_64 job answers 404 and every x86-64 job behind it is skipped. Both pins move to the versions noble-updates ships now; their SHA256s match the archive's Packages index. The other twelve pins are still served.
Ubuntu's GCC enables -fcf-protection by default. That defines __CET__, and libunwind's assembly then includes the compiler's <cet.h>, which the runtime's -nostdinc cannot reach, so `./build` stops at UnwindRegistersSave.S on a stock Ubuntu with GCC. musl carries no CET markers, so the static world never ran with IBT or shadow stacks anyway; switching the protection off for the vendored targets only changes what the compiler is allowed to assume. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
buyemune-sys
force-pushed
the
fix/gcc-default-cet
branch
from
October 20, 2026 08:11
df42652 to
c388e1a
Compare
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.
The problem
On Ubuntu with the system GCC,
./buildfails:Ubuntu's GCC enables
-fcf-protectionby default and defines__CET__. libunwind'sassembly.hthen includes<cet.h>, a header of the compiler itself, which the static world's-nostdinccannot reach.CI never hits this combination: on Ubuntu, solo is built with clang, and the GCC jobs run on Alpine and Fedora, where CET is off by default.
The fix
-fcf-protection=noneis added totarget_flags(build.py), i.e. only for the vendored targets. musl carries no CET markers, so the static world never ran with IBT or shadow stacks anyway.Ubuntu / Clangjob gains aGCCstep (CC=gcc ./build solo):g++is already installed there, and nothing else builds with Ubuntu's system GCC.Verification
main: the error above (Ubuntu, GCC 15);./build soloand./build testpass withoutCFLAGS.Workaround until this is merged:
CFLAGS=-fcf-protection=none CXXFLAGS=-fcf-protection=none ./build.