diff options
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-support')
152 files changed, 3275 insertions, 3844 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr_1.5.2.bb b/import-layers/yocto-poky/meta/recipes-support/apr/apr_1.5.2.bb index db1530530..302c93504 100644 --- a/import-layers/yocto-poky/meta/recipes-support/apr/apr_1.5.2.bb +++ b/import-layers/yocto-poky/meta/recipes-support/apr/apr_1.5.2.bb @@ -38,6 +38,9 @@ CACHED_CONFIGUREVARS += "ac_cv_header_netinet_sctp_h=no ac_cv_header_netinet_sct # x86_64-linux-libtool: error: specify a tag with '--tag' CCACHE = "" +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}" +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," + do_configure_prepend() { # Avoid absolute paths for grep since it causes failures # when using sstate between different hosts with different diff --git a/import-layers/yocto-poky/meta/recipes-support/argp-standalone/argp-standalone_1.3.bb b/import-layers/yocto-poky/meta/recipes-support/argp-standalone/argp-standalone_1.3.bb index d61c8be24..bd0cfdfe4 100644 --- a/import-layers/yocto-poky/meta/recipes-support/argp-standalone/argp-standalone_1.3.bb +++ b/import-layers/yocto-poky/meta/recipes-support/argp-standalone/argp-standalone_1.3.bb @@ -1,7 +1,7 @@ # Copyright (C) 2015 Khem Raj <raj.khem@gmail.com> # Released under the MIT license (see COPYING.MIT for the terms) -DESCRIPTION = "Glibc hierarchical argument parsing standalone library" +SUMMARY = "Glibc hierarchical argument parsing standalone library" HOMEPAGE = "http://www.lysator.liu.se/~nisse/misc/" LICENSE = "LGPL-2.1" LIC_FILES_CHKSUM = "file://argp.h;beginline=1;endline=20;md5=008b7e53dea6f9e1d9fdef0d9cf3184a" diff --git a/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-atk_2.18.1.bb b/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-atk_2.20.1.bb index b8a93f3dc..d4120b604 100644 --- a/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-atk_2.18.1.bb +++ b/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-atk_2.20.1.bb @@ -5,8 +5,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=e9f288ba982d60518f375b5898283886" MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}" SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz" -SRC_URI[md5sum] = "d7040a55df975865ab0d74a4b325afb5" -SRC_URI[sha256sum] = "c4b15f9386d34d464ddad5f6cc85669742c016df87141ceee93513245979c12d" +SRC_URI[md5sum] = "23309b6f8e1623871ace6347fb734dce" +SRC_URI[sha256sum] = "2358a794e918e8f47ce0c7370eee8fc8a6207ff1afe976ec9ff547a03277bf8e" DEPENDS = "dbus glib-2.0 atk at-spi2-core" diff --git a/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core/0001-build-Add-with-systemduserunitdir.patch b/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core/0001-build-Add-with-systemduserunitdir.patch new file mode 100644 index 000000000..4103eaa2e --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core/0001-build-Add-with-systemduserunitdir.patch @@ -0,0 +1,49 @@ +From 2f47c975ebe52b6916a45ade023ae3bac21bb0e0 Mon Sep 17 00:00:00 2001 +From: Jussi Kukkonen <jussi.kukkonen@intel.com> +Date: Tue, 21 Jun 2016 16:00:02 +0300 +Subject: [PATCH] build: Add --with-systemduserunitdir + +Default to "pkg-config --variable=systemduserunitdir systemd" but +allow overriding the value. + +Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=767911] +Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> +--- + bus/Makefile.am | 2 +- + configure.ac | 7 +++++++ + 2 files changed, 8 insertions(+), 1 deletion(-) + +diff --git a/bus/Makefile.am b/bus/Makefile.am +index b189e02..52fbb0b 100644 +--- a/bus/Makefile.am ++++ b/bus/Makefile.am +@@ -26,7 +26,7 @@ dbusservice_DATA = org.a11y.Bus.service + org.a11y.Bus.service: org.a11y.Bus.service.in + sed -e $(substitutions) $< > $@.tmp && mv $@.tmp $@ + +-systemd_userdir = $(prefix)/lib/systemd/user ++systemd_userdir = $(systemduserunitdir) + systemd_user_DATA = at-spi-dbus-bus.service + at-spi-dbus-bus.service: at-spi-dbus-bus.service.in Makefile + sed -e $(substitutions) $< > $@.tmp && mv $@.tmp $@ +diff --git a/configure.ac b/configure.ac +index f9061c2..2b8eeed 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -183,6 +183,13 @@ else + fi + AC_SUBST(DBUS_SERVICES_DIR) + ++AC_ARG_WITH([systemduserunitdir], ++ AS_HELP_STRING([--with-systemduserunitdir=DIR], ++ [Directory for systemd service files]), ++ [], ++ [with_systemduserunitdir=$($PKG_CONFIG --variable=systemduserunitdir systemd)]) ++AC_SUBST([systemduserunitdir], [$with_systemduserunitdir]) ++ + AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums) + + GOBJECT_INTROSPECTION_CHECK([0.9.6]) +-- +2.1.4 + diff --git a/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core_2.18.3.bb b/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core_2.18.3.bb deleted file mode 100644 index eced59750..000000000 --- a/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core_2.18.3.bb +++ /dev/null @@ -1,23 +0,0 @@ -SUMMARY = "Assistive Technology Service Provider Interface (dbus core)" -LICENSE = "LGPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=e9f288ba982d60518f375b5898283886" - -MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}" - -SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \ - file://0001-nls.m4-Take-it-from-gettext-0.15.patch \ - " - -SRC_URI[md5sum] = "fc18801e56f6ce6914126f837d42f556" -SRC_URI[sha256sum] = "ada26add94155f97d0f601a20cb7a0e3fd3ba1588c3520b7288316494027d629" - -DEPENDS = "dbus glib-2.0 virtual/libx11 libxi libxtst intltool-native gettext-native" - -inherit autotools gtk-doc pkgconfig distro_features_check upstream-version-is-even gobject-introspection -# depends on virtual/libx11 -REQUIRED_DISTRO_FEATURES = "x11" - -EXTRA_OECONF = "--disable-xevie --with-dbus-daemondir=${bindir}" - -FILES_${PN} += "${datadir}/dbus-1/services/*.service \ - ${datadir}/dbus-1/accessibility-services/*.service" diff --git a/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core_2.20.2.bb b/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core_2.20.2.bb new file mode 100644 index 000000000..199243adf --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core_2.20.2.bb @@ -0,0 +1,29 @@ +SUMMARY = "Assistive Technology Service Provider Interface (dbus core)" +LICENSE = "LGPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=e9f288ba982d60518f375b5898283886" + +MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}" + +SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \ + file://0001-nls.m4-Take-it-from-gettext-0.15.patch \ + file://0001-build-Add-with-systemduserunitdir.patch \ + " + +SRC_URI[md5sum] = "f6f6303da2e72317f881703f40bf0c62" +SRC_URI[sha256sum] = "88a4de9d43139f13cca531b47b901bc1b56e0ab06ba899126644abd4ac16a143" + +DEPENDS = "dbus glib-2.0 virtual/libx11 libxi libxtst intltool-native" + +inherit autotools gtk-doc gettext systemd pkgconfig distro_features_check upstream-version-is-even gobject-introspection +# depends on virtual/libx11 +REQUIRED_DISTRO_FEATURES = "x11" + +EXTRA_OECONF = "--disable-xevie \ + --with-systemduserunitdir=${systemd_user_unitdir} \ + --with-dbus-daemondir=${bindir}" + +FILES_${PN} += "${datadir}/dbus-1/services/*.service \ + ${datadir}/dbus-1/accessibility-services/*.service \ + ${datadir}/defaults/at-spi2 \ + ${systemd_user_unitdir}/at-spi-dbus-bus.service \ + " diff --git a/import-layers/yocto-poky/meta/recipes-support/atk/atk_2.18.0.bb b/import-layers/yocto-poky/meta/recipes-support/atk/atk_2.20.0.bb index 3c0e82df6..0422354e0 100644 --- a/import-layers/yocto-poky/meta/recipes-support/atk/atk_2.18.0.bb +++ b/import-layers/yocto-poky/meta/recipes-support/atk/atk_2.20.0.bb @@ -10,10 +10,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \ DEPENDS = "glib-2.0" -inherit gnomebase gtk-doc upstream-version-is-even gobject-introspection +inherit gnomebase gtk-doc gettext upstream-version-is-even gobject-introspection -SRC_URI[archive.md5sum] = "fd3678f35004b4c92e3da39356996054" -SRC_URI[archive.sha256sum] = "ce6c48d77bf951083029d5a396dd552d836fff3c1715d3a7022e917e46d0c92b" +SRC_URI[archive.md5sum] = "5187b0972f4d3905f285540b31395e20" +SRC_URI[archive.sha256sum] = "493a50f6c4a025f588d380a551ec277e070b28a82e63ef8e3c06b3ee7c1238f0" BBCLASSEXTEND = "native" diff --git a/import-layers/yocto-poky/meta/recipes-support/attr/acl.inc b/import-layers/yocto-poky/meta/recipes-support/attr/acl.inc index 198fb4fed..37a0218cb 100644 --- a/import-layers/yocto-poky/meta/recipes-support/attr/acl.inc +++ b/import-layers/yocto-poky/meta/recipes-support/attr/acl.inc @@ -14,6 +14,7 @@ SRC_URI = "${SAVANNAH_GNU_MIRROR}/acl/${BP}.src.tar.gz \ file://acl-fix-the-order-of-expected-output-of-getfacl.patch \ file://test-fix-insufficient-quoting-of.patch \ file://test-fixups-on-SELinux-machines-for-root-testcases.patch \ + file://test-fix-directory-permissions.patch \ " require ea-acl.inc @@ -33,7 +34,7 @@ do_install_append() { inherit ptest do_install_ptest() { - tar -cf - test/ --exclude nfs | ( cd ${D}${PTEST_PATH} && tar -xf - ) + tar -c --exclude=nfs test/ | ( cd ${D}${PTEST_PATH} && tar -xf - ) mkdir ${D}${PTEST_PATH}/include cp ${S}/include/builddefs ${S}/include/buildmacros ${S}/include/buildrules ${D}${PTEST_PATH}/include/ } diff --git a/import-layers/yocto-poky/meta/recipes-support/attr/acl/run-ptest b/import-layers/yocto-poky/meta/recipes-support/attr/acl/run-ptest index 3b31cc99a..a56946d8e 100644 --- a/import-layers/yocto-poky/meta/recipes-support/attr/acl/run-ptest +++ b/import-layers/yocto-poky/meta/recipes-support/attr/acl/run-ptest @@ -1,7 +1,64 @@ #!/bin/sh +# +#This script is used to run acl test suites -gpasswd -a daemon bin -make -C test -k tests root-tests |sed \ - -e 's|^\[.*\] \(.*\) -- ok$|PASS: \1|' \ - -e 's|^\[.*\] \(.*\) -- failed|FAIL: \1|' -gpasswd -d daemon bin +#umask 077 + +EXT3_IMAGE=ext3.img +EXT3_MOUNT_POINT=/mnt/ext3 + +trap 'rm -f ${EXT3_IMAGE}' EXIT + +dd if=/dev/zero of=${EXT3_IMAGE} bs=1M count=1 +if [ "$?" -eq 0 ]; then + echo "PASS: dump ext3.img" +else + echo "FAIL: dump ext3.img" + exit 1 +fi + +mkfs.ext3 -F ${EXT3_IMAGE} +if [ "$?" -eq 0 ]; then + echo "PASS: mkfs.ext3 -F ext3.img" +else + echo "FAIL: mkfs.ext3 -F ext3.img" + exit 1 +fi + +if [ -d $EXT3_MOUNT_POINT ]; then + echo "mount point exist" +else + mkdir -p $EXT3_MOUNT_POINT +fi + + +mount -o loop,rw,acl ${EXT3_IMAGE} $EXT3_MOUNT_POINT +if [ "$?" -eq 0 ]; then + echo "PASS: mount ext3.img" +else + echo "FAIL: mount ext3.img" + exit 1 +fi + +cp -rf ./test/ $EXT3_MOUNT_POINT + +cd $EXT3_MOUNT_POINT/test/ + +if sed -e 's!^bin:x:2:$!bin:x:2:daemon!' < /etc/group > gtmp +then if cp /etc/group group.orig; + then cp gtmp /etc/group + make -k tests root-tests | sed \ + -e 's|^\[.*\] \(.*\) -- ok$|PASS: \1|' \ + -e 's|^\[.*\] \(.*\) -- failed|FAIL: \1|' + cp group.orig /etc/group + else echo "FAIL: couldn't save original group file." + exit 1 + fi +else echo "FAIL: couldn't create modified group file." + exit 1 +fi + +cd - +umount $EXT3_MOUNT_POINT +rm -rf $EXT3_MOUNT_POINT +rm $EXT3_IMAGE diff --git a/import-layers/yocto-poky/meta/recipes-support/attr/acl/test-fix-directory-permissions.patch b/import-layers/yocto-poky/meta/recipes-support/attr/acl/test-fix-directory-permissions.patch new file mode 100644 index 000000000..cd4510c0b --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/attr/acl/test-fix-directory-permissions.patch @@ -0,0 +1,24 @@ +commit c45bae84817a70fef6c2b661a07a492a0d23ae85 +Author: Peter Seebach <peter.seebach@windriver.com> +Date: Wed May 11 15:16:06 2016 -0500 + + Fix permissions on temporary directory + + The temporary directory's permissions have to allow other users to + view the directory. A default umask of 022 is common, but not mandatory, + and secure systems may have more restrictive defaults. + + Signed-off-by: Peter Seebach <peter.seebach@windriver.com> + +diff --git a/test/root/permissions.test b/test/root/permissions.test +index 42615f5..098b52a 100644 +--- a/test/root/permissions.test ++++ b/test/root/permissions.test +@@ -16,6 +16,7 @@ Cry immediately if we are not running as root. + First, set up a temporary directory and create a regular file with + defined permissions. + ++ $ umask 022 + $ mkdir d + $ cd d + $ umask 027 diff --git a/import-layers/yocto-poky/meta/recipes-support/attr/attr.inc b/import-layers/yocto-poky/meta/recipes-support/attr/attr.inc index 68609784d..e8b5d054b 100644 --- a/import-layers/yocto-poky/meta/recipes-support/attr/attr.inc +++ b/import-layers/yocto-poky/meta/recipes-support/attr/attr.inc @@ -2,7 +2,7 @@ SUMMARY = "Utilities for manipulating filesystem extended attributes" HOMEPAGE = "http://savannah.nongnu.org/projects/attr/" SECTION = "libs" -DEPENDS = "ncurses virtual/libintl" +DEPENDS = "virtual/libintl" LICENSE = "LGPLv2.1+ & GPLv2+" LICENSE_${PN} = "GPLv2+" @@ -26,7 +26,7 @@ do_install_append() { inherit ptest do_install_ptest() { - tar -cf - test/ --exclude ext | ( cd ${D}${PTEST_PATH} && tar -xf - ) + tar -c --exclude=ext test/ | ( cd ${D}${PTEST_PATH} && tar -xf - ) mkdir ${D}${PTEST_PATH}/include for i in builddefs buildmacros buildrules; \ do cp ${S}/include/$i ${D}${PTEST_PATH}/include/; \ diff --git a/import-layers/yocto-poky/meta/recipes-support/attr/attr_2.4.47.bb b/import-layers/yocto-poky/meta/recipes-support/attr/attr_2.4.47.bb index 44eee3964..556c8e43e 100644 --- a/import-layers/yocto-poky/meta/recipes-support/attr/attr_2.4.47.bb +++ b/import-layers/yocto-poky/meta/recipes-support/attr/attr_2.4.47.bb @@ -2,9 +2,9 @@ require attr.inc # configure.ac was missing from the release tarball. This should be fixed in # future releases of attr, remove this when updating the recipe. -SRC_URI_append += "file://attr-Missing-configure.ac.patch \ - file://dont-use-decl-macros.patch \ - " +SRC_URI += "file://attr-Missing-configure.ac.patch \ + file://dont-use-decl-macros.patch \ + " SRC_URI[md5sum] = "84f58dec00b60f2dc8fd1c9709291cc7" SRC_URI[sha256sum] = "25772f653ac5b2e3ceeb89df50e4688891e21f723c460636548971652af0a859" diff --git a/import-layers/yocto-poky/meta/recipes-support/bash-completion/bash-completion_2.1.bb b/import-layers/yocto-poky/meta/recipes-support/bash-completion/bash-completion_2.4.bb index 8b257d2d1..42719f143 100644 --- a/import-layers/yocto-poky/meta/recipes-support/bash-completion/bash-completion_2.1.bb +++ b/import-layers/yocto-poky/meta/recipes-support/bash-completion/bash-completion_2.4.bb @@ -7,11 +7,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" SECTION = "console/utils" -SRC_URI="http://bash-completion.alioth.debian.org/files/${BPN}-${PV}.tar.bz2" +SRC_URI = "https://github.com/scop/bash-completion/releases/download/${PV}/${BPN}-${PV}.tar.xz" -SRC_URI[md5sum] = "4e2a9f11a4042a38ee79ddcd048e8b9e" -SRC_URI[sha256sum] = "2b606804a7d5f823380a882e0f7b6c8a37b0e768e72c3d4107c51fbe8a46ae4f" +SRC_URI[md5sum] = "1ea94864fb2b2446fbbdf82f10bd25df" +SRC_URI[sha256sum] = "c0f76b5202fec9ef8ffba82f5605025ca003f27cfd7a85115f838ba5136890f6" UPSTREAM_CHECK_REGEX = "bash-completion-(?P<pver>(?!2008).+)\.tar" +UPSTREAM_CHECK_URI = "https://github.com/scop/bash-completion/releases" PARALLEL_MAKE = "" @@ -24,12 +25,9 @@ do_install_append() { # Delete files already provided by util-linux local i - for i in cal dmesg eject hexdump hwclock ionice look renice rtcwake su; do + for i in mount umount; do rm ${D}${datadir}/${BPN}/completions/$i done - - # Delete files for networkmanager - rm ${D}${datadir}/${BPN}/completions/nmcli } RDEPENDS_${PN} = "bash" @@ -39,4 +37,6 @@ PACKAGES =+ "${PN}-extra" FILES_${PN}-extra = "${datadir}/${BPN}/completions/ \ ${datadir}/${BPN}/helpers/" +FILES_${PN}-dev += "${datadir}/cmake" + BBCLASSEXTEND = "nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc/0001-fix-build-with-musl.patch b/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc/0001-fix-build-with-musl.patch deleted file mode 100644 index ab907fca0..000000000 --- a/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc/0001-fix-build-with-musl.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 829a89e7f5785239a9384e3afd46c900f9d76ada Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 31 Aug 2015 19:55:32 +0000 -Subject: [PATCH] fix build with musl - -signal.h already includes bits/sigcontext.h -Documentation seems to indicate that if you need the definitions in -sigcontext.h, you are supposed to include signal.h and not sigcontext.h. - -a good fix should be to remove glibc -specific understanding, in those ifdef's - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Pending - - os_dep.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/os_dep.c b/os_dep.c -index 08c501d..5cb7873 100644 ---- a/os_dep.c -+++ b/os_dep.c -@@ -41,7 +41,7 @@ - # else /* __GLIBC__ < 2 */ - /* libc5 doesn't have <sigcontext.h>: go directly with the kernel */ - /* one. Check LINUX_VERSION_CODE to see which we should reference. */ --# include <asm/sigcontext.h> -+# include <signal.h> - # endif /* __GLIBC__ < 2 */ - # endif - #endif /* LINUX && !POWERPC */ --- -2.5.1 - diff --git a/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc/0002-Altera-NIOS2-support.patch b/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc/0002-Altera-NIOS2-support.patch deleted file mode 100644 index c73c5400c..000000000 --- a/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc/0002-Altera-NIOS2-support.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 2571df0e30b4976d7a12dbc6fbec4f1c4027924d Mon Sep 17 00:00:00 2001 -From: Marek Vasut <marex@denx.de> -Date: Thu, 28 Jan 2016 04:13:13 +0100 -Subject: [PATCH] Altera NIOS2 support - -Add simple nios2 configuration support. - -* include/private/gcconfig.h (NIOS2): New macro. -* include/private/gcconfig.h (mach_type_known, CPP_WORDSZ, MACH_TYPE, -OS_TYPE, DYNAMIC_LOADING, _end, __data_start, DATASTART, DATAEND, -ALIGNMENT, HBLKSIZE, HBLKSIZE, LINUX_STACKBOTTOM, NO_GETCONTEXT): -Define for NIOS2. - -Signed-off-by: Marek Vasut <marex@denx.de> -Upstream-Status: Backport [ https://github.com/ivmai/bdwgc.git 2571df0e30b4976d7a12dbc6fbec4f1c4027924d ] ---- - include/private/gcconfig.h | 24 +++++++++++++++++++++++- - 1 file changed, 23 insertions(+), 1 deletion(-) - -diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h -index c467c26..92d4727 100644 ---- a/include/private/gcconfig.h -+++ b/include/private/gcconfig.h -@@ -181,6 +181,10 @@ - # endif - # define mach_type_known - # endif -+# if defined(__NIOS2__) || defined(__NIOS2) || defined(__nios2__) -+# define NIOS2 /* Altera NIOS2 */ -+# define mach_type_known -+# endif - # if defined(DGUX) && (defined(i386) || defined(__i386__)) - # define I386 - # ifndef _USING_DGUX -@@ -1658,6 +1662,24 @@ - # endif - # endif - -+# ifdef NIOS2 -+# define CPP_WORDSZ 32 -+# define MACH_TYPE "NIOS2" -+# ifdef LINUX -+# define OS_TYPE "LINUX" -+# define DYNAMIC_LOADING -+ extern int _end[]; -+ extern int __data_start[]; -+# define DATASTART ((ptr_t)(__data_start)) -+# define DATAEND ((ptr_t)(_end)) -+# define ALIGNMENT 4 -+# ifndef HBLKSIZE -+# define HBLKSIZE 4096 -+# endif -+# define LINUX_STACKBOTTOM -+# endif /* Linux */ -+# endif -+ - # ifdef HP_PA - # define MACH_TYPE "HP_PA" - # ifdef __LP64__ -@@ -2622,6 +2644,7 @@ - #if ((defined(UNIX_LIKE) && (defined(DARWIN) || defined(HURD) \ - || defined(OPENBSD) || defined(ARM32) \ -- || defined(MIPS) || defined(AVR32))) \ -+ || defined(MIPS) || defined(AVR32) \ -+ || defined(NIOS2))) \ - || (defined(LINUX) && (defined(SPARC) || defined(M68K))) \ - || ((defined(RTEMS) || defined(PLATFORM_ANDROID)) && defined(I386))) \ - && !defined(NO_GETCONTEXT) --- -2.7.0 - diff --git a/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc/musl_header_fix.patch b/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc/musl_header_fix.patch new file mode 100644 index 000000000..4a1849665 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc/musl_header_fix.patch @@ -0,0 +1,27 @@ +Add missing header to avoid: + +| 1472659610.016355: ../git/pthread_stop_world.c: In function 'GC_brief_async_signal_safe_sleep': +| 1472659610.0540252: ../git/pthread_stop_world.c:397:22: error: storage size of 'tv' isn't known +| 1472659610.0540252: struct timeval tv; +| 1472659610.0540252: ^~ +| 1472659610.054099: ../git/pthread_stop_world.c:397:22: warning: unused variable 'tv' [-Wunused-variable] +| 1472659610.054099: struct timeval tv; +| 1472659610.054099: ^~ +| 1472659610.054099: Makefile:1530: recipe for target 'pthread_stop_world.lo' failed + +in musl builds. + +Upstream-Status: Pending + +Index: git/pthread_stop_world.c +=================================================================== +--- git.orig/pthread_stop_world.c ++++ git/pthread_stop_world.c +@@ -45,6 +45,7 @@ + #include <semaphore.h> + #include <errno.h> + #include <unistd.h> ++#include <sys/time.h> + #include "atomic_ops.h" + + /* It's safe to call original pthread_sigmask() here. */ diff --git a/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc_7.4.2.bb b/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc_7.6.0.bb index 8d4dab399..dcb68f028 100644 --- a/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc_7.4.2.bb +++ b/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc_7.6.0.bb @@ -19,13 +19,12 @@ DESCRIPTION = "The Boehm-Demers-Weiser conservative garbage collector can be\ HOMEPAGE = "http://www.hboehm.info/gc/" SECTION = "devel" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://README.QUICK;md5=55f5088f90a982fed7af9a4897047ef7" +LIC_FILES_CHKSUM = "file://README.QUICK;md5=4f81f24ec69726c312487c2ac740e9e3" -SRCREV = "e31cdc288ffbee5bf25f948e19deb5a7ce846971" -SRC_URI = "git://github.com/ivmai/bdwgc.git;branch=release-7_4 \ - file://0001-fix-build-with-musl.patch \ +SRCREV = "8ac1d84a40eb7a431fec1b8097e3f24b48fb23fa" +SRC_URI = "git://github.com/ivmai/bdwgc.git \ file://0001-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch \ - file://0002-Altera-NIOS2-support.patch \ + file://musl_header_fix.patch \ " FILES_${PN}-doc = "${datadir}" diff --git a/import-layers/yocto-poky/meta/recipes-support/bmap-tools/bmap-tools_3.2.bb b/import-layers/yocto-poky/meta/recipes-support/bmap-tools/bmap-tools_3.2.bb new file mode 100644 index 000000000..e10f5fd34 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/bmap-tools/bmap-tools_3.2.bb @@ -0,0 +1,24 @@ +SUMMARY = "Tools to generate block map (AKA bmap) and flash images using bmap" +DESCRIPTION = "Bmap-tools - tools to generate block map (AKA bmap) and flash images using \ +bmap. Bmaptool is a generic tool for creating the block map (bmap) for a file, \ +and copying files using the block map. The idea is that large file containing \ +unused blocks, like raw system image files, can be copied or flashed a lot \ +faster with bmaptool than with traditional tools like "dd" or "cp"." +HOMEPAGE = "http://git.infradead.org/users/dedekind/bmap-tools.git" +SECTION = "console/utils" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SRC_URI = "ftp://ftp.infradead.org/pub/${BPN}/${BPN}-${PV}.tgz" +SRC_URI[md5sum] = "92cdad1cb4dfa0cca7176c8e22752616" +SRC_URI[sha256sum] = "cc6c7f7dc0a37e2a32deb127308e24e6c4b80bfb54f3803c308efab02bf2d434" + +RDEPENDS_${PN} = "python-core python-compression" + +inherit setuptools + +BBCLASSEXTEND = "native" + +do_install_append_class-native() { + sed -i -e 's|^#!.*/usr/bin/env python|#! /usr/bin/env nativepython|' ${D}${bindir}/bmaptool +} diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/bjam-native_1.60.0.bb b/import-layers/yocto-poky/meta/recipes-support/boost/bjam-native_1.61.0.bb index 32646d707..32646d707 100644 --- a/import-layers/yocto-poky/meta/recipes-support/boost/bjam-native_1.60.0.bb +++ b/import-layers/yocto-poky/meta/recipes-support/boost/bjam-native_1.61.0.bb diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost-1.60.0.inc b/import-layers/yocto-poky/meta/recipes-support/boost/boost-1.61.0.inc index a38693e25..cd9d8a495 100644 --- a/import-layers/yocto-poky/meta/recipes-support/boost/boost-1.60.0.inc +++ b/import-layers/yocto-poky/meta/recipes-support/boost/boost-1.61.0.inc @@ -7,13 +7,13 @@ HOMEPAGE = "http://www.boost.org/" LICENSE = "BSL-1.0 & MIT & Python-2.0" LIC_FILES_CHKSUM = "file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c" -BOOST_VER = "${@"_".join(d.getVar("PV",1).split("."))}" -BOOST_MAJ = "${@"_".join(d.getVar("PV",1).split(".")[0:2])}" +BOOST_VER = "${@"_".join(d.getVar("PV", True).split("."))}" +BOOST_MAJ = "${@"_".join(d.getVar("PV", True).split(".")[0:2])}" BOOST_P = "boost_${BOOST_VER}" SRC_URI = "${SOURCEFORGE_MIRROR}/boost/${BOOST_P}.tar.bz2" -SRC_URI[md5sum] = "65a840e1a0b13a558ff19eeb2c4f0cbe" -SRC_URI[sha256sum] = "686affff989ac2488f79a97b9479efb9f2abae035b5ed4d8226de6857933fd3b" +SRC_URI[md5sum] = "6095876341956f65f9d35939ccea1a9f" +SRC_URI[sha256sum] = "a547bd06c2fd9a71ba1d169d9cf0339da7ebf4753849a8f7d6fdb8feee99b640" S = "${WORKDIR}/${BOOST_P}" diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost.inc b/import-layers/yocto-poky/meta/recipes-support/boost/boost.inc index 982446c06..ef16533ba 100644 --- a/import-layers/yocto-poky/meta/recipes-support/boost/boost.inc +++ b/import-layers/yocto-poky/meta/recipes-support/boost/boost.inc @@ -8,11 +8,14 @@ ARM_INSTRUCTION_SET_armv5 = "arm" BOOST_LIBS = "\ atomic \ chrono \ + container \ date_time \ + exception \ filesystem \ graph \ iostreams \ log \ + math \ program_options \ random \ regex \ @@ -22,12 +25,30 @@ BOOST_LIBS = "\ timer \ test \ thread \ + wave \ " -# optional boost-python library -PACKAGECONFIG ??= "" +# only supported by x86 and powerpc +BOOST_LIBS_append_x86 = " context coroutine" +BOOST_LIBS_append_x86-64 = " context coroutine" +BOOST_LIBS_append_powerpc = " context coroutine" +# need consistent settings for native builds (x86 override not applied for native) +BOOST_LIBS_remove_class-native = " context coroutine" + +# optional libraries +PACKAGECONFIG ??= "locale" +PACKAGECONFIG[locale] = ",,icu" +PACKAGECONFIG[graph_parallel] = ",,,boost-mpi mpich" +PACKAGECONFIG[mpi] = ",,mpich" PACKAGECONFIG[python] = ",,python python3" -BOOST_LIBS += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python python3', '', d)}" + +BOOST_LIBS += "\ + ${@bb.utils.contains('PACKAGECONFIG', 'locale', 'locale', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'graph_parallel', 'graph_parallel mpi', \ + bb.utils.contains('PACKAGECONFIG', 'mpi', 'mpi', '', d), d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python python3', '', d)} \ +" + inherit python-dir PYTHON_ROOT = "${STAGING_DIR_HOST}/${prefix}" @@ -54,6 +75,10 @@ python __anonymous () { } # Override the contents of specific packages +FILES_${PN}-graph = "${libdir}/libboost_graph.so.*" +FILES_${PN}-graph_parallel = "${libdir}/libboost_graph_parallel.so.*" +FILES_${PN}-locale = "${libdir}/libboost_locale.so.*" +FILES_${PN}-mpi = "${libdir}/mpi.so ${libdir}/libboost_mpi*.so.*" FILES_boost-serialization = "${libdir}/libboost_serialization*.so.* \ ${libdir}/libboost_wserialization*.so.*" FILES_boost-test = "${libdir}/libboost_prg_exec_monitor*.so.* \ @@ -142,7 +167,7 @@ def get_boost_parallel_make(d): BOOST_PARALLEL_MAKE = "${@get_boost_parallel_make(d)}" BJAM_OPTS = '${BOOST_PARALLEL_MAKE} -d+2 -q \ ${BJAM_TOOLS} \ - -sBOOST_BUILD_USER_CONFIG=${S}/tools/build/example/user-config.jam \ + -sBOOST_BUILD_USER_CONFIG=${WORKDIR}/user-config.jam \ --build-dir=${S}/${TARGET_SYS} \ --disable-icu \ ${BJAM_EXTRA}' @@ -150,25 +175,26 @@ BJAM_OPTS = '${BOOST_PARALLEL_MAKE} -d+2 -q \ # Native compilation of bzip2 isn't working BJAM_OPTS_append_class-native = ' -sNO_BZIP2=1' -do_boostconfig() { - cp -f boost/config/platform/linux.hpp boost/config/platform/linux-gnueabi.hpp +do_configure() { + cp -f ${S}/boost/config/platform/linux.hpp ${S}/boost/config/platform/linux-gnueabi.hpp # D2194:Fixing the failure of "error: duplicate initialization of gcc with the following parameters" during compilation. - sed -i "/^using gcc : 4.3.1/d" ${S}/tools/build/example/user-config.jam - sed -i "/^using python : ${PYTHON_BASEVERSION}"/d ${S}/tools/build/example/user-config.jam - echo 'using gcc : 4.3.1 : ${CXX} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;' >> ${S}/tools/build/example/user-config.jam - echo "using python : ${PYTHON_BASEVERSION} : : ${STAGING_INCDIR}/python${PYTHON_BASEVERSION} ;" >> ${S}/tools/build/example/user-config.jam - echo "using python : 3.5 : : ${STAGING_INCDIR}/python3.5m ;" >> ${S}/tools/build/example/user-config.jam + rm -f ${WORKDIR}/user-config.jam + echo 'using gcc : 4.3.1 : ${CXX} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;' >> ${WORKDIR}/user-config.jam + echo "using python : ${PYTHON_BASEVERSION} : : ${STAGING_INCDIR}/python${PYTHON_BASEVERSION} ;" >> ${WORKDIR}/user-config.jam + echo "using python : 3.5 : : ${STAGING_INCDIR}/python3.5m ;" >> ${WORKDIR}/user-config.jam + + if ${@bb.utils.contains('BOOST_LIBS', 'mpi', 'true', 'false', d)}; then + echo "using mpi : : <find-shared-library>mpi ;" >> ${WORKDIR}/user-config.jam + fi CC="${BUILD_CC}" CFLAGS="${BUILD_CFLAGS}" ./bootstrap.sh --with-bjam=bjam --with-toolset=gcc --with-python-root=${PYTHON_ROOT} - sed -i '/^using python/d' project-config.jam + sed -i '/^using python/d' ${S}/project-config.jam } -do_boostconfig[dirs] = "${S}" -addtask do_boostconfig after do_patch before do_configure - do_compile() { set -ex + rm -rf ${S}/${TARGET_SYS} bjam ${BJAM_OPTS} --prefix=${prefix} \ --exec-prefix=${exec_prefix} \ --libdir=${libdir} \ diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost/0001-Do-not-qualify-fenv.h-names-that-might-be-macros.patch b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0001-Do-not-qualify-fenv.h-names-that-might-be-macros.patch deleted file mode 100644 index df7e71fea..000000000 --- a/import-layers/yocto-poky/meta/recipes-support/boost/boost/0001-Do-not-qualify-fenv.h-names-that-might-be-macros.patch +++ /dev/null @@ -1,45 +0,0 @@ -From f50e7bc9fed323c5705c0ed992c03e80eeec1dd6 Mon Sep 17 00:00:00 2001 -From: Jonathan Wakely <jwakely@redhat.com> -Date: Mon, 14 Sep 2015 15:05:24 +0100 -Subject: [PATCH] Do not qualify <fenv.h> names that might be macros. - -The patch was imported from the boost-test git repository -(https://github.com/boostorg/test) as of commit id -f50e7bc9fed323c5705c0ed992c03e80eeec1dd6. - -Upstream-Status: Accepted [commit f50e7bc9fed in develop branch] - -Signed-off-by: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de> ---- - include/boost/test/impl/execution_monitor.ipp | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/include/boost/test/impl/execution_monitor.ipp b/include/boost/test/impl/execution_monitor.ipp -index b3e873e..a7bdce2 100644 ---- a/include/boost/test/impl/execution_monitor.ipp -+++ b/include/boost/test/impl/execution_monitor.ipp -@@ -1380,8 +1380,8 @@ enable( unsigned mask ) - - return ~old_cw & BOOST_FPE_ALL; - #elif defined(__GLIBC__) && defined(__USE_GNU) && !defined(BOOST_CLANG) && !defined(BOOST_NO_FENV_H) -- ::feclearexcept(BOOST_FPE_ALL); -- int res = ::feenableexcept( mask ); -+ feclearexcept(BOOST_FPE_ALL); -+ int res = feenableexcept( mask ); - return res == -1 ? (unsigned)BOOST_FPE_INV : (unsigned)res; - #else - /* Not Implemented */ -@@ -1417,8 +1417,8 @@ disable( unsigned mask ) - - return ~old_cw & BOOST_FPE_ALL; - #elif defined(__GLIBC__) && defined(__USE_GNU) && !defined(BOOST_CLANG) && !defined(BOOST_NO_FENV_H) -- ::feclearexcept(BOOST_FPE_ALL); -- int res = ::fedisableexcept( mask ); -+ feclearexcept(BOOST_FPE_ALL); -+ int res = fedisableexcept( mask ); - return res == -1 ? (unsigned)BOOST_FPE_INV : (unsigned)res; - #else - /* Not Implemented */ --- -1.9.1 - diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost/0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch new file mode 100644 index 000000000..8a85aac18 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch @@ -0,0 +1,49 @@ +From 40192301130dcd913aa6d9cb9dba9e5f8dbd9d16 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com> +Date: Wed, 24 Aug 2016 21:01:43 +0100 +Subject: [PATCH 1/4] use POSIX poll.h instead of sys/poll.h +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +POSIX specifies that <poll.h> is the correct header to +include for poll() + http://pubs.opengroup.org/onlinepubs/009695399/functions/poll.html +whereas <sys/poll.h> is only needed for ancient glibc (<2.3), +so let's follow POSIX instead. + +As a side-effect, this silences a warning when compiling +against the musl C-library: + +In file included from ./boost/asio/detail/socket_types.hpp:61:0, + from ./boost/asio/ip/address_v4.hpp:21, + from ./boost/asio/ip/address.hpp:21, + from libs/log/src/init_from_settings.cpp:65: +<sysroot>/usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp] + #warning redirecting incorrect #include <sys/poll.h> to <poll.h> + ^~~~~~~ + +etc. + +Signed-off-by: André Draszik <adraszik@tycoint.com> +--- +Upstream-Status: Submitted https://svn.boost.org/trac/boost/ticket/12419 + boost/asio/detail/socket_types.hpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/boost/asio/detail/socket_types.hpp b/boost/asio/detail/socket_types.hpp +index e8c7109..7e65d3c 100644 +--- a/boost/asio/detail/socket_types.hpp ++++ b/boost/asio/detail/socket_types.hpp +@@ -58,7 +58,7 @@ + #else + # include <sys/ioctl.h> + # if !defined(__SYMBIAN32__) +-# include <sys/poll.h> ++# include <poll.h> + # endif + # include <sys/types.h> + # include <sys/stat.h> +-- +2.9.3 + diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost/0002-boost-test-execution_monitor.hpp-fix-mips-soft-float.patch b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0002-boost-test-execution_monitor.hpp-fix-mips-soft-float.patch new file mode 100644 index 000000000..569c98733 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0002-boost-test-execution_monitor.hpp-fix-mips-soft-float.patch @@ -0,0 +1,145 @@ +From 5c349a1c391c9ce171a1c80f5164fae764f27dba Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com> +Date: Wed, 24 Aug 2016 20:58:59 +0100 +Subject: [PATCH 2/4] boost/test/execution_monitor.hpp: fix mips soft float +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +gcc.compile.c++ <builddir>/boost/bin.v2/libs/test/build/gcc-4.3.1/release/threading-multi/execution_monitor.o + + "mipsel-poky-linux-musl-g++" "-mel" "-mabi=32" "-msoft-float" "-march=mips32r2" "-mips16" "-minterlink-compressed" "-mtune=24kec" "-mdsp" "-Wl,-O1" "-Wl,--as-needed" "-fstack-protector-strong" "-Wl,-z,relro,-z,now" "--sysroot=<sysroot>" -ftemplate-depth-128 -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=<srcdir>=/usr/src/debug/boost/1.61.0-r0 -fdebug-prefix-map=<sysroot_host>= -fdebug-prefix-map=<sysroot>= -fstack-protector-strong -pie -fpie -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -fvisibility-inlines-hidden -O3 -finline-functions -Wno-inline -Wall -pedantic -pthread -fPIC -Wno-variadic-macros -DBOOST_ALL_NO_LIB=1 -DBOOST_CHRONO_DYN_LINK=1 -DBOOST_SYSTEM_DYN_LINK=1 -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_TEST_DYN_LINK=1 -DBOOST_TIMER_DYN_LINK=1 -DNDEBUG -I"." -c -o "<builddir>/boost/bin.v2/libs/test/build/gcc-4.3.1/release/threading-multi/execution_monitor.o" "libs/test/src/execution_monitor.cpp" + +In file included from ./boost/test/impl/execution_monitor.ipp:31:0, + from libs/test/src/execution_monitor.cpp:16: +./boost/test/execution_monitor.hpp:491:27: error: 'FE_DIVBYZERO' was not declared in this scope + BOOST_FPE_DIVBYZERO = FE_DIVBYZERO, + ^~~~~~~~~~~~ +./boost/test/execution_monitor.hpp:492:27: error: 'FE_INEXACT' was not declared in this scope + BOOST_FPE_INEXACT = FE_INEXACT, + ^~~~~~~~~~ +./boost/test/execution_monitor.hpp:493:27: error: 'FE_INVALID' was not declared in this scope + BOOST_FPE_INVALID = FE_INVALID, + ^~~~~~~~~~ +./boost/test/execution_monitor.hpp:494:27: error: 'FE_OVERFLOW' was not declared in this scope + BOOST_FPE_OVERFLOW = FE_OVERFLOW, + ^~~~~~~~~~~ +./boost/test/execution_monitor.hpp:495:27: error: 'FE_UNDERFLOW' was not declared in this scope + BOOST_FPE_UNDERFLOW = FE_UNDERFLOW, + ^~~~~~~~~~~~ + +The reason is that some (notably FPU-less) architectures, +including mips*-nf, don't define/implement some of the +floating point constants, even though fenv.h is +available. + +The key point is: + A fully standards conforming fenv.h does not have to + define any FE_* macros, and if it does define them, + then it defines macros only for the FP exceptions it + actually supports. + +So correct usage requires a triple check: +1) Check BOOST_NO_FENV_H to see if the header is supported. +2) Include the header and then check FE_ALL_EXCEPT to see + if any FP exceptions are supported. +3) Before using the individual FE_* macros, you need to + check for their existence too as not all may be + supported. + +https://svn.boost.org/trac/boost/ticket/11756 + +Other projects have similar issues, e.g. pixman, and +apply similar work-arounds: + https://lists.freedesktop.org/archives/pixman/2014-February/003172.html + +Architectures are notably also allowed to define FE_ALL_EXCEPT to 0! +Keeping this in mind, and knowing that the compiler will eliminate +code that can't be executed, we can change BOOST_FPE_ALL to be 0 for +the case of compiling using Clang and/or fenv.h being unavailable +as well, which allows simplification of the #ifdef's in +execution_monitor.ipp a bit. + +Signed-off-by: André Draszik <adraszik@tycoint.com> +--- +Upstream-Status: Submitted https://svn.boost.org/trac/boost/ticket/11756 + boost/test/execution_monitor.hpp | 26 +++++++++++++++++++++++++- + boost/test/impl/execution_monitor.ipp | 10 ++++++++-- + 2 files changed, 33 insertions(+), 3 deletions(-) + +diff --git a/boost/test/execution_monitor.hpp b/boost/test/execution_monitor.hpp +index 0eee497..44fe59d 100644 +--- a/boost/test/execution_monitor.hpp ++++ b/boost/test/execution_monitor.hpp +@@ -486,15 +486,39 @@ enum masks { + BOOST_FPE_ALL = MCW_EM, + #elif defined(BOOST_NO_FENV_H) || defined(BOOST_CLANG) \ + || defined(__ARM_PCS) +- BOOST_FPE_ALL = 1, ++ BOOST_FPE_ALL = 0, + #else ++#if defined(FE_DIVBYZERO) + BOOST_FPE_DIVBYZERO = FE_DIVBYZERO, ++#else ++ BOOST_FPE_DIVBYZERO = 0, ++#endif ++#if defined(FE_INEXACT) + BOOST_FPE_INEXACT = FE_INEXACT, ++#else ++ BOOST_FPE_INEXACT = 0, ++#endif ++#if defined(FE_INVALID) + BOOST_FPE_INVALID = FE_INVALID, ++#else ++ BOOST_FPE_INVALID = 0, ++#endif ++#if defined(FE_OVERFLOW) + BOOST_FPE_OVERFLOW = FE_OVERFLOW, ++#else ++ BOOST_FPE_OVERFLOW = 0, ++#endif ++#if defined(FE_UNDERFLOW) + BOOST_FPE_UNDERFLOW = FE_UNDERFLOW, ++#else ++ BOOST_FPE_UNDERFLOW = 0, ++#endif + ++#if defined(FE_ALL_EXCEPT) + BOOST_FPE_ALL = FE_ALL_EXCEPT, ++#else ++ BOOST_FPE_ALL = 0, ++#endif + #endif + BOOST_FPE_INV = BOOST_FPE_ALL+1 + }; +diff --git a/boost/test/impl/execution_monitor.ipp b/boost/test/impl/execution_monitor.ipp +index f7fc8ea..d1088b9 100644 +--- a/boost/test/impl/execution_monitor.ipp ++++ b/boost/test/impl/execution_monitor.ipp +@@ -1381,7 +1381,10 @@ enable( unsigned mask ) + #endif + + return ~old_cw & BOOST_FPE_ALL; +-#elif defined(__GLIBC__) && defined(__USE_GNU) && !defined(BOOST_CLANG) && !defined(BOOST_NO_FENV_H) ++#elif defined(__GLIBC__) && defined(__USE_GNU) ++ if (BOOST_FPE_ALL == 0) ++ /* Not Implemented */ ++ return 0; + feclearexcept(BOOST_FPE_ALL); + int res = feenableexcept( mask ); + return res == -1 ? (unsigned)BOOST_FPE_INV : (unsigned)res; +@@ -1418,7 +1421,10 @@ disable( unsigned mask ) + #endif + + return ~old_cw & BOOST_FPE_ALL; +-#elif defined(__GLIBC__) && defined(__USE_GNU) && !defined(BOOST_CLANG) && !defined(BOOST_NO_FENV_H) ++#elif defined(__GLIBC__) && defined(__USE_GNU) ++ if (BOOST_FPE_ALL == 0) ++ /* Not Implemented */ ++ return BOOST_FPE_INV; + feclearexcept(BOOST_FPE_ALL); + int res = fedisableexcept( mask ); + return res == -1 ? (unsigned)BOOST_FPE_INV : (unsigned)res; +-- +2.9.3 + diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost/0003-smart_ptr-mips-assembly-doesn-t-compile-in-mips16e-m.patch b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0003-smart_ptr-mips-assembly-doesn-t-compile-in-mips16e-m.patch new file mode 100644 index 000000000..2b48d0d5d --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0003-smart_ptr-mips-assembly-doesn-t-compile-in-mips16e-m.patch @@ -0,0 +1,60 @@ +From 4f19d72ca94418431e068cfd4ffb96ed9b289f6c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com> +Date: Wed, 24 Aug 2016 17:34:59 +0100 +Subject: [PATCH 3/4] smart_ptr: mips assembly doesn't compile in mips16e mode +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +gcc.compile.c++ <builddir>/boost/bin.v2/libs/date_time/build/gcc-4.3.1/release/threading-multi/gregorian/greg_month.o + + "mipsel-poky-linux-musl-g++" "-mel" "-mabi=32" "-msoft-float" "-march=mips32r2" "-mips16" "-minterlink-compressed" "-mtune=24kec" "-mdsp" "-Wl,-O1" "-Wl,--as-needed" "-fstack-protector-strong" "-Wl,-z,relro,-z,now" "--sysroot=<sysroot>" -ftemplate-depth-128 -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=<srcdir>=/usr/src/debug/boost/1.61.0-r0 -fdebug-prefix-map=<sysroot_host>= -fdebug-prefix-map=<sysroot>= -fstack-protector-strong -pie -fpie -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -fvisibility-inlines-hidden -O3 -finline-functions -Wno-inline -Wall -pthread -fPIC -DBOOST_ALL_DYN_LINK=1 -DBOOST_ALL_NO_LIB=1 -DDATE_TIME_INLINE -DNDEBUG -I"." -c -o "<builddir>/boost/bin.v2/libs/date_time/build/gcc-4.3.1/release/threading-multi/gregorian/greg_month.o" "libs/date_time/src/gregorian/greg_month.cpp" + +{standard input}: Assembler messages: +{standard input}:17603: Warning: the `dsp' extension requires MIPS32 revision 2 or greater +{standard input}:17604: Error: unrecognized opcode `ll $3,4($16)' +{standard input}:17606: Error: unrecognized opcode `sc $2,4($16)' +{standard input}:17734: Error: unrecognized opcode `ll $3,8($16)' +{standard input}:17736: Error: unrecognized opcode `sc $2,8($16)' +{standard input}:18084: Error: unrecognized opcode `ll $3,4($4)' +{standard input}:18086: Error: unrecognized opcode `sc $2,4($4)' +{standard input}:18318: Error: unrecognized opcode `ll $3,8($4)' +{standard input}:18320: Error: unrecognized opcode `sc $2,8($4)' +{standard input}:19921: Error: unrecognized opcode `ll $3,4($2)' +{standard input}:19923: Error: unrecognized opcode `sc $3,4($2)' +{standard input}:20199: Error: unrecognized opcode `ll $4,4($16)' +{standard input}:20201: Error: unrecognized opcode `sc $2,4($16)' +{standard input}:23392: Error: unrecognized opcode `ll $4,8($16)' +{standard input}:23394: Error: unrecognized opcode `sc $2,8($16)' +...failed updating 1 target... + +boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp +contains hand-written MIPS assembly, which is not compatible +with the MIPS16e instruction set. + +By not using this file in MIPS16e mode, we fallback to using +g++ 4.1+ __sync intrinsics (__sync_fetch_and_add() and +__sync_val_compare_and_swap()) which are working fine. + +Signed-off-by: André Draszik <adraszik@tycoint.com> +--- +Upstream-Status: Backport https://svn.boost.org/trac/boost/ticket/12418 + boost/smart_ptr/detail/sp_counted_base.hpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/boost/smart_ptr/detail/sp_counted_base.hpp b/boost/smart_ptr/detail/sp_counted_base.hpp +index 0addf07..0995ca8 100644 +--- a/boost/smart_ptr/detail/sp_counted_base.hpp ++++ b/boost/smart_ptr/detail/sp_counted_base.hpp +@@ -65,7 +65,7 @@ + #elif defined( __GNUC__ ) && ( defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc ) ) && !defined(__PATHSCALE__) && !defined( _AIX ) + # include <boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp> + +-#elif defined( __GNUC__ ) && ( defined( __mips__ ) || defined( _mips ) ) && !defined(__PATHSCALE__) ++#elif defined( __GNUC__ ) && ( defined( __mips__ ) || defined( _mips ) ) && !defined(__PATHSCALE__) && !defined( __mips16 ) + # include <boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp> + + #elif defined( BOOST_SP_HAS_SYNC ) +-- +2.9.3 + diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost/0004-Use-atomic-by-default-when-BOOST_NO_CXX11_HDR_ATOMIC.patch b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0004-Use-atomic-by-default-when-BOOST_NO_CXX11_HDR_ATOMIC.patch new file mode 100644 index 000000000..ab7826ba2 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0004-Use-atomic-by-default-when-BOOST_NO_CXX11_HDR_ATOMIC.patch @@ -0,0 +1,59 @@ +From c234cc557f60729e071d6da59747c1a9289555c5 Mon Sep 17 00:00:00 2001 +From: Peter Dimov <pdimov@pdimov.com> +Date: Sun, 28 Aug 2016 21:28:21 +0300 +Subject: [PATCH 4/4] Use <atomic> by default when BOOST_NO_CXX11_HDR_ATOMIC is + not defined + +--- +Upstream-Status: Backport [https://github.com/boostorg/smart_ptr/commit/20fedcff2ca3143503ec4e876d47745ab0ec7b0c] +Signed-off-by: André Draszik <git@andred.net> + boost/smart_ptr/detail/atomic_count.hpp | 3 +++ + boost/smart_ptr/detail/sp_counted_base.hpp | 3 +++ + boost/smart_ptr/detail/spinlock.hpp | 3 +++ + 3 files changed, 9 insertions(+) + +diff --git a/boost/smart_ptr/detail/atomic_count.hpp b/boost/smart_ptr/detail/atomic_count.hpp +index 8aefd44..6e4f71a 100644 +--- a/boost/smart_ptr/detail/atomic_count.hpp ++++ b/boost/smart_ptr/detail/atomic_count.hpp +@@ -73,6 +73,9 @@ + #elif defined( BOOST_DISABLE_THREADS ) && !defined( BOOST_SP_ENABLE_THREADS ) && !defined( BOOST_DISABLE_WIN32 ) + # include <boost/smart_ptr/detail/atomic_count_nt.hpp> + ++#elif !defined( BOOST_NO_CXX11_HDR_ATOMIC ) ++# include <boost/smart_ptr/detail/atomic_count_std_atomic.hpp> ++ + #elif defined( __GNUC__ ) && ( defined( __i386__ ) || defined( __x86_64__ ) ) && !defined( __PATHSCALE__ ) + # include <boost/smart_ptr/detail/atomic_count_gcc_x86.hpp> + +diff --git a/boost/smart_ptr/detail/sp_counted_base.hpp b/boost/smart_ptr/detail/sp_counted_base.hpp +index 0995ca8..83ede23 100644 +--- a/boost/smart_ptr/detail/sp_counted_base.hpp ++++ b/boost/smart_ptr/detail/sp_counted_base.hpp +@@ -44,6 +44,9 @@ + #elif defined( BOOST_SP_HAS_CLANG_C11_ATOMICS ) + # include <boost/smart_ptr/detail/sp_counted_base_clang.hpp> + ++#elif !defined( BOOST_NO_CXX11_HDR_ATOMIC ) ++# include <boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp> ++ + #elif defined( __SNC__ ) + # include <boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp> + +diff --git a/boost/smart_ptr/detail/spinlock.hpp b/boost/smart_ptr/detail/spinlock.hpp +index 19f93d7..0b618df 100644 +--- a/boost/smart_ptr/detail/spinlock.hpp ++++ b/boost/smart_ptr/detail/spinlock.hpp +@@ -43,6 +43,9 @@ + #elif defined( BOOST_SP_USE_PTHREADS ) + # include <boost/smart_ptr/detail/spinlock_pt.hpp> + ++#elif !defined( BOOST_NO_CXX11_HDR_ATOMIC ) ++# include <boost/smart_ptr/detail/spinlock_std_atomic.hpp> ++ + #elif defined(__GNUC__) && defined( __arm__ ) && !defined( __thumb__ ) + # include <boost/smart_ptr/detail/spinlock_gcc_arm.hpp> + +-- +2.9.3 + diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost/boost-CVE-2012-2677.patch b/import-layers/yocto-poky/meta/recipes-support/boost/boost/boost-CVE-2012-2677.patch new file mode 100644 index 000000000..917617a04 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/boost/boost/boost-CVE-2012-2677.patch @@ -0,0 +1,112 @@ +Reference + +https://svn.boost.org/trac/boost/changeset/78326 + +Upstream-Status: Backport +CVE: CVE-2012-2677 +Signed-off-by: Yue Tao <yue.tao@windriver.com> + +diff --git a/boost/pool/pool.hpp.old b/boost/pool/pool.hpp +index c47b11f..417a1e0 100644 +--- a/boost/pool/pool.hpp.old ++++ b/boost/pool/pool.hpp +@@ -26,6 +26,8 @@ + + #include <boost/pool/poolfwd.hpp> + ++// std::numeric_limits ++#include <boost/limits.hpp> + // boost::integer::static_lcm + #include <boost/integer/common_factor_ct.hpp> + // boost::simple_segregated_storage +@@ -355,6 +357,15 @@ class pool: protected simple_segregated_storage < typename UserAllocator::size_t + return s; + } + ++ size_type max_chunks() const ++ { //! Calculated maximum number of memory chunks that can be allocated in a single call by this Pool. ++ size_type partition_size = alloc_size(); ++ size_type POD_size = integer::static_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type); ++ size_type max_chunks = (std::numeric_limits<size_type>::max() - POD_size) / alloc_size(); ++ ++ return max_chunks; ++ } ++ + static void * & nextof(void * const ptr) + { //! \returns Pointer dereferenced. + //! (Provided and used for the sake of code readability :) +@@ -375,6 +386,8 @@ class pool: protected simple_segregated_storage < typename UserAllocator::size_t + //! the first time that object needs to allocate system memory. + //! The default is 32. This parameter may not be 0. + //! \param nmax_size is the maximum number of chunks to allocate in one block. ++ set_next_size(nnext_size); ++ set_max_size(nmax_size); + } + + ~pool() +@@ -398,8 +411,8 @@ class pool: protected simple_segregated_storage < typename UserAllocator::size_t + } + void set_next_size(const size_type nnext_size) + { //! Set number of chunks to request from the system the next time that object needs to allocate system memory. This value should never be set to 0. +- //! \returns nnext_size. +- next_size = start_size = nnext_size; ++ BOOST_USING_STD_MIN(); ++ next_size = start_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(nnext_size, max_chunks()); + } + size_type get_max_size() const + { //! \returns max_size. +@@ -407,7 +420,8 @@ class pool: protected simple_segregated_storage < typename UserAllocator::size_t + } + void set_max_size(const size_type nmax_size) + { //! Set max_size. +- max_size = nmax_size; ++ BOOST_USING_STD_MIN(); ++ max_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(nmax_size, max_chunks()); + } + size_type get_requested_size() const + { //! \returns the requested size passed into the constructor. +@@ -708,9 +722,9 @@ void * pool<UserAllocator>::malloc_need_resize() + + BOOST_USING_STD_MIN(); + if(!max_size) +- next_size <<= 1; ++ set_next_size(next_size << 1); + else if( next_size*partition_size/requested_size < max_size) +- next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size); ++ set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size)); + + // initialize it, + store().add_block(node.begin(), node.element_size(), partition_size); +@@ -748,9 +762,9 @@ void * pool<UserAllocator>::ordered_malloc_need_resize() + + BOOST_USING_STD_MIN(); + if(!max_size) +- next_size <<= 1; ++ set_next_size(next_size << 1); + else if( next_size*partition_size/requested_size < max_size) +- next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size); ++ set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size)); + + // initialize it, + // (we can use "add_block" here because we know that +@@ -792,6 +806,8 @@ void * pool<UserAllocator>::ordered_malloc(const size_type n) + { //! Gets address of a chunk n, allocating new memory if not already available. + //! \returns Address of chunk n if allocated ok. + //! \returns 0 if not enough memory for n chunks. ++ if (n > max_chunks()) ++ return 0; + + const size_type partition_size = alloc_size(); + const size_type total_req_size = n * requested_size; +@@ -840,9 +856,9 @@ void * pool<UserAllocator>::ordered_malloc(const size_type n) + + BOOST_USING_STD_MIN(); + if(!max_size) +- next_size <<= 1; ++ set_next_size(next_size << 1); + else if( next_size*partition_size/requested_size < max_size) +- next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size); ++ set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size)); + + // insert it into the list, + // handle border case. diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost/boost-math-disable-pch-for-gcc.patch b/import-layers/yocto-poky/meta/recipes-support/boost/boost/boost-math-disable-pch-for-gcc.patch new file mode 100644 index 000000000..595ba1786 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/boost/boost/boost-math-disable-pch-for-gcc.patch @@ -0,0 +1,31 @@ +From cabfcba1ff7511ffd6b91ca244288d44f585aad2 Mon Sep 17 00:00:00 2001 +From: Jackie Huang <jackie.huang@windriver.com> +Date: Fri, 23 Sep 2016 01:04:50 -0700 +Subject: [PATCH] boost-math: disable pch for gcc + +Upstream-Status: Inappropriate [*] + +* It's a work around for a defect when build in parallel: +https://svn.boost.org/trac/boost/ticket/12477 + +Signed-off-by: Jackie Huang <jackie.huang@windriver.com> +--- + libs/math/build/Jamfile.v2 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libs/math/build/Jamfile.v2 b/libs/math/build/Jamfile.v2 +index e19fb2e..82472a7 100644 +--- a/libs/math/build/Jamfile.v2 ++++ b/libs/math/build/Jamfile.v2 +@@ -13,7 +13,7 @@ project + #<toolset>intel-linux:<pch>off + <toolset>intel-darwin:<pch>off + <toolset>msvc-7.1:<pch>off +- <toolset>gcc,<target-os>windows:<pch>off ++ <toolset>gcc:<pch>off + #<toolset>gcc:<cxxflags>-fvisibility=hidden + <toolset>intel-linux:<cxxflags>-fvisibility=hidden + #<toolset>sun:<cxxflags>-xldscope=hidden +-- +2.7.4 + diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost_1.60.0.bb b/import-layers/yocto-poky/meta/recipes-support/boost/boost_1.60.0.bb deleted file mode 100644 index 4d824c85b..000000000 --- a/import-layers/yocto-poky/meta/recipes-support/boost/boost_1.60.0.bb +++ /dev/null @@ -1,8 +0,0 @@ -include boost-${PV}.inc -include boost.inc - -SRC_URI += "\ - file://arm-intrinsics.patch \ - file://0001-Do-not-qualify-fenv.h-names-that-might-be-macros.patch;striplevel=2 \ - file://consider-hardfp.patch \ -" diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost_1.61.0.bb b/import-layers/yocto-poky/meta/recipes-support/boost/boost_1.61.0.bb new file mode 100644 index 000000000..40e3870a3 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/boost/boost_1.61.0.bb @@ -0,0 +1,13 @@ +include boost-${PV}.inc +include boost.inc + +SRC_URI += "\ + file://arm-intrinsics.patch \ + file://consider-hardfp.patch \ + file://boost-CVE-2012-2677.patch \ + file://0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch \ + file://0002-boost-test-execution_monitor.hpp-fix-mips-soft-float.patch \ + file://0003-smart_ptr-mips-assembly-doesn-t-compile-in-mips16e-m.patch \ + file://0004-Use-atomic-by-default-when-BOOST_NO_CXX11_HDR_ATOMIC.patch \ + file://boost-math-disable-pch-for-gcc.patch \ +" diff --git a/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch b/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch index 4b4b287d4..4a8ae5f4b 100644 --- a/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch +++ b/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch @@ -6,9 +6,13 @@ This solves errors such as | Running hooks in [...]/rootfs/etc/ca-certificates/update.d... | [...]/usr/sbin/update-ca-certificates: line 194: Not: command not found +| [...]/usr/sbin/update-ca-certificates: line 230: Not a directory: --: command not found +| E: Not a directory: -- exited with code 127. + Upstream-Status: Inappropriate Signed-off-by: Ross Burton <ross.burton@intel.com> +Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com> --- sbin/update-ca-certificates | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) @@ -24,7 +28,7 @@ Index: git/sbin/update-ca-certificates - VERBOSE_ARG= - [ "$verbose" = 0 ] || VERBOSE_ARG="--verbose" - eval run-parts "$VERBOSE_ARG" --test -- "$HOOKSDIR" | while read hook -+ eval run-parts --test -- "$HOOKSDIR" | while read hook ++ eval run-parts --test "$HOOKSDIR" | while read hook do ( cat "$ADDED" cat "$REMOVED" ) | "$hook" || echo "E: $hook exited with code $?." diff --git a/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-remove-c-rehash.patch b/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-remove-c-rehash.patch deleted file mode 100644 index bf027233d..000000000 --- a/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-remove-c-rehash.patch +++ /dev/null @@ -1,46 +0,0 @@ -Upstream-Status: Pending - -From 111e905fe931da1a3800accfc675cc01c8ee080c Mon Sep 17 00:00:00 2001 -From: Ulf Samuelsson <ulf@emagii.com> -Date: Tue, 28 Feb 2012 06:42:58 +0100 -Subject: [PATCH] update-ca-certificates: remove c rehash - -Updated earlier patch to apply clean on 2012-02-12 -Signed-off-by: Ulf Samuelsson <ulf@emagii.com> ---- - sbin/update-ca-certificates | 20 ++++++++++---------- - 1 files changed, 10 insertions(+), 10 deletions(-) - -diff --git a/sbin/update-ca-certificates b/sbin/update-ca-certificates -index 5375950..c567e3d 100755 ---- a/sbin/update-ca-certificates -+++ b/sbin/update-ca-certificates -@@ -132,16 +132,16 @@ rm -f "$CERTBUNDLE" - ADDED_CNT=$(wc -l < "$ADDED") - REMOVED_CNT=$(wc -l < "$REMOVED") - --if [ "$ADDED_CNT" -gt 0 ] || [ "$REMOVED_CNT" -gt 0 ] --then -- # only run if set of files has changed -- if [ "$verbose" = 0 ] -- then -- c_rehash . > /dev/null -- else -- c_rehash . -- fi --fi -+#if [ "$ADDED_CNT" -gt 0 ] || [ "$REMOVED_CNT" -gt 0 ] -+#then -+# # only run if set of files has changed -+# if [ "$verbose" = 0 ] -+# then -+# c_rehash . > /dev/null -+# else -+# c_rehash . -+# fi -+#fi - - chmod 0644 "$TEMPBUNDLE" - mv -f "$TEMPBUNDLE" "$CERTBUNDLE" --- -1.7.4.1 diff --git a/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates_20160104.bb b/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates_20160104.bb index e0f193913..1bea0676b 100644 --- a/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates_20160104.bb +++ b/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates_20160104.bb @@ -9,12 +9,12 @@ LIC_FILES_CHKSUM = "file://debian/copyright;md5=e7358b9541ccf3029e9705ed8de57968 # This is needed to ensure we can run the postinst at image creation time DEPENDS = "ca-certificates-native" -DEPENDS_class-native = "" +DEPENDS_class-native = "openssl-native" +DEPENDS_class-nativesdk = "ca-certificates-native openssl-native" SRCREV = "f54715702c5c0581c9461f78fd84e2c8d2ec243c" SRC_URI = "git://anonscm.debian.org/collab-maint/ca-certificates.git \ - file://0001-update-ca-certificates-remove-c-rehash.patch \ file://0002-update-ca-certificates-use-SYSROOT.patch \ file://0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch \ file://update-ca-certificates-support-Toybox.patch \ @@ -77,4 +77,6 @@ do_install_append_class-native () { SYSROOT="${D}${base_prefix}" ${D}${sbindir}/update-ca-certificates } +RDEPENDS_${PN} += "openssl" + BBCLASSEXTEND += "native nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-support/consolekit/consolekit_0.4.6.bb b/import-layers/yocto-poky/meta/recipes-support/consolekit/consolekit_0.4.6.bb index 2974e3664..ceac0fe31 100644 --- a/import-layers/yocto-poky/meta/recipes-support/consolekit/consolekit_0.4.6.bb +++ b/import-layers/yocto-poky/meta/recipes-support/consolekit/consolekit_0.4.6.bb @@ -30,7 +30,7 @@ PACKAGECONFIG[pam] = "--enable-pam-module --with-pam-module-dir=${base_libdir}/s PACKAGECONFIG[policykit] = "--with-polkit,--without-polkit,polkit" PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--with-systemdsystemunitdir=" -FILES_${PN} += "${localstatedir}/log/ConsoleKit ${exec_prefix}/lib/ConsoleKit \ +FILES_${PN} += "${exec_prefix}/lib/ConsoleKit \ ${libdir}/ConsoleKit ${systemd_unitdir} ${base_libdir} \ ${datadir}/dbus-1 ${datadir}/PolicyKit ${datadir}/polkit*" @@ -45,6 +45,6 @@ do_install_append() { > ${D}${sysconfdir}/tmpfiles.d/consolekit.conf fi - # Remove /var/run from package as console-kit-daemon will populate it on startup - rm -fr "${D}${localstatedir}/run" + # Remove /var/ directories as the daemon creates them as required + rm -rf ${D}${localstatedir} } diff --git a/import-layers/yocto-poky/meta/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch b/import-layers/yocto-poky/meta/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch new file mode 100644 index 000000000..74e5d99cf --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch @@ -0,0 +1,43 @@ +[PATCH] replace krb5-config with pkg-config + +Upstream-Status: Pending + +Signed-off-by: Roy Li <rongqing.li@windriver.com> +--- + configure.ac | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index e99b303..dc93f39 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1196,7 +1196,7 @@ AC_ARG_WITH(gssapi, + fi + ]) + +-: ${KRB5CONFIG:="$GSSAPI_ROOT/bin/krb5-config"} ++KRB5CONFIG=`which pkg-config` + + save_CPPFLAGS="$CPPFLAGS" + AC_MSG_CHECKING([if GSS-API support is requested]) +@@ -1207,7 +1207,7 @@ if test x"$want_gss" = xyes; then + if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then + GSSAPI_INCS=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --cflags gssapi` + elif test -f "$KRB5CONFIG"; then +- GSSAPI_INCS=`$KRB5CONFIG --cflags gssapi` ++ GSSAPI_INCS=`$KRB5CONFIG --cflags mit-krb5-gssapi` + elif test "$GSSAPI_ROOT" != "yes"; then + GSSAPI_INCS="-I$GSSAPI_ROOT/include" + fi +@@ -1300,7 +1300,7 @@ if test x"$want_gss" = xyes; then + elif test -f "$KRB5CONFIG"; then + dnl krb5-config doesn't have --libs-only-L or similar, put everything + dnl into LIBS +- gss_libs=`$KRB5CONFIG --libs gssapi` ++ gss_libs=`$KRB5CONFIG --libs mit-krb5-gssapi` + LIBS="$gss_libs $LIBS" + else + case $host in +-- +1.9.1 + diff --git a/import-layers/yocto-poky/meta/recipes-support/curl/curl_7.47.1.bb b/import-layers/yocto-poky/meta/recipes-support/curl/curl_7.50.1.bb index c2173d8a0..a21419a4d 100644 --- a/import-layers/yocto-poky/meta/recipes-support/curl/curl_7.47.1.bb +++ b/import-layers/yocto-poky/meta/recipes-support/curl/curl_7.50.1.bb @@ -5,15 +5,17 @@ SECTION = "console/network" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;beginline=8;md5=3a34942f4ae3fbf1a303160714e664ac" -SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2" +SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2 \ + file://0001-replace-krb5-config-with-pkg-config.patch \ +" # curl likes to set -g0 in CFLAGS, so we stop it # from mucking around with debug options # SRC_URI += " file://configure_ac.patch" -SRC_URI[md5sum] = "9ea3123449439bbd960cd25cf98796fb" -SRC_URI[sha256sum] = "ddc643ab9382e24bbe4747d43df189a0a6ce38fcb33df041b9cb0b3cd47ae98f" +SRC_URI[md5sum] = "015f6a0217ca6f2c5442ca406476920b" +SRC_URI[sha256sum] = "3c12c5f54ccaa1d40abc65d672107dcc75d3e1fcb38c267484334280096e5156" inherit autotools pkgconfig binconfig multilib_header @@ -40,6 +42,7 @@ PACKAGECONFIG[ssl] = "--with-ssl --with-random=/dev/urandom,--without-ssl,openss PACKAGECONFIG[telnet] = "--enable-telnet,--disable-telnet," PACKAGECONFIG[tftp] = "--enable-tftp,--disable-tftp," PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib" +PACKAGECONFIG[krb5] = "--with-gssapi,--without-gssapi,krb5" EXTRA_OECONF = " \ --enable-crypto-auth \ diff --git a/import-layers/yocto-poky/meta/recipes-support/db/db/Makefile-let-libdb-6.0.la-depend-os_map.l.patch b/import-layers/yocto-poky/meta/recipes-support/db/db/Makefile-let-libdb-6.0.la-depend-os_map.l.patch index d4c6bb8e0..68a213136 100644 --- a/import-layers/yocto-poky/meta/recipes-support/db/db/Makefile-let-libdb-6.0.la-depend-os_map.l.patch +++ b/import-layers/yocto-poky/meta/recipes-support/db/db/Makefile-let-libdb-6.0.la-depend-os_map.l.patch @@ -14,10 +14,10 @@ Signed-off-by: Robert Yang <liezhi.yang@windriver.com> dist/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/dist/Makefile.in b/dist/Makefile.in -index 0a42375..d9e05b9 100644 ---- a/dist/Makefile.in -+++ b/dist/Makefile.in +Index: db-6.0.30/dist/Makefile.in +=================================================================== +--- db-6.0.30.orig/dist/Makefile.in ++++ db-6.0.30/dist/Makefile.in @@ -863,7 +863,7 @@ $(libdb_version): $(C_OBJS) $(LN) -s $(libdb_version) $(libdb) @@ -27,6 +27,3 @@ index 0a42375..d9e05b9 100644 $(SOLINK) $(SOFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) \ $(LIBCSO_LIBS) $(RM) $(libdb) --- -1.7.9.5 - diff --git a/import-layers/yocto-poky/meta/recipes-support/db/db/Makefile-let-libso_target-depend-on-bt_rec.patch b/import-layers/yocto-poky/meta/recipes-support/db/db/Makefile-let-libso_target-depend-on-bt_rec.patch index 329bff5d3..868040834 100644 --- a/import-layers/yocto-poky/meta/recipes-support/db/db/Makefile-let-libso_target-depend-on-bt_rec.patch +++ b/import-layers/yocto-poky/meta/recipes-support/db/db/Makefile-let-libso_target-depend-on-bt_rec.patch @@ -15,10 +15,10 @@ Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/Makefile.in b/Makefile.in -index e451f70..0a42375 100644 ---- a/Makefile.in -+++ b/Makefile.in +Index: db-6.0.30/dist/Makefile.in +=================================================================== +--- db-6.0.30.orig/dist/Makefile.in ++++ db-6.0.30/dist/Makefile.in @@ -863,7 +863,7 @@ $(libdb_version): $(C_OBJS) $(LN) -s $(libdb_version) $(libdb) diff --git a/import-layers/yocto-poky/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch b/import-layers/yocto-poky/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch index 34e8db84d..6a8eada60 100644 --- a/import-layers/yocto-poky/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch +++ b/import-layers/yocto-poky/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch @@ -10,9 +10,11 @@ Upstream-Status: Inappropriate [embedded specific] Author: jbowler@nslu2-linux.org ---- db-5.1.19/src/dbinc/mutex_int.h.orig 2011-01-05 19:21:42.181805366 -0600 -+++ db-5.1.19/src/dbinc/mutex_int.h 2011-01-05 19:24:53.141853117 -0600 -@@ -474,6 +474,25 @@ +Index: db-6.0.30/src/dbinc/mutex_int.h +=================================================================== +--- db-6.0.30.orig/src/dbinc/mutex_int.h ++++ db-6.0.30/src/dbinc/mutex_int.h +@@ -474,6 +474,25 @@ typedef unsigned char tsl_t; #ifdef LOAD_ACTUAL_MUTEX_CODE /* gcc/arm: 0 is clear, 1 is set. */ @@ -38,7 +40,7 @@ Author: jbowler@nslu2-linux.org #define MUTEX_SET(tsl) ({ \ int __r; \ __asm__ volatile( \ -@@ -484,6 +503,7 @@ +@@ -484,6 +503,7 @@ typedef unsigned char tsl_t; ); \ __r & 1; \ }) diff --git a/import-layers/yocto-poky/meta/recipes-support/db/db/fix-parallel-build.patch b/import-layers/yocto-poky/meta/recipes-support/db/db/fix-parallel-build.patch index 2c7f1e186..27632e1dd 100644 --- a/import-layers/yocto-poky/meta/recipes-support/db/db/fix-parallel-build.patch +++ b/import-layers/yocto-poky/meta/recipes-support/db/db/fix-parallel-build.patch @@ -6,9 +6,11 @@ Upstream-Status: Pending Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> ---- dist.orig/Makefile.in 2012-05-11 19:57:48.000000000 +0200 -+++ dist/Makefile.in 2013-10-31 18:17:11.875532522 +0100 -@@ -1034,7 +1034,7 @@ +Index: db-6.0.30/dist/Makefile.in +=================================================================== +--- db-6.0.30.orig/dist/Makefile.in ++++ db-6.0.30/dist/Makefile.in +@@ -1041,7 +1041,7 @@ db_recover: db_recover@o@ util_sig@o@ $( db_recover@o@ util_sig@o@ $(DEF_LIB) $(LIBS) $(POSTLINK) $@ diff --git a/import-layers/yocto-poky/meta/recipes-support/db/db_5.3.28.bb b/import-layers/yocto-poky/meta/recipes-support/db/db_5.3.28.bb index c724f049f..0b51a1d44 100644 --- a/import-layers/yocto-poky/meta/recipes-support/db/db_5.3.28.bb +++ b/import-layers/yocto-poky/meta/recipes-support/db/db_5.3.28.bb @@ -15,15 +15,17 @@ LICENSE = "Sleepycat" VIRTUAL_NAME ?= "virtual/db" RCONFLICTS_${PN} = "db3" +PR = "r1" + SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz" -SRC_URI += "file://arm-thumb-mutex_db5.patch;patchdir=.. \ +SRC_URI += "file://arm-thumb-mutex_db5.patch \ file://fix-parallel-build.patch \ " SRC_URI[md5sum] = "b99454564d5b4479750567031d66fe24" SRC_URI[sha256sum] = "e0a992d740709892e81f9d93f06daf305cf73fb81b545afe72478043172c3628" -LIC_FILES_CHKSUM = "file://../LICENSE;md5=ed1158e31437f4f87cdd4ab2b8613955" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ed1158e31437f4f87cdd4ab2b8613955" inherit autotools @@ -36,14 +38,6 @@ inherit autotools # to select the correct db in the build (distro) .conf PROVIDES += "${VIRTUAL_NAME}" -# bitbake isn't quite clever enough to deal with sleepycat, -# the distribution sits in the expected directory, but all -# the builds must occur from a sub-directory. The following -# persuades bitbake to go to the right place -S = "${WORKDIR}/db-${PV}/dist" -B = "${WORKDIR}/db-${PV}/build_unix" -SPDX_S = "${WORKDIR}/db-${PV}" - # The executables go in a separate package - typically there # is no need to install these unless doing real database # management on the system. @@ -75,21 +69,23 @@ ARM_MUTEX = "--with-mutex=ARM/gcc-assembly" MUTEX = "" MUTEX_arm = "${ARM_MUTEX}" MUTEX_armeb = "${ARM_MUTEX}" -EXTRA_OECONF += "${MUTEX}" -EXTRA_OEMAKE_class-target = "LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool" +EXTRA_OECONF += "${MUTEX} STRIP=true" +EXTRA_OEMAKE_append_class-target = " LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool" + +AUTOTOOLS_SCRIPT_PATH = "${S}/dist" # Cancel the site stuff - it's set for db3 and destroys the # configure. CONFIG_SITE = "" do_configure() { - gnu-configize --force ${S} - export STRIP="true" + cd ${B} + gnu-configize --force ${AUTOTOOLS_SCRIPT_PATH} oe_runconf } do_compile_prepend() { - sed -i -e 's|hardcode_into_libs=yes|hardcode_into_libs=no|' \ - ${B}/libtool + # Stop libtool adding RPATHs + sed -i -e 's|hardcode_into_libs=yes|hardcode_into_libs=no|' ${B}/libtool } do_install_append() { @@ -114,4 +110,3 @@ INSANE_SKIP_${PN} = "dev-so" INSANE_SKIP_${PN}-cxx = "dev-so" BBCLASSEXTEND = "native nativesdk" - diff --git a/import-layers/yocto-poky/meta/recipes-support/db/db_6.0.30.bb b/import-layers/yocto-poky/meta/recipes-support/db/db_6.0.35.bb index 50a469b08..32afbe82d 100644 --- a/import-layers/yocto-poky/meta/recipes-support/db/db_6.0.30.bb +++ b/import-layers/yocto-poky/meta/recipes-support/db/db_6.0.35.bb @@ -15,25 +15,24 @@ LICENSE = "AGPL-3.0" VIRTUAL_NAME ?= "virtual/db" RCONFLICTS_${PN} = "db3" -# Note, when upgraded to 6.1.x, a patch in RPM will need to be removed to activate db 6.1 support. +PR = "r1" -SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz" -SRC_URI += "file://arm-thumb-mutex_db5.patch;patchdir=.. \ - file://fix-parallel-build.patch \ - file://Makefile-let-libso_target-depend-on-bt_rec.patch \ - file://Makefile-let-libdb-6.0.la-depend-os_map.l.patch;patchdir=.. \ +# Note, when upgraded to 6.1.x, a patch in RPM will need to be removed to activate db 6.1 support. +SRC_URI = "http://distfiles.gentoo.org/distfiles/db-${PV}.tar.gz \ + file://arm-thumb-mutex_db5.patch \ + file://fix-parallel-build.patch \ + file://Makefile-let-libso_target-depend-on-bt_rec.patch \ + file://Makefile-let-libdb-6.0.la-depend-os_map.l.patch \ " -SRC_URI[md5sum] = "ad28eb86ad3203b5422844db179c585b" -SRC_URI[sha256sum] = "608e4b1cf390e9bf54c0ef00c5bd9ca76d36e2261b9f4d33d54516f3f6a20fd2" +SRC_URI[md5sum] = "c65a4d3e930a116abaaf69edfc697f25" +SRC_URI[sha256sum] = "24421affa8ae436fe427ae4f5f2d1634da83d3d55a5ad6354a98eeedb825de55" # Exclude NC versions which lack AES encryption UPSTREAM_CHECK_REGEX = "db-(?P<pver>\d+\.\d+(\.\d+)?).tar" UPSTREAM_CHECK_URI = "http://www.oracle.com/technetwork/products/berkeleydb/downloads/index-082944.html" -LIC_FILES_CHKSUM = "file://../LICENSE;md5=1ec8b0b17cc31513fe35ab10716f8490" - -inherit autotools +LIC_FILES_CHKSUM = "file://LICENSE;md5=1ec8b0b17cc31513fe35ab10716f8490" # Put virtual/db in any appropriate provider of a # relational database, use it as a dependency in @@ -44,13 +43,7 @@ inherit autotools # to select the correct db in the build (distro) .conf PROVIDES += "${VIRTUAL_NAME}" -# bitbake isn't quite clever enough to deal with sleepycat, -# the distribution sits in the expected directory, but all -# the builds must occur from a sub-directory. The following -# persuades bitbake to go to the right place -S = "${WORKDIR}/db-${PV}/dist" -B = "${WORKDIR}/db-${PV}/build_unix" -SPDX_S = "${WORKDIR}/db-${PV}" +inherit autotools # The executables go in a separate package - typically there # is no need to install these unless doing real database @@ -60,7 +53,6 @@ inherit lib_package PACKAGES =+ "${PN}-cxx" FILES_${PN}-cxx = "${libdir}/*cxx*so" - # The dev package has the .so link (as in db3) and the .a's - # it is therefore incompatible (cannot be installed at the # same time) as the db3 package @@ -74,6 +66,17 @@ DB6_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disabl EXTRA_OECONF = "${DB6_CONFIG} --enable-shared --enable-cxx --with-sysroot" +# Cancel the site stuff - it's set for db3 and destroys the configure. +CONFIG_SITE = "" + +AUTOTOOLS_SCRIPT_PATH = "${S}/dist" + +do_configure() { + cd ${B} + gnu-configize --force ${AUTOTOOLS_SCRIPT_PATH} + oe_runconf +} + # Override the MUTEX setting here, the POSIX library is # the default - "POSIX/pthreads/library". # Don't ignore the nice SWP instruction on the ARM: @@ -83,20 +86,12 @@ MUTEX = "" MUTEX_arm = "${ARM_MUTEX}" MUTEX_armeb = "${ARM_MUTEX}" EXTRA_OECONF += "${MUTEX}" -EXTRA_OEMAKE_class-target = "LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool" - -# Cancel the site stuff - it's set for db3 and destroys the -# configure. -CONFIG_SITE = "" -do_configure() { - gnu-configize --force ${S} - export STRIP="true" - oe_runconf -} +EXTRA_OEMAKE_append_class-target = " LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool" +EXTRA_OEMAKE += "STRIP=true" do_compile_prepend() { - sed -i -e 's|hardcode_into_libs=yes|hardcode_into_libs=no|' \ - ${B}/libtool + # Stop libtool adding RPATHs + sed -i -e 's|hardcode_into_libs=yes|hardcode_into_libs=no|' ${B}/libtool } do_install_append() { @@ -117,8 +112,11 @@ do_install_append() { chown -R root:root ${D} } +# libdb isn't versioned in the typical manner (libdb-6.0.so is the full library +# name) so skip these checks. INSANE_SKIP_${PN} = "dev-so" INSANE_SKIP_${PN}-cxx = "dev-so" BBCLASSEXTEND = "native nativesdk" +RECIPE_NO_UPDATE_REASON = "latest db does not work with RPM-5.x due to changes in locking semantics" diff --git a/import-layers/yocto-poky/meta/recipes-support/debianutils/debianutils_4.7.bb b/import-layers/yocto-poky/meta/recipes-support/debianutils/debianutils_4.8.bb index 6a1d5bf83..d969fd3c9 100644 --- a/import-layers/yocto-poky/meta/recipes-support/debianutils/debianutils_4.7.bb +++ b/import-layers/yocto-poky/meta/recipes-support/debianutils/debianutils_4.8.bb @@ -3,13 +3,13 @@ SECTION = "base" LICENSE = "GPLv2 & SMAIL_GPL" LIC_FILES_CHKSUM = "file://debian/copyright;md5=f01a5203d50512fc4830b4332b696a9f" -SRC_URI = "http://snapshot.debian.org/archive/debian/20160204T040501Z/pool/main/d/${BPN}/${BPN}_${PV}.tar.xz" +SRC_URI = "http://snapshot.debian.org/archive/debian/20160629T224408Z/pool/main/d/${BPN}/${BPN}_${PV}.tar.xz" # the package is taken from snapshots.debian.org; that source is static and goes stale # so we check the latest upstream from a directory that does get updated UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/${BPN}/" -SRC_URI[md5sum] = "00186f527b35e2cecd4db593c6d512d0" -SRC_URI[sha256sum] = "a269cacd40f52f2fa5d5636357714a49e8538459c16d77772efaa23711fe53d9" +SRC_URI[md5sum] = "66a37e5ff17be431319bd0b43e9a46b5" +SRC_URI[sha256sum] = "afa95bbe6b6fd3ef3c0c838b2d7232f09fabeff593ca4b5583cffa6748567ee2" inherit autotools update-alternatives diff --git a/import-layers/yocto-poky/meta/recipes-support/enchant/enchant_1.6.0.bb b/import-layers/yocto-poky/meta/recipes-support/enchant/enchant_1.6.0.bb index 97a47614c..44eb2e3df 100644 --- a/import-layers/yocto-poky/meta/recipes-support/enchant/enchant_1.6.0.bb +++ b/import-layers/yocto-poky/meta/recipes-support/enchant/enchant_1.6.0.bb @@ -7,7 +7,7 @@ LICENSE = "LGPLv2.1+" LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=dfcbabf9131dc9a95febef6753a2958b \ file://src/enchant.h;beginline=1;endline=29;md5=8d881caa1d37523567e1d8f726675a18" -DEPENDS = "aspell glib-2.0" +DEPENDS = "glib-2.0" inherit autotools pkgconfig @@ -18,15 +18,17 @@ SRC_URI = "http://www.abisource.com/downloads/enchant/${PV}/enchant-${PV}.tar.gz SRC_URI[md5sum] = "de11011aff801dc61042828041fb59c7" SRC_URI[sha256sum] = "2fac9e7be7e9424b2c5570d8affe568db39f7572c10ed48d4e13cddf03f7097f" -EXTRA_OECONF = "--with-aspell-prefix=${STAGING_DIR_HOST}${prefix} \ - --enable-aspell br_cv_binreloc=no \ - " +PACKAGECONFIG ??= "aspell" +PACKAGECONFIG[aspell] = " --with-aspell-prefix=${STAGING_DIR_HOST}${prefix} --enable-aspell, --disable-aspell, aspell, aspell" +PACKAGECONFIG[ispell] = " --with-ispell-prefix=${STAGING_DIR_HOST}${prefix} --enable-ispell, --disable-ispell, ispell, ispell" +PACKAGECONFIG[uspell] = " --with-uspell-prefix=${STAGING_DIR_HOST}${prefix} --enable-uspell, --disable-uspell, uspell, uspell" +PACKAGECONFIG[hspell] = " --with-hspell-prefix=${STAGING_DIR_HOST}${prefix} --enable-hspell, --disable-hspell, hspell, hspell" +PACKAGECONFIG[myspell] = "--with-myspell-prefix=${STAGING_DIR_HOST}${prefix} --enable-myspell, --disable-myspell, myspell, myspell" + +EXTRA_OECONF = "br_cv_binreloc=no" export CXXFLAGS += " -L${STAGING_LIBDIR} -lstdc++ " FILES_${PN} = "${bindir} ${libdir}/*${SOLIBS} ${datadir}/${BPN} ${libdir}/${BPN}/*.so" FILES_${PN}-dev += "${libdir}/${BPN}/*{SOLIBSDEV} ${libdir}/${BPN}/*.la" FILES_${PN}-staticdev += "${libdir}/${BPN}/*.a" - -RDEPENDS_${PN} += "aspell" - diff --git a/import-layers/yocto-poky/meta/recipes-support/gdbm/gdbm_1.11.bb b/import-layers/yocto-poky/meta/recipes-support/gdbm/gdbm_1.12.bb index adf8c5bd3..c380073c3 100644 --- a/import-layers/yocto-poky/meta/recipes-support/gdbm/gdbm_1.11.bb +++ b/import-layers/yocto-poky/meta/recipes-support/gdbm/gdbm_1.12.bb @@ -10,8 +10,8 @@ SRC_URI = "${GNU_MIRROR}/gdbm/gdbm-${PV}.tar.gz \ file://ptest.patch \ " -SRC_URI[md5sum] = "72c832680cf0999caedbe5b265c8c1bd" -SRC_URI[sha256sum] = "8d912f44f05d0b15a4a5d96a76f852e905d051bb88022fcdfd98b43be093e3c3" +SRC_URI[md5sum] = "9ce96ff4c99e74295ea19040931c8fb9" +SRC_URI[sha256sum] = "d97b2166ee867fd6ca5c022efee80702d6f30dd66af0e03ed092285c3af9bcea" inherit autotools gettext texinfo lib_package ptest diff --git a/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-4.2.1/gmp_fix_for_automake-1.12.patch b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-4.2.1/gmp_fix_for_automake-1.12.patch index 63aed05ec..26fd8ef8b 100644 --- a/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-4.2.1/gmp_fix_for_automake-1.12.patch +++ b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-4.2.1/gmp_fix_for_automake-1.12.patch @@ -5,7 +5,7 @@ this patch avoids these kinds of errors: | configure.in:2240: error: automatic de-ANSI-fication support has been removed | Makefile.am:28: error: automatic de-ANSI-fication support has been removed -Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> +Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> 2012/05/02 diff --git a/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.0/0001-Append-the-user-provided-flags-to-the-auto-detected-.patch b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.1/0001-Append-the-user-provided-flags-to-the-auto-detected-.patch index 325ffe491..325ffe491 100644 --- a/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.0/0001-Append-the-user-provided-flags-to-the-auto-detected-.patch +++ b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.1/0001-Append-the-user-provided-flags-to-the-auto-detected-.patch diff --git a/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.1/0001-confiure.ac-Believe-the-cflags-from-environment.patch b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.1/0001-confiure.ac-Believe-the-cflags-from-environment.patch new file mode 100644 index 000000000..665367658 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.1/0001-confiure.ac-Believe-the-cflags-from-environment.patch @@ -0,0 +1,52 @@ +From ae1a4c37417a3bbbf8ea1cab198982b0cad47e29 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 12 Aug 2016 17:08:13 +0000 +Subject: [PATCH] confiure.ac: Believe the cflags from environment + +In some toolchains e.g. OpenEmbedded -march options +are passed on compiler cmdline, it does not use +the expected target triplets to make these decision +during configure. + +Secondly, dont set armv4 for march when no selection +is made, since it is passed from cmdline + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Inappropriate[OE-Specific] + + configure.ac | 11 ----------- + 1 file changed, 11 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 857ea3b..359e919 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -607,15 +607,6 @@ case $host in + GMP_INCLUDE_MPN(arm/arm-defs.m4) + CALLING_CONVENTIONS_OBJS='arm32call.lo arm32check.lo' + +- # This is needed for clang, which is not content with flags like -mfpu=neon +- # alone. +- case $host in +- *-*-*eabi) +- gcc_cflags_fpmode="-mfloat-abi=softfp" ;; +- *-*-*eabihf) +- gcc_cflags_fpmode="-mfloat-abi=hard" ;; +- esac +- + # FIXME: We make mandatory compiler options optional here. We should + # either enforce them, or organise to strip paths as the corresponding + # options fail. +@@ -686,8 +677,6 @@ case $host in + ;; + *) + path="arm" +- gcc_cflags_arch="-march=armv4" +- GMP_DEFINE_RAW(["define(<NOTHUMB>,1)"]) + ;; + esac + ;; +-- +1.9.1 + diff --git a/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.0/amd64.patch b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.1/amd64.patch index 564d12d42..564d12d42 100644 --- a/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.0/amd64.patch +++ b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.1/amd64.patch diff --git a/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.0/use-includedir.patch b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.1/use-includedir.patch index 74904a253..74904a253 100644 --- a/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.0/use-includedir.patch +++ b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.1/use-includedir.patch diff --git a/import-layers/yocto-poky/meta/recipes-support/gmp/gmp_6.1.0.bb b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp_6.1.1.bb index de827f5b7..303c3ef9e 100644 --- a/import-layers/yocto-poky/meta/recipes-support/gmp/gmp_6.1.0.bb +++ b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp_6.1.1.bb @@ -12,10 +12,11 @@ SRC_URI = "https://gmplib.org/download/${BPN}/${BP}${REVISION}.tar.bz2 \ file://amd64.patch \ file://use-includedir.patch \ file://0001-Append-the-user-provided-flags-to-the-auto-detected-.patch \ + file://0001-confiure.ac-Believe-the-cflags-from-environment.patch \ " -SRC_URI[md5sum] = "86ee6e54ebfc4a90b643a65e402c4048" -SRC_URI[sha256sum] = "498449a994efeba527885c10405993427995d3f86b8768d8cdf8d9dd7c6b73e8" +SRC_URI[md5sum] = "4c175f86e11eb32d8bf9872ca3a8e11d" +SRC_URI[sha256sum] = "a8109865f2893f1373b0a8ed5ff7429de8db696fc451b1036bd7bdf95bbeffd6" acpaths = "" @@ -30,4 +31,8 @@ do_install_append_class-target() { SSTATE_SCAN_FILES += "gmp.h" +# Doesn't compile in MIPS16e mode due to use of hand-written +# assembly +MIPS_INSTRUCTION_SET = "mips" + BBCLASSEXTEND = "native nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg_1.4.7.bb b/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg_1.4.7.bb index b4ccbfed6..6ccffd54c 100644 --- a/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg_1.4.7.bb +++ b/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg_1.4.7.bb @@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a" PR = "r9" -SRC_URI = "ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-${PV}.tar.bz2 \ +SRC_URI = "${GNUPG_MIRROR}/gnupg/gnupg-${PV}.tar.bz2 \ file://long-long-thumb.patch \ file://configure.patch \ file://mips_gcc4.4.patch \ diff --git a/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg_2.1.11.bb b/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg_2.1.14.bb index 8e2189bca..5ea9b962e 100644 --- a/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg_2.1.11.bb +++ b/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg_2.1.14.bb @@ -8,15 +8,16 @@ DEPENDS = "npth libassuan libksba zlib bzip2 readline libgcrypt" inherit autotools gettext texinfo pkgconfig -SRC_URI = "ftp://ftp.gnupg.org/gcrypt/${BPN}/${BPN}-${PV}.tar.bz2 \ +UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html" +SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \ file://pkgconfig.patch \ file://use-pkgconfig-instead-of-npth-config.patch \ file://dirmngr-uses-libgpg-error.patch \ file://autogen.sh-fix-find-version-for-beta-checking.patch \ " -SRC_URI[md5sum] = "873302c475c4c90badb67daac90ebd5d" -SRC_URI[sha256sum] = "b7b0fb2c8c5d47d7ec916d4a1097c0ddcb94a12bb1c0ac424ad86b1ee316b61a" +SRC_URI[md5sum] = "46cf0a42ffad6c2615cafd633580b2de" +SRC_URI[sha256sum] = "9450dee9693b6a12bf0c374dae77b66c30f69ff8f35fc9266ab8dd76998eba42" EXTRA_OECONF = "--disable-ldap \ --disable-ccid-driver \ diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls.inc b/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls.inc index e7c91eb80..51b9d2b19 100644 --- a/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls.inc +++ b/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls.inc @@ -8,8 +8,9 @@ LICENSE_${PN}-xx = "LGPLv2.1+" LICENSE_${PN}-bin = "GPLv3+" LICENSE_${PN}-openssl = "GPLv3+" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ - file://COPYING.LESSER;md5=a6f89e2100d9b6cdffcea4f398e37343" +LIC_FILES_CHKSUM = "file://LICENSE;md5=71391c8e0c1cfe68077e7fce3b586283 \ + file://doc/COPYING;md5=d32239bcb673463ab874e80d47fae504 \ + file://doc/COPYING.LESSER;md5=a6f89e2100d9b6cdffcea4f398e37343" DEPENDS = "nettle gmp virtual/libiconv" DEPENDS_append_libc-musl = " argp-standalone" @@ -18,11 +19,10 @@ SHRT_VER = "${@d.getVar('PV', True).split('.')[0]}.${@d.getVar('PV', True).split SRC_URI = "ftp://ftp.gnutls.org/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar.xz" -inherit autotools texinfo binconfig pkgconfig gettext lib_package +inherit autotools texinfo binconfig pkgconfig gettext lib_package gtk-doc PACKAGECONFIG ??= "libidn zlib" -PACKAGECONFIG[docs] = "--enable-doc,--disable-doc" PACKAGECONFIG[libidn] = "--with-idn,--without-idn,libidn" PACKAGECONFIG[libtasn1] = "--with-included-libtasn1=no,--with-included-libtasn1,libtasn1" PACKAGECONFIG[p11-kit] = "--with-p11-kit,--without-p11-kit,p11-kit" @@ -30,7 +30,7 @@ PACKAGECONFIG[tpm] = "--with-tpm,--without-tpm,trousers" PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib" EXTRA_OECONF = " \ - --disable-crywrap \ + --enable-doc \ --disable-libdane \ --disable-guile \ --disable-rpath \ diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls/0001-Use-correct-include-dir-with-minitasn.patch b/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls/0001-Use-correct-include-dir-with-minitasn.patch new file mode 100644 index 000000000..d7dd7cf69 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls/0001-Use-correct-include-dir-with-minitasn.patch @@ -0,0 +1,31 @@ +From 2651b08477f42dd7a05ea7d6df410fb2c46de4fb Mon Sep 17 00:00:00 2001 +From: Jussi Kukkonen <jussi.kukkonen@intel.com> +Date: Wed, 31 Aug 2016 11:04:06 +0300 +Subject: [PATCH] Use correct include dir with minitasn +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This allows compiling certtool-cfg without libtasn headers. + +Upstream-Status: Submitted [https://gitlab.com/gnutls/gnutls/merge_requests/54] +Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> +--- + src/Makefile.am | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 182f3a5..cf65388 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -146,6 +146,7 @@ libcmd_cli_debug_la_SOURCES = cli-debug-args.def cli-debug-args.c cli-debug-args + COMMON_LIBS = $(LIBOPTS) $(LTLIBINTL) + if ENABLE_MINITASN1 + COMMON_LIBS += ../lib/minitasn1/libminitasn1.la ../gl/libgnu.la ++AM_CPPFLAGS += -I$(top_srcdir)/lib/minitasn1 + else + COMMON_LIBS += $(LIBTASN1_LIBS) + endif +-- +2.9.3 + diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls/CVE-2016-7444.patch b/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls/CVE-2016-7444.patch new file mode 100644 index 000000000..215be5a8e --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls/CVE-2016-7444.patch @@ -0,0 +1,35 @@ +CVE: CVE-2016-7444 +Upstream-Status: Backport +Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> + +Upstream commit follows: + + +From 964632f37dfdfb914ebc5e49db4fa29af35b1de9 Mon Sep 17 00:00:00 2001 +From: Nikos Mavrogiannopoulos <nmav@gnutls.org> +Date: Sat, 27 Aug 2016 17:00:22 +0200 +Subject: [PATCH] ocsp: corrected the comparison of the serial size in OCSP response + +Previously the OCSP certificate check wouldn't verify the serial length +and could succeed in cases it shouldn't. + +Reported by Stefan Buehler. +--- + lib/x509/ocsp.c | 1 + + 1 file changed, 1 insertion(+), 0 deletions(-) + +diff --git a/lib/x509/ocsp.c b/lib/x509/ocsp.c +index 92db9b6..8181f2e 100644 +--- a/lib/x509/ocsp.c ++++ b/lib/x509/ocsp.c +@@ -1318,6 +1318,7 @@ gnutls_ocsp_resp_check_crt(gnutls_ocsp_resp_t resp, + gnutls_assert(); + goto cleanup; + } ++ cserial.size = t; + + if (rserial.size != cserial.size + || memcmp(cserial.data, rserial.data, rserial.size) != 0) { +-- +libgit2 0.24.0 + diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls_3.4.9.bb b/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls_3.4.9.bb deleted file mode 100644 index b652f6fac..000000000 --- a/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls_3.4.9.bb +++ /dev/null @@ -1,8 +0,0 @@ -require gnutls.inc - -SRC_URI += "file://correct_rpl_gettimeofday_signature.patch \ - file://0001-configure.ac-fix-sed-command.patch \ - file://use-pkg-config-to-locate-zlib.patch \ - " -SRC_URI[md5sum] = "1b3b6d55d0e2b6d01a54f53129f1da9b" -SRC_URI[sha256sum] = "48594fadba33d450f796ec69526cf2bce6ff9bc3dc90fbd7bf38dc3601f57c3f" diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls_3.5.3.bb b/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls_3.5.3.bb new file mode 100644 index 000000000..b2dbb0712 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls_3.5.3.bb @@ -0,0 +1,13 @@ +require gnutls.inc + +SRC_URI += "file://correct_rpl_gettimeofday_signature.patch \ + file://0001-configure.ac-fix-sed-command.patch \ + file://use-pkg-config-to-locate-zlib.patch \ + file://0001-Use-correct-include-dir-with-minitasn.patch \ + file://CVE-2016-7444.patch \ + " +SRC_URI[md5sum] = "6c2c7f40ddf52933ee3ca474cb8cb63c" +SRC_URI[sha256sum] = "92c4bc999a10a1b95299ebefaeea8333f19d8a98d957a35b5eae74881bdb1fef" + +# x86 .text relocations should be fixed from 3.5.5 onwards +INSANE_SKIP_${PN}_append_x86 = " textrel" diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1/0001-configure-don-t-add-Werror-to-build-flags.patch b/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1/0001-configure-don-t-add-Werror-to-build-flags.patch new file mode 100644 index 000000000..ae643946f --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1/0001-configure-don-t-add-Werror-to-build-flags.patch @@ -0,0 +1,28 @@ +From 908e9fa4c1172f09e0e45420a403dc25ed0a466c Mon Sep 17 00:00:00 2001 +From: Nikos Mavrogiannopoulos <nmav@redhat.com> +Date: Tue, 26 Jul 2016 08:45:33 +0200 +Subject: [PATCH 1/4] configure: don't add -Werror to build flags + +--- +Upstream-Status: Backport +Signed-off-by: Khem Raj <raj.khem@gmail.com> + + configure.ac | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 7a14e04..066f5fe 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -70,8 +70,6 @@ AC_ARG_ENABLE([gcc-warnings], + ) + + if test "$gl_gcc_warnings" = yes; then +- gl_WARN_ADD([-Werror], [WERROR_CFLAGS]) +- + nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings + nw="$nw -Wc++-compat" # We don't care strongly about C++ compilers + nw="$nw -Wtraditional" # Warns on #elif which we use often +-- +1.9.1 + diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1/0002-ASN.y-corrected-compiler-warning.patch b/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1/0002-ASN.y-corrected-compiler-warning.patch new file mode 100644 index 000000000..dd364223b --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1/0002-ASN.y-corrected-compiler-warning.patch @@ -0,0 +1,28 @@ +From 3542c01618fcde83b29640ea2c60bfd2629ae0b7 Mon Sep 17 00:00:00 2001 +From: Nikos Mavrogiannopoulos <nmav@redhat.com> +Date: Tue, 26 Jul 2016 08:47:49 +0200 +Subject: [PATCH 2/4] ASN.y: corrected compiler warning + +--- +Upstream-Status: Backport +Signed-off-by: Khem Raj <raj.khem@gmail.com> + + lib/ASN1.y | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/ASN1.y b/lib/ASN1.y +index 731415d..6db638f 100644 +--- a/lib/ASN1.y ++++ b/lib/ASN1.y +@@ -621,7 +621,7 @@ _asn1_create_errorDescription (int error, char *error_desc) + case ASN1_NAME_TOO_LONG: + snprintf (error_desc, ASN1_MAX_ERROR_DESCRIPTION_SIZE, + "%s:%u: name too long (more than %u characters)", file_name, +- line_number, ASN1_MAX_NAME_SIZE); ++ line_number, (unsigned)ASN1_MAX_NAME_SIZE); + break; + case ASN1_IDENTIFIER_NOT_FOUND: + snprintf (error_desc, ASN1_MAX_ERROR_DESCRIPTION_SIZE, +-- +1.9.1 + diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1/0003-parser_aux-corrected-potential-null-pointer-derefere.patch b/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1/0003-parser_aux-corrected-potential-null-pointer-derefere.patch new file mode 100644 index 000000000..24201437b --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1/0003-parser_aux-corrected-potential-null-pointer-derefere.patch @@ -0,0 +1,73 @@ +From c8903aa27dc9de1d9efeed9d1f7894f1019548f7 Mon Sep 17 00:00:00 2001 +From: Nikos Mavrogiannopoulos <nmav@redhat.com> +Date: Tue, 26 Jul 2016 08:49:15 +0200 +Subject: [PATCH 3/4] parser_aux: corrected potential null pointer dereferences + +--- +Upstream-Status: Backport +Signed-off-by: Khem Raj <raj.khem@gmail.com> + + lib/parser_aux.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/lib/parser_aux.c b/lib/parser_aux.c +index 2285b20..12ee16f 100644 +--- a/lib/parser_aux.c ++++ b/lib/parser_aux.c +@@ -637,7 +637,7 @@ _asn1_change_integer_value (asn1_node node) + p = NULL; + break; + } +- if (p->right) ++ if (p && p->right) + { + p = p->right; + break; +@@ -753,7 +753,7 @@ _asn1_expand_object_id (asn1_node node) + + if (move == RIGHT) + { +- if (p->right) ++ if (p && p->right) + p = p->right; + else + move = UP; +@@ -828,7 +828,7 @@ _asn1_expand_object_id (asn1_node node) + + if (move == RIGHT) + { +- if (p->right) ++ if (p && p->right) + p = p->right; + else + move = UP; +@@ -898,7 +898,7 @@ _asn1_type_set_config (asn1_node node) + + if (move == RIGHT) + { +- if (p->right) ++ if (p && p->right) + p = p->right; + else + move = UP; +@@ -1007,7 +1007,7 @@ _asn1_check_identifier (asn1_node node) + p = NULL; + break; + } +- if (p->right) ++ if (p && p->right) + { + p = p->right; + break; +@@ -1067,7 +1067,7 @@ _asn1_set_default_tag (asn1_node node) + p = NULL; + break; + } +- if (p->right) ++ if (p && p->right) + { + p = p->right; + break; +-- +1.9.1 + diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1/0004-tools-eliminated-compiler-warnings.patch b/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1/0004-tools-eliminated-compiler-warnings.patch new file mode 100644 index 000000000..7bda0e6f2 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1/0004-tools-eliminated-compiler-warnings.patch @@ -0,0 +1,56 @@ +From d647bb2fa1bd288a6ac02c18318f3cba2a34c3a0 Mon Sep 17 00:00:00 2001 +From: Nikos Mavrogiannopoulos <nmav@redhat.com> +Date: Tue, 26 Jul 2016 08:50:24 +0200 +Subject: [PATCH 4/4] tools: eliminated compiler warnings + +--- +Upstream-Status: Backport +Signed-off-by: Khem Raj <raj.khem@gmail.com> + + src/asn1Coding.c | 2 +- + src/asn1Decoding.c | 2 +- + src/asn1Parser.c | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/asn1Coding.c b/src/asn1Coding.c +index d4df593..b516bfe 100644 +--- a/src/asn1Coding.c ++++ b/src/asn1Coding.c +@@ -188,7 +188,7 @@ main (int argc, char *argv[]) + default: + fprintf (stderr, + "asn1Coding: ?? getopt returned character code Ox%x ??\n", +- option_result); ++ (unsigned)option_result); + } + } + +diff --git a/src/asn1Decoding.c b/src/asn1Decoding.c +index 078963e..20f91ac 100644 +--- a/src/asn1Decoding.c ++++ b/src/asn1Decoding.c +@@ -131,7 +131,7 @@ main (int argc, char *argv[]) + default: + fprintf (stderr, + "asn1Decoding: ?? getopt returned character code Ox%x ??\n", +- option_result); ++ (unsigned)option_result); + } + } + +diff --git a/src/asn1Parser.c b/src/asn1Parser.c +index 7a3ae67..475bfc9 100644 +--- a/src/asn1Parser.c ++++ b/src/asn1Parser.c +@@ -139,7 +139,7 @@ main (int argc, char *argv[]) + default: + fprintf (stderr, + "asn1Parser: ?? getopt returned character code Ox%x ??\n", +- option_result); ++ (unsigned)option_result); + } + + } +-- +1.9.1 + diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1_4.7.bb b/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1_4.9.bb index 7f0856945..b8ff9eaf7 100644 --- a/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1_4.7.bb +++ b/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1_4.9.bb @@ -10,11 +10,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ SRC_URI = "${GNU_MIRROR}/libtasn1/libtasn1-${PV}.tar.gz \ file://dont-depend-on-help2man.patch \ + file://0001-configure-don-t-add-Werror-to-build-flags.patch \ + file://0002-ASN.y-corrected-compiler-warning.patch \ + file://0003-parser_aux-corrected-potential-null-pointer-derefere.patch \ + file://0004-tools-eliminated-compiler-warnings.patch \ " -SRC_URI[md5sum] = "12d10ca4ae0a3b95f7aa06a076da39ec" -SRC_URI[sha256sum] = "a40780dc93fc6d819170240e8ece25352058a85fd1d2347ce0f143667d8f11c9" +SRC_URI[md5sum] = "3018d0f466a32b66dde41bb122e6cab6" +SRC_URI[sha256sum] = "4f6f7a8fd691ac2b8307c8ca365bad711db607d4ad5966f6938a9d2ecd65c920" -inherit autotools texinfo binconfig lib_package +inherit autotools texinfo binconfig lib_package gtk-doc BBCLASSEXTEND = "native" diff --git a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme_1.6.0.bb b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme_1.6.0.bb index 86eda239b..a2d05878b 100644 --- a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme_1.6.0.bb +++ b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme_1.6.0.bb @@ -9,7 +9,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ file://src/gpgme.h.in;endline=23;md5=5027eec93a996272a9a0a6a86cf35775 \ file://src/engine.h;endline=22;md5=4b6d8ba313d9b564cc4d4cfb1640af9d" -SRC_URI = "ftp://ftp.gnupg.org/gcrypt/gpgme/${BP}.tar.bz2 \ +UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html" +SRC_URI = "${GNUPG_MIRROR}/gpgme/${BP}.tar.bz2 \ file://gpgme.pc \ file://pkgconfig.patch \ " diff --git a/import-layers/yocto-poky/meta/recipes-support/icu/icu/icu-release-56-1-flagparser-fix.patch b/import-layers/yocto-poky/meta/recipes-support/icu/icu/icu-release-56-1-flagparser-fix.patch deleted file mode 100644 index 1519d8469..000000000 --- a/import-layers/yocto-poky/meta/recipes-support/icu/icu/icu-release-56-1-flagparser-fix.patch +++ /dev/null @@ -1,24 +0,0 @@ -icu: Ticket #11959: pkgdata dies when compiled with lots'o'flags - -See: http://bugs.icu-project.org/trac/ticket/11959 - -The patch avoids premature failure which results in a segfault. - -Upstream-Status: Backport of r38081 -Signed-off-by: Mike Crowe <mac@mcrowe.com> - -Index: source/tools/toolutil/flagparser.c -=================================================================== ---- source/tools/toolutil/flagparser.c (revision 38046) -+++ source/tools/toolutil/flagparser.c (working copy) -@@ -96,8 +96,8 @@ - uprv_free(buffer); - - T_FileStream_close(f); -- -- if (U_FAILURE(*status)) { -+ -+ if (U_FAILURE(*status) && *status != U_BUFFER_OVERFLOW_ERROR) { - return -1; - } - diff --git a/import-layers/yocto-poky/meta/recipes-support/icu/icu_56.1.bb b/import-layers/yocto-poky/meta/recipes-support/icu/icu_57.1.bb index db0de106b..90c2b8275 100644 --- a/import-layers/yocto-poky/meta/recipes-support/icu/icu_56.1.bb +++ b/import-layers/yocto-poky/meta/recipes-support/icu/icu_57.1.bb @@ -1,6 +1,6 @@ require icu.inc -LIC_FILES_CHKSUM = "file://../license.html;md5=64eff4aadff4d104d6d437c4fde0e6d7" +LIC_FILES_CHKSUM = "file://../LICENSE;md5=787d3b37867445c1cdd6f6167bd0e347" def icu_download_version(d): pvsplit = d.getVar('PV', True).split('.') @@ -16,14 +16,13 @@ BASE_SRC_URI = "http://download.icu-project.org/files/icu4c/${PV}/icu4c-${ICU_PV SRC_URI = "${BASE_SRC_URI} \ file://icu-pkgdata-large-cmd.patch \ file://fix-install-manx.patch \ - file://icu-release-56-1-flagparser-fix.patch \ " SRC_URI_append_class-target = "\ file://0001-Disable-LDFLAGSICUDT-for-Linux.patch \ " -SRC_URI[md5sum] = "c4a2d71ff56aec5ebfab2a3f059be99d" -SRC_URI[sha256sum] = "3a64e9105c734dcf631c0b3ed60404531bce6c0f5a64bfe1a6402a4cc2314816" +SRC_URI[md5sum] = "976734806026a4ef8bdd17937c8898b9" +SRC_URI[sha256sum] = "ff8c67cb65949b1e7808f2359f2b80f722697048e90e7cfc382ec1fe229e9581" UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)/" UPSTREAM_CHECK_URI = "http://download.icu-project.org/files/icu4c/" diff --git a/import-layers/yocto-poky/meta/recipes-support/iso-codes/iso-codes_3.65.bb b/import-layers/yocto-poky/meta/recipes-support/iso-codes/iso-codes_3.70.bb index 0b78dc45e..7edd8b7bb 100644 --- a/import-layers/yocto-poky/meta/recipes-support/iso-codes/iso-codes_3.65.bb +++ b/import-layers/yocto-poky/meta/recipes-support/iso-codes/iso-codes_3.70.bb @@ -1,10 +1,10 @@ SUMMARY = "ISO language, territory, currency, script codes and their translations" LICENSE = "LGPLv2.1" -LIC_FILES_CHKSUM = "file://LICENSE;md5=fbc093901857fcd118f065f900982c24" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" SRC_URI = "https://pkg-isocodes.alioth.debian.org/downloads/iso-codes-${PV}.tar.xz" -SRC_URI[md5sum] = "890a08d4f962748e0a0758a8aa471896" -SRC_URI[sha256sum] = "834de5193c8489eedeaf6509457a9b13476702386ae1f3ed4f391a349d630320" +SRC_URI[md5sum] = "c61f8f02eecf978d3710ff594e43ca7e" +SRC_URI[sha256sum] = "41e2fbaec2ed57e767b94f175d0dcd31b627aeb23b75cd604605a6fb6109d61f" # inherit gettext cannot be used, because it adds gettext-native to BASEDEPENDS which # are inhibited by allarch diff --git a/import-layers/yocto-poky/meta/recipes-support/libassuan/libassuan_2.4.2.bb b/import-layers/yocto-poky/meta/recipes-support/libassuan/libassuan_2.4.3.bb index f376d631e..1b3916d73 100644 --- a/import-layers/yocto-poky/meta/recipes-support/libassuan/libassuan_2.4.2.bb +++ b/import-layers/yocto-poky/meta/recipes-support/libassuan/libassuan_2.4.3.bb @@ -12,11 +12,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \ DEPENDS = "libgpg-error" -SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libassuan/libassuan-${PV}.tar.bz2 \ +UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html" +SRC_URI = "${GNUPG_MIRROR}/libassuan/libassuan-${PV}.tar.bz2 \ file://libassuan-add-pkgconfig-support.patch" -SRC_URI[md5sum] = "70151995c2330ae1261c0a7ca34cf478" -SRC_URI[sha256sum] = "bb06dc81380b74bf1b64d5849be5c0409a336f3b4c45f20ac688e86d1b5bcb20" +SRC_URI[md5sum] = "8e01a7c72d3e5d154481230668e6eb5a" +SRC_URI[sha256sum] = "22843a3bdb256f59be49842abf24da76700354293a066d82ade8134bb5aa2b71" BINCONFIG = "${bindir}/libassuan-config" diff --git a/import-layers/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.4.2.bb b/import-layers/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.4.4.bb index fdb70d8ef..930c1b8ed 100644 --- a/import-layers/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.4.2.bb +++ b/import-layers/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.4.4.bb @@ -12,8 +12,8 @@ SRC_URI = "\ file://0001-Add-initial-nios2-architecture-support.patch \ " -SRC_URI[md5sum] = "1d6538604b314d2fccdf86915e5c0857" -SRC_URI[sha256sum] = "04fa615f62992547bcbda562260e28b504bc4c06e2f985f267f3ade30304b5dd" +SRC_URI[md5sum] = "426d804baae12c372967a6d183e25af2" +SRC_URI[sha256sum] = "bf210a600dd1becbf7936dd2914cf5f5d3356046904848dcfd27d0c8b12b6f8f" S = "${WORKDIR}/libatomic_ops-${PV}" diff --git a/import-layers/yocto-poky/meta/recipes-support/libbsd/libbsd_0.8.2.bb b/import-layers/yocto-poky/meta/recipes-support/libbsd/libbsd_0.8.3.bb index 3335386d8..92121efa8 100644 --- a/import-layers/yocto-poky/meta/recipes-support/libbsd/libbsd_0.8.2.bb +++ b/import-layers/yocto-poky/meta/recipes-support/libbsd/libbsd_0.8.3.bb @@ -30,14 +30,14 @@ HOMEPAGE = "http://libbsd.freedesktop.org/wiki/" # License: public-domain # License: public-domain-Colin-Plumb LICENSE = "BSD-4-Clause & ISC & PD" -LIC_FILES_CHKSUM = "file://COPYING;md5=145ec05a217d8f879f29cfc5f83084be" +LIC_FILES_CHKSUM = "file://COPYING;md5=0b9c89d861915b86655b96e5e32fa2aa" SECTION = "libs" SRC_URI = " \ http://libbsd.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ " -SRC_URI[md5sum] = "cdee252ccff978b50ad2336278c506c9" -SRC_URI[sha256sum] = "b2f644cae94a6e2fe109449c20ad79a0f6ee4faec2205b07eefa0020565e250a" +SRC_URI[md5sum] = "e935c1bb6cc98a4a43cb1da22795493a" +SRC_URI[sha256sum] = "934b634f4dfd865b6482650b8f522c70ae65c463529de8be907b53c89c3a34a8" inherit autotools pkgconfig diff --git a/import-layers/yocto-poky/meta/recipes-support/libcap-ng/libcap-ng_0.7.7.bb b/import-layers/yocto-poky/meta/recipes-support/libcap-ng/libcap-ng_0.7.8.bb index 571546766..358319419 100644 --- a/import-layers/yocto-poky/meta/recipes-support/libcap-ng/libcap-ng_0.7.7.bb +++ b/import-layers/yocto-poky/meta/recipes-support/libcap-ng/libcap-ng_0.7.8.bb @@ -10,16 +10,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ SRC_URI = "http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-${PV}.tar.gz \ file://python.patch" -inherit lib_package autotools pythonnative +inherit lib_package autotools python3native -SRC_URI[md5sum] = "3d7d126b29e2869a0257c17c8b0d9b2e" -SRC_URI[sha256sum] = "615549ce39b333f6b78baee0c0b4ef18bc726c6bf1cca123dfd89dd963f6d06b" +SRC_URI[md5sum] = "0dece96644bd798020e170fbf7663802" +SRC_URI[sha256sum] = "c21af997445cd4107a55d386f955c5ea6f6e96ead693e9151277c0ab5f97d05f" -DEPENDS += "swig-native python" +DEPENDS += "swig-native python3" -EXTRA_OECONF += "--without-python3" - -EXTRA_OEMAKE += "PYLIBVER='python${PYTHON_BASEVERSION}' PYINC='${STAGING_INCDIR}/${PYLIBVER}'" +EXTRA_OECONF += "--with-python --with-python3" +EXTRA_OEMAKE += "PYLIBVER='python${PYTHON_BASEVERSION}${PYTHON_ABI}' PYINC='${STAGING_INCDIR}/${PYLIBVER}'" PACKAGES += "${PN}-python" diff --git a/import-layers/yocto-poky/meta/recipes-support/libcap/files/0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch b/import-layers/yocto-poky/meta/recipes-support/libcap/files/0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch new file mode 100644 index 000000000..05c771ac1 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/libcap/files/0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch @@ -0,0 +1,32 @@ +Ensure the XATTR_NAME_CAPS is defined when it is used + +Upstream-Status: Pending + +VFS_CAP_U32 can not ensure that XATTR_NAME_CAPS is defined, and failed to build +libcap-native in old release, like CentOS release 6.7 (Final), with the blow +error: + cap_file.c: In function ‘cap_get_fd’: + cap_file.c:199: error: ‘XATTR_NAME_CAPS’ undeclared (first use in this function) + cap_file.c:199: error: (Each undeclared identifier is reported only once + +Signed-off-by: Roy Li <rongqing.li@windriver.com> +--- + libcap/cap_file.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libcap/cap_file.c b/libcap/cap_file.c +index 40756ea..e27ca80 100644 +--- a/libcap/cap_file.c ++++ b/libcap/cap_file.c +@@ -25,7 +25,7 @@ extern int fremovexattr(int, const char *); + + #include "libcap.h" + +-#ifdef VFS_CAP_U32 ++#if defined (VFS_CAP_U32) && defined (XATTR_NAME_CAPS) + + #if VFS_CAP_U32 != __CAP_BLKS + # error VFS representation of capabilities is not the same size as kernel +-- +2.8.1 + diff --git a/import-layers/yocto-poky/meta/recipes-support/libcap/libcap_2.24.bb b/import-layers/yocto-poky/meta/recipes-support/libcap/libcap_2.25.bb index a701019bb..7ced4be62 100644 --- a/import-layers/yocto-poky/meta/recipes-support/libcap/libcap_2.24.bb +++ b/import-layers/yocto-poky/meta/recipes-support/libcap/libcap_2.25.bb @@ -7,10 +7,11 @@ LIC_FILES_CHKSUM = "file://License;md5=3f84fd6f29d453a56514cb7e4ead25f1" DEPENDS = "hostperl-runtime-native" -SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${PV}.tar.xz" - -SRC_URI[md5sum] = "d43ab9f680435a7fff35b4ace8d45b80" -SRC_URI[sha256sum] = "cee4568f78dc851d726fc93f25f4ed91cc223b1fe8259daa4a77158d174e6c65" +SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${PV}.tar.xz \ + file://0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch \ +" +SRC_URI[md5sum] = "6666b839e5d46c2ad33fc8aa2ceb5f77" +SRC_URI[sha256sum] = "693c8ac51e983ee678205571ef272439d83afe62dd8e424ea14ad9790bc35162" inherit lib_package @@ -46,15 +47,15 @@ EXTRA_OEMAKE_append_class-target = " SYSTEM_HEADERS=${STAGING_INCDIR}" CFLAGS += "-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" do_compile() { - oe_runmake ${EXTRA_OECONF} + oe_runmake ${PACKAGECONFIG_CONFARGS} } do_install() { oe_runmake install \ - ${EXTRA_OECONF} \ + ${PACKAGECONFIG_CONFARGS} \ DESTDIR="${D}" \ prefix="${prefix}" \ - SBINDIR="${D}${sbindir}" + SBINDIR="${sbindir}" } do_install_append() { diff --git a/import-layers/yocto-poky/meta/recipes-support/libevdev/libevdev_1.4.6.bb b/import-layers/yocto-poky/meta/recipes-support/libevdev/libevdev_1.5.2.bb index c8163e3bf..c76e1d79f 100644 --- a/import-layers/yocto-poky/meta/recipes-support/libevdev/libevdev_1.4.6.bb +++ b/import-layers/yocto-poky/meta/recipes-support/libevdev/libevdev_1.5.2.bb @@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=75aae0d38feea6fda97ca381cb9132eb \ SRC_URI = "http://www.freedesktop.org/software/libevdev/${BP}.tar.xz" -SRC_URI[md5sum] = "9b3f25bd8fb0f8efa4944d34668dddc0" -SRC_URI[sha256sum] = "7b2ae1a0c7f9f7a96198ddc8fd167f090f233d6cbd8168b847e4f968445132d3" +SRC_URI[md5sum] = "96ad6edb5ce5c4428f1b183cc180ff8c" +SRC_URI[sha256sum] = "5ee2163656a61f5703cb5c08a05c9471ffb7b640bfbe2c55194ea50d908f629b" inherit autotools pkgconfig diff --git a/import-layers/yocto-poky/meta/recipes-support/libevent/libevent/run-ptest b/import-layers/yocto-poky/meta/recipes-support/libevent/libevent/run-ptest index d521688e7..0241851c7 100644 --- a/import-layers/yocto-poky/meta/recipes-support/libevent/libevent/run-ptest +++ b/import-layers/yocto-poky/meta/recipes-support/libevent/libevent/run-ptest @@ -4,7 +4,7 @@ fail=0 for test in ./test/* do $test - if [ $? -eq 0 ] + if [ $? -ne 0 ] then fail=1 fi diff --git a/import-layers/yocto-poky/meta/recipes-support/libffi/libffi/0001-mips-fix-MIPS-softfloat-build-issue.patch b/import-layers/yocto-poky/meta/recipes-support/libffi/libffi/0001-mips-fix-MIPS-softfloat-build-issue.patch new file mode 100644 index 000000000..61c9eb31d --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/libffi/libffi/0001-mips-fix-MIPS-softfloat-build-issue.patch @@ -0,0 +1,177 @@ +From 655e82c92d5c3875aee04322f1993d6b0774a7bf Mon Sep 17 00:00:00 2001 +From: Yousong Zhou <yszhou4tech@gmail.com> +Date: Mon, 15 Aug 2016 15:00:13 +0800 +Subject: [PATCH] mips: fix MIPS softfloat build issue + +The patch for o32.S is taken from OpenWrt packages repo 3a7a4bf "libffi: +fix MIPS softfloat build issue with current binutils" + +Signed-off-by: Felix Fietkau <nbd@openwrt.org> +Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com> +--- +Upstream-Status: Backport [https://github.com/libffi/libffi/commit/2ded2a4f494165c93293afc14ab0be1243cf8c49] + src/mips/n32.S | 17 +++++++++++++++++ + src/mips/o32.S | 17 +++++++++++++++++ + 2 files changed, 34 insertions(+) + +diff --git a/src/mips/n32.S b/src/mips/n32.S +index c6985d3..8f25994 100644 +--- a/src/mips/n32.S ++++ b/src/mips/n32.S +@@ -107,6 +107,16 @@ loadregs: + + REG_L t6, 3*FFI_SIZEOF_ARG($fp) # load the flags word into t6. + ++#ifdef __mips_soft_float ++ REG_L a0, 0*FFI_SIZEOF_ARG(t9) ++ REG_L a1, 1*FFI_SIZEOF_ARG(t9) ++ REG_L a2, 2*FFI_SIZEOF_ARG(t9) ++ REG_L a3, 3*FFI_SIZEOF_ARG(t9) ++ REG_L a4, 4*FFI_SIZEOF_ARG(t9) ++ REG_L a5, 5*FFI_SIZEOF_ARG(t9) ++ REG_L a6, 6*FFI_SIZEOF_ARG(t9) ++ REG_L a7, 7*FFI_SIZEOF_ARG(t9) ++#else + and t4, t6, ((1<<FFI_FLAG_BITS)-1) + REG_L a0, 0*FFI_SIZEOF_ARG(t9) + beqz t4, arg1_next +@@ -193,6 +203,7 @@ arg7_next: + arg8_doublep: + l.d $f19, 7*FFI_SIZEOF_ARG(t9) + arg8_next: ++#endif + + callit: + # Load the function pointer +@@ -214,6 +225,7 @@ retint: + b epilogue + + retfloat: ++#ifndef __mips_soft_float + bne t6, FFI_TYPE_FLOAT, retdouble + jal t9 + REG_L t4, 4*FFI_SIZEOF_ARG($fp) +@@ -272,6 +284,7 @@ retstruct_f_d: + s.s $f0, 0(t4) + s.d $f2, 8(t4) + b epilogue ++#endif + + retstruct_d_soft: + bne t6, FFI_TYPE_STRUCT_D_SOFT, retstruct_f_soft +@@ -429,6 +442,7 @@ ffi_closure_N32: + REG_S a6, A6_OFF2($sp) + REG_S a7, A7_OFF2($sp) + ++#ifndef __mips_soft_float + # Store all possible float/double registers. + s.d $f12, F12_OFF2($sp) + s.d $f13, F13_OFF2($sp) +@@ -438,6 +452,7 @@ ffi_closure_N32: + s.d $f17, F17_OFF2($sp) + s.d $f18, F18_OFF2($sp) + s.d $f19, F19_OFF2($sp) ++#endif + + # Call ffi_closure_mips_inner_N32 to do the real work. + LA t9, ffi_closure_mips_inner_N32 +@@ -458,6 +473,7 @@ cls_retint: + b cls_epilogue + + cls_retfloat: ++#ifndef __mips_soft_float + bne v0, FFI_TYPE_FLOAT, cls_retdouble + l.s $f0, V0_OFF2($sp) + b cls_epilogue +@@ -500,6 +516,7 @@ cls_retstruct_f_d: + l.s $f0, V0_OFF2($sp) + l.d $f2, V1_OFF2($sp) + b cls_epilogue ++#endif + + cls_retstruct_small2: + REG_L v0, V0_OFF2($sp) +diff --git a/src/mips/o32.S b/src/mips/o32.S +index eb27981..429dd0a 100644 +--- a/src/mips/o32.S ++++ b/src/mips/o32.S +@@ -82,13 +82,16 @@ sixteen: + + ADDU $sp, 4 * FFI_SIZEOF_ARG # adjust $sp to new args + ++#ifndef __mips_soft_float + bnez t0, pass_d # make it quick for int ++#endif + REG_L a0, 0*FFI_SIZEOF_ARG($sp) # just go ahead and load the + REG_L a1, 1*FFI_SIZEOF_ARG($sp) # four regs. + REG_L a2, 2*FFI_SIZEOF_ARG($sp) + REG_L a3, 3*FFI_SIZEOF_ARG($sp) + b call_it + ++#ifndef __mips_soft_float + pass_d: + bne t0, FFI_ARGS_D, pass_f + l.d $f12, 0*FFI_SIZEOF_ARG($sp) # load $fp regs from args +@@ -130,6 +133,7 @@ pass_f_d: + # bne t0, FFI_ARGS_F_D, call_it + l.s $f12, 0*FFI_SIZEOF_ARG($sp) # load $fp regs from args + l.d $f14, 2*FFI_SIZEOF_ARG($sp) # passing double and float ++#endif + + call_it: + # Load the function pointer +@@ -158,14 +162,23 @@ retfloat: + bne t2, FFI_TYPE_FLOAT, retdouble + jalr t9 + REG_L t0, SIZEOF_FRAME + 4*FFI_SIZEOF_ARG($fp) ++#ifndef __mips_soft_float + s.s $f0, 0(t0) ++#else ++ REG_S v0, 0(t0) ++#endif + b epilogue + + retdouble: + bne t2, FFI_TYPE_DOUBLE, noretval + jalr t9 + REG_L t0, SIZEOF_FRAME + 4*FFI_SIZEOF_ARG($fp) ++#ifndef __mips_soft_float + s.d $f0, 0(t0) ++#else ++ REG_S v1, 4(t0) ++ REG_S v0, 0(t0) ++#endif + b epilogue + + noretval: +@@ -261,9 +274,11 @@ $LCFI7: + li $13, 1 # FFI_O32 + bne $16, $13, 1f # Skip fp save if FFI_O32_SOFT_FLOAT + ++#ifndef __mips_soft_float + # Store all possible float/double registers. + s.d $f12, FA_0_0_OFF2($fp) + s.d $f14, FA_1_0_OFF2($fp) ++#endif + 1: + # Call ffi_closure_mips_inner_O32 to do the work. + la t9, ffi_closure_mips_inner_O32 +@@ -281,6 +296,7 @@ $LCFI7: + li $13, 1 # FFI_O32 + bne $16, $13, 1f # Skip fp restore if FFI_O32_SOFT_FLOAT + ++#ifndef __mips_soft_float + li $9, FFI_TYPE_FLOAT + l.s $f0, V0_OFF2($fp) + beq $8, $9, closure_done +@@ -288,6 +304,7 @@ $LCFI7: + li $9, FFI_TYPE_DOUBLE + l.d $f0, V0_OFF2($fp) + beq $8, $9, closure_done ++#endif + 1: + REG_L $3, V1_OFF2($fp) + REG_L $2, V0_OFF2($fp) +-- +2.9.3 + diff --git a/import-layers/yocto-poky/meta/recipes-support/libffi/libffi_3.2.1.bb b/import-layers/yocto-poky/meta/recipes-support/libffi/libffi_3.2.1.bb index 72e25fb9d..43eee8efc 100644 --- a/import-layers/yocto-poky/meta/recipes-support/libffi/libffi_3.2.1.bb +++ b/import-layers/yocto-poky/meta/recipes-support/libffi/libffi_3.2.1.bb @@ -12,6 +12,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=3610bb17683a0089ed64055416b2ae1b" SRC_URI = "ftp://sourceware.org/pub/libffi/${BP}.tar.gz \ file://not-win32.patch \ file://0001-mips-Use-compiler-internal-define-for-linux.patch \ + file://0001-mips-fix-MIPS-softfloat-build-issue.patch \ " SRC_URI[md5sum] = "83b89587607e3eb65c70d361f13bab43" @@ -23,4 +24,8 @@ inherit autotools texinfo FILES_${PN}-dev += "${libdir}/libffi-${PV}" +# Doesn't compile in MIPS16e mode due to use of hand-written +# assembly +MIPS_INSTRUCTION_SET = "mips" + BBCLASSEXTEND = "native nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-support/libfm/libfm_1.2.4.bb b/import-layers/yocto-poky/meta/recipes-support/libfm/libfm_1.2.4.bb index 866b11a9a..2218f9cb7 100644 --- a/import-layers/yocto-poky/meta/recipes-support/libfm/libfm_1.2.4.bb +++ b/import-layers/yocto-poky/meta/recipes-support/libfm/libfm_1.2.4.bb @@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4641e94ec96f98fabc56ff9cc48be14b \ SECTION = "x11/libs" -DEPENDS = "glib-2.0 pango gtk+ menu-cache intltool-native libexif libfm-extra gettext-native" +DEPENDS = "glib-2.0 pango gtk+3 menu-cache intltool-native libexif libfm-extra gettext-native" SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/libfm-${PV}.tar.xz" @@ -17,7 +17,9 @@ SRC_URI[md5sum] = "74997d75e7e87dc73398746fd373bf52" SRC_URI[sha256sum] = "7804f6f28cb3d1bc8ffb3151ab7ff0c063b27c5f9b06c682eb903e01cf25502f" inherit autotools pkgconfig gtk-doc distro_features_check -ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}" +ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" + +EXTRA_OECONF = "--with-gtk=3" do_configure[dirs] =+ "${S}/m4" diff --git a/import-layers/yocto-poky/meta/recipes-support/libgcrypt/files/add-pkgconfig-support.patch b/import-layers/yocto-poky/meta/recipes-support/libgcrypt/files/add-pkgconfig-support.patch index 67ddfc640..69589f548 100644 --- a/import-layers/yocto-poky/meta/recipes-support/libgcrypt/files/add-pkgconfig-support.patch +++ b/import-layers/yocto-poky/meta/recipes-support/libgcrypt/files/add-pkgconfig-support.patch @@ -4,61 +4,32 @@ Upstream-Status: Denied [upstream have indicated they don't want a pkg-config de RP 2014/5/22 -Index: libgcrypt-1.2.4/configure.ac -=================================================================== ---- libgcrypt-1.2.4.orig/configure.ac 2008-03-19 22:14:50.000000000 +0000 -+++ libgcrypt-1.2.4/configure.ac 2008-03-19 22:14:58.000000000 +0000 -@@ -807,6 +807,7 @@ +Rebase to 1.7.0 +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + configure.ac | 1 + + src/libgcrypt.m4 | 71 +++-------------------------------------------------- + src/libgcrypt.pc.in | 33 +++++++++++++++++++++++++ + 3 files changed, 38 insertions(+), 67 deletions(-) + create mode 100644 src/libgcrypt.pc.in + +diff --git a/configure.ac b/configure.ac +index f683e21..566e1c8 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2314,6 +2314,7 @@ random/Makefile doc/Makefile src/Makefile src/gcrypt.h +src/libgcrypt.pc src/libgcrypt-config + src/versioninfo.rc tests/Makefile - w32-dll/Makefile -Index: libgcrypt-1.2.4/src/libgcrypt.pc.in -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ libgcrypt-1.2.4/src/libgcrypt.pc.in 2008-03-19 22:14:58.000000000 +0000 -@@ -0,0 +1,33 @@ -+# Process this file with autoconf to produce a pkg-config metadata file. -+# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation -+# Author: Simon Josefsson -+# -+# This file is free software; as a special exception the author gives -+# unlimited permission to copy and/or distribute it, with or without -+# modifications, as long as this notice is preserved. -+# -+# This file is distributed in the hope that it will be useful, but -+# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the -+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -+ -+prefix=@prefix@ -+exec_prefix=@exec_prefix@ -+libdir=@libdir@ -+includedir=@includedir@ -+ -+# API info -+api_version=@LIBGCRYPT_CONFIG_API_VERSION@ -+host=@LIBGCRYPT_CONFIG_HOST@ -+ -+# Misc information. -+symmetric_ciphers=@LIBGCRYPT_CIPHERS@ -+asymmetric_ciphers=@LIBGCRYPT_PUBKEY_CIPHERS@ -+digests=@LIBGCRYPT_DIGESTS@ -+ -+Name: libgcrypt -+Description: GNU crypto library -+URL: http://www.gnupg.org -+Version: @VERSION@ -+Libs: -L${libdir} -lgcrypt -+Libs.private: -L${libdir} -lgpg-error -+Cflags: -I${includedir} -Index: libgcrypt-1.6.1/src/libgcrypt.m4 -=================================================================== ---- libgcrypt-1.6.1.orig/src/libgcrypt.m4 2013-12-16 17:44:32.000000000 +0000 -+++ libgcrypt-1.6.1/src/libgcrypt.m4 2014-05-13 21:25:37.478389833 +0000 -@@ -22,17 +22,7 @@ +diff --git a/src/libgcrypt.m4 b/src/libgcrypt.m4 +index c67cfec..4ea5f2c 100644 +--- a/src/libgcrypt.m4 ++++ b/src/libgcrypt.m4 +@@ -29,30 +29,6 @@ dnl is added to the gpg_config_script_warn variable. dnl AC_DEFUN([AM_PATH_LIBGCRYPT], [ AC_REQUIRE([AC_CANONICAL_HOST]) @@ -66,17 +37,30 @@ Index: libgcrypt-1.6.1/src/libgcrypt.m4 - AC_HELP_STRING([--with-libgcrypt-prefix=PFX], - [prefix where LIBGCRYPT is installed (optional)]), - libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="") -- if test x$libgcrypt_config_prefix != x ; then -- if test x${LIBGCRYPT_CONFIG+set} != xset ; then -- LIBGCRYPT_CONFIG=$libgcrypt_config_prefix/bin/libgcrypt-config +- if test x"${LIBGCRYPT_CONFIG}" = x ; then +- if test x"${libgcrypt_config_prefix}" != x ; then +- LIBGCRYPT_CONFIG="${libgcrypt_config_prefix}/bin/libgcrypt-config" +- else +- case "${SYSROOT}" in +- /*) +- if test -x "${SYSROOT}/bin/libgcrypt-config" ; then +- LIBGCRYPT_CONFIG="${SYSROOT}/bin/libgcrypt-config" +- fi +- ;; +- '') +- ;; +- *) +- AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.]) +- ;; +- esac - fi - fi - -- AC_PATH_TOOL(LIBGCRYPT_CONFIG, libgcrypt-config, no) +- +- AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no) tmp=ifelse([$1], ,1:1.2.0,$1) if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` -@@ -42,48 +32,13 @@ +@@ -62,48 +38,13 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], min_libgcrypt_version="$tmp" fi @@ -128,7 +112,7 @@ Index: libgcrypt-1.6.1/src/libgcrypt.m4 if test "$tmp" -gt 0 ; then AC_MSG_CHECKING([LIBGCRYPT API version]) if test "$req_libgcrypt_api" -eq "$tmp" ; then -@@ -96,10 +51,8 @@ +@@ -116,10 +57,8 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], fi fi if test $ok = yes; then @@ -140,7 +124,7 @@ Index: libgcrypt-1.6.1/src/libgcrypt.m4 if test x"$libgcrypt_config_host" != xnone ; then if test x"$libgcrypt_config_host" != x"$host" ; then AC_MSG_WARN([[ -@@ -113,8 +66,6 @@ +@@ -134,8 +73,6 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], fi fi else @@ -149,3 +133,45 @@ Index: libgcrypt-1.6.1/src/libgcrypt.m4 ifelse([$3], , :, [$3]) fi AC_SUBST(LIBGCRYPT_CFLAGS) +diff --git a/src/libgcrypt.pc.in b/src/libgcrypt.pc.in +new file mode 100644 +index 0000000..2fc8f53 +--- /dev/null ++++ b/src/libgcrypt.pc.in +@@ -0,0 +1,33 @@ ++# Process this file with autoconf to produce a pkg-config metadata file. ++# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation ++# Author: Simon Josefsson ++# ++# This file is free software; as a special exception the author gives ++# unlimited permission to copy and/or distribute it, with or without ++# modifications, as long as this notice is preserved. ++# ++# This file is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the ++# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ++ ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++# API info ++api_version=@LIBGCRYPT_CONFIG_API_VERSION@ ++host=@LIBGCRYPT_CONFIG_HOST@ ++ ++# Misc information. ++symmetric_ciphers=@LIBGCRYPT_CIPHERS@ ++asymmetric_ciphers=@LIBGCRYPT_PUBKEY_CIPHERS@ ++digests=@LIBGCRYPT_DIGESTS@ ++ ++Name: libgcrypt ++Description: GNU crypto library ++URL: http://www.gnupg.org ++Version: @VERSION@ ++Libs: -L${libdir} -lgcrypt ++Libs.private: -L${libdir} -lgpg-error ++Cflags: -I${includedir} +-- +2.8.1 + diff --git a/import-layers/yocto-poky/meta/recipes-support/libgcrypt/files/fix-undefined-reference-to-pthread.patch b/import-layers/yocto-poky/meta/recipes-support/libgcrypt/files/fix-undefined-reference-to-pthread.patch new file mode 100644 index 000000000..e7de8badf --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/libgcrypt/files/fix-undefined-reference-to-pthread.patch @@ -0,0 +1,27 @@ +From cc0e2b403d33892963513a3ba98e4ae5a05a4d3c Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Sun, 12 Jun 2016 04:44:29 -0400 +Subject: [PATCH] tests/Makefile.am: fix undefined reference to `pthread_create' + +Add missing '-lpthread' to CFLAGS + +Upstream-Status: Pending + +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + tests/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/Makefile.am b/tests/Makefile.am +index d462f30..bef6dd7 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -62,4 +62,4 @@ EXTRA_DIST = README rsa-16k.key cavs_tests.sh cavs_driver.pl \ + + LDADD = $(standard_ldadd) $(GPG_ERROR_LIBS) + t_lock_LDADD = $(standard_ldadd) $(GPG_ERROR_MT_LIBS) +-t_lock_CFLAGS = $(GPG_ERROR_MT_CFLAGS) ++t_lock_CFLAGS = $(GPG_ERROR_MT_CFLAGS) -lpthread +-- +2.8.1 + diff --git a/import-layers/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt.inc b/import-layers/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt.inc index 5478253e0..15805cd43 100644 --- a/import-layers/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt.inc +++ b/import-layers/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt.inc @@ -14,10 +14,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ DEPENDS = "libgpg-error libcap" -SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-${PV}.tar.gz \ +UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html" +SRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.gz \ file://add-pkgconfig-support.patch \ file://libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch \ file://fix-ICE-failure-on-mips-with-option-O-and-g.patch \ + file://fix-undefined-reference-to-pthread.patch \ " BINCONFIG = "${bindir}/libgcrypt-config" diff --git a/import-layers/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.6.5.bb b/import-layers/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.6.5.bb deleted file mode 100644 index 717a23f1c..000000000 --- a/import-layers/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.6.5.bb +++ /dev/null @@ -1,4 +0,0 @@ -require libgcrypt.inc - -SRC_URI[md5sum] = "f24fcb684932d4b5ed85f2f05cb1d9f8" -SRC_URI[sha256sum] = "202bf109ccf2d614565c849f3e5687b94cde972167b35261e094252367627bc6" diff --git a/import-layers/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.7.3.bb b/import-layers/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.7.3.bb new file mode 100644 index 000000000..ddd7c5392 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.7.3.bb @@ -0,0 +1,4 @@ +require libgcrypt.inc + +SRC_URI[md5sum] = "bb5b00cb70b1215833857fd690080fbb" +SRC_URI[sha256sum] = "c98470cf6a781f2af4bdfda710ad39f0f54b5044e8c43b878d4005737d6c213f" diff --git a/import-layers/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error/0001-libgpg-error-Add-nios2-support.patch b/import-layers/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error/0001-libgpg-error-Add-nios2-support.patch deleted file mode 100644 index dab1c13b6..000000000 --- a/import-layers/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error/0001-libgpg-error-Add-nios2-support.patch +++ /dev/null @@ -1,46 +0,0 @@ -From b2af652f43991e4ce6297917da542a9eb5135939 Mon Sep 17 00:00:00 2001 -From: Marek Vasut <marex@denx.de> -Date: Thu, 17 Sep 2015 03:28:06 +0200 -Subject: [PATCH] libgpg-error: Add nios2 support - -Add configuration for the NIOS2 processor. - -Signed-off-by: Marek Vasut <marex@denx.de> -Upstream-Status: Submitted ---- - src/syscfg/lock-obj-pub.nios2-unknown-linux-gnu.h | 23 +++++++++++++++++++++++ - 1 file changed, 23 insertions(+) - create mode 100644 src/syscfg/lock-obj-pub.nios2-unknown-linux-gnu.h - -diff --git a/src/syscfg/lock-obj-pub.nios2-unknown-linux-gnu.h b/src/syscfg/lock-obj-pub.nios2-unknown-linux-gnu.h -new file mode 100644 -index 0000000..3a24571 ---- /dev/null -+++ b/src/syscfg/lock-obj-pub.nios2-unknown-linux-gnu.h -@@ -0,0 +1,23 @@ -+## lock-obj-pub.nios2-unknown-linux-gnu.h -+## File created by gen-posix-lock-obj - DO NOT EDIT -+## To be included by mkheader into gpg-error.h -+ -+typedef struct -+{ -+ long _vers; -+ union { -+ volatile char _priv[24]; -+ long _x_align; -+ long *_xp_align; -+ } u; -+} gpgrt_lock_t; -+ -+#define GPGRT_LOCK_INITIALIZER {1,{{0,0,0,0,0,0,0,0, \ -+ 0,0,0,0,0,0,0,0, \ -+ 0,0,0,0,0,0,0,0}}} -+## -+## Local Variables: -+## mode: c -+## buffer-read-only: t -+## End: -+## --- -2.5.1 - diff --git a/import-layers/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error_1.21.bb b/import-layers/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error_1.24.bb index 0dd16025a..84a882a0c 100644 --- a/import-layers/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error_1.21.bb +++ b/import-layers/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error_1.24.bb @@ -5,18 +5,18 @@ BUGTRACKER = "https://bugs.g10code.com/gnupg/index" LICENSE = "GPLv2+ & LGPLv2.1+" LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \ - file://src/gpg-error.h.in;endline=23;md5=93d3155af141ae3b369a5d09ca9d6234 \ - file://src/init.c;endline=20;md5=8f5a9b59634f4aebcd0ec9d3ebd53bfe" + file://src/gpg-error.h.in;endline=23;md5=cf562f60b9dba7df20d6ee3f97ea1d5a \ + file://src/init.c;endline=20;md5=872b2389fe9bae7ffb80d2b91225afbc" SECTION = "libs" -SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-${PV}.tar.bz2 \ +UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html" +SRC_URI = "${GNUPG_MIRROR}/libgpg-error/libgpg-error-${PV}.tar.bz2 \ file://pkgconfig.patch \ - file://0001-libgpg-error-Add-nios2-support.patch \ " -SRC_URI[md5sum] = "ab0b5aba6d0a185b41d07bda804fd8b2" -SRC_URI[sha256sum] = "b7dbdb3cad63a740e9f0c632a1da32d4afdb694ec86c8625c98ea0691713b84d" +SRC_URI[md5sum] = "feb42198c0aaf3b28eabe8f41a34b983" +SRC_URI[sha256sum] = "9268e1cc487de5e6e4460fca612a06e4f383072ac43ae90603e5e46783d3e540" BINCONFIG = "${bindir}/gpg-error-config" @@ -33,8 +33,8 @@ do_compile_prepend() { arm) TUPLE=arm-unknown-linux-gnueabi ;; armeb) TUPLE=arm-unknown-linux-gnueabi ;; i586|i686) TUPLE=i686-pc-linux-gnu ;; - mips64el) TUPLE=mipsel-unknown-linux-gnu ;; - mips64) TUPLE=mips-unknown-linux-gnu ;; + mips*el) TUPLE=mipsel-unknown-linux-gnu ;; + mips*) TUPLE=mips-unknown-linux-gnu ;; x86_64) TUPLE=x86_64-pc-linux-gnu ;; *) TUPLE=${TARGET_ARCH}-unknown-linux-gnu ;; esac diff --git a/import-layers/yocto-poky/meta/recipes-support/libical/libical/0001-CMakeLists.txt-libical.pc.in-fix-iculibs-remove-full.patch b/import-layers/yocto-poky/meta/recipes-support/libical/libical/0001-CMakeLists.txt-libical.pc.in-fix-iculibs-remove-full.patch new file mode 100644 index 000000000..6db75f508 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/libical/libical/0001-CMakeLists.txt-libical.pc.in-fix-iculibs-remove-full.patch @@ -0,0 +1,44 @@ +From 1a41069c0dc054e59cd76fc3d8cf7cc2a78b5e8d Mon Sep 17 00:00:00 2001 +From: Allen Winter <allen.winter@kdab.com> +Date: Sat, 3 Sep 2016 16:56:29 -0400 +Subject: [PATCH] CMakeLists.txt, libical.pc.in - fix iculibs (remove full path) ISSUE: 227 + +Upstream-Status: Backport + +Signed-off-by: Maxin B. John <maxin.john@intel.com> +---- +diff -Naur libical-2.0.0-orig/CMakeLists.txt libical-2.0.0/CMakeLists.txt +--- libical-2.0.0-orig/CMakeLists.txt 2016-09-08 18:05:06.166049345 +0300 ++++ libical-2.0.0/CMakeLists.txt 2016-09-08 18:05:45.201561334 +0300 +@@ -128,6 +128,7 @@ + # RSCALE info at http://tools.ietf.org/html/rfc7529 + find_package(ICU) + if(ICU_FOUND) ++ set(ICUUC_LIBS "-licuuc") #for libical.pc + set(HAVE_LIBICU 1) + if(ICU_MAJOR_VERSION VERSION_GREATER 50) + set(HAVE_ICU_DANGI TRUE) +@@ -137,6 +138,7 @@ + endif() + if(ICU_I18N_FOUND) + set(HAVE_LIBICU_I18N 1) ++ set(ICUI18N_LIBS "-licui18n") #for libical.pc + endif() + + # MSVC specific definitions +diff -Naur libical-2.0.0-orig/libical.pc.in libical-2.0.0/libical.pc.in +--- libical-2.0.0-orig/libical.pc.in 2015-12-28 23:44:53.000000000 +0200 ++++ libical-2.0.0/libical.pc.in 2016-09-08 18:09:12.991963597 +0300 +@@ -3,10 +3,10 @@ + libdir=@libdir@ + includedir=@includedir@ + threadslib=@PTHREAD_LIBS@ +-iculib=@ICU_LIBRARIES@ @ICU_I18N_LIBRARIES@ ++iculibs=@ICUUC_LIBS@ @ICUI18N_LIBS@ + + Name: libical + Description: An implementation of basic iCAL protocols + Version: @VERSION@ +-Libs: -L${libdir} -lical -licalss -licalvcal ${threadslib} ${iculib} ++Libs: -L${libdir} -lical -licalss -licalvcal ${threadslib} ${iculibs} + Cflags: -I${includedir} diff --git a/import-layers/yocto-poky/meta/recipes-support/libical/libical_2.0.0.bb b/import-layers/yocto-poky/meta/recipes-support/libical/libical_2.0.0.bb index 1042e6fa3..d4fe868eb 100644 --- a/import-layers/yocto-poky/meta/recipes-support/libical/libical_2.0.0.bb +++ b/import-layers/yocto-poky/meta/recipes-support/libical/libical_2.0.0.bb @@ -8,6 +8,7 @@ SECTION = "libs" SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BP}.tar.gz \ file://Remove-cmake-check-for-Perl.patch \ + file://0001-CMakeLists.txt-libical.pc.in-fix-iculibs-remove-full.patch \ " DEPENDS = "icu" @@ -15,13 +16,6 @@ SRC_URI[md5sum] = "6bf8e5f5a3ba88baf390d0134e05d76e" SRC_URI[sha256sum] = "654c11f759c19237be39f6ad401d917e5a05f36f1736385ed958e60cf21456da" UPSTREAM_CHECK_URI = "https://github.com/libical/libical/releases" -inherit cmake +inherit cmake pkgconfig FILES_${PN}-dev += "${libdir}/cmake/*" - -# -# Turn specific library paths in the pkgconfig file into standard library entries -# -do_install_append () { - sed -i -e "s#${STAGING_LIBDIR}/lib\([a-z0-9]*\)\.so#-l\1#g" ${D}${libdir}/pkgconfig/libical.pc -} diff --git a/import-layers/yocto-poky/meta/recipes-support/libksba/libksba_1.3.3.bb b/import-layers/yocto-poky/meta/recipes-support/libksba/libksba_1.3.4.bb index bc2116419..e68255c67 100644 --- a/import-layers/yocto-poky/meta/recipes-support/libksba/libksba_1.3.3.bb +++ b/import-layers/yocto-poky/meta/recipes-support/libksba/libksba_1.3.4.bb @@ -13,11 +13,12 @@ BINCONFIG = "${bindir}/ksba-config" inherit autotools binconfig-disabled pkgconfig texinfo -SRC_URI = "ftp://ftp.gnupg.org/gcrypt/${BPN}/${BPN}-${PV}.tar.bz2 \ +UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html" +SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \ file://ksba-add-pkgconfig-support.patch" -SRC_URI[md5sum] = "a5dd3c57fca254935f5cf8db26e39065" -SRC_URI[sha256sum] = "0c7f5ffe34d0414f6951d9880a46fcc2985c487f7c36369b9f11ad41131c7786" +SRC_URI[md5sum] = "2bfc3d69053db7b6983b5627706033f4" +SRC_URI[sha256sum] = "f6c2883cebec5608692d8730843d87f237c0964d923bbe7aa89c05f20558ad4f" do_configure_prepend () { # Else these could be used in preference to those in aclocal-copy diff --git a/import-layers/yocto-poky/meta/recipes-support/libnl/libnl/0001-lib-add-utility-function-nl_strerror_l.patch b/import-layers/yocto-poky/meta/recipes-support/libnl/libnl/0001-lib-add-utility-function-nl_strerror_l.patch new file mode 100644 index 000000000..b734028c7 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/libnl/libnl/0001-lib-add-utility-function-nl_strerror_l.patch @@ -0,0 +1,146 @@ +From 683f27fbb68ca2028a7b3468f17164d484df2759 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com> +Date: Thu, 25 Aug 2016 13:14:59 +0100 +Subject: [PATCH 1/3] lib: add utility function nl_strerror_l() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +libnl currently uses strerror_r() throughout, but this is +problematic because there is a non-standard GNU version +implemented in glibc, and the standard POSIX version, which +differ in signature. When using glibc, one can choose +between the two versions using feature test macros +_GNU_SOURCE and _POSIX_C_SOURCE. + +Given libnl is built using the former, we always get the +glibc special version, and all code so far has been written +for that non-standard version. + +Other C libraries like musl on the other hand only try +to be posix compliant, and only ever provide the posix +version of strerror_r(), which has a different signature. + +The alternative is to use strerror_l() rather than +strerror_r() http://austingroupbugs.net/view.php?id=655 +- this will avoid the non-confirming versions issue +- strerror_l() is now recommended by POSIX to replace + strerror_r() usage + +So rather than changing all uses of strerror_r() to be in +line with posix, we are going to switch to the recommended +interface strerror_l(). + +Since strerror_l() is slightly more difficuly to use, we +add a little (private) wrapper that we can use from all +current callsites of strerror_r(). + +Signed-off-by: André Draszik <adraszik@tycoint.com> +Reviewed-by: Stephane Ayotte <sayotte@tycoint.com> +Signed-off-by: Thomas Haller <thaller@redhat.com> +--- +Upstream-Status: Backport https://github.com/thom311/libnl/commit/683f27fbb68ca2028a7b3468f17164d484df2759 + include/Makefile.am | 1 + + include/netlink-private/utils.h | 17 +++++++++++++++++ + lib/utils.c | 24 ++++++++++++++++++++++++ + libnl-3.sym | 5 +++++ + 4 files changed, 47 insertions(+) + create mode 100644 include/netlink-private/utils.h + +diff --git a/include/Makefile.am b/include/Makefile.am +index 804e984..f8b977a 100644 +--- a/include/Makefile.am ++++ b/include/Makefile.am +@@ -166,6 +166,7 @@ noinst_HEADERS = \ + netlink-private/socket.h \ + netlink-private/tc.h \ + netlink-private/types.h \ ++ netlink-private/utils.h \ + netlink-private/cache-api.h \ + netlink-private/object-api.h \ + netlink-private/route/link/api.h \ +diff --git a/include/netlink-private/utils.h b/include/netlink-private/utils.h +new file mode 100644 +index 0000000..77aadb3 +--- /dev/null ++++ b/include/netlink-private/utils.h +@@ -0,0 +1,17 @@ ++/* ++ * netlink-private/utils.h Local Utility Functions ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation version 2.1 ++ * of the License. ++ * ++ * Copyright (c) 2003-2012 Thomas Graf <tgraf@suug.ch> ++ */ ++ ++#ifndef NETLINK_UTILS_PRIV_H_ ++#define NETLINK_UTILS_PRIV_H_ ++ ++extern const char * nl_strerror_l(int err); ++ ++#endif +diff --git a/lib/utils.c b/lib/utils.c +index 61c3d95..c1c1b72 100644 +--- a/lib/utils.c ++++ b/lib/utils.c +@@ -25,10 +25,12 @@ + */ + + #include <netlink-private/netlink.h> ++#include <netlink-private/utils.h> + #include <netlink/netlink.h> + #include <netlink/utils.h> + #include <linux/socket.h> + #include <stdlib.h> /* exit() */ ++#include <locale.h> + + /** + * Global variable indicating the desired level of debugging output. +@@ -118,6 +120,28 @@ int __nl_read_num_str_file(const char *path, int (*cb)(long, const char *)) + + return 0; + } ++ ++const char *nl_strerror_l(int err) ++{ ++ int errno_save = errno; ++ locale_t loc = newlocale(LC_MESSAGES_MASK, "", (locale_t)0); ++ const char *buf; ++ ++ if (loc == (locale_t)0) { ++ if (errno == ENOENT) ++ loc = newlocale(LC_MESSAGES_MASK, ++ "POSIX", (locale_t)0); ++ } ++ if (loc != (locale_t)0) { ++ buf = strerror_l(err, loc); ++ freelocale(loc); ++ } else { ++ buf = "newlocale() failed"; ++ } ++ ++ errno = errno_save; ++ return buf; ++} + /** @endcond */ + + /** +diff --git a/libnl-3.sym b/libnl-3.sym +index 4e09bdd..9119e66 100644 +--- a/libnl-3.sym ++++ b/libnl-3.sym +@@ -351,3 +351,8 @@ libnl_3_2_28 { + global: + nl_object_diff64; + } libnl_3_2_27; ++ ++libnl_3_2_29 { ++global: ++ nl_strerror_l; ++} libnl_3_2_28; +-- +2.9.3 + diff --git a/import-layers/yocto-poky/meta/recipes-support/libnl/libnl/0002-lib-switch-to-using-strerror_l-instead-of-strerror_r.patch b/import-layers/yocto-poky/meta/recipes-support/libnl/libnl/0002-lib-switch-to-using-strerror_l-instead-of-strerror_r.patch new file mode 100644 index 000000000..6347ec0b9 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/libnl/libnl/0002-lib-switch-to-using-strerror_l-instead-of-strerror_r.patch @@ -0,0 +1,403 @@ +From c1948ec29b8dcdc58d2d92700c325abdeab111a6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com> +Date: Thu, 25 Aug 2016 13:15:00 +0100 +Subject: [PATCH 2/3] lib: switch to using strerror_l() instead of strerror_r() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +glibc provides two versions of strerror_r(), which +can be chosen between using feature test macros +_GNU_SOURCE and _POSIX_C_SOURCE. libnl is built using +the former, hence we get the glibc special version, +and all code so far has been written for this. + +Other C libraries like musl on the other hand only try +to be posix compliant, and only ever provide the posix +version of strerror_r(), which has a different signature. + +Uses in libnl hence generally cause printf() of an *int* +with a *string format* specifier for that reason. + +Additionally, strerror_r() has been deprecated: + http://austingroupbugs.net/view.php?id=655 + +Switch to using strerror_l() (via our wrapper just +introduced). + +Signed-off-by: André Draszik <adraszik@tycoint.com> +Reviewed-by: Stephane Ayotte <sayotte@tycoint.com> +Signed-off-by: Thomas Haller <thaller@redhat.com> +--- +Upstream-Status: Backport https://github.com/thom311/libnl/commit/c1948ec29b8dcdc58d2d92700c325abdeab111a6 + lib/cache_mngr.c | 5 ++--- + lib/fib_lookup/lookup.c | 3 ++- + lib/handlers.c | 4 ++-- + lib/msg.c | 4 ++-- + lib/nl.c | 26 +++++++++----------------- + lib/route/route_obj.c | 3 ++- + lib/socket.c | 33 +++++++++++---------------------- + 7 files changed, 30 insertions(+), 48 deletions(-) + +diff --git a/lib/cache_mngr.c b/lib/cache_mngr.c +index b9eb345..1f23eb1 100644 +--- a/lib/cache_mngr.c ++++ b/lib/cache_mngr.c +@@ -33,6 +33,7 @@ + */ + + #include <netlink-private/netlink.h> ++#include <netlink-private/utils.h> + #include <netlink/netlink.h> + #include <netlink/cache.h> + #include <netlink/utils.h> +@@ -392,10 +393,8 @@ int nl_cache_mngr_poll(struct nl_cache_mngr *mngr, int timeout) + ret = poll(&fds, 1, timeout); + NL_DBG(3, "Cache manager %p, poll() returned %d\n", mngr, ret); + if (ret < 0) { +- char buf[64]; +- + NL_DBG(4, "nl_cache_mngr_poll(%p): poll() failed with %d (%s)\n", +- mngr, errno, strerror_r(errno, buf, sizeof(buf))); ++ mngr, errno, nl_strerror_l(errno)); + return -nl_syserr2nlerr(errno); + } + +diff --git a/lib/fib_lookup/lookup.c b/lib/fib_lookup/lookup.c +index 43b6126..efc862b 100644 +--- a/lib/fib_lookup/lookup.c ++++ b/lib/fib_lookup/lookup.c +@@ -17,6 +17,7 @@ + */ + + #include <netlink-private/netlink.h> ++#include <netlink-private/utils.h> + #include <netlink/netlink.h> + #include <netlink/attr.h> + #include <netlink/utils.h> +@@ -133,7 +134,7 @@ static void result_dump_line(struct nl_object *obj, struct nl_dump_params *p) + nl_rtntype2str(res->fr_type, buf, sizeof(buf))); + nl_dump(p, "scope %s error %s (%d)\n", + rtnl_scope2str(res->fr_scope, buf, sizeof(buf)), +- strerror_r(-res->fr_error, buf, sizeof(buf)), res->fr_error); ++ nl_strerror_l(-res->fr_error), res->fr_error); + } + + static void result_dump_details(struct nl_object *obj, struct nl_dump_params *p) +diff --git a/lib/handlers.c b/lib/handlers.c +index 97a0d9c..4a48b99 100644 +--- a/lib/handlers.c ++++ b/lib/handlers.c +@@ -26,6 +26,7 @@ + */ + + #include <netlink-private/netlink.h> ++#include <netlink-private/utils.h> + #include <netlink/netlink.h> + #include <netlink/utils.h> + #include <netlink/msg.h> +@@ -79,10 +80,9 @@ static int nl_error_handler_verbose(struct sockaddr_nl *who, + struct nlmsgerr *e, void *arg) + { + FILE *ofd = arg ? arg : stderr; +- char buf[256]; + + fprintf(ofd, "-- Error received: %s\n-- Original message: ", +- strerror_r(-e->error, buf, sizeof(buf))); ++ nl_strerror_l(-e->error)); + print_header_content(ofd, &e->msg); + fprintf(ofd, "\n"); + +diff --git a/lib/msg.c b/lib/msg.c +index e8a7e99..9af3f3a 100644 +--- a/lib/msg.c ++++ b/lib/msg.c +@@ -27,6 +27,7 @@ + */ + + #include <netlink-private/netlink.h> ++#include <netlink-private/utils.h> + #include <netlink/netlink.h> + #include <netlink/utils.h> + #include <netlink/cache.h> +@@ -913,11 +914,10 @@ static void dump_error_msg(struct nl_msg *msg, FILE *ofd) + fprintf(ofd, " [ERRORMSG] %zu octets\n", sizeof(*err)); + + if (nlmsg_len(hdr) >= sizeof(*err)) { +- char buf[256]; + struct nl_msg *errmsg; + + fprintf(ofd, " .error = %d \"%s\"\n", err->error, +- strerror_r(-err->error, buf, sizeof(buf))); ++ nl_strerror_l(-err->error)); + fprintf(ofd, " [ORIGINAL MESSAGE] %zu octets\n", sizeof(*hdr)); + + errmsg = nlmsg_inherit(&err->msg); +diff --git a/lib/nl.c b/lib/nl.c +index 123f657..a45c3ea 100644 +--- a/lib/nl.c ++++ b/lib/nl.c +@@ -27,6 +27,7 @@ + + #include <netlink-private/netlink.h> + #include <netlink-private/socket.h> ++#include <netlink-private/utils.h> + #include <netlink/netlink.h> + #include <netlink/utils.h> + #include <netlink/handlers.h> +@@ -105,7 +106,6 @@ int nl_connect(struct nl_sock *sk, int protocol) + int errsv; + socklen_t addrlen; + struct sockaddr_nl local = { 0 }; +- char buf[64]; + int try_bind = 1; + + #ifdef SOCK_CLOEXEC +@@ -119,7 +119,7 @@ int nl_connect(struct nl_sock *sk, int protocol) + if (sk->s_fd < 0) { + errsv = errno; + NL_DBG(4, "nl_connect(%p): socket() failed with %d (%s)\n", sk, errsv, +- strerror_r(errsv, buf, sizeof(buf))); ++ nl_strerror_l(errsv)); + err = -nl_syserr2nlerr(errsv); + goto errout; + } +@@ -158,7 +158,7 @@ int nl_connect(struct nl_sock *sk, int protocol) + _nl_socket_used_ports_set(used_ports, port); + } else { + NL_DBG(4, "nl_connect(%p): bind() for port %u failed with %d (%s)\n", +- sk, (unsigned) port, errsv, strerror_r(errsv, buf, sizeof(buf))); ++ sk, (unsigned) port, errsv, nl_strerror_l(errsv)); + _nl_socket_used_ports_release_all(used_ports); + err = -nl_syserr2nlerr(errsv); + goto errout; +@@ -172,7 +172,7 @@ int nl_connect(struct nl_sock *sk, int protocol) + if (err != 0) { + errsv = errno; + NL_DBG(4, "nl_connect(%p): bind() failed with %d (%s)\n", +- sk, errsv, strerror_r(errsv, buf, sizeof(buf))); ++ sk, errsv, nl_strerror_l(errsv)); + err = -nl_syserr2nlerr(errsv); + goto errout; + } +@@ -183,7 +183,7 @@ int nl_connect(struct nl_sock *sk, int protocol) + &addrlen); + if (err < 0) { + NL_DBG(4, "nl_connect(%p): getsockname() failed with %d (%s)\n", +- sk, errno, strerror_r(errno, buf, sizeof(buf))); ++ sk, errno, nl_strerror_l(errno)); + err = -nl_syserr2nlerr(errno); + goto errout; + } +@@ -280,10 +280,8 @@ int nl_sendto(struct nl_sock *sk, void *buf, size_t size) + ret = sendto(sk->s_fd, buf, size, 0, (struct sockaddr *) + &sk->s_peer, sizeof(sk->s_peer)); + if (ret < 0) { +- char errbuf[64]; +- + NL_DBG(4, "nl_sendto(%p): sendto() failed with %d (%s)\n", +- sk, errno, strerror_r(errno, errbuf, sizeof(errbuf))); ++ sk, errno, nl_strerror_l(errno)); + return -nl_syserr2nlerr(errno); + } + +@@ -343,10 +341,8 @@ int nl_sendmsg(struct nl_sock *sk, struct nl_msg *msg, struct msghdr *hdr) + + ret = sendmsg(sk->s_fd, hdr, 0); + if (ret < 0) { +- char errbuf[64]; +- + NL_DBG(4, "nl_sendmsg(%p): sendmsg() failed with %d (%s)\n", +- sk, errno, strerror_r(errno, errbuf, sizeof(errbuf))); ++ sk, errno, nl_strerror_l(errno)); + return -nl_syserr2nlerr(errno); + } + +@@ -706,15 +702,13 @@ retry: + goto abort; + } + if (n < 0) { +- char errbuf[64]; +- + if (errno == EINTR) { + NL_DBG(3, "recvmsg() returned EINTR, retrying\n"); + goto retry; + } + + NL_DBG(4, "nl_sendmsg(%p): nl_recv() failed with %d (%s)\n", +- sk, errno, strerror_r(errno, errbuf, sizeof(errbuf))); ++ sk, errno, nl_strerror_l(errno)); + retval = -nl_syserr2nlerr(errno); + goto abort; + } +@@ -980,10 +974,8 @@ continue_reading: + goto out; + } + } else if (e->error) { +- char buf[64]; +- + NL_DBG(4, "recvmsgs(%p): RTNETLINK responded with %d (%s)\n", +- sk, -e->error, strerror_r(-e->error, buf, sizeof(buf))); ++ sk, -e->error, nl_strerror_l(-e->error)); + + /* Error message reported back from kernel. */ + if (cb->cb_err) { +diff --git a/lib/route/route_obj.c b/lib/route/route_obj.c +index 7347ed2..21b67b1 100644 +--- a/lib/route/route_obj.c ++++ b/lib/route/route_obj.c +@@ -31,6 +31,7 @@ + */ + + #include <netlink-private/netlink.h> ++#include <netlink-private/utils.h> + #include <netlink/netlink.h> + #include <netlink/cache.h> + #include <netlink/utils.h> +@@ -259,7 +260,7 @@ static void route_dump_details(struct nl_object *a, struct nl_dump_params *p) + if ((r->ce_mask & ROUTE_ATTR_CACHEINFO) && r->rt_cacheinfo.rtci_error) { + nl_dump_line(p, " cacheinfo error %d (%s)\n", + r->rt_cacheinfo.rtci_error, +- strerror_r(-r->rt_cacheinfo.rtci_error, buf, sizeof(buf))); ++ nl_strerror_l(-r->rt_cacheinfo.rtci_error)); + } + + if (r->ce_mask & ROUTE_ATTR_METRICS) { +diff --git a/lib/socket.c b/lib/socket.c +index 97b2f69..55153b4 100644 +--- a/lib/socket.c ++++ b/lib/socket.c +@@ -33,6 +33,7 @@ + + #include <netlink-private/netlink.h> + #include <netlink-private/socket.h> ++#include <netlink-private/utils.h> + #include <netlink/netlink.h> + #include <netlink/utils.h> + #include <netlink/handlers.h> +@@ -449,11 +450,9 @@ int nl_socket_add_memberships(struct nl_sock *sk, int group, ...) + err = setsockopt(sk->s_fd, SOL_NETLINK, NETLINK_ADD_MEMBERSHIP, + &group, sizeof(group)); + if (err < 0) { +- char buf[64]; +- + va_end(ap); + NL_DBG(4, "nl_socket_add_memberships(%p): setsockopt() failed with %d (%s)\n", +- sk, errno, strerror_r(errno, buf, sizeof(buf))); ++ sk, errno, nl_strerror_l(errno)); + return -nl_syserr2nlerr(errno); + } + +@@ -501,11 +500,9 @@ int nl_socket_drop_memberships(struct nl_sock *sk, int group, ...) + err = setsockopt(sk->s_fd, SOL_NETLINK, NETLINK_DROP_MEMBERSHIP, + &group, sizeof(group)); + if (err < 0) { +- char buf[64]; +- + va_end(ap); + NL_DBG(4, "nl_socket_drop_memberships(%p): setsockopt() failed with %d (%s)\n", +- sk, errno, strerror_r(errno, buf, sizeof(buf))); ++ sk, errno, nl_strerror_l(errno)); + return -nl_syserr2nlerr(errno); + } + +@@ -619,7 +616,6 @@ int nl_socket_set_fd(struct nl_sock *sk, int protocol, int fd) + { + int err = 0; + socklen_t addrlen; +- char buf[64]; + struct sockaddr_nl local = { 0 }; + int so_type = -1, so_protocol = -1; + +@@ -633,7 +629,7 @@ int nl_socket_set_fd(struct nl_sock *sk, int protocol, int fd) + &addrlen); + if (err < 0) { + NL_DBG(4, "nl_socket_set_fd(%p,%d): getsockname() failed with %d (%s)\n", +- sk, fd, errno, strerror_r(errno, buf, sizeof(buf))); ++ sk, fd, errno, nl_strerror_l(errno)); + return -nl_syserr2nlerr(errno); + } + if (addrlen != sizeof(local)) +@@ -648,7 +644,7 @@ int nl_socket_set_fd(struct nl_sock *sk, int protocol, int fd) + err = getsockopt(fd, SOL_SOCKET, SO_TYPE, &so_type, &addrlen); + if (err < 0) { + NL_DBG(4, "nl_socket_set_fd(%p,%d): getsockopt() for SO_TYPE failed with %d (%s)\n", +- sk, fd, errno, strerror_r(errno, buf, sizeof(buf))); ++ sk, fd, errno, nl_strerror_l(errno)); + return -nl_syserr2nlerr(errno); + } + if (addrlen != sizeof(so_type)) +@@ -666,7 +662,7 @@ int nl_socket_set_fd(struct nl_sock *sk, int protocol, int fd) + if (errno == ENOPROTOOPT) + goto no_so_protocol; + NL_DBG(4, "nl_socket_set_fd(%p,%d): getsockopt() for SO_PROTOCOL failed with %d (%s)\n", +- sk, fd, errno, strerror_r(errno, buf, sizeof(buf))); ++ sk, fd, errno, nl_strerror_l(errno)); + return -nl_syserr2nlerr(errno); + } + if (addrlen != sizeof(so_protocol)) +@@ -709,10 +705,8 @@ int nl_socket_set_nonblocking(const struct nl_sock *sk) + return -NLE_BAD_SOCK; + + if (fcntl(sk->s_fd, F_SETFL, O_NONBLOCK) < 0) { +- char buf[64]; +- + NL_DBG(4, "nl_socket_set_nonblocking(%p): fcntl() failed with %d (%s)\n", +- sk, errno, strerror_r(errno, buf, sizeof(buf))); ++ sk, errno, nl_strerror_l(errno)); + return -nl_syserr2nlerr(errno); + } + +@@ -813,7 +807,6 @@ int nl_socket_modify_err_cb(struct nl_sock *sk, enum nl_cb_kind kind, + int nl_socket_set_buffer_size(struct nl_sock *sk, int rxbuf, int txbuf) + { + int err; +- char buf[64]; + + if (rxbuf <= 0) + rxbuf = 32768; +@@ -828,7 +821,7 @@ int nl_socket_set_buffer_size(struct nl_sock *sk, int rxbuf, int txbuf) + &txbuf, sizeof(txbuf)); + if (err < 0) { + NL_DBG(4, "nl_socket_set_buffer_size(%p): setsockopt() failed with %d (%s)\n", +- sk, errno, strerror_r(errno, buf, sizeof(buf))); ++ sk, errno, nl_strerror_l(errno)); + return -nl_syserr2nlerr(errno); + } + +@@ -836,7 +829,7 @@ int nl_socket_set_buffer_size(struct nl_sock *sk, int rxbuf, int txbuf) + &rxbuf, sizeof(rxbuf)); + if (err < 0) { + NL_DBG(4, "nl_socket_set_buffer_size(%p): setsockopt() failed with %d (%s)\n", +- sk, errno, strerror_r(errno, buf, sizeof(buf))); ++ sk, errno, nl_strerror_l(errno)); + return -nl_syserr2nlerr(errno); + } + +@@ -890,10 +883,8 @@ int nl_socket_set_passcred(struct nl_sock *sk, int state) + err = setsockopt(sk->s_fd, SOL_SOCKET, SO_PASSCRED, + &state, sizeof(state)); + if (err < 0) { +- char buf[64]; +- + NL_DBG(4, "nl_socket_set_passcred(%p): setsockopt() failed with %d (%s)\n", +- sk, errno, strerror_r(errno, buf, sizeof(buf))); ++ sk, errno, nl_strerror_l(errno)); + return -nl_syserr2nlerr(errno); + } + +@@ -922,10 +913,8 @@ int nl_socket_recv_pktinfo(struct nl_sock *sk, int state) + err = setsockopt(sk->s_fd, SOL_NETLINK, NETLINK_PKTINFO, + &state, sizeof(state)); + if (err < 0) { +- char buf[64]; +- + NL_DBG(4, "nl_socket_recv_pktinfo(%p): setsockopt() failed with %d (%s)\n", +- sk, errno, strerror_r(errno, buf, sizeof(buf))); ++ sk, errno, nl_strerror_l(errno)); + return -nl_syserr2nlerr(errno); + } + +-- +2.9.3 + diff --git a/import-layers/yocto-poky/meta/recipes-support/libnl/libnl/0003-src-switch-to-using-strerror_l-instead-of-strerror_r.patch b/import-layers/yocto-poky/meta/recipes-support/libnl/libnl/0003-src-switch-to-using-strerror_l-instead-of-strerror_r.patch new file mode 100644 index 000000000..a0f5a7809 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/libnl/libnl/0003-src-switch-to-using-strerror_l-instead-of-strerror_r.patch @@ -0,0 +1,82 @@ +From 6c2d111177e91184073c44f83d4a6182aaba06d7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com> +Date: Thu, 25 Aug 2016 13:15:01 +0100 +Subject: [PATCH 3/3] src: switch to using strerror_l() instead of strerror_r() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +glibc provides two versions of strerror_r(), which +can be chosen between using feature test macros +_GNU_SOURCE and _POSIX_C_SOURCE. libnl is built using +the former, hence we get the glibc special version, +and all code so far has been written for this. + +Other C libraries like musl on the other hand only try +to be posix compliant, and only ever provide the posix +version of strerror_r(), which has a different signature. + +Uses in libnl hence generally cause printf() of an *int* +with a *string format* specifier for that reason. + +Additionally, strerror_r() has been deprecated: + http://austingroupbugs.net/view.php?id=655 + +Switch to using strerror_l(). + +Signed-off-by: André Draszik <adraszik@tycoint.com> +Reviewed-by: Stephane Ayotte <sayotte@tycoint.com> +Signed-off-by: Thomas Haller <thaller@redhat.com> +--- +Upstream-Status: Backport https://github.com/thom311/libnl/commit/6c2d111177e91184073c44f83d4a6182aaba06d7 + src/lib/utils.c | 20 +++++++++++++++++--- + 1 file changed, 17 insertions(+), 3 deletions(-) + +diff --git a/src/lib/utils.c b/src/lib/utils.c +index 467aaed..5878f27 100644 +--- a/src/lib/utils.c ++++ b/src/lib/utils.c +@@ -22,6 +22,7 @@ + */ + + #include <netlink/cli/utils.h> ++#include <locale.h> + + /** + * Parse a text based 32 bit unsigned integer argument +@@ -70,7 +71,6 @@ void nl_cli_print_version(void) + void nl_cli_fatal(int err, const char *fmt, ...) + { + va_list ap; +- char buf[256]; + + fprintf(stderr, "Error: "); + +@@ -79,8 +79,22 @@ void nl_cli_fatal(int err, const char *fmt, ...) + vfprintf(stderr, fmt, ap); + va_end(ap); + fprintf(stderr, "\n"); +- } else +- fprintf(stderr, "%s\n", strerror_r(err, buf, sizeof(buf))); ++ } else { ++ char *buf; ++ locale_t loc = newlocale(LC_MESSAGES_MASK, "", (locale_t)0); ++ if (loc == (locale_t)0) { ++ if (errno == ENOENT) ++ loc = newlocale(LC_MESSAGES_MASK, ++ "POSIX", (locale_t)0); ++ if (loc == (locale_t)0) ++ buf = "newlocale() failed"; ++ } ++ if (loc != (locale_t)0) ++ buf = strerror_l(err, loc); ++ fprintf(stderr, "%s\n", buf); ++ if (loc != (locale_t)0) ++ freelocale(loc); ++ } + + exit(abs(err)); + } +-- +2.9.3 + diff --git a/import-layers/yocto-poky/meta/recipes-support/libnl/libnl_3.2.25.bb b/import-layers/yocto-poky/meta/recipes-support/libnl/libnl_3.2.25.bb deleted file mode 100644 index cabe84107..000000000 --- a/import-layers/yocto-poky/meta/recipes-support/libnl/libnl_3.2.25.bb +++ /dev/null @@ -1,42 +0,0 @@ -SUMMARY = "A library for applications dealing with netlink sockets" -HOMEPAGE = "http://www.infradead.org/~tgr/libnl/" -SECTION = "libs/network" - -PE = "1" -PR = "r1" - -LICENSE = "LGPLv2.1" -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" - -DEPENDS = "flex-native bison-native" - -SRC_URI = "http://www.infradead.org/~tgr/${BPN}/files/${BP}.tar.gz \ - file://fix-pktloc_syntax_h-race.patch \ - file://fix-pc-file.patch \ - " - -SRC_URI[md5sum] = "03f74d0cd5037cadc8cdfa313bbd195c" -SRC_URI[sha256sum] = "8beb7590674957b931de6b7f81c530b85dc7c1ad8fbda015398bc1e8d1ce8ec5" - -inherit autotools pkgconfig - -FILES_${PN} = "${libdir}/libnl-3.so.* \ - ${libdir}/libnl.so.* \ - ${sysconfdir}" -RREPLACES_${PN} = "libnl2" -RCONFLICTS_${PN} = "libnl2" -FILES_${PN}-staticdev += "${libdir}/libnl/cli/*/*.a" - -PACKAGES += "${PN}-cli ${PN}-route ${PN}-nf ${PN}-genl ${PN}-idiag" -FILES_${PN}-cli = "${libdir}/libnl-cli-3.so.* \ - ${libdir}/libnl/cli/*/*.so \ - ${libdir}/libnl/cli/*/*.la \ - ${sbindir}/nl-*" -FILES_${PN}-route = "${libdir}/libnl-route-3.so.*" -FILES_${PN}-idiag = "${libdir}/libnl-idiag-3.so.*" -FILES_${PN}-nf = "${libdir}/libnl-nf-3.so.*" -FILES_${PN}-genl = "${libdir}/libnl-genl-3.so.* \ - ${libdir}/libnl-genl.so.* \ - ${sbindir}/genl-ctrl-list" -RREPLACES_${PN}-genl = "libnl-genl2 libnl-genl-3-200" -RCONFLICTS_${PN}-genl = "libnl-genl2 libnl-genl-3-200" diff --git a/import-layers/yocto-poky/meta/recipes-support/libnl/libnl_3.2.28.bb b/import-layers/yocto-poky/meta/recipes-support/libnl/libnl_3.2.28.bb new file mode 100644 index 000000000..26982f3ef --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/libnl/libnl_3.2.28.bb @@ -0,0 +1,48 @@ +SUMMARY = "A library for applications dealing with netlink sockets" +HOMEPAGE = "http://www.infradead.org/~tgr/libnl/" +SECTION = "libs/network" + +PE = "1" + +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +DEPENDS = "flex-native bison-native" + +SRC_URI = "https://github.com/thom311/${BPN}/releases/download/${BPN}${@d.getVar('PV', True).replace('.','_')}/${BP}.tar.gz \ + file://fix-pktloc_syntax_h-race.patch \ + file://fix-pc-file.patch \ + file://0001-lib-add-utility-function-nl_strerror_l.patch \ + file://0002-lib-switch-to-using-strerror_l-instead-of-strerror_r.patch \ + file://0003-src-switch-to-using-strerror_l-instead-of-strerror_r.patch \ +" +UPSTREAM_CHECK_URI = "https://github.com/thom311/${BPN}/releases" + +SRC_URI[md5sum] = "bab12db1eb94a42129f712a44be91a67" +SRC_URI[sha256sum] = "cd608992c656e8f6e3ab6c1391b162a5a51c49336b9219f7f390e61fc5437c41" + +inherit autotools pkgconfig + +FILES_${PN} = "${libdir}/libnl-3.so.* \ + ${libdir}/libnl.so.* \ + ${sysconfdir}" +RREPLACES_${PN} = "libnl2" +RCONFLICTS_${PN} = "libnl2" +FILES_${PN}-dev += "${libdir}/libnl/cli/*/*.la" +FILES_${PN}-staticdev += "${libdir}/libnl/cli/*/*.a" + +PACKAGES += "${PN}-cli ${PN}-genl ${PN}-idiag ${PN}-nf ${PN}-route ${PN}-xfrm" +FILES_${PN}-cli = "${libdir}/libnl-cli-3.so.* \ + ${libdir}/libnl/cli/*/*.so \ + ${bindir}/genl-ctrl-list \ + ${bindir}/idiag-socket-details \ + ${bindir}/nf-* \ + ${bindir}/nl-*" +FILES_${PN}-genl = "${libdir}/libnl-genl-3.so.* \ + ${libdir}/libnl-genl.so.*" +FILES_${PN}-idiag = "${libdir}/libnl-idiag-3.so.*" +FILES_${PN}-nf = "${libdir}/libnl-nf-3.so.*" +FILES_${PN}-route = "${libdir}/libnl-route-3.so.*" +FILES_${PN}-xfrm = "${libdir}/libnl-xfrm-3.so.*" +RREPLACES_${PN}-genl = "libnl-genl2" +RCONFLICTS_${PN}-genl = "libnl-genl2" diff --git a/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre_8.38.bb b/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre_8.39.bb index 384c2fe79..2d4668b52 100644 --- a/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre_8.38.bb +++ b/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre_8.39.bb @@ -6,7 +6,7 @@ SUMMARY = "Perl Compatible Regular Expressions" HOMEPAGE = "http://www.pcre.org" SECTION = "devel" LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://LICENCE;md5=7e4937814aee14758c1c95b59c80c44d" +LIC_FILES_CHKSUM = "file://LICENCE;md5=b8221cbf43c5587f90ccf228f1185cc2" SRC_URI = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-${PV}.tar.bz2 \ file://pcre-cross.patch \ file://fix-pcre-name-collision.patch \ @@ -14,8 +14,8 @@ SRC_URI = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-${PV}.tar. file://Makefile \ " -SRC_URI[md5sum] = "00aabbfe56d5a48b270f999b508c5ad2" -SRC_URI[sha256sum] = "b9e02d36e23024d6c02a2e5b25204b3a4fa6ade43e0a5f869f254f49535079df" +SRC_URI[md5sum] = "e3fca7650a0556a2647821679d81f585" +SRC_URI[sha256sum] = "b858099f82483031ee02092711689e7245586ada49e534a06e678b8ea9549e8b" S = "${WORKDIR}/pcre-${PV}" @@ -48,6 +48,8 @@ BUILD_CFLAGS =+ "-DLINK_SIZE=2 -I${B}" CFLAGS += "-D_REENTRANT" CXXFLAGS_append_powerpc = " -lstdc++" +export CCLD_FOR_BUILD ="${BUILD_CCLD}" + PACKAGES =+ "libpcrecpp libpcreposix pcregrep pcregrep-doc pcretest pcretest-doc" SUMMARY_libpcrecpp = "${SUMMARY} - C++ wrapper functions" diff --git a/import-layers/yocto-poky/meta/recipes-support/libproxy/libproxy/0001-test-Include-sys-select.h-for-select.patch b/import-layers/yocto-poky/meta/recipes-support/libproxy/libproxy/0001-test-Include-sys-select.h-for-select.patch deleted file mode 100644 index 5ae52f2d4..000000000 --- a/import-layers/yocto-poky/meta/recipes-support/libproxy/libproxy/0001-test-Include-sys-select.h-for-select.patch +++ /dev/null @@ -1,37 +0,0 @@ -From f5f2c2289eb35eb804c1c35e46ca41b58e4cae01 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 6 Apr 2015 14:13:49 -0700 -Subject: [PATCH] test: Include <sys/select.h> for select() - -As per posix we need to include this file otherwise we end up with errors like - -/home/kraj/work/bleeding/openembedded-core/build/tmp-musl/work/mips32r2-oe-linux-musl/libproxy/0.4.11-r0/libproxy-0.4.11/libproxy/test/get-pac-test.cpp: In member function 'bool TestServer::loop()': -/home/kraj/work/bleeding/openembedded-core/build/tmp-musl/work/mips32r2-oe-linux-musl/libproxy/0.4.11-r0/libproxy-0.4.11/libproxy/test/get-pac-test.cpp:80:4: error: 'fd_set' was not declared in this scope - fd_set fds; - ^ -/home/kraj/work/bleeding/openembedded-core/build/tmp-musl/work/mips32r2-oe-linux-musl/libproxy/0.4.11-r0/libproxy-0.4.11/libproxy/test/get-pac-test.cpp:89:14: error: 'fds' was not declared in this scope - FD_ZERO (&fds); -<JIRA TICKET #1>, <JIRA TICKET #2>, <JIRA TICKET #n> : <one line summary of change> - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - libproxy/test/get-pac-test.cpp | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/libproxy/test/get-pac-test.cpp b/libproxy/test/get-pac-test.cpp -index a61fc4b..bda4646 100644 ---- a/libproxy/test/get-pac-test.cpp -+++ b/libproxy/test/get-pac-test.cpp -@@ -3,6 +3,7 @@ - #include <sstream> - #include <string> - -+#include <sys/select.h> - #include <sys/socket.h> - #include <netinet/in.h> - #include <arpa/inet.h> --- -2.1.4 - diff --git a/import-layers/yocto-poky/meta/recipes-support/libproxy/libproxy_0.4.11.bb b/import-layers/yocto-poky/meta/recipes-support/libproxy/libproxy_0.4.13.bb index 8cc90bb8e..3940e228d 100644 --- a/import-layers/yocto-poky/meta/recipes-support/libproxy/libproxy_0.4.11.bb +++ b/import-layers/yocto-poky/meta/recipes-support/libproxy/libproxy_0.4.13.bb @@ -1,6 +1,6 @@ SUMMARY = "Library providing automatic proxy configuration management" -HOMEPAGE = "http://code.google.com/p/libproxy/" -BUGTRACKER = "http://code.google.com/p/libproxy/issues/list" +HOMEPAGE = "https://github.com/libproxy/libproxy" +BUGTRACKER = "https://github.com/libproxy/libproxy/issues" SECTION = "libs" LICENSE = "LGPLv2.1+" LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \ @@ -8,12 +8,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \ DEPENDS = "glib-2.0" -SRC_URI = "${DEBIAN_MIRROR}/main/libp/${BPN}/${BPN}_${PV}.orig.tar.gz \ - file://0001-test-Include-sys-select.h-for-select.patch \ - " +SRC_URI = "https://github.com/${BPN}/${BPN}/archive/${PV}.tar.gz" -SRC_URI[md5sum] = "3cd1ae2a4abecf44b3f24d6639d2cd84" -SRC_URI[sha256sum] = "dc3f33de54163718f82b3e7c496a7de97f8862578414b8ecaad3cbfe4821864b" +UPSTREAM_CHECK_URI = "https://github.com/libproxy/libproxy/releases" + +SRC_URI[md5sum] = "de293bb311f185a2ffa3492700a694c2" +SRC_URI[sha256sum] = "d610bc0ef81a18ba418d759c5f4f87bf7102229a9153fb397d7d490987330ffd" inherit cmake pkgconfig diff --git a/import-layers/yocto-poky/meta/recipes-support/libsoup/libsoup-2.4_2.52.2.bb b/import-layers/yocto-poky/meta/recipes-support/libsoup/libsoup-2.4_2.54.1.bb index f6e3db2c9..b93a9fde7 100644 --- a/import-layers/yocto-poky/meta/recipes-support/libsoup/libsoup-2.4_2.52.2.bb +++ b/import-layers/yocto-poky/meta/recipes-support/libsoup/libsoup-2.4_2.54.1.bb @@ -11,16 +11,17 @@ SHRT_VER = "${@d.getVar('PV', True).split('.')[0]}.${@d.getVar('PV', True).split SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz" -SRC_URI[md5sum] = "e4757d09012ed93822b1ee41435fec24" -SRC_URI[sha256sum] = "db55628b5c7d952945bb71b236469057c8dfb8dea0c271513579c6273c2093dc" +SRC_URI[md5sum] = "73b1fb774de16c29b380f87016f9f9dd" +SRC_URI[sha256sum] = "47b42c232034734d66e5f093025843a5d8cc4b2357c011085a2fd04ef02dd633" S = "${WORKDIR}/libsoup-${PV}" -inherit autotools gettext pkgconfig upstream-version-is-even gobject-introspection +inherit autotools gettext pkgconfig upstream-version-is-even gobject-introspection gtk-doc # libsoup-gnome is entirely deprecated and just stubs in 2.42 onwards. Disable by default. PACKAGECONFIG ??= "" PACKAGECONFIG[gnome] = "--with-gnome,--without-gnome" +PACKAGECONFIG[gssapi] = "--with-gssapi,--without-gssapi,krb5" EXTRA_OECONF = "--disable-vala" diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-Invalid-dwarf-opcodes-can-cause-references-beyond-th.patch b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-Invalid-dwarf-opcodes-can-cause-references-beyond-th.patch deleted file mode 100644 index af972f84e..000000000 --- a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-Invalid-dwarf-opcodes-can-cause-references-beyond-th.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 396b6c7ab737e2bff244d640601c436a26260ca1 Mon Sep 17 00:00:00 2001 -From: Arun Sharma <arun@sharma-home.net> -Date: Fri, 19 Jun 2015 19:47:22 -0700 -Subject: [PATCH] Invalid dwarf opcodes can cause references beyond the end of - the array. - -Upstream-Status: backport - -Signed-off-by: Li Zhou <li.zhou@windriver.com> ---- - include/dwarf_i.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/include/dwarf_i.h b/include/dwarf_i.h -index 1e6231e..4a02a7d 100644 ---- a/include/dwarf_i.h -+++ b/include/dwarf_i.h -@@ -20,7 +20,7 @@ - extern const uint8_t dwarf_to_unw_regnum_map[DWARF_REGNUM_MAP_LENGTH]; - /* REG is evaluated multiple times; it better be side-effects free! */ - # define dwarf_to_unw_regnum(reg) \ -- (((reg) <= DWARF_REGNUM_MAP_LENGTH) ? dwarf_to_unw_regnum_map[reg] : 0) -+ (((reg) < DWARF_REGNUM_MAP_LENGTH) ? dwarf_to_unw_regnum_map[reg] : 0) - #endif - - #ifdef UNW_LOCAL_ONLY --- -1.7.9.5 - diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-disable-tests.patch b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-disable-tests.patch deleted file mode 100644 index 7309ffd86..000000000 --- a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-disable-tests.patch +++ /dev/null @@ -1,31 +0,0 @@ -From b07435a90bd636ee718e2238fb46c74a6dd5e069 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Tue, 22 Mar 2016 16:41:13 +0000 -Subject: [PATCH] disable tests - -Tests use getcontext() API which is -not there on musl - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Inappropriate [MUSL-only] - - Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile.am b/Makefile.am -index e24fe1e..15380e4 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -39,7 +39,7 @@ endif - - nodist_include_HEADERS = include/libunwind-common.h - --SUBDIRS = src tests doc -+SUBDIRS = src doc - - noinst_HEADERS = include/dwarf.h include/dwarf_i.h include/dwarf-eh.h \ - include/compiler.h include/libunwind_i.h include/mempool.h \ --- -1.8.3.1 - diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/AArch64-port.patch b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/AArch64-port.patch deleted file mode 100644 index 228ec322d..000000000 --- a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/AArch64-port.patch +++ /dev/null @@ -1,2529 +0,0 @@ -From ac6c0a6535975f1dc2da6e4e2766614baac2a14a Mon Sep 17 00:00:00 2001 -From: Yvan Roux <yvan.roux@linaro.org> -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 <davidm@hpl.hp.com> -+ 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 <tt.rantala@gmail.com> -+ 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 <davidm@hpl.hp.com> -+ 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 <tt.rantala@gmail.com> -+ 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 <tt.rantala@gmail.com> -+ 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 <tt.rantala@gmail.com> -+ 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 <tt.rantala@gmail.com> -+ 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 <tt.rantala@gmail.com> -+ 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 <tt.rantala@gmail.com> -+ 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 <tt.rantala@gmail.com> -+ -+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 <tt.rantala@gmail.com> -+ -+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 <tt.rantala@gmail.com> -+ 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 <tt.rantala@gmail.com> -+ 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 <davidm@hpl.hp.com> -+ 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 diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch deleted file mode 100644 index dc0f5c1b4..000000000 --- a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch +++ /dev/null @@ -1,28 +0,0 @@ -Fix test case link failure on PowerPC systems with Altivec - -Upstream-Status:backport - -On systems where the system compiler supports Altivec by default, -the libunwind Makefile will attempt to build an extra test case -ppc64-test-altivec. Unfortunately, the link step will fail since -the Makefile does not actually link against the libunwind library. - -Fixed by adding the appropriate LDADD macro. - -Signed-off-by: Ulrich Weigand <address@hidden> ---- - tests/Makefile.am | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/tests/Makefile.am b/tests/Makefile.am -index 0e30536..9c76628 100644 ---- a/tests/Makefile.am -+++ b/tests/Makefile.am -@@ -201,3 +201,4 @@ Lia64_test_rbs_LDADD = $(LIBUNWIND_local) - Lia64_test_readonly_LDADD = $(LIBUNWIND_local) - ia64_test_dyn1_LDADD = $(LIBUNWIND) - ia64_test_sig_LDADD = $(LIBUNWIND) -+ppc64_test_altivec_LDADD = $(LIBUNWIND) --- -1.8.5 - diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch deleted file mode 100644 index 0e55c91b8..000000000 --- a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 508ca17a7be01d1cc960d9a07d0af4513948fb8d Mon Sep 17 00:00:00 2001 -From: Thierry Reding <treding@nvidia.com> -Date: Fri, 27 Jun 2014 08:40:33 +0200 -Subject: [PATCH] Link libunwind to libgcc_s rather than libgcc - -For some architectures, -lgcc and -lgcc_s are not equivalent. On ARM for -example, libgcc_s.so.1 contains some symbols needed by libunwind which -are not present in libgcc. - -This causes the following link error when building the X.Org X server -with libunwind support: - - CCLD Xorg - /usr/lib/libunwind.so: undefined reference to `__aeabi_unwind_cpp_pr0' - /usr/lib/libunwind.so: undefined reference to `__aeabi_unwind_cpp_pr1' - -Linking against libgcc_s explicitly solves this problem. - -Upstream-Status: Backport - -Signed-off-by: Thierry Reding <treding@nvidia.com> -Signed-off-by: Jonathan Liu <net147@gmail.com> ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index cffe19b..3beb5f2 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -258,7 +258,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[#ifndef __INTEL_COMPILER - - if test x$GCC = xyes -a x$intel_compiler != xyes; then - CFLAGS="${CFLAGS} -fexceptions -Wall -Wsign-compare" -- LIBCRTS="-lgcc" -+ LIBCRTS="-lgcc_s" - fi - AC_MSG_RESULT([$intel_compiler]) - --- -2.3.2 - diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Support-building-with-older-compilers.patch b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Support-building-with-older-compilers.patch deleted file mode 100644 index 268b702dc..000000000 --- a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Support-building-with-older-compilers.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 10b064ffe902d5af31bb49bd8e4f03c545f8d462 Mon Sep 17 00:00:00 2001 -From: Ladislav Michl <ladis@linux-mips.org> -Date: Tue, 13 Nov 2012 11:19:47 +0100 -Subject: [PATCH] Support building with older compilers. - -Add a check for __builtin_unreachable. - -Upstream-Status: Pending ---- - configure.ac | 11 +++++++++++ - include/libunwind_i.h | 6 ++++++ - src/arm/Gresume.c | 2 +- - src/sh/Gresume.c | 2 +- - 4 files changed, 19 insertions(+), 2 deletions(-) - ---- a/configure.ac -+++ b/configure.ac -@@ -285,6 +285,17 @@ if test x$have__builtin___clear_cache = - fi - AC_MSG_RESULT([$have__builtin___clear_cache]) - -+AC_MSG_CHECKING([for __builtin_unreachable]) -+AC_LINK_IFELSE( -+ [AC_LANG_PROGRAM([[]], [[__builtin_unreachable()]])], -+ [have__builtin_unreachable=yes], -+ [have__builtin_unreachable=no]) -+if test x$have__builtin_unreachable = xyes; then -+ AC_DEFINE([HAVE__BUILTIN_UNREACHABLE], [1], -+ [Defined if __builtin_unreachable() is available]) -+fi -+AC_MSG_RESULT([$have__builtin_unreachable]) -+ - AC_MSG_CHECKING([for __sync atomics]) - AC_LINK_IFELSE( - [AC_LANG_PROGRAM([[]], [[ ---- a/include/libunwind_i.h -+++ b/include/libunwind_i.h -@@ -72,6 +72,12 @@ WITH THE SOFTWARE OR THE USE OR OTHER DE - # endif - #endif - -+#if defined(HAVE__BUILTIN_UNREACHABLE) -+# define unreachable() __builtin_unreachable() -+#else -+# define unreachable() do { } while (1) -+#endif -+ - #ifdef DEBUG - # define UNW_DEBUG 1 - #else ---- a/src/arm/Gresume.c -+++ b/src/arm/Gresume.c -@@ -96,7 +96,7 @@ arm_local_resume (unw_addr_space_t as, u - : : "r" (c->sigcontext_sp), "r" (c->sigcontext_pc) - ); - } -- __builtin_unreachable(); -+ unreachable(); - #else - printf ("%s: implement me\n", __FUNCTION__); - #endif ---- a/src/sh/Gresume.c -+++ b/src/sh/Gresume.c -@@ -109,7 +109,7 @@ sh_local_resume (unw_addr_space_t as, un - "r" (c->sigcontext_pc) - ); - } -- __builtin_unreachable(); -+ unreachable(); - #endif - return -UNW_EINVAL; - } diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind.inc b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind.inc index 1c342d392..e4ae8df27 100644 --- a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind.inc +++ b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind.inc @@ -18,15 +18,6 @@ ATOMICOPS_armv5 = "-DAO_USE_PTHREAD_DEFS=1" ATOMICOPS_armv4 = "-DAO_USE_PTHREAD_DEFS=1" ATOMICOPS ?= "" -LDFLAGS_append_x86 = " -fuse-ld=gold" -LDFLAGS_append_x86-64 = " -fuse-ld=gold" - -LDFLAGS_append_arm = " -fuse-ld=gold" -LDFLAGS_append_aarch64 = " -fuse-ld=gold" - -LDFLAGS_append_powerpc = " -fuse-ld=gold -mbss-plt" -LDFLAGS_append_powerpc64 = " -fuse-ld=gold -mbss-plt" - SECURITY_LDFLAGS_append_libc-musl = " -lssp_nonshared -lssp" BBCLASSEXTEND = "native" diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-Fix-build-on-mips-musl.patch b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/0001-Fix-build-on-mips-musl.patch index 5426fcc5c..8bcc252ba 100644 --- a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-Fix-build-on-mips-musl.patch +++ b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/0001-Fix-build-on-mips-musl.patch @@ -15,23 +15,17 @@ Upstream-Status: Pending src/mips/getcontext.S | 3 +-- 2 files changed, 35 insertions(+), 2 deletions(-) -diff --git a/src/coredump/_UCD_internal.h b/src/coredump/_UCD_internal.h -index 3c95a2a..80acc15 100644 ---- a/src/coredump/_UCD_internal.h -+++ b/src/coredump/_UCD_internal.h -@@ -34,6 +34,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - #ifdef HAVE_SYS_PROCFS_H - #include <sys/procfs.h> /* struct elf_prstatus */ - #endif -+#include <sys/reg.h> - #include <errno.h> - #include <string.h> - #include <limits.h> -@@ -44,6 +45,39 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +Index: git/src/coredump/_UCD_internal.h +=================================================================== +--- git.orig/src/coredump/_UCD_internal.h ++++ git/src/coredump/_UCD_internal.h +@@ -44,6 +44,41 @@ WITH THE SOFTWARE OR THE USE OR OTHER DE #include "libunwind_i.h" +#ifndef __GLIBC__ ++#include <sys/reg.h> ++ +#define EF_REG0 6 +#define EF_REG1 7 +#define EF_REG2 8 @@ -67,11 +61,11 @@ index 3c95a2a..80acc15 100644 #if SIZEOF_OFF_T == 4 typedef uint32_t uoff_t; -diff --git a/src/mips/getcontext.S b/src/mips/getcontext.S -index d1dbd57..de9b681 100644 ---- a/src/mips/getcontext.S -+++ b/src/mips/getcontext.S -@@ -24,12 +24,11 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +Index: git/src/mips/getcontext.S +=================================================================== +--- git.orig/src/mips/getcontext.S ++++ git/src/mips/getcontext.S +@@ -24,12 +24,11 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "offsets.h" @@ -85,6 +79,3 @@ index d1dbd57..de9b681 100644 # define OFFSET 4 # else # define OFFSET 0 --- -1.8.3.1 - diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/0001-add-knobs-to-disable-enable-tests.patch b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/0001-add-knobs-to-disable-enable-tests.patch new file mode 100644 index 000000000..673a5bb99 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/0001-add-knobs-to-disable-enable-tests.patch @@ -0,0 +1,69 @@ +From 459e471fcc33d300f7bbcdaf3e0dc338d9dc15b9 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 30 Apr 2016 16:56:34 +0000 +Subject: [PATCH] add knobs to disable/enable tests + +Some tests do not compile on musl libc +in general its good to have such a knob +since not all builds may want to enable +tests + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + Makefile.am | 6 +++++- + configure.ac | 12 ++++++++++-- + 2 files changed, 15 insertions(+), 3 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 6a3ed9e..0c29b3e 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -42,7 +42,11 @@ endif + + nodist_include_HEADERS = include/libunwind-common.h + +-SUBDIRS = src tests ++SUBDIRS = src ++ ++if CONFIG_TESTS ++SUBDIRS += tests ++endif + + if CONFIG_DOCS + SUBDIRS += doc +diff --git a/configure.ac b/configure.ac +index 85d78f8..d362387 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -129,6 +129,10 @@ AC_ARG_ENABLE(documentation, + AS_HELP_STRING([--disable-documentation],[Disable generating the man pages]),, + [enable_documentation=yes]) + ++AC_ARG_ENABLE(tests, ++ AS_HELP_STRING([--disable-tests],[Disable building tests]),, ++ [enable_tests=yes]) ++ + AC_MSG_CHECKING([if we should build libunwind-setjmp]) + AC_MSG_RESULT([$enable_setjmp]) + +@@ -395,9 +399,13 @@ AM_CONDITIONAL([CONFIG_DOCS], [test x$enable_documentation = xyes]) + if test "x$enable_documentation" = "xyes"; then + AC_CONFIG_FILES(doc/Makefile doc/common.tex) + fi ++AM_CONDITIONAL([CONFIG_TESTS], [test x$enable_tests = xyes]) ++if test "x$enable_tests" = "xyes"; then ++ AC_CONFIG_FILES(tests/Makefile tests/check-namespace.sh) ++fi ++ + +-AC_CONFIG_FILES(Makefile src/Makefile tests/Makefile tests/check-namespace.sh +- include/libunwind-common.h ++AC_CONFIG_FILES(Makefile src/Makefile include/libunwind-common.h + include/libunwind.h include/tdep/libunwind_i.h) + AC_CONFIG_FILES(src/unwind/libunwind.pc src/coredump/libunwind-coredump.pc + src/ptrace/libunwind-ptrace.pc src/setjmp/libunwind-setjmp.pc +-- +1.8.3.1 + diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-backtrace-Use-only-with-glibc-and-uclibc.patch b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/0001-backtrace-Use-only-with-glibc-and-uclibc.patch index 9aed419a1..9aed419a1 100644 --- a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-backtrace-Use-only-with-glibc-and-uclibc.patch +++ b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/0001-backtrace-Use-only-with-glibc-and-uclibc.patch diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/0001-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/0001-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch new file mode 100644 index 000000000..ca0641f5a --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/0001-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch @@ -0,0 +1,248 @@ +From e0eea53c77fce8537c58a072b684043507987bcc Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 9 Jul 2016 01:07:53 +0000 +Subject: [PATCH] ppc32: Consider ucontext mismatches between glibc and musl + +This helps in porting libunwind onto musl based systems +ptrace.h change is required again an error that surfaces +with musl + +/mnt/oe/openembedded-core/build/tmp-musl/sysroots/qemuppc/usr/include/asm/ptrace.h:31:8: error: redefinition of 'struct pt_regs' + struct pt_regs { + ^~~~~~~ +In file included from /mnt/oe/openembedded-core/build/tmp-musl/sysroots/qemuppc/usr/include/sys/user.h:11:0, + from /mnt/oe/openembedded-core/build/tmp-musl/sysroots/qemuppc/usr/include/sys/procfs.h:9, + from ../../git/src/ptrace/_UPT_internal.h:40, + from ../../git/src/ptrace/_UPT_reg_offset.c:27: +/mnt/oe/openembedded-core/build/tmp-musl/sysroots/qemuppc/usr/include/bits/user.h:1:8: note: originally defined here + struct pt_regs { + ^~~~~~~ + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + src/ppc32/Ginit.c | 6 +- + src/ppc32/ucontext_i.h | 158 ++++++++++++++++++++++--------------------- + src/ptrace/_UPT_reg_offset.c | 7 ++ + 3 files changed, 92 insertions(+), 79 deletions(-) + +diff --git a/src/ppc32/Ginit.c b/src/ppc32/Ginit.c +index f2e6e82..617aaa1 100644 +--- a/src/ppc32/Ginit.c ++++ b/src/ppc32/Ginit.c +@@ -48,12 +48,12 @@ uc_addr (ucontext_t *uc, int reg) + void *addr; + + if ((unsigned) (reg - UNW_PPC32_R0) < 32) +- addr = &uc->uc_mcontext.uc_regs->gregs[reg - UNW_PPC32_R0]; ++ addr = &uc->GET_UC_REGS->gregs[reg - UNW_PPC32_R0]; + + else + if ( ((unsigned) (reg - UNW_PPC32_F0) < 32) && + ((unsigned) (reg - UNW_PPC32_F0) >= 0) ) +- addr = &uc->uc_mcontext.uc_regs->fpregs.fpregs[reg - UNW_PPC32_F0]; ++ addr = &uc->GET_UC_REGS->fpregs.fpregs[reg - UNW_PPC32_F0]; + + else + { +@@ -76,7 +76,7 @@ uc_addr (ucontext_t *uc, int reg) + default: + return NULL; + } +- addr = &uc->uc_mcontext.uc_regs->gregs[gregs_idx]; ++ addr = &uc->GET_UC_REGS->gregs[gregs_idx]; + } + return addr; + } +diff --git a/src/ppc32/ucontext_i.h b/src/ppc32/ucontext_i.h +index c6ba806..b79f15c 100644 +--- a/src/ppc32/ucontext_i.h ++++ b/src/ppc32/ucontext_i.h +@@ -46,83 +46,89 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ + various structure members. */ + static ucontext_t dmy_ctxt UNUSED; + +-#define UC_MCONTEXT_GREGS_R0 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[0] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_R1 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[1] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_R2 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[2] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_R3 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[3] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_R4 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[4] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_R5 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[5] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_R6 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[6] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_R7 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[7] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_R8 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[8] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_R9 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[9] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_R10 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[10] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_R11 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[11] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_R12 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[12] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_R13 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[13] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_R14 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[14] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_R15 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[15] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_R16 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[16] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_R17 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[17] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_R18 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[18] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_R19 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[19] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_R20 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[20] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_R21 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[21] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_R22 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[22] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_R23 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[23] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_R24 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[24] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_R25 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[25] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_R26 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[26] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_R27 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[27] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_R28 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[28] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_R29 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[29] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_R30 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[30] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_R31 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[31] - (void *)&dmy_ctxt) ++#ifdef __GLIBC__ ++#define GET_UC_REGS uc_mcontext.uc_regs ++#else ++#define GET_UC_REGS uc_regs ++#endif ++ ++#define UC_MCONTEXT_GREGS_R0 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[0] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_R1 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[1] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_R2 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[2] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_R3 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[3] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_R4 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[4] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_R5 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[5] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_R6 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[6] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_R7 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[7] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_R8 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[8] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_R9 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[9] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_R10 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[10] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_R11 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[11] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_R12 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[12] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_R13 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[13] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_R14 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[14] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_R15 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[15] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_R16 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[16] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_R17 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[17] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_R18 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[18] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_R19 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[19] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_R20 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[20] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_R21 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[21] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_R22 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[22] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_R23 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[23] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_R24 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[24] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_R25 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[25] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_R26 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[26] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_R27 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[27] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_R28 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[28] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_R29 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[29] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_R30 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[30] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_R31 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[31] - (void *)&dmy_ctxt) + +-#define UC_MCONTEXT_GREGS_MSR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[MSR_IDX] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_ORIG_GPR3 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[ORIG_GPR3_IDX] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_CTR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[CTR_IDX] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_LINK ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[LINK_IDX] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_XER ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[XER_IDX] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_CCR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[CCR_IDX] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_SOFTE ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[SOFTE_IDX] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_TRAP ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[TRAP_IDX] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_DAR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[DAR_IDX] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_DSISR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[DSISR_IDX] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_GREGS_RESULT ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[RESULT_IDX] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_MSR ((void *)&dmy_ctxt.GET_UC_REGS->gregs[MSR_IDX] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_ORIG_GPR3 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[ORIG_GPR3_IDX] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_CTR ((void *)&dmy_ctxt.GET_UC_REGS->gregs[CTR_IDX] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_LINK ((void *)&dmy_ctxt.GET_UC_REGS->gregs[LINK_IDX] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_XER ((void *)&dmy_ctxt.GET_UC_REGS->gregs[XER_IDX] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_CCR ((void *)&dmy_ctxt.GET_UC_REGS->gregs[CCR_IDX] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_SOFTE ((void *)&dmy_ctxt.GET_UC_REGS->gregs[SOFTE_IDX] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_TRAP ((void *)&dmy_ctxt.GET_UC_REGS->gregs[TRAP_IDX] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_DAR ((void *)&dmy_ctxt.GET_UC_REGS->gregs[DAR_IDX] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_DSISR ((void *)&dmy_ctxt.GET_UC_REGS->gregs[DSISR_IDX] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_GREGS_RESULT ((void *)&dmy_ctxt.GET_UC_REGS->gregs[RESULT_IDX] - (void *)&dmy_ctxt) + +-#define UC_MCONTEXT_FREGS_R0 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[0] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_FREGS_R1 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[1] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_FREGS_R2 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[2] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_FREGS_R3 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[3] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_FREGS_R4 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[4] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_FREGS_R5 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[5] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_FREGS_R6 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[6] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_FREGS_R7 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[7] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_FREGS_R8 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[8] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_FREGS_R9 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[9] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_FREGS_R10 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[10] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_FREGS_R11 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[11] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_FREGS_R12 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[12] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_FREGS_R13 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[13] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_FREGS_R14 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[14] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_FREGS_R15 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[15] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_FREGS_R16 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[16] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_FREGS_R17 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[17] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_FREGS_R18 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[18] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_FREGS_R19 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[19] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_FREGS_R20 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[20] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_FREGS_R21 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[21] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_FREGS_R22 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[22] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_FREGS_R23 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[23] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_FREGS_R24 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[24] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_FREGS_R25 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[25] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_FREGS_R26 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[26] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_FREGS_R27 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[27] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_FREGS_R28 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[28] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_FREGS_R29 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[29] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_FREGS_R30 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[30] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_FREGS_R31 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[31] - (void *)&dmy_ctxt) +-#define UC_MCONTEXT_FREGS_FPSCR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[32] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_FREGS_R0 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[0] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_FREGS_R1 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[1] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_FREGS_R2 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[2] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_FREGS_R3 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[3] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_FREGS_R4 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[4] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_FREGS_R5 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[5] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_FREGS_R6 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[6] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_FREGS_R7 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[7] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_FREGS_R8 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[8] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_FREGS_R9 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[9] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_FREGS_R10 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[10] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_FREGS_R11 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[11] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_FREGS_R12 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[12] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_FREGS_R13 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[13] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_FREGS_R14 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[14] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_FREGS_R15 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[15] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_FREGS_R16 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[16] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_FREGS_R17 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[17] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_FREGS_R18 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[18] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_FREGS_R19 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[19] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_FREGS_R20 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[20] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_FREGS_R21 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[21] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_FREGS_R22 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[22] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_FREGS_R23 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[23] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_FREGS_R24 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[24] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_FREGS_R25 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[25] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_FREGS_R26 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[26] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_FREGS_R27 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[27] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_FREGS_R28 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[28] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_FREGS_R29 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[29] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_FREGS_R30 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[30] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_FREGS_R31 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[31] - (void *)&dmy_ctxt) ++#define UC_MCONTEXT_FREGS_FPSCR ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[32] - (void *)&dmy_ctxt) + + #endif +diff --git a/src/ptrace/_UPT_reg_offset.c b/src/ptrace/_UPT_reg_offset.c +index 68461a2..fcc43f7 100644 +--- a/src/ptrace/_UPT_reg_offset.c ++++ b/src/ptrace/_UPT_reg_offset.c +@@ -27,6 +27,13 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ + #include "_UPT_internal.h" + + #include <stddef.h> ++#if !defined(__GLIBC__) ++# define pt_regs uapi_pt_regs ++#endif ++#include <asm/ptrace.h> ++#if !defined(__GLIBC__) ++# undef pt_regs ++#endif + + #ifdef HAVE_ASM_PTRACE_OFFSETS_H + # include <asm/ptrace_offsets.h> +-- +1.8.3.1 + diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-x86-Stub-out-x86_local_resume.patch b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/0001-x86-Stub-out-x86_local_resume.patch index 371013aaa..371013aaa 100644 --- a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-x86-Stub-out-x86_local_resume.patch +++ b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/0001-x86-Stub-out-x86_local_resume.patch diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch index 0dff2c86d..0dff2c86d 100644 --- a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch +++ b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/musl-header-conflict.patch b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/musl-header-conflict.patch new file mode 100644 index 000000000..79f63fd84 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/musl-header-conflict.patch @@ -0,0 +1,37 @@ +If you: + +TCLIBC=musl bitbake unwind +TCLIBC=musl bitbake gcc-runtime -c cleansstate +TCLIBC=musl bitbake gcc-runtime + +you will see libstdc++ fail to build due to finding libunwind's header file. + +Khem: "When we build any of gcc components they expect to use internal version +and that works with glibc based gcc since the search headers first look into gcc +headers, however with musl the gcc headers are searched after the standard +headers ( which is by design the right thing )." + +This patch hacks around the issue by looking for a define used during gcc-runtime's +build and skipping to the internal header in that case. + +[YOCTO #10129] + +RP 2016/8/18 + +Upstream-Status: Inappropriate [really need to fix gcc] + +Index: git/include/unwind.h +=================================================================== +--- git.orig/include/unwind.h ++++ git/include/unwind.h +@@ -23,6 +23,10 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER L + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ + ++#ifdef _GLIBCXX_SHARED ++#include_next <unwind.h> ++#endif ++ + #ifndef _UNWIND_H + #define _UNWIND_H + diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind_1.1.bb b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind_1.1.bb deleted file mode 100644 index aff84092a..000000000 --- a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind_1.1.bb +++ /dev/null @@ -1,22 +0,0 @@ -require libunwind.inc - -SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \ - file://Support-building-with-older-compilers.patch \ - file://AArch64-port.patch \ - file://Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch \ - file://Link-libunwind-to-libgcc_s-rather-than-libgcc.patch \ - file://0001-Invalid-dwarf-opcodes-can-cause-references-beyond-th.patch \ - file://Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch \ - file://0001-backtrace-Use-only-with-glibc-and-uclibc.patch \ -" -SRC_URI_append_libc-musl = "\ - file://0001-x86-Stub-out-x86_local_resume.patch \ - file://0001-disable-tests.patch \ - file://0001-Fix-build-on-mips-musl.patch \ -" -SRC_URI[md5sum] = "fb4ea2f6fbbe45bf032cd36e586883ce" -SRC_URI[sha256sum] = "9dfe0fcae2a866de9d3942c66995e4b460230446887dbdab302d41a8aee8d09a" - -# http://errors.yoctoproject.org/Errors/Details/20487/ -ARM_INSTRUCTION_SET_armv4 = "arm" -ARM_INSTRUCTION_SET_armv5 = "arm" diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind_git.bb b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind_git.bb new file mode 100644 index 000000000..424943087 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind_git.bb @@ -0,0 +1,29 @@ +require libunwind.inc + +PV = "1.1+git${SRCPV}" + +SRCREV = "bc8698fd7ed13a629a8ec3cb2a89bd74f9d8b5c0" + +SRC_URI = "git://git.sv.gnu.org/libunwind.git \ + file://Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch \ + file://0001-backtrace-Use-only-with-glibc-and-uclibc.patch \ + file://0001-x86-Stub-out-x86_local_resume.patch \ + file://0001-Fix-build-on-mips-musl.patch \ + file://0001-add-knobs-to-disable-enable-tests.patch \ + file://0001-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch \ + " + +SRC_URI_append_libc-musl = " file://musl-header-conflict.patch" +EXTRA_OECONF_append_libc-musl = " --disable-documentation --disable-tests " + +# http://errors.yoctoproject.org/Errors/Details/20487/ +ARM_INSTRUCTION_SET_armv4 = "arm" +ARM_INSTRUCTION_SET_armv5 = "arm" + +# see https://sourceware.org/bugzilla/show_bug.cgi?id=19987 +SECURITY_CFLAGS_remove_aarch64 = "-fpie" +SECURITY_CFLAGS_append_aarch64 = " -fPIE" + +S = "${WORKDIR}/git" + +LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}" diff --git a/import-layers/yocto-poky/meta/recipes-support/liburcu/liburcu_0.9.1.bb b/import-layers/yocto-poky/meta/recipes-support/liburcu/liburcu_0.9.2.bb index aadc32ff7..23fb8c4b4 100644 --- a/import-layers/yocto-poky/meta/recipes-support/liburcu/liburcu_0.9.1.bb +++ b/import-layers/yocto-poky/meta/recipes-support/liburcu/liburcu_0.9.2.bb @@ -13,8 +13,8 @@ SRC_URI = " \ file://0002-Support-for-aarch64_be.patch \ " -SRC_URI[md5sum] = "124eaeea06863271c0bdf2a0cc1d8e4b" -SRC_URI[sha256sum] = "f8d278e9d95bec97c9ba954fc4c3fb584936bc0010713a8fe358b916bafd8715" +SRC_URI[md5sum] = "49f86e68c1e2f41d303381a271b791d1" +SRC_URI[sha256sum] = "8f7fa313b1e0a3f742cea24ce63a39c0efe63e615a769e2961e55bd2663ecaa3" S = "${WORKDIR}/userspace-rcu-${PV}" CFLAGS_append_libc-uclibc = " -D_GNU_SOURCE" diff --git a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/pkgconfig.patch b/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/0001-Use-pkg-config-to-find-gcrypt-and-libxml2.patch index 89d14c944..71867067b 100644 --- a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/pkgconfig.patch +++ b/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/0001-Use-pkg-config-to-find-gcrypt-and-libxml2.patch @@ -1,14 +1,22 @@ -Use pkg-config to find gcrypt and libxml2. +From ed71ac9548a2bb6ecd2dc5ad880c604975f872b0 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Thu, 2 Jun 2016 14:20:04 +0300 +Subject: [PATCH] Use pkg-config to find gcrypt and libxml2. Upstream-Status: Pending [libxml2 is upstreamable] RP 2014/5/22 -Index: libxslt-1.1.28/configure.in -=================================================================== ---- libxslt-1.1.28.orig/configure.in 2014-05-13 16:46:02.278474967 +0000 -+++ libxslt-1.1.28/configure.in 2014-05-13 16:53:56.510472561 +0000 -@@ -376,6 +376,8 @@ +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + configure.in | 70 +++++++++++------------------------------------------------- + 1 file changed, 12 insertions(+), 58 deletions(-) + +diff --git a/configure.in b/configure.in +index 8bdf45a..0b2b312 100644 +--- a/configure.in ++++ b/configure.in +@@ -377,6 +377,8 @@ AC_SUBST(pythondir) AC_SUBST(PYTHON_SUBDIR) AC_SUBST(PYTHON_LIBS) @@ -16,12 +24,12 @@ Index: libxslt-1.1.28/configure.in + AC_ARG_WITH(crypto, [ --with-crypto Add crypto support to exslt (on)]) WITH_CRYPTO=0 - if test "$with_crypto" = "no" ; then -@@ -391,26 +393,13 @@ - WITH_CRYPTO=1 + CRYPTO_TESTDIR= +@@ -394,27 +396,14 @@ case $host in + CRYPTO_TESTDIR=crypto ;; *) -- AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no) +- AC_PATH_TOOL(LIBGCRYPT_CONFIG, libgcrypt-config, no) - if test "$LIBGCRYPT_CONFIG" != "no" ; then - LIBGCRYPT_VERSION=`$LIBGCRYPT_CONFIG --version` - if test VERSION_TO_NUMBER(echo $LIBGCRYPT_VERSION) -lt VERSION_TO_NUMBER(echo "1.1.42") @@ -37,20 +45,21 @@ Index: libxslt-1.1.28/configure.in + PKG_CHECK_MODULES(LIBGCRYPT, [libgcrypt >= 1.1.42], [ + AC_DEFINE(HAVE_GCRYPT, 1, [Define if gcrypt library is available.]) + echo 'Crypto extensions will be available.' - WITH_CRYPTO=1 + WITH_CRYPTO=1 + CRYPTO_TESTDIR=crypto - fi - else - LIBGCRYPT_CFLAGS="" - LIBGCRYPT_LIBS="" - echo 'Crypto extensions will not be available. Install libgcrypt and reconfigure to make available.' - fi -+ ], [ ++ ], [ + echo 'Crypto extensions will not be available. Install libgcrypt >= 1.1.42 and reconfigure to make available.' + ]) esac fi AC_SUBST(WITH_CRYPTO) -@@ -471,24 +460,8 @@ +@@ -476,24 +465,8 @@ dnl original work - Mathieu Lacage 30/03/2000 dnl some tweaking - David Härdeman 30/10/2001 dnl @@ -75,7 +84,7 @@ Index: libxslt-1.1.28/configure.in AC_ARG_WITH(libxml-src, [ --with-libxml-src=[DIR] For libxml thats not installed yet (sets all three above)], LIBXML_SRC="$withval" -@@ -551,28 +524,9 @@ +@@ -556,28 +529,9 @@ then fi fi @@ -107,7 +116,7 @@ Index: libxslt-1.1.28/configure.in AC_SUBST(CFLAGS) AC_SUBST(CPPFLAGS) -@@ -597,7 +551,7 @@ +@@ -602,7 +556,7 @@ fi if test "$with_plugins" = "yes" ; then AC_MSG_CHECKING([libxml2 module support]) @@ -116,3 +125,6 @@ Index: libxslt-1.1.28/configure.in if test "${WITH_MODULES}" = "1"; then AC_MSG_RESULT(yes) else +-- +2.8.1 + diff --git a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/CVE-2015-7995.patch b/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/CVE-2015-7995.patch deleted file mode 100644 index f4113efba..000000000 --- a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/CVE-2015-7995.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 7ca19df892ca22d9314e95d59ce2abdeff46b617 Mon Sep 17 00:00:00 2001 -From: Daniel Veillard <veillard@redhat.com> -Date: Thu, 29 Oct 2015 19:33:23 +0800 -Subject: Fix for type confusion in preprocessing attributes - -CVE-2015-7995 http://www.openwall.com/lists/oss-security/2015/10/27/10 -We need to check that the parent node is an element before dereferencing -its namespace - -Upstream-Status: Backport -CVE: CVE-2015-7995 - -https://git.gnome.org/browse/libxslt/commit/?id=7ca19df892ca22d9314e95d59ce2abdeff46b617 - -Signed-off-by: Armin Kuster <akuster@mvista.com> - ---- - libxslt/preproc.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -Index: libxslt-1.1.28/libxslt/preproc.c -=================================================================== ---- libxslt-1.1.28.orig/libxslt/preproc.c -+++ libxslt-1.1.28/libxslt/preproc.c -@@ -2245,7 +2245,8 @@ xsltStylePreCompute(xsltStylesheetPtr st - } else if (IS_XSLT_NAME(inst, "attribute")) { - xmlNodePtr parent = inst->parent; - -- if ((parent == NULL) || (parent->ns == NULL) || -+ if ((parent == NULL) || -+ (parent->type != XML_ELEMENT_NODE) || (parent->ns == NULL) || - ((parent->ns != inst->ns) && - (!xmlStrEqual(parent->ns->href, inst->ns->href))) || - (!xmlStrEqual(parent->name, BAD_CAST "attribute-set"))) { diff --git a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt_1.1.28.bb b/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt_1.1.29.bb index 23ac599de..be747e608 100644 --- a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt_1.1.28.bb +++ b/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt_1.1.29.bb @@ -10,11 +10,11 @@ DEPENDS = "libxml2" SRC_URI = "ftp://xmlsoft.org/libxslt/libxslt-${PV}.tar.gz \ file://pkgconfig_fix.patch \ - file://pkgconfig.patch \ - file://CVE-2015-7995.patch" + file://0001-Use-pkg-config-to-find-gcrypt-and-libxml2.patch \ + " -SRC_URI[md5sum] = "9667bf6f9310b957254fdcf6596600b7" -SRC_URI[sha256sum] = "5fc7151a57b89c03d7b825df5a0fae0a8d5f05674c0e7cf2937ecec4d54a028c" +SRC_URI[md5sum] = "a129d3c44c022de3b9dcf6d6f288d72e" +SRC_URI[sha256sum] = "b5976e3857837e7617b29f2249ebb5eeac34e249208d31f1fbf7a6ba7a4090ce" UPSTREAM_CHECK_REGEX = "libxslt-(?P<pver>\d+(\.\d+)+)\.tar" diff --git a/import-layers/yocto-poky/meta/recipes-support/libyaml/files/libyaml-CVE-2014-9130.patch b/import-layers/yocto-poky/meta/recipes-support/libyaml/files/libyaml-CVE-2014-9130.patch deleted file mode 100644 index 61fa7e569..000000000 --- a/import-layers/yocto-poky/meta/recipes-support/libyaml/files/libyaml-CVE-2014-9130.patch +++ /dev/null @@ -1,33 +0,0 @@ -# HG changeset patch -# User Kirill Simonov <xi@resolvent.net> -# Date 1417197312 21600 -# Node ID 2b9156756423e967cfd09a61d125d883fca6f4f2 -# Parent 053f53a381ff6adbbc93a31ab7fdee06a16c8a33 -Removed invalid simple key assertion (thank to Jonathan Gray). - -The patch comes from - -https://bitbucket.org/xi/libyaml/commits/2b9156756423e967cfd09a61d125d883fca6f4f2 - -Upstream-Status: Backport -CVE: CVE-2014-9130 - -Signed-off-by: Yue Tao <yue.tao@windriver.com> - -diff -r 053f53a381ff -r 2b9156756423 src/scanner.c ---- a/src/scanner.c Wed Mar 26 13:55:54 2014 -0500 -+++ b/src/scanner.c Fri Nov 28 11:55:12 2014 -0600 -@@ -1106,13 +1106,6 @@ - && parser->indent == (ptrdiff_t)parser->mark.column); - - /* -- * A simple key is required only when it is the first token in the current -- * line. Therefore it is always allowed. But we add a check anyway. -- */ -- -- assert(parser->simple_key_allowed || !required); /* Impossible. */ -- -- /* - * If the current position may start a simple key, save it. - */ - diff --git a/import-layers/yocto-poky/meta/recipes-support/libyaml/libyaml_0.1.6.bb b/import-layers/yocto-poky/meta/recipes-support/libyaml/libyaml_0.1.7.bb index b0155774d..5c422ef11 100644 --- a/import-layers/yocto-poky/meta/recipes-support/libyaml/libyaml_0.1.6.bb +++ b/import-layers/yocto-poky/meta/recipes-support/libyaml/libyaml_0.1.7.bb @@ -8,11 +8,10 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=6015f088759b10e0bc2bf64898d4ae17" SRC_URI = "http://pyyaml.org/download/libyaml/yaml-${PV}.tar.gz \ - file://libyaml-CVE-2014-9130.patch \ " -SRC_URI[md5sum] = "5fe00cda18ca5daeb43762b80c38e06e" -SRC_URI[sha256sum] = "7da6971b4bd08a986dd2a61353bc422362bd0edcc67d7ebaac68c95f74182749" +SRC_URI[md5sum] = "1abf45bd3a96374fa55ca63b32f9f2f9" +SRC_URI[sha256sum] = "8088e457264a98ba451a90b8661fcb4f9d6f478f7265d48322a196cec2480729" S = "${WORKDIR}/yaml-${PV}" diff --git a/import-layers/yocto-poky/meta/recipes-support/lzo/lzo/run-ptest b/import-layers/yocto-poky/meta/recipes-support/lzo/lzo/run-ptest index 2ea7745f7..6acb89fc1 100644 --- a/import-layers/yocto-poky/meta/recipes-support/lzo/lzo/run-ptest +++ b/import-layers/yocto-poky/meta/recipes-support/lzo/lzo/run-ptest @@ -1,8 +1,33 @@ #!/bin/sh ./lzotest -mavail -n10 -q /etc/services +if [ $? -eq 0 ]; then + echo 'PASS: lzotest' +else + echo 'FAIL: lzotest' +fi LZOTEST=./lzotest /bin/sh -e "./check.sh" "/etc" ./align +if [ $? -eq 0 ]; then + echo 'PASS: align' +else + echo 'FAIL: align' +fi ./chksum +if [ $? -eq 0 ]; then + echo 'PASS: chksum' +else + echo 'FAIL: chksum' +fi ./simple +if [ $? -eq 0 ]; then + echo 'PASS: simple' +else + echo 'FAIL: simple' +fi ./testmini +if [ $? -eq 0 ]; then + echo 'PASS: testmini' +else + echo 'FAIL: testmini' +fi diff --git a/import-layers/yocto-poky/meta/recipes-support/lzop/lzop/lzop-1.03-gcc6.patch b/import-layers/yocto-poky/meta/recipes-support/lzop/lzop/lzop-1.03-gcc6.patch new file mode 100644 index 000000000..72b33970e --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/lzop/lzop/lzop-1.03-gcc6.patch @@ -0,0 +1,37 @@ +gcc-6 has additional errors e.g. + +./test.c:1:12: error: variably modified '__acc_cta' at file scope + extern int __acc_cta[1-2*!((1l << (8*8 -1)) < 0)]; + ^~~~~~~~~ + +This is rightly pointed out since that index is undefined + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Upstream-Status: Pending + +--- a/src/miniacc.h.orig 2016-02-10 16:09:23.247315866 +0100 ++++ a/src/miniacc.h 2016-02-10 16:12:14.973297054 +0100 +@@ -4469,12 +4469,12 @@ + #if defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0150) + #elif 1 && (ACC_CC_SUNPROC) && !defined(ACCCHK_CFG_PEDANTIC) + #else +- ACCCHK_ASSERT((1 << (8*SIZEOF_INT-1)) < 0) ++ ACCCHK_ASSERT((int)(1u << (8*SIZEOF_INT-1)) < 0) + #endif + ACCCHK_ASSERT((1u << (8*SIZEOF_INT-1)) > 0) + #if 1 && (ACC_CC_SUNPROC) && !defined(ACCCHK_CFG_PEDANTIC) + #else +- ACCCHK_ASSERT((1l << (8*SIZEOF_LONG-1)) < 0) ++ ACCCHK_ASSERT((long)(1ul << (8*SIZEOF_LONG-1)) < 0) + #endif + ACCCHK_ASSERT((1ul << (8*SIZEOF_LONG-1)) > 0) + #if defined(acc_int16e_t) +@@ -4703,7 +4703,7 @@ + #elif 1 && (ACC_CC_LCC || ACC_CC_LCCWIN32) && !defined(ACCCHK_CFG_PEDANTIC) + #elif 1 && (ACC_CC_SUNPROC) && !defined(ACCCHK_CFG_PEDANTIC) + #elif !(ACC_BROKEN_INTEGRAL_PROMOTION) && (SIZEOF_INT > 1) +- ACCCHK_ASSERT( (((unsigned char)128) << (int)(8*sizeof(int)-8)) < 0) ++ ACCCHK_ASSERT( (int)((unsigned int)((unsigned char)128) << (int)(8*sizeof(int)-8)) < 0) + #endif + #if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0530) && (__BORLANDC__ < 0x0560)) + # pragma option pop diff --git a/import-layers/yocto-poky/meta/recipes-support/lzop/lzop_1.03.bb b/import-layers/yocto-poky/meta/recipes-support/lzop/lzop_1.03.bb index 07d628908..649e7243e 100644 --- a/import-layers/yocto-poky/meta/recipes-support/lzop/lzop_1.03.bb +++ b/import-layers/yocto-poky/meta/recipes-support/lzop/lzop_1.03.bb @@ -15,15 +15,15 @@ SRC_URI = "http://www.lzop.org/download/${BP}.tar.gz \ file://acinclude.m4 \ file://x32_abi_miniacc_h.patch \ file://0001-use-static-inlines-as-the-external-inline-definition.patch \ + file://lzop-1.03-gcc6.patch \ " SRC_URI[md5sum] = "006c5e27fb78cdd14a628fdfa5aa1905" SRC_URI[sha256sum] = "c1425b8c77d49f5a679d5a126c90ea6ad99585a55e335a613cae59e909dbb2c9" inherit autotools -do_configure () { - ln -sf ../acinclude.m4 ${S}/acinclude.m4 - autotools_do_configure +do_configure_prepend () { + install -Dm 0644 ${WORKDIR}/acinclude.m4 ${S}/acinclude.m4 } BBCLASSEXTEND += "native nativesdk" diff --git a/import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr-3.1.3/long-long-thumb.patch b/import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr/long-long-thumb.patch index ca7100eb2..ca7100eb2 100644 --- a/import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr-3.1.3/long-long-thumb.patch +++ b/import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr/long-long-thumb.patch diff --git a/import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr_3.1.3.bb b/import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr_3.1.4.bb index ee8a23893..230a86208 100644 --- a/import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr_3.1.3.bb +++ b/import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr_3.1.4.bb @@ -8,9 +8,8 @@ DEPENDS = "gmp" SRC_URI = "http://www.mpfr.org/mpfr-${PV}/mpfr-${PV}.tar.xz \ file://long-long-thumb.patch \ " - -SRC_URI[md5sum] = "6969398cd2fbc56a6af570b5273c56a9" -SRC_URI[sha256sum] = "6835a08bd992c8257641791e9a6a2b35b02336c8de26d0a8577953747e514a16" +SRC_URI[md5sum] = "064b2c18185038e404a401b830d59be8" +SRC_URI[sha256sum] = "761413b16d749c53e2bfd2b1dfaa3b027b0e793e404b90b5fbaeef60af6517f5" UPSTREAM_CHECK_URI = "http://www.mpfr.org/mpfr-current/" diff --git a/import-layers/yocto-poky/meta/recipes-support/nettle/nettle_2.7.1.bb b/import-layers/yocto-poky/meta/recipes-support/nettle/nettle_2.7.1.bb index d4df0a3a8..ae8e3119f 100644 --- a/import-layers/yocto-poky/meta/recipes-support/nettle/nettle_2.7.1.bb +++ b/import-layers/yocto-poky/meta/recipes-support/nettle/nettle_2.7.1.bb @@ -1,6 +1,6 @@ require nettle.inc -LICENSE = "LGPLv2.1 & GPLv2" +LICENSE = "LGPLv2.1+ & GPLv2" LICENSE_${PN} = "LGPLv2.1+" LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \ diff --git a/import-layers/yocto-poky/meta/recipes-support/npth/npth_1.2.bb b/import-layers/yocto-poky/meta/recipes-support/npth/npth_1.2.bb index 1b3962e64..66aa3474b 100644 --- a/import-layers/yocto-poky/meta/recipes-support/npth/npth_1.2.bb +++ b/import-layers/yocto-poky/meta/recipes-support/npth/npth_1.2.bb @@ -6,7 +6,8 @@ LIC_FILES_CHKSUM = "\ file://COPYING;md5=751419260aa954499f7abaabaa882bbe\ file://COPYING.LESSER;md5=6a6a8e020838b23406c81b19c1d46df6\ " -SRC_URI = "ftp://ftp.gnupg.org/gcrypt/npth/npth-${PV}.tar.bz2 \ +UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html" +SRC_URI = "${GNUPG_MIRROR}/npth/npth-${PV}.tar.bz2 \ file://pkgconfig.patch \ " diff --git a/import-layers/yocto-poky/meta/recipes-support/nspr/nspr_4.12.bb b/import-layers/yocto-poky/meta/recipes-support/nspr/nspr_4.12.bb index 168341bc0..fa6d52357 100644 --- a/import-layers/yocto-poky/meta/recipes-support/nspr/nspr_4.12.bb +++ b/import-layers/yocto-poky/meta/recipes-support/nspr/nspr_4.12.bb @@ -147,6 +147,9 @@ TESTS = " \ inherit autotools +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}" +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," + do_compile_prepend() { oe_runmake CROSS_COMPILE=1 CFLAGS="-DXP_UNIX" LDFLAGS="" CC=gcc -C config export } diff --git a/import-layers/yocto-poky/meta/recipes-support/nss/nss/0001-Fix-build-failure-on-opensuse-13.1.patch b/import-layers/yocto-poky/meta/recipes-support/nss/nss/0001-Fix-build-failure-on-opensuse-13.1.patch deleted file mode 100644 index cb3ad0068..000000000 --- a/import-layers/yocto-poky/meta/recipes-support/nss/nss/0001-Fix-build-failure-on-opensuse-13.1.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 8758c6a4508a5ca01505a8d69a269c912ce10bee Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Mon, 18 Jan 2016 18:26:16 +0000 -Subject: [PATCH] Fix build failure on opensuse 13.1 - -Upstream-Status: Inappropriate [gcc 4.8 specific issue] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - nss/cmd/modutil/install-ds.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/nss/cmd/modutil/install-ds.h b/nss/cmd/modutil/install-ds.h -index 3a3afb3..433efe0 100644 ---- a/nss/cmd/modutil/install-ds.h -+++ b/nss/cmd/modutil/install-ds.h -@@ -243,7 +243,7 @@ struct Pk11Install_Info_str { - Pk11Install_Info* - Pk11Install_Info_new(); - void --Pk11Install_Info_init(); -+Pk11Install_Info_init(Pk11Install_Info* _this); - void - Pk11Install_Info_delete(Pk11Install_Info* _this); - /*// Returns NULL for success, error message if parse error.*/ --- -1.8.4.5 - diff --git a/import-layers/yocto-poky/meta/recipes-support/nss/nss/disable-Wvarargs-with-clang.patch b/import-layers/yocto-poky/meta/recipes-support/nss/nss/disable-Wvarargs-with-clang.patch new file mode 100644 index 000000000..86b1b6055 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/nss/nss/disable-Wvarargs-with-clang.patch @@ -0,0 +1,33 @@ +clang 3.9 add this warning to rightly flag undefined +behavior, we relegate this to be just a warning instead +of error and keep the behavior as it was. Right fix would +be to not pass enum to the function with variadic arguments +as last named argument + +Fixes errors like +ocsp.c:2220:22: error: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Werror,-Wvarargs] + va_start(ap, responseType0); + ^ +ocsp.c:2200:43: note: parameter of type 'SECOidTag' is declared here + SECOidTag responseType0, ...) + +see +https://www.securecoding.cert.org/confluence/display/cplusplus/EXP58-CPP.+Pass+an+object+of+the+correct+type+to+va_start +for more details + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Upstream-Status: Pending + +Index: nss-3.24/nss/coreconf/Werror.mk +=================================================================== +--- nss-3.24.orig/nss/coreconf/Werror.mk ++++ nss-3.24/nss/coreconf/Werror.mk +@@ -54,7 +54,7 @@ ifndef WARNING_CFLAGS + ifdef CC_IS_CLANG + # -Qunused-arguments : clang objects to arguments that it doesn't understand + # and fixing this would require rearchitecture +- WARNING_CFLAGS += -Qunused-arguments ++ WARNING_CFLAGS += -Qunused-arguments -Wno-error=varargs + # -Wno-parentheses-equality : because clang warns about macro expansions + WARNING_CFLAGS += $(call disable_warning,parentheses-equality) + ifdef BUILD_OPT diff --git a/import-layers/yocto-poky/meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch b/import-layers/yocto-poky/meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch index 866de07ea..181c69adb 100644 --- a/import-layers/yocto-poky/meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch +++ b/import-layers/yocto-poky/meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch @@ -16,11 +16,11 @@ Upstream-Status: Pending Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> =================================================== -diff --git a/nss/coreconf/nsinstall/Makefile b/nss/coreconf/nsinstall/Makefile -index 1850bcb..5aee84f 100644 ---- a/nss/coreconf/nsinstall/Makefile -+++ b/nss/coreconf/nsinstall/Makefile -@@ -18,6 +18,12 @@ INTERNAL_TOOLS = 1 +Index: nss-3.24/nss/coreconf/nsinstall/Makefile +=================================================================== +--- nss-3.24.orig/nss/coreconf/nsinstall/Makefile ++++ nss-3.24/nss/coreconf/nsinstall/Makefile +@@ -18,6 +18,13 @@ INTERNAL_TOOLS = 1 include $(DEPTH)/coreconf/config.mk @@ -29,6 +29,7 @@ index 1850bcb..5aee84f 100644 +# to clean the '-m64' from ARCHFLAG and LDFLAGS. +ARCHFLAG = +LDFLAGS = ++CFLAGS = + ifeq (,$(filter-out OS2 WIN%,$(OS_TARGET))) PROGRAM = diff --git a/import-layers/yocto-poky/meta/recipes-support/nss/nss/pqg.c-ULL_addend.patch b/import-layers/yocto-poky/meta/recipes-support/nss/nss/pqg.c-ULL_addend.patch new file mode 100644 index 000000000..9caaaeb95 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/nss/nss/pqg.c-ULL_addend.patch @@ -0,0 +1,23 @@ +nss does not build on mips with clang because wrong types are used? + +pqg.c:339:16: error: comparison of constant 18446744073709551615 with expression of type 'unsigned long' is always true [-Werror,-Wtautological-constant-out-of-range-compare] + if (addend < MP_DIGIT_MAX) { + ~~~~~~ ^ ~~~~~~~~~~~~ + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Upstream-Status: Pending +Index: nss-3.24/nss/lib/freebl/pqg.c +=================================================================== +--- nss-3.24.orig/nss/lib/freebl/pqg.c ++++ nss-3.24/nss/lib/freebl/pqg.c +@@ -322,8 +322,8 @@ generate_h_candidate(SECItem *hit, mp_in + + static SECStatus + addToSeed(const SECItem * seed, +- unsigned long addend, +- int seedlen, /* g in 186-1 */ ++ unsigned long long addend, ++ int seedlen, /* g in 186-1 */ + SECItem * seedout) + { + mp_int s, sum, modulus, tmp; diff --git a/import-layers/yocto-poky/meta/recipes-support/nss/nss_3.21.bb b/import-layers/yocto-poky/meta/recipes-support/nss/nss_3.25.bb index d2e24112d..eff09ebbd 100644 --- a/import-layers/yocto-poky/meta/recipes-support/nss/nss_3.21.bb +++ b/import-layers/yocto-poky/meta/recipes-support/nss/nss_3.25.bb @@ -15,18 +15,18 @@ LIC_FILES_CHKSUM = "file://nss/COPYING;md5=3b1e88e1b9c0b5a4b2881d46cce06a18 \ file://nss/lib/freebl/mpi/doc/LICENSE-MPL;md5=5d425c8f3157dbf212db2ec53d9e5132" SRC_URI = "\ - http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_21_RTM/src/${BP}.tar.gz \ + http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_25_RTM/src/${BP}.tar.gz \ file://nss-fix-support-cross-compiling.patch \ file://nss-no-rpath-for-cross-compiling.patch \ file://nss-fix-incorrect-shebang-of-perl.patch \ file://nss-fix-nsinstall-build.patch \ - file://0001-Fix-build-failure-on-opensuse-13.1.patch \ + file://disable-Wvarargs-with-clang.patch \ + file://pqg.c-ULL_addend.patch \ file://nss.pc.in \ file://signlibs.sh \ " - -SRC_URI[md5sum] = "3c8b2ed880dd3a8d86c9e0151afe6eba" -SRC_URI[sha256sum] = "3f7a5b027d7cdd5c0e4ff7544da33fdc6f56c2f8c27fff02938fd4a6fbe87239" +SRC_URI[md5sum] = "23169c406adc8ac3672d34bf9ea2433d" +SRC_URI[sha256sum] = "5d1ad475da19d0c033a716350dc5f8a747999d3eba5ac07ee0368c5bad6e2359" UPSTREAM_CHECK_URI = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_Releases" UPSTREAM_CHECK_REGEX = "NSS_(?P<pver>.+)_release_notes" @@ -49,6 +49,7 @@ do_configure_prepend_libc-musl () { do_compile_prepend_class-native() { export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE} export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE} + export NSS_ENABLE_WERROR=0 } do_compile_prepend_class-nativesdk() { @@ -63,6 +64,7 @@ do_compile_prepend_class-native() { do_compile() { export CROSS_COMPILE=1 export NATIVE_CC="gcc" + export NATIVE_FLAGS="${HOST_CFLAGS}" export BUILD_OPT=1 export FREEBL_NO_DEPEND=1 diff --git a/import-layers/yocto-poky/meta/recipes-support/p11-kit/p11-kit_0.22.1.bb b/import-layers/yocto-poky/meta/recipes-support/p11-kit/p11-kit_0.22.1.bb index a4efff161..38fa09bf9 100644 --- a/import-layers/yocto-poky/meta/recipes-support/p11-kit/p11-kit_0.22.1.bb +++ b/import-layers/yocto-poky/meta/recipes-support/p11-kit/p11-kit_0.22.1.bb @@ -2,7 +2,7 @@ SUMMARY = "Provides a way to load and enumerate PKCS#11 modules" LICENSE = "BSD" LIC_FILES_CHKSUM = "file://COPYING;md5=02933887f609807fbb57aa4237d14a50" -inherit autotools gettext pkgconfig upstream-version-is-even +inherit autotools gettext pkgconfig upstream-version-is-even gtk-doc DEPENDS = "libtasn1 libffi" @@ -12,6 +12,26 @@ SRC_URI[sha256sum] = "ef3a339fcf6aa0e32c8c23f79ba7191e57312be2bda8b24e6d121c2670 EXTRA_OECONF = "--without-trust-paths" +# This recipe does not use the standard gtk-doc m4 macros, and so the ./configure flags +# that control gtk-doc build are non-standard +EXTRA_OECONF_prepend_class-target = "${@bb.utils.contains('GTKDOC_ENABLED', 'True', '--enable-doc --enable-doc-html --disable-doc-pdf', \ + '--disable-doc', d)} " + +# When building native recipes, disable gtkdoc, as it is not necessary, +# pulls in additional dependencies, and makes build times longer +EXTRA_OECONF_prepend_class-native = "--disable-doc " +EXTRA_OECONF_prepend_class-nativesdk = "--disable-doc " + +UNKNOWN_CONFIGURE_WHITELIST_append = " --enable-gtk-doc-html --disable-gtk-doc-pdf --enable-gtk-doc --disable-gtk-doc" + +# p11-kit relies on these two being copied from source tree +# instead of being regenerated by gtkdoc-scan, but doesn't setup +# dependencies correctly when there is a parallel build. Let's pre-copy +# them instead. +do_compile_prepend () { + cp ${S}/doc/manual/p11-kit-overrides.txt ${S}/doc/manual/p11-kit-sections.txt ${B}/doc/manual/ +} + FILES_${PN} += " \ ${libdir}/p11-kit-proxy.so \ ${libdir}/pkcs11/*.so \ diff --git a/import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry_0.9.2.bb b/import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry_0.9.2.bb index d6b713020..d315a99d4 100644 --- a/import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry_0.9.2.bb +++ b/import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry_0.9.2.bb @@ -12,7 +12,8 @@ inherit autotools DEPENDS = "gettext-native" -SRC_URI = "ftp://ftp.gnupg.org/gcrypt/${BPN}/${BPN}-${PV}.tar.bz2" +UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html" +SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2" SRC_URI[md5sum] = "f51d454f921111b5156a2291cbf70278" SRC_URI[sha256sum] = "fd8bc1592ceb22bb492b07cb29b1b140bb882c859e6503b974254c0a4b4134d1" diff --git a/import-layers/yocto-poky/meta/recipes-support/popt/popt/popt_fix_for_automake-1.12.patch b/import-layers/yocto-poky/meta/recipes-support/popt/popt/popt_fix_for_automake-1.12.patch index 91bca96a5..7d74aadff 100644 --- a/import-layers/yocto-poky/meta/recipes-support/popt/popt/popt_fix_for_automake-1.12.patch +++ b/import-layers/yocto-poky/meta/recipes-support/popt/popt/popt_fix_for_automake-1.12.patch @@ -4,7 +4,7 @@ This patch avoids this error with automake 1.12: | configure.ac:49: error: automatic de-ANSI-fication support has been removed -Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> +Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> 2012/05/02 Index: popt-1.16/configure.ac diff --git a/import-layers/yocto-poky/meta/recipes-support/popt/popt_1.16.bb b/import-layers/yocto-poky/meta/recipes-support/popt/popt_1.16.bb index cb13a815e..478288f9b 100644 --- a/import-layers/yocto-poky/meta/recipes-support/popt/popt_1.16.bb +++ b/import-layers/yocto-poky/meta/recipes-support/popt/popt_1.16.bb @@ -6,6 +6,8 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=cb0613c30af2a8249b8dcc67d3edb06d" PR = "r3" +DEPENDS = "virtual/libiconv" + SRC_URI = "http://rpm5.org/files/popt/popt-${PV}.tar.gz \ file://pkgconfig_fix.patch \ file://popt_fix_for_automake-1.12.patch \ diff --git a/import-layers/yocto-poky/meta/recipes-support/ptest-runner/ptest-runner_2.0.bb b/import-layers/yocto-poky/meta/recipes-support/ptest-runner/ptest-runner_2.0.bb index 7081afbeb..9d4551389 100644 --- a/import-layers/yocto-poky/meta/recipes-support/ptest-runner/ptest-runner_2.0.bb +++ b/import-layers/yocto-poky/meta/recipes-support/ptest-runner/ptest-runner_2.0.bb @@ -7,8 +7,8 @@ HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/ptest-runner2/about/" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe" -SRCREV = "8bfdf946e784f4d5757bebee1fbc4b4a3d7a95c4" -PV = "2.0+git${SRCPV}" +SRCREV = "e2aa4256745377b784c8691f546041b59f6e046b" +PV = "2.0.1+git${SRCPV}" SRC_URI = "git://git.yoctoproject.org/ptest-runner2" S = "${WORKDIR}/git" @@ -22,5 +22,5 @@ do_compile () { } do_install () { - install -D -m 0755 ${WORKDIR}/git/ptest-runner ${D}${bindir}/ptest-runner + install -D -m 0755 ${S}/ptest-runner ${D}${bindir}/ptest-runner } diff --git a/import-layers/yocto-poky/meta/recipes-support/serf/serf_1.3.8.bb b/import-layers/yocto-poky/meta/recipes-support/serf/serf_1.3.8.bb index b5059d546..c498d9097 100644 --- a/import-layers/yocto-poky/meta/recipes-support/serf/serf_1.3.8.bb +++ b/import-layers/yocto-poky/meta/recipes-support/serf/serf_1.3.8.bb @@ -1,11 +1,13 @@ SUMMARY = "High-Performance Asynchronous HTTP Client Library" -SRC_URI = "${DEBIAN_MIRROR}/main/s/${BPN}/${BPN}_${PV}.orig.tar.gz \ +SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/s/${BPN}/${BPN}_${PV}.orig.tar.gz \ file://norpath.patch \ file://env.patch" SRC_URI[md5sum] = "713beaf05d7f3329de121e218e2fcb93" SRC_URI[sha256sum] = "77134cd5010664ca023585bce50978bd4005906ed280ff889f591f86df7c59e4" +UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/s/serf/" + LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" diff --git a/import-layers/yocto-poky/meta/recipes-support/source-highlight/files/0001-source-highlight.pc.in-do-not-add-Boost-s-libraries-.patch b/import-layers/yocto-poky/meta/recipes-support/source-highlight/files/0001-source-highlight.pc.in-do-not-add-Boost-s-libraries-.patch new file mode 100644 index 000000000..b0aa5d173 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/source-highlight/files/0001-source-highlight.pc.in-do-not-add-Boost-s-libraries-.patch @@ -0,0 +1,30 @@ +From 9aa01fd5f9d8b2b98c34684dc8f68115750ef41c Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Tue, 12 Jul 2016 17:15:13 +0300 +Subject: [PATCH] source-highlight.pc.in: do not add Boost's libraries and + includes + +This breaks when compiling in sysroots; a proper way is to use Depends + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + source-highlight.pc.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/source-highlight.pc.in b/source-highlight.pc.in +index 79ab63e..64114a7 100644 +--- a/source-highlight.pc.in ++++ b/source-highlight.pc.in +@@ -7,6 +7,6 @@ Name: libsource-highlight + Description: GNU Source-highlight library. + URL: http://www.gnu.org/software/src-highlite/ + Version: @VERSION@ +-Libs: -L${libdir} -lsource-highlight @BOOST_LDFLAGS@ @BOOST_REGEX_LIB@ +-Cflags: -I${includedir} @BOOST_CPPFLAGS@ ++Libs: -L${libdir} -lsource-highlight ++Cflags: -I${includedir} + +-- +2.8.1 + diff --git a/import-layers/yocto-poky/meta/recipes-support/source-highlight/source-highlight_3.1.8.bb b/import-layers/yocto-poky/meta/recipes-support/source-highlight/source-highlight_3.1.8.bb new file mode 100644 index 000000000..85923e475 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/source-highlight/source-highlight_3.1.8.bb @@ -0,0 +1,28 @@ +SUMMARY = "Syntax highlight utility" +DESCRIPTION = "Source-highlight converts source code to formatted text with syntax highlighting." +HOMEPAGE = "https://www.gnu.org/software/src-highlite/" +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=ff95bfe019feaf92f524b73dd79e76eb" + +SRC_URI = "${GNU_MIRROR}/src-highlite/${BPN}-${PV}.tar.gz \ + file://0001-source-highlight.pc.in-do-not-add-Boost-s-libraries-.patch" +SRC_URI[md5sum] = "3243470706ef5fefdc3e43b5306a4e41" +SRC_URI[sha256sum] = "01336a7ea1d1ccc374201f7b81ffa94d0aecb33afc7d6903ebf9fbf33a55ada3" + +inherit autotools + +DEPENDS_append = " boost" + +DEPENDS_append_class-target = " source-highlight-native" + +EXTRA_OECONF = "--with-boost=yes --with-boost-libdir=${STAGING_DIR_TARGET}${libdir}" + +BBCLASSEXTEND = "native" + +# source-highlight is using its own binary from the build tree to make documentation +# let's substitute the native binary instead +do_configure_prepend_class-target () { + sed -i -e 's,^SRCHILITEEXE = $(top_builddir).*,SRCHILITEEXE = source-highlight,' ${S}/doc/Makefile.am +} + +RDEPENDS_source-highlight += "bash" diff --git a/import-layers/yocto-poky/meta/recipes-support/sqlite/files/0001-revert-ad601c7962-that-brings-2-increase-of-build-ti.patch b/import-layers/yocto-poky/meta/recipes-support/sqlite/files/0001-revert-ad601c7962-that-brings-2-increase-of-build-ti.patch new file mode 100644 index 000000000..26540b241 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/sqlite/files/0001-revert-ad601c7962-that-brings-2-increase-of-build-ti.patch @@ -0,0 +1,56 @@ +From 4b286b441e8efa9a34eb0db8227748ebffd91c35 Mon Sep 17 00:00:00 2001 +From: Jianxun Zhang <jianxun.zhang@linux.intel.com> +Date: Thu, 13 Oct 2016 09:24:21 -0700 +Subject: [PATCH] revert ad601c7962 that brings 2% increase of build time. + +The comment of the change in sqlite fossil project is: +"For in-memory databases, it does not matter if pcache +entries are marked "clean" or "writable"." + +Upstream Status: Inappropriate + +Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com> +--- + sqlite3.c | 12 +++--------- + 1 file changed, 3 insertions(+), 9 deletions(-) + +diff --git a/sqlite3.c b/sqlite3.c +index ccddfe6..ecae550 100644 +--- a/sqlite3.c ++++ b/sqlite3.c +@@ -13146,7 +13146,7 @@ struct PgHdr { + sqlite3_pcache_page *pPage; /* Pcache object page handle */ + void *pData; /* Page data */ + void *pExtra; /* Extra content */ +- PgHdr *pDirty; /* Transient list of dirty sorted by pgno */ ++ PgHdr *pDirty; /* Transient list of dirty pages */ + Pager *pPager; /* The pager this page is part of */ + Pgno pgno; /* Page number for this page */ + #ifdef SQLITE_CHECK_PAGES +@@ -43504,13 +43504,7 @@ bitvec_end: + /* #include "sqliteInt.h" */ + + /* +-** A complete page cache is an instance of this structure. Every +-** entry in the cache holds a single page of the database file. The +-** btree layer only operates on the cached copy of the database pages. +-** +-** A page cache entry is "clean" if it exactly matches what is currently +-** on disk. A page is "dirty" if it has been modified and needs to be +-** persisted to disk. ++** A complete page cache is an instance of this structure. + ** + ** pDirty, pDirtyTail, pSynced: + ** All dirty pages are linked into the doubly linked list using +@@ -48314,7 +48308,7 @@ static int pager_end_transaction(Pager *pPager, int hasMaster, int bCommit){ + pPager->pInJournal = 0; + pPager->nRec = 0; + if( rc==SQLITE_OK ){ +- if( pagerFlushOnCommit(pPager, bCommit) ){ ++ if( MEMDB || pagerFlushOnCommit(pPager, bCommit) ){ + sqlite3PcacheCleanAll(pPager->pPCache); + }else{ + sqlite3PcacheClearWritable(pPager->pPCache); +-- +2.7.4 + diff --git a/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3/fix-disable-static-shell.patch b/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3/fix-disable-static-shell.patch deleted file mode 100644 index 6f39ae266..000000000 --- a/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3/fix-disable-static-shell.patch +++ /dev/null @@ -1,61 +0,0 @@ -From ede5db83e38cc8ad8c9be291cd8985f7ad99f291 Mon Sep 17 00:00:00 2001 -From: Andre McCurdy <armccurdy@gmail.com> -Date: Tue, 16 Feb 2016 14:00:00 -0800 -Subject: [PATCH] fix --disable-static-shell - -Upstream sqlite seems to be moving further and further away from -allowing the sqlite3 command line tool to be dynamically linked with -sqlite. - -The --disable-static-shell configure option added in 3.10.0 no longer -has any effect in 3.11.0. For now patch things up and make it work. - -Upstream-Status: Pending - -Signed-off-by: Andre McCurdy <armccurdy@gmail.com> ---- - Makefile.am | 13 +++++++++++-- - configure.ac | 2 +- - 2 files changed, 12 insertions(+), 3 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 0e09cfc..608c0fd 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -6,9 +6,18 @@ libsqlite3_la_SOURCES = sqlite3.c - libsqlite3_la_LDFLAGS = -no-undefined -version-info 8:6:8 - - bin_PROGRAMS = sqlite3 --sqlite3_SOURCES = shell.c sqlite3.c sqlite3.h --sqlite3_LDADD = @READLINE_LIBS@ -+sqlite3_SOURCES = shell.c sqlite3.h -+EXTRA_sqlite3_SOURCES = sqlite3.c -+sqlite3_LDADD = @EXTRA_SHELL_OBJ@ @READLINE_LIBS@ - sqlite3_DEPENDENCIES = @EXTRA_SHELL_OBJ@ -+ -+# Warning: Adding SQLITE_ENABLE_EXPLAIN_COMMENTS to sqlite3_CFLAGS doesn't -+# actually have any effect if we link the sqlite3 command line tool with the -+# libsqlite3.so shared library (which will contain a version of sqlite3.c -+# compiled with the default AM_CFLAGS above). If SQLITE_ENABLE_EXPLAIN_COMMENTS -+# debug is required, then sqlite3 must not be configured with -+# --disable-static-shell -+ - sqlite3_CFLAGS = $(AM_CFLAGS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS - - include_HEADERS = sqlite3.h sqlite3ext.h -diff --git a/configure.ac b/configure.ac -index 8e7fd69..ada559e 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -130,7 +130,7 @@ AC_ARG_ENABLE(static-shell, [AS_HELP_STRING( - [statically link libsqlite3 into shell tool [default=yes]])], - [], [enable_static_shell=yes]) - if test x"$enable_static_shell" == "xyes"; then -- EXTRA_SHELL_OBJ=sqlite3.$OBJEXT -+ EXTRA_SHELL_OBJ=sqlite3-sqlite3.$OBJEXT - else - EXTRA_SHELL_OBJ=libsqlite3.la - fi --- -1.9.1 - diff --git a/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.11.0.bb b/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.11.0.bb deleted file mode 100644 index 992d20cd5..000000000 --- a/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.11.0.bb +++ /dev/null @@ -1,11 +0,0 @@ -require sqlite3.inc - -LICENSE = "PD" -LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=65f0a57ca6928710b418c094b3570bb0" - -SRC_URI = "http://www.sqlite.org/2016/sqlite-autoconf-${SQLITE_PV}.tar.gz \ - file://fix-disable-static-shell.patch \ -" - -SRC_URI[md5sum] = "a6cdc3e0a6e5087d620037ae0c48720d" -SRC_URI[sha256sum] = "508d4dcbcf7a7181e95c717a1dc4ae3c0880b3d593be0c4b40abb6c3a0e201fb" diff --git a/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.14.1.bb b/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.14.1.bb new file mode 100644 index 000000000..7c8fa4052 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.14.1.bb @@ -0,0 +1,12 @@ +require sqlite3.inc + +LICENSE = "PD" +LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=65f0a57ca6928710b418c094b3570bb0" + +SRC_URI = "\ + http://www.sqlite.org/2016/sqlite-autoconf-${SQLITE_PV}.tar.gz \ + file://0001-revert-ad601c7962-that-brings-2-increase-of-build-ti.patch \ + " + +SRC_URI[md5sum] = "3634a90a3f49541462bcaed3474b2684" +SRC_URI[sha256sum] = "bc7182476900017becb81565ecea7775d46ab747a97281aa610f4f45881c47a6" diff --git a/import-layers/yocto-poky/meta/recipes-support/user-creation/xuser-account_0.1.bb b/import-layers/yocto-poky/meta/recipes-support/user-creation/xuser-account_0.1.bb index 13ba67733..81817d1e2 100644 --- a/import-layers/yocto-poky/meta/recipes-support/user-creation/xuser-account_0.1.bb +++ b/import-layers/yocto-poky/meta/recipes-support/user-creation/xuser-account_0.1.bb @@ -21,7 +21,6 @@ do_install() { FILES_${PN} = "${sysconfdir}/dbus-1/system.d/system-xuser.conf" USERADD_PACKAGES = "${PN}" -GROUPADD_PARAM_${PN} = "--system shutdown" USERADD_PARAM_${PN} = "--create-home \ --groups video,tty,audio,input,shutdown,disk \ --user-group xuser" diff --git a/import-layers/yocto-poky/meta/recipes-support/vte/vte-0.28.2/cve-2012-2738.patch b/import-layers/yocto-poky/meta/recipes-support/vte/vte-0.28.2/cve-2012-2738.patch deleted file mode 100644 index 9b9980397..000000000 --- a/import-layers/yocto-poky/meta/recipes-support/vte/vte-0.28.2/cve-2012-2738.patch +++ /dev/null @@ -1,136 +0,0 @@ -Upstream-Status: Backport -CVE: CVE-2012-2738 -Signed-off-by: Ross Burton <ross.burton@intel.com> - -From e524b0b3bd8fad844ffa73927c199545b892cdbd Mon Sep 17 00:00:00 2001 -From: Christian Persch <chpe@gnome.org> -Date: Sat, 19 May 2012 19:36:09 +0200 -Subject: [PATCH 1/2] emulation: Limit integer arguments to 65535 - -To guard against malicious sequences containing excessively big numbers, -limit all parsed numbers to 16 bit range. Doing this here in the parsing -routine is a catch-all guard; this doesn't preclude enforcing -more stringent limits in the handlers themselves. - -https://bugzilla.gnome.org/show_bug.cgi?id=676090 ---- - src/table.c | 2 +- - src/vteseq.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/table.c b/src/table.c -index 140e8c8..85cf631 100644 ---- a/src/table.c -+++ b/src/table.c -@@ -550,7 +550,7 @@ _vte_table_extract_numbers(GValueArray **array, - if (G_UNLIKELY (*array == NULL)) { - *array = g_value_array_new(1); - } -- g_value_set_long(&value, total); -+ g_value_set_long(&value, CLAMP (total, 0, G_MAXUSHORT)); - g_value_array_append(*array, &value); - } while (i++ < arginfo->length); - g_value_unset(&value); -diff --git a/src/vteseq.c b/src/vteseq.c -index 7ef4c8c..10991db 100644 ---- a/src/vteseq.c -+++ b/src/vteseq.c -@@ -557,7 +557,7 @@ vte_sequence_handler_multiple(VteTerminal *terminal, - GValueArray *params, - VteTerminalSequenceHandler handler) - { -- vte_sequence_handler_multiple_limited(terminal, params, handler, G_MAXLONG); -+ vte_sequence_handler_multiple_limited(terminal, params, handler, G_MAXUSHORT); - } - - static void --- -2.4.9 (Apple Git-60) - - -From cf1ad453a8def873c49cf6d88162593402f32bb2 Mon Sep 17 00:00:00 2001 -From: Christian Persch <chpe@gnome.org> -Date: Sat, 19 May 2012 20:04:12 +0200 -Subject: [PATCH 2/2] emulation: Limit repetitions - -Don't allow malicious sequences to cause excessive repetitions. - -https://bugzilla.gnome.org/show_bug.cgi?id=676090 ---- - src/vteseq.c | 25 ++++++++++++++++++------- - 1 file changed, 18 insertions(+), 7 deletions(-) - -diff --git a/src/vteseq.c b/src/vteseq.c -index 10991db..209522f 100644 ---- a/src/vteseq.c -+++ b/src/vteseq.c -@@ -1392,7 +1392,7 @@ vte_sequence_handler_dc (VteTerminal *terminal, GValueArray *params) - static void - vte_sequence_handler_DC (VteTerminal *terminal, GValueArray *params) - { -- vte_sequence_handler_multiple(terminal, params, vte_sequence_handler_dc); -+ vte_sequence_handler_multiple_r(terminal, params, vte_sequence_handler_dc); - } - - /* Delete a line at the current cursor position. */ -@@ -1785,7 +1785,7 @@ vte_sequence_handler_reverse_index (VteTerminal *terminal, GValueArray *params) - static void - vte_sequence_handler_RI (VteTerminal *terminal, GValueArray *params) - { -- vte_sequence_handler_multiple(terminal, params, vte_sequence_handler_nd); -+ vte_sequence_handler_multiple_r(terminal, params, vte_sequence_handler_nd); - } - - /* Save cursor (position). */ -@@ -2777,8 +2777,7 @@ vte_sequence_handler_insert_lines (VteTerminal *terminal, GValueArray *params) - { - GValue *value; - VteScreen *screen; -- long param, end, row; -- int i; -+ long param, end, row, i, limit; - screen = terminal->pvt->screen; - /* The default is one. */ - param = 1; -@@ -2796,7 +2795,13 @@ vte_sequence_handler_insert_lines (VteTerminal *terminal, GValueArray *params) - } else { - end = screen->insert_delta + terminal->row_count - 1; - } -- /* Insert the new lines at the cursor. */ -+ -+ /* Only allow to insert as many lines as there are between this row -+ * and the end of the scrolling region. See bug #676090. -+ */ -+ limit = end - row + 1; -+ param = MIN (param, limit); -+ - for (i = 0; i < param; i++) { - /* Clear a line off the end of the region and add one to the - * top of the region. */ -@@ -2817,8 +2822,7 @@ vte_sequence_handler_delete_lines (VteTerminal *terminal, GValueArray *params) - { - GValue *value; - VteScreen *screen; -- long param, end, row; -- int i; -+ long param, end, row, i, limit; - - screen = terminal->pvt->screen; - /* The default is one. */ -@@ -2837,6 +2841,13 @@ vte_sequence_handler_delete_lines (VteTerminal *terminal, GValueArray *params) - } else { - end = screen->insert_delta + terminal->row_count - 1; - } -+ -+ /* Only allow to delete as many lines as there are between this row -+ * and the end of the scrolling region. See bug #676090. -+ */ -+ limit = end - row + 1; -+ param = MIN (param, limit); -+ - /* Clear them from below the current cursor. */ - for (i = 0; i < param; i++) { - /* Insert a line at the end of the region and remove one from --- -2.4.9 (Apple Git-60) - diff --git a/import-layers/yocto-poky/meta/recipes-support/vte/vte-0.28.2/obsolete_automake_macros.patch b/import-layers/yocto-poky/meta/recipes-support/vte/vte-0.28.2/obsolete_automake_macros.patch deleted file mode 100644 index 6763d3754..000000000 --- a/import-layers/yocto-poky/meta/recipes-support/vte/vte-0.28.2/obsolete_automake_macros.patch +++ /dev/null @@ -1,14 +0,0 @@ -Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=691545] - -Signed-off-by: Marko Lindqvist <cazfi74@gmail.com> -diff -Nurd vte-0.28.2/gnome-pty-helper/configure.in vte-0.28.2/gnome-pty-helper/configure.in ---- vte-0.28.2/gnome-pty-helper/configure.in 2010-07-15 20:08:44.000000000 +0300 -+++ vte-0.28.2/gnome-pty-helper/configure.in 2013-01-11 14:50:34.971027440 +0200 -@@ -8,7 +8,6 @@ - AC_ISC_POSIX - AC_PROG_CC - AC_STDC_HEADERS --AM_PROG_CC_STDC - - if test -z "$enable_maintainer_mode"; then - enable_maintainer_mode=yes diff --git a/import-layers/yocto-poky/meta/recipes-support/vte/vte.inc b/import-layers/yocto-poky/meta/recipes-support/vte/vte.inc deleted file mode 100644 index 8565cc2ad..000000000 --- a/import-layers/yocto-poky/meta/recipes-support/vte/vte.inc +++ /dev/null @@ -1,15 +0,0 @@ -SUMMARY = "Virtual terminal emulator GTK+ widget library" -BUGTRACKER = "https://bugzilla.gnome.org/buglist.cgi?product=vte" -LICENSE = "LGPLv2.0" -DEPENDS = " glib-2.0 gtk+ intltool-native ncurses" -RDEPENDS_libvte = "vte-termcap" - -inherit gnome gtk-doc distro_features_check upstream-version-is-even gobject-introspection -ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}" - -EXTRA_OECONF = "--disable-python" - -PACKAGES =+ "libvte vte-termcap" -FILES_libvte = "${libdir}/*.so.* ${libexecdir}/gnome-pty-helper" -FILES_vte-termcap = "${datadir}/vte/termcap-0.0" - diff --git a/import-layers/yocto-poky/meta/recipes-support/vte/vte/0001-Add-m4-vapigen.m4.patch b/import-layers/yocto-poky/meta/recipes-support/vte/vte/0001-Add-m4-vapigen.m4.patch new file mode 100644 index 000000000..1c5630ed9 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/vte/vte/0001-Add-m4-vapigen.m4.patch @@ -0,0 +1,119 @@ +From 08ca1c48b25c332b75bba2a6b5d757da006e955b Mon Sep 17 00:00:00 2001 +From: Jussi Kukkonen <jussi.kukkonen@intel.com> +Date: Fri, 7 Oct 2016 16:27:57 +0300 +Subject: [PATCH] Add m4/vapigen.m4 + +Building without vala will fail if we don't have a vapigen.m4. + +Upstream-Status: Pending +Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> +--- + m4/vapigen.m4 | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 96 insertions(+) + create mode 100644 m4/vapigen.m4 + +diff --git a/m4/vapigen.m4 b/m4/vapigen.m4 +new file mode 100644 +index 0000000..f2df12f +--- /dev/null ++++ b/m4/vapigen.m4 +@@ -0,0 +1,96 @@ ++dnl vapigen.m4 ++dnl ++dnl Copyright 2012 Evan Nemerson ++dnl ++dnl This library is free software; you can redistribute it and/or ++dnl modify it under the terms of the GNU Lesser General Public ++dnl License as published by the Free Software Foundation; either ++dnl version 2.1 of the License, or (at your option) any later version. ++dnl ++dnl This library is distributed in the hope that it will be useful, ++dnl but WITHOUT ANY WARRANTY; without even the implied warranty of ++dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++dnl Lesser General Public License for more details. ++dnl ++dnl You should have received a copy of the GNU Lesser General Public ++dnl License along with this library; if not, write to the Free Software ++dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++ ++# VAPIGEN_CHECK([VERSION], [API_VERSION], [FOUND-INTROSPECTION], [DEFAULT]) ++# -------------------------------------- ++# Check vapigen existence and version ++# ++# See http://live.gnome.org/Vala/UpstreamGuide for detailed documentation ++AC_DEFUN([VAPIGEN_CHECK], ++[ ++ AC_BEFORE([GOBJECT_INTROSPECTION_CHECK],[$0]) ++ AC_BEFORE([GOBJECT_INTROSPECTION_REQUIRE],[$0]) ++ ++ AC_ARG_ENABLE([vala], ++ [AS_HELP_STRING([--enable-vala[=@<:@no/auto/yes@:>@]],[build Vala bindings @<:@default=]ifelse($4,,auto,$4)[@:>@])],,[ ++ AS_IF([test "x$4" = "x"], [ ++ enable_vala=auto ++ ], [ ++ enable_vala=$4 ++ ]) ++ ]) ++ ++ AS_CASE([$enable_vala], [no], [enable_vala=no], ++ [yes], [ ++ AS_IF([test "x$3" != "xyes" -a "x$found_introspection" != "xyes"], [ ++ AC_MSG_ERROR([Vala bindings require GObject Introspection]) ++ ]) ++ ], [auto], [ ++ AS_IF([test "x$3" != "xyes" -a "x$found_introspection" != "xyes"], [ ++ enable_vala=no ++ ]) ++ ], [ ++ AC_MSG_ERROR([Invalid argument passed to --enable-vala, should be one of @<:@no/auto/yes@:>@]) ++ ]) ++ ++ AS_IF([test "x$2" = "x"], [ ++ vapigen_pkg_name=vapigen ++ ], [ ++ vapigen_pkg_name=vapigen-$2 ++ ]) ++ AS_IF([test "x$1" = "x"], [ ++ vapigen_pkg="$vapigen_pkg_name" ++ ], [ ++ vapigen_pkg="$vapigen_pkg_name >= $1" ++ ]) ++ ++ PKG_PROG_PKG_CONFIG ++ ++ PKG_CHECK_EXISTS([$vapigen_pkg], [ ++ AS_IF([test "$enable_vala" = "auto"], [ ++ enable_vala=yes ++ ]) ++ ], [ ++ AS_CASE([$enable_vala], [yes], [ ++ AC_MSG_ERROR([$vapigen_pkg not found]) ++ ], [auto], [ ++ enable_vala=no ++ ]) ++ ]) ++ ++ AC_MSG_CHECKING([for vala]) ++ ++ AS_CASE([$enable_vala], ++ [yes], [ ++ VAPIGEN=`$PKG_CONFIG --variable=vapigen vapigen` ++ VAPIGEN_MAKEFILE=`$PKG_CONFIG --variable=datadir vapigen`/vala/Makefile.vapigen ++ AS_IF([test "x$2" = "x"], [ ++ VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir vapigen` ++ ], [ ++ VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir_versioned vapigen` ++ ]) ++ ]) ++ ++ AC_MSG_RESULT([$enable_vala]) ++ ++ AC_SUBST([VAPIGEN]) ++ AC_SUBST([VAPIGEN_VAPIDIR]) ++ AC_SUBST([VAPIGEN_MAKEFILE]) ++ ++ AM_CONDITIONAL(ENABLE_VAPIGEN, test "x$enable_vala" = "xyes") ++]) +-- +2.1.4 + diff --git a/import-layers/yocto-poky/meta/recipes-support/vte/vte/0001-Don-t-enable-stack-protection-by-default.patch b/import-layers/yocto-poky/meta/recipes-support/vte/vte/0001-Don-t-enable-stack-protection-by-default.patch new file mode 100644 index 000000000..fcfc55975 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/vte/vte/0001-Don-t-enable-stack-protection-by-default.patch @@ -0,0 +1,29 @@ +From b0a579d83e355545b64742c997fe8b1d58bf4207 Mon Sep 17 00:00:00 2001 +From: Jussi Kukkonen <jussi.kukkonen@intel.com> +Date: Mon, 13 Jun 2016 11:05:00 +0300 +Subject: [PATCH] Don't enable stack-protection by default + +These are set by security_flags.inc. + +Upstream-Status: Inappropriate [configuration] +Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> +--- + configure.ac | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 068d072..d580f84 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -138,8 +138,6 @@ m4_define([compiler_flags_common],[ dnl + -fno-common dnl + -fdiagnostics-show-option dnl + -fno-strict-aliasing dnl +- -fstack-protector dnl +- -fstack-protector-strong dnl + -fno-semantic-interposition dnl + -Wno-deprecated-declarations dnl + ]) +-- +2.1.4 + diff --git a/import-layers/yocto-poky/meta/recipes-support/vte/vte_0.28.2.bb b/import-layers/yocto-poky/meta/recipes-support/vte/vte_0.28.2.bb deleted file mode 100644 index 74087ca83..000000000 --- a/import-layers/yocto-poky/meta/recipes-support/vte/vte_0.28.2.bb +++ /dev/null @@ -1,16 +0,0 @@ -require vte.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7" - -PR = "r6" - -SRC_URI += "file://obsolete_automake_macros.patch \ - file://cve-2012-2738.patch \ - " - -CFLAGS += "-D_GNU_SOURCE" - -SRC_URI[archive.md5sum] = "497f26e457308649e6ece32b3bb142ff" -SRC_URI[archive.sha256sum] = "86cf0b81aa023fa93ed415653d51c96767f20b2d7334c893caba71e42654b0ae" - -RECIPE_NO_UPDATE_REASON = "matchbox-terminal needs to be ported over to new vte first" diff --git a/import-layers/yocto-poky/meta/recipes-support/vte/vte_0.44.2.bb b/import-layers/yocto-poky/meta/recipes-support/vte/vte_0.44.2.bb new file mode 100644 index 000000000..a0b671e05 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/vte/vte_0.44.2.bb @@ -0,0 +1,43 @@ +SUMMARY = "Virtual terminal emulator GTK+ widget library" +BUGTRACKER = "https://bugzilla.gnome.org/buglist.cgi?product=vte" +LICENSE = "LGPLv2.1+" +DEPENDS = "glib-2.0 gtk+3 intltool-native" + +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +inherit gnomebase gtk-doc distro_features_check upstream-version-is-even gobject-introspection + +# vapigen.m4 is required when vala is not present (but the one from vala should be used normally) +SRC_URI += "file://0001-Don-t-enable-stack-protection-by-default.patch \ + ${@bb.utils.contains('PACKAGECONFIG', 'vala', '', 'file://0001-Add-m4-vapigen.m4.patch', d) } \ + " +SRC_URI[archive.md5sum] = "eca8f8a9d9f9bb8e9d592d0acfeec015" +SRC_URI[archive.sha256sum] = "a1ea594814bb136a3a9a6c7656b46240571f6a198825c1111007fe99194b0949" + +ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" + +# Instead of "inherit vala" we do the relevant settings here so we can +# set DEPENDS based on PACKAGECONFIG. + +# Our patched version of Vala looks in STAGING_DATADIR for .vapi files +export STAGING_DATADIR +# Upstream Vala >= 0.11 looks in XDG_DATA_DIRS for .vapi files +export XDG_DATA_DIRS = "${STAGING_DATADIR}" + +# Package additional files +FILES_${PN}-dev += "${datadir}/vala/vapi/*" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[vala] = "--enable-vala,--disable-vala,vala-native vala" +PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls" + +CFLAGS += "-D_GNU_SOURCE" + +EXTRA_OECONF = "--disable-test-application" + +# libtool adds "-nostdlib" when g++ is used. This breaks PIE builds. +# Use libtool-cross (which has a hack to prevent that) instead. +EXTRA_OEMAKE_class-target = "LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool" + +PACKAGES =+ "libvte" +FILES_libvte = "${libdir}/*.so.* ${libdir}/girepository-1.0/*" |