Created attachment 575564 [details] build.log While the ebuild(s) do add the -Wno-error flag, it doesn't come into effect since the OpenJDK build system appends -Werror after it - taking precedence. With newer, stricter GCC versions (currently using 8.3.0), compilation fails.
The issue seems to be that hotspot always *appends* -Werror and friends unconditionally to the flags value. The BSD Makefiles don't do that, but instead depend upon a variable called COMPILER_WARNINGS_FATAL. Looking around, it seems like this variable was once used widely within the build system, but replaced with other stuff later on. The BSD Makefile references are merely left-overs, which makes things complicated. Further, more recent OpenJDK releases have overhauled the hotspot build system and introduced proper configure flags. Backporting this is difficult, but luckily, also unneeded. I worked around the problem by guarding the places that hardcode -Werror with COMPILER_WARNINGS_FATAL conditionals and adding a new configure switch to change this variable, including putting it into the spec file, so that it's actually available to the build system later on. It certainly does feel a bit hacky, but OpenJDK 8 is basically on life support now anyway with very little changed to be expected. Filing a PR for this.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9a7ca5bb0f8625c96d30e8285c0c4e802abb5cb commit e9a7ca5bb0f8625c96d30e8285c0c4e802abb5cb Author: Georgy Yakovlev <gyakovlev@gentoo.org> AuthorDate: 2019-05-09 18:53:30 +0000 Commit: Georgy Yakovlev <gyakovlev@gentoo.org> CommitDate: 2019-05-09 19:02:27 +0000 dev-java/openjdk: fix build on gcc-9 by passing -Wno-error Closes: https://bugs.gentoo.org/685426 Package-Manager: Portage-2.3.66, Repoman-2.3.12 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> dev-java/openjdk/openjdk-8.212_p03.ebuild | 3 +++ 1 file changed, 3 insertions(+)