Adds spksrc.common/tc-capability.mk, which lets a package state a requirement instead of listing the archs where it happens to fail: MIN_GCC_VERSION = 8 needs gcc 8 or newer MIN_GLIBC_VERSION = 2.20 needs glibc 2.20 or newer (a runtime floor) REQUIRE_64BIT = 1 needs a 64-bit target The floors are resolved without building the toolchain, from the gcc/glibc/kernel encoded in the toolchain's own Makefile (TC_STOCK_GCC/GLIBC/KERNEL), so the answer cannot depend on how the toolchain was last built. pre-check.mk turns an unmet requirement into the arch-refusal error, next to UNSUPPORTED_ARCHS -- it says why a package is unsupported here, not just where. An arch list has to be rechecked by hand whenever a toolchain moves and cannot express "any arch whose gcc is older than X"; a declared floor does both. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QEH1b4ASNYSrZFQnEeroj8
Replaces the hand-maintained UNSUPPORTED_ARCHS lists with the capability the arch
list was really standing in for. Each floor was found by building the package in
each stock gcc (4.3.7 / 4.6.4 / 4.8.3 / 4.9.3) and bracketing where it starts to
compile, not guessed:
4.6 x264, shine, libvpx-1.14
4.8 x265, libaom-3.8, dav1d, harfbuzz, libass, libzimg, snappy,
chromaprint-fftw, librist
4.9 liblc3
7.5 frei0r, libvpx-latest, libaom-latest, libjxl, libvmaf, rubberband,
highway, vvenc (C++17)
svt-av1 REQUIRE_64BIT + gcc 4.9
harfbuzz keeps its UNSUPPORTED_ARCHS_TCVERSION; the DSM >= 7.0 packages keep
REQUIRED_MIN_DSM. Same archs refused as before where the list was a gcc proxy,
plus the DSM 5.2 stock gccs the lists missed -- now with a reason.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QEH1b4ASNYSrZFQnEeroj8
REQUIRED_MIN_DSM / REQUIRED_MIN_SRM / UNSUPPORTED_ARCHS_TCVERSION were standing in for "a new enough compiler": every arch they excluded is one whose stock gcc is below the declared MIN_GCC_VERSION, so the floor already refuses it. Verified arch by arch -- e.g. harfbuzz's x86-5.2 is gcc 4.7.3 (< 4.8), and the DSM<7.0 archs are all gcc < 7.5 while the SRM 1.3 archs are gcc 10.3, so MIN_GCC = 7.5 keeps exactly the DSM 7.x + SRM 1.3 set. Also converts the libvpx/libaom virtuals to the floor and lifts libvpx's latest cut-over to gcc 7.5, matching libvpx-latest. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QEH1b4ASNYSrZFQnEeroj8
Each toolchain now states its gcc as TC_GCC = X.Y.Z beside TC_GLIBC/TC_KERNEL, decoded once from its TC_DIST token. Three things then fall out: - tc-capability.mk reads TC_GCC / TC_GLIBC / TC_KERNEL straight from the toolchain Makefile instead of decoding TC_DIST with an awk heuristic, and drops the TC_STOCK_* names for the usual ones. - tc_vars.mk stops running the toolchain's gcc through -dumpversion (which reports a bare major from gcc 7 on -- "8", not "8.5.0") and echoes the declared TC_GCC instead, so the value is complete and known without executing anything. - a package that branches on the compiler (the libvpx virtual routing latest vs 1.14 at gcc 7.5) now resolves statically, before the toolchain is built, rather than reading back an empty TC_GCC and always taking the fallback. Also emits TC_KERNEL into the generated tc_vars so a build-time kernel gate has it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QEH1b4ASNYSrZFQnEeroj8
comcerto2k (ARMv7, gcc 4.9.3) broke the build: ffmpeg enabled SVT-AV1 on a fixed list -- alpine, comcerto2k, monaco plus the 64-bit archs -- but those three are 32-bit ARMv7, and SVT-AV1 is 64-bit only (it now declares REQUIRE_64BIT), so the dependency refused the arch and took chromaprint, comskip and tvheadend down with it. Gate SVT-AV1 on $(64bit_ARCHS), which is what it actually supports. While here, convert ffmpeg's own "requires c11 / gcc 4.9+" arch list (UNSUPPORTED_ARCHS = ARMv5 + ARMv7L + old PowerPC) to MIN_GCC_VERSION = 4.9 in the cross and spk Makefiles alike -- the same declared-capability move, and the list was exactly the stock gccs below 4.9. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QEH1b4ASNYSrZFQnEeroj8
REQUIRE_64BIT is a capability like MIN_GCC_VERSION and MIN_GLIBC_VERSION -- a 32-bit arch cannot run a 64-bit-only package, whatever the compiler -- so it belongs in tc-capability.mk with the other two, setting the same TC_CAPABILITY_UNSUPPORTED. pre-check.mk then has a single capability path (one error, one BUILD_UNSUPPORTED line) beside the legacy UNSUPPORTED_ARCHS, instead of a second near-identical block. The non-empty-ARCH guard moves with it, so the arch-less source download still does not trip on an empty ARCH. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QEH1b4ASNYSrZFQnEeroj8
An arch can miss more than one at once -- a 32-bit target on an old gcc fails both
REQUIRE_64BIT and MIN_GCC_VERSION -- and each check assigning TC_CAPABILITY_UNSUPPORTED
outright meant only the last survived ("requires a 64-bit architecture" while the
gcc was also too old). Append instead, comma-separated, so the refusal lists every
reason: "gcc 4.6.4 < 4.9, requires a 64-bit architecture".
The value is reset at the top because this file is parsed more than once per build
(via spksrc.common.mk); appending, unlike the old overwrite, is not idempotent
without it.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QEH1b4ASNYSrZFQnEeroj8
Add the three capability-floor variables to the docs alongside every place that referenced UNSUPPORTED_ARCHS / REQUIRED_MIN_DSM, and to the framework Highlights: - framework/changes.md: a Highlights bullet and a dated log entry for #7313. - packaging/makefile-variables.md: Architecture Support now leads with the capability floors (preferred) and keeps UNSUPPORTED_ARCHS for genuine exclusions; documents the read-only TC_GCC / TC_GLIBC / TC_KERNEL they check. - reference/makefile-reference.md: the three floors in Version & Build Constraints, TC_GCC / TC_GLIBC / TC_KERNEL in Architecture Variables. - architectures.md: the 'exclude 32-bit' example now uses REQUIRE_64BIT. - pull-requests.md, github-actions.md, copilot-instructions.md, CONTRIBUTING.md: mention the capability floor beside UNSUPPORTED_ARCHS. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QEH1b4ASNYSrZFQnEeroj8
MIN_GCC_VERSION does not just replace UNSUPPORTED_ARCHS: REQUIRED_MIN_DSM was often used as a proxy for 'needs a recent enough compiler' and then topped up with UNSUPPORTED_ARCHS for the archs a single DSM floor missed (a DSM version does not map to one gcc across every arch). MIN_GCC_VERSION states that real requirement and covers those cases at once. - changes.md: a 'Beyond a DSM floor' point in the #7313 entry, naming REQUIRED_MIN_DSM / REQUIRED_MAX_DSM / REQUIRED_MIN_SRM as what stays for genuine OS-version constraints. - github-actions.md: list those OS-version constraints beside the capability floors and UNSUPPORTED_ARCHS in both the CI-selection and debugging notes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QEH1b4ASNYSrZFQnEeroj8
The capability reason (e.g. 'gcc 4.6.4 < 4.9') is interpolated into a $(shell
echo ... >> BUILD_UNSUPPORTED_FILE); the unquoted '<' made the shell treat it as
an input redirection ('cannot open 4.9'), the echo failed, and the unsupported
entry was never recorded -- so CI classified an expected capability refusal as a
real build error (hi3535, 88f6281). Quote the echo argument so '<', '(' and ')'
in the message are literal. $(error) on the next line is unaffected (make, not a
shell) and still prints the reason.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QEH1b4ASNYSrZFQnEeroj8
These all build against ffmpeg8, which requires gcc 4.9, and each hand-mirrored that with UNSUPPORTED_ARCHS = ARMv5 + ARMv7L + old ppc. Replace the arch list with the real requirement, MIN_GCC_VERSION = 4.9 (matching ffmpeg8's own floor): it refuses exactly the toolchains older than 4.9 -- 88f6281 (4.6.4), hi3535 (4.8.3) and the DSM-5.2 ppc archs -- while keeping qoriq (4.9.3), and stays correct on its own as toolchains move. tvheadend keeps its upstream PPC note (issue 5060), which the floor already enforces (old ppc < 4.9, qoriq >= 4.9). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QEH1b4ASNYSrZFQnEeroj8
Keep the capability floor consistent between a package and its cross counterpart, so the dependency is refused at its own level instead of failing deep in a build: - cross/comskip had no floor at all -- add MIN_GCC_VERSION = 4.9 (it builds against cross/ffmpeg8). - cross/tvheadend hand-listed OLD_PPC + ARMv5 only, so it still accepted hi3535 (armv7l, gcc 4.8.3) that spk/tvheadend rejects. MIN_GCC_VERSION = 4.9 closes that gap and matches ffmpeg's own floor, while keeping qoriq (gcc 4.9.3). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QEH1b4ASNYSrZFQnEeroj8
In Architecture Support, spell out three rules: - Mirror a floor from spk/foo onto cross/foo. - Essential dependencies set the floor: if a mandatory dependency needs a newer gcc/glibc, raise the package's (and its cross's) floor -- but a shared cross/ library keeps the minimum it needs, so it is never forced up to a consumer's floor. - An optional dependency is gated with an ifeq and its configure options kept in the same block, rather than lifting the whole package's floor (as optional ffmpeg-backed features are wired). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QEH1b4ASNYSrZFQnEeroj8
…rom errors
The reconcile step drops an unsupported package from the error list by extracting
its name from build_unsupported.txt with 'grep -Po "\- \K.*:"'. That greedy
'.*:' runs to the LAST colon, which was fine only while every reason was
colon-free. The capability messages carry colons ("... unsupported: gcc 4.6.4 <
4.9", "(a runtime floor: ...)"), so the greedy match swallowed the reason into
the 'name' -- which then no longer matched the '- <name>: (arch) FAILED' error
line (leaving ffmpeg7/8, tvheadend, comskip, chromaprint wrongly FAILED) and even
injected the reason's '(' into the grep -Pv pattern. Make it non-greedy ('.*?:')
so it captures just '<name>:'.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QEH1b4ASNYSrZFQnEeroj8
…comments Keep only the technical reason for the floor (ffmpeg needs C11) in the code; the rationale for replacing the old arch lists, and which archs it covers, lives in the docs, not beside every declaration. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QEH1b4ASNYSrZFQnEeroj8
Adding TC_GCC/TC_GLIBC to the tc_vars echo chain also appended TC_KERNEL, but tc_vars already emits it just below with the '>= 4.4' EXTRAVERSION '+' handling -- so the generated file carried TC_KERNEL twice (the raw one, then the '+'-aware one). Drop the redundant raw echo; the EXTRAVERSION block stays the sole emitter. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QEH1b4ASNYSrZFQnEeroj8