update buildroot to 2017.02.11
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
167
bsp/buildroot-2017.02.11/package/uclibc/Config.in
Normal file
167
bsp/buildroot-2017.02.11/package/uclibc/Config.in
Normal file
@@ -0,0 +1,167 @@
|
||||
if BR2_TOOLCHAIN_BUILDROOT_UCLIBC
|
||||
|
||||
comment "uClibc Options"
|
||||
|
||||
config BR2_PACKAGE_UCLIBC
|
||||
bool
|
||||
default y
|
||||
select BR2_PACKAGE_LINUX_HEADERS
|
||||
|
||||
config BR2_UCLIBC_CONFIG
|
||||
string "uClibc configuration file to use?"
|
||||
default "package/uclibc/uClibc-ng.config"
|
||||
help
|
||||
Some people may wish to use their own modified uClibc configuration
|
||||
file and will specify their config file location with this option.
|
||||
See also docs/README in this package.
|
||||
If unsure, use the default.
|
||||
|
||||
config BR2_UCLIBC_CONFIG_FRAGMENT_FILES
|
||||
string "Additional uClibc configuration fragment files"
|
||||
help
|
||||
A space-separated list of configuration fragment files,
|
||||
that will be merged to the main uClibc configuration file.
|
||||
|
||||
config BR2_TOOLCHAIN_BUILDROOT_INET_RPC
|
||||
bool "Enable RPC support"
|
||||
select BR2_TOOLCHAIN_HAS_NATIVE_RPC
|
||||
help
|
||||
Enable this option if you want your toolchain to support
|
||||
RPC (needed for NFS, for example).
|
||||
|
||||
config BR2_TOOLCHAIN_BUILDROOT_WCHAR
|
||||
bool "Enable WCHAR support"
|
||||
select BR2_USE_WCHAR
|
||||
help
|
||||
Enable this option if you want your toolchain to support
|
||||
wide characters (i.e characters longer than 8 bits, needed
|
||||
for locale support).
|
||||
|
||||
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.
|
||||
|
||||
choice
|
||||
prompt "Thread library implementation"
|
||||
help
|
||||
Use this option to select the thread library implementation
|
||||
that should be used in your toolchain.
|
||||
|
||||
config BR2_PTHREADS_NATIVE
|
||||
bool "Native POSIX Threading (NPTL)"
|
||||
select BR2_TOOLCHAIN_HAS_THREADS
|
||||
select BR2_TOOLCHAIN_HAS_THREADS_NPTL
|
||||
depends on BR2_USE_MMU
|
||||
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_or1k || 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_NATIVE
|
||||
select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
|
||||
help
|
||||
Build the thread library with debugging enabled.
|
||||
|
||||
config BR2_TOOLCHAIN_BUILDROOT_USE_SSP
|
||||
bool "Enable stack protection support"
|
||||
select BR2_TOOLCHAIN_HAS_SSP
|
||||
help
|
||||
Enable stack smashing protection support using GCCs
|
||||
-fstack-protector-all option in uClibc.
|
||||
|
||||
See http://www.linuxfromscratch.org/hints/downloads/files/ssp.txt
|
||||
for details.
|
||||
|
||||
config BR2_UCLIBC_INSTALL_UTILS
|
||||
bool "Compile and install uClibc utilities"
|
||||
default y
|
||||
help
|
||||
Enabling this option will compile and install the getconf,
|
||||
ldconfig and ldd uClibc utilities for the target.
|
||||
|
||||
You can save ~32 KiB in target space by disabling them since
|
||||
they're normally not needed.
|
||||
|
||||
# Mapping from the Buildroot architecture configuration options to the
|
||||
# uClibc architecture names.
|
||||
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 "or1k" if BR2_or1k
|
||||
default "powerpc" if BR2_powerpc
|
||||
default "sh" if BR2_sh
|
||||
default "sparc" if BR2_sparc
|
||||
default "xtensa" if BR2_xtensa
|
||||
default "i386" if BR2_i386
|
||||
default "x86_64" if BR2_x86_64
|
||||
|
||||
config BR2_UCLIBC_ARC_TYPE
|
||||
string
|
||||
depends on BR2_UCLIBC_TARGET_ARCH = "arc"
|
||||
default "ARC_CPU_700" if BR2_arc750d
|
||||
default "ARC_CPU_700" if BR2_arc770d
|
||||
default "ARC_CPU_HS" if BR2_archs38
|
||||
|
||||
config BR2_UCLIBC_MIPS_ABI
|
||||
string
|
||||
depends on BR2_UCLIBC_TARGET_ARCH = "mips"
|
||||
default "O32" if BR2_MIPS_OABI32
|
||||
default "N32" if BR2_MIPS_NABI32
|
||||
default "N64" if BR2_MIPS_NABI64
|
||||
|
||||
config BR2_UCLIBC_MIPS_NAN
|
||||
string
|
||||
depends on BR2_UCLIBC_TARGET_ARCH = "mips"
|
||||
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
|
||||
depends on BR2_UCLIBC_TARGET_ARCH = "sh"
|
||||
default "SH2A" if BR2_sh2a
|
||||
default "SH4" if BR2_sh4 || BR2_sh4eb
|
||||
|
||||
config BR2_UCLIBC_SPARC_TYPE
|
||||
string
|
||||
depends on BR2_UCLIBC_TARGET_ARCH = "sparc"
|
||||
default "V7" if BR2_sparc_v7 || BR2_sparc_sparchfleon || BR2_sparc_sparcsfleon
|
||||
default "V8" if BR2_sparc_v8 || BR2_sparc_sparchfleonv8 || BR2_sparc_sparcsfleonv8
|
||||
|
||||
config BR2_UCLIBC_POWERPC_TYPE
|
||||
string
|
||||
depends on BR2_UCLIBC_TARGET_ARCH = "powerpc"
|
||||
default "CLASSIC" if !BR2_powerpc_8540 && !BR2_powerpc_8548
|
||||
default "E500" if BR2_powerpc_8540 || BR2_powerpc_8548
|
||||
|
||||
config BR2_UCLIBC_X86_TYPE
|
||||
string
|
||||
depends on BR2_UCLIBC_TARGET_ARCH = "i386"
|
||||
default "486" if BR2_x86_i486
|
||||
default "586" if BR2_x86_i586
|
||||
default "586MMX" if BR2_x86_pentium_mmx
|
||||
default "686" if BR2_x86_i686 || BR2_x86_pentiumpro
|
||||
default "PENTIUMII" if BR2_x86_pentium2
|
||||
default "PENTIUMIII" if BR2_x86_pentium3
|
||||
default "PENTIUM4" if BR2_x86_pentium4 || BR2_x86_pentium_m || \
|
||||
BR2_x86_nocona || BR2_x86_core2 || BR2_x86_corei7
|
||||
|
||||
endif # BR2_TOOLCHAIN_BUILDROOT_UCLIBC
|
||||
42
bsp/buildroot-2017.02.11/package/uclibc/uClibc-ng.config
Normal file
42
bsp/buildroot-2017.02.11/package/uclibc/uClibc-ng.config
Normal file
@@ -0,0 +1,42 @@
|
||||
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
|
||||
LDSO_RUNPATH=y
|
||||
LDSO_RUNPATH_OF_EXECUTABLE=y
|
||||
UCLIBC_HAS_UTMPX=y
|
||||
UCLIBC_HAS_UTMP=y
|
||||
UCLIBC_SUSV2_LEGACY=y
|
||||
UCLIBC_SUSV3_LEGACY=y
|
||||
UCLIBC_HAS_CONTEXT_FUNCS=y
|
||||
UCLIBC_SUSV4_LEGACY=y
|
||||
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
|
||||
UCLIBC_HAS_LIBRESOLV_STUB=y
|
||||
UCLIBC_HAS_LIBNSL_STUB=y
|
||||
UCLIBC_HAS_CTYPE_CHECKED=y
|
||||
UCLIBC_HAS_HEXADECIMAL_FLOATS=y
|
||||
UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y
|
||||
UCLIBC_HAS_STDIO_GETC_MACRO=y
|
||||
UCLIBC_HAS_STDIO_PUTC_MACRO=y
|
||||
UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y
|
||||
UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y
|
||||
UCLIBC_HAS_PRINTF_M_SPEC=y
|
||||
# UCLIBC_HAS_REGEX_OLD is not set
|
||||
# UCLIBC_HAS_FNMATCH_OLD is not set
|
||||
UCLIBC_HAS_NFTW=y
|
||||
UCLIBC_HAS_FTW=y
|
||||
UCLIBC_HAS_GNU_GLOB=y
|
||||
RUNTIME_PREFIX="/"
|
||||
DEVEL_PREFIX="/usr/"
|
||||
UCLIBC_HAS_SSP=y
|
||||
UCLIBC_BUILD_NOW=y
|
||||
# DOSTRIP is not set
|
||||
2
bsp/buildroot-2017.02.11/package/uclibc/uclibc.hash
Normal file
2
bsp/buildroot-2017.02.11/package/uclibc/uclibc.hash
Normal file
@@ -0,0 +1,2 @@
|
||||
# From http://www.uclibc-ng.org/
|
||||
sha256 f2004c85db8e07e9f1c2e8b7c513fa7c237bc9f9685d8e1bfc89535b8a85449b uClibc-ng-1.0.22.tar.xz
|
||||
497
bsp/buildroot-2017.02.11/package/uclibc/uclibc.mk
Normal file
497
bsp/buildroot-2017.02.11/package/uclibc/uclibc.mk
Normal file
@@ -0,0 +1,497 @@
|
||||
################################################################################
|
||||
#
|
||||
# uclibc
|
||||
#
|
||||
################################################################################
|
||||
|
||||
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+
|
||||
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
|
||||
|
||||
# Before uClibc is configured, we must have the first stage
|
||||
# cross-compiler and the kernel headers
|
||||
UCLIBC_DEPENDENCIES = host-gcc-initial linux-headers
|
||||
|
||||
# specifying UCLIBC_CONFIG_FILE on the command-line overrides the .config
|
||||
# setting.
|
||||
ifndef UCLIBC_CONFIG_FILE
|
||||
UCLIBC_CONFIG_FILE = $(call qstrip,$(BR2_UCLIBC_CONFIG))
|
||||
endif
|
||||
|
||||
UCLIBC_KCONFIG_FILE = $(UCLIBC_CONFIG_FILE)
|
||||
UCLIBC_KCONFIG_FRAGMENT_FILES = $(call qstrip,$(BR2_UCLIBC_CONFIG_FRAGMENT_FILES))
|
||||
|
||||
UCLIBC_KCONFIG_OPTS = \
|
||||
$(UCLIBC_MAKE_FLAGS) \
|
||||
PREFIX=$(STAGING_DIR) \
|
||||
DEVEL_PREFIX=/usr/ \
|
||||
RUNTIME_PREFIX=$(STAGING_DIR)/ \
|
||||
|
||||
UCLIBC_TARGET_ARCH = $(call qstrip,$(BR2_UCLIBC_TARGET_ARCH))
|
||||
|
||||
UCLIBC_GENERATE_LOCALES = $(call qstrip,$(BR2_GENERATE_LOCALE))
|
||||
|
||||
ifeq ($(UCLIBC_GENERATE_LOCALES),)
|
||||
# We need at least one locale
|
||||
UCLIBC_LOCALES = en_US
|
||||
else
|
||||
# Strip out the encoding part of locale names, if any
|
||||
UCLIBC_LOCALES = \
|
||||
$(foreach locale,$(UCLIBC_GENERATE_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
|
||||
#
|
||||
|
||||
ifeq ($(UCLIBC_TARGET_ARCH),arc)
|
||||
UCLIBC_ARC_TYPE = CONFIG_$(call qstrip,$(BR2_UCLIBC_ARC_TYPE))
|
||||
define UCLIBC_ARC_TYPE_CONFIG
|
||||
$(call KCONFIG_ENABLE_OPT,$(UCLIBC_ARC_TYPE),$(@D)/.config)
|
||||
endef
|
||||
|
||||
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)
|
||||
endef
|
||||
|
||||
endif # arc
|
||||
|
||||
#
|
||||
# ARM definitions
|
||||
#
|
||||
|
||||
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)
|
||||
endef
|
||||
|
||||
# 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
|
||||
|
||||
ifeq ($(BR2_BINFMT_FLAT),y)
|
||||
define UCLIBC_ARM_BINFMT_FLAT
|
||||
$(call KCONFIG_DISABLE_OPT,DOPIC,$(@D)/.config)
|
||||
endef
|
||||
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
|
||||
#
|
||||
|
||||
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)
|
||||
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)
|
||||
endef
|
||||
endif # mips
|
||||
|
||||
#
|
||||
# SH definitions
|
||||
#
|
||||
|
||||
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)
|
||||
endef
|
||||
endif # sh
|
||||
|
||||
#
|
||||
# SPARC definitions
|
||||
#
|
||||
|
||||
ifeq ($(UCLIBC_TARGET_ARCH),sparc)
|
||||
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)
|
||||
endef
|
||||
endif # sparc
|
||||
|
||||
#
|
||||
# PowerPC definitions
|
||||
#
|
||||
|
||||
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)
|
||||
endef
|
||||
endif # powerpc
|
||||
|
||||
#
|
||||
# x86 definitions
|
||||
#
|
||||
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)
|
||||
endef
|
||||
endif
|
||||
|
||||
#
|
||||
# Debug
|
||||
#
|
||||
ifeq ($(BR2_ENABLE_DEBUG),y)
|
||||
define UCLIBC_DEBUG_CONFIG
|
||||
$(call KCONFIG_ENABLE_OPT,DODEBUG,$(@D)/.config)
|
||||
endef
|
||||
endif
|
||||
|
||||
#
|
||||
# Endianness
|
||||
#
|
||||
|
||||
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)
|
||||
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)
|
||||
endef
|
||||
endif
|
||||
|
||||
#
|
||||
# MMU
|
||||
#
|
||||
|
||||
ifeq ($(BR2_USE_MMU),y)
|
||||
define UCLIBC_MMU_CONFIG
|
||||
$(call KCONFIG_ENABLE_OPT,ARCH_USE_MMU,$(@D)/.config)
|
||||
endef
|
||||
else
|
||||
define UCLIBC_MMU_CONFIG
|
||||
$(call KCONFIG_DISABLE_OPT,ARCH_USE_MMU,$(@D)/.config)
|
||||
endef
|
||||
endif
|
||||
|
||||
#
|
||||
# IPv6
|
||||
#
|
||||
|
||||
UCLIBC_IPV6_CONFIG = $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_IPV6,$(@D)/.config)
|
||||
|
||||
#
|
||||
# RPC
|
||||
#
|
||||
|
||||
ifeq ($(BR2_TOOLCHAIN_BUILDROOT_INET_RPC),y)
|
||||
define UCLIBC_RPC_CONFIG
|
||||
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_RPC,$(@D)/.config)
|
||||
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_FULL_RPC,$(@D)/.config)
|
||||
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_REENTRANT_RPC,$(@D)/.config)
|
||||
endef
|
||||
else
|
||||
define UCLIBC_RPC_CONFIG
|
||||
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_RPC,$(@D)/.config)
|
||||
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_FULL_RPC,$(@D)/.config)
|
||||
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_REENTRANT_RPC,$(@D)/.config)
|
||||
endef
|
||||
endif
|
||||
|
||||
#
|
||||
# soft-float
|
||||
#
|
||||
|
||||
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)
|
||||
endef
|
||||
else
|
||||
define UCLIBC_FLOAT_CONFIG
|
||||
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_FPU,$(@D)/.config)
|
||||
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_FLOATS,$(@D)/.config)
|
||||
endef
|
||||
endif
|
||||
|
||||
#
|
||||
# SSP
|
||||
#
|
||||
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)
|
||||
endef
|
||||
else
|
||||
define UCLIBC_SSP_CONFIG
|
||||
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_SSP,$(@D)/.config)
|
||||
$(call KCONFIG_DISABLE_OPT,UCLIBC_BUILD_SSP,$(@D)/.config)
|
||||
endef
|
||||
endif
|
||||
|
||||
#
|
||||
# Threads
|
||||
#
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
endef
|
||||
endif
|
||||
|
||||
#
|
||||
# Thread debug
|
||||
#
|
||||
|
||||
ifeq ($(BR2_PTHREAD_DEBUG),y)
|
||||
UCLIBC_THREAD_DEBUG_CONFIG = $(call KCONFIG_ENABLE_OPT,PTHREADS_DEBUG_SUPPORT,$(@D)/.config)
|
||||
else
|
||||
UCLIBC_THREAD_DEBUG_CONFIG = $(call KCONFIG_DISABLE_OPT,PTHREADS_DEBUG_SUPPORT,$(@D)/.config)
|
||||
endif
|
||||
|
||||
#
|
||||
# Locale
|
||||
#
|
||||
|
||||
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)
|
||||
endef
|
||||
else
|
||||
define UCLIBC_LOCALE_CONFIG
|
||||
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_LOCALE,$(@D)/.config)
|
||||
endef
|
||||
endif
|
||||
|
||||
#
|
||||
# wchar
|
||||
#
|
||||
|
||||
ifeq ($(BR2_TOOLCHAIN_BUILDROOT_WCHAR),y)
|
||||
UCLIBC_WCHAR_CONFIG = $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_WCHAR,$(@D)/.config)
|
||||
else
|
||||
UCLIBC_WCHAR_CONFIG = $(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_WCHAR,$(@D)/.config)
|
||||
endif
|
||||
|
||||
#
|
||||
# static/shared libs
|
||||
#
|
||||
|
||||
ifeq ($(BR2_STATIC_LIBS),y)
|
||||
UCLIBC_SHARED_LIBS_CONFIG = $(call KCONFIG_DISABLE_OPT,HAVE_SHARED,$(@D)/.config)
|
||||
else
|
||||
UCLIBC_SHARED_LIBS_CONFIG = $(call KCONFIG_ENABLE_OPT,HAVE_SHARED,$(@D)/.config)
|
||||
endif
|
||||
|
||||
#
|
||||
# Commands
|
||||
#
|
||||
|
||||
UCLIBC_MAKE_FLAGS = \
|
||||
ARCH="$(UCLIBC_TARGET_ARCH)" \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
UCLIBC_EXTRA_CFLAGS="$(UCLIBC_EXTRA_CFLAGS) $(TARGET_ABI)" \
|
||||
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)
|
||||
$(UCLIBC_MMU_CONFIG)
|
||||
$(UCLIBC_BINFMT_CONFIG)
|
||||
$(UCLIBC_ARC_TYPE_CONFIG)
|
||||
$(UCLIBC_ARC_PAGE_SIZE_CONFIG)
|
||||
$(UCLIBC_ARM_ABI_CONFIG)
|
||||
$(UCLIBC_ARM_BINFMT_FLAT)
|
||||
$(UCLIBC_ARM_NO_CONTEXT_FUNCS)
|
||||
$(UCLIBC_M68K_BINFMT_FLAT)
|
||||
$(UCLIBC_MIPS_ABI_CONFIG)
|
||||
$(UCLIBC_MIPS_NAN_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)
|
||||
$(UCLIBC_RPC_CONFIG)
|
||||
$(UCLIBC_FLOAT_CONFIG)
|
||||
$(UCLIBC_SSP_CONFIG)
|
||||
$(UCLIBC_THREAD_CONFIG)
|
||||
$(UCLIBC_THREAD_DEBUG_CONFIG)
|
||||
$(UCLIBC_LOCALE_CONFIG)
|
||||
$(UCLIBC_WCHAR_CONFIG)
|
||||
$(UCLIBC_SHARED_LIBS_CONFIG)
|
||||
endef
|
||||
|
||||
define UCLIBC_BUILD_CMDS
|
||||
$(MAKE) -C $(@D) $(UCLIBC_MAKE_FLAGS) headers
|
||||
$(MAKE) -C $(@D) $(UCLIBC_MAKE_FLAGS)
|
||||
$(MAKE) -C $(@D)/utils \
|
||||
PREFIX=$(HOST_DIR) \
|
||||
HOSTCC="$(HOSTCC)" hostutils
|
||||
endef
|
||||
|
||||
ifeq ($(BR2_UCLIBC_INSTALL_UTILS),y)
|
||||
define UCLIBC_INSTALL_UTILS_TARGET
|
||||
$(MAKE1) -C $(@D) \
|
||||
CC="$(TARGET_CC)" CPP="$(TARGET_CPP)" LD="$(TARGET_LD)" \
|
||||
ARCH="$(UCLIBC_TARGET_ARCH)" \
|
||||
PREFIX=$(TARGET_DIR) \
|
||||
utils install_utils
|
||||
endef
|
||||
endif
|
||||
|
||||
define UCLIBC_INSTALL_TARGET_CMDS
|
||||
$(MAKE1) -C $(@D) \
|
||||
$(UCLIBC_MAKE_FLAGS) \
|
||||
PREFIX=$(TARGET_DIR) \
|
||||
DEVEL_PREFIX=/usr/ \
|
||||
RUNTIME_PREFIX=/ \
|
||||
install_runtime
|
||||
$(UCLIBC_INSTALL_UTILS_TARGET)
|
||||
$(UCLIBC_INSTALL_LDSO_SYMLINKS)
|
||||
endef
|
||||
|
||||
# STATIC has no ld* tools, only getconf
|
||||
ifeq ($(BR2_STATIC_LIBS),)
|
||||
define UCLIBC_INSTALL_UTILS_STAGING
|
||||
$(INSTALL) -D -m 0755 $(@D)/utils/ldd.host $(HOST_DIR)/usr/bin/ldd
|
||||
ln -sf ldd $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-ldd
|
||||
$(INSTALL) -D -m 0755 $(@D)/utils/ldconfig.host $(HOST_DIR)/usr/bin/ldconfig
|
||||
ln -sf ldconfig $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-ldconfig
|
||||
endef
|
||||
endif
|
||||
|
||||
define UCLIBC_INSTALL_STAGING_CMDS
|
||||
$(MAKE1) -C $(@D) \
|
||||
$(UCLIBC_MAKE_FLAGS) \
|
||||
PREFIX=$(STAGING_DIR) \
|
||||
DEVEL_PREFIX=/usr/ \
|
||||
RUNTIME_PREFIX=/ \
|
||||
install_runtime install_dev
|
||||
$(UCLIBC_INSTALL_UTILS_STAGING)
|
||||
endef
|
||||
|
||||
# Checks to give errors that the user can understand
|
||||
# Must be before we call to kconfig-package
|
||||
ifeq ($(BR2_PACKAGE_UCLIBC)$(BR_BUILDING),yy)
|
||||
ifeq ($(call qstrip,$(BR2_UCLIBC_CONFIG)),)
|
||||
$(error No uClibc configuration file specified, check your BR2_UCLIBC_CONFIG setting)
|
||||
endif
|
||||
endif
|
||||
|
||||
$(eval $(kconfig-package))
|
||||
Reference in New Issue
Block a user