Created attachment 637234 [details] build log emerge -pqv '=dev-java/openjdk-8.252_p09::gentoo' [ebuild R ] dev-java/openjdk-8.252_p09 USE="alsa cups jbootstrap pch -debug -doc -examples -headless-awt (-nsplugin) (-selinux) -source (-webstart)"
Created attachment 637236 [details] emerge --info
Sure this is GCC-10 related? # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007f97d5ef7902, pid=19927, tid=0x00007f97956d2700 Please attach /var/tmp/portage/dev-java/openjdk-8.252_p09/work/langtools-jdk8u252-ga/make/hs_err_pid19927.log
Yes it may be, some of the new options in gcc-10 produce segfaults at bootstrap. need to filter out a lot of flags, will take a look later.
Created attachment 637504 [details] hs_err_pid19927.log (In reply to Andreas Sturmlechner from comment #2) > Sure this is GCC-10 related? > > # > # A fatal error has been detected by the Java Runtime Environment: > # > # SIGSEGV (0xb) at pc=0x00007f97d5ef7902, pid=19927, tid=0x00007f97956d2700 > > Please attach > /var/tmp/portage/dev-java/openjdk-8.252_p09/work/langtools-jdk8u252-ga/make/ > hs_err_pid19927.log
Might be worth taking a look at what's changed build wise in 11.0.7, as it's building fine with GCC 10.1
The fix will probably be in here: https://src.fedoraproject.org/rpms/java-1.8.0-openjdk/commits Will start testing once my "emerge world" has finished
https://src.fedoraproject.org/rpms/java-1.8.0-openjdk/c/e2c0e0e31176db7eeb6eadc190c87d9bf1c9c542?branch=master https://src.fedoraproject.org/rpms/java-1.8.0-openjdk/c/e2c0e0e31176db7eeb6eadc190c87d9bf1c9c542?branch=master
I can confirm those two worked for me I couldn't figure out how to patch hotspot, so did so manually
same problem with icedtea:8. See Bug 723102
heh, so it really needs to append all those flags to compile? -fno-tree-pta -fno-tree-scev-cprop -fno-tree-sink -fno-tree-slp-vectorize -fno-tree-slsr -fno-tree-sra -fno-tree-switch-conversion -fno-tree-tail-merge -fno-tree-ter -fno-tree-vrp -fno-unit-at-a-time -fno-unswitch-loops -fno-vect-cost-model -fno-version-loops-for-strides -fno-tree-coalesce-vars -fno-tree-copy-prop -fno-tree-dce -fno-tree-dominator-opts -fno-tree-dse -fno-tree-forwprop -fno-tree-fre -fno-tree-loop-distribute-patterns -fno-tree-loop-distribution -fno-tree-loop-vectorize -fno-tree-partial-pre -fno-tree-phiprop -fno-tree-pre wonderful. I'll setup a testing chroot and see how it works out.
(In reply to Georgy Yakovlev from comment #10) > heh, so it really needs to append all those flags to compile? You only need -fno-lifetime-dse, which prevents gcc from optimizing away some UB code. I just built IcedTea-3.16 with it, and both C1 and C2 survive some tests, incl. Shenandoah. They are fixing the UB code upstream, but in the meantime this should to the trick.
(In reply to Holger Hoffstätte from comment #11) > (In reply to Georgy Yakovlev from comment #10) > > heh, so it really needs to append all those flags to compile? > > You only need -fno-lifetime-dse, which prevents gcc from optimizing away > some UB code. I just built IcedTea-3.16 with it, and both C1 and C2 survive > some tests, incl. Shenandoah. They are fixing the UB code upstream, but in > the meantime this should to the trick. Indeed, setting openjdk to fno-lifetime-dse in /etc/portage/package.env makes it compile even with gcc-10.1.0
Single append seems reasonable. Thanks for testing and confirming it.
actually it's -fno-delete-null-pointer-checks and -fno-lifetime-dse build system should have passed those flag for gcc>=6, but gcc10 version was mis-identified proper patch is in https://bugs.openjdk.java.net/browse/JDK-8244760
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9465512df55b6c865841953f2d8b5c64550fb7ba commit 9465512df55b6c865841953f2d8b5c64550fb7ba Author: Georgy Yakovlev <gyakovlev@gentoo.org> AuthorDate: 2020-05-24 03:51:32 +0000 Commit: Georgy Yakovlev <gyakovlev@gentoo.org> CommitDate: 2020-05-24 03:51:47 +0000 dev-java/openjdk: add gcc10 patch to openjdk-8 Bug: https://bugs.gentoo.org/721970 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> .../openjdk/files/openjdk-8-detect-gcc10.patch | 49 ++++++++++++++++++++++ dev-java/openjdk/openjdk-8.252_p09.ebuild | 5 +++ 2 files changed, 54 insertions(+)
(In reply to Larry the Git Cow from comment #15) > The bug has been referenced in the following commit(s): > > https://gitweb.gentoo.org/repo/gentoo.git/commit/ > ?id=9465512df55b6c865841953f2d8b5c64550fb7ba > [...] Works. Thanks for fixing