forked from rarias/jungle
Fix papi cross compilation
This commit is contained in:
parent
8e30063cdd
commit
4de4b6da1d
@ -49,6 +49,7 @@ let
|
||||
osumb = callPackage ./pkgs/osu/default.nix { };
|
||||
ovni = callPackage ./pkgs/ovni/default.nix { };
|
||||
ovniGit = final.ovni.override { useGit = true; };
|
||||
papi = callPackage ./pkgs/papi/default.nix { papi = prev.papi; };
|
||||
paraverKernel = callPackage ./pkgs/paraver/kernel.nix { };
|
||||
prometheus-slurm-exporter = prev.callPackage ./pkgs/slurm-exporter/default.nix { };
|
||||
#pscom = callPackage ./pkgs/parastation/pscom.nix { }; # Unmaintaned
|
||||
|
||||
22
pkgs/papi/default.nix
Normal file
22
pkgs/papi/default.nix
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
stdenv,
|
||||
papi,
|
||||
}:
|
||||
|
||||
if stdenv.hostPlatform == stdenv.buildPlatform then
|
||||
papi
|
||||
else
|
||||
papi.overrideAttrs (old: {
|
||||
configureFlags = (old.configureFlags or [ ]) ++ [
|
||||
"--enable-perf_event_uncore=no"
|
||||
"--with-sysdetect=no"
|
||||
"--with-ffsll"
|
||||
"--with-tls=__thread"
|
||||
"--with-virtualtimer=clock_thread_cputime_id"
|
||||
"--with-walltimer=clock_realtime"
|
||||
"--with-perf-events"
|
||||
"--with-CPU=${stdenv.hostPlatform.uname.processor}"
|
||||
"--with-arch=${stdenv.hostPlatform.uname.processor}"
|
||||
];
|
||||
patches = (old.patches or [ ]) ++ [ ./fix-ar-cross.patch ];
|
||||
})
|
||||
19
pkgs/papi/fix-ar-cross.patch
Normal file
19
pkgs/papi/fix-ar-cross.patch
Normal file
@ -0,0 +1,19 @@
|
||||
diff --git a/sde_lib/Makefile b/sde_lib/Makefile
|
||||
index 8518f92..90a9953 100644
|
||||
--- a/sde_lib/Makefile
|
||||
+++ b/sde_lib/Makefile
|
||||
@@ -1,4 +1,5 @@
|
||||
CC ?= gcc
|
||||
+AR ?= ar
|
||||
SDE_INC = -I. -I..
|
||||
SDE_LD = -ldl -pthread
|
||||
CFLAGS += -Wextra -Wall -O2
|
||||
@@ -18,7 +19,7 @@ dynamic: $(DOBJS)
|
||||
rm -f *_d.o
|
||||
|
||||
static: $(SOBJS)
|
||||
- ar rs libsde.a $(SOBJS)
|
||||
+ $(AR) rs libsde.a $(SOBJS)
|
||||
rm -f *_s.o
|
||||
|
||||
clean:
|
||||
Loading…
x
Reference in New Issue
Block a user