dev-java/openjdk: don't use __attribute__((flatten)) (excessive mem use with LTO)

Newer JDKs have a workaround: b42f146edb/make/hotspot/lib/JvmOverrideFiles.gmk (L40)

Closes: https://bugs.gentoo.org/960257
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2025-09-05 22:45:27 +01:00
parent 4c3e0f084a
commit 49140b422e
2 changed files with 17 additions and 1 deletions

View File

@@ -0,0 +1,13 @@
https://bugs.gentoo.org/960257
https://gcc.gnu.org/PR77472
--- a/src/hotspot/share/utilities/globalDefinitions_gcc.hpp
+++ b/src/hotspot/share/utilities/globalDefinitions_gcc.hpp
@@ -170,7 +170,7 @@ inline int wcslen(const jchar* x) { return wcslen((const wchar_t*)x); }
// Inlining support
#define NOINLINE __attribute__ ((noinline))
#define ALWAYSINLINE inline __attribute__ ((always_inline))
-#define ATTRIBUTE_FLATTEN __attribute__ ((flatten))
+#define ATTRIBUTE_FLATTEN
// Alignment
//

View File

@@ -114,7 +114,10 @@ DEPEND="
)
"
PATCHES=( "${FILESDIR}/openjdk-17.0.16_p8-fixBuild_failure_with_glibc-2.42.patch" )
PATCHES=(
"${FILESDIR}/openjdk-17.0.16_p8-fixBuild_failure_with_glibc-2.42.patch"
"${FILESDIR}/openjdk-17.0.16_p8-lto-memory.patch"
)
# The space required to build varies wildly depending on USE flags,
# ranging from 2GB to 16GB. This function is certainly not exact but