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

purple-matrix: pname, fix cflags, restore hardening #65427

Merged
merged 1 commit into from Nov 16, 2019

Conversation

dtzWill
Copy link
Member

@dtzWill dtzWill commented Jul 26, 2019

Motivation for this change

Also bump to latest, although not sure the changes are significant
functionally.

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/)
    • Using plugin presently, LGTM? :D
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

hardeningDisable = [ "fortify" ]; # upstream compiles with -O0
# Drop bad CFLAGS
postPatch = ''
substituteInPlace Makefile.common --replace "-O0 -Werror" ""
Copy link
Member

Choose a reason for hiding this comment

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

Does this work?

NIX_CFLAGS_COMPILE = ["-O3" "-Wno-error"];

This would be more robust then sed patching.

@Mic92
Copy link
Member

Mic92 commented Oct 9, 2019

Is the postPatch still required?

1 similar comment
@Mic92
Copy link
Member

Mic92 commented Oct 9, 2019

Is the postPatch still required?

@dtzWill
Copy link
Member Author

dtzWill commented Nov 16, 2019

Dropped build system touchup, letting NIX_CFLAGS_COMPILE additions override the -O0 -Werror, thanks. Only reason I initially removed the problematic flags was a trade-off ... to avoid needing to know what "default" cflags would be were those not specified.

Benefit of this approach is it's less likely (I'd guess) to need attention in a future update :).

I don't really have any preference, just explaining since was revisiting to address comment I missed for some time O:).

@ofborg ofborg bot requested a review from symphorien November 16, 2019 07:35
@Mic92 Mic92 merged commit 9d21910 into NixOS:master Nov 16, 2019
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