On sys-devel/gcc-config[-native-symlinks] system flex fails to build in configure phase as: """ ... checking for x86_64-pc-linux-gnu-gcc -m32 option to accept ISO C89... (cached) none needed checking whether x86_64-pc-linux-gnu-gcc -m32 understands -c and -o together... (cached) yes checking for gcc... no checking for cc... no checking for cl.exe... no configure: error: in `/tmp/portage/sys-devel/flex-2.6.4-r1/work/flex-2.6.4-abi_x86_32.x86': configure: error: no acceptable C compiler found in $PATH See `config.log' for more details """ sys-devel/gcc-config[-native-symlinks] removes default 'cc' and 'gcc' symlinks and relies on ebuilds passing CC/CXX variables. In this case CC_FOR_BUILD variable is not set in the ebuild. The following seems to be enough to get flex going again: --- a/sys-devel/flex/flex-2.6.4-r1.ebuild +++ b/sys-devel/flex/flex-2.6.4-r1.ebuild @@ -3,7 +3,7 @@ EAPI="6" -inherit eutils flag-o-matic libtool ltprune multilib-minimal +inherit eutils flag-o-matic libtool ltprune multilib-minimal toolchain-funcs DESCRIPTION="The Fast Lexical Analyzer" HOMEPAGE="https://flex.sourceforge.net/ https://github.com/westes/flex" @@ -38,6 +38,8 @@ src_prepare() { Makefile.in || die fi elibtoolize # Prefix always needs this + + export CC_FOR_BUILD="$(tc-getBUILD_CC)" } src_configure() {
commit 3370923f46b01137d4e48d89c58a3b13eb2c10a6 Author: Manoj Gupta <manojgupta@google.com> Date: Wed Jun 10 14:40:11 2020 -0700 sys-devel/flex: Respect portage host cc variable Pass CC_FOR_BUILD to econf. Otherwise it invokes gcc instead of portage specified HOST/BUILD CC. Signed-off-by: Manoj Gupta <manojgupta@google.com> Signed-off-by: Mike Gilbert <floppym@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/16177