diff options
-rw-r--r-- | classes/java.bbclass | 17 | ||||
-rw-r--r-- | classes/openjdk-build-helper.bbclass | 16 | ||||
-rw-r--r-- | recipes-core/icedtea/icedtea7-native.inc | 3 | ||||
-rw-r--r-- | recipes-core/openjdk/openjdk-7-common.inc | 2 | ||||
-rw-r--r-- | recipes-core/openjdk/openjdk-8-common.inc | 1 | ||||
-rw-r--r-- | recipes-core/openjdk/openjdk-8-cross.inc | 2 | ||||
-rw-r--r-- | recipes-core/openjdk/openjdk-8-native.inc | 2 | ||||
-rw-r--r-- | recipes-core/openjdk/openjdk-common.inc | 1 |
8 files changed, 23 insertions, 21 deletions
diff --git a/classes/java.bbclass b/classes/java.bbclass index aa012ab..fc97295 100644 --- a/classes/java.bbclass +++ b/classes/java.bbclass | |||
@@ -21,23 +21,6 @@ STAGING_DATADIR_JAVA_NATIVE ?= "${STAGING_DATADIR_NATIVE}/java" | |||
21 | STAGING_LIBDIR_JNI_NATIVE ?= "${STAGING_LIBDIR_NATIVE}/jni" | 21 | STAGING_LIBDIR_JNI_NATIVE ?= "${STAGING_LIBDIR_NATIVE}/jni" |
22 | STAGING_LIBDIR_JVM_NATIVE ?= "${STAGING_LIBDIR_NATIVE}/jvm" | 22 | STAGING_LIBDIR_JVM_NATIVE ?= "${STAGING_LIBDIR_NATIVE}/jvm" |
23 | 23 | ||
24 | # Icedtea's makefile is not compatible to parallelization so we cannot allow | ||
25 | # passing a valid ${PARALLEL_MAKE} to it. OTOH OpenJDK's makefiles are | ||
26 | # parallelizable and we need ${PARALLEL_MAKE} to derive the proper value. | ||
27 | # The base for this quirk is that GNU Make only considers the last "-j" option. | ||
28 | EXTRA_OEMAKE_remove_task-compile = "${PARALLEL_MAKE}" | ||
29 | EXTRA_OEMAKE_remove_task-install = "${PARALLEL_MAKEINST}" | ||
30 | |||
31 | # OpenJDK supports parallel compilation but uses a plain number for this. | ||
32 | # In OE we have PARALLEL_MAKE which is the actual option passed to make, | ||
33 | # e.g. "-j 4". | ||
34 | def java_get_parallel_make(d): | ||
35 | pm = d.getVar('PARALLEL_MAKE', True); | ||
36 | if not pm or '-j' not in pm: | ||
37 | return 1 | ||
38 | |||
39 | return pm.partition('-j')[2].strip().split(' ')[0] | ||
40 | |||
41 | oe_jarinstall() { | 24 | oe_jarinstall() { |
42 | # Purpose: Install a jar file and create all the given symlinks to it. | 25 | # Purpose: Install a jar file and create all the given symlinks to it. |
43 | # Example: | 26 | # Example: |
diff --git a/classes/openjdk-build-helper.bbclass b/classes/openjdk-build-helper.bbclass new file mode 100644 index 0000000..785ddf0 --- /dev/null +++ b/classes/openjdk-build-helper.bbclass | |||
@@ -0,0 +1,16 @@ | |||
1 | # Icedtea's makefile is not compatible to parallelization so we cannot allow | ||
2 | # passing a valid ${PARALLEL_MAKE} to it. OTOH OpenJDK's makefiles are | ||
3 | # parallelizable and we need ${PARALLEL_MAKE} to derive the proper value. | ||
4 | # The base for this quirk is that GNU Make only considers the last "-j" option. | ||
5 | EXTRA_OEMAKE_remove_task-compile = "${PARALLEL_MAKE}" | ||
6 | EXTRA_OEMAKE_remove_task-install = "${PARALLEL_MAKEINST}" | ||
7 | |||
8 | # OpenJDK supports parallel compilation but uses a plain number for this. | ||
9 | # In OE we have PARALLEL_MAKE which is the actual option passed to make, | ||
10 | # e.g. "-j 4". | ||
11 | def openjdk_build_helper_get_parallel_make(d): | ||
12 | pm = d.getVar('PARALLEL_MAKE', True); | ||
13 | if not pm or '-j' not in pm: | ||
14 | return 1 | ||
15 | |||
16 | return pm.partition('-j')[2].strip().split(' ')[0] | ||
diff --git a/recipes-core/icedtea/icedtea7-native.inc b/recipes-core/icedtea/icedtea7-native.inc index 93463be..30fb24a 100644 --- a/recipes-core/icedtea/icedtea7-native.inc +++ b/recipes-core/icedtea/icedtea7-native.inc | |||
@@ -25,6 +25,7 @@ CXXFLAGS_append = " -fno-tree-dse" | |||
25 | CXX_append = " -std=gnu++98" | 25 | CXX_append = " -std=gnu++98" |
26 | 26 | ||
27 | inherit native java autotools pkgconfig | 27 | inherit native java autotools pkgconfig |
28 | inherit openjdk-build-helper | ||
28 | 29 | ||
29 | JAVA_HOME[unexport] = "1" | 30 | JAVA_HOME[unexport] = "1" |
30 | 31 | ||
@@ -58,7 +59,7 @@ export ALT_FREETYPE_LIB_PATH = "${STAGING_LIBDIR}" | |||
58 | INSANE_SKIP_${PN} = "already-stripped" | 59 | INSANE_SKIP_${PN} = "already-stripped" |
59 | 60 | ||
60 | EXTRA_OECONF = "\ | 61 | EXTRA_OECONF = "\ |
61 | --with-parallel-jobs=${@java_get_parallel_make(d)} \ | 62 | --with-parallel-jobs=${@openjdk_build_helper_get_parallel_make(d)} \ |
62 | \ | 63 | \ |
63 | --disable-tests \ | 64 | --disable-tests \ |
64 | --disable-hotspot-tests \ | 65 | --disable-hotspot-tests \ |
diff --git a/recipes-core/openjdk/openjdk-7-common.inc b/recipes-core/openjdk/openjdk-7-common.inc index 1ac3154..0ef6758 100644 --- a/recipes-core/openjdk/openjdk-7-common.inc +++ b/recipes-core/openjdk/openjdk-7-common.inc | |||
@@ -84,7 +84,7 @@ EXTRA_OECONF = " \ | |||
84 | --with-jdk-src-zip=${WORKDIR}/${JDK_FILE} \ | 84 | --with-jdk-src-zip=${WORKDIR}/${JDK_FILE} \ |
85 | --with-langtools-src-zip=${WORKDIR}/${LANGTOOLS_FILE} \ | 85 | --with-langtools-src-zip=${WORKDIR}/${LANGTOOLS_FILE} \ |
86 | \ | 86 | \ |
87 | --with-parallel-jobs=${@java_get_parallel_make(d)} \ | 87 | --with-parallel-jobs=${@openjdk_build_helper_get_parallel_make(d)} \ |
88 | \ | 88 | \ |
89 | --with-pkgversion=${PV} \ | 89 | --with-pkgversion=${PV} \ |
90 | --with-cc-for-build=${BUILD_CC} \ | 90 | --with-cc-for-build=${BUILD_CC} \ |
diff --git a/recipes-core/openjdk/openjdk-8-common.inc b/recipes-core/openjdk/openjdk-8-common.inc index 6b2f5e7..0c77d7c 100644 --- a/recipes-core/openjdk/openjdk-8-common.inc +++ b/recipes-core/openjdk/openjdk-8-common.inc | |||
@@ -5,6 +5,7 @@ LICENSE = "GPL-2.0-with-classpath-exception" | |||
5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=3e0b59f8fac05c3c03d4a26bbda13f8f" | 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=3e0b59f8fac05c3c03d4a26bbda13f8f" |
6 | 6 | ||
7 | inherit java autotools gettext qemu pkgconfig | 7 | inherit java autotools gettext qemu pkgconfig |
8 | inherit openjdk-build-helper | ||
8 | 9 | ||
9 | AUTOTOOLS_SCRIPT_PATH = "${S}/common/autoconf/" | 10 | AUTOTOOLS_SCRIPT_PATH = "${S}/common/autoconf/" |
10 | export AUTOCONF_DIR="${AUTOTOOLS_SCRIPT_PATH}" | 11 | export AUTOCONF_DIR="${AUTOTOOLS_SCRIPT_PATH}" |
diff --git a/recipes-core/openjdk/openjdk-8-cross.inc b/recipes-core/openjdk/openjdk-8-cross.inc index d0b2ec8..939155b 100644 --- a/recipes-core/openjdk/openjdk-8-cross.inc +++ b/recipes-core/openjdk/openjdk-8-cross.inc | |||
@@ -52,7 +52,7 @@ SRC_URI_append = "\ | |||
52 | " | 52 | " |
53 | 53 | ||
54 | EXTRA_OECONF_append = "\ | 54 | EXTRA_OECONF_append = "\ |
55 | --with-jobs=${@java_get_parallel_make(d)} \ | 55 | --with-jobs=${@openjdk_build_helper_get_parallel_make(d)} \ |
56 | \ | 56 | \ |
57 | --with-sys-root=${STAGING_DIR_HOST} \ | 57 | --with-sys-root=${STAGING_DIR_HOST} \ |
58 | --with-tools-dir=${STAGING_DIR_NATIVE} \ | 58 | --with-tools-dir=${STAGING_DIR_NATIVE} \ |
diff --git a/recipes-core/openjdk/openjdk-8-native.inc b/recipes-core/openjdk/openjdk-8-native.inc index b782c32..e6f7933 100644 --- a/recipes-core/openjdk/openjdk-8-native.inc +++ b/recipes-core/openjdk/openjdk-8-native.inc | |||
@@ -20,7 +20,7 @@ PACKAGECONFIG[png] = "--with-libpng=system,--with-libpng=bundled,libpng-native" | |||
20 | PACKAGECONFIG[zlib] = "--with-zlib=system,--with-zlib=bundled,zlib-native" | 20 | PACKAGECONFIG[zlib] = "--with-zlib=system,--with-zlib=bundled,zlib-native" |
21 | 21 | ||
22 | EXTRA_OECONF_append = "\ | 22 | EXTRA_OECONF_append = "\ |
23 | --with-jobs=${@java_get_parallel_make(d)} \ | 23 | --with-jobs=${@openjdk_build_helper_get_parallel_make(d)} \ |
24 | \ | 24 | \ |
25 | --with-sys-root=${STAGING_DIR_NATIVE} \ | 25 | --with-sys-root=${STAGING_DIR_NATIVE} \ |
26 | --with-tools-dir=${STAGING_DIR_NATIVE} \ | 26 | --with-tools-dir=${STAGING_DIR_NATIVE} \ |
diff --git a/recipes-core/openjdk/openjdk-common.inc b/recipes-core/openjdk/openjdk-common.inc index c92af40..4e2eb94 100644 --- a/recipes-core/openjdk/openjdk-common.inc +++ b/recipes-core/openjdk/openjdk-common.inc | |||
@@ -17,6 +17,7 @@ DEPENDS_append_libc-uclibc = " virtual/libiconv " | |||
17 | DEPENDS_append = " qemu-native " | 17 | DEPENDS_append = " qemu-native " |
18 | 18 | ||
19 | inherit java autotools gettext qemu pkgconfig | 19 | inherit java autotools gettext qemu pkgconfig |
20 | inherit openjdk-build-helper | ||
20 | 21 | ||
21 | B = "${S}/build" | 22 | B = "${S}/build" |
22 | 23 | ||