2013-06-30 21:29:05 +02:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# uclibc
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2016-12-04 12:20:27 +01:00
|
|
|
UCLIBC_VERSION = 1.0.20
|
2016-01-27 22:25:30 +01:00
|
|
|
UCLIBC_SOURCE = uClibc-ng-$(UCLIBC_VERSION).tar.xz
|
|
|
|
UCLIBC_SITE = http://downloads.uclibc-ng.org/releases/$(UCLIBC_VERSION)
|
2014-06-24 20:55:49 +02:00
|
|
|
UCLIBC_LICENSE = LGPLv2.1+
|
|
|
|
UCLIBC_LICENSE_FILES = COPYING.LIB
|
2013-06-30 21:29:05 +02:00
|
|
|
UCLIBC_INSTALL_STAGING = YES
|
|
|
|
|
2016-06-04 18:30:52 +02:00
|
|
|
define UCLIBC_HELP_CMDS
|
|
|
|
@echo ' uclibc-menuconfig - Run uClibc menuconfig'
|
|
|
|
endef
|
|
|
|
|
2014-02-14 10:55:04 +01:00
|
|
|
# uclibc is part of the toolchain so disable the toolchain dependency
|
|
|
|
UCLIBC_ADD_TOOLCHAIN_DEPENDENCY = NO
|
|
|
|
|
2013-06-30 21:29:05 +02:00
|
|
|
# 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
|
|
|
|
|
2014-08-03 17:32:42 +02:00
|
|
|
UCLIBC_KCONFIG_FILE = $(UCLIBC_CONFIG_FILE)
|
2015-04-28 16:34:34 +02:00
|
|
|
UCLIBC_KCONFIG_FRAGMENT_FILES = $(call qstrip,$(BR2_UCLIBC_CONFIG_FRAGMENT_FILES))
|
2014-08-03 17:32:42 +02:00
|
|
|
|
2014-09-27 21:32:47 +02:00
|
|
|
UCLIBC_KCONFIG_OPTS = \
|
2014-12-22 09:12:05 +01:00
|
|
|
$(UCLIBC_MAKE_FLAGS) \
|
|
|
|
PREFIX=$(STAGING_DIR) \
|
|
|
|
DEVEL_PREFIX=/usr/ \
|
|
|
|
RUNTIME_PREFIX=$(STAGING_DIR)/ \
|
2014-08-03 17:32:42 +02:00
|
|
|
|
2013-06-30 21:29:05 +02:00
|
|
|
UCLIBC_TARGET_ARCH = $(call qstrip,$(BR2_UCLIBC_TARGET_ARCH))
|
|
|
|
|
2014-11-13 23:17:24 +01:00
|
|
|
UCLIBC_GENERATE_LOCALES = $(call qstrip,$(BR2_GENERATE_LOCALE))
|
|
|
|
|
|
|
|
ifeq ($(UCLIBC_GENERATE_LOCALES),)
|
2013-06-30 21:29:05 +02:00
|
|
|
# We need at least one locale
|
|
|
|
UCLIBC_LOCALES = en_US
|
|
|
|
else
|
|
|
|
# Strip out the encoding part of locale names, if any
|
2015-01-15 08:21:39 +01:00
|
|
|
UCLIBC_LOCALES = \
|
|
|
|
$(foreach locale,$(UCLIBC_GENERATE_LOCALES),\
|
|
|
|
$(firstword $(subst .,$(space),$(locale))))
|
2013-06-30 21:29:05 +02:00
|
|
|
endif
|
|
|
|
|
2016-05-13 09:01:08 +02:00
|
|
|
# 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
|
|
|
|
|
2014-10-30 14:57:28 +01:00
|
|
|
#
|
|
|
|
# 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
|
2015-07-17 11:11:42 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2014-10-30 14:57:28 +01:00
|
|
|
endif # arc
|
|
|
|
|
2013-06-30 21:29:05 +02:00
|
|
|
#
|
|
|
|
# ARM definitions
|
|
|
|
#
|
|
|
|
|
|
|
|
ifeq ($(UCLIBC_TARGET_ARCH),arm)
|
|
|
|
define UCLIBC_ARM_ABI_CONFIG
|
|
|
|
$(SED) '/CONFIG_ARM_.ABI/d' $(@D)/.config
|
2014-07-14 13:50:27 +02:00
|
|
|
$(call KCONFIG_ENABLE_OPT,CONFIG_ARM_EABI,$(@D)/.config)
|
2013-06-30 21:29:05 +02:00
|
|
|
endef
|
|
|
|
|
2016-10-15 16:50:58 +02:00
|
|
|
# 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)
|
2013-07-19 15:06:33 +02:00
|
|
|
UCLIBC_EXTRA_CFLAGS += -marm
|
|
|
|
endif
|
|
|
|
|
2016-03-18 22:08:09 +01:00
|
|
|
ifeq ($(BR2_BINFMT_FLAT),y)
|
|
|
|
define UCLIBC_ARM_BINFMT_FLAT
|
|
|
|
$(call KCONFIG_DISABLE_OPT,DOPIC,$(@D)/.config)
|
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
2016-03-31 21:00:07 +02:00
|
|
|
# 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
|
|
|
|
|
2013-06-30 21:29:05 +02:00
|
|
|
endif # arm
|
|
|
|
|
2016-04-29 19:51:23 +02:00
|
|
|
#
|
|
|
|
# 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
|
|
|
|
|
2013-06-30 21:29:05 +02:00
|
|
|
#
|
|
|
|
# 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
|
2014-07-14 13:50:27 +02:00
|
|
|
$(call KCONFIG_ENABLE_OPT,$(UCLIBC_MIPS_ABI),$(@D)/.config)
|
2013-06-30 21:29:05 +02:00
|
|
|
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
|
2014-07-14 13:50:27 +02:00
|
|
|
$(call KCONFIG_ENABLE_OPT,$(UCLIBC_MIPS_ISA),$(@D)/.config)
|
2013-06-30 21:29:05 +02:00
|
|
|
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
|
2014-07-14 13:50:27 +02:00
|
|
|
$(call KCONFIG_ENABLE_OPT,$(UCLIBC_SH_TYPE),$(@D)/.config)
|
2013-06-30 21:29:05 +02:00
|
|
|
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' \
|
2014-10-27 09:25:28 +01:00
|
|
|
$(@D)/.config
|
2014-07-14 13:50:27 +02:00
|
|
|
$(call KCONFIG_ENABLE_OPT,$(UCLIBC_SPARC_TYPE),$(@D)/.config)
|
2013-06-30 21:29:05 +02:00
|
|
|
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
|
2014-07-14 13:50:27 +02:00
|
|
|
$(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)
|
2013-06-30 21:29:05 +02:00
|
|
|
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
|
2014-07-14 13:50:27 +02:00
|
|
|
$(call KCONFIG_ENABLE_OPT,$(UCLIBC_X86_TYPE),$(@D)/.config)
|
2013-06-30 21:29:05 +02:00
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
2016-05-15 22:50:25 +02:00
|
|
|
#
|
|
|
|
# Debug
|
|
|
|
#
|
|
|
|
ifeq ($(BR2_ENABLE_DEBUG),y)
|
|
|
|
define UCLIBC_DEBUG_CONFIG
|
|
|
|
$(call KCONFIG_ENABLE_OPT,DODEBUG,$(@D)/.config)
|
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
2013-06-30 21:29:05 +02:00
|
|
|
#
|
2014-04-30 21:18:57 +02:00
|
|
|
# Endianness
|
2013-06-30 21:29:05 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
ifeq ($(call qstrip,$(BR2_ENDIAN)),BIG)
|
|
|
|
define UCLIBC_ENDIAN_CONFIG
|
2014-07-14 13:50:27 +02:00
|
|
|
$(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)
|
2013-06-30 21:29:05 +02:00
|
|
|
endef
|
|
|
|
else
|
|
|
|
define UCLIBC_ENDIAN_CONFIG
|
2014-07-14 13:50:27 +02:00
|
|
|
$(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)
|
2013-06-30 21:29:05 +02:00
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
2013-08-09 21:23:40 +02:00
|
|
|
#
|
|
|
|
# MMU
|
|
|
|
#
|
|
|
|
|
|
|
|
ifeq ($(BR2_USE_MMU),y)
|
|
|
|
define UCLIBC_MMU_CONFIG
|
2014-07-14 13:50:27 +02:00
|
|
|
$(call KCONFIG_ENABLE_OPT,ARCH_USE_MMU,$(@D)/.config)
|
2013-08-09 21:23:40 +02:00
|
|
|
endef
|
|
|
|
else
|
|
|
|
define UCLIBC_MMU_CONFIG
|
2014-07-14 13:50:27 +02:00
|
|
|
$(call KCONFIG_DISABLE_OPT,ARCH_USE_MMU,$(@D)/.config)
|
2013-08-09 21:23:40 +02:00
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
2013-06-30 21:29:05 +02:00
|
|
|
#
|
|
|
|
# IPv6
|
|
|
|
#
|
|
|
|
|
2014-07-14 13:50:27 +02:00
|
|
|
UCLIBC_IPV6_CONFIG = $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_IPV6,$(@D)/.config)
|
2013-06-30 21:29:05 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# RPC
|
|
|
|
#
|
|
|
|
|
|
|
|
ifeq ($(BR2_TOOLCHAIN_BUILDROOT_INET_RPC),y)
|
|
|
|
define UCLIBC_RPC_CONFIG
|
2014-07-14 13:50:27 +02:00
|
|
|
$(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)
|
2013-06-30 21:29:05 +02:00
|
|
|
endef
|
|
|
|
else
|
|
|
|
define UCLIBC_RPC_CONFIG
|
2014-07-14 13:50:27 +02:00
|
|
|
$(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)
|
2013-06-30 21:29:05 +02:00
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
|
|
|
#
|
|
|
|
# soft-float
|
|
|
|
#
|
|
|
|
|
|
|
|
ifeq ($(BR2_SOFT_FLOAT),y)
|
|
|
|
define UCLIBC_FLOAT_CONFIG
|
2014-07-14 13:50:27 +02:00
|
|
|
$(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)
|
2013-06-30 21:29:05 +02:00
|
|
|
endef
|
|
|
|
else
|
|
|
|
define UCLIBC_FLOAT_CONFIG
|
2014-07-14 13:50:27 +02:00
|
|
|
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_FPU,$(@D)/.config)
|
|
|
|
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_FLOATS,$(@D)/.config)
|
2013-06-30 21:29:05 +02:00
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
|
|
|
#
|
|
|
|
# SSP
|
|
|
|
#
|
|
|
|
ifeq ($(BR2_TOOLCHAIN_BUILDROOT_USE_SSP),y)
|
2013-07-04 20:30:26 +02:00
|
|
|
define UCLIBC_SSP_CONFIG
|
2014-07-14 13:50:27 +02:00
|
|
|
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_SSP,$(@D)/.config)
|
|
|
|
$(call KCONFIG_ENABLE_OPT,UCLIBC_BUILD_SSP,$(@D)/.config)
|
2013-07-04 20:30:26 +02:00
|
|
|
endef
|
2013-06-30 21:29:05 +02:00
|
|
|
else
|
2013-07-04 20:30:26 +02:00
|
|
|
define UCLIBC_SSP_CONFIG
|
2014-07-14 13:50:27 +02:00
|
|
|
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_SSP,$(@D)/.config)
|
|
|
|
$(call KCONFIG_DISABLE_OPT,UCLIBC_BUILD_SSP,$(@D)/.config)
|
2013-07-04 20:30:26 +02:00
|
|
|
endef
|
2013-06-30 21:29:05 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
#
|
|
|
|
# Threads
|
|
|
|
#
|
|
|
|
ifeq ($(BR2_PTHREADS_NONE),y)
|
|
|
|
define UCLIBC_THREAD_CONFIG
|
2014-07-14 13:50:27 +02:00
|
|
|
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_THREADS,$(@D)/.config)
|
2016-06-01 20:40:25 +02:00
|
|
|
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_LINUXTHREADS,$(@D)/.config)
|
2014-07-14 13:50:27 +02:00
|
|
|
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_THREADS_NATIVE,$(@D)/.config)
|
2013-06-30 21:29:05 +02:00
|
|
|
endef
|
|
|
|
else ifeq ($(BR2_PTHREADS),y)
|
|
|
|
define UCLIBC_THREAD_CONFIG
|
2014-07-14 13:50:27 +02:00
|
|
|
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_THREADS,$(@D)/.config)
|
2016-06-01 20:40:25 +02:00
|
|
|
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_LINUXTHREADS,$(@D)/.config)
|
2014-07-14 13:50:27 +02:00
|
|
|
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_THREADS_NATIVE,$(@D)/.config)
|
2013-06-30 21:29:05 +02:00
|
|
|
endef
|
|
|
|
else ifeq ($(BR2_PTHREADS_NATIVE),y)
|
|
|
|
define UCLIBC_THREAD_CONFIG
|
2014-07-14 13:50:27 +02:00
|
|
|
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_THREADS,$(@D)/.config)
|
2016-06-01 20:40:25 +02:00
|
|
|
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_LINUXTHREADS,$(@D)/.config)
|
2014-07-14 13:50:27 +02:00
|
|
|
$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_THREADS_NATIVE,$(@D)/.config)
|
2013-06-30 21:29:05 +02:00
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
|
|
|
#
|
|
|
|
# Thread debug
|
|
|
|
#
|
|
|
|
|
|
|
|
ifeq ($(BR2_PTHREAD_DEBUG),y)
|
2014-07-14 13:50:27 +02:00
|
|
|
UCLIBC_THREAD_DEBUG_CONFIG = $(call KCONFIG_ENABLE_OPT,PTHREADS_DEBUG_SUPPORT,$(@D)/.config)
|
2013-06-30 21:29:05 +02:00
|
|
|
else
|
2014-07-14 13:50:27 +02:00
|
|
|
UCLIBC_THREAD_DEBUG_CONFIG = $(call KCONFIG_DISABLE_OPT,PTHREADS_DEBUG_SUPPORT,$(@D)/.config)
|
2013-06-30 21:29:05 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
#
|
|
|
|
# Locale
|
|
|
|
#
|
|
|
|
|
|
|
|
ifeq ($(BR2_TOOLCHAIN_BUILDROOT_LOCALE),y)
|
|
|
|
define UCLIBC_LOCALE_CONFIG
|
2014-07-14 13:50:27 +02:00
|
|
|
$(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)
|
2013-06-30 21:29:05 +02:00
|
|
|
endef
|
|
|
|
else
|
|
|
|
define UCLIBC_LOCALE_CONFIG
|
2014-07-14 13:50:27 +02:00
|
|
|
$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_LOCALE,$(@D)/.config)
|
2013-06-30 21:29:05 +02:00
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
|
|
|
#
|
|
|
|
# wchar
|
|
|
|
#
|
|
|
|
|
|
|
|
ifeq ($(BR2_TOOLCHAIN_BUILDROOT_WCHAR),y)
|
2014-07-14 13:50:27 +02:00
|
|
|
UCLIBC_WCHAR_CONFIG = $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_WCHAR,$(@D)/.config)
|
2013-06-30 21:29:05 +02:00
|
|
|
else
|
2014-07-14 13:50:27 +02:00
|
|
|
UCLIBC_WCHAR_CONFIG = $(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_WCHAR,$(@D)/.config)
|
2013-06-30 21:29:05 +02:00
|
|
|
endif
|
|
|
|
|
2014-10-12 18:34:45 +02:00
|
|
|
#
|
|
|
|
# static/shared libs
|
|
|
|
#
|
|
|
|
|
2014-12-03 22:41:29 +01:00
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
2014-10-12 18:34:45 +02:00
|
|
|
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
|
|
|
|
|
2013-06-30 21:29:05 +02:00
|
|
|
#
|
|
|
|
# Commands
|
|
|
|
#
|
|
|
|
|
|
|
|
UCLIBC_MAKE_FLAGS = \
|
|
|
|
ARCH="$(UCLIBC_TARGET_ARCH)" \
|
|
|
|
CROSS_COMPILE="$(TARGET_CROSS)" \
|
2013-07-19 15:06:33 +02:00
|
|
|
UCLIBC_EXTRA_CFLAGS="$(UCLIBC_EXTRA_CFLAGS) $(TARGET_ABI)" \
|
2013-06-30 21:29:05 +02:00
|
|
|
HOSTCC="$(HOSTCC)"
|
|
|
|
|
2014-08-03 17:32:42 +02:00
|
|
|
define UCLIBC_KCONFIG_FIXUP_CMDS
|
2014-07-14 13:50:27 +02:00
|
|
|
$(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)
|
2013-09-05 04:24:19 +02:00
|
|
|
$(UCLIBC_MMU_CONFIG)
|
2016-05-13 09:01:08 +02:00
|
|
|
$(UCLIBC_BINFMT_CONFIG)
|
2014-10-30 14:57:28 +01:00
|
|
|
$(UCLIBC_ARC_TYPE_CONFIG)
|
2015-07-17 11:11:42 +02:00
|
|
|
$(UCLIBC_ARC_PAGE_SIZE_CONFIG)
|
2013-06-30 21:29:05 +02:00
|
|
|
$(UCLIBC_ARM_ABI_CONFIG)
|
2016-03-18 22:08:09 +01:00
|
|
|
$(UCLIBC_ARM_BINFMT_FLAT)
|
2016-03-31 21:00:07 +02:00
|
|
|
$(UCLIBC_ARM_NO_CONTEXT_FUNCS)
|
2016-04-29 19:51:23 +02:00
|
|
|
$(UCLIBC_M68K_BINFMT_FLAT)
|
2013-06-30 21:29:05 +02:00
|
|
|
$(UCLIBC_MIPS_ABI_CONFIG)
|
|
|
|
$(UCLIBC_MIPS_ISA_CONFIG)
|
|
|
|
$(UCLIBC_SH_TYPE_CONFIG)
|
|
|
|
$(UCLIBC_SPARC_TYPE_CONFIG)
|
|
|
|
$(UCLIBC_POWERPC_TYPE_CONFIG)
|
|
|
|
$(UCLIBC_X86_TYPE_CONFIG)
|
2016-05-15 22:50:25 +02:00
|
|
|
$(UCLIBC_DEBUG_CONFIG)
|
2013-06-30 21:29:05 +02:00
|
|
|
$(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)
|
2014-10-12 18:34:45 +02:00
|
|
|
$(UCLIBC_SHARED_LIBS_CONFIG)
|
2013-07-18 11:25:49 +02:00
|
|
|
endef
|
|
|
|
|
2013-06-30 21:29:05 +02:00
|
|
|
define UCLIBC_BUILD_CMDS
|
2015-02-14 10:23:13 +01:00
|
|
|
$(MAKE) -C $(@D) $(UCLIBC_MAKE_FLAGS) headers
|
|
|
|
$(MAKE) -C $(@D) $(UCLIBC_MAKE_FLAGS)
|
2014-06-27 18:26:00 +02:00
|
|
|
$(MAKE) -C $(@D)/utils \
|
2013-06-30 21:29:05 +02:00
|
|
|
PREFIX=$(HOST_DIR) \
|
|
|
|
HOSTCC="$(HOSTCC)" hostutils
|
|
|
|
endef
|
|
|
|
|
2013-07-20 14:52:09 +02:00
|
|
|
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
|
|
|
|
|
2013-06-30 21:29:05 +02:00
|
|
|
define UCLIBC_INSTALL_TARGET_CMDS
|
|
|
|
$(MAKE1) -C $(@D) \
|
|
|
|
$(UCLIBC_MAKE_FLAGS) \
|
|
|
|
PREFIX=$(TARGET_DIR) \
|
|
|
|
DEVEL_PREFIX=/usr/ \
|
|
|
|
RUNTIME_PREFIX=/ \
|
|
|
|
install_runtime
|
2013-07-20 14:52:09 +02:00
|
|
|
$(UCLIBC_INSTALL_UTILS_TARGET)
|
2015-02-14 22:01:06 +01:00
|
|
|
$(UCLIBC_INSTALL_LDSO_SYMLINKS)
|
2013-06-30 21:29:05 +02:00
|
|
|
endef
|
|
|
|
|
2014-05-26 00:12:56 +02:00
|
|
|
# STATIC has no ld* tools, only getconf
|
2014-12-03 22:41:29 +01:00
|
|
|
ifeq ($(BR2_STATIC_LIBS),)
|
2013-07-20 14:52:13 +02:00
|
|
|
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
|
|
|
|
|
2013-06-30 21:29:05 +02:00
|
|
|
define UCLIBC_INSTALL_STAGING_CMDS
|
|
|
|
$(MAKE1) -C $(@D) \
|
|
|
|
$(UCLIBC_MAKE_FLAGS) \
|
|
|
|
PREFIX=$(STAGING_DIR) \
|
|
|
|
DEVEL_PREFIX=/usr/ \
|
|
|
|
RUNTIME_PREFIX=/ \
|
|
|
|
install_runtime install_dev
|
2013-07-20 14:52:13 +02:00
|
|
|
$(UCLIBC_INSTALL_UTILS_STAGING)
|
2013-06-30 21:29:05 +02:00
|
|
|
endef
|
|
|
|
|
2015-07-13 12:32:04 +02:00
|
|
|
# Checks to give errors that the user can understand
|
|
|
|
# Must be before we call to kconfig-package
|
2015-07-14 12:13:21 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_UCLIBC)$(BR_BUILDING),yy)
|
2015-07-13 12:32:04 +02:00
|
|
|
ifeq ($(call qstrip,$(BR2_UCLIBC_CONFIG)),)
|
|
|
|
$(error No uClibc configuration file specified, check your BR2_UCLIBC_CONFIG setting)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2014-08-03 17:32:42 +02:00
|
|
|
$(eval $(kconfig-package))
|