[latrace] Add support for power64 and aarch64

Peter Robinson pbrobinson at fedoraproject.org
Wed Nov 26 14:52:17 UTC 2014


commit a8f809faddff9a71adcee565b3644fa66ebfe4bc
Author: Peter Robinson <pbrobinson at gmail.com>
Date:   Wed Nov 26 14:52:05 2014 +0000

    Add support for power64 and aarch64

 latrace-aarch64-basic-audit.patch |   18 ++++++++++++++
 latrace-ppc64-basic-audit.patch   |   47 +++++++++++++++++++++++++++++++++++++
 latrace.spec                      |   11 +++++++-
 3 files changed, 74 insertions(+), 2 deletions(-)
---
diff --git a/latrace-aarch64-basic-audit.patch b/latrace-aarch64-basic-audit.patch
new file mode 100644
index 0000000..85113c0
--- /dev/null
+++ b/latrace-aarch64-basic-audit.patch
@@ -0,0 +1,18 @@
+diff --git a/src/audit.h b/src/audit.h
+index 2633944..efe056a 100644
+--- a/src/audit.h
++++ b/src/audit.h
+@@ -46,6 +46,13 @@
+ # define sp_reg lr_sp
+ # define La_retval La_arm_retval
+ # define int_retval lrv_reg[0]
++#elif defined __aarch64__
++# define pltenter la_aarch64_gnu_pltenter
++# define pltexit la_aarch64_gnu_pltexit
++# define La_regs La_aarch64_regs
++# define sp_reg lr_sp
++# define La_retval La_aarch64_retval
++# define int_retval lrv_xreg[0]
+ #elif defined __powerpc__ && __WORDSIZE == 32
+ # define pltenter la_ppc32_gnu_pltenter
+ # define pltexit la_ppc32_gnu_pltexit
diff --git a/latrace-ppc64-basic-audit.patch b/latrace-ppc64-basic-audit.patch
new file mode 100644
index 0000000..7bf7625
--- /dev/null
+++ b/latrace-ppc64-basic-audit.patch
@@ -0,0 +1,47 @@
+diff --git a/src/audit.h b/src/audit.h
+index efe056a..eea60d8 100644
+--- a/src/audit.h
++++ b/src/audit.h
+@@ -59,12 +59,18 @@
+ # define La_regs La_ppc32_regs
+ # define La_retval La_ppc32_retval
+ # define int_retval lrv_r3
+-#elif defined __powerpc__ && __WORDSIZE == 64
++#elif defined __powerpc__ && __WORDSIZE == 64 && _CALL_ELF != 2
+ # define pltenter la_ppc64_gnu_pltenter
+ # define pltexit la_ppc64_gnu_pltexit
+ # define La_regs La_ppc64_regs
+ # define La_retval La_ppc64_retval
+ # define int_retval lrv_r3
++#elif defined __powerpc__ && __WORDSIZE == 64 && _CALL_ELF == 2
++# define pltenter la_ppc64v2_gnu_pltenter
++# define pltexit la_ppc64v2_gnu_pltexit
++# define La_regs La_ppc64v2_regs
++# define La_retval La_ppc64v2_retval
++# define int_retval lrv_r3
+ #elif defined __sh__
+ # define pltenter la_sh_gnu_pltenter
+ # define pltexit la_sh_gnu_pltexit
+diff --git a/src/stack.c b/src/stack.c
+index 3aa55d1..0d5c2ed 100644
+--- a/src/stack.c
++++ b/src/stack.c
+@@ -6,6 +6,13 @@
+ 
+ #include "config.h"
+ 
++#if defined __powerpc__
++/* check the current stack pointer and check its boundaries */
++int lt_stack_framesize(struct lt_config_audit *cfg, La_regs *regs)
++{
++	return lt_sh(cfg, framesize);
++}
++#else
+ static __thread void *stack_start = NULL;
+ static __thread void *stack_end   = NULL;
+ 
+@@ -124,3 +131,4 @@ int lt_stack_framesize(struct lt_config_audit *cfg, La_regs *regs)
+ 
+ 	return framesize;
+ }
++#endif
diff --git a/latrace.spec b/latrace.spec
index 48eae64..7be8f28 100644
--- a/latrace.spec
+++ b/latrace.spec
@@ -1,13 +1,15 @@
 Name:           latrace
 Version:        0.5.11
-Release:        7%{?dist}
+Release:        8%{?dist}
 Summary:        LD_AUDIT feature frontend for glibc 2.4+
 Group:          Development/Debuggers
 License:        GPLv3+
 
 URL:            http://people.redhat.com/jolsa/latrace
 Source:         http://people.redhat.com/jolsa/latrace/dl/%{name}-%{version}.tar.bz2
-ExclusiveArch:  %{ix86} x86_64 %{arm}
+Patch0:         latrace-aarch64-basic-audit.patch
+Patch1:         latrace-ppc64-basic-audit.patch
+ExclusiveArch:  %{ix86} x86_64 %{arm} aarch64 %{power64}
 BuildRequires:  autoconf bison asciidoc xmlto binutils-devel binutils-static
 
 %description
@@ -16,6 +18,8 @@ manner similar to the strace utility (syscall tracing)
 
 %prep
 %setup -q
+%patch0 -p1 -b .aarch64
+%patch1 -p1 -b .ppc64
 
 %build
 autoconf
@@ -39,6 +43,9 @@ chmod 0755 %{buildroot}/%{_libdir}/libltaudit.so.%{version}
 %{_mandir}/man1/*
 
 %changelog
+* Wed Nov 26 2014 Peter Robinson <pbrobinson at fedoraproject.org> 0.5.11-8
+- Add support for power64 and aarch64
+
 * Sun Aug 17 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.5.11-7
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
 


More information about the scm-commits mailing list