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: Simplify configure flags #32361

Merged
merged 10 commits into from Dec 7, 2017

Conversation

Ericson2314
Copy link
Member

@Ericson2314 Ericson2314 commented Dec 5, 2017

Motivation for this change

No more crossAttrs.configureFlags, simplified platform flags, and more tool env vars.

The history is intentionally complicated; it will assist me with bisecting various cross related regressions (especially the build != host == target GCC builds).

Things done

No native hashes should be changed. The first commits, "morally equivalent" to the final diff, are tested at https://hydra.nixos.org/jobset/nixpkgs/ericson2314-old-cross-known-good .

  • 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.

CC @bgamari

@Ericson2314 Ericson2314 added the 6.topic: cross-compilation Building packages on a different sort platform than than they will be run on label Dec 5, 2017
@Ericson2314 Ericson2314 requested review from dezgeg and removed request for edolstra and nbp December 5, 2017 23:00
@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 Dec 5, 2017
@orivej orivej changed the title gcc: Simplify conifgure flags gcc: Simplify configure flags Dec 6, 2017
@orivej
Copy link
Contributor

orivej commented Dec 6, 2017

Could you explain why changing env vars does not rebuild anything? Is it important that your new simple commits are before merge commits (possibly breaking eval or build between the first and the last merge commit, unless you have confirmed that they don't)?

@orivej
Copy link
Contributor

orivej commented Dec 6, 2017

Could you explain why changing env vars does not rebuild anything?

Ah, because it only affects cross builds.

The history is intentionally complicated; it will assist me with bisecting various cross related regressions (especially the build != host == target GCC builds).

I'm not sure it will. Bisection with git bisect run between the base revision of this PR and the future master will be impractical after a few merges of staging into master. Manual bisection with git bisect good/bad does not seem to benefit from this PR: you are better off either with tagging the milestone revisions (8f970d0 198dcec 71186e7 ab77a6b 703a9f9) as cross1 .. cross5, or with keeping the merges of these revisions in a private branch.

@Ericson2314
Copy link
Member Author

Ah sorry, I didn't mean bisection so much as what one does after.

From https://hydra.nixos.org/jobset/nixpkgs/ericson2314-cross-trunk I already know what went wrong when. I'm trying to make changes to working commits such that they keep working, and when with later commits, they are less broken.

In this case, I'm mostly simplifying things, but through that method I know the change is valid. Next up, I have some changes to builder.sh that actually fix things, which I'll want to likewise repeatedly merge against these merge commits.

Back to the bisecting part, if my new fix doesn't fix all of the new merge commits, I can see roughly where some thing went wrong. I can also bisect the original history, merging the bisect commits with the most recent merge commit for a sort of virtual linear history.

That's all quite complex. Probably the simplest way to look at it is I'm trying to make there be at least one path on the history with no regressions. I'm breaking off chunks of history to get to the present while fixing any breakage along the way.

@Ericson2314
Copy link
Member Author

It might just be easier to explain after I make the next PR, which is now ready. Merging this so that makes sense.

@Ericson2314 Ericson2314 merged commit cc20d40 into NixOS:master Dec 7, 2017
@Ericson2314 Ericson2314 deleted the gcc-simplify-flags branch December 7, 2017 05:59
@Ericson2314 Ericson2314 mentioned this pull request Dec 7, 2017
8 tasks
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: 1-10
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