commit:     bff66eedb4ae530ef21187d617daeba5472320a1
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 20 04:32:00 2022 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Thu Jan 20 04:36:38 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bff66eed

dev-lang/rust: pass -fcf-protection=none on i586

while building for i586 targets we need to explicitly opt out of cet
in internal llvm build.
we don't even support bootstrapping this target right now as there is no
self-hosting version, but may support in the future via our own tarball.

Bug: https://bugs.gentoo.org/741708
Issue: https://github.com/rust-lang/rust/issues/93059
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 dev-lang/rust/rust-1.58.0.ebuild | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/dev-lang/rust/rust-1.58.0.ebuild b/dev-lang/rust/rust-1.58.0.ebuild
index 2b3cee83c811..05df5cfc5f9d 100644
--- a/dev-lang/rust/rust-1.58.0.ebuild
+++ b/dev-lang/rust/rust-1.58.0.ebuild
@@ -314,6 +314,14 @@ src_configure() {
                targets = "${LLVM_TARGETS// /;}"
                experimental-targets = ""
                link-shared = $(toml_usex system-llvm)
+               $(case "${rust_target}" in
+                       i586-*-linux-*)
+                               # https://github.com/rust-lang/rust/issues/93059
+                               echo 'cflags = "-fcf-protection=none"'
+                               echo 'cxxflags = "-fcf-protection=none"'
+                               echo 'ldflags = "-fcf-protection=none"'
+                               ;;
+               esac)
                [build]
                build-stage = 2
                test-stage = 2

Reply via email to