Summary: | sys-devel/gcc-8.4.0 doesn't build: cc1: error: bad value ('znver2') for '-march=' switch | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Alexey <alexey+gentoo> |
Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alexander |
Priority: | Normal | Keywords: | PullRequest |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://github.com/gentoo/gentoo/pull/15733 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
gcc-build-logs.tar.bz2
emerge --info build.log |
Created attachment 636900 [details]
emerge --info
Created attachment 636902 [details]
build.log
Yeah, looks like support for skylake+ and znver1+ in downgrade_arch_flags() is missing: https://gitweb.gentoo.org/repo/gentoo.git/tree/eclass/toolchain.eclass#n1405 I assume znver2 is a proper superset of znver1 and should be easy to translate with one-liner that specifies gcc version that introduced znver2. Do you want to write a patch yourself? The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4d587a4d38d0ad25c46b194d88f59ae467e508cf commit 4d587a4d38d0ad25c46b194d88f59ae467e508cf Author: Alexey Sokolov <sokolov@google.com> AuthorDate: 2020-05-09 23:08:11 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2020-05-10 01:00:21 +0000 toolchain.eclass: downgrade znver2 to znver1 Multiple other downgrades are missing here after 4.9 though Closes: https://bugs.gentoo.org/721690 Closes: https://github.com/gentoo/gentoo/pull/15733 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> eclass/toolchain.eclass | 1 + 1 file changed, 1 insertion(+) Additionally, it has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0f8418663dff3c4e51899b8ccb172363478591a commit e0f8418663dff3c4e51899b8ccb172363478591a Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2020-05-10 01:02:07 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2020-05-10 01:02:07 +0000 eclass/tests/toolchain.sh: add znver2 downgrade test Bug: https://bugs.gentoo.org/721690 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> eclass/tests/toolchain.sh | 1 + 1 file changed, 1 insertion(+) Thank you for the fix! Handling arches on one-by-one basis should be fine. We don't attempt to cover all possible combinations as there are so many of them across all the arches and it's somewhat a limited use case to simultaneously: keep multiple gcc versions available use very fresh -march= value. |
Created attachment 636898 [details] gcc-build-logs.tar.bz2 I uses gcc 9.3, and tried to install gcc 8. cc1: note: valid arguments to '-march=' switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server bonnell atom silvermont slm knl knm x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 btver1 btver2 native; did you mean 'znver1'?