sys-devel/glibc: Fix CET handling

This commit is contained in:
Krzesimir Nowak 2023-03-02 17:37:32 +01:00
parent 21396b1521
commit 90a59bdb6b

View File

@ -466,7 +466,18 @@ setup_flags() {
filter-flags '-fsanitize=*'
# See end of bug #830454; we handle this via USE=cet
filter-flags '-fcf-protection='
#
# Flatcar: When bootstrapping, we may have a situation where
# CET-enabled gcc from seed is used to build CET-disabled
# glibc. As such, gcc implicitly enables CET if no
# -fcf-protection flag is passed. For a typical package it
# should not be a problem, but for glibc it matters as it is
# dealing with CET in ld.so. So if CET is supposed to be
# disabled for glibc, be explicit about it.
filter-flags '-fcf-protection=*'
if ! use cet; then
append-flags '-fcf-protection=none'
fi
}
use_multiarch() {