Skip to content
This repository was archived by the owner on Sep 20, 2026. It is now read-only.

feat: add Linux UAPI headers formula - #529

Merged
MeteorsLiu merged 2 commits into
xgo-dev:mainfrom
MeteorsLiu:feat/linux-uapi-headers
Sep 14, 2026
Merged

MeteorsLiu merged 2 commits into
xgo-dev:mainfrom
MeteorsLiu:feat/linux-uapi-headers

Conversation

@MeteorsLiu

@MeteorsLiu MeteorsLiu commented Sep 10, 2026 •

Copy link
Copy Markdown
Collaborator

Add a standalone Linux UAPI headers formula with Linux-aware release ordering.

The implementation includes:

  • Export headers with make headers_install, LLVM=1, and an explicit target ARCH for Linux amd64 and arm64.
  • Select the formula starting at Linux v5.7, where upstream introduced LLVM=1.
  • Check exported syscall numbers and UAPI types with target-specific Clang consumer tests.
  • Add a module-local comparator that orders matching -rcN tags before final releases and -dontuse variants before their normal RC, while retaining GNU numeric ordering for historical tags.
  • Validate all 946 historical tags against an independent numeric ordering model, plus latest-version selection, the v5.7 formula boundary, and dependency version selection.

This keeps header exports architecture-correct and prevents unversioned requests from selecting an older RC after its final release. Next-cycle RCs remain newer than the preceding final release; LLAR's global comparator and Git reference handling are unchanged.

@MeteorsLiu
MeteorsLiu marked this pull request as ready for review September 10, 2026 08:24

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the complete Linux UAPI formula diff. The build and consumer-test paths are internally consistent, but the module needs Linux-aware tag ordering to avoid selecting release candidates over final releases.

Validation: inspected LLAR bd473ea21632d57a4ed21e54144a55d0ee6c1872, Linux v5.7 Kbuild behavior, and reproduced the default comparator ordering. A local llar test ./torvalds/linux@v5.7 --os linux --arch amd64 compiled and loaded the formula, then stopped because this runner does not have Clang installed.

View job run

id "torvalds/linux"

// Linux 5.7 introduced LLVM=1 for both target tools and host Clang.
fromVer "v5.7"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Define Linux release-aware tag ordering

Without a _cmp.gox, LLAR uses GNU version comparison, which orders a final tag before its RC suffix (for example, v7.2 < v7.2-rc7). As a result, whenever the newest release has no next-cycle RC yet, an unversioned torvalds/linux request resolves to the release candidate instead of the final release. Add a Linux-aware comparator that treats -rcN as a prerelease of the matching final version while still handling the repository's complete historical tag set.

@MeteorsLiu
MeteorsLiu merged commit ee89b0f into xgo-dev:main Sep 14, 2026
0 of 2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant