diff --git a/libunwind-0.98.6-pointer-comparison.patch b/libunwind-0.98.6-pointer-comparison.patch deleted file mode 100644 index f624962..0000000 --- a/libunwind-0.98.6-pointer-comparison.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: tests/Gtest-dyn1.c -=================================================================== ---- tests/Gtest-dyn1.c.orig -+++ tests/Gtest-dyn1.c -@@ -106,7 +106,7 @@ sighandler (int signal) - name[0] = '\0'; - off[0] = '\0'; - if (unw_get_proc_name (&cursor, name, sizeof (name), &offset) == 0 -- && off > 0) -+ && offset > 0) - snprintf (off, sizeof (off), "+0x%lx", (long) offset); - if (verbose) - printf ("ip = %lx <%s%s>\n", (long) ip, name, off); diff --git a/libunwind-0.98.6.diff b/libunwind-0.98.6.diff deleted file mode 100644 index 6d7a709..0000000 --- a/libunwind-0.98.6.diff +++ /dev/null @@ -1,114 +0,0 @@ ---- configure.in -+++ configure.in -@@ -83,8 +83,7 @@ AC_CONFIG_LINKS(include/libunwind.h:incl - include/tdep.h:include/tdep-$target_arch.h) - - AC_ARG_ENABLE(debug, --[ --enable-debug turn on debug support (slows down execution)], --[enable_debug=yes], []) -+[ --enable-debug turn on debug support (slows down execution)]) - - LIBUNWIND___THREAD - ---- include/internal.h -+++ include/internal.h -@@ -201,11 +201,11 @@ extern int unwi_dyn_validate_cache (unw_ - extern unw_dyn_info_list_t _U_dyn_info_list; - extern pthread_mutex_t _U_dyn_info_list_lock; - -+#include - #if UNW_DEBUG - #define unwi_debug_level UNWI_ARCH_OBJ(debug_level) - extern long unwi_debug_level; - --# include - # define Debug(level,format...) \ - do { \ - if (unwi_debug_level > level) \ ---- src/ia64/Gscript.c -+++ src/ia64/Gscript.c -@@ -113,7 +113,7 @@ get_script_cache (unw_addr_space_t as, s - sigprocmask (SIG_SETMASK, &unwi_full_sigmask, saved_sigmaskp); - if (likely (caching == UNW_CACHE_GLOBAL)) - { -- Debug (16, "%s: acquiring lock\n"); -+ Debug (16, "acquiring lock\n"); - mutex_lock (&cache->lock); - } - #endif ---- src/os-linux.h -+++ src/os-linux.h -@@ -226,7 +226,7 @@ maps_next (struct map_iterator *mi, - { - /* copy down the remaining bytes, if any */ - if (bytes_left > 0) -- memcpy (mi->buf_end - mi->buf_size, mi->buf, bytes_left); -+ memmove (mi->buf_end - mi->buf_size, mi->buf, bytes_left); - - mi->buf = mi->buf_end - mi->buf_size; - nread = read (mi->fd, mi->buf + bytes_left, -@@ -238,8 +238,8 @@ maps_next (struct map_iterator *mi, - /* Move contents to the end of the buffer so we - maintain the invariant that all bytes between - mi->buf and mi->buf_end are valid. */ -- memcpy (mi->buf_end - nread - bytes_left, mi->buf, -- nread + bytes_left); -+ memmove (mi->buf_end - nread - bytes_left, mi->buf, -+ nread + bytes_left); - mi->buf = mi->buf_end - nread - bytes_left; - } - ---- src/x86_64/Gresume.c -+++ src/x86_64/Gresume.c -@@ -35,6 +35,7 @@ HIDDEN inline int - x86_64_local_resume (unw_addr_space_t as, unw_cursor_t *cursor, void *arg) - { - # warning Implement me! -+ return -UNW_EINVAL; - } - - #endif /* !UNW_REMOTE_ONLY */ ---- tests/Gtest-concurrent.c -+++ tests/Gtest-concurrent.c -@@ -84,9 +84,10 @@ doit (void) - int i; - - for (i = 0; i < NTHREADS; ++i) -- pthread_create (th + i, NULL, worker, NULL); -+ if (pthread_create (th + i, NULL, worker, NULL)) -+ break; - -- for (i = 0; i < NTHREADS; ++i) -+ while (i-- > 0) - pthread_join (th[i], NULL); - } - ---- tests/Makefile.am -+++ tests/Makefile.am -@@ -23,7 +23,7 @@ if ARCH_IA64 - Gia64-test-nat Lia64-test-nat \ - Gia64-test-rbs Lia64-test-rbs \ - Gia64-test-readonly Lia64-test-readonly \ -- ia64-test-setjmp ia64-test-sig -+ ia64-test-sig - endif - check_SCRIPTS_cdep = run-ptrace-mapper run-ptrace-misc - check_PROGRAMS_cdep = Gtest-bt Ltest-bt Gtest-exc Ltest-exc \ -@@ -83,7 +83,6 @@ LIBUNWIND = ../src/libunwind-$(arch).la - LDADD = $(LIBUNWIND) - - test_setjmp_LDADD = ../src/libunwind-setjmp.la --ia64_test_setjmp_LDADD = ../src/libunwind-setjmp.la - test_ptrace_LDADD = ../src/libunwind-ptrace.a $(LIBUNWIND) - Ltest_concurrent_LDADD = $(LIBUNWIND) -lpthread - Gtest_concurrent_LDADD = $(LIBUNWIND) -lpthread ---- tests/ia64-test-setjmp.c -+++ tests/ia64-test-setjmp.c -@@ -34,6 +34,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DE - #include - #include - #include -+#include - #include - - #include diff --git a/libunwind-0.98.6.tar.gz b/libunwind-0.98.6.tar.gz deleted file mode 100644 index ae7041f..0000000 --- a/libunwind-0.98.6.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fdfdbbfb03d735f75c30ea3c968535baf38fa8f77a432f15afad64d2fdc4dde1 -size 555902 diff --git a/libunwind-1.0.1-ia64.diff b/libunwind-1.0.1-ia64.diff new file mode 100644 index 0000000..eb4e63e --- /dev/null +++ b/libunwind-1.0.1-ia64.diff @@ -0,0 +1,33 @@ +From 962366dace4fed902ad5e89df1b34c13c3224b8b Mon Sep 17 00:00:00 2001 +From: Arun Sharma +Date: Fri, 23 Sep 2011 11:11:34 -0700 +Subject: [PATCH] Fixup compile errors on ia64. + +Suggested-by: Harald Servat +--- + src/ptrace/_UPT_get_dyn_info_list_addr.c | 2 +- + src/ptrace/_UPT_internal.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- a/src/ptrace/_UPT_get_dyn_info_list_addr.c ++++ b/src/ptrace/_UPT_get_dyn_info_list_addr.c +@@ -62,7 +62,7 @@ get_list_addr (unw_addr_space_t as, unw_word_t *dil_addr, void *arg, + + Debug (16, "checking object %s\n", path); + +- di = _UPTi_find_unwind_table (ui, as, path, lo, off); ++ di = _UPTi_find_unwind_table (ui, as, path, lo, off, 0); + if (di) + { + res = _Uia64_find_dyn_list (as, di, arg); +--- a/src/ptrace/_UPT_internal.h ++++ b/src/ptrace/_UPT_internal.h +@@ -64,7 +64,7 @@ struct UPT_info + + extern int _UPT_reg_offset[UNW_REG_LAST + 1]; + +-extern int _UPTi_find_unwind_table (struct UPT_info *ui, ++extern unw_dyn_info_t *UPTi_find_unwind_table (struct UPT_info *ui, + unw_addr_space_t as, + char *path, + unw_word_t segbase, diff --git a/libunwind-1.0.1-memset.diff b/libunwind-1.0.1-memset.diff new file mode 100644 index 0000000..d51e4a6 --- /dev/null +++ b/libunwind-1.0.1-memset.diff @@ -0,0 +1,112 @@ +From f89fb17695e8137a5f4e23570bf9f53374186c96 Mon Sep 17 00:00:00 2001 +From: Arun +Date: Sun, 2 Oct 2011 22:43:28 -0700 +Subject: [PATCH] Fix incorrect calls to memset. + +Found when compiling libunwind with clang. + +Signed-off-by: Paul Pluzhnikov +--- + src/arm/Gget_save_loc.c | 2 +- + src/hppa/Gget_save_loc.c | 2 +- + src/ia64/Gget_save_loc.c | 2 +- + src/mips/Gget_save_loc.c | 2 +- + src/x86/Gget_save_loc.c | 2 +- + src/x86_64/Gget_save_loc.c | 2 +- + tests/test-proc-info.c | 2 +- + 7 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/src/arm/Gget_save_loc.c b/src/arm/Gget_save_loc.c +index ba7bf17..151ba0f 100644 +--- a/src/arm/Gget_save_loc.c ++++ b/src/arm/Gget_save_loc.c +@@ -57,7 +57,7 @@ unw_get_save_loc (unw_cursor_t *cursor, int reg, unw_save_loc_t *sloc) + break; + } + +- memset (sloc, 0, sizeof (sloc)); ++ memset (sloc, 0, sizeof (*sloc)); + + if (DWARF_IS_NULL_LOC (loc)) + { +diff --git a/src/hppa/Gget_save_loc.c b/src/hppa/Gget_save_loc.c +index 7aa6f31..1b21919 100644 +--- a/src/hppa/Gget_save_loc.c ++++ b/src/hppa/Gget_save_loc.c +@@ -35,7 +35,7 @@ unw_get_save_loc (unw_cursor_t *cursor, int reg, unw_save_loc_t *sloc) + + #warning FIX ME! + +- memset (sloc, 0, sizeof (sloc)); ++ memset (sloc, 0, sizeof (*sloc)); + + if (DWARF_IS_NULL_LOC (loc)) + { +diff --git a/src/ia64/Gget_save_loc.c b/src/ia64/Gget_save_loc.c +index 7bc2b19..49bdaba 100644 +--- a/src/ia64/Gget_save_loc.c ++++ b/src/ia64/Gget_save_loc.c +@@ -142,7 +142,7 @@ unw_get_save_loc (unw_cursor_t *cursor, int reg, unw_save_loc_t *sloc) + break; + } + +- memset (sloc, 0, sizeof (sloc)); ++ memset (sloc, 0, sizeof (*sloc)); + + if (IA64_IS_NULL_LOC (loc)) + { +diff --git a/src/mips/Gget_save_loc.c b/src/mips/Gget_save_loc.c +index dbccea8..262e23e 100644 +--- a/src/mips/Gget_save_loc.c ++++ b/src/mips/Gget_save_loc.c +@@ -75,7 +75,7 @@ unw_get_save_loc (unw_cursor_t *cursor, int reg, unw_save_loc_t *sloc) + break; + } + +- memset (sloc, 0, sizeof (sloc)); ++ memset (sloc, 0, sizeof (*sloc)); + + if (DWARF_IS_NULL_LOC (loc)) + { +diff --git a/src/x86/Gget_save_loc.c b/src/x86/Gget_save_loc.c +index 6e6f9dc..e8cc79e 100644 +--- a/src/x86/Gget_save_loc.c ++++ b/src/x86/Gget_save_loc.c +@@ -109,7 +109,7 @@ unw_get_save_loc (unw_cursor_t *cursor, int reg, unw_save_loc_t *sloc) + break; + } + +- memset (sloc, 0, sizeof (sloc)); ++ memset (sloc, 0, sizeof (*sloc)); + + if (DWARF_IS_NULL_LOC (loc)) + { +diff --git a/src/x86_64/Gget_save_loc.c b/src/x86_64/Gget_save_loc.c +index db81db3..20b14a5 100644 +--- a/src/x86_64/Gget_save_loc.c ++++ b/src/x86_64/Gget_save_loc.c +@@ -49,7 +49,7 @@ unw_get_save_loc (unw_cursor_t *cursor, int reg, unw_save_loc_t *sloc) + break; + } + +- memset (sloc, 0, sizeof (sloc)); ++ memset (sloc, 0, sizeof (*sloc)); + + if (DWARF_IS_NULL_LOC (loc)) + { +diff --git a/tests/test-proc-info.c b/tests/test-proc-info.c +index 9e039c6..e8915fb 100644 +--- a/tests/test-proc-info.c ++++ b/tests/test-proc-info.c +@@ -72,7 +72,7 @@ access_fpreg (unw_addr_space_t as, unw_regnum_t regnum, unw_fpreg_t *valp, + int write, void *arg) + { + if (!write) +- memset (valp, 0, sizeof (valp)); ++ memset (valp, 0, sizeof (*valp)); + return 0; + } + +-- +1.7.2.5 + diff --git a/libunwind-1.0.1-tests.diff b/libunwind-1.0.1-tests.diff new file mode 100644 index 0000000..dc96034 --- /dev/null +++ b/libunwind-1.0.1-tests.diff @@ -0,0 +1,52 @@ +--- tests/Makefile.am ++++ tests/Makefile.am +@@ -82,14 +82,20 @@ + + Lia64_test_readonly_SOURCES = Lia64-test-readonly.c ia64-test-readonly-asm.S + Gia64_test_readonly_SOURCES = Gia64-test-readonly.c ia64-test-readonly-asm.S ++ia64_test_sig_LDADD = $(LIBUNWIND) $(LIBUNWIND_local) ++Gia64_test_sig_LDADD = $(LIBUNWIND) $(LIBUNWIND_local) ++Gia64_test_readonly_LDADD = $(LIBUNWIND) $(LIBUNWIND_local) + Lia64_test_stack_SOURCES = Lia64-test-stack.c ia64-test-stack-asm.S \ + ia64-test-stack.h + Gia64_test_stack_SOURCES = Gia64-test-stack.c ia64-test-stack-asm.S \ + ia64-test-stack.h ++Gia64_test_stack_LDADD = $(LIBUNWIND) $(LIBUNWIND_local) + Lia64_test_rbs_SOURCES = Lia64-test-rbs.c ia64-test-rbs-asm.S ia64-test-rbs.h + Gia64_test_rbs_SOURCES = Gia64-test-rbs.c ia64-test-rbs-asm.S ia64-test-rbs.h ++Gia64_test_rbs_LDADD = $(LIBUNWIND) $(LIBUNWIND_local) + Lia64_test_nat_SOURCES = Lia64-test-nat.c ia64-test-nat-asm.S + Gia64_test_nat_SOURCES = Gia64-test-nat.c ia64-test-nat-asm.S ++Gia64_test_nat_LDADD = $(LIBUNWIND) $(LIBUNWIND_local) + ia64_test_dyn1_SOURCES = ia64-test-dyn1.c ia64-dyn-asm.S flush-cache.S + ppc64_test_altivec_SOURCES = ppc64-test-altivec.c ppc64-test-altivec-utils.c + ppc64_test_wchar_SOURCES = ppc64-test-wchar.c +@@ -128,8 +134,8 @@ + + test_async_sig_LDADD = $(LIBUNWIND_local) -lpthread + test_flush_cache_LDADD = $(LIBUNWIND_local) +-test_init_remote_LDADD = $(LIBUNWIND) +-test_mem_LDADD = $(LIBUNWIND) ++test_init_remote_LDADD = $(LIBUNWIND) $(LIBUNWIND_local) ++test_mem_LDADD = $(LIBUNWIND) $(LIBUNWIND_local) + test_ptrace_LDADD = $(LIBUNWIND_ptrace) $(LIBUNWIND) + test_proc_info_LDADD = $(LIBUNWIND) + test_static_link_LDADD = $(LIBUNWIND) +@@ -137,12 +143,12 @@ + rs_race_LDADD = $(LIBUNWIND) -lpthread + test_varargs_LDADD = @BACKTRACELIB@ + +-Gtest_bt_LDADD = $(LIBUNWIND) +-Gtest_concurrent_LDADD = $(LIBUNWIND) -lpthread ++Gtest_bt_LDADD = $(LIBUNWIND) $(LIBUNWIND_local) ++Gtest_concurrent_LDADD = $(LIBUNWIND) $(LIBUNWIND_local) -lpthread + Gtest_dyn1_LDADD = $(LIBUNWIND) $(LIBUNWIND_local) +-Gtest_exc_LDADD = $(LIBUNWIND) +-Gtest_init_LDADD = $(LIBUNWIND) +-Gtest_resume_sig_LDADD = $(LIBUNWIND) ++Gtest_exc_LDADD = $(LIBUNWIND) $(LIBUNWIND_local) ++Gtest_init_LDADD = $(LIBUNWIND) $(LIBUNWIND_local) ++Gtest_resume_sig_LDADD = $(LIBUNWIND) $(LIBUNWIND_local) + Gperf_simple_LDADD = $(LIBUNWIND) $(LIBUNWIND_local) + Gtest_trace_LDADD=$(LIBUNWIND) $(LIBUNWIND_local) + Gperf_trace_LDADD = $(LIBUNWIND) $(LIBUNWIND_local) diff --git a/libunwind-1.0.1.tar.gz b/libunwind-1.0.1.tar.gz new file mode 100644 index 0000000..0d7fbee --- /dev/null +++ b/libunwind-1.0.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aa95fd184c0b90d95891c2f3bac2c7df708ff016d2a6ee8b2eabb769f864101f +size 1028725 diff --git a/libunwind.changes b/libunwind.changes index 4cd86a2..c555ea9 100644 --- a/libunwind.changes +++ b/libunwind.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Mon Oct 17 16:03:13 CEST 2011 - dmueller@suse.de + +- update to libunwind 1.0.1: + * hundreds of fixes, see http://git.savannah.gnu.org/gitweb/?p=libunwind.git;a=shortlog + for details + * ARM support + * Greatly improved x86-64 support thanks to Arun Sharma. + * Support for PPC64 added by Jose Flavio Aguilar Paulino. + * Testing, stability and many fixes on x86 (Paul Pluzhnikov) + * Improved local and remote unwinding on ARM (Ken Werner) + * Fast unwind (rbp, rsp, rip only) on x86_64 with a fallback to slow code paths + ------------------------------------------------------------------- Sun Oct 31 12:37:02 UTC 2010 - jengelh@medozas.de diff --git a/libunwind.spec b/libunwind.spec index 84dec46..464e08c 100644 --- a/libunwind.spec +++ b/libunwind.spec @@ -1,7 +1,7 @@ # -# spec file for package libunwind (Version 0.98.6) +# spec file for package libunwind # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -22,16 +22,16 @@ Name: libunwind BuildRequires: gcc-c++ Url: http://savannah.nongnu.org/projects/libunwind/ Summary: Unwind Library -Version: 0.98.6 +Version: 1.0.1 Release: 34 Group: System/Base License: MIT Source: libunwind-%{version}.tar.gz -Patch: libunwind-%{version}.diff -# PATCH-FIX-OPENSUSE libunwind-0.98.6-pointer-comparison.patch bnc#531705 -Patch1: libunwind-%{version}-pointer-comparison.patch +Patch0: libunwind-1.0.1-ia64.diff +Patch1: libunwind-1.0.1-memset.diff +Patch2: libunwind-1.0.1-tests.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build -ExclusiveArch: %ix86 ia64 x86_64 +ExclusiveArch: %ix86 ia64 x86_64 %arm %description A portable and efficient C programming interface (API) to determine the @@ -62,28 +62,25 @@ Authors: %prep %setup -q -%patch +%patch0 -p1 +%patch1 -p1 +%patch2 +# %patch %build -chmod +w aclocal.m4 configure autoreconf -fi RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE" ./configure "CFLAGS=$RPM_OPT_FLAGS" --prefix=/usr --mandir=%{_mandir} \ --libdir=%{_libdir} --build=%{_target_cpu}-suse-linux make %{?_smp_mflags} -%ifarch ia64 -make -k check -%else # There are some expected failures make -k check || : -%endif %install make install DESTDIR=$RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/%{_lib} -mv $RPM_BUILD_ROOT%{_libdir}/libunwind.so.7* $RPM_BUILD_ROOT/%{_lib} -cd $RPM_BUILD_ROOT%{_libdir} -ln -sf ../../%{_lib}/libunwind.so.7.* libunwind.so +mv $RPM_BUILD_ROOT%{_libdir}/libunwind.so.8* $RPM_BUILD_ROOT/%{_lib} +ln -sf ../../%{_lib}/libunwind.so.8.* $RPM_BUILD_ROOT%{_libdir}/libunwind.so %post -p /sbin/ldconfig