Skip to contentSkip to conversation

V2: Add machine qemuarm64

PATCH In review Kai Kang 7 participants 51 messages Nov 7, 2014 – Dec 18, 2014

lore
Share & tools
lore

Kai Kang

author
#0 lore raw

cover V2: Add machine qemuarm64

V2:
* rebase on master and drop qemu upgrade commit
* built for lib32-core-image-sato core-image-sato-sdk meta-toolchain and world

V1:
The original configuration files and tune fils for arm arch64 are from linaro. And we rename it to qemuarm64 for consistency.

It has been tested for core-image-minimal core-image-sato core-image-sato-sdk meta-toolchain and world.

Know issue:
It was also built for multilib. With setting:

require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "armv7a"

build lib32 image such as lib32-core-image-sato successfully. But it fails to boot that run init fails. It seems to be a kernel issue.

The following changes since commit 7bd03ac24114b2c6015144a37e0c3fb4037baea6:

bitbake: toastergui: fix invalid build url usage (2014-11-06 16:45:23 +0000)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib kangkai/qemuarm64
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=kangkai/qemuarm64

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 (13):
linux-yocto: depend on libgcc for aarch64
Add machine qemuarm64
gcc-4.9: redefine default library install directory 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
libpng: add neon option for aarch64
runqemu: add qemuarm64 support.
kexec-tools: add aarch64 support packagegroup-core-tools-profile: remove sysprof for aarch64
qemu: add single step support for aarch64
Revert "gcc-4.9: redefine default library install directory"

Mark Hatle (6):
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 local.conf.sample: Add qemuarm64
poky.conf: Add support for aarch64 to QEMU

 meta-yocto/conf/distro/poky.conf                   |    2 +-
 meta-yocto/conf/local.conf.sample                  |    1 +
 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 +
 ...Collect-up-the-debug-cp-register-definiti.patch |  177 ++
 ...Allow-STATE_BOTH-reginfo-descriptions-for.patch |   57 +
 ...Provide-both-32-and-64-bit-versions-of-de.patch |   89 +
 ...get-arm-Adjust-debug-ID-registers-per-CPU.patch |  142 ++
 ...Don-t-allow-AArch32-to-access-RES0-CPSR-b.patch |  118 +
 ...Correctly-handle-PSTATE.SS-when-taking-ex.patch |   38 +
 ...Set-PSTATE.SS-correctly-on-exception-retu.patch |  152 ++
 ...A64-Avoid-duplicate-exit_tb-0-in-non-link.patch |   47 +
 ...Implement-ARMv8-single-step-handling-for-.patch |  302 +++
 ...Implement-ARMv8-single-stepping-for-AArch.patch |  212 ++
 ...t-arm-Implement-MDSCR_EL1-as-having-state.patch |   36 +
 meta/recipes-devtools/qemu/qemu_2.1.2.bb           |   13 +-
 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    |    1 +
 .../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.4.bb      |    1 +
 meta/site/arm-32                                   |   47 +
 meta/site/arm-64                                   |   46 +
 meta/site/arm-common                               |   38 -
 scripts/runqemu                                    |    5 +-
 scripts/runqemu-internal                           |   26 +
 57 files changed, 6045 insertions(+), 53 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-devtools/qemu/qemu/0001-target-arm-Collect-up-the-debug-cp-register-definiti.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/0002-target-arm-Allow-STATE_BOTH-reginfo-descriptions-for.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/0003-target-arm-Provide-both-32-and-64-bit-versions-of-de.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/0004-target-arm-Adjust-debug-ID-registers-per-CPU.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/0005-target-arm-Don-t-allow-AArch32-to-access-RES0-CPSR-b.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/0006-target-arm-Correctly-handle-PSTATE.SS-when-taking-ex.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/0007-target-arm-Set-PSTATE.SS-correctly-on-exception-retu.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/0008-target-arm-A64-Avoid-duplicate-exit_tb-0-in-non-link.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/0009-target-arm-Implement-ARMv8-single-step-handling-for-.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/0010-target-arm-Implement-ARMv8-single-stepping-for-AArch.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/0011-target-arm-Implement-MDSCR_EL1-as-having-state.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
author
#1 lore raw

PATCH 1/24 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
index 4ed3188..9018985 100644
@@ -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
author
#2 lore raw

PATCH 2/24 Add machine qemuarm64

In reply to Kai Kang

Add 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
new file mode 100644
index 0000000..c86142a
@@ -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
new file mode 100644
index 0000000..20bcfba
@@ -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
author
#4 lore raw

PATCH 4/24 gcc-4.9: redefine default library install directory

In reply to Kai Kang

Packages use 'aarch64-poky-linux-gcc -print-multi-os-directory' to get the value of install directory. The value is set by MULTILIB_OSDIRNAMES and default is '/lib64'. And the dynamic linker ld-linux-aarch64.so.1 from package eglibc is installed to /lib64.

But the default dynamic linker defined in gcc/config/aarch64/aarch64-linux.h is:

MULTILIB_OSDIRNAMES = .=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)

Then cause all the ELF files fail to launch because fail to find the linker and libraries.

Redefine default library install directory to /lib to fix this issue.

---
 meta/recipes-devtools/gcc/gcc-4.9.inc              |  1 +
 ...0099-gcc-redefine-library-dir-for-aarch64.patch | 29 ++++++++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100644 meta/recipes-devtools/gcc/gcc-4.9/0099-gcc-redefine-library-dir-for-aarch64.patch
meta/recipes-devtools/gcc/gcc-4.9.inc +1 -0
index 8f212b2..e3775cd 100644
@@ -73,6 +73,7 @@ SRC_URI = "\
     file://0056-top-level-reorder_gcc-bug-61144.patch \
     file://0058-gcc-r212171.patch \
     file://0059-gcc-PR-rtl-optimization-63348.patch \
+    file://0099-gcc-redefine-library-dir-for-aarch64.patch \
 "
 SRC_URI[md5sum] = "fddf71348546af523353bd43d34919c1"
 SRC_URI[sha256sum] = "d334781a124ada6f38e63b545e2a3b8c2183049515a1abab6d513f109f1d717e"
meta/recipes-devtools/gcc/gcc-4.9/0099-gcc-redefine-library-dir-for-aarch64.patch new file +29 -0
new file mode 100644
index 0000000..23cdb95
@@ -0,0 +1,29 @@
+Redefine default library directory for aarch64.
+
+Packages use 'aarch64-poky-linux-gcc -print-multi-os-directory' to get the
+value of install directory. The value is set by MULTILIB_OSDIRNAMES and default
+is '/lib64'. Add the dynamic linker ld-linux-aarch64.so.1 from package eglibc
+is installed to /lib64.
+
+But the default dynamic linker defined in gcc/config/aarch64/aarch64-linux.h
+is:
+
+#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}.so.1"
+
+Then cause all the ELF files fail to launch because fail to find the linker.
+
+Upstream-Status: Pending
+
+Signed-off-by: Kai Kang <[email protected]>
+---
+--- gcc-4.9.1/gcc/config/aarch64/t-aarch64-linux.orig	2014-09-19 14:38:47.550669143 +0800
++++ gcc-4.9.1/gcc/config/aarch64/t-aarch64-linux	2014-09-19 14:39:01.234669516 +0800
+@@ -22,7 +22,7 @@
+ 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)
++MULTILIB_OSDIRNAMES = .=../lib$(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
Signature · 1 line
1.9.1
author
#3 lore raw

PATCH 3/24 siteinfo: account for 32 and 64 bit arm

In reply to Kai Kang

From: 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
index e90632a..b41db46 100644
@@ -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
index 1893dc0..12e5d45 100644
@@ -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
author
#5 lore raw

PATCH 5/24 libc-package.bbclass: add aarch64 target to locale_arch_options

In reply to Kai Kang

Add 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
index c1bc399..5701e20 100644
@@ -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
author
#6 lore raw

PATCH 6/24 glibc-locale.inc: add aarch64 to BINARY_LOCALE_ARCHES

In reply to Kai Kang

Add 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
index d472605..df6d073 100644
@@ -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
author
#7 lore raw

PATCH 7/24 libatomics-ops: add aarch64 target iniitial support

In reply to Kai Kang

Add 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
new file mode 100644
index 0000000..a563b8b
@@ -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
index 4632d24..5a58228 100644
@@ -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
author
#8 lore raw

PATCH 8/24 qt4: add aarch64 support

In reply to Kai Kang

Add 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
index ae6692b..84f62fe 100644
@@ -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 \
            "
@@ -31,6 +35,9 @@ SRC_URI[sha256sum] = "8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa70
 
 S = "${WORKDIR}/qt-everywhere-opensource-src-${PV}"
 
+# 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
new file mode 100644
index 0000000..7132224
@@ -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
index bb16da6..70bda73 100644
@@ -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
index c1d35ab..07512db 100644
@@ -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
author
#9 lore raw

PATCH 9/24 libpng: add neon option for aarch64

In reply to Kai Kang

Add neon option for aarch64 just as for arm. It fails with:

| ./.libs/libpng16.so: undefined reference to `png_init_filter_functions_neon' | collect2: error: ld returned 1 exit status

---
 meta/recipes-multimedia/libpng/libpng_1.6.13.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-multimedia/libpng/libpng_1.6.13.bb +1 -0
index 0c6fd1f..3d32bfe 100644
@@ -20,6 +20,7 @@ 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_aarch64 = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off" ,d)}"
 
 PACKAGES =+ "${PN}-tools"
 
Signature · 1 line
1.9.1
author
#14 lore raw

PATCH 10/24 sysprof: disable build for aarch64

In reply to Kai Kang

From: 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
index ef1e270..cfc814f 100644
@@ -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
author
#15 lore raw

PATCH 11/24 lttng: recognize aarch64

In reply to Kai Kang

From: 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.4.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
new file mode 100644
index 0000000..cec5410
@@ -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
index 71ea5bc..e07d3c7 100644
@@ -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
new file mode 100644
index 0000000..c6cc8c2
@@ -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.4.bb +1 -0
index 963029e..083b4cb 100644
@@ -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] = "2ca6671b20a550aa0e8020a1a9a96fd4"
Signature · 1 line
1.9.1
author
#16 lore raw

PATCH 12/24 guile: allow compilation for aarch64

In reply to Kai Kang

From: 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
new file mode 100644
index 0000000..f1788b6
@@ -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
index bd23c2b..f2c0759 100644
@@ -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
author
#17 lore raw

PATCH 13/24 libunwind: add aarch64 support

In reply to Kai Kang

From: 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
new file mode 100644
index 0000000..228ec32
@@ -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
index b27b9e5..6743b21 100644
@@ -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
index bc38e36..2e52430 100644
@@ -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
author
#22 lore raw

PATCH 14/24 runqemu: add qemuarm64 support.

In reply to Kai Kang

Update 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
index ff64a1d..da35bb8 100755
@@ -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
index 38745dd..c219419 100755
@@ -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
author
#23 lore raw

PATCH 15/24 kexec-tools: add aarch64 support

In reply to Kai Kang

Add 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
index 7e3b7ad..312424a 100644
@@ -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
index 559bc6a..c478732 100644
@@ -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
author
#24 lore raw

PATCH 16/24 packagegroup-core-tools-profile: remove sysprof for aarch64

In reply to Kai Kang

Remove 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
index 41d2548..3cf7027 100644
@@ -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
author
#32 lore raw

PATCH 17/24 qemu: add single step support for aarch64

In reply to Kai Kang

Backport patches to enable signle-step support for aarch64.

---
 ...Collect-up-the-debug-cp-register-definiti.patch | 177 ++++++++++++
 ...Allow-STATE_BOTH-reginfo-descriptions-for.patch |  57 ++++
 ...Provide-both-32-and-64-bit-versions-of-de.patch |  89 ++++++
 ...get-arm-Adjust-debug-ID-registers-per-CPU.patch | 142 ++++++++++
 ...Don-t-allow-AArch32-to-access-RES0-CPSR-b.patch | 118 ++++++++
 ...Correctly-handle-PSTATE.SS-when-taking-ex.patch |  38 +++
 ...Set-PSTATE.SS-correctly-on-exception-retu.patch | 152 +++++++++++
 ...A64-Avoid-duplicate-exit_tb-0-in-non-link.patch |  47 ++++
 ...Implement-ARMv8-single-step-handling-for-.patch | 302 +++++++++++++++++++++
 ...Implement-ARMv8-single-stepping-for-AArch.patch | 212 +++++++++++++++
 ...t-arm-Implement-MDSCR_EL1-as-having-state.patch |  36 +++
 meta/recipes-devtools/qemu/qemu_2.1.2.bb           |  13 +-
 12 files changed, 1382 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-devtools/qemu/qemu/0001-target-arm-Collect-up-the-debug-cp-register-definiti.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/0002-target-arm-Allow-STATE_BOTH-reginfo-descriptions-for.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/0003-target-arm-Provide-both-32-and-64-bit-versions-of-de.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/0004-target-arm-Adjust-debug-ID-registers-per-CPU.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/0005-target-arm-Don-t-allow-AArch32-to-access-RES0-CPSR-b.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/0006-target-arm-Correctly-handle-PSTATE.SS-when-taking-ex.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/0007-target-arm-Set-PSTATE.SS-correctly-on-exception-retu.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/0008-target-arm-A64-Avoid-duplicate-exit_tb-0-in-non-link.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/0009-target-arm-Implement-ARMv8-single-step-handling-for-.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/0010-target-arm-Implement-ARMv8-single-stepping-for-AArch.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/0011-target-arm-Implement-MDSCR_EL1-as-having-state.patch
meta/recipes-devtools/qemu/qemu/0001-target-arm-Collect-up-the-debug-cp-register-definiti.patch new file +177 -0
new file mode 100644
index 0000000..84c9c86
@@ -0,0 +1,177 @@
+From 503006983a19be0b481946afac2cab0bdd21f124 Mon Sep 17 00:00:00 2001
+From: Peter Maydell <[email protected]>
+Date: Tue, 19 Aug 2014 18:56:25 +0100
+Subject: [PATCH 01/11] target-arm: Collect up the debug cp register
+ definitions
+
+At the moment we have a mixed set of mostly dummy register
+definitions for various debug related registers which have
+been added piecemeal in order to get Linux kernels to boot.
+In preparation for actually implementing debug support,
+bring them all together into one place.
+
+This commit doesn't change behaviour: we still expose
+exactly the same registers and behaviour to the guest
+in all configurations.
+
+Signed-off-by: Peter Maydell <[email protected]>
+Reviewed-by: Edgar E. Iglesias <[email protected]>
+
+Upstream-Status: Backport
+Signed-off-by: Kai Kang <[email protected]>
+---
+ target-arm/helper.c | 85 +++++++++++++++++++++++++++++++++--------------------
+ 1 file changed, 53 insertions(+), 32 deletions(-)
+
+diff --git a/target-arm/helper.c b/target-arm/helper.c
+index f630d96..a9be7ba 100644
+--- a/target-arm/helper.c
++++ b/target-arm/helper.c
+@@ -389,12 +389,6 @@ static void tlbimvaa_write(CPUARMState *env, const ARMCPRegInfo *ri,
+ }
+ 
+ static const ARMCPRegInfo cp_reginfo[] = {
+-    /* DBGDIDR: just RAZ. In particular this means the "debug architecture
+-     * version" bits will read as a reserved value, which should cause
+-     * Linux to not try to use the debug hardware.
+-     */
+-    { .name = "DBGDIDR", .cp = 14, .crn = 0, .crm = 0, .opc1 = 0, .opc2 = 0,
+-      .access = PL0_R, .type = ARM_CP_CONST, .resetvalue = 0 },
+     { .name = "FCSEIDR", .cp = 15, .crn = 13, .crm = 0, .opc1 = 0, .opc2 = 0,
+       .access = PL1_RW, .fieldoffset = offsetof(CPUARMState, cp15.c13_fcse),
+       .resetvalue = 0, .writefn = fcse_write, .raw_writefn = raw_write, },
+@@ -471,6 +465,13 @@ static const ARMCPRegInfo not_v7_cp_reginfo[] = {
+     { .name = "DUMMY", .cp = 15, .crn = 0, .crm = 0, .opc1 = 1, .opc2 = CP_ANY,
+       .access = PL1_R, .type = ARM_CP_CONST | ARM_CP_NO_MIGRATE,
+       .resetvalue = 0 },
++    /* We don't implement pre-v7 debug but most CPUs had at least a DBGDIDR;
++     * implementing it as RAZ means the "debug architecture version" bits
++     * will read as a reserved value, which should cause Linux to not try
++     * to use the debug hardware.
++     */
++    { .name = "DBGDIDR", .cp = 14, .crn = 0, .crm = 0, .opc1 = 0, .opc2 = 0,
++      .access = PL0_R, .type = ARM_CP_CONST, .resetvalue = 0 },
+     REGINFO_SENTINEL
+ };
+ 
+@@ -712,13 +713,6 @@ static uint64_t isr_read(CPUARMState *env, const ARMCPRegInfo *ri)
+ }
+ 
+ static const ARMCPRegInfo v7_cp_reginfo[] = {
+-    /* DBGDRAR, DBGDSAR: always RAZ since we don't implement memory mapped
+-     * debug components
+-     */
+-    { .name = "DBGDRAR", .cp = 14, .crn = 1, .crm = 0, .opc1 = 0, .opc2 = 0,
+-      .access = PL0_R, .type = ARM_CP_CONST, .resetvalue = 0 },
+-    { .name = "DBGDSAR", .cp = 14, .crn = 2, .crm = 0, .opc1 = 0, .opc2 = 0,
+-      .access = PL0_R, .type = ARM_CP_CONST, .resetvalue = 0 },
+     /* the old v6 WFI, UNPREDICTABLE in v7 but we choose to NOP */
+     { .name = "NOP", .cp = 15, .crn = 7, .crm = 0, .opc1 = 0, .opc2 = 4,
+       .access = PL1_W, .type = ARM_CP_NOP },
+@@ -1734,11 +1728,6 @@ static const ARMCPRegInfo lpae_cp_reginfo[] = {
+     { .name = "AMAIR1", .cp = 15, .crn = 10, .crm = 3, .opc1 = 0, .opc2 = 1,
+       .access = PL1_RW, .type = ARM_CP_CONST | ARM_CP_OVERRIDE,
+       .resetvalue = 0 },
+-    /* 64 bit access versions of the (dummy) debug registers */
+-    { .name = "DBGDRAR", .cp = 14, .crm = 1, .opc1 = 0,
+-      .access = PL0_R, .type = ARM_CP_CONST|ARM_CP_64BIT, .resetvalue = 0 },
+-    { .name = "DBGDSAR", .cp = 14, .crm = 2, .opc1 = 0,
+-      .access = PL0_R, .type = ARM_CP_CONST|ARM_CP_64BIT, .resetvalue = 0 },
+     { .name = "PAR", .cp = 15, .crm = 7, .opc1 = 0,
+       .access = PL1_RW, .type = ARM_CP_64BIT,
+       .fieldoffset = offsetof(CPUARMState, cp15.par_el1), .resetvalue = 0 },
+@@ -2083,16 +2072,6 @@ static const ARMCPRegInfo v8_cp_reginfo[] = {
+       .opc1 = 0, .crn = 3, .crm = 0, .opc2 = 0,
+       .access = PL1_RW, .fieldoffset = offsetof(CPUARMState, cp15.c3),
+       .resetvalue = 0, .writefn = dacr_write, .raw_writefn = raw_write, },
+-    /* Dummy implementation of monitor debug system control register:
+-     * we don't support debug.
+-     */
+-    { .name = "MDSCR_EL1", .state = ARM_CP_STATE_AA64,
+-      .opc0 = 2, .opc1 = 0, .crn = 0, .crm = 2, .opc2 = 2,
+-      .access = PL1_RW, .type = ARM_CP_CONST, .resetvalue = 0 },
+-    /* We define a dummy WI OSLAR_EL1, because Linux writes to it. */
+-    { .name = "OSLAR_EL1", .state = ARM_CP_STATE_AA64,
+-      .opc0 = 2, .opc1 = 0, .crn = 1, .crm = 0, .opc2 = 4,
+-      .access = PL1_W, .type = ARM_CP_NOP },
+     { .name = "ELR_EL1", .state = ARM_CP_STATE_AA64,
+       .type = ARM_CP_NO_MIGRATE,
+       .opc0 = 3, .opc1 = 0, .crn = 4, .crm = 0, .opc2 = 1,
+@@ -2206,13 +2185,55 @@ static CPAccessResult ctr_el0_access(CPUARMState *env, const ARMCPRegInfo *ri)
+     return CP_ACCESS_OK;
+ }
+ 
+-static void define_aarch64_debug_regs(ARMCPU *cpu)
++static const ARMCPRegInfo debug_cp_reginfo[] = {
++    /* DBGDIDR: just RAZ. In particular this means the "debug architecture
++     * version" bits will read as a reserved value, which should cause
++     * Linux to not try to use the debug hardware.
++     */
++    { .name = "DBGDIDR", .cp = 14, .crn = 0, .crm = 0, .opc1 = 0, .opc2 = 0,
++      .access = PL0_R, .type = ARM_CP_CONST, .resetvalue = 0 },
++    /* DBGDRAR, DBGDSAR: always RAZ since we don't implement memory mapped
++     * debug components
++     */
++    { .name = "DBGDRAR", .cp = 14, .crn = 1, .crm = 0, .opc1 = 0, .opc2 = 0,
++      .access = PL0_R, .type = ARM_CP_CONST, .resetvalue = 0 },
++    { .name = "DBGDSAR", .cp = 14, .crn = 2, .crm = 0, .opc1 = 0, .opc2 = 0,
++      .access = PL0_R, .type = ARM_CP_CONST, .resetvalue = 0 },
++    /* Dummy implementation of monitor debug system control register:
++     * we don't support debug.
++     */
++    { .name = "MDSCR_EL1", .state = ARM_CP_STATE_AA64,
++      .opc0 = 2, .opc1 = 0, .crn = 0, .crm = 2, .opc2 = 2,
++      .access = PL1_RW, .type = ARM_CP_CONST, .resetvalue = 0 },
++    /* We define a dummy WI OSLAR_EL1, because Linux writes to it. */
++    { .name = "OSLAR_EL1", .state = ARM_CP_STATE_AA64,
++      .opc0 = 2, .opc1 = 0, .crn = 1, .crm = 0, .opc2 = 4,
++      .access = PL1_W, .type = ARM_CP_NOP },
++    REGINFO_SENTINEL
++};
++
++static const ARMCPRegInfo debug_lpae_cp_reginfo[] = {
++    /* 64 bit access versions of the (dummy) debug registers */
++    { .name = "DBGDRAR", .cp = 14, .crm = 1, .opc1 = 0,
++      .access = PL0_R, .type = ARM_CP_CONST|ARM_CP_64BIT, .resetvalue = 0 },
++    { .name = "DBGDSAR", .cp = 14, .crm = 2, .opc1 = 0,
++      .access = PL0_R, .type = ARM_CP_CONST|ARM_CP_64BIT, .resetvalue = 0 },
++    REGINFO_SENTINEL
++};
++
++static void define_debug_regs(ARMCPU *cpu)
+ {
+-    /* Define breakpoint and watchpoint registers. These do nothing
+-     * but read as written, for now.
++    /* Define v7 and v8 architectural debug registers.
++     * These are just dummy implementations for now.
+      */
+     int i;
+ 
++    define_arm_cp_regs(cpu, debug_cp_reginfo);
++
++    if (arm_feature(&cpu->env, ARM_FEATURE_LPAE)) {
++        define_arm_cp_regs(cpu, debug_lpae_cp_reginfo);
++    }
++
+     for (i = 0; i < 16; i++) {
+         ARMCPRegInfo dbgregs[] = {
+             { .name = "DBGBVR", .state = ARM_CP_STATE_AA64,
+@@ -2353,6 +2374,7 @@ void register_cp_regs_for_features(ARMCPU *cpu)
+         };
+         define_one_arm_cp_reg(cpu, &clidr);
+         define_arm_cp_regs(cpu, v7_cp_reginfo);
++        define_debug_regs(cpu);
+     } else {
+         define_arm_cp_regs(cpu, not_v7_cp_reginfo);
+     }
+@@ -2426,7 +2448,6 @@ void register_cp_regs_for_features(ARMCPU *cpu)
+         define_one_arm_cp_reg(cpu, &rvbar);
+         define_arm_cp_regs(cpu, v8_idregs);
+         define_arm_cp_regs(cpu, v8_cp_reginfo);
+-        define_aarch64_debug_regs(cpu);
+     }
+     if (arm_feature(env, ARM_FEATURE_EL2)) {
+         define_arm_cp_regs(cpu, v8_el2_cp_reginfo);
+-- 
+2.1.1.273.g97b8860
+
meta/recipes-devtools/qemu/qemu/0002-target-arm-Allow-STATE_BOTH-reginfo-descriptions-for.patch new file +57 -0

57 lines not on this page · raw message

meta/recipes-devtools/qemu/qemu/0003-target-arm-Provide-both-32-and-64-bit-versions-of-de.patch new file +89 -0

89 lines not on this page · raw message

meta/recipes-devtools/qemu/qemu/0004-target-arm-Adjust-debug-ID-registers-per-CPU.patch new file +142 -0

142 lines not on this page · raw message

meta/recipes-devtools/qemu/qemu/0005-target-arm-Don-t-allow-AArch32-to-access-RES0-CPSR-b.patch new file +118 -0

118 lines not on this page · raw message

meta/recipes-devtools/qemu/qemu/0006-target-arm-Correctly-handle-PSTATE.SS-when-taking-ex.patch new file +38 -0
new file mode 100644
index 0000000..2c824e0
@@ -0,0 +1,38 @@
+From 662cefb7753c1f04d960b443c60e7622c83144d3 Mon Sep 17 00:00:00 2001
+From: Peter Maydell <[email protected]>
+Date: Tue, 19 Aug 2014 18:56:26 +0100
+Subject: [PATCH 06/11] target-arm: Correctly handle PSTATE.SS when taking
+ exception to AArch32
+
+When an exception is taken to AArch32, we must clear the PSTATE.SS
+bit for the exception handler, and must also ensure that the SS bit
+is not set in the value saved to SPSR_<mode>. Achieve both of these
+aims by clearing the bit in uncached_cpsr before saving it to the SPSR.
+
+Signed-off-by: Peter Maydell <[email protected]>
+Reviewed-by: Edgar E. Iglesias <[email protected]>
+
+Upstream-Status: Backport
+Signed-off-by: Kai Kang <[email protected]>
+---
+ target-arm/helper.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/target-arm/helper.c b/target-arm/helper.c
+index 22bf6d3..f981569 100644
+--- a/target-arm/helper.c
++++ b/target-arm/helper.c
+@@ -3550,6 +3550,10 @@ void arm_cpu_do_interrupt(CPUState *cs)
+         addr += env->cp15.vbar_el[1];
+     }
+     switch_mode (env, new_mode);
++    /* For exceptions taken to AArch32 we must clear the SS bit in both
++     * PSTATE and in the old-state value we save to SPSR_<mode>, so zero it now.
++     */
++    env->uncached_cpsr &= ~PSTATE_SS;
+     env->spsr = cpsr_read(env);
+     /* Clear IT bits.  */
+     env->condexec_bits = 0;
+-- 
+2.1.1.273.g97b8860
+
meta/recipes-devtools/qemu/qemu/0007-target-arm-Set-PSTATE.SS-correctly-on-exception-retu.patch new file +152 -0

152 lines not on this page · raw message

meta/recipes-devtools/qemu/qemu/0008-target-arm-A64-Avoid-duplicate-exit_tb-0-in-non-link.patch new file +47 -0

47 lines not on this page · raw message

meta/recipes-devtools/qemu/qemu/0009-target-arm-Implement-ARMv8-single-step-handling-for-.patch new file +302 -0

302 lines not on this page · raw message

meta/recipes-devtools/qemu/qemu/0010-target-arm-Implement-ARMv8-single-stepping-for-AArch.patch new file +212 -0

212 lines not on this page · raw message

meta/recipes-devtools/qemu/qemu/0011-target-arm-Implement-MDSCR_EL1-as-having-state.patch new file +36 -0
new file mode 100644
index 0000000..28c76ad
@@ -0,0 +1,36 @@
+From 0e5e8935bb93e80bb95dc79f51f5bf874ba2ab99 Mon Sep 17 00:00:00 2001
+From: Peter Maydell <[email protected]>
+Date: Tue, 19 Aug 2014 18:56:27 +0100
+Subject: [PATCH 11/11] target-arm: Implement MDSCR_EL1 as having state
+
+Now that all the new code to support single-stepping is in
+place, wire up the guest-visible MDSCR_EL1, so the guest
+can enable single-stepping.
+
+Signed-off-by: Peter Maydell <[email protected]>
+Reviewed-by: Edgar E. Iglesias <[email protected]>
+
+Upstream-Status: Backport
+Signed-off-by: Kai Kang <[email protected]>
+---
+ target-arm/helper.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/target-arm/helper.c b/target-arm/helper.c
+index f981569..2a77c97 100644
+--- a/target-arm/helper.c
++++ b/target-arm/helper.c
+@@ -2204,7 +2204,9 @@ static const ARMCPRegInfo debug_cp_reginfo[] = {
+      */
+     { .name = "MDSCR_EL1", .state = ARM_CP_STATE_BOTH,
+       .cp = 14, .opc0 = 2, .opc1 = 0, .crn = 0, .crm = 2, .opc2 = 2,
+-      .access = PL1_RW, .type = ARM_CP_CONST, .resetvalue = 0 },
++      .access = PL1_RW,
++      .fieldoffset = offsetof(CPUARMState, cp15.mdscr_el1),
++      .resetvalue = 0 },
+     /* We define a dummy WI OSLAR_EL1, because Linux writes to it. */
+     { .name = "OSLAR_EL1", .state = ARM_CP_STATE_BOTH,
+       .cp = 14, .opc0 = 2, .opc1 = 0, .crn = 1, .crm = 0, .opc2 = 4,
+-- 
+2.1.1.273.g97b8860
+
meta/recipes-devtools/qemu/qemu_2.1.2.bb +12 -1
index 0e20605..46ee897 100644
@@ -6,7 +6,18 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
 SRC_URI += "file://configure-fix-Darwin-target-detection.patch \
             file://qemu-enlarge-env-entry-size.patch \
             file://Qemu-Arm-versatilepb-Add-memory-size-checking.patch \
-            "
+            file://0001-target-arm-Collect-up-the-debug-cp-register-definiti.patch \
+            file://0002-target-arm-Allow-STATE_BOTH-reginfo-descriptions-for.patch \
+            file://0003-target-arm-Provide-both-32-and-64-bit-versions-of-de.patch \
+            file://0004-target-arm-Adjust-debug-ID-registers-per-CPU.patch \
+            file://0005-target-arm-Don-t-allow-AArch32-to-access-RES0-CPSR-b.patch \
+            file://0006-target-arm-Correctly-handle-PSTATE.SS-when-taking-ex.patch \
+            file://0007-target-arm-Set-PSTATE.SS-correctly-on-exception-retu.patch \
+            file://0008-target-arm-A64-Avoid-duplicate-exit_tb-0-in-non-link.patch \
+            file://0009-target-arm-Implement-ARMv8-single-step-handling-for-.patch \
+            file://0010-target-arm-Implement-ARMv8-single-stepping-for-AArch.patch \
+            file://0011-target-arm-Implement-MDSCR_EL1-as-having-state.patch \
+           "
 SRC_URI_prepend = "http://wiki.qemu-project.org/download/${BP}.tar.bz2"
 SRC_URI[md5sum] = "0ff197c4ed4b695620bc4734e77c888f"
 SRC_URI[sha256sum] = "fd10f5e45cf5a736fa5a3e1c279ae9821534e700beb7d1aab88a07648a394885"
Signature · 1 line
1.9.1
author
#35 lore raw

PATCH 18/24 Revert "gcc-4.9: redefine default library install directory"

In reply to Kai Kang

This reverts commit 208c5e37f98cd98629bad0562fbbc77d7b71e8ff.

GCC can choose the right value as defined by the system, it's the libc that needs to know how to get to the ABI specific version of the dynamic loader. Which is in /lib even if aarch64 libraries are installed in lib64 due to the specifications in the ABI.

---
 meta/recipes-devtools/gcc/gcc-4.9.inc              |  1 -
 ...0099-gcc-redefine-library-dir-for-aarch64.patch | 29 ----------------------
 2 files changed, 30 deletions(-)
 delete mode 100644 meta/recipes-devtools/gcc/gcc-4.9/0099-gcc-redefine-library-dir-for-aarch64.patch
meta/recipes-devtools/gcc/gcc-4.9.inc +0 -1
index e3775cd..8f212b2 100644
@@ -73,7 +73,6 @@ SRC_URI = "\
     file://0056-top-level-reorder_gcc-bug-61144.patch \
     file://0058-gcc-r212171.patch \
     file://0059-gcc-PR-rtl-optimization-63348.patch \
-    file://0099-gcc-redefine-library-dir-for-aarch64.patch \
 "
 SRC_URI[md5sum] = "fddf71348546af523353bd43d34919c1"
 SRC_URI[sha256sum] = "d334781a124ada6f38e63b545e2a3b8c2183049515a1abab6d513f109f1d717e"
meta/recipes-devtools/gcc/gcc-4.9/0099-gcc-redefine-library-dir-for-aarch64.patch deleted +0 -29
deleted file mode 100644
index 23cdb95..0000000
@@ -1,29 +0,0 @@
-Redefine default library directory for aarch64.
-
-Packages use 'aarch64-poky-linux-gcc -print-multi-os-directory' to get the
-value of install directory. The value is set by MULTILIB_OSDIRNAMES and default
-is '/lib64'. Add the dynamic linker ld-linux-aarch64.so.1 from package eglibc
-is installed to /lib64.
-
-But the default dynamic linker defined in gcc/config/aarch64/aarch64-linux.h
-is:
-
-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}.so.1"
-
-Then cause all the ELF files fail to launch because fail to find the linker.
-
-Upstream-Status: Pending
-
-Signed-off-by: Kai Kang <[email protected]>
----
---- gcc-4.9.1/gcc/config/aarch64/t-aarch64-linux.orig	2014-09-19 14:38:47.550669143 +0800
-+++ gcc-4.9.1/gcc/config/aarch64/t-aarch64-linux	2014-09-19 14:39:01.234669516 +0800
-@@ -22,7 +22,7 @@
- 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)
-+MULTILIB_OSDIRNAMES = .=../lib$(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
Signature · 1 line
1.9.1
author
#36 lore raw

PATCH 19/24 gcc: Disable aarch64 multilib options

In reply to Kai Kang

From: 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
index 8f212b2..2568e99 100644
@@ -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
new file mode 100644
index 0000000..f295596
@@ -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
author
#39 lore raw

PATCH 20/24 glibc-package: aarch64 enable symlink for ABI compliance

In reply to Kai Kang

From: 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
index 6212e5b..984362e 100644
@@ -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
author
#40 lore raw

PATCH 21/24 aarch-arm64: Update tune files

In reply to 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.

---
 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
new file mode 100644
index 0000000..5376b87
@@ -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
index c86142a..5e832fa 100644
@@ -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
index a94386f..8e6619d 100644
@@ -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
author
#41 lore raw

PATCH 22/24 linux-yocto: Fixup linux-yocto for aarch64

In reply to Kai Kang

From: 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
index 9018985..7416af9 100644
@@ -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
index a2f4b4d..2213884 100644
@@ -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
index 3838dbf..15c9b24 100644
@@ -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
author
#42 lore raw

PATCH 23/24 local.conf.sample: Add qemuarm64

In reply to Kai Kang

From: Mark Hatle <[email protected]>

Add an example machine configuration for qemuarm64.

---
 meta-yocto/conf/local.conf.sample | 1 +
 1 file changed, 1 insertion(+)
meta-yocto/conf/local.conf.sample +1 -0
index 93c85c2..a1d99f9 100644
@@ -18,6 +18,7 @@
 # of emulated machines available which can boot and run in the QEMU emulator:
 #
 #MACHINE ?= "qemuarm"
+#MACHINE ?= "qemuarm64"
 #MACHINE ?= "qemumips"
 #MACHINE ?= "qemuppc"
 #MACHINE ?= "qemux86"
Signature · 1 line
1.9.1
author
#43 lore raw

PATCH 24/24 poky.conf: Add support for aarch64 to QEMU

In reply to Kai Kang

From: Mark Hatle <[email protected]>

---
 meta-yocto/conf/distro/poky.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-yocto/conf/distro/poky.conf +1 -1
index e1dfea4..9e22e54 100644
@@ -44,7 +44,7 @@ DISTRO_EXTRA_RDEPENDS_append_qemux86-64 = " ${POKYQEMUDEPS}"
 
 TCLIBCAPPEND = ""
 
-QEMU_TARGETS ?= "arm i386 mips mipsel ppc x86_64"
+QEMU_TARGETS ?= "arm aarch64 i386 mips mipsel ppc x86_64"
 # Other QEMU_TARGETS "mips64 mips64el sh4"
 
 PREMIRRORS ??= "\
Signature · 1 line
1.9.1
#44 lore raw
In reply to Kai Kang
Quoted 10 lines

Op 7 nov. 2014, om 09:51 heeft Kai Kang <[email protected]> het volgende geschreven:

V2:
* rebase on master and drop qemu upgrade commit
* built for lib32-core-image-sato core-image-sato-sdk meta-toolchain and world

V1:
The original configuration files and tune fils for arm arch64 are from linaro. And we rename it to qemuarm64 for consistency.

Consistent to what? All current qemu machines are named after the qemu arch, so consistent would be 'qemuaarch64'. The 'arm64' moniker is *only* used in the kernel and that was caused by Linus being grumpy, everything else is 'aarch64' or 'armv8'

#47 lore raw
In reply to Kai Kang
Quoted 3 lines · Kai Kang

gcc-4.9: redefine default library install directory

Revert "gcc-4.9: redefine default library install directory"

Can the original commit just be removed from the series rather than reverted?

Thanks,

Signature · 4 lines
Paul Barker

Email: [email protected]
http://www.paulbarker.me.uk
#45 lore raw
In reply to Koen Kooi
Quoted 7 lines · Koen Kooi
Quoted 7 lines

Op 7 nov. 2014, om 09:51 heeft Kai Kang <[email protected]> het volgende geschreven:

V2:
* rebase on master and drop qemu upgrade commit
* built for lib32-core-image-sato core-image-sato-sdk meta-toolchain and world

Quoted 6 lines
Quoted 3 lines

V1:
The original configuration files and tune fils for arm arch64 are from linaro. And we rename it to qemuarm64 for consistency.

Consistent to what? All current qemu machines are named after the qemu arch, so consistent would be 'qemuaarch64'. The 'arm64' moniker is *only* used in the kernel and that was caused by Linus being grumpy, everything else is 'aarch64' or 'armv8'

The arm64 name -did- come from Linaro:

http://git.linaro.org/openembedded/meta-linaro.git/tree/HEAD:/meta-aarch64/conf/machine/include

The arch-armv8.inc file (that arch-arm64.inc was based on) is located in the directly "arm64".

In addition, the tune file that forms the basis of the ARM tunes is called 'arch-arm.inc'. Not arch-aarch32.inc. If you want to rename that, we can discuss it.. but to match that naming I chose 'arch-arm64.inc'.

(arch-armv8.inc was kept, but only includes the arch-arm64.inc file since there are no custom optimizations for 'v8' that I can find.)

As far as the machine name goes the original Linaro version, genericarmv8.conf and genericarmv8b.conf, don't match any of the naming conventions that are currently used by QEMU BSPs.

Looking at the existing machine names:

qemuarm.conf qemumips64.conf qemumips.conf qemuppc.conf qemux86-64.conf qemux86.conf

Each of the suffix names used match the Linux kernel arch naming.

So based on that reasoning the generic little endian machine was defined as qemuarm64.conf.

--Mark

author
#48 lore raw
In reply to Paul Barker
Quoted 4 lines · Paul Barker
Quoted 2 lines · Kai Kang

gcc-4.9: redefine default library install directory Revert "gcc-4.9: redefine default library install directory"

Can the original commit just be removed from the series rather than reverted?

We just want to keep the history how we get here. If nobody cares it, I'll remove them.

Thanks,
--Kai

Quoted 3 lines

Thanks,

Signature · 2 lines
Regards,
Neil | Kai Kang
#49 lore raw
Quoted 10 lines · Kang Kai

gcc-4.9: redefine default library install directory

Quoted 5 lines
Quoted 2 lines

Revert "gcc-4.9: redefine default library install directory"

Can the original commit just be removed from the series rather than reverted?

We just want to keep the history how we get here. If nobody cares it, I'll remove them.

Nothing is gained by knowing that you tried something and it was wrong. If nothing else is required to be done to this series then we'll remove that pair when merging.

Ross

author
#50 lore raw
Quoted 8 lines · Ross
Quoted 6 lines · Kang Kai

gcc-4.9: redefine default library install directory

Quoted 5 lines
Quoted 2 lines

Revert "gcc-4.9: redefine default library install directory"

Can the original commit just be removed from the series rather than reverted?

Quoted 6 lines
Quoted 3 lines

We just want to keep the history how we get here. If nobody cares it, I'll remove them.

Nothing is gained by knowing that you tried something and it was wrong. If nothing else is required to be done to this series then we'll remove that pair when merging.

OK. I also dropped the 2 commit on branch poky-contrib/kangkai/qemuarm64.

--Kai

Quoted 3 lines

Ross

Signature · 2 lines
Regards,
Neil | Kai Kang
#46 lore raw
In reply to Mark Hatle
CC ing Steve M. from ARM who went through various arm naming issues for debian.
Quoted 17 lines

Op 7 nov. 2014, om 15:27 heeft Mark Hatle <[email protected]> het volgende geschreven:

Quoted 7 lines · Koen Kooi
Quoted 7 lines

Op 7 nov. 2014, om 09:51 heeft Kai Kang <[email protected]> het volgende geschreven:

V2:
* rebase on master and drop qemu upgrade commit
* built for lib32-core-image-sato core-image-sato-sdk meta-toolchain and world

Quoted 6 lines
Quoted 3 lines

V1:
The original configuration files and tune fils for arm arch64 are from linaro. And we rename it to qemuarm64 for consistency.

Consistent to what? All current qemu machines are named after the qemu arch, so consistent would be 'qemuaarch64'. The 'arm64' moniker is *only* used in the kernel and that was caused by Linus being grumpy, everything else is 'aarch64' or 'armv8'

Quoted 7 lines

The arm64 name -did- come from Linaro:

http://git.linaro.org/openembedded/meta-linaro.git/tree/HEAD:/meta-aarch64/conf/machine/include

The arch-armv8.inc file (that arch-arm64.inc was based on) is located in the directly "arm64".

In addition, the tune file that forms the basis of the ARM tunes is called 'arch-arm.inc'. Not arch-aarch32.inc. If you want to rename that, we can discuss it.. but to match that naming I chose 'arch-arm64.inc'.

'aarch32' is not the same as 'arm', the arch-arm.inc covers armv4..armv7a with it various includes. aarch32 is s subset of armv7a, so please don't use that to denote 32bit arms.

Quoted 9 lines

(arch-armv8.inc was kept, but only includes the arch-arm64.inc file since there are no custom optimizations for 'v8' that I can find.)

As far as the machine name goes the original Linaro version, genericarmv8.conf and genericarmv8b.conf, don't match any of the naming conventions that are currently used by QEMU BSPs.

Looking at the existing machine names:

qemuarm.conf qemumips64.conf qemumips.conf qemuppc.conf qemux86-64.conf qemux86.conf

Each of the suffix names used match the Linux kernel arch naming.

It seems to be following the qemu architecture name, which tends to match the kernel arch name, but not always.

Apart from the naming issues, aarch64 support is incomplete in meta-aarch64 since things like ILP32 are missing as well as agreement over page size options.

#25 lore raw

Re: [PATCH 16/24] packagegroup-core-tools-profile: remove sysprof for aarch64

In reply to Kai Kang

meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb PACKAGE_ARCH = "${MACHINE_ARCH}" · line 16

Quoted 3 lines · Kai Kang
meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb +2 -0
+# sysprof doesn't support aarch64
+PROFILE_TOOLS_X_aarch64 = ""

The rest of the file uses for example SYSPROF and SYSPROF_aarch64, please match the existing pattern.

Ross

#37 lore raw

Re: [PATCH 19/24] gcc: Disable aarch64 multilib options

In reply to Kai Kang

meta/recipes-devtools/gcc/gcc-4.9/0057-aarch64-config.patch line 10

Quoted 12 lines · Kai Kang
meta/recipes-devtools/gcc/gcc-4.9/0057-aarch64-config.patch new file +4 -0
+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

meta/recipes-devtools/gcc/gcc-4.9/0057-aarch64-config.patch new file +6 -0
+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]>

This patch is missing an Upstream-Status header.

Ross

#33 lore raw

Re: [PATCH 17/24] qemu: add single step support for aarch64

In reply to Kai Kang
Quoted 2 lines · Kai Kang

Backport patches to enable signle-step support for aarch64.

As these are all related, can they be concatenated into a single patch?

Ross

#18 lore raw

Re: [PATCH 13/24] libunwind: add aarch64 support

In reply to Kai Kang
Quoted 3 lines · Kai Kang

- Support-building-with-older-compilers (fix undefined reference to `unreachable' on older compilers)

This patch is missing a signed-off-by header, and considering that oe-core has gcc 4.9 do we still need this, or is it specific to a commercial product that is using an older toolchain?

Ross

author
#26 lore raw

Re: [PATCH 16/24] packagegroup-core-tools-profile: remove sysprof for aarch64

In reply to Burton, Ross
Quoted 7 lines · Ross

meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb PACKAGE_ARCH = "${MACHINE_ARCH}" · line 16

Quoted 3 lines · Kai Kang
meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb +2 -0
+# sysprof doesn't support aarch64
+PROFILE_TOOLS_X_aarch64 = ""

The rest of the file uses for example SYSPROF and SYSPROF_aarch64, please match the existing pattern.

In the following var definition, it uses PROFILE_TOOLS_X:

RRECOMMENDS_${PN} = "\
    perf \
    trace-cmd \
    kernel-module-oprofile \
    blktrace \
    ${PROFILE_TOOLS_X} \
    ${PROFILE_TOOLS_SYSTEMD} \
    "

I suppose that use SYSPROF_aarch64 doesn't work here.

--Kai

Quoted 3 lines

Ross

Signature · 2 lines
Regards,
Neil | Kai Kang
author
#34 lore raw

Re: [PATCH 17/24] qemu: add single step support for aarch64

In reply to Burton, Ross
Quoted 5 lines · Ross
Quoted 2 lines · Kai Kang

Backport patches to enable signle-step support for aarch64.

As these are all related, can they be concatenated into a single patch?

OK if you think that is better. I'll update it.

--Kai

Quoted 3 lines

Ross

Signature · 2 lines
Regards,
Neil | Kai Kang
author
#38 lore raw

Re: [PATCH 19/24] gcc: Disable aarch64 multilib options

In reply to Burton, Ross
Quoted 15 lines · Ross

meta/recipes-devtools/gcc/gcc-4.9/0057-aarch64-config.patch line 10

Quoted 12 lines · Kai Kang
meta/recipes-devtools/gcc/gcc-4.9/0057-aarch64-config.patch new file +4 -0
+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

meta/recipes-devtools/gcc/gcc-4.9/0057-aarch64-config.patch new file +6 -0
+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]>

This patch is missing an Upstream-Status header.

Thanks. I'll update it.

--Kai

Quoted 3 lines

Ross

Signature · 2 lines
Regards,
Neil | Kai Kang
#27 lore raw

Re: [PATCH 16/24] packagegroup-core-tools-profile: remove sysprof for aarch64

In reply to Kang Kai
Quoted 11 lines · Kang Kai

In the following var definition, it uses PROFILE_TOOLS_X:

RRECOMMENDS_${PN} = "\
    perf \
    trace-cmd \
    kernel-module-oprofile \
    blktrace \
    ${PROFILE_TOOLS_X} \
    ${PROFILE_TOOLS_SYSTEMD} \
    "
Quoted 2 lines

I suppose that use SYSPROF_aarch64 doesn't work here.

But this is exactly what lttng does:

SYSPROF="sysprof"
SYSPROF_aarch64=""
RRECOMMENDS_${PN} = "${SYSPROF}"

Ross

#28 lore raw

Re: [PATCH 16/24] packagegroup-core-tools-profile: remove sysprof for aarch64

Quoted 16 lines · Ross

On 9 December 2014 at 01:48, Kang Kai <[email protected] <mailto:[email protected]>> wrote:
In the following var definition, it uses PROFILE_TOOLS_X:

RRECOMMENDS_${PN} = "\
    perf \
    trace-cmd \
    kernel-module-oprofile \
    blktrace \
    ${PROFILE_TOOLS_X} \
    ${PROFILE_TOOLS_SYSTEMD} \
    "
Quoted 5 lines

I suppose that use SYSPROF_aarch64 doesn't work here.

But this is exactly what lttng does:

SYSPROF=“sysprof"

shouldn’t this be ?= for better understasnding

Quoted 9 lines

SYSPROF_aarch64=“"
RRECOMMENDS_${PN} = "${SYSPROF}"

Ross

Signature · 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
author
#29 lore raw

Re: [PATCH 16/24] packagegroup-core-tools-profile: remove sysprof for aarch64

In reply to Burton, Ross
Quoted 13 lines · Ross
Quoted 11 lines · Kang Kai

In the following var definition, it uses PROFILE_TOOLS_X:

RRECOMMENDS_${PN} = "\
     perf \
     trace-cmd \
     kernel-module-oprofile \
     blktrace \
     ${PROFILE_TOOLS_X} \
     ${PROFILE_TOOLS_SYSTEMD} \
     "
Quoted 7 lines
Quoted 2 lines

I suppose that use SYSPROF_aarch64 doesn't work here.

But this is exactly what lttng does:

SYSPROF="sysprof"
SYSPROF_aarch64=""
RRECOMMENDS_${PN} = "${SYSPROF}"

I think I misunderstood you. Do you mean update like this:

SYSPROF = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'sysprof', '', d)}" SYSPROF_aarch64 = ""

RRECOMMENDS_${PN} = "\
      ... \
     ${SYSPROF} \

"

I'll update it.

Thanks,
Kai

Quoted 3 lines

Ross

Signature · 2 lines
Regards,
Neil | Kai Kang
#30 lore raw

Re: [PATCH 16/24] packagegroup-core-tools-profile: remove sysprof for aarch64

Quoted 6 lines · Kang Kai

I think I misunderstood you. Do you mean update like this:

SYSPROF = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'sysprof', '', d)}"
SYSPROF_aarch64 = ""

Quoted 8 lines
RRECOMMENDS_${PN} = "\
      ... \
     ${SYSPROF} \

"

I'll update it.

Yep, that's it.

Ross

#10 lore raw

Re: [PATCH 09/24] libpng: add neon option for aarch64

In reply to Kai Kang
Quoted 20 lines

Op 7 nov. 2014, om 09:51 heeft Kai Kang <[email protected]> het volgende geschreven:

Add neon option for aarch64 just as for arm. It fails with:

| ./.libs/libpng16.so: undefined reference to `png_init_filter_functions_neon' | collect2: error: ld returned 1 exit status

---
meta/recipes-multimedia/libpng/libpng_1.6.13.bb | 1 +

1 file changed, 1 insertion(+)
meta/recipes-multimedia/libpng/libpng_1.6.13.bb +0 -0
index 0c6fd1f..3d32bfe 100644
@@ -20,6 +20,7 @@ inherit autotools binconfig-disabled pkgconfig
 
 # Work around missing symbols
Quoted 2 lines

EXTRA_OECONF_append_arm = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off" ,d)}" +EXTRA_OECONF_append_aarch64 = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off" ,d)}"

You're introducing the same bug in a different way: overeager use of qualifiers. Just drop the _arm bit and it works.

author
#11 lore raw

Re: [PATCH 09/24] libpng: add neon option for aarch64

Quoted 18 lines · Koen Kooi
Quoted 18 lines

Op 7 nov. 2014, om 09:51 heeft Kai Kang <[email protected]> het volgende geschreven:

Add neon option for aarch64 just as for arm. It fails with:

| ./.libs/libpng16.so: undefined reference to `png_init_filter_functions_neon' | collect2: error: ld returned 1 exit status

---
meta/recipes-multimedia/libpng/libpng_1.6.13.bb | 1 +

1 file changed, 1 insertion(+)
meta/recipes-multimedia/libpng/libpng_1.6.13.bb +0 -0
index 0c6fd1f..3d32bfe 100644
@@ -20,6 +20,7 @@ inherit autotools binconfig-disabled pkgconfig
 
Quoted 5 lines
Quoted 3 lines
meta/recipes-multimedia/libpng/libpng_1.6.13.bb +0 -0
 # 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_aarch64 = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off" ,d)}"

You're introducing the same bug in a different way: overeager use of qualifiers. Just drop the _arm bit and it works.

OK. I'll remove the _arm to fix this issue.

Thanks.

Signature · 2 lines
Regards,
Neil | Kai Kang
author
#31 lore raw

Re: [PATCH 16/24] packagegroup-core-tools-profile: remove sysprof for aarch64

In reply to Burton, Ross
Quoted 12 lines · Ross
Quoted 10 lines · Kang Kai

I think I misunderstood you. Do you mean update like this:

SYSPROF = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'sysprof', '', d)}"
SYSPROF_aarch64 = ""

RRECOMMENDS_${PN} = "\
       ... \
      ${SYSPROF} \
Quoted 5 lines
Quoted 4 lines

"

I'll update it.

Yep, that's it.

I didn't find the usage of SYSPROF in lttng recipes. Neither in this serial commits nor the oe-core master branch. Where did you find it?

Thanks,
Kai

Quoted 3 lines

Ross

Signature · 2 lines
Regards,
Neil | Kai Kang
author
#19 lore raw

Re: [PATCH 13/24] libunwind: add aarch64 support

In reply to Burton, Ross
Quoted 8 lines · Ross
Quoted 3 lines · Kai Kang

- Support-building-with-older-compilers (fix undefined reference to `unreachable' on older compilers)

This patch is missing a signed-off-by header, and considering that oe-core has gcc 4.9 do we still need this, or is it specific to a commercial product that is using an older toolchain?

It is ok to drop this patch for gcc 4.9. I'll do it.

--Kai

Quoted 3 lines

Ross

Signature · 2 lines
Regards,
Neil | Kai Kang
#20 lore raw

Re: [PATCH 13/24] libunwind: add aarch64 support

Quoted 10 lines · Kang Kai
Quoted 9 lines · Ross
Quoted 3 lines · Kai Kang

- Support-building-with-older-compilers (fix undefined reference to `unreachable' on older compilers)

This patch is missing a signed-off-by header, and considering that oe-core has gcc 4.9 do we still need this, or is it specific to a commercial product that is using an older toolchain?

we still need this.

Quoted 2 lines

It is ok to drop this patch for gcc 4.9. I'll do it.

no, it isn't ok to drop this patch. aarch64 support is still needed in libunwind.

Quoted 10 lines

--Kai

Quoted 3 lines

Ross

--
Regards,
Neil | Kai Kang

#12 lore raw

Re: [PATCH 09/24] libpng: add neon option for aarch64

In reply to Kang Kai

I find Koen's patch for libpng neater so could you merge that into your qemuarm64 branch? The autobuilder has been doing some builds so this should be the last stage before it's all merged.

Ross

Quoted 38 lines · Kang Kai

On 2014年12月17日 03:30, Koen Kooi wrote:

Op 7 nov. 2014, om 09:51 heeft Kai Kang <[email protected]> <[email protected]> het volgende geschreven:

Add neon option for aarch64 just as for arm. It fails with:

| ./.libs/libpng16.so: undefined reference to `png_init_filter_functions_neon' | collect2: error: ld returned 1 exit status

---
meta/recipes-multimedia/libpng/libpng_1.6.13.bb | 1 +

1 file changed, 1 insertion(+)
meta/recipes-multimedia/libpng/libpng_1.6.13.bb +0 -0
index 0c6fd1f..3d32bfe 100644
@@ -20,6 +20,7 @@ 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_aarch64 = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off" ,d)}"

You're introducing the same bug in a different way: overeager use of qualifiers. Just drop the _arm bit and it works.

OK. I'll remove the _arm to fix this issue.

Thanks.

--
Regards,
Neil | Kai Kang

author
#21 lore raw

Re: [PATCH 13/24] libunwind: add aarch64 support

In reply to Fathi Boudra
Quoted 7 lines · Fathi Boudra
Quoted 6 lines · Kang Kai
Quoted 5 lines · Ross
Quoted 3 lines · Kai Kang

- Support-building-with-older-compilers (fix undefined reference to `unreachable' on older compilers)

Quoted 8 lines
Quoted 3 lines
Quoted 3 lines

This patch is missing a signed-off-by header, and considering that oe-core has gcc 4.9 do we still need this, or is it specific to a commercial product that is using an older toolchain?

we still need this.

Quoted 1 line

It is ok to drop this patch for gcc 4.9. I'll do it.

no, it isn't ok to drop this patch. aarch64 support is still needed in libunwind.

I mean Support-building-with-older-compilers.patch. Do we still need it?

--Kai

Quoted 10 lines
Quoted 9 lines

--Kai

Quoted 2 lines

Ross

--
Regards,
Neil | Kai Kang

Signature · 2 lines
Regards,
Neil | Kai Kang
author
#13 lore raw

Re: [PATCH 09/24] libpng: add neon option for aarch64

In reply to Burton, Ross
Quoted 3 lines · Ross

I find Koen's patch for libpng neater so could you merge that into your qemuarm64 branch? The autobuilder has been doing some builds so this should be the last stage before it's all merged.

OK. I'll do it.

--Kai

Quoted 41 lines

Ross

Quoted 37 lines · Kang Kai

On 2014年12月17日 03:30, Koen Kooi wrote:

Op 7 nov. 2014, om 09:51 heeft Kai Kang <[email protected]> <[email protected]> het volgende geschreven:

Add neon option for aarch64 just as for arm. It fails with:

| ./.libs/libpng16.so: undefined reference to `png_init_filter_functions_neon' | collect2: error: ld returned 1 exit status

---
meta/recipes-multimedia/libpng/libpng_1.6.13.bb | 1 +

1 file changed, 1 insertion(+)
meta/recipes-multimedia/libpng/libpng_1.6.13.bb +0 -0
index 0c6fd1f..3d32bfe 100644
@@ -20,6 +20,7 @@ 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_aarch64 = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off" ,d)}"

You're introducing the same bug in a different way: overeager use of qualifiers. Just drop the _arm bit and it works.

OK. I'll remove the _arm to fix this issue.

Thanks.

--
Regards,
Neil | Kai Kang

Signature · 2 lines
Regards,
Neil | Kai Kang