[PATCH] scripts/build-many-glibcs.py: Switch one Arm target to thumb mode

Florian Weimer fweimer@redhat.com
Wed Jul 7 15:48:50 GMT 2021


* Joseph Myers:

> On Wed, 7 Jul 2021, Florian Weimer via Libc-alpha wrote:
>
>> * Joseph Myers:
>> 
>> > On Wed, 7 Jul 2021, Florian Weimer via Libc-alpha wrote:
>> >
>> >> This commit changes arm-linux-gnueabihf-v7a-disable-multi-arch
>> >> to use thumb mode.  The choice is somewhat arbitrary, but there
>> >> should be at least one thumb mode target.
>> >
>> > My inclination would be to add a new variant for this rather than changing 
>> > an existing one.
>> 
>> Running build-many-glibcs.py isn't free.  We can't test all possible
>> combinations, and -mthumb is a real gap.
>
> It also makes sense for the -mthumb variant to have that as the only 
> difference from another variant (rather than the only -mthumb Arm variant 
> also being the only --disable-multi-arch Arm variant).
>
>> If we absolutely have to add a new target, should it be based on
>> arm-linux-gnueabi?
>
> Well, it needs to build with at least -march=armv7-a (technically, at 
> least v6t2) - building glibc as Thumb-1 rather than Thumb-2 isn't 
> supported - so that suggests making it like the arm-linux-gnueabihf-v7a 
> variant except for -mthumb added.

Like this?  The new target builds with the out-of-line futex wake patch
applied.

Thanks,
Florian

Subject: build-many-glibcs.py: Add glibcs-arm-linux-gnueabihf-thumb

Previously, there was now thumb variant, despite that building
glibc in Thumb-2 mode is supported.

---
 scripts/build-many-glibcs.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py
index 243323b1ce..6643bb6e92 100755
--- a/scripts/build-many-glibcs.py
+++ b/scripts/build-many-glibcs.py
@@ -188,6 +188,9 @@ class Context(object):
                         gcc_cfg=['--with-float=hard', '--with-cpu=arm926ej-s'],
                         extra_glibcs=[{'variant': 'v7a',
                                        'ccopts': '-march=armv7-a -mfpu=vfpv3'},
+                                      {'variant': 'thumb',
+                                       'ccopts':
+                                       '-mthumb -march=armv7-a -mfpu=vfpv3'},
                                       {'variant': 'v7a-disable-multi-arch',
                                        'ccopts': '-march=armv7-a -mfpu=vfpv3',
                                        'cfg': ['--disable-multi-arch']}])



More information about the Libc-alpha mailing list