mbox

[bug#41648,0/2] JamVM: Add aarch64-linux support

Message ID 20200601171211.7272-1-simon@simonsouth.net
Headers show

Message

Simon South June 1, 2020, 5:12 p.m. UTC
These patches add aarch64-linux support to the two versions of JamVM, a
compact Java virtual machine, used during Guix's Java-bootstrap process (see
the comment near the top of gnu/packages/java.scm).

With them applied the process gets as far as starting to build the first
IcedTea package (version 1.13.13), though this eventually fails with an error
from gcc while compiling the Hotspot JVM (unrelated to my changes as far as I
can tell). I'm still working on this issue.

Note I have found it unnecessary to use older versions of gcc and glibc when
building JamVM 1.5.1 on AArch64; the CPU's instruction cache is flushed
explicitly on this platform so it shouldn't be possible for the "invalid
instruction" situation mentioned in a comment to develop, and I haven't seen
it myself.

The "opcode guard" patch is necessary for floating-point operations to work
correctly when JamVM is built with stack-caching enabled, as it is by default
on AArch64 and elsewhere.

Finally, I've renamed the existing "jamvm-arm.patch" file to
"jamvm-1.5.1-arm.patch" for clarity as there are now separate patchsets for
each JamVM release.

--
Simon South
simon@simonsouth.net


Simon South (2):
  gnu: jamvm-1-bootstrap: Add aarch64-linux support.
  gnu: jamvm: Add aarch64-linux support.

 gnu/packages/java.scm                         |  41 +-
 .../patches/jamvm-1.5.1-aarch64-support.patch | 572 ++++++++++++++++
 ...{jamvm-arm.patch => jamvm-1.5.1-arm.patch} |   0
 .../patches/jamvm-2.0.0-aarch64-support.patch | 645 ++++++++++++++++++
 .../patches/jamvm-2.0.0-opcode-guard.patch    |  35 +
 5 files changed, 1283 insertions(+), 10 deletions(-)
 create mode 100644 gnu/packages/patches/jamvm-1.5.1-aarch64-support.patch
 rename gnu/packages/patches/{jamvm-arm.patch => jamvm-1.5.1-arm.patch} (100%)
 create mode 100644 gnu/packages/patches/jamvm-2.0.0-aarch64-support.patch
 create mode 100644 gnu/packages/patches/jamvm-2.0.0-opcode-guard.patch

Comments

Efraim Flashner June 2, 2020, 9:41 a.m. UTC | #1
On Mon, Jun 01, 2020 at 01:12:11PM -0400, Simon South wrote:
> 
> Note I have found it unnecessary to use older versions of gcc and glibc when
> building JamVM 1.5.1 on AArch64; the CPU's instruction cache is flushed
> explicitly on this platform so it shouldn't be possible for the "invalid
> instruction" situation mentioned in a comment to develop, and I haven't seen
> it myself.
> 

Can you test running bootstrap on jamvm-1-bootstrap (and jamvm@2) and
see if that negates the need for an older version of glibc and gcc on
other platforms? (basically just x86_64 for now, unless it now works on
other architectures)
Simon South June 2, 2020, 4:04 p.m. UTC | #2
Efraim Flashner <efraim@flashner.co.il> writes:
> Can you test running bootstrap on jamvm-1-bootstrap (and jamvm@2) and
> see if that negates the need for an older version of glibc and gcc on
> other platforms?

I've tested this on x86_64 (building with a current gcc and glibc) and
it doesn't work: I get the same "Illegal instruction" error during the
configure phase of IcedTea.

I'll do a bit of investigation and see if I can get it working normally
on that platform, or come up with a different solution.
Efraim Flashner June 2, 2020, 6:35 p.m. UTC | #3
On Tue, Jun 02, 2020 at 12:04:15PM -0400, Simon South wrote:
> Efraim Flashner <efraim@flashner.co.il> writes:
> > Can you test running bootstrap on jamvm-1-bootstrap (and jamvm@2) and
> > see if that negates the need for an older version of glibc and gcc on
> > other platforms?
> 
> I've tested this on x86_64 (building with a current gcc and glibc) and
> it doesn't work: I get the same "Illegal instruction" error during the
> configure phase of IcedTea.
> 
> I'll do a bit of investigation and see if I can get it working normally
> on that platform, or come up with a different solution.

It can wait for whenever. I'm pretty sure autoconf and friends were
already in the bootstrap chain before icedtea and it would be nice to
get the older glibc and gcc out but I'd personally prioritize getting it
working on more architectures first. Thanks for checking.