From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 08/17] uclibc: context functions are not Thumb-compatible
Date: Sat, 19 Mar 2016 17:20:09 +0100 [thread overview]
Message-ID: <56ED7C39.6010104@mind.be> (raw)
In-Reply-To: <1458335299-27409-9-git-send-email-thomas.petazzoni@free-electrons.com>
On 03/18/16 22:08, Thomas Petazzoni wrote:
> On Thumb1 platforms and Thumb2 platforms that support the ARM
This sentence is a bit weird, unless you realise that we don't have any thumb1
platforms that don't have ARM instructions.
> 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.
It may be useful to note that this will break packages that rely on the
context functions, so that these packages must be disabled for that architecture
combination.
BTW, for that reason, it may be better to create a Kconfig blind option to
encode this situation.
In summary, a better commit message could be:
uclibc: context functions are not Thumb-compatible
On platforms that do support the ARM instruction set, there is no problem, as
the context functions are built unconditionally in ARM mode.
However, on platforms that only support the Thumb instruction set, the context
functions cannot be built since the assembler code is not Thumb-ready.
Therefore, these functions must be disabled. All Thumb1 platforms support ARM
instructions, so this is only relevant for Thumb2 platforms (i.e., Cortex-M).
Note that some packages require the context functions, so these will fail to
build on these platforms. Those will be handled in later patches.
Regards,
Arnout
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@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)
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
next prev parent reply other threads:[~2016-03-19 16:20 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-18 21:08 [Buildroot] [PATCH v2 00/17] ARM Cortex-M support and STM32 defconfigs Thomas Petazzoni
2016-03-18 21:08 ` [Buildroot] [PATCH v2 01/17] arch/arm: introduce and use BR2_ARM_CPU_ARMV7M Thomas Petazzoni
2016-03-18 22:30 ` Yann E. MORIN
2016-03-19 13:33 ` Thomas Petazzoni
2016-03-19 13:59 ` Yann E. MORIN
2016-03-19 14:08 ` Thomas Petazzoni
2016-03-18 21:08 ` [Buildroot] [PATCH v2 02/17] arch/arm: Cortex-M3 provides only Thumb-2 Thomas Petazzoni
2016-03-18 22:34 ` Yann E. MORIN
2016-03-19 15:33 ` Arnout Vandecappelle
2016-03-18 21:08 ` [Buildroot] [PATCH v2 03/17] arch/arm: add Cortex-M4 entry Thomas Petazzoni
2016-03-18 22:41 ` Yann E. MORIN
2016-03-18 21:08 ` [Buildroot] [PATCH v2 04/17] uclibc: add patches to simplify Thumb handling Thomas Petazzoni
2016-03-19 15:46 ` Arnout Vandecappelle
2016-03-29 22:14 ` Thomas Petazzoni
2016-03-18 21:08 ` [Buildroot] [PATCH v2 05/17] uclibc: remove USE_BX handling Thomas Petazzoni
2016-03-19 15:47 ` Arnout Vandecappelle
2016-03-18 21:08 ` [Buildroot] [PATCH v2 06/17] uclibc: gcc >= 4.9 can build a thumb/thread uclibc Thomas Petazzoni
2016-03-19 15:53 ` Arnout Vandecappelle
2016-03-29 22:18 ` Thomas Petazzoni
2016-03-29 22:49 ` Arnout Vandecappelle
2016-03-18 21:08 ` [Buildroot] [PATCH v2 07/17] uclibc: disable DOPIC on ARM FLAT Thomas Petazzoni
2016-03-19 16:11 ` Arnout Vandecappelle
2016-03-29 22:20 ` Thomas Petazzoni
2016-03-19 19:27 ` Ezequiel Garcia
2016-03-19 20:50 ` Thomas Petazzoni
2016-03-20 1:59 ` Ezequiel Garcia
2016-03-18 21:08 ` [Buildroot] [PATCH v2 08/17] uclibc: context functions are not Thumb-compatible Thomas Petazzoni
2016-03-19 16:20 ` Arnout Vandecappelle [this message]
2016-03-19 18:07 ` Thomas Petazzoni
2016-03-20 19:39 ` Arnout Vandecappelle
2016-03-18 21:08 ` [Buildroot] [PATCH v2 09/17] uclibc: NPTL thread implementation only available on MMU platforms Thomas Petazzoni
2016-03-18 21:08 ` [Buildroot] [PATCH v2 10/17] musl: build broken on Thumb, use ARM mode Thomas Petazzoni
2016-03-18 21:08 ` [Buildroot] [PATCH v2 11/17] toolchain-buildroot: update glibc comment for noMMU Thomas Petazzoni
2016-03-18 21:08 ` [Buildroot] [PATCH v2 12/17] toolchain-buildroot: don't show musl on noMMU platforms Thomas Petazzoni
2016-03-18 21:08 ` [Buildroot] [PATCH v2 13/17] package/Makefile.in: adjust LDFLAGS for elf2flt Thomas Petazzoni
2016-03-18 21:08 ` [Buildroot] [PATCH v2 14/17] elf2flt: use new upstream site and add ARM patch Thomas Petazzoni
2016-03-18 21:34 ` Ezequiel Garcia
2016-03-19 13:32 ` Thomas Petazzoni
2016-03-18 21:08 ` [Buildroot] [PATCH v2 15/17] afboot-stm32: use the Buildroot toolchain Thomas Petazzoni
2016-03-18 21:08 ` [Buildroot] [PATCH v2 16/17] configs/stm32f429_disco: new configuration for STM32F429 Discovery board Thomas Petazzoni
2016-03-21 9:48 ` Lee Jones
2016-03-21 10:39 ` Thomas Petazzoni
2016-03-18 21:08 ` [Buildroot] [PATCH v2 17/17] configs/stm32f469_disco: new configuration for STM32F469 " Thomas Petazzoni
2016-03-21 9:46 ` Lee Jones
2016-03-18 21:17 ` [Buildroot] [PATCH v2 00/17] ARM Cortex-M support and STM32 defconfigs Thomas Petazzoni
2016-03-18 22:49 ` Ezequiel Garcia
2016-03-19 13:32 ` Thomas Petazzoni
2016-03-19 16:12 ` Arnout Vandecappelle
2016-03-20 14:39 ` Thomas Petazzoni
2016-03-21 9:49 ` Lee Jones
2016-03-29 22:28 ` Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56ED7C39.6010104@mind.be \
--to=arnout@mind.be \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox