From 6c4d82dde134b4e947480759c125e9389f09ae01 Mon Sep 17 00:00:00 2001 From: Sam James Date: Sat, 13 Nov 2021 04:48:00 +0000 Subject: gcc-config: add comment explaining SELinux-related writable check Bug: https://bugs.gentoo.org/823203 Signed-off-by: Sam James --- gcc-config | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gcc-config b/gcc-config index 70bb388..eff9cca 100755 --- a/gcc-config +++ b/gcc-config @@ -668,6 +668,11 @@ switch_profile() { # Make sure we have write access to the dirs. Do not require `root` # so that we work with prefix/cross/etc... setups that run as user. + # + # [It's important we use ${ENV_D} and not e.g. ${EROOT} because for, say + # SELinux, we may not actually be able to write to ${EROOT}, but would + # be allowed for specific paths like the gcc wrappers we need to + # modify. bug #823203.] [[ ! -w ${ENV_D} ]] && die "need write access to ${ENV_D}" if is_cross_compiler ; then -- cgit v1.2.3-65-gdbad