Issue with llvm compiled jvm

yangfei at yangfei at
Tue Oct 4 08:35:45 UTC 2022

> -----Original Messages-----
> From: "Vladimir Kempik" <vladimir.kempik at>
> Sent Time: 2022-09-28 22:37:23 (Wednesday)
> To: riscv-port-dev at
> Cc: 
> Subject: Issue with llvm compiled jvm
> Hello
> I was playing with clang compiled hotspot and found an issue in one configuration:
> clang + sysroot from gcc ( aka link with
> in such combo the __builtin___clear_cache() function calls __clear_cache from which is basically a dummy function doing nothing.
> it doesn’t happen when using gcc, it shouldn’t happen if clang is used with compiler-rt libs ( where __clear_cache is properly implemented)
> it’s a bug of compiler, but we may want to make a workaround:
>   #IFDEF llvm   THEN (use old style direct call of syscall  OR __riscv_flush_icache(..)) ELSE __builtin___clear_cache(..)
> Looking for opinions - should we implement a workaround in openjdk or just ignore it ?

I assume that's not an valid deployment for the clang/llvm toolchain, right?
It looks strange to me for the clang/llvm toolchain to link the application code to
Note that the as a low-level runtime library is there only for the GNU/GCC compiler [1].
So I would not suggest we handle this kind of problem in the openjdk code.



More information about the riscv-port-dev mailing list