gcc10: fix build with libxcrypt

This commit is contained in:
Martin Weinelt 2022-09-29 18:29:11 +02:00
parent eb2ed865eb
commit aac6de8d31
No known key found for this signature in database
GPG key ID: 87C1E9888F856759

View file

@ -26,6 +26,7 @@
, gnused ? null
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
, buildPackages
, libxcrypt
}:
# Make sure we get GNU sed.
@ -172,7 +173,7 @@ stdenv.mkDerivation ({
++ optional targetPlatform.isLinux patchelf;
buildInputs = [
gmp mpfr libmpc
gmp mpfr libmpc libxcrypt
targetPackages.stdenv.cc.bintools # For linking code at run-time
] ++ (optional (isl != null) isl)
++ (optional (zlib != null) zlib)
@ -182,10 +183,12 @@ stdenv.mkDerivation ({
NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm -ldl";
preConfigure = import ../common/pre-configure.nix {
preConfigure = (import ../common/pre-configure.nix {
inherit lib;
inherit version targetPlatform hostPlatform gnatboot langAda langGo langJit crossStageStatic enableMultilib;
};
}) + ''
ln -sf ${libxcrypt}/include/crypt.h libsanitizer/sanitizer_common/crypt.h
'';
dontDisableStatic = true;