Update buidlroot to version 2016.08.1
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
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
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
From 5e9a78c8a839381add6faa61e196e6dad9143163 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Claveirole <thomas.claveirole@green-communications.fr>
|
||||
Date: Tue, 2 Feb 2016 12:13:09 +0100
|
||||
Subject: [PATCH] include/netdb.h: Do not define IDN-related flags.
|
||||
|
||||
getaddrinfo() does not implement IDN encoding, and always fail when
|
||||
provided an IDN flag (e.g., AI_IDN) with EAI_BADFLAGS. Some packages
|
||||
(such as the VLC media player) check for AI_IDN before they use it;
|
||||
providing an unimplemented AI_IDN in the libc makes these package
|
||||
fail. As a result they make calls to getaddrinfo() with AI_IDN that
|
||||
always fail while they could have made successful calls without AI_IDN
|
||||
instead.
|
||||
|
||||
Thus, do not define IDN flags: it is better not to compile rather than
|
||||
to compile a code that always fail.
|
||||
|
||||
Signed-off-by: Thomas Claveirole <thomas.claveirole@green-communications.fr>
|
||||
Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
|
||||
---
|
||||
include/netdb.h | 11 -----------
|
||||
1 file changed, 11 deletions(-)
|
||||
|
||||
diff --git a/include/netdb.h b/include/netdb.h
|
||||
index a636b5f..95abe95 100644
|
||||
--- a/include/netdb.h
|
||||
+++ b/include/netdb.h
|
||||
@@ -627,16 +627,6 @@ struct addrinfo
|
||||
# define AI_ALL 0x0010 /* Return IPv4 mapped and IPv6 addresses. */
|
||||
# define AI_ADDRCONFIG 0x0020 /* Use configuration of this host to choose
|
||||
returned address type.. */
|
||||
-# ifdef __USE_GNU
|
||||
-# define AI_IDN 0x0040 /* IDN encode input (assuming it is encoded
|
||||
- in the current locale's character set)
|
||||
- before looking it up. */
|
||||
-# define AI_CANONIDN 0x0080 /* Translate canonical name from IDN format. */
|
||||
-# define AI_IDN_ALLOW_UNASSIGNED 0x0100 /* Don't reject unassigned Unicode
|
||||
- code points. */
|
||||
-# define AI_IDN_USE_STD3_ASCII_RULES 0x0200 /* Validate strings according to
|
||||
- STD3 rules. */
|
||||
-# endif
|
||||
# define AI_NUMERICSERV 0x0400 /* Don't use name resolution. */
|
||||
|
||||
/* Error values for `getaddrinfo' function. */
|
||||
@@ -658,7 +648,6 @@ struct addrinfo
|
||||
# define EAI_NOTCANCELED -102 /* Request not canceled. */
|
||||
# define EAI_ALLDONE -103 /* All requests done. */
|
||||
# define EAI_INTR -104 /* Interrupted by a signal. */
|
||||
-# define EAI_IDN_ENCODE -105 /* IDN encoding failed. */
|
||||
# endif
|
||||
|
||||
# ifdef __USE_MISC
|
||||
--
|
||||
1.7.10.4
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
From b499fe614ac5b492fc0fdc6e1fbbeeb904674159 Mon Sep 17 00:00:00 2001
|
||||
From: Waldemar Brodkorb <wbx@uclibc-ng.org>
|
||||
Date: Wed, 3 Feb 2016 21:57:04 +0100
|
||||
Subject: [PATCH] mips: fix build if threads are disabled
|
||||
|
||||
Reported-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
|
||||
Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
|
||||
---
|
||||
libc/string/mips/memcpy.S | 4 ++--
|
||||
libc/string/mips/memset.S | 4 ++--
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/libc/string/mips/memcpy.S b/libc/string/mips/memcpy.S
|
||||
index 3afdb2c..59f9f0a 100644
|
||||
--- a/libc/string/mips/memcpy.S
|
||||
+++ b/libc/string/mips/memcpy.S
|
||||
@@ -23,7 +23,7 @@
|
||||
# define PREFETCH_STORE_HINT PREFETCH_HINT_PREPAREFORSTORE
|
||||
#elif _LIBC
|
||||
# include <sysdep.h>
|
||||
-# include <regdef.h>
|
||||
+# include <sys/regdef.h>
|
||||
# include <sys/asm.h>
|
||||
# define PREFETCH_LOAD_HINT PREFETCH_HINT_LOAD_STREAMED
|
||||
# define PREFETCH_STORE_HINT PREFETCH_HINT_PREPAREFORSTORE
|
||||
@@ -33,7 +33,7 @@
|
||||
# define PREFETCH_LOAD_HINT PREFETCH_HINT_LOAD_STREAMED
|
||||
# define PREFETCH_STORE_HINT PREFETCH_HINT_PREPAREFORSTORE
|
||||
#else
|
||||
-# include <regdef.h>
|
||||
+# include <sys/regdef.h>
|
||||
# include <sys/asm.h>
|
||||
#endif
|
||||
|
||||
diff --git a/libc/string/mips/memset.S b/libc/string/mips/memset.S
|
||||
index ef8ab0b..43034ce 100644
|
||||
--- a/libc/string/mips/memset.S
|
||||
+++ b/libc/string/mips/memset.S
|
||||
@@ -21,7 +21,7 @@
|
||||
# define PREFETCH_STORE_HINT PREFETCH_HINT_PREPAREFORSTORE
|
||||
#elif _LIBC
|
||||
# include <sysdep.h>
|
||||
-# include <regdef.h>
|
||||
+# include <sys/regdef.h>
|
||||
# include <sys/asm.h>
|
||||
# define PREFETCH_STORE_HINT PREFETCH_HINT_PREPAREFORSTORE
|
||||
#elif defined _COMPILING_NEWLIB
|
||||
@@ -29,7 +29,7 @@
|
||||
# include "machine/regdef.h"
|
||||
# define PREFETCH_STORE_HINT PREFETCH_HINT_PREPAREFORSTORE
|
||||
#else
|
||||
-# include <regdef.h>
|
||||
+# include <sys/regdef.h>
|
||||
# include <sys/asm.h>
|
||||
#endif
|
||||
|
||||
--
|
||||
1.7.10.4
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
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)
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
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
|
||||
|
||||
@@ -47,34 +47,30 @@ config BR2_TOOLCHAIN_BUILDROOT_LOCALE
|
||||
|
||||
choice
|
||||
prompt "Thread library implementation"
|
||||
default BR2_PTHREADS_NATIVE
|
||||
help
|
||||
Use this option to select the thread library implementation
|
||||
that should be used in your toolchain.
|
||||
|
||||
config BR2_PTHREADS_NONE
|
||||
bool "none"
|
||||
|
||||
config BR2_PTHREADS
|
||||
bool "linuxthreads"
|
||||
select BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on BR2_m68k
|
||||
|
||||
config BR2_PTHREADS_OLD
|
||||
bool "linuxthreads (stable/old)"
|
||||
select BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on BR2_m68k || BR2_arm || BR2_armeb
|
||||
|
||||
config BR2_PTHREADS_NATIVE
|
||||
bool "Native POSIX Threading (NPTL)"
|
||||
select BR2_TOOLCHAIN_HAS_THREADS
|
||||
select BR2_TOOLCHAIN_HAS_THREADS_NPTL
|
||||
depends on !BR2_m68k && !BR2_x86_i386
|
||||
depends on BR2_USE_MMU
|
||||
depends on !BR2_m68k && !BR2_microblaze
|
||||
|
||||
config BR2_PTHREADS
|
||||
bool "linuxthreads"
|
||||
select BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on BR2_bfin || BR2_m68k || BR2_microblaze || BR2_arm || BR2_armeb || BR2_xtensa
|
||||
|
||||
config BR2_PTHREADS_NONE
|
||||
bool "none"
|
||||
|
||||
endchoice
|
||||
|
||||
config BR2_PTHREAD_DEBUG
|
||||
bool "Thread library debugging"
|
||||
depends on BR2_PTHREADS || BR2_PTHREADS_OLD || BR2_PTHREADS_NATIVE
|
||||
depends on BR2_PTHREADS || BR2_PTHREADS_NATIVE
|
||||
select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
|
||||
help
|
||||
Build the thread library with debugging enabled.
|
||||
@@ -101,8 +97,6 @@ config BR2_UCLIBC_INSTALL_UTILS
|
||||
|
||||
config BR2_UCLIBC_INSTALL_TEST_SUITE
|
||||
bool "Compile and install uClibc tests"
|
||||
select BR2_PACKAGE_MAKE
|
||||
depends on BR2_USE_MMU # make
|
||||
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
|
||||
@@ -110,7 +104,7 @@ config BR2_UCLIBC_INSTALL_TEST_SUITE
|
||||
|
||||
The test suite will be installed into /root/uClibc directory. To run
|
||||
the test suite enter the /root/uClibc/test directory and type
|
||||
"make UCLIBC_ONLY=1 CC=/bin/true check".
|
||||
"sh uclibcng-testrunner.sh".
|
||||
|
||||
See the /root/uClibc/test/README for additional information.
|
||||
|
||||
@@ -123,7 +117,9 @@ config BR2_UCLIBC_TARGET_ARCH
|
||||
string
|
||||
default "arc" if BR2_arcle || BR2_arceb
|
||||
default "arm" if BR2_arm || BR2_armeb
|
||||
default "bfin" if BR2_bfin
|
||||
default "m68k" if BR2_m68k
|
||||
default "microblaze" if BR2_microblaze
|
||||
default "mips" if BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
|
||||
default "powerpc" if BR2_powerpc
|
||||
default "sh" if BR2_sh
|
||||
@@ -139,11 +135,6 @@ config BR2_UCLIBC_ARC_TYPE
|
||||
default "ARC_CPU_700" if BR2_arc770d
|
||||
default "ARC_CPU_HS" if BR2_archs38
|
||||
|
||||
config BR2_UCLIBC_ARM_BX
|
||||
bool
|
||||
depends on BR2_UCLIBC_TARGET_ARCH = "arm"
|
||||
default y if (BR2_ARM_CPU_HAS_THUMB || BR2_ARM_CPU_HAS_THUMB2)
|
||||
|
||||
config BR2_UCLIBC_MIPS_ABI
|
||||
string
|
||||
depends on BR2_UCLIBC_TARGET_ARCH = "mips"
|
||||
@@ -179,7 +170,6 @@ config BR2_UCLIBC_POWERPC_TYPE
|
||||
config BR2_UCLIBC_X86_TYPE
|
||||
string
|
||||
depends on BR2_UCLIBC_TARGET_ARCH = "i386"
|
||||
default "386" if BR2_x86_i386
|
||||
default "486" if BR2_x86_i486
|
||||
default "586" if BR2_x86_i586
|
||||
default "586MMX" if BR2_x86_pentium_mmx
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
DO_C99_MATH=y
|
||||
DO_XSI_MATH=y
|
||||
KERNEL_HEADERS="/usr/src/linux/include"
|
||||
# LDSO_CACHE_SUPPORT is not set
|
||||
# UCLIBC_STATIC_LDCONFIG is not set
|
||||
@@ -16,6 +17,8 @@ UCLIBC_HAS_PROGRAM_INVOCATION_NAME=y
|
||||
UCLIBC_HAS_GETPT=y
|
||||
UCLIBC_HAS_LIBUTIL=y
|
||||
UCLIBC_HAS_OBSOLETE_BSD_SIGNAL=y
|
||||
UCLIBC_HAS_SHA256_CRYPT_IMPL=y
|
||||
UCLIBC_HAS_SHA512_CRYPT_IMPL=y
|
||||
UCLIBC_USE_NETLINK=y
|
||||
UCLIBC_SUPPORT_AI_ADDRCONFIG=y
|
||||
UCLIBC_HAS_RESOLVER_SUPPORT=y
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
# From http://www.uclibc-ng.org/
|
||||
sha256 c238b300356b2638432e023076293f29935094108a2714ad1762b76015fae729 uClibc-ng-1.0.12.tar.xz
|
||||
sha256 a2e7207634c19997e8b9f3e712182d80d42aaa85ce3462eff1a9bce812aaf354 uClibc-ng-1.0.17.tar.xz
|
||||
|
||||
@@ -4,13 +4,17 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
UCLIBC_VERSION = 1.0.12
|
||||
UCLIBC_VERSION = 1.0.17
|
||||
UCLIBC_SOURCE = uClibc-ng-$(UCLIBC_VERSION).tar.xz
|
||||
UCLIBC_SITE = http://downloads.uclibc-ng.org/releases/$(UCLIBC_VERSION)
|
||||
UCLIBC_LICENSE = LGPLv2.1+
|
||||
UCLIBC_LICENSE_FILES = COPYING.LIB
|
||||
UCLIBC_INSTALL_STAGING = YES
|
||||
|
||||
define UCLIBC_HELP_CMDS
|
||||
@echo ' uclibc-menuconfig - Run uClibc menuconfig'
|
||||
endef
|
||||
|
||||
# uclibc is part of the toolchain so disable the toolchain dependency
|
||||
UCLIBC_ADD_TOOLCHAIN_DEPENDENCY = NO
|
||||
|
||||
@@ -47,6 +51,40 @@ UCLIBC_LOCALES = \
|
||||
$(firstword $(subst .,$(space),$(locale))))
|
||||
endif
|
||||
|
||||
# noMMU binary formats
|
||||
ifeq ($(BR2_BINFMT_FDPIC),y)
|
||||
define UCLIBC_BINFMT_CONFIG
|
||||
$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FLAT,$(@D)/.config)
|
||||
$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FLAT_SEP_DATA,$(@D)/.config)
|
||||
$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_SHARED_FLAT,$(@D)/.config)
|
||||
$(call KCONFIG_ENABLE_OPT,UCLIBC_FORMAT_FDPIC_ELF,$(@D)/.config)
|
||||
endef
|
||||
endif
|
||||
ifeq ($(BR2_BINFMT_FLAT_ONE),y)
|
||||
define UCLIBC_BINFMT_CONFIG
|
||||
$(call KCONFIG_ENABLE_OPT,UCLIBC_FORMAT_FLAT,$(@D)/.config)
|
||||
$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FLAT_SEP_DATA,$(@D)/.config)
|
||||
$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_SHARED_FLAT,$(@D)/.config)
|
||||
$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FDPIC_ELF,$(@D)/.config)
|
||||
endef
|
||||
endif
|
||||
ifeq ($(BR2_BINFMT_FLAT_SEP_DATA),y)
|
||||
define UCLIBC_BINFMT_CONFIG
|
||||
$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FLAT,$(@D)/.config)
|
||||
$(call KCONFIG_ENABLE_OPT,UCLIBC_FORMAT_FLAT_SEP_DATA,$(@D)/.config)
|
||||
$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_SHARED_FLAT,$(@D)/.config)
|
||||
$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FDPIC_ELF,$(@D)/.config)
|
||||
endef
|
||||
endif
|
||||
ifeq ($(BR2_BINFMT_FLAT_SHARED),y)
|
||||
define UCLIBC_BINFMT_CONFIG
|
||||
$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FLAT,$(@D)/.config)
|
||||
$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FLAT_SEP_DATA,$(@D)/.config)
|
||||
$(call KCONFIG_ENABLE_OPT,UCLIBC_FORMAT_SHARED_FLAT,$(@D)/.config)
|
||||
$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FDPIC_ELF,$(@D)/.config)
|
||||
endef
|
||||
endif
|
||||
|
||||
#
|
||||
# ARC definitions
|
||||
#
|
||||
@@ -75,23 +113,46 @@ define UCLIBC_ARM_ABI_CONFIG
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_ARM_EABI,$(@D)/.config)
|
||||
endef
|
||||
|
||||
# Thumb build is broken with threads, build in ARM mode
|
||||
ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB)$(BR2_TOOLCHAIN_HAS_THREADS),yy)
|
||||
# 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)
|
||||
UCLIBC_EXTRA_CFLAGS += -marm
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_UCLIBC_ARM_BX),y)
|
||||
define UCLIBC_ARM_BX_CONFIG
|
||||
$(call KCONFIG_ENABLE_OPT,USE_BX,$(@D)/.config)
|
||||
ifeq ($(BR2_BINFMT_FLAT),y)
|
||||
define UCLIBC_ARM_BINFMT_FLAT
|
||||
$(call KCONFIG_DISABLE_OPT,DOPIC,$(@D)/.config)
|
||||
endef
|
||||
else
|
||||
define UCLIBC_ARM_BX_CONFIG
|
||||
$(call KCONFIG_DISABLE_OPT,USE_BX,$(@D)/.config)
|
||||
endif
|
||||
|
||||
# context functions are written with ARM instructions. Therefore, if
|
||||
# we are using a Thumb2-only platform (i.e, Cortex-M), they must be
|
||||
# disabled. Thumb1 platforms are not a problem, since they all also
|
||||
# support the ARM instructions.
|
||||
ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB2):$(BR2_ARM_CPU_HAS_ARM),y:)
|
||||
define UCLIBC_ARM_NO_CONTEXT_FUNCS
|
||||
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_CONTEXT_FUNCS,$(@D)/.config)
|
||||
endef
|
||||
endif
|
||||
|
||||
endif # arm
|
||||
|
||||
#
|
||||
# m68k/coldfire definitions
|
||||
#
|
||||
|
||||
ifeq ($(UCLIBC_TARGET_ARCH),m68k)
|
||||
|
||||
# disable DOPIC for flat without separate data
|
||||
ifeq ($(BR2_BINFMT_FLAT_ONE),y)
|
||||
define UCLIBC_M68K_BINFMT_FLAT
|
||||
$(call KCONFIG_DISABLE_OPT,DOPIC,$(@D)/.config)
|
||||
endef
|
||||
endif
|
||||
|
||||
endif # m68k/coldfire
|
||||
|
||||
#
|
||||
# MIPS definitions
|
||||
#
|
||||
@@ -158,6 +219,15 @@ define UCLIBC_X86_TYPE_CONFIG
|
||||
endef
|
||||
endif
|
||||
|
||||
#
|
||||
# Debug
|
||||
#
|
||||
ifeq ($(BR2_ENABLE_DEBUG),y)
|
||||
define UCLIBC_DEBUG_CONFIG
|
||||
$(call KCONFIG_ENABLE_OPT,DODEBUG,$(@D)/.config)
|
||||
endef
|
||||
endif
|
||||
|
||||
#
|
||||
# Endianness
|
||||
#
|
||||
@@ -262,29 +332,19 @@ endif
|
||||
ifeq ($(BR2_PTHREADS_NONE),y)
|
||||
define UCLIBC_THREAD_CONFIG
|
||||
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_THREADS,$(@D)/.config)
|
||||
$(call KCONFIG_DISABLE_OPT,LINUXTHREADS,$(@D)/.config)
|
||||
$(call KCONFIG_DISABLE_OPT,LINUXTHREADS_OLD,$(@D)/.config)
|
||||
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_LINUXTHREADS,$(@D)/.config)
|
||||
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_THREADS_NATIVE,$(@D)/.config)
|
||||
endef
|
||||
else ifeq ($(BR2_PTHREADS),y)
|
||||
define UCLIBC_THREAD_CONFIG
|
||||
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_THREADS,$(@D)/.config)
|
||||
$(call KCONFIG_ENABLE_OPT,LINUXTHREADS_NEW,$(@D)/.config)
|
||||
$(call KCONFIG_DISABLE_OPT,LINUXTHREADS_OLD,$(@D)/.config)
|
||||
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_THREADS_NATIVE,$(@D)/.config)
|
||||
endef
|
||||
else ifeq ($(BR2_PTHREADS_OLD),y)
|
||||
define UCLIBC_THREAD_CONFIG
|
||||
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_THREADS,$(@D)/.config)
|
||||
$(call KCONFIG_DISABLE_OPT,LINUXTHREADS_NEW,$(@D)/.config)
|
||||
$(call KCONFIG_ENABLE_OPT,LINUXTHREADS_OLD,$(@D)/.config)
|
||||
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_LINUXTHREADS,$(@D)/.config)
|
||||
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_THREADS_NATIVE,$(@D)/.config)
|
||||
endef
|
||||
else ifeq ($(BR2_PTHREADS_NATIVE),y)
|
||||
define UCLIBC_THREAD_CONFIG
|
||||
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_THREADS,$(@D)/.config)
|
||||
$(call KCONFIG_DISABLE_OPT,LINUXTHREADS_NEW,$(@D)/.config)
|
||||
$(call KCONFIG_DISABLE_OPT,LINUXTHREADS_OLD,$(@D)/.config)
|
||||
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_LINUXTHREADS,$(@D)/.config)
|
||||
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_THREADS_NATIVE,$(@D)/.config)
|
||||
endef
|
||||
endif
|
||||
@@ -359,16 +419,20 @@ define UCLIBC_KCONFIG_FIXUP_CMDS
|
||||
$(call KCONFIG_SET_OPT,DEVEL_PREFIX,"/usr",$(@D)/.config)
|
||||
$(call KCONFIG_SET_OPT,SHARED_LIB_LOADER_PREFIX,"/lib",$(@D)/.config)
|
||||
$(UCLIBC_MMU_CONFIG)
|
||||
$(UCLIBC_BINFMT_CONFIG)
|
||||
$(UCLIBC_ARC_TYPE_CONFIG)
|
||||
$(UCLIBC_ARC_PAGE_SIZE_CONFIG)
|
||||
$(UCLIBC_ARM_ABI_CONFIG)
|
||||
$(UCLIBC_ARM_BX_CONFIG)
|
||||
$(UCLIBC_ARM_BINFMT_FLAT)
|
||||
$(UCLIBC_ARM_NO_CONTEXT_FUNCS)
|
||||
$(UCLIBC_M68K_BINFMT_FLAT)
|
||||
$(UCLIBC_MIPS_ABI_CONFIG)
|
||||
$(UCLIBC_MIPS_ISA_CONFIG)
|
||||
$(UCLIBC_SH_TYPE_CONFIG)
|
||||
$(UCLIBC_SPARC_TYPE_CONFIG)
|
||||
$(UCLIBC_POWERPC_TYPE_CONFIG)
|
||||
$(UCLIBC_X86_TYPE_CONFIG)
|
||||
$(UCLIBC_DEBUG_CONFIG)
|
||||
$(UCLIBC_ENDIAN_CONFIG)
|
||||
$(UCLIBC_LARGEFILE_CONFIG)
|
||||
$(UCLIBC_IPV6_CONFIG)
|
||||
@@ -384,11 +448,11 @@ endef
|
||||
|
||||
ifeq ($(BR2_UCLIBC_INSTALL_TEST_SUITE),y)
|
||||
define UCLIBC_BUILD_TEST_SUITE
|
||||
$(MAKE1) -C $(@D) \
|
||||
$(MAKE) -C $(@D) \
|
||||
$(UCLIBC_MAKE_FLAGS) \
|
||||
TEST_INSTALLED_UCLIBC=1 \
|
||||
UCLIBC_ONLY=1 \
|
||||
test_compile
|
||||
test_compile test_gen
|
||||
endef
|
||||
endif
|
||||
|
||||
@@ -404,8 +468,7 @@ 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
|
||||
$(INSTALL) -D -m 0644 $(@D)/Rules.mak $(TARGET_DIR)/root/uClibc/Rules.mak
|
||||
$(INSTALL) -D -m 0644 $(@D)/.config $(TARGET_DIR)/root/uClibc/.config
|
||||
find $(TARGET_DIR)/root/uClibc -name \*.o -exec rm {} \;
|
||||
endef
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user