Summary: | cross-i586-unknown-linux-musl/gcc-14.2.1_p20241026 fails to build: ‘-fcf-protection’ is not compatible with this target | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Denis Lisov <dennis.lissov> |
Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | a.horodniceanu, dennis.lissov |
Priority: | Normal | Keywords: | PullRequest |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://github.com/gentoo/gentoo/pull/39228 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
emerge --info
build log |
Description
Denis Lisov
2024-11-06 13:28:42 UTC
Created attachment 907999 [details]
emerge --info
Created attachment 908000 [details]
build log
So, we have a check in toolchain.eclass to pass --enable-cet only on targets that support it: ------ enable_cet_for 'i[34567]86' 'linux' 'cet' enable_cet_for 'x86_64' 'gnu' 'cet' enable_cet_for 'aarch64' 'gnu' 'standard-branch-protection' ----- On amd64 and arm64 we check that the target triple contains `gnu` but on x86 we only check for linux making i586-unknown-linux-musl wrongfully pass the check. The fix is simple, change 'linux' to 'gnu'. One more thing. crossdev, on my machine, sets in /etc/portage/profile/package.use.mask/cross-i586-unknown-linux-musl: ------ cross-i586-unknown-linux-musl/gcc cet multilib ------ So the cet USE flag shouldn't have been turned on during the build so you shouldn't have hit this. Did you modify the environment by any chance? > So the cet USE flag shouldn't have been turned on during the build so you shouldn't have hit this. Did you modify the environment by any chance?
I haven't modified it since first installing this cross-toolchain in January 2024. IIUC, the `cet` USE mask was introduced in July. Sounds like I should have refreshed the crossdev-generated configs somehow, but that's something I was not aware of and I'm still not sure what's the proper way to do that.
(In reply to Denis Lisov from comment #4) > > So the cet USE flag shouldn't have been turned on during the build so you shouldn't have hit this. Did you modify the environment by any chance? > > I haven't modified it since first installing this cross-toolchain in January > 2024. IIUC, the `cet` USE mask was introduced in July. Sounds like I should > have refreshed the crossdev-generated configs somehow, but that's something > I was not aware of and I'm still not sure what's the proper way to do that. Ah, ok, so you're not doing anything extreme. I'm not sure if crossdev generates the files every time it is run but, in your case, just put `cross-i586-unknown-linux-musl/gcc -cet` in package.use and re-emerge it. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e08def09c01c484bcd0f1305e88165b4418f43b3 commit e08def09c01c484bcd0f1305e88165b4418f43b3 Author: Andrei Horodniceanu <a.horodniceanu@proton.me> AuthorDate: 2024-11-07 13:49:00 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-11-10 17:23:44 +0000 toolchain.eclass: Check for gnu environment when enabling cet on x86 Like we do for arm64 and amd64, diverge from the upstream check for linux and only enable it for gnu triples. Closes: https://bugs.gentoo.org/942951 Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me> Closes: https://github.com/gentoo/gentoo/pull/39228 Signed-off-by: Sam James <sam@gentoo.org> eclass/toolchain.eclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) |