From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] package/audit: force arm mode instead of Thumb mode
Date: Thu, 23 Feb 2023 07:41:29 +0100 [thread overview]
Message-ID: <20230223064129.GL2718518@scaer> (raw)
In-Reply-To: <20230223062259.GJ2718518@scaer>
Fabrice, All,
On 2023-02-23 07:22 +0100, Yann E. MORIN spake thusly:
> On 2023-02-22 15:35 +0100, Fabrice Fontaine spake thusly:
> > Fix the following build failure:
> >
> > /tmp/ccY5gl3z.s:2145: Error: selected processor does not support `mcr p15,0,r2,c7,c10,5' in Thumb mode
> >
> > Fixes:
> > - http://autobuild.buildroot.org/results/9d18a0d360b2e2f9e87c55daedda62d6ce198bb9
> >
> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > ---
> > package/audit/audit.mk | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/package/audit/audit.mk b/package/audit/audit.mk
> > index cbb174b980..af81dabac0 100644
> > --- a/package/audit/audit.mk
> > +++ b/package/audit/audit.mk
> > @@ -15,6 +15,13 @@ AUDIT_INSTALL_STAGING = YES
> >
> > AUDIT_CONF_OPTS = --without-python --without-python3
> >
> > +# 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.
>
> I looked at the code, and it's going to be very complex to patch it to
> support armv7m, i.e. thumb-only.
>
> So, we will have to disallow audit in this case. It is going to be easy,
> as it already have a _ARCH_SUPPORTS, but it going to neeed a bit of
> cleanup:
>
> config BR2_PACKAGE_AUDIT_ARCH_SUPPORTS
> bool
> default y if BR2_aarch64
> default y if (BR2_arm || BR2_armeb) && BR2_ARM_CPU_HAS_ARM
As I wrote in the libev review for the same issue, the condition is a
bit more complex:
default y if (BR2_arm || BR2_armeb) && (BR2_ARM_CPU_HAS_ARM || BR2_ARM_CPU_HAS_THUMB2)
Regards,
Yann E. MORIN.
> default y if BR2_i386 || BR2_x86_64
> default y if BR2_powerpc || BR2_powerpc64
>
> And then, the only 'select' is from libsemanage, which already depends
> on AUDIT_ARCH_SUPPORT, so all is going to be alright (in the end).
>
> Regards,
> Yann E. MORIN.
>
> > ifeq ($(BR2_PACKAGE_LIBCAP_NG),y)
> > AUDIT_DEPENDENCIES += libcap-ng
> > AUDIT_CONF_OPTS += --with-libcap-ng=yes
> > --
> > 2.39.0
> >
> > _______________________________________________
> > buildroot mailing list
> > buildroot@buildroot.org
> > https://lists.buildroot.org/mailman/listinfo/buildroot
>
> --
> .-----------------.--------------------.------------------.--------------------.
> | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
> | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
> '------------------------------^-------^------------------^--------------------'
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2023-02-23 6:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-22 14:35 [Buildroot] [PATCH 1/1] package/audit: force arm mode instead of Thumb mode Fabrice Fontaine
2023-02-23 6:22 ` Yann E. MORIN
2023-02-23 6:41 ` Yann E. MORIN [this message]
2023-02-23 21:42 ` Thomas Petazzoni via buildroot
2023-03-09 21:43 ` Arnout Vandecappelle
2023-03-16 21:35 ` Peter Korsgaard
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=20230223064129.GL2718518@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@buildroot.org \
--cc=fontaine.fabrice@gmail.com \
/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