diff options
Diffstat (limited to 'classes')
| -rw-r--r-- | classes/java.bbclass | 17 | ||||
| -rw-r--r-- | classes/openjdk-build-helper.bbclass | 16 |
2 files changed, 16 insertions, 17 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] | ||
