fd-find: Fix build on riscv32

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
This commit is contained in:
Khem Raj 2025-12-10 12:11:42 -08:00
parent 6ec1e1468f
commit 75f1c414fe
No known key found for this signature in database
GPG Key ID: BB053355919D3314
2 changed files with 30 additions and 3 deletions

View File

@ -0,0 +1,26 @@
From 7582be50050b36e3275f6d4eacd8eceada8b6afd Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 10 Dec 2025 11:58:21 -0800
Subject: [PATCH] Define ALIGNOF_MAX_ALIGN_T for riscv32
Long double is 16byte aligned on both rv32 and rv64
Upstream-Status: Submitted [https://github.com/tikv/jemallocator/pull/153]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/lib.rs | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/lib.rs b/src/lib.rs
index 165660e..5f6a2a0 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -57,6 +57,7 @@ const ALIGNOF_MAX_ALIGN_T: usize = 8;
target_arch = "powerpc64le",
target_arch = "loongarch64",
target_arch = "mips64",
+ target_arch = "riscv32",
target_arch = "riscv64",
target_arch = "s390x",
target_arch = "sparc64"

View File

@ -12,14 +12,15 @@ LIC_FILES_CHKSUM = " \
"
SRC_URI = "crate://crates.io/fd-find/${PV};name=fd-find"
SRC_URI += "file://0001-Define-ALIGNOF_MAX_ALIGN_T-for-riscv32.patch;patchdir=../tikv-jemallocator-0.6.0"
SRC_URI[fd-find.sha256sum] = "2fbf004b5bbdefab92e76237e2022c77842cdef5d3213fe09fd804e0474785db"
S = "${CARGO_VENDORING_DIRECTORY}/fd-find-${PV}"
inherit cargo cargo-update-recipe-crates
#Upstream fd-find sets strip = true in [profile.release], which causes Cargo
#to strip the binary during compilation. This interferes with Yoctos normal
#do_package stripping process.By adding the following flag, we ensure that
#Upstream fd-find sets strip = true in [profile.release], which causes Cargo
#to strip the binary during compilation. This interferes with Yoctos normal
#do_package stripping process.By adding the following flag, we ensure that
#stripping is handled by Yocto as usual:
CARGO_BUILD_FLAGS += " --config profile.release.strip=false"