This is with GCC-12 I tried moving around different cflag settings: disabling LTO, disabling -Luse-plugin but ended up just overriding cflags to -O3 and then the package merged successfully
There is insufficient information to do anything useful with this bug report. At a minimum, provide emerge --info and attach a build log showing the failure. Even better would be to provide the exact flags which trigger the failure. Please change the bug status to UNCONFIRMED if/when the required information is provided.