Building hotspot with LTO enabled:
$ sh ./configure ... --with-extra-cxxflags="-flto -ffat-lto-objects -fcommon" --with-extra-cflags="-flto -ffat-lto-objects -fcommon"
Yields this warning:
/home/shade/trunks/jdk-jdk/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp:1576:17: warning: 'jio_printf' violates the C++ One Definition Rule [-Wodr]
1576 | extern "C" void jio_printf(const char *fmt, ...);
| ^
/home/shade/trunks/jdk-jdk/src/hotspot/share/prims/jvm.cpp:2961:15: note: return value type mismatch
2961 | JNIEXPORT int jio_printf(const char *fmt, ...) {
| ^
It seems that only jvmciCompilerToVM.cpp declares the "void" return type.