[Buildroot] [PATCH 1/1] package/audit: force arm mode instead of Thumb mode

Thomas Petazzoni thomas.petazzoni at bootlin.com
Thu Feb 23 21:42:01 UTC 2023


Hello Yann,

On Thu, 23 Feb 2023 07:22:59 +0100
"Yann E. MORIN" <yann.morin.1998 at free.fr> wrote:

> > +# src/libev has some assembly function that is not present in Thumb mode:
> > +# Error: selected processor does not support `mcr p15,0,r3,c7,c10,5' in Thumb mode
> > +# so, we desactivate Thumb mode
> > +ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y)
> > +AUDIT_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -marm"
> > +endif  
> 
> But then it would not work on systems that have a armv7m: BR2_cortex_m3,
> BR2_cortex_m4, or BR2_cortex_m7.

BR2_ARM_INSTRUCTIONS_THUMB is for "classic" Thumb, not Thumb2.
BR2_ARM_INSTRUCTIONS_THUMB2 is used for Thumb2 platforms, such as
ARMv7-M.

So the above condition will only trigger for ARMv4/ARMv5/ARMv6 cores,
and they all support both classic Thumb and regular ARM instruction set.

So to me, the above proposal from Fabrice works fine.

> I looked at the code, and it's going to be very complex to patch it to
> support armv7m, i.e. thumb-only.

Thumb2-only, which is totally different.

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com



More information about the buildroot mailing list