Issue with llvm compiled jvm
yangfei at iscas.ac.cn
yangfei at iscas.ac.cn
Tue Oct 4 08:35:45 UTC 2022
> -----Original Messages-----
> From: "Vladimir Kempik" <vladimir.kempik at gmail.com>
> Sent Time: 2022-09-28 22:37:23 (Wednesday)
> To: riscv-port-dev at openjdk.org
> 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 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 ?
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 libgcc_s.so.
Note that the libgcc_s.so 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.
Thanks,
Fei
[1] https://gcc.gnu.org/onlinedocs/gccint/Libgcc.html</vladimir.kempik@gmail.com>
More information about the riscv-port-dev
mailing list