--- Begin Message ---
Subject: |
[PATCH 0/7] IcedTea: Build (efficiently) on aarch64-linux |
Date: |
Mon, 15 Jun 2020 11:18:56 -0400 |
This patch series applies a number of changes to the icedtea-6, -7 and -8
packages that allow them to build (efficiently) on aarch64-linux systems.
It assumes the patches in issues 41748 and 41648 have already been applied, in
that order.
With these three sets of patches I've been able to complete the entire Java
bootstrap process on both AArch64 and x86_64 and have successfully compiled
and run a Java application on AArch64 using OpenJDK 14.
The changes in this series
- Ensure the correct number of parallel build jobs is used. The
"--with-parallel-jobs" option to IcedTea's configure script enables a
parallel build but by default, the script uses its own heuristic to decide
how many jobs to run simultaneously. This can produce a poor result: On my
dual-core, hyperthreaded x86_64 machine, IcedTea 6 picks five jobs (anything
above two is inefficient); on my six-core AArch64 machine, IcedTea 7 picks
only two (on a machine where engaging every core is important!). In any
case, there is no guarantee the figure the script chooses will match the
number of jobs requested by the user.
These patches address this by ensuring the "--with-parallel-jobs" parameter
is passed to configure along with a parameter explicitly specifying the
correct number of jobs to use.
- Remove an obsolete and architecture-dependent patch. The "gcc-segfault"
patches yield a broken JIT on AArch64 because they embed a constant value,
11, that is architecture-dependent and apparently valid only for
x86_64. This number represents the length of an array whose size is
determined by the HotSpot build process and output in code it generates (at
src/share/vm/adlc/output_h.cpp:893).
Presumably the patches could be fixed, but I've been unable to reproduce the
problem they're meant to solve and I suspect it was only ever an issue with
gcc 5, meaning the patches are now obsolete. (The move to gcc 7 occurred
about three months after they were added.)
My changes remove these patches, including (for completeness and
consistency) the patch to IcedTea 6 which doesn't actually interfere with
the AArch64 build as it doesn't produce a JIT for that platform.
- Allow all three IcedTea packages to build on aarch64-linux. For IcedTea 6,
this means applying a backport of a patch to JDK 9 (see
http://openjdk.java.net/jeps/237) that extends the support for AArch64 in
HotSpot's shared code and allows the portable Zero VM to be built. For
IcedTea 7, it means removing an unneeded C++ template that causes the build
to fail when using gcc 7 and its default support for only the C++98
standard.
IcedTea 8 (and subsequent versions of OpenJDK) support AArch64 and gcc 7
out-of-the-box and require no specific changes.
--
Simon South
simon@simonsouth.net
Simon South (7):
gnu: icedtea-6: Build in parallel using correct number of jobs.
gnu: icedtea-6: Remove obsolete, architecture-dependent patch.
gnu: icedtea-6: Fix build on aarch64-linux.
gnu: icedtea-7: Build in parallel using correct number of jobs.
gnu: icedtea-7: Fix build on aarch64-linux.
gnu: icedtea-8: Build in parallel using correct number of jobs.
gnu: icedtea-8: Fix build on aarch64-linux.
gnu/local.mk | 4 +-
gnu/packages/java.scm | 32 +-
...tea-6-extend-hotspot-aarch64-support.patch | 1831 +++++++++++++++++
...ea-6-hotspot-gcc-segfault-workaround.patch | 42 -
.../icedtea-7-hotspot-aarch64-use-c++98.patch | 33 +
...ea-7-hotspot-gcc-segfault-workaround.patch | 45 -
6 files changed, 1879 insertions(+), 108 deletions(-)
create mode 100644
gnu/packages/patches/icedtea-6-extend-hotspot-aarch64-support.patch
delete mode 100644
gnu/packages/patches/icedtea-6-hotspot-gcc-segfault-workaround.patch
create mode 100644
gnu/packages/patches/icedtea-7-hotspot-aarch64-use-c++98.patch
delete mode 100644
gnu/packages/patches/icedtea-7-hotspot-gcc-segfault-workaround.patch
--
2.26.2
--- End Message ---
--- Begin Message ---
Subject: |
Re: [bug#41871] [PATCH 0/7] IcedTea: Build (efficiently) on aarch64-linux |
Date: |
Wed, 4 Nov 2020 12:58:05 +0200 |
On Tue, Nov 03, 2020 at 08:41:21AM -0500, Simon South wrote:
> Efraim Flashner <efraim@flashner.co.il> writes:
> > It's possible that my pine64 is acting up.
>
> I meant to mention in my original email: My build was using a derivation
> with a hash prefix different from yours, and my build log doesn't show
> "MethodHandle.java" being built at all. So I suspect there may be
> something different in your machine's environment.
>
Not sure what it is about my pine64, could be that I'm currently running
it without swap. In any event, all three versions of icedtea built just
fine on my odroid-c2 so I'm going to go ahead and push the commits to
staging.
I built icedtea@3 a second time, under 200 minutes with guix-daemon
limited to 2 cores.
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
signature.asc
Description: PGP signature
--- End Message ---