Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 912292 - sys-devel/gcc: 11, <=12.2, Build fails when znver4 is specified as COMMON_FLAGS.
Summary: sys-devel/gcc: 11, <=12.2, Build fails when znver4 is specified as COMMON_FLAGS.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2023-08-15 08:04 UTC by trakrailysurely
Modified: 2023-08-18 01:31 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
error log (gcc-build-logs.tar.xz,93.61 KB, application/x-xz)
2023-08-15 08:05 UTC, trakrailysurely
Details

Note You need to log in before you can comment on or make changes to this bug.
Description trakrailysurely 2023-08-15 08:04:27 UTC
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.
Comment 1 trakrailysurely 2023-08-15 08:05:28 UTC
Created attachment 867850 [details]
error log
Comment 2 Mike Gilbert gentoo-dev 2023-08-16 18:48:32 UTC
Those versions of gcc don't support znver4. The only solution would be to remove that flag.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-17 03:04:31 UTC
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.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-17 03:06:45 UTC
Earliest version that it's in is 12.3 (backported in https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=06f8f7aed1e232b8e53b890942e52002fb74089b).
Comment 5 Mike Gilbert gentoo-dev 2023-08-17 16:43:34 UTC
Ah, I wasn't aware of that function.
Comment 6 Larry the Git Cow gentoo-dev 2023-08-18 01:31:05 UTC
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(+)