If you add znver4 in the mtune option, the build will fail. I think it's probably because it doesn't support znver4. I checked with the mtune option, but I think it's probably the same with the march option. Reproducible: Always Steps to Reproduce: 1.Add "-mtune=znver4" to COMMON_FLAGS 2.Compile gcc-11.4. 3.
Created attachment 867850 [details] error log
Those versions of gcc don't support znver4. The only solution would be to remove that flag.
I think we just need to update downgrade_arch_flags in toolchain.eclass. That won't help if you try to actually build other packages using GCC 11 though with -march=znver4.
Earliest version that it's in is 12.3 (backported in https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=06f8f7aed1e232b8e53b890942e52002fb74089b).
Ah, I wasn't aware of that function.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9cd89e7d13a529ad439a9d8abae615943c08e78e commit 9cd89e7d13a529ad439a9d8abae615943c08e78e Author: Sam James <sam@gentoo.org> AuthorDate: 2023-08-17 03:07:35 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-08-18 01:30:15 +0000 toolchain.eclass: downgrade znver4 to znver3 for <12.3 Closes: https://bugs.gentoo.org/912292 Signed-off-by: Sam James <sam@gentoo.org> eclass/toolchain.eclass | 1 + 1 file changed, 1 insertion(+)