[”master] ”] meta: rust: Bug fix for target definitions returning 'NoneType' for arm

Message ID 20220406145959.60251-1-sundeep.kokkonda@gmail.com
State New
Headers show
Series [”master] ”] meta: rust: Bug fix for target definitions returning 'NoneType' for arm | expand

Commit Message

Sundeep KOKKONDA April 6, 2022, 2:59 p.m. UTC
The build shows below error while building for arm machines.
Exception: TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
Detailed error info : https://lists.openembedded.org/g/openembedded-core/message/164004

All the target definitions within tspec dictionary are generted as
NoneType. The changes will fix this issue.

Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@gmail.com>
---
 meta/recipes-devtools/rust/rust-common.inc | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Comments

Khem Raj April 6, 2022, 10:44 p.m. UTC | #1
On Wed, Apr 6, 2022 at 11:00 AM Sundeep KOKKONDA <sundeep.kokkonda@gmail.com>
wrote:

> The build shows below error while building for arm machines.
> Exception: TypeError: int() argument must be a string, a bytes-like object
> or a number, not 'NoneType'
> Detailed error info :
> https://lists.openembedded.org/g/openembedded-core/message/164004
>
> All the target definitions within tspec dictionary are generted as
> NoneType. The changes will fix this issue.


There is armv7-eabi just below it I wonder if that is correct or not

>
>
> Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@gmail.com>
> ---
>  meta/recipes-devtools/rust/rust-common.inc | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/meta/recipes-devtools/rust/rust-common.inc
> b/meta/recipes-devtools/rust/rust-common.inc
> index 310aecef22..230d78237f 100644
> --- a/meta/recipes-devtools/rust/rust-common.inc
> +++ b/meta/recipes-devtools/rust/rust-common.inc
> @@ -119,13 +119,13 @@ def llvm_features(d):
>
>
>  ## arm-unknown-linux-gnueabihf
> -DATA_LAYOUT[arm-eabi] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
> -LLVM_TARGET[arm-eabi] = "${RUST_TARGET_SYS}"
> -TARGET_ENDIAN[arm-eabi] = "little"
> -TARGET_POINTER_WIDTH[arm-eabi] = "32"
> -TARGET_C_INT_WIDTH[arm-eabi] = "32"
> -MAX_ATOMIC_WIDTH[arm-eabi] = "64"
> -FEATURES[arm-eabi] = "+v6,+vfp2"
> +DATA_LAYOUT[arm] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
> +LLVM_TARGET[arm] = "${RUST_TARGET_SYS}"
> +TARGET_ENDIAN[arm] = "little"
> +TARGET_POINTER_WIDTH[arm] = "32"
> +TARGET_C_INT_WIDTH[arm] = "32"
> +MAX_ATOMIC_WIDTH[arm] = "64"
> +FEATURES[arm] = "+v6,+vfp2"
>
>  ## armv7-unknown-linux-gnueabihf
>  DATA_LAYOUT[armv7-eabi] =
> "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
> --
> 2.35.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#164084):
> https://lists.openembedded.org/g/openembedded-core/message/164084
> Mute This Topic: https://lists.openembedded.org/mt/90291532/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
Sundeep KOKKONDA April 7, 2022, 2:23 a.m. UTC | #2
Hello,

The initial patch includes changes for armv7 also ( https://lists.openembedded.org/g/openembedded-core/message/163881 )
But, this causes build issues for target 'core-image-sato' with 'beaglebone-yocto' machine. ( https://lists.openembedded.org/g/openembedded-core/message/163954 )

So, I reverted the change for armv7. With 'arm' changes alone I tested for both qemuarm and beaglebone-yocto machines and the build was success.

Patch

diff --git a/meta/recipes-devtools/rust/rust-common.inc b/meta/recipes-devtools/rust/rust-common.inc
index 310aecef22..230d78237f 100644
--- a/meta/recipes-devtools/rust/rust-common.inc
+++ b/meta/recipes-devtools/rust/rust-common.inc
@@ -119,13 +119,13 @@  def llvm_features(d):
 
 
 ## arm-unknown-linux-gnueabihf
-DATA_LAYOUT[arm-eabi] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
-LLVM_TARGET[arm-eabi] = "${RUST_TARGET_SYS}"
-TARGET_ENDIAN[arm-eabi] = "little"
-TARGET_POINTER_WIDTH[arm-eabi] = "32"
-TARGET_C_INT_WIDTH[arm-eabi] = "32"
-MAX_ATOMIC_WIDTH[arm-eabi] = "64"
-FEATURES[arm-eabi] = "+v6,+vfp2"
+DATA_LAYOUT[arm] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
+LLVM_TARGET[arm] = "${RUST_TARGET_SYS}"
+TARGET_ENDIAN[arm] = "little"
+TARGET_POINTER_WIDTH[arm] = "32"
+TARGET_C_INT_WIDTH[arm] = "32"
+MAX_ATOMIC_WIDTH[arm] = "64"
+FEATURES[arm] = "+v6,+vfp2"
 
 ## armv7-unknown-linux-gnueabihf
 DATA_LAYOUT[armv7-eabi] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"