From 8c663efa4f8efccf50d094dbc61c7b78031b3b7d Mon Sep 17 00:00:00 2001 From: Kyle Russell Date: Wed, 24 Aug 2016 09:28:40 -0400 Subject: Reimplement helper method for parallelizing JDK builds Simplifies duplicated implementation across multiple recipes that all inherited from java.bbclass. Previously implementation was not flexible in supporting other make job-limiting flags (like -l for load) that are typically passed in through PARALLEL_MAKE. (OpenJDK doesn't know about these other flags that might have gotten tagged on after the value for -j.) Signed-off-by: Kyle Russell Signed-off-by: Maxin B. John --- recipes-core/icedtea/icedtea7-native.inc | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'recipes-core/icedtea') diff --git a/recipes-core/icedtea/icedtea7-native.inc b/recipes-core/icedtea/icedtea7-native.inc index 3344acb..d4c5c29 100644 --- a/recipes-core/icedtea/icedtea7-native.inc +++ b/recipes-core/icedtea/icedtea7-native.inc @@ -54,27 +54,8 @@ export ALT_FREETYPE_LIB_PATH = "${STAGING_LIBDIR}" # which is already stripped. INSANE_SKIP_${PN} = "already-stripped" -# OpenJDK supports parallel compilation but uses a plain number for this. -# In OE we have PARALLEL_MAKE which is the actual option passed to make, -# e.g. "-j 4". -ICEDTEA_PARALLEL_MAKE := "${PARALLEL_MAKE}" -PARALLEL_MAKE = "" -def get_jdk7_native_jobs(d): - import bb - - pm = bb.data.getVar('ICEDTEA_PARALLEL_MAKE', d, 1); - if not pm: - return "1" - - pm = pm.split("j"); - if (len(pm) == 2): - return pm[1].strip() - - # Whatever found in PARALLEL_MAKE was not suitable. - return "1" - EXTRA_OECONF = "\ - --with-parallel-jobs=${@get_jdk7_native_jobs(d)} \ + --with-parallel-jobs=${@java_get_parallel_make(d)} \ \ --disable-tests \ --disable-hotspot-tests \ @@ -273,5 +254,3 @@ do_install() { # Fix missing write permissions on the files. chmod ug+w -R ${JDK_INSTALL_DIR} } - -get_jdk7_native_jobs[vardepsexclude] += "ICEDTEA_PARALLEL_MAKE" -- cgit v1.2.3-54-g00ecf