1 |
On Thu, 2023-02-09 at 14:03 +0100, Michał Górny wrote: |
2 |
> Hi, |
3 |
> |
4 |
> I'd like to propose that we work towards having good defaults for CC |
5 |
> and CXX variables in make.conf files. Something like: |
6 |
> |
7 |
> CC=${CHOST}-gcc |
8 |
> CXX=${CHOST}-g++ |
9 |
> |
10 |
> or: |
11 |
> |
12 |
> CC=${CHOST}-cc |
13 |
> CXX=${CHOST}-c++ |
14 |
> |
15 |
> Why? |
16 |
> |
17 |
> Right now we're pretty much relying on autoconf defaults: if CC/CXX is |
18 |
> unset, autoconf looks for ${CHOST}-gcc and ${CHOST}-g++ appropriately. |
19 |
> However, autoconf is only one of the many build systems (and no longer |
20 |
> very popular, I'd say) and whenever apps use another build system or |
21 |
> override the default lookup in autoconf, we need to 'tc-export CC CXX' |
22 |
> in order to ensure that the right name is picked. |
23 |
> |
24 |
> Furthermore, some of us (myself included) actually set CC and CXX |
25 |
> in their make.conf to a different value. As a result, they are exported |
26 |
> already on our systems and it's hard for us to notice that our ebuilds |
27 |
> are missing the tc-export call. |
28 |
> |
29 |
> I'm not aware of any downsides to having them set by default, except for |
30 |
> the potentially problematic migration of existing systems. |
31 |
> |
32 |
> What are your thoughts? |
33 |
|
34 |
I've long been surprised that CC/CXX are not exported when the FLAGS are. We |
35 |
already set these when cross-compiling or when using Clang, and that's been |
36 |
fine, so I really don't see any issue. |