Skip to contentSkip to conversation

Allow building jre from hosttools

PATCH In review Andrej Valek 2 participants 4 messages Apr 1, 2019 – Apr 3, 2019

lore
Share & tools
lore
#0 lore raw

cover Allow building jre from hosttools

From: Peter Marko <[email protected]>

Buildding whole native openjdk toolchain takes very long time as is a waste of resources.

Following layer configuration allows to build from hosttools:
HOSTTOOLS += "java javac pack200"
ASSUME_PROVIDED += "openjdk-8-native"

This requires some changes in the recipes.

Peter Marko (2):
openjre-8: allow build from hosttools
openjdk-8: add missing unzip-native dependency

 recipes-core/openjdk/openjdk-8-cross.inc | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/2 openjre-8: allow build from hosttools

From: Peter Marko <[email protected]>

Buildding whole native openjdk toolchain takes very long time as is a waste of resources.

Following layer configuration allows to build from hosttools:
HOSTTOOLS += "java javac pack200"
ASSUME_PROVIDED += "openjdk-8-native"

Fow this, special native directory overrides need to be removed.

---
 recipes-core/openjdk/openjdk-8-cross.inc | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
recipes-core/openjdk/openjdk-8-cross.inc +2 -3
index d04b0d3..a2bfa27 100644
@@ -40,6 +40,8 @@ PACKAGECONFIG[shark] = "--with-jvm-variants=zeroshark,,llvm3.5,"
 
 PACKAGECONFIG[repack] = ",,,"
 
+PACKAGECONFIG[hosttools] = ",--with-tools-dir=${STAGING_DIR_NATIVE} --with-boot-jdk=${STAGING_LIBDIR_NATIVE}/jvm/openjdk-8-native --with-cacerts-file=${STAGING_LIBDIR_NATIVE}/jvm/openjdk-8-native/jre/lib/security/cacerts,,"
+
 CACHED_CONFIGUREVARS = " \
     ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'ac_x_includes=${STAGING_INCDIR}', '', d)} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'ac_x_libraries=${STAGING_LIBDIR}', '', d)} \
@@ -57,9 +59,6 @@ EXTRA_OECONF_append = "\
     --with-jobs=${@openjdk_build_helper_get_parallel_make(d)} \
     \
     --with-sys-root=${STAGING_DIR_HOST} \
-    --with-tools-dir=${STAGING_DIR_NATIVE} \
-    --with-boot-jdk=${STAGING_LIBDIR_NATIVE}/jvm/openjdk-8-native \
-    --with-cacerts-file=${STAGING_LIBDIR_NATIVE}/jvm/openjdk-8-native/jre/lib/security/cacerts \
     \
     --disable-precompiled-headers \
     --disable-zip-debug-info \
Signature · 1 line
2.11.0
#2 lore raw

PATCH 2/2 openjdk-8: add missing unzip-native dependency

In reply to Andrej Valek

From: Peter Marko <[email protected]>

When building openjre-8 from hosttools, build fails due to missing unzip.

---
 recipes-core/openjdk/openjdk-8-cross.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-core/openjdk/openjdk-8-cross.inc +1 -1
index a2bfa27..95f9979 100644
@@ -2,7 +2,7 @@ JDK_HOME = "${libdir_jvm}/openjdk-8"
 JRE_HOME = "${libdir_jvm}/openjre-8"
 
 DEPENDS = "\
-    openjdk-8-native zip-native ant-native libxslt \
+    openjdk-8-native zip-native unzip-native ant-native libxslt \
     krb5 libffi fontconfig freetype \
 "
 
Signature · 1 line
2.11.0
#3 lore raw
In reply to Andrej Valek

Hi Andrej, Peter,

Quoted 10 lines · Andrej Valek

From: Peter Marko <[email protected]>

Buildding whole native openjdk toolchain takes very long time as is a waste of resources.

Following layer configuration allows to build from hosttools:
HOSTTOOLS += "java javac pack200"
ASSUME_PROVIDED += "openjdk-8-native"

This requires some changes in the recipes.

Thanks for this series.

I'll merge it to master-next, take a look at it ASAP and run it through my tests. Unfortunately I'm currently quite busy so please don't expect any results before end of next week. Sorry for that.

regards;Richard.L

Quoted 8 lines

Peter Marko (2):
openjre-8: allow build from hosttools
openjdk-8: add missing unzip-native dependency

  recipes-core/openjdk/openjdk-8-cross.inc | 7 +++----
  1 file changed, 3 insertions(+), 4 deletions(-)