<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div class="moz-cite-prefix">(moving this to a new thread)<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">On 11/29/23 02:23, Magnus Ihse Bursie
wrote:<br>
</div>
<blockquote type="cite" cite="mid:9WbBHIPpBqM-4YyPLmXa5HpG8MU5AB7rKEaIxbkAXrc=.0174b66b-51cf-450c-bbaa-f8c62f93cfe0@github.com">
<pre><blockquote type="cite" style="color: #007cff;"><pre class="moz-quote-pre" wrap="">I'm not objecting to this patch, which is fine as it goes, but I think that the real test for cross compiling isn't a different build and target platform, but a different build and target sysroot. You're often building for EL 9 on an EL 8 machine, and that really does need to be treated as cross compilation.
</pre></blockquote><pre class="moz-quote-pre" wrap="">@theRealAph This is probably a discussion we should continue separately on the mailing list, since it is not really related to this patch.
Are you suggesting that we should basically consider the build a "cross-compile" if we supply a sysroot? What do you expect to happen if the build think we're doing a cross compilation? One of the most basic things is that we need to compile build helpers for the build platform, not the target platform. It this something you'd like to see in your scenario?
Maybe the concept of cross-compilation is too coarse, and we need to separate it into cross-cpu, cross-os, or something like that.
</pre></pre>
</blockquote>
<p>I think Andrew has a point. If there is a need for performing a
cross compile for EL 9 from EL 8, then we should consider this.</p>
<p>Oracle distributions of OpenJDK are typically built for a target
platform of the lowest version we want to support as this
(usually) guarantees compatibility with all the versions that we
want to support of that particular OS. This is technically a cross
compilation (targeting EL 6 from EL 8), but we pretend it's not,
because the target bits are compatible with the host system.
RedHat being a Linux vendor typically builds OpenJDK specifically
for each of their OS versions, which really is the true native
build.</p>
<p>Perhaps what we need to do is separate the notion of needing a
separate BUILD_JDK from the notion of cross compiling. In some
cross compilation scenarios, the target is compatible with the
host, so we don't need a separate BUILD_JDK, but in others it's
not compatible, so we do need one. The non-compatibility is
obvious if cross compiling for a different CPU, but not so
obvious, and probably pretty hard to guess correctly when the full
target triple matches. A first step would be to introduce a
configure option for telling the build if the target binaries can
be used for build tools or not. This may already be partly
possible by supplying an external --with-build-jdk, not sure.</p>
<p>/Erik<br>
</p>
<p></p>
</body>
</html>