aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-core/openjdk/patches-openjdk-14
diff options
context:
space:
mode:
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 @@
+From 3f77089a24c5073c59321d0ac5fdfe5057d8c06b Mon Sep 17 00:00:00 2001
+From: Richard Leitner <richard.leitner@skidata.com>
+Date: Wed, 13 May 2020 13:34:33 +0200
+Subject: [PATCH 1/2] make: autoconf: remove hard dependency on cups
+
+In our native build we don't want to have a dependency on cups,
+therefore enable --without-cups for all platforms.
+
+Upstream-Status: Inappropriate [disable feature]
+Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
+---
+ make/autoconf/lib-cups.m4 | 30 ++++++++++++------------------
+ make/autoconf/libraries.m4 | 8 --------
+ make/autoconf/spec.gmk.in | 1 +
+ make/lib/Awt2dLibraries.gmk | 13 ++++++++++++-
+ 4 files changed, 25 insertions(+), 27 deletions(-)
+
+diff --git a/make/autoconf/lib-cups.m4 b/make/autoconf/lib-cups.m4
+index 0a7df8b381..e8b6a683a3 100644
+--- a/make/autoconf/lib-cups.m4
++++ b/make/autoconf/lib-cups.m4
+@@ -34,25 +34,18 @@ AC_DEFUN_ONCE([LIB_SETUP_CUPS],
+ AC_ARG_WITH(cups-include, [AS_HELP_STRING([--with-cups-include],
+ [specify directory for the cups include files])])
+
+- if test "x$NEEDS_LIB_CUPS" = xfalse; then
+- if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
+- (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
+- AC_MSG_WARN([[cups not used, so --with-cups[-*] is ignored]])
+- fi
++
++ WITH_CUPS="false"
++ if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
++ AC_MSG_WARN([Disable the use of cups.])
+ CUPS_CFLAGS=
+ else
+- CUPS_FOUND=no
+-
+- if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
+- AC_MSG_ERROR([It is not possible to disable the use of cups. Remove the --without-cups option.])
+- fi
+-
+ if test "x${with_cups}" != x; then
+ AC_MSG_CHECKING([for cups headers])
+ if test -s "${with_cups}/include/cups/cups.h"; then
+ CUPS_CFLAGS="-I${with_cups}/include"
+- CUPS_FOUND=yes
+- AC_MSG_RESULT([$CUPS_FOUND])
++ WITH_CUPS="true"
++ AC_MSG_RESULT([$WITH_CUPS])
+ else
+ AC_MSG_ERROR([Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option.])
+ fi
+@@ -61,25 +54,26 @@ AC_DEFUN_ONCE([LIB_SETUP_CUPS],
+ AC_MSG_CHECKING([for cups headers])
+ if test -s "${with_cups_include}/cups/cups.h"; then
+ CUPS_CFLAGS="-I${with_cups_include}"
+- CUPS_FOUND=yes
+- AC_MSG_RESULT([$CUPS_FOUND])
++ WITH_CUPS="true"
++ AC_MSG_RESULT([$WITH_CUPS])
+ else
+ AC_MSG_ERROR([Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option.])
+ fi
+ fi
+- if test "x$CUPS_FOUND" = xno; then
++ if test "x$WITH_CUPS" = "xfalse"; then
+ # Are the cups headers installed in the default /usr/include location?
+ AC_CHECK_HEADERS([cups/cups.h cups/ppd.h], [
+- CUPS_FOUND=yes
++ WITH_CUPS="true"
+ CUPS_CFLAGS=
+ DEFAULT_CUPS=yes
+ ])
+ fi
+- if test "x$CUPS_FOUND" = xno; then
++ if test "x$WITH_CUPS" = "xfalse"; then
+ HELP_MSG_MISSING_DEPENDENCY([cups])
+ AC_MSG_ERROR([Could not find cups! $HELP_MSG ])
+ fi
+ fi
+
+ AC_SUBST(CUPS_CFLAGS)
++ AC_SUBST(WITH_CUPS)
+ ])
+diff --git a/make/autoconf/libraries.m4 b/make/autoconf/libraries.m4
+index 5f16f08b20..8d64c6e8b7 100644
+--- a/make/autoconf/libraries.m4
++++ b/make/autoconf/libraries.m4
+@@ -59,14 +59,6 @@ AC_DEFUN_ONCE([LIB_DETERMINE_DEPENDENCIES],
+ NEEDS_LIB_FONTCONFIG=true
+ fi
+
+- # Check if cups is needed
+- if test "x$OPENJDK_TARGET_OS" = xwindows; then
+- # Windows have a separate print system
+- NEEDS_LIB_CUPS=false
+- else
+- NEEDS_LIB_CUPS=true
+- fi
+-
+ # A custom hook may have set this already
+ if test "x$NEEDS_LIB_FREETYPE" = "x"; then
+ NEEDS_LIB_FREETYPE=true
+diff --git a/make/autoconf/spec.gmk.in b/make/autoconf/spec.gmk.in
+index 3a85303e80..b1253daa5d 100644
+--- a/make/autoconf/spec.gmk.in
++++ b/make/autoconf/spec.gmk.in
+@@ -370,6 +370,7 @@ FREETYPE_LIBS:=@FREETYPE_LIBS@
+ FREETYPE_CFLAGS:=@FREETYPE_CFLAGS@
+ FONTCONFIG_CFLAGS:=@FONTCONFIG_CFLAGS@
+ CUPS_CFLAGS:=@CUPS_CFLAGS@
++WITH_CUPS := @WITH_CUPS@
+ ALSA_LIBS:=@ALSA_LIBS@
+ ALSA_CFLAGS:=@ALSA_CFLAGS@
+ LIBFFI_LIBS:=@LIBFFI_LIBS@
+diff --git a/make/lib/Awt2dLibraries.gmk b/make/lib/Awt2dLibraries.gmk
+index a38d416673..d0eeab35c6 100644
+--- a/make/lib/Awt2dLibraries.gmk
++++ b/make/lib/Awt2dLibraries.gmk
+@@ -141,7 +141,11 @@ ifeq ($(call isTargetOs, windows), true)
+ endif
+
+ ifeq ($(call isTargetOs, solaris linux macosx aix), true)
+- LIBAWT_EXFILES += awt_Font.c CUPSfuncs.c fontpath.c X11Color.c
++ LIBAWT_EXFILES += awt_Font.c fontpath.c X11Color.c
++endif
++
++ifeq ($(WITH_CUPS), false)
++ LIBAWT_EXFILES += CUPSfuncs.c
+ endif
+
+ ifeq ($(call isTargetOs, macosx), true)
+@@ -461,10 +465,17 @@ ifeq ($(call isTargetOs, windows macosx), false)
+ LIBAWT_HEADLESS_CFLAGS := $(CUPS_CFLAGS) $(FONTCONFIG_CFLAGS) $(X_CFLAGS) \
+ -DHEADLESS=true
+
++
++ LIBAWT_HEADLESS_EXFILES :=
++ ifeq ($(WITH_CUPS), false)
++ LIBAWT_HEADLESS_EXFILES += CUPSfuncs.c
++ endif
++
+ $(eval $(call SetupJdkLibrary, BUILD_LIBAWT_HEADLESS, \
+ NAME := awt_headless, \
+ EXTRA_SRC := $(LIBAWT_HEADLESS_EXTRA_SRC), \
+ EXCLUDES := $(LIBAWT_HEADLESS_EXCLUDES), \
++ EXCLUDE_FILES := $(LIBAWT_HEADLESS_EXFILES), \
+ OPTIMIZATION := LOW, \
+ CFLAGS := $(CFLAGS_JDKLIB) \
+ $(LIBAWT_HEADLESS_CFLAGS), \
+--
+2.26.2
+
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 @@
+From 93a94cd79b5657bc7954a23d6d3f9eda0addf773 Mon Sep 17 00:00:00 2001
+From: Richard Leitner <richard.leitner@skidata.com>
+Date: Wed, 13 May 2020 13:41:49 +0200
+Subject: [PATCH 2/2] make: autoconf: toolchain: remove invalid compiler
+ checking
+
+The checking of CC and CXX was faulty as it doesn't supported
+program arguments.
+To make things work remove the check and trust it is valid.
+
+Upstream-Status: Inappropriate [configuration]
+Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
+---
+ make/autoconf/toolchain.m4 | 15 ---------------
+ 1 file changed, 15 deletions(-)
+
+diff --git a/make/autoconf/toolchain.m4 b/make/autoconf/toolchain.m4
+index 341b2d1786..24f9f03948 100644
+--- a/make/autoconf/toolchain.m4
++++ b/make/autoconf/toolchain.m4
+@@ -526,21 +526,6 @@ AC_DEFUN([TOOLCHAIN_FIND_COMPILER],
+ if test "x[$]$1" != x; then
+ # User has supplied compiler name already, always let that override.
+ AC_MSG_NOTICE([Will use user supplied compiler $1=[$]$1])
+- if test "x`basename [$]$1`" = "x[$]$1"; then
+- # A command without a complete path is provided, search $PATH.
+-
+- AC_PATH_PROGS(POTENTIAL_$1, [$]$1)
+- if test "x$POTENTIAL_$1" != x; then
+- $1=$POTENTIAL_$1
+- else
+- AC_MSG_ERROR([User supplied compiler $1=[$]$1 could not be found])
+- fi
+- else
+- # Otherwise it might already be a complete path
+- if test ! -x "[$]$1"; then
+- AC_MSG_ERROR([User supplied compiler $1=[$]$1 does not exist])
+- fi
+- fi
+ else
+ # No user supplied value. Locate compiler ourselves.
+
+--
+2.26.2
+
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 @@
+
+# HG changeset patch
+# User qpzhang
+# Date 1580894055 -28800
+# Node ID 8e6fa89397ca26bf9f573888755d89d7104afcd4
+# Parent eaefceb7f52e0b17c070c9388e2b2578d48dcf3e
+8238386: (sctp) jdk.sctp/unix/native/libsctp/SctpNet.c "multiple definition" link errors with GCC10
+Summary: Fixed libsctp link errors caused by GCC10 default -fno-common
+Reviewed-by: chegar
+
+diff -r eaefceb7f52e -r 8e6fa89397ca src/jdk.sctp/unix/native/libsctp/Sctp.h
+--- a/src/jdk.sctp/unix/native/libsctp/Sctp.h Tue Feb 11 14:24:31 2020 +0530
++++ b/src/jdk.sctp/unix/native/libsctp/Sctp.h Wed Feb 05 17:14:15 2020 +0800
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+@@ -322,12 +322,12 @@
+
+ #endif /* __linux__ */
+
+-sctp_getladdrs_func* nio_sctp_getladdrs;
+-sctp_freeladdrs_func* nio_sctp_freeladdrs;
+-sctp_getpaddrs_func* nio_sctp_getpaddrs;
+-sctp_freepaddrs_func* nio_sctp_freepaddrs;
+-sctp_bindx_func* nio_sctp_bindx;
+-sctp_peeloff_func* nio_sctp_peeloff;
++extern sctp_getladdrs_func* nio_sctp_getladdrs;
++extern sctp_freeladdrs_func* nio_sctp_freeladdrs;
++extern sctp_getpaddrs_func* nio_sctp_getpaddrs;
++extern sctp_freepaddrs_func* nio_sctp_freepaddrs;
++extern sctp_bindx_func* nio_sctp_bindx;
++extern sctp_peeloff_func* nio_sctp_peeloff;
+
+ jboolean loadSocketExtensionFuncs(JNIEnv* env);
+
+diff -r eaefceb7f52e -r 8e6fa89397ca src/jdk.sctp/unix/native/libsctp/SctpNet.c
+--- a/src/jdk.sctp/unix/native/libsctp/SctpNet.c Tue Feb 11 14:24:31 2020 +0530
++++ b/src/jdk.sctp/unix/native/libsctp/SctpNet.c Wed Feb 05 17:14:15 2020 +0800
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+@@ -43,6 +43,13 @@
+ static const char* nativeSctpLib = "libsctp.so.1";
+ static jboolean funcsLoaded = JNI_FALSE;
+
++sctp_getladdrs_func* nio_sctp_getladdrs;
++sctp_freeladdrs_func* nio_sctp_freeladdrs;
++sctp_getpaddrs_func* nio_sctp_getpaddrs;
++sctp_freepaddrs_func* nio_sctp_freepaddrs;
++sctp_bindx_func* nio_sctp_bindx;
++sctp_peeloff_func* nio_sctp_peeloff;
++
+ JNIEXPORT jint JNICALL DEF_JNI_OnLoad
+ (JavaVM *vm, void *reserved) {
+ return JNI_VERSION_1_2;
+
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 @@
+
+# HG changeset patch
+# User qpzhang
+# Date 1580905869 -28800
+# Node ID 9e54ea7d9cd9566d28cfcd9269118a1995fc361c
+# Parent 932418820c80a87b77d96ad5f5525d282f00e82e
+8238388: libj2gss/NativeFunc.o "multiple definition" link errors with GCC10
+Summary: Fixed libj2gss link errors caused by GCC10 default -fno-common
+Reviewed-by: weijun
+
+diff -r 932418820c80 -r 9e54ea7d9cd9 src/java.security.jgss/share/native/libj2gss/NativeFunc.c
+--- a/src/java.security.jgss/share/native/libj2gss/NativeFunc.c Wed Feb 05 10:45:39 2020 +0100
++++ b/src/java.security.jgss/share/native/libj2gss/NativeFunc.c Wed Feb 05 20:31:09 2020 +0800
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+@@ -27,6 +27,9 @@
+ #include <stdlib.h>
+ #include "NativeFunc.h"
+
++/* global GSS function table */
++GSS_FUNCTION_TABLE_PTR ftab;
++
+ /* standard GSS method names (ordering is from mapfile) */
+ static const char RELEASE_NAME[] = "gss_release_name";
+ static const char IMPORT_NAME[] = "gss_import_name";
+diff -r 932418820c80 -r 9e54ea7d9cd9 src/java.security.jgss/share/native/libj2gss/NativeFunc.h
+--- a/src/java.security.jgss/share/native/libj2gss/NativeFunc.h Wed Feb 05 10:45:39 2020 +0100
++++ b/src/java.security.jgss/share/native/libj2gss/NativeFunc.h Wed Feb 05 20:31:09 2020 +0800
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+@@ -277,6 +277,6 @@
+ typedef GSS_FUNCTION_TABLE *GSS_FUNCTION_TABLE_PTR;
+
+ /* global GSS function table */
+-GSS_FUNCTION_TABLE_PTR ftab;
++extern GSS_FUNCTION_TABLE_PTR ftab;
+
+ #endif
+
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 @@
+
+# HG changeset patch
+# User qpzhang
+# Date 1580822830 -28800
+# Node ID 6925fca959590dd0f747a9cffa5f0664ec02c7b1
+# Parent 8f6ffa575f63db3f07f96e52c97883fbaff459b4
+8238380: java.base/unix/native/libjava/childproc.c "multiple definition" link errors with GCC10
+Reviewed-by: stuefe, clanger, rriggs
+Contributed-by: patrick@os.amperecomputing.com
+
+diff -r 8f6ffa575f63 -r 6925fca95959 src/java.base/unix/native/libjava/childproc.c
+--- a/src/java.base/unix/native/libjava/childproc.c Tue Feb 11 11:17:37 2020 +0800
++++ b/src/java.base/unix/native/libjava/childproc.c Tue Feb 04 21:27:10 2020 +0800
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+@@ -34,6 +34,7 @@
+
+ #include "childproc.h"
+
++const char * const *parentPathv;
+
+ ssize_t
+ restartableWrite(int fd, const void *buf, size_t count)
+diff -r 8f6ffa575f63 -r 6925fca95959 src/java.base/unix/native/libjava/childproc.h
+--- a/src/java.base/unix/native/libjava/childproc.h Tue Feb 11 11:17:37 2020 +0800
++++ b/src/java.base/unix/native/libjava/childproc.h Tue Feb 04 21:27:10 2020 +0800
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+@@ -126,7 +126,7 @@
+ * The cached and split version of the JDK's effective PATH.
+ * (We don't support putenv("PATH=...") in native code)
+ */
+-const char * const *parentPathv;
++extern const char * const *parentPathv;
+
+ ssize_t restartableWrite(int fd, const void *buf, size_t count);
+ int restartableDup2(int fd_from, int fd_to);
+