Compare commits

..

9 Commits

Author SHA1 Message Date
ed0cda5eda
Add missing pre/postInstall hooks to intel 2023
All checks were successful
CI / build:all (pull_request) Successful in 10m47s
2025-10-07 17:17:13 +02:00
be4eca6adc
Trace addition to nix-support/private 2025-10-07 17:17:13 +02:00
d0a0d5ef6c
Add nix-support/private to unfree derivation outputs 2025-10-07 17:17:13 +02:00
567900e451
Add skeleton meta to intel 2023 2025-10-07 17:17:12 +02:00
d9b430de2e
Add meta to packages 2025-10-07 17:17:12 +02:00
fd9e72949b
Add maintainers 2025-10-07 16:27:02 +02:00
c5563ab111
Fix nanos6 cross-compilation for riscv
All checks were successful
CI / build:all (pull_request) Successful in 16s
2025-10-07 16:21:35 +02:00
a8bfb6dcd7
Fix cross compilation for lmbench 2025-10-07 16:21:35 +02:00
93e94cd370
Disable papi when cross compiling
Even if we do an override to papi get the proper configure flags for
cross-compiling, the memory fences are not defined for risc-v:

mb.h:67:2: error: #error Need to define rmb for this architecture!
2025-10-07 16:21:35 +02:00
5 changed files with 31 additions and 8 deletions

View File

@ -20,6 +20,7 @@
#, python3Packages
, installShellFiles
, symlinkJoin
, enablePapi ? stdenv.hostPlatform == stdenv.buildPlatform # Disabled when cross-compiling
}:
let
@ -87,7 +88,7 @@ stdenv.mkDerivation rec {
--enable-sampling
--with-unwind=${libunwind.dev}
--with-xml-prefix=${libxml2.dev}
--with-papi=${papi}
${lib.optionalString enablePapi "--with-papi=${papi}"}
${if (mpi != null) then ''--with-mpi=${mpi}''
else ''--without-mpi''}
--without-dyninst)

View File

@ -22,7 +22,11 @@ stdenv.mkDerivation rec {
'';
buildInputs = [ libtirpc ];
patches = [ ./fix-install.patch ./gcc-14.patch ];
patches = [
./fix-install.patch
./gcc-14.patch
./fix-cross.patch
];
hardeningDisable = [ "all" ];
@ -35,6 +39,8 @@ stdenv.mkDerivation rec {
CFLAGS=-Wno-implicit-int
CPPFLAGS=-I${libtirpc.dev}/include/tirpc
LDFLAGS=-ltirpc
CC=${stdenv.cc.targetPrefix}cc
AR=${stdenv.cc.targetPrefix}ar
)
'';

View File

@ -0,0 +1,13 @@
diff --git a/src/Makefile b/src/Makefile
index 2555014..356eeb3 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -36,7 +36,7 @@ SHELL=/bin/sh
CC=`../scripts/compiler`
MAKE=`../scripts/make`
-AR=ar
+AR?=ar
ARCREATE=cr
# base of installation location

View File

@ -16,6 +16,7 @@
, jemallocNanos6 ? null
, cachelineBytes ? 64
, enableGlibcxxDebug ? false
, enablePapi ? stdenv.hostPlatform == stdenv.buildPlatform # Disabled when cross-compiling
, useGit ? false
, gitUrl ? "ssh://git@bscpm04.bsc.es/nanos6/nanos6"
, gitBranch ? "master"
@ -47,6 +48,8 @@ let
};
source = if (useGit) then git else release;
isCross = stdenv.hostPlatform != stdenv.buildPlatform;
in
stdenv.mkDerivation (source // {
pname = "nanos6";
@ -71,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
@ -97,16 +102,14 @@ in
# TODO: papi_version is needed for configure:
# ./configure: line 27378: papi_version: command not found
# This probably breaks cross-compilation
papi
];
] ++ lib.optionals enablePapi [ papi ];
buildInputs = [
boost
numactl
hwloc
papi
ovni
];
] ++ lib.optionals enablePapi [ papi ];
# Create a script that sets NANOS6_HOME
postInstall = ''

View File

@ -7,7 +7,7 @@
, numactl
, hwloc
, papi
, enablePapi ? true
, enablePapi ? stdenv.hostPlatform == stdenv.buildPlatform # Disabled when cross-compiling
, cacheline ? 64 # bits
, ovni ? null
, useGit ? false