Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 455078 - app-portage/eix: uses USE=clang for compiler choice
Summary: app-portage/eix: uses USE=clang for compiler choice
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal QA (vote)
Assignee: Martin Väth
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-02 01:07 UTC by Michał Górny
Modified: 2014-01-03 00:27 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-02-02 01:07:07 UTC
The compiler choice should be performed using either gcc-config or CC and CXX variables in make.conf. Ebuilds must not provide random flags to switch it.
Comment 1 Martin Väth 2013-02-02 07:00:56 UTC
clang (like presumably also other non-GNU compilers) does not understand special GNU options, and there is no reliable test for them (it prints only warnings which become not even errors with -Werror).
Thus, although it would compile, it makes not sense to even try to use these options on a non-gcc - it needs useless configure time and produces a non-reasonable log, and also ccache (if you use it) should be prepared to use a non-gcc (CCACHE_CPP2=true).

Instead of relying on some stupid heuristics (e.g. by attempting to parse $CC --version) which perhaps some packages with similar problems do, I think it is better if eix' ./configure explicitly gets told whether you want to compile with gcc or not - therefore this USE-flag is needed.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-02-02 10:01:45 UTC
@qa, what do you think?
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2013-02-02 21:30:26 UTC
I'd probably say that we don't support or care for clang at this moment.
Comment 4 Martin Väth 2013-02-03 05:15:14 UTC
But eix does support clang. So I guess the flag can be kept?

Some months ago, there was an extra rekeyword phase of eix so that the
clang flag could be masked for all architectures not supporting clang.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-11-01 08:15:10 UTC
This still doesn't follow the usual Gentoo policies and the Gentoo philosophy. Like most of the ricing in eix.

ccache nowadays supports clang. USE=clang is used to enable support for clang, and not switch the compiler.

Switching is done through setting of CC and CXX. People are not expected to care about USE=clang when they compile something with clang. And as far as I understand, most of the 'GNU care' is about flags that are being riced down to the build process ignoring user's preferences.
Comment 6 Martin Väth 2013-11-01 18:29:08 UTC
Thanks for the reminder.

I rechecked, and with current clang++ there is no need anymore for kludges:
The clang++ return code now indicates failure as it should, and thus normal autotools mechanisms can be used without the need of the user passing options.

So I think it is not reasonable any longer to support the ./configure option --with-nongnu-cxx: it makes no sense to "simplify" handling of old clang++ versions if this requires manual user interaction anyway (by passing configure options/USE-flags).

The option (and then necessarily also --with-quickcheck) is removed in current eix master on BerliOS (>=eix-0.30.0).
Comment 7 Martin Väth 2014-01-03 00:27:07 UTC
Closing since USE=clang is removed since eix-0.30.0