From edf167216a31fda3215da80e70d878c25b60ee99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Sowi=C5=84ski?= Date: Fri, 12 Jul 2024 16:02:13 +0200 Subject: [PATCH] Turn off "V" in zlib-ng compilation (#104776) Our target ISA is rv64gc, not gcv. If kernel can't detect RISC-V extensions, zlib-ng defaults has_rvv to true, which crashes on hardware without vector instructions like VisionFive 2. --- src/native/external/zlib-ng.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/native/external/zlib-ng.cmake b/src/native/external/zlib-ng.cmake index 3f005eaa54f3d..c9829842c458b 100644 --- a/src/native/external/zlib-ng.cmake +++ b/src/native/external/zlib-ng.cmake @@ -9,6 +9,9 @@ set(ZLIB_ENABLE_TESTS OFF) set(ZLIBNG_ENABLE_TESTS OFF) set(Z_PREFIX ON) +# TODO: Turn back on when Linux kernels with proper RISC-V extension detection (>= 6.5) are more commonplace +set(WITH_RVV OFF) + add_compile_options($<$:-Wno-unused-command-line-argument>) # clang : error : argument unused during compilation: '-fno-semantic-interposition' add_compile_options($<$:-Wno-logical-op-parentheses>) # place parentheses around the '&&' expression to silence this warning add_compile_options($<$:/wd4127>) # warning C4127: conditional expression is constant