From 77b5bde7efdc594f5b3b84fcd063e3fcf7feff54 Mon Sep 17 00:00:00 2001 From: Alfred Wingate Date: Sat, 25 Oct 2025 18:43:50 +0300 Subject: [PATCH] gnustep-base.eclass: override toolchain to clang before GS_ENV Signed-off-by: Alfred Wingate Part-of: https://github.com/gentoo/gentoo/pull/44437 Signed-off-by: Bernard Cafarelli --- eclass/gnustep-base.eclass | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/eclass/gnustep-base.eclass b/eclass/gnustep-base.eclass index 9326c7acd4653..00a3a981feb04 100644 --- a/eclass/gnustep-base.eclass +++ b/eclass/gnustep-base.eclass @@ -131,6 +131,19 @@ egnustep_env() { esac fi + if has_version "gnustep-base/gnustep-make[libobjc2]" && tc-is-gcc; + then + # Set clang for packages that do not respect gnustep-make + # settings (gnustep-base's configure for example) + einfo "Forcing clang" + export CC="${CHOST}-clang" + export CXX="${CHOST}-clang" + export CPP="${CHOST}-clang -E" + export LD="${CHOST}-clang" + + strip-unsupported-flags + fi + # Set up env vars for make operations GS_ENV=( AUXILIARY_LDFLAGS="${LDFLAGS}" @@ -151,13 +164,6 @@ egnustep_env() { use doc && GS_ENV+=( VARTEXFONTS="${T}"/fonts ) - if has_version "gnustep-base/gnustep-make[libobjc2]" && tc-is-gcc; - then - # Set clang for packages that do not respect gnustep-make - # settings (gnustep-base's configure for example) - export CC=clang CXX=clang CPP="clang -E" LD="clang" - fi - return 0 fi die "gnustep-make not installed!"