Cross compilation discussion
erik.joelsson at oracle.com
erik.joelsson at oracle.com
Wed Dec 6 14:35:07 UTC 2023
On 12/6/23 04:18, Andrew Haley wrote:
> On 11/29/23 14:31, erik.joelsson at oracle.com wrote:
>> Perhaps what we need to do is separate the notion of needing a separate
>> BUILD_JDK from the notion of cross compiling.
>
> Isn't that what --with-sysroot= usually means? In that case, you're
> building against an incompatible set of libraries. By definition,
> because if you're building against a compatible set of libraries you
> don't have a different sysroot.
>
No, that is not always the case, and was the point of my previous email.
When we build the JDK at Oracle, we provide a sysroot of an older Linux
version (the least common denominator for all our support Linux
distros/versions). The goal is to produce a single JDK distribution that
works on all our support Linux versions. Today we run the build on OL8
and "cross compile" it to OL6 using a devkit/sysroot. The JDK produced
is compatible with OL6, OL7, OL8 and OL9. Because of this we haven't
considered it a cross compilation setup, while it does have some aspects
of cross compiling. There is however no need to deal with a separate
BUILD_JDK in this scenario. Also the build, host and target tuples in
autoconf are the same.
/Erik
More information about the build-dev
mailing list