浏览代码

Merge branch 'master' into next

This is in preparation of bumping the stella package, which is also
modified in master.
Arnout Vandecappelle (Essensium/Mind) 8 年之前
父节点
当前提交
4c5b02e571

+ 1 - 1
configs/qemu_sparc64_sun4u_defconfig

@@ -15,6 +15,6 @@ BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_11=y
 # Linux kernel
 # Linux kernel
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.11.3"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.11.12"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/sparc64-sun4u/linux-4.11.config"
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/sparc64-sun4u/linux-4.11.config"

+ 1 - 1
configs/qemu_sparc_ss10_defconfig

@@ -15,6 +15,6 @@ BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_11=y
 # Linux kernel
 # Linux kernel
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.11.3"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.11.12"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/sparc-ss10/linux-4.11.config"
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/sparc-ss10/linux-4.11.config"

+ 5 - 5
linux/Config.in

@@ -26,10 +26,10 @@ choice
 	prompt "Kernel version"
 	prompt "Kernel version"
 
 
 config BR2_LINUX_KERNEL_LATEST_VERSION
 config BR2_LINUX_KERNEL_LATEST_VERSION
-	bool "Latest version (4.12.4)"
+	bool "Latest version (4.12.5)"
 
 
 config BR2_LINUX_KERNEL_LATEST_CIP_VERSION
 config BR2_LINUX_KERNEL_LATEST_CIP_VERSION
-	bool "Latest CIP SLTS version (v4.4.55-cip3)"
+	bool "Latest CIP SLTS version (v4.4.75-cip6)"
 	help
 	help
 	  CIP launched in the spring of 2016 to address the needs of
 	  CIP launched in the spring of 2016 to address the needs of
 	  organizations in industries such as power generation and
 	  organizations in industries such as power generation and
@@ -116,8 +116,8 @@ endif
 
 
 config BR2_LINUX_KERNEL_VERSION
 config BR2_LINUX_KERNEL_VERSION
 	string
 	string
-	default "4.12.4" if BR2_LINUX_KERNEL_LATEST_VERSION
-	default "v4.4.55-cip3" if BR2_LINUX_KERNEL_LATEST_CIP_VERSION
+	default "4.12.5" if BR2_LINUX_KERNEL_LATEST_VERSION
+	default "v4.4.75-cip6" if BR2_LINUX_KERNEL_LATEST_CIP_VERSION
 	default BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE \
 	default BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE \
 		if BR2_LINUX_KERNEL_CUSTOM_VERSION
 		if BR2_LINUX_KERNEL_CUSTOM_VERSION
 	default "custom" if BR2_LINUX_KERNEL_CUSTOM_TARBALL
 	default "custom" if BR2_LINUX_KERNEL_CUSTOM_TARBALL
@@ -368,7 +368,7 @@ choice
 	default BR2_LINUX_KERNEL_USE_INTREE_DTS
 	default BR2_LINUX_KERNEL_USE_INTREE_DTS
 
 
 config BR2_LINUX_KERNEL_USE_INTREE_DTS
 config BR2_LINUX_KERNEL_USE_INTREE_DTS
-	bool "Use a device tree present in the kernel."
+	bool "Use a device tree present in the kernel"
 	help
 	help
 	  Use a device tree source distributed with
 	  Use a device tree source distributed with
 	  the kernel sources. The dts files are located
 	  the kernel sources. The dts files are located

+ 1 - 0
package/bind/bind.mk

@@ -24,6 +24,7 @@ BIND_CONF_ENV = \
 	BUILD_CC="$(TARGET_CC)" \
 	BUILD_CC="$(TARGET_CC)" \
 	BUILD_CFLAGS="$(TARGET_CFLAGS)"
 	BUILD_CFLAGS="$(TARGET_CFLAGS)"
 BIND_CONF_OPTS = \
 BIND_CONF_OPTS = \
+	--without-lmdb \
 	--with-libjson=no \
 	--with-libjson=no \
 	--with-randomdev=/dev/urandom \
 	--with-randomdev=/dev/urandom \
 	--enable-epoll \
 	--enable-epoll \

+ 78 - 0
package/dbus/0001-config-loader-expat-Tell-Expat-not-to-defend-against.patch

@@ -0,0 +1,78 @@
+From 1252dc1d1f465b8ab6b36ff7252e395e66a040cf Mon Sep 17 00:00:00 2001
+From: Simon McVittie <smcv@debian.org>
+Date: Fri, 21 Jul 2017 10:46:39 +0100
+Subject: [PATCH 1/2] config-loader-expat: Tell Expat not to defend against
+ hash collisions
+
+By default, Expat uses cryptographic-quality random numbers as a salt for
+its hash algorithm, and since 2.2.1 it gets them from the getrandom
+syscall on Linux. That syscall refuses to return any entropy until the
+kernel's CSPRNG (random pool) has been initialized. Unfortunately, this
+can take as long as 40 seconds on embedded devices with few entropy
+sources, which is too long: if the system dbus-daemon blocks for that
+length of time, important D-Bus clients like systemd and systemd-logind
+time out and fail to connect to it.
+
+We're parsing small configuration files here, and we trust them
+completely, so we don't need to defend against hash collisions: nobody
+is going to be crafting them to cause pathological performance.
+
+Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101858
+Signed-off-by: Simon McVittie <smcv@debian.org>
+Tested-by: Christopher Hewitt <hewitt@ieee.org>
+Reviewed-by: Philip Withnall <withnall@endlessm.com>
+
+Upstream commit 1252dc1d1f465b8ab6b36ff7252e395e66a040cf
+Signed-off-by: Marcus Hoffmann <m.hoffmann@cartelsol.com>
+---
+ bus/config-loader-expat.c | 14 ++++++++++++++
+ configure.ac              |  8 ++++++++
+ 2 files changed, 22 insertions(+)
+
+diff --git a/bus/config-loader-expat.c b/bus/config-loader-expat.c
+index b571fda3..27cbe2d0 100644
+--- a/bus/config-loader-expat.c
++++ b/bus/config-loader-expat.c
+@@ -203,6 +203,20 @@ bus_config_load (const DBusString      *file,
+       goto failed;
+     }
+ 
++  /* We do not need protection against hash collisions (CVE-2012-0876)
++   * because we are only parsing trusted XML; and if we let Expat block
++   * waiting for the CSPRNG to be initialized, as it does by default to
++   * defeat CVE-2012-0876, it can cause timeouts during early boot on
++   * entropy-starved embedded devices.
++   *
++   * TODO: When Expat gets a more explicit API for this than
++   * XML_SetHashSalt, check for that too, and use it preferentially.
++   * https://github.com/libexpat/libexpat/issues/91 */
++#if defined(HAVE_XML_SETHASHSALT)
++  /* Any nonzero number will do. https://xkcd.com/221/ */
++  XML_SetHashSalt (expat, 4);
++#endif
++
+   if (!_dbus_string_get_dirname (file, &dirname))
+     {
+       dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL);
+diff --git a/configure.ac b/configure.ac
+index 52da11fb..c4022ed7 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -938,6 +938,14 @@ XML_CFLAGS=
+ AC_SUBST([XML_CFLAGS])
+ AC_SUBST([XML_LIBS])
+ 
++save_cflags="$CFLAGS"
++save_libs="$LIBS"
++CFLAGS="$CFLAGS $XML_CFLAGS"
++LIBS="$LIBS $XML_LIBS"
++AC_CHECK_FUNCS([XML_SetHashSalt])
++CFLAGS="$save_cflags"
++LIBS="$save_libs"
++
+ # Thread lib detection
+ AC_ARG_VAR([THREAD_LIBS])
+ save_libs="$LIBS"
+-- 
+2.11.0
+

+ 3 - 0
package/dbus/dbus.mk

@@ -6,6 +6,9 @@
 
 
 DBUS_VERSION = 1.10.22
 DBUS_VERSION = 1.10.22
 DBUS_SITE = https://dbus.freedesktop.org/releases/dbus
 DBUS_SITE = https://dbus.freedesktop.org/releases/dbus
+
+# 0001-config-loader-expat-Tell-Expat-not-to-defend-against.patch
+DBUS_AUTORECONF = YES
 DBUS_LICENSE = AFL-2.1 or GPL-2.0+ (library, tools), GPL-2.0+ (tools)
 DBUS_LICENSE = AFL-2.1 or GPL-2.0+ (library, tools), GPL-2.0+ (tools)
 DBUS_LICENSE_FILES = COPYING
 DBUS_LICENSE_FILES = COPYING
 DBUS_INSTALL_STAGING = YES
 DBUS_INSTALL_STAGING = YES

+ 3 - 3
package/faad2/faad2.hash

@@ -1,4 +1,4 @@
-# From http://sourceforge.net/projects/faac/files/faad2-src/faad2-2.7/ (used by upstream):
-sha1	80eaaa5cc576c35dd28863767b795c50cbcc0511  faad2-2.7.tar.gz
+# From http://sourceforge.net/projects/faac/files/faad2-src/faad2-2.8.0/ (used by upstream):
+sha1	a5caa71cd915acd502d96cba56f38296277f2350  faad2-2.8.1.tar.bz2
 # Locally computed
 # Locally computed
-sha256  ee26ed1e177c0cd8fa8458a481b14a0b24ca0b51468c8b4c8b676fd3ceccd330  faad2-2.7.tar.gz
+sha256  f4042496f6b0a60f5ded6acd11093230044ef8a2fd965360c1bbd5b58780933d  faad2-2.8.1.tar.bz2

+ 6 - 2
package/faad2/faad2.mk

@@ -4,10 +4,14 @@
 #
 #
 ################################################################################
 ################################################################################
 
 
-FAAD2_VERSION = 2.7
-FAAD2_SITE = http://downloads.sourceforge.net/project/faac/faad2-src/faad2-$(FAAD2_VERSION)
+FAAD2_VERSION_MAJOR = 2.8
+FAAD2_VERSION = $(FAAD2_VERSION_MAJOR).1
+FAAD2_SITE = http://downloads.sourceforge.net/project/faac/faad2-src/faad2-$(FAAD2_VERSION_MAJOR).0
+FAAD2_SOURCE = faad2-$(FAAD2_VERSION).tar.bz2
 FAAD2_LICENSE = GPL-2.0
 FAAD2_LICENSE = GPL-2.0
 FAAD2_LICENSE_FILES = COPYING
 FAAD2_LICENSE_FILES = COPYING
+# No configure script in upstream tarball
+FAAD2_AUTORECONF = YES
 # frontend/faad calls frexp()
 # frontend/faad calls frexp()
 FAAD2_CONF_ENV = LIBS=-lm
 FAAD2_CONF_ENV = LIBS=-lm
 FAAD2_INSTALL_STAGING = YES
 FAAD2_INSTALL_STAGING = YES

+ 1 - 1
package/ficl/ficl.mk

@@ -39,7 +39,7 @@ endif
 
 
 define FICL_BUILD_CMDS
 define FICL_BUILD_CMDS
 	$(MAKE) -C $(@D) -f Makefile.linux $(TARGET_CONFIGURE_OPTS) \
 	$(MAKE) -C $(@D) -f Makefile.linux $(TARGET_CONFIGURE_OPTS) \
-		CFLAGS="$(TARGET_CFLAGS) -fPIC -I. -Dlinux" CPPFLAGS="" $(FICL_BUILD_TARGETS)
+		CFLAGS="$(TARGET_CFLAGS) -fgnu89-inline -fPIC -I. -Dlinux" CPPFLAGS="" $(FICL_BUILD_TARGETS)
 endef
 endef
 
 
 define FICL_INSTALL_STAGING_CMDS
 define FICL_INSTALL_STAGING_CMDS

+ 3 - 2
package/gdb/Config.in

@@ -3,6 +3,7 @@ config BR2_PACKAGE_GDB_ARCH_SUPPORTS
 	default y
 	default y
 	depends on !((BR2_arm || BR2_armeb) && BR2_BINFMT_FLAT)
 	depends on !((BR2_arm || BR2_armeb) && BR2_BINFMT_FLAT)
 	depends on !BR2_bfin
 	depends on !BR2_bfin
+	depends on !BR2_microblaze
 	depends on !BR2_nios2
 	depends on !BR2_nios2
 	depends on !BR2_or1k
 	depends on !BR2_or1k
 
 
@@ -47,11 +48,11 @@ config BR2_PACKAGE_GDB_SERVER
 config BR2_PACKAGE_GDB_DEBUGGER
 config BR2_PACKAGE_GDB_DEBUGGER
 	bool "full debugger"
 	bool "full debugger"
 	depends on BR2_USE_WCHAR
 	depends on BR2_USE_WCHAR
-	depends on !BR2_sh && !BR2_microblaze
+	depends on !BR2_sh
 	select BR2_PACKAGE_NCURSES
 	select BR2_PACKAGE_NCURSES
 
 
 comment "full gdb on target needs a toolchain w/ wchar"
 comment "full gdb on target needs a toolchain w/ wchar"
-	depends on !BR2_sh && !BR2_microblaze
+	depends on !BR2_sh
 	depends on !BR2_USE_WCHAR
 	depends on !BR2_USE_WCHAR
 
 
 if BR2_PACKAGE_GDB_DEBUGGER
 if BR2_PACKAGE_GDB_DEBUGGER

+ 2 - 3
package/gdb/Config.in.host

@@ -7,6 +7,7 @@ config BR2_PACKAGE_HOST_GDB
 	# toolchain should be used.
 	# toolchain should be used.
 	depends on !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY
 	depends on !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY
 	depends on !((BR2_arm || BR2_armeb) && BR2_BINFMT_FLAT)
 	depends on !((BR2_arm || BR2_armeb) && BR2_BINFMT_FLAT)
+	depends on !BR2_microblaze
 	depends on !BR2_nios2
 	depends on !BR2_nios2
 	depends on !BR2_or1k
 	depends on !BR2_or1k
 	help
 	help
@@ -29,7 +30,7 @@ config BR2_PACKAGE_HOST_GDB_PYTHON
 
 
 config BR2_PACKAGE_HOST_GDB_SIM
 config BR2_PACKAGE_HOST_GDB_SIM
 	bool "Simulator support"
 	bool "Simulator support"
-	depends on !BR2_arc && !BR2_microblaze
+	depends on !BR2_arc
 	help
 	help
 	  This option enables the simulator support in the cross gdb.
 	  This option enables the simulator support in the cross gdb.
 
 
@@ -37,7 +38,6 @@ choice
 	prompt "GDB debugger Version"
 	prompt "GDB debugger Version"
 	default BR2_GDB_VERSION_7_11
 	default BR2_GDB_VERSION_7_11
 	depends on !BR2_arc
 	depends on !BR2_arc
-	depends on !BR2_microblaze
 	help
 	help
 	  Select the version of gdb you wish to use.
 	  Select the version of gdb you wish to use.
 
 
@@ -65,7 +65,6 @@ endif
 config BR2_GDB_VERSION
 config BR2_GDB_VERSION
 	string
 	string
 	default "arc-2017.03-gdb" if BR2_arc
 	default "arc-2017.03-gdb" if BR2_arc
-	default "6be65fb56ea6694a9260733a536a023a1e2d4d57" if BR2_microblaze
 	default "7.10.1"   if BR2_GDB_VERSION_7_10
 	default "7.10.1"   if BR2_GDB_VERSION_7_10
 	default "7.11.1"   if BR2_GDB_VERSION_7_11 || !BR2_PACKAGE_HOST_GDB
 	default "7.11.1"   if BR2_GDB_VERSION_7_11 || !BR2_PACKAGE_HOST_GDB
 	default "7.12.1"   if BR2_GDB_VERSION_7_12
 	default "7.12.1"   if BR2_GDB_VERSION_7_12

+ 0 - 1
package/gdb/gdb.hash

@@ -5,5 +5,4 @@ sha512  0ac8d0a495103611ef41167a08313a010dce6ca4c6d827cbe8558a0c1a1a8a6bfa53f1b7
 sha512  e4044bdd162cbf95044ec1eaa44d2fa62a33e051bdbbacbc97afd4dfb07bae1bea514381fc1966aede89d6796ef2377a15748a93d95e2ad494c8497db489e886	gdb-8.0.tar.xz
 sha512  e4044bdd162cbf95044ec1eaa44d2fa62a33e051bdbbacbc97afd4dfb07bae1bea514381fc1966aede89d6796ef2377a15748a93d95e2ad494c8497db489e886	gdb-8.0.tar.xz
 
 
 # Locally calculated (fetched from Github)
 # Locally calculated (fetched from Github)
-sha512  0a467091d4b01fbecabb4b8da1cb743025c70e7f4874a0b5c8fa2ec623569a39bde6762b91806de0be6e63711aeb6909715cfbe43860de73d8aec6159a9f10a7	gdb-6be65fb56ea6694a9260733a536a023a1e2d4d57.tar.gz
 sha512  8ec849a5ea1c16f104c51c4813c35ab229e460eef0025967673b87316f62b5171f05448cda018464914d43d2da50b2902eb7f9f060d0af1368a9db111f959668	gdb-arc-2017.03-gdb.tar.gz
 sha512  8ec849a5ea1c16f104c51c4813c35ab229e460eef0025967673b87316f62b5171f05448cda018464914d43d2da50b2902eb7f9f060d0af1368a9db111f959668	gdb-arc-2017.03-gdb.tar.gz

+ 0 - 6
package/gdb/gdb.mk

@@ -14,12 +14,6 @@ GDB_SOURCE = gdb-$(GDB_VERSION).tar.gz
 GDB_FROM_GIT = y
 GDB_FROM_GIT = y
 endif
 endif
 
 
-ifeq ($(BR2_microblaze),y)
-GDB_SITE = $(call github,Xilinx,gdb,$(GDB_VERSION))
-GDB_SOURCE = gdb-$(GDB_VERSION).tar.gz
-GDB_FROM_GIT = y
-endif
-
 GDB_LICENSE = GPL-2.0+, LGPL-2.0+, GPL-3.0+, LGPL-3.0+
 GDB_LICENSE = GPL-2.0+, LGPL-2.0+, GPL-3.0+, LGPL-3.0+
 GDB_LICENSE_FILES = COPYING COPYING.LIB COPYING3 COPYING3.LIB
 GDB_LICENSE_FILES = COPYING COPYING.LIB COPYING3 COPYING3.LIB
 
 

+ 65 - 0
package/glibc/0005-fix-binutils-2-29-build.patch

@@ -0,0 +1,65 @@
+From: H.J. Lu <hjl.tools@gmail.com>
+Date: Fri, 23 Jun 2017 21:38:46 +0000 (-0700)
+Subject: Avoid .symver on common symbols [BZ #21666]
+X-Git-Tag: glibc-2.26~241
+X-Git-Url: https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff_plain;h=388b4f1a02f3a801965028bbfcd48d905638b797
+
+Avoid .symver on common symbols [BZ #21666]
+
+The .symver directive on common symbol just creates a new common symbol,
+not an alias and the newer assembler with the bug fix for
+
+https://sourceware.org/bugzilla/show_bug.cgi?id=21661
+
+will issue an error.  Before the fix, we got
+
+$ readelf -sW libc.so | grep "loc[12s]"
+  5109: 00000000003a0608     8 OBJECT  LOCAL  DEFAULT   36 loc1
+  5188: 00000000003a0610     8 OBJECT  LOCAL  DEFAULT   36 loc2
+  5455: 00000000003a0618     8 OBJECT  LOCAL  DEFAULT   36 locs
+  6575: 00000000003a05f0     8 OBJECT  GLOBAL DEFAULT   36 locs@GLIBC_2.2.5
+  7156: 00000000003a05f8     8 OBJECT  GLOBAL DEFAULT   36 loc1@GLIBC_2.2.5
+  7312: 00000000003a0600     8 OBJECT  GLOBAL DEFAULT   36 loc2@GLIBC_2.2.5
+
+in libc.so.  The versioned loc1, loc2 and locs have the wrong addresses.
+After the fix, we got
+
+$ readelf -sW libc.so | grep "loc[12s]"
+  6570: 000000000039e3b8     8 OBJECT  GLOBAL DEFAULT   34 locs@GLIBC_2.2.5
+  7151: 000000000039e3c8     8 OBJECT  GLOBAL DEFAULT   34 loc1@GLIBC_2.2.5
+  7307: 000000000039e3c0     8 OBJECT  GLOBAL DEFAULT   34 loc2@GLIBC_2.2.5
+
+	[BZ #21666]
+	* misc/regexp.c (loc1): Add __attribute__ ((nocommon));
+	(loc2): Likewise.
+	(locs): Likewise.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+[Backported from upstream commit
+388b4f1a02f3a801965028bbfcd48d905638b797, to fix the build with
+binutils 2.29.]
+---
+diff --git a/misc/regexp.c b/misc/regexp.c
+index 19d76c0..eaea7c3 100644
+--- a/misc/regexp.c
++++ b/misc/regexp.c
+@@ -29,14 +29,15 @@
+ 
+ #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_23)
+ 
+-/* Define the variables used for the interface.  */
+-char *loc1;
+-char *loc2;
++/* Define the variables used for the interface.  Avoid .symver on common
++   symbol, which just creates a new common symbol, not an alias.  */
++char *loc1 __attribute__ ((nocommon));
++char *loc2 __attribute__ ((nocommon));
+ compat_symbol (libc, loc1, loc1, GLIBC_2_0);
+ compat_symbol (libc, loc2, loc2, GLIBC_2_0);
+ 
+ /* Although we do not support the use we define this variable as well.  */
+-char *locs;
++char *locs __attribute__ ((nocommon));
+ compat_symbol (libc, locs, locs, GLIBC_2_0);
+ 
+ 

+ 47 - 0
package/glibc/0006-i686-Add-missing-IS_IN-libc-guards-to-vectorized-strcspn.patch

@@ -0,0 +1,47 @@
+From patchwork Wed Jun 14 06:19:50 2017
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Subject: i686: Add missing IS_IN (libc) guards to vectorized strcspn
+From: Florian Weimer <fweimer@redhat.com>
+X-Patchwork-Id: 21003
+Message-Id: <20170614061950.400FE4010728F@oldenburg.str.redhat.com>
+To: libc-alpha@sourceware.org
+Date: Wed, 14 Jun 2017 08:19:50 +0200
+
+Since commit d957c4d3fa48d685ff2726c605c988127ef99395 (i386: Compile
+rtld-*.os with -mno-sse -mno-mmx -mfpmath=387), vector intrinsics can
+no longer be used in ld.so, even if the compiled code never makes it
+into the final ld.so link.  This commit adds the missing IS_IN (libc)
+guard to the SSE 4.2 strcspn implementation, so that it can be used from
+ld.so in the future.
+
+2017-06-14  Florian Weimer  <fweimer@redhat.com>
+
+	* sysdeps/i386/i686/multiarch/strcspn-c.c: Add IS_IN (libc) guard.
+	* sysdeps/i386/i686/multiarch/varshift.c: Likewise.
+
+[Thomas: fixes a build issue of glibc on x86:
+sysdeps/x86_64/multiarch/varshift.h:26:1: error: SSE vector return without SSE enabled changes the ABI]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+diff --git a/sysdeps/i386/i686/multiarch/strcspn-c.c b/sysdeps/i386/i686/multiarch/strcspn-c.c
+index 6d61e19..ec230fb 100644
+--- a/sysdeps/i386/i686/multiarch/strcspn-c.c
++++ b/sysdeps/i386/i686/multiarch/strcspn-c.c
+@@ -1,2 +1,4 @@
+-#define __strcspn_sse2 __strcspn_ia32
+-#include <sysdeps/x86_64/multiarch/strcspn-c.c>
++#if IS_IN (libc)
++# define __strcspn_sse2 __strcspn_ia32
++# include <sysdeps/x86_64/multiarch/strcspn-c.c>
++#endif
+diff --git a/sysdeps/i386/i686/multiarch/varshift.c b/sysdeps/i386/i686/multiarch/varshift.c
+index 7760b96..6742a35 100644
+--- a/sysdeps/i386/i686/multiarch/varshift.c
++++ b/sysdeps/i386/i686/multiarch/varshift.c
+@@ -1 +1,3 @@
+-#include <sysdeps/x86_64/multiarch/varshift.c>
++#if IS_IN (libc)
++# include <sysdeps/x86_64/multiarch/varshift.c>
++#endif

+ 31 - 0
package/jack2/0005-gcc7.patch

@@ -0,0 +1,31 @@
+From f7bccdca651592cc4082b28fd4a01ed6ef8ab655 Mon Sep 17 00:00:00 2001
+From: Kjetil Matheussen <k.s.matheussen@notam02.no>
+Date: Sat, 15 Jul 2017 13:21:59 +0200
+Subject: [PATCH] Tests: Fix compilation with gcc7
+
+Fixes
+../tests/test.cpp: In function ‘int process4(jack_nframes_t, void*)’:
+../tests/test.cpp:483:73: error: call of overloaded ‘abs(jack_nframes_t)’ is ambiguous
+  if (delta_time > 0  && (jack_nframes_t)abs(delta_time - cur_buffer_size) > tolerance) {
+
+Downloaded from upstream commit
+https://github.com/jackaudio/jack2/commit/f7bccdca651592cc4082b28fd4a01ed6ef8ab655
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+---
+ tests/test.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/test.cpp b/tests/test.cpp
+index 8a8a8117..d2ef9a05 100644
+--- a/tests/test.cpp
++++ b/tests/test.cpp
+@@ -479,7 +479,7 @@ int process4(jack_nframes_t nframes, void *arg)
+ 	jack_nframes_t delta_time = cur_time - last_time;
+ 
+ 	Log("calling process4 callback : jack_frame_time = %ld delta_time = %ld\n", cur_time, delta_time);
+-	if (delta_time > 0  && (jack_nframes_t)abs(delta_time - cur_buffer_size) > tolerance) {
++	if (delta_time > 0  && abs((int64_t)delta_time - (int64_t)cur_buffer_size) > (int64_t)tolerance) {
+ 		printf("!!! ERROR !!! jack_frame_time seems to return incorrect values cur_buffer_size = %d, delta_time = %d tolerance %d\n", cur_buffer_size, delta_time, tolerance);
+ 	}
+ 

+ 28 - 0
package/jack2/0006-fix-ftbfs-with-clang.patch

@@ -0,0 +1,28 @@
+From d3c8e2d8d78899fba40a3e677ed4dbe388d82269 Mon Sep 17 00:00:00 2001
+From: Adrian Knoth <adi@drcomp.erfurt.thur.de>
+Date: Thu, 18 Sep 2014 18:29:23 +0200
+Subject: [PATCH] Fix FTBFS with clang++
+
+Forwarded from http://bugs.debian.org/757820
+
+Downloaded from upstream commit
+https://github.com/jackaudio/jack2/commit/d3c8e2d8d78899fba40a3e677ed4dbe388d82269
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+---
+ common/memops.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/common/memops.c b/common/memops.c
+index 27f6194a..2d416b64 100644
+--- a/common/memops.c
++++ b/common/memops.c
+@@ -198,7 +198,7 @@ static inline __m128i float_24_sse(__m128 s)
+  */
+ static unsigned int seed = 22222;
+ 
+-inline unsigned int fast_rand() {
++static inline unsigned int fast_rand() {
+ 	seed = (seed * 96314165) + 907633515;
+ 	return seed;
+ }

+ 6 - 6
package/linux-headers/Config.in.host

@@ -28,12 +28,12 @@ config BR2_KERNEL_HEADERS_AS_KERNEL
 
 
 config BR2_KERNEL_HEADERS_3_2
 config BR2_KERNEL_HEADERS_3_2
 	bool "Linux 3.2.x kernel headers"
 	bool "Linux 3.2.x kernel headers"
-	depends on !BR2_arc && !BR2_nios2
+	depends on !BR2_aarch64 && !BR2_arc && !BR2_nios2
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
 
 
 config BR2_KERNEL_HEADERS_3_4
 config BR2_KERNEL_HEADERS_3_4
 	bool "Linux 3.4.x kernel headers"
 	bool "Linux 3.4.x kernel headers"
-	depends on !BR2_arc && !BR2_nios2
+	depends on !BR2_aarch64 && !BR2_arc && !BR2_nios2
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
 
 
 config BR2_KERNEL_HEADERS_3_10
 config BR2_KERNEL_HEADERS_3_10
@@ -235,10 +235,10 @@ config BR2_DEFAULT_KERNEL_HEADERS
 	default "3.4.113"	if BR2_KERNEL_HEADERS_3_4
 	default "3.4.113"	if BR2_KERNEL_HEADERS_3_4
 	default "3.10.106"	if BR2_KERNEL_HEADERS_3_10
 	default "3.10.106"	if BR2_KERNEL_HEADERS_3_10
 	default "3.12.74"	if BR2_KERNEL_HEADERS_3_12
 	default "3.12.74"	if BR2_KERNEL_HEADERS_3_12
-	default "4.1.42"	if BR2_KERNEL_HEADERS_4_1
-	default "4.4.79"	if BR2_KERNEL_HEADERS_4_4
-	default "4.9.40"	if BR2_KERNEL_HEADERS_4_9
+	default "4.1.43"	if BR2_KERNEL_HEADERS_4_1
+	default "4.4.80"	if BR2_KERNEL_HEADERS_4_4
+	default "4.9.41"	if BR2_KERNEL_HEADERS_4_9
 	default "4.10.17"	if BR2_KERNEL_HEADERS_4_10
 	default "4.10.17"	if BR2_KERNEL_HEADERS_4_10
 	default "4.11.12"	if BR2_KERNEL_HEADERS_4_11
 	default "4.11.12"	if BR2_KERNEL_HEADERS_4_11
-	default "4.12.4"	if BR2_KERNEL_HEADERS_4_12
+	default "4.12.5"	if BR2_KERNEL_HEADERS_4_12
 	default BR2_DEFAULT_KERNEL_VERSION if BR2_KERNEL_HEADERS_VERSION
 	default BR2_DEFAULT_KERNEL_VERSION if BR2_KERNEL_HEADERS_VERSION

+ 1 - 0
package/mutt/mutt.mk

@@ -66,6 +66,7 @@ MUTT_CONF_ENV += \
 MUTT_CONF_OPTS += --with-mailpath=/var/mail
 MUTT_CONF_OPTS += --with-mailpath=/var/mail
 
 
 define MUTT_VAR_MAIL
 define MUTT_VAR_MAIL
+	mkdir -p $(TARGET_DIR)/var
 	ln -sf /tmp $(TARGET_DIR)/var/mail
 	ln -sf /tmp $(TARGET_DIR)/var/mail
 endef
 endef
 MUTT_POST_INSTALL_TARGET_HOOKS += MUTT_VAR_MAIL
 MUTT_POST_INSTALL_TARGET_HOOKS += MUTT_VAR_MAIL

+ 34 - 0
package/nvme/0001-Makefile-allow-linker-override-for-cross-uuid-test.patch

@@ -0,0 +1,34 @@
+From f926559acd1beb74dc5dc9b0e414b087110a251f Mon Sep 17 00:00:00 2001
+From: Baruch Siach <baruch@tkos.co.il>
+Date: Wed, 9 Aug 2017 09:43:12 +0300
+Subject: [PATCH] Makefile: allow linker override for cross uuid test
+
+The test to determine whether libuuid is installed uses the host 'ld' utility.
+This breaks when cross compiling, since target libraries are often different
+than host libraries.
+
+Use $(LD) instead. This allows to easily use the cross compiler linker.
+
+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
+---
+Upstream status: https://github.com/linux-nvme/nvme-cli/pull/216
+
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 3f1d9aaa890d..cc74bdd6c3e6 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,7 +1,7 @@
+ CFLAGS ?= -O2 -g -Wall -Werror
+ CFLAGS += -std=gnu99
+ CPPFLAGS += -D_GNU_SOURCE -D__CHECK_ENDIAN__
+-LIBUUID = $(shell ld -o /dev/null -luuid >/dev/null 2>&1; echo $$?)
++LIBUUID = $(shell $(LD) -o /dev/null -luuid >/dev/null 2>&1; echo $$?)
+ NVME = nvme
+ INSTALL ?= install
+ DESTDIR =
+-- 
+2.13.2
+

+ 1 - 12
package/nvme/nvme.mk

@@ -9,19 +9,8 @@ NVME_SITE = $(call github,linux-nvme,nvme-cli,$(NVME_VERSION))
 NVME_LICENSE = GPL-2.0+
 NVME_LICENSE = GPL-2.0+
 NVME_LICENSE_FILES = LICENSE
 NVME_LICENSE_FILES = LICENSE
 
 
-# Yes LIBUDEV=0 means udev support enabled, LIBUDEV=1 means udev
-# support disabled.
-ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
-NVME_DEPENDENCIES += udev
-NVME_MAKE_OPTS += LIBUDEV=0
-else
-NVME_MAKE_OPTS += LIBUDEV=1
-endif
-
-# LIBUDEV=1 means that libudev is _disabled_
 define NVME_BUILD_CMDS
 define NVME_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) \
-		$(NVME_MAKE_OPTS) -C $(@D)
+	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)
 endef
 endef
 
 
 define NVME_INSTALL_TARGET_CMDS
 define NVME_INSTALL_TARGET_CMDS

+ 5 - 0
package/pkg-cmake.mk

@@ -109,6 +109,11 @@ define $(2)_CONFIGURE_CMDS
 	cd $$($$(PKG)_BUILDDIR) && \
 	cd $$($$(PKG)_BUILDDIR) && \
 	rm -f CMakeCache.txt && \
 	rm -f CMakeCache.txt && \
 	PATH=$$(BR_PATH) \
 	PATH=$$(BR_PATH) \
+	PKG_CONFIG="$$(PKG_CONFIG_HOST_BINARY)" \
+	PKG_CONFIG_SYSROOT_DIR="/" \
+	PKG_CONFIG_LIBDIR="$$(HOST_DIR)/lib/pkgconfig:$$(HOST_DIR)/share/pkgconfig" \
+	PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 \
+	PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 \
 	$$($$(PKG)_CONF_ENV) $$(BR2_CMAKE) $$($$(PKG)_SRCDIR) \
 	$$($$(PKG)_CONF_ENV) $$(BR2_CMAKE) $$($$(PKG)_SRCDIR) \
 		-DCMAKE_INSTALL_SO_NO_EXE=0 \
 		-DCMAKE_INSTALL_SO_NO_EXE=0 \
 		-DCMAKE_FIND_ROOT_PATH="$$(HOST_DIR)" \
 		-DCMAKE_FIND_ROOT_PATH="$$(HOST_DIR)" \

+ 33 - 0
package/qt5/qt5base/5.9.1/0002-examples-fix-compile-without-opengl-support.patch

@@ -0,0 +1,33 @@
+From adacb2d6701b12511c5a0e58072236da91ebf810 Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <ps.report@gmx.net>
+Date: Mon, 7 Aug 2017 22:54:11 +0200
+Subject: [PATCH] examples: fix compile without opengl support
+
+Compile examples/opengl only in case opengl support is available.
+
+Task-number: QTBUG-62372
+Change-Id: I742a1eb7b7639a5a722c4d5e9b4ee070b629b02e
+
+Upstream: https://codereview.qt-project.org/201947
+Signed-off-by: Peter Seiderer <ps.report@gmx.net>
+---
+ examples/examples.pro | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/examples/examples.pro b/examples/examples.pro
+index a3851c6d81..d87fa2da88 100644
+--- a/examples/examples.pro
++++ b/examples/examples.pro
+@@ -14,7 +14,8 @@ qtHaveModule(concurrent): SUBDIRS += qtconcurrent
+ qtHaveModule(sql): SUBDIRS += sql
+ qtHaveModule(widgets): SUBDIRS += widgets
+ qtHaveModule(xml): SUBDIRS += xml
+-qtHaveModule(gui): SUBDIRS += gui opengl
++qtHaveModule(gui): SUBDIRS += gui
++qtHaveModule(gui):qtConfig(opengl): SUBDIRS += opengl
+ 
+ aggregate.files = aggregate/examples.pro
+ aggregate.path = $$[QT_INSTALL_EXAMPLES]
+-- 
+2.11.0
+

+ 3 - 3
package/skeleton-common/skeleton-common.mk

@@ -75,16 +75,16 @@ endef
 SKELETON_COMMON_TARGET_FINALIZE_HOOKS += SKELETON_COMMON_SET_ROOT_PASSWD
 SKELETON_COMMON_TARGET_FINALIZE_HOOKS += SKELETON_COMMON_SET_ROOT_PASSWD
 
 
 ifeq ($(BR2_SYSTEM_BIN_SH_NONE),y)
 ifeq ($(BR2_SYSTEM_BIN_SH_NONE),y)
-define SKELETON_COMMON_BIN_SH
+define SKELETON_COMMON_SET_BIN_SH
 	rm -f $(TARGET_DIR)/bin/sh
 	rm -f $(TARGET_DIR)/bin/sh
 endef
 endef
 else
 else
 ifneq ($(SKELETON_COMMON_BIN_SH),)
 ifneq ($(SKELETON_COMMON_BIN_SH),)
-define SKELETON_COMMON_BIN_SH
+define SKELETON_COMMON_SET_BIN_SH
 	ln -sf $(SKELETON_COMMON_BIN_SH) $(TARGET_DIR)/bin/sh
 	ln -sf $(SKELETON_COMMON_BIN_SH) $(TARGET_DIR)/bin/sh
 endef
 endef
 endif
 endif
 endif
 endif
-SKELETON_COMMON_TARGET_FINALIZE_HOOKS += SKELETON_COMMON_BIN_SH
+SKELETON_COMMON_TARGET_FINALIZE_HOOKS += SKELETON_COMMON_SET_BIN_SH
 
 
 $(eval $(generic-package))
 $(eval $(generic-package))

+ 0 - 26
package/skeleton-custom/skeleton-custom.mk

@@ -36,27 +36,6 @@ SKELETON_CUSTOM_USR_LIB_INODE = $(shell stat -c '%i' $(SKELETON_CUSTOM_PATH)/usr
 SKELETON_CUSTOM_USR_BIN_INODE = $(shell stat -c '%i' $(SKELETON_CUSTOM_PATH)/usr/bin/. 2>/dev/null)
 SKELETON_CUSTOM_USR_BIN_INODE = $(shell stat -c '%i' $(SKELETON_CUSTOM_PATH)/usr/bin/. 2>/dev/null)
 SKELETON_CUSTOM_USR_SBIN_INODE = $(shell stat -c '%i' $(SKELETON_CUSTOM_PATH)/usr/sbin/. 2>/dev/null)
 SKELETON_CUSTOM_USR_SBIN_INODE = $(shell stat -c '%i' $(SKELETON_CUSTOM_PATH)/usr/sbin/. 2>/dev/null)
 
 
-# Ensure that the custom skeleton has /lib, /bin and /sbin, and their
-# /usr counterparts
-ifeq ($(SKELETON_CUSTOM_LIB_INODE),)
-SKELETON_CUSTOM_MISSING_DIRS += /lib
-endif
-ifeq ($(SKELETON_CUSTOM_USR_LIB_INODE),)
-SKELETON_CUSTOM_MISSING_DIRS += /usr/lib
-endif
-ifeq ($(SKELETON_CUSTOM_BIN_INODE),)
-SKELETON_CUSTOM_MISSING_DIRS += /bin
-endif
-ifeq ($(SKELETON_CUSTOM_USR_BIN_INODE),)
-SKELETON_CUSTOM_MISSING_DIRS += /usr/bin
-endif
-ifeq ($(SKELETON_CUSTOM_SBIN_INODE),)
-SKELETON_CUSTOM_MISSING_DIRS += /sbin
-endif
-ifeq ($(SKELETON_CUSTOM_USR_SBIN_INODE),)
-SKELETON_CUSTOM_MISSING_DIRS += /usr/sbin
-endif
-
 # For a merged /usr, ensure that /lib, /bin and /sbin and their /usr
 # For a merged /usr, ensure that /lib, /bin and /sbin and their /usr
 # counterparts are appropriately setup as symlinks ones to the others.
 # counterparts are appropriately setup as symlinks ones to the others.
 ifeq ($(BR2_ROOTFS_MERGED_USR),y)
 ifeq ($(BR2_ROOTFS_MERGED_USR),y)
@@ -74,11 +53,6 @@ endif
 endif # merged /usr
 endif # merged /usr
 
 
 ifeq ($(BR2_PACKAGE_SKELETON_CUSTOM)$(BR_BUILDING),yy)
 ifeq ($(BR2_PACKAGE_SKELETON_CUSTOM)$(BR_BUILDING),yy)
-ifneq ($(SKELETON_CUSTOM_MISSING_DIRS),)
-$(error The custom skeleton in $(SKELETON_CUSTOM_PATH) is \
-	missing those directories or symlinks: \
-	$(SKELETON_CUSTOM_MISSING_DIRS))
-endif
 ifneq ($(SKELETON_CUSTOM_NOT_MERGED_USR_DIRS),)
 ifneq ($(SKELETON_CUSTOM_NOT_MERGED_USR_DIRS),)
 $(error The custom skeleton in $(SKELETON_CUSTOM_PATH) is not \
 $(error The custom skeleton in $(SKELETON_CUSTOM_PATH) is not \
 	using a merged /usr for the following directories: \
 	using a merged /usr for the following directories: \

+ 0 - 9
package/snappy/snappy.mk

@@ -11,13 +11,4 @@ SNAPPY_LICENSE_FILES = COPYING
 SNAPPY_INSTALL_STAGING = YES
 SNAPPY_INSTALL_STAGING = YES
 SNAPPY_CONF_OPTS = -DSNAPPY_BUILD_TESTS=OFF
 SNAPPY_CONF_OPTS = -DSNAPPY_BUILD_TESTS=OFF
 
 
-# libsnappy links with libstdc++. Some libstdc++/arch variants use
-# pthread symbols for internal locking if built with thread
-# support. libstdc++ does not have a .pc file, and its .la file does
-# not mention -pthread.  So, static linkig to libstdc++ will fail if
-# -pthread is not explicity linked to. Only do that for static builds.
-ifeq ($(BR2_STATIC_LIBS)$(BR2_TOOLCHAIN_HAS_THREADS),yy)
-SNAPPY_CONF_OPTS += LIBS=-pthread
-endif
-
 $(eval $(cmake-package))
 $(eval $(cmake-package))

+ 23 - 0
package/stella/0004-gcc7.patch

@@ -0,0 +1,23 @@
+From fb6e573263b7fb80a12d0eb74d22e13899f745ee Mon Sep 17 00:00:00 2001
+From: Stephen Anthony <sa666666@gmail.com>
+Date: Mon, 17 Apr 2017 18:52:04 -0230
+Subject: [PATCH] Update UNIX configure script for gcc7 and above.
+
+Backported from upstream commit:
+https://github.com/stella-emu/stella/commit/fb6e573263b7fb80a12d0eb74d22e13899f745ee
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+
+diff --git a/configure b/configure
+index 94b91ef9..b1218e9f 100755
+--- a/configure
++++ b/configure
+@@ -417,7 +417,7 @@ elif test "$have_gcc" = yes; then
+ 	fi
+ 
+ 	case $cxx_version in
+-		4.[7-9]|4.[7-9].[0-9]|4.[7-9].[0-9][-.]*|[5-6].[0-9]|[5-6].[0-9].[0-9]|[5-6].[0-9].[0-9][-.]*)
++		4.[7-9]|4.[7-9].[0-9]|4.[7-9].[0-9][-.]*|[5-9]|[5-9].[0-9]|[5-9].[0-9].[0-9]|[5-9].[0-9].[0-9][-.]*)
+ 			_cxx_major=`echo $cxx_version | cut -d '.' -f 1`
+ 			_cxx_minor=`echo $cxx_version | cut -d '.' -f 2`
+ 			cxx_version="$cxx_version, ok"

+ 72 - 0
package/uclibc/0001-fix-issues-with-gdb-8.0.patch

@@ -0,0 +1,72 @@
+From 111f01d432d542a153c1cad83def3a6ab57df7af Mon Sep 17 00:00:00 2001
+From: Waldemar Brodkorb <wbx@uclibc-ng.org>
+Date: Sat, 5 Aug 2017 11:28:07 +0200
+Subject: [PATCH] fix issues with gdb 8.0
+
+GDB 8.0 is compiled and linked with g++, but the
+linking of static targets (f.e. coldfire) fails,
+without declaring the functions in thread_db.h
+extern C.
+
+The compilation of gdb errors out with:
+thread-db.o: In function `thread_db_init()':
+thread-db.c:(.text+0x5b6): undefined reference to `td_ta_new(ps_prochandle*, td_thragent**)'
+thread-db.c:(.text+0x61e): undefined reference to `td_thr_get_info(td_thrhandle const*, td_thrinfo*)'
+thread-db.c:(.text+0x632): undefined reference to `td_symbol_list()'
+..
+
+Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
+---
+ libpthread/linuxthreads_db/thread_db.h | 7 +++++++
+ libpthread/nptl_db/thread_db.h         | 7 +++++++
+ 2 files changed, 14 insertions(+)
+
+diff --git a/libpthread/linuxthreads_db/thread_db.h b/libpthread/linuxthreads_db/thread_db.h
+index 13c30af..ec79f60 100644
+--- a/libpthread/linuxthreads_db/thread_db.h
++++ b/libpthread/linuxthreads_db/thread_db.h
+@@ -27,6 +27,9 @@
+ #include <sys/types.h>
+ #include <sys/procfs.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif
+ 
+ /* Error codes of the library.  */
+ typedef enum
+@@ -455,4 +458,8 @@ extern td_err_e td_thr_dbsuspend (const td_thrhandle_t *__th);
+ /* Resume execution of thread TH.  */
+ extern td_err_e td_thr_dbresume (const td_thrhandle_t *__th);
+ 
++#ifdef __cplusplus
++}
++#endif
++
+ #endif	/* thread_db.h */
+diff --git a/libpthread/nptl_db/thread_db.h b/libpthread/nptl_db/thread_db.h
+index 27ea69a..993842f 100644
+--- a/libpthread/nptl_db/thread_db.h
++++ b/libpthread/nptl_db/thread_db.h
+@@ -27,6 +27,9 @@
+ #include <sys/types.h>
+ #include <sys/procfs.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif
+ 
+ /* Error codes of the library.  */
+ typedef enum
+@@ -455,4 +458,8 @@ extern td_err_e td_thr_dbsuspend (const td_thrhandle_t *__th);
+ /* Resume execution of thread TH.  */
+ extern td_err_e td_thr_dbresume (const td_thrhandle_t *__th);
+ 
++#ifdef __cplusplus
++}
++#endif
++
+ #endif	/* thread_db.h */
+-- 
+2.1.4
+

+ 42 - 0
package/uclibc/0002-microblaze-handle-R_MICROBLAZE_NONE-for-ld.so-bootst.patch

@@ -0,0 +1,42 @@
+From 9db18d93811153fc9a70c9844fadc6fdf7cbbb64 Mon Sep 17 00:00:00 2001
+From: Waldemar Brodkorb <wbx@uclibc-ng.org>
+Date: Sun, 6 Aug 2017 21:15:50 +0200
+Subject: [PATCH] microblaze: handle R_MICROBLAZE_NONE for ld.so bootstrap
+
+Latest binutils 2.29 release emits a R_MICROBLAZE_NONE
+relocation, which breaks shared library loader bootstrap
+relocation.
+
+Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
+---
+ ldso/ldso/microblaze/dl-startup.h | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/ldso/ldso/microblaze/dl-startup.h b/ldso/ldso/microblaze/dl-startup.h
+index 720c53a..16d5762 100644
+--- a/ldso/ldso/microblaze/dl-startup.h
++++ b/ldso/ldso/microblaze/dl-startup.h
+@@ -82,18 +82,15 @@ static __always_inline
+ void PERFORM_BOOTSTRAP_RELOC(ELF_RELOC *rpnt, unsigned long *reloc_addr,
+ 	unsigned long symbol_addr, unsigned long load_addr, attribute_unused Elf32_Sym *symtab)
+ {
+-
+ 	switch (ELF_R_TYPE(rpnt->r_info))
+ 	{
+ 		case R_MICROBLAZE_REL:
+-
+ 			*reloc_addr = load_addr + rpnt->r_addend;
+ 			break;
+-
++		case R_MICROBLAZE_NONE:
++			break;
+ 		default:
+ 			_dl_exit(1);
+ 			break;
+-
+ 	}
+-
+ }
+-- 
+2.1.4
+