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

[WIP] ed: fix cross build #32489

Merged
merged 1 commit into from Jan 9, 2018
Merged

[WIP] ed: fix cross build #32489

merged 1 commit into from Jan 9, 2018

Conversation

orivej
Copy link
Contributor

@orivej orivej commented Dec 8, 2017

Motivation for this change

Fixes #32322 (comment)

@Ericson2314 Is it correct that there is no CC env var during the cross compilation? (I had to use CC_FOR_BUILD or BUILD_CC instead.)

Things done

Tested with nix-build pkgs/top-level/release-cross.nix -A rpi.ed.x86_64-linux.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@orivej
Copy link
Contributor Author

orivej commented Dec 8, 2017

Besides, CC_FOR_BUILD being armv6l-unknown-linux-gnueabihf-gcc seems wrong. CC_FOR_BUILD should be the native compiler, and CC should be the cross compiler.

@orivej orivej changed the title ed: fix cross build [WIP] ed: fix cross build Dec 8, 2017
@orivej
Copy link
Contributor Author

orivej commented Dec 8, 2017

See also #25212 (comment)

@Ericson2314
Copy link
Member

It should be CC. I'm going to chalk this up as things been broken until #26805 lands. The existing crossConfig logic I put in the setup hook is not correct.

@dtzWill
Copy link
Member

dtzWill commented Jan 9, 2018

Changing this to be "CC=$CC" works, since the variable is set now. Can you update your commit to do that instead? Once that's done, this is ready to go! 👍

(Ping! ed` blocks a lot of things, and the way this is implemented won't cause non-cross rebuilds... )

@Ericson2314 Ericson2314 self-assigned this Jan 9, 2018
@Ericson2314
Copy link
Member

Done!

@Ericson2314 Ericson2314 merged commit b850eb3 into NixOS:master Jan 9, 2018
@Ericson2314 Ericson2314 added the 6.topic: cross-compilation Building packages on a different sort platform than than they will be run on label Jan 9, 2018
@Ericson2314 Ericson2314 added this to After big PR in Cross compilation Jan 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: cross-compilation Building packages on a different sort platform than than they will be run on 10.rebuild-darwin: 0 10.rebuild-linux: 0
Projects
No open projects
Cross compilation
After big PR
Development

Successfully merging this pull request may close these issues.

None yet

4 participants