From 58a9a09c31e62693f1b910eeb3c9a5b01b54df31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Bon=C3=A9?= Date: Mon, 29 Sep 2025 15:41:45 +0200 Subject: [PATCH] Fix nanos6 cross-compilation for riscv --- pkgs/nanos6/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/nanos6/default.nix b/pkgs/nanos6/default.nix index c419f2d9..5e367714 100644 --- a/pkgs/nanos6/default.nix +++ b/pkgs/nanos6/default.nix @@ -48,6 +48,8 @@ let }; source = if (useGit) then git else release; + + isCross = stdenv.hostPlatform != stdenv.buildPlatform; in stdenv.mkDerivation (source // { pname = "nanos6"; @@ -72,9 +74,11 @@ in "--disable-all-instrumentations" "--enable-ovni-instrumentation" "--with-ovni=${ovni}" + "--with-boost=${boost.dev}" ] ++ (optional enableJemalloc "--with-jemalloc=${jemallocNanos6}") ++ - (optional enableGlibcxxDebug "CXXFLAGS=-D_GLIBCXX_DEBUG"); + (optional enableGlibcxxDebug "CXXFLAGS=-D_GLIBCXX_DEBUG") ++ + (optional isCross "--with-symbol-resolution=ifunc"); postConfigure = lib.optionalString (!enableDebug) '' # Disable debug