From cedc03aa6cbe04f05bd35b4bf5a72cf6d8a7b886 Mon Sep 17 00:00:00 2001 From: Rocky Zhang Date: Thu, 11 Dec 2025 12:13:53 +0000 Subject: [PATCH] fix risc-v build error casued by cast-align warnings RISC-V, like arm/arm64 is an architecture requires more strict alignment. Disable the warning like arm/arm64 to make it buildable. --- scripts/genie.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/genie.lua b/scripts/genie.lua index 9cb7ee2a4df13..aa16253a130a7 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -1087,6 +1087,12 @@ if (_OPTIONS["PLATFORM"]=="arm64") then } end +if (_OPTIONS["PLATFORM"]=="riscv64") then + buildoptions { + "-Wno-cast-align", + } +end + local subdir if (_OPTIONS["target"] == _OPTIONS["subtarget"]) then subdir = _OPTIONS["osd"] .. "/" .. _OPTIONS["target"]