diff options
3 files changed, 69 insertions, 0 deletions
diff --git a/meta/recipes-support/libunwind/libunwind-1.1/0001-aarch64-introduce-build-support-for-aarch64_be-targe.patch b/meta/recipes-support/libunwind/libunwind-1.1/0001-aarch64-introduce-build-support-for-aarch64_be-targe.patch new file mode 100644 index 0000000000..b8afb90bfb --- /dev/null +++ b/meta/recipes-support/libunwind/libunwind-1.1/0001-aarch64-introduce-build-support-for-aarch64_be-targe.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 743668f66916b6bb03c92b04be5216400951ace6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Victor Kamensky <victor.kamensky@linaro.org> | ||
3 | Date: Wed, 3 Dec 2014 17:35:43 -0800 | ||
4 | Subject: [PATCH 1/2] aarch64: introduce build support for aarch64_be target | ||
5 | |||
6 | Upstream-Status: backport | ||
7 | |||
8 | Introduce support for aarch64_be, aarch64 big endian, target. | ||
9 | We would like to reuse all code that was done for aarch64 | ||
10 | (little endian) target. So we do similar thing that is done | ||
11 | for ARM v7 (arm) target for any aarch64* arch we set it | ||
12 | just to aarch64. | ||
13 | |||
14 | Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org> | ||
15 | --- | ||
16 | configure.ac | 1 + | ||
17 | 1 file changed, 1 insertion(+) | ||
18 | |||
19 | diff --git a/configure.ac b/configure.ac | ||
20 | index 582e71f..c59f526 100644 | ||
21 | --- a/configure.ac | ||
22 | +++ b/configure.ac | ||
23 | @@ -88,6 +88,7 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ | ||
24 | |||
25 | AC_DEFUN([SET_ARCH],[ | ||
26 | AS_CASE([$1], | ||
27 | + [aarch64*],[$2=aarch64], | ||
28 | [arm*],[$2=arm], | ||
29 | [i?86],[$2=x86], | ||
30 | [hppa*],[$2=hppa], | ||
31 | -- | ||
32 | 1.9.1 | ||
33 | |||
diff --git a/meta/recipes-support/libunwind/libunwind-1.1/0002-aarch64-fix-wrong-big_endian-flag-in-aarch64_be-case.patch b/meta/recipes-support/libunwind/libunwind-1.1/0002-aarch64-fix-wrong-big_endian-flag-in-aarch64_be-case.patch new file mode 100644 index 0000000000..2ae4477368 --- /dev/null +++ b/meta/recipes-support/libunwind/libunwind-1.1/0002-aarch64-fix-wrong-big_endian-flag-in-aarch64_be-case.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From 16e98c8cf37b006c3879ee57acc23c9af13c40d5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Victor Kamensky <victor.kamensky@linaro.org> | ||
3 | Date: Wed, 3 Dec 2014 17:35:44 -0800 | ||
4 | Subject: [PATCH 2/2] aarch64: fix wrong big_endian flag in aarch64_be case | ||
5 | |||
6 | Upstream-Status: backport | ||
7 | |||
8 | Set local_addr_space.big_endian flag according to current target | ||
9 | endianness. Before it was set by memset to 0, which corresponds | ||
10 | to little endian and it worked perfectly fine for aarch64. | ||
11 | But it breaks aarch64_be because dwarf_readu16, dwarf_readu32, | ||
12 | etc functions do not read values correctly since they operate | ||
13 | with wrong idea about current target endianness. | ||
14 | |||
15 | Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org> | ||
16 | --- | ||
17 | src/aarch64/Ginit.c | 1 + | ||
18 | 1 file changed, 1 insertion(+) | ||
19 | |||
20 | diff --git a/src/aarch64/Ginit.c b/src/aarch64/Ginit.c | ||
21 | index 0bc8997..b9181ef 100644 | ||
22 | --- a/src/aarch64/Ginit.c | ||
23 | +++ b/src/aarch64/Ginit.c | ||
24 | @@ -181,6 +181,7 @@ aarch64_local_addr_space_init (void) | ||
25 | local_addr_space.acc.access_fpreg = access_fpreg; | ||
26 | local_addr_space.acc.resume = aarch64_local_resume; | ||
27 | local_addr_space.acc.get_proc_name = get_static_proc_name; | ||
28 | + local_addr_space.big_endian = (__BYTE_ORDER == __BIG_ENDIAN); | ||
29 | unw_flush_cache (&local_addr_space, 0, 0); | ||
30 | } | ||
31 | |||
32 | -- | ||
33 | 1.9.1 | ||
34 | |||
diff --git a/meta/recipes-support/libunwind/libunwind_1.1.bb b/meta/recipes-support/libunwind/libunwind_1.1.bb index aff84092a6..1e76c1a8c4 100644 --- a/meta/recipes-support/libunwind/libunwind_1.1.bb +++ b/meta/recipes-support/libunwind/libunwind_1.1.bb | |||
@@ -8,6 +8,8 @@ SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \ | |||
8 | file://0001-Invalid-dwarf-opcodes-can-cause-references-beyond-th.patch \ | 8 | file://0001-Invalid-dwarf-opcodes-can-cause-references-beyond-th.patch \ |
9 | file://Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch \ | 9 | file://Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch \ |
10 | file://0001-backtrace-Use-only-with-glibc-and-uclibc.patch \ | 10 | file://0001-backtrace-Use-only-with-glibc-and-uclibc.patch \ |
11 | file://0001-aarch64-introduce-build-support-for-aarch64_be-targe.patch \ | ||
12 | file://0002-aarch64-fix-wrong-big_endian-flag-in-aarch64_be-case.patch \ | ||
11 | " | 13 | " |
12 | SRC_URI_append_libc-musl = "\ | 14 | SRC_URI_append_libc-musl = "\ |
13 | file://0001-x86-Stub-out-x86_local_resume.patch \ | 15 | file://0001-x86-Stub-out-x86_local_resume.patch \ |