Archived
1
0
forked from rarias/bscpkgs

19 Commits

Author SHA1 Message Date
205e8145d0 Fix nanos6 cross-compilation for riscv 2025-10-01 15:03:51 +02:00
83770ec6f0 Fix cross compilation for lmbench 2025-10-01 15:03:51 +02:00
0dd260ae45 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-01 15:03:51 +02:00
ad17dbc06e Move bsc-ci test into let 2025-10-01 15:03:51 +02:00
46990fc8f7 Rework bsc-ci 2025-10-01 15:03:51 +02:00
2d125cabaf Add riscv64 cross compilation to bsc-ci and hydra 2025-10-01 15:03:51 +02:00
00f5aad8e6 Put helper attrs of ompss2 drv to passthru 2025-10-01 15:03:50 +02:00
4cbc9b81e3 Remove gcc from tampi *buildInputs 2025-10-01 15:03:50 +02:00
21516bd96b Fix strictDeps ovni 2025-10-01 15:03:50 +02:00
c30a1ed96d Fix strictDeps osu 2025-10-01 15:03:50 +02:00
adbee036ef Fix strictDeps mercurium 2025-10-01 15:03:50 +02:00
8092140a9c Fix strictDeps tampi 2025-10-01 15:03:50 +02:00
cf2239d2db Fix strictDeps sonar 2025-10-01 15:03:50 +02:00
6c54675da4 Fix strictDeps nanos6 2025-10-01 15:03:49 +02:00
d91db4afb4 Fix strictDeps paraver 2025-10-01 15:03:49 +02:00
c07c5efbfa Fix strictDeps ompss2 2025-10-01 15:03:49 +02:00
aa55166cf3 Fix strictDeps intel 2023 2025-10-01 15:03:49 +02:00
914ee07439 Fix strictDeps bench6 2025-10-01 15:03:49 +02:00
de99a89845 Fix strictDeps bigotes 2025-10-01 15:03:49 +02:00
7 changed files with 36 additions and 13 deletions

View File

@@ -17,7 +17,7 @@
legacyPackages.${system} = pkgs;
hydraJobs = {
inherit (self.legacyPackages.${system}.bsc-ci) tests pkgs cross;
inherit (self.legacyPackages.${system}.bsc-ci) test pkgs cross;
};
# propagate nixpkgs lib, so we can do bscpkgs.lib

View File

@@ -46,7 +46,7 @@ let
wxparaver = callPackage ./pkgs/paraver/default.nix { };
};
tests = rec {
test = rec {
#hwloc = callPackage ./test/bugs/hwloc.nix { }; # Broken, no /sys
#sigsegv = callPackage ./test/reproducers/sigsegv.nix { };
hello-c = callPackage ./test/compilers/hello-c.nix { };
@@ -101,9 +101,9 @@ let
crossList = builtins.mapAttrs (t: v: buildList t (builtins.attrValues v)) cross;
pkgsList = buildList "ci-pkgs" (builtins.attrValues pkgs);
testList = buildList "ci-tests" (collect isDerivation tests);
tests = buildList "ci-tests" (collect isDerivation test);
all = buildList' "ci-all" [ pkgsList testList ];
all = buildList' "ci-all" [ pkgsList tests ];
in bscPkgs // {
# Prevent accidental usage of bsc attribute
@@ -112,7 +112,7 @@ in bscPkgs // {
# Internal for our CI tests
bsc-ci = {
inherit pkgs pkgsList;
inherit tests testList;
inherit test tests;
inherit cross crossList;
inherit all;
};

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