Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 408693 - [Future EAPI] Set CC=$(tc-getCC) and CXX=$(tc-getCXX) automatically for the build environment
Summary: [Future EAPI] Set CC=$(tc-getCC) and CXX=$(tc-getCXX) automatically for the b...
Status: RESOLVED DUPLICATE of bug 341761
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: PMS/EAPI (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: PMS/EAPI
Depends on:
Reported: 2012-03-18 10:38 UTC by Anthony Basile
Modified: 2012-09-22 08:19 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Basile gentoo-dev 2012-03-18 10:38:01 UTC
Currently, CC and CXX are not set in the portage environment to $(tc-getCC) and $(tc-getCXX) as given by toolchain-funcs.eclass.  For build systems which properly respect these variables and inherit their values from the environment that means have to do something like

   emake CC=$(tc-getCC) CXX=$(tc-getCXX) ....

in src_compile(), src_install(), src_test(), ie wherever make is called.  Looking through the tree, on can see hundreds of such examples.

We should import the toolchain-funcs.eclass code that sets those variables into portage and automatically set  CC=$(tc-getCC) CXX=$(tc-getCXX) as the default which can be overrided if need be.  This will lead to cleaner ebuilds and avoid QA issues where cc, gcc, g++ are all called directly.

This enhancement was inspired by bug #408481.
Comment 1 Agostino Sarubbo gentoo-dev 2012-03-18 12:11:30 UTC
Probably is a good idea set AR AS CPP LD and so on.
Comment 2 SpanKY gentoo-dev 2012-03-18 23:59:45 UTC
i don't think this belongs in PMS
Comment 3 Pacho Ramos gentoo-dev 2012-07-23 17:21:44 UTC
(In reply to comment #2)
> i don't think this belongs in PMS

What would be the alternative then to get them automatically exported? Thanks :)
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-07-23 19:47:02 UTC
(In reply to comment #2)
> i don't think this belongs in PMS

Much like CFLAGS and similar?
Comment 5 Pacho Ramos gentoo-dev 2012-09-22 08:04:21 UTC

*** This bug has been marked as a duplicate of bug 341761 ***