From 977148dd037f908615975dca6cfc43459b65e199 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sat, 14 Oct 2017 19:36:19 +0100 Subject: [PATCH] ARM fix, minor spec file cleanups --- .gitignore | 4 +- ...ind-fix-arm-build-failure-due-to-asm.patch | 43 +++++++++++++++++++ libunwind.spec | 20 ++++++--- 3 files changed, 57 insertions(+), 10 deletions(-) create mode 100644 libunwind-fix-arm-build-failure-due-to-asm.patch diff --git a/.gitignore b/.gitignore index 2abcd1d..23b608e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1 @@ -/libunwind-1.1.tar.gz -/libunwind-1.2.tar.gz -/libunwind-1.2.1.tar.gz +/libunwind-*.tar.gz diff --git a/libunwind-fix-arm-build-failure-due-to-asm.patch b/libunwind-fix-arm-build-failure-due-to-asm.patch new file mode 100644 index 0000000..cfd0c55 --- /dev/null +++ b/libunwind-fix-arm-build-failure-due-to-asm.patch @@ -0,0 +1,43 @@ +From c7ab998ec52b09d61ec3c0ea62aa07cd26077ea3 Mon Sep 17 00:00:00 2001 +From: Romain Naour +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 +Cc: Bernd Kuhls +--- + 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 + diff --git a/libunwind.spec b/libunwind.spec index aca7c3e..532fc93 100644 --- a/libunwind.spec +++ b/libunwind.spec @@ -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 1.2.1-2 +- Add patch to fix ARM issues + * Fri Sep 1 2017 Tom Callaway - 1.2.1-1 - update to 1.2.1 @@ -233,7 +239,7 @@ echo ====================TESTSUITE DISABLED========================= * Sun Oct 01 2006 Jesse Keating - 0.98.5-3 - rebuilt for unwind info generation, broken in gcc-4.1.1-21 -* Sat Sep 22 2006 Jan Kratochvil - 0.98.5-2 +* Fri Sep 22 2006 Jan Kratochvil - 0.98.5-2 - SELinux compatibility fix - stack is now non-exec (Jakub Jelinek suggestion). * Wed Jul 12 2006 Jesse Keating - 0.98.5-1.1