diff options
Diffstat (limited to 'dev-java/openj9-openjdk')
-rw-r--r-- | dev-java/openj9-openjdk/Manifest | 8 | ||||
-rw-r--r-- | dev-java/openj9-openjdk/files/omr-fam.patch | 70 | ||||
-rw-r--r-- | dev-java/openj9-openjdk/files/openj9-no-o3.patch | 11 | ||||
-rw-r--r-- | dev-java/openj9-openjdk/files/openj9-openjdk-override-version.patch | 11 | ||||
-rw-r--r-- | dev-java/openj9-openjdk/files/openj9-openjdk.env.sh | 3 | ||||
-rw-r--r-- | dev-java/openj9-openjdk/metadata.xml | 14 | ||||
-rw-r--r-- | dev-java/openj9-openjdk/openj9-openjdk-11.0.41.0.ebuild (renamed from dev-java/openj9-openjdk/openj9-openjdk-16.0.27.1.ebuild) | 128 | ||||
-rw-r--r-- | dev-java/openj9-openjdk/openj9-openjdk-17.0.41.0.ebuild (renamed from dev-java/openj9-openjdk/openj9-openjdk-11.0.27.1.ebuild) | 145 |
8 files changed, 148 insertions, 242 deletions
diff --git a/dev-java/openj9-openjdk/Manifest b/dev-java/openj9-openjdk/Manifest index 89d0bef..59d3825 100644 --- a/dev-java/openj9-openjdk/Manifest +++ b/dev-java/openj9-openjdk/Manifest @@ -1,4 +1,4 @@ -DIST openj9-0.27.1.tar.gz 16668711 BLAKE2B 091047b3770d86b652042b49f419c4d4597bb13630b853223a909fa0a135b0252d280e9ba2f1735c9f1c02dceb33a997e7906464d83669cd20d7993766ac46fc SHA512 1ba28787cf92eafb0e789ecac33b0f772bea6d4856f6120befe9c1928a8dcac04569808b053209fafa09a097c32fd3eed2c6c7137250a4e8b6cb96d37e4eec4e -DIST openj9-omr-0.27.1.tar.gz 7815053 BLAKE2B 97d4481dbcd8643e95e2ff50b873f1018c297dff0140207c3352ba5c5395092d21a1b2abcb5796f4d96daf4635f3a86cf76fab8376457fca7f8d1f4692ff9b03 SHA512 980d13ad900aec0d644058f3738f53b29467f4fbda03a2094ccceaa34955e79165002dc2d441af0fe878b523f62b15d315375dea2d5fa57942b5d1509e7afbbd -DIST openj9-openjdk-jdk11-openj9-0.27.1.tar.gz 108889106 BLAKE2B 32260d462fd1daab077cd72f5bd16ae793309d1efa930dcc5cbb2c56b1fc33194f93a4aaef904b23c9a6d16b0206042fbd3a1bc812005e2d115a3f5564849b6f SHA512 a33d0382c4a13cc608341715214c52ef3a81d8476291c078f6a808ebd0674b5f6153645fbd61ec818298e8e82d962b92107b73be67d3ab2610bbbae06804c28b -DIST openj9-openjdk-jdk16-openj9-0.27.1.tar.gz 90946973 BLAKE2B 6e06d96e74b8201fbec23eca14329b13f2a828a0abc6b29658a0b84af927f04142d2f9fd7810e93a00ab6d99e8bc71d38c21fc4bc26eb334166d596567b0f51b SHA512 c170ded18e3f1a41b3cc83d8d16202b4debdcd3d2fa4fbca7ce2c78be1d3d3fa8bc0d466b0a280b7c63a1161e3f50ece3b468096876a61e0cdb999d402895e06 +DIST openj9-0.41.0.tar.gz 18175551 BLAKE2B 691251444980b715b30d2624f6bf9e3964fb848201491f9ac18076ad8d4e354f34ba38affdf55ddf2631ddbd980a5fa4a39a7ac4dab9da8d8cf912711e03009a SHA512 39b5b3d950954183fcfce40398ab7a990a5030e7f403d2e1eb216a914345ec78bcdac14c5c2b24c7ddafcb75a91e267b03c752f88189b537258967f2d191efea +DIST openj9-omr-0.41.0.tar.gz 8058703 BLAKE2B ead5711d9ab0400ddee7798c594585b9bfe73eeb20fc59f191ba062e64005f8c41c4ff8049e58d95cdb5f2175929274ae306c0b4f7938e8c5c8df2f9962d59df SHA512 2429994271f8367204b0e6d75450a7d283dc0fc1166055340a050cf80e06e87d95e3df0607d8d2554fb4adfa712f6ff048fb3d0fb24efed1960e5e3802b7f02d +DIST openj9-openjdk-jdk11-openj9-0.41.0.tar.gz 102514856 BLAKE2B cb1bdc624ae4222ceaac329c5a70ac9f69003bad1dafbd2600fd088538a988b659f368615d5a269c0965caeb14df5b60cf80231d203fbe4a6302ba14a29fccaa SHA512 681a5d636c4672dae489cf71dfd6d9f8879a6ffe795912ecf9fa8f319f2039a16b9db2a75ee69bee9330f2978c411b077d496dc46ff91d9ec4c835f2b32d6142 +DIST openj9-openjdk-jdk17-openj9-0.41.0.tar.gz 95151687 BLAKE2B 4f31f740d3bc568910ec9c0c55b980a51e13272c1fd2d740e019b0fbe1631910e4f961170b26221bcf49d88e47fe0f314ab1182d113581abdecd096f873f71f6 SHA512 5d6e58a317c641b5b73295ee2f3ca63e85d14385640727e949ad06c41dc260fd710eef9f5eac8cb426e1524439359340f2d1ab606c752d77643baeb3201a2d18 diff --git a/dev-java/openj9-openjdk/files/omr-fam.patch b/dev-java/openj9-openjdk/files/omr-fam.patch deleted file mode 100644 index 9141ec1..0000000 --- a/dev-java/openj9-openjdk/files/omr-fam.patch +++ /dev/null @@ -1,70 +0,0 @@ -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/openj9-no-o3.patch b/dev-java/openj9-openjdk/files/openj9-no-o3.patch index 63d1dcf..b332052 100644 --- a/dev-java/openj9-openjdk/files/openj9-no-o3.patch +++ b/dev-java/openj9-openjdk/files/openj9-no-o3.patch @@ -1,11 +1,10 @@ -diff -ru a/runtime/cmake/platform/toolcfg/gnu.cmake b/runtime/cmake/platform/toolcfg/gnu.cmake ---- a/runtime/cmake/platform/toolcfg/gnu.cmake 2021-07-20 17:24:52.000000000 -0400 -+++ b/runtime/cmake/platform/toolcfg/gnu.cmake 2021-08-07 09:46:15.685325927 -0400 +--- a/runtime/cmake/platform/toolcfg/gnu.cmake ++++ b/runtime/cmake/platform/toolcfg/gnu.cmake @@ -20,7 +20,6 @@ # SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception ################################################################################ -list(APPEND OMR_PLATFORM_COMPILE_OPTIONS -O3 -g -fstack-protector) - list(APPEND OMR_PLATFORM_C_COMPILE_OPTIONS -Wimplicit -Wreturn-type) - list(APPEND OMR_PLATFORM_CXX_COMPILE_OPTIONS -fno-threadsafe-statics) - + if(OMR_DDR AND NOT (CMAKE_C_COMPILER_VERSION VERSION_LESS 11)) + # In gcc 11+ the default is to use DWARF version 5 which is not yet + # supported by ddrgen: tell the compiler to use DWARF version 4. diff --git a/dev-java/openj9-openjdk/files/openj9-openjdk-override-version.patch b/dev-java/openj9-openjdk/files/openj9-openjdk-override-version.patch new file mode 100644 index 0000000..1652627 --- /dev/null +++ b/dev-java/openj9-openjdk/files/openj9-openjdk-override-version.patch @@ -0,0 +1,11 @@ +--- a/closed/OpenJ9.gmk ++++ b/closed/OpenJ9.gmk +@@ -44,7 +44,7 @@ + # $4 - 'required' for a required repository, anything else for an optional one + GetVersion = $(eval $(call GetVersionHelper,$(strip $1),$(strip $2),$(strip $3),$(strip $4))) + define GetVersionHelper +- $2 := $$(if $(wildcard $3),$$(shell $(GIT) -C $3 rev-parse --short HEAD)) ++ $2 := $$(if $$($2),$$($2),$$(if $(wildcard $3),$$(shell $(GIT) -C $3 rev-parse --short HEAD))) + ifneq (,$$($2)) + VersionLabelWidth := $(shell $(ECHO) "$1" | $(AWK) "{ width = length; print (width > $(VersionLabelWidth) ? width : $(VersionLabelWidth)) }") + VersionPairs += "$1" "$$($2)" diff --git a/dev-java/openj9-openjdk/files/openj9-openjdk.env.sh b/dev-java/openj9-openjdk/files/openj9-openjdk.env.sh index 5aac9c7..8d0d130 100644 --- a/dev-java/openj9-openjdk/files/openj9-openjdk.env.sh +++ b/dev-java/openj9-openjdk/files/openj9-openjdk.env.sh @@ -1,6 +1,3 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - VERSION="OpenJDK ${SLOT} with OpenJ9 ${OPENJ9_PV}" JAVA_HOME="${EPREFIX}/usr/$(get_libdir)/${PN}-${SLOT}" JDK_HOME="${EPREFIX}/usr/$(get_libdir)/${PN}-${SLOT}" diff --git a/dev-java/openj9-openjdk/metadata.xml b/dev-java/openj9-openjdk/metadata.xml index 50669cc..dadf469 100644 --- a/dev-java/openj9-openjdk/metadata.xml +++ b/dev-java/openj9-openjdk/metadata.xml @@ -1,19 +1,17 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <longdescription> - Java™ is the world's leading programming language and platform. - The code for Java is open source and available at OpenJDK™. - </longdescription> - <slots> - <slot name="11">Java™ version 11</slot> - </slots> + <maintainer type="person"> + <email>alex_y_xu@yahoo.ca</email> + <name>Alex Xu (Hello71)</name> + </maintainer> <use> <flag name="ddr">Enable Direct Dump Reader</flag> <flag name="headless-awt">Don't install the X backend for AWT, needed by some GUIs</flag> - <flag name="gentoo-vm">Allow this JDK to be recognised by Gentoo (package manager, eselect, java-config, EXPERIMENTAL!)</flag> <flag name="javafx">Import OpenJFX modules at build time, via <pkg>dev-java/openjfx</pkg></flag> <flag name="jbootstrap">Build OpenJDK twice, the second time using the result of the first</flag> + <flag name="jitserver">OpenJ9 JITServer support</flag> + <flag name="numa">Enable NUMA support using sys-process/numactl (NUMA kernel support is also required)</flag> <flag name="systemtap">Enable SystemTAP/DTrace tracing</flag> </use> </pkgmetadata> diff --git a/dev-java/openj9-openjdk/openj9-openjdk-16.0.27.1.ebuild b/dev-java/openj9-openjdk/openj9-openjdk-11.0.41.0.ebuild index 12447f2..35bc082 100644 --- a/dev-java/openj9-openjdk/openj9-openjdk-16.0.27.1.ebuild +++ b/dev-java/openj9-openjdk/openj9-openjdk-11.0.41.0.ebuild @@ -1,17 +1,16 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 -inherit autotools check-reqs flag-o-matic java-pkg-2 java-vm-2 multiprocessing pax-utils toolchain-funcs versionator +inherit check-reqs eapi8-dosym flag-o-matic java-pkg-2 java-vm-2 multiprocessing toolchain-funcs -SLOT="$(get_major_version)" -OPENJ9_PV="$(get_version_component_range 2-4)" +SLOT="$(ver_cut 1)" +OPENJ9_PV="$(ver_cut 2-4)" OPENJ9_P=openj9-${OPENJ9_PV} -FREEMARKER_PV=2.3.30 -DESCRIPTION="Open source implementation of the Java programming language" -HOMEPAGE="https://openjdk.java.net" +DESCRIPTION="Extensions for OpenJDK for Eclipse OpenJ9" +HOMEPAGE="https://www.eclipse.org/openj9/" if [[ ${OPENJ9_PV} == 9999 ]]; then inherit git-r3 EGIT_REPO_URI="https://github.com/ibmruntimes/openj9-openjdk-jdk${SLOT}.git" @@ -19,8 +18,8 @@ if [[ ${OPENJ9_PV} == 9999 ]]; then OPENJ9_OMR_EGIT_REPO_URI="https://github.com/eclipse/openj9-omr.git" else SRC_URI=" - https://github.com/ibmruntimes/openj9-openjdk-jdk${SLOT}/archive/v${OPENJ9_PV}-release.tar.gz -> openj9-openjdk-jdk${SLOT}-${OPENJ9_P}.tar.gz - https://github.com/eclipse/openj9/archive/${OPENJ9_P}.tar.gz -> ${OPENJ9_P}.tar.gz + https://github.com/ibmruntimes/openj9-openjdk-jdk${SLOT}/archive/${OPENJ9_P}.tar.gz -> openj9-openjdk-jdk${SLOT}-${OPENJ9_P}.tar.gz + https://github.com/eclipse/openj9/archive/${OPENJ9_P}.tar.gz https://github.com/eclipse/openj9-omr/archive/${OPENJ9_P}.tar.gz -> openj9-omr-${OPENJ9_PV}.tar.gz " fi @@ -28,7 +27,11 @@ fi LICENSE="GPL-2" KEYWORDS="~amd64" -IUSE="alsa cups ddr debug doc examples gentoo-vm headless-awt javafx +jbootstrap +pch selinux source systemtap" +IUSE="alsa cups ddr debug doc headless-awt javafx +jbootstrap jitserver numa selinux source systemtap" + +REQUIRED_USE=" + javafx? ( alsa !headless-awt ) +" COMMON_DEPEND=" media-libs/freetype:2= @@ -37,12 +40,12 @@ COMMON_DEPEND=" media-libs/libpng:0= media-libs/lcms:2= sys-libs/zlib - virtual/jpeg:0= + media-libs/libjpeg-turbo:0= systemtap? ( dev-util/systemtap ) dev-libs/elfutils - dev-libs/libdwarf - sys-process/numactl + ddr? ( dev-libs/libdwarf ) + numa? ( sys-process/numactl ) " # Many libs are required to build, but not to run, make is possible to remove @@ -80,18 +83,14 @@ DEPEND=" x11-libs/libXtst javafx? ( dev-java/openjfx:${SLOT}= ) || ( - virtual/jdk:${SLOT} - virtual/jdk:$((SLOT-1)) + dev-java/openj9-openjdk-bin:${SLOT} + dev-java/openj9-openjdk:${SLOT} + dev-java/openjdk-bin:${SLOT} + dev-java/openjdk:${SLOT} ) " -REQUIRED_USE="javafx? ( alsa !headless-awt )" - -if [[ ${OPENJ9_PV} == 9999 ]]; then - S="${WORKDIR}/openj9-openjdk-jdk${SLOT}" -else - S="${WORKDIR}/openj9-openjdk-jdk${SLOT}-${OPENJ9_PV}-release" -fi +S="${WORKDIR}/${PN}-jdk${SLOT}-${OPENJ9_P}" # The space required to build varies wildly depending on USE flags, # ranging from 3GB to 16GB. This function is certainly not exact but @@ -110,13 +109,23 @@ pkg_pretend() { openjdk_check_requirements if [[ ${MERGE_TYPE} != binary ]]; then has ccache ${FEATURES} && die "FEATURES=ccache doesn't work with ${PN}, bug #677876" - [[ $(gcc-major-version) == 11 ]] && die "gcc 11 hangs when optimizing exploded image" + + if use jitserver && tc-is-clang; then + die "jitserver does not compile with clang" + fi fi } pkg_setup() { openjdk_check_requirements java-vm-2_pkg_setup + + [[ ${MERGE_TYPE} == "binary" ]] && return + + JAVA_PKG_WANT_BUILD_VM="openj9-openjdk-${SLOT} openj9-openjdk-bin-${SLOT} openjdk-${SLOT} openjdk-bin-${SLOT}" + JAVA_PKG_WANT_SOURCE="${SLOT}" + JAVA_PKG_WANT_TARGET="${SLOT}" + java-pkg-2_pkg_setup } @@ -142,17 +151,12 @@ src_prepare() { default + eapply -- "${FILESDIR}/openj9-openjdk-override-version.patch" eapply -d openj9 -- "${FILESDIR}/openj9-no-o3.patch" eapply -d omr -- "${FILESDIR}/omr-omrstr-iconv-failure-overflow.patch" - eapply -d omr -- "${FILESDIR}/omr-fam.patch" - - if [[ ${OPENJ9_PV} != 9999 ]]; then - sed -i -e '/^OPENJDK_SHA :=/s/:=.*/:= __OPENJDK_SHA__/' \ - -e '/^OPENJ9_SHA :=/s/:=.*/:= '${OPENJ9_P}/ \ - -e '/^OPENJ9_TAG :=/s/:=.*/:= '${OPENJ9_P}/ \ - -e '/^OPENJ9OMR_SHA :=/s/:=.*/:= '${OPENJ9_P}/ \ - closed/OpenJ9.gmk - fi + + find openj9/ omr/ -name CMakeLists.txt -exec sed -i -e '/set(OMR_WARNINGS_AS_ERRORS ON/s/ON/OFF/' {} + || die + sed -i -e '/^ OPENJ9_CONFIGURE_NUMA$/d' closed/autoconf/custom-hook.m4 || die chmod +x configure || die } @@ -167,6 +171,8 @@ src_configure() { local myconf=( --disable-ccache + --disable-precompiled-headers + --disable-warnings-as-errors{,-omr,-openj9} --enable-full-docs=no --with-boot-jdk="${JDK_HOME}" --with-extra-cflags="${CFLAGS}" @@ -186,19 +192,18 @@ src_configure() { --with-vendor-vm-bug-url="https://bugs.openjdk.java.net" --with-vendor-version-string="${PVR}" --with-version-pre="" - --with-version-opt="" --with-zlib=system --enable-dtrace=$(usex systemtap yes no) --enable-headless-only=$(usex headless-awt yes no) $(tc-is-clang && echo "--with-toolchain-type=clang") - --disable-warnings-as-errors{,-omr,-openj9} --with-cmake $(use_enable ddr) + $(use_enable jitserver) ) if use javafx; then - local zip="${EPREFIX%/}/usr/$(get_libdir)/openjfx-${SLOT}/javafx-exports.zip" + local zip="${EPREFIX}/usr/$(get_libdir)/openjfx-${SLOT}/javafx-exports.zip" if [[ -r ${zip} ]]; then myconf+=( --with-import-modules="${zip}" ) else @@ -206,13 +211,6 @@ src_configure() { fi fi - # PaX breaks pch, bug #601016 - if use pch && ! host-is-pax; then - myconf+=( --enable-precompiled-headers ) - else - myconf+=( --disable-precompiled-headers ) - fi - ( unset _JAVA_OPTIONS JAVA JAVA_TOOL_OPTIONS JAVAC XARGS CFLAGS= CXXFLAGS= LDFLAGS= \ @@ -222,21 +220,33 @@ src_configure() { } src_compile() { + local mycmakeargsx=( + "-DCMAKE_C_FLAGS='${CFLAGS}'" + "-DJ9JIT_EXTRA_CFLAGS='${CFLAGS}'" + "-DCMAKE_CXX_FLAGS='${CXXFLAGS}'" + "-DJ9JIT_EXTRA_CXXFLAGS='${CXXFLAGS}'" + "-DCMAKE_EXE_LINKER_FLAGS='${LDFLAGS}'" + -DOMR_WARNINGS_AS_ERRORS=OFF + -DOMR_PORT_NUMA_SUPPORT=$(usex numa) + ) local myemakeargs=( JOBS=$(makeopts_jobs) - # https://github.com/ibmruntimes/openj9-openjdk-jdk14/issues/72 - #LOG=debug + LOG=debug $(usex doc docs '') $(usex jbootstrap bootcycle-images product-images) - EXTRA_CMAKE_ARGS="-DOMR_WARNINGS_AS_ERRORS=OFF" + EXTRA_CMAKE_ARGS="${mycmakeargsx[*]}" + OPENJDK_SHA=$(ver_cut 1-3) + OPENJ9_SHA=${OPENJ9_P} + OPENJ9_TAG=${OPENJ9_P} + OPENJ9OMR_SHA=${OPENJ9_P} ) emake "${myemakeargs[@]}" -j1 #nowarn } src_install() { local dest="/usr/$(get_libdir)/${PN}-${SLOT}" - local ddest="${ED}${dest#/}" + local ddest="${ED}/${dest#/}" cd "${S}"/build/*-release/images/jdk || die @@ -251,10 +261,6 @@ src_install() { rm -v lib/libjsound.* || die fi - if ! use examples ; then - rm -vr demo/ || die - fi - if ! use source ; then rm -v lib/src.zip || die fi @@ -264,12 +270,12 @@ src_install() { dodir "${dest}" cp -pPR * "${ddest}" || die - dosym ../../../../../etc/ssl/certs/java/cacerts "${dest}"/lib/security/cacerts + dosym8 -r /etc/ssl/certs/java/cacerts "${dest}"/lib/security/cacerts # must be done before running itself java-vm_set-pax-markings "${ddest}" - use gentoo-vm && java-vm_install-env "${FILESDIR}"/${PN}.env.sh + java-vm_install-env "${FILESDIR}"/${PN}.env.sh java-vm_revdep-mask java-vm_sandbox-predict /dev/random /proc/self/coredump_filter @@ -279,19 +285,3 @@ src_install() { dosym ../../../usr/share/doc/"${PF}" /usr/share/doc/"${PN}-${SLOT}" fi } - -pkg_postinst() { - java-vm-2_pkg_postinst - - if use gentoo-vm ; then - ewarn "WARNING! You have enabled the gentoo-vm USE flag, making this JDK" - ewarn "recognised by the system. This will almost certainly break" - ewarn "many java ebuilds as they are not ready for openjdk-11" - else - ewarn "The experimental gentoo-vm USE flag has not been enabled so this JDK" - ewarn "will not be recognised by the system. For example, simply calling" - ewarn "\"java\" will launch a different JVM. This is necessary until Gentoo" - ewarn "fully supports Java ${SLOT}. This JDK must therefore be invoked using its" - ewarn "absolute location under ${EPREFIX}/usr/$(get_libdir)/${PN}-${SLOT}." - fi -} diff --git a/dev-java/openj9-openjdk/openj9-openjdk-11.0.27.1.ebuild b/dev-java/openj9-openjdk/openj9-openjdk-17.0.41.0.ebuild index c9285f0..ca64ddd 100644 --- a/dev-java/openj9-openjdk/openj9-openjdk-11.0.27.1.ebuild +++ b/dev-java/openj9-openjdk/openj9-openjdk-17.0.41.0.ebuild @@ -1,17 +1,16 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 -inherit autotools check-reqs flag-o-matic java-pkg-2 java-vm-2 multiprocessing pax-utils toolchain-funcs versionator +inherit check-reqs eapi8-dosym flag-o-matic java-pkg-2 java-vm-2 multiprocessing toolchain-funcs -SLOT="$(get_major_version)" -OPENJ9_PV="$(get_version_component_range 2-4)" +SLOT="$(ver_cut 1)" +OPENJ9_PV="$(ver_cut 2-4)" OPENJ9_P=openj9-${OPENJ9_PV} -FREEMARKER_PV=2.3.30 -DESCRIPTION="Open source implementation of the Java programming language" -HOMEPAGE="https://openjdk.java.net" +DESCRIPTION="Extensions for OpenJDK for Eclipse OpenJ9" +HOMEPAGE="https://www.eclipse.org/openj9/" if [[ ${OPENJ9_PV} == 9999 ]]; then inherit git-r3 EGIT_REPO_URI="https://github.com/ibmruntimes/openj9-openjdk-jdk${SLOT}.git" @@ -19,7 +18,7 @@ if [[ ${OPENJ9_PV} == 9999 ]]; then OPENJ9_OMR_EGIT_REPO_URI="https://github.com/eclipse/openj9-omr.git" else SRC_URI=" - https://github.com/ibmruntimes/openj9-openjdk-jdk${SLOT}/archive/v${OPENJ9_PV}-release.tar.gz -> openj9-openjdk-jdk${SLOT}-${OPENJ9_P}.tar.gz + https://github.com/ibmruntimes/openj9-openjdk-jdk${SLOT}/archive/${OPENJ9_P}.tar.gz -> openj9-openjdk-jdk${SLOT}-${OPENJ9_P}.tar.gz https://github.com/eclipse/openj9/archive/${OPENJ9_P}.tar.gz https://github.com/eclipse/openj9-omr/archive/${OPENJ9_P}.tar.gz -> openj9-omr-${OPENJ9_PV}.tar.gz " @@ -28,7 +27,11 @@ fi LICENSE="GPL-2" KEYWORDS="~amd64" -IUSE="alsa cups ddr debug doc examples gentoo-vm headless-awt javafx +jbootstrap +pch selinux source systemtap" +IUSE="alsa cups ddr debug doc headless-awt javafx +jbootstrap jitserver numa selinux source systemtap" + +REQUIRED_USE=" + javafx? ( alsa !headless-awt ) +" COMMON_DEPEND=" media-libs/freetype:2= @@ -37,12 +40,12 @@ COMMON_DEPEND=" media-libs/libpng:0= media-libs/lcms:2= sys-libs/zlib - virtual/jpeg:0= + media-libs/libjpeg-turbo:0= systemtap? ( dev-util/systemtap ) dev-libs/elfutils - dev-libs/libdwarf - sys-process/numactl + ddr? ( dev-libs/libdwarf ) + numa? ( sys-process/numactl ) " # Many libs are required to build, but not to run, make is possible to remove @@ -80,7 +83,6 @@ DEPEND=" x11-libs/libXtst javafx? ( dev-java/openjfx:${SLOT}= ) || ( - virtual/jdk:${SLOT} dev-java/openj9-openjdk-bin:${SLOT} dev-java/openj9-openjdk:${SLOT} dev-java/openjdk-bin:${SLOT} @@ -88,13 +90,7 @@ DEPEND=" ) " -REQUIRED_USE="javafx? ( alsa !headless-awt )" - -if [[ ${OPENJ9_PV} == 9999 ]]; then - S="${WORKDIR}/openj9-openjdk-jdk${SLOT}" -else - S="${WORKDIR}/openj9-openjdk-jdk${SLOT}-${OPENJ9_P}" -fi +S="${WORKDIR}/${PN}-jdk${SLOT}-${OPENJ9_P}" # The space required to build varies wildly depending on USE flags, # ranging from 3GB to 16GB. This function is certainly not exact but @@ -113,7 +109,10 @@ pkg_pretend() { openjdk_check_requirements if [[ ${MERGE_TYPE} != binary ]]; then has ccache ${FEATURES} && die "FEATURES=ccache doesn't work with ${PN}, bug #677876" - [[ $(gcc-major-version) == 11 ]] && die "gcc 11 hangs when optimizing exploded image" + + if use jitserver && tc-is-clang; then + die "jitserver does not compile with clang" + fi fi } @@ -121,6 +120,8 @@ pkg_setup() { openjdk_check_requirements java-vm-2_pkg_setup + [[ ${MERGE_TYPE} == "binary" ]] && return + JAVA_PKG_WANT_BUILD_VM="openj9-openjdk-${SLOT} openj9-openjdk-bin-${SLOT} openjdk-${SLOT} openjdk-bin-${SLOT}" JAVA_PKG_WANT_SOURCE="${SLOT}" JAVA_PKG_WANT_TARGET="${SLOT}" @@ -135,31 +136,11 @@ pkg_setup() { local vm for vm in ${JAVA_PKG_WANT_BUILD_VM}; do - if [[ -d ${EPREFIX}/usr/lib/jvm/${vm} ]]; then + if [[ -d ${BROOT}/usr/lib/jvm/${vm} ]]; then java-pkg-2_pkg_setup return fi done - - if [[ ${MERGE_TYPE} != binary ]]; then - if [[ -z ${JDK_HOME} ]]; then - for slot in ${SLOT} $((SLOT-1)); do - for variant in openj9- ''; do - if has_version --host-root dev-java/${variant}openjdk:${slot}; then - JDK_HOME=${EPREFIX}/usr/$(get_libdir)/${variant}openjdk-${slot} - break - elif has_version --host-root dev-java/${variant}openjdk-bin:${slot}; then - JDK_HOME=$(best_version --host-root dev-java/${variant}openjdk-bin:${slot}) - JDK_HOME=${JDK_HOME#*/} - JDK_HOME=${EPREFIX}/opt/${JDK_HOME%-r*} - break - fi - done - done - fi - [[ -n ${JDK_HOME} ]] || die "Build VM not found!" - export JDK_HOME - fi } src_unpack() { @@ -184,21 +165,31 @@ src_prepare() { default + eapply -- "${FILESDIR}/openj9-openjdk-override-version.patch" eapply -d openj9 -- "${FILESDIR}/openj9-no-o3.patch" eapply -d omr -- "${FILESDIR}/omr-omrstr-iconv-failure-overflow.patch" - eapply -d omr -- "${FILESDIR}/omr-fam.patch" - if [[ ${OPENJ9_PV} != 9999 ]]; then - sed -i -e '/^OPENJ9_SHA :=/s/:=.*/:= '${OPENJ9_P}/ \ - -e '/^OPENJ9_TAG :=/s/:=.*/:= '${OPENJ9_P}/ \ - -e '/^OPENJ9OMR_SHA :=/s/:=.*/:= '${OPENJ9_P}/ \ - closed/OpenJ9.gmk - fi + find openj9/ omr/ -name CMakeLists.txt -exec sed -i -e '/set(OMR_WARNINGS_AS_ERRORS ON/s/ON/OFF/' {} + || die + sed -i -e '/^ OPENJ9_CONFIGURE_NUMA$/d' closed/autoconf/custom-hook.m4 || die chmod +x configure || die } src_configure() { + for variant in openj9- ''; do + if has_version dev-java/${variant}openjdk:${SLOT}; then + JDK_HOME=${EPREFIX}/usr/$(get_libdir)/${variant}openjdk-${SLOT} + break + elif has_version dev-java/${variant}openjdk-bin:${SLOT}; then + JDK_HOME=$(best_version dev-java/${variant}openjdk-bin:${SLOT}) + JDK_HOME=${JDK_HOME#*/} + JDK_HOME=${EPREFIX}/opt/${JDK_HOME%-r*} + break + fi + done + [[ -n ${JDK_HOME} ]] || die "Build VM not found!" + export JDK_HOME + # Work around stack alignment issue, bug #647954. in case we ever have x86 use x86 && append-flags -mincoming-stack-boundary=2 @@ -208,6 +199,8 @@ src_configure() { local myconf=( --disable-ccache + --disable-precompiled-headers + --disable-warnings-as-errors{,-omr,-openj9} --enable-full-docs=no --with-boot-jdk="${JDK_HOME}" --with-extra-cflags="${CFLAGS}" @@ -227,19 +220,18 @@ src_configure() { --with-vendor-vm-bug-url="https://bugs.openjdk.java.net" --with-vendor-version-string="${PVR}" --with-version-pre="" - --with-version-opt="" --with-zlib=system --enable-dtrace=$(usex systemtap yes no) --enable-headless-only=$(usex headless-awt yes no) $(tc-is-clang && echo "--with-toolchain-type=clang") - --disable-warnings-as-errors{,-omr,-openj9} --with-cmake $(use_enable ddr) + $(use_enable jitserver) ) if use javafx; then - local zip="${EPREFIX%/}/usr/$(get_libdir)/openjfx-${SLOT}/javafx-exports.zip" + local zip="${EPREFIX}/usr/$(get_libdir)/openjfx-${SLOT}/javafx-exports.zip" if [[ -r ${zip} ]]; then myconf+=( --with-import-modules="${zip}" ) else @@ -247,13 +239,6 @@ src_configure() { fi fi - # PaX breaks pch, bug #601016 - if use pch && ! host-is-pax; then - myconf+=( --enable-precompiled-headers ) - else - myconf+=( --disable-precompiled-headers ) - fi - ( unset _JAVA_OPTIONS JAVA JAVA_TOOL_OPTIONS JAVAC XARGS CFLAGS= CXXFLAGS= LDFLAGS= \ @@ -263,21 +248,33 @@ src_configure() { } src_compile() { + local mycmakeargsx=( + "-DCMAKE_C_FLAGS='${CFLAGS}'" + "-DJ9JIT_EXTRA_CFLAGS='${CFLAGS}'" + "-DCMAKE_CXX_FLAGS='${CXXFLAGS}'" + "-DJ9JIT_EXTRA_CXXFLAGS='${CXXFLAGS}'" + "-DCMAKE_EXE_LINKER_FLAGS='${LDFLAGS}'" + -DOMR_WARNINGS_AS_ERRORS=OFF + -DOMR_PORT_NUMA_SUPPORT=$(usex numa) + ) local myemakeargs=( JOBS=$(makeopts_jobs) - # https://github.com/ibmruntimes/openj9-openjdk-jdk14/issues/72 - #LOG=debug + LOG=debug $(usex doc docs '') $(usex jbootstrap bootcycle-images product-images) - EXTRA_CMAKE_ARGS="-DOMR_WARNINGS_AS_ERRORS=OFF" + EXTRA_CMAKE_ARGS="${mycmakeargsx[*]}" + OPENJDK_SHA=$(ver_cut 1-3) + OPENJ9_SHA=${OPENJ9_P} + OPENJ9_TAG=${OPENJ9_P} + OPENJ9OMR_SHA=${OPENJ9_P} ) emake "${myemakeargs[@]}" -j1 #nowarn } src_install() { local dest="/usr/$(get_libdir)/${PN}-${SLOT}" - local ddest="${ED}${dest#/}" + local ddest="${ED}/${dest#/}" cd "${S}"/build/*-release/images/jdk || die @@ -292,10 +289,6 @@ src_install() { rm -v lib/libjsound.* || die fi - if ! use examples ; then - rm -vr demo/ || die - fi - if ! use source ; then rm -v lib/src.zip || die fi @@ -305,12 +298,12 @@ src_install() { dodir "${dest}" cp -pPR * "${ddest}" || die - dosym ../../../../../etc/ssl/certs/java/cacerts "${dest}"/lib/security/cacerts + dosym8 -r /etc/ssl/certs/java/cacerts "${dest}"/lib/security/cacerts # must be done before running itself java-vm_set-pax-markings "${ddest}" - use gentoo-vm && java-vm_install-env "${FILESDIR}"/${PN}.env.sh + java-vm_install-env "${FILESDIR}"/${PN}.env.sh java-vm_revdep-mask java-vm_sandbox-predict /dev/random /proc/self/coredump_filter @@ -323,16 +316,4 @@ src_install() { pkg_postinst() { java-vm-2_pkg_postinst - - if use gentoo-vm ; then - ewarn "WARNING! You have enabled the gentoo-vm USE flag, making this JDK" - ewarn "recognised by the system. This will almost certainly break" - ewarn "many java ebuilds as they are not ready for openjdk-11" - else - ewarn "The experimental gentoo-vm USE flag has not been enabled so this JDK" - ewarn "will not be recognised by the system. For example, simply calling" - ewarn "\"java\" will launch a different JVM. This is necessary until Gentoo" - ewarn "fully supports Java ${SLOT}. This JDK must therefore be invoked using its" - ewarn "absolute location under ${EPREFIX}/usr/$(get_libdir)/${PN}-${SLOT}." - fi } |