Cross compilation discussion
Andrew Haley
aph-open at littlepinkcloud.com
Wed Dec 6 14:46:40 UTC 2023
On 12/6/23 14:35, erik.joelsson at oracle.com wrote:
> 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.
OK. So you are doing what I'd usually call cross compiling, sort of, but
you don't want to treat it as a cross-compiled build. It's an unusual
case, in that it is cross compiled, but it is also expected to be able to
run on the build system.
--
Andrew Haley (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
More information about the build-dev
mailing list