Please integrate upstream patch in 8.1.0 patchset.
Queued for 8.1.0 as 96_all_lto-O2-PR85655.patch : https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/src/patchsets/gcc/8.1.0/gentoo/ We'll cut new patchset once more things accumulate (or after a few weeks). You can drop the patch into /etc/portage/patches/sys-devel/gcc/ to use user-patches mechanism meanwhile.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f027fd9b535c53a19d442b95eea99b2a9158d08 commit 6f027fd9b535c53a19d442b95eea99b2a9158d08 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2018-05-16 21:36:24 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2018-05-16 21:37:04 +0000 sys-devel/gcc: bump patchset up to 1.3 for gcc-8.1.0 3 new patches: + 95_all_ia64-TEXTREL.patch : fix TEXTRELs on -rdynamic binaries + 96_all_lto-O2-PR85655.patch : fix gcc -flto SIGSEGV on mariadb + 97_all_disable-systemtap-switch.patch : add --disable-systemtap switch Bug: https://bugs.gentoo.org/566118 Bug: https://bugs.gentoo.org/655518 Bug: https://bugs.gentoo.org/654748 Package-Manager: Portage-2.3.36, Repoman-2.3.9 sys-devel/gcc/Manifest | 2 +- sys-devel/gcc/{gcc-8.1.0-r2.ebuild => gcc-8.1.0-r3.ebuild} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Should be in 8.1.0-r3