Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Putting CC and CXX into make.conf
Date: Thu, 09 Feb 2023 13:03:25
Message-Id: bb4d7891e9f431934b3507b0ff6c39bf65b6e7e8.camel@gentoo.org
1 Hi,
2
3 I'd like to propose that we work towards having good defaults for CC
4 and CXX variables in make.conf files. Something like:
5
6 CC=${CHOST}-gcc
7 CXX=${CHOST}-g++
8
9 or:
10
11 CC=${CHOST}-cc
12 CXX=${CHOST}-c++
13
14 Why?
15
16 Right now we're pretty much relying on autoconf defaults: if CC/CXX is
17 unset, autoconf looks for ${CHOST}-gcc and ${CHOST}-g++ appropriately.
18 However, autoconf is only one of the many build systems (and no longer
19 very popular, I'd say) and whenever apps use another build system or
20 override the default lookup in autoconf, we need to 'tc-export CC CXX'
21 in order to ensure that the right name is picked.
22
23 Furthermore, some of us (myself included) actually set CC and CXX
24 in their make.conf to a different value. As a result, they are exported
25 already on our systems and it's hard for us to notice that our ebuilds
26 are missing the tc-export call.
27
28 I'm not aware of any downsides to having them set by default, except for
29 the potentially problematic migration of existing systems.
30
31 What are your thoughts?
32
33 --
34 Best regards,
35 Michał Górny

Replies

Subject Author
Re: [gentoo-dev] Putting CC and CXX into make.conf James Le Cuirot <chewi@g.o>