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

Miscellaneous cross compilation fixes #59897

Merged
merged 9 commits into from Apr 20, 2019

Conversation

matthewbauer
Copy link
Member

This is a collection of fixes to the cross compilation infrastructures that I have collected. Mostly just stuff that I don't want to forget to merge. Summary:

  • fix isCompatible identity
  • add handling for musl when building aws-sdk-cpp
  • fix the ARM isCompatible definitions
  • use isCompatible as a backup for finding bootstrap tools
  • fix spidermonkey compilation
  • expose crossOverlays to Nix command line args

I can split these up into separate PRs if requested.

/cc @illegalprime

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

spidermonkey doesn’t use the autotools build, host, target convention.
Instead it considers ‘--host’ to be the autotools’ ‘--build’ and
‘--target’ to be the autotools’ ‘--host’! As a result, we cannot
safely use “configurePlatforms”. Instead, we must manually set these
flags.

/cc @illegalprime
This avoids part of the issue where things like armv7a don’t work
because the system doesn’t realize it can use the armv7l bootstrap
tools.
Squashed to fix shell quoting, thanks @Ericson2314
ppc64le and ppc64 are different targets in the configure script. We
can’t use the same one.

TODO: canonicalize similar ones based on qemu’s configure script.
This makes us less reliant on the systems/examples.nix. You should be
able to cross compile with just your triple:

$ nix build --arg crossSystem '{ config = "armv6l-unknown-linux-gnueabi"; }' stdenv
@matthewbauer
Copy link
Member Author

@GrahamcOfBorg eval

@illegalprime
Copy link
Member

@matthewbauer thanks for the spidermonkey fix!

it’s almost always a better idea to use getBin instead of .bin.
Otherwise, we could get an evaluation error if utillinux is missing
the bin otuput.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants