This commit is contained in:
TriForceX
2021-03-13 22:13:38 -03:00
parent c77595adbd
commit b3ecc6e32d
7043 changed files with 119377 additions and 73694 deletions

View File

@@ -1,169 +0,0 @@
From 8a73a967e18c55199785bae0f22dc94d9b2f8985 Mon Sep 17 00:00:00 2001
From: Waldemar Brodkorb <wbrodkorb@conet.de>
Date: Tue, 27 Nov 2018 15:41:37 +0100
Subject: [PATCH] statfs.h: sync generic header with glibc
Fix issues with aarch64 and df with mismatching header between kernel
and libc.
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
---
.../linux/common-generic/bits/statfs.h | 84 +++++++++----------
libc/sysdeps/linux/common/fstatfs.c | 9 --
libc/sysdeps/linux/common/statfs.c | 10 ---
3 files changed, 40 insertions(+), 63 deletions(-)
diff --git a/libc/sysdeps/linux/common-generic/bits/statfs.h b/libc/sysdeps/linux/common-generic/bits/statfs.h
index a2767b49a..23519a57e 100644
--- a/libc/sysdeps/linux/common-generic/bits/statfs.h
+++ b/libc/sysdeps/linux/common-generic/bits/statfs.h
@@ -11,65 +11,61 @@
#include <endian.h>
#include <bits/align64bit.h>
#include <bits/types.h>
+#include <bits/wordsize.h>
+/* 64-bit libc uses the kernel's 'struct statfs', accessed via the
+ statfs() syscall; 32-bit libc uses the kernel's 'struct statfs64'
+ and accesses it via the statfs64() syscall. All the various
+ APIs offered by libc use the kernel shape for their struct statfs
+ structure; the only difference is that 32-bit programs not
+ using __USE_FILE_OFFSET64 only see the low 32 bits of some
+ of the fields (the __fsblkcnt_t and __fsfilcnt_t fields). */
+
+#if defined __USE_FILE_OFFSET64
+# define __field64(type, type64, name) type64 name
+#elif __WORDSIZE == 64
+# define __field64(type, type64, name) type name
+#elif __BYTE_ORDER == __LITTLE_ENDIAN
+# define __field64(type, type64, name) \
+ type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad
+#else
+# define __field64(type, type64, name) \
+ int __##name##_pad __attribute__((__aligned__ (__alignof__ (type64)))); type name
+#endif
struct statfs
{
- __U32_TYPE f_type;
- __U32_TYPE f_bsize;
-#ifndef __USE_FILE_OFFSET64
-# if __BYTE_ORDER == __LITTLE_ENDIAN
- __U32_TYPE f_blocks;
- __U32_TYPE __pad1;
- __U32_TYPE f_bfree;
- __U32_TYPE __pad2;
- __U32_TYPE f_bavail;
- __U32_TYPE __pad3;
- __U32_TYPE f_files;
- __U32_TYPE __pad4;
- __U32_TYPE f_ffree;
- __U32_TYPE __pad5;
-# else
- __U32_TYPE __pad1;
- __U32_TYPE f_blocks;
- __U32_TYPE __pad2;
- __U32_TYPE f_bfree;
- __U32_TYPE __pad3;
- __U32_TYPE f_bavail;
- __U32_TYPE __pad4;
- __U32_TYPE f_files;
- __U32_TYPE __pad5;
- __U32_TYPE f_ffree;
-# endif /* __LITTLE_ENDIAN */
-#else
- __U64_TYPE f_blocks;
- __U64_TYPE f_bfree;
- __U64_TYPE f_bavail;
- __U64_TYPE f_files;
- __U64_TYPE f_ffree;
-#endif /* __USE_FILE_OFFSET64 */
+ __SWORD_TYPE f_type;
+ __SWORD_TYPE f_bsize;
+ __field64(__fsblkcnt_t, __fsblkcnt64_t, f_blocks);
+ __field64(__fsblkcnt_t, __fsblkcnt64_t, f_bfree);
+ __field64(__fsblkcnt_t, __fsblkcnt64_t, f_bavail);
+ __field64(__fsfilcnt_t, __fsfilcnt64_t, f_files);
+ __field64(__fsfilcnt_t, __fsfilcnt64_t, f_ffree);
__fsid_t f_fsid;
- __U32_TYPE f_namelen;
- __U32_TYPE f_frsize;
- __U32_TYPE f_flags;
- __U32_TYPE f_spare[4];
- } __ARCH_64BIT_ALIGNMENT__;
+ __SWORD_TYPE f_namelen;
+ __SWORD_TYPE f_frsize;
+ __SWORD_TYPE f_flags;
+ __SWORD_TYPE f_spare[4];
+ };
+
+#undef __field64
#ifdef __USE_LARGEFILE64
struct statfs64
{
- __U32_TYPE f_type;
- __U32_TYPE f_bsize;
+ __SWORD_TYPE f_type;
+ __SWORD_TYPE f_bsize;
__U64_TYPE f_blocks;
__U64_TYPE f_bfree;
__U64_TYPE f_bavail;
__U64_TYPE f_files;
__U64_TYPE f_ffree;
__fsid_t f_fsid;
- __U32_TYPE f_namelen;
- __U32_TYPE f_frsize;
- __U32_TYPE f_flags;
- __U32_TYPE f_spare[4];
+ __SWORD_TYPE f_namelen;
+ __SWORD_TYPE f_frsize;
+ __SWORD_TYPE f_flags;
+ __SWORD_TYPE f_spare[4];
};
#endif
diff --git a/libc/sysdeps/linux/common/fstatfs.c b/libc/sysdeps/linux/common/fstatfs.c
index fcb0820eb..0b2709ce3 100644
--- a/libc/sysdeps/linux/common/fstatfs.c
+++ b/libc/sysdeps/linux/common/fstatfs.c
@@ -30,15 +30,6 @@ _syscall2(int, __libc_fstatfs, int, fd, struct statfs *, buf)
int __libc_fstatfs (int __fildes, struct statfs *__buf)
{
int err = INLINE_SYSCALL(fstatfs64, 3, __fildes, sizeof(*__buf), __buf);
-
- if (err == 0) {
- /* Did we overflow? */
- if (__buf->__pad1 || __buf->__pad2 || __buf->__pad3 ||
- __buf->__pad4 || __buf->__pad5) {
- __set_errno(EOVERFLOW);
- return -1;
- }
- }
return err;
};
/* Redefined fstatfs because we need it for backwards compatibility */
diff --git a/libc/sysdeps/linux/common/statfs.c b/libc/sysdeps/linux/common/statfs.c
index ab9ec0e56..2990ff3e2 100644
--- a/libc/sysdeps/linux/common/statfs.c
+++ b/libc/sysdeps/linux/common/statfs.c
@@ -18,16 +18,6 @@ extern __typeof(statfs) __libc_statfs attribute_hidden;
int __libc_statfs(const char *path, struct statfs *buf)
{
int err = INLINE_SYSCALL(statfs64, 3, path, sizeof(*buf), buf);
-
- if (err == 0) {
- /* Did we overflow? */
- if (buf->__pad1 || buf->__pad2 || buf->__pad3 ||
- buf->__pad4 || buf->__pad5) {
- __set_errno(EOVERFLOW);
- return -1;
- }
- }
-
return err;
}
# if defined __UCLIBC_LINUX_SPECIFIC__ || defined __UCLIBC_HAS_THREADS_NATIVE__
--
2.19.1

View File

@@ -1,93 +0,0 @@
From 0cae9700a4a421dc22c80d205fbae4d01fdd1356 Mon Sep 17 00:00:00 2001
From: Max Filippov <jcmvbkbc@gmail.com>
Date: Wed, 12 Dec 2018 06:58:01 -0800
Subject: [PATCH] xtensa: add custom bits/poll.h
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Definitions of POLLWRNORM, POLLWRBAND and POLLREMOVE in xtensa linux
kernel are non-standard. Provide bits/poll.h with correct values for
these constants.
This fixes the following strace build errors:
In file included from xlat/pollflags.h:4:0,
from poll.c:34:
./static_assert.h:40:24: error: static assertion failed: "POLLWRBAND != 0x0100"
# define static_assert _Static_assert
^
xlat/pollflags.h:75:1: note: in expansion of macro static_assert
static_assert((POLLWRBAND) == (0x0100), "POLLWRBAND != 0x0100");
^~~~~~~~~~~~~
./static_assert.h:40:24: error: static assertion failed: "POLLREMOVE != 0x0800"
# define static_assert _Static_assert
^
xlat/pollflags.h:117:1: note: in expansion of macro static_assert
static_assert((POLLREMOVE) == (0x0800), "POLLREMOVE != 0x0800");
^~~~~~~~~~~~~
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
libc/sysdeps/linux/xtensa/bits/poll.h | 49 +++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
create mode 100644 libc/sysdeps/linux/xtensa/bits/poll.h
diff --git a/libc/sysdeps/linux/xtensa/bits/poll.h b/libc/sysdeps/linux/xtensa/bits/poll.h
new file mode 100644
index 000000000000..4588cc326006
--- /dev/null
+++ b/libc/sysdeps/linux/xtensa/bits/poll.h
@@ -0,0 +1,49 @@
+/* Copyright (C) 1997, 2001, 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C 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; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_POLL_H
+# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
+#endif
+
+/* Event types that can be polled for. These bits may be set in `events'
+ to indicate the interesting event types; they will appear in `revents'
+ to indicate the status of the file descriptor. */
+#define POLLIN 0x001 /* There is data to read. */
+#define POLLPRI 0x002 /* There is urgent data to read. */
+#define POLLOUT 0x004 /* Writing now will not block. */
+
+#ifdef __USE_XOPEN
+/* These values are defined in XPG4.2. */
+# define POLLRDNORM 0x040 /* Normal data may be read. */
+# define POLLRDBAND 0x080 /* Priority data may be read. */
+# define POLLWRNORM POLLOUT /* Writing now will not block. */
+# define POLLWRBAND 0x100 /* Priority data may be written. */
+#endif
+
+#ifdef __USE_GNU
+/* These are extensions for Linux. */
+# define POLLMSG 0x400
+# define POLLREMOVE 0x800
+# define POLLRDHUP 0x2000
+#endif
+
+/* Event types always implicitly polled for. These bits need not be set in
+ `events', but they will appear in `revents' to indicate the status of
+ the file descriptor. */
+#define POLLERR 0x008 /* Error condition. */
+#define POLLHUP 0x010 /* Hung up. */
+#define POLLNVAL 0x020 /* Invalid polling request. */
--
2.11.0

View File

@@ -1,71 +0,0 @@
From 1077d5bebffacfd4b09896ed890fb45a5b3c6dc6 Mon Sep 17 00:00:00 2001
From: Max Filippov <jcmvbkbc@gmail.com>
Date: Fri, 10 May 2019 07:13:19 -0700
Subject: [PATCH] preadv/pwritev: fix offset argument type
preadv/pwritev don't provide separate version for 64-bit wide off_t,
and default to 32-bit wide off_t, which results in a mismatch between
declaration and definition for user programs built with
-D_FILE_OFFSET_BITS=64.
Make offset argument of both functions __off64_t.
This fixes test misc/tst-preadvwritev on xtensa.
Backported from: 423e49023eeb ("preadv/pwritev: fix offset argument type")
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
include/sys/uio.h | 4 ++--
libc/sysdeps/linux/common/preadv.c | 2 +-
libc/sysdeps/linux/common/pwritev.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/sys/uio.h b/include/sys/uio.h
index aa766f9b1187..330426fec492 100644
--- a/include/sys/uio.h
+++ b/include/sys/uio.h
@@ -59,7 +59,7 @@ extern ssize_t writev (int __fd, const struct iovec *__iovec, int __count);
This function is a cancellation point and therefore not marked with
__THROW. */
extern ssize_t preadv (int __fd, const struct iovec *__iovec, int __count,
- off_t __offset) __wur;
+ __off64_t __offset) __wur;
/* Write data pointed by the buffers described by IOVEC, which is a
vector of COUNT 'struct iovec's, to file descriptor FD at the given
@@ -71,7 +71,7 @@ extern ssize_t preadv (int __fd, const struct iovec *__iovec, int __count,
This function is a cancellation point and therefore not marked with
__THROW. */
extern ssize_t pwritev (int __fd, const struct iovec *__iovec, int __count,
- off_t __offset) __wur;
+ __off64_t __offset) __wur;
#endif /* Use misc. */
__END_DECLS
diff --git a/libc/sysdeps/linux/common/preadv.c b/libc/sysdeps/linux/common/preadv.c
index fd9dde4b999c..6a07d5df87e0 100644
--- a/libc/sysdeps/linux/common/preadv.c
+++ b/libc/sysdeps/linux/common/preadv.c
@@ -21,7 +21,7 @@
#ifdef __NR_preadv
ssize_t
-preadv (int fd, const struct iovec *vector, int count, off_t offset)
+preadv (int fd, const struct iovec *vector, int count, __off64_t offset)
{
unsigned long pos_l, pos_h;
diff --git a/libc/sysdeps/linux/common/pwritev.c b/libc/sysdeps/linux/common/pwritev.c
index bef5bcf69b46..f07c40e6de3c 100644
--- a/libc/sysdeps/linux/common/pwritev.c
+++ b/libc/sysdeps/linux/common/pwritev.c
@@ -21,7 +21,7 @@
#ifdef __NR_pwritev
ssize_t
-pwritev (int fd, const struct iovec *vector, int count, off_t offset)
+pwritev (int fd, const struct iovec *vector, int count, __off64_t offset)
{
unsigned long pos_l, pos_h;
--
2.11.0

View File

@@ -1,40 +0,0 @@
From 75a1a2a9fec8a310a18ff7d63ead95f3a0d1b11b Mon Sep 17 00:00:00 2001
From: Romain Naour <romain.naour@gmail.com>
Date: Fri, 24 May 2019 12:42:04 +0200
Subject: [PATCH] sparc: remove asm constraint
uClibc-ng don't build with gcc 9.1 [1] due to a new check that
"catch illegal asm constraint usage" [2].
gcc 9.1 print this error:
"invalid hard register usage between earlyclobber operand and input operand"
The asm constraint is present in uClibc since it support sparc (back in 2002)[3].
Note: There is no such constraint is Glibc counterpart code [4].
[1] https://gitlab.com/kubu93/toolchains-builder/-/jobs/205435757
[2] https://github.com/gcc-mirror/gcc/commit/b782636f28f5c378897c238081d28d7a4a6ca578
[3] https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?id=3b6d086531102b6d09ce852feb1e370d5dca3ce9
[4]
+https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/sparc/sysdep.h;h=981b2a26b7a91093f821c97876
+e55bc4be2d9f8a;hb=HEAD
(cherry picked from commit c2eaf6c30d930b65a8bcf5f912ef8873a6f4eb20)
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
libc/sysdeps/linux/sparc/bits/syscalls.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libc/sysdeps/linux/sparc/bits/syscalls.h b/libc/sysdeps/linux/sparc/bits/syscalls.h
index 75af7a157..28edc0568 100644
--- a/libc/sysdeps/linux/sparc/bits/syscalls.h
+++ b/libc/sysdeps/linux/sparc/bits/syscalls.h
@@ -33,7 +33,7 @@
register long __g1 __asm__("g1") = sys_num; \
LOAD_ARGS_##nr(args) \
__asm__ __volatile__( __SYSCALL_STRING \
- : "=r" (__res), "=&r" (__o0) \
+ : "=r" (__res), "=r" (__o0) \
: "1" (__o0) ASM_ARGS_##nr, "r" (__g1) \
: __SYSCALL_CLOBBERS ); \
} \
--
2.21.0

View File

@@ -106,6 +106,8 @@ config BR2_UCLIBC_TARGET_ARCH
default "xtensa" if BR2_xtensa
default "i386" if BR2_i386
default "x86_64" if BR2_x86_64
default "riscv64" if BR2_RISCV_64
default "riscv32" if BR2_RISCV_32
config BR2_UCLIBC_MIPS_ABI
string

View File

@@ -1,4 +1,4 @@
# From https://downloads.uclibc-ng.org/releases/1.0.31/uClibc-ng-1.0.31.tar.xz.sha256
sha256 2215d7377118434d1697fd575f10d7a6be3f29e460d6b0e1ee9f6f5306288060 uClibc-ng-1.0.31.tar.xz
# From https://downloads.uclibc-ng.org/releases/1.0.36/uClibc-ng-1.0.36.tar.xz.sha256
sha256 010f40841669809422e01b47e7169d49c61bf3382f493c2571a8a96634ed300c uClibc-ng-1.0.36.tar.xz
# Locally calculated
sha256 6095e9ffa777dd22839f7801aa845b31c9ed07f3d6bf8a26dc5d2dec8ccc0ef3 COPYING.LIB

View File

@@ -4,7 +4,7 @@
#
################################################################################
UCLIBC_VERSION = 1.0.31
UCLIBC_VERSION = 1.0.36
UCLIBC_SOURCE = uClibc-ng-$(UCLIBC_VERSION).tar.xz
UCLIBC_SITE = https://downloads.uclibc-ng.org/releases/$(UCLIBC_VERSION)
UCLIBC_LICENSE = LGPL-2.1+
@@ -31,8 +31,13 @@ endif
UCLIBC_KCONFIG_FILE = $(UCLIBC_CONFIG_FILE)
UCLIBC_KCONFIG_FRAGMENT_FILES = $(call qstrip,$(BR2_UCLIBC_CONFIG_FRAGMENT_FILES))
# UCLIBC_MAKE_FLAGS set HOSTCC to the default HOSTCC, which may be
# wrapped with ccache. However, host-ccache may not already be built
# and installed when we apply the configuration, so we override that
# to use the non-ccached host compiler.
UCLIBC_KCONFIG_OPTS = \
$(UCLIBC_MAKE_FLAGS) \
HOSTCC="$(HOSTCC_NOCCACHE)" \
PREFIX=$(STAGING_DIR) \
DEVEL_PREFIX=/usr/ \
RUNTIME_PREFIX=$(STAGING_DIR)/
@@ -54,18 +59,18 @@ endif
# noMMU binary formats
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)
$(call KCONFIG_ENABLE_OPT,UCLIBC_FORMAT_FLAT)
$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FLAT_SEP_DATA)
$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_SHARED_FLAT)
$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FDPIC_ELF)
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)
$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FLAT)
$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FLAT_SEP_DATA)
$(call KCONFIG_ENABLE_OPT,UCLIBC_FORMAT_SHARED_FLAT)
$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FDPIC_ELF)
endef
endif
@@ -77,12 +82,12 @@ ifeq ($(UCLIBC_TARGET_ARCH),arc)
UCLIBC_ARC_PAGE_SIZE = CONFIG_ARC_PAGE_SIZE_$(call qstrip,$(BR2_ARC_PAGE_SIZE))
define UCLIBC_ARC_PAGE_SIZE_CONFIG
$(SED) '/CONFIG_ARC_PAGE_SIZE_*/d' $(@D)/.config
$(call KCONFIG_ENABLE_OPT,$(UCLIBC_ARC_PAGE_SIZE),$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,$(UCLIBC_ARC_PAGE_SIZE))
endef
ifeq ($(BR2_ARC_ATOMIC_EXT),)
define UCLIBC_ARC_ATOMICS_CONFIG
$(call KCONFIG_DISABLE_OPT,CONFIG_ARC_HAS_ATOMICS,$(@D)/.config)
$(call KCONFIG_DISABLE_OPT,CONFIG_ARC_HAS_ATOMICS)
endef
endif
@@ -95,12 +100,12 @@ endif # arc
ifeq ($(UCLIBC_TARGET_ARCH),arm)
define UCLIBC_ARM_ABI_CONFIG
$(SED) '/CONFIG_ARM_.ABI/d' $(@D)/.config
$(call KCONFIG_ENABLE_OPT,CONFIG_ARM_EABI,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,CONFIG_ARM_EABI)
endef
ifeq ($(BR2_BINFMT_FLAT),y)
define UCLIBC_ARM_BINFMT_FLAT
$(call KCONFIG_DISABLE_OPT,DOPIC,$(@D)/.config)
$(call KCONFIG_DISABLE_OPT,DOPIC)
endef
endif
@@ -110,7 +115,7 @@ endif
# 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)
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_CONTEXT_FUNCS)
endef
endif
@@ -125,7 +130,7 @@ 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)
$(call KCONFIG_DISABLE_OPT,DOPIC)
endef
endif
@@ -139,13 +144,13 @@ ifeq ($(UCLIBC_TARGET_ARCH),mips)
UCLIBC_MIPS_ABI = CONFIG_MIPS_$(call qstrip,$(BR2_UCLIBC_MIPS_ABI))_ABI
define UCLIBC_MIPS_ABI_CONFIG
$(SED) '/CONFIG_MIPS_[NO].._ABI/d' $(@D)/.config
$(call KCONFIG_ENABLE_OPT,$(UCLIBC_MIPS_ABI),$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,$(UCLIBC_MIPS_ABI))
endef
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)
$(call KCONFIG_ENABLE_OPT,$(UCLIBC_MIPS_NAN))
endef
endif # mips
@@ -157,7 +162,7 @@ ifeq ($(UCLIBC_TARGET_ARCH),sh)
UCLIBC_SH_TYPE = CONFIG_$(call qstrip,$(BR2_UCLIBC_SH_TYPE))
define UCLIBC_SH_TYPE_CONFIG
$(SED) '/CONFIG_SH[234A]*/d' $(@D)/.config
$(call KCONFIG_ENABLE_OPT,$(UCLIBC_SH_TYPE),$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,$(UCLIBC_SH_TYPE))
endef
endif # sh
@@ -170,7 +175,7 @@ UCLIBC_SPARC_TYPE = CONFIG_SPARC_$(call qstrip,$(BR2_UCLIBC_SPARC_TYPE))
define UCLIBC_SPARC_TYPE_CONFIG
$(SED) 's/^\(CONFIG_[^_]*[_]*SPARC[^=]*\)=.*/# \1 is not set/g' \
$(@D)/.config
$(call KCONFIG_ENABLE_OPT,$(UCLIBC_SPARC_TYPE),$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,$(UCLIBC_SPARC_TYPE))
endef
endif # sparc
@@ -181,9 +186,9 @@ endif # sparc
ifeq ($(UCLIBC_TARGET_ARCH),powerpc)
UCLIBC_POWERPC_TYPE = CONFIG_$(call qstrip,$(BR2_UCLIBC_POWERPC_TYPE))
define UCLIBC_POWERPC_TYPE_CONFIG
$(call KCONFIG_DISABLE_OPT,CONFIG_GENERIC,$(@D)/.config)
$(call KCONFIG_DISABLE_OPT,CONFIG_E500,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,$(UCLIBC_POWERPC_TYPE),$(@D)/.config)
$(call KCONFIG_DISABLE_OPT,CONFIG_GENERIC)
$(call KCONFIG_DISABLE_OPT,CONFIG_E500)
$(call KCONFIG_ENABLE_OPT,$(UCLIBC_POWERPC_TYPE))
endef
endif # powerpc
@@ -193,7 +198,7 @@ endif # powerpc
ifeq ($(UCLIBC_TARGET_ARCH),i386)
UCLIBC_X86_TYPE = CONFIG_$(call qstrip,$(BR2_UCLIBC_X86_TYPE))
define UCLIBC_X86_TYPE_CONFIG
$(call KCONFIG_ENABLE_OPT,$(UCLIBC_X86_TYPE),$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,$(UCLIBC_X86_TYPE))
endef
endif
@@ -202,7 +207,7 @@ endif
#
ifeq ($(BR2_ENABLE_DEBUG),y)
define UCLIBC_DEBUG_CONFIG
$(call KCONFIG_ENABLE_OPT,DODEBUG,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,DODEBUG)
endef
endif
@@ -212,17 +217,17 @@ endif
ifeq ($(call qstrip,$(BR2_ENDIAN)),BIG)
define UCLIBC_ENDIAN_CONFIG
$(call KCONFIG_ENABLE_OPT,ARCH_BIG_ENDIAN,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,ARCH_WANTS_BIG_ENDIAN,$(@D)/.config)
$(call KCONFIG_DISABLE_OPT,ARCH_LITTLE_ENDIAN,$(@D)/.config)
$(call KCONFIG_DISABLE_OPT,ARCH_WANTS_LITTLE_ENDIAN,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,ARCH_BIG_ENDIAN)
$(call KCONFIG_ENABLE_OPT,ARCH_WANTS_BIG_ENDIAN)
$(call KCONFIG_DISABLE_OPT,ARCH_LITTLE_ENDIAN)
$(call KCONFIG_DISABLE_OPT,ARCH_WANTS_LITTLE_ENDIAN)
endef
else
define UCLIBC_ENDIAN_CONFIG
$(call KCONFIG_ENABLE_OPT,ARCH_LITTLE_ENDIAN,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,ARCH_WANTS_LITTLE_ENDIAN,$(@D)/.config)
$(call KCONFIG_DISABLE_OPT,ARCH_BIG_ENDIAN,$(@D)/.config)
$(call KCONFIG_DISABLE_OPT,ARCH_WANTS_BIG_ENDIAN,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,ARCH_LITTLE_ENDIAN)
$(call KCONFIG_ENABLE_OPT,ARCH_WANTS_LITTLE_ENDIAN)
$(call KCONFIG_DISABLE_OPT,ARCH_BIG_ENDIAN)
$(call KCONFIG_DISABLE_OPT,ARCH_WANTS_BIG_ENDIAN)
endef
endif
@@ -232,13 +237,13 @@ endif
ifeq ($(BR2_USE_MMU),y)
define UCLIBC_MMU_CONFIG
$(call KCONFIG_ENABLE_OPT,ARCH_HAS_MMU,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,ARCH_USE_MMU,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,ARCH_HAS_MMU)
$(call KCONFIG_ENABLE_OPT,ARCH_USE_MMU)
endef
else
define UCLIBC_MMU_CONFIG
$(call KCONFIG_DISABLE_OPT,ARCH_HAS_MMU,$(@D)/.config)
$(call KCONFIG_DISABLE_OPT,ARCH_USE_MMU,$(@D)/.config)
$(call KCONFIG_DISABLE_OPT,ARCH_HAS_MMU)
$(call KCONFIG_DISABLE_OPT,ARCH_USE_MMU)
endef
endif
@@ -246,7 +251,7 @@ endif
# IPv6
#
UCLIBC_IPV6_CONFIG = $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_IPV6,$(@D)/.config)
UCLIBC_IPV6_CONFIG = $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_IPV6)
#
# soft-float
@@ -254,14 +259,14 @@ UCLIBC_IPV6_CONFIG = $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_IPV6,$(@D)/.config)
ifeq ($(BR2_SOFT_FLOAT),y)
define UCLIBC_FLOAT_CONFIG
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_FPU,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_FLOATS,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,DO_C99_MATH,$(@D)/.config)
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_FPU)
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_FLOATS)
$(call KCONFIG_ENABLE_OPT,DO_C99_MATH)
endef
else
define UCLIBC_FLOAT_CONFIG
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_FPU,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_FLOATS,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_FPU)
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_FLOATS)
endef
endif
@@ -270,13 +275,13 @@ endif
#
ifeq ($(BR2_TOOLCHAIN_BUILDROOT_USE_SSP),y)
define UCLIBC_SSP_CONFIG
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_SSP,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,UCLIBC_BUILD_SSP,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_SSP)
$(call KCONFIG_ENABLE_OPT,UCLIBC_BUILD_SSP)
endef
else
define UCLIBC_SSP_CONFIG
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_SSP,$(@D)/.config)
$(call KCONFIG_DISABLE_OPT,UCLIBC_BUILD_SSP,$(@D)/.config)
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_SSP)
$(call KCONFIG_DISABLE_OPT,UCLIBC_BUILD_SSP)
endef
endif
@@ -285,21 +290,21 @@ endif
#
ifeq ($(BR2_PTHREADS_NONE),y)
define UCLIBC_THREAD_CONFIG
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_THREADS,$(@D)/.config)
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_LINUXTHREADS,$(@D)/.config)
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_THREADS_NATIVE,$(@D)/.config)
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_THREADS)
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_LINUXTHREADS)
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_THREADS_NATIVE)
endef
else ifeq ($(BR2_PTHREADS),y)
define UCLIBC_THREAD_CONFIG
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_THREADS,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_LINUXTHREADS,$(@D)/.config)
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_THREADS_NATIVE,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_THREADS)
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_LINUXTHREADS)
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_THREADS_NATIVE)
endef
else ifeq ($(BR2_PTHREADS_NATIVE),y)
define UCLIBC_THREAD_CONFIG
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_THREADS,$(@D)/.config)
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_LINUXTHREADS,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_THREADS_NATIVE,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_THREADS)
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_LINUXTHREADS)
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_THREADS_NATIVE)
endef
endif
@@ -308,9 +313,9 @@ endif
#
ifeq ($(BR2_PTHREAD_DEBUG),y)
UCLIBC_THREAD_DEBUG_CONFIG = $(call KCONFIG_ENABLE_OPT,PTHREADS_DEBUG_SUPPORT,$(@D)/.config)
UCLIBC_THREAD_DEBUG_CONFIG = $(call KCONFIG_ENABLE_OPT,PTHREADS_DEBUG_SUPPORT)
else
UCLIBC_THREAD_DEBUG_CONFIG = $(call KCONFIG_DISABLE_OPT,PTHREADS_DEBUG_SUPPORT,$(@D)/.config)
UCLIBC_THREAD_DEBUG_CONFIG = $(call KCONFIG_DISABLE_OPT,PTHREADS_DEBUG_SUPPORT)
endif
#
@@ -319,18 +324,18 @@ endif
ifeq ($(BR2_TOOLCHAIN_BUILDROOT_LOCALE),y)
define UCLIBC_LOCALE_CONFIG
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_LOCALE,$(@D)/.config)
$(call KCONFIG_DISABLE_OPT,UCLIBC_BUILD_ALL_LOCALE,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,UCLIBC_BUILD_MINIMAL_LOCALE,$(@D)/.config)
$(call KCONFIG_SET_OPT,UCLIBC_BUILD_MINIMAL_LOCALES,"$(UCLIBC_LOCALES)",$(@D)/.config)
$(call KCONFIG_DISABLE_OPT,UCLIBC_PREGENERATED_LOCALE_DATA,$(@D)/.config)
$(call KCONFIG_DISABLE_OPT,DOWNLOAD_PREGENERATED_LOCALE_DATA,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_XLOCALE,$(@D)/.config)
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_GLIBC_DIGIT_GROUPING,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_LOCALE)
$(call KCONFIG_DISABLE_OPT,UCLIBC_BUILD_ALL_LOCALE)
$(call KCONFIG_ENABLE_OPT,UCLIBC_BUILD_MINIMAL_LOCALE)
$(call KCONFIG_SET_OPT,UCLIBC_BUILD_MINIMAL_LOCALES,"$(UCLIBC_LOCALES)")
$(call KCONFIG_DISABLE_OPT,UCLIBC_PREGENERATED_LOCALE_DATA)
$(call KCONFIG_DISABLE_OPT,DOWNLOAD_PREGENERATED_LOCALE_DATA)
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_XLOCALE)
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_GLIBC_DIGIT_GROUPING)
endef
else
define UCLIBC_LOCALE_CONFIG
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_LOCALE,$(@D)/.config)
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_LOCALE)
endef
endif
@@ -339,9 +344,9 @@ endif
#
ifeq ($(BR2_TOOLCHAIN_BUILDROOT_WCHAR),y)
UCLIBC_WCHAR_CONFIG = $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_WCHAR,$(@D)/.config)
UCLIBC_WCHAR_CONFIG = $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_WCHAR)
else
UCLIBC_WCHAR_CONFIG = $(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_WCHAR,$(@D)/.config)
UCLIBC_WCHAR_CONFIG = $(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_WCHAR)
endif
#
@@ -349,9 +354,9 @@ endif
#
ifeq ($(BR2_STATIC_LIBS),y)
UCLIBC_SHARED_LIBS_CONFIG = $(call KCONFIG_DISABLE_OPT,HAVE_SHARED,$(@D)/.config)
UCLIBC_SHARED_LIBS_CONFIG = $(call KCONFIG_DISABLE_OPT,HAVE_SHARED)
else
UCLIBC_SHARED_LIBS_CONFIG = $(call KCONFIG_ENABLE_OPT,HAVE_SHARED,$(@D)/.config)
UCLIBC_SHARED_LIBS_CONFIG = $(call KCONFIG_ENABLE_OPT,HAVE_SHARED)
endif
#
@@ -365,13 +370,13 @@ UCLIBC_MAKE_FLAGS = \
HOSTCC="$(HOSTCC)"
define UCLIBC_KCONFIG_FIXUP_CMDS
$(call KCONFIG_SET_OPT,CROSS_COMPILER_PREFIX,"$(TARGET_CROSS)",$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,TARGET_$(UCLIBC_TARGET_ARCH),$(@D)/.config)
$(call KCONFIG_SET_OPT,TARGET_ARCH,"$(UCLIBC_TARGET_ARCH)",$(@D)/.config)
$(call KCONFIG_SET_OPT,KERNEL_HEADERS,"$(LINUX_HEADERS_DIR)/usr/include",$(@D)/.config)
$(call KCONFIG_SET_OPT,RUNTIME_PREFIX,"/",$(@D)/.config)
$(call KCONFIG_SET_OPT,DEVEL_PREFIX,"/usr",$(@D)/.config)
$(call KCONFIG_SET_OPT,SHARED_LIB_LOADER_PREFIX,"/lib",$(@D)/.config)
$(call KCONFIG_SET_OPT,CROSS_COMPILER_PREFIX,"$(TARGET_CROSS)")
$(call KCONFIG_ENABLE_OPT,TARGET_$(UCLIBC_TARGET_ARCH))
$(call KCONFIG_SET_OPT,TARGET_ARCH,"$(UCLIBC_TARGET_ARCH)")
$(call KCONFIG_SET_OPT,KERNEL_HEADERS,"$(LINUX_HEADERS_DIR)/usr/include")
$(call KCONFIG_SET_OPT,RUNTIME_PREFIX,"/")
$(call KCONFIG_SET_OPT,DEVEL_PREFIX,"/usr")
$(call KCONFIG_SET_OPT,SHARED_LIB_LOADER_PREFIX,"/lib")
$(UCLIBC_MMU_CONFIG)
$(UCLIBC_BINFMT_CONFIG)
$(UCLIBC_ARC_PAGE_SIZE_CONFIG)
@@ -388,7 +393,6 @@ define UCLIBC_KCONFIG_FIXUP_CMDS
$(UCLIBC_X86_TYPE_CONFIG)
$(UCLIBC_DEBUG_CONFIG)
$(UCLIBC_ENDIAN_CONFIG)
$(UCLIBC_LARGEFILE_CONFIG)
$(UCLIBC_IPV6_CONFIG)
$(UCLIBC_FLOAT_CONFIG)
$(UCLIBC_SSP_CONFIG)