[graalvm-dev] Graal's fdlibm clone
Christian Wimmer
christian.wimmer at oracle.com
Thu May 28 07:41:32 PDT 2020
Hi,
Having our own copy is a historical leftover from the time when we did
not have static library builds of the JDK C code. It is on our cleanup list.
Note that just using JNI to call the JDK for these methods does not
work, since we have use cases where native image needs to work with JNI
support disabled.
If you have an urgent need to fix this yourself before we get to it,
please open a GitHub issue and I'll write up details about the
requirements and approach to take.
> A diff between jdk7 and jdk11 [3] indicates that several methods have
> been removed from fdlibm, does GraalVM rely on these methods being
present?
There is a long-term plan in OpenJDK to re-write all of these methods in
Java. As soon as a pure Java version is available, the C version is no
longer needed. So newer JDK versions require fewer C methods. This is
currently not reflected in our implementation.
-Christian
On 5/28/20 06:26, Foivos Zakkak wrote:
> Hello all,
>
> GraalVM includes fdlibm in its source tree [1].
> According to [2] this tree is a verbatim copy of
> `src/share/native/java/lang/fdlibm` from JDK 7 update 40.
> Since fdlibm is part of the OpenJDK (and LabsJDK) why does GraalVM need
> to link against an older version of fdlibm?
>
> A diff between jdk7 and jdk11 [3] indicates that several methods have
> been removed from fdlibm, does GraalVM rely on these methods being present?
> Would you consider linking native-images with OpenJDK's fdlibm safe?
> If not, what is nesseccary to achieve this?
>
> Thanks,
> Foivos
>
> [1]
> https://github.com/oracle/graal/tree/8f5732eac5ae8aea4b3aeba7ec44205f4d20c50b/substratevm/src/com.oracle.svm.native.strictmath/src/fdlibm
> [2]
> https://github.com/oracle/graal/blob/8f5732eac5ae8aea4b3aeba7ec44205f4d20c50b/substratevm/src/com.oracle.svm.native.strictmath/src/StrictMath.c#L28-L34
> [3] https://gist.github.com/zakkak/f50b96f62f81a56886fd6f411f3c762e
>
>
> _______________________________________________
> GraalVM-Dev mailing list
> GraalVM-Dev at oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/graalvm-dev
>
More information about the GraalVM-Dev
mailing list