Accepting request 391464 from home:matwey:branches:devel:libraries:c_c++
Fix build for armv7l OBS-URL: https://build.opensuse.org/request/show/391464 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libunwind?expand=0&rev=26
This commit is contained in:
parent
26f1e89d31
commit
c57ee43e00
@ -0,0 +1,69 @@
|
|||||||
|
From c90a2e02b3c1b03362a549a05261a4d0513d6026 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Simon Atanasyan <simon@atanasyan.com>
|
||||||
|
Date: Tue, 21 Oct 2014 15:43:20 -0700
|
||||||
|
Subject: [PATCH] Mark run-ptrace-mapper and run-ptrace-misc as XFAIL on MIPS
|
||||||
|
|
||||||
|
Though PTRACE_SINGLESTEP is defined on MIPS Linux, the kernel does
|
||||||
|
not support that kind of request. The ptrace call failed and sets
|
||||||
|
errno to EIO and paused process is not resumed. In case of
|
||||||
|
run-ptrace-mapper and run-ptrace-misc this leads to hanged execution
|
||||||
|
because next call to wait4 never returns.
|
||||||
|
|
||||||
|
This change adds run-ptrace-mapper and run-ptrace-misc to the list
|
||||||
|
of 'expected failed' tests on MIPS targets.
|
||||||
|
|
||||||
|
Signed-off-by: Simon Atanasyan <simon@atanasyan.com>
|
||||||
|
---
|
||||||
|
tests/Makefile.am | 9 ++++++++-
|
||||||
|
tests/test-ptrace.c | 12 ++++++++++--
|
||||||
|
2 files changed, 18 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/Makefile.am b/tests/Makefile.am
|
||||||
|
index 9c76628..9c62f92 100644
|
||||||
|
--- a/tests/Makefile.am
|
||||||
|
+++ b/tests/Makefile.am
|
||||||
|
@@ -94,9 +94,16 @@ check_SCRIPTS = $(check_SCRIPTS_common) $(check_SCRIPTS_cdep) \
|
||||||
|
|
||||||
|
|
||||||
|
TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
|
||||||
|
+XFAIL_TESTS =
|
||||||
|
|
||||||
|
if !ARCH_IA64
|
||||||
|
-XFAIL_TESTS = Gtest-dyn1 Ltest-dyn1
|
||||||
|
+XFAIL_TESTS += Gtest-dyn1 Ltest-dyn1
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
+if ARCH_MIPS
|
||||||
|
+# MIPS kernel does not support PTRACE_SINGLESTEP
|
||||||
|
+# ptrace request used in the tests.
|
||||||
|
+XFAIL_TESTS += run-ptrace-mapper run-ptrace-misc
|
||||||
|
endif
|
||||||
|
|
||||||
|
noinst_PROGRAMS = $(noinst_PROGRAMS_common) $(noinst_PROGRAMS_cdep) \
|
||||||
|
diff --git a/tests/test-ptrace.c b/tests/test-ptrace.c
|
||||||
|
index 942b0db..a5b71dd 100644
|
||||||
|
--- a/tests/test-ptrace.c
|
||||||
|
+++ b/tests/test-ptrace.c
|
||||||
|
@@ -303,9 +303,17 @@ main (int argc, char **argv)
|
||||||
|
{
|
||||||
|
do_backtrace ();
|
||||||
|
#if HAVE_DECL_PTRACE_SINGLESTEP
|
||||||
|
- ptrace (PTRACE_SINGLESTEP, target_pid, 0, pending_sig);
|
||||||
|
+ if (ptrace (PTRACE_SINGLESTEP, target_pid, 0, pending_sig) < 0)
|
||||||
|
+ {
|
||||||
|
+ panic ("ptrace(PTRACE_SINGLESTEP) failed (errno=%d)\n", errno);
|
||||||
|
+ killed = 1;
|
||||||
|
+ }
|
||||||
|
#elif HAVE_DECL_PT_STEP
|
||||||
|
- ptrace (PT_STEP, target_pid, (caddr_t)1, pending_sig);
|
||||||
|
+ if (ptrace (PT_STEP, target_pid, (caddr_t)1, pending_sig) < 0)
|
||||||
|
+ {
|
||||||
|
+ panic ("ptrace(PT_STEP) failed (errno=%d)\n", errno);
|
||||||
|
+ killed = 1;
|
||||||
|
+ }
|
||||||
|
#else
|
||||||
|
#error Singlestep me
|
||||||
|
#endif
|
||||||
|
--
|
||||||
|
2.1.4
|
||||||
|
|
@ -0,0 +1,53 @@
|
|||||||
|
From 0bed10aa217157b287e036fba1e48ad2c6a3356e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Gregory Fong <gregory.0xf0@gmail.com>
|
||||||
|
Date: Wed, 18 Feb 2015 13:18:41 -0800
|
||||||
|
Subject: [PATCH] Mark run-ptrace-mapper and run-ptrace-misc as XFAIL on ARM
|
||||||
|
|
||||||
|
This is similar to commit c90a2e02b3c1b03362a549a05261a4d0513d6026
|
||||||
|
"Mark run-ptrace-mapper and run-ptrace-misc as XFAIL on MIPS".
|
||||||
|
Starting with 2.6.39, ARM Linux returns -EIO for PTRACE_SINGLESTEP, so
|
||||||
|
we need to mark this as XFAIL for ARM too.
|
||||||
|
|
||||||
|
The Linux commit that changed this is
|
||||||
|
|
||||||
|
commit 425fc47adb5bb69f76285be77a09a3341a30799e
|
||||||
|
Author: Will Deacon <will.deacon@arm.com>
|
||||||
|
Date: Mon Feb 14 14:31:09 2011 +0100
|
||||||
|
|
||||||
|
ARM: 6668/1: ptrace: remove single-step emulation code
|
||||||
|
|
||||||
|
see: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=425fc47adb5bb69f76285be77a09a3341a30799e
|
||||||
|
|
||||||
|
Signed-off-by: Gregory Fong <gregory.0xf0@gmail.com>
|
||||||
|
---
|
||||||
|
tests/Makefile.am | 13 ++++++++++---
|
||||||
|
1 file changed, 10 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/Makefile.am b/tests/Makefile.am
|
||||||
|
index 9c62f92..fe2dba8 100644
|
||||||
|
--- a/tests/Makefile.am
|
||||||
|
+++ b/tests/Makefile.am
|
||||||
|
@@ -100,10 +100,17 @@ if !ARCH_IA64
|
||||||
|
XFAIL_TESTS += Gtest-dyn1 Ltest-dyn1
|
||||||
|
endif
|
||||||
|
|
||||||
|
-if ARCH_MIPS
|
||||||
|
-# MIPS kernel does not support PTRACE_SINGLESTEP
|
||||||
|
+# Use if arch defines but does not support PTRACE_SINGLESTEP
|
||||||
|
# ptrace request used in the tests.
|
||||||
|
-XFAIL_TESTS += run-ptrace-mapper run-ptrace-misc
|
||||||
|
+XFAIL_TESTS_PTRACE_SINGLESTEP = run-ptrace-mapper run-ptrace-misc
|
||||||
|
+
|
||||||
|
+if ARCH_MIPS
|
||||||
|
+XFAIL_TESTS += $(XFAIL_TESTS_PTRACE_SINGLESTEP)
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
+if ARCH_ARM
|
||||||
|
+# ARM Linux kernel >=2.6.39 removed PTRACE_SINGLESTEP emulation
|
||||||
|
+XFAIL_TESTS += $(XFAIL_TESTS_PTRACE_SINGLESTEP)
|
||||||
|
endif
|
||||||
|
|
||||||
|
noinst_PROGRAMS = $(noinst_PROGRAMS_common) $(noinst_PROGRAMS_cdep) \
|
||||||
|
--
|
||||||
|
2.1.4
|
||||||
|
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Apr 24 16:25:21 UTC 2016 - matwey.kornilov@gmail.com
|
||||||
|
|
||||||
|
- Add patches for boo#976955:
|
||||||
|
* 0001-Mark-run-ptrace-mapper-and-run-ptrace-misc-as-XFAIL-.patch
|
||||||
|
* 0002-Mark-run-ptrace-mapper-and-run-ptrace-misc-as-XFAIL-.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jul 2 12:47:57 UTC 2015 - tchvatal@suse.com
|
Thu Jul 2 12:47:57 UTC 2015 - tchvatal@suse.com
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package libunwind
|
# spec file for package libunwind
|
||||||
#
|
#
|
||||||
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -36,6 +36,10 @@ Patch2: libunwind-aarch64.patch
|
|||||||
Patch3: libunwind-ppc64le.patch
|
Patch3: libunwind-ppc64le.patch
|
||||||
# PATCH-FIX-UPSTREAM: bnc#936786 CVE-2015-3239
|
# PATCH-FIX-UPSTREAM: bnc#936786 CVE-2015-3239
|
||||||
Patch4: libunwind-CVE-2015-3239.patch
|
Patch4: libunwind-CVE-2015-3239.patch
|
||||||
|
# PATCH-FIX-UPSTREAM: boo#976955
|
||||||
|
Patch5: 0001-Mark-run-ptrace-mapper-and-run-ptrace-misc-as-XFAIL-.patch
|
||||||
|
# PATCH-FIX-UPSTREAM: boo#976955
|
||||||
|
Patch6: 0002-Mark-run-ptrace-mapper-and-run-ptrace-misc-as-XFAIL-.patch
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
@ -66,6 +70,8 @@ call-chain of a program.
|
|||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
|
%patch5 -p1
|
||||||
|
%patch6 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
autoreconf -fvi
|
autoreconf -fvi
|
||||||
|
Loading…
Reference in New Issue
Block a user