From ae41daf9a780f8fd29b2af984e9aa60ae9b10937 Mon Sep 17 00:00:00 2001 From: SendaoYan Date: Fri, 11 Oct 2024 08:12:37 +0000 Subject: [PATCH] 8341880: RISC-V: riscv_vector.h native build fails with gcc13 after JDK-8320500 Co-authored-by: Fei Yang Reviewed-by: mli, fyang --- .../linux/native/libsleef/lib/vector_math_rvv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/jdk.incubator.vector/linux/native/libsleef/lib/vector_math_rvv.c b/src/jdk.incubator.vector/linux/native/libsleef/lib/vector_math_rvv.c index 4515457fa89..438ca0c92ba 100644 --- a/src/jdk.incubator.vector/linux/native/libsleef/lib/vector_math_rvv.c +++ b/src/jdk.incubator.vector/linux/native/libsleef/lib/vector_math_rvv.c @@ -31,6 +31,8 @@ // At run-time, if the library is found and the bridge functions are available in the // library, then the java vector API will call into the bridge functions and sleef. +#if __GNUC__ >= 14 || (defined(__clang_major__) && __clang_major__ >= 17) + #ifdef __riscv_v_intrinsic #include @@ -117,4 +119,6 @@ DEFINE_VECTOR_MATH_BINARY_RVV(hypotdx_u05, vdouble_rvvm1_sleef) #undef DEFINE_VECTOR_MATH_BINARY_RVV -#endif /* __riscv_v_intrinsic */ +#endif /* __riscv_v_intrinsic */ + +#endif /* check gcc and clang version */