openjdk-8 updates
cover openjdk-8 updates
Hi,
OpenJDK8 in yocto is a bit outdated, so these patches
- update openjdk-8 from the 1.5 year old version 102b14 to the current 162b12
- modernize the recipe using bitbake variable overrides
- enable building with 'security' flags enabled
- fix the aarch64 build (by using the aarch64 port, which is still separate in the OpenJDK8 series)
- fix the musl build (by adding appropriate patches)
This was runtime-tested on x86-64 with both glibc and musl against the 'poky' DISTRO, and compile-tested on aarch64 against glibc and musl.
Cheers,
Andre'
PATCH 1/14 openjdk-8: clarify a bitbake warning
From: André Draszik <[email protected]>
We get a bitbake warning during recipe building complaining about unsupported architectures unconditionally. That check is relevant only for shark builds, so it is quite confusing for non-shark builds.
Make the warning conditional on whether shark builds are enabled or not.
--- recipes-core/openjdk/openjdk-8-common.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
recipes-core/openjdk/openjdk-8-common.inc +2 -1
@@ -181,7 +181,8 @@ def get_llvm_configure_arch(d): elif arch == "powerpc" or arch == "powerpc64": arch = "powerpc" else: - bb.warn("%s does not support %s yet" % (d.getVar('PN', True), arch) ); + if 'shark' in d.getVar('PACKAGECONFIG').split(): + bb.warn("%s does not support %s in Shark builds yet" % (d.getVar('PN', True), arch) ); return arch
Signature · 1 line
2.16.2
PATCH 2/14 openjdk-8: doesn't compile on aarch64
In reply to André DraszikFrom: André Draszik <[email protected]>
OpenJDK's build system just doesn't support it (it somehow picks compiler flags for am64 builds, which are invalid for aarch64).
--- recipes-core/openjdk/openjdk-8-common.inc | 2 ++ 1 file changed, 2 insertions(+)
recipes-core/openjdk/openjdk-8-common.inc +2 -0
@@ -207,6 +207,8 @@ def get_jdk_arch(d): return jdk_arch JDK_ARCH = "${@get_jdk_arch(d)}" +# We do not yet work for aarch64. +COMPATIBLE_HOST = "^(?!aarch64).*" export DEBUG_BINARIES = "true"
Signature · 1 line
2.16.2
PATCH 3/14 openjdk-8: Upgrade to u162b12
In reply to André DraszikFrom: André Draszik <[email protected]>
- openjdk8-fix-zero-mode-crash.patch was a backport -> dropped
- remaining patches -> refreshed
- license checksum change due to address change in license file (see patch)
---
recipes-core/openjdk/openjdk-8-common.inc | 2 +-
recipes-core/openjdk/openjdk-8-cross.inc | 1 -
recipes-core/openjdk/openjdk-8-native_102b14.bb | 2 -
recipes-core/openjdk/openjdk-8-native_162b12.bb | 2 +
...ase-102b14.inc => openjdk-8-release-162b12.inc} | 48 +-
.../{openjdk-8_102b14.bb => openjdk-8_162b12.bb} | 2 +-
.../{openjre-8_102b14.bb => openjre-8_162b12.bb} | 2 +-
recipes-core/openjdk/patches-openjdk-8/LICENSE | 6 +-
.../dont-expect-fqpn-for-make.patch | 6 +-
.../filter-aclocal-copy-too.patch | 6 +-
.../patches-openjdk-8/handle_extra_output.patch | 6 +-
.../openjdk8-find-compiler-fix-env-respect.patch | 36 +-
...8-fix-assembler-flag-handling-in-makefile.patch | 2 +-
.../openjdk8-fix-shark-build.patch | 205 ++--
.../openjdk8-fix-shark-stdc++11.patch | 1008 ++++++++------------
.../openjdk8-fix-zero-mode-crash.patch | 49 -
.../openjdk8-no-genx11-in-headless.patch | 10 +-
.../openjdk8-no-unused-deps.patch | 44 +-
...o-in-favour-of-openembedded-package-split.patch | 12 +-
.../remove-shell-variables-from-autoheader.patch | 10 +-
20 files changed, 600 insertions(+), 859 deletions(-)
delete mode 100644 recipes-core/openjdk/openjdk-8-native_102b14.bb
create mode 100644 recipes-core/openjdk/openjdk-8-native_162b12.bb
rename recipes-core/openjdk/{openjdk-8-release-102b14.inc => openjdk-8-release-162b12.inc} (64%)
rename recipes-core/openjdk/{openjdk-8_102b14.bb => openjdk-8_162b12.bb} (98%)
rename recipes-core/openjdk/{openjre-8_102b14.bb => openjre-8_162b12.bb} (96%)
delete mode 100644 recipes-core/openjdk/patches-openjdk-8/openjdk8-fix-zero-mode-crash.patchrecipes-core/openjdk/openjdk-8-common.inc +1 -1
@@ -2,7 +2,7 @@ DESCRIPTION = "Java runtime based upon the OpenJDK Project" HOMEPAGE = "http://http://openjdk.java.net/" LICENSE = "GPL-2.0-with-classpath-exception" -LIC_FILES_CHKSUM = "file://LICENSE;md5=7b4baeedfe2d40cb03536573bc2c89b1" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3e0b59f8fac05c3c03d4a26bbda13f8f" inherit java autotools gettext qemu pkgconfig
recipes-core/openjdk/openjdk-8-cross.inc +0 -1
@@ -11,7 +11,6 @@ PATCHES_URI_append = "\ file://openjdk8-fix-assembler-flag-handling-in-makefile.patch;apply=no \ file://openjdk8-fix-adlc-flags.patch;apply=no \ file://openjdk8-silence-d_fortify_source-warning.patch;apply=no \ - file://openjdk8-fix-zero-mode-crash.patch;apply=no \ file://openjdk8-add-missing-linker-flags.patch;apply=no \ file://openjdk8-fix-libpng-neon-build.patch;apply=no \ "
recipes-core/openjdk/openjdk-8-native_102b14.bb deleted +0 -2
@@ -1,2 +0,0 @@ -require openjdk-8-release-102b14.inc -require openjdk-8-native.inc
recipes-core/openjdk/openjdk-8-native_162b12.bb new file +2 -0
@@ -0,0 +1,2 @@ +require openjdk-8-release-${PV}.inc +require openjdk-8-native.inc
recipes-core/openjdk/openjdk-8-release-162b12.inc renamed from recipes-core/openjdk/openjdk-8-release-102b14.inc +24 -24
61 lines not on this page · raw message
recipes-core/openjdk/openjdk-8_162b12.bb renamed from recipes-core/openjdk/openjdk-8_102b14.bb +1 -1
@@ -1,4 +1,4 @@ -require openjdk-8-release-102b14.inc +require openjdk-8-release-${PV}.inc require openjdk-8-cross.inc do_install() {
recipes-core/openjdk/openjre-8_162b12.bb renamed from recipes-core/openjdk/openjre-8_102b14.bb +1 -1
@@ -1,4 +1,4 @@ -require openjdk-8-release-102b14.inc +require openjdk-8-release-${PV}.inc require openjdk-8-cross.inc do_install() {
recipes-core/openjdk/patches-openjdk-8/LICENSE +3 -3
@@ -3,7 +3,7 @@ The GNU General Public License (GPL) Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. -59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
@@ -287,8 +287,8 @@ pointer to where the full notice is found. more details. You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., 59 - Temple Place, Suite 330, Boston, MA 02111-1307 USA + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail.
recipes-core/openjdk/patches-openjdk-8/dont-expect-fqpn-for-make.patch +3 -3
@@ -1,6 +1,6 @@ ---- common/autoconf/basics.m4.orig 2015-08-17 19:05:13.122672019 +0200 -+++ common/autoconf/basics.m4 2015-08-17 19:13:01.482673782 +0200 -@@ -549,10 +549,12 @@ +--- common/autoconf/basics.m4.orig ++++ common/autoconf/basics.m4 +@@ -555,10 +555,12 @@ AC_DEFUN([BASIC_CHECK_GNU_MAKE], # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky. if test "x$MAKE" != x; then # User has supplied a make, test it.
recipes-core/openjdk/patches-openjdk-8/filter-aclocal-copy-too.patch +3 -3
@@ -1,6 +1,6 @@ ---- common/autoconf/basics.m4.orig 2015-08-17 18:31:50.598664481 +0200 -+++ common/autoconf/basics.m4 2015-08-17 18:31:57.554664507 +0200 -@@ -442,7 +442,7 @@ +--- common/autoconf/basics.m4.orig ++++ common/autoconf/basics.m4 +@@ -448,7 +448,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR], files_present=`$LS $OUTPUT_ROOT` # Configure has already touched config.log and confdefs.h in the current dir when this check # is performed.
recipes-core/openjdk/patches-openjdk-8/handle_extra_output.patch +2 -4
@@ -2,10 +2,8 @@ When adding the environment variable JAVA_TOOL_OPTIONS an extra line in the output from 'java -version' is produced. As this output is parsed by configure script the extra line has to be filtered out. -Index: jdk8u-e8bed1496ff2/common/autoconf/boot-jdk.m4 -=================================================================== ---- jdk8u-e8bed1496ff2.orig/common/autoconf/boot-jdk.m4 -+++ jdk8u-e8bed1496ff2/common/autoconf/boot-jdk.m4 +--- jdk8u-4be07cb28b21.orig/common/autoconf/boot-jdk.m4 ++++ jdk8u-4be07cb28b21/common/autoconf/boot-jdk.m4 @@ -51,7 +51,7 @@ AC_DEFUN([BOOTJDK_DO_CHECK], BOOT_JDK_FOUND=no else
recipes-core/openjdk/patches-openjdk-8/openjdk8-find-compiler-fix-env-respect.patch +18 -18
@@ -1,18 +1,18 @@ ---- common/autoconf/toolchain.m4.orig 2015-08-07 20:52:38.000000000 +0200 -+++ common/autoconf/toolchain.m4 2015-10-27 13:57:19.708566525 +0100 -@@ -27,7 +27,7 @@ +--- common/autoconf/toolchain.m4.orig ++++ common/autoconf/toolchain.m4 +@@ -77,7 +77,7 @@ AC_DEFUN([TOOLCHAIN_CHECK_COMPILER_VERSI # $2 = human readable name of compiler (C or C++) - AC_DEFUN([TOOLCHAIN_CHECK_COMPILER_VERSION], + AC_DEFUN([TOOLCHAIN_EXTRACT_COMPILER_VERSION], [ - COMPILER=[$]$1 + COMPILER="[$]$1" COMPILER_NAME=$2 - + if test "x$OPENJDK_TARGET_OS" = xsolaris; then -@@ -123,64 +123,37 @@ +@@ -174,64 +174,37 @@ AC_DEFUN([TOOLCHAIN_FIND_COMPILER], [ COMPILER_NAME=$2 - + - $1= + FOUND_$1= +
@@ -31,7 +31,7 @@ + FOUND_$1=$TOOLS_DIR_$1 PATH="$PATH_save" fi - + # AC_PATH_PROGS can't be run multiple times with the same variable, # so create a new name for this run. - if test "x[$]$1" = x; then
@@ -40,7 +40,7 @@ - $1=$POTENTIAL_$1 + FOUND_$1=$POTENTIAL_$1 fi - + - if test "x[$]$1" = x; then + if test "x[$]FOUND_$1" = x; then HELP_MSG_MISSING_DEPENDENCY([devkit])
@@ -86,10 +86,10 @@ + TEST_COMPILER="[$]FOUND_$1" + + $1="$TEST_COMPILER" - TOOLCHAIN_CHECK_COMPILER_VERSION([$1], [$COMPILER_NAME]) + TOOLCHAIN_EXTRACT_COMPILER_VERSION([$1], [$COMPILER_NAME]) ]) - -@@ -214,12 +187,12 @@ + +@@ -265,12 +238,12 @@ AC_DEFUN([TOOLCHAIN_SETUP_PATHS], # otherwise we might pick up cross-compilers which don't use standard naming. # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have # to wait until they are properly discovered.
@@ -108,12 +108,12 @@ fi AC_SUBST(BUILD_CC) AC_SUBST(BUILD_CXX) ---- common/autoconf/basics.m4.orig 2015-08-31 15:03:54.942975387 +0200 -+++ common/autoconf/basics.m4 2015-08-31 15:02:25.090975049 +0200 -@@ -171,8 +171,15 @@ +--- common/autoconf/basics.m4.orig ++++ common/autoconf/basics.m4 +@@ -171,8 +171,15 @@ AC_DEFUN([BASIC_REMOVE_SYMBOLIC_LINKS], fi fi - + + # First separate the path from the arguments. This will split at the first + # space. + complete="[$]$1"
@@ -127,7 +127,7 @@ else # Save the current directory for restoring afterwards STARTDIR=$PWD -@@ -198,8 +205,9 @@ +@@ -198,8 +205,9 @@ AC_DEFUN([BASIC_REMOVE_SYMBOLIC_LINKS], let COUNTER=COUNTER+1 done cd $STARTDIR
@@ -137,4 +137,4 @@ + $1="$new_path ${arguments% *}" fi ]) - +
recipes-core/openjdk/patches-openjdk-8/openjdk8-fix-assembler-flag-handling-in-makefile.patch +1 -1
@@ -9,7 +9,7 @@ Upstream-Status: Pending --- --- make/common/NativeCompilation.gmk +++ make/common/NativeCompilation.gmk -@@ -372,7 +372,7 @@ define SetupNativeCompilation +@@ -376,7 +376,7 @@ define SetupNativeCompilation $$(foreach p,$$($1_SRCS), \ $$(eval $$(call add_native_source,$1,$$p,$$($1_OBJECT_DIR), \ $$($1_CFLAGS) $$($1_EXTRA_CFLAGS),$$($1_CC), \
recipes-core/openjdk/patches-openjdk-8/openjdk8-fix-shark-build.patch +103 -102
457 lines not on this page · raw message
recipes-core/openjdk/patches-openjdk-8/openjdk8-fix-shark-stdc++11.patch +400 -608
2,314 lines not on this page · raw message
recipes-core/openjdk/patches-openjdk-8/openjdk8-fix-zero-mode-crash.patch deleted +0 -49
49 lines not on this page · raw message
recipes-core/openjdk/patches-openjdk-8/openjdk8-no-genx11-in-headless.patch +5 -5
Lines of this file are not shown. View the raw message.
recipes-core/openjdk/patches-openjdk-8/openjdk8-no-unused-deps.patch +22 -22
44 lines not on this page · raw message
recipes-core/openjdk/patches-openjdk-8/openjdk8-prevent-debuginfo-in-favour-of-openembedded-package-split.patch +6 -6
Lines of this file are not shown. View the raw message.
recipes-core/openjdk/patches-openjdk-8/remove-shell-variables-from-autoheader.patch +5 -5
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.16.2
Part of the diff is not shown here. View the raw message.
PATCH 4/14 openjdk-8: rework do_patch (pt 1 - X11 wrappers)
In reply to André DraszikFrom: André Draszik <[email protected]>
X11 wrappers are currently being deleted using a custom do_patch[postfuncs]. This is confusing to say the least, as e.g. naming implies this is done after ./configure has run.
At the moment, this also happens halfway through patches have been applied, i.e. some patches are being applied, then the X11 wrappers are deleted, then more patches are being applied.
Streamline this so that the unneeded wrappers are removed as part of do_unpack[postfuncs].
--- recipes-core/openjdk/openjdk-8-common.inc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
recipes-core/openjdk/openjdk-8-common.inc +5 -3
@@ -39,6 +39,10 @@ do_unpack_extract_submodules () { tar xjf ${WORKDIR}/${NASHORN_FILE} --transform "s,-${NASHORN_CHANGESET},,g" } +do_unpack_remove_X11_wrappers() { + find ${S}/jdk/src/solaris/classes/sun/awt/X11 -maxdepth 1 -name '*.java' -delete +} + def package_config_option_cleanup(d): distro_x11 = bb.utils.contains('DISTRO_FEATURES', 'x11', True, False, d) distro_alsa = bb.utils.contains('DISTRO_FEATURES', 'alsa', True, False, d)
@@ -149,13 +153,11 @@ def jdk_configure_options(d): return options[3] do_unpack[postfuncs] += "do_unpack_extract_submodules" - -POST_CONFIGURE_CLEAN_X11 = "${@bb.utils.contains('PACKAGECONFIG', 'x11', '', 'rm -f jdk/src/solaris/classes/sun/awt/X11/*.java', d)}" +do_unpack[postfuncs] += "${@bb.utils.contains('PACKAGECONFIG', 'x11', '', 'do_unpack_remove_X11_wrappers', d)}" do_patch_openjdk8() { olddir=`pwd` cd "${S}" - ${POST_CONFIGURE_CLEAN_X11} for OJ8P in ${WORKDIR}/openjdk8-*.patch; do patch -p0 < ${OJ8P} done
Signature · 1 line
2.16.2
PATCH 5/14 openjdk-8: rework do_patch (pt 2 - use bitbake variable overrides)
In reply to André DraszikFrom: André Draszik <[email protected]>
This currently uses a hand-crafted solution to distinguish between common, native-only and and target-only patches. That is a bit hard to follow as patches are being applied in strange order, and is also non-standard.
Instead, we can just use bitbake variable overrides. This makes it much easier to work with this recipe, as:
* it is clear in which order patches are going to be applied by looking at the recipe
* it is clear which patches are meant to be common, for build, or target
* old patches that are still lying around in WORKDIR (e.g. because rm_work is not enabled), but that have been removed from SRC_URI are no longer incorrectly applied
* if patches fail to apply, we know exactly which patch has failed
* we can use PATCHTOOL = without any ill effects
--- recipes-core/openjdk/openjdk-8-common.inc | 10 ---------- recipes-core/openjdk/openjdk-8-cross.inc | 14 -------------- recipes-core/openjdk/openjdk-8-release-162b12.inc | 23 ++++++++++++++++++----- 3 files changed, 18 insertions(+), 29 deletions(-)
recipes-core/openjdk/openjdk-8-common.inc +0 -10
@@ -155,16 +155,6 @@ def jdk_configure_options(d): do_unpack[postfuncs] += "do_unpack_extract_submodules" do_unpack[postfuncs] += "${@bb.utils.contains('PACKAGECONFIG', 'x11', '', 'do_unpack_remove_X11_wrappers', d)}" -do_patch_openjdk8() { - olddir=`pwd` - cd "${S}" - for OJ8P in ${WORKDIR}/openjdk8-*.patch; do - patch -p0 < ${OJ8P} - done -} - -do_patch[postfuncs] += "do_patch_openjdk8" - do_configure_prepend() { export ${@jdk_environment_options(d)} }
recipes-core/openjdk/openjdk-8-cross.inc +0 -14
@@ -1,20 +1,6 @@ JDK_HOME = "${libdir_jvm}/openjdk-8" JRE_HOME = "${libdir_jvm}/openjre-8" -# 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 -# by Roman Kennke (rkennke at redhat.com) -PATCHES_URI_append = "\ - file://openjdk8-restrict-to-staging-dir.patch;apply=no \ - file://openjdk8-fix-shark-build.patch;apply=no \ - file://openjdk8-fix-shark-stdc++11.patch;apply=no \ - file://openjdk8-fix-assembler-flag-handling-in-makefile.patch;apply=no \ - file://openjdk8-fix-adlc-flags.patch;apply=no \ - file://openjdk8-silence-d_fortify_source-warning.patch;apply=no \ - file://openjdk8-add-missing-linker-flags.patch;apply=no \ - file://openjdk8-fix-libpng-neon-build.patch;apply=no \ -" - DEPENDS = "\ openjdk-8-native zip-native ant-native libxslt \ jpeg libpng krb5 libffi fontconfig freetype \
recipes-core/openjdk/openjdk-8-release-162b12.inc +18 -5
@@ -1,11 +1,24 @@ -PATCHES_URI="\ +PATCHES_URI = "\ file://remove-shell-variables-from-autoheader.patch;striplevel=0 \ file://filter-aclocal-copy-too.patch;striplevel=0 \ file://dont-expect-fqpn-for-make.patch;striplevel=0 \ - file://openjdk8-no-genx11-in-headless.patch;apply=no \ - file://openjdk8-no-unused-deps.patch;apply=no \ - file://openjdk8-find-compiler-fix-env-respect.patch;apply=no \ - file://openjdk8-prevent-debuginfo-in-favour-of-openembedded-package-split.patch;apply=no \ + file://openjdk8-no-genx11-in-headless.patch;striplevel=0 \ + file://openjdk8-no-unused-deps.patch;striplevel=0 \ + file://openjdk8-find-compiler-fix-env-respect.patch;striplevel=0 \ + file://openjdk8-prevent-debuginfo-in-favour-of-openembedded-package-split.patch;striplevel=0 \ +" +# 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 +# by Roman Kennke (rkennke at redhat.com) +PATCHES_URI_append_class-target = "\ + file://openjdk8-restrict-to-staging-dir.patch;striplevel=0 \ + file://openjdk8-fix-shark-build.patch;striplevel=0 \ + file://openjdk8-fix-shark-stdc++11.patch;striplevel=0 \ + file://openjdk8-fix-assembler-flag-handling-in-makefile.patch;striplevel=0 \ + file://openjdk8-fix-adlc-flags.patch;striplevel=0 \ + file://openjdk8-silence-d_fortify_source-warning.patch;striplevel=0 \ + file://openjdk8-add-missing-linker-flags.patch;striplevel=0 \ + file://openjdk8-fix-libpng-neon-build.patch;striplevel=0 \ " # Name of the directory containing the compiled output
Signature · 1 line
2.16.2
PATCH 6/14 openjdk-8: fix a compiler warning
In reply to André DraszikFrom: André Draszik <[email protected]>
As per the patch
--- recipes-core/openjdk/openjdk-8-release-162b12.inc | 1 + ...dk-comparison-between-pointer-and-integer.patch | 144 +++++++++++++++++++++ 2 files changed, 145 insertions(+) create mode 100644 recipes-core/openjdk/patches-openjdk-8/0001-jdk-comparison-between-pointer-and-integer.patch
recipes-core/openjdk/openjdk-8-release-162b12.inc +1 -0
@@ -6,6 +6,7 @@ PATCHES_URI = "\ file://openjdk8-no-unused-deps.patch;striplevel=0 \ file://openjdk8-find-compiler-fix-env-respect.patch;striplevel=0 \ file://openjdk8-prevent-debuginfo-in-favour-of-openembedded-package-split.patch;striplevel=0 \ + file://0001-jdk-comparison-between-pointer-and-integer.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/0001-jdk-comparison-between-pointer-and-integer.patch new file +144 -0
144 lines not on this page · raw message
Signature · 1 line
2.16.2
PATCH 7/14 openjdk-8: add patch for compiling with enabled security flags
In reply to André DraszikFrom: André Draszik <[email protected]>
Rather than carrying an OE specific patch that just silences the warning on some platform only, backport the upstream patch to actually fix the issue.
--- recipes-core/openjdk/openjdk-8-release-162b12.inc | 2 +- ...x-compilation-with-security-flags-enabled.patch | 41 ++++++++++++++++ ...openjdk8-silence-d_fortify_source-warning.patch | 56 ---------------------- 3 files changed, 42 insertions(+), 57 deletions(-) create mode 100644 recipes-core/openjdk/patches-openjdk-8/0002-hotspot-fix-compilation-with-security-flags-enabled.patch delete mode 100644 recipes-core/openjdk/patches-openjdk-8/openjdk8-silence-d_fortify_source-warning.patch
recipes-core/openjdk/openjdk-8-release-162b12.inc +1 -1
@@ -7,6 +7,7 @@ PATCHES_URI = "\ file://openjdk8-find-compiler-fix-env-respect.patch;striplevel=0 \ file://openjdk8-prevent-debuginfo-in-favour-of-openembedded-package-split.patch;striplevel=0 \ file://0001-jdk-comparison-between-pointer-and-integer.patch \ + file://0002-hotspot-fix-compilation-with-security-flags-enabled.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
@@ -17,7 +18,6 @@ PATCHES_URI_append_class-target = "\ file://openjdk8-fix-shark-stdc++11.patch;striplevel=0 \ file://openjdk8-fix-assembler-flag-handling-in-makefile.patch;striplevel=0 \ file://openjdk8-fix-adlc-flags.patch;striplevel=0 \ - file://openjdk8-silence-d_fortify_source-warning.patch;striplevel=0 \ file://openjdk8-add-missing-linker-flags.patch;striplevel=0 \ file://openjdk8-fix-libpng-neon-build.patch;striplevel=0 \ "
recipes-core/openjdk/patches-openjdk-8/0002-hotspot-fix-compilation-with-security-flags-enabled.patch new file +41 -0
41 lines not on this page · raw message
recipes-core/openjdk/patches-openjdk-8/openjdk8-silence-d_fortify_source-warning.patch deleted +0 -56
56 lines not on this page · raw message
Signature · 1 line
2.16.2
PATCH 8/14 openjdk-8: add patches to support building against system libpng & libjpeg
In reply to André DraszikFrom: André Draszik <[email protected]>
This didn't actually before. Patches taken from Debian / OpenJDK-9.
--- recipes-core/openjdk/openjdk-8-cross.inc | 5 +- recipes-core/openjdk/openjdk-8-native.inc | 6 +- recipes-core/openjdk/openjdk-8-release-162b12.inc | 2 + ...dk-Allow-using-a-system-installed-libjpeg.patch | 262 +++++++++++++++++++++ ...jdk-Allow-using-a-system-installed-libpng.patch | 148 ++++++++++++ 5 files changed, 420 insertions(+), 3 deletions(-) create mode 100644 recipes-core/openjdk/patches-openjdk-8/0003-jdk-Allow-using-a-system-installed-libjpeg.patch create mode 100644 recipes-core/openjdk/patches-openjdk-8/0004-jdk-Allow-using-a-system-installed-libpng.patch
recipes-core/openjdk/openjdk-8-cross.inc +4 -1
@@ -3,7 +3,7 @@ JRE_HOME = "${libdir_jvm}/openjre-8" DEPENDS = "\ openjdk-8-native zip-native ant-native libxslt \ - jpeg libpng krb5 libffi fontconfig freetype \ + krb5 libffi fontconfig freetype \ " PRIVATE_LIBS = "\
@@ -19,6 +19,7 @@ PACKAGECONFIG ??= " \ repack \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 cups', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)} \ + jpeg png \ " PACKAGECONFIG[x11] = "--with-x,,libx11 xproto libxt libxext libxrender libxtst" PACKAGECONFIG[cups] = "--with-cups,,cups"
@@ -28,6 +29,8 @@ PACKAGECONFIG[jce] = "--enable-unlimited-crypto,," PACKAGECONFIG[zip] = "--with-zlib=system,--with-zlib=bundled,zlib," PACKAGECONFIG[gif] = "--with-giflib=system,--with-giflib=bundled,giflib," +PACKAGECONFIG[jpeg] = "--with-libjpeg=system,--with-libjpeg=bundled,jpeg," +PACKAGECONFIG[png] = "--with-libpng=system,--with-libpng=bundled,libpng," export WANT_LLVM_RELEASE = "3.5.2" PACKAGECONFIG[zero] = "--with-jvm-variants=zero,,,"
recipes-core/openjdk/openjdk-8-native.inc +4 -2
@@ -2,7 +2,7 @@ JDK_DIR = "openjdk-8-native" DEPENDS = "\ icedtea7-native ant-native \ libxslt-native attr-native \ - giflib-native jpeg-native libpng-native \ + giflib-native \ glib-2.0-native freetype-native fontconfig-native \ zlib-native zip-native \ unzip-native make-native \
@@ -11,11 +11,13 @@ DEPENDS = "\ SRC_URI_append += "file://handle_extra_output.patch" -PACKAGECONFIG ??= "" +PACKAGECONFIG ??= "jpeg png" PACKAGECONFIG[x11] = "--with-x,,libx11-native xproto-native libxt-native libxext-native libxrender-native" PACKAGECONFIG[cups] = "--with-cups,,cups" PACKAGECONFIG[alsa] = "--with-alsa,,alsa-lib-native" PACKAGECONFIG[jce] = "--enable-unlimited-crypto,," +PACKAGECONFIG[jpeg] = "--with-libjpeg=system,--with-libjpeg=bundled,jpeg-native" +PACKAGECONFIG[png] = "--with-libpng=system,--with-libpng=bundled,libpng-native" EXTRA_OECONF_append = "\ --with-jobs=${@java_get_parallel_make(d)} \
recipes-core/openjdk/openjdk-8-release-162b12.inc +2 -0
@@ -8,6 +8,8 @@ PATCHES_URI = "\ file://openjdk8-prevent-debuginfo-in-favour-of-openembedded-package-split.patch;striplevel=0 \ file://0001-jdk-comparison-between-pointer-and-integer.patch \ file://0002-hotspot-fix-compilation-with-security-flags-enabled.patch \ + file://0003-jdk-Allow-using-a-system-installed-libjpeg.patch \ + file://0004-jdk-Allow-using-a-system-installed-libpng.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/0003-jdk-Allow-using-a-system-installed-libjpeg.patch new file +262 -0
262 lines not on this page · raw message
recipes-core/openjdk/patches-openjdk-8/0004-jdk-Allow-using-a-system-installed-libpng.patch new file +148 -0
148 lines not on this page · raw message
Signature · 1 line
2.16.2
PATCH 9/14 openjdk-8-native: really use system libgif & zlib
In reply to André DraszikFrom: André Draszik <[email protected]>
The intention seems to be to build against above system libraries, but configure still picked the bundled versions, even though the libraries are in the sysroot. Make it deterministic and force use of the system libraries using PACKAGECONFIG and the appropriate configure arguments.
--- recipes-core/openjdk/openjdk-8-native.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
recipes-core/openjdk/openjdk-8-native.inc +4 -4
@@ -2,22 +2,22 @@ JDK_DIR = "openjdk-8-native" DEPENDS = "\ icedtea7-native ant-native \ libxslt-native attr-native \ - giflib-native \ glib-2.0-native freetype-native fontconfig-native \ - zlib-native zip-native \ - unzip-native make-native \ + zip-native unzip-native make-native \ ca-certificates-native openssl-native coreutils-native \ " SRC_URI_append += "file://handle_extra_output.patch" -PACKAGECONFIG ??= "jpeg png" +PACKAGECONFIG ??= "gif jpeg png zlib" PACKAGECONFIG[x11] = "--with-x,,libx11-native xproto-native libxt-native libxext-native libxrender-native" PACKAGECONFIG[cups] = "--with-cups,,cups" PACKAGECONFIG[alsa] = "--with-alsa,,alsa-lib-native" +PACKAGECONFIG[gif] = "--with-giflib=system,--with-giflib=bundled,giflib-native" PACKAGECONFIG[jce] = "--enable-unlimited-crypto,," PACKAGECONFIG[jpeg] = "--with-libjpeg=system,--with-libjpeg=bundled,jpeg-native" PACKAGECONFIG[png] = "--with-libpng=system,--with-libpng=bundled,libpng-native" +PACKAGECONFIG[zlib] = "--with-zlib=system,--with-zlib=bundled,zlib-native" EXTRA_OECONF_append = "\ --with-jobs=${@java_get_parallel_make(d)} \
Signature · 1 line
2.16.2
PATCH 10/14 openjdk-8: build against system libgif & zlib by default
In reply to André DraszikFrom: André Draszik <[email protected]>
This should really be the default so as to benefit from CVE fixes etc.
--- recipes-core/openjdk/openjdk-8-cross.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-core/openjdk/openjdk-8-cross.inc +1 -1
@@ -19,7 +19,7 @@ PACKAGECONFIG ??= " \ repack \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 cups', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)} \ - jpeg png \ + gif jpeg png zip \ " PACKAGECONFIG[x11] = "--with-x,,libx11 xproto libxt libxext libxrender libxtst" PACKAGECONFIG[cups] = "--with-cups,,cups"
Signature · 1 line
2.16.2
PATCH 11/14 openjdk-8: rename PACKAGECONFIG zip -> zlib
In reply to André DraszikFrom: André Draszik <[email protected]>
The existing PACKAGECONFIG option 'zip' affects OpenJDK's usage of zlib, not zip, so this option is a bit inconsistent and confusing.
Rename to zlib.
--- recipes-core/openjdk/openjdk-8-cross.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
recipes-core/openjdk/openjdk-8-cross.inc +2 -2
@@ -19,7 +19,7 @@ PACKAGECONFIG ??= " \ repack \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 cups', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)} \ - gif jpeg png zip \ + gif jpeg png zlib \ " PACKAGECONFIG[x11] = "--with-x,,libx11 xproto libxt libxext libxrender libxtst" PACKAGECONFIG[cups] = "--with-cups,,cups"
@@ -27,10 +27,10 @@ PACKAGECONFIG[alsa] = "--with-alsa,,alsa-lib" PACKAGECONFIG[jce] = "--enable-unlimited-crypto,," -PACKAGECONFIG[zip] = "--with-zlib=system,--with-zlib=bundled,zlib," PACKAGECONFIG[gif] = "--with-giflib=system,--with-giflib=bundled,giflib," PACKAGECONFIG[jpeg] = "--with-libjpeg=system,--with-libjpeg=bundled,jpeg," PACKAGECONFIG[png] = "--with-libpng=system,--with-libpng=bundled,libpng," +PACKAGECONFIG[zlib] = "--with-zlib=system,--with-zlib=bundled,zlib," export WANT_LLVM_RELEASE = "3.5.2" PACKAGECONFIG[zero] = "--with-jvm-variants=zero,,,"
Signature · 1 line
2.16.2
PATCH 12/14 openjdk-8: stop passing obsolete make variables (freetype)
In reply to André DraszikFrom: André Draszik <[email protected]>
OpenJDK's build system complains about passing in obsolete ALT_ variables.
Stop passing in those for freetype, as pkg-config is used to figure out the correct compiler and linker flags.
--- recipes-core/openjdk/openjdk-8-cross.inc | 2 -- 1 file changed, 2 deletions(-)
recipes-core/openjdk/openjdk-8-cross.inc +0 -2
@@ -99,8 +99,6 @@ EXTRA_OEMAKE_append = '\ ${@jdk_make_options(d)} \ ALT_SDT_H="${STAGING_INCDIR}" \ ALT_CUPS_HEADERS_PATH="${STAGING_INCDIR}" \ - ALT_FREETYPE_HEADERS_PATH="${STAGING_INCDIR}/freetype2" \ - ALT_FREETYPE_LIB_PATH="${STAGING_LIBDIR}" \ STRIP_POLICY=no_strip \ MAKE_VERBOSE=y VERBOSE=-s LOG_LEVEL=trace \ QUIETLY= \
Signature · 1 line
2.16.2
PATCH 13/14 openjdk-8: fix musl build
In reply to André DraszikFrom: André Draszik <[email protected]>
Add various patches to make it work in musl. Some of them are generic enough to be applied for all builds, some need to be specific to musl.
--- recipes-core/openjdk/openjdk-8-release-162b12.inc | 16 ++ ...dk-comparison-between-pointer-and-integer.patch | 2 +- ...x-compilation-with-security-flags-enabled.patch | 2 +- ...dk-Allow-using-a-system-installed-libjpeg.patch | 2 +- ...jdk-Allow-using-a-system-installed-libpng.patch | 2 +- ...0005-hotspot-use-correct-include-for-poll.patch | 85 ++++++++++ ...006-hotspot-don-t-rely-on-old-SysV-SIGCLD.patch | 41 +++++ .../0007-jdk-use-correct-include-for-poll.patch | 172 +++++++++++++++++++++ .../0008-jdk-use-correct-include-for-signal.patch | 89 +++++++++++ ...0009-jdk-disable-backtrace-musl-build-fix.patch | 45 ++++++ ...l-0001-hotspot-stop-using-obsolete-isnanf.patch | 42 +++++ ...-give-a-much-bigger-buffer-to-getmntent_r.patch | 103 ++++++++++++ ...x-libjvm-load-on-musl-set-LD_LIBRARY_PATH.patch | 37 +++++ ...dk-remove-sysctl.h-include-musl-build-fix.patch | 90 +++++++++++ .../musl-0005-hotspot-disable-agent-build.patch | 88 +++++++++++ ...otspot-os_linux-remove-glibc-dependencies.patch | 75 +++++++++ ...linux_x86-remove-glibc-dependencies-fpu_c.patch | 46 ++++++ ...ild-fix-use-SIGRTMAX-rather-than-__SIGRTM.patch | 69 +++++++++ .../musl-0009-jdk-musl-has-gethostby_r.patch | 35 +++++ 19 files changed, 1037 insertions(+), 4 deletions(-) create mode 100644 recipes-core/openjdk/patches-openjdk-8/0005-hotspot-use-correct-include-for-poll.patch create mode 100644 recipes-core/openjdk/patches-openjdk-8/0006-hotspot-don-t-rely-on-old-SysV-SIGCLD.patch create mode 100644 recipes-core/openjdk/patches-openjdk-8/0007-jdk-use-correct-include-for-poll.patch create mode 100644 recipes-core/openjdk/patches-openjdk-8/0008-jdk-use-correct-include-for-signal.patch create mode 100644 recipes-core/openjdk/patches-openjdk-8/0009-jdk-disable-backtrace-musl-build-fix.patch create mode 100644 recipes-core/openjdk/patches-openjdk-8/musl-0001-hotspot-stop-using-obsolete-isnanf.patch create mode 100644 recipes-core/openjdk/patches-openjdk-8/musl-0002-jdk-give-a-much-bigger-buffer-to-getmntent_r.patch create mode 100644 recipes-core/openjdk/patches-openjdk-8/musl-0003-jdk-fix-libjvm-load-on-musl-set-LD_LIBRARY_PATH.patch create mode 100644 recipes-core/openjdk/patches-openjdk-8/musl-0004-jdk-remove-sysctl.h-include-musl-build-fix.patch create mode 100644 recipes-core/openjdk/patches-openjdk-8/musl-0005-hotspot-disable-agent-build.patch create mode 100644 recipes-core/openjdk/patches-openjdk-8/musl-0006-hotspot-os_linux-remove-glibc-dependencies.patch create mode 100644 recipes-core/openjdk/patches-openjdk-8/musl-0007-hotspot-os_linux_x86-remove-glibc-dependencies-fpu_c.patch create mode 100644 recipes-core/openjdk/patches-openjdk-8/musl-0008-jdk-musl-build-fix-use-SIGRTMAX-rather-than-__SIGRTM.patch create mode 100644 recipes-core/openjdk/patches-openjdk-8/musl-0009-jdk-musl-has-gethostby_r.patch
recipes-core/openjdk/openjdk-8-release-162b12.inc +16 -0
@@ -10,6 +10,11 @@ PATCHES_URI = "\ file://0002-hotspot-fix-compilation-with-security-flags-enabled.patch \ file://0003-jdk-Allow-using-a-system-installed-libjpeg.patch \ file://0004-jdk-Allow-using-a-system-installed-libpng.patch \ + file://0005-hotspot-use-correct-include-for-poll.patch \ + file://0006-hotspot-don-t-rely-on-old-SysV-SIGCLD.patch \ + file://0007-jdk-use-correct-include-for-poll.patch \ + file://0008-jdk-use-correct-include-for-signal.patch \ + file://0009-jdk-disable-backtrace-musl-build-fix.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
@@ -23,6 +28,17 @@ PATCHES_URI_append_class-target = "\ file://openjdk8-add-missing-linker-flags.patch;striplevel=0 \ file://openjdk8-fix-libpng-neon-build.patch;striplevel=0 \ " +PATCHES_URI_append_libc-musl = "\ + file://musl-0001-hotspot-stop-using-obsolete-isnanf.patch \ + file://musl-0002-jdk-give-a-much-bigger-buffer-to-getmntent_r.patch \ + file://musl-0003-jdk-fix-libjvm-load-on-musl-set-LD_LIBRARY_PATH.patch \ + file://musl-0004-jdk-remove-sysctl.h-include-musl-build-fix.patch \ + file://musl-0005-hotspot-disable-agent-build.patch \ + file://musl-0006-hotspot-os_linux-remove-glibc-dependencies.patch \ + file://musl-0007-hotspot-os_linux_x86-remove-glibc-dependencies-fpu_c.patch \ + file://musl-0008-jdk-musl-build-fix-use-SIGRTMAX-rather-than-__SIGRTM.patch \ + file://musl-0009-jdk-musl-has-gethostby_r.patch \ +" # Name of the directory containing the compiled output BUILD_DIR = "openjdk.build"
recipes-core/openjdk/patches-openjdk-8/0001-jdk-comparison-between-pointer-and-integer.patch +1 -1
@@ -1,7 +1,7 @@ From 97d6911fb581f9e44785db29abbf97ce77713f50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <[email protected]> Date: Fri, 2 Mar 2018 11:13:08 +0000 -Subject: [PATCH 1/8] jdk: comparison between pointer and integer +Subject: [PATCH 1/9] jdk: comparison between pointer and integer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit
recipes-core/openjdk/patches-openjdk-8/0002-hotspot-fix-compilation-with-security-flags-enabled.patch +1 -1
@@ -1,7 +1,7 @@ From bdea8cf299313388ec41ea20281deca6dc4f764d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <[email protected]> Date: Tue, 27 Feb 2018 14:41:06 +0000 -Subject: [PATCH 2/8] hotspot: fix compilation with security flags enabled +Subject: [PATCH 2/9] hotspot: fix compilation with security flags enabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit
recipes-core/openjdk/patches-openjdk-8/0003-jdk-Allow-using-a-system-installed-libjpeg.patch +1 -1
@@ -1,7 +1,7 @@ From a6746c1ee43a63e79b5405e40c463d00160bc02e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <[email protected]> Date: Tue, 27 Feb 2018 13:36:53 +0000 -Subject: [PATCH 3/8] jdk: Allow using a system-installed libjpeg +Subject: [PATCH 3/9] jdk: Allow using a system-installed libjpeg MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit
recipes-core/openjdk/patches-openjdk-8/0004-jdk-Allow-using-a-system-installed-libpng.patch +1 -1
@@ -1,7 +1,7 @@ From 549100e3e687d2c844eeebe22a7dcbf7ed50406e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <[email protected]> Date: Tue, 27 Feb 2018 13:43:04 +0000 -Subject: [PATCH 4/8] jdk: Allow using a system-installed libpng +Subject: [PATCH 4/9] jdk: Allow using a system-installed libpng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit
recipes-core/openjdk/patches-openjdk-8/0005-hotspot-use-correct-include-for-poll.patch new file +85 -0
85 lines not on this page · raw message
recipes-core/openjdk/patches-openjdk-8/0006-hotspot-don-t-rely-on-old-SysV-SIGCLD.patch new file +41 -0
41 lines not on this page · raw message
recipes-core/openjdk/patches-openjdk-8/0007-jdk-use-correct-include-for-poll.patch new file +172 -0
172 lines not on this page · raw message
recipes-core/openjdk/patches-openjdk-8/0008-jdk-use-correct-include-for-signal.patch new file +89 -0
89 lines not on this page · raw message
recipes-core/openjdk/patches-openjdk-8/0009-jdk-disable-backtrace-musl-build-fix.patch new file +45 -0
45 lines not on this page · raw message
recipes-core/openjdk/patches-openjdk-8/musl-0001-hotspot-stop-using-obsolete-isnanf.patch new file +42 -0
42 lines not on this page · raw message
recipes-core/openjdk/patches-openjdk-8/musl-0002-jdk-give-a-much-bigger-buffer-to-getmntent_r.patch new file +103 -0
103 lines not on this page · raw message
recipes-core/openjdk/patches-openjdk-8/musl-0003-jdk-fix-libjvm-load-on-musl-set-LD_LIBRARY_PATH.patch new file +37 -0
@@ -0,0 +1,37 @@ +From 4429d73853b3938a53a6058cc0dcaac08d191995 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <[email protected]> +Date: Tue, 27 Feb 2018 16:01:54 +0000 +Subject: [PATCH 3/9] jdk: fix libjvm load on musl (set LD_LIBRARY_PATH) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +musl needs LD_LIBRARY_PATH set because when .so is opened +with dlopen(/abs/path) it does not qualify for providing +symbols for NEEDED dependency. + +Patch taken from Alpine Linux: + https://git.alpinelinux.org/cgit/aports/tree/community/openjdk8/icedtea-jdk-fix-libjvm-load.patch?id=4d34f29dddd3934358df7a9607706d09ae0433c3 + +Upstream-Status: Inappropriate [musl specific] +Signed-off-by: André Draszik <[email protected]> +--- + jdk/src/solaris/bin/java_md_solinux.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/jdk/src/solaris/bin/java_md_solinux.c b/jdk/src/solaris/bin/java_md_solinux.c +index 6d977109..e9a0a1eb 100644 +--- a/jdk/src/solaris/bin/java_md_solinux.c ++++ b/jdk/src/solaris/bin/java_md_solinux.c +@@ -291,6 +291,8 @@ RequiresSetenv(int wanted, const char *jvmpath) { + char *dmllp = NULL; + char *p; /* a utility pointer */ + ++ return JNI_TRUE; ++ + #ifdef AIX + /* We always have to set the LIBPATH on AIX because ld doesn't support $ORIGIN. */ + return JNI_TRUE; +-- +2.16.2 +
recipes-core/openjdk/patches-openjdk-8/musl-0004-jdk-remove-sysctl.h-include-musl-build-fix.patch new file +90 -0
90 lines not on this page · raw message
recipes-core/openjdk/patches-openjdk-8/musl-0005-hotspot-disable-agent-build.patch new file +88 -0
88 lines not on this page · raw message
recipes-core/openjdk/patches-openjdk-8/musl-0006-hotspot-os_linux-remove-glibc-dependencies.patch new file +75 -0
75 lines not on this page · raw message
recipes-core/openjdk/patches-openjdk-8/musl-0007-hotspot-os_linux_x86-remove-glibc-dependencies-fpu_c.patch new file +46 -0
46 lines not on this page · raw message
recipes-core/openjdk/patches-openjdk-8/musl-0008-jdk-musl-build-fix-use-SIGRTMAX-rather-than-__SIGRTM.patch new file +69 -0
69 lines not on this page · raw message
recipes-core/openjdk/patches-openjdk-8/musl-0009-jdk-musl-has-gethostby_r.patch new file +35 -0
@@ -0,0 +1,35 @@ +From 276fb5b2d57cf0257dc82e84d80213fe3eec6e34 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <[email protected]> +Date: Fri, 2 Mar 2018 13:57:22 +0000 +Subject: [PATCH 9/9] jdk: musl has gethostby_r() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fix the #ifdef to also allow use of it when using musl. + +Patch taken from Alpine Linux: + https://git.alpinelinux.org/cgit/aports/tree/community/openjdk8/icedtea-jdk-musl.patch?id=4d34f29dddd3934358df7a9607706d09ae0433c3 + +Upstream-Status: Inappropriate [musl specific] +Signed-off-by: André Draszik <[email protected]> +--- + jdk/src/solaris/native/java/net/Inet4AddressImpl.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/jdk/src/solaris/native/java/net/Inet4AddressImpl.c b/jdk/src/solaris/native/java/net/Inet4AddressImpl.c +index ec4f97df..5c1af081 100644 +--- a/jdk/src/solaris/native/java/net/Inet4AddressImpl.c ++++ b/jdk/src/solaris/native/java/net/Inet4AddressImpl.c +@@ -47,7 +47,7 @@ + + #include "java_net_Inet4AddressImpl.h" + +-#if defined(__GLIBC__) || (defined(__FreeBSD__) && (__FreeBSD_version >= 601104)) ++#if defined(__linux__) || (defined(__FreeBSD__) && (__FreeBSD_version >= 601104)) + #define HAS_GLIBC_GETHOSTBY_R 1 + #endif + +-- +2.16.2 +
Signature · 1 line
2.16.2
PATCH 14/14 openjdk-8: add aarch64 support
In reply to André DraszikFrom: André Draszik <[email protected]>
This is using the aarch64 port to make it work, which is at version u161b15.
We also add one patch to make this work with musl, too.
Because the aarch64 port is fetched from a different repository, the version specific include has been split so as to have all common parts (URIs, patches, configuration bits) in one single file, and version specific bits (checksum, mercurial commit ID), in another file, to ease maintenance, and make distinguishing easier.
---
recipes-core/openjdk/openjdk-8-common.inc | 2 -
recipes-core/openjdk/openjdk-8-release-161b15.inc | 33 ++++++++
recipes-core/openjdk/openjdk-8-release-162b12.inc | 83 +--------------------
recipes-core/openjdk/openjdk-8-release-16xbyy.inc | 87 ++++++++++++++++++++++
.../{openjdk-8_162b12.bb => openjdk-8_16xbyy.bb} | 3 +
.../{openjre-8_162b12.bb => openjre-8_16xbyy.bb} | 3 +
.../hotspot-remaining-musl-fixes-aarch64.patch | 35 +++++++++
7 files changed, 164 insertions(+), 82 deletions(-)
create mode 100644 recipes-core/openjdk/openjdk-8-release-161b15.inc
create mode 100644 recipes-core/openjdk/openjdk-8-release-16xbyy.inc
rename recipes-core/openjdk/{openjdk-8_162b12.bb => openjdk-8_16xbyy.bb} (98%)
rename recipes-core/openjdk/{openjre-8_162b12.bb => openjre-8_16xbyy.bb} (96%)
create mode 100644 recipes-core/openjdk/patches-openjdk-8/hotspot-remaining-musl-fixes-aarch64.patchrecipes-core/openjdk/openjdk-8-common.inc +0 -2
@@ -199,8 +199,6 @@ def get_jdk_arch(d): return jdk_arch JDK_ARCH = "${@get_jdk_arch(d)}" -# We do not yet work for aarch64. -COMPATIBLE_HOST = "^(?!aarch64).*" export DEBUG_BINARIES = "true"
recipes-core/openjdk/openjdk-8-release-161b15.inc new file +33 -0
@@ -0,0 +1,33 @@ +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 +3 -80
94 lines not on this page · raw message
recipes-core/openjdk/openjdk-8-release-16xbyy.inc new file +87 -0
87 lines not on this page · raw message
recipes-core/openjdk/openjdk-8_16xbyy.bb renamed from recipes-core/openjdk/openjdk-8_162b12.bb +3 -0
@@ -1,3 +1,6 @@ +PV = "162b12" +PV_aarch64 = "161b15" + require openjdk-8-release-${PV}.inc require openjdk-8-cross.inc
recipes-core/openjdk/openjre-8_16xbyy.bb renamed from recipes-core/openjdk/openjre-8_162b12.bb +3 -0
@@ -1,3 +1,6 @@ +PV = "162b12" +PV_aarch64 = "161b15" + require openjdk-8-release-${PV}.inc require openjdk-8-cross.inc
recipes-core/openjdk/patches-openjdk-8/hotspot-remaining-musl-fixes-aarch64.patch new file +35 -0
@@ -0,0 +1,35 @@ +From 8e8e79c136fe56db119fd9a76fb881e96727c840 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <[email protected]> +Date: Tue, 27 Feb 2018 15:33:17 +0000 +Subject: [PATCH] hotspot: remaining musl fixes (aarch64) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +* fpu_control.h doesn't exist in musl +| hotspot/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp:78:11: fatal error: fpu_control.h: No such file or directory +| # include <fpu_control.h> +| ^~~~~~~~~~~~~~~ + +Upstream-Status: Inappropriate [OE specific] +Signed-off-by: André Draszik <[email protected]> +--- + hotspot/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/hotspot/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp b/hotspot/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp +index 8b985693..23f196cd 100644 +--- a/hotspot/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp ++++ b/hotspot/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp +@@ -75,7 +75,7 @@ + # include <pwd.h> + # include <poll.h> + # include <ucontext.h> +-# include <fpu_control.h> ++# include <linux/types.h> /* provides __u64 */ + + #ifdef BUILTIN_SIM + #define REG_SP REG_RSP +-- +2.16.1 +
Signature · 1 line
2.16.2
Quoted 11 lines · André Draszik
Hi,
OpenJDK8 in yocto is a bit outdated, so these patches
- update openjdk-8 from the 1.5 year old version 102b14 to the current 162b12
- modernize the recipe using bitbake variable overrides
- enable building with 'security' flags enabled
- fix the aarch64 build (by using the aarch64 port, which is still separate in the OpenJDK8 series)
- fix the musl build (by adding appropriate patches)
Quoted 4 lines
This was runtime-tested on x86-64 with both glibc and musl against the 'poky' DISTRO, and compile-tested on aarch64 against glibc and musl.
this series looks good thanks for fixing musl port
Quoted 8 lines
Cheers,
Andre'--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto
Hi André,
Quoted 11 lines · André Draszik
Hi,
OpenJDK8 in yocto is a bit outdated, so these patches
- update openjdk-8 from the 1.5 year old version 102b14 to the current 162b12
- modernize the recipe using bitbake variable overrides
- enable building with 'security' flags enabled
- fix the aarch64 build (by using the aarch64 port, which is still separate in the OpenJDK8 series)
- fix the musl build (by adding appropriate patches)
Quoted 3 lines
This was runtime-tested on x86-64 with both glibc and musl against the 'poky' DISTRO, and compile-tested on aarch64 against glibc and musl.
Thank you very much for this work! Pushed to master.
Quoted 2 lines
Cheers,
Andre'
Best Regards,
Maxin