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: Refactor treatment of configure flags #31292

Merged
merged 2 commits into from Nov 15, 2017

Conversation

bgamari
Copy link
Contributor

@bgamari bgamari commented Nov 5, 2017

Previously configureFlags was defined as one giant interpolated string. Here we
refactor this definition to instead use the usual stdenv string
combinators. This seems more in-line with the average nixpkgs expression
and it seems a bit more natural to things of these as lists of flags
rather than monolithic strings.

Motivation for this change
Things done
  • 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.

@bgamari
Copy link
Contributor Author

bgamari commented Nov 5, 2017

I still need to test this but putting it up to make sure that the direction is acceptable. I can do the same for gcc 7 in due course.

@Ericson2314
Copy link
Member

This is great!

@vcunat
Copy link
Member

vcunat commented Nov 5, 2017

Certainly 👍 for the direction.

@globin
Copy link
Member

globin commented Nov 6, 2017

@nixborg build

@nixborg
Copy link

nixborg commented Nov 6, 2017

Jobset created at https://hydra.mayflower.de/jobset/nixos/pr-31292

@aneeshusa
Copy link
Contributor

I'm always happy to see more in the vein of #15799 :)

@bgamari
Copy link
Contributor Author

bgamari commented Nov 12, 2017

How should I interpret the Travis failure? It looks to me like it just failed due to a conflict.

@Ericson2314
Copy link
Member

Ericson2314 commented Nov 12, 2017

@bgamari Travis fails for us, especially with mass rebuilds, so I wouldn't worry. The nixborg builds failures look spurious, so if you want to convert the other GCCs I think this is ready to go!

Copy link
Contributor Author

@bgamari bgamari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, I've rebased this and finished porting the remaining compiler versions.

[
"CC_FOR_BUILD=${buildPackages.stdenv.cc.prefix}gcc"
"CXX_FOR_BUILD=${buildPackages.stdenv.cc.prefix}g++"
] ++
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, this shouldn't be in this commit.

@bgamari bgamari force-pushed the gcc-refactor branch 2 times, most recently from f4f9674 to b9286de Compare November 14, 2017 20:40
@Ericson2314 Ericson2314 force-pushed the gcc-refactor branch 2 times, most recently from a9b0d56 to a0f2023 Compare November 14, 2017 21:10
Previously configureFlags was defined as one giant interpolated string.
Here we refactor this definition to instead use the usual stdenv string
combinators. This seems more in-line with the average nixpkgs expression
and it seems a bit more natural to things of these as lists of flags
rather than monolithic strings.
@Ericson2314
Copy link
Member

@nixborg build

@nixborg
Copy link

nixborg commented Nov 15, 2017

Jobset created at https://hydra.mayflower.de/jobset/nixos/pr-31292

@Ericson2314 Ericson2314 merged commit cbc346f into NixOS:staging Nov 15, 2017
@Ericson2314
Copy link
Member

Build looks good enough to me, thanks @bgamari!

@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 Nov 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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

8 participants