public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Yash Shinde <Yash.Shinde@windriver.com>
To: Martin Jansa <martin.jansa@gmail.com>, raj.khem@gmail.com
Cc: openembedded-core@lists.openembedded.org,
	Randy.MacLeod@windriver.com, Sundeep.Kokkonda@windriver.com
Subject: Re: [OE-core] [PATCH v2 2/3] rust: Upgrade 1.84.1->1.85.0
Date: Tue, 15 Apr 2025 14:34:57 +0530	[thread overview]
Message-ID: <1d01500d-39e2-4578-9fc0-b8c7c231e6d9@windriver.com> (raw)
In-Reply-To: <CA+chaQcn9EfvFMSEmBPnCu3duzwY=cNXzwXVGPBNSP7n-9SduQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 7273 bytes --]


On 11-04-2025 13:08, Martin Jansa wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On Mon, Mar 31, 2025 at 6:47 PM Khem Raj via lists.openembedded.org
> <raj.khem=gmail.com@lists.openembedded.org> wrote:
>> On Sun, Mar 30, 2025 at 10:54 PM Yash Shinde via
>> lists.openembedded.org
>> <Yash.Shinde=windriver.com@lists.openembedded.org> wrote:
>>> From: Yash Shinde<Yash.Shinde@windriver.com>
>>>
>>> Rust stable version updated to 1.85.0
>>> https://blog.rust-lang.org/2025/02/20/Rust-1.85.0.html
>>>
>>> Some of the major updates:
>>>
>>> - Update LIC_FILES_CHKSUM in libstd-rs and rust recipes.
>>> License-Update: Unicode license text is updated to Unicode-3.0 License.
>>> https://github.com/rust-lang/rust/commit/6d2a3e9786ec43a0e0af20386e7046328296ac86
>>>
>>> - Pass '-Zforce-unstable-if-unmarked' to RUSTFLAGS in libstd-rs.bb
>>> Fix:https://github.com/rust-lang/rust/issues/133857#issuecomment-2526341227
>>>
>>> - Downgrade bootstrap cc version causing bootstrap to fail on custom targets. (Backported from v1.85.1)
>>> Fix:https://github.com/rust-lang/rust/pull/137460/commits/e4ca11f87ffca8c63aa56d45b46e62b6acc58bd7
>>>
>>> - Explicitly set float ABI for all ARM 32 bits targets.
>>> Fix:https://github.com/rust-lang/rust/commit/a51fefcaab835b310e2e26005b50982d0049d905
>>>
>>> - Rust v1.85.0 tarball doesn't ship gcc tree.
>>> Drop "remove_gcc_directory" postfunc which removed it and prevented the bloat.
>>> Fix:https://github.com/rust-lang/rust/commit/13c3f9b9498013837782b46120085ea19ca75518
>>>
>>> Adapted the patch changes with v1.85.0:
>>>    repro-issue-fix-with-cc-crate-hashmap.patch
>>>    revert-link-std-statically-in-rustc_driver-feature.patch
>>>    rust-oe-selftest.patch
>>>    rv32-cargo-rustix-0.38.40-fix.patch
>>>
>>> Dropped patches:
>>>    fix-tidy-check-failure.patch since it's merged with v1.85.0.
>>>
>>> Signed-off-by: Yash Shinde<Yash.Shinde@windriver.com>
>>> ---
>>>   .../classes-recipe/rust-target-config.bbclass |   5 +
>>>   meta/conf/distro/include/tcmode-default.inc   |   2 +-
>>>   .../rust/{cargo_1.84.1.bb => cargo_1.85.0.bb} |   0
>>>   .../rust/files/downgrade-bootstrap-cc.patch   |  41 +++
>>>   .../rust/files/fix-tidy-check-failure.patch   |  19 --
>>>   ...epro-issue-fix-with-cc-crate-hashmap.patch |  60 ++++-
>>>   ...d-statically-in-rustc_driver-feature.patch |   4 +-
>>>   .../rust/files/rust-oe-selftest.patch         |  46 ++--
>>>   .../files/rv32-cargo-rustix-0.38.38-fix.patch | 236 ------------------
>>>   .../files/rv32-cargo-rustix-0.38.40-fix.patch | 236 ++++++++++++++++++
>>>   ...ibstd-rs_1.84.1.bb => libstd-rs_1.85.0.bb} |   4 +-
>>>   ....84.1.bb => rust-cross-canadian_1.85.0.bb} |   0
>>>   ...ust-llvm_1.84.1.bb => rust-llvm_1.85.0.bb} |   0
>>>   meta/recipes-devtools/rust/rust-snapshot.inc  |  81 +++---
>>>   meta/recipes-devtools/rust/rust-source.inc    |  23 +-
>>>   .../rust/{rust_1.84.1.bb => rust_1.85.0.bb}   |   2 +-
>>>   16 files changed, 417 insertions(+), 342 deletions(-)
>>>   rename meta/recipes-devtools/rust/{cargo_1.84.1.bb => cargo_1.85.0.bb} (100%)
>>>   create mode 100644 meta/recipes-devtools/rust/files/downgrade-bootstrap-cc.patch
>>>   delete mode 100644 meta/recipes-devtools/rust/files/fix-tidy-check-failure.patch
>>>   delete mode 100644 meta/recipes-devtools/rust/files/rv32-cargo-rustix-0.38.38-fix.patch
>>>   create mode 100644 meta/recipes-devtools/rust/files/rv32-cargo-rustix-0.38.40-fix.patch
>>>   rename meta/recipes-devtools/rust/{libstd-rs_1.84.1.bb => libstd-rs_1.85.0.bb} (88%)
>>>   rename meta/recipes-devtools/rust/{rust-cross-canadian_1.84.1.bb => rust-cross-canadian_1.85.0.bb} (100%)
>>>   rename meta/recipes-devtools/rust/{rust-llvm_1.84.1.bb => rust-llvm_1.85.0.bb} (100%)
>>>   rename meta/recipes-devtools/rust/{rust_1.84.1.bb => rust_1.85.0.bb} (99%)
>>>
>>> diff --git a/meta/classes-recipe/rust-target-config.bbclass b/meta/classes-recipe/rust-target-config.bbclass
>>> index 67aaa56bac..c04940ce54 100644
>>> --- a/meta/classes-recipe/rust-target-config.bbclass
>>> +++ b/meta/classes-recipe/rust-target-config.bbclass
>>> @@ -391,6 +391,11 @@ def rust_gen_target(d, thing, wd, arch):
>>>       tspec['cpu'] = cpu
>>>       if features != "":
>>>           tspec['features'] = features
>>> +    fpu = d.getVar('TARGET_FPU')
>>> +    if fpu == "soft":
>>> +        tspec['llvm-floatabi'] = "soft"
>>> +    elif fpu == "hard":
>>> +        tspec['llvm-floatabi'] = "hard"
>> Thanks for this. I see there are three ABIs for arm w.r.t floats soft.
>> hard and softfp you can perhaps get this value
>> from TUNE_CCARGS_MFLOAT, maybe in a follow up please check the third
>> case as well and we might need to add
>> it as well
>
> Yash:
>
> any update about this comment from Khem?
>
> libstd-rs is still failing to build when TARGET_FPU is set to softfp

I checked the value from TUNE_CCARGS_MFLOAT and it wasn't set to soft 
when using qemuarmv5 as the MACHINE. Thus, we need to use TARGET_FPU.
For softfp, I didn't find any target supported/valid using oe-core config.
Could you share the config for setting softfp for arm target?

I will add and check a condition for softfp setting as well with that.

Regards,
Yash

>
> error: failed to run `rustc` to learn about target-specific information
>
> Caused by:
>    process didn't exit successfully: `rustc - --crate-name ___
> --print=file-names ... -Cembed-bitcode=yes
> -Zforce-unstable-if-unmarked  -C link-arg=-Wl,-soname,libstd.so
> --target armv7-oemllib32-linux-gnueabi --crate-type bin --crate-type
> rlib --crate-type dylib --crate-type cdylib --crate-type staticlib
> --crate-type proc-macro --print=sysroot --print=split-debuginfo
> --print=crate-name --print=cfg` (exit status: 1)
>    --- stderr
>    error: Error loading target specification: ARM targets must specify
> their float ABI. Run `rustc --print target-list` for a list of
> built-in targets
>
> it's set to softfp from TUNE_CCARGS_MFLOAT
>
> # $TUNE_CCARGS_MFLOAT
> #   set oe-core/meta/conf/machine/include/arm/feature-arm-vfp.inc:14
> #     "${@ bb.utils.contains('TUNE_FEATURES', 'callconvention-hard',
> 'hard', 'softfp', d) if (d.getVar('TUNE_CCARGS_MFPU') != '' or
> bb.utils.contains('TUNE_FEATURES', 'simd', True, False, d)) else '' }"
> TUNE_CCARGS_MFLOAT="softfp"
>
> # $TARGET_FPU [3 operations]
> #   set oe-core/meta/conf/machine/include/arm/arch-arm.inc:16
> #"${@d.getVar('TUNE_CCARGS_MFLOAT') or 'soft'}"
> #   set oe-core/meta/conf/machine/include/arm/arch-arm64.inc:39
> #"${@bb.utils.contains('TUNE_FEATURES', 'aarch64', '${TARGET_FPU_64}', 
> '${TARGET_FPU_32}', d)}"
> #   set oe-core/meta/conf/documentation.conf:417
> #     [doc] "Specifies the method for handling FPU code. For FPU-less
> targets, which include most ARM CPUs, the variable must be set to
> 'soft'. If not, the kernel emulation gets used, which results in a
> performance penalty."
> # pre-expansion value:
> #"${@bb.utils.contains('TUNE_FEATURES', 'aarch64', '${TARGET_FPU_64}', 
> '${TARGET_FPU_32}', d)}"
> TARGET_FPU="softfp"

[-- Attachment #2: Type: text/html, Size: 9565 bytes --]

  reply	other threads:[~2025-04-15  9:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-31  5:54 [PATCH v2 1/3] rust: Update "do_update_snapshot" task for rust-snapshot.inc Yash.Shinde
2025-03-31  5:54 ` [PATCH v2 2/3] rust: Upgrade 1.84.1->1.85.0 Yash.Shinde
2025-03-31  6:24   ` [OE-core] " Richard Purdie
2025-03-31  7:16     ` Yash Shinde
2025-03-31  8:17       ` Richard Purdie
2025-03-31 16:46   ` Khem Raj
2025-04-11  7:38     ` Martin Jansa
2025-04-15  9:04       ` Yash Shinde [this message]
2025-04-15 11:38         ` Martin Jansa
2025-04-15 15:45           ` Yash Shinde
2025-04-15 15:52             ` Martin Jansa
2025-04-15 15:58               ` Yash Shinde
2025-04-15 15:51           ` Yash Shinde
2025-04-15 15:53             ` Yash Shinde
2025-03-31  5:54 ` [PATCH v2 3/3] rust: Upgrade 1.85.0->1.85.1 Yash.Shinde

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=1d01500d-39e2-4578-9fc0-b8c7c231e6d9@windriver.com \
    --to=yash.shinde@windriver.com \
    --cc=Randy.MacLeod@windriver.com \
    --cc=Sundeep.Kokkonda@windriver.com \
    --cc=martin.jansa@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=raj.khem@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