Compare commits
10 Commits
6840f0044c
...
a86532fac1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a86532fac1 | ||
|
|
6b2652f6a6 | ||
|
|
83bb2236af | ||
|
|
afbef3d026 | ||
|
|
a02d109f26 | ||
|
|
d3b1e515d5 | ||
|
|
8ac915bf3a | ||
|
|
d2500d15b2 | ||
|
|
61c7d44f8b | ||
|
|
4da6d6bc00 |
90
add-loongarch-support.patch
Normal file
90
add-loongarch-support.patch
Normal file
@ -0,0 +1,90 @@
|
||||
diff -Nur a/src/linux-context.h b/src/linux-context.h
|
||||
--- a/src/linux-context.h 2023-02-13 17:13:46.695350258 +0800
|
||||
+++ b/src/linux-context.h 2023-02-13 17:12:54.094497176 +0800
|
||||
@@ -33,6 +33,8 @@
|
||||
#define OVERFLOW_ADDRESS(ctx) ctx.ucontext->uc_mcontext.arm_pc
|
||||
#elif defined(__aarch64__)
|
||||
#define OVERFLOW_ADDRESS(ctx) ctx.ucontext->uc_mcontext.pc
|
||||
+#elif defined(__loongarch__)
|
||||
+#define OVERFLOW_ADDRESS(ctx) ctx.ucontext->uc_mcontext.__pc
|
||||
#elif defined(__mips__)
|
||||
#define OVERFLOW_ADDRESS(ctx) ctx.ucontext->uc_mcontext.pc
|
||||
#elif defined(__hppa__)
|
||||
diff -Nur a/src/linux-lock.h b/src/linux-lock.h
|
||||
--- a/src/linux-lock.h 2019-03-05 03:56:23.000000000 +0800
|
||||
+++ b/src/linux-lock.h 2023-02-13 17:12:54.094497176 +0800
|
||||
@@ -223,6 +223,37 @@
|
||||
}
|
||||
#define _papi_hwd_lock(lck) __raw_spin_lock(&_papi_hwd_lock_data[lck]);
|
||||
#define _papi_hwd_unlock(lck) __raw_spin_unlock(&_papi_hwd_lock_data[lck])
|
||||
+#elif defined(__loongarch__)
|
||||
+static inline void __raw_spin_lock(volatile unsigned int *lock)
|
||||
+{
|
||||
+ unsigned int tmp;
|
||||
+ __asm__ __volatile__(
|
||||
+ "1: ll.w %1, %2 \n"
|
||||
+ " bnez %1, 1b \n"
|
||||
+ " li.w %1, 1 \n"
|
||||
+ " sc.w %1, %0 \n"
|
||||
+ " beqz %1, 1b \n"
|
||||
+ " nop \n"
|
||||
+ : "=m" (*lock), "=&r" (tmp)
|
||||
+ : "m" (*lock)
|
||||
+ : "memory");
|
||||
+}
|
||||
+
|
||||
+static inline void __raw_spin_unlock(volatile unsigned int *lock)
|
||||
+{
|
||||
+ unsigned int tmp;
|
||||
+ __asm__ __volatile__(
|
||||
+ " nop \n"
|
||||
+ " li.w %1, 0 \n"
|
||||
+ " st.w %1, %0 \n"
|
||||
+ : "=m" (*lock), "=&r" (tmp)
|
||||
+ : "m" (*lock)
|
||||
+ : "memory");
|
||||
+}
|
||||
+#define _papi_hwd_lock(lck) { rmb(); __raw_spin_lock(&_papi_hwd_lock_data[lck]); rmb(); }
|
||||
+#define _papi_hwd_unlock(lck) { rmb(); __raw_spin_unlock(&_papi_hwd_lock_data[lck]); rmb(); }
|
||||
+
|
||||
+
|
||||
#else
|
||||
|
||||
#error "_papi_hwd_lock/unlock undefined!"
|
||||
diff -Nur a/src/linux-timer.c b/src/linux-timer.c
|
||||
--- a/src/linux-timer.c 2023-02-13 17:13:46.695350258 +0800
|
||||
+++ b/src/linux-timer.c 2023-02-13 17:12:54.094497176 +0800
|
||||
@@ -245,6 +245,20 @@
|
||||
return ret;
|
||||
}
|
||||
|
||||
+/****************************/
|
||||
+/* loongarch64 get_cycles() */
|
||||
+/****************************/
|
||||
+#elif defined(__loongarch__)
|
||||
+static inline long long
|
||||
+get_cycles(void)
|
||||
+{
|
||||
+ register unsigned long ret = 0;
|
||||
+ int rID = 0;
|
||||
+ __asm__ __volatile__ ("ibar 0" ::: "memory");
|
||||
+ __asm__ __volatile__ ("rdtime.d %0, %1" :"=r"(ret),"=r"(rID));
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
/************************/
|
||||
/* POWER get_cycles() */
|
||||
/************************/
|
||||
diff -Nur a/src/mb.h b/src/mb.h
|
||||
--- a/src/mb.h 2023-02-13 17:13:46.695350258 +0800
|
||||
+++ b/src/mb.h 2023-02-13 17:12:54.098497240 +0800
|
||||
@@ -39,6 +39,9 @@
|
||||
#elif defined(__aarch64__)
|
||||
#define rmb() asm volatile("dmb ld" ::: "memory")
|
||||
|
||||
+#elif defined(__loongarch__)
|
||||
+#define rmb() asm volatile("dbar 0" ::: "memory")
|
||||
+
|
||||
#elif defined(__riscv)
|
||||
#define rmb() asm volatile("fence ir, ir" ::: "memory")
|
||||
|
||||
Binary file not shown.
109
papi-5.7.0-sw.patch
Normal file
109
papi-5.7.0-sw.patch
Normal file
@ -0,0 +1,109 @@
|
||||
From 5152ebe60d70f212df8619313463ae08185cfc55 Mon Sep 17 00:00:00 2001
|
||||
From: panchenbo <panchenbo@kylinsec.com.cn>
|
||||
Date: Tue, 16 May 2023 20:03:44 +0800
|
||||
Subject: [PATCH] add sw_64 support
|
||||
|
||||
---
|
||||
src/components/appio/tests/iozone/iozone.c | 2 +-
|
||||
src/configure | 2 +-
|
||||
src/configure.in | 2 +-
|
||||
src/linux-context.h | 2 ++
|
||||
src/linux-timer.c | 15 +++++++++++++++
|
||||
src/mb.h | 3 +++
|
||||
6 files changed, 23 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/components/appio/tests/iozone/iozone.c b/src/components/appio/tests/iozone/iozone.c
|
||||
index 7708cd7..0fb29e3 100644
|
||||
--- a/src/components/appio/tests/iozone/iozone.c
|
||||
+++ b/src/components/appio/tests/iozone/iozone.c
|
||||
@@ -81,7 +81,7 @@ extern int h_errno; /* imported for errors */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
-#if defined (__LP64__) || defined(OSF_64) || defined(__alpha__) || defined(__arch64__) || defined(_LP64) || defined(__s390x__) || defined(__AMD64__)
|
||||
+#if defined (__LP64__) || defined(OSF_64) || defined(__alpha__) || defined(__sw_64__) || defined(__arch64__) || defined(_LP64) || defined(__s390x__) || defined(__AMD64__)
|
||||
#define MODE "\tCompiled for 64 bit mode."
|
||||
#define _64BIT_ARCH_
|
||||
#else
|
||||
diff --git a/src/configure b/src/configure
|
||||
index 02db3ac..2f83166 100755
|
||||
--- a/src/configure
|
||||
+++ b/src/configure
|
||||
@@ -4628,7 +4628,7 @@ _ACEOF
|
||||
|
||||
# First set pthread-mutexes based on arch
|
||||
case $arch in
|
||||
- aarch64|arm*|parisc*|riscv*)
|
||||
+ aarch64|arm*|parisc*|riscv*|sw_64)
|
||||
pthread_mutexes=yes
|
||||
CFLAGS="$CFLAGS -DUSE_PTHREAD_MUTEXES"
|
||||
echo "forcing use of pthread mutexes... " >&6
|
||||
diff --git a/src/configure.in b/src/configure.in
|
||||
index 2c219ad..964f0e6 100644
|
||||
--- a/src/configure.in
|
||||
+++ b/src/configure.in
|
||||
@@ -378,7 +378,7 @@ AC_DEFINE_UNQUOTED(CPU,$CPU,[cpu type])
|
||||
|
||||
# First set pthread-mutexes based on arch
|
||||
case $arch in
|
||||
- aarch64|arm*|parisc*|riscv*)
|
||||
+ aarch64|arm*|parisc*|riscv*|sw_64)
|
||||
pthread_mutexes=yes
|
||||
CFLAGS="$CFLAGS -DUSE_PTHREAD_MUTEXES"
|
||||
echo "forcing use of pthread mutexes... " >&6
|
||||
diff --git a/src/linux-context.h b/src/linux-context.h
|
||||
index fc07338..a55127c 100644
|
||||
--- a/src/linux-context.h
|
||||
+++ b/src/linux-context.h
|
||||
@@ -33,6 +33,8 @@ typedef ucontext_t hwd_ucontext_t;
|
||||
#define OVERFLOW_ADDRESS(ctx) ctx.ucontext->uc_mcontext.arm_pc
|
||||
#elif defined(__aarch64__)
|
||||
#define OVERFLOW_ADDRESS(ctx) ctx.ucontext->uc_mcontext.pc
|
||||
+#elif defined(__sw_64__)
|
||||
+#define OVERFLOW_ADDRESS(ctx) ctx.ucontext->uc_mcontext.sc_pc
|
||||
#elif defined(__loongarch__)
|
||||
#define OVERFLOW_ADDRESS(ctx) ctx.ucontext->uc_mcontext.__pc
|
||||
#elif defined(__mips__)
|
||||
diff --git a/src/linux-timer.c b/src/linux-timer.c
|
||||
index 1d6b7a8..43de746 100644
|
||||
--- a/src/linux-timer.c
|
||||
+++ b/src/linux-timer.c
|
||||
@@ -230,6 +230,21 @@ get_cycles( void )
|
||||
return ret;
|
||||
}
|
||||
|
||||
+/************************/
|
||||
+/* sw_64 get_cycles() */
|
||||
+/************************/
|
||||
+
|
||||
+#elif defined(__sw_64__)
|
||||
+static inline long long
|
||||
+get_cycles( void )
|
||||
+{
|
||||
+ register unsigned long ret;
|
||||
+
|
||||
+ __asm__ __volatile__ ("rtc %0" : "=r" (ret));
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
/************************/
|
||||
/* aarch64 get_cycles() */
|
||||
/************************/
|
||||
diff --git a/src/mb.h b/src/mb.h
|
||||
index e98b574..b14bf5e 100644
|
||||
--- a/src/mb.h
|
||||
+++ b/src/mb.h
|
||||
@@ -26,6 +26,9 @@
|
||||
#elif defined (__alpha__)
|
||||
#define rmb() asm volatile("mb" ::: "memory")
|
||||
|
||||
+#elif defined (__sw_64__)
|
||||
+#define rmb() asm volatile("memb" ::: "memory")
|
||||
+
|
||||
#elif defined(__ia64__)
|
||||
#define rmb() asm volatile ("mf" ::: "memory")
|
||||
|
||||
--
|
||||
2.27.0
|
||||
|
||||
BIN
papi-5.7.0.tar.gz
Normal file
BIN
papi-5.7.0.tar.gz
Normal file
Binary file not shown.
93
papi-add-support-riscv64.patch
Normal file
93
papi-add-support-riscv64.patch
Normal file
@ -0,0 +1,93 @@
|
||||
diff -Nur a/src/configure b/src/configure
|
||||
--- a/src/configure 2019-03-05 03:56:23.000000000 +0800
|
||||
+++ b/src/configure 2023-02-13 17:08:10.253893840 +0800
|
||||
@@ -4628,7 +4628,7 @@
|
||||
|
||||
# First set pthread-mutexes based on arch
|
||||
case $arch in
|
||||
- aarch64|arm*|parisc*)
|
||||
+ aarch64|arm*|parisc*|riscv*)
|
||||
pthread_mutexes=yes
|
||||
CFLAGS="$CFLAGS -DUSE_PTHREAD_MUTEXES"
|
||||
echo "forcing use of pthread mutexes... " >&6
|
||||
diff -Nur a/src/configure.in b/src/configure.in
|
||||
--- a/src/configure.in 2019-03-05 03:56:23.000000000 +0800
|
||||
+++ b/src/configure.in 2023-02-13 17:08:46.854487430 +0800
|
||||
@@ -378,7 +378,7 @@
|
||||
|
||||
# First set pthread-mutexes based on arch
|
||||
case $arch in
|
||||
- aarch64|arm*|parisc*)
|
||||
+ aarch64|arm*|parisc*|riscv*)
|
||||
pthread_mutexes=yes
|
||||
CFLAGS="$CFLAGS -DUSE_PTHREAD_MUTEXES"
|
||||
echo "forcing use of pthread mutexes... " >&6
|
||||
diff -Nur a/src/libpfm4/config.mk b/src/libpfm4/config.mk
|
||||
--- a/src/libpfm4/config.mk 2019-03-05 03:56:23.000000000 +0800
|
||||
+++ b/src/libpfm4/config.mk 2023-02-13 17:11:16.328911611 +0800
|
||||
@@ -177,6 +177,9 @@
|
||||
CONFIG_PFMLIB_CELL=y
|
||||
endif
|
||||
|
||||
+ifeq ($(ARCH),riscv64)
|
||||
+CONFIG_PFMLIB_ARCH_RISCV64=y
|
||||
+endif
|
||||
|
||||
#
|
||||
# you shouldn't have to touch anything beyond this point
|
||||
diff -Nur a/src/linux-context.h b/src/linux-context.h
|
||||
--- a/src/linux-context.h 2019-03-05 03:56:23.000000000 +0800
|
||||
+++ b/src/linux-context.h 2023-02-13 17:11:00.932661914 +0800
|
||||
@@ -37,6 +37,8 @@
|
||||
#define OVERFLOW_ADDRESS(ctx) ctx.ucontext->uc_mcontext.pc
|
||||
#elif defined(__hppa__)
|
||||
#define OVERFLOW_ADDRESS(ctx) ctx.ucontext->uc_mcontext.sc_iaoq[0]
|
||||
+#elif defined(__riscv)
|
||||
+#define OVERFLOW_ADDRESS(ctx) ctx.ucontext->uc_mcontext.__gregs[REG_PC]
|
||||
#else
|
||||
#error "OVERFLOW_ADDRESS() undefined!"
|
||||
#endif
|
||||
diff -Nur a/src/linux-timer.c b/src/linux-timer.c
|
||||
--- a/src/linux-timer.c 2019-03-05 03:56:23.000000000 +0800
|
||||
+++ b/src/linux-timer.c 2023-02-13 17:11:16.332911675 +0800
|
||||
@@ -288,6 +288,27 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
+/************************/
|
||||
+/* riscv64 get_cycles() */
|
||||
+/************************/
|
||||
+
|
||||
+#elif defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64
|
||||
+static inline long long
|
||||
+get_cycles( void )
|
||||
+{
|
||||
+ register unsigned long ret;
|
||||
+
|
||||
+ __asm__ __volatile__ ("rdcycle %0" : "=r" (ret));
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * TODO: riscv32 implementation can be done following example in:
|
||||
+ * Volume I: RISC-V User-Level ISA V2.2
|
||||
+ * 2.8 Control and Status Register Instructions
|
||||
+ * Timers and Counters
|
||||
+ */
|
||||
|
||||
#elif !defined(HAVE_GETTIMEOFDAY) && !defined(HAVE_CLOCK_GETTIME)
|
||||
#error "No get_cycles support for this architecture. "
|
||||
diff -Nur a/src/mb.h b/src/mb.h
|
||||
--- a/src/mb.h 2019-03-05 03:56:23.000000000 +0800
|
||||
+++ b/src/mb.h 2023-02-13 17:11:16.332911675 +0800
|
||||
@@ -39,6 +39,9 @@
|
||||
#elif defined(__aarch64__)
|
||||
#define rmb() asm volatile("dmb ld" ::: "memory")
|
||||
|
||||
+#elif defined(__riscv)
|
||||
+#define rmb() asm volatile("fence ir, ir" ::: "memory")
|
||||
+
|
||||
#elif defined(__mips__)
|
||||
#define rmb() asm volatile( \
|
||||
".set mips2\n\t" \
|
||||
@ -1,115 +0,0 @@
|
||||
commit bde3da26f1f2755689e16fc9f5ab404367d1fdc8
|
||||
Author: Vince Weaver <vincent.weaver@maine.edu>
|
||||
Date: Wed Jan 24 14:13:28 2018 -0500
|
||||
|
||||
build: fix various LDFLAGS/CFLAGS issues
|
||||
|
||||
issues were reported by Andreas Beckmann <anbe@debian.org>
|
||||
|
||||
diff --git a/src/components/Makefile_comp_tests.target.in b/src/components/Makefile_comp_tests.target.in
|
||||
index 9a369adb..a4412bea 100644
|
||||
--- a/src/components/Makefile_comp_tests.target.in
|
||||
+++ b/src/components/Makefile_comp_tests.target.in
|
||||
@@ -9,7 +9,7 @@ INCLUDE = -I. -I@includedir@ -I$(datadir) -I$(testlibdir) -I$(validationlibdir)
|
||||
LIBDIR = @libdir@
|
||||
PAPILIB = $(datadir)/@LIBRARY@
|
||||
TESTLIB = $(testlibdir)/libtestlib.a
|
||||
-LDFLAGS = @LDL@
|
||||
+LDFLAGS = @LDFLAGS@ @LDL@
|
||||
CC = @CC@
|
||||
F77 = @F77@
|
||||
CC_R = @CC_R@
|
||||
diff --git a/src/components/perf_event_uncore/tests/Makefile b/src/components/perf_event_uncore/tests/Makefile
|
||||
index 3ee8fc2a..d70debe6 100644
|
||||
--- a/src/components/perf_event_uncore/tests/Makefile
|
||||
+++ b/src/components/perf_event_uncore/tests/Makefile
|
||||
@@ -17,19 +17,19 @@ perf_event_uncore_lib.o: perf_event_uncore_lib.c perf_event_uncore_lib.h
|
||||
|
||||
|
||||
perf_event_amd_northbridge: perf_event_amd_northbridge.o $(DOLOOPS) $(UTILOBJS) $(PAPILIB) $(DOLOOPS)
|
||||
- $(CC) $(LFLAGS) -o perf_event_amd_northbridge perf_event_amd_northbridge.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS)
|
||||
+ $(CC) $(CFLAGS) -o perf_event_amd_northbridge perf_event_amd_northbridge.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS)
|
||||
|
||||
perf_event_uncore: perf_event_uncore.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) perf_event_uncore_lib.o
|
||||
- $(CC) $(LFLAGS) -o perf_event_uncore perf_event_uncore.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS)
|
||||
+ $(CC) $(CFLAGS) -o perf_event_uncore perf_event_uncore.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS)
|
||||
|
||||
perf_event_uncore_attach: perf_event_uncore_attach.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) perf_event_uncore_lib.o
|
||||
- $(CC) $(LFLAGS) -o perf_event_uncore_attach perf_event_uncore_attach.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS)
|
||||
+ $(CC) $(CFLAGS) -o perf_event_uncore_attach perf_event_uncore_attach.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS)
|
||||
|
||||
perf_event_uncore_multiple: perf_event_uncore_multiple.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB)
|
||||
- $(CC) $(LFLAGS) $(INCLUDE) -o perf_event_uncore_multiple perf_event_uncore_multiple.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS)
|
||||
+ $(CC) $(CFLAGS) $(INCLUDE) -o perf_event_uncore_multiple perf_event_uncore_multiple.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS)
|
||||
|
||||
perf_event_uncore_cbox: perf_event_uncore_cbox.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB)
|
||||
- $(CC) $(LFLAGS) $(INCLUDE) -o perf_event_uncore_cbox perf_event_uncore_cbox.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS)
|
||||
+ $(CC) $(CFLAGS) $(INCLUDE) -o perf_event_uncore_cbox perf_event_uncore_cbox.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS)
|
||||
|
||||
|
||||
|
||||
diff --git a/src/ctests/Makefile.recipies b/src/ctests/Makefile.recipies
|
||||
index 63c107c0..201f3c85 100644
|
||||
--- a/src/ctests/Makefile.recipies
|
||||
+++ b/src/ctests/Makefile.recipies
|
||||
@@ -350,7 +350,7 @@ code2name: code2name.c $(TESTLIB) $(PAPILIB)
|
||||
$(CC) $(INCLUDE) $(CFLAGS) $(TOPTFLAGS) code2name.c $(TESTLIB) $(PAPILIB) $(LDFLAGS) -o code2name
|
||||
|
||||
attach_target: attach_target.c $(DOLOOPS)
|
||||
- -$(CC) $(INCLUDE) $(CFLAGS) $(TOPTFLAGS) attach_target.c -o attach_target $(DOLOOPS) $(TESTLIB)
|
||||
+ -$(CC) $(INCLUDE) $(CFLAGS) $(TOPTFLAGS) attach_target.c -o attach_target $(DOLOOPS) $(TESTLIB) $(LDFLAGS)
|
||||
|
||||
zero_attach: zero_attach.c $(TESTLIB) $(DOLOOPS) $(PAPILIB)
|
||||
-$(CC) $(INCLUDE) $(CFLAGS) $(TOPTFLAGS) zero_attach.c $(TESTLIB) $(DOLOOPS) $(PAPILIB) $(LDFLAGS) -o zero_attach
|
||||
diff --git a/src/ctests/Makefile.target.in b/src/ctests/Makefile.target.in
|
||||
index bb51c350..fcc3373b 100644
|
||||
--- a/src/ctests/Makefile.target.in
|
||||
+++ b/src/ctests/Makefile.target.in
|
||||
@@ -12,7 +12,7 @@ LIBRARY=@LIBRARY@
|
||||
SHLIB=@SHLIB@
|
||||
PAPILIB = ../@LINKLIB@
|
||||
TESTLIB = $(testlibdir)/libtestlib.a
|
||||
-LDFLAGS = @LDL@ @STATIC@
|
||||
+LDFLAGS = @LDFLAGS@ @LDL@ @STATIC@
|
||||
CC = @CC@
|
||||
MPICC = @MPICC@
|
||||
F77 = @F77@
|
||||
diff --git a/src/ftests/Makefile.target.in b/src/ftests/Makefile.target.in
|
||||
index 718586e5..8006dd8d 100644
|
||||
--- a/src/ftests/Makefile.target.in
|
||||
+++ b/src/ftests/Makefile.target.in
|
||||
@@ -11,7 +11,7 @@ LIBRARY = @LIBRARY@
|
||||
SHLIB=@SHLIB@
|
||||
PAPILIB = ../@LINKLIB@
|
||||
TESTLIB = $(testlibdir)/libtestlib.a
|
||||
-LDFLAGS = @LDL@
|
||||
+LDFLAGS = @LDFLAGS@ @LDL@
|
||||
CC = @CC@
|
||||
F77 = @F77@
|
||||
CC_R = @CC_R@
|
||||
diff --git a/src/utils/Makefile.target.in b/src/utils/Makefile.target.in
|
||||
index a5eab438..58d438a1 100644
|
||||
--- a/src/utils/Makefile.target.in
|
||||
+++ b/src/utils/Makefile.target.in
|
||||
@@ -11,7 +11,7 @@ LIBRARY=@LIBRARY@
|
||||
SHLIB=@SHLIB@
|
||||
PAPILIB = ../@LINKLIB@
|
||||
TESTLIB = $(testlibdir)/libtestlib.a
|
||||
-LDFLAGS = @LDL@ @STATIC@
|
||||
+LDFLAGS = @LDFLAGS@ @LDL@ @STATIC@
|
||||
CC = @CC@
|
||||
MPICC = @MPICC@
|
||||
F77 = @F77@
|
||||
diff --git a/src/validation_tests/Makefile.target.in b/src/validation_tests/Makefile.target.in
|
||||
index a5eab438..58d438a1 100644
|
||||
--- a/src/validation_tests/Makefile.target.in
|
||||
+++ b/src/validation_tests/Makefile.target.in
|
||||
@@ -11,7 +11,7 @@ LIBRARY=@LIBRARY@
|
||||
SHLIB=@SHLIB@
|
||||
PAPILIB = ../@LINKLIB@
|
||||
TESTLIB = $(testlibdir)/libtestlib.a
|
||||
-LDFLAGS = @LDL@ @STATIC@
|
||||
+LDFLAGS = @LDFLAGS@ @LDL@ @STATIC@
|
||||
CC = @CC@
|
||||
MPICC = @MPICC@
|
||||
F77 = @F77@
|
||||
28
papi.spec
28
papi.spec
@ -1,17 +1,20 @@
|
||||
Name: papi
|
||||
Version: 5.6.0
|
||||
Release: 8
|
||||
Version: 5.7.0
|
||||
Release: 2
|
||||
Summary: Performance Application Programming Interface
|
||||
License: BSD
|
||||
URL: http://icl.cs.utk.edu/papi/
|
||||
Source0: http://icl.cs.utk.edu/projects/papi/downloads/%{name}-%{version}.tar.gz
|
||||
BuildRequires: autoconf doxygen ncurses-devel gcc-gfortran kernel-headers >= 2.6.32
|
||||
BuildRequires: chrpath lm_sensors-devel libpfm-devel >= 4.6.0-1 libpfm-static >= 4.6.0-1
|
||||
BuildRequires: net-tools rdma-core-devel infiniband-diags-devel perl-generators
|
||||
BuildRequires: net-tools rdma-core-devel perl-generators
|
||||
Provides: papi-libs = %{version}-%{release}
|
||||
Obsoletes: papi-libs < %{version}-%{release}
|
||||
|
||||
Patch0001: papi-ldflags.patch
|
||||
Patch0001: papi-add-support-riscv64.patch
|
||||
|
||||
Patch3000: add-loongarch-support.patch
|
||||
Patch3001: papi-5.7.0-sw.patch
|
||||
|
||||
%description
|
||||
PAPI provides a programmer interface to monitor the performance of
|
||||
@ -42,7 +45,11 @@ cd src
|
||||
autoconf
|
||||
%configure --with-perf-events --with-pfm-incdir=%{_includedir} --with-pfm-libdir=%{_libdir} \
|
||||
--with-static-lib=yes --with-shared-lib=yes --with-shlib --with-shlib-tools \
|
||||
%ifarch sw_64
|
||||
--with-components="coretemp example infiniband lmsensors lustre micpower mx net rapl stealtime"
|
||||
%else
|
||||
--with-components="appio coretemp example infiniband lmsensors lustre micpower mx net rapl stealtime"
|
||||
%endif
|
||||
|
||||
cd components
|
||||
cd infiniband_umad; %configure
|
||||
@ -87,5 +94,18 @@ chrpath --delete $RPM_BUILD_ROOT%{_libdir}/*.so*
|
||||
%{_mandir}/man3/*
|
||||
|
||||
%changelog
|
||||
* Mon Aug 14 2023 yangchenguang <yangchenguang@kylinsec.com.cn> - 5.7.0-2
|
||||
- Add loongarch64 and sw_64 support
|
||||
|
||||
* Mon Feb 13 2023 liyanan <liyanan32@h-partners.com> - 5.7.0-1
|
||||
- Update to 5.7.0
|
||||
|
||||
* Mon Jan 24 2022 wujie <wujie@nj.iscas.ac.cn> - 5.6.0-10
|
||||
- add support for riscv64 from http://fedora.riscv.rocks/koji/buildinfo?buildID=31200
|
||||
Author is David Abdurachmanov <david.abdurachmanov@gmail.com>
|
||||
|
||||
* Tue Jul 28 2020 lingsheng<lingsheng@huawei.com> - 5.6.0-9
|
||||
- remove buildrequire infiniband-diags-devel
|
||||
|
||||
* Thu Nov 28 2019 liujing<liujing144@huawei.com> - 5.6.0-8
|
||||
- Package init
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user