Bump buildroot to version 2017-02

TG-3 #closed
This commit is contained in:
jbnadal
2017-03-28 18:29:16 +02:00
parent 93b7fd91d2
commit 42c92a6bcb
3010 changed files with 41289 additions and 46428 deletions

View File

@@ -1,48 +0,0 @@
From bbd7151f7980c7d075fe652331f01d3aadc73e42 Mon Sep 17 00:00:00 2001
From: Waldemar Brodkorb <wbx@uclibc-ng.org>
Date: Mon, 8 Aug 2016 06:41:03 +0200
Subject: [PATCH] arm: fix compile in thumb mode
Fix a regression introduced by commit
0550ecce0e6580c5ad34e9a9a39ff18ccf8774f9
Reported by Buildroot developers.
Embedded test must be extented to ARMv7 thumb2 builds to
find such regressions next time. It wasn't triggered by a
cortex-m4 ARM noMMU build.
[yann.morin.1998@free.fr: backport from upstream]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
libc/sysdeps/linux/arm/bits/syscalls.h | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/libc/sysdeps/linux/arm/bits/syscalls.h b/libc/sysdeps/linux/arm/bits/syscalls.h
index 5b30564..6c62a9e 100644
--- a/libc/sysdeps/linux/arm/bits/syscalls.h
+++ b/libc/sysdeps/linux/arm/bits/syscalls.h
@@ -43,6 +43,9 @@
}) \
)
+#define INTERNAL_SYSCALL_ARM(name, err, nr, args...) \
+ INTERNAL_SYSCALL_NCS(__ARM_NR_##name, err, nr, args)
+
#if defined(__thumb__)
/* We can't use push/pop inside the asm because that breaks
unwinding (ie. thread cancellation).
@@ -83,10 +86,6 @@
} \
(int) __internal_sys_result; }) \
)
-
-#undef INTERNAL_SYSCALL_ARM
-#define INTERNAL_SYSCALL_ARM(name, err, nr, args...) \
- INTERNAL_SYSCALL_NCS(__ARM_NR_##name, err, nr, args)
#endif
#define INTERNAL_SYSCALL_ERROR_P(val, err) \
--
2.7.4

View File

@@ -0,0 +1,29 @@
From 71127e5cc937878883e6021da3da337a7aa9c099 Mon Sep 17 00:00:00 2001
From: Waldemar Brodkorb <wbx@openadk.org>
Date: Fri, 3 Feb 2017 06:04:16 +0100
Subject: [PATCH 10229/10229] fstat: make new code aarch64 specific
The new code get's used by MIPS64 N64 and fails.
Make the new code aarch64 specific.
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
---
libc/sysdeps/linux/common/fstat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libc/sysdeps/linux/common/fstat.c b/libc/sysdeps/linux/common/fstat.c
index ac77eb2..c27f926 100644
--- a/libc/sysdeps/linux/common/fstat.c
+++ b/libc/sysdeps/linux/common/fstat.c
@@ -21,7 +21,7 @@ int fstat(int fd, struct stat *buf)
}
libc_hidden_def(fstat)
-#elif __WORDSIZE == 64 && defined __NR_newfstatat
+#elif __WORDSIZE == 64 && defined __NR_newfstatat && __aarch64__
#include <fcntl.h>
int fstat(int fd, struct stat *buf)
--
2.1.4

View File

@@ -0,0 +1,38 @@
From 94810a91c48ac62daed55b4aec70d04a44c10795 Mon Sep 17 00:00:00 2001
From: Waldemar Brodkorb <wbx@openadk.org>
Date: Thu, 16 Feb 2017 20:22:21 +0100
Subject: [PATCH] arm: fix static linking issues
As reported by Buildroot developers these files causing static
linking issues. The original contribution with the ARM unwind-resume
rework and GNU libc sync was made before the combined libc change.
But the patch was applied later, after the libc change and
it seems the test coverage for static linking didn't catch it in
the regression testing. Remove the files.
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
---
libpthread/nptl/sysdeps/arm/pt-arm-unwind-resume.c | 2 --
libpthread/nptl/sysdeps/arm/rt-arm-unwind-resume.c | 1 -
2 files changed, 3 deletions(-)
delete mode 100644 libpthread/nptl/sysdeps/arm/pt-arm-unwind-resume.c
delete mode 100644 libpthread/nptl/sysdeps/arm/rt-arm-unwind-resume.c
diff --git a/libpthread/nptl/sysdeps/arm/pt-arm-unwind-resume.c b/libpthread/nptl/sysdeps/arm/pt-arm-unwind-resume.c
deleted file mode 100644
index fd0cec4..0000000
--- a/libpthread/nptl/sysdeps/arm/pt-arm-unwind-resume.c
+++ /dev/null
@@ -1,2 +0,0 @@
-__asm__ (".set __libgcc_s_init, pthread_cancel_init");
-#include <arm-unwind-resume.c>
diff --git a/libpthread/nptl/sysdeps/arm/rt-arm-unwind-resume.c b/libpthread/nptl/sysdeps/arm/rt-arm-unwind-resume.c
deleted file mode 100644
index 2641dc5..0000000
--- a/libpthread/nptl/sysdeps/arm/rt-arm-unwind-resume.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <arm-unwind-resume.c>
--
2.1.4

View File

@@ -1,59 +0,0 @@
From 9213ad631513d0e67d9d31465c9cdb3f3dde0399 Mon Sep 17 00:00:00 2001
From: Waldemar Brodkorb <wbx@uclibc-ng.org>
Date: Fri, 5 Aug 2016 21:33:44 +0200
Subject: [PATCH 2/3] sunrpc: Do not use alloca in clntudp_call
CVE-2016-4429:
The call is technically in a loop, and under certain circumstances
(which are quite difficult to reproduce in a test case), alloca
can be invoked repeatedly during a single call to clntudp_call.
As a result, the available stack space can be exhausted (even
though individual alloca sizes are bounded implicitly by what
can fit into a UDP packet, as a side effect of the earlier
successful send operation).
From GNU libc:
https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commit;h=bc779a1a5b3035133024b21e2f339fe4219fb11c
Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
---
libc/inet/rpc/clnt_udp.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/libc/inet/rpc/clnt_udp.c b/libc/inet/rpc/clnt_udp.c
index 4fc55b7..ce7e9e6 100644
--- a/libc/inet/rpc/clnt_udp.c
+++ b/libc/inet/rpc/clnt_udp.c
@@ -368,9 +368,15 @@ send_again:
struct sock_extended_err *e;
struct sockaddr_in err_addr;
struct iovec iov;
- char *cbuf = (char *) alloca (outlen + 256);
+ char *cbuf = malloc (outlen + 256);
int ret;
+ if (cbuf == NULL)
+ {
+ cu->cu_error.re_errno = errno;
+ return (cu->cu_error.re_status = RPC_CANTRECV);
+ }
+
iov.iov_base = cbuf + 256;
iov.iov_len = outlen;
msg.msg_name = (void *) &err_addr;
@@ -395,10 +401,12 @@ send_again:
cmsg = CMSG_NXTHDR (&msg, cmsg))
if (cmsg->cmsg_level == SOL_IP && cmsg->cmsg_type == IP_RECVERR)
{
+ free (cbuf);
e = (struct sock_extended_err *) CMSG_DATA(cmsg);
cu->cu_error.re_errno = e->ee_errno;
return (cu->cu_error.re_status = RPC_CANTRECV);
}
+ free (cbuf);
}
#endif
do
--
2.7.4 (Apple Git-66)

View File

@@ -1,54 +0,0 @@
From 3e40f9669279f005f7154892539166f5081fbcb2 Mon Sep 17 00:00:00 2001
From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
Date: Tue, 16 Aug 2016 15:04:27 -0700
Subject: [PATCH] ARC: Support syscall ABI v4
The syscall ABI includes the gcc functional calling ABI since a syscall
implies userland caller and kernel callee.
The current gcc ABI (v3) for ARCv2 ISA required 64-bit data be passed in
even-odd register pairs, (potentially punching reg holes when passing such
values as args). This was partly driven by the fact that the double-word
LDD/STD instructions in ARCv2 expect the register alignment and thus gcc
forcing this avoids extra MOV at the cost of a few unused register (which we
have plenty anyways).
This however was rejected as part of upstreaming gcc port to HS. So the new
ABI v4 doesn't enforce the even-odd reg restriction.
Do note that for ARCompact ISA builds v3 and v4 are practically the same in
terms of gcc code generation.
This change is dormant for now (gcc 4.8.x based tools) and will only kick
in with switch to gcc 6.x based tools.
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Vlad Zakharov <vzakhar@synopsys.com>
---
libc/sysdeps/linux/arc/bits/uClibc_arch_features.h | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/libc/sysdeps/linux/arc/bits/uClibc_arch_features.h b/libc/sysdeps/linux/arc/bits/uClibc_arch_features.h
index 5160724..94e089d 100755
--- a/libc/sysdeps/linux/arc/bits/uClibc_arch_features.h
+++ b/libc/sysdeps/linux/arc/bits/uClibc_arch_features.h
@@ -41,8 +41,14 @@
/* The default ';' is a comment on ARC. */
#define __UCLIBC_ASM_LINE_SEP__ `
-/* does your target align 64bit values in register pairs ? (32bit arches only) */
-#if defined(__A7__)
+/* does your target align 64bit values in register pairs ? (32bit arches only)
+ * - ARC700 never had any constraint on reg pairs (even if ABI v3)
+ * - Inital HS ABI (v3: non upstream gcc) had 64-bit data aligned in even-odd
+ * reg pairs (thus allowed reg holes when passing such args to calls)
+ * - Upstream gcc (6.x) HS ABI doesn't have that restriction
+ */
+
+#if defined(__A7__) || (__GNUC__ > 4)
#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
#else
#define __UCLIBC_SYSCALL_ALIGN_64BIT__
--
2.7.4

View File

@@ -0,0 +1,33 @@
From 228d03bf0032e5799e9bf04810170c0653ca846d Mon Sep 17 00:00:00 2001
From: Waldemar Brodkorb <wbx@openadk.org>
Date: Fri, 17 Feb 2017 22:33:49 +0100
Subject: [PATCH] or1k: add missing definition of ucontext
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
---
libc/sysdeps/linux/or1k/sys/ucontext.h | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/libc/sysdeps/linux/or1k/sys/ucontext.h b/libc/sysdeps/linux/or1k/sys/ucontext.h
index b11928e..dd97b60 100644
--- a/libc/sysdeps/linux/or1k/sys/ucontext.h
+++ b/libc/sysdeps/linux/or1k/sys/ucontext.h
@@ -20,6 +20,14 @@
#include <features.h>
#include <signal.h>
-#include <asm/ucontext.h>
+#include <bits/sigcontext.h>
+
+typedef struct ucontext {
+ unsigned long uc_flags;
+ struct ucontext *uc_link;
+ stack_t uc_stack;
+ struct sigcontext uc_mcontext;
+ sigset_t uc_sigmask; /* mask last for extensibility */
+} ucontext_t;
#endif /* sys/ucontext.h */
--
2.1.4

View File

@@ -1,12 +1,12 @@
if BR2_TOOLCHAIN_BUILDROOT_UCLIBC
comment "uClibc Options"
config BR2_PACKAGE_UCLIBC
bool
default y
select BR2_PACKAGE_LINUX_HEADERS
comment "uClibc Options"
config BR2_UCLIBC_CONFIG
string "uClibc configuration file to use?"
default "package/uclibc/uClibc-ng.config"
@@ -41,6 +41,7 @@ config BR2_TOOLCHAIN_BUILDROOT_LOCALE
bool "Enable toolchain locale/i18n support"
select BR2_TOOLCHAIN_BUILDROOT_WCHAR
select BR2_ENABLE_LOCALE
select BR2_NEEDS_HOST_UTF8_LOCALE
help
Enable this option if you want your toolchain to support
localization and internationalization.
@@ -56,12 +57,12 @@ choice
select BR2_TOOLCHAIN_HAS_THREADS
select BR2_TOOLCHAIN_HAS_THREADS_NPTL
depends on BR2_USE_MMU
depends on !BR2_m68k && !BR2_microblaze
depends on !BR2_m68k && !BR2_microblaze && !BR2_or1k
config BR2_PTHREADS
bool "linuxthreads"
select BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_bfin || BR2_m68k || BR2_microblaze || BR2_arm || BR2_armeb || BR2_xtensa
depends on BR2_bfin || BR2_m68k || BR2_microblaze || BR2_or1k || BR2_arm || BR2_armeb || BR2_xtensa
config BR2_PTHREADS_NONE
bool "none"
@@ -95,22 +96,6 @@ config BR2_UCLIBC_INSTALL_UTILS
You can save ~32 KiB in target space by disabling them since
they're normally not needed.
config BR2_UCLIBC_INSTALL_TEST_SUITE
bool "Compile and install uClibc tests"
help
Enabling this option will compile and install the uClibc test suite.
This is useful if you want to check if the uClibc library is working
for your architecture and/or help developing uClibc.
The test suite will be installed into /root/uClibc directory. To run
the test suite enter the /root/uClibc/test directory and type
"sh uclibcng-testrunner.sh".
See the /root/uClibc/test/README for additional information.
This is not needed at all for normal builds, so you can safely say no
if you do not plan to dig into your C library.
# Mapping from the Buildroot architecture configuration options to the
# uClibc architecture names.
config BR2_UCLIBC_TARGET_ARCH
@@ -121,6 +106,7 @@ config BR2_UCLIBC_TARGET_ARCH
default "m68k" if BR2_m68k
default "microblaze" if BR2_microblaze
default "mips" if BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
default "or1k" if BR2_or1k
default "powerpc" if BR2_powerpc
default "sh" if BR2_sh
default "sparc" if BR2_sparc
@@ -142,12 +128,11 @@ config BR2_UCLIBC_MIPS_ABI
default "N32" if BR2_MIPS_NABI32
default "N64" if BR2_MIPS_NABI64
config BR2_UCLIBC_MIPS_ISA
config BR2_UCLIBC_MIPS_NAN
string
depends on BR2_UCLIBC_TARGET_ARCH = "mips"
default "MIPS32" if BR2_mips_32
default "MIPS32R2" if BR2_mips_32r2
default "MIPS64" if BR2_mips_64
default "LEGACY" if BR2_MIPS_CPU_MIPS32 || BR2_MIPS_CPU_MIPS64
default "2008" if BR2_MIPS_CPU_MIPS32R6 || BR2_MIPS_CPU_MIPS64R6
config BR2_UCLIBC_SH_TYPE
string

View File

@@ -5,8 +5,6 @@ KERNEL_HEADERS="/usr/src/linux/include"
# UCLIBC_STATIC_LDCONFIG is not set
LDSO_RUNPATH=y
LDSO_RUNPATH_OF_EXECUTABLE=y
MALLOC_GLIBC_COMPAT=y
UCLIBC_HAS_OBSTACK=y
UCLIBC_HAS_UTMPX=y
UCLIBC_HAS_UTMP=y
UCLIBC_SUSV2_LEGACY=y

View File

@@ -1,2 +1,2 @@
# From http://www.uclibc-ng.org/
sha256 a2e7207634c19997e8b9f3e712182d80d42aaa85ce3462eff1a9bce812aaf354 uClibc-ng-1.0.17.tar.xz
sha256 f2004c85db8e07e9f1c2e8b7c513fa7c237bc9f9685d8e1bfc89535b8a85449b uClibc-ng-1.0.22.tar.xz

View File

@@ -4,7 +4,7 @@
#
################################################################################
UCLIBC_VERSION = 1.0.17
UCLIBC_VERSION = 1.0.22
UCLIBC_SOURCE = uClibc-ng-$(UCLIBC_VERSION).tar.xz
UCLIBC_SITE = http://downloads.uclibc-ng.org/releases/$(UCLIBC_VERSION)
UCLIBC_LICENSE = LGPLv2.1+
@@ -113,10 +113,9 @@ define UCLIBC_ARM_ABI_CONFIG
$(call KCONFIG_ENABLE_OPT,CONFIG_ARM_EABI,$(@D)/.config)
endef
# Thumb1 build is broken with threads with old gcc versions (4.7 and
# 4.8). Since all cores supporting Thumb1 also support ARM, we use ARM
# code in this case.
ifeq ($(BR2_GCC_VERSION_4_7_X)$(BR2_GCC_VERSION_4_8_X):$(BR2_ARM_INSTRUCTIONS_THUMB)$(BR2_TOOLCHAIN_HAS_THREADS),y:yy)
# Thumb1 build is broken with threads with old gcc versions (< 4.8). Since
# all cores supporting Thumb1 also support ARM, we use ARM code in this case.
ifeq ($(BR2_GCC_VERSION_4_8_X)$(BR2_ARM_INSTRUCTIONS_THUMB)$(BR2_TOOLCHAIN_HAS_THREADS),yyy)
UCLIBC_EXTRA_CFLAGS += -marm
endif
@@ -164,10 +163,10 @@ define UCLIBC_MIPS_ABI_CONFIG
$(call KCONFIG_ENABLE_OPT,$(UCLIBC_MIPS_ABI),$(@D)/.config)
endef
UCLIBC_MIPS_ISA = CONFIG_MIPS_ISA_$(call qstrip,$(BR2_UCLIBC_MIPS_ISA))
define UCLIBC_MIPS_ISA_CONFIG
$(SED) '/CONFIG_MIPS_ISA_.*/d' $(@D)/.config
$(call KCONFIG_ENABLE_OPT,$(UCLIBC_MIPS_ISA),$(@D)/.config)
UCLIBC_MIPS_NAN = CONFIG_MIPS_NAN_$(call qstrip,$(BR2_UCLIBC_MIPS_NAN))
define UCLIBC_MIPS_NAN_CONFIG
$(SED) '/CONFIG_MIPS_NAN_.*/d' $(@D)/.config
$(call KCONFIG_ENABLE_OPT,$(UCLIBC_MIPS_NAN),$(@D)/.config)
endef
endif # mips
@@ -248,14 +247,6 @@ define UCLIBC_ENDIAN_CONFIG
endef
endif
#
# Largefile
#
define UCLIBC_LARGEFILE_CONFIG
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_LFS,$(@D)/.config)
endef
#
# MMU
#
@@ -427,7 +418,7 @@ define UCLIBC_KCONFIG_FIXUP_CMDS
$(UCLIBC_ARM_NO_CONTEXT_FUNCS)
$(UCLIBC_M68K_BINFMT_FLAT)
$(UCLIBC_MIPS_ABI_CONFIG)
$(UCLIBC_MIPS_ISA_CONFIG)
$(UCLIBC_MIPS_NAN_CONFIG)
$(UCLIBC_SH_TYPE_CONFIG)
$(UCLIBC_SPARC_TYPE_CONFIG)
$(UCLIBC_POWERPC_TYPE_CONFIG)
@@ -446,16 +437,6 @@ define UCLIBC_KCONFIG_FIXUP_CMDS
$(UCLIBC_SHARED_LIBS_CONFIG)
endef
ifeq ($(BR2_UCLIBC_INSTALL_TEST_SUITE),y)
define UCLIBC_BUILD_TEST_SUITE
$(MAKE) -C $(@D) \
$(UCLIBC_MAKE_FLAGS) \
TEST_INSTALLED_UCLIBC=1 \
UCLIBC_ONLY=1 \
test_compile test_gen
endef
endif
define UCLIBC_BUILD_CMDS
$(MAKE) -C $(@D) $(UCLIBC_MAKE_FLAGS) headers
$(MAKE) -C $(@D) $(UCLIBC_MAKE_FLAGS)
@@ -464,14 +445,6 @@ define UCLIBC_BUILD_CMDS
HOSTCC="$(HOSTCC)" hostutils
endef
ifeq ($(BR2_UCLIBC_INSTALL_TEST_SUITE),y)
define UCLIBC_INSTALL_TEST_SUITE
mkdir -p $(TARGET_DIR)/root/uClibc
cp -rdpf $(@D)/test $(TARGET_DIR)/root/uClibc
find $(TARGET_DIR)/root/uClibc -name \*.o -exec rm {} \;
endef
endif
ifeq ($(BR2_UCLIBC_INSTALL_UTILS),y)
define UCLIBC_INSTALL_UTILS_TARGET
$(MAKE1) -C $(@D) \
@@ -490,8 +463,6 @@ define UCLIBC_INSTALL_TARGET_CMDS
RUNTIME_PREFIX=/ \
install_runtime
$(UCLIBC_INSTALL_UTILS_TARGET)
$(UCLIBC_BUILD_TEST_SUITE)
$(UCLIBC_INSTALL_TEST_SUITE)
$(UCLIBC_INSTALL_LDSO_SYMLINKS)
endef