From 5fe151516aac45ffb13bea446d713f9de5491c17 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Tue, 29 Apr 2025 11:19:57 +0200 Subject: [PATCH] jemalloc: fix loongarch64-linux build --- pkgs/development/libraries/jemalloc/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/jemalloc/default.nix b/pkgs/development/libraries/jemalloc/default.nix index 05a82ccffb13..b6ad34e05f40 100644 --- a/pkgs/development/libraries/jemalloc/default.nix +++ b/pkgs/development/libraries/jemalloc/default.nix @@ -74,7 +74,14 @@ stdenv.mkDerivation rec { # The upstream default is dependent on the builders' page size # https://github.com/jemalloc/jemalloc/issues/467 # https://sources.debian.org/src/jemalloc/5.3.0-3/debian/rules/ - ++ [ (if stdenv.hostPlatform.isAarch64 then "--with-lg-page=16" else "--with-lg-page=12") ] + ++ [ + ( + if (stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isLoongArch64) then + "--with-lg-page=16" + else + "--with-lg-page=12" + ) + ] # See https://github.com/jemalloc/jemalloc/issues/1997 # Using a value of 48 should work on both emulated and native x86_64-darwin. ++ lib.optional (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) "--with-lg-vaddr=48";