diff options
author | Tudor Florea <tudor.florea@enea.com> | 2015-10-08 22:46:13 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2015-10-08 22:46:13 +0200 |
commit | 8d89651ef729e560ad96dcfc002fcde6ff7f923b (patch) | |
tree | eb5be01c25f735d12fe9881ee6327c9b7e8bbe39 /meta-linaro-integration/recipes-overlayed/libunwind/libunwind-1.1/Support-building-with-older-compilers.patch | |
download | meta-linaro-dizzy-enea.tar.gz |
initial commit for Enea Linux 5.0 armdizzy-enea
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-linaro-integration/recipes-overlayed/libunwind/libunwind-1.1/Support-building-with-older-compilers.patch')
-rw-r--r-- | meta-linaro-integration/recipes-overlayed/libunwind/libunwind-1.1/Support-building-with-older-compilers.patch | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/meta-linaro-integration/recipes-overlayed/libunwind/libunwind-1.1/Support-building-with-older-compilers.patch b/meta-linaro-integration/recipes-overlayed/libunwind/libunwind-1.1/Support-building-with-older-compilers.patch new file mode 100644 index 0000000..268b702 --- /dev/null +++ b/meta-linaro-integration/recipes-overlayed/libunwind/libunwind-1.1/Support-building-with-older-compilers.patch | |||
@@ -0,0 +1,72 @@ | |||
1 | From 10b064ffe902d5af31bb49bd8e4f03c545f8d462 Mon Sep 17 00:00:00 2001 | ||
2 | From: Ladislav Michl <ladis@linux-mips.org> | ||
3 | Date: Tue, 13 Nov 2012 11:19:47 +0100 | ||
4 | Subject: [PATCH] Support building with older compilers. | ||
5 | |||
6 | Add a check for __builtin_unreachable. | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | --- | ||
10 | configure.ac | 11 +++++++++++ | ||
11 | include/libunwind_i.h | 6 ++++++ | ||
12 | src/arm/Gresume.c | 2 +- | ||
13 | src/sh/Gresume.c | 2 +- | ||
14 | 4 files changed, 19 insertions(+), 2 deletions(-) | ||
15 | |||
16 | --- a/configure.ac | ||
17 | +++ b/configure.ac | ||
18 | @@ -285,6 +285,17 @@ if test x$have__builtin___clear_cache = | ||
19 | fi | ||
20 | AC_MSG_RESULT([$have__builtin___clear_cache]) | ||
21 | |||
22 | +AC_MSG_CHECKING([for __builtin_unreachable]) | ||
23 | +AC_LINK_IFELSE( | ||
24 | + [AC_LANG_PROGRAM([[]], [[__builtin_unreachable()]])], | ||
25 | + [have__builtin_unreachable=yes], | ||
26 | + [have__builtin_unreachable=no]) | ||
27 | +if test x$have__builtin_unreachable = xyes; then | ||
28 | + AC_DEFINE([HAVE__BUILTIN_UNREACHABLE], [1], | ||
29 | + [Defined if __builtin_unreachable() is available]) | ||
30 | +fi | ||
31 | +AC_MSG_RESULT([$have__builtin_unreachable]) | ||
32 | + | ||
33 | AC_MSG_CHECKING([for __sync atomics]) | ||
34 | AC_LINK_IFELSE( | ||
35 | [AC_LANG_PROGRAM([[]], [[ | ||
36 | --- a/include/libunwind_i.h | ||
37 | +++ b/include/libunwind_i.h | ||
38 | @@ -72,6 +72,12 @@ WITH THE SOFTWARE OR THE USE OR OTHER DE | ||
39 | # endif | ||
40 | #endif | ||
41 | |||
42 | +#if defined(HAVE__BUILTIN_UNREACHABLE) | ||
43 | +# define unreachable() __builtin_unreachable() | ||
44 | +#else | ||
45 | +# define unreachable() do { } while (1) | ||
46 | +#endif | ||
47 | + | ||
48 | #ifdef DEBUG | ||
49 | # define UNW_DEBUG 1 | ||
50 | #else | ||
51 | --- a/src/arm/Gresume.c | ||
52 | +++ b/src/arm/Gresume.c | ||
53 | @@ -96,7 +96,7 @@ arm_local_resume (unw_addr_space_t as, u | ||
54 | : : "r" (c->sigcontext_sp), "r" (c->sigcontext_pc) | ||
55 | ); | ||
56 | } | ||
57 | - __builtin_unreachable(); | ||
58 | + unreachable(); | ||
59 | #else | ||
60 | printf ("%s: implement me\n", __FUNCTION__); | ||
61 | #endif | ||
62 | --- a/src/sh/Gresume.c | ||
63 | +++ b/src/sh/Gresume.c | ||
64 | @@ -109,7 +109,7 @@ sh_local_resume (unw_addr_space_t as, un | ||
65 | "r" (c->sigcontext_pc) | ||
66 | ); | ||
67 | } | ||
68 | - __builtin_unreachable(); | ||
69 | + unreachable(); | ||
70 | #endif | ||
71 | return -UNW_EINVAL; | ||
72 | } | ||