On Thu, 2023-02-09 at 14:03 +0100, Michał Górny wrote:
> Hi,
> 
> I'd like to propose that we work towards having good defaults for CC
> and CXX variables in make.conf files.  Something like:
> 
>   CC=${CHOST}-gcc
>   CXX=${CHOST}-g++
> 
> or:
> 
>   CC=${CHOST}-cc
>   CXX=${CHOST}-c++
> 
> Why?
> 
> Right now we're pretty much relying on autoconf defaults: if CC/CXX is
> unset, autoconf looks for ${CHOST}-gcc and ${CHOST}-g++ appropriately. 
> However, autoconf is only one of the many build systems (and no longer
> very popular, I'd say) and whenever apps use another build system or
> override the default lookup in autoconf, we need to 'tc-export CC CXX'
> in order to ensure that the right name is picked.
> 
> Furthermore, some of us (myself included) actually set CC and CXX
> in their make.conf to a different value.  As a result, they are exported
> already on our systems and it's hard for us to notice that our ebuilds
> are missing the tc-export call.
> 
> I'm not aware of any downsides to having them set by default, except for
> the potentially problematic migration of existing systems.
> 
> What are your thoughts?

I've long been surprised that CC/CXX are not exported when the FLAGS are. We
already set these when cross-compiling or when using Clang, and that's been
fine, so I really don't see any issue.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to