Fixes for cross compilation #194

Manually merged
abonerib merged 3 commits from fix/crossRV64 into master 2025-10-09 15:55:53 +02:00
Showing only changes of commit 67726c1d44 - Show all commits

View File

@@ -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,13 @@ 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") ++
# Most nanos6 api symbols are resolved at runtime, so prefer
abonerib marked this conversation as resolved Outdated

We may want to add a comment on why we explicitly chose ifunc over indirect. I forgot why we usually want ifunc.

We may want to add a comment on why we explicitly chose ifunc over indirect. I forgot why we usually want ifunc.

I am not sure either, nanos6 uses ifunc as the default and indirect the fallback: 57f0d9e5b0

I am not sure either, nanos6 uses `ifunc` as the default and indirect the fallback: https://gitlab.pm.bsc.es/nanos6/nanos6/-/commit/57f0d9e5b06c8969d8f4a1148704571903cf8b4c
# ifunc by default
(optional isCross "--with-symbol-resolution=ifunc");
postConfigure = lib.optionalString (!enableDebug) ''
# Disable debug