From 563987104e9ce0088f140360edd02458b2266688 Mon Sep 17 00:00:00 2001 From: Guillaume Girol Date: Sat, 9 Nov 2024 12:00:00 +0000 Subject: [PATCH] linux config: enable cp15 barrier emulation on aarch64 this fixes the native armv7l build of nodejs on aarch64 remote builders --- pkgs/os-specific/linux/kernel/common-config.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index 54a9753b5fa1..34eeb745ff36 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -1297,6 +1297,13 @@ let # differently when run under aarch64 kernels compared to when # it is run under an aarch32 kernel. COMPAT_ALIGNMENT_FIXUPS = lib.mkIf (stdenv.hostPlatform.system == "aarch64-linux") (whenAtLeast "6.1" yes); + + # requirement for CP15_BARRIER_EMULATION + ARMV8_DEPRECATED = lib.mkIf (stdenv.hostPlatform.system == "aarch64-linux") yes; + # emulate a specific armv7 instruction that was removed from armv8 + # this instruction is required to build a native armv7 nodejs on an + # aarch64-linux builder, for example + CP15_BARRIER_EMULATION = lib.mkIf (stdenv.hostPlatform.system == "aarch64-linux") yes; } // lib.optionalAttrs (stdenv.hostPlatform.system == "x86_64-linux" || stdenv.hostPlatform.system == "aarch64-linux") { # Required for various hardware features on Chrome OS devices CHROME_PLATFORMS = yes;