1
0

Accepting request 957994 from Java:Factory

Fix build + January 2022 CPU

OBS-URL: https://build.opensuse.org/request/show/957994
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/java-1_8_0-openj9?expand=0&rev=12
This commit is contained in:
Dominique Leuenberger 2022-03-01 16:03:17 +00:00 committed by Git OBS Bridge
commit a1876f40f5
9 changed files with 123 additions and 22 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:29052f338fae3639cc0d6c276cd9daad10c9fa36d9f95a7c44d623003173a323
size 10908411

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ab4f67bc9bc9657bcbabc69a7557937fa19e7cc1c76d6e154c44d2b7ef9f6203
size 126304966

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9fc5faabb0415d77698786aae49ee6545eea96fa240d602c5eb4057eac1f1e32
size 27607470

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7c632b9594a00931fc1b22379d3266ba74f818f3efe9d13941ae62c5a0c98621
size 126350461

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0a6d195f0967c04a259959267e71d45f498f0ec113517e7bdbc35afcaeedaa84
size 10918222

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:263b6d7de931adc6e5560dcf1b8391f2562cc27925c70098383daaed9c6237b0
size 27440554

View File

@ -1,3 +1,18 @@
-------------------------------------------------------------------
Mon Feb 28 09:47:15 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Update to OpenJDK 8u322 build 04 with OpenJ9 0.30.0 virtual
machine
* including Oracle January 2022 CPU changes (bsc#1194925,
bsc#1194926, bsc#1194927, bsc#1194928, bsc#1194929, bsc#1194930,
bsc#1194931, bsc#1194932, bsc#1194933, bsc#1194934, bsc#1194935,
bsc#1194939, bsc#1194940, bsc#1194941)
* OpenJ9 changes, see
https://www.eclipse.org/openj9/docs/version0.30
- Added patch:
* libdwarf-fix.patch
+ fix build with different versions of libdwarf
-------------------------------------------------------------------
Tue Nov 2 11:29:15 UTC 2021 - Fridrich Strba <fstrba@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package java-1_8_0-openj9
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -26,18 +26,18 @@
%global abs2rel perl -e %{script}
%global syslibdir %{_libdir}
# Standard JPackage naming and versioning defines.
%global updatever 312
%global buildver b07
%global updatever 322
%global buildver b04
%global root_repository https://github.com/ibmruntimes/openj9-openjdk-jdk8/archive
%global root_revision 8860d39588d2d66201a71dd205443b7fd8182acd
%global root_branch v0.29.0-release
%global root_revision c1d9a7af7c130f57867717a12ee9dfdbad4ecc10
%global root_branch v0.30.0-release
%global omr_repository https://github.com/eclipse/openj9-omr/archive
%global omr_revision 299b6a2d28cf992edf57ca43b67ed6d6917675bf
%global omr_branch v0.29.0-release
%global omr_revision dac962a283adbd3508fa1af3ae892e10903f0ef1
%global omr_branch v0.30.0-release
%global openj9_repository https://github.com/eclipse/openj9/archive
%global openj9_revision e1e72c497688c765183573526f7418a6fe891e93
%global openj9_branch v0.29.0-release
%global openj9_tag openj9-0.29.0
%global openj9_revision 9dccbe076db9055f4020bae78513f52c02572ba4
%global openj9_branch v0.30.0-release
%global openj9_tag openj9-0.30.0
%global freemarker_version 2.3.29
# priority must be 6 digits in total
%global priority 1801
@ -114,6 +114,8 @@ Patch1: java-atk-wrapper-security.patch
Patch2: multiple-pkcs11-library-init.patch
# Disable doclint for compatibility
Patch3: disable-doclint-by-default.patch
# Allow building with newer libdwarf
Patch4: libdwarf-fix.patch
# Patches for system libraries
Patch201: system-libjpeg.patch
Patch202: system-libpng.patch
@ -357,6 +359,7 @@ rm -rvf jdk/src/share/native/sun/java2d/cmm/lcms/lcms2*
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch300 -p1
@ -396,6 +399,7 @@ bash configure \
CC=gcc-7 \
NM=gcc-nm-7 \
%endif
--enable-demos \
--disable-zip-debug-info \
--with-milestone="fcs" \
--with-update-version=%{updatever} \
@ -774,8 +778,6 @@ update-alternatives \
%{_mandir}/man1/jconsole-%{sdklnk}.1$ext \
--slave %{_mandir}/man1/jdb.1$ext jdb.1$ext \
%{_mandir}/man1/jdb-%{sdklnk}.1$ext \
--slave %{_mandir}/man1/jmap.1$ext jmap.1$ext \
%{_mandir}/man1/jmap-%{sdklnk}.1$ext \
--slave %{_mandir}/man1/jrunscript.1$ext jrunscript.1$ext \
%{_mandir}/man1/jrunscript-%{sdklnk}.1$ext \
--slave %{_mandir}/man1/jsadebugd.1$ext jsadebugd.1$ext \
@ -933,7 +935,6 @@ fi
%{_mandir}/man1/jconsole-%{sdklnk}.1%{?ext_man}
%{_mandir}/man1/jdb-%{sdklnk}.1%{?ext_man}
%{_mandir}/man1/jdeps-%{sdklnk}.1%{?ext_man}
%{_mandir}/man1/jmap-%{sdklnk}.1%{?ext_man}
%{_mandir}/man1/jrunscript-%{sdklnk}.1%{?ext_man}
%{_mandir}/man1/jsadebugd-%{sdklnk}.1%{?ext_man}
%{_mandir}/man1/native2ascii-%{sdklnk}.1%{?ext_man}

85
libdwarf-fix.patch Normal file
View File

@ -0,0 +1,85 @@
--- a/omr/ddr/lib/ddr-scanner/dwarf/DwarfScanner.cpp
+++ b/omr/ddr/lib/ddr-scanner/dwarf/DwarfScanner.cpp
@@ -1497,6 +1497,13 @@ DwarfScanner::traverse_cu_in_debug_section(Symbol_IR *ir)
Dwarf_Half addressSize = 0;
Dwarf_Unsigned nextCUheader = 0;
Dwarf_Error error = NULL;
+#ifdef DW_LIBDWARF_VERSION_MAJOR
+ Dwarf_Half lengthSize = 0;
+ Dwarf_Half extensionSize = 0;
+ Dwarf_Sig8 typeSignature;
+ Dwarf_Unsigned typeOffset = 0;
+ Dwarf_Half nextCUheaderType = 0;
+#endif
/* Go over each cu header. */
while (DDR_RC_OK == rc) {
@@ -1504,7 +1511,11 @@ DwarfScanner::traverse_cu_in_debug_section(Symbol_IR *ir)
_typeOffsetMap.clear();
_ir = &newIR;
+#ifdef DW_LIBDWARF_VERSION_MAJOR
+ int ret = dwarf_next_cu_header_d(_debug, true, &cuHeaderLength, &versionStamp, &abbrevOffset, &addressSize, &lengthSize, &extensionSize, &typeSignature, &typeOffset, &nextCUheader, &nextCUheaderType, &error);
+#else
int ret = dwarf_next_cu_header(_debug, &cuHeaderLength, &versionStamp, &abbrevOffset, &addressSize, &nextCUheader, &error);
+#endif
if (DW_DLV_ERROR == ret) {
ERRMSG("Failed to get next dwarf CU header.");
rc = DDR_RC_ERROR;
@@ -1518,7 +1529,11 @@ DwarfScanner::traverse_cu_in_debug_section(Symbol_IR *ir)
Dwarf_Die childDie = NULL;
/* Expect the CU to have a single sibling - a DIE */
+#ifdef DW_LIBDWARF_VERSION_MAJOR
+ if (DW_DLV_ERROR == dwarf_siblingof_b(_debug, NULL, true, &cuDie, &error)) {
+#else
if (DW_DLV_ERROR == dwarf_siblingof(_debug, NULL, &cuDie, &error)) {
+#endif
ERRMSG("Getting sibling of CU: %s\n", dwarf_errmsg(error));
rc = DDR_RC_ERROR;
break;
@@ -1617,12 +1632,20 @@ DwarfScanner::scanFile(OMRPortLibrary *portLibrary, Symbol_IR *ir, const char *f
}
if (DDR_RC_OK == rc) {
+#ifdef DW_LIBDWARF_VERSION_MAJOR
+ unsigned int groupNumber = DW_GROUPNUMBER_ANY;
+#else
Dwarf_Unsigned access = DW_DLC_READ;
+#endif
Dwarf_Handler errhand = 0;
Dwarf_Ptr errarg = NULL;
intptr_t native_fd = omrfile_convert_omrfile_fd_to_native_fd(fd);
DwarfScanner::scanFileName = filepath;
+#ifdef DW_LIBDWARF_VERSION_MAJOR
+ res = dwarf_init_b((int)native_fd, groupNumber, errhand, errarg, &_debug, &error);
+#else
res = dwarf_init((int)native_fd, access, errhand, errarg, &_debug, &error);
+#endif
if (DW_DLV_OK != res) {
ERRMSG("Failed to initialize libDwarf scanning %s: %s\nExiting...\n", filepath, dwarf_errmsg(error));
if (NULL != error) {
@@ -1640,7 +1663,11 @@ DwarfScanner::scanFile(OMRPortLibrary *portLibrary, Symbol_IR *ir, const char *f
DEBUGPRINTF("Unloading libDwarf");
+#ifdef DW_LIBDWARF_VERSION_MAJOR
+ res = dwarf_finish(_debug);
+#else
res = dwarf_finish(_debug, &error);
+#endif
if (DW_DLV_OK != res) {
ERRMSG("Failed to Unload libDwarf: %s\nExiting...\n", dwarf_errmsg(error));
if (NULL != error) {
@@ -1681,7 +1708,11 @@ DwarfScanner::getNextSibling(Dwarf_Die *die)
Dwarf_Error err = NULL;
/* Get the next sibling and free the previous one if successful. */
+#ifdef DW_LIBDWARF_VERSION_MAJOR
+ int ret = dwarf_siblingof_b(_debug, *die, true, &nextSibling, &err);
+#else
int ret = dwarf_siblingof(_debug, *die, &nextSibling, &err);
+#endif
if (DW_DLV_ERROR == ret) {
ERRMSG("Getting sibling of die:%s\n", dwarf_errmsg(err));
} else if (DW_DLV_OK == ret) {