Skip to content

netbsd.mkDerivation: fix darwin build - #59278

Merged
matthewbauer merged 2 commits into
NixOS:masterfrom
veprbl:pr/netbsd_darwin_fix
Apr 11, 2019
Merged

matthewbauer merged 2 commits into
NixOS:masterfrom
veprbl:pr/netbsd_darwin_fix

Conversation

@veprbl

@veprbl veprbl commented Apr 10, 2019

Copy link
Copy Markdown
Member

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')
@veprbl
veprbl requested a review from matthewbauer April 10, 2019 20:58
@GrahamcOfBorg GrahamcOfBorg added 6.topic: darwin Running or building packages on Darwin 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 501-1000 This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Apr 10, 2019
Fixes netbsd.locale

Fixes: aab8c7b ('netbsd: add cross target')
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@iedame iedame mentioned this pull request Sep 29, 2026
3 of 13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: darwin Running or building packages on Darwin 10.rebuild-darwin: 501-1000 This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants