V3: Add machine qemuarm64
cover V3: Add machine qemuarm64
V3 updates:
* Remove 2 commits:
|- gcc-4.9: redefine default library install directory
|- Revert "gcc-4.9: redefine default library install directory"
* Remove qemu related patches which is done by upgrade qemu to 2.2.0 in oe-core
* libpng: Use patch from Koen instead
* libunwind: Support-building-with-older-compilers.patch is still needed by gcc 4.9, so NO update
* packagegroup-core-tools-profile: don't find SYSPROF in lttng recipes, so NO update.
* patches of local.conf.sample and poky.conf will send to yocto maillist.
The following changes since commit 8657c2fd57600e0b0eaf2a14692de7453c78e1bb:
serf: readded md5sum (2014-12-11 11:34:57 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib kangkai/qemuarm64-rebased
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=kangkai/qemuarm64-rebased
Fathi Boudra (1):
libunwind: add aarch64 support
Joe Slater (4):
siteinfo: account for 32 and 64 bit arm
sysprof: disable build for aarch64
lttng: recognize aarch64
guile: allow compilation for aarch64
Kai Kang (9):
linux-yocto: depend on libgcc for aarch64
Add machine qemuarm64
libc-package.bbclass: add aarch64 target to locale_arch_options glibc-locale.inc: add aarch64 to BINARY_LOCALE_ARCHES
libatomics-ops: add aarch64 target iniitial support
qt4: add aarch64 support
runqemu: add qemuarm64 support.
kexec-tools: add aarch64 support packagegroup-core-tools-profile: remove sysprof for aarch64
Koen Kooi (1):
libpng 1.6.13: fix build for aarch64
Mark Hatle (4):
gcc: Disable aarch64 multilib options
glibc-package: aarch64 enable symlink for ABI compliance
aarch-arm64: Update tune files
linux-yocto: Fixup linux-yocto for aarch64
meta/classes/libc-package.bbclass | 1 + meta/classes/siteinfo.bbclass | 8 +- meta/conf/machine/include/arm/arch-arm64.inc | 36 + meta/conf/machine/include/arm/arch-armv8.inc | 1 + .../conf/machine/include/arm/feature-arm-thumb.inc | 10 +- meta/conf/machine/qemuarm64.conf | 12 + meta/recipes-core/glibc/glibc-locale.inc | 2 +- meta/recipes-core/glibc/glibc-package.inc | 16 + .../packagegroup-core-tools-profile.bb | 2 + meta/recipes-devtools/gcc/gcc-4.9.inc | 1 + .../gcc/gcc-4.9/0057-aarch64-config.patch | 32 + .../recipes-devtools/guile/files/arm_aarch64.patch | 19 + meta/recipes-devtools/guile/guile_2.0.11.bb | 1 + meta/recipes-kernel/kexec/kexec-tools.inc | 2 +- .../kexec/kexec-tools/kexec-aarch64.patch | 801 +++++++ meta/recipes-kernel/kexec/kexec-tools_2.0.8.bb | 4 +- meta/recipes-kernel/linux/linux-yocto.inc | 3 + meta/recipes-kernel/linux/linux-yocto_3.14.bb | 4 +- meta/recipes-kernel/linux/linux-yocto_3.17.bb | 4 +- .../lttng/lttng-ust/add-aarch64.patch | 19 + meta/recipes-kernel/lttng/lttng-ust_2.5.0.bb | 1 + meta/recipes-kernel/sysprof/sysprof_git.bb | 5 + meta/recipes-multimedia/libpng/libpng_1.6.13.bb | 2 +- .../0001-libatomic_ops-Aarch64-basic-port.patch | 239 ++ .../pulseaudio/libatomics-ops_7.2.bb | 1 + meta/recipes-qt/qt4/qt4-4.8.6.inc | 7 + .../0029-aarch64_arm64_fix_arch_detection.patch | 53 + .../0030-aarch64_arm64_qatomic_support.patch | 491 ++++ .../qt4/qt4-4.8.6/0031-aarch64_arm64_mkspecs.patch | 124 + .../qt4/qt4-4.8.6/0032-aarch64_add_header.patch | 18 + meta/recipes-qt/qt4/qt4-native.inc | 4 + meta/recipes-qt/qt4/qt4_arch.inc | 1 + .../libunwind/libunwind-1.1/AArch64-port.patch | 2529 ++++++++++++++++++++ .../Support-building-with-older-compilers.patch | 72 + meta/recipes-support/libunwind/libunwind.inc | 1 + meta/recipes-support/libunwind/libunwind_1.1.bb | 5 + meta/recipes-support/liburcu/files/aarch64.patch | 19 + meta/recipes-support/liburcu/liburcu_0.8.5.bb | 1 + meta/site/arm-32 | 47 + meta/site/arm-64 | 46 + meta/site/arm-common | 38 - scripts/runqemu | 5 +- scripts/runqemu-internal | 26 + 43 files changed, 4661 insertions(+), 52 deletions(-) create mode 100644 meta/conf/machine/include/arm/arch-arm64.inc create mode 100644 meta/conf/machine/include/arm/arch-armv8.inc create mode 100644 meta/conf/machine/qemuarm64.conf create mode 100644 meta/recipes-devtools/gcc/gcc-4.9/0057-aarch64-config.patch create mode 100644 meta/recipes-devtools/guile/files/arm_aarch64.patch create mode 100644 meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch create mode 100644 meta/recipes-kernel/lttng/lttng-ust/add-aarch64.patch create mode 100644 meta/recipes-multimedia/pulseaudio/files/0001-libatomic_ops-Aarch64-basic-port.patch create mode 100644 meta/recipes-qt/qt4/qt4-4.8.6/0029-aarch64_arm64_fix_arch_detection.patch create mode 100644 meta/recipes-qt/qt4/qt4-4.8.6/0030-aarch64_arm64_qatomic_support.patch create mode 100644 meta/recipes-qt/qt4/qt4-4.8.6/0031-aarch64_arm64_mkspecs.patch create mode 100644 meta/recipes-qt/qt4/qt4-4.8.6/0032-aarch64_add_header.patch create mode 100644 meta/recipes-support/libunwind/libunwind-1.1/AArch64-port.patch create mode 100644 meta/recipes-support/libunwind/libunwind-1.1/Support-building-with-older-compilers.patch create mode 100644 meta/recipes-support/liburcu/files/aarch64.patch create mode 100644 meta/site/arm-32 create mode 100644 meta/site/arm-64
Signature · 1 line
1.9.1
PATCH 1/19 linux-yocto: depend on libgcc for aarch64
Make aarch aarch64 kernel depend on libgcc.
In arch/arm64/Makefile, it adds LIBGCC to libs-y:
LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
libs-y += $(LIBGCC)
In file Makefile in top directory, libs-y is assigned to to var KBUILD_VMLINUX_MAIN. It uses script link-vmlinux.sh to link vmlinux.o, and when execute function vmlinux_link() in link-vmlinux.sh, KBUILD_VMLINUX_MAIN is passed to ${LD}.
If build without libgcc, the value of LIBGCC is just libgcc.a without parent directory. linux-yocto fails to build:
| LD vmlinux.o
| aarch64-poky-linux-ld.bfd: cannot find libgcc.a: No such file or directory
Add libgcc to aarch64 kernel dependency.
--- meta/recipes-kernel/linux/linux-yocto.inc | 1 + 1 file changed, 1 insertion(+)
meta/recipes-kernel/linux/linux-yocto.inc +1 -0
@@ -7,6 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" INC_PR = "r4" DEPENDS += "xz-native bc-native" +DEPENDS_append_aarch64 = " libgcc" # A KMACHINE is the mapping of a yocto $MACHINE to what is built # by the kernel. This is typically the branch that should be built,
Signature · 1 line
1.9.1
PATCH 2/19 Add machine qemuarm64
In reply to Kai KangAdd machine qemuarm64. The configure files are derived from linaro.
Update:
* rename genericarmv8 to qemuarm64 for coordination in oe-core
* include qemu.inc then remove common part of config
* disable using autoserial
* move arch-armv8.inc from machine/include/arm64 to machine/include/arm
[YOCTO #6487]
--- meta/conf/machine/include/arm/arch-armv8.inc | 20 ++++++++++++++++++++ meta/conf/machine/qemuarm64.conf | 12 ++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 meta/conf/machine/include/arm/arch-armv8.inc create mode 100644 meta/conf/machine/qemuarm64.conf
meta/conf/machine/include/arm/arch-armv8.inc new file +20 -0
@@ -0,0 +1,20 @@ +DEFAULTTUNE ?= "aarch64" + +ARMPKGARCH ?= "aarch64" + +TUNEVALID[aarch64] = "Enable instructions for aarch64" +TUNEVALID[bigendian] = "Enable big-endian mode." +TUNECONFLICTS[aarch64] = "" +MACHINEOVERRIDES .= "${@bb.utils.contains("TUNE_FEATURES", "aarch64", ":aarch64", "" ,d)}" + +# Little Endian base configs +AVAILTUNES += "aarch64 aarch64_be" +TUNE_FEATURES_tune-aarch64 ?= "aarch64" +TUNE_FEATURES_tune-aarch64_be ?= "${TUNE_FEATURES_tune-aarch64} bigendian" + +ARMPKGSFX_ENDIAN = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "_be", "", d)}" + +TUNE_ARCH = "aarch64${ARMPKGSFX_ENDIAN}" +TUNE_PKGARCH = "aarch64${ARMPKGSFX_ENDIAN}" + +PACKAGE_EXTRA_ARCHS = "aarch64${ARMPKGSFX_ENDIAN}"
meta/conf/machine/qemuarm64.conf new file +12 -0
@@ -0,0 +1,12 @@ +#@TYPE: Machine +#@NAME: generic armv8 machine +#@DESCRIPTION: Machine configuration for running a generic armv8 + +require conf/machine/include/arm/arch-armv8.inc +require conf/machine/include/qemu.inc + +MACHINE_FEATURES = "" + +KERNEL_IMAGETYPE = "Image" + +SERIAL_CONSOLE = "38400 ttyAMA0"
Signature · 1 line
1.9.1
PATCH 3/19 siteinfo: account for 32 and 64 bit arm
In reply to Kai KangFrom: Joe Slater <[email protected]>
Pull wordsize related items from arm-common and put in arm-32. Leave them as they were. Copy arm-32 to arm-64 and comment out all variables. Re-define to correct values leaving items which do not appear to be used undefined.
--- meta/classes/siteinfo.bbclass | 8 ++++---- meta/site/arm-32 | 47 +++++++++++++++++++++++++++++++++++++++++++ meta/site/arm-64 | 46 ++++++++++++++++++++++++++++++++++++++++++ meta/site/arm-common | 38 ---------------------------------- 4 files changed, 97 insertions(+), 42 deletions(-) create mode 100644 meta/site/arm-32 create mode 100644 meta/site/arm-64
meta/classes/siteinfo.bbclass +4 -4
@@ -18,10 +18,10 @@ def siteinfo_data(d): archinfo = { "allarch": "endian-little bit-32", # bogus, but better than special-casing the checks below for allarch - "aarch64": "endian-little bit-64 arm-common", - "aarch64_be": "endian-big bit-64 arm-common", - "arm": "endian-little bit-32 arm-common", - "armeb": "endian-big bit-32 arm-common", + "aarch64": "endian-little bit-64 arm-common arm-64", + "aarch64_be": "endian-big bit-64 arm-common arm-64", + "arm": "endian-little bit-32 arm-common arm-32", + "armeb": "endian-big bit-32 arm-common arm-32", "avr32": "endian-big bit-32 avr32-common", "bfin": "endian-little bit-32 bfin-common", "i386": "endian-little bit-32 ix86-common",
meta/site/arm-32 new file +47 -0
47 lines not on this page · raw message
meta/site/arm-64 new file +46 -0
46 lines not on this page · raw message
meta/site/arm-common +0 -38
@@ -11,7 +11,6 @@ ac_cv_sctp=${ac_cv_sctp=no} # apache ac_cv_func_pthread_key_delete=${ac_cv_func_pthread_key_delete=yes} apr_cv_process_shared_works=${apr_cv_process_shared_works=no} -ac_cv_sizeof_ssize_t=${ac_cv_sizeof_ssize_t=4} apr_cv_tcp_nodelay_with_cork=${apr_cv_tcp_nodelay_with_cork=yes} # bash
@@ -51,8 +50,6 @@ ac_cv_func_fnmatch_works=${ac_cv_func_fnmatch_works=yes} am_cv_func_working_getline=${am_cv_func_working_getline=yes} # glib -glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24} -glib_cv_sizeof_system_thread=${glib_cv_sizeof_system_thread=4} glib_cv_stack_grows=${glib_cv_stack_grows=no} glib_cv_uscore=${glib_cv_uscore=no} glib_cv_use_pid_surrogate=${glib_cv_use_pid_surrogate=yes}
@@ -60,7 +57,6 @@ glib_cv_has__inline=${glib_cv_has__inline=yes} glib_cv_has__inline__=${glib_cv_has__inline__=yes} glib_cv_hasinline=${glib_cv_hasinline=yes} glib_cv_sane_realloc=${glib_cv_sane_realloc=yes} -glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24} glib_cv_uscore=${glib_cv_uscore=no} glib_cv_va_val_copy=${glib_cv_va_val_copy=yes} glib_cv_rtldglobal_broken=${glib_cv_rtldglobal_broken=no}
@@ -70,15 +66,7 @@ glib_cv_sys_pthread_cond_timedwait_posix=${glib_cv_sys_pthread_cond_timedwait_po # glib-2.0 glib_cv_long_long_format=${glib_cv_long_long_format=ll} -glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24} -glib_cv_sizeof_intmax_t=${glib_cv_sizeof_intmax_t=8} -glib_cv_sizeof_ptrdiff_t=${glib_cv_sizeof_ptrdiff_t=4} -glib_cv_sizeof_size_t=${glib_cv_sizeof_size_t=4} -glib_cv_sizeof_system_thread=${glib_cv_sizeof_system_thread=4} glib_cv_sys_use_pid_niceness_surrogate=${glib_cv_sys_use_pid_niceness_surrogate=yes} -ac_cv_alignof_guint32=4 -ac_cv_alignof_guint64=8 -ac_cv_alignof_unsigned_long=4 #gstreamer as_cv_unaligned_access=${as_cv_unaligned_access=no}
@@ -86,9 +74,6 @@ as_cv_unaligned_access=${as_cv_unaligned_access=no} # httppc ac_cv_strerror_r_SUSv3=${ac_cv_strerror_r_SUSv3=no} -# jikes -ac_cv_sizeof_wchar_t=4 - # lftp ac_cv_need_trio=${ac_cv_need_trio=no} lftp_cv_va_val_copy=${lftp_cv_va_val_copy=yes}
@@ -119,20 +104,6 @@ mysql_cv_func_atomic_add=${mysql_cv_func_atomic_add=no} ac_cv_regexec_segfault_emptystr=${ac_cv_regexec_segfault_emptystr=no} nano_cv_func_regexec_segv_emptystr=${nano_cv_func_regexec_segv_emptystr=no} -# ORBit2 -ac_cv_alignof_CORBA_boolean=1 -ac_cv_alignof_CORBA_char=1 -ac_cv_alignof_CORBA_double=8 -ac_cv_alignof_CORBA_float=4 -ac_cv_alignof_CORBA_long=4 -ac_cv_alignof_CORBA_long_double=8 -ac_cv_alignof_CORBA_long_long=8 -ac_cv_alignof_CORBA_octet=1 -ac_cv_alignof_CORBA_pointer=4 -ac_cv_alignof_CORBA_short=2 -ac_cv_alignof_CORBA_struct=1 -ac_cv_alignof_CORBA_wchar=2 - # php ac_cv_pread=${ac_cv_pread=no} ac_cv_pwrite=${ac_cv_pwrite=no}
@@ -186,12 +157,3 @@ jm_cv_func_working_readdir=yes # evolution-data-server ac_cv_libiconv_utf8=${ac_cv_libiconv_utf8=yes} -# at-spi2-core -ac_cv_alignof_char=1 -ac_cv_alignof_dbind_pointer=4 -ac_cv_alignof_dbind_struct=1 -ac_cv_alignof_dbus_bool_t=4 -ac_cv_alignof_dbus_int16_t=2 -ac_cv_alignof_dbus_int32_t=4 -ac_cv_alignof_dbus_int64_t=8 -ac_cv_alignof_double=8
Signature · 1 line
1.9.1
PATCH 4/19 libc-package.bbclass: add aarch64 target to locale_arch_options
In reply to Kai KangAdd aarch64 target to locale_arch_options in libc-package.bbclass to support Arm V8.
--- meta/classes/libc-package.bbclass | 1 + 1 file changed, 1 insertion(+)
meta/classes/libc-package.bbclass +1 -0
@@ -268,6 +268,7 @@ python package_do_split_gconvs () { locale_arch_options = { \ "arm": " --uint32-align=4 --little-endian ", \ "armeb": " --uint32-align=4 --big-endian ", \ + "aarch64": " --uint32-align=4 --little-endian ", \ "aarch64_be": " --uint32-align=4 --big-endian ", \ "sh4": " --uint32-align=4 --big-endian ", \ "powerpc": " --uint32-align=4 --big-endian ", \
Signature · 1 line
1.9.1
PATCH 5/19 glibc-locale.inc: add aarch64 to BINARY_LOCALE_ARCHES
In reply to Kai KangAdd aarch64 to var BINARY_LOCALE_ARCHES. In libc-packages.class, it is used to work with other vars to check and add cross-localedef-native as a dependecy correctly.
--- meta/recipes-core/glibc/glibc-locale.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/glibc/glibc-locale.inc +1 -1
@@ -23,7 +23,7 @@ ENABLE_BINARY_LOCALE_GENERATION_pn-nativesdk-glibc-locale = "0" #enable locale generation on these arches # BINARY_LOCALE_ARCHES is a space separated list of regular expressions -BINARY_LOCALE_ARCHES ?= "arm.* i[3-6]86 x86_64 powerpc mips mips64" +BINARY_LOCALE_ARCHES ?= "arm.* aarch64 i[3-6]86 x86_64 powerpc mips mips64" # set "1" to use cross-localedef for locale generation # set "0" for qemu emulation of native localedef for locale generation
Signature · 1 line
1.9.1
PATCH 6/19 libatomics-ops: add aarch64 target iniitial support
In reply to Kai KangAdd patch for libatomics-ops to add aarch64 target iniitial support. It is from linaro repo.
--- .../0001-libatomic_ops-Aarch64-basic-port.patch | 239 +++++++++++++++++++++ .../pulseaudio/libatomics-ops_7.2.bb | 1 + 2 files changed, 240 insertions(+) create mode 100644 meta/recipes-multimedia/pulseaudio/files/0001-libatomic_ops-Aarch64-basic-port.patch
meta/recipes-multimedia/pulseaudio/files/0001-libatomic_ops-Aarch64-basic-port.patch new file +239 -0
@@ -0,0 +1,239 @@ +From aac120d778ae5fc619b2fb8ef18ea18d3d5d20cc Mon Sep 17 00:00:00 2001 +From: Yvan Roux <[email protected]> +Date: Wed, 23 Jan 2013 17:14:16 +0100 +Subject: [PATCH] Aarch64 basic port + +Adapted-for-OpenEmbedded-by: Marcin Juszkiewicz <[email protected]> + + +Upstream-Status: Backport + +It is original from +https://github.com/ivmai/libatomic_ops/commit/cbbf86330fcb600cfe0f895cb970d922456005d6 + +Signed-off-by: Kai Kang <[email protected]> +--- + src/atomic_ops.h | 4 + src/atomic_ops/sysdeps/Makefile.am | 1 + src/atomic_ops/sysdeps/gcc/aarch64.h | 184 +++++++++++++++++++++++++++++++++++ + 3 files changed, 189 insertions(+) + create mode 100644 src/atomic_ops/sysdeps/gcc/aarch64.h + +--- libatomic_ops-7.2.orig/src/atomic_ops.h ++++ libatomic_ops-7.2/src/atomic_ops.h +@@ -242,10 +242,14 @@ + # endif /* __m68k__ */ + # if defined(__powerpc__) || defined(__ppc__) || defined(__PPC__) \ + || defined(__powerpc64__) || defined(__ppc64__) + # include "atomic_ops/sysdeps/gcc/powerpc.h" + # endif /* __powerpc__ */ ++# if defined(__aarch64__) ++# include "atomic_ops/sysdeps/gcc/aarch64.h" ++# define AO_CAN_EMUL_CAS ++# endif /* __aarch64__ */ + # if defined(__arm__) && !defined(AO_USE_PTHREAD_DEFS) + # include "atomic_ops/sysdeps/gcc/arm.h" + # define AO_CAN_EMUL_CAS + # endif /* __arm__ */ + # if defined(__cris__) || defined(CRIS) +--- libatomic_ops-7.2.orig/src/atomic_ops/sysdeps/Makefile.am ++++ libatomic_ops-7.2/src/atomic_ops/sysdeps/Makefile.am +@@ -24,10 +24,11 @@ nobase_sysdep_HEADERS= generic_pthread.h + standard_ao_double_t.h \ + README \ + \ + armcc/arm_v6.h \ + \ ++ gcc/aarch64.h \ + gcc/alpha.h gcc/arm.h gcc/avr32.h gcc/cris.h \ + gcc/hexagon.h gcc/hppa.h gcc/ia64.h gcc/m68k.h \ + gcc/mips.h gcc/powerpc.h gcc/s390.h \ + gcc/sh.h gcc/sparc.h gcc/x86.h gcc/x86_64.h \ + \ +--- /dev/null ++++ libatomic_ops-7.2/src/atomic_ops/sysdeps/gcc/aarch64.h +@@ -0,0 +1,184 @@ ++/* ++ * Copyright (c) 1991-1994 by Xerox Corporation. All rights reserved. ++ * Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved. ++ * Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved. ++ * ++ * ++ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED ++ * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. ++ * ++ * Permission is hereby granted to use or copy this program ++ * for any purpose, provided the above notices are retained on all copies. ++ * Permission to modify the code and to distribute modified code is granted, ++ * provided the above notices are retained, and a notice that the code was ++ * modified is included with the above copyright notice. ++ * ++ */ ++ ++#include "../read_ordered.h" ++ ++#include "../test_and_set_t_is_ao_t.h" ++ ++AO_INLINE void ++AO_nop_full(void) ++{ ++# ifndef AO_UNIPROCESSOR ++__sync_synchronize (); ++# endif ++} ++#define AO_HAVE_nop_full ++ ++AO_INLINE AO_t ++AO_load(const volatile AO_t *addr) ++{ ++ return __atomic_load_n (addr, __ATOMIC_RELAXED); ++} ++#define AO_HAVE_load ++ ++AO_INLINE AO_t ++AO_load_acquire(const volatile AO_t *addr) ++{ ++ return __atomic_load_n (addr, __ATOMIC_ACQUIRE); ++} ++#define AO_HAVE_load_acquire ++ ++AO_INLINE void ++ AO_store(volatile AO_t *addr, AO_t value) ++{ ++ __atomic_store_n(addr, value, __ATOMIC_RELAXED); ++} ++#define AO_HAVE_store ++ ++AO_INLINE void ++ AO_store_release(volatile AO_t *addr, AO_t value) ++{ ++ __atomic_store_n(addr, value, __ATOMIC_RELEASE); ++} ++#define AO_HAVE_store_release ++ ++AO_INLINE AO_TS_VAL_t ++AO_test_and_set(volatile AO_TS_t *addr) ++{ ++ return __atomic_test_and_set(addr, __ATOMIC_RELAXED); ++} ++# define AO_HAVE_test_and_set ++ ++AO_INLINE AO_TS_VAL_t ++AO_test_and_set_acquire(volatile AO_TS_t *addr) ++{ ++ return __atomic_test_and_set(addr, __ATOMIC_ACQUIRE); ++} ++# define AO_HAVE_test_and_set_acquire ++ ++AO_INLINE AO_TS_VAL_t ++AO_test_and_set_release(volatile AO_TS_t *addr) ++{ ++ return __atomic_test_and_set(addr, __ATOMIC_RELEASE); ++} ++# define AO_HAVE_test_and_set_release ++ ++AO_INLINE AO_TS_VAL_t ++AO_test_and_set_full(volatile AO_TS_t *addr) ++{ ++ return __atomic_test_and_set(addr, __ATOMIC_SEQ_CST); ++} ++# define AO_HAVE_test_and_set_full ++ ++AO_INLINE AO_t ++AO_fetch_and_add(volatile AO_t *p, AO_t incr) ++{ ++ return __atomic_fetch_add(p, incr, __ATOMIC_RELAXED); ++} ++#define AO_HAVE_fetch_and_add ++ ++AO_INLINE AO_t ++AO_fetch_and_add_acquire(volatile AO_t *p, AO_t incr) ++{ ++ return __atomic_fetch_add(p, incr, __ATOMIC_ACQUIRE); ++} ++#define AO_HAVE_fetch_and_add_acquire ++ ++AO_INLINE AO_t ++AO_fetch_and_add_release(volatile AO_t *p, AO_t incr) ++{ ++ return __atomic_fetch_add(p, incr, __ATOMIC_RELEASE); ++} ++#define AO_HAVE_fetch_and_add_release ++ ++AO_INLINE AO_t ++AO_fetch_and_add_full(volatile AO_t *p, AO_t incr) ++{ ++ return __atomic_fetch_add(p, incr, __ATOMIC_SEQ_CST); ++} ++#define AO_HAVE_fetch_and_add_full ++ ++AO_INLINE AO_t ++AO_fetch_and_add1(volatile AO_t *p) ++{ ++ return __atomic_fetch_add(p, 1, __ATOMIC_RELAXED); ++} ++#define AO_HAVE_fetch_and_add1 ++ ++AO_INLINE AO_t ++AO_fetch_and_add1_acquire(volatile AO_t *p) ++{ ++ return __atomic_fetch_add(p, 1, __ATOMIC_ACQUIRE); ++} ++#define AO_HAVE_fetch_and_add1_acquire ++ ++AO_INLINE AO_t ++AO_fetch_and_add1_release(volatile AO_t *p) ++{ ++ return __atomic_fetch_add(p, 1, __ATOMIC_RELEASE); ++} ++#define AO_HAVE_fetch_and_add1_release ++ ++AO_INLINE AO_t ++AO_fetch_and_add1_full(volatile AO_t *p) ++{ ++ return __atomic_fetch_add(p, 1, __ATOMIC_SEQ_CST); ++} ++#define AO_HAVE_fetch_and_add1_full ++ ++AO_INLINE AO_t ++AO_fetch_and_sub1(volatile AO_t *p) ++{ ++ return __atomic_fetch_sub(p, 1, __ATOMIC_RELAXED); ++} ++#define AO_HAVE_fetch_and_sub1 ++ ++AO_INLINE AO_t ++AO_fetch_and_sub1_acquire(volatile AO_t *p) ++{ ++ return __atomic_fetch_sub(p, 1, __ATOMIC_ACQUIRE); ++} ++#define AO_HAVE_fetch_and_sub1_acquire ++ ++AO_INLINE AO_t ++AO_fetch_and_sub1_release(volatile AO_t *p) ++{ ++ return __atomic_fetch_sub(p, 1, __ATOMIC_RELEASE); ++} ++#define AO_HAVE_fetch_and_sub1_release ++ ++AO_INLINE AO_t ++AO_fetch_and_sub1_full(volatile AO_t *p) ++{ ++ return __atomic_fetch_sub(p, 1, __ATOMIC_SEQ_CST); ++} ++#define AO_HAVE_fetch_and_sub1_full ++ ++/* Returns nonzero if the comparison succeeded. */ ++AO_INLINE int ++AO_compare_and_swap(volatile AO_t *addr, AO_t old_val, AO_t new_val) ++{ ++ return __sync_bool_compare_and_swap(addr, old_val, new_val); ++} ++# define AO_HAVE_compare_and_swap ++ ++AO_INLINE AO_t ++AO_fetch_compare_and_swap(volatile AO_t *addr, AO_t old_val, AO_t new_val) ++{ ++ return __sync_val_compare_and_swap(addr, old_val, new_val); ++} ++# define AO_HAVE_fetch_compare_and_swap
meta/recipes-multimedia/pulseaudio/libatomics-ops_7.2.bb +1 -0
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://doc/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ PR = "r1" SRC_URI = "http://www.hpl.hp.com/research/linux/atomic_ops/download/libatomic_ops-${PV}.tar.gz \ + file://0001-libatomic_ops-Aarch64-basic-port.patch \ " SRC_URI[md5sum] = "890acdc83a7cd10e2e9536062d3741c8"
Signature · 1 line
1.9.1
PATCH 7/19 qt4: add aarch64 support
In reply to Kai KangAdd aarch64 support for qt4 packages.
Most of the patches are derived from debian:
http://anonscm.debian.org/cgit/pkg-kde/qt/qt4-x11.git/tree/debian/patches
Add arch check to set right QT_ARCH.
Disable webkit temporarily for qt4 and qt4-embedded that they fail to build:
| runtime/JSValueInlineMethods.h: In constructor 'JSC::JSValue::JSValue(const JSC::JSCell*)':
| runtime/JSValueInlineMethods.h:242:78: error: cast from 'JSC::JSCell*' to 'int32_t {aka int}' loses precision [-fpermissive]
It has been fix by Qt5, but didn't backport to Qt4. There is an still open defect for it:
https://bugreports.qt-project.org/browse/QTBUG-35442
--- meta/recipes-qt/qt4/qt4-4.8.6.inc | 7 + .../0029-aarch64_arm64_fix_arch_detection.patch | 53 +++ .../0030-aarch64_arm64_qatomic_support.patch | 491 +++++++++++++++++++++ .../qt4/qt4-4.8.6/0031-aarch64_arm64_mkspecs.patch | 124 ++++++ .../qt4/qt4-4.8.6/0032-aarch64_add_header.patch | 18 + meta/recipes-qt/qt4/qt4-native.inc | 4 + meta/recipes-qt/qt4/qt4_arch.inc | 1 + 7 files changed, 698 insertions(+) create mode 100644 meta/recipes-qt/qt4/qt4-4.8.6/0029-aarch64_arm64_fix_arch_detection.patch create mode 100644 meta/recipes-qt/qt4/qt4-4.8.6/0030-aarch64_arm64_qatomic_support.patch create mode 100644 meta/recipes-qt/qt4/qt4-4.8.6/0031-aarch64_arm64_mkspecs.patch create mode 100644 meta/recipes-qt/qt4/qt4-4.8.6/0032-aarch64_add_header.patch
meta/recipes-qt/qt4/qt4-4.8.6.inc +7 -0
@@ -22,6 +22,10 @@ SRC_URI = "http://download.qt-project.org/official_releases/qt/4.8/${PV}/qt-ever file://0019-Fixes-for-gcc-4.7.0-particularly-on-qemux86.patch \ file://0027-tools.pro-disable-qmeegographicssystemhelper.patch \ file://0028-Don-t-crash-on-broken-GIF-images.patch \ + file://0029-aarch64_arm64_fix_arch_detection.patch \ + file://0030-aarch64_arm64_qatomic_support.patch \ + file://0031-aarch64_arm64_mkspecs.patch \ + file://0032-aarch64_add_header.patch \ file://g++.conf \ file://linux.conf \ "
@@ -36,6 +40,9 @@ S = "${WORKDIR}/qt-everywhere-opensource-src-${PV}" # https://bugreports.qt-project.org/browse/QTBUG-39224 QT_CONFIG_FLAGS_append_mips64 = "${@bb.utils.contains("TUNE_FEATURES", "n32", " -no-webkit", "" ,d)}" +# disable webkit for aarch64 temporarily that fails to compile +QT_CONFIG_FLAGS_append_aarch64 = " -no-webkit" + FILES_${QT_BASE_NAME}-tools_append = " ${bindir}/qml ${bindir}/qmlplugindump" FILES_${QT_BASE_NAME}-tools-dbg_append = " ${bindir}/.debug/qml ${bindir}/.debug/qmlplugindump"
meta/recipes-qt/qt4/qt4-4.8.6/0029-aarch64_arm64_fix_arch_detection.patch new file +53 -0
53 lines not on this page · raw message
meta/recipes-qt/qt4/qt4-4.8.6/0030-aarch64_arm64_qatomic_support.patch new file +491 -0
491 lines not on this page · raw message
meta/recipes-qt/qt4/qt4-4.8.6/0031-aarch64_arm64_mkspecs.patch new file +124 -0
124 lines not on this page · raw message
meta/recipes-qt/qt4/qt4-4.8.6/0032-aarch64_add_header.patch new file +18 -0
@@ -0,0 +1,18 @@ +Add missing header for aarch64. And install ../corelib/arch/qatomic_aarch64.h. + +Upstream-Status: Pending + +Signed-off-by: Kai Kang <[email protected]> +--- +diff -Nru qt-everywhere-opensource-src-4.8.6.orig/include/QtCore/qatomic_aarch64.h qt-everywhere-opensource-src-4.8.6/include/QtCore/qatomic_aarch64.h +--- qt-everywhere-opensource-src-4.8.6.orig/include/QtCore/qatomic_aarch64.h 1970-01-01 08:30:00.000000000 +0830 ++++ qt-everywhere-opensource-src-4.8.6/include/QtCore/qatomic_aarch64.h 2014-09-09 17:18:03.768352551 +0800 +@@ -0,0 +1 @@ ++#include "../../src/corelib/arch/qatomic_aarch64.h" +--- qt-everywhere-opensource-src-4.8.6/include/QtCore/headers.pri.orig 2014-09-09 18:05:37.100430311 +0800 ++++ qt-everywhere-opensource-src-4.8.6/include/QtCore/headers.pri 2014-09-09 18:05:59.112430911 +0800 +@@ -1,3 +1,3 @@ +-SYNCQT.HEADER_FILES = ../corelib/statemachine/qabstractstate.h ../corelib/statemachine/qabstracttransition.h ../corelib/statemachine/qeventtransition.h ../corelib/statemachine/qfinalstate.h ../corelib/statemachine/qhistorystate.h ../corelib/statemachine/qsignaltransition.h ../corelib/statemachine/qstate.h ../corelib/statemachine/qstatemachine.h ../corelib/arch/qatomic_alpha.h ../corelib/arch/qatomic_arch.h ../corelib/arch/qatomic_arm.h ../corelib/arch/qatomic_armv5.h ../corelib/arch/qatomic_armv6.h ../corelib/arch/qatomic_armv7.h ../corelib/arch/qatomic_avr32.h ../corelib/arch/qatomic_bfin.h ../corelib/arch/qatomic_bootstrap.h ../corelib/arch/qatomic_generic.h ../corelib/arch/qatomic_i386.h ../corelib/arch/qatomic_ia64.h ../corelib/arch/qatomic_integrity.h ../corelib/arch/qatomic_m68k.h ../corelib/arch/qatomic_macosx.h ../corelib/arch/qatomic_mips.h ../corelib/arch/qatomic_parisc.h ../corelib/arch/qatomic_powerpc.h ../corelib/arch/qatomic_s390.h ../corelib/arch/qatomic_sh.h ../corelib/arch/qatomic_sh4a.h ../corelib/arch/qatomic_sparc.h ../corelib/arch/qatomic_symbian.h ../corelib/arch/qatomic_vxworks.h ../corelib/arch/qatomic_windows.h ../corelib/arch/qatomic_windowsce.h ../corelib/arch/qatomic_x86_64.h ../corelib/thread/qatomic.h ../corelib/thread/qbasicatomic.h ../corelib/thread/qmutex.h ../corelib/thread/qreadwritelock.h ../corelib/thread/qsemaphore.h ../corelib/thread/qthread.h ../corelib/thread/qthreadstorage.h ../corelib/thread/qwaitcondition.h ../corelib/xml/qxmlstream.h ../corelib/concurrent/qfuture.h ../corelib/concurrent/qfutureinterface.h ../corelib/concurrent/qfuturesynchronizer.h ../corelib/concurrent/qfuturewatcher.h ../corelib/concurrent/qrunnable.h ../corelib/concurrent/qtconcurrentcompilertest.h ../corelib/concurrent/qtconcurrentexception.h ../corelib/concurrent/qtconcurrentfilter.h ../corelib/concurrent/qtconcurrentfilterkernel.h ../corelib/concurrent/qtconcurrentfunctionwrappers.h ../corelib/concurrent/qtconcurrentiteratekernel.h ../corelib/concurrent/qtconcurrentmap.h ../corelib/concurrent/qtconcurrentmapkernel.h ../corelib/concurrent/qtconcurrentmedian.h ../corelib/concurrent/qtconcurrentreducekernel.h ../corelib/concurrent/qtconcurrentresultstore.h ../corelib/concurrent/qtconcurrentrun.h ../corelib/concurrent/qtconcurrentrunbase.h ../corelib/concurrent/qtconcurrentstoredfunctioncall.h ../corelib/concurrent/qtconcurrentthreadengine.h ../corelib/concurrent/qthreadpool.h ../corelib/kernel/qabstracteventdispatcher.h ../corelib/kernel/qabstractitemmodel.h ../corelib/kernel/qbasictimer.h ../corelib/kernel/qcoreapplication.h ../corelib/kernel/qcoreevent.h ../corelib/kernel/qeventloop.h ../corelib/kernel/qfunctions_nacl.h ../corelib/kernel/qfunctions_vxworks.h ../corelib/kernel/qfunctions_wince.h ../corelib/kernel/qmath.h ../corelib/kernel/qmetaobject.h ../corelib/kernel/qmetatype.h ../corelib/kernel/qmimedata.h ../corelib/kernel/qobject.h ../corelib/kernel/qobjectcleanuphandler.h ../corelib/kernel/qobjectdefs.h ../corelib/kernel/qpointer.h ../corelib/kernel/qsharedmemory.h ../corelib/kernel/qsignalmapper.h ../corelib/kernel/qsocketnotifier.h ../corelib/kernel/qsystemsemaphore.h ../corelib/kernel/qtimer.h ../corelib/kernel/qtranslator.h ../corelib/kernel/qvariant.h ../corelib/plugin/qfactoryinterface.h ../corelib/plugin/qlibrary.h ../corelib/plugin/qplugin.h ../corelib/plugin/qpluginloader.h ../corelib/plugin/quuid.h ../corelib/global/qconfig-dist.h ../corelib/global/qconfig-large.h ../corelib/global/qconfig-medium.h ../corelib/global/qconfig-minimal.h ../corelib/global/qconfig-nacl.h ../corelib/global/qconfig-small.h ../corelib/global/qendian.h ../corelib/global/qfeatures.h ../corelib/global/qglobal.h ../corelib/global/qlibraryinfo.h ../corelib/global/qnamespace.h ../corelib/global/qnumeric.h ../corelib/global/qt_windows.h ../corelib/global/qconfig.h ../corelib/codecs/qtextcodec.h ../corelib/codecs/qtextcodecplugin.h ../corelib/io/qabstractfileengine.h ../corelib/io/qbuffer.h ../corelib/io/qdatastream.h ../corelib/io/qdebug.h ../corelib/io/qdir.h ../corelib/io/qdiriterator.h ../corelib/io/qfile.h ../corelib/io/qfileinfo.h ../corelib/io/qfilesystemwatcher.h ../corelib/io/qfsfileengine.h ../corelib/io/qiodevice.h ../corelib/io/qprocess.h ../corelib/io/qresource.h ../corelib/io/qsettings.h ../corelib/io/qtemporaryfile.h ../corelib/io/qtextstream.h ../corelib/io/qurl.h ../corelib/animation/qabstractanimation.h ../corelib/animation/qanimationgroup.h ../corelib/animation/qparallelanimationgroup.h ../corelib/animation/qpauseanimation.h ../corelib/animation/qpropertyanimation.h ../corelib/animation/qsequentialanimationgroup.h ../corelib/animation/qvariantanimation.h ../corelib/tools/qalgorithms.h ../corelib/tools/qbitarray.h ../corelib/tools/qbytearray.h ../corelib/tools/qbytearraymatcher.h ../corelib/tools/qcache.h ../corelib/tools/qchar.h ../corelib/tools/qcontainerfwd.h ../corelib/tools/qcontiguouscache.h ../corelib/tools/qcryptographichash.h ../corelib/tools/qdatetime.h ../corelib/tools/qeasingcurve.h ../corelib/tools/qelapsedtimer.h ../corelib/tools/qhash.h ../corelib/tools/qiterator.h ../corelib/tools/qline.h ../corelib/tools/qlinkedlist.h ../corelib/tools/qlist.h ../corelib/tools/qlocale.h ../corelib/tools/qlocale_blackberry.h ../corelib/tools/qmap.h ../corelib/tools/qmargins.h ../corelib/tools/qpair.h ../corelib/tools/qpoint.h ../corelib/tools/qqueue.h ../corelib/tools/qrect.h ../corelib/tools/qregexp.h ../corelib/tools/qscopedpointer.h ../corelib/tools/qscopedvaluerollback.h ../corelib/tools/qset.h ../corelib/tools/qshareddata.h ../corelib/tools/qsharedpointer.h ../corelib/tools/qsharedpointer_impl.h ../corelib/tools/qsize.h ../corelib/tools/qstack.h ../corelib/tools/qstring.h ../corelib/tools/qstringbuilder.h ../corelib/tools/qstringlist.h ../corelib/tools/qstringmatcher.h ../corelib/tools/qtextboundaryfinder.h ../corelib/tools/qtimeline.h ../corelib/tools/qvarlengtharray.h ../corelib/tools/qvector.h ../../include/QtCore/QtCore ++SYNCQT.HEADER_FILES = ../corelib/statemachine/qabstractstate.h ../corelib/statemachine/qabstracttransition.h ../corelib/statemachine/qeventtransition.h ../corelib/statemachine/qfinalstate.h ../corelib/statemachine/qhistorystate.h ../corelib/statemachine/qsignaltransition.h ../corelib/statemachine/qstate.h ../corelib/statemachine/qstatemachine.h ../corelib/arch/qatomic_alpha.h ../corelib/arch/qatomic_arch.h ../corelib/arch/qatomic_arm.h ../corelib/arch/qatomic_armv5.h ../corelib/arch/qatomic_armv6.h ../corelib/arch/qatomic_armv7.h ../corelib/arch/qatomic_aarch64.h ../corelib/arch/qatomic_avr32.h ../corelib/arch/qatomic_bfin.h ../corelib/arch/qatomic_bootstrap.h ../corelib/arch/qatomic_generic.h ../corelib/arch/qatomic_i386.h ../corelib/arch/qatomic_ia64.h ../corelib/arch/qatomic_integrity.h ../corelib/arch/qatomic_m68k.h ../corelib/arch/qatomic_macosx.h ../corelib/arch/qatomic_mips.h ../corelib/arch/qatomic_parisc.h ../corelib/arch/qatomic_powerpc.h ../corelib/arch/qatomic_s390.h ../corelib/arch/qatomic_sh.h ../corelib/arch/qatomic_sh4a.h ../corelib/arch/qatomic_sparc.h ../corelib/arch/qatomic_symbian.h ../corelib/arch/qatomic_vxworks.h ../corelib/arch/qatomic_windows.h ../corelib/arch/qatomic_windowsce.h ../corelib/arch/qatomic_x86_64.h ../corelib/thread/qatomic.h ../corelib/thread/qbasicatomic.h ../corelib/thread/qmutex.h ../corelib/thread/qreadwritelock.h ../corelib/thread/qsemaphore.h ../corelib/thread/qthread.h ../corelib/thread/qthreadstorage.h ../corelib/thread/qwaitcondition.h ../corelib/xml/qxmlstream.h ../corelib/concurrent/qfuture.h ../corelib/concurrent/qfutureinterface.h ../corelib/concurrent/qfuturesynchronizer.h ../corelib/concurrent/qfuturewatcher.h ../corelib/concurrent/qrunnable.h ../corelib/concurrent/qtconcurrentcompilertest.h ../corelib/concurrent/qtconcurrentexception.h ../corelib/concurrent/qtconcurrentfilter.h ../corelib/concurrent/qtconcurrentfilterkernel.h ../corelib/concurrent/qtconcurrentfunctionwrappers.h ../corelib/concurrent/qtconcurrentiteratekernel.h ../corelib/concurrent/qtconcurrentmap.h ../corelib/concurrent/qtconcurrentmapkernel.h ../corelib/concurrent/qtconcurrentmedian.h ../corelib/concurrent/qtconcurrentreducekernel.h ../corelib/concurrent/qtconcurrentresultstore.h ../corelib/concurrent/qtconcurrentrun.h ../corelib/concurrent/qtconcurrentrunbase.h ../corelib/concurrent/qtconcurrentstoredfunctioncall.h ../corelib/concurrent/qtconcurrentthreadengine.h ../corelib/concurrent/qthreadpool.h ../corelib/kernel/qabstracteventdispatcher.h ../corelib/kernel/qabstractitemmodel.h ../corelib/kernel/qbasictimer.h ../corelib/kernel/qcoreapplication.h ../corelib/kernel/qcoreevent.h ../corelib/kernel/qeventloop.h ../corelib/kernel/qfunctions_nacl.h ../corelib/kernel/qfunctions_vxworks.h ../corelib/kernel/qfunctions_wince.h ../corelib/kernel/qmath.h ../corelib/kernel/qmetaobject.h ../corelib/kernel/qmetatype.h ../corelib/kernel/qmimedata.h ../corelib/kernel/qobject.h ../corelib/kernel/qobjectcleanuphandler.h ../corelib/kernel/qobjectdefs.h ../corelib/kernel/qpointer.h ../corelib/kernel/qsharedmemory.h ../corelib/kernel/qsignalmapper.h ../corelib/kernel/qsocketnotifier.h ../corelib/kernel/qsystemsemaphore.h ../corelib/kernel/qtimer.h ../corelib/kernel/qtranslator.h ../corelib/kernel/qvariant.h ../corelib/plugin/qfactoryinterface.h ../corelib/plugin/qlibrary.h ../corelib/plugin/qplugin.h ../corelib/plugin/qpluginloader.h ../corelib/plugin/quuid.h ../corelib/global/qconfig-dist.h ../corelib/global/qconfig-large.h ../corelib/global/qconfig-medium.h ../corelib/global/qconfig-minimal.h ../corelib/global/qconfig-nacl.h ../corelib/global/qconfig-small.h ../corelib/global/qendian.h ../corelib/global/qfeatures.h ../corelib/global/qglobal.h ../corelib/global/qlibraryinfo.h ../corelib/global/qnamespace.h ../corelib/global/qnumeric.h ../corelib/global/qt_windows.h ../corelib/global/qconfig.h ../corelib/codecs/qtextcodec.h ../corelib/codecs/qtextcodecplugin.h ../corelib/io/qabstractfileengine.h ../corelib/io/qbuffer.h ../corelib/io/qdatastream.h ../corelib/io/qdebug.h ../corelib/io/qdir.h ../corelib/io/qdiriterator.h ../corelib/io/qfile.h ../corelib/io/qfileinfo.h ../corelib/io/qfilesystemwatcher.h ../corelib/io/qfsfileengine.h ../corelib/io/qiodevice.h ../corelib/io/qprocess.h ../corelib/io/qresource.h ../corelib/io/qsettings.h ../corelib/io/qtemporaryfile.h ../corelib/io/qtextstream.h ../corelib/io/qurl.h ../corelib/animation/qabstractanimation.h ../corelib/animation/qanimationgroup.h ../corelib/animation/qparallelanimationgroup.h ../corelib/animation/qpauseanimation.h ../corelib/animation/qpropertyanimation.h ../corelib/animation/qsequentialanimationgroup.h ../corelib/animation/qvariantanimation.h ../corelib/tools/qalgorithms.h ../corelib/tools/qbitarray.h ../corelib/tools/qbytearray.h ../corelib/tools/qbytearraymatcher.h ../corelib/tools/qcache.h ../corelib/tools/qchar.h ../corelib/tools/qcontainerfwd.h ../corelib/tools/qcontiguouscache.h ../corelib/tools/qcryptographichash.h ../corelib/tools/qdatetime.h ../corelib/tools/qeasingcurve.h ../corelib/tools/qelapsedtimer.h ../corelib/tools/qhash.h ../corelib/tools/qiterator.h ../corelib/tools/qline.h ../corelib/tools/qlinkedlist.h ../corelib/tools/qlist.h ../corelib/tools/qlocale.h ../corelib/tools/qlocale_blackberry.h ../corelib/tools/qmap.h ../corelib/tools/qmargins.h ../corelib/tools/qpair.h ../corelib/tools/qpoint.h ../corelib/tools/qqueue.h ../corelib/tools/qrect.h ../corelib/tools/qregexp.h ../corelib/tools/qscopedpointer.h ../corelib/tools/qscopedvaluerollback.h ../corelib/tools/qset.h ../corelib/tools/qshareddata.h ../corelib/tools/qsharedpointer.h ../corelib/tools/qsharedpointer_impl.h ../corelib/tools/qsize.h ../corelib/tools/qstack.h ../corelib/tools/qstring.h ../corelib/tools/qstringbuilder.h ../corelib/tools/qstringlist.h ../corelib/tools/qstringmatcher.h ../corelib/tools/qtextboundaryfinder.h ../corelib/tools/qtimeline.h ../corelib/tools/qvarlengtharray.h ../corelib/tools/qvector.h ../../include/QtCore/QtCore + SYNCQT.HEADER_CLASSES = ../../include/QtCore/QAbstractState ../../include/QtCore/QAbstractTransition ../../include/QtCore/QEventTransition ../../include/QtCore/QFinalState ../../include/QtCore/QHistoryState ../../include/QtCore/QSignalTransition ../../include/QtCore/QState ../../include/QtCore/QStateMachine ../../include/QtCore/QAtomicInt ../../include/QtCore/QAtomicPointer ../../include/QtCore/QBasicAtomicInt ../../include/QtCore/QBasicAtomicPointer ../../include/QtCore/QMutex ../../include/QtCore/QMutexLocker ../../include/QtCore/QMutexData ../../include/QtCore/QReadWriteLock ../../include/QtCore/QReadLocker ../../include/QtCore/QWriteLocker ../../include/QtCore/QSemaphore ../../include/QtCore/QThread ../../include/QtCore/QThreadStorageData ../../include/QtCore/QThreadStorage ../../include/QtCore/QWaitCondition ../../include/QtCore/QXmlStreamStringRef ../../include/QtCore/QXmlStreamAttribute ../../include/QtCore/QXmlStreamAttributes ../../include/QtCore/QXmlStreamNamespaceDeclaration ../../include/QtCore/QXmlStreamNamespaceDeclarations ../../include/QtCore/QXmlStreamNotationDeclaration ../../include/QtCore/QXmlStreamNotationDeclarations ../../include/QtCore/QXmlStreamEntityDeclaration ../../include/QtCore/QXmlStreamEntityDeclarations ../../include/QtCore/QXmlStreamEntityResolver ../../include/QtCore/QXmlStreamReader ../../include/QtCore/QXmlStreamWriter ../../include/QtCore/QFuture ../../include/QtCore/QFutureIterator ../../include/QtCore/QMutableFutureIterator ../../include/QtCore/QFutureInterfaceBase ../../include/QtCore/QFutureInterface ../../include/QtCore/QFutureSynchronizer ../../include/QtCore/QFutureWatcherBase ../../include/QtCore/QFutureWatcher ../../include/QtCore/QRunnable ../../include/QtCore/QtConcurrentFilter ../../include/QtCore/QtConcurrentMap ../../include/QtCore/QtConcurrentRun ../../include/QtCore/QThreadPool ../../include/QtCore/QAbstractEventDispatcher ../../include/QtCore/QModelIndex ../../include/QtCore/QPersistentModelIndex ../../include/QtCore/QModelIndexList ../../include/QtCore/QAbstractItemModel ../../include/QtCore/QAbstractTableModel ../../include/QtCore/QAbstractListModel ../../include/QtCore/QBasicTimer ../../include/QtCore/QCoreApplication ../../include/QtCore/QtCleanUpFunction ../../include/QtCore/QEvent ../../include/QtCore/QTimerEvent ../../include/QtCore/QChildEvent ../../include/QtCore/QCustomEvent ../../include/QtCore/QDynamicPropertyChangeEvent ../../include/QtCore/QEventLoop ../../include/QtCore/QMetaMethod ../../include/QtCore/QMetaEnum ../../include/QtCore/QMetaProperty ../../include/QtCore/QMetaClassInfo ../../include/QtCore/QMetaType ../../include/QtCore/QMetaTypeId ../../include/QtCore/QMetaTypeId2 ../../include/QtCore/QMimeData ../../include/QtCore/QObjectList ../../include/QtCore/QObjectData ../../include/QtCore/QObject ../../include/QtCore/QObjectUserData ../../include/QtCore/QObjectCleanupHandler ../../include/QtCore/QGenericArgument ../../include/QtCore/QGenericReturnArgument ../../include/QtCore/QArgument ../../include/QtCore/QReturnArgument ../../include/QtCore/QMetaObject ../../include/QtCore/QMetaObjectAccessor ../../include/QtCore/QMetaObjectExtraData ../../include/QtCore/QPointer ../../include/QtCore/QSharedMemory ../../include/QtCore/QSignalMapper ../../include/QtCore/QSocketNotifier ../../include/QtCore/QSystemSemaphore ../../include/QtCore/QTimer ../../include/QtCore/QTranslator ../../include/QtCore/QVariant ../../include/QtCore/QVariantList ../../include/QtCore/QVariantMap ../../include/QtCore/QVariantHash ../../include/QtCore/QVariantComparisonHelper ../../include/QtCore/QFactoryInterface ../../include/QtCore/QLibrary ../../include/QtCore/QtPlugin ../../include/QtCore/QtPluginInstanceFunction ../../include/QtCore/QPluginLoader ../../include/QtCore/QUuid ../../include/QtCore/QtEndian ../../include/QtCore/QtGlobal ../../include/QtCore/QIntegerForSize ../../include/QtCore/QNoImplicitBoolCast ../../include/QtCore/Q_INT8 ../../include/QtCore/Q_UINT8 ../../include/QtCore/Q_INT16 ../../include/QtCore/Q_UINT16 ../../include/QtCore/Q_INT32 ../../include/QtCore/Q_UINT32 ../../include/QtCore/Q_INT64 ../../include/QtCore/Q_UINT64 ../../include/QtCore/Q_LLONG ../../include/QtCore/Q_ULLONG ../../include/QtCore/Q_LONG ../../include/QtCore/Q_ULONG ../../include/QtCore/QSysInfo ../../include/QtCore/QtMsgHandler ../../include/QtCore/QGlobalStatic ../../include/QtCore/QGlobalStaticDeleter ../../include/QtCore/QBool ../../include/QtCore/QTypeInfo ../../include/QtCore/QFlag ../../include/QtCore/QIncompatibleFlag ../../include/QtCore/QFlags ../../include/QtCore/QForeachContainer ../../include/QtCore/QForeachContainerBase ../../include/QtCore/QLibraryInfo ../../include/QtCore/Qt ../../include/QtCore/QInternal ../../include/QtCore/QCOORD ../../include/QtCore/QtConfig ../../include/QtCore/QTextCodec ../../include/QtCore/QTextEncoder ../../include/QtCore/QTextDecoder ../../include/QtCore/QTextCodecFactoryInterface ../../include/QtCore/QTextCodecPlugin ../../include/QtCore/QAbstractFileEngine ../../include/QtCore/QAbstractFileEngineHandler ../../include/QtCore/QAbstractFileEngineIterator ../../include/QtCore/QBuffer ../../include/QtCore/QDataStream ../../include/QtCore/QtDebug ../../include/QtCore/QDebug ../../include/QtCore/QNoDebug ../../include/QtCore/QDir ../../include/QtCore/QDirIterator ../../include/QtCore/QFile ../../include/QtCore/QFileInfo ../../include/QtCore/QFileInfoList ../../include/QtCore/QFileInfoListIterator ../../include/QtCore/QFileSystemWatcher ../../include/QtCore/QFSFileEngine ../../include/QtCore/QIODevice ../../include/QtCore/Q_PID ../../include/QtCore/QProcessEnvironment ../../include/QtCore/QProcess ../../include/QtCore/QResource ../../include/QtCore/QSettings ../../include/QtCore/QTemporaryFile ../../include/QtCore/QTextStream ../../include/QtCore/QTextStreamFunction ../../include/QtCore/QTextStreamManipulator ../../include/QtCore/QTS ../../include/QtCore/QTextIStream ../../include/QtCore/QTextOStream ../../include/QtCore/QUrl ../../include/QtCore/QAbstractAnimation ../../include/QtCore/QAnimationDriver ../../include/QtCore/QAnimationGroup ../../include/QtCore/QParallelAnimationGroup ../../include/QtCore/QPauseAnimation ../../include/QtCore/QPropertyAnimation ../../include/QtCore/QSequentialAnimationGroup ../../include/QtCore/QVariantAnimation ../../include/QtCore/QtAlgorithms ../../include/QtCore/QBitArray ../../include/QtCore/QBitRef ../../include/QtCore/QByteArray ../../include/QtCore/QByteRef ../../include/QtCore/QByteArrayMatcher ../../include/QtCore/QCache ../../include/QtCore/QLatin1Char ../../include/QtCore/QChar ../../include/QtCore/QtContainerFwd ../../include/QtCore/QContiguousCacheData ../../include/QtCore/QContiguousCacheTypedData ../../include/QtCore/QContiguousCache ../../include/QtCore/QCryptographicHash ../../include/QtCore/QDate ../../include/QtCore/QTime ../../include/QtCore/QDateTime ../../include/QtCore/QEasingCurve ../../include/QtCore/QElapsedTimer ../../include/QtCore/QHashData ../../include/QtCore/QHashDummyValue ../../include/QtCore/QHashDummyNode ../../include/QtCore/QHashNode ../../include/QtCore/QHash ../../include/QtCore/QMultiHash ../../include/QtCore/QHashIterator ../../include/QtCore/QMutableHashIterator ../../include/QtCore/QLine ../../include/QtCore/QLineF ../../include/QtCore/QLinkedListData ../../include/QtCore/QLinkedListNode ../../include/QtCore/QLinkedList ../../include/QtCore/QLinkedListIterator ../../include/QtCore/QMutableLinkedListIterator ../../include/QtCore/QListData ../../include/QtCore/QList ../../include/QtCore/QListIterator ../../include/QtCore/QMutableListIterator ../../include/QtCore/QSystemLocale ../../include/QtCore/QLocale ../../include/QtCore/QBBSystemLocaleData ../../include/QtCore/QMapData ../../include/QtCore/QMapNode ../../include/QtCore/QMapPayloadNode ../../include/QtCore/QMap ../../include/QtCore/QMultiMap ../../include/QtCore/QMapIterator ../../include/QtCore/QMutableMapIterator ../../include/QtCore/QMargins ../../include/QtCore/QPair ../../include/QtCore/QPoint ../../include/QtCore/QPointF ../../include/QtCore/QQueue ../../include/QtCore/QRect ../../include/QtCore/QRectF ../../include/QtCore/QRegExp ../../include/QtCore/QScopedPointerDeleter ../../include/QtCore/QScopedPointerArrayDeleter ../../include/QtCore/QScopedPointerPodDeleter ../../include/QtCore/QScopedPointer ../../include/QtCore/QScopedArrayPointer ../../include/QtCore/QScopedValueRollback ../../include/QtCore/QSet ../../include/QtCore/QSetIterator ../../include/QtCore/QMutableSetIterator ../../include/QtCore/QSharedData ../../include/QtCore/QSharedDataPointer ../../include/QtCore/QExplicitlySharedDataPointer ../../include/QtCore/QSharedPointer ../../include/QtCore/QWeakPointer ../../include/QtCore/QSize ../../include/QtCore/QSizeF ../../include/QtCore/QStack ../../include/QtCore/QStdWString ../../include/QtCore/QString ../../include/QtCore/QLatin1String ../../include/QtCore/QCharRef ../../include/QtCore/QConstString ../../include/QtCore/QStringRef ../../include/QtCore/QLatin1Literal ../../include/QtCore/QAbstractConcatenable ../../include/QtCore/QConcatenable ../../include/QtCore/QStringBuilder ../../include/QtCore/QStringListIterator ../../include/QtCore/QMutableStringListIterator ../../include/QtCore/QStringList ../../include/QtCore/QStringMatcher ../../include/QtCore/QTextBoundaryFinder ../../include/QtCore/QTimeLine ../../include/QtCore/QVarLengthArray ../../include/QtCore/QVectorData ../../include/QtCore/QVectorTypedData ../../include/QtCore/QVector ../../include/QtCore/QVectorIterator ../../include/QtCore/QMutableVectorIterator + SYNCQT.PRIVATE_HEADER_FILES = ../corelib/statemachine/qabstractstate_p.h ../corelib/statemachine/qabstracttransition_p.h ../corelib/statemachine/qeventtransition_p.h ../corelib/statemachine/qhistorystate_p.h ../corelib/statemachine/qsignaleventgenerator_p.h ../corelib/statemachine/qsignaltransition_p.h ../corelib/statemachine/qstate_p.h ../corelib/statemachine/qstatemachine_p.h ../corelib/thread/qmutex_p.h ../corelib/thread/qmutexpool_p.h ../corelib/thread/qorderedmutexlocker_p.h ../corelib/thread/qreadwritelock_p.h ../corelib/thread/qthread_p.h ../corelib/xml/qxmlstream_p.h ../corelib/xml/qxmlutils_p.h ../corelib/concurrent/qfutureinterface_p.h ../corelib/concurrent/qfuturewatcher_p.h ../corelib/concurrent/qthreadpool_p.h ../corelib/kernel/qabstracteventdispatcher_p.h ../corelib/kernel/qabstractitemmodel_p.h ../corelib/kernel/qcore_mac_p.h ../corelib/kernel/qcore_symbian_p.h ../corelib/kernel/qcore_unix_p.h ../corelib/kernel/qcoreapplication_p.h ../corelib/kernel/qcorecmdlineargs_p.h ../corelib/kernel/qcoreglobaldata_p.h ../corelib/kernel/qcrashhandler_p.h ../corelib/kernel/qeventdispatcher_blackberry_p.h ../corelib/kernel/qeventdispatcher_glib_p.h ../corelib/kernel/qeventdispatcher_symbian_p.h ../corelib/kernel/qeventdispatcher_unix_p.h ../corelib/kernel/qeventdispatcher_win_p.h ../corelib/kernel/qfunctions_p.h ../corelib/kernel/qmetaobject_p.h ../corelib/kernel/qobject_p.h ../corelib/kernel/qsharedmemory_p.h ../corelib/kernel/qsystemerror_p.h ../corelib/kernel/qsystemsemaphore_p.h ../corelib/kernel/qtranslator_p.h ../corelib/kernel/qvariant_p.h ../corelib/kernel/qwineventnotifier_p.h ../corelib/plugin/qelfparser_p.h ../corelib/plugin/qfactoryloader_p.h ../corelib/plugin/qlibrary_p.h ../corelib/plugin/qsystemlibrary_p.h ../corelib/global/qnumeric_p.h ../corelib/global/qt_pch.h ../corelib/codecs/qfontlaocodec_p.h ../corelib/codecs/qiconvcodec_p.h ../corelib/codecs/qisciicodec_p.h ../corelib/codecs/qlatincodec_p.h ../corelib/codecs/qsimplecodec_p.h ../corelib/codecs/qtextcodec_p.h ../corelib/codecs/qtsciicodec_p.h ../corelib/codecs/qutfcodec_p.h ../corelib/io/qabstractfileengine_p.h ../corelib/io/qdatastream_p.h ../corelib/io/qdataurl_p.h ../corelib/io/qdir_p.h ../corelib/io/qfile_p.h ../corelib/io/qfileinfo_p.h ../corelib/io/qfilesystemengine_p.h ../corelib/io/qfilesystementry_p.h ../corelib/io/qfilesystemiterator_p.h ../corelib/io/qfilesystemmetadata_p.h ../corelib/io/qfilesystemwatcher_dnotify_p.h ../corelib/io/qfilesystemwatcher_fsevents_p.h ../corelib/io/qfilesystemwatcher_inotify_p.h ../corelib/io/qfilesystemwatcher_kqueue_p.h ../corelib/io/qfilesystemwatcher_p.h ../corelib/io/qfilesystemwatcher_symbian_p.h ../corelib/io/qfilesystemwatcher_win_p.h ../corelib/io/qfsfileengine_iterator_p.h ../corelib/io/qfsfileengine_p.h ../corelib/io/qiodevice_p.h ../corelib/io/qnoncontiguousbytedevice_p.h ../corelib/io/qprocess_p.h ../corelib/io/qresource_iterator_p.h ../corelib/io/qresource_p.h ../corelib/io/qsettings_p.h ../corelib/io/qtldurl_p.h ../corelib/io/qurltlds_p.h ../corelib/io/qwindowspipewriter_p.h ../corelib/animation/qabstractanimation_p.h ../corelib/animation/qanimationgroup_p.h ../corelib/animation/qparallelanimationgroup_p.h ../corelib/animation/qpropertyanimation_p.h ../corelib/animation/qsequentialanimationgroup_p.h ../corelib/animation/qvariantanimation_p.h ../corelib/tools/qbytedata_p.h ../corelib/tools/qdatetime_p.h ../corelib/tools/qharfbuzz_p.h ../corelib/tools/qlocale_data_p.h ../corelib/tools/qlocale_p.h ../corelib/tools/qlocale_tools_p.h ../corelib/tools/qpodlist_p.h ../corelib/tools/qringbuffer_p.h ../corelib/tools/qscopedpointer_p.h ../corelib/tools/qsimd_p.h ../corelib/tools/qtools_p.h ../corelib/tools/qunicodetables_p.h
meta/recipes-qt/qt4/qt4-native.inc +4 -0
@@ -18,6 +18,10 @@ SRC_URI = "http://download.qt-project.org/official_releases/qt/4.8/${PV}/qt-ever file://0002-qkbdtty_qws-fix-build-with-old-kernel-headers.patch \ file://0003-webkit2-set-OUTPUT_DIR-value-if-empty.patch \ file://0021-configure-make-qt4-native-work-with-long-building-pa.patch \ + file://0029-aarch64_arm64_fix_arch_detection.patch \ + file://0030-aarch64_arm64_qatomic_support.patch \ + file://0031-aarch64_arm64_mkspecs.patch \ + file://0032-aarch64_add_header.patch \ file://g++.conf \ file://linux.conf \ "
meta/recipes-qt/qt4/qt4_arch.inc +1 -0
@@ -4,6 +4,7 @@ ARM_INSTRUCTION_SET = "arm" set_arch() { case ${TARGET_ARCH} in + aarch64) QT_ARCH=aarch64 ;; arm*) QT_ARCH=arm ;; i*86*) QT_ARCH=i386 ;; mips*) QT_ARCH=mips ;;
Signature · 1 line
1.9.1
PATCH 8/19 libpng 1.6.13: fix build for aarch64
In reply to Kai KangFrom: Koen Kooi <[email protected]>
The configure override was too restrictive, it needed both 'arm' and 'neon' to trigger, which breaks on aarch64. Since TUNE_FEATURES is the only qualifier that matters, drop the 'arm' override.
Buildtested for 'genericarmv8' and 'qemux86' machines.
--- meta/recipes-multimedia/libpng/libpng_1.6.13.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-multimedia/libpng/libpng_1.6.13.bb +1 -1
@@ -19,7 +19,7 @@ BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config" inherit autotools binconfig-disabled pkgconfig # Work around missing symbols -EXTRA_OECONF_append_arm = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off" ,d)}" +EXTRA_OECONF_append = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off" ,d)}" PACKAGES =+ "${PN}-tools"
Signature · 1 line
1.9.1
PATCH 9/19 sysprof: disable build for aarch64
In reply to Kai KangFrom: Joe Slater <[email protected]>
Add COMPATIBLE_HOST to the recipe and prohibit
building for aarch64 and aarch64_be.
--- meta/recipes-kernel/sysprof/sysprof_git.bb | 5 +++++ 1 file changed, 5 insertions(+)
meta/recipes-kernel/sysprof/sysprof_git.bb +5 -0
@@ -18,3 +18,8 @@ SRC_URI_append_mips64 = " file://rmb-mips.patch" S = "${WORKDIR}/git" inherit autotools pkgconfig + +# We do not yet work for aarch64. +# +COMPATIBLE_HOST = "^(?!aarch64).*" +
Signature · 1 line
1.9.1
PATCH 10/19 lttng: recognize aarch64
In reply to Kai KangFrom: Joe Slater <[email protected]>
Add aarch64 architecture to liburcu and lttng-ust. Internally it is treated the same as "arm".
--- meta/recipes-kernel/lttng/lttng-ust/add-aarch64.patch | 19 +++++++++++++++++++ meta/recipes-kernel/lttng/lttng-ust_2.5.0.bb | 1 + meta/recipes-support/liburcu/files/aarch64.patch | 19 +++++++++++++++++++ meta/recipes-support/liburcu/liburcu_0.8.5.bb | 1 + 4 files changed, 40 insertions(+) create mode 100644 meta/recipes-kernel/lttng/lttng-ust/add-aarch64.patch create mode 100644 meta/recipes-support/liburcu/files/aarch64.patch
meta/recipes-kernel/lttng/lttng-ust/add-aarch64.patch new file +19 -0
@@ -0,0 +1,19 @@ +lttng-ust: add aarch64 recognition + +Treat the same as "arm". + +Upstream-Status: Pending + +Signed-off-by: [email protected] + + +--- a/configure.ac ++++ b/configure.ac +@@ -230,6 +230,7 @@ changequote([,])dnl + s390) NO_UNALIGNED_ACCESS=1 ;; + s390x) NO_UNALIGNED_ACCESS=1 ;; + arm*) NO_UNALIGNED_ACCESS=1 ;; ++ aarch64) NO_UNALIGNED_ACCESS=1 ;; + mips*) NO_UNALIGNED_ACCESS=1 ;; + tile*) NO_UNALIGNED_ACCESS=1 ;; + *) AC_MSG_ERROR([unable to detect alignment requirements (unsupported architecture ($host_cpu)?)]) ;;
meta/recipes-kernel/lttng/lttng-ust_2.5.0.bb +1 -0
@@ -24,6 +24,7 @@ PE = "2" SRC_URI = "git://git.lttng.org/lttng-ust.git;branch=stable-2.5 \ file://lttng-ust-doc-examples-disable.patch \ + file://add-aarch64.patch \ " S = "${WORKDIR}/git"
meta/recipes-support/liburcu/files/aarch64.patch new file +19 -0
@@ -0,0 +1,19 @@ +libucru: recognize aarch64 + +Make the same as "arm" internally. + +Upstream-Status: Pending + +Signed-off-by: [email protected] + + +--- a/configure.ac ++++ b/configure.ac +@@ -77,6 +77,7 @@ AS_CASE([$host_cpu], + [alpha*], [ARCHTYPE="alpha"], + [ia64], [ARCHTYPE="gcc"], + [arm*], [ARCHTYPE="arm"], ++ [aarch64], [ARCHTYPE="arm"], + [mips*], [ARCHTYPE="mips"], + [tile*], [ARCHTYPE="gcc"], + [ARCHTYPE="unknown"]
meta/recipes-support/liburcu/liburcu_0.8.5.bb +1 -0
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=0f060c30a27922ce9c0d557a639b4fa3 \ SRC_URI = "http://lttng.org/files/urcu/userspace-rcu-${PV}.tar.bz2 \ file://Revert-Blacklist-ARM-gcc-4.8.0-4.8.1-4.8.2.patch \ + file://aarch64.patch \ " SRC_URI[md5sum] = "24ba9e03542b747d3378434eb0041acf"
Signature · 1 line
1.9.1
PATCH 11/19 guile: allow compilation for aarch64
In reply to Kai KangFrom: Joe Slater <[email protected]>
Add aarch64 endianness specification to scm file.
--- meta/recipes-devtools/guile/files/arm_aarch64.patch | 19 +++++++++++++++++++ meta/recipes-devtools/guile/guile_2.0.11.bb | 1 + 2 files changed, 20 insertions(+) create mode 100644 meta/recipes-devtools/guile/files/arm_aarch64.patch
meta/recipes-devtools/guile/files/arm_aarch64.patch new file +19 -0
@@ -0,0 +1,19 @@ +guile: add aarch64 recognition + +Assume little-endian. + +Upstream-Status: Pending + +Signed-off-by: [email protected] + +--- a/module/system/base/target.scm ++++ b/module/system/base/target.scm +@@ -70,6 +70,8 @@ + ((member cpu '("sparc" "sparc64" "powerpc" "powerpc64" "spu" + "mips" "mips64")) + (endianness big)) ++ ((string-match "^aarch64" cpu) ++ (endianness little)) + ((string-match "^arm.*eb" cpu) + (endianness big)) + ((string-match "^arm.*" cpu)
meta/recipes-devtools/guile/guile_2.0.11.bb +1 -0
@@ -19,6 +19,7 @@ SRC_URI = "${GNU_MIRROR}/guile/guile-${PV}.tar.xz \ file://opensuse/guile-64bit.patch \ file://guile_2.0.6_fix_sed_error.patch \ file://arm_endianness.patch \ + file://arm_aarch64.patch \ file://workaround-ice-ssa-corruption.patch \ "
Signature · 1 line
1.9.1
PATCH 12/19 libunwind: add aarch64 support
In reply to Kai KangFrom: Fathi Boudra <[email protected]>
* pass --enable-debug-frame on aarch64 architecture
* include patches:
- aarch64 port (backported from upstream)
- Support-building-with-older-compilers (fix undefined reference to `unreachable' on older compilers)
--- .../libunwind/libunwind-1.1/AArch64-port.patch | 2529 ++++++++++++++++++++ .../Support-building-with-older-compilers.patch | 72 + meta/recipes-support/libunwind/libunwind.inc | 1 + meta/recipes-support/libunwind/libunwind_1.1.bb | 5 + 4 files changed, 2607 insertions(+) create mode 100644 meta/recipes-support/libunwind/libunwind-1.1/AArch64-port.patch create mode 100644 meta/recipes-support/libunwind/libunwind-1.1/Support-building-with-older-compilers.patch
meta/recipes-support/libunwind/libunwind-1.1/AArch64-port.patch new file +2529 -0
@@ -0,0 +1,2529 @@ +From ac6c0a6535975f1dc2da6e4e2766614baac2a14a Mon Sep 17 00:00:00 2001 +From: Yvan Roux <[email protected]> +Date: Sat, 11 May 2013 09:18:23 -0600 +Subject: [PATCH] AArch64 port. + +Upstream-Status: Backport + +--- + Makefile.am | 6 + README | 1 + configure.ac | 6 + include/libunwind-aarch64.h | 187 ++++++++++++++++++++++ + include/libunwind.h.in | 4 + include/tdep-aarch64/dwarf-config.h | 52 ++++++ + include/tdep-aarch64/jmpbuf.h | 33 +++ + include/tdep-aarch64/libunwind_i.h | 294 +++++++++++++++++++++++++++++++++++ + include/tdep/dwarf-config.h | 4 + include/tdep/jmpbuf.h | 2 + include/tdep/libunwind_i.h.in | 4 + src/Makefile.am | 39 ++++ + src/aarch64/Gcreate_addr_space.c | 60 +++++++ + src/aarch64/Gget_proc_info.c | 39 ++++ + src/aarch64/Gget_save_loc.c | 100 +++++++++++ + src/aarch64/Gglobal.c | 57 ++++++ + src/aarch64/Ginit.c | 187 ++++++++++++++++++++++ + src/aarch64/Ginit_local.c | 55 ++++++ + src/aarch64/Ginit_remote.c | 45 +++++ + src/aarch64/Gis_signal_frame.c | 64 +++++++ + src/aarch64/Gregs.c | 113 +++++++++++++ + src/aarch64/Gresume.c | 177 +++++++++++++++++++++ + src/aarch64/Gstep.c | 129 +++++++++++++++ + src/aarch64/Lcreate_addr_space.c | 5 + src/aarch64/Lget_proc_info.c | 5 + src/aarch64/Lget_save_loc.c | 5 + src/aarch64/Lglobal.c | 5 + src/aarch64/Linit.c | 5 + src/aarch64/Linit_local.c | 5 + src/aarch64/Linit_remote.c | 5 + src/aarch64/Lis_signal_frame.c | 5 + src/aarch64/Lregs.c | 5 + src/aarch64/Lresume.c | 5 + src/aarch64/Lstep.c | 5 + src/aarch64/gen-offsets.c | 68 ++++++++ + src/aarch64/init.h | 127 +++++++++++++++ + src/aarch64/is_fpreg.c | 32 +++ + src/aarch64/offsets.h | 49 +++++ + src/aarch64/regname.c | 106 ++++++++++++ + src/aarch64/siglongjmp.S | 12 + + src/aarch64/unwind_i.h | 43 +++++ + src/coredump/_UCD_access_reg_linux.c | 5 + src/ptrace/_UPT_reg_offset.c | 36 ++++ + 43 files changed, 2184 insertions(+), 7 deletions(-) + create mode 100644 include/libunwind-aarch64.h + create mode 100644 include/tdep-aarch64/dwarf-config.h + create mode 100644 include/tdep-aarch64/jmpbuf.h + create mode 100644 include/tdep-aarch64/libunwind_i.h + create mode 100644 src/aarch64/Gcreate_addr_space.c + create mode 100644 src/aarch64/Gget_proc_info.c + create mode 100644 src/aarch64/Gget_save_loc.c + create mode 100644 src/aarch64/Gglobal.c + create mode 100644 src/aarch64/Ginit.c + create mode 100644 src/aarch64/Ginit_local.c + create mode 100644 src/aarch64/Ginit_remote.c + create mode 100644 src/aarch64/Gis_signal_frame.c + create mode 100644 src/aarch64/Gregs.c + create mode 100644 src/aarch64/Gresume.c + create mode 100644 src/aarch64/Gstep.c + create mode 100644 src/aarch64/Lcreate_addr_space.c + create mode 100644 src/aarch64/Lget_proc_info.c + create mode 100644 src/aarch64/Lget_save_loc.c + create mode 100644 src/aarch64/Lglobal.c + create mode 100644 src/aarch64/Linit.c + create mode 100644 src/aarch64/Linit_local.c + create mode 100644 src/aarch64/Linit_remote.c + create mode 100644 src/aarch64/Lis_signal_frame.c + create mode 100644 src/aarch64/Lregs.c + create mode 100644 src/aarch64/Lresume.c + create mode 100644 src/aarch64/Lstep.c + create mode 100644 src/aarch64/gen-offsets.c + create mode 100644 src/aarch64/init.h + create mode 100644 src/aarch64/is_fpreg.c + create mode 100644 src/aarch64/offsets.h + create mode 100644 src/aarch64/regname.c + create mode 100644 src/aarch64/siglongjmp.S + create mode 100644 src/aarch64/unwind_i.h + +--- a/Makefile.am ++++ b/Makefile.am +@@ -2,6 +2,9 @@ include_HEADERS = include/libunwind-dyna + include/libunwind-ptrace.h \ + include/libunwind-coredump.h + ++if ARCH_AARCH64 ++include_HEADERS += include/libunwind-aarch64.h ++endif + if ARCH_ARM + include_HEADERS += include/libunwind-arm.h + endif +@@ -41,6 +44,9 @@ SUBDIRS = src tests doc + noinst_HEADERS = include/dwarf.h include/dwarf_i.h include/dwarf-eh.h \ + include/compiler.h include/libunwind_i.h include/mempool.h \ + include/remote.h \ ++ include/tdep-aarch64/dwarf-config.h \ ++ include/tdep-aarch64/jmpbuf.h \ ++ include/tdep-aarch64/libunwind_i.h \ + include/tdep-arm/dwarf-config.h include/tdep-arm/ex_tables.h \ + include/tdep-arm/jmpbuf.h include/tdep-arm/libunwind_i.h \ + include/tdep-ia64/jmpbuf.h include/tdep-ia64/rse.h \ +--- a/README ++++ b/README +@@ -9,6 +9,7 @@ several architecture/operating-system co + Linux/IA-64: Fully tested and supported. + Linux/PARISC: Works well, but C library missing unwind-info. + HP-UX/IA-64: Mostly works but known to have some serious limitations. ++ Linux/AArch64: Newly added. + Linux/PPC64: Newly added. + Linux/SuperH: Newly added. + FreeBSD/i386: Newly added. +--- a/configure.ac ++++ b/configure.ac +@@ -104,7 +104,7 @@ SET_ARCH([$target_cpu],[target_arch]) + + AC_ARG_ENABLE(coredump, + AS_HELP_STRING([--enable-coredump],[building libunwind-coredump library]),, +- [AS_CASE([$host_arch], [arm*|mips*|sh*|x86*], [enable_coredump=yes], [enable_coredump=no])] ++ [AS_CASE([$host_arch], [aarch64*|arm*|mips*|sh*|x86*], [enable_coredump=yes], [enable_coredump=no])] + ) + + AC_MSG_CHECKING([if we should build libunwind-coredump]) +@@ -121,6 +121,7 @@ AC_MSG_RESULT([$target_os]) + + AM_CONDITIONAL(BUILD_COREDUMP, test x$enable_coredump = xyes) + AM_CONDITIONAL(REMOTE_ONLY, test x$target_arch != x$host_arch) ++AM_CONDITIONAL(ARCH_AARCH64, test x$target_arch = xaarch64) + AM_CONDITIONAL(ARCH_ARM, test x$target_arch = xarm) + AM_CONDITIONAL(ARCH_IA64, test x$target_arch = xia64) + AM_CONDITIONAL(ARCH_HPPA, test x$target_arch = xhppa) +@@ -137,7 +138,7 @@ AM_CONDITIONAL(OS_FREEBSD, expr x$target + AC_MSG_CHECKING([for ELF helper width]) + case "${target_arch}" in + (arm|hppa|ppc32|x86|sh) use_elf32=yes; AC_MSG_RESULT([32]);; +-(ia64|ppc64|x86_64) use_elf64=yes; AC_MSG_RESULT([64]);; ++(aarch64|ia64|ppc64|x86_64) use_elf64=yes; AC_MSG_RESULT([64]);; + (mips) use_elfxx=yes; AC_MSG_RESULT([xx]);; + *) AC_MSG_ERROR([Unknown ELF target: ${target_arch}]) + esac +@@ -186,6 +187,7 @@ AS_HELP_STRING([--enable-cxx-exceptions] + # C++ exception handling doesn't work too well on x86 + case $target_arch in + x86*) enable_cxx_exceptions=no;; ++ aarch64*) enable_cxx_exceptions=no;; + arm*) enable_cxx_exceptions=no;; + mips*) enable_cxx_exceptions=no;; + *) enable_cxx_exceptions=yes;; +--- /dev/null ++++ b/include/libunwind-aarch64.h +@@ -0,0 +1,187 @@ ++/* libunwind - a platform-independent unwind library ++ Copyright (C) 2001-2004 Hewlett-Packard Co ++ Contributed by David Mosberger-Tang <[email protected]> ++ Copyright (C) 2013 Linaro Limited ++ ++This file is part of libunwind. ++ ++Permission is hereby granted, free of charge, to any person obtaining ++a copy of this software and associated documentation files (the ++"Software"), to deal in the Software without restriction, including ++without limitation the rights to use, copy, modify, merge, publish, ++distribute, sublicense, and/or sell copies of the Software, and to ++permit persons to whom the Software is furnished to do so, subject to ++the following conditions: ++ ++The above copyright notice and this permission notice shall be ++included in all copies or substantial portions of the Software. ++ ++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE ++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION ++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION ++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ ++ ++#ifndef LIBUNWIND_H ++#define LIBUNWIND_H ++ ++#if defined(__cplusplus) || defined(c_plusplus) ++extern "C" { ++#endif ++ ++#include <inttypes.h> ++#include <stddef.h> ++#include <ucontext.h> ++ ++#define UNW_TARGET aarch64 ++#define UNW_TARGET_AARCH64 1 ++ ++#define _U_TDEP_QP_TRUE 0 /* see libunwind-dynamic.h */ ++ ++/* This needs to be big enough to accommodate "struct cursor", while ++ leaving some slack for future expansion. Changing this value will ++ require recompiling all users of this library. Stack allocation is ++ relatively cheap and unwind-state copying is relatively rare, so we ++ want to err on making it rather too big than too small. */ ++ ++#define UNW_TDEP_CURSOR_LEN 4096 ++ ++typedef uint64_t unw_word_t; ++typedef int64_t unw_sword_t; ++ ++typedef long double unw_tdep_fpreg_t; ++ ++typedef struct ++ { ++ /* no aarch64-specific auxiliary proc-info */ ++ } ++unw_tdep_proc_info_t; ++ ++typedef enum ++ { ++ /* 64-bit general registers. */ ++ UNW_AARCH64_X0, ++ UNW_AARCH64_X1, ++ UNW_AARCH64_X2, ++ UNW_AARCH64_X3, ++ UNW_AARCH64_X4, ++ UNW_AARCH64_X5, ++ UNW_AARCH64_X6, ++ UNW_AARCH64_X7, ++ UNW_AARCH64_X8, ++ ++ /* Temporary registers. */ ++ UNW_AARCH64_X9, ++ UNW_AARCH64_X10, ++ UNW_AARCH64_X11, ++ UNW_AARCH64_X12, ++ UNW_AARCH64_X13, ++ UNW_AARCH64_X14, ++ UNW_AARCH64_X15, ++ ++ /* Intra-procedure-call temporary registers. */ ++ UNW_AARCH64_X16, ++ UNW_AARCH64_X17, ++ ++ /* Callee-saved registers. */ ++ UNW_AARCH64_X18, ++ UNW_AARCH64_X19, ++ UNW_AARCH64_X20, ++ UNW_AARCH64_X21, ++ UNW_AARCH64_X22, ++ UNW_AARCH64_X23, ++ UNW_AARCH64_X24, ++ UNW_AARCH64_X25, ++ UNW_AARCH64_X26, ++ UNW_AARCH64_X27, ++ UNW_AARCH64_X28, ++ ++ /* 64-bit frame pointer. */ ++ UNW_AARCH64_X29, ++ ++ /* 64-bit link register. */ ++ UNW_AARCH64_X30, ++ ++ /* 64-bit stack pointer. */ ++ UNW_AARCH64_SP = 31, ++ UNW_AARCH64_PC, ++ UNW_AARCH64_PSTATE, ++ ++ /* 128-bit FP/Advanced SIMD registers. */ ++ UNW_AARCH64_V0 = 64, ++ UNW_AARCH64_V1, ++ UNW_AARCH64_V2, ++ UNW_AARCH64_V3, ++ UNW_AARCH64_V4, ++ UNW_AARCH64_V5, ++ UNW_AARCH64_V6, ++ UNW_AARCH64_V7, ++ UNW_AARCH64_V8, ++ UNW_AARCH64_V9, ++ UNW_AARCH64_V10, ++ UNW_AARCH64_V11, ++ UNW_AARCH64_V12, ++ UNW_AARCH64_V13, ++ UNW_AARCH64_V14, ++ UNW_AARCH64_V15, ++ UNW_AARCH64_V16, ++ UNW_AARCH64_V17, ++ UNW_AARCH64_V18, ++ UNW_AARCH64_V19, ++ UNW_AARCH64_V20, ++ UNW_AARCH64_V21, ++ UNW_AARCH64_V22, ++ UNW_AARCH64_V23, ++ UNW_AARCH64_V24, ++ UNW_AARCH64_V25, ++ UNW_AARCH64_V26, ++ UNW_AARCH64_V27, ++ UNW_AARCH64_V28, ++ UNW_AARCH64_V29, ++ UNW_AARCH64_V30, ++ UNW_AARCH64_V31, ++ ++ UNW_AARCH64_FPSR, ++ UNW_AARCH64_FPCR, ++ ++ /* For AArch64, the CFA is the value of SP (x31) at the call site of the ++ previous frame. */ ++ UNW_AARCH64_CFA = UNW_AARCH64_SP, ++ ++ UNW_TDEP_LAST_REG = UNW_AARCH64_FPCR, ++ ++ UNW_TDEP_IP = UNW_AARCH64_X30, ++ UNW_TDEP_SP = UNW_AARCH64_SP, ++ UNW_TDEP_EH = UNW_AARCH64_X0, ++ ++ } ++aarch64_regnum_t; ++ ++/* Use R0 through R3 to pass exception handling information. */ ++#define UNW_TDEP_NUM_EH_REGS 4 ++ ++typedef struct unw_tdep_save_loc ++ { ++ /* Additional target-dependent info on a save location. */ ++ } ++unw_tdep_save_loc_t; ++ ++ ++/* On AArch64, we can directly use ucontext_t as the unwind context. */ ++typedef ucontext_t unw_tdep_context_t; ++ ++#include "libunwind-common.h" ++#include "libunwind-dynamic.h" ++ ++#define unw_tdep_getcontext(uc) (getcontext (uc), 0) ++#define unw_tdep_is_fpreg UNW_ARCH_OBJ(is_fpreg) ++ ++extern int unw_tdep_is_fpreg (int); ++ ++#if defined(__cplusplus) || defined(c_plusplus) ++} ++#endif ++ ++#endif /* LIBUNWIND_H */ +--- a/include/libunwind.h.in ++++ b/include/libunwind.h.in +@@ -3,7 +3,9 @@ + + #ifndef UNW_REMOTE_ONLY + +-#if defined __arm__ ++#if defined __aarch64__ ++#include "libunwind-aarch64.h" ++#elif defined __arm__ + # include "libunwind-arm.h" + #elif defined __hppa__ + # include "libunwind-hppa.h" +--- /dev/null ++++ b/include/tdep-aarch64/dwarf-config.h +@@ -0,0 +1,52 @@ ++/* libunwind - a platform-independent unwind library ++ Copyright (C) 2008 CodeSourcery ++ Copyright (C) 2012 Tommi Rantala <[email protected]> ++ Copyright (C) 2013 Linaro Limited ++ ++This file is part of libunwind. ++ ++Permission is hereby granted, free of charge, to any person obtaining ++a copy of this software and associated documentation files (the ++"Software"), to deal in the Software without restriction, including ++without limitation the rights to use, copy, modify, merge, publish, ++distribute, sublicense, and/or sell copies of the Software, and to ++permit persons to whom the Software is furnished to do so, subject to ++the following conditions: ++ ++The above copyright notice and this permission notice shall be ++included in all copies or substantial portions of the Software. ++ ++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE ++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION ++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION ++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ ++ ++#ifndef dwarf_config_h ++#define dwarf_config_h ++ ++/* This matches the value udes by GCC (see ++ gcc/config/aarch64/aarch64.h:DWARF_FRAME_REGISTERS. */ ++#define DWARF_NUM_PRESERVED_REGS 97 ++ ++/* Return TRUE if the ADDR_SPACE uses big-endian byte-order. */ ++#define dwarf_is_big_endian(addr_space) 0 ++ ++#define dwarf_to_unw_regnum(reg) (((reg) <= UNW_AARCH64_V31) ? (reg) : 0) ++ ++/* Convert a pointer to a dwarf_cursor structure to a pointer to ++ unw_cursor_t. */ ++#define dwarf_to_cursor(c) ((unw_cursor_t *) (c)) ++ ++typedef struct dwarf_loc ++ { ++ unw_word_t val; ++#ifndef UNW_LOCAL_ONLY ++ unw_word_t type; /* see DWARF_LOC_TYPE_* macros. */ ++#endif ++ } ++dwarf_loc_t; ++ ++#endif /* dwarf_config_h */ +--- /dev/null ++++ b/include/tdep-aarch64/jmpbuf.h +@@ -0,0 +1,33 @@ ++/* libunwind - a platform-independent unwind library ++ Copyright (C) 2008 CodeSourcery ++ Copyright (C) 2013 Linaro Limited ++ ++This file is part of libunwind. ++ ++Permission is hereby granted, free of charge, to any person obtaining ++a copy of this software and associated documentation files (the ++"Software"), to deal in the Software without restriction, including ++without limitation the rights to use, copy, modify, merge, publish, ++distribute, sublicense, and/or sell copies of the Software, and to ++permit persons to whom the Software is furnished to do so, subject to ++the following conditions: ++ ++The above copyright notice and this permission notice shall be ++included in all copies or substantial portions of the Software. ++ ++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE ++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION ++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION ++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ ++ ++/* Use glibc's jump-buffer indices; NPTL peeks at SP: */ ++ ++/* FIXME for AArch64 */ ++ ++#define JB_SP 13 ++#define JB_RP 14 ++#define JB_MASK_SAVED 15 ++#define JB_MASK 16 +--- /dev/null ++++ b/include/tdep-aarch64/libunwind_i.h +@@ -0,0 +1,294 @@ ++/* libunwind - a platform-independent unwind library ++ Copyright (C) 2001-2005 Hewlett-Packard Co ++ Contributed by David Mosberger-Tang <[email protected]> ++ Copyright (C) 2013 Linaro Limited ++ ++This file is part of libunwind. ++ ++Permission is hereby granted, free of charge, to any person obtaining ++a copy of this software and associated documentation files (the ++"Software"), to deal in the Software without restriction, including ++without limitation the rights to use, copy, modify, merge, publish, ++distribute, sublicense, and/or sell copies of the Software, and to ++permit persons to whom the Software is furnished to do so, subject to ++the following conditions: ++ ++The above copyright notice and this permission notice shall be ++included in all copies or substantial portions of the Software. ++ ++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE ++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION ++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION ++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ ++ ++#ifndef AARCH64_LIBUNWIND_I_H ++#define AARCH64_LIBUNWIND_I_H ++ ++/* Target-dependent definitions that are internal to libunwind but need ++ to be shared with target-independent code. */ ++ ++#include <stdlib.h> ++#include <libunwind.h> ++ ++#include "elf64.h" ++#include "mempool.h" ++#include "dwarf.h" ++ ++typedef struct ++ { ++ /* no aarch64-specific fast trace */ ++ } ++unw_tdep_frame_t; ++ ++#ifdef UNW_LOCAL_ONLY ++ ++typedef unw_word_t aarch64_loc_t; ++ ++#else /* !UNW_LOCAL_ONLY */ ++ ++typedef struct aarch64_loc ++ { ++ unw_word_t w0, w1; ++ } ++aarch64_loc_t; ++ ++#endif /* !UNW_LOCAL_ONLY */ ++ ++struct unw_addr_space ++ { ++ struct unw_accessors acc; ++ int big_endian; ++ unw_caching_policy_t caching_policy; ++#ifdef HAVE_ATOMIC_OPS_H ++ AO_t cache_generation; ++#else ++ uint32_t cache_generation; ++#endif ++ unw_word_t dyn_generation; /* see dyn-common.h */ ++ unw_word_t dyn_info_list_addr; /* (cached) dyn_info_list_addr */ ++ struct dwarf_rs_cache global_cache; ++ struct unw_debug_frame_list *debug_frames; ++ }; ++ ++struct cursor ++ { ++ struct dwarf_cursor dwarf; /* must be first */ ++ enum ++ { ++ AARCH64_SCF_NONE, ++ AARCH64_SCF_LINUX_RT_SIGFRAME, ++ } ++ sigcontext_format; ++ unw_word_t sigcontext_addr; ++ unw_word_t sigcontext_sp; ++ unw_word_t sigcontext_pc; ++ }; ++ ++#define DWARF_GET_LOC(l) ((l).val) ++ ++#ifdef UNW_LOCAL_ONLY ++# define DWARF_NULL_LOC DWARF_LOC (0, 0) ++# define DWARF_IS_NULL_LOC(l) (DWARF_GET_LOC (l) == 0) ++# define DWARF_LOC(r, t) ((dwarf_loc_t) { .val = (r) }) ++# define DWARF_IS_REG_LOC(l) 0 ++# define DWARF_REG_LOC(c,r) (DWARF_LOC((unw_word_t) \ ++ tdep_uc_addr((c)->as_arg, (r)), 0)) ++# define DWARF_MEM_LOC(c,m) DWARF_LOC ((m), 0) ++# define DWARF_FPREG_LOC(c,r) (DWARF_LOC((unw_word_t) \ ++ tdep_uc_addr((c)->as_arg, (r)), 0)) ++ ++static inline int ++dwarf_getfp (struct dwarf_cursor *c, dwarf_loc_t loc, unw_fpreg_t *val) ++{ ++ if (!DWARF_GET_LOC (loc)) ++ return -1; ++ *val = *(unw_fpreg_t *) DWARF_GET_LOC (loc); ++ return 0; ++} ++ ++static inline int ++dwarf_putfp (struct dwarf_cursor *c, dwarf_loc_t loc, unw_fpreg_t val) ++{ ++ if (!DWARF_GET_LOC (loc)) ++ return -1; ++ *(unw_fpreg_t *) DWARF_GET_LOC (loc) = val; ++ return 0; ++} ++ ++static inline int ++dwarf_get (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t *val) ++{ ++ if (!DWARF_GET_LOC (loc)) ++ return -1; ++ *val = *(unw_word_t *) DWARF_GET_LOC (loc); ++ return 0; ++} ++ ++static inline int ++dwarf_put (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t val) ++{ ++ if (!DWARF_GET_LOC (loc)) ++ return -1; ++ *(unw_word_t *) DWARF_GET_LOC (loc) = val; ++ return 0; ++} ++ ++#else /* !UNW_LOCAL_ONLY */ ++# define DWARF_LOC_TYPE_FP (1 << 0) ++# define DWARF_LOC_TYPE_REG (1 << 1) ++# define DWARF_NULL_LOC DWARF_LOC (0, 0) ++# define DWARF_IS_NULL_LOC(l) \ ++ ({ dwarf_loc_t _l = (l); _l.val == 0 && _l.type == 0; }) ++# define DWARF_LOC(r, t) ((dwarf_loc_t) { .val = (r), .type = (t) }) ++# define DWARF_IS_REG_LOC(l) (((l).type & DWARF_LOC_TYPE_REG) != 0) ++# define DWARF_IS_FP_LOC(l) (((l).type & DWARF_LOC_TYPE_FP) != 0) ++# define DWARF_REG_LOC(c,r) DWARF_LOC((r), DWARF_LOC_TYPE_REG) ++# define DWARF_MEM_LOC(c,m) DWARF_LOC ((m), 0) ++# define DWARF_FPREG_LOC(c,r) DWARF_LOC((r), (DWARF_LOC_TYPE_REG \ ++ | DWARF_LOC_TYPE_FP)) ++ ++static inline int ++dwarf_getfp (struct dwarf_cursor *c, dwarf_loc_t loc, unw_fpreg_t *val) ++{ ++ char *valp = (char *) &val; ++ unw_word_t addr; ++ int ret; ++ ++ if (DWARF_IS_NULL_LOC (loc)) ++ return -UNW_EBADREG; ++ ++ if (DWARF_IS_REG_LOC (loc)) ++ return (*c->as->acc.access_fpreg) (c->as, DWARF_GET_LOC (loc), ++ val, 0, c->as_arg); ++ ++ addr = DWARF_GET_LOC (loc); ++ if ((ret = (*c->as->acc.access_mem) (c->as, addr + 0, (unw_word_t *) valp, ++ 0, c->as_arg)) < 0) ++ return ret; ++ ++ return (*c->as->acc.access_mem) (c->as, addr + 4, (unw_word_t *) valp + 1, 0, ++ c->as_arg); ++} ++ ++static inline int ++dwarf_putfp (struct dwarf_cursor *c, dwarf_loc_t loc, unw_fpreg_t val) ++{ ++ char *valp = (char *) &val; ++ unw_word_t addr; ++ int ret; ++ ++ if (DWARF_IS_NULL_LOC (loc)) ++ return -UNW_EBADREG; ++ ++ if (DWARF_IS_REG_LOC (loc)) ++ return (*c->as->acc.access_fpreg) (c->as, DWARF_GET_LOC (loc), ++ &val, 1, c->as_arg); ++ ++ addr = DWARF_GET_LOC (loc); ++ if ((ret = (*c->as->acc.access_mem) (c->as, addr + 0, (unw_word_t *) valp, ++ 1, c->as_arg)) < 0) ++ return ret; ++ ++ return (*c->as->acc.access_mem) (c->as, addr + 4, (unw_word_t *) valp + 1, ++ 1, c->as_arg); ++} ++ ++static inline int ++dwarf_get (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t *val) ++{ ++ if (DWARF_IS_NULL_LOC (loc)) ++ return -UNW_EBADREG; ++ ++ /* If a code-generator were to save a value of type unw_word_t in a ++ floating-point register, we would have to support this case. I ++ suppose it could happen with MMX registers, but does it really ++ happen? */ ++ assert (!DWARF_IS_FP_LOC (loc)); ++ ++ if (DWARF_IS_REG_LOC (loc)) ++ return (*c->as->acc.access_reg) (c->as, DWARF_GET_LOC (loc), val, ++ 0, c->as_arg); ++ else ++ return (*c->as->acc.access_mem) (c->as, DWARF_GET_LOC (loc), val, ++ 0, c->as_arg); ++} ++ ++static inline int ++dwarf_put (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t val) ++{ ++ if (DWARF_IS_NULL_LOC (loc)) ++ return -UNW_EBADREG; ++ ++ /* If a code-generator were to save a value of type unw_word_t in a ++ floating-point register, we would have to support this case. I ++ suppose it could happen with MMX registers, but does it really ++ happen? */ ++ assert (!DWARF_IS_FP_LOC (loc)); ++ ++ if (DWARF_IS_REG_LOC (loc)) ++ return (*c->as->acc.access_reg) (c->as, DWARF_GET_LOC (loc), &val, ++ 1, c->as_arg); ++ else ++ return (*c->as->acc.access_mem) (c->as, DWARF_GET_LOC (loc), &val, ++ 1, c->as_arg); ++} ++ ++#endif /* !UNW_LOCAL_ONLY */ ++ ++ ++ ++#define tdep_getcontext_trace unw_getcontext ++#define tdep_init_done UNW_OBJ(init_done) ++#define tdep_init UNW_OBJ(init) ++/* Platforms that support UNW_INFO_FORMAT_TABLE need to define ++ tdep_search_unwind_table. */ ++#define tdep_search_unwind_table dwarf_search_unwind_table ++#define tdep_find_unwind_table dwarf_find_unwind_table ++#define tdep_uc_addr UNW_OBJ(uc_addr) ++#define tdep_get_elf_image UNW_ARCH_OBJ(get_elf_image) ++#define tdep_access_reg UNW_OBJ(access_reg) ++#define tdep_access_fpreg UNW_OBJ(access_fpreg) ++#define tdep_fetch_frame(c,ip,n) do {} while(0) ++#define tdep_cache_frame(c,rs) do {} while(0) ++#define tdep_reuse_frame(c,rs) do {} while(0) ++#define tdep_stash_frame(c,rs) do {} while(0) ++#define tdep_trace(cur,addr,n) (-UNW_ENOINFO) ++ ++#ifdef UNW_LOCAL_ONLY ++# define tdep_find_proc_info(c,ip,n) \ ++ dwarf_find_proc_info((c)->as, (ip), &(c)->pi, (n), \ ++ (c)->as_arg) ++# define tdep_put_unwind_info(as,pi,arg) \ ++ dwarf_put_unwind_info((as), (pi), (arg)) ++#else ++# define tdep_find_proc_info(c,ip,n) \ ++ (*(c)->as->acc.find_proc_info)((c)->as, (ip), &(c)->pi, (n), \ ++ (c)->as_arg) ++# define tdep_put_unwind_info(as,pi,arg) \ ++ (*(as)->acc.put_unwind_info)((as), (pi), (arg)) ++#endif ++ ++#define tdep_get_as(c) ((c)->dwarf.as) ++#define tdep_get_as_arg(c) ((c)->dwarf.as_arg) ++#define tdep_get_ip(c) ((c)->dwarf.ip) ++#define tdep_big_endian(as) ((as)->big_endian) ++ ++extern int tdep_init_done; ++ ++extern void tdep_init (void); ++extern int tdep_search_unwind_table (unw_addr_space_t as, unw_word_t ip, ++ unw_dyn_info_t *di, unw_proc_info_t *pi, ++ int need_unwind_info, void *arg); ++extern void *tdep_uc_addr (unw_tdep_context_t *uc, int reg); ++extern int tdep_get_elf_image (struct elf_image *ei, pid_t pid, unw_word_t ip, ++ unsigned long *segbase, unsigned long *mapoff, ++ char *path, size_t pathlen); ++extern int tdep_access_reg (struct cursor *c, unw_regnum_t reg, ++ unw_word_t *valp, int write); ++extern int tdep_access_fpreg (struct cursor *c, unw_regnum_t reg, ++ unw_fpreg_t *valp, int write); ++ ++#endif /* AARCH64_LIBUNWIND_I_H */ +--- a/include/tdep/dwarf-config.h ++++ b/include/tdep/dwarf-config.h +@@ -1,7 +1,9 @@ + /* Provide a real file - not a symlink - as it would cause multiarch conflicts + when multiple different arch releases are installed simultaneously. */ + +-#if defined __arm__ ++#if defined __aarch64__ ++# include "tdep-aarch64/dwarf-config.h" ++#elif defined __arm__ + # include "tdep-arm/dwarf-config.h" + #elif defined __hppa__ + # include "tdep-hppa/dwarf-config.h" +--- a/include/tdep/jmpbuf.h ++++ b/include/tdep/jmpbuf.h +@@ -3,6 +3,8 @@ + + #ifndef UNW_REMOTE_ONLY + ++#if defined __aarch64__ ++# include "tdep-aarch64/jmpbuf.h" + #if defined __arm__ + # include "tdep-arm/jmpbuf.h" + #elif defined __hppa__ +--- a/include/tdep/libunwind_i.h.in ++++ b/include/tdep/libunwind_i.h.in +@@ -3,7 +3,9 @@ + + #ifndef UNW_REMOTE_ONLY + +-#if defined __arm__ ++#if defined __aarch64__ ++# include "tdep-aarch64/libunwind_i.h" ++#elif defined __arm__ + # include "tdep-arm/libunwind_i.h" + #elif defined __hppa__ + # include "tdep-hppa/libunwind_i.h" +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -170,6 +170,28 @@ libunwind_elfxx_la_SOURCES = elfxx.c + noinst_LTLIBRARIES += $(LIBUNWIND_ELF) + libunwind_la_LIBADD += $(LIBUNWIND_ELF) + ++# The list of files that go into libunwind and libunwind-aarch64: ++noinst_HEADERS += aarch64/init.h aarch64/offsets.h aarch64/unwind_i.h ++libunwind_la_SOURCES_aarch64_common = $(libunwind_la_SOURCES_common) \ ++ aarch64/is_fpreg.c aarch64/regname.c ++ ++# The list of files that go into libunwind: ++libunwind_la_SOURCES_aarch64 = $(libunwind_la_SOURCES_aarch64_common) \ ++ $(libunwind_la_SOURCES_local) \ ++ aarch64/Lcreate_addr_space.c aarch64/Lget_proc_info.c \ ++ aarch64/Lget_save_loc.c aarch64/Lglobal.c aarch64/Linit.c \ ++ aarch64/Linit_local.c aarch64/Linit_remote.c \ ++ aarch64/Lis_signal_frame.c aarch64/Lregs.c aarch64/Lresume.c \ ++ aarch64/Lstep.c ++ ++libunwind_aarch64_la_SOURCES_aarch64 = $(libunwind_la_SOURCES_aarch64_common) \ ++ $(libunwind_la_SOURCES_generic) \ ++ aarch64/Gcreate_addr_space.c aarch64/Gget_proc_info.c \ ++ aarch64/Gget_save_loc.c aarch64/Gglobal.c aarch64/Ginit.c \ ++ aarch64/Ginit_local.c aarch64/Ginit_remote.c \ ++ aarch64/Gis_signal_frame.c aarch64/Gregs.c aarch64/Gresume.c \ ++ aarch64/Gstep.c ++ + # The list of files that go into libunwind and libunwind-arm: + noinst_HEADERS += arm/init.h arm/offsets.h arm/unwind_i.h + libunwind_la_SOURCES_arm_common = $(libunwind_la_SOURCES_common) \ +@@ -418,6 +440,18 @@ if OS_FREEBSD + libunwind_coredump_la_SOURCES += coredump/_UCD_access_reg_freebsd.c + endif + ++if ARCH_AARCH64 ++ lib_LTLIBRARIES += libunwind-aarch64.la ++ libunwind_la_SOURCES = $(libunwind_la_SOURCES_aarch64) ++ libunwind_aarch64_la_SOURCES = $(libunwind_aarch64_la_SOURCES_aarch64) ++ libunwind_aarch64_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION) ++ libunwind_aarch64_la_LIBADD = libunwind-dwarf-generic.la ++ libunwind_aarch64_la_LIBADD += libunwind-elf64.la ++if !REMOTE_ONLY ++ libunwind_aarch64_la_LIBADD += libunwind.la -lc ++endif ++ libunwind_setjmp_la_SOURCES += aarch64/siglongjmp.S ++else + if ARCH_ARM + lib_LTLIBRARIES += libunwind-arm.la + libunwind_la_SOURCES = $(libunwind_la_SOURCES_arm) +@@ -545,6 +579,7 @@ endif # ARCH_MIPS + endif # ARCH_HPPA + endif # ARCH_IA64 + endif # ARCH_ARM ++endif # ARCH_AARCH64 + + # libunwind-setjmp depends on libunwind-$(arch). Therefore must be added + # at the end. +@@ -567,7 +602,8 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I + AM_CCASFLAGS = $(AM_CPPFLAGS) + noinst_HEADERS += unwind/unwind-internal.h + +-EXTRA_DIST = $(libunwind_la_SOURCES_arm) \ ++EXTRA_DIST = $(libunwind_la_SOURCES_aarch64) \ ++ $(libunwind_la_SOURCES_arm) \ + $(libunwind_la_SOURCES_hppa) \ + $(libunwind_la_SOURCES_ia64) \ + $(libunwind_la_SOURCES_mips) \ +@@ -579,6 +615,7 @@ EXTRA_DIST = $(libunwind_la_SOURCES_arm) + $(libunwind_la_SOURCES_common) \ + $(libunwind_la_SOURCES_local) \ + $(libunwind_la_SOURCES_generic) \ ++ $(libunwind_aarch64_la_SOURCES_aarch64) \ + $(libunwind_arm_la_SOURCES_arm) \ + $(libunwind_hppa_la_SOURCES_hppa) \ + $(libunwind_ia64_la_SOURCES_ia64) \ +--- /dev/null ++++ b/src/aarch64/Gcreate_addr_space.c +@@ -0,0 +1,60 @@ ++/* libunwind - a platform-independent unwind library ++ Copyright (C) 2012 Tommi Rantala <[email protected]> ++ Copyright (C) 2013 Linaro Limited ++ ++This file is part of libunwind. ++ ++Permission is hereby granted, free of charge, to any person obtaining ++a copy of this software and associated documentation files (the ++"Software"), to deal in the Software without restriction, including ++without limitation the rights to use, copy, modify, merge, publish, ++distribute, sublicense, and/or sell copies of the Software, and to ++permit persons to whom the Software is furnished to do so, subject to ++the following conditions: ++ ++The above copyright notice and this permission notice shall be ++included in all copies or substantial portions of the Software. ++ ++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE ++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION ++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION ++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ ++ ++#include <string.h> ++#include <stdlib.h> ++ ++#include "unwind_i.h" ++ ++PROTECTED unw_addr_space_t ++unw_create_addr_space (unw_accessors_t *a, int byte_order) ++{ ++#ifdef UNW_LOCAL_ONLY ++ return NULL; ++#else ++ unw_addr_space_t as; ++ ++ /* AArch64 supports little-endian and big-endian. */ ++ if (byte_order != 0 && byte_order != __LITTLE_ENDIAN ++ && byte_order != __BIG_ENDIAN) ++ return NULL; ++ ++ as = malloc (sizeof (*as)); ++ if (!as) ++ return NULL; ++ ++ memset (as, 0, sizeof (*as)); ++ ++ as->acc = *a; ++ ++ /* Default to little-endian for AArch64. */ ++ if (byte_order == 0 || byte_order == __LITTLE_ENDIAN) ++ as->big_endian = 0; ++ else ++ as->big_endian = 1; ++ ++ return as; ++#endif ++} +--- /dev/null ++++ b/src/aarch64/Gget_proc_info.c +@@ -0,0 +1,39 @@ ++/* libunwind - a platform-independent unwind library ++ Copyright (C) 2008 CodeSourcery ++ ++This file is part of libunwind. ++ ++Permission is hereby granted, free of charge, to any person obtaining ++a copy of this software and associated documentation files (the ++"Software"), to deal in the Software without restriction, including ++without limitation the rights to use, copy, modify, merge, publish, ++distribute, sublicense, and/or sell copies of the Software, and to ++permit persons to whom the Software is furnished to do so, subject to ++the following conditions: ++ ++The above copyright notice and this permission notice shall be ++included in all copies or substantial portions of the Software. ++ ++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE ++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION ++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION ++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ ++ ++#include "unwind_i.h" ++ ++PROTECTED int ++unw_get_proc_info (unw_cursor_t *cursor, unw_proc_info_t *pi) ++{ ++ struct cursor *c = (struct cursor *) cursor; ++ int ret; ++ ++ ret = dwarf_make_proc_info (&c->dwarf); ++ if (ret < 0) ++ return ret; ++ ++ *pi = c->dwarf.pi; ++ return 0; ++} +--- /dev/null ++++ b/src/aarch64/Gget_save_loc.c +@@ -0,0 +1,100 @@ ++/* libunwind - a platform-independent unwind library ++ Copyright (C) 2008 CodeSourcery ++ Copyright (C) 2012 Tommi Rantala <[email protected]> ++ Copyright (C) 2013 Linaro Limited ++ ++This file is part of libunwind. ++ ++Permission is hereby granted, free of charge, to any person obtaining ++a copy of this software and associated documentation files (the ++"Software"), to deal in the Software without restriction, including ++without limitation the rights to use, copy, modify, merge, publish, ++distribute, sublicense, and/or sell copies of the Software, and to ++permit persons to whom the Software is furnished to do so, subject to ++the following conditions: ++ ++The above copyright notice and this permission notice shall be ++included in all copies or substantial portions of the Software. ++ ++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE ++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION ++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION ++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ ++ ++#include "unwind_i.h" ++ ++PROTECTED int ++unw_get_save_loc (unw_cursor_t *cursor, int reg, unw_save_loc_t *sloc) ++{ ++ struct cursor *c = (struct cursor *) cursor; ++ dwarf_loc_t loc; ++ ++ switch (reg) ++ { ++ case UNW_AARCH64_X0: ++ case UNW_AARCH64_X1: ++ case UNW_AARCH64_X2: ++ case UNW_AARCH64_X3: ++ case UNW_AARCH64_X4: ++ case UNW_AARCH64_X5: ++ case UNW_AARCH64_X6: ++ case UNW_AARCH64_X7: ++ case UNW_AARCH64_X8: ++ case UNW_AARCH64_X9: ++ case UNW_AARCH64_X10: ++ case UNW_AARCH64_X11: ++ case UNW_AARCH64_X12: ++ case UNW_AARCH64_X13: ++ case UNW_AARCH64_X14: ++ case UNW_AARCH64_X15: ++ case UNW_AARCH64_X16: ++ case UNW_AARCH64_X17: ++ case UNW_AARCH64_X18: ++ case UNW_AARCH64_X19: ++ case UNW_AARCH64_X20: ++ case UNW_AARCH64_X21: ++ case UNW_AARCH64_X22: ++ case UNW_AARCH64_X23: ++ case UNW_AARCH64_X24: ++ case UNW_AARCH64_X25: ++ case UNW_AARCH64_X26: ++ case UNW_AARCH64_X27: ++ case UNW_AARCH64_X28: ++ case UNW_AARCH64_X29: ++ case UNW_AARCH64_X30: ++ case UNW_AARCH64_SP: ++ case UNW_AARCH64_PC: ++ case UNW_AARCH64_PSTATE: ++ loc = c->dwarf.loc[reg]; ++ break; ++ ++ default: ++ loc = DWARF_NULL_LOC; /* default to "not saved" */ ++ break; ++ } ++ ++ memset (sloc, 0, sizeof (*sloc)); ++ ++ if (DWARF_IS_NULL_LOC (loc)) ++ { ++ sloc->type = UNW_SLT_NONE; ++ return 0; ++ } ++ ++#if !defined(UNW_LOCAL_ONLY) ++ if (DWARF_IS_REG_LOC (loc)) ++ { ++ sloc->type = UNW_SLT_REG; ++ sloc->u.regnum = DWARF_GET_LOC (loc); ++ } ++ else ++#endif ++ { ++ sloc->type = UNW_SLT_MEMORY; ++ sloc->u.addr = DWARF_GET_LOC (loc); ++ } ++ return 0; ++} +--- /dev/null ++++ b/src/aarch64/Gglobal.c +@@ -0,0 +1,57 @@ ++/* libunwind - a platform-independent unwind library ++ Copyright (C) 2008 CodeSourcery ++ Copyright (C) 2012 Tommi Rantala <[email protected]> ++ Copyright (C) 2013 Linaro Limited ++ ++This file is part of libunwind. ++ ++Permission is hereby granted, free of charge, to any person obtaining ++a copy of this software and associated documentation files (the ++"Software"), to deal in the Software without restriction, including ++without limitation the rights to use, copy, modify, merge, publish, ++distribute, sublicense, and/or sell copies of the Software, and to ++permit persons to whom the Software is furnished to do so, subject to ++the following conditions: ++ ++The above copyright notice and this permission notice shall be ++included in all copies or substantial portions of the Software. ++ ++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE ++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION ++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION ++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ ++ ++#include "unwind_i.h" ++#include "dwarf_i.h" ++ ++HIDDEN define_lock (aarch64_lock); ++HIDDEN int tdep_init_done; ++ ++HIDDEN void ++tdep_init (void) ++{ ++ intrmask_t saved_mask; ++ ++ sigfillset (&unwi_full_mask); ++ ++ lock_acquire (&aarch64_lock, saved_mask); ++ { ++ if (tdep_init_done) ++ /* another thread else beat us to it... */ ++ goto out; ++ ++ mi_init (); ++ ++ dwarf_init (); ++ ++#ifndef UNW_REMOTE_ONLY ++ aarch64_local_addr_space_init (); ++#endif ++ tdep_init_done = 1; /* signal that we're initialized... */ ++ } ++ out: ++ lock_release (&aarch64_lock, saved_mask); ++} +--- /dev/null ++++ b/src/aarch64/Ginit.c +@@ -0,0 +1,187 @@ ++/* libunwind - a platform-independent unwind library ++ Copyright (C) 2008 CodeSourcery ++ Copyright (C) 2012 Tommi Rantala <[email protected]> ++ Copyright (C) 2013 Linaro Limited ++ ++This file is part of libunwind. ++ ++Permission is hereby granted, free of charge, to any person obtaining ++a copy of this software and associated documentation files (the ++"Software"), to deal in the Software without restriction, including ++without limitation the rights to use, copy, modify, merge, publish, ++distribute, sublicense, and/or sell copies of the Software, and to ++permit persons to whom the Software is furnished to do so, subject to ++the following conditions: ++ ++The above copyright notice and this permission notice shall be ++included in all copies or substantial portions of the Software. ++ ++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE ++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION ++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION ++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ ++ ++#include <stdlib.h> ++#include <string.h> ++ ++#include "unwind_i.h" ++ ++#ifdef UNW_REMOTE_ONLY ++ ++/* unw_local_addr_space is a NULL pointer in this case. */ ++PROTECTED unw_addr_space_t unw_local_addr_space; ++ ++#else /* !UNW_REMOTE_ONLY */ ++ ++static struct unw_addr_space local_addr_space; ++ ++PROTECTED unw_addr_space_t unw_local_addr_space = &local_addr_space; ++ ++static inline void * ++uc_addr (ucontext_t *uc, int reg) ++{ ++ if (reg >= UNW_AARCH64_X0 && reg <= UNW_AARCH64_V31) ++ return &uc->uc_mcontext.regs[reg]; ++ else ++ return NULL; ++} ++ ++# ifdef UNW_LOCAL_ONLY ++ ++HIDDEN void * ++tdep_uc_addr (ucontext_t *uc, int reg) ++{ ++ return uc_addr (uc, reg); ++} ++ ++# endif /* UNW_LOCAL_ONLY */ ++ ++HIDDEN unw_dyn_info_list_t _U_dyn_info_list; ++ ++/* XXX fix me: there is currently no way to locate the dyn-info list ++ by a remote unwinder. On ia64, this is done via a special ++ unwind-table entry. Perhaps something similar can be done with ++ DWARF2 unwind info. */ ++ ++static void ++put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg) ++{ ++ /* it's a no-op */ ++} ++ ++static int ++get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr, ++ void *arg) ++{ ++ *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list; ++ return 0; ++} ++ ++static int ++access_mem (unw_addr_space_t as, unw_word_t addr, unw_word_t *val, int write, ++ void *arg) ++{ ++ if (write) ++ { ++ Debug (16, "mem[%lx] <- %lx\n", addr, *val); ++ *(unw_word_t *) addr = *val; ++ } ++ else ++ { ++ *val = *(unw_word_t *) addr; ++ Debug (16, "mem[%lx] -> %lx\n", addr, *val); ++ } ++ return 0; ++} ++ ++static int ++access_reg (unw_addr_space_t as, unw_regnum_t reg, unw_word_t *val, int write, ++ void *arg) ++{ ++ unw_word_t *addr; ++ ucontext_t *uc = arg; ++ ++ if (unw_is_fpreg (reg)) ++ goto badreg; ++ ++ if (!(addr = uc_addr (uc, reg))) ++ goto badreg; ++ ++ if (write) ++ { ++ *(unw_word_t *) addr = *val; ++ Debug (12, "%s <- %lx\n", unw_regname (reg), *val); ++ } ++ else ++ { ++ *val = *(unw_word_t *) addr; ++ Debug (12, "%s -> %lx\n", unw_regname (reg), *val); ++ } ++ return 0; ++ ++ badreg: ++ Debug (1, "bad register number %u\n", reg); ++ return -UNW_EBADREG; ++} ++ ++static int ++access_fpreg (unw_addr_space_t as, unw_regnum_t reg, unw_fpreg_t *val, ++ int write, void *arg) ++{ ++ ucontext_t *uc = arg; ++ unw_fpreg_t *addr; ++ ++ if (!unw_is_fpreg (reg)) ++ goto badreg; ++ ++ if (!(addr = uc_addr (uc, reg))) ++ goto badreg; ++ ++ if (write) ++ { ++ Debug (12, "%s <- %08lx.%08lx.%08lx\n", unw_regname (reg), ++ ((long *)val)[0], ((long *)val)[1], ((long *)val)[2]); ++ *(unw_fpreg_t *) addr = *val; ++ } ++ else ++ { ++ *val = *(unw_fpreg_t *) addr; ++ Debug (12, "%s -> %08lx.%08lx.%08lx\n", unw_regname (reg), ++ ((long *)val)[0], ((long *)val)[1], ((long *)val)[2]); ++ } ++ return 0; ++ ++ badreg: ++ Debug (1, "bad register number %u\n", reg); ++ /* attempt to access a non-preserved register */ ++ return -UNW_EBADREG; ++} ++ ++static int ++get_static_proc_name (unw_addr_space_t as, unw_word_t ip, ++ char *buf, size_t buf_len, unw_word_t *offp, ++ void *arg) ++{ ++ return _Uelf64_get_proc_name (as, getpid (), ip, buf, buf_len, offp); ++} ++ ++HIDDEN void ++aarch64_local_addr_space_init (void) ++{ ++ memset (&local_addr_space, 0, sizeof (local_addr_space)); ++ local_addr_space.caching_policy = UNW_CACHE_GLOBAL; ++ local_addr_space.acc.find_proc_info = dwarf_find_proc_info; ++ local_addr_space.acc.put_unwind_info = put_unwind_info; ++ local_addr_space.acc.get_dyn_info_list_addr = get_dyn_info_list_addr; ++ local_addr_space.acc.access_mem = access_mem; ++ local_addr_space.acc.access_reg = access_reg; ++ local_addr_space.acc.access_fpreg = access_fpreg; ++ local_addr_space.acc.resume = aarch64_local_resume; ++ local_addr_space.acc.get_proc_name = get_static_proc_name; ++ unw_flush_cache (&local_addr_space, 0, 0); ++} ++ ++#endif /* !UNW_REMOTE_ONLY */ +--- /dev/null ++++ b/src/aarch64/Ginit_local.c +@@ -0,0 +1,55 @@ ++/* libunwind - a platform-independent unwind library ++ Copyright (C) 2008 CodeSourcery ++ Copyright (C) 2011-2013 Linaro Limited ++ ++This file is part of libunwind. ++ ++Permission is hereby granted, free of charge, to any person obtaining ++a copy of this software and associated documentation files (the ++"Software"), to deal in the Software without restriction, including ++without limitation the rights to use, copy, modify, merge, publish, ++distribute, sublicense, and/or sell copies of the Software, and to ++permit persons to whom the Software is furnished to do so, subject to ++the following conditions: ++ ++The above copyright notice and this permission notice shall be ++included in all copies or substantial portions of the Software. ++ ++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE ++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION ++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION ++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ ++ ++#include "unwind_i.h" ++#include "init.h" ++ ++#ifdef UNW_REMOTE_ONLY ++ ++PROTECTED int ++unw_init_local (unw_cursor_t *cursor, unw_context_t *uc) ++{ ++ return -UNW_EINVAL; ++} ++ ++#else /* !UNW_REMOTE_ONLY */ ++ ++PROTECTED int ++unw_init_local (unw_cursor_t *cursor, unw_context_t *uc) ++{ ++ struct cursor *c = (struct cursor *) cursor; ++ ++ if (!tdep_init_done) ++ tdep_init (); ++ ++ Debug (1, "(cursor=%p)\n", c); ++ ++ c->dwarf.as = unw_local_addr_space; ++ c->dwarf.as_arg = uc; ++ ++ return common_init (c, 1); ++} ++ ++#endif /* !UNW_REMOTE_ONLY */ +--- /dev/null ++++ b/src/aarch64/Ginit_remote.c +@@ -0,0 +1,45 @@ ++/* libunwind - a platform-independent unwind library ++ Copyright (C) 2008 CodeSourcery ++ ++This file is part of libunwind. ++ ++Permission is hereby granted, free of charge, to any person obtaining ++a copy of this software and associated documentation files (the ++"Software"), to deal in the Software without restriction, including ++without limitation the rights to use, copy, modify, merge, publish, ++distribute, sublicense, and/or sell copies of the Software, and to ++permit persons to whom the Software is furnished to do so, subject to ++the following conditions: ++ ++The above copyright notice and this permission notice shall be ++included in all copies or substantial portions of the Software. ++ ++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE ++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION ++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION ++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ ++ ++#include "init.h" ++#include "unwind_i.h" ++ ++PROTECTED int ++unw_init_remote (unw_cursor_t *cursor, unw_addr_space_t as, void *as_arg) ++{ ++#ifdef UNW_LOCAL_ONLY ++ return -UNW_EINVAL; ++#else /* !UNW_LOCAL_ONLY */ ++ struct cursor *c = (struct cursor *) cursor; ++ ++ if (!tdep_init_done) ++ tdep_init (); ++ ++ Debug (1, "(cursor=%p)\n", c); ++ ++ c->dwarf.as = as; ++ c->dwarf.as_arg = as_arg; ++ return common_init (c, 0); ++#endif /* !UNW_LOCAL_ONLY */ ++} +--- /dev/null ++++ b/src/aarch64/Gis_signal_frame.c +@@ -0,0 +1,64 @@ ++/* libunwind - a platform-independent unwind library ++ Copyright (C) 2012 Tommi Rantala <[email protected]> ++ Copyright (C) 2013 Linaro Limited ++ ++This file is part of libunwind. ++ ++Permission is hereby granted, free of charge, to any person obtaining ++a copy of this software and associated documentation files (the ++"Software"), to deal in the Software without restriction, including ++without limitation the rights to use, copy, modify, merge, publish, ++distribute, sublicense, and/or sell copies of the Software, and to ++permit persons to whom the Software is furnished to do so, subject to ++the following conditions: ++ ++The above copyright notice and this permission notice shall be ++included in all copies or substantial portions of the Software. ++ ++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE ++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION ++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION ++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ ++ ++#include "unwind_i.h" ++ ++/* The restorer stub will always have the form: ++ ++ d2801168 movz x8, #0x8b ++ d4000001 svc #0x0 ++*/ ++ ++PROTECTED int ++unw_is_signal_frame (unw_cursor_t *cursor) ++{ ++#ifdef __linux__ ++ struct cursor *c = (struct cursor *) cursor; ++ unw_word_t w0, ip; ++ unw_addr_space_t as; ++ unw_accessors_t *a; ++ void *arg; ++ int ret; ++ ++ as = c->dwarf.as; ++ a = unw_get_accessors (as); ++ arg = c->dwarf.as_arg; ++ ++ ip = c->dwarf.ip; ++ ++ ret = (*a->access_mem) (as, ip, &w0, 0, arg); ++ if (ret < 0) ++ return ret; ++ ++ /* FIXME: distinguish 32bit insn vs 64bit registers. */ ++ if (w0 != 0xd4000001d2801168) ++ return 0; ++ ++ return 1; ++ ++#else ++ return -UNW_ENOINFO; ++#endif ++} +--- /dev/null ++++ b/src/aarch64/Gregs.c +@@ -0,0 +1,113 @@ ++/* libunwind - a platform-independent unwind library ++ Copyright (C) 2008 CodeSourcery ++ Copyright (C) 2012 Tommi Rantala <[email protected]> ++ Copyright (C) 2013 Linaro Limited ++ ++This file is part of libunwind. ++ ++Permission is hereby granted, free of charge, to any person obtaining ++a copy of this software and associated documentation files (the ++"Software"), to deal in the Software without restriction, including ++without limitation the rights to use, copy, modify, merge, publish, ++distribute, sublicense, and/or sell copies of the Software, and to ++permit persons to whom the Software is furnished to do so, subject to ++the following conditions: ++ ++The above copyright notice and this permission notice shall be ++included in all copies or substantial portions of the Software. ++ ++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE ++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION ++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION ++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ ++ ++#include "unwind_i.h" ++ ++HIDDEN int ++tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp, ++ int write) ++{ ++ dwarf_loc_t loc = DWARF_NULL_LOC; ++ unsigned int mask; ++ ++ switch (reg) ++ { ++ case UNW_AARCH64_X0: ++ case UNW_AARCH64_X1: ++ case UNW_AARCH64_X2: ++ case UNW_AARCH64_X3: ++ mask = 1 << reg; ++ if (write) ++ { ++ c->dwarf.eh_args[reg] = *valp; ++ c->dwarf.eh_valid_mask |= mask; ++ return 0; ++ } ++ else if ((c->dwarf.eh_valid_mask & mask) != 0) ++ { ++ *valp = c->dwarf.eh_args[reg]; ++ return 0; ++ } ++ else ++ loc = c->dwarf.loc[reg]; ++ break; ++ ++ case UNW_AARCH64_X4: ++ case UNW_AARCH64_X5: ++ case UNW_AARCH64_X6: ++ case UNW_AARCH64_X7: ++ case UNW_AARCH64_X8: ++ case UNW_AARCH64_X9: ++ case UNW_AARCH64_X10: ++ case UNW_AARCH64_X11: ++ case UNW_AARCH64_X12: ++ case UNW_AARCH64_X13: ++ case UNW_AARCH64_X14: ++ case UNW_AARCH64_X15: ++ case UNW_AARCH64_X16: ++ case UNW_AARCH64_X17: ++ case UNW_AARCH64_X18: ++ case UNW_AARCH64_X19: ++ case UNW_AARCH64_X20: ++ case UNW_AARCH64_X21: ++ case UNW_AARCH64_X22: ++ case UNW_AARCH64_X23: ++ case UNW_AARCH64_X24: ++ case UNW_AARCH64_X25: ++ case UNW_AARCH64_X26: ++ case UNW_AARCH64_X27: ++ case UNW_AARCH64_X28: ++ case UNW_AARCH64_X29: ++ case UNW_AARCH64_X30: ++ case UNW_AARCH64_PC: ++ case UNW_AARCH64_PSTATE: ++ loc = c->dwarf.loc[reg]; ++ break; ++ ++ case UNW_AARCH64_SP: ++ if (write) ++ return -UNW_EREADONLYREG; ++ *valp = c->dwarf.cfa; ++ return 0; ++ ++ default: ++ Debug (1, "bad register number %u\n", reg); ++ return -UNW_EBADREG; ++ } ++ ++ if (write) ++ return dwarf_put (&c->dwarf, loc, *valp); ++ else ++ return dwarf_get (&c->dwarf, loc, valp); ++} ++ ++HIDDEN int ++tdep_access_fpreg (struct cursor *c, unw_regnum_t reg, unw_fpreg_t *valp, ++ int write) ++{ ++ Debug (1, "bad register number %u\n", reg); ++ return -UNW_EBADREG; ++} +--- /dev/null ++++ b/src/aarch64/Gresume.c +@@ -0,0 +1,177 @@ ++/* libunwind - a platform-independent unwind library ++ Copyright (C) 2008 CodeSourcery ++ Copyright (C) 2011-2013 Linaro Limited ++ Copyright (C) 2012 Tommi Rantala <[email protected]> ++ ++This file is part of libunwind. ++ ++Permission is hereby granted, free of charge, to any person obtaining ++a copy of this software and associated documentation files (the ++"Software"), to deal in the Software without restriction, including ++without limitation the rights to use, copy, modify, merge, publish, ++distribute, sublicense, and/or sell copies of the Software, and to ++permit persons to whom the Software is furnished to do so, subject to ++the following conditions: ++ ++The above copyright notice and this permission notice shall be ++included in all copies or substantial portions of the Software. ++ ++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE ++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION ++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION ++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ ++ ++#include "unwind_i.h" ++#include "offsets.h" ++ ++#ifndef UNW_REMOTE_ONLY ++ ++HIDDEN inline int ++aarch64_local_resume (unw_addr_space_t as, unw_cursor_t *cursor, void *arg) ++{ ++#ifdef __linux__ ++ struct cursor *c = (struct cursor *) cursor; ++ unw_tdep_context_t *uc = c->dwarf.as_arg; ++ ++ if (c->sigcontext_format == AARCH64_SCF_NONE) ++ { ++ /* Since there are no signals involved here we restore the non scratch ++ registers only. */ ++ unsigned long regs[11]; ++ regs[0] = uc->uc_mcontext.regs[19]; ++ regs[1] = uc->uc_mcontext.regs[20]; ++ regs[2] = uc->uc_mcontext.regs[21]; ++ regs[3] = uc->uc_mcontext.regs[22]; ++ regs[4] = uc->uc_mcontext.regs[23]; ++ regs[5] = uc->uc_mcontext.regs[24]; ++ regs[6] = uc->uc_mcontext.regs[25]; ++ regs[7] = uc->uc_mcontext.regs[26]; ++ regs[8] = uc->uc_mcontext.regs[27]; ++ regs[9] = uc->uc_mcontext.regs[28]; ++ regs[10] = uc->uc_mcontext.regs[30]; /* LR */ ++ unsigned long sp = uc->uc_mcontext.sp; ++ ++ struct regs_overlay { ++ char x[sizeof(regs)]; ++ }; ++ ++ asm volatile ( ++ "ldp x19, x20, [%0]\n" ++ "ldp x21, x22, [%0,16]\n" ++ "ldp x23, x24, [%0,32]\n" ++ "ldp x25, x26, [%0,48]\n" ++ "ldp x27, x28, [%0,64]\n" ++ "ldr x30, [%0,80]\n" ++ "mov sp, %1\n" ++ "ret \n" ++ : ++ : "r" (regs), ++ "r" (sp), ++ "m" (*(struct regs_overlay *)regs) ++ ); ++ } ++ else ++ { ++ struct sigcontext *sc = (struct sigcontext *) c->sigcontext_addr; ++ ++ if (c->dwarf.eh_valid_mask & 0x1) sc->regs[0] = c->dwarf.eh_args[0]; ++ if (c->dwarf.eh_valid_mask & 0x2) sc->regs[1] = c->dwarf.eh_args[1]; ++ if (c->dwarf.eh_valid_mask & 0x4) sc->regs[2] = c->dwarf.eh_args[2]; ++ if (c->dwarf.eh_valid_mask & 0x8) sc->regs[3] = c->dwarf.eh_args[3]; ++ ++ sc->regs[4] = uc->uc_mcontext.regs[4]; ++ sc->regs[5] = uc->uc_mcontext.regs[5]; ++ sc->regs[6] = uc->uc_mcontext.regs[6]; ++ sc->regs[7] = uc->uc_mcontext.regs[7]; ++ sc->regs[8] = uc->uc_mcontext.regs[8]; ++ sc->regs[9] = uc->uc_mcontext.regs[9]; ++ sc->regs[10] = uc->uc_mcontext.regs[10]; ++ sc->regs[11] = uc->uc_mcontext.regs[11]; ++ sc->regs[12] = uc->uc_mcontext.regs[12]; ++ sc->regs[13] = uc->uc_mcontext.regs[13]; ++ sc->regs[14] = uc->uc_mcontext.regs[14]; ++ sc->regs[15] = uc->uc_mcontext.regs[15]; ++ sc->regs[16] = uc->uc_mcontext.regs[16]; ++ sc->regs[17] = uc->uc_mcontext.regs[17]; ++ sc->regs[18] = uc->uc_mcontext.regs[18]; ++ sc->regs[19] = uc->uc_mcontext.regs[19]; ++ sc->regs[20] = uc->uc_mcontext.regs[20]; ++ sc->regs[21] = uc->uc_mcontext.regs[21]; ++ sc->regs[22] = uc->uc_mcontext.regs[22]; ++ sc->regs[23] = uc->uc_mcontext.regs[23]; ++ sc->regs[24] = uc->uc_mcontext.regs[24]; ++ sc->regs[25] = uc->uc_mcontext.regs[25]; ++ sc->regs[26] = uc->uc_mcontext.regs[26]; ++ sc->regs[27] = uc->uc_mcontext.regs[27]; ++ sc->regs[28] = uc->uc_mcontext.regs[28]; ++ sc->regs[29] = uc->uc_mcontext.regs[29]; ++ sc->regs[30] = uc->uc_mcontext.regs[30]; ++ sc->sp = uc->uc_mcontext.sp; ++ sc->pc = uc->uc_mcontext.pc; ++ sc->pstate = uc->uc_mcontext.pstate; ++ ++ asm volatile ( ++ "mov sp, %0\n" ++ "ret %1\n" ++ : : "r" (c->sigcontext_sp), "r" (c->sigcontext_pc) ++ ); ++ } ++ unreachable(); ++#else ++ printf ("%s: implement me\n", __FUNCTION__); ++#endif ++ return -UNW_EINVAL; ++} ++ ++#endif /* !UNW_REMOTE_ONLY */ ++ ++static inline void ++establish_machine_state (struct cursor *c) ++{ ++ unw_addr_space_t as = c->dwarf.as; ++ void *arg = c->dwarf.as_arg; ++ unw_fpreg_t fpval; ++ unw_word_t val; ++ int reg; ++ ++ Debug (8, "copying out cursor state\n"); ++ ++ for (reg = 0; reg <= UNW_AARCH64_PSTATE; ++reg) ++ { ++ Debug (16, "copying %s %d\n", unw_regname (reg), reg); ++ if (unw_is_fpreg (reg)) ++ { ++ if (tdep_access_fpreg (c, reg, &fpval, 0) >= 0) ++ as->acc.access_fpreg (as, reg, &fpval, 1, arg); ++ } ++ else ++ { ++ if (tdep_access_reg (c, reg, &val, 0) >= 0) ++ as->acc.access_reg (as, reg, &val, 1, arg); ++ } ++ } ++} ++ ++PROTECTED int ++unw_resume (unw_cursor_t *cursor) ++{ ++ struct cursor *c = (struct cursor *) cursor; ++ ++ Debug (1, "(cursor=%p)\n", c); ++ ++ if (!c->dwarf.ip) ++ { ++ /* This can happen easily when the frame-chain gets truncated ++ due to bad or missing unwind-info. */ ++ Debug (1, "refusing to resume execution at address 0\n"); ++ return -UNW_EINVAL; ++ } ++ ++ establish_machine_state (c); ++ ++ return (*c->dwarf.as->acc.resume) (c->dwarf.as, (unw_cursor_t *) c, ++ c->dwarf.as_arg); ++} +--- /dev/null ++++ b/src/aarch64/Gstep.c +@@ -0,0 +1,129 @@ ++/* libunwind - a platform-independent unwind library ++ Copyright (C) 2008 CodeSourcery ++ Copyright (C) 2011-2013 Linaro Limited ++ Copyright (C) 2012 Tommi Rantala <[email protected]> ++ ++This file is part of libunwind. ++ ++Permission is hereby granted, free of charge, to any person obtaining ++a copy of this software and associated documentation files (the ++"Software"), to deal in the Software without restriction, including ++without limitation the rights to use, copy, modify, merge, publish, ++distribute, sublicense, and/or sell copies of the Software, and to ++permit persons to whom the Software is furnished to do so, subject to ++the following conditions: ++ ++The above copyright notice and this permission notice shall be ++included in all copies or substantial portions of the Software. ++ ++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE ++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION ++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION ++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ ++ ++#include "unwind_i.h" ++#include "offsets.h" ++ ++PROTECTED int ++unw_handle_signal_frame (unw_cursor_t *cursor) ++{ ++ struct cursor *c = (struct cursor *) cursor; ++ int ret; ++ unw_word_t sc_addr, sp, sp_addr = c->dwarf.cfa; ++ struct dwarf_loc sp_loc = DWARF_LOC (sp_addr, 0); ++ ++ if ((ret = dwarf_get (&c->dwarf, sp_loc, &sp)) < 0) ++ return -UNW_EUNSPEC; ++ ++ ret = unw_is_signal_frame (cursor); ++ Debug(1, "unw_is_signal_frame()=%d\n", ret); ++ ++ /* Save the SP and PC to be able to return execution at this point ++ later in time (unw_resume). */ ++ c->sigcontext_sp = c->dwarf.cfa; ++ c->sigcontext_pc = c->dwarf.ip; ++ ++ if (ret) ++ { ++ c->sigcontext_format = AARCH64_SCF_LINUX_RT_SIGFRAME; ++ sc_addr = sp_addr + sizeof (siginfo_t) + LINUX_UC_MCONTEXT_OFF; ++ } ++ else ++ return -UNW_EUNSPEC; ++ ++ c->sigcontext_addr = sc_addr; ++ ++ /* Update the dwarf cursor. ++ Set the location of the registers to the corresponding addresses of the ++ uc_mcontext / sigcontext structure contents. */ ++ c->dwarf.loc[UNW_AARCH64_X0] = DWARF_LOC (sc_addr + LINUX_SC_X0_OFF, 0); ++ c->dwarf.loc[UNW_AARCH64_X1] = DWARF_LOC (sc_addr + LINUX_SC_X1_OFF, 0); ++ c->dwarf.loc[UNW_AARCH64_X2] = DWARF_LOC (sc_addr + LINUX_SC_X2_OFF, 0); ++ c->dwarf.loc[UNW_AARCH64_X3] = DWARF_LOC (sc_addr + LINUX_SC_X3_OFF, 0); ++ c->dwarf.loc[UNW_AARCH64_X4] = DWARF_LOC (sc_addr + LINUX_SC_X4_OFF, 0); ++ c->dwarf.loc[UNW_AARCH64_X5] = DWARF_LOC (sc_addr + LINUX_SC_X5_OFF, 0); ++ c->dwarf.loc[UNW_AARCH64_X6] = DWARF_LOC (sc_addr + LINUX_SC_X6_OFF, 0); ++ c->dwarf.loc[UNW_AARCH64_X7] = DWARF_LOC (sc_addr + LINUX_SC_X7_OFF, 0); ++ c->dwarf.loc[UNW_AARCH64_X8] = DWARF_LOC (sc_addr + LINUX_SC_X8_OFF, 0); ++ c->dwarf.loc[UNW_AARCH64_X9] = DWARF_LOC (sc_addr + LINUX_SC_X9_OFF, 0); ++ c->dwarf.loc[UNW_AARCH64_X10] = DWARF_LOC (sc_addr + LINUX_SC_X10_OFF, 0); ++ c->dwarf.loc[UNW_AARCH64_X11] = DWARF_LOC (sc_addr + LINUX_SC_X11_OFF, 0); ++ c->dwarf.loc[UNW_AARCH64_X12] = DWARF_LOC (sc_addr + LINUX_SC_X12_OFF, 0); ++ c->dwarf.loc[UNW_AARCH64_X13] = DWARF_LOC (sc_addr + LINUX_SC_X13_OFF, 0); ++ c->dwarf.loc[UNW_AARCH64_X14] = DWARF_LOC (sc_addr + LINUX_SC_X14_OFF, 0); ++ c->dwarf.loc[UNW_AARCH64_X15] = DWARF_LOC (sc_addr + LINUX_SC_X15_OFF, 0); ++ c->dwarf.loc[UNW_AARCH64_X16] = DWARF_LOC (sc_addr + LINUX_SC_X16_OFF, 0); ++ c->dwarf.loc[UNW_AARCH64_X17] = DWARF_LOC (sc_addr + LINUX_SC_X17_OFF, 0); ++ c->dwarf.loc[UNW_AARCH64_X18] = DWARF_LOC (sc_addr + LINUX_SC_X18_OFF, 0); ++ c->dwarf.loc[UNW_AARCH64_X19] = DWARF_LOC (sc_addr + LINUX_SC_X19_OFF, 0); ++ c->dwarf.loc[UNW_AARCH64_X20] = DWARF_LOC (sc_addr + LINUX_SC_X20_OFF, 0); ++ c->dwarf.loc[UNW_AARCH64_X21] = DWARF_LOC (sc_addr + LINUX_SC_X21_OFF, 0); ++ c->dwarf.loc[UNW_AARCH64_X22] = DWARF_LOC (sc_addr + LINUX_SC_X22_OFF, 0); ++ c->dwarf.loc[UNW_AARCH64_X23] = DWARF_LOC (sc_addr + LINUX_SC_X23_OFF, 0); ++ c->dwarf.loc[UNW_AARCH64_X24] = DWARF_LOC (sc_addr + LINUX_SC_X24_OFF, 0); ++ c->dwarf.loc[UNW_AARCH64_X25] = DWARF_LOC (sc_addr + LINUX_SC_X25_OFF, 0); ++ c->dwarf.loc[UNW_AARCH64_X26] = DWARF_LOC (sc_addr + LINUX_SC_X26_OFF, 0); ++ c->dwarf.loc[UNW_AARCH64_X27] = DWARF_LOC (sc_addr + LINUX_SC_X27_OFF, 0); ++ c->dwarf.loc[UNW_AARCH64_X28] = DWARF_LOC (sc_addr + LINUX_SC_X28_OFF, 0); ++ c->dwarf.loc[UNW_AARCH64_X29] = DWARF_LOC (sc_addr + LINUX_SC_X29_OFF, 0); ++ c->dwarf.loc[UNW_AARCH64_X30] = DWARF_LOC (sc_addr + LINUX_SC_X30_OFF, 0); ++ c->dwarf.loc[UNW_AARCH64_SP] = DWARF_LOC (sc_addr + LINUX_SC_SP_OFF, 0); ++ c->dwarf.loc[UNW_AARCH64_PC] = DWARF_LOC (sc_addr + LINUX_SC_PC_OFF, 0); ++ c->dwarf.loc[UNW_AARCH64_PSTATE] = DWARF_LOC (sc_addr + LINUX_SC_PSTATE_OFF, 0); ++ ++ /* Set SP/CFA and PC/IP. */ ++ dwarf_get (&c->dwarf, c->dwarf.loc[UNW_AARCH64_SP], &c->dwarf.cfa); ++ dwarf_get (&c->dwarf, c->dwarf.loc[UNW_AARCH64_PC], &c->dwarf.ip); ++ ++ c->dwarf.pi_valid = 0; ++ ++ return 1; ++} ++ ++PROTECTED int ++unw_step (unw_cursor_t *cursor) ++{ ++ struct cursor *c = (struct cursor *) cursor; ++ int ret; ++ ++ Debug (1, "(cursor=%p, ip=0x%016lx, cfa=0x%016lx))\n", ++ c, c->dwarf.ip, c->dwarf.cfa); ++ ++ /* Check if this is a signal frame. */ ++ if (unw_is_signal_frame (cursor)) ++ return unw_handle_signal_frame (cursor); ++ ++ ret = dwarf_step (&c->dwarf); ++ Debug(1, "dwarf_step()=%d\n", ret); ++ ++ if (unlikely (ret == -UNW_ESTOPUNWIND)) ++ return ret; ++ ++ if (unlikely (ret < 0)) ++ return 0; ++ ++ return (c->dwarf.ip == 0) ? 0 : 1; ++} +--- /dev/null ++++ b/src/aarch64/Lcreate_addr_space.c +@@ -0,0 +1,5 @@ ++#define UNW_LOCAL_ONLY ++#include <libunwind.h> ++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) ++#include "Gcreate_addr_space.c" ++#endif +--- /dev/null ++++ b/src/aarch64/Lget_proc_info.c +@@ -0,0 +1,5 @@ ++#define UNW_LOCAL_ONLY ++#include <libunwind.h> ++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) ++#include "Gget_proc_info.c" ++#endif +--- /dev/null ++++ b/src/aarch64/Lget_save_loc.c +@@ -0,0 +1,5 @@ ++#define UNW_LOCAL_ONLY ++#include <libunwind.h> ++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) ++#include "Gget_save_loc.c" ++#endif +--- /dev/null ++++ b/src/aarch64/Lglobal.c +@@ -0,0 +1,5 @@ ++#define UNW_LOCAL_ONLY ++#include <libunwind.h> ++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) ++#include "Gglobal.c" ++#endif +--- /dev/null ++++ b/src/aarch64/Linit.c +@@ -0,0 +1,5 @@ ++#define UNW_LOCAL_ONLY ++#include <libunwind.h> ++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) ++#include "Ginit.c" ++#endif +--- /dev/null ++++ b/src/aarch64/Linit_local.c +@@ -0,0 +1,5 @@ ++#define UNW_LOCAL_ONLY ++#include <libunwind.h> ++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) ++#include "Ginit_local.c" ++#endif +--- /dev/null ++++ b/src/aarch64/Linit_remote.c +@@ -0,0 +1,5 @@ ++#define UNW_LOCAL_ONLY ++#include <libunwind.h> ++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) ++#include "Ginit_remote.c" ++#endif +--- /dev/null ++++ b/src/aarch64/Lis_signal_frame.c +@@ -0,0 +1,5 @@ ++#define UNW_LOCAL_ONLY ++#include <libunwind.h> ++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) ++#include "Gis_signal_frame.c" ++#endif +--- /dev/null ++++ b/src/aarch64/Lregs.c +@@ -0,0 +1,5 @@ ++#define UNW_LOCAL_ONLY ++#include <libunwind.h> ++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) ++#include "Gregs.c" ++#endif +--- /dev/null ++++ b/src/aarch64/Lresume.c +@@ -0,0 +1,5 @@ ++#define UNW_LOCAL_ONLY ++#include <libunwind.h> ++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) ++#include "Gresume.c" ++#endif +--- /dev/null ++++ b/src/aarch64/Lstep.c +@@ -0,0 +1,5 @@ ++#define UNW_LOCAL_ONLY ++#include <libunwind.h> ++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) ++#include "Gstep.c" ++#endif +--- /dev/null ++++ b/src/aarch64/gen-offsets.c +@@ -0,0 +1,68 @@ ++#include <stdio.h> ++#include <stddef.h> ++#include <ucontext.h> ++#include <asm/sigcontext.h> ++ ++#define UC(N,X) \ ++ printf ("#define LINUX_UC_" N "_OFF\t0x%X\n", offsetof (ucontext_t, X)) ++ ++#define SC(N,X) \ ++ printf ("#define LINUX_SC_" N "_OFF\t0x%X\n", offsetof (struct sigcontext, X)) ++ ++int ++main (void) ++{ ++ printf ( ++"/* Linux-specific definitions: */\n\n" ++ ++"/* Define various structure offsets to simplify cross-compilation. */\n\n" ++ ++"/* Offsets for AArch64 Linux \"ucontext_t\": */\n\n"); ++ ++ UC ("FLAGS", uc_flags); ++ UC ("LINK", uc_link); ++ UC ("STACK", uc_stack); ++ UC ("MCONTEXT", uc_mcontext); ++ UC ("SIGMASK", uc_sigmask); ++ ++ printf ("\n/* Offsets for AArch64 Linux \"struct sigcontext\": */\n\n"); ++ ++ SC ("R0", regs[0]); ++ SC ("R1", regs[1]); ++ SC ("R2", regs[2]); ++ SC ("R3", regs[3]); ++ SC ("R4", regs[4]); ++ SC ("R5", regs[5]); ++ SC ("R6", regs[6]); ++ SC ("R7", regs[7]); ++ SC ("R8", regs[8]); ++ SC ("R9", regs[9]); ++ SC ("R10", regs[10]); ++ SC ("R11", regs[11]); ++ SC ("R12", regs[12]); ++ SC ("R13", regs[13]); ++ SC ("R14", regs[14]); ++ SC ("R15", regs[15]); ++ SC ("R16", regs[16]); ++ SC ("R17", regs[17]); ++ SC ("R18", regs[18]); ++ SC ("R19", regs[19]); ++ SC ("R20", regs[20]); ++ SC ("R21", regs[21]); ++ SC ("R22", regs[22]); ++ SC ("R23", regs[23]); ++ SC ("R24", regs[24]); ++ SC ("R25", regs[25]); ++ SC ("R26", regs[26]); ++ SC ("R27", regs[27]); ++ SC ("R28", regs[28]); ++ SC ("R29", regs[29]); ++ SC ("R30", regs[30]); ++ SC ("R31", regs[31]); ++ ++ SC ("PC", pc); ++ SC ("SP", sp); ++ SC ("Fault", fault_address); ++ SC ("state", pstate); ++ return 0; ++} +--- /dev/null ++++ b/src/aarch64/init.h +@@ -0,0 +1,127 @@ ++/* libunwind - a platform-independent unwind library ++ Copyright (C) 2012 Tommi Rantala <[email protected]> ++ Copyright (C) 2013 Linaro Limited ++ ++This file is part of libunwind. ++ ++Permission is hereby granted, free of charge, to any person obtaining ++a copy of this software and associated documentation files (the ++"Software"), to deal in the Software without restriction, including ++without limitation the rights to use, copy, modify, merge, publish, ++distribute, sublicense, and/or sell copies of the Software, and to ++permit persons to whom the Software is furnished to do so, subject to ++the following conditions: ++ ++The above copyright notice and this permission notice shall be ++included in all copies or substantial portions of the Software. ++ ++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE ++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION ++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION ++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ ++ ++#include "unwind_i.h" ++ ++static inline int ++common_init (struct cursor *c, unsigned use_prev_instr) ++{ ++ int ret, i; ++ ++ c->dwarf.loc[UNW_AARCH64_X0] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X0); ++ c->dwarf.loc[UNW_AARCH64_X1] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X1); ++ c->dwarf.loc[UNW_AARCH64_X2] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X2); ++ c->dwarf.loc[UNW_AARCH64_X3] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X3); ++ c->dwarf.loc[UNW_AARCH64_X4] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X4); ++ c->dwarf.loc[UNW_AARCH64_X5] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X5); ++ c->dwarf.loc[UNW_AARCH64_X6] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X6); ++ c->dwarf.loc[UNW_AARCH64_X7] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X7); ++ c->dwarf.loc[UNW_AARCH64_X8] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X8); ++ c->dwarf.loc[UNW_AARCH64_X9] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X9); ++ c->dwarf.loc[UNW_AARCH64_X10] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X10); ++ c->dwarf.loc[UNW_AARCH64_X11] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X11); ++ c->dwarf.loc[UNW_AARCH64_X12] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X12); ++ c->dwarf.loc[UNW_AARCH64_X13] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X13); ++ c->dwarf.loc[UNW_AARCH64_X14] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X14); ++ c->dwarf.loc[UNW_AARCH64_X15] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X15); ++ c->dwarf.loc[UNW_AARCH64_X16] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X16); ++ c->dwarf.loc[UNW_AARCH64_X17] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X17); ++ c->dwarf.loc[UNW_AARCH64_X18] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X18); ++ c->dwarf.loc[UNW_AARCH64_X19] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X19); ++ c->dwarf.loc[UNW_AARCH64_X20] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X20); ++ c->dwarf.loc[UNW_AARCH64_X21] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X21); ++ c->dwarf.loc[UNW_AARCH64_X22] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X22); ++ c->dwarf.loc[UNW_AARCH64_X23] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X23); ++ c->dwarf.loc[UNW_AARCH64_X24] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X24); ++ c->dwarf.loc[UNW_AARCH64_X25] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X25); ++ c->dwarf.loc[UNW_AARCH64_X26] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X26); ++ c->dwarf.loc[UNW_AARCH64_X27] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X27); ++ c->dwarf.loc[UNW_AARCH64_X28] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X28); ++ c->dwarf.loc[UNW_AARCH64_X29] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X29); ++ c->dwarf.loc[UNW_AARCH64_X30] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X30); ++ c->dwarf.loc[UNW_AARCH64_SP] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_SP); ++ c->dwarf.loc[UNW_AARCH64_PC] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_PC); ++ c->dwarf.loc[UNW_AARCH64_PSTATE] = DWARF_REG_LOC (&c->dwarf, ++ UNW_AARCH64_PSTATE); ++ c->dwarf.loc[UNW_AARCH64_V0] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V0); ++ c->dwarf.loc[UNW_AARCH64_V1] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V1); ++ c->dwarf.loc[UNW_AARCH64_V2] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V2); ++ c->dwarf.loc[UNW_AARCH64_V3] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V3); ++ c->dwarf.loc[UNW_AARCH64_V4] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V4); ++ c->dwarf.loc[UNW_AARCH64_V5] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V5); ++ c->dwarf.loc[UNW_AARCH64_V6] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V6); ++ c->dwarf.loc[UNW_AARCH64_V7] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V7); ++ c->dwarf.loc[UNW_AARCH64_V8] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V8); ++ c->dwarf.loc[UNW_AARCH64_V9] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V9); ++ c->dwarf.loc[UNW_AARCH64_V10] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V10); ++ c->dwarf.loc[UNW_AARCH64_V11] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V11); ++ c->dwarf.loc[UNW_AARCH64_V12] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V12); ++ c->dwarf.loc[UNW_AARCH64_V13] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V13); ++ c->dwarf.loc[UNW_AARCH64_V14] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V14); ++ c->dwarf.loc[UNW_AARCH64_V15] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V15); ++ c->dwarf.loc[UNW_AARCH64_V16] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V16); ++ c->dwarf.loc[UNW_AARCH64_V17] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V17); ++ c->dwarf.loc[UNW_AARCH64_V18] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V18); ++ c->dwarf.loc[UNW_AARCH64_V19] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V19); ++ c->dwarf.loc[UNW_AARCH64_V20] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V20); ++ c->dwarf.loc[UNW_AARCH64_V21] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V21); ++ c->dwarf.loc[UNW_AARCH64_V22] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V22); ++ c->dwarf.loc[UNW_AARCH64_V23] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V23); ++ c->dwarf.loc[UNW_AARCH64_V24] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V24); ++ c->dwarf.loc[UNW_AARCH64_V25] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V25); ++ c->dwarf.loc[UNW_AARCH64_V26] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V26); ++ c->dwarf.loc[UNW_AARCH64_V27] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V27); ++ c->dwarf.loc[UNW_AARCH64_V28] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V28); ++ c->dwarf.loc[UNW_AARCH64_V29] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V29); ++ c->dwarf.loc[UNW_AARCH64_V30] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V30); ++ c->dwarf.loc[UNW_AARCH64_V31] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V31); ++ ++ for (i = UNW_AARCH64_PSTATE + 1; i < UNW_AARCH64_V0; ++i) ++ c->dwarf.loc[i] = DWARF_NULL_LOC; ++ ++ ret = dwarf_get (&c->dwarf, c->dwarf.loc[UNW_AARCH64_PC], &c->dwarf.ip); ++ if (ret < 0) ++ return ret; ++ ++ ret = dwarf_get (&c->dwarf, c->dwarf.loc[UNW_AARCH64_SP], &c->dwarf.cfa); ++ if (ret < 0) ++ return ret; ++ ++ c->sigcontext_format = AARCH64_SCF_NONE; ++ c->sigcontext_addr = 0; ++ c->sigcontext_sp = 0; ++ c->sigcontext_pc = 0; ++ ++ c->dwarf.args_size = 0; ++ c->dwarf.ret_addr_column = 0; ++ c->dwarf.stash_frames = 0; ++ c->dwarf.use_prev_instr = use_prev_instr; ++ c->dwarf.pi_valid = 0; ++ c->dwarf.pi_is_dynamic = 0; ++ c->dwarf.hint = 0; ++ c->dwarf.prev_rs = 0; ++ ++ return 0; ++} +--- /dev/null ++++ b/src/aarch64/is_fpreg.c +@@ -0,0 +1,32 @@ ++/* libunwind - a platform-independent unwind library ++ Copyright (C) 2008 CodeSourcery ++ Copyright (C) 2013 Linaro Limited ++ ++This file is part of libunwind. ++ ++Permission is hereby granted, free of charge, to any person obtaining ++a copy of this software and associated documentation files (the ++"Software"), to deal in the Software without restriction, including ++without limitation the rights to use, copy, modify, merge, publish, ++distribute, sublicense, and/or sell copies of the Software, and to ++permit persons to whom the Software is furnished to do so, subject to ++the following conditions: ++ ++The above copyright notice and this permission notice shall be ++included in all copies or substantial portions of the Software. ++ ++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE ++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION ++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION ++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ ++ ++#include "libunwind_i.h" ++ ++PROTECTED int ++unw_is_fpreg (int regnum) ++{ ++ return (regnum >= UNW_AARCH64_V0 && regnum <= UNW_AARCH64_V31); ++} +--- /dev/null ++++ b/src/aarch64/offsets.h +@@ -0,0 +1,49 @@ ++/* Linux-specific definitions: */ ++ ++/* Define various structure offsets to simplify cross-compilation. */ ++ ++/* Offsets for AArch64 Linux "ucontext_t": */ ++ ++#define LINUX_UC_FLAGS_OFF 0x0 ++#define LINUX_UC_LINK_OFF 0x8 ++#define LINUX_UC_STACK_OFF 0x10 ++#define LINUX_UC_SIGMASK_OFF 0x28 ++#define LINUX_UC_MCONTEXT_OFF 0xb0 ++ ++/* Offsets for AArch64 Linux "struct sigcontext": */ ++ ++#define LINUX_SC_FAULTADDRESS_OFF 0x00 ++#define LINUX_SC_X0_OFF 0x008 ++#define LINUX_SC_X1_OFF 0x010 ++#define LINUX_SC_X2_OFF 0x018 ++#define LINUX_SC_X3_OFF 0x020 ++#define LINUX_SC_X4_OFF 0x028 ++#define LINUX_SC_X5_OFF 0x030 ++#define LINUX_SC_X6_OFF 0x038 ++#define LINUX_SC_X7_OFF 0x040 ++#define LINUX_SC_X8_OFF 0x048 ++#define LINUX_SC_X9_OFF 0x050 ++#define LINUX_SC_X10_OFF 0x058 ++#define LINUX_SC_X11_OFF 0x060 ++#define LINUX_SC_X12_OFF 0x068 ++#define LINUX_SC_X13_OFF 0x070 ++#define LINUX_SC_X14_OFF 0x078 ++#define LINUX_SC_X15_OFF 0x080 ++#define LINUX_SC_X16_OFF 0x088 ++#define LINUX_SC_X17_OFF 0x090 ++#define LINUX_SC_X18_OFF 0x098 ++#define LINUX_SC_X19_OFF 0x0a0 ++#define LINUX_SC_X20_OFF 0x0a8 ++#define LINUX_SC_X21_OFF 0x0b0 ++#define LINUX_SC_X22_OFF 0x0b8 ++#define LINUX_SC_X23_OFF 0x0c0 ++#define LINUX_SC_X24_OFF 0x0c8 ++#define LINUX_SC_X25_OFF 0x0d0 ++#define LINUX_SC_X26_OFF 0x0d8 ++#define LINUX_SC_X27_OFF 0x0e0 ++#define LINUX_SC_X28_OFF 0x0e8 ++#define LINUX_SC_X29_OFF 0x0f0 ++#define LINUX_SC_X30_OFF 0x0f8 ++#define LINUX_SC_SP_OFF 0x100 ++#define LINUX_SC_PC_OFF 0x108 ++#define LINUX_SC_PSTATE_OFF 0x110 +--- /dev/null ++++ b/src/aarch64/regname.c +@@ -0,0 +1,106 @@ ++/* libunwind - a platform-independent unwind library ++ Copyright (C) 2012 Tommi Rantala <[email protected]> ++ Copyright (C) 2013 Linaro Limited ++ ++This file is part of libunwind. ++ ++Permission is hereby granted, free of charge, to any person obtaining ++a copy of this software and associated documentation files (the ++"Software"), to deal in the Software without restriction, including ++without limitation the rights to use, copy, modify, merge, publish, ++distribute, sublicense, and/or sell copies of the Software, and to ++permit persons to whom the Software is furnished to do so, subject to ++the following conditions: ++ ++The above copyright notice and this permission notice shall be ++included in all copies or substantial portions of the Software. ++ ++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE ++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION ++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION ++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ ++ ++#include "unwind_i.h" ++ ++static const char *const regname[] = ++ { ++ [UNW_AARCH64_X0] = "x0", ++ [UNW_AARCH64_X1] = "x1", ++ [UNW_AARCH64_X2] = "x2", ++ [UNW_AARCH64_X3] = "x3", ++ [UNW_AARCH64_X4] = "x4", ++ [UNW_AARCH64_X5] = "x5", ++ [UNW_AARCH64_X6] = "x6", ++ [UNW_AARCH64_X7] = "x7", ++ [UNW_AARCH64_X8] = "x8", ++ [UNW_AARCH64_X9] = "x9", ++ [UNW_AARCH64_X10] = "x10", ++ [UNW_AARCH64_X11] = "x11", ++ [UNW_AARCH64_X12] = "x12", ++ [UNW_AARCH64_X13] = "x13", ++ [UNW_AARCH64_X14] = "x14", ++ [UNW_AARCH64_X15] = "x15", ++ [UNW_AARCH64_X16] = "ip0", ++ [UNW_AARCH64_X17] = "ip1", ++ [UNW_AARCH64_X18] = "x18", ++ [UNW_AARCH64_X19] = "x19", ++ [UNW_AARCH64_X20] = "x20", ++ [UNW_AARCH64_X21] = "x21", ++ [UNW_AARCH64_X22] = "x22", ++ [UNW_AARCH64_X23] = "x23", ++ [UNW_AARCH64_X24] = "x24", ++ [UNW_AARCH64_X25] = "x25", ++ [UNW_AARCH64_X26] = "x26", ++ [UNW_AARCH64_X27] = "x27", ++ [UNW_AARCH64_X28] = "x28", ++ [UNW_AARCH64_X29] = "fp", ++ [UNW_AARCH64_X30] = "lr", ++ [UNW_AARCH64_SP] = "sp", ++ [UNW_AARCH64_PC] = "pc", ++ [UNW_AARCH64_V0] = "v0", ++ [UNW_AARCH64_V1] = "v1", ++ [UNW_AARCH64_V2] = "v2", ++ [UNW_AARCH64_V3] = "v3", ++ [UNW_AARCH64_V4] = "v4", ++ [UNW_AARCH64_V5] = "v5", ++ [UNW_AARCH64_V6] = "v6", ++ [UNW_AARCH64_V7] = "v7", ++ [UNW_AARCH64_V8] = "v8", ++ [UNW_AARCH64_V9] = "v9", ++ [UNW_AARCH64_V10] = "v10", ++ [UNW_AARCH64_V11] = "v11", ++ [UNW_AARCH64_V12] = "v12", ++ [UNW_AARCH64_V13] = "v13", ++ [UNW_AARCH64_V14] = "v14", ++ [UNW_AARCH64_V15] = "v15", ++ [UNW_AARCH64_V16] = "v16", ++ [UNW_AARCH64_V17] = "v17", ++ [UNW_AARCH64_V18] = "v18", ++ [UNW_AARCH64_V19] = "v19", ++ [UNW_AARCH64_V20] = "v20", ++ [UNW_AARCH64_V21] = "v21", ++ [UNW_AARCH64_V22] = "v22", ++ [UNW_AARCH64_V23] = "v23", ++ [UNW_AARCH64_V24] = "v24", ++ [UNW_AARCH64_V25] = "v25", ++ [UNW_AARCH64_V26] = "v26", ++ [UNW_AARCH64_V27] = "v27", ++ [UNW_AARCH64_V28] = "v28", ++ [UNW_AARCH64_V29] = "v29", ++ [UNW_AARCH64_V30] = "v30", ++ [UNW_AARCH64_V31] = "v31", ++ [UNW_AARCH64_FPSR] = "fpsr", ++ [UNW_AARCH64_FPCR] = "fpcr", ++ }; ++ ++PROTECTED const char * ++unw_regname (unw_regnum_t reg) ++{ ++ if (reg < (unw_regnum_t) ARRAY_SIZE (regname) && regname[reg] != NULL) ++ return regname[reg]; ++ else ++ return "???"; ++} +--- /dev/null ++++ b/src/aarch64/siglongjmp.S +@@ -0,0 +1,12 @@ ++ /* Dummy implementation for now. */ ++ ++ .global _UI_siglongjmp_cont ++ .global _UI_longjmp_cont ++ ++_UI_siglongjmp_cont: ++_UI_longjmp_cont: ++ ret ++#ifdef __linux__ ++ /* We do not need executable stack. */ ++ .section .note.GNU-stack,"",%progbits ++#endif +--- /dev/null ++++ b/src/aarch64/unwind_i.h +@@ -0,0 +1,43 @@ ++/* libunwind - a platform-independent unwind library ++ Copyright (C) 2008 CodeSourcery ++ Copyright (C) 2013 Linaro Limited ++ ++This file is part of libunwind. ++ ++Permission is hereby granted, free of charge, to any person obtaining ++a copy of this software and associated documentation files (the ++"Software"), to deal in the Software without restriction, including ++without limitation the rights to use, copy, modify, merge, publish, ++distribute, sublicense, and/or sell copies of the Software, and to ++permit persons to whom the Software is furnished to do so, subject to ++the following conditions: ++ ++The above copyright notice and this permission notice shall be ++included in all copies or substantial portions of the Software. ++ ++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE ++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION ++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION ++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ ++ ++#ifndef unwind_i_h ++#define unwind_i_h ++ ++#include <stdint.h> ++ ++#include <libunwind-aarch64.h> ++ ++#include "libunwind_i.h" ++ ++#define aarch64_lock UNW_OBJ(lock) ++#define aarch64_local_resume UNW_OBJ(local_resume) ++#define aarch64_local_addr_space_init UNW_OBJ(local_addr_space_init) ++ ++extern void aarch64_local_addr_space_init (void); ++extern int aarch64_local_resume (unw_addr_space_t as, unw_cursor_t *cursor, ++ void *arg); ++ ++#endif /* unwind_i_h */ +--- a/src/coredump/_UCD_access_reg_linux.c ++++ b/src/coredump/_UCD_access_reg_linux.c +@@ -39,7 +39,10 @@ _UCD_access_reg (unw_addr_space_t as, + return -UNW_EINVAL; + } + +-#if defined(UNW_TARGET_ARM) ++#if defined(UNW_TARGET_AARCH64) ++ if (regnum < 0 || regnum >= UNW_AARCH64_FPCR) ++ goto badreg; ++#elif defined(UNW_TARGET_ARM) + if (regnum < 0 || regnum >= 16) + goto badreg; + #elif defined(UNW_TARGET_SH) +--- a/src/ptrace/_UPT_reg_offset.c ++++ b/src/ptrace/_UPT_reg_offset.c +@@ -1,6 +1,7 @@ + /* libunwind - a platform-independent unwind library + Copyright (C) 2003-2004 Hewlett-Packard Co + Contributed by David Mosberger-Tang <[email protected]> ++ Copyright (C) 2013 Linaro Limited + + This file is part of libunwind. + +@@ -501,6 +502,41 @@ const int _UPT_reg_offset[UNW_REG_LAST + + [UNW_ARM_R15] = 0x3c, + #elif defined(UNW_TARGET_MIPS) + #elif defined(UNW_TARGET_SH) ++#elif defined(UNW_TARGET_AARCH64) ++ [UNW_AARCH64_X0] = 0x00, ++ [UNW_AARCH64_X1] = 0x08, ++ [UNW_AARCH64_X2] = 0x10, ++ [UNW_AARCH64_X3] = 0x18, ++ [UNW_AARCH64_X4] = 0x20, ++ [UNW_AARCH64_X5] = 0x28, ++ [UNW_AARCH64_X6] = 0x30, ++ [UNW_AARCH64_X7] = 0x38, ++ [UNW_AARCH64_X8] = 0x40, ++ [UNW_AARCH64_X9] = 0x48, ++ [UNW_AARCH64_X10] = 0x50, ++ [UNW_AARCH64_X11] = 0x58, ++ [UNW_AARCH64_X12] = 0x60, ++ [UNW_AARCH64_X13] = 0x68, ++ [UNW_AARCH64_X14] = 0x70, ++ [UNW_AARCH64_X15] = 0x78, ++ [UNW_AARCH64_X16] = 0x80, ++ [UNW_AARCH64_X17] = 0x88, ++ [UNW_AARCH64_X18] = 0x90, ++ [UNW_AARCH64_X19] = 0x98, ++ [UNW_AARCH64_X20] = 0xa0, ++ [UNW_AARCH64_X21] = 0xa8, ++ [UNW_AARCH64_X22] = 0xb0, ++ [UNW_AARCH64_X23] = 0xb8, ++ [UNW_AARCH64_X24] = 0xc0, ++ [UNW_AARCH64_X25] = 0xc8, ++ [UNW_AARCH64_X26] = 0xd0, ++ [UNW_AARCH64_X27] = 0xd8, ++ [UNW_AARCH64_X28] = 0xe0, ++ [UNW_AARCH64_X29] = 0xe8, ++ [UNW_AARCH64_X30] = 0xf0, ++ [UNW_AARCH64_SP] = 0xf8, ++ [UNW_AARCH64_PC] = 0x100, ++ [UNW_AARCH64_PSTATE] = 0x108 + #else + # error Fix me. + #endif
meta/recipes-support/libunwind/libunwind-1.1/Support-building-with-older-compilers.patch new file +72 -0
72 lines not on this page · raw message
meta/recipes-support/libunwind/libunwind.inc +1 -0
@@ -11,6 +11,7 @@ PACKAGECONFIG ??= "" PACKAGECONFIG[lzma] = "--enable-minidebuginfo,--disable-minidebuginfo,lzma" EXTRA_OECONF_arm = "--enable-debug-frame" +EXTRA_OECONF_aarch64 = "--enable-debug-frame" CFLAGS += "${ATOMICOPS}" ATOMICOPS_armv5 = "-DAO_USE_PTHREAD_DEFS=1"
meta/recipes-support/libunwind/libunwind_1.1.bb +5 -0
@@ -1,4 +1,9 @@ require libunwind.inc +SRC_URI += "\ + file://Support-building-with-older-compilers.patch \ + file://AArch64-port.patch \ +" + SRC_URI[md5sum] = "fb4ea2f6fbbe45bf032cd36e586883ce" SRC_URI[sha256sum] = "9dfe0fcae2a866de9d3942c66995e4b460230446887dbdab302d41a8aee8d09a"
Signature · 1 line
1.9.1
PATCH 13/19 runqemu: add qemuarm64 support.
In reply to Kai KangUpdate scripts runqemu and runqemu-internal to support to boot qemuarm64.
--- scripts/runqemu | 5 ++++- scripts/runqemu-internal | 26 ++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-)
scripts/runqemu +4 -1
@@ -108,7 +108,7 @@ process_filename() { while true; do arg=${1} case "$arg" in - "qemux86" | "qemux86-64" | "qemuarm" | "qemumips" | "qemumipsel" | \ + "qemux86" | "qemux86-64" | "qemuarm" | "qemuarm64" | "qemumips" | "qemumipsel" | \ "qemumips64" | "qemush4" | "qemuppc" | "qemumicroblaze" | "qemuzynq") [ -z "$MACHINE" ] && MACHINE=$arg || \ error "conflicting MACHINE types [$MACHINE] and [$arg]"
@@ -301,6 +301,9 @@ QEMUX86_64_DEFAULT_FSTYPE=ext3 QEMUARM_DEFAULT_KERNEL=zImage-qemuarm.bin QEMUARM_DEFAULT_FSTYPE=ext3 +QEMUARM64_DEFAULT_KERNEL=Image-qemuarm64.bin +QEMUARM64_DEFAULT_FSTYPE=ext3 + QEMUMIPS_DEFAULT_KERNEL=vmlinux-qemumips.bin QEMUMIPS_DEFAULT_FSTYPE=ext3
scripts/runqemu-internal +26 -0
@@ -50,6 +50,9 @@ else "qemuarm") mem_size=128 ;; + "qemuarm64") + mem_size=128 + ;; "qemumicroblaze") mem_size=64 ;;
@@ -260,8 +263,17 @@ else DROOT="/dev/hda" ROOTFS_OPTIONS="-hda $ROOTFS" fi + if [ "$MACHINE" = "qemuarm64" ]; then + QEMU_NETWORK_CMD="-netdev user,id=net0 -device virtio-net-device,netdev=net0" + DROOT="/dev/vda" + ROOTFS_OPTIONS="-drive id=disk0,file=$ROOTFS -device virtio-blk-device,drive=disk0" + fi + KERNCMDLINE="mem=$QEMU_MEMORY" QEMU_UI_OPTIONS="-show-cursor -usb -usbdevice wacom-tablet" + if [ $MACHINE = 'qemuarm64' ]; then + QEMU_UI_OPTIONS="-nographic" + fi NFS_INSTANCE=`echo $TAP | sed 's/tap//'` export NFS_INSTANCE
@@ -274,6 +286,7 @@ fi case "$MACHINE" in "qemuarm") ;; + "qemuarm64") ;; "qemumicroblaze") ;; "qemumips") ;; "qemumipsel") ;;
@@ -362,6 +375,19 @@ if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "qemuarmv6" -o "$MACHINE" = "qemuarm fi fi +if [ "$MACHINE" = "qemuarm64" ]; then + QEMU=qemu-system-aarch64 + + export QEMU_AUDIO_DRV="none" + QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS" + if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then + KERNCMDLINE="root=/dev/vda rw console=ttyAMA0,38400 mem=$QEMU_MEMORY highres=off" + # qemu-system-aarch64 only support '-machine virt -cpu cortex-a57' for now + QEMUOPTIONS="$QEMU_NETWORK_CMD -machine virt -cpu cortex-a57 $ROOTFS_OPTIONS $QEMU_UI_OPTIONS" + fi +fi + + if [ "$MACHINE" = "qemux86" ]; then QEMU=qemu-system-i386 if [ "$KVM_ACTIVE" = "yes" ]; then
Signature · 1 line
1.9.1
PATCH 14/19 kexec-tools: add aarch64 support
In reply to Kai KangAdd patch from
https://fedorapeople.org/~hrw/aarch64/for-fedora/kexec-aarch64.patch
to add aarch64 support for kexec-tools.
--- meta/recipes-kernel/kexec/kexec-tools.inc | 2 +- .../kexec/kexec-tools/kexec-aarch64.patch | 801 +++++++++++++++++++++ meta/recipes-kernel/kexec/kexec-tools_2.0.8.bb | 4 +- 3 files changed, 805 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch
meta/recipes-kernel/kexec/kexec-tools.inc +1 -1
@@ -12,7 +12,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz inherit autotools-brokensep -COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|powerpc.*|mips.*)-(linux|freebsd.*)' +COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|powerpc.*|mips.*)-(linux|freebsd.*)' INSANE_SKIP_${PN} = "arch"
meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch new file +801 -0
801 lines not on this page · raw message
meta/recipes-kernel/kexec/kexec-tools_2.0.8.bb +3 -1
@@ -2,7 +2,9 @@ require kexec-tools.inc export LDFLAGS = "-L${STAGING_LIBDIR}" EXTRA_OECONF = " --with-zlib=yes" -SRC_URI += "file://kexec-tools-Refine-kdump-device_tree-sort.patch" +SRC_URI += "file://kexec-tools-Refine-kdump-device_tree-sort.patch \ + file://kexec-aarch64.patch \ + " SRC_URI[md5sum] = "45bd2bc676ae202579e4c185563126af" SRC_URI[sha256sum] = "95083c707577154a2241c5af0985f1eb3412d1ba208ef91813e9158b0a901179"
Signature · 1 line
1.9.1
PATCH 15/19 packagegroup-core-tools-profile: remove sysprof for aarch64
In reply to Kai KangRemove sysprof from packagegroup-core-tools-profile that sysprof doesn't support arch aarch64.
--- meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb +2 -0
@@ -12,6 +12,8 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" inherit packagegroup PROFILE_TOOLS_X = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'sysprof', '', d)}" +# sysprof doesn't support aarch64 +PROFILE_TOOLS_X_aarch64 = "" PROFILE_TOOLS_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd-analyze', '', d)}" RRECOMMENDS_${PN} = "\
Signature · 1 line
1.9.1
PATCH 16/19 gcc: Disable aarch64 multilib options
In reply to Kai KangFrom: Mark Hatle <[email protected]>
We want to revert to default gcc behavior to support oe-core's ability to change the libdir.
--- meta/recipes-devtools/gcc/gcc-4.9.inc | 1 + .../gcc/gcc-4.9/0057-aarch64-config.patch | 32 ++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 meta/recipes-devtools/gcc/gcc-4.9/0057-aarch64-config.patch
meta/recipes-devtools/gcc/gcc-4.9.inc +1 -0
@@ -71,6 +71,7 @@ SRC_URI = "\ file://0054-gcc-Makefile.in-fix-parallel-building-failure.patch \ file://0055-PR-rtl-optimization-61801.patch \ file://0056-top-level-reorder_gcc-bug-61144.patch \ + file://0057-aarch64-config.patch \ file://0058-gcc-r212171.patch \ file://0059-gcc-PR-rtl-optimization-63348.patch \ "
meta/recipes-devtools/gcc/gcc-4.9/0057-aarch64-config.patch new file +32 -0
@@ -0,0 +1,32 @@ +Disable the MULTILIB_OSDIRNAMES and other multilib options. + +Hard coding the MULTILIB_OSDIRNAMES with ../lib64 is causing problems on +systems where the libdir is NOT set to /lib64. This is allowed by the ABI, as +long as the dynamic loader is present in /lib. + +We simply want to use the default rules in gcc to find and configure the +normal libdir. + +Signed-off-by: Mark Hatle <[email protected]> + +Index: gcc-4.9.1/gcc/config/aarch64/t-aarch64-linux +=================================================================== +--- gcc-4.9.1.orig/gcc/config/aarch64/t-aarch64-linux ++++ gcc-4.9.1/gcc/config/aarch64/t-aarch64-linux +@@ -21,11 +21,11 @@ + LIB1ASMSRC = aarch64/lib1funcs.asm + LIB1ASMFUNCS = _aarch64_sync_cache_range + +-AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be) +-MULTILIB_OSDIRNAMES = .=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu) +-MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu) ++#AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be) ++#MULTILIB_OSDIRNAMES = .=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu) ++#MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu) + + # Disable the multilib for linux-gnu targets for the time being; focus + # on the baremetal targets. +-MULTILIB_OPTIONS = +-MULTILIB_DIRNAMES = ++#MULTILIB_OPTIONS = ++#MULTILIB_DIRNAMES =
Signature · 1 line
1.9.1
PATCH 17/19 glibc-package: aarch64 enable symlink for ABI compliance
In reply to Kai KangFrom: Mark Hatle <[email protected]>
aarch64 requires the ld.so to be present in /lib, even if the rest of the libraries are installed into an alternative directory.
See: https://sourceware.org/glibc/wiki/ABIList
--- meta/recipes-core/glibc/glibc-package.inc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
meta/recipes-core/glibc/glibc-package.inc +16 -0
@@ -32,6 +32,8 @@ RPROVIDES_glibc-thread-db = "eglibc-thread-db" RPROVIDES_${PN}-pcprofile = "eglibc-pcprofile" RPROVIDES_${PN}-dbg = "eglibc-dbg" libc_baselibs = "${base_libdir}/libcrypt*.so.* ${base_libdir}/libcrypt-*.so ${base_libdir}/libc.so.* ${base_libdir}/libc-*.so ${base_libdir}/libm*.so.* ${base_libdir}/libm-*.so ${base_libdir}/ld*.so.* ${base_libdir}/ld-*.so ${base_libdir}/libpthread*.so.* ${base_libdir}/libpthread-*.so ${base_libdir}/libresolv*.so.* ${base_libdir}/libresolv-*.so ${base_libdir}/librt*.so.* ${base_libdir}/librt-*.so ${base_libdir}/libutil*.so.* ${base_libdir}/libutil-*.so ${base_libdir}/libnsl*.so.* ${base_libdir}/libnsl-*.so ${base_libdir}/libnss_files*.so.* ${base_libdir}/libnss_files-*.so ${base_libdir}/libnss_compat*.so.* ${base_libdir}/libnss_compat-*.so ${base_libdir}/libnss_dns*.so.* ${base_libdir}/libnss_dns-*.so ${base_libdir}/libdl*.so.* ${base_libdir}/libdl-*.so ${base_libdir}/libanl*.so.* ${base_libdir}/libanl-*.so ${base_libdir}/libBrokenLocale*.so.* ${base_libdir}/libBrokenLocale-*.so" +libc_baselibs_append_aarch64 = " /lib/ld-linux-aarch64*.so.1" +INSANE_SKIP_glibc_append_aarch64 = " libdir" FILES_${PN} = "${libc_baselibs} ${libexecdir}/* ${@base_conditional('USE_LDCONFIG', '1', '${base_sbindir}/ldconfig ${sysconfdir}/ld.so.conf', '', d)}" FILES_ldd = "${bindir}/ldd"
@@ -103,6 +105,20 @@ do_install_append () { fi } +do_install_append_aarch64 () { + if [ "${base_libdir}" != "/lib" ] ; then + # The aarch64 ABI says the dynamic linker -must- be /lib/ld-linux-aarch64[_be].so.1 + install -d ${D}/lib + if [ -e ${D}${base_libdir}/ld-linux-aarch64.so.1 ]; then + ln -s ${@base_path_relative('/lib', '${base_libdir}')}/ld-linux-aarch64.so.1 \ + ${D}/lib/ld-linux-aarch64.so.1 + elif [ -e ${D}${base_libdir}/ld-linux-aarch64_be.so.1 ]; then + ln -s ${@base_path_relative('/lib', '${base_libdir}')}/ld-linux-aarch64_be.so.1 \ + ${D}/lib/ld-linux-aarch64_be.so.1 + fi + fi +} + do_install_locale () { dest=${D}/${includedir}/glibc-locale-internal-${MULTIMACH_TARGET_SYS} install -d ${dest}${base_libdir} ${dest}${bindir} ${dest}${libdir} ${dest}${datadir}
Signature · 1 line
1.9.1
PATCH 18/19 aarch-arm64: Update tune files
In reply to Kai KangFrom: Mark Hatle <[email protected]>
arch-arm64 is the base tune file for aarch64. Update this to allow the system to work with both aarch32 and aarch64 (multilib).
arch-armv8 is for compatibility, it simply uses the base config for now.
feature-arm-thumb was updated, since aarch64 mode does NOT have thumb support. We should only be processing warnings and additional arguments if thumb support is enabled on the processor core.
--- meta/conf/machine/include/arm/arch-arm64.inc | 36 ++++++++++++++++++++++ meta/conf/machine/include/arm/arch-armv8.inc | 21 +------------ .../conf/machine/include/arm/feature-arm-thumb.inc | 10 ++++-- 3 files changed, 44 insertions(+), 23 deletions(-) create mode 100644 meta/conf/machine/include/arm/arch-arm64.inc
meta/conf/machine/include/arm/arch-arm64.inc new file +36 -0
@@ -0,0 +1,36 @@ +DEFAULTTUNE ?= "aarch64" + +require conf/machine/include/arm/arch-armv7a.inc + +TUNEVALID[aarch64] = "Enable instructions for aarch64" + +MACHINEOVERRIDES .= "${@bb.utils.contains("TUNE_FEATURES", "aarch64", ":aarch64", "" ,d)}" + +# Little Endian base configs +AVAILTUNES += "aarch64 aarch64_be" +ARMPKGARCH_tune-aarch64 ?= "aarch64" +ARMPKGARCH_tune-aarch64_be ?= "aarch64_be" +TUNE_FEATURES_tune-aarch64 ?= "aarch64" +TUNE_FEATURES_tune-aarch64_be ?= "${TUNE_FEATURES_tune-aarch64} bigendian" +BASE_LIB_tune-aarch64 = "lib64" +BASE_LIB_tune-aarch64_be = "lib64" + +PACKAGE_EXTRA_ARCHS_tune-aarch64 = "aarch64" +PACKAGE_EXTRA_ARCHS_tune-aarch64_be = "aarch64_be" + +ARMPKGSFX_ENDIAN_64 = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "_be", "", d)}" +TUNE_ARCH_64 = "aarch64${ARMPKGSFX_ENDIAN_64}" +TUNE_PKGARCH_64 = "aarch64${ARMPKGSFX_ENDIAN_64}" +ABIEXTENSION_64 = "" +TARGET_FPU_64 = "" + +# Duplicated from arch-arm.inc +TUNE_ARCH_32 = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "armeb", "arm", d)}" +TUNE_PKGARCH_32 = "${ARMPKGARCH}${ARMPKGSFX_THUMB}${ARMPKGSFX_DSP}${ARMPKGSFX_EABI}${ARMPKGSFX_ENDIAN}${ARMPKGSFX_FPU}" +ABIEXTENSION_32 = "eabi" +TARGET_FPU_32 = "${@d.getVar('ARMPKGSFX_FPU', True).strip('-') or 'soft'}" + +TUNE_ARCH = "${@bb.utils.contains("TUNE_FEATURES", "aarch64", "${TUNE_ARCH_64}", "${TUNE_ARCH_32}" ,d)}" +TUNE_PKGARCH = "${@bb.utils.contains("TUNE_FEATURES", "aarch64", "${TUNE_PKGARCH_64}", "${TUNE_PKGARCH_32}" ,d)}" +ABIEXTENSION = "${@bb.utils.contains("TUNE_FEATURES", "aarch64", "${ABIEXTENSION_64}", "${ABIEXTENSION_32}" ,d)}" +TARGET_FPU = "${@bb.utils.contains("TUNE_FEATURES", "aarch64", "${TARGET_FPU_64}", "${TARGET_FPU_32}" ,d)}"
meta/conf/machine/include/arm/arch-armv8.inc +1 -20
@@ -1,20 +1 @@ -DEFAULTTUNE ?= "aarch64" - -ARMPKGARCH ?= "aarch64" - -TUNEVALID[aarch64] = "Enable instructions for aarch64" -TUNEVALID[bigendian] = "Enable big-endian mode." -TUNECONFLICTS[aarch64] = "" -MACHINEOVERRIDES .= "${@bb.utils.contains("TUNE_FEATURES", "aarch64", ":aarch64", "" ,d)}" - -# Little Endian base configs -AVAILTUNES += "aarch64 aarch64_be" -TUNE_FEATURES_tune-aarch64 ?= "aarch64" -TUNE_FEATURES_tune-aarch64_be ?= "${TUNE_FEATURES_tune-aarch64} bigendian" - -ARMPKGSFX_ENDIAN = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "_be", "", d)}" - -TUNE_ARCH = "aarch64${ARMPKGSFX_ENDIAN}" -TUNE_PKGARCH = "aarch64${ARMPKGSFX_ENDIAN}" - -PACKAGE_EXTRA_ARCHS = "aarch64${ARMPKGSFX_ENDIAN}" +require conf/machine/include/arm/arch-arm64.inc
meta/conf/machine/include/arm/feature-arm-thumb.inc +7 -3
@@ -18,6 +18,8 @@ ARM_THUMB_SUFFIX .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7m', 't2', '', d # some recipe explicitly sets ARM_INSTRUCTION_SET to "arm" ARM_M_OPT = "${@bb.utils.contains('TUNE_FEATURES', 'arm', '${ARM_THUMB_OPT}', 'thumb', d)}" python () { + if bb.utils.contains('TUNE_FEATURES', 'thumb', 'False', 'True', d): + return selected = d.getVar('ARM_INSTRUCTION_SET', True) if selected == None: return
@@ -37,8 +39,10 @@ ARMPKGSFX_THUMB .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '${ARM_THUMB_ # arm system and vice versa. It is strongly recommended that DISTROs not # turn this off - the actual cost is very small. TUNEVALID[no-thumb-interwork] = "Disable mixing of thumb and ARM functions" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'no-thumb-interwork', ' -mno-thumb-interwork', ' -mthumb-interwork', d)}" -OVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'no-thumb-interwork', ':thumb-interwork', '', d)}" +THUMB_TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'no-thumb-interwork', ' -mno-thumb-interwork', ' -mthumb-interwork', d)}" +THUMB_OVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'no-thumb-interwork', ':thumb-interwork', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', ' ${THUMB_TUNE_CCARGS}', '', d)}" +OVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', ' ${THUMB_OVERRIDES}', '', d)}" # what about armv7m devices which don't support -marm (e.g. Cortex-M3)? -TARGET_CC_KERNEL_ARCH += "-mno-thumb-interwork -marm" +TARGET_CC_KERNEL_ARCH += "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '-mno-thumb-interwork -marm', '', d)}"
Signature · 1 line
1.9.1
PATCH 19/19 linux-yocto: Fixup linux-yocto for aarch64
In reply to Kai KangFrom: Mark Hatle <[email protected]>
linux-yocto is updated to pass the sysroot path to the compiler when necessary.
linux-yocto_ver.bb are updated to reference the correct linux-yocto branchs and SRCREVs.
--- meta/recipes-kernel/linux/linux-yocto.inc | 2 ++ meta/recipes-kernel/linux/linux-yocto_3.14.bb | 4 +++- meta/recipes-kernel/linux/linux-yocto_3.17.bb | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-)
meta/recipes-kernel/linux/linux-yocto.inc +2 -0
@@ -8,6 +8,8 @@ INC_PR = "r4" DEPENDS += "xz-native bc-native" DEPENDS_append_aarch64 = " libgcc" +KERNEL_CC_append_aarch64 = " ${TOOLCHAIN_OPTIONS}" +KERNEL_LD_append_aarch64 = " ${TOOLCHAIN_OPTIONS}" # A KMACHINE is the mapping of a yocto $MACHINE to what is built # by the kernel. This is typically the branch that should be built,
meta/recipes-kernel/linux/linux-yocto_3.14.bb +3 -1
@@ -4,6 +4,7 @@ require recipes-kernel/linux/linux-yocto.inc # board specific branches KBRANCH_qemuarm ?= "standard/arm-versatile-926ejs" +KBRANCH_qemuarm64 ?= "standard/qemuarm64" KBRANCH_qemumips ?= "standard/mti-malta32" KBRANCH_qemuppc ?= "standard/qemuppc" KBRANCH_qemux86 ?= "standard/common-pc/base"
@@ -11,6 +12,7 @@ KBRANCH_qemux86-64 ?= "standard/common-pc-64/base" KBRANCH_qemumips64 ?= "standard/mti-malta64" SRCREV_machine_qemuarm ?= "127b621f2a4d3b1111e24423c12fac001e047c1c" +SRCREV_machine_qemuarm64 ?= "902f34d36102a4b2008b776ecae686f80d307e12" SRCREV_machine_qemumips ?= "c3b9f1b2397f0847ab4844d1cdb8e02574434d78" SRCREV_machine_qemuppc ?= "73e2411cdd91764d0601c0869857f53381c2a177" SRCREV_machine_qemux86 ?= "e19a1b40de44e756defdfb40349342d8037609bd"
@@ -27,7 +29,7 @@ PV = "${LINUX_VERSION}+git${SRCPV}" KMETA = "meta" -COMPATIBLE_MACHINE = "qemuarm|qemux86|qemuppc|qemumips|qemumips64|qemux86-64" +COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64" # Functionality flags KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
meta/recipes-kernel/linux/linux-yocto_3.17.bb +3 -1
@@ -4,6 +4,7 @@ require recipes-kernel/linux/linux-yocto.inc # board specific branches KBRANCH_qemuarm ?= "standard/arm-versatile-926ejs" +KBRANCH_qemuarm64 ?= "standard/qemuarm64" KBRANCH_qemumips ?= "standard/mti-malta32" KBRANCH_qemuppc ?= "standard/qemuppc" KBRANCH_qemux86 ?= "standard/common-pc"
@@ -11,6 +12,7 @@ KBRANCH_qemux86-64 ?= "standard/common-pc-64/base" KBRANCH_qemumips64 ?= "standard/mti-malta64" SRCREV_machine_qemuarm ?= "e86f70699655d1f5bf2518c8dcdb949a39161c86" +SRCREV_machine_qemuarm64 ?= "268b7677421eef003a84f31c6bd0b8ec3acc1e36" SRCREV_machine_qemumips ?= "0acaa5991a61fbab0d897157049ac2e638e9c7bf" SRCREV_machine_qemuppc ?= "50e33fec112527de12c2833cd8a283dd4a75ae33" SRCREV_machine_qemux86 ?= "1a6dd1205de5b7c6135a42fec00550738ff777b5"
@@ -27,7 +29,7 @@ PV = "${LINUX_VERSION}+git${SRCPV}" KMETA = "meta" -COMPATIBLE_MACHINE = "qemuarm|qemux86|qemuppc|qemumips|qemumips64|qemux86-64" +COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64" # Functionality flags KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
Signature · 1 line
1.9.1
Re: [PATCH 08/19] libpng 1.6.13: fix build for aarch64
In reply to Kai KangQuoted 18 lines · Kai Kang
From: Koen Kooi <[email protected]>
The configure override was too restrictive, it needed both 'arm' and 'neon' to trigger, which breaks on aarch64. Since
TUNE_FEATURESis the only qualifier that matters, drop the 'arm' override.Buildtested for 'genericarmv8' and 'qemux86' machines.
Signed-off-by Koen Kooi <[email protected]>--- meta/recipes-multimedia/libpng/libpng_1.6.13.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/recipes-multimedia/libpng/libpng_1.6.13.bb +0
-0
meta/recipes-multimedia/libpng/libpng_1.6.13.bb BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config" · line 25
Quoted 8 lines
meta/recipes-multimedia/libpng/libpng_1.6.13.bb +1
-1@@ -19,7 +19,7 @@ BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config" inherit autotools binconfig-disabled pkgconfig # Work around missing symbols -EXTRA_OECONF_append_arm = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off" ,d)}" +EXTRA_OECONF_append = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off" ,d)}" PACKAGES =+ "${PN}-tools"
I tried a test build of this series and see:
in the output. Could someone look into that please? I'm guessing its related to this patch although I haven't bisected exactly.
Cheers,
Richard
Re: [PATCH 08/19] libpng 1.6.13: fix build for aarch64
Quoted 30 lines · Richard Purdie
Quoted 18 lines · Kai Kang
From: Koen Kooi <[email protected]>
The configure override was too restrictive, it needed both 'arm' and 'neon' to trigger, which breaks on aarch64. Since
TUNE_FEATURESis the only qualifier that matters, drop the 'arm' override.Buildtested for 'genericarmv8' and 'qemux86' machines.
Signed-off-by Koen Kooi <[email protected]>--- meta/recipes-multimedia/libpng/libpng_1.6.13.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/recipes-multimedia/libpng/libpng_1.6.13.bb +0
-0meta/recipes-multimedia/libpng/libpng_1.6.13.bb BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config" · line 25
Quoted 8 lines
meta/recipes-multimedia/libpng/libpng_1.6.13.bb +1
-1@@ -19,7 +19,7 @@ BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config" inherit autotools binconfig-disabled pkgconfig # Work around missing symbols -EXTRA_OECONF_append_arm = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off" ,d)}" +EXTRA_OECONF_append = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off" ,d)}" PACKAGES =+ "${PN}-tools"I tried a test build of this series and see:
Quoted 4 lines
in the output. Could someone look into that please? I'm guessing its related to this patch although I haven't bisected exactly.
In the interests of expediency, I'm testing:
meta/recipes-multimedia/libpng/libpng_1.6.13.bb +1 -1
@@ -19,7 +19,7 @@ BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config" inherit autotools binconfig-disabled pkgconfig # Work around missing symbols -EXTRA_OECONF_append = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off" ,d)}" +EXTRA_OECONF_append_class-target = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off" ,d)}" PACKAGES =+ "${PN}-tools"
since the change breaks libpng-native, but only when there is an arm target. I've also put a couple of fixes in for other arm64 issues in runqemu and in poky.conf, then I've submitted this to the autobuilder for another round of testing.
Cheers,
Richard
Re: [PATCH 11/19] guile: allow compilation for aarch64
In reply to Kai KangQuoted 26 lines · Kai Kang
From: Joe Slater <[email protected]>
Add aarch64 endianness specification to scm file.
Signed-off-by Joe Slater <[email protected]>---
meta/recipes-devtools/guile/files/arm_aarch64.patch| 19 +++++++++++++++++++
meta/recipes-devtools/guile/guile_2.0.11.bb | 1 +2 files changed, 20 insertions(+)create mode 100644
meta/recipes-devtools/guile/files/arm_aarch64.patchmeta/recipes-devtools/guile/files/arm_aarch64.patch new file +6
-0@@ -0,0 +1,19 @@ +guile: add aarch64 recognition + +Assume little-endian. + +Upstream-Status: Pending +
meta/recipes-devtools/guile/files/arm_aarch64.patch line 16
Quoted 10 lines
meta/recipes-devtools/guile/files/arm_aarch64.patch new file +10
-0+Signed-off-by: [email protected] + +--- a/module/system/base/target.scm ++++ b/module/system/base/target.scm +@@ -70,6 +70,8 @@ + ((member cpu '("sparc" "sparc64" "powerpc" "powerpc64" "spu" + "mips" "mips64")) + (endianness big)) ++ ((string-match "^aarch64" cpu) ++ (endianness little))
While you are at it. can you also set it for aarch64_be case as well ?
Re: [PATCH 13/19] runqemu: add qemuarm64 support.
In reply to Kai Kangscripts/runqemu-internal else · line 55
Quoted 6 lines · Kai Kang
scripts/runqemu-internal +3
-0+ "qemuarm64") + mem_size=128 + ;;
there is a limit on 32bit arm but is it same for 64bit as well ? if not can we use 512 or 256 atleast
Re: [PATCH 01/19] linux-yocto: depend on libgcc for aarch64
In reply to Kai KangQuoted 9 lines · Kai Kang
Make aarch aarch64 kernel depend on libgcc.
In
arch/arm64/Makefile, it adds LIBGCC to libs-y:LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
libs-y += $(LIBGCC)
is this a stop-gap or final solution for aarch64 ?
how do we expect it to work with clang/llvm. someone at Linaro must know
Quoted 26 lines
In file
Makefilein top directory, libs-y is assigned to to varKBUILD_VMLINUX_MAIN. It uses scriptlink-vmlinux.shto link vmlinux.o, and when execute functionvmlinux_link()inlink-vmlinux.sh,KBUILD_VMLINUX_MAINis passed to ${LD}.If build without libgcc, the value of LIBGCC is just libgcc.a without parent directory. linux-yocto fails to build:
| LD vmlinux.o
| aarch64-poky-linux-ld.bfd: cannot find libgcc.a: No such file or directoryAdd libgcc to aarch64 kernel dependency.
Signed-off-by Kai Kang <[email protected]>---
meta/recipes-kernel/linux/linux-yocto.inc | 1 +1 file changed, 1 insertion(+)meta/recipes-kernel/linux/linux-yocto.inc +0
-0@@ -7,6 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
INC_PR= "r4"
Quoted 2 lines
DEPENDS += "xz-native bc-native"
+DEPENDS_append_aarch64 = " libgcc”
this should be added in kernel bbclass, since I assume it will be needed for all kind of variants supporting aarch64 in addition to linux-yocto
Re: [PATCH 18/19] aarch-arm64: Update tune files
In reply to Kai KangQuoted 80 lines · Kai Kang
From: Mark Hatle <[email protected]>
arch-arm64 is the base tune file for aarch64. Update this to allow the system to work with both aarch32 and aarch64 (multilib).
arch-armv8 is for compatibility, it simply uses the base config for now.
feature-arm-thumb was updated, since aarch64 mode does NOT have thumb support. We should only be processing warnings and additional arguments if thumb support is enabled on the processor core.
Signed-off-by Mark Hatle <[email protected]>---
meta/conf/machine/include/arm/arch-arm64.inc | 36 ++++++++++++++++++++++ meta/conf/machine/include/arm/arch-armv8.inc | 21 +------------ .../conf/machine/include/arm/feature-arm-thumb.inc | 10 ++++-- 3 files changed, 44 insertions(+), 23 deletions(-)create mode 100644 meta/conf/machine/include/arm/arch-arm64.inc
meta/conf/machine/include/arm/arch-arm64.inc new file +36
-0@@ -0,0 +1,36 @@ +DEFAULTTUNE ?= "aarch64" + +require conf/machine/include/arm/arch-armv7a.inc + +TUNEVALID[aarch64] = "Enable instructions for aarch64" + +MACHINEOVERRIDES .= "${@bb.utils.contains("TUNE_FEATURES", "aarch64", ":aarch64", "" ,d)}" + +# Little Endian base configs +AVAILTUNES += "aarch64 aarch64_be" +ARMPKGARCH_tune-aarch64 ?= "aarch64" +ARMPKGARCH_tune-aarch64_be ?= "aarch64_be" +TUNE_FEATURES_tune-aarch64 ?= "aarch64" +TUNE_FEATURES_tune-aarch64_be ?= "${TUNE_FEATURES_tune-aarch64} bigendian" +BASE_LIB_tune-aarch64 = "lib64" +BASE_LIB_tune-aarch64_be = "lib64" + +PACKAGE_EXTRA_ARCHS_tune-aarch64 = "aarch64" +PACKAGE_EXTRA_ARCHS_tune-aarch64_be = "aarch64_be" + +ARMPKGSFX_ENDIAN_64 = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "_be", "", d)}" +TUNE_ARCH_64 = "aarch64${ARMPKGSFX_ENDIAN_64}" +TUNE_PKGARCH_64 = "aarch64${ARMPKGSFX_ENDIAN_64}" +ABIEXTENSION_64 = "" +TARGET_FPU_64 = "" + +# Duplicated from arch-arm.inc +TUNE_ARCH_32 = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "armeb", "arm", d)}" +TUNE_PKGARCH_32 = "${ARMPKGARCH}${ARMPKGSFX_THUMB}${ARMPKGSFX_DSP}${ARMPKGSFX_EABI}${ARMPKGSFX_ENDIAN}${ARMPKGSFX_FPU}" +ABIEXTENSION_32 = "eabi" +TARGET_FPU_32 = "${@d.getVar('ARMPKGSFX_FPU', True).strip('-') or 'soft'}" + +TUNE_ARCH = "${@bb.utils.contains("TUNE_FEATURES", "aarch64", "${TUNE_ARCH_64}", "${TUNE_ARCH_32}" ,d)}" +TUNE_PKGARCH = "${@bb.utils.contains("TUNE_FEATURES", "aarch64", "${TUNE_PKGARCH_64}", "${TUNE_PKGARCH_32}" ,d)}" +ABIEXTENSION = "${@bb.utils.contains("TUNE_FEATURES", "aarch64", "${ABIEXTENSION_64}", "${ABIEXTENSION_32}" ,d)}" +TARGET_FPU = "${@bb.utils.contains("TUNE_FEATURES", "aarch64", "${TARGET_FPU_64}", "${TARGET_FPU_32}" ,d)}"meta/conf/machine/include/arm/arch-armv8.inc +0
-11@@ -1,20 +1 @@ -DEFAULTTUNE ?= "aarch64" - -ARMPKGARCH ?= "aarch64" - -TUNEVALID[aarch64] = "Enable instructions for aarch64" -TUNEVALID[bigendian] = "Enable big-endian mode." -TUNECONFLICTS[aarch64] = "" -MACHINEOVERRIDES .= "${@bb.utils.contains("TUNE_FEATURES", "aarch64", ":aarch64", "" ,d)}" - -# Little Endian base configs -AVAILTUNES += "aarch64 aarch64_be"
meta/conf/machine/include/arm/arch-armv8.inc line 1
Quoted 10 lines
meta/conf/machine/include/arm/arch-armv8.inc +1
-9-TUNE_FEATURES_tune-aarch64 ?= "aarch64" -TUNE_FEATURES_tune-aarch64_be ?= "${TUNE_FEATURES_tune-aarch64} bigendian" - -ARMPKGSFX_ENDIAN = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "_be", "", d)}" - -TUNE_ARCH = "aarch64${ARMPKGSFX_ENDIAN}" -TUNE_PKGARCH = "aarch64${ARMPKGSFX_ENDIAN}" - -PACKAGE_EXTRA_ARCHS = "aarch64${ARMPKGSFX_ENDIAN}" +require conf/machine/include/arm/arch-arm64.inc
may be it should be merged with patch 02/19
meta/conf/machine/include/arm/feature-arm-thumb.inc ARM_THUMB_SUFFIX .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7m', 't2', '', d · line 22
Quoted 10 lines
meta/conf/machine/include/arm/feature-arm-thumb.inc +0
-0@@ -18,6 +18,8 @@ ARM_THUMB_SUFFIX .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7m', 't2', '', d # some recipe explicitly sets ARM_INSTRUCTION_SET to "arm"
ARM_M_OPT= "${@bb.utils.contains('TUNE_FEATURES', 'arm', '${ARM_THUMB_OPT}', 'thumb', d)}" python () {meta/conf/machine/include/arm/feature-arm-thumb.inc +2
-0+ if bb.utils.contains('TUNE_FEATURES', 'thumb', 'False', 'True', d): + return
won’t this regress the configurations which enabled thumb as default but some applications are built in arm mode
Quoted 25 lines
selected =
d.getVar('ARM_INSTRUCTION_SET', True)if selected == None:
returnmeta/conf/machine/include/arm/feature-arm-thumb.inc +0
-0@@ -37,8 +39,10 @@ ARMPKGSFX_THUMB .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '${ARM_THUMB_ # arm system and vice versa. It is strongly recommended that DISTROs not # turn this off - the actual cost is very small.TUNEVALID[no-thumb-interwork] = "Disable mixing of thumb and ARM functions"
meta/conf/machine/include/arm/feature-arm-thumb.inc +4
-2-TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'no-thumb-interwork', ' -mno-thumb-interwork', ' -mthumb-interwork', d)}" -OVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'no-thumb-interwork', ':thumb-interwork', '', d)}" +THUMB_TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'no-thumb-interwork', ' -mno-thumb-interwork', ' -mthumb-interwork', d)}" +THUMB_OVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'no-thumb-interwork', ':thumb-interwork', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', ' ${THUMB_TUNE_CCARGS}', '', d)}" +OVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', ' ${THUMB_OVERRIDES}', '', d)}"# what about armv7m devices which don't support -marm (e.g. Cortex-M3)?meta/conf/machine/include/arm/feature-arm-thumb.inc +1
-1-TARGET_CC_KERNEL_ARCH += "-mno-thumb-interwork -marm" +TARGET_CC_KERNEL_ARCH += "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '-mno-thumb-interwork -marm', '', d)}"Signature · 7 lines
1.9.1 -- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [PATCH 13/19] runqemu: add qemuarm64 support.
In reply to Khem RajQuoted 8 lines · Khem Raj
scripts/runqemu-internal else · line 55
Quoted 5 lines · Kai Kang
scripts/runqemu-internal +3
-0+ "qemuarm64") + mem_size=128 + ;;there is a limit on 32bit arm but is it same for 64bit as well ? if not can we use 512 or 256 atleast
I updated to 512 already. Thanks.
Signature · 2 lines
Regards, Neil | Kai Kang