-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gcc: deduplicate version expressions #249707
Conversation
Rebased. The last merge of Since this is strictly cleanup (no change after eval), in order to prevent that from happening again I am going to merge this to both |
This commit lifts the default gcc version to a top-level attribute so it can be overridden.
Found here: |
Found here: |
The last merge of Since this is strictly cleanup (no change after eval), in order to prevent that from happening again I am merging this to both |
This PR sorts the huge pile of patches and deduplicates it. Unlike its predecessors #249707 and #250489 this commit *does* affect eval. Patches below are organized into three general categories: 1. Patches relevant to gcc>=12 on every platform 2. Patches relevant to gcc>=12 on specific platforms 3. Patches relevant only to gcc<12, sorted by the newest version to which they might be relevant
Description of changes
This PR combines our 10 copy-pasted-but-slightly-different gcc expressions into a single Nix expression which uses conditionals where necessary. It reduces the size of our GCC expression by 64% -- from over 5,000 lines of Nix code to under 2,000.
Prior to this PR, making any kind of change uniformly across all versions of GCC was either impossible or extremely error-prone.
This (mostly) completes the work begun in #243607
This PR causes no change in eval -- all
gcc
packages have the samedrvPath
after it as they did before:The
patches/default.nix
expression is more complicated than necessary because it preserves the order of the patches exactly. A follow-up PR will greatly simplify that file, but that follow-up PR won't preservedrvPath
s like this one does. Likewise, thefixing the GLIBC_DYNAMIC_LINKER...
part ofpostPatch
will be made massively simpler by not worrying about keeping all the whitespace exactly the same.Things done