summaryrefslogtreecommitdiffstats
path: root/recipes-core/openjdk/patches-openjdk-14
diff options
context:
space:
mode:
authorRichard Leitner <richard.leitner@skidata.com>2020-04-21 13:00:22 +0200
committerRichard Leitner <richard.leitner@skidata.com>2020-11-09 14:29:49 +0100
commitf66b83882e076f339dd89e88165bd7bac121f9ff (patch)
treeca7eafceb9735f4c5cb5d2d574bf94b42d6c29b6 /recipes-core/openjdk/patches-openjdk-14
parent6e84638d77ac921aac46649095bca5ddbde94d2a (diff)
downloadmeta-java-g0hl1n/jdk14.tar.gz
openjdk-14: add 14.0.1g0hl1n/jdk14
Add support for OpenJDK and OpenJRE v14.0.1. This version of OpenJDK is bootstrapped from a host-provided JDK. The host provided JDK is used to build openjdk-14-native. The native build is then used as build-jdk for the cross version. Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
Diffstat (limited to 'recipes-core/openjdk/patches-openjdk-14')
-rw-r--r--recipes-core/openjdk/patches-openjdk-14/0001-make-autoconf-remove-hard-dependency-on-cups.patch154
-rw-r--r--recipes-core/openjdk/patches-openjdk-14/0002-make-autoconf-toolchain-remove-invalid-compiler-chec.patch45
-rw-r--r--recipes-core/openjdk/patches-openjdk-14/fixed_libsctp_link_errors_caused_by_GCC10.patch64
-rw-r--r--recipes-core/openjdk/patches-openjdk-14/libj2gss_NativeFunc_multiple_definition_link_errors_with_GCC10.patch49
-rw-r--r--recipes-core/openjdk/patches-openjdk-14/libjava_childproc_multiple_definition_link_errors_with_GCC10.patch48
5 files changed, 360 insertions, 0 deletions
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 @@
1From 3f77089a24c5073c59321d0ac5fdfe5057d8c06b Mon Sep 17 00:00:00 2001
2From: Richard Leitner <richard.leitner@skidata.com>
3Date: Wed, 13 May 2020 13:34:33 +0200
4Subject: [PATCH 1/2] make: autoconf: remove hard dependency on cups
5
6In our native build we don't want to have a dependency on cups,
7therefore enable --without-cups for all platforms.
8
9Upstream-Status: Inappropriate [disable feature]
10Signed-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
18diff --git a/make/autoconf/lib-cups.m4 b/make/autoconf/lib-cups.m4
19index 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 ])
86diff --git a/make/autoconf/libraries.m4 b/make/autoconf/libraries.m4
87index 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
105diff --git a/make/autoconf/spec.gmk.in b/make/autoconf/spec.gmk.in
106index 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@
117diff --git a/make/lib/Awt2dLibraries.gmk b/make/lib/Awt2dLibraries.gmk
118index 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--
1532.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 @@
1From 93a94cd79b5657bc7954a23d6d3f9eda0addf773 Mon Sep 17 00:00:00 2001
2From: Richard Leitner <richard.leitner@skidata.com>
3Date: Wed, 13 May 2020 13:41:49 +0200
4Subject: [PATCH 2/2] make: autoconf: toolchain: remove invalid compiler
5 checking
6
7The checking of CC and CXX was faulty as it doesn't supported
8program arguments.
9To make things work remove the check and trust it is valid.
10
11Upstream-Status: Inappropriate [configuration]
12Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
13---
14 make/autoconf/toolchain.m4 | 15 ---------------
15 1 file changed, 15 deletions(-)
16
17diff --git a/make/autoconf/toolchain.m4 b/make/autoconf/toolchain.m4
18index 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--
442.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
78238386: (sctp) jdk.sctp/unix/native/libsctp/SctpNet.c "multiple definition" link errors with GCC10
8Summary: Fixed libsctp link errors caused by GCC10 default -fno-common
9Reviewed-by: chegar
10
11diff -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
40diff -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
78238388: libj2gss/NativeFunc.o "multiple definition" link errors with GCC10
8Summary: Fixed libj2gss link errors caused by GCC10 default -fno-common
9Reviewed-by: weijun
10
11diff -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";
31diff -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
78238380: java.base/unix/native/libjava/childproc.c "multiple definition" link errors with GCC10
8Reviewed-by: stuefe, clanger, rriggs
9Contributed-by: patrick@os.amperecomputing.com
10
11diff -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)
29diff -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