All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] rustc: disable for ARMV7A with EABI
@ 2018-02-26 20:04 Eric Le Bihan
  2018-02-26 22:43 ` Peter Korsgaard
  2018-02-26 22:52 ` Thomas Petazzoni
  0 siblings, 2 replies; 6+ messages in thread
From: Eric Le Bihan @ 2018-02-26 20:04 UTC (permalink / raw)
  To: buildroot

The Rust project does not support armv7a EABI, only EABIHF [1]. So
disable rustc for this ARM variant.

Fixes:

- http://autobuild.buildroot.net/results/51c98ca5486e7e83725ababa437cbb8204ceb66b/

[1] https://forge.rust-lang.org/platform-support.html

Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
---
 package/rustc/Config.in.host | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/rustc/Config.in.host b/package/rustc/Config.in.host
index bdbe488f48..1c79eededc 100644
--- a/package/rustc/Config.in.host
+++ b/package/rustc/Config.in.host
@@ -5,7 +5,8 @@ config BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS
 	default y if BR2_i386
 	default y if BR2_x86_64
 	default y if BR2_aarch64
-	default y if BR2_arm && !BR2_ARM_CPU_ARMV4 && !BR2_ARM_CPU_ARMV5
+	default y if BR2_arm && !BR2_ARM_CPU_ARMV4 && !BR2_ARM_CPU_ARMV5 \
+	        && !(BR2_ARM_CPU_ARMV7A && BR2_ARM_EABI)
 	default y if BR2_powerpc || BR2_powerpc64
 	default y if (BR2_mips || BR2_mipsel) && !BR2_MIPS_CPU_MIPS32R6
 	default y if (BR2_mips64 || BR2_mips64el) && !BR2_MIPS_CPU_MIPS64R6 \
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/1] rustc: disable for ARMV7A with EABI
  2018-02-26 20:04 [Buildroot] [PATCH 1/1] rustc: disable for ARMV7A with EABI Eric Le Bihan
@ 2018-02-26 22:43 ` Peter Korsgaard
  2018-02-26 22:52 ` Thomas Petazzoni
  1 sibling, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2018-02-26 22:43 UTC (permalink / raw)
  To: buildroot

>>>>> "Eric" == Eric Le Bihan <eric.le.bihan.dev@free.fr> writes:

 > The Rust project does not support armv7a EABI, only EABIHF [1]. So
 > disable rustc for this ARM variant.

 > Fixes:

 > - http://autobuild.buildroot.net/results/51c98ca5486e7e83725ababa437cbb8204ceb66b/

 > [1] https://forge.rust-lang.org/platform-support.html

 > Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/1] rustc: disable for ARMV7A with EABI
  2018-02-26 20:04 [Buildroot] [PATCH 1/1] rustc: disable for ARMV7A with EABI Eric Le Bihan
  2018-02-26 22:43 ` Peter Korsgaard
@ 2018-02-26 22:52 ` Thomas Petazzoni
  2018-02-27  7:51   ` Peter Korsgaard
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2018-02-26 22:52 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon, 26 Feb 2018 21:04:21 +0100, Eric Le Bihan wrote:
> The Rust project does not support armv7a EABI, only EABIHF [1]. So
> disable rustc for this ARM variant.

Are you sure ?

> [1] https://forge.rust-lang.org/platform-support.html

On this page, I see:

arm-unknown-linux-gnueabi 	? 	? 	? 	ARMv6 Linux
arm-unknown-linux-gnueabihf 	? 	? 	? 	ARMv6 Linux, hardfloat
armv7-unknown-linux-gnueabihf 	? 	? 	? 	ARMv7 Linux

The arm-unknown-linux-gnueabi variant should apply to ARMv7 as well.

It looks like a better fix would be:

config BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS
        bool
        # The pre-built Rust standard library is only available for the
        # following architectures/ABIs, and is built against glibc.
        default y if BR2_i386
        default y if BR2_x86_64
        default y if BR2_aarch64
-       default y if BR2_arm && !BR2_ARM_CPU_ARMV4 && !BR2_ARM_CPU_ARMV5
+	default y if BR2_ARM_CPU_ARMV6 || BR2_ARM_CPU_ARMV7A
        default y if BR2_powerpc || BR2_powerpc64
        default y if (BR2_mips || BR2_mipsel) && !BR2_MIPS_CPU_MIPS32R6
        default y if (BR2_mips64 || BR2_mips64el) && !BR2_MIPS_CPU_MIPS64R6 \
                && BR2_MIPS_NABI64
        depends on BR2_TOOLCHAIN_USES_GLIBC
        depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"

config BR2_PACKAGE_HOST_RUSTC_ARCH
        string
-	default "armv7"  if BR2_ARM_CPU_ARMV7A
+       default "armv7"  if (BR2_ARM_CPU_ARMV7A && BR2_ARM_EABIHF)
        default BR2_ARCH if !BR2_ARM_CPU_ARMV7A

config BR2_PACKAGE_HOST_RUSTC_ABI
        string
        default "eabi"   if BR2_ARM_EABI
        default "eabihf" if BR2_ARM_EABIHF
        default "abi64"  if BR2_MIPS_NABI64

Indeed arm-unknown-linux-gnueabi can support ARMv6 and later (including
ARMv7) with EABI, arm-unknown-linux-gnueabihf can support ARMv6 EABIhf,
and armv7-unknown-linux-gnueabihf can support ARMv7 EABIhf.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/1] rustc: disable for ARMV7A with EABI
  2018-02-26 22:52 ` Thomas Petazzoni
@ 2018-02-27  7:51   ` Peter Korsgaard
  2018-02-27  8:39     ` Thomas Petazzoni
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Korsgaard @ 2018-02-27  7:51 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:

 > Hello,
 > On Mon, 26 Feb 2018 21:04:21 +0100, Eric Le Bihan wrote:
 >> The Rust project does not support armv7a EABI, only EABIHF [1]. So
 >> disable rustc for this ARM variant.

 > Are you sure ?

 >> [1] https://forge.rust-lang.org/platform-support.html

 > On this page, I see:

 > arm-unknown-linux-gnueabi 	? 	? 	? 	ARMv6 Linux
 > arm-unknown-linux-gnueabihf 	? 	? 	? 	ARMv6 Linux, hardfloat
 > armv7-unknown-linux-gnueabihf 	? 	? 	? 	ARMv7 Linux

 > The arm-unknown-linux-gnueabi variant should apply to ARMv7 as well.

Ok, but that is more of an improvement. It was still wrong that it tried
to download an ARMv7 EABI toolchain.

 > It looks like a better fix would be:

 > config BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS
 >         bool
 >         # The pre-built Rust standard library is only available for the
 >         # following architectures/ABIs, and is built against glibc.
 >         default y if BR2_i386
 >         default y if BR2_x86_64
 >         default y if BR2_aarch64
 > -       default y if BR2_arm && !BR2_ARM_CPU_ARMV4 && !BR2_ARM_CPU_ARMV5
 > +	default y if BR2_ARM_CPU_ARMV6 || BR2_ARM_CPU_ARMV7A

I agree that having positive logic would be nicer. It is a bit more
complicated than this as we also should handle ARMV8A cores in ARM mode
similar to how ve handle ARMV7A.

Care to send an updated patch on top of master doing that?

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/1] rustc: disable for ARMV7A with EABI
  2018-02-27  7:51   ` Peter Korsgaard
@ 2018-02-27  8:39     ` Thomas Petazzoni
  2018-02-27  8:57       ` Peter Korsgaard
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2018-02-27  8:39 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 27 Feb 2018 08:51:38 +0100, Peter Korsgaard wrote:

>  > It looks like a better fix would be:  
> 
>  > config BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS
>  >         bool
>  >         # The pre-built Rust standard library is only available for the
>  >         # following architectures/ABIs, and is built against glibc.
>  >         default y if BR2_i386
>  >         default y if BR2_x86_64
>  >         default y if BR2_aarch64
>  > -       default y if BR2_arm && !BR2_ARM_CPU_ARMV4 && !BR2_ARM_CPU_ARMV5
>  > +	default y if BR2_ARM_CPU_ARMV6 || BR2_ARM_CPU_ARMV7A  
> 
> I agree that having positive logic would be nicer. It is a bit more
> complicated than this as we also should handle ARMV8A cores in ARM mode
> similar to how ve handle ARMV7A.
> 
> Care to send an updated patch on top of master doing that?

I was hoping that Eric would handle that :-)

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/1] rustc: disable for ARMV7A with EABI
  2018-02-27  8:39     ` Thomas Petazzoni
@ 2018-02-27  8:57       ` Peter Korsgaard
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2018-02-27  8:57 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:

Hi,

 >> I agree that having positive logic would be nicer. It is a bit more
 >> complicated than this as we also should handle ARMV8A cores in ARM mode
 >> similar to how ve handle ARMV7A.
 >> 
 >> Care to send an updated patch on top of master doing that?

 > I was hoping that Eric would handle that :-)

Fine by me. Eric? ;)

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-02-27  8:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-26 20:04 [Buildroot] [PATCH 1/1] rustc: disable for ARMV7A with EABI Eric Le Bihan
2018-02-26 22:43 ` Peter Korsgaard
2018-02-26 22:52 ` Thomas Petazzoni
2018-02-27  7:51   ` Peter Korsgaard
2018-02-27  8:39     ` Thomas Petazzoni
2018-02-27  8:57       ` Peter Korsgaard

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.