diff options
author | Richard Leitner <richard.leitner@skidata.com> | 2019-12-30 15:35:59 +0100 |
---|---|---|
committer | Richard Leitner <richard.leitner@skidata.com> | 2020-01-27 11:02:06 +0100 |
commit | cb6eedeb1f7fa877497e6ff2aa893e8089fe6541 (patch) | |
tree | ba4b6977735e331c5cb6a7585a185fba895f2dc7 /recipes-core/openjdk/patches-openjdk-8/0003-build-fix-build-on-as-needed-toolchains-generic.patch | |
parent | 19b569281cc30e3aa94e772d6885cd340b1d1724 (diff) | |
download | meta-java-cb6eedeb1f7fa877497e6ff2aa893e8089fe6541.tar.gz |
openjdk-8: update to latest ga version 242
As OpenJDK-8 is now tagging "ga" versions in addition to the "build"
version the recipes are adapted to use those "ga" versions.
All existing patches got re-applied and renamed. For better handling Hotspot
patches now start at patch number 1001 and jdk patches at 2001.
Furthermore architecture dependent patches are prefixed with the
architecture they apply on.
Following patches/hunks were completely dropped:
- 0002-hotspot-fix-compilation-with-security-flags-enabled.patch
got backported to hotspot jdk8u
https://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/c40a28e54185
- 0011-hotspot-backport-patch-to-fix-misuses-of-strncpy-str.patch
ostream.cpp:112 got fixed in hotspot jdk8u
https://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/f3108e56b502
- 0014-hotspot-zero-fix-undefined-behaviour-gcc-v8-fix.patch
got backported to hotspot jdk8u
https://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/ca4663e58916
- 0018-hotspot-Fix-debug-build-after-8062808-Turn-on-the-Wr.patch
fixed in hotspot jdk8u
https://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/32bc598624bd
- 0020-Enable-HotSpot-builds-on-5.x-Linux-kernels.patch
fixed in hotspot jdk8u
https://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/5af8ec63c21c
- openjdk8-add-missing-linker-flags.patch
fixed in hotspot jdk8u
https://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/f175513c2c3a
- openjdk8-fix-shark-stdc++11.patch
fixed in hotspot jdk8u
- openjdk8-fix-libpng-neon-build.patch
fixed in jdk
https://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/5d57817931e1
- aarch64-hotspot-fix-undefined-behaviour-gcc-v8-fix.patch
got backported to hotspot jdk8u
Following patches were newly added:
- 0011-autoconf-fix-CC-with-arguments-detection.patch
needed because of jdk8u commit "8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris"
- 0012-autoconf-NativeCompilation-remove-sysroot.patch
needed because of jdk8u commit "8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris"
Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
Diffstat (limited to 'recipes-core/openjdk/patches-openjdk-8/0003-build-fix-build-on-as-needed-toolchains-generic.patch')
-rw-r--r-- | recipes-core/openjdk/patches-openjdk-8/0003-build-fix-build-on-as-needed-toolchains-generic.patch | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/recipes-core/openjdk/patches-openjdk-8/0003-build-fix-build-on-as-needed-toolchains-generic.patch b/recipes-core/openjdk/patches-openjdk-8/0003-build-fix-build-on-as-needed-toolchains-generic.patch new file mode 100644 index 0000000..0e3359c --- /dev/null +++ b/recipes-core/openjdk/patches-openjdk-8/0003-build-fix-build-on-as-needed-toolchains-generic.patch | |||
@@ -0,0 +1,91 @@ | |||
1 | From 4cde9ea2adf8c57168a299f11625083d1822b0de Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com> | ||
3 | Date: Mon, 12 Mar 2018 15:40:58 +0000 | ||
4 | Subject: [PATCH 03/10] build: fix build on --as-needed toolchains (generic) | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | If the (host) toolchain has been configured to | ||
10 | unconditionally add --as-needed to the linker command line | ||
11 | then linking fails when using the system zlib: | ||
12 | + ...gcc -lz -L<sysroot>/usr/lib -L<sysroot>/lib \ | ||
13 | -Wl,-rpath-link,<sysroot>/usr/lib -Wl,-rpath-link,<sysroot>/lib \ | ||
14 | -Wl,-rpath,<sysroot>/usr/lib -Wl,-rpath,<sysroot>/lib \ | ||
15 | -Wl,-O1 -Xlinker --hash-style=both -Xlinker -z -Xlinker defs -Xlinker -O1 \ | ||
16 | -Xlinker --allow-shlib-undefined -Xlinker -soname=libunpack.so \ | ||
17 | -Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker '$ORIGIN' \ | ||
18 | -lc \ | ||
19 | -Xlinker -version-script=<src>/jdk/make/mapfiles/libunpack/mapfile-vers-unpack200 \ | ||
20 | -o $build/jdk/objs/unpackexe/unpack200 \ | ||
21 | $build/jdk/objs/unpackexe/bands.o $build/jdk/objs/unpackexe/bytes.o \ | ||
22 | $build/jdk/objs/unpackexe/coding.o $build/jdk/objs/unpackexe/main.o \ | ||
23 | $build/jdk/objs/unpackexe/unpack.o $build/jdk/objs/unpackexe/utils.o \ | ||
24 | $build/jdk/objs/unpackexe/zip.o -lstdc++ | ||
25 | $build/jdk/objs/unpackexe/zip.o: In function `jar::deflate_bytes(bytes&, bytes&)': | ||
26 | $src/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp:464: undefined reference to `deflateInit2_' | ||
27 | $src/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp:507: undefined reference to `deflate' | ||
28 | $src/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp:514: undefined reference to `deflateEnd' | ||
29 | $src/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp:502: undefined reference to `deflate' | ||
30 | $src/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp:518: undefined reference to `deflateEnd' | ||
31 | $build/jdk/objs/unpackexe/zip.o: In function `jar::get_crc32(unsigned int, unsigned char*, unsigned int)': | ||
32 | $src/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp:61: undefined reference to `crc32' | ||
33 | $src/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp:61: undefined reference to `crc32' | ||
34 | $src/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp:61: undefined reference to `crc32' | ||
35 | $build/jdk/objs/unpackexe/zip.o: In function `gunzip::free()': | ||
36 | $src/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp:645: undefined reference to `inflateEnd' | ||
37 | $build/jdk/objs/unpackexe/zip.o: In function `read_input_via_gzip(unpacker*, void*, long, long)': | ||
38 | $src/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp:548: undefined reference to `inflate' | ||
39 | $src/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp:548: undefined reference to `inflate' | ||
40 | $build/jdk/objs/unpackexe/zip.o: In function `gunzip::start(int)': | ||
41 | $src/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp:637: undefined reference to `inflateInit2_' | ||
42 | collect2: error: ld returned 1 exit status | ||
43 | |||
44 | (as happened on a Ubuntu 16.04 xenial host: | ||
45 | gcc --version | ||
46 | gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609 | ||
47 | Copyright (C) 2015 Free Software Foundation, Inc. | ||
48 | This is free software; see the source for copying conditions. There is NO | ||
49 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
50 | ) | ||
51 | |||
52 | The reason is that the order of command line arguments | ||
53 | becomes important with --as-needed and the JDK build system | ||
54 | places -lz at the beginning of the command line where it | ||
55 | would normally place the zlib object files from its own | ||
56 | bundled compiled version. | ||
57 | |||
58 | Having -lz early in the command line is not useful, as it | ||
59 | is discarded by the linker at that point in time as it | ||
60 | hasn't seen any reference to the symbols provided yet. | ||
61 | |||
62 | As it seems a generic pattern in the makefiles here, just | ||
63 | place the $EXPECTED_OBJS early in the command line, before | ||
64 | any additional libraries, so as to fix this once and for | ||
65 | all. | ||
66 | |||
67 | Signed-off-by: André Draszik <andre.draszik@jci.com> | ||
68 | Signed-off-by: Richard Leitner <richard.leitner@skidata.com> | ||
69 | --- | ||
70 | make/common/NativeCompilation.gmk | 5 ++--- | ||
71 | 1 file changed, 2 insertions(+), 3 deletions(-) | ||
72 | |||
73 | diff --git a/make/common/NativeCompilation.gmk b/make/common/NativeCompilation.gmk | ||
74 | index d961cf3..92f8033 100644 | ||
75 | --- a/make/common/NativeCompilation.gmk | ||
76 | +++ b/make/common/NativeCompilation.gmk | ||
77 | @@ -618,9 +618,8 @@ endif # no MacOS X support yet | ||
78 | |||
79 | $$($1_TARGET) : $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_GEN_MANIFEST) | ||
80 | $$(call LINKING_EXE_MSG,$$($1_BASENAME)) | ||
81 | - $$($1_LDEXE) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $(EXE_OUT_OPTION)$$($1_TARGET) \ | ||
82 | - $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_LDFLAGS_SUFFIX) \ | ||
83 | - $$($1_EXTRA_LDFLAGS_SUFFIX) | ||
84 | + $$($1_LDEXE) $$($1_EXPECTED_OBJS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $(EXE_OUT_OPTION)$$($1_TARGET) \ | ||
85 | + $$($1_RES) $$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX) | ||
86 | ifneq (,$$($1_GEN_MANIFEST)) | ||
87 | $(MT) -nologo -manifest $$($1_GEN_MANIFEST) -outputresource:$$@;#1 | ||
88 | endif | ||
89 | -- | ||
90 | 2.24.1 | ||
91 | |||