Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
meson: Fix cross-building for RISCV host
While when building on native Linux the host architecture is reported as "riscv32" or "riscv64": Host machine cpu family: riscv64 Host machine cpu: riscv64 Found pkg-config: /usr/bin/pkg-config (0.29.2) When cross-compiling it is detected as "riscv". Meson handles the cross-detection but displays a warning: WARNING: Unknown CPU family riscv, please report this at https://github.com/mesonbuild/meson/issues/new Host machine cpu family: riscv Host machine cpu: riscv Target machine cpu family: riscv Target machine cpu: riscv Found pkg-config: /usr/bin/riscv64-linux-gnu-pkg-config (1.8.1) Commit 278c1bc was tested on native host but not under cross environment, and now we get on our cross-riscv64-system Gitlab-CI job: WARNING: Unknown CPU family riscv, please report this at https://github.com/mesonbuild/meson/issues/new Host machine cpu family: riscv Host machine cpu: riscv Target machine cpu family: riscv Target machine cpu: riscv ../meson.build:684:6: ERROR: Problem encountered: Unsupported CPU riscv, try --enable-tcg-interpreter As a kludge, re-introduce "riscv" in the supported_cpus[] array. Fixes: 278c1bc ("target/riscv: Only unify 'riscv32/64' -> 'riscv' for host cpu in meson") Reported-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230711094147.54985-1-philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
- Loading branch information