Skip to content
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: backport cda41ce0 from gcc 11.1.0 if isPower64 && isMusl #170400

Closed
wants to merge 1 commit into from
Closed

gcc: backport cda41ce0 from gcc 11.1.0 if isPower64 && isMusl #170400

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Apr 26, 2022

Description of changes

A bug in libgcc, which manifests when building static binaries using musl-libc, was fixed in gcc 11.1.0. The fix has not been backported to gcc 10. This commit cherry-picks the commit from upstream and applies it in the case (isPower64 && isMusl) where it matters:

https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=cda41ce0e8414aec59e6b9fbe645d96e6e8193e2

The big payoff here is that this now works:

nix-build . -A pkgsStatic.nix_2_4

... that, plus the bootstrap-files (#168199, merged) mean that people can now try out nixpkgs on powerpc64le without having to figure out which bazillion different packages from their host distribution are needed in order for nix to compile. They can just grab a statically-linked nix binary (maybe Hydra could build this?) and bootstrap using that.

Things done
  • Built on platform(s)
    • powerpc64le-linux
    • x86_64-linux (in progress)
    • mips64el-linux (in progress)
    • aarch64-linux (in progress)
    • x86_64-darwin
    • aarch64-darwin
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@ghost ghost requested a review from matthewbauer as a code owner April 26, 2022 10:09
A bug in libgcc which manifests when building static binaries using
musl-libc was fixed in gcc 11.1.0, but the fix has not been backported
to gcc 10.  This commit cherry-picks the commit from upstream and
applies it in the case (isPower64 && isMusl) where it matters:

  https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=cda41ce0e8414aec59e6b9fbe645d96e6e8193e2
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Apr 26, 2022
@ghost
Copy link
Author

ghost commented Apr 26, 2022

@ofborg build pkgsCross.powernv.pkgsStatic.nix_2_4

@ghost
Copy link
Author

ghost commented Apr 26, 2022

ofborg said:

pkgsCross.powernv.pkgsStatic.nix_2_4 on x86_64-linux — Success

@ghost
Copy link
Author

ghost commented Apr 27, 2022

@ofborg eval

@ghost
Copy link
Author

ghost commented Jun 12, 2022

@ofborg eval

1 similar comment
@ghost
Copy link
Author

ghost commented Jun 13, 2022

@ofborg eval

@ghost
Copy link
Author

ghost commented Jul 27, 2022

This patch is in gcc 10.4.0, so we no longer need it after 3f88d51

@ghost ghost closed this Jul 27, 2022
@ghost ghost deleted the gcc-backport-cda41ce0-from-gcc-11-1-if-isPower64-and-isMusl branch January 23, 2024 06:45
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants