Merge pull request #208698 from amjoseph-nixpkgs/pr/nss/ilp32

This commit is contained in:
Martin Weinelt 2023-01-03 07:00:45 +01:00 committed by GitHub
commit b38111a665
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -48,6 +48,7 @@ rec {
is32bit = { cpu = { bits = 32; }; };
is64bit = { cpu = { bits = 64; }; };
isILP32 = map (a: { abi = { abi = a; }; }) [ "n32" "ilp32" "x32" ];
isBigEndian = { cpu = { significantByte = significantBytes.bigEndian; }; };
isLittleEndian = { cpu = { significantByte = significantBytes.littleEndian; }; };

View file

@ -103,7 +103,11 @@ stdenv.mkDerivation rec {
runHook postBuild
'';
NIX_CFLAGS_COMPILE = "-Wno-error -DNIX_NSS_LIBDIR=\"${placeholder "out"}/lib/\" " + lib.optionalString stdenv.hostPlatform.is64bit "-DNSS_USE_64=1";
NIX_CFLAGS_COMPILE =
"-Wno-error -DNIX_NSS_LIBDIR=\"${placeholder "out"}/lib/\" "
+ lib.optionalString stdenv.hostPlatform.is64bit "-DNSS_USE_64=1"
+ lib.optionalString stdenv.hostPlatform.isILP32 " -DNS_PTR_LE_32=1" # See RNG_RandomUpdate() in drdbg.c
;
installPhase = ''
runHook preInstall