diff options
14 files changed, 573 insertions, 10 deletions
| @@ -73,7 +73,6 @@ way is to add the following configuration to your local.conf: | |||
| 73 | 73 | ||
| 74 | SANITY_TESTED_DISTROS = "" | 74 | SANITY_TESTED_DISTROS = "" |
| 75 | INHERIT += "testimage" | 75 | INHERIT += "testimage" |
| 76 | TESTIMAGE_AUTO = "1" | ||
| 77 | 76 | ||
| 78 | Then you should be able to use the open{jre,jdk}-{7,8}-test-image recipes. | 77 | Then you should be able to use the open{jre,jdk}-{7,8}-test-image recipes. |
| 79 | Furthermore you could also include the tests provided in lib/oeqa/runtime/cases | 78 | Furthermore you could also include the tests provided in lib/oeqa/runtime/cases |
| @@ -110,6 +109,19 @@ list at openembedded-devel@lists.openembedded.org. | |||
| 110 | Usage instructions | 109 | Usage instructions |
| 111 | ------------------ | 110 | ------------------ |
| 112 | 111 | ||
| 112 | Simply rely on openjdk-7-jre, openjdk-7, openjdk-8 or openjre-8. | ||
| 113 | |||
| 114 | For conf/bblayers.conf you have to add | ||
| 115 | |||
| 116 | BBLAYERS ?= " \ | ||
| 117 | ... | ||
| 118 | path_to_source/meta-openembedded/meta-oe \ | ||
| 119 | path_to_source/sources/meta-java \ | ||
| 120 | " | ||
| 121 | |||
| 122 | Extra usage instructions OpenJDK-7 & OpenJDK-8 | ||
| 123 | ---------------------------------------------- | ||
| 124 | |||
| 113 | You should define at least the following variables in a distro include file or local.conf | 125 | You should define at least the following variables in a distro include file or local.conf |
| 114 | 126 | ||
| 115 | # Possible provider: cacao-initial-native and jamvm-initial-native | 127 | # Possible provider: cacao-initial-native and jamvm-initial-native |
| @@ -121,15 +133,13 @@ PREFERRED_PROVIDER_virtual/java-native = "jamvm-native" | |||
| 121 | # Optional since there is only one provider for now | 133 | # Optional since there is only one provider for now |
| 122 | PREFERRED_PROVIDER_virtual/javac-native = "ecj-bootstrap-native" | 134 | PREFERRED_PROVIDER_virtual/javac-native = "ecj-bootstrap-native" |
| 123 | 135 | ||
| 124 | Simply rely on openjdk-7-jre, openjdk-7, openjdk-8 or openjre-8. | 136 | Extra usage instructions OpenJDK-14 |
| 137 | ----------------------------------- | ||
| 125 | 138 | ||
| 126 | For conf/bblayers.conf you have to add | 139 | You should define at least the following variables in a distro include file or local.conf |
| 127 | 140 | ||
| 128 | BBLAYERS ?= " \ | 141 | # The boot-jdk used to bootstrap openjdk-14-native (needs to be jdk v13 || v14) |
| 129 | ... | 142 | OPENJDK14_BOOT_JDK = "/path/to/boot-jdk" |
| 130 | path_to_source/meta-openembedded/meta-oe \ | ||
| 131 | path_to_source/sources/meta-java \ | ||
| 132 | " | ||
| 133 | 143 | ||
| 134 | Build host dependencies | 144 | Build host dependencies |
| 135 | ----------------------- | 145 | ----------------------- |
diff --git a/docs/bootstrap-flow.txt b/docs/bootstrap-flow.md index 602eab7..96d18e6 100644 --- a/docs/bootstrap-flow.txt +++ b/docs/bootstrap-flow.md | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | # meta-java OpenJDK bootstrap workflow # | ||
| 2 | |||
| 3 | ## OpenJDK-14 ## | ||
| 4 | |||
| 5 | * TODO | ||
| 6 | |||
| 7 | ## OpenJDK-7 and OpenJDK-8 ## | ||
| 8 | |||
| 1 | * first jikes-native is compiled | 9 | * first jikes-native is compiled |
| 2 | * a Java 1.4-capable compiler that does not need a runtime or | 10 | * a Java 1.4-capable compiler that does not need a runtime or |
| 3 | (strictly) a class library to work | 11 | (strictly) a class library to work |
diff --git a/lib/oeqa/runtime/cases/java.py b/lib/oeqa/runtime/cases/java.py index c1e1498..efee6e1 100644 --- a/lib/oeqa/runtime/cases/java.py +++ b/lib/oeqa/runtime/cases/java.py | |||
| @@ -69,12 +69,12 @@ class JavaTest(OERuntimeTestCase): | |||
| 69 | 69 | ||
| 70 | # As OpenJDK-8 doesn't support compiled mode (JIT) for arm yet we skip this | 70 | # As OpenJDK-8 doesn't support compiled mode (JIT) for arm yet we skip this |
| 71 | # test for now. | 71 | # test for now. |
| 72 | @OEHasPackage(["openjre-8", "openjdk-8"]) | 72 | @OEHasPackage(["!openjdk-7-jre", "!openjdk-7"]) |
| 73 | @OETestDepends(['java.JavaTest.test_java_exists']) | 73 | @OETestDepends(['java.JavaTest.test_java_exists']) |
| 74 | @skipIfInDataVar('TUNE_FEATURES', 'armv4', 'OpenJDK 8 compiled mode not yet supported for armv4') | 74 | @skipIfInDataVar('TUNE_FEATURES', 'armv4', 'OpenJDK 8 compiled mode not yet supported for armv4') |
| 75 | @skipIfInDataVar('TUNE_FEATURES', 'armv5', 'OpenJDK 8 compiled mode not yet supported for armv5') | 75 | @skipIfInDataVar('TUNE_FEATURES', 'armv5', 'OpenJDK 8 compiled mode not yet supported for armv5') |
| 76 | @skipIfInDataVar('TUNE_FEATURES', 'armv6', 'OpenJDK 8 compiled mode not yet supported for armv6') | 76 | @skipIfInDataVar('TUNE_FEATURES', 'armv6', 'OpenJDK 8 compiled mode not yet supported for armv6') |
| 77 | def test_java8_jar_comp_mode(self): | 77 | def test_java_jar_comp_mode(self): |
| 78 | status, output = self.target.run('java -showversion -Xcomp -jar /tmp/test.jar') | 78 | status, output = self.target.run('java -showversion -Xcomp -jar /tmp/test.jar') |
| 79 | msg = 'Exit status was not 0. Output: %s' % output | 79 | msg = 'Exit status was not 0. Output: %s' % output |
| 80 | self.assertEqual(status, 0, msg=msg) | 80 | self.assertEqual(status, 0, msg=msg) |
diff --git a/recipes-core/openjdk/openjdk-14-common.inc b/recipes-core/openjdk/openjdk-14-common.inc new file mode 100644 index 0000000..36451b8 --- /dev/null +++ b/recipes-core/openjdk/openjdk-14-common.inc | |||
| @@ -0,0 +1,155 @@ | |||
| 1 | # Copyright (C) 2020 Richard Leitner <richard.leitner@skidata.com> | ||
| 2 | # Released under the MIT license (see COPYING.MIT for the terms) | ||
| 3 | |||
| 4 | SUMMARY = "Java runtime based upon the OpenJDK Project" | ||
| 5 | HOMEPAGE = "http://openjdk.java.net/" | ||
| 6 | LICENSE = "GPL-2.0-with-classpath-exception" | ||
| 7 | |||
| 8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=3e0b59f8fac05c3c03d4a26bbda13f8f" | ||
| 9 | |||
| 10 | DEPENDS = "\ | ||
| 11 | alsa-lib \ | ||
| 12 | bash \ | ||
| 13 | fontconfig \ | ||
| 14 | freetype \ | ||
| 15 | giflib \ | ||
| 16 | jpeg \ | ||
| 17 | libpng \ | ||
| 18 | libx11 xorgproto libxt libxext libxrender libxtst libxrandr \ | ||
| 19 | unzip-native \ | ||
| 20 | zip-native \ | ||
| 21 | zlib \ | ||
| 22 | " | ||
| 23 | |||
| 24 | DEPENDS_append_class-target = "\ | ||
| 25 | cups \ | ||
| 26 | openjdk-14-native \ | ||
| 27 | " | ||
| 28 | |||
| 29 | SRC_URI = "\ | ||
| 30 | https://hg.openjdk.java.net/jdk-updates/jdk14u/archive/jdk-${PV}-ga.tar.bz2;name=jdk \ | ||
| 31 | file://0001-make-autoconf-remove-hard-dependency-on-cups.patch \ | ||
| 32 | file://0002-make-autoconf-toolchain-remove-invalid-compiler-chec.patch \ | ||
| 33 | " | ||
| 34 | |||
| 35 | S = "${WORKDIR}/jdk14u-jdk-${PV}-ga" | ||
| 36 | |||
| 37 | require openjdk-common.inc | ||
| 38 | |||
| 39 | JAVA_HOME = "${libdir_jvm}/${PN}" | ||
| 40 | |||
| 41 | AUTOTOOLS_SCRIPT_PATH = "${S}/make/autoconf" | ||
| 42 | |||
| 43 | EXTRA_OECONF_append = "\ | ||
| 44 | --with-jobs=${@openjdk_build_helper_get_parallel_make(d)} \ | ||
| 45 | --with-tools-dir='${STAGING_DIR_NATIVE}' \ | ||
| 46 | --with-extra-cflags='${CFLAGS}' \ | ||
| 47 | --with-extra-cxxflags='${CXXFLAGS}' \ | ||
| 48 | --with-extra-ldflags='${LDFLAGS}' \ | ||
| 49 | --with-alsa-include='${STAGING_INCDIR}/alsa' \ | ||
| 50 | --with-alsa-lib='${STAGING_LIBDIR}' \ | ||
| 51 | --with-fontconfig-include='${STAGING_INCDIR}' \ | ||
| 52 | --with-freetype-include='${STAGING_INCDIR}/freetype2' \ | ||
| 53 | --with-freetype-lib='${STAGING_LIBDIR}' \ | ||
| 54 | --with-giflib=bundled \ | ||
| 55 | --with-libjpeg=bundled \ | ||
| 56 | --with-libpng=bundled \ | ||
| 57 | --with-zlib=bundled \ | ||
| 58 | --x-includes='${STAGING_INCDIR}/X11' \ | ||
| 59 | --x-libraries='${STAGING_LIBDIR}' \ | ||
| 60 | --with-vendor-name='meta-java' \ | ||
| 61 | --disable-manpages \ | ||
| 62 | --disable-warnings-as-errors \ | ||
| 63 | " | ||
| 64 | |||
| 65 | CONFIGUREOPTS_remove_class-native = "--host=${HOST_SYS}" | ||
| 66 | CONFIGUREOPTS_remove_class-native = "--target=${TARGET_SYS}" | ||
| 67 | |||
| 68 | EXTRA_OECONF_append_class-native = "\ | ||
| 69 | --with-boot-jdk='${OPENJDK14_BOOT_JDK}' \ | ||
| 70 | --enable-headless-only \ | ||
| 71 | --enable-openjdk-only \ | ||
| 72 | --without-cups \ | ||
| 73 | " | ||
| 74 | |||
| 75 | EXTRA_OECONF_append_class-target = "\ | ||
| 76 | --with-sys-root='${STAGING_DIR_HOST}' \ | ||
| 77 | --with-boot-jdk='${STAGING_LIBDIR_NATIVE}/jvm/openjdk-14-native' \ | ||
| 78 | " | ||
| 79 | |||
| 80 | do_patch_append() { | ||
| 81 | bb.build.exec_func('do_fix_configure', d) | ||
| 82 | } | ||
| 83 | |||
| 84 | do_fix_configure() { | ||
| 85 | chmod a+x ${S}/configure | ||
| 86 | } | ||
| 87 | |||
| 88 | do_configure_prepend () { | ||
| 89 | export TOPDIR=${S} | ||
| 90 | export CXXFILT="c++filt" | ||
| 91 | unset CFLAGS CXXFLAGS LDFLAGS | ||
| 92 | } | ||
| 93 | |||
| 94 | EXTRA_OEMAKE_append = '\ | ||
| 95 | STRIP_POLICY=no_strip \ | ||
| 96 | QUIETLY= \ | ||
| 97 | jdk-image \ | ||
| 98 | legacy-jre-image \ | ||
| 99 | ' | ||
| 100 | |||
| 101 | do_install() { | ||
| 102 | rm -rf ${D}${JAVA_HOME} | ||
| 103 | mkdir -p ${D}${JAVA_HOME} | ||
| 104 | if [[ "${PN}" = openjre* ]]; then | ||
| 105 | cp -rp ${B}/images/jre/* ${D}${JAVA_HOME} | ||
| 106 | else | ||
| 107 | cp -rp ${B}/images/jdk/* ${D}${JAVA_HOME} | ||
| 108 | fi | ||
| 109 | chown -R root:root ${D}${JAVA_HOME} | ||
| 110 | #install -m644 ${WORKDIR}/jvm.cfg ${D}${JAVA_HOME}/jre/lib/${JDK_ARCH}/ | ||
| 111 | find ${D}${JAVA_HOME} -name "*.debuginfo" -exec rm {} \; | ||
| 112 | } | ||
| 113 | |||
| 114 | PACKAGES_append = " \ | ||
| 115 | ${PN}-demo \ | ||
| 116 | ${PN}-jmods \ | ||
| 117 | " | ||
| 118 | |||
| 119 | FILES_${PN}-demo = " ${JAVA_HOME}/demo ${JAVA_HOME}/sample " | ||
| 120 | FILES_${PN}-jmods = " ${JAVA_HOME}/jmods " | ||
| 121 | |||
| 122 | FILES_${PN}_append = "\ | ||
| 123 | ${JAVA_HOME}/bin/[a-z]* \ | ||
| 124 | ${JAVA_HOME}/lib/[a-z]* \ | ||
| 125 | ${JAVA_HOME}/jre/bin/[a-z]* \ | ||
| 126 | ${JAVA_HOME}/jre/lib/[a-z]* \ | ||
| 127 | ${JAVA_HOME}/LICENSE \ | ||
| 128 | ${JAVA_HOME}/jre/LICENSE \ | ||
| 129 | ${JAVA_HOME}/release \ | ||
| 130 | ${JAVA_HOME}/conf \ | ||
| 131 | " | ||
| 132 | |||
| 133 | FILES_${PN}-dev_append = "\ | ||
| 134 | ${JAVA_HOME}/include \ | ||
| 135 | " | ||
| 136 | |||
| 137 | FILES_${PN}-doc_append = "\ | ||
| 138 | ${JAVA_HOME}/man \ | ||
| 139 | ${JAVA_HOME}/ASSEMBLY_EXCEPTION \ | ||
| 140 | ${JAVA_HOME}/THIRD_PARTY_README \ | ||
| 141 | ${JAVA_HOME}/jre/ASSEMBLY_EXCEPTION \ | ||
| 142 | ${JAVA_HOME}/jre/THIRD_PARTY_README \ | ||
| 143 | ${JAVA_HOME}/legal \ | ||
| 144 | " | ||
| 145 | |||
| 146 | inherit update-alternatives | ||
| 147 | |||
| 148 | ALTERNATIVE_PRIORITY = "100" | ||
| 149 | |||
| 150 | ALTERNATIVE_openjdk-14 = "java javac" | ||
| 151 | ALTERNATIVE_openjre-14 = "java" | ||
| 152 | ALTERNATIVE_LINK_NAME[java] = "${bindir}/java" | ||
| 153 | ALTERNATIVE_TARGET[java] = "${JAVA_HOME}/bin/java" | ||
| 154 | ALTERNATIVE_LINK_NAME[javac] = "${bindir}/javac" | ||
| 155 | ALTERNATIVE_TARGET[javac] = "${JAVA_HOME}/bin/javac" | ||
diff --git a/recipes-core/openjdk/openjdk-14-release.inc b/recipes-core/openjdk/openjdk-14-release.inc new file mode 100644 index 0000000..33b3966 --- /dev/null +++ b/recipes-core/openjdk/openjdk-14-release.inc | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | # Copyright (C) 2020 Richard Leitner <richard.leitner@skidata.com> | ||
| 2 | # Released under the MIT license (see COPYING.MIT for the terms) | ||
| 3 | |||
| 4 | SRC_URI[jdk.sha256sum] = "f9c4a55ac858f858222bc5fe6e4b890f9b4a3f942fd0211575b0418aec5c14d6" | ||
| 5 | |||
| 6 | FILESPATH =. "${FILE_DIRNAME}/patches-openjdk-14:" | ||
| 7 | |||
| 8 | SRC_URI_append = "\ | ||
| 9 | file://libjava_childproc_multiple_definition_link_errors_with_GCC10.patch \ | ||
| 10 | file://libj2gss_NativeFunc_multiple_definition_link_errors_with_GCC10.patch \ | ||
| 11 | file://fixed_libsctp_link_errors_caused_by_GCC10.patch \ | ||
| 12 | " | ||
diff --git a/recipes-core/openjdk/openjdk-14_14.0.1.bb b/recipes-core/openjdk/openjdk-14_14.0.1.bb new file mode 100644 index 0000000..f94b25a --- /dev/null +++ b/recipes-core/openjdk/openjdk-14_14.0.1.bb | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | # Copyright (C) 2020 Richard Leitner <richard.leitner@skidata.com> | ||
| 2 | # Released under the MIT license (see COPYING.MIT for the terms) | ||
| 3 | |||
| 4 | require openjdk-14-common.inc | ||
| 5 | require openjdk-14-release.inc | ||
| 6 | |||
| 7 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/recipes-core/openjdk/openjre-14_14.0.1.bb b/recipes-core/openjdk/openjre-14_14.0.1.bb new file mode 100644 index 0000000..04cd23e --- /dev/null +++ b/recipes-core/openjdk/openjre-14_14.0.1.bb | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | # Copyright (C) 2020 Richard Leitner <richard.leitner@skidata.com> | ||
| 2 | # Released under the MIT license (see COPYING.MIT for the terms) | ||
| 3 | |||
| 4 | require openjdk-14-common.inc | ||
| 5 | require openjdk-14-release.inc | ||
diff --git a/recipes-core/openjdk/patches-openjdk-14/0001-make-autoconf-remove-hard-dependency-on-cups.patch b/recipes-core/openjdk/patches-openjdk-14/0001-make-autoconf-remove-hard-dependency-on-cups.patch new file mode 100644 index 0000000..51999b6 --- /dev/null +++ b/recipes-core/openjdk/patches-openjdk-14/0001-make-autoconf-remove-hard-dependency-on-cups.patch | |||
| @@ -0,0 +1,154 @@ | |||
| 1 | From 3f77089a24c5073c59321d0ac5fdfe5057d8c06b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Richard Leitner <richard.leitner@skidata.com> | ||
| 3 | Date: Wed, 13 May 2020 13:34:33 +0200 | ||
| 4 | Subject: [PATCH 1/2] make: autoconf: remove hard dependency on cups | ||
| 5 | |||
| 6 | In our native build we don't want to have a dependency on cups, | ||
| 7 | therefore enable --without-cups for all platforms. | ||
| 8 | |||
| 9 | Upstream-Status: Inappropriate [disable feature] | ||
| 10 | Signed-off-by: Richard Leitner <richard.leitner@skidata.com> | ||
| 11 | --- | ||
| 12 | make/autoconf/lib-cups.m4 | 30 ++++++++++++------------------ | ||
| 13 | make/autoconf/libraries.m4 | 8 -------- | ||
| 14 | make/autoconf/spec.gmk.in | 1 + | ||
| 15 | make/lib/Awt2dLibraries.gmk | 13 ++++++++++++- | ||
| 16 | 4 files changed, 25 insertions(+), 27 deletions(-) | ||
| 17 | |||
| 18 | diff --git a/make/autoconf/lib-cups.m4 b/make/autoconf/lib-cups.m4 | ||
| 19 | index 0a7df8b381..e8b6a683a3 100644 | ||
| 20 | --- a/make/autoconf/lib-cups.m4 | ||
| 21 | +++ b/make/autoconf/lib-cups.m4 | ||
| 22 | @@ -34,25 +34,18 @@ AC_DEFUN_ONCE([LIB_SETUP_CUPS], | ||
| 23 | AC_ARG_WITH(cups-include, [AS_HELP_STRING([--with-cups-include], | ||
| 24 | [specify directory for the cups include files])]) | ||
| 25 | |||
| 26 | - if test "x$NEEDS_LIB_CUPS" = xfalse; then | ||
| 27 | - if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \ | ||
| 28 | - (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then | ||
| 29 | - AC_MSG_WARN([[cups not used, so --with-cups[-*] is ignored]]) | ||
| 30 | - fi | ||
| 31 | + | ||
| 32 | + WITH_CUPS="false" | ||
| 33 | + if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then | ||
| 34 | + AC_MSG_WARN([Disable the use of cups.]) | ||
| 35 | CUPS_CFLAGS= | ||
| 36 | else | ||
| 37 | - CUPS_FOUND=no | ||
| 38 | - | ||
| 39 | - if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then | ||
| 40 | - AC_MSG_ERROR([It is not possible to disable the use of cups. Remove the --without-cups option.]) | ||
| 41 | - fi | ||
| 42 | - | ||
| 43 | if test "x${with_cups}" != x; then | ||
| 44 | AC_MSG_CHECKING([for cups headers]) | ||
| 45 | if test -s "${with_cups}/include/cups/cups.h"; then | ||
| 46 | CUPS_CFLAGS="-I${with_cups}/include" | ||
| 47 | - CUPS_FOUND=yes | ||
| 48 | - AC_MSG_RESULT([$CUPS_FOUND]) | ||
| 49 | + WITH_CUPS="true" | ||
| 50 | + AC_MSG_RESULT([$WITH_CUPS]) | ||
| 51 | else | ||
| 52 | AC_MSG_ERROR([Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option.]) | ||
| 53 | fi | ||
| 54 | @@ -61,25 +54,26 @@ AC_DEFUN_ONCE([LIB_SETUP_CUPS], | ||
| 55 | AC_MSG_CHECKING([for cups headers]) | ||
| 56 | if test -s "${with_cups_include}/cups/cups.h"; then | ||
| 57 | CUPS_CFLAGS="-I${with_cups_include}" | ||
| 58 | - CUPS_FOUND=yes | ||
| 59 | - AC_MSG_RESULT([$CUPS_FOUND]) | ||
| 60 | + WITH_CUPS="true" | ||
| 61 | + AC_MSG_RESULT([$WITH_CUPS]) | ||
| 62 | else | ||
| 63 | AC_MSG_ERROR([Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option.]) | ||
| 64 | fi | ||
| 65 | fi | ||
| 66 | - if test "x$CUPS_FOUND" = xno; then | ||
| 67 | + if test "x$WITH_CUPS" = "xfalse"; then | ||
| 68 | # Are the cups headers installed in the default /usr/include location? | ||
| 69 | AC_CHECK_HEADERS([cups/cups.h cups/ppd.h], [ | ||
| 70 | - CUPS_FOUND=yes | ||
| 71 | + WITH_CUPS="true" | ||
| 72 | CUPS_CFLAGS= | ||
| 73 | DEFAULT_CUPS=yes | ||
| 74 | ]) | ||
| 75 | fi | ||
| 76 | - if test "x$CUPS_FOUND" = xno; then | ||
| 77 | + if test "x$WITH_CUPS" = "xfalse"; then | ||
| 78 | HELP_MSG_MISSING_DEPENDENCY([cups]) | ||
| 79 | AC_MSG_ERROR([Could not find cups! $HELP_MSG ]) | ||
| 80 | fi | ||
| 81 | fi | ||
| 82 | |||
| 83 | AC_SUBST(CUPS_CFLAGS) | ||
| 84 | + AC_SUBST(WITH_CUPS) | ||
| 85 | ]) | ||
| 86 | diff --git a/make/autoconf/libraries.m4 b/make/autoconf/libraries.m4 | ||
| 87 | index 5f16f08b20..8d64c6e8b7 100644 | ||
| 88 | --- a/make/autoconf/libraries.m4 | ||
| 89 | +++ b/make/autoconf/libraries.m4 | ||
| 90 | @@ -59,14 +59,6 @@ AC_DEFUN_ONCE([LIB_DETERMINE_DEPENDENCIES], | ||
| 91 | NEEDS_LIB_FONTCONFIG=true | ||
| 92 | fi | ||
| 93 | |||
| 94 | - # Check if cups is needed | ||
| 95 | - if test "x$OPENJDK_TARGET_OS" = xwindows; then | ||
| 96 | - # Windows have a separate print system | ||
| 97 | - NEEDS_LIB_CUPS=false | ||
| 98 | - else | ||
| 99 | - NEEDS_LIB_CUPS=true | ||
| 100 | - fi | ||
| 101 | - | ||
| 102 | # A custom hook may have set this already | ||
| 103 | if test "x$NEEDS_LIB_FREETYPE" = "x"; then | ||
| 104 | NEEDS_LIB_FREETYPE=true | ||
| 105 | diff --git a/make/autoconf/spec.gmk.in b/make/autoconf/spec.gmk.in | ||
| 106 | index 3a85303e80..b1253daa5d 100644 | ||
| 107 | --- a/make/autoconf/spec.gmk.in | ||
| 108 | +++ b/make/autoconf/spec.gmk.in | ||
| 109 | @@ -370,6 +370,7 @@ FREETYPE_LIBS:=@FREETYPE_LIBS@ | ||
| 110 | FREETYPE_CFLAGS:=@FREETYPE_CFLAGS@ | ||
| 111 | FONTCONFIG_CFLAGS:=@FONTCONFIG_CFLAGS@ | ||
| 112 | CUPS_CFLAGS:=@CUPS_CFLAGS@ | ||
| 113 | +WITH_CUPS := @WITH_CUPS@ | ||
| 114 | ALSA_LIBS:=@ALSA_LIBS@ | ||
| 115 | ALSA_CFLAGS:=@ALSA_CFLAGS@ | ||
| 116 | LIBFFI_LIBS:=@LIBFFI_LIBS@ | ||
| 117 | diff --git a/make/lib/Awt2dLibraries.gmk b/make/lib/Awt2dLibraries.gmk | ||
| 118 | index a38d416673..d0eeab35c6 100644 | ||
| 119 | --- a/make/lib/Awt2dLibraries.gmk | ||
| 120 | +++ b/make/lib/Awt2dLibraries.gmk | ||
| 121 | @@ -141,7 +141,11 @@ ifeq ($(call isTargetOs, windows), true) | ||
| 122 | endif | ||
| 123 | |||
| 124 | ifeq ($(call isTargetOs, solaris linux macosx aix), true) | ||
| 125 | - LIBAWT_EXFILES += awt_Font.c CUPSfuncs.c fontpath.c X11Color.c | ||
| 126 | + LIBAWT_EXFILES += awt_Font.c fontpath.c X11Color.c | ||
| 127 | +endif | ||
| 128 | + | ||
| 129 | +ifeq ($(WITH_CUPS), false) | ||
| 130 | + LIBAWT_EXFILES += CUPSfuncs.c | ||
| 131 | endif | ||
| 132 | |||
| 133 | ifeq ($(call isTargetOs, macosx), true) | ||
| 134 | @@ -461,10 +465,17 @@ ifeq ($(call isTargetOs, windows macosx), false) | ||
| 135 | LIBAWT_HEADLESS_CFLAGS := $(CUPS_CFLAGS) $(FONTCONFIG_CFLAGS) $(X_CFLAGS) \ | ||
| 136 | -DHEADLESS=true | ||
| 137 | |||
| 138 | + | ||
| 139 | + LIBAWT_HEADLESS_EXFILES := | ||
| 140 | + ifeq ($(WITH_CUPS), false) | ||
| 141 | + LIBAWT_HEADLESS_EXFILES += CUPSfuncs.c | ||
| 142 | + endif | ||
| 143 | + | ||
| 144 | $(eval $(call SetupJdkLibrary, BUILD_LIBAWT_HEADLESS, \ | ||
| 145 | NAME := awt_headless, \ | ||
| 146 | EXTRA_SRC := $(LIBAWT_HEADLESS_EXTRA_SRC), \ | ||
| 147 | EXCLUDES := $(LIBAWT_HEADLESS_EXCLUDES), \ | ||
| 148 | + EXCLUDE_FILES := $(LIBAWT_HEADLESS_EXFILES), \ | ||
| 149 | OPTIMIZATION := LOW, \ | ||
| 150 | CFLAGS := $(CFLAGS_JDKLIB) \ | ||
| 151 | $(LIBAWT_HEADLESS_CFLAGS), \ | ||
| 152 | -- | ||
| 153 | 2.26.2 | ||
| 154 | |||
diff --git a/recipes-core/openjdk/patches-openjdk-14/0002-make-autoconf-toolchain-remove-invalid-compiler-chec.patch b/recipes-core/openjdk/patches-openjdk-14/0002-make-autoconf-toolchain-remove-invalid-compiler-chec.patch new file mode 100644 index 0000000..9997e70 --- /dev/null +++ b/recipes-core/openjdk/patches-openjdk-14/0002-make-autoconf-toolchain-remove-invalid-compiler-chec.patch | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | From 93a94cd79b5657bc7954a23d6d3f9eda0addf773 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Richard Leitner <richard.leitner@skidata.com> | ||
| 3 | Date: Wed, 13 May 2020 13:41:49 +0200 | ||
| 4 | Subject: [PATCH 2/2] make: autoconf: toolchain: remove invalid compiler | ||
| 5 | checking | ||
| 6 | |||
| 7 | The checking of CC and CXX was faulty as it doesn't supported | ||
| 8 | program arguments. | ||
| 9 | To make things work remove the check and trust it is valid. | ||
| 10 | |||
| 11 | Upstream-Status: Inappropriate [configuration] | ||
| 12 | Signed-off-by: Richard Leitner <richard.leitner@skidata.com> | ||
| 13 | --- | ||
| 14 | make/autoconf/toolchain.m4 | 15 --------------- | ||
| 15 | 1 file changed, 15 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/make/autoconf/toolchain.m4 b/make/autoconf/toolchain.m4 | ||
| 18 | index 341b2d1786..24f9f03948 100644 | ||
| 19 | --- a/make/autoconf/toolchain.m4 | ||
| 20 | +++ b/make/autoconf/toolchain.m4 | ||
| 21 | @@ -526,21 +526,6 @@ AC_DEFUN([TOOLCHAIN_FIND_COMPILER], | ||
| 22 | if test "x[$]$1" != x; then | ||
| 23 | # User has supplied compiler name already, always let that override. | ||
| 24 | AC_MSG_NOTICE([Will use user supplied compiler $1=[$]$1]) | ||
| 25 | - if test "x`basename [$]$1`" = "x[$]$1"; then | ||
| 26 | - # A command without a complete path is provided, search $PATH. | ||
| 27 | - | ||
| 28 | - AC_PATH_PROGS(POTENTIAL_$1, [$]$1) | ||
| 29 | - if test "x$POTENTIAL_$1" != x; then | ||
| 30 | - $1=$POTENTIAL_$1 | ||
| 31 | - else | ||
| 32 | - AC_MSG_ERROR([User supplied compiler $1=[$]$1 could not be found]) | ||
| 33 | - fi | ||
| 34 | - else | ||
| 35 | - # Otherwise it might already be a complete path | ||
| 36 | - if test ! -x "[$]$1"; then | ||
| 37 | - AC_MSG_ERROR([User supplied compiler $1=[$]$1 does not exist]) | ||
| 38 | - fi | ||
| 39 | - fi | ||
| 40 | else | ||
| 41 | # No user supplied value. Locate compiler ourselves. | ||
| 42 | |||
| 43 | -- | ||
| 44 | 2.26.2 | ||
| 45 | |||
diff --git a/recipes-core/openjdk/patches-openjdk-14/fixed_libsctp_link_errors_caused_by_GCC10.patch b/recipes-core/openjdk/patches-openjdk-14/fixed_libsctp_link_errors_caused_by_GCC10.patch new file mode 100644 index 0000000..8111fa7 --- /dev/null +++ b/recipes-core/openjdk/patches-openjdk-14/fixed_libsctp_link_errors_caused_by_GCC10.patch | |||
| @@ -0,0 +1,64 @@ | |||
| 1 | |||
| 2 | # HG changeset patch | ||
| 3 | # User qpzhang | ||
| 4 | # Date 1580894055 -28800 | ||
| 5 | # Node ID 8e6fa89397ca26bf9f573888755d89d7104afcd4 | ||
| 6 | # Parent eaefceb7f52e0b17c070c9388e2b2578d48dcf3e | ||
| 7 | 8238386: (sctp) jdk.sctp/unix/native/libsctp/SctpNet.c "multiple definition" link errors with GCC10 | ||
| 8 | Summary: Fixed libsctp link errors caused by GCC10 default -fno-common | ||
| 9 | Reviewed-by: chegar | ||
| 10 | |||
| 11 | diff -r eaefceb7f52e -r 8e6fa89397ca src/jdk.sctp/unix/native/libsctp/Sctp.h | ||
| 12 | --- a/src/jdk.sctp/unix/native/libsctp/Sctp.h Tue Feb 11 14:24:31 2020 +0530 | ||
| 13 | +++ b/src/jdk.sctp/unix/native/libsctp/Sctp.h Wed Feb 05 17:14:15 2020 +0800 | ||
| 14 | @@ -1,5 +1,5 @@ | ||
| 15 | /* | ||
| 16 | - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. | ||
| 17 | + * Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved. | ||
| 18 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||
| 19 | * | ||
| 20 | * This code is free software; you can redistribute it and/or modify it | ||
| 21 | @@ -322,12 +322,12 @@ | ||
| 22 | |||
| 23 | #endif /* __linux__ */ | ||
| 24 | |||
| 25 | -sctp_getladdrs_func* nio_sctp_getladdrs; | ||
| 26 | -sctp_freeladdrs_func* nio_sctp_freeladdrs; | ||
| 27 | -sctp_getpaddrs_func* nio_sctp_getpaddrs; | ||
| 28 | -sctp_freepaddrs_func* nio_sctp_freepaddrs; | ||
| 29 | -sctp_bindx_func* nio_sctp_bindx; | ||
| 30 | -sctp_peeloff_func* nio_sctp_peeloff; | ||
| 31 | +extern sctp_getladdrs_func* nio_sctp_getladdrs; | ||
| 32 | +extern sctp_freeladdrs_func* nio_sctp_freeladdrs; | ||
| 33 | +extern sctp_getpaddrs_func* nio_sctp_getpaddrs; | ||
| 34 | +extern sctp_freepaddrs_func* nio_sctp_freepaddrs; | ||
| 35 | +extern sctp_bindx_func* nio_sctp_bindx; | ||
| 36 | +extern sctp_peeloff_func* nio_sctp_peeloff; | ||
| 37 | |||
| 38 | jboolean loadSocketExtensionFuncs(JNIEnv* env); | ||
| 39 | |||
| 40 | diff -r eaefceb7f52e -r 8e6fa89397ca src/jdk.sctp/unix/native/libsctp/SctpNet.c | ||
| 41 | --- a/src/jdk.sctp/unix/native/libsctp/SctpNet.c Tue Feb 11 14:24:31 2020 +0530 | ||
| 42 | +++ b/src/jdk.sctp/unix/native/libsctp/SctpNet.c Wed Feb 05 17:14:15 2020 +0800 | ||
| 43 | @@ -1,5 +1,5 @@ | ||
| 44 | /* | ||
| 45 | - * Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved. | ||
| 46 | + * Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved. | ||
| 47 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||
| 48 | * | ||
| 49 | * This code is free software; you can redistribute it and/or modify it | ||
| 50 | @@ -43,6 +43,13 @@ | ||
| 51 | static const char* nativeSctpLib = "libsctp.so.1"; | ||
| 52 | static jboolean funcsLoaded = JNI_FALSE; | ||
| 53 | |||
| 54 | +sctp_getladdrs_func* nio_sctp_getladdrs; | ||
| 55 | +sctp_freeladdrs_func* nio_sctp_freeladdrs; | ||
| 56 | +sctp_getpaddrs_func* nio_sctp_getpaddrs; | ||
| 57 | +sctp_freepaddrs_func* nio_sctp_freepaddrs; | ||
| 58 | +sctp_bindx_func* nio_sctp_bindx; | ||
| 59 | +sctp_peeloff_func* nio_sctp_peeloff; | ||
| 60 | + | ||
| 61 | JNIEXPORT jint JNICALL DEF_JNI_OnLoad | ||
| 62 | (JavaVM *vm, void *reserved) { | ||
| 63 | return JNI_VERSION_1_2; | ||
| 64 | |||
diff --git a/recipes-core/openjdk/patches-openjdk-14/libj2gss_NativeFunc_multiple_definition_link_errors_with_GCC10.patch b/recipes-core/openjdk/patches-openjdk-14/libj2gss_NativeFunc_multiple_definition_link_errors_with_GCC10.patch new file mode 100644 index 0000000..66d480e --- /dev/null +++ b/recipes-core/openjdk/patches-openjdk-14/libj2gss_NativeFunc_multiple_definition_link_errors_with_GCC10.patch | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | |||
| 2 | # HG changeset patch | ||
| 3 | # User qpzhang | ||
| 4 | # Date 1580905869 -28800 | ||
| 5 | # Node ID 9e54ea7d9cd9566d28cfcd9269118a1995fc361c | ||
| 6 | # Parent 932418820c80a87b77d96ad5f5525d282f00e82e | ||
| 7 | 8238388: libj2gss/NativeFunc.o "multiple definition" link errors with GCC10 | ||
| 8 | Summary: Fixed libj2gss link errors caused by GCC10 default -fno-common | ||
| 9 | Reviewed-by: weijun | ||
| 10 | |||
| 11 | diff -r 932418820c80 -r 9e54ea7d9cd9 src/java.security.jgss/share/native/libj2gss/NativeFunc.c | ||
| 12 | --- a/src/java.security.jgss/share/native/libj2gss/NativeFunc.c Wed Feb 05 10:45:39 2020 +0100 | ||
| 13 | +++ b/src/java.security.jgss/share/native/libj2gss/NativeFunc.c Wed Feb 05 20:31:09 2020 +0800 | ||
| 14 | @@ -1,5 +1,5 @@ | ||
| 15 | /* | ||
| 16 | - * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. | ||
| 17 | + * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved. | ||
| 18 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||
| 19 | * | ||
| 20 | * This code is free software; you can redistribute it and/or modify it | ||
| 21 | @@ -27,6 +27,9 @@ | ||
| 22 | #include <stdlib.h> | ||
| 23 | #include "NativeFunc.h" | ||
| 24 | |||
| 25 | +/* global GSS function table */ | ||
| 26 | +GSS_FUNCTION_TABLE_PTR ftab; | ||
| 27 | + | ||
| 28 | /* standard GSS method names (ordering is from mapfile) */ | ||
| 29 | static const char RELEASE_NAME[] = "gss_release_name"; | ||
| 30 | static const char IMPORT_NAME[] = "gss_import_name"; | ||
| 31 | diff -r 932418820c80 -r 9e54ea7d9cd9 src/java.security.jgss/share/native/libj2gss/NativeFunc.h | ||
| 32 | --- a/src/java.security.jgss/share/native/libj2gss/NativeFunc.h Wed Feb 05 10:45:39 2020 +0100 | ||
| 33 | +++ b/src/java.security.jgss/share/native/libj2gss/NativeFunc.h Wed Feb 05 20:31:09 2020 +0800 | ||
| 34 | @@ -1,5 +1,5 @@ | ||
| 35 | /* | ||
| 36 | - * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved. | ||
| 37 | + * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved. | ||
| 38 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||
| 39 | * | ||
| 40 | * This code is free software; you can redistribute it and/or modify it | ||
| 41 | @@ -277,6 +277,6 @@ | ||
| 42 | typedef GSS_FUNCTION_TABLE *GSS_FUNCTION_TABLE_PTR; | ||
| 43 | |||
| 44 | /* global GSS function table */ | ||
| 45 | -GSS_FUNCTION_TABLE_PTR ftab; | ||
| 46 | +extern GSS_FUNCTION_TABLE_PTR ftab; | ||
| 47 | |||
| 48 | #endif | ||
| 49 | |||
diff --git a/recipes-core/openjdk/patches-openjdk-14/libjava_childproc_multiple_definition_link_errors_with_GCC10.patch b/recipes-core/openjdk/patches-openjdk-14/libjava_childproc_multiple_definition_link_errors_with_GCC10.patch new file mode 100644 index 0000000..a972bc6 --- /dev/null +++ b/recipes-core/openjdk/patches-openjdk-14/libjava_childproc_multiple_definition_link_errors_with_GCC10.patch | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | |||
| 2 | # HG changeset patch | ||
| 3 | # User qpzhang | ||
| 4 | # Date 1580822830 -28800 | ||
| 5 | # Node ID 6925fca959590dd0f747a9cffa5f0664ec02c7b1 | ||
| 6 | # Parent 8f6ffa575f63db3f07f96e52c97883fbaff459b4 | ||
| 7 | 8238380: java.base/unix/native/libjava/childproc.c "multiple definition" link errors with GCC10 | ||
| 8 | Reviewed-by: stuefe, clanger, rriggs | ||
| 9 | Contributed-by: patrick@os.amperecomputing.com | ||
| 10 | |||
| 11 | diff -r 8f6ffa575f63 -r 6925fca95959 src/java.base/unix/native/libjava/childproc.c | ||
| 12 | --- a/src/java.base/unix/native/libjava/childproc.c Tue Feb 11 11:17:37 2020 +0800 | ||
| 13 | +++ b/src/java.base/unix/native/libjava/childproc.c Tue Feb 04 21:27:10 2020 +0800 | ||
| 14 | @@ -1,5 +1,5 @@ | ||
| 15 | /* | ||
| 16 | - * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved. | ||
| 17 | + * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. | ||
| 18 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||
| 19 | * | ||
| 20 | * This code is free software; you can redistribute it and/or modify it | ||
| 21 | @@ -34,6 +34,7 @@ | ||
| 22 | |||
| 23 | #include "childproc.h" | ||
| 24 | |||
| 25 | +const char * const *parentPathv; | ||
| 26 | |||
| 27 | ssize_t | ||
| 28 | restartableWrite(int fd, const void *buf, size_t count) | ||
| 29 | diff -r 8f6ffa575f63 -r 6925fca95959 src/java.base/unix/native/libjava/childproc.h | ||
| 30 | --- a/src/java.base/unix/native/libjava/childproc.h Tue Feb 11 11:17:37 2020 +0800 | ||
| 31 | +++ b/src/java.base/unix/native/libjava/childproc.h Tue Feb 04 21:27:10 2020 +0800 | ||
| 32 | @@ -1,5 +1,5 @@ | ||
| 33 | /* | ||
| 34 | - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. | ||
| 35 | + * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. | ||
| 36 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||
| 37 | * | ||
| 38 | * This code is free software; you can redistribute it and/or modify it | ||
| 39 | @@ -126,7 +126,7 @@ | ||
| 40 | * The cached and split version of the JDK's effective PATH. | ||
| 41 | * (We don't support putenv("PATH=...") in native code) | ||
| 42 | */ | ||
| 43 | -const char * const *parentPathv; | ||
| 44 | +extern const char * const *parentPathv; | ||
| 45 | |||
| 46 | ssize_t restartableWrite(int fd, const void *buf, size_t count); | ||
| 47 | int restartableDup2(int fd_from, int fd_to); | ||
| 48 | |||
diff --git a/recipes-images/images/openjdk-14-test-image.bb b/recipes-images/images/openjdk-14-test-image.bb new file mode 100644 index 0000000..62be748 --- /dev/null +++ b/recipes-images/images/openjdk-14-test-image.bb | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | IMAGE_INSTALL_append = " openjdk-14 " | ||
| 2 | |||
| 3 | inherit openjdk-test-image | ||
diff --git a/recipes-images/images/openjre-14-test-image.bb b/recipes-images/images/openjre-14-test-image.bb new file mode 100644 index 0000000..e950fe3 --- /dev/null +++ b/recipes-images/images/openjre-14-test-image.bb | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | IMAGE_INSTALL_append = " openjre-14 " | ||
| 2 | |||
| 3 | inherit openjre-test-image | ||
