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

netbsd.mkDerivation: fix darwin build #59278

Merged
merged 2 commits into from Apr 11, 2019

Conversation

veprbl
Copy link
Member

@veprbl veprbl commented Apr 10, 2019

Fixes build of netbsd.make on darwin

Fixes: aab8c7b ('netbsd: add cross target')
Resolves: #59141

Motivation for this change
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/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Fixes build of netbsd.make on darwin

Fixes: aab8c7b ('netbsd: add cross target')
Fixes netbsd.locale

Fixes: aab8c7b ('netbsd: add cross target')
@@ -51,7 +51,7 @@ let

AR = "${stdenv'.cc.targetPrefix or ""}ar";
CC = "${stdenv'.cc.targetPrefix or ""}cc";
CPP = if (stdenv'.cc.isClang or false) then "clang-cpp" else "cpp";
CPP = "${stdenv'.cc.targetPrefix or ""}cpp";
Copy link
Member

Choose a reason for hiding this comment

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

@Ericson2314 should cpp be prefixed? I feel like it is one case where we don't want the prefixed one. Everyone target could use the same cpp.

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't know much about cross stuff, but I think cpp knows about the target to be able to define macros like __i386__ and such (e.g. https://github.com/openbsd/src/blob/master/libexec/tradcpp/config.h)

Copy link
Member

Choose a reason for hiding this comment

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

It's just safer to prefix

@matthewbauer
Copy link
Member

Thanks for working on this!

@matthewbauer matthewbauer merged commit 51be4c6 into NixOS:master Apr 11, 2019
@veprbl veprbl deleted the pr/netbsd_darwin_fix branch December 1, 2020 17:02
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

4 participants