Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mpiP: AArch64 fix #358

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions components/perf-tools/mpiP/SOURCES/mpip.unwinder.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
diff -ruN mpiP-3.4.1.old/Defs.mak.in mpiP-3.4.1/Defs.mak.in
--- mpiP-3.4.1.old/Defs.mak.in 2014-03-13 19:46:07.000000000 +0000
+++ mpiP-3.4.1/Defs.mak.in 2017-01-10 07:51:53.771837043 +0000
@@ -63,6 +63,9 @@
endif

ifeq ($(OS),Linux)
+ ifeq ($(ARCH), aarch64)
+ CPPFLAGS += -DAARCH64
+ endif
ifeq ($(ARCH),i686)
CPPFLAGS += -DIA32
endif
diff -ruN mpiP-3.4.1.old/mpiPi.h.in mpiP-3.4.1/mpiPi.h.in
--- mpiP-3.4.1.old/mpiPi.h.in 2014-03-13 19:46:07.000000000 +0000
+++ mpiP-3.4.1/mpiPi.h.in 2017-01-10 07:52:48.783447707 +0000
@@ -276,6 +276,12 @@
#define FramePC(fp) ((void *) *(long *) (((long) fp) + (2 * sizeof (void *))))
#define NextFP(fp) ((void *) *(long *) fp)

+/* AArch64 Linux */
+#elif defined(Linux) && defined(AARCH64)
+#define ParentFP(jb) ((void*) jb[0].__jmpbuf[10])
+#define FramePC(fp) ((void*)(((void**)fp)[1]))
+#define NextFP(fp) ((void*)((void**)fp)[0])
+
/* IA32 Linux */
#elif defined(Linux) && defined(IA32)
#define ParentFP(jb) ((void*) jb[0].__jmpbuf[3])
8 changes: 6 additions & 2 deletions components/perf-tools/mpiP/SPECS/mpiP.spec
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ Source0: http://sourceforge.net/projects/mpip/files/mpiP/mpiP-3.4.1/mpiP-%{ver
Source1: OHPC_macros
Source2: OHPC_setup_compiler
Source3: OHPC_setup_mpi
Patch1: mpip.unwinder.patch
BuildRoot: %{_tmppath}/%{pname}-%{version}-%{release}-root
DocDir: %{OHPC_PUB}/doc/contrib

Expand All @@ -98,6 +99,7 @@ file.
%prep

%setup -q -n %{pname}-%{version}
%patch1 -p1

%build

Expand All @@ -118,9 +120,11 @@ CC=mpicc
CXX=mpicxx
FC=mpif90



%ifarch aarch64
./configure --prefix=%{install_path} --enable-demangling --disable-libunwind --enable-setjmp || { cat config.log && exit 1; }
%else
./configure --prefix=%{install_path} --enable-demangling --disable-libunwind || { cat config.log && exit 1; }
%endif

%install

Expand Down