Skip to contentSkip to conversation

OpenJDK-8 fixes and updates

meta-java In review André Draszik 2 participants 15 messages Aug 13, 2018

lore
Share & tools
lore
#0 lore raw

Hi,

This series addresses a few OpenJDK-8 issues:

Highlights are:
* compilation on gcc < v7 host compilers was broken
* compilation on gcc v8 (cross) compilers produced non-working binaries
* update to the latest 8u172b11 release

This series was tested on:
* qemux86-64 (with & without security flags, host gcc 6.3.0, target gcc 8)
* qemuarm64 (with & without security flags, host gcc 4.8.4 & 6.3.0, target gcc 8)
* qemuarm64 (host gcc 7.3.0, target gcc 7.3.0)

Note that yocto's gcc 8 update completely broke qemuarm support, but I'll hopefully address this by importing the aarch32 openjdk port into this layer.

#1 lore raw

PATCH 1/9 gitignore: ignore new python byte-code files

From: André Draszik <[email protected]>

Since we run oeqa tests, we get python byte-code in the source tree here.

Ignore them to clean-up the git status

---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)
.gitignore +1 -0
index 51a512c..8e5c599 100644
@@ -1,4 +1,5 @@
 *.bak
 *.orig
+*.pyc
 *.rej
 *.swp
Signature · 1 line
2.18.0
#2 lore raw

PATCH 2/9 openjdk-8: speed-up do_install() (pack200)

In reply to André Draszik

From: André Draszik <[email protected]>

We run pack200 sequentially on all found archives, but there doesn't seem to be a reason to do so, the java_get_parallel_make() apperas to be related to compiling java itself, running multiple java applications (pack200) at the same time on the same machine should be possible, otherwise we have a big problem...

Just run up to BB_NUMBER_THREADS pack200 processes at the same time to speed up the build.

---
 recipes-core/openjdk/openjdk-8-cross.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
recipes-core/openjdk/openjdk-8-cross.inc +2 -2
index 03cab11..d0b2ec8 100644
@@ -77,13 +77,13 @@ do_install_append() {
     if ${@bb.utils.contains('PACKAGECONFIG', 'repack', 'true', 'false', d)} ; then
       if [ -d ${D}${JDK_HOME} ] ; then
         find ${D}${JDK_HOME} -name "*.jar" -print0 | \
-          xargs -0 -n1 -P ${@java_get_parallel_make(d)} sh -c ' \
+          xargs -0 -n1 -P ${BB_NUMBER_THREADS} sh -c ' \
               echo "Repacking" "$0" ; \
               pack200 --repack --effort=9 --segment-limit=-1 --modification-time=latest --strip-debug "$0"'
       fi
       if [ -d ${D}${JRE_HOME} ] ; then
         find ${D}${JRE_HOME} -name "*.jar" -print0 | \
-          xargs -0 -n1 -P ${@java_get_parallel_make(d)} sh -c ' \
+          xargs -0 -n1 -P ${BB_NUMBER_THREADS} sh -c ' \
               echo "Repacking" "$0" ; \
               pack200 --repack --effort=9 --segment-limit=-1 --modification-time=latest --strip-debug "$0"'
       fi
Signature · 1 line
2.18.0
#3 lore raw

PATCH 3/9 openjdk-8: remove superfluous compiler flag (-std=gnu++98)

In reply to André Draszik

From: André Draszik <[email protected]>

These days, OpenJDK-8 adds this to the build itself, no need to do it again here in the recipe.

---
 recipes-core/openjdk/openjdk-8-common.inc | 1 -
 1 file changed, 1 deletion(-)
recipes-core/openjdk/openjdk-8-common.inc +0 -1
index 0af320d..4e52448 100644
@@ -253,4 +253,3 @@ def version_specific_cflags(d):
 
 CFLAGS_append = " ${@version_specific_cflags(d)}"
 CXXFLAGS_append = " ${@version_specific_cflags(d)}"
-CXX_append = " -std=gnu++98"
Signature · 1 line
2.18.0
#4 lore raw

PATCH 4/9 openjdk-8: fix infrastructure for version host gcc != cross gcc (again)

In reply to André Draszik

From: André Draszik <[email protected]>

Building OpenJDK-8 (target) with an older host compiler (gcc < 6) does not work as the build errors with error messages regarding unrecognized gcc command line options.

As part of the (cross) build particularly, OpenJDK-8 builds a host tool (adlc) using the host gcc. We have a patch, openjdk8-fix-adlc-flags.patch, that tries to make the adlc build use the correct / intended compiler flags.

This doesn't work right now, as that build still sees compiler flags intended for / understood by the gcc version used for the actual cross compile only.

The reason is that while we have infrastructure in place to add compiler flags based on the compiler version, we add all of them unconditionally to CFLAGS / CXXFLAGS directly but above patch uses TARGET_CFLAGS / TARGET_CXXFLAGS to filter out unwanted BUILD_CFLAGS / BUILD_CXXFLAGS from CFLAGS / CXXFLAGS, In other words above patch cannot do what it intends to do and all compiler version specific flags (-fno-lifetime-dse & -fno-delete-null-pointer-checks) end up in CFLAGS / CXXFLAGS.

So far, this was only affecting people using host gcc < 6, but upcoming patches adding support for gcc >= 8 will add even more compiler flags that even gcc < 7 don't support - it's time to finally address this.

We fix the issue by adding the compiler version specific flags to BUILD_CFLAGS / BUILD_CXXFLAGS and TARGET_CFLAGS / TARGET_CXXFLAGS as necessary, so that above patch can work as intended.

We now support all necessary combinations:
* -native builds
* -target builds
* host tools built using the native compiler during the -target build

A similar but different patch existed here before as commit 6801f6d4e19c ("openjdk-8-common: Fix the issue of building failed adlc on host with gcc < 6") but was reverted subsequently due to reportedly still(?) having (new?) issues with older compilers. This patch here is different from the older patch in that it *doesn't* set the cflags during a python_anonymous() function, and thus it guarantees deterministic execution order.

This change here was tested to work using host gcc versions 4.8.4 and 6.3.0 and 7.3.0

---
 recipes-core/openjdk/openjdk-8-common.inc     | 55 +++++++++++--------
 .../openjdk/openjdk-8-release-16xbyy.inc      |  3 +-
 2 files changed, 33 insertions(+), 25 deletions(-)
recipes-core/openjdk/openjdk-8-common.inc +31 -24
index 4e52448..fb97e97 100644
@@ -224,32 +224,39 @@ FLAGS_GCC7 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
 # version is and only add the flags that are appropriate for that GCC
 # version.
 
-def version_specific_cflags(d):
-    import re
-
-    extraflags = None
-    version = None
+def get_cflags_by_cc_version(d, version):
+    if version.isdigit():
+        return d.getVar('FLAGS_GCC%d' % int(version)) or ''
+    return ''
 
-    if bb.data.inherits_class('native', d):
+def get_build_cflags(d):
+    def get_build_cc_version(build_cc):
         from subprocess import Popen, PIPE
-
-        cmd = d.expand('${CC} -dumpversion').split()
+        cmd = d.expand('%s -dumpversion' % build_cc).split()
         cc = Popen(cmd, stdout=PIPE, stderr=PIPE)
-        version = cc.communicate()[0].decode('utf-8')[0]
-    else:
-        # in the cross case, trust that GCCVERSION is correct. This won't
-        # work if the native toolchain is Clang, but as of this writing that
-        # doesn't work anyway.
-        version = d.getVar('GCCVERSION', expand=True)[0]
-        # skip non digit characters at the beginning, e.g. from "linaro-6.2%"
-        match = re.search("\d", version)
-        if match:
-            version = version[match.start():]
+        return cc.communicate()[0].decode('utf-8')[0]
 
-    if version.isdigit():
-        extraflags = d.getVar('FLAGS_GCC%d' % int(version), True) or ''
-        return extraflags
-    return ''
+    build_cc = d.getVar('BUILD_CC')
+    version = get_build_cc_version(build_cc)
+    return get_cflags_by_cc_version(d, version)
+
+def get_target_cflags(d):
+    import re
 
-CFLAGS_append = " ${@version_specific_cflags(d)}"
-CXXFLAGS_append = " ${@version_specific_cflags(d)}"
+    # in the cross case, trust that GCCVERSION is correct. This won't
+    # work if the native toolchain is Clang, but as of this writing that
+    # doesn't work anyway.
+    version = d.getVar('GCCVERSION')[0]
+    # skip non digit characters at the beginning, e.g. from "linaro-6.2%"
+    match = re.search("\d", version)
+    if match:
+        version = version[match.start():]
+    return get_cflags_by_cc_version(d, version)
+
+
+# flags for -native, and for bits that need a host-tool during -cross
+BUILD_CFLAGS_append = " ${@get_build_cflags(d)}"
+BUILD_CXXFLAGS_append = " ${@get_build_cflags(d)}"
+# flags for -cross
+TARGET_CFLAGS_append = " ${@get_target_cflags(d)}"
+TARGET_CXXFLAGS_append = " ${@get_target_cflags(d)}"
recipes-core/openjdk/openjdk-8-release-16xbyy.inc +2 -1
index fd95e95..36ce073 100644
@@ -54,7 +54,8 @@ ARM_INSTRUCTION_SET_armv4t = "ARM"
 
 # readdir_r was deprecated in glibc-2.24. Ignore the error for now
 # NOTE: When updating the recipe, please check if this is still needed
-CFLAGS_append = " -Wno-error=deprecated-declarations"
+BUILD_CFLAGS_append = " -Wno-error=deprecated-declarations"
+TARGET_CFLAGS_append = " -Wno-error=deprecated-declarations"
 
 # Enable zero mode for arm based builds, as normal hotspot fails to build
 PACKAGECONFIG_append_arm = " zero"
Signature · 1 line
2.18.0
#5 lore raw

Re: [meta-java][PATCH 4/9] openjdk-8: fix infrastructure for version host gcc != cross gcc (again)

Quoted 40 lines · André Draszik

...

recipes-core/openjdk/openjdk-8-common.inc +8 -18
index 4e52448..fb97e97 100644
@@ -224,32 +224,39 @@ FLAGS_GCC7 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
 # version is and only add the flags that are appropriate for that GCC
 # version.
 
-def version_specific_cflags(d):
-    import re
-
-    extraflags = None
-    version = None
+def get_cflags_by_cc_version(d, version):
+    if version.isdigit():
+        return d.getVar('FLAGS_GCC%d' % int(version)) or ''
+    return ''
 
-    if bb.data.inherits_class('native', d):
+def get_build_cflags(d):
+    def get_build_cc_version(build_cc):
         from subprocess import Popen, PIPE
-
-        cmd = d.expand('${CC} -dumpversion').split()
+        cmd = d.expand('%s -dumpversion' % build_cc).split()
         cc = Popen(cmd, stdout=PIPE, stderr=PIPE)
-        version = cc.communicate()[0].decode('utf-8')[0]
-    else:
-        # in the cross case, trust that GCCVERSION is correct. This won't
-        # work if the native toolchain is Clang, but as of this writing that
-        # doesn't work anyway.
-        version = d.getVar('GCCVERSION', expand=True)[0]
-        # skip non digit characters at the beginning, e.g. from "linaro-6.2%"
-        match = re.search("\d", version)
-        if match:
-            version = version[match.start():]
+        return cc.communicate()[0].decode('utf-8')[0]
 

recipes-core/openjdk/openjdk-8-common.inc FLAGS_GCC7 = "-fno-lifetime-dse -fno-delete-null-pointer-checks" · line 244

Quoted 10 lines
recipes-core/openjdk/openjdk-8-common.inc +6 -4
-    if version.isdigit():
-        extraflags = d.getVar('FLAGS_GCC%d' % int(version), True) or ''
-        return extraflags
-    return ''
+    build_cc = d.getVar('BUILD_CC')
+    version = get_build_cc_version(build_cc)
+    return get_cflags_by_cc_version(d, version)
+
+def get_target_cflags(d):
+    import re

First: Thank you for this patch and the reorganization of those functions!

As we will need those functions also for openjdk-7 it would be great if they are accessible from there too.

The solution which came to my mind first would be to move the content from openjdk-common.inc to openjdk-7-common.inc (as it's the only file requiring" it).

Then place those functions inside openjdk-common.inc and require it from openjdk-7-common.inc and openjdk-8-common.inc.

What do you think about it? Any comments or other ideas?

(fyi: no need to change this patch! I just thought it would be a good point for starting a discussion about it)

Quoted 1 line

...

regards;Richard.L

#6 lore raw

PATCH 5/9 openjdk-8: gcc-8 fix #1: backport patch to fix misuses of strncpy/strncat

In reply to André Draszik

From: André Draszik <[email protected]>

The original approach doesn't work with all compilers, as not all compilers support the flag used to suppress the warnings / errors.

This patch here avoids passing unsupported compiler options into older compilers, and at the same time fixes the bugs, rather than just silencing the compiler.

---
 .../openjdk/openjdk-8-release-16xbyy.inc      |   1 +
 ...-patch-to-fix-misuses-of-strncpy-str.patch | 181 ++++++++++++++++++
 2 files changed, 182 insertions(+)
 create mode 100644 recipes-core/openjdk/patches-openjdk-8/0011-hotspot-backport-patch-to-fix-misuses-of-strncpy-str.patch
recipes-core/openjdk/openjdk-8-release-16xbyy.inc +1 -0
index 36ce073..bd440c6 100644
@@ -17,6 +17,7 @@ PATCHES_URI = "\
     file://0009-jdk-disable-backtrace-musl-build-fix.patch \
     file://0010-build-fix-build-on-as-needed-toolchains-generic.patch \
     file://hotspot_fix_gcc8x_build.patch \
+    file://0011-hotspot-backport-patch-to-fix-misuses-of-strncpy-str.patch \
 "
 # some patches extracted from http://cr.openjdk.java.net/~rkennke/shark-build-hotspot/webrev.01/hotspot.patch
 # reported via http://mail.openjdk.java.net/pipermail/build-dev/2015-January/013972.html
recipes-core/openjdk/patches-openjdk-8/0011-hotspot-backport-patch-to-fix-misuses-of-strncpy-str.patch new file +181 -0

181 lines not on this page · raw message

Signature · 1 line
2.18.0
#7 lore raw

PATCH 6/9 openjdk-8: gcc-8 fix #2: silence build warnings/errors (return-type)

In reply to André Draszik

From: André Draszik <[email protected]>

Similar to the patch just reverted, we wilence the build warnings regarding return type of functions, but we only do this for gcc versions where it matters, now that our infrastructure for doing so works again:

    | <<PKGBUILDDIR>>/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp:223:32: error: control reaches end of non-void function [-Werror=return-type]
    |  #define BREAKPOINT ::breakpoint()
    |                     ~~~~~~~~~~~~^~
    | <<PKGBUILDDIR>>/hotspot/src/share/vm/utilities/debug.hpp:192:3: note: in expansion of macro 'BREAKPOINT'
    |    BREAKPOINT;                                                                \
    |    ^~~~~~~~~~
    | <<PKGBUILDDIR>>/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp:197:2: note: in expansion of macro 'ShouldNotReachHere'
    |   ShouldNotReachHere();
    |   ^~~~~~~~~~~~~~~~~~

etc.

---
 recipes-core/openjdk/openjdk-8-common.inc | 1 +
 1 file changed, 1 insertion(+)
recipes-core/openjdk/openjdk-8-common.inc +1 -0
index fb97e97..77d905d 100644
@@ -216,6 +216,7 @@ EXTRA_OECONF_append = "\
 # of these changes.
 FLAGS_GCC6 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
 FLAGS_GCC7 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
+FLAGS_GCC8 = "-Wno-error=return-type"
 
 # All supported cross compilers support the compiler flags that were
 # added to make compilation with gcc6 work. But the host compiler for
Signature · 1 line
2.18.0
#8 lore raw

Re: [meta-java][PATCH 6/9] openjdk-8: gcc-8 fix #2: silence build warnings/errors (return-type)

Hi André,
just some nitpicking:

Quoted 5 lines · André Draszik

From: André Draszik <[email protected]>

Similar to the patch just reverted, we wilence the build warnings regarding return type of functions, but we only do this for gcc versions where it matters, now that our infrastructure for doing so works again:

I guess with "the patch just reverted" you refer to the [PATCH 7/9] which will be applied afterwards.

Is it OK for you if I apply Patch #7 before Patch #6 so the commit message works out?

Furthermore I'll change "wilence" to "silence" if it's OK for you? ;-)

Quoted 23 lines
    | <<PKGBUILDDIR>>/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp:223:32: error: control reaches end of non-void function [-Werror=return-type]
    |  #define BREAKPOINT ::breakpoint()
    |                     ~~~~~~~~~~~~^~
    | <<PKGBUILDDIR>>/hotspot/src/share/vm/utilities/debug.hpp:192:3: note: in expansion of macro 'BREAKPOINT'
    |    BREAKPOINT;                                                                \
    |    ^~~~~~~~~~
    | <<PKGBUILDDIR>>/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp:197:2: note: in expansion of macro 'ShouldNotReachHere'
    |   ShouldNotReachHere();
    |   ^~~~~~~~~~~~~~~~~~

etc.

---
 recipes-core/openjdk/openjdk-8-common.inc | 1 +
 1 file changed, 1 insertion(+)
recipes-core/openjdk/openjdk-8-common.inc +0 -0
index fb97e97..77d905d 100644

recipes-core/openjdk/openjdk-8-common.inc EXTRA_OECONF_append = "\ · line 222

Quoted 7 lines
recipes-core/openjdk/openjdk-8-common.inc +1 -0
@@ -216,6 +216,7 @@ EXTRA_OECONF_append = "\
 # of these changes.
 FLAGS_GCC6 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
 FLAGS_GCC7 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
+FLAGS_GCC8 = "-Wno-error=return-type"
 
 # All supported cross compilers support the compiler flags that were
 # added to make compilation with gcc6 work. But the host compiler for

regards;Richard.L

#9 lore raw

Re: [meta-java][PATCH 6/9] openjdk-8: gcc-8 fix #2: silence build warnings/errors (return-type)

Quoted 10 lines · Richard Leitner

Hi André,
just some nitpicking:

Quoted 5 lines · André Draszik

From: André Draszik <[email protected]>

Similar to the patch just reverted, we wilence the build warnings regarding return type of functions, but we only do this for gcc versions where it matters, now that our infrastructure for doing so works again:

Quoted 5 lines

I guess with "the patch just reverted" you refer to the [PATCH 7/9] which will be applied afterwards.

Is it OK for you if I apply Patch #7 before Patch #6 so the commit message works out?

You're right. I had them in a different order when I wrote the commit message, but then decided to fix the bugs first and remove the work-around afterwards.

Up to you :-)

Quoted 1 line

Furthermore I'll change "wilence" to "silence" if it's OK for you? ;-)

Sure :-)

A.

Quoted 41 lines
Quoted 32 lines

    |
<<PKGBUILDDIR>>/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp
:223:32: error: control reaches end of non-void function [-
Werror=return-type]
    |  #define BREAKPOINT ::breakpoint()
    |                     ~~~~~~~~~~~~^~
    | <<PKGBUILDDIR>>/hotspot/src/share/vm/utilities/debug.hpp:192:3:
note: in expansion of macro 'BREAKPOINT'
    |    BREAKPOINT;                                                    
            \
    |    ^~~~~~~~~~
    |
<<PKGBUILDDIR>>/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp:1
97:2: note: in expansion of macro 'ShouldNotReachHere'
    |   ShouldNotReachHere();
    |   ^~~~~~~~~~~~~~~~~~

etc.

---
 recipes-core/openjdk/openjdk-8-common.inc | 1 +
 1 file changed, 1 insertion(+)
recipes- renamed from recipes-core/openjdk/openjdk-8-common.inc +0 -0

core/openjdk/openjdk-8-common.inc
index fb97e97..77d905d 100644

recipes-core/openjdk/openjdk-8-common.inc EXTRA_OECONF_append = "\ · line 222

Quoted 7 lines
recipes-core/openjdk/openjdk-8-common.inc +1 -0
@@ -216,6 +216,7 @@ EXTRA_OECONF_append = "\
 # of these changes.
 FLAGS_GCC6 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
 FLAGS_GCC7 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
+FLAGS_GCC8 = "-Wno-error=return-type"
 
 # All supported cross compilers support the compiler flags that were
 # added to make compilation with gcc6 work. But the host compiler for

regards;Richard.L

#10 lore raw

PATCH 7/9 Revert "openjdk-8: fix build for gcc8.x"

In reply to André Draszik

From: André Draszik <[email protected]>

This reverts commit 52fb41cec7d5125bb11c718705158696ffef11f8.

The change being reverted has two problems:
- it still doesn't produce working binaries
- compilation on pre-gcc v7 compilers fails (which is relevant for compiling openjdk-8-native, as that uses the build machine's gcc, not yocto's gcc):

  | At global scope:
  | cc1plus: error: unrecognized command line option ‘-Wno-stringop-overflow’ [-Werror]
  | cc1plus: all warnings being treated as errors

We now use a different approach to address the issues than that patch, and it is thusly not needed anymore.

We fully support gcc < 7 again.

---
 .../openjdk/openjdk-8-release-16xbyy.inc      |  1 -
 .../hotspot_fix_gcc8x_build.patch             | 21 -------------------
 2 files changed, 22 deletions(-)
 delete mode 100644 recipes-core/openjdk/patches-openjdk-8/hotspot_fix_gcc8x_build.patch
recipes-core/openjdk/openjdk-8-release-16xbyy.inc +0 -1
index bd440c6..8b30c37 100644
@@ -16,7 +16,6 @@ PATCHES_URI = "\
     file://0008-jdk-use-correct-include-for-signal.patch \
     file://0009-jdk-disable-backtrace-musl-build-fix.patch \
     file://0010-build-fix-build-on-as-needed-toolchains-generic.patch \
-    file://hotspot_fix_gcc8x_build.patch \
     file://0011-hotspot-backport-patch-to-fix-misuses-of-strncpy-str.patch \
 "
 # some patches extracted from http://cr.openjdk.java.net/~rkennke/shark-build-hotspot/webrev.01/hotspot.patch
recipes-core/openjdk/patches-openjdk-8/hotspot_fix_gcc8x_build.patch deleted +0 -21
deleted file mode 100644
index 1a406f2..0000000
@@ -1,21 +0,0 @@
-From: Richard Leitner <[email protected]>
-Date: Thu, 14 Jun 2018 23:42:11 +0200
-Subject: [PATCH] openjdk-8: hotspot: fix gcc8 compilation
-
-As oe-core/yocto-project master migrated to gcc8.x we need to support this.
-Therefore disable following gcc warnings/errors which caused the build to fail:
-  + stringop-overflow
-  + return-type
----
-
---- a/hotspot/make/linux/makefiles/gcc.make
-+++ b/hotspot/make/linux/makefiles/gcc.make
-@@ -197,7 +197,7 @@
- endif
- 
- # Compiler warnings are treated as errors
--WARNINGS_ARE_ERRORS = -Werror
-+WARNINGS_ARE_ERRORS = -Werror -Wno-stringop-overflow -Wno-error=return-type
- 
- ifeq ($(USE_CLANG), true)
-   # However we need to clean the code up before we can unrestrictedly enable this option with Clang
Signature · 1 line
2.18.0
#11 lore raw

PATCH 8/9 openjdk-8: gcc-8 fix #3: working binaries

In reply to André Draszik

From: André Draszik <[email protected]>

Similar to the existing gcc-6 and gcc-7 support, we need to add the same specific compiler flags to avoid miscompilation on gcc-8:
-fno-lifetime-dse -fno-delete-null-pointer-checks

With this,
bitbake -c testimage openjdk-8-test-image
works again for x86_64 and aarch64:
RESULTS:
RESULTS - ping.PingTest.test_ping - Testcase 964: PASSED (0.12s) RESULTS - ssh.SSHTest.test_ssh - Testcase 224: PASSED (1.20s) RESULTS - java.JavaTest.test_java_exists - Testcase -1: PASSED (0.15s) RESULTS - java.JavaTest.test_java_jar_comp_mode - Testcase -1: PASSED (41.98s) RESULTS - java.JavaTest.test_java_jar_int_mode - Testcase -1: PASSED (1.76s) RESULTS - java.JavaTest.test_java_jar_works - Testcase -1: PASSED (2.13s) RESULTS - java.JavaTest.test_java_version - Testcase -1: PASSED (1.51s) RESULTS - javac.JavacTest.test_javac_exists - Testcase -1: PASSED (0.11s) RESULTS - javac.JavacTest.test_javac_works - Testcase -1: PASSED (17.64s) SUMMARY:
openjdk-8-test-image () - Ran 9 tests in 67.112s openjdk-8-test-image - OK - All required tests passed

NOTE: armv5e still doesn't work with gcc v8, and other arches weren't tested.

---
 recipes-core/openjdk/openjdk-8-common.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-core/openjdk/openjdk-8-common.inc +1 -1
index 77d905d..aaa4483 100644
@@ -216,7 +216,7 @@ EXTRA_OECONF_append = "\
 # of these changes.
 FLAGS_GCC6 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
 FLAGS_GCC7 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
-FLAGS_GCC8 = "-Wno-error=return-type"
+FLAGS_GCC8 = "-fno-lifetime-dse -fno-delete-null-pointer-checks -Wno-error=return-type"
 
 # All supported cross compilers support the compiler flags that were
 # added to make compilation with gcc6 work. But the host compiler for
Signature · 1 line
2.18.0
#12 lore raw

PATCH 9/9 openjdk-8: update to 8u172b11

In reply to André Draszik

From: André Draszik <[email protected]>

---
v3:
* rebased

v2:
* file checksums for aarch64 updated because archives were regenerated server-side

---
 ...e_162b12.bb => openjdk-8-native_172b11.bb} |  0
 .../openjdk/openjdk-8-release-161b15.inc      | 33 -------------
 .../openjdk/openjdk-8-release-162b12.inc      | 49 -------------------
 .../openjdk-8-release-172b11-aarch64.inc      | 33 +++++++++++++
 ...nc => openjdk-8-release-172b11-common.inc} |  0
 .../openjdk/openjdk-8-release-172b11.inc      | 36 ++++++++++++++
 ...penjdk-8_16xbyy.bb => openjdk-8_172b11.bb} |  7 ++-
 ...penjre-8_16xbyy.bb => openjre-8_172b11.bb} |  7 ++-
 8 files changed, 75 insertions(+), 90 deletions(-)
 rename recipes-core/openjdk/{openjdk-8-native_162b12.bb => openjdk-8-native_172b11.bb} (100%)
 delete mode 100644 recipes-core/openjdk/openjdk-8-release-161b15.inc
 delete mode 100644 recipes-core/openjdk/openjdk-8-release-162b12.inc
 create mode 100644 recipes-core/openjdk/openjdk-8-release-172b11-aarch64.inc
 rename recipes-core/openjdk/{openjdk-8-release-16xbyy.inc => openjdk-8-release-172b11-common.inc} (100%)
 create mode 100644 recipes-core/openjdk/openjdk-8-release-172b11.inc
 rename recipes-core/openjdk/{openjdk-8_16xbyy.bb => openjdk-8_172b11.bb} (92%)
 rename recipes-core/openjdk/{openjre-8_16xbyy.bb => openjre-8_172b11.bb} (91%)
recipes-core/openjdk/openjdk-8-native_172b11.bb renamed from recipes-core/openjdk/openjdk-8-native_162b12.bb +0 -0
similarity index 100%
rename from recipes-core/openjdk/openjdk-8-native_162b12.bb
rename to recipes-core/openjdk/openjdk-8-native_172b11.bb
recipes-core/openjdk/openjdk-8-release-161b15.inc deleted +0 -33
deleted file mode 100644
index 0a4434c..0000000
@@ -1,33 +0,0 @@
-require openjdk-8-release-16xbyy.inc
-
-CORBA_CHANGESET_aarch64 = "f73da600c483"
-SRC_URI[corba.md5sum] = "bf884b82fcc6de466946fcb87d24ebf3"
-SRC_URI[corba.sha256sum] = "ebf73d96185fc05e502088ae89a8d6494c3971dd220458deeff3876f72396b6c"
-
-HOTSPOT_CHANGESET_aarch64 = "a600839824fa"
-SRC_URI[hotspot.md5sum] = "20c88ba26f8f45a2769f4edf32afd593"
-SRC_URI[hotspot.sha256sum] = "6d0d1b9c2df3392ad6e21ca3eae39d06b50632a4a419da3d4363248943ea8b97"
-
-JAXP_CHANGESET_aarch64 = "b1e2af899046"
-SRC_URI[jaxp.md5sum] = "219582b26d7de2973b75f4329b53ec7d"
-SRC_URI[jaxp.sha256sum] = "907cc4dfb01a3a2a6d74dfa90fa6fcb5b3df55600f41ba44dcdc94b47e85a382"
-
-JAXWS_CHANGESET_aarch64 = "0002ed323fe5"
-SRC_URI[jaxws.md5sum] = "44935b81e3405fcaef675d5d08c2149e"
-SRC_URI[jaxws.sha256sum] = "0d1d52f1cf254a643ece1bd6cd8628fae1a4d56e8b59388cc9ad73b3caf151a1"
-
-JDK_CHANGESET_aarch64 = "c2ba2ed87d18"
-SRC_URI[jdk.md5sum] = "f4c0393a157dcb8b90ee7c7d80cbdfbf"
-SRC_URI[jdk.sha256sum] = "c84a17451b47242f9d96bf431011607afc3776f285a6ad9a60190fba2d434c49"
-
-LANGTOOLS_CHANGESET_aarch64 = "cdb217c578cb"
-SRC_URI[langtools.md5sum] = "608cf07781259d916d1663d6a5ced26d"
-SRC_URI[langtools.sha256sum] = "ad28e75bfaba1b64fdd02ea316db3ba3cba68007f90c5fa2be2418ce8bc0074d"
-
-NASHORN_CHANGESET_aarch64 = "505d0eb2fafe"
-SRC_URI[nashorn.md5sum] = "be981a6c55f9e602ff129fed65505a8c"
-SRC_URI[nashorn.sha256sum] = "14419ccd773e1db83b600d05aca3cbac9f24be77abda9a132d12305d8821d6d7"
-
-OPENJDK_CHANGESET_aarch64 = "917454da25c1"
-SRC_URI[openjdk.md5sum] = "1e4b3eca032742b7448731f9b8fcb426"
-SRC_URI[openjdk.sha256sum] = "1e17e2d8384a7b808a89b982e7c09c4feb8598b7a66b93697bfb8759c1005974"
recipes-core/openjdk/openjdk-8-release-162b12.inc deleted +0 -49

49 lines not on this page · raw message

recipes-core/openjdk/openjdk-8-release-172b11-aarch64.inc new file +33 -0
new file mode 100644
index 0000000..dddae6a
@@ -0,0 +1,33 @@
+require openjdk-8-release-172b11-common.inc
+
+CORBA_CHANGESET_aarch64 = "3a04a7c080af"
+SRC_URI[corba.md5sum] = "758b29d6cf714fd894df8674afd78e17"
+SRC_URI[corba.sha256sum] = "564113dbeadc57ac5831ccc056e0b920adbd3b74558cf750aa899f5de25ceb5e"
+
+HOTSPOT_CHANGESET_aarch64 = "1ced2ae00e35"
+SRC_URI[hotspot.md5sum] = "1db8a0e5e63352f1743e9d41ab6ed5cf"
+SRC_URI[hotspot.sha256sum] = "6993c3138035a7c0d2782b1ca7aabdb43452b1abbcc60448042f5c9207b03ab5"
+
+JAXP_CHANGESET_aarch64 = "ab8087f496fe"
+SRC_URI[jaxp.md5sum] = "0e7d8755af72aaf9ec7521514d8bb541"
+SRC_URI[jaxp.sha256sum] = "6e70c1535d738dc2c4e3a2fb9e6e11c660172b6d2ce905ec33e8924f8c208978"
+
+JAXWS_CHANGESET_aarch64 = "1e71aeefeecf"
+SRC_URI[jaxws.md5sum] = "16ff9ba1007aee21ad3df472b1f5c55e"
+SRC_URI[jaxws.sha256sum] = "b6ccb2855c2e9cd5778b193b5ad47f2e13496cbbbad74497c70216cd04b4c7dc"
+
+JDK_CHANGESET_aarch64 = "e8e6553e7ca9"
+SRC_URI[jdk.md5sum] = "52b35732c17e9048e506b7b46c1282f8"
+SRC_URI[jdk.sha256sum] = "ffaa79dad3b126af77ac9c230c54805b224c5d6517830a37c7272678407c99da"
+
+LANGTOOLS_CHANGESET_aarch64 = "14d381cbe563"
+SRC_URI[langtools.md5sum] = "d14425cc0334ed46ce695c9930bff6d5"
+SRC_URI[langtools.sha256sum] = "a4334c8859fe48bf2eae3b076785ff2e36a5ae80cf5840aef32731c3099a2274"
+
+NASHORN_CHANGESET_aarch64 = "c667b467b394"
+SRC_URI[nashorn.md5sum] = "0389c953bdd14c804d873d95ff4b3033"
+SRC_URI[nashorn.sha256sum] = "7cd87e641f0781481635593c144c8030f20d97cfc048ca57bd56381bab8e7d92"
+
+OPENJDK_CHANGESET_aarch64 = "74564d40b0d6"
+SRC_URI[openjdk.md5sum] = "13f7f15386f7aa0cc3383e9d1e98d2f1"
+SRC_URI[openjdk.sha256sum] = "a6425e11700edcdc0761df9da75b28b48adc664f3d8259c49ced1c85af3dc502"
recipes-core/openjdk/openjdk-8-release-172b11-common.inc renamed from recipes-core/openjdk/openjdk-8-release-16xbyy.inc +0 -0
similarity index 100%
rename from recipes-core/openjdk/openjdk-8-release-16xbyy.inc
rename to recipes-core/openjdk/openjdk-8-release-172b11-common.inc
recipes-core/openjdk/openjdk-8-release-172b11.inc new file +36 -0
new file mode 100644
index 0000000..fdf7b39
@@ -0,0 +1,36 @@
+require openjdk-8-release-172b11-common.inc
+
+# We do not yet work for aarch64.
+COMPATIBLE_HOST = "^(?!aarch64).*"
+
+CORBA_CHANGESET = "875a75c440cd"
+SRC_URI[corba.md5sum] = "66242dd6e749f39a5ef6add34f5ecb2f"
+SRC_URI[corba.sha256sum] = "f1618be7ad88619c7d7c1eed9800c528d0646e1c9f039e20a57b3e72ae3d3512"
+
+HOTSPOT_CHANGESET = "32ba4d2121c1"
+SRC_URI[hotspot.md5sum] = "a3e1d2f91ba8873f71e9a72043e2644a"
+SRC_URI[hotspot.sha256sum] = "680b1f5100786910bfceeef90ce28d74fcf6eacfdd3b92dfc76dcf3216060e99"
+
+JAXP_CHANGESET = "30586bb50743"
+SRC_URI[jaxp.md5sum] = "b413b1cb709d74e513f13c586215366d"
+SRC_URI[jaxp.sha256sum] = "ba36dd8ad72ff3d8bda38b7d6773037e18c3c68ebadd61f1e1f7fc167a506baa"
+
+JAXWS_CHANGESET = "452a6a5a878e"
+SRC_URI[jaxws.md5sum] = "5c3c4d1fec19398128cf818aef5486a9"
+SRC_URI[jaxws.sha256sum] = "89aa34e6bc3410a85ea697aa4ae70c21f7099efdacef78a6e5a46747421e86f9"
+
+JDK_CHANGESET = "5ccc572f4ffe"
+SRC_URI[jdk.md5sum] = "29dd4772e3862193e56007a0bb0d6886"
+SRC_URI[jdk.sha256sum] = "4d1758ceec155fcd2cd786f11071ed614947a9720373d704221d78ed98beadec"
+
+LANGTOOLS_CHANGESET = "34ee52bc68a4"
+SRC_URI[langtools.md5sum] = "b195802f2aaa5c95c06cc50021bb42a6"
+SRC_URI[langtools.sha256sum] = "0403bd2c9a45e4c0dc2148907028e0cdfd087be512e6d6b3763a01411936663a"
+
+NASHORN_CHANGESET = "7efd6152328e"
+SRC_URI[nashorn.md5sum] = "3aa4b31fdbf330baf28194e21697b8d6"
+SRC_URI[nashorn.sha256sum] = "8b5cbd29e9dbace477a57d7c07a127312dd3cf6b8e648b0b64026616d12c6862"
+
+OPENJDK_CHANGESET = "33d274a7dda0"
+SRC_URI[openjdk.md5sum] = "105f62e8f22a68b8c4151c68a447f76e"
+SRC_URI[openjdk.sha256sum] = "bf49215fe1e43e6f110470c911fce32722c843e03efb68e40cc7a832eb80faea"
recipes-core/openjdk/openjdk-8_172b11.bb renamed from recipes-core/openjdk/openjdk-8_16xbyy.bb +3 -4
similarity index 92%
rename from recipes-core/openjdk/openjdk-8_16xbyy.bb
rename to recipes-core/openjdk/openjdk-8_172b11.bb
index 522d6b5..9c2a7a1 100644
@@ -1,7 +1,6 @@
-PV = "162b12"
-PV_aarch64 = "161b15"
-
-require openjdk-8-release-${PV}.inc
+INC_FILE_SUFFIX = ""
+INC_FILE_SUFFIX_aarch64 = "-aarch64"
+require openjdk-8-release-${PV}${INC_FILE_SUFFIX}.inc
 require openjdk-8-cross.inc
 
 do_install() {
recipes-core/openjdk/openjre-8_172b11.bb renamed from recipes-core/openjdk/openjre-8_16xbyy.bb +3 -4
similarity index 91%
rename from recipes-core/openjdk/openjre-8_16xbyy.bb
rename to recipes-core/openjdk/openjre-8_172b11.bb
index e6454ea..220dc01 100644
@@ -1,7 +1,6 @@
-PV = "162b12"
-PV_aarch64 = "161b15"
-
-require openjdk-8-release-${PV}.inc
+INC_FILE_SUFFIX = ""
+INC_FILE_SUFFIX_aarch64 = "-aarch64"
+require openjdk-8-release-${PV}${INC_FILE_SUFFIX}.inc
 require openjdk-8-cross.inc
 
 do_install() {
Signature · 1 line
2.18.0
#13 lore raw
In reply to André Draszik

Hi Andre,
thank you very much for this series and the work you've put in it!

I'll take a look at it ASAP.

regards;Richard.L

Quoted 18 lines · André Draszik

Hi,

This series addresses a few OpenJDK-8 issues:

Highlights are:
* compilation on gcc < v7 host compilers was broken
* compilation on gcc v8 (cross) compilers produced non-working binaries
* update to the latest 8u172b11 release

This series was tested on:
* qemux86-64 (with & without security flags, host gcc 6.3.0, target gcc 8)
* qemuarm64 (with & without security flags, host gcc 4.8.4 & 6.3.0, target gcc 8)
* qemuarm64 (host gcc 7.3.0, target gcc 7.3.0)

Note that yocto's gcc 8 update completely broke qemuarm support, but I'll hopefully address this by importing the aarch32 openjdk port into this layer.

#14 lore raw
In reply to André Draszik

Hi,
this is a note to let you know that I've just added this patch series to the master-next branch of the meta-java repository at
git://git.yoctoproject.org/meta-java

As soon as it has gone through some more testing it will likely be merged to the master branch.

If you have any questions, please let me know.

regards;Richard.L

Quoted 18 lines · André Draszik

Hi,

This series addresses a few OpenJDK-8 issues:

Highlights are:
* compilation on gcc < v7 host compilers was broken
* compilation on gcc v8 (cross) compilers produced non-working binaries
* update to the latest 8u172b11 release

This series was tested on:
* qemux86-64 (with & without security flags, host gcc 6.3.0, target gcc 8)
* qemuarm64 (with & without security flags, host gcc 4.8.4 & 6.3.0, target gcc 8)
* qemuarm64 (host gcc 7.3.0, target gcc 7.3.0)

Note that yocto's gcc 8 update completely broke qemuarm support, but I'll hopefully address this by importing the aarch32 openjdk port into this layer.