All of lore.kernel.org
 help / color / mirror / Atom feed
From: Baruch Siach via buildroot <buildroot@buildroot.org>
To: James Hilliard <james.hilliard1@gmail.com>
Cc: Oscar Gomez Fuente <oscargomezf@gmail.com>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	buildroot <buildroot@buildroot.org>
Subject: Re: [Buildroot] How to select python-cryptograhy package
Date: Wed, 25 May 2022 10:01:06 +0300	[thread overview]
Message-ID: <871qwiozwd.fsf@tarshish> (raw)
In-Reply-To: <CADvTj4r=46JdJUPSzOXgmXVDBWYDM3v5wsFjymbzGF1xoyzO4Q@mail.gmail.com>

Hi James,

On Wed, May 25 2022, James Hilliard wrote:
> On Wed, May 25, 2022 at 12:15 AM Baruch Siach <baruch@tkos.co.il> wrote:
>> On Wed, May 25 2022, Oscar Gomez Fuente wrote:
>> >> So now when you lookup BR2_PACKAGE_PYTHON_CRYPTOGRAPHY in menuconfig
>> >> search do you still see 'BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS [=n]'?
>> >
>> > YES
>> >
>> >> Please send your .config file.
>> >
>> > OK
>>
>> I see the problem now. Your target platform is BR2_arm (32 bit), but
>> your CPU selection is BR2_ARM_CPU_ARMV8A (64 bit capable). This
>> combination is not supported in current
>> BR2_PACKAGE_HOST_RUSTC_TARGET_TIER2_HOST_TOOLS_PLATFORMS or
>> BR2_PACKAGE_HOST_RUSTC_TARGET_TIER2_PLATFORMS. This patch should make
>> BR2_PACKAGE_PYTHON_CRYPTOGRAPHY selectable, but I'm not sure it's
>> correct:
>>
>> diff --git a/package/rustc/Config.in.host b/package/rustc/Config.in.host
>> index a86d95236d90..64b135f86f27 100644
>> --- a/package/rustc/Config.in.host
>> +++ b/package/rustc/Config.in.host
>> @@ -42,6 +42,8 @@ config BR2_PACKAGE_HOST_RUSTC_TARGET_TIER2_HOST_TOOLS_PLATFORMS
>>         default y if BR2_ARM_CPU_ARMV6 && BR2_ARM_EABIHF && BR2_TOOLCHAIN_USES_GLIBC
>>         # armv7-unknown-linux-gnueabihf
>>         default y if BR2_ARM_CPU_ARMV7A && BR2_ARM_EABIHF && BR2_TOOLCHAIN_USES_GLIBC
>> +       # armv8-unknown-linux-gnueabihf
>> +       default y if BR2_arm && BR2_ARM_CPU_ARMV8A && BR2_ARM_EABIHF && BR2_TOOLCHAIN_USES_GLIBC
>>         # mips-unknown-linux-gnu
>>         default y if BR2_mips && BR2_TOOLCHAIN_USES_GLIBC && !BR2_MIPS_CPU_MIPS32R6
>>         # mips64-unknown-linux-gnuabi64
>> @@ -86,6 +88,8 @@ config BR2_PACKAGE_HOST_RUSTC_TARGET_TIER2_PLATFORMS
>>         default y if BR2_ARM_CPU_ARMV7A && BR2_ARM_EABI && BR2_TOOLCHAIN_USES_MUSL
>>         # armv7-unknown-linux-musleabihf
>>         default y if BR2_ARM_CPU_ARMV7A && BR2_ARM_EABIHF && BR2_TOOLCHAIN_USES_MUSL
>> +       # armv8-unknown-linux-musleabihf
>> +       default y if BR2_arm && BR2_ARM_CPU_ARMV8A && BR2_ARM_EABIHF && BR2_TOOLCHAIN_USES_MUSL
>>         # i586-unknown-linux-gnu
>>         default y if BR2_i586 && BR2_TOOLCHAIN_USES_GLIBC
>>         # i586-unknown-linux-musl
>>
>> Adding James and Thomas to Cc since they showed interest in rustc over
>> the last year.
>>
>> Is that the right solution?
>
> Probably needs mappings for the toolchain which don't seem to follow the same
> scheme as our currently supported architectures, see here:
> https://doc.rust-lang.org/rustc/platform-support.html#tier-2
>
> For armv8 I see:
> thumbv8m.base-none-eabi*ARMv8-M Baseline
> thumbv8m.main-none-eabi*ARMv8-M Mainline
> thumbv8m.main-none-eabihf*ARMv8-M Mainline, hardfloat
>
> Although not really sure those will work correctly with musl.

The '*' in the table indicates no_std, that is, bare metal. That's most
likely not what we want for Buildroot. Can we map BR2_ARM_CPU_ARMV8A to
armv7 line the following:

diff --git a/package/rustc/Config.in.host b/package/rustc/Config.in.host
index a86d95236d90..6aac703b2a4f 100644
--- a/package/rustc/Config.in.host
+++ b/package/rustc/Config.in.host
@@ -42,6 +42,8 @@ config BR2_PACKAGE_HOST_RUSTC_TARGET_TIER2_HOST_TOOLS_PLATFORMS
 	default y if BR2_ARM_CPU_ARMV6 && BR2_ARM_EABIHF && BR2_TOOLCHAIN_USES_GLIBC
 	# armv7-unknown-linux-gnueabihf
 	default y if BR2_ARM_CPU_ARMV7A && BR2_ARM_EABIHF && BR2_TOOLCHAIN_USES_GLIBC
+	# armv8-unknown-linux-gnueabihf
+	default y if BR2_arm && BR2_ARM_CPU_ARMV8A && BR2_ARM_EABIHF && BR2_TOOLCHAIN_USES_GLIBC
 	# mips-unknown-linux-gnu
 	default y if BR2_mips && BR2_TOOLCHAIN_USES_GLIBC && !BR2_MIPS_CPU_MIPS32R6
 	# mips64-unknown-linux-gnuabi64
@@ -86,6 +88,8 @@ config BR2_PACKAGE_HOST_RUSTC_TARGET_TIER2_PLATFORMS
 	default y if BR2_ARM_CPU_ARMV7A && BR2_ARM_EABI && BR2_TOOLCHAIN_USES_MUSL
 	# armv7-unknown-linux-musleabihf
 	default y if BR2_ARM_CPU_ARMV7A && BR2_ARM_EABIHF && BR2_TOOLCHAIN_USES_MUSL
+	# armv8-unknown-linux-musleabihf
+	default y if BR2_arm && BR2_ARM_CPU_ARMV8A && BR2_ARM_EABIHF && BR2_TOOLCHAIN_USES_MUSL
 	# i586-unknown-linux-gnu
 	default y if BR2_i586 && BR2_TOOLCHAIN_USES_GLIBC
 	# i586-unknown-linux-musl
@@ -114,7 +118,7 @@ config BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS
 config BR2_PACKAGE_HOST_RUSTC_ARCH
 	string
 	default "armv5te" if BR2_ARM_CPU_ARMV5
-	default "armv7"  if BR2_ARM_CPU_ARMV7A
+	default "armv7"  if BR2_ARM_CPU_ARMV7A || (BR2_arm && BR2_ARM_CPU_ARMV8A)
 	default "riscv64gc" if BR2_RISCV_64
 	default BR2_ARCH
 
baruch

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2022-05-25  7:05 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-20 15:25 [Buildroot] How to select python-cryptograhy package Oscar Gomez Fuente
2022-05-21 20:22 ` Baruch Siach via buildroot
2022-05-22 18:45   ` Oscar Gomez Fuente
2022-05-23  3:38     ` Baruch Siach via buildroot
2022-05-23 10:22       ` Oscar Gomez Fuente
2022-05-23 15:38         ` Baruch Siach via buildroot
2022-05-23 16:07           ` Oscar Gomez Fuente
2022-05-24 19:14             ` Baruch Siach via buildroot
2022-05-25  5:31               ` Oscar Gomez Fuente
2022-05-25  6:05                 ` Baruch Siach via buildroot
2022-05-25  6:28                   ` James Hilliard
2022-05-25  7:01                     ` Baruch Siach via buildroot [this message]
2022-05-25  7:36                       ` James Hilliard
2022-06-02 17:00                       ` Thomas Petazzoni via buildroot
2022-06-03 13:47                         ` Baruch Siach via buildroot
2022-06-03 14:03                           ` Thomas Petazzoni via buildroot
2022-05-24 20:24             ` Fabio Estevam

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=871qwiozwd.fsf@tarshish \
    --to=buildroot@buildroot.org \
    --cc=baruch@tkos.co.il \
    --cc=james.hilliard1@gmail.com \
    --cc=oscargomezf@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.