[Buildroot] [PATCH, RE-SEND] openjdk: Add ARC HS3x/4x support via "Zero Assembly Project"

Thomas Petazzoni thomas.petazzoni at bootlin.com
Thu Dec 30 20:14:58 UTC 2021


Hello Alexey,

On Thu, 21 Oct 2021 04:59:15 -0700
Alexey Brodkin via buildroot <buildroot at buildroot.org> wrote:

> This allows building and running a full-scale JVM in purely
> interpretive mode on ARCv2 processors.
> 
> Once JIT'ed version is available for ARC we'll obviously switch
> to it to gain a faster execution.
> 
> Signed-off-by: Alexey Brodkin <abrodkin at synopsys.com>
> Cc: Fabrice Fontaine <fontaine.fabrice at gmail.com>
> Cc: Yann E. MORIN <yann.morin.1998 at free.fr>
> Cc: Adam Duskett <aduskett at gmail.com>

I have applied your patch (finally you could say!) but there was a
mistake in it: you've added your patch in package/openjdk/, but we
support two versions of OpenJDK (11 and 17), and your patch only
applies to version 17. So I moved it to a sub-folder + ensured that
version 11 couldn't be selected for ARC. This also raised the issue
that version 17 has an additional requirement on host gcc >= 4.9, so if
a package ever did "select BR2_PACKAGE_OPENJDK", they would have to be
careful that specifically on ARC, it's only available if host gcc >=
4.9. To avoid this, I've moved the host gcc >= 4.9 dependency to
BR2_PACKAGE_OPENJDK itself, even if not strictly required for OpenJDK
11.

However, there is one thing I didn't address as I wasn't sure: do you
support only the "zero" variant on ARC? If so, doesn't this:

config BR2_PACKAGE_OPENJDK_JVM_VARIANT_CLIENT
        bool "client"
        depends on !BR2_powerpc
        help
          Quick loading, but slower run-time performance.

config BR2_PACKAGE_OPENJDK_JVM_VARIANT_SERVER
        bool "server"
        depends on !BR2_powerpc
        help
          Slower loading, but faster run-time performance.

config BR2_PACKAGE_OPENJDK_JVM_VARIANT_ZERO
        bool "zero"
        select BR2_PACKAGE_LIBFFI
        help
          A non-assembler variant with wide arch support, however
          performance is less then client/server.

          http://openjdk.java.net/projects/zero

also needs some depends on !BR2_arc for the client and server variants?

Thanks a lot,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com



More information about the buildroot mailing list