diff options
author | Alex Xu (Hello71) <alex_y_xu@yahoo.ca> | 2020-07-28 09:41:37 -0400 |
---|---|---|
committer | Alex Xu (Hello71) <alex_y_xu@yahoo.ca> | 2020-07-28 09:41:37 -0400 |
commit | d241ee7943383a8ad8aacd70d5e301a6acf22c38 (patch) | |
tree | 5aaddca6d5744a9e3565da0846cbda2e1a34be3b /dev-java/openj9-openjdk/files | |
download | gentoo-overlay-d241ee7943383a8ad8aacd70d5e301a6acf22c38.tar.xz gentoo-overlay-d241ee7943383a8ad8aacd70d5e301a6acf22c38.zip |
Initial commit
Diffstat (limited to 'dev-java/openj9-openjdk/files')
7 files changed, 277 insertions, 0 deletions
diff --git a/dev-java/openj9-openjdk/files/omr-fam.patch b/dev-java/openj9-openjdk/files/omr-fam.patch new file mode 100644 index 0000000..9141ec1 --- /dev/null +++ b/dev-java/openj9-openjdk/files/omr-fam.patch @@ -0,0 +1,70 @@ +diff --git a/ddr/tools/blob_reader/blob_reader.cpp b/ddr/tools/blob_reader/blob_reader.cpp +index 028decd0c..a0212609f 100644 +--- a/ddr/tools/blob_reader/blob_reader.cpp ++++ b/ddr/tools/blob_reader/blob_reader.cpp +@@ -85,7 +85,7 @@ struct BlobHeaderV1 { + + struct BlobString { + uint16_t length; +- char data[1]; /* flexible array member */ ++ char data[]; + + void endian_swap() + { +diff --git a/include_core/ute_core.h b/include_core/ute_core.h +index 8b3b1c65d..330ea52c6 100644 +--- a/include_core/ute_core.h ++++ b/include_core/ute_core.h +@@ -125,7 +125,7 @@ typedef struct UtTraceRecord { + uint64_t threadSyn2; /* Thread synonym 2 */ + int32_t firstEntry; /* Offset to first trace entry */ + int32_t nextEntry; /* Offset to next entry */ +- char threadName[1]; /* Thread name */ ++ char threadName[]; /* Thread name */ + } UtTraceRecord; + + /* +diff --git a/include_core/ute_dataformat.h b/include_core/ute_dataformat.h +index 71d9e36ad..8a9dcb487 100644 +--- a/include_core/ute_dataformat.h ++++ b/include_core/ute_dataformat.h +@@ -180,7 +180,7 @@ typedef struct UtProcSection { + #define UT_TRACE_ACTIVE_SECTION_NAME "UTTA" + typedef struct UtActiveSection { + UtDataHeader header; /* Eyecatcher, version etc */ +- char active[1]; /* Trace activation commands */ ++ char active[]; /* Trace activation commands */ + } UtActiveSection; + + /* +@@ -191,7 +191,7 @@ typedef struct UtActiveSection { + #define UT_TRACE_SERVICE_SECTION_NAME "UTSS" + typedef struct UtServiceSection { + UtDataHeader header; /* Eyecatcher, version etc */ +- char level[1]; /* Service level info */ ++ char level[]; /* Service level info */ + } UtServiceSection; + + /* +@@ -202,7 +202,7 @@ typedef struct UtServiceSection { + #define UT_TRACE_STARTUP_SECTION_NAME "UTSO" + typedef struct UtStartupSection { + UtDataHeader header; /* Eyecatcher, version etc */ +- char options[1]; /* Startup options */ ++ char options[]; /* Startup options */ + } UtStartupSection; + + /* +diff --git a/omrtrace/omrtrace_internal.h b/omrtrace/omrtrace_internal.h +index e52347eac..a68a88abd 100644 +--- a/omrtrace/omrtrace_internal.h ++++ b/omrtrace/omrtrace_internal.h +@@ -157,7 +157,7 @@ typedef struct OMR_TraceGlobal OMR_TraceGlobal; + typedef struct UtTraceCfg { + UtDataHeader header; + struct UtTraceCfg *next; /* Next trace config command */ +- char command[1]; /* Start of variable length section */ ++ char command[]; /* Start of variable length section */ + } UtTraceCfg; + + typedef struct UtDeferredConfigInfo { diff --git a/dev-java/openj9-openjdk/files/omr-omrstr-iconv-failure-overflow.patch b/dev-java/openj9-openjdk/files/omr-omrstr-iconv-failure-overflow.patch new file mode 100644 index 0000000..f90c431 --- /dev/null +++ b/dev-java/openj9-openjdk/files/omr-omrstr-iconv-failure-overflow.patch @@ -0,0 +1,13 @@ +diff --git a/port/common/omrstr.c b/port/common/omrstr.c +index ad76cdf93..f936f0026 100644 +--- a/port/common/omrstr.c ++++ b/port/common/omrstr.c +@@ -3121,7 +3121,7 @@ convertPlatformToWide(struct OMRPortLibrary *portLibrary, charconvState_t encodi + } else if (E2BIG == errno) { + resultSize = (outBufferSize - wideBufferLimit); /* number of bytes written */ + } else { +- resultSize = OMRPORT_ERROR_STRING_ILLEGAL_STRING; ++ return OMRPORT_ERROR_STRING_ILLEGAL_STRING; + } + } else { + resultSize = (outBufferSize - wideBufferLimit); /* number of bytes written */ diff --git a/dev-java/openj9-openjdk/files/openj9-j9utf8-fam.patch b/dev-java/openj9-openjdk/files/openj9-j9utf8-fam.patch new file mode 100644 index 0000000..f45a539 --- /dev/null +++ b/dev-java/openj9-openjdk/files/openj9-j9utf8-fam.patch @@ -0,0 +1,26 @@ +diff --git a/runtime/cfdumper/romdump.c b/runtime/cfdumper/romdump.c +index 5040c2c25..1cfcd36c7 100644 +--- a/runtime/cfdumper/romdump.c ++++ b/runtime/cfdumper/romdump.c +@@ -154,7 +154,7 @@ addRegion(J9Pool *regionPool, UDATA offset, UDATA length, UDATA type, const char + static UDATA + getUTF8Length(J9UTF8 *utf8) + { +- UDATA length = sizeof(J9UTF8) + J9UTF8_LENGTH(utf8) - sizeof(J9UTF8_DATA(utf8)); ++ UDATA length = sizeof(J9UTF8) + J9UTF8_LENGTH(utf8); + if (length & 1) { + length++; + } +diff --git a/runtime/oti/j9nonbuilder.h b/runtime/oti/j9nonbuilder.h +index c5705188d..e9babe227 100644 +--- a/runtime/oti/j9nonbuilder.h ++++ b/runtime/oti/j9nonbuilder.h +@@ -3219,7 +3219,7 @@ typedef struct J9ClassLoader { + + typedef struct J9UTF8 { + U_16 length; +- U_8 data[2]; ++ U_8 data[]; + } J9UTF8; + + typedef struct J9ROMClass { diff --git a/dev-java/openj9-openjdk/files/openj9-make-jvmti-test-variables-static.patch b/dev-java/openj9-openjdk/files/openj9-make-jvmti-test-variables-static.patch new file mode 100644 index 0000000..5d5b8a7 --- /dev/null +++ b/dev-java/openj9-openjdk/files/openj9-make-jvmti-test-variables-static.patch @@ -0,0 +1,68 @@ +From b91f42fc90179585c3e2a9866e93a3168b1ada9d Mon Sep 17 00:00:00 2001 +From: Graham Chapman <graham_chapman@ca.ibm.com> +Date: Sat, 25 Jul 2020 16:13:13 -0400 +Subject: [PATCH] Make JVMTI test variables static + +Two tests declare the same named global non-statically which breaks some +newer compilers. + +Fixes: #10252 + +[ci skip] + +Signed-off-by: Graham Chapman <graham_chapman@ca.ibm.com> +--- + .../src/com/ibm/jvmti/tests/traceSubscription/ts001.c | 4 ++-- + .../jvmtitests/src/com/ibm/jvmti/tests/verboseGC/vgc001.c | 8 ++++---- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/traceSubscription/ts001.c b/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/traceSubscription/ts001.c +index 97843fc7c7..2c1e1ae67f 100644 +--- a/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/traceSubscription/ts001.c ++++ b/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/traceSubscription/ts001.c +@@ -1,5 +1,5 @@ + /******************************************************************************* +- * Copyright (c) 2001, 2018 IBM Corp. and others ++ * Copyright (c) 2001, 2020 IBM Corp. and others + * + * This program and the accompanying materials are made available under + * the terms of the Eclipse Public License 2.0 which accompanies this +@@ -35,7 +35,7 @@ static jvmtiExtensionFunction subscribe = NULL; + static jvmtiExtensionFunction unsubscribe = NULL; + static jvmtiExtensionFunction flush = NULL; + static jvmtiExtensionFunction metadata = NULL; +-void *subscriptionID; ++static void *subscriptionID; + volatile static jint bufferCount = 0; + volatile static jint bufferCountFinal = 0; + volatile static int completed = 0; +diff --git a/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/verboseGC/vgc001.c b/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/verboseGC/vgc001.c +index 2fda9e8bd7..f1601298af 100644 +--- a/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/verboseGC/vgc001.c ++++ b/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/verboseGC/vgc001.c +@@ -1,5 +1,5 @@ + /******************************************************************************* +- * Copyright (c) 2001, 2018 IBM Corp. and others ++ * Copyright (c) 2001, 2020 IBM Corp. and others + * + * This program and the accompanying materials are made available under + * the terms of the Eclipse Public License 2.0 which accompanies this +@@ -31,15 +31,15 @@ static agentEnv * env; + static jvmtiExtensionFunction subscribe = NULL; + static jvmtiExtensionFunction unsubscribe = NULL; + +-void *subscriptionID; ++static void *subscriptionID; + volatile static jint bufferCount = 0; + volatile static int alarmed = 0; + +-void *subscriptionID2; ++static void *subscriptionID2; + volatile static jint bufferCount2 = 0; + volatile static int alarmed2 = 0; + +-void *subscriptionID3; ++static void *subscriptionID3; + volatile static jint bufferCount3 = 0; + volatile static int alarmed3 = 0; + diff --git a/dev-java/openj9-openjdk/files/openj9-subscriptionID.patch b/dev-java/openj9-openjdk/files/openj9-subscriptionID.patch new file mode 100644 index 0000000..e754e05 --- /dev/null +++ b/dev-java/openj9-openjdk/files/openj9-subscriptionID.patch @@ -0,0 +1,36 @@ +diff --git a/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/traceSubscription/ts001.c b/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/traceSubscription/ts001.c +index 97843fc7c..a2cc3ffe6 100644 +--- a/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/traceSubscription/ts001.c ++++ b/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/traceSubscription/ts001.c +@@ -35,7 +35,7 @@ static jvmtiExtensionFunction subscribe = NULL; + static jvmtiExtensionFunction unsubscribe = NULL; + static jvmtiExtensionFunction flush = NULL; + static jvmtiExtensionFunction metadata = NULL; +-void *subscriptionID; ++static void *subscriptionID; + volatile static jint bufferCount = 0; + volatile static jint bufferCountFinal = 0; + volatile static int completed = 0; +diff --git a/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/verboseGC/vgc001.c b/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/verboseGC/vgc001.c +index 2fda9e8bd..d11047e44 100644 +--- a/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/verboseGC/vgc001.c ++++ b/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/verboseGC/vgc001.c +@@ -31,15 +31,15 @@ static agentEnv * env; + static jvmtiExtensionFunction subscribe = NULL; + static jvmtiExtensionFunction unsubscribe = NULL; + +-void *subscriptionID; ++static void *subscriptionID; + volatile static jint bufferCount = 0; + volatile static int alarmed = 0; + +-void *subscriptionID2; ++static void *subscriptionID2; + volatile static jint bufferCount2 = 0; + volatile static int alarmed2 = 0; + +-void *subscriptionID3; ++static void *subscriptionID3; + volatile static jint bufferCount3 = 0; + volatile static int alarmed3 = 0; + diff --git a/dev-java/openj9-openjdk/files/openjdk-14.env.sh b/dev-java/openj9-openjdk/files/openjdk-14.env.sh new file mode 100644 index 0000000..96c4be7 --- /dev/null +++ b/dev-java/openj9-openjdk/files/openjdk-14.env.sh @@ -0,0 +1,16 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +VERSION="OpenJDK ${PV}" +JAVA_HOME="${EPREFIX}/usr/$(get_libdir)/${PN}-${SLOT}" +JDK_HOME="${EPREFIX}/usr/$(get_libdir)/${PN}-${SLOT}" +JAVAC="\${JAVA_HOME}/bin/javac" +PATH="\${JAVA_HOME}/bin" +ROOTPATH="\${JAVA_HOME}/bin" +LDPATH="\${JAVA_HOME}/lib/:\${JAVA_HOME}/lib/server/" +MANPATH="" +PROVIDES_TYPE="JDK JRE" +PROVIDES_VERSION="${SLOT}" +BOOTCLASSPATH="" +GENERATION="2" +ENV_VARS="JAVA_HOME JDK_HOME JAVAC PATH ROOTPATH LDPATH MANPATH" diff --git a/dev-java/openj9-openjdk/files/openjdk-8238380-childproc-fcommon.patch b/dev-java/openj9-openjdk/files/openjdk-8238380-childproc-fcommon.patch new file mode 100644 index 0000000..a972bc6 --- /dev/null +++ b/dev-java/openj9-openjdk/files/openjdk-8238380-childproc-fcommon.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); + |