diff options
author | Kirill Elagin <kirelagin@gmail.com> | 2019-11-03 02:07:12 +0300 |
---|---|---|
committer | Kirill Elagin <kirelagin@gmail.com> | 2019-11-03 02:08:27 +0300 |
commit | 60944c7efd4d3ae33fe5933e60809cc3ad74b84c (patch) | |
tree | 313f4f45ccd43ae9cf515b199ee0182fe1056737 /pkgs/os-specific/bsd | |
parent | 1d7166766d7142984049676251bcca160c3f1498 (diff) |
Tweak cross-compilation of some netbsd stuff
This makes, at least, the following packages compile with musl: * netbsd.compat * netbsd.getent * netbsd.fts
Diffstat (limited to 'pkgs/os-specific/bsd')
-rw-r--r-- | pkgs/os-specific/bsd/netbsd/default.nix | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pkgs/os-specific/bsd/netbsd/default.nix b/pkgs/os-specific/bsd/netbsd/default.nix index f724fd33939eb..c88f40da2a9e8 100644 --- a/pkgs/os-specific/bsd/netbsd/default.nix +++ b/pkgs/os-specific/bsd/netbsd/default.nix @@ -127,6 +127,10 @@ let nativeBuildInputs = [ makeMinimal ]; buildInputs = [ zlib ]; + # for some reason the build system re-runs configure with HOST_CC + depsBuildBuild = [ buildPackages.stdenv.cc ] ++ buildInputs; + HOST_CC = "${buildPackages.stdenv.cc}/bin/cc"; + # temporarily use gnuinstall for bootstrapping # bsdinstall will be built later makeFlags = [ @@ -211,6 +215,7 @@ let version = "8.0"; nativeBuildInputs = [ ]; propagatedBuildInputs = [ compat ]; + buildInputs = [ stdenv.cc ]; extraPaths = [ (fetchNetBSD "lib/libc/gen/fts.c" "8.0" "1a8hmf26242nmv05ipn3ircxb0jqmmi66rh78kkyi9vjwkfl3qn7") (fetchNetBSD "lib/libc/include/namespace.h" "8.0" "1sjvh9nw3prnk4rmdwrfsxh6gdb9lmilkn46jcfh3q5c8glqzrd7") @@ -218,9 +223,9 @@ let ]; skipIncludesPhase = true; buildPhase = '' - cc -c -Iinclude -Ilib/libc/include lib/libc/gen/fts.c \ + "$CC" -c -Iinclude -Ilib/libc/include lib/libc/gen/fts.c \ -o lib/libc/gen/fts.o - ar -rsc libfts.a lib/libc/gen/fts.o + "$AR" -rsc libfts.a lib/libc/gen/fts.o ''; installPhase = '' runHook preInstall |