[PATCH 11/21] sandbox: populate UNAME_M variable

Ahmad Fatoum a.fatoum at pengutronix.de
Thu Jun 5 04:35:20 PDT 2025


We will need the UNAME_M information to pick the correct static library
when linking against libfuzzer.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 scripts/subarch.include | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/scripts/subarch.include b/scripts/subarch.include
index caf3c641b52a..9137ddcd92fa 100644
--- a/scripts/subarch.include
+++ b/scripts/subarch.include
@@ -4,8 +4,10 @@
 # then ARCH is assigned, getting whatever value it gets normally, and
 # SUBARCH is subsequently ignored.
 
-SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
-				  -e s/arm.*/arm/ -e s/sa110/arm/ \
-				  -e s/aarch64.*/arm/ \
-				  -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
-				  -e s/riscv.*/riscv/)
+UNAME_M := $(shell uname -m 2>/dev/null)
+SUBARCH := $(shell echo $(UNAME_M) | \
+		sed -e s/i.86/x86/ -e s/x86_64/x86/ \
+		    -e s/arm.*/arm/ -e s/sa110/arm/ \
+		    -e s/aarch64.*/arm/ \
+		    -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
+		    -e s/riscv.*/riscv/)
-- 
2.39.5




More information about the barebox mailing list