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: Use configurePlatforms to control --build, --host, and --target #28391

Merged
merged 2 commits into from
Aug 23, 2017

Conversation

Ericson2314
Copy link
Member

@Ericson2314 Ericson2314 commented Aug 19, 2017

Motivation for this change

A step in consolidating the configure flags logic within these derivations.

Things done

There's quite a few combination of platforms to try. I don't expect the cross ones to work until #26805 but the native ones can be tested. @dezgeg let me know how/whether to reproduce the ARM issue for binutils, as I suspect it's a general autoconf one and might affect GCC too.

  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built stdenv on platform(s)
    • NixOS
    • macOS
    • Linux
  • 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.

@Ericson2314 Ericson2314 added the 6.topic: cross-compilation Building packages on a different sort platform than than they will be run on label Aug 19, 2017
@mention-bot
Copy link

@Ericson2314, thanks for your PR! By analyzing the history of the files in this pull request, we identified @civodul, @shlevy and @Dridus to be potential reviewers.

@dezgeg
Copy link
Contributor

dezgeg commented Aug 20, 2017

I threw nix-build -A stdenv for this on armv7l-linux to try it out.

Though the same question as with binutils remain, what's the concrete benefit of passing these flags when not cross compiling?

@Ericson2314 Ericson2314 modified the milestone: 17.09 Aug 20, 2017
@Ericson2314 Ericson2314 added this to Needed by the big PR---nice to move pick off pieces of it and move here, rebasing the big PR on top in Cross compilation Aug 20, 2017
@Ericson2314
Copy link
Member Author

Ericson2314 commented Aug 20, 2017

I made an attempt at laying the benefits in the binutils thread #28374 (comment)

Raspberry Pis are Arm v7? Then I might just be able to test this out.

@dezgeg
Copy link
Contributor

dezgeg commented Aug 22, 2017

Seems like it failed: https://gist.github.com/dezgeg/8d155569d7be06a846a734e8fb7123e9. Mysterious indeed...

  • Raspberry Pi 1 is armv6l-linux (also GCC builds take like 2 days, wouldn't recommend that experience).
  • Raspberry Pi 2 is armv7l-linux.
  • Raspberry Pi 3 can be either aarch64-linux or armv7l-linux. Though unfortunately the patches for booting the mainline kernel in ARMv7 mode aren't in a released kernel yet, I think. Have to check that.

@Ericson2314
Copy link
Member Author

Ericson2314 commented Aug 22, 2017

Ok, then I'll do the same arm special case as binutils. Sound good then?

...just as we did for binutils. When the underlying issue is resolved
(probably with a configure script patch or lib/systems/parse.nix
change), this should be reverted.
@Ericson2314
Copy link
Member Author

Ericson2314 commented Aug 23, 2017

I added the arm 32-bit fallback. Building and then going to merge for the same reasoning as #28374 (comment) . Hope that's OK.

@Ericson2314 Ericson2314 merged commit 46930ef into NixOS:staging Aug 23, 2017
@Ericson2314 Ericson2314 deleted the gcc-configure-platforms branch August 23, 2017 19:47
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
Projects
No open projects
Cross compilation
Needed by the big PR---nice to move p...
Development

Successfully merging this pull request may close these issues.

None yet

3 participants