-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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: use standard builder instead of custom builder.sh #237856
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
diffoscope
does not show any material changes before
/after
at least for gcc.cc
.
Having said that
|
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This commit is left unsquashed to make review of the subsequent commits easier.
This commit performs two search-and-replace operations: - replace all `${` with `''${` - replace `''` with `""` in shell scripts This commit is left unsquashed to make review of the subsequent commits easier.
This commit adds arguments to `builder.nix`, making it a callable function, and splits up the single massive shell script into separate attributes for each phase. It also drops the first two lines and the last line because these are part of the default builder. All script lines which were not part of a phase function have been moved into `preUnpack` since this is the first phase that runs. Subsequent commits will move parts of this to more sensible locations.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Okay, I found the problem with Since last review I have:
So I think e02be1883fb2f1eacde8b193400c2168fce20737 is the only commit that needs additional review.
@ofborg build wineWowPackages.waylandFull.stdenv.cc.cc |
Building:
|
wineWowPackages.waylandFull.stdenv.cc.cc on x86_64-linux — Success |
Looks like #241980 was lost (and maybe more?) |
Fixed, thanks for noticing. |
@ofborg build perlPackages.XMLLibXML |
Rebased to fix merge conflict. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's see if anything breaks
Built pkgsCross.aarch64-multiplatform.bash
# It seems there is a bug in GCC 5 | ||
#"CFLAGS=$EXTRA_FLAGS $EXTRA_LDFLAGS" | ||
#"CXXFLAGS=$EXTRA_FLAGS $EXTRA_LDFLAGS" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been commented since it's introduction in 2017 d4595b3#diff-7e60bf21d59f0d31c6d1a2c867692b9bcbad6dc8d8611e06e2e7bb91a9e07877R116-R118
Please review the commits in this PR separately, ignoring whitespace.
If you read them that way, most of them are trivial. You can skip the first six commits, which are from this PR (merged to
master
but has not yet reachedstaging
):Description of changes
This PR causes our gcc expressions (all 10 of them) to use the standard builder instead of their own custom
builder.sh
.This PR deliberately does the minimum amount possible to achieve that, because it is likely to merge-conflict with almost any other PR which touches any version of GCC. Most of the commits in this PR are simple, repeatable operations (like search and replace) to try to make it easier to rebase them past any conflicts.
Most of the benefits of this PR will be realized in future PRs (see the last few commits of #238069)
Future Benefits
gcc/builder.sh
causes a mass rebuild of every package on every platform. This is crazy.staging
.builder.sh
; see the gymnastics with "extra fixup phases" I had to add tolibgcc.nix
. Those will go away.And, ultimately the big long-term benefit:
gcc
expression should look like ourboost
andnix
expressions, usinglib.versions
when it is necessary to set minimum versions for things like patch applicability or configure flags.Things done
gcc48,gcc49,gcc6,gcc7,gcc8,gcc9,gcc10,gcc11,gcc12,gcc13
x86_64-linux
): in progresssandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)