ARM fix, minor spec file cleanups

This commit is contained in:
Peter Robinson 2017-10-14 19:36:19 +01:00
parent 58ed0646c8
commit 977148dd03
3 changed files with 57 additions and 10 deletions

4
.gitignore vendored
View File

@ -1,3 +1 @@
/libunwind-1.1.tar.gz
/libunwind-1.2.tar.gz
/libunwind-1.2.1.tar.gz
/libunwind-*.tar.gz

View File

@ -0,0 +1,43 @@
From c7ab998ec52b09d61ec3c0ea62aa07cd26077ea3 Mon Sep 17 00:00:00 2001
From: Romain Naour <romain.naour@smile.fr>
Date: Mon, 3 Jul 2017 14:43:02 +0200
Subject: [PATCH] libunwind-arm: fix build failure due to asm()
The gcc documentation [1] suggest to use __asm__ instead of asm.
Fixes:
http://autobuild.buildroot.net/results/3ef/3efe156b6494e4392b6c31de447ee2c72acc1a53
[1] https://gcc.gnu.org/onlinedocs/gcc/Alternate-Keywords.html#Alternate-Keywords
Signed-off-by: Romain Naour <romain.naour@smile.fr>
Cc: Bernd Kuhls <bernd.kuhls@t-online.de>
---
include/libunwind-arm.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/libunwind-arm.h b/include/libunwind-arm.h
index f208487..1c856fa 100644
--- a/include/libunwind-arm.h
+++ b/include/libunwind-arm.h
@@ -265,7 +265,7 @@ unw_tdep_context_t;
#ifndef __thumb__
#define unw_tdep_getcontext(uc) (({ \
unw_tdep_context_t *unw_ctx = (uc); \
- register unsigned long *unw_base asm ("r0") = unw_ctx->regs; \
+ register unsigned long *unw_base __asm__ ("r0") = unw_ctx->regs; \
__asm__ __volatile__ ( \
"stmia %[base], {r0-r15}" \
: : [base] "r" (unw_base) : "memory"); \
@@ -273,7 +273,7 @@ unw_tdep_context_t;
#else /* __thumb__ */
#define unw_tdep_getcontext(uc) (({ \
unw_tdep_context_t *unw_ctx = (uc); \
- register unsigned long *unw_base asm ("r0") = unw_ctx->regs; \
+ register unsigned long *unw_base __asm__ ("r0") = unw_ctx->regs; \
__asm__ __volatile__ ( \
".align 2\nbx pc\nnop\n.code 32\n" \
"stmia %[base], {r0-r15}\n" \
--
2.9.4

View File

@ -4,13 +4,16 @@
Summary: An unwinding library
Name: libunwind
Version: 1.2.1
Release: 1%{?dist}
Release: 2%{?dist}
License: BSD
Group: Development/Debuggers
URL: http://savannah.nongnu.org/projects/libunwind
Source: http://download-mirror.savannah.gnu.org/releases/libunwind/libunwind-%{version}.tar.gz
#Fedora specific patch
Patch1: libunwind-arm-default-to-exidx.patch
URL: http://savannah.nongnu.org/projects/libunwind
Patch2: libunwind-fix-arm-build-failure-due-to-asm.patch
ExclusiveArch: %{arm} aarch64 hppa ia64 mips ppc %{power64} %{ix86} x86_64
BuildRequires: automake libtool autoconf texlive-latex2man
@ -33,6 +36,7 @@ libunwind.
%prep
%setup -q
%patch1 -p1 -b .default-to-exidx
%patch2 -p1 -b .arm
%build
aclocal
@ -69,12 +73,11 @@ echo ====================TESTSUITE DISABLED=========================
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc COPYING README NEWS
%license COPYING
%doc README NEWS
%{_libdir}/libunwind*.so.*
%files devel
%defattr(-,root,root,-)
%{_libdir}/libunwind*.so
%{_libdir}/libunwind-ptrace.a
%{_libdir}/pkgconfig/libunwind*.pc
@ -84,6 +87,9 @@ echo ====================TESTSUITE DISABLED=========================
%{_includedir}/libunwind*.h
%changelog
* Sat Oct 14 2017 Peter Robinson <pbrobinson@fedoraproject.org> 1.2.1-2
- Add patch to fix ARM issues
* Fri Sep 1 2017 Tom Callaway <spot@fedoraproject.org> - 1.2.1-1
- update to 1.2.1
@ -233,7 +239,7 @@ echo ====================TESTSUITE DISABLED=========================
* Sun Oct 01 2006 Jesse Keating <jkeating@redhat.com> - 0.98.5-3
- rebuilt for unwind info generation, broken in gcc-4.1.1-21
* Sat Sep 22 2006 Jan Kratochvil <jan.kratochvil@redhat.com> - 0.98.5-2
* Fri Sep 22 2006 Jan Kratochvil <jan.kratochvil@redhat.com> - 0.98.5-2
- SELinux compatibility fix - stack is now non-exec (Jakub Jelinek suggestion).
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 0.98.5-1.1