From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 04/16] uclibc: Enable compile in thumb mode when selected
Date: Thu, 17 Mar 2016 23:03:10 +0100 [thread overview]
Message-ID: <20160317230310.1d40d224@free-electrons.com> (raw)
In-Reply-To: <8737ro6aq7.fsf@dell.be.48ers.dk>
Hello,
On Thu, 17 Mar 2016 22:44:16 +0100, Peter Korsgaard wrote:
> > USE_LDREXSTREX is mandatory for uClibc to build on Thumb2 (see commit
> > https://lists.uclibc.org/pipermail/uclibc/2014-November/048704.html).
> > Otherwise, the build fails with:
>
> Ahh, ok - Good to know. So this is only really needed for thumb2-only
> CPUs (cortex-M).
Mandatory for Thumb2-only CPUs, but perfectly usable for ARMv7-A as
well.
> Completely unrelated, but notice that my browser wouldn't let
> me visit https://lists.uclibc.org because of the HSTS header on
> uclibc.org and the lists.uclibc.org vhost using a certificate for
> *.osuosl.org.
Same here, I have to use Firefox to be able to bypass the "security
checks". Chromium doesn't allow to bypass such security checks (at
least by default).
> > So I think we should:
>
> > 1/ Enable COMPILE_IN_THUMB_MODE whenever ARM_INSTRUCTIONS_THUMB(2) is
> > enabled.
>
> Ok.
>
> > 2/ Enable USE_BX whenever ARM_INSTRUCTIONS_THUMB(2) is enabled. I
> > don't see why USE_BX for later cores can cause performance problems,
> > it's just about using a simple bx instruction to switch between ARM
> > and Thumb modes.
>
> > 3/ Enable USE_LDREXSTREX whenver ARM_INSTRUCTIONS_THUMB(2) is enabled
> > *and* we're on ARMv7. Otherwise, disable it.
>
> With ARMv7 I guess you mean thumb2-only CPUs (cortex-m)?
>
> But COMPILE_IN_THUMB_MODE selects USE_BX / USE_LDREXTREX, so we cannot
> really do that.
>
> I guess we should leave COMPILE_IN_THUMB_MODE alone (it just passes
> -mthumb in CFLAGS which we don't need), and just enable USE_BX/LDREXTREX
> when needed.
USE_LDREXSTREX depends on COMPILE_IN_THUMB_MODE, so you can't have
USE_LDREXSTREX without having COMPILE_IN_THUMB_MODE.
So, instead what I've done is cook a set of patches for uClibc that
simply remove USE_BX, USE_LDREXSTREX and COMPILE_IN_THUMB. None of
those options are needed, everything can be guessed by looking at the
selected ARM variant, and for COMPILE_IN_THUMB, by passing -mthumb.
See
https://github.com/tpetazzoni/uclibc-ng/commits/arm-simplifications.
Build testing in progress. I'm testing:
* Cortex-M4, so a Thumb2-only core
* Cortex-A in Thumb2 mode
* ARM920T in Thumb mode
* FA526, which is an ARMv4 (and therefore doesn't support Thumb)
Any other config you think is relevant?
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2016-03-17 22:03 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-16 21:43 [Buildroot] [PATCH 00/16] ARM Cortex-M support Thomas Petazzoni
2016-03-16 21:43 ` [Buildroot] [PATCH 01/16] arch/arm: introduce and use BR2_ARM_CPU_ARMV7M Thomas Petazzoni
2016-03-16 22:29 ` Arnout Vandecappelle
2016-03-16 21:43 ` [Buildroot] [PATCH 02/16] arch/arm: Cortex-M3 provides only Thumb-2 Thomas Petazzoni
2016-03-16 22:43 ` Arnout Vandecappelle
2016-03-17 8:03 ` Thomas Petazzoni
2016-03-17 11:08 ` Peter Korsgaard
2016-03-17 13:06 ` Thomas Petazzoni
2016-03-17 20:36 ` Thomas Petazzoni
2016-03-17 22:34 ` Arnout Vandecappelle
2016-03-16 21:43 ` [Buildroot] [PATCH 03/16] arch/arm: add Cortex-M4 entry Thomas Petazzoni
2016-03-16 22:50 ` Arnout Vandecappelle
2016-03-16 21:43 ` [Buildroot] [PATCH 04/16] uclibc: Enable compile in thumb mode when selected Thomas Petazzoni
2016-03-16 23:01 ` Arnout Vandecappelle
2016-03-17 11:21 ` Peter Korsgaard
2016-03-17 13:10 ` Thomas Petazzoni
2016-03-17 21:25 ` Thomas Petazzoni
2016-03-17 21:44 ` Peter Korsgaard
2016-03-17 22:03 ` Thomas Petazzoni [this message]
2016-03-17 22:18 ` Peter Korsgaard
2016-03-16 21:43 ` [Buildroot] [PATCH 05/16] uclibc: disable DOPIC on ARM noMMU Thomas Petazzoni
2016-03-16 23:09 ` Arnout Vandecappelle
2016-03-17 8:06 ` Thomas Petazzoni
2016-03-17 10:32 ` Max Filippov
2016-03-17 11:00 ` Thomas Petazzoni
2016-03-17 11:39 ` Max Filippov
2016-03-16 21:43 ` [Buildroot] [PATCH 06/16] uclibc: NPTL thread implementation only available on MMU platforms Thomas Petazzoni
2016-03-16 23:11 ` Arnout Vandecappelle
2016-03-17 12:14 ` Peter Korsgaard
2016-03-17 13:11 ` Thomas Petazzoni
2016-03-17 19:45 ` Waldemar Brodkorb
2016-03-17 20:08 ` Peter Korsgaard
2016-03-16 21:43 ` [Buildroot] [PATCH 07/16] musl: build broken on Thumb, use ARM mode Thomas Petazzoni
2016-03-16 23:14 ` Arnout Vandecappelle
2016-03-17 8:10 ` Thomas Petazzoni
2016-03-16 21:43 ` [Buildroot] [PATCH 08/16] toolchain-buildroot: update glibc comment for noMMU Thomas Petazzoni
2016-03-16 23:18 ` Arnout Vandecappelle
2016-03-18 20:49 ` Thomas Petazzoni
2016-03-18 20:59 ` Peter Korsgaard
2016-03-18 21:33 ` Arnout Vandecappelle
2016-03-16 21:43 ` [Buildroot] [PATCH 09/16] toolchain-buildroot: don't show musl on noMMU platforms Thomas Petazzoni
2016-03-16 23:26 ` Arnout Vandecappelle
2016-03-18 20:51 ` Thomas Petazzoni
2016-03-18 21:42 ` Arnout Vandecappelle
2016-03-16 21:43 ` [Buildroot] [PATCH 10/16] arch/arm: add support for hard-float on Cortex-M4 Thomas Petazzoni
2016-03-16 23:45 ` Arnout Vandecappelle
2016-03-17 8:16 ` Thomas Petazzoni
2016-03-18 21:47 ` Arnout Vandecappelle
2016-03-18 22:29 ` Thomas Petazzoni
2016-03-16 21:43 ` [Buildroot] [PATCH 11/16] package/Makefile.in: adjust LDFLAGS for elf2flt Thomas Petazzoni
2016-03-16 23:48 ` Arnout Vandecappelle
2016-03-16 21:43 ` [Buildroot] [PATCH 12/16] elf2flt: use new upstream site and add ARM patch Thomas Petazzoni
2016-03-16 23:50 ` Arnout Vandecappelle
2016-03-17 8:18 ` Thomas Petazzoni
2016-03-17 18:53 ` Mike Frysinger
2016-03-17 19:41 ` Waldemar Brodkorb
2016-03-17 20:34 ` Thomas Petazzoni
2016-03-17 20:45 ` Mike Frysinger
2016-03-17 19:39 ` Waldemar Brodkorb
2016-03-16 21:43 ` [Buildroot] [PATCH 13/16] elf2flt: disable Werror to avoid build issues Thomas Petazzoni
2016-03-16 23:53 ` Arnout Vandecappelle
2016-03-17 8:18 ` Thomas Petazzoni
2016-03-17 1:40 ` Mike Frysinger
2016-03-17 8:19 ` Thomas Petazzoni
2016-03-17 18:57 ` Mike Frysinger
2016-03-16 21:43 ` [Buildroot] [PATCH 14/16] afboot-stm32: use the Buildroot toolchain Thomas Petazzoni
2016-03-16 21:43 ` [Buildroot] [PATCH 15/16] configs/stm32f429_disco: new configuration for STM32F429 Discovery board Thomas Petazzoni
2016-03-16 21:43 ` [Buildroot] [PATCH 16/16] configs/stm32f469_disco: new configuration for STM32F469 " 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=20160317230310.1d40d224@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--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