Issue with llvm compiled jvm

Vladimir Kempik vladimir.kempik at gmail.com
Wed Sep 28 14:37:23 UTC 2022


Hello

I was playing with clang compiled hotspot and found an issue in one configuration:
clang + sysroot from gcc ( aka link with libgcc_s.so.1)
in such combo the __builtin___clear_cache() function calls __clear_cache from libgcc_s.so 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 ?

Regards, Vladimir


More information about the riscv-port-dev mailing list