[Buildroot] [PATCH v2 08/17] uclibc: context functions are not Thumb-compatible

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Fri Mar 18 21:08:10 UTC 2016


On Thumb1 platforms and Thumb2 platforms that support the ARM
instructions set, there is no problem, as the context functions are
built unconditionally in ARM mode.

However, on Thumb2 platforms that only support the Thumb2 instruction
set, the context functions cannot build as the assembler code is not
Thumb-ready. Therefore, those functions must be disabled.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
---
 package/uclibc/uclibc.mk | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/uclibc/uclibc.mk b/package/uclibc/uclibc.mk
index e3e45f7..4698132 100644
--- a/package/uclibc/uclibc.mk
+++ b/package/uclibc/uclibc.mk
@@ -88,6 +88,12 @@ define UCLIBC_ARM_BINFMT_FLAT
 endef
 endif
 
+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
 
 #
@@ -361,6 +367,7 @@ define UCLIBC_KCONFIG_FIXUP_CMDS
 	$(UCLIBC_ARC_PAGE_SIZE_CONFIG)
 	$(UCLIBC_ARM_ABI_CONFIG)
 	$(UCLIBC_ARM_BINFMT_FLAT)
+	$(UCLIBC_ARM_NO_CONTEXT_FUNCS)
 	$(UCLIBC_MIPS_ABI_CONFIG)
 	$(UCLIBC_MIPS_ISA_CONFIG)
 	$(UCLIBC_SH_TYPE_CONFIG)
-- 
2.6.4



More information about the buildroot mailing list