diff options
author | Adam Joseph <adam@westernsemico.com> | 2022-08-13 02:48:07 -0700 |
---|---|---|
committer | Adam Joseph <adam@westernsemico.com> | 2023-01-02 20:53:12 -0800 |
commit | c0a40bee00461f2b4999cbec319d1e54baa9d87f (patch) | |
tree | 7eaf070c965ccfdc4badbdde390bb3faaa1f79ac /pkgs/development/libraries/nss | |
parent | 14f337afb6fde2e847ea499bb6250a57a9660d48 (diff) |
nss: set -DNS_PTR_LE_32=1 if isILP32
A comment in RNG_RandomUpdate() (drdbg.c) says to add the -DNS_PTR_LE_32=1 flag on ILP32 platforms. Without this PR, pkgsCross.mips64el-linux-gnuabin32.nss fails to build. With this PR, it succeeds.
Diffstat (limited to 'pkgs/development/libraries/nss')
-rw-r--r-- | pkgs/development/libraries/nss/generic.nix | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/development/libraries/nss/generic.nix b/pkgs/development/libraries/nss/generic.nix index a2e44f40227f8..89227b78f2f73 100644 --- a/pkgs/development/libraries/nss/generic.nix +++ b/pkgs/development/libraries/nss/generic.nix @@ -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 |