* [gentoo-dev] Putting CC and CXX into make.conf
@ 2023-02-09 13:03 Michał Górny
2023-02-09 13:17 ` James Le Cuirot
0 siblings, 1 reply; 2+ messages in thread
From: Michał Górny @ 2023-02-09 13:03 UTC (permalink / raw
To: gentoo-dev
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?
--
Best regards,
Michał Górny
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [gentoo-dev] Putting CC and CXX into make.conf
2023-02-09 13:03 [gentoo-dev] Putting CC and CXX into make.conf Michał Górny
@ 2023-02-09 13:17 ` James Le Cuirot
0 siblings, 0 replies; 2+ messages in thread
From: James Le Cuirot @ 2023-02-09 13:17 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1369 bytes --]
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 #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 858 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-02-09 13:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-09 13:03 [gentoo-dev] Putting CC and CXX into make.conf Michał Górny
2023-02-09 13:17 ` James Le Cuirot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox