vsftpd: fix cross-compilation, remove -Werror

This commit is contained in:
Rick van Schijndel 2021-06-18 16:41:39 +02:00
parent f69ba850a7
commit bd67ccabff

View file

@ -18,17 +18,18 @@ stdenv.mkDerivation rec {
substituteInPlace Makefile \ substituteInPlace Makefile \
--replace -dirafter "" \ --replace -dirafter "" \
--replace /usr $out \ --replace /usr $out \
--replace /etc $out/etc --replace /etc $out/etc \
--replace "-Werror" ""
mkdir -p $out/sbin $out/man/man{5,8} mkdir -p $out/sbin $out/man/man{5,8}
''; '';
NIX_LDFLAGS = "-lcrypt -lssl -lcrypto -lpam -lcap"; makeFlags = [
"CC=${stdenv.cc.targetPrefix}cc"
];
# On gcc9, this would produce NIX_LDFLAGS = "-lcrypt -lssl -lcrypto -lpam -lcap";
# error: '-Werror=enum-conversion': no option -Wenum-conversion
NIX_CFLAGS_COMPILE = lib.optionalString (lib.versionAtLeast stdenv.cc.version "10")
"-Wno-error=enum-conversion";
enableParallelBuilding = true; enableParallelBuilding = true;