lib/tests/triples.nix: add test suite and fix our parser so it passes#235230
Conversation
This was referenced May 31, 2023
This was referenced Jun 15, 2023
16 tasks
ghost
commented
Jun 21, 2023
added 22 commits
December 1, 2023 13:43
gnu-config doesn't include this.
This commit fixes the logic for handling missing/unknown vendor fields in triples, and extends it to handle mmix and microblaze CPU-types.
This commit adds lib/tests/triples.nix, which exhaustively tests that our platform triple parse-then-unparse round-trip agrees with gnu-config for all inputs that it accepts (it may -- and does -- reject triples which `gnu-config` accepts).
With this commit, we now parse or reject the following identically to gnu-config: - aarch64-solo5-none (accept) - aarch64-solo5-none-elf (reject) Closes #165836.
This commit adds support for triples with a missing kernel, rather than kernel="none". It also adds a parser case for triples which have a vendor and abi, but no kernel. This allows to parse "*-unknown-elf" triples. Closes #230160.
…g now understands it) gnu-config commit 6c78704d542cebfb56d17474fe9f8395e9defb94 added upstream support for ghc's javascript triple, so we can remove the exception now.
This reverts commit 20a384ee5c642021786bb5981bb613d95273bb6e.
…m x86_64-apple-darwin-
Contributor
|
Hey! Sorry to see this closed, was looking forward to seeing this in action =/ Can I inquire as to what's the plan going forward on this? Is this abandoned/halted for some (afaict) unspecified reason? |
Member
|
This is related to NixOS/nixpkgs-committers#60 (comment) and I suppose someone will have to pick the work to get it to finish line themselves. |
This pull request was closed.
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.
As promised; sorry it took so long. Probably best reviewed one commit at a time.
Closes #165836
Closes #230160
Description of changes
This PR adds
lib/tests/triples.nix, which exhaustively tests that our platform triple parse-then-unparse roundtrip agrees withgnu-configfor all inputs that it accepts (it may -- and does -- reject triples whichgnu-configaccepts).This PR also includes the commits needed in order to get the test suite to pass.
There are only two major exceptions in nixpkgs to agreement with
gnu-config-- these are triples which we accept butgnu-configrejects:vc4-elf(forvc4-{gcc,binutils}, reverse engineered fork for broadcom's gpu)fixed upstream 6c78704d542cebfb56d17474fe9f8395e9defb94javascript-unknown-ghcjs(forghc)There is one minor exception: we canonicalize
""-linuxtounknown-linuxrather thanpc-linuxasgnu-configdoes in some cases.Things done
CC: @sternenseemann @alyssais @Ericson2314