From: Arnout Vandecappelle via buildroot <buildroot@buildroot.org>
To: "Gaël PORTAY" <gael.portay+rtone@gmail.com>, buildroot@buildroot.org
Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>,
Romain Naour <romain.naour@gmail.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [Buildroot] [PATCH 1/1] support/scripts/gen-bootlin-toolchains: allows armv8-a CPU to use armv7-a toolchains
Date: Fri, 2 May 2025 12:35:05 +0200 [thread overview]
Message-ID: <51b0d3f0-d24f-4bfa-9daa-d25797bb68e6@rnout.be> (raw)
In-Reply-To: <20250415112505.1841541-1-gael.portay+rtone@gmail.com>
On 15/04/2025 13:25, Gaël PORTAY wrote:
> The ARMV7-A toolchains are capable to compile binaries for ARMv8-A CPU
> in AArch32 execution state.
>
> This adds the BR2_ARM_CPU_ARMV8A option in the 'conditions' to allow
> ARMV8-A CPU such as Cortex-A53 or Cortex-A72 to use ARMV7-A toolchains.
>
> Signed-off-by: Gaël PORTAY <gael.portay+rtone@gmail.com>
Applied to 2025.02.x, thanks.
Regards,
Arnout
> ---
>
> Hello,
>
> In an attempt to move the Raspberry defconfigs to the Bootlin external
> toolchain (glibc-stable), I figured out that the ARM64 CPUs in 32-bits
> have no Bootlin toolchain available because of a lack for the likewise
> 'conditions': BR2_ARM_CPU_ARMV7A || BR2_ARM_CPU_ARMV8A
>
> I am a little bit concerned about the change propose in this patch as
> the 'conditions' could be used to generate the test if no 'test_options'
> is defined, and that cannot split the following 'conditions' into single
> option pieces:
>
> (BR2_ARM_CPU_ARMV7A && BR2_ARM_EABIHF) || BR2_ARM_CPU_ARMV8A
>
> This is the part of code that would not work if 'test_options' is unset:
>
> if 'test_options' in arches[self.arch]:
> test_options = arches[self.arch]['test_options']
> else:
> test_options = arches[self.arch]['conditions']
> for opt in test_options:
> if opt.startswith("!"):
> f.write(" # %s is not set\n" % opt[1:])
> else:
> f.write(" %s=y\n" % opt)
>
> However, this kind of "complex" 'conditions' with such CPU feature
> options requires to get overriden by the 'test_options', right?
>
> Regards,
> Gaël PORTAY
>
> support/scripts/gen-bootlin-toolchains | 4 +-
> .../Config.in.options | 40 +++++++------------
> 2 files changed, 16 insertions(+), 28 deletions(-)
>
> diff --git a/support/scripts/gen-bootlin-toolchains b/support/scripts/gen-bootlin-toolchains
> index 9ba5827cf6..502411d4cc 100755
> --- a/support/scripts/gen-bootlin-toolchains
> +++ b/support/scripts/gen-bootlin-toolchains
> @@ -52,12 +52,12 @@ arches = {
> 'prefix': 'arm',
> },
> 'armv7-eabihf': {
> - 'conditions': ['BR2_arm', 'BR2_ARM_CPU_ARMV7A', 'BR2_ARM_EABIHF'],
> + 'conditions': ['BR2_arm', '(BR2_ARM_CPU_ARMV7A && BR2_ARM_EABIHF) || BR2_ARM_CPU_ARMV8A'],
> 'test_options': ['BR2_arm', 'BR2_cortex_a8', 'BR2_ARM_EABIHF'],
> 'prefix': 'arm',
> },
> 'armebv7-eabihf': {
> - 'conditions': ['BR2_armeb', 'BR2_ARM_CPU_ARMV7A', 'BR2_ARM_EABIHF'],
> + 'conditions': ['BR2_armeb', '(BR2_ARM_CPU_ARMV7A && BR2_ARM_EABIHF) || BR2_ARM_CPU_ARMV8A'],
> 'test_options': ['BR2_armeb', 'BR2_cortex_a8', 'BR2_ARM_EABIHF'],
> 'prefix': 'armeb',
> },
> diff --git a/toolchain/toolchain-external/toolchain-external-bootlin/Config.in.options b/toolchain/toolchain-external/toolchain-external-bootlin/Config.in.options
> index 471dc55f44..ef3d23d026 100644
> --- a/toolchain/toolchain-external/toolchain-external-bootlin/Config.in.options
> +++ b/toolchain/toolchain-external/toolchain-external-bootlin/Config.in.options
> @@ -8,8 +8,8 @@ config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARCH_SUPPORTS
> default y if BR2_arcle && BR2_archs38
> default y if BR2_arm && BR2_ARM_CPU_ARMV5 && BR2_ARM_EABI
> default y if BR2_arm && BR2_ARM_CPU_ARMV6 && BR2_ARM_EABIHF
> - default y if BR2_arm && BR2_ARM_CPU_ARMV7A && BR2_ARM_EABIHF
> - default y if BR2_armeb && BR2_ARM_CPU_ARMV7A && BR2_ARM_EABIHF
> + default y if BR2_arm && (BR2_ARM_CPU_ARMV7A && BR2_ARM_EABIHF) || BR2_ARM_CPU_ARMV8A
> + default y if BR2_armeb && (BR2_ARM_CPU_ARMV7A && BR2_ARM_EABIHF) || BR2_ARM_CPU_ARMV8A
> default y if BR2_arm && BR2_ARM_CPU_ARMV7M && BR2_BINFMT_FLAT
> default y if BR2_m68k_m68k
> default y if BR2_m68k_cf
> @@ -816,8 +816,7 @@ config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV6_EABIHF_UCLIBC_STABLE
> config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_GLIBC_BLEEDING_EDGE
> bool "armv7-eabihf glibc bleeding-edge 2024.05-1"
> depends on BR2_arm
> - depends on BR2_ARM_CPU_ARMV7A
> - depends on BR2_ARM_EABIHF
> + depends on (BR2_ARM_CPU_ARMV7A && BR2_ARM_EABIHF) || BR2_ARM_CPU_ARMV8A
> depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_15
> depends on BR2_USE_MMU
> select BR2_TOOLCHAIN_GCC_AT_LEAST_14
> @@ -843,8 +842,7 @@ config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_GLIBC_BLEEDING_EDGE
> config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_GLIBC_STABLE
> bool "armv7-eabihf glibc stable 2024.05-1"
> depends on BR2_arm
> - depends on BR2_ARM_CPU_ARMV7A
> - depends on BR2_ARM_EABIHF
> + depends on (BR2_ARM_CPU_ARMV7A && BR2_ARM_EABIHF) || BR2_ARM_CPU_ARMV8A
> depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_14
> depends on BR2_USE_MMU
> select BR2_TOOLCHAIN_GCC_AT_LEAST_13
> @@ -869,8 +867,7 @@ config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_GLIBC_STABLE
> config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_MUSL_BLEEDING_EDGE
> bool "armv7-eabihf musl bleeding-edge 2024.05-1"
> depends on BR2_arm
> - depends on BR2_ARM_CPU_ARMV7A
> - depends on BR2_ARM_EABIHF
> + depends on (BR2_ARM_CPU_ARMV7A && BR2_ARM_EABIHF) || BR2_ARM_CPU_ARMV8A
> depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_15
> depends on BR2_USE_MMU
> select BR2_TOOLCHAIN_GCC_AT_LEAST_14
> @@ -896,8 +893,7 @@ config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_MUSL_BLEEDING_EDGE
> config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_MUSL_STABLE
> bool "armv7-eabihf musl stable 2024.05-1"
> depends on BR2_arm
> - depends on BR2_ARM_CPU_ARMV7A
> - depends on BR2_ARM_EABIHF
> + depends on (BR2_ARM_CPU_ARMV7A && BR2_ARM_EABIHF) || BR2_ARM_CPU_ARMV8A
> depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_14
> depends on BR2_USE_MMU
> select BR2_TOOLCHAIN_GCC_AT_LEAST_13
> @@ -922,8 +918,7 @@ config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_MUSL_STABLE
> config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_UCLIBC_BLEEDING_EDGE
> bool "armv7-eabihf uclibc bleeding-edge 2024.05-1"
> depends on BR2_arm
> - depends on BR2_ARM_CPU_ARMV7A
> - depends on BR2_ARM_EABIHF
> + depends on (BR2_ARM_CPU_ARMV7A && BR2_ARM_EABIHF) || BR2_ARM_CPU_ARMV8A
> depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_15
> select BR2_TOOLCHAIN_GCC_AT_LEAST_14
> select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_15
> @@ -949,8 +944,7 @@ config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_UCLIBC_BLEEDING_EDGE
> config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_UCLIBC_STABLE
> bool "armv7-eabihf uclibc stable 2024.05-1"
> depends on BR2_arm
> - depends on BR2_ARM_CPU_ARMV7A
> - depends on BR2_ARM_EABIHF
> + depends on (BR2_ARM_CPU_ARMV7A && BR2_ARM_EABIHF) || BR2_ARM_CPU_ARMV8A
> depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_14
> select BR2_TOOLCHAIN_GCC_AT_LEAST_13
> select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19
> @@ -975,8 +969,7 @@ config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_UCLIBC_STABLE
> config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMEBV7_EABIHF_GLIBC_BLEEDING_EDGE
> bool "armebv7-eabihf glibc bleeding-edge 2024.05-1"
> depends on BR2_armeb
> - depends on BR2_ARM_CPU_ARMV7A
> - depends on BR2_ARM_EABIHF
> + depends on (BR2_ARM_CPU_ARMV7A && BR2_ARM_EABIHF) || BR2_ARM_CPU_ARMV8A
> depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_15
> depends on BR2_USE_MMU
> select BR2_TOOLCHAIN_GCC_AT_LEAST_14
> @@ -1002,8 +995,7 @@ config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMEBV7_EABIHF_GLIBC_BLEEDING_EDGE
> config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMEBV7_EABIHF_GLIBC_STABLE
> bool "armebv7-eabihf glibc stable 2024.05-1"
> depends on BR2_armeb
> - depends on BR2_ARM_CPU_ARMV7A
> - depends on BR2_ARM_EABIHF
> + depends on (BR2_ARM_CPU_ARMV7A && BR2_ARM_EABIHF) || BR2_ARM_CPU_ARMV8A
> depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_14
> depends on BR2_USE_MMU
> select BR2_TOOLCHAIN_GCC_AT_LEAST_13
> @@ -1028,8 +1020,7 @@ config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMEBV7_EABIHF_GLIBC_STABLE
> config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMEBV7_EABIHF_MUSL_BLEEDING_EDGE
> bool "armebv7-eabihf musl bleeding-edge 2024.05-1"
> depends on BR2_armeb
> - depends on BR2_ARM_CPU_ARMV7A
> - depends on BR2_ARM_EABIHF
> + depends on (BR2_ARM_CPU_ARMV7A && BR2_ARM_EABIHF) || BR2_ARM_CPU_ARMV8A
> depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_15
> depends on BR2_USE_MMU
> select BR2_TOOLCHAIN_GCC_AT_LEAST_14
> @@ -1055,8 +1046,7 @@ config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMEBV7_EABIHF_MUSL_BLEEDING_EDGE
> config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMEBV7_EABIHF_MUSL_STABLE
> bool "armebv7-eabihf musl stable 2024.05-1"
> depends on BR2_armeb
> - depends on BR2_ARM_CPU_ARMV7A
> - depends on BR2_ARM_EABIHF
> + depends on (BR2_ARM_CPU_ARMV7A && BR2_ARM_EABIHF) || BR2_ARM_CPU_ARMV8A
> depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_14
> depends on BR2_USE_MMU
> select BR2_TOOLCHAIN_GCC_AT_LEAST_13
> @@ -1081,8 +1071,7 @@ config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMEBV7_EABIHF_MUSL_STABLE
> config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMEBV7_EABIHF_UCLIBC_BLEEDING_EDGE
> bool "armebv7-eabihf uclibc bleeding-edge 2024.05-1"
> depends on BR2_armeb
> - depends on BR2_ARM_CPU_ARMV7A
> - depends on BR2_ARM_EABIHF
> + depends on (BR2_ARM_CPU_ARMV7A && BR2_ARM_EABIHF) || BR2_ARM_CPU_ARMV8A
> depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_15
> select BR2_TOOLCHAIN_GCC_AT_LEAST_14
> select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_15
> @@ -1108,8 +1097,7 @@ config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMEBV7_EABIHF_UCLIBC_BLEEDING_EDGE
> config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMEBV7_EABIHF_UCLIBC_STABLE
> bool "armebv7-eabihf uclibc stable 2024.05-1"
> depends on BR2_armeb
> - depends on BR2_ARM_CPU_ARMV7A
> - depends on BR2_ARM_EABIHF
> + depends on (BR2_ARM_CPU_ARMV7A && BR2_ARM_EABIHF) || BR2_ARM_CPU_ARMV8A
> depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_14
> select BR2_TOOLCHAIN_GCC_AT_LEAST_13
> select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2025-05-02 10:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-15 11:25 [Buildroot] [PATCH 1/1] support/scripts/gen-bootlin-toolchains: allows armv8-a CPU to use armv7-a toolchains Gaël PORTAY
2025-04-19 14:03 ` Thomas Petazzoni via buildroot
2025-05-02 10:35 ` Arnout Vandecappelle via buildroot [this message]
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=51b0d3f0-d24f-4bfa-9daa-d25797bb68e6@rnout.be \
--to=buildroot@buildroot.org \
--cc=arnout@rnout.be \
--cc=gael.portay+rtone@gmail.com \
--cc=giulio.benetti@benettiengineering.com \
--cc=romain.naour@gmail.com \
--cc=thomas.petazzoni@bootlin.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.