Build: Add -mno-strict-align flag for RISC-V architecture

This commit is contained in:
黄尚诚10330306 2026-02-05 00:25:43 +08:00
parent 1168da0e56
commit 701daf7690

View file

@ -37,6 +37,13 @@ else
EXT =
endif
# Detect if the architecture is RISC-V (native build)
UNAME_M ?= $(shell uname -m)
ifneq (,$(filter riscv%,$(UNAME_M)))
MOREFLAGS += -mno-strict-align
export MOREFLAGS
endif
## default: Build lib-release and zstd-release
.PHONY: default
default: lib-release zstd-release