Merge pull request #72639 from kirelagin/netbsd-musl

Tweak cross-compilation of some netbsd stuff
This commit is contained in:
John Ericson
2019-11-03 04:15:23 -05:00
committed by GitHub

View File

@@ -127,6 +127,11 @@ let
nativeBuildInputs = [ makeMinimal ];
buildInputs = [ zlib ];
# the build system re-runs `./configure` with `HOST_CC` (which is their
# name for Build CC) as a compiler to make `defs.mk`, which is installed
depsBuildBuild = [ buildPackages.stdenv.cc ] ++ buildInputs;
HOST_CC = "${buildPackages.stdenv.cc.targetPrefix}cc";
# temporarily use gnuinstall for bootstrapping
# bsdinstall will be built later
makeFlags = [
@@ -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