package/openjdk: support zero hotspot variant
authorMatt Weber <matthew.weber@rockwellcollins.com>
Tue, 26 Feb 2019 17:36:45 +0000 (11:36 -0600)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 17 Mar 2019 13:26:18 +0000 (14:26 +0100)
The OpenJDK package supports a non-assembler variant of the hotspot
virtual machine.  This allows archtectures which don't have hard-coded
support (which provides better performance) to still build a virtual
machine that can execute JAVA.

Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/openjdk/Config.in
package/openjdk/openjdk.mk

index 96eef79eb03b4843868f0b9764960fcb7530f0c6..dd1f3c59cf7c5e372a5753cfca1f7229083789f8 100644 (file)
@@ -25,7 +25,8 @@ config BR2_PACKAGE_OPENJDK
        select BR2_PACKAGE_ZLIB
        # make sure at least one variant is enabled
        select BR2_PACKAGE_OPENJDK_JVM_VARIANT_SERVER \
-              if !BR2_PACKAGE_OPENJDK_JVM_VARIANT_CLIENT
+              if !BR2_PACKAGE_OPENJDK_JVM_VARIANT_CLIENT && !BR2_PACKAGE_OPENJDK_JVM_VARIANT_ZERO && !BR2_powerpc
+       select BR2_PACKAGE_OPENJDK_JVM_VARIANT_ZERO if BR2_powerpc
        help
          OpenJDK is a free and open-source implementation of the
          Java Platform.
@@ -36,14 +37,25 @@ if BR2_PACKAGE_OPENJDK
 
 config BR2_PACKAGE_OPENJDK_JVM_VARIANT_CLIENT
        bool "build client variant"
+       depends on !BR2_powerpc
        help
          Quick loading, but slower run-time performance.
 
 config BR2_PACKAGE_OPENJDK_JVM_VARIANT_SERVER
        bool "build server variant"
+       depends on !BR2_powerpc
        help
          Slower loading, but faster run-time performance.
 
+config BR2_PACKAGE_OPENJDK_JVM_VARIANT_ZERO
+       bool "build zero variant"
+       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
+
 endif
 
 comment "openjdk needs X.Org"
index cf98dd73e14ca4b6ea828109cd27b2c50ec455e9..602e26b34bc361bf3de1582a5b829364cd3f077a 100644 (file)
@@ -35,10 +35,13 @@ OPENJDK_DEPENDENCIES = \
 ifeq ($(BR2_PACKAGE_OPENJDK_JVM_VARIANT_CLIENT),y)
 OPENJDK_JVM_VARIANTS += client
 endif
-
 ifeq ($(BR2_PACKAGE_OPENJDK_JVM_VARIANT_SERVER),y)
 OPENJDK_JVM_VARIANTS += server
 endif
+ifeq ($(BR2_PACKAGE_OPENJDK_JVM_VARIANT_ZERO),y)
+OPENJDK_JVM_VARIANTS += zero
+OPENJDK_DEPENDENCIES += libffi
+endif
 OPENJDK_JVM_VARIANT_LIST = $(subst $(space),$(comma),$(OPENJDK_JVM_VARIANTS))
 
 # OpenJDK ignores some variables unless passed via the environment.