Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 278507 - would be useful if there were /var/db/pkg/*/*/COMPILER file
Summary: would be useful if there were /var/db/pkg/*/*/COMPILER file
Status: RESOLVED CANTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Package Manager Specification
URL:
Whiteboard:
Keywords:
: 435156 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-07-20 20:36 UTC by Evan Teran
Modified: 2014-07-07 18:36 UTC (History)
2 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 Evan Teran 2009-07-20 20:36:33 UTC
I think it would be useful if there were /var/db/pkg/*/*/COMPILER file. There is plenty of data stored about installed packages. I think if the equivalent of "gcc-config -c" were stored in a file there (perhaps named COMPILER) could be useful for a couple of things. This information also seems to be available in "/etc/env.d/gcc/config-*".

I realize that alternative compilers such as icc are possible, but surely it could be normalized somehow.

An example useful scenario is when migrating to a new compiler, often the user either cannot or doesn't have to recompile every single package on their system with the new compiler, but it is near impossible to know which have been compiled with the new compiler.

Reproducible: Always
Comment 1 Zac Medico gentoo-dev 2009-07-22 21:42:45 UTC
This should really be discussed on the gentoo-dev mailing list. We may want to do something that's cross-language, since gcc only applies to C/C++ apps.
Comment 2 Evan Teran 2009-07-22 21:54:39 UTC
well, I can think of one way to deal with things in a cross platform way. We could simply have several variables in the file, one for each of what we consider to be a "compiler". Something like this:

GCC=i686-pc-linux-gnu-4.4.0
PYTHON=2.6.2-r1

and so forth, whatever compiler versions that were available for that particular emerge.

I'm sure there could be a better way to do it, but this approach would be pretty straight forward.
Comment 3 Zac Medico gentoo-dev 2009-07-22 22:05:07 UTC
We may want to add some sort of EAPI extension for this, so that ebuilds can explicitly register the compiler(s) that they use.
Comment 4 Zac Medico gentoo-dev 2012-09-16 17:01:42 UTC
*** Bug 435156 has been marked as a duplicate of this bug. ***
Comment 5 Ulrich Müller gentoo-dev 2014-07-07 17:03:18 UTC
The VDB specifiction is not part of PMS.

(In reply to Zac Medico from comment #1)
> This should really be discussed on the gentoo-dev mailing list.

Right. Feel free to reopen if there is consent in the -dev ML.
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-07-07 17:34:40 UTC
Also note that nowadays vardb contains CC and CXX files for this purpose.
Comment 7 Evan Teran 2014-07-07 18:10:46 UTC
@Michał Górny, while I agree that this bug issue is currently no longer in scope, the CC and CXX files do NOT supply the type of information that I was suggesting.

They contain things like "x86_64-pc-linux-gnu-g++" or "x86_64-pc-linux-gnu-gcc". What I was looking for was not only which compiler was used, but more importantly, what VERSION of that compiler was used.
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-07-07 18:36:32 UTC
(In reply to Evan Teran from comment #7)
> @Michał Górny, while I agree that this bug issue is currently no longer in
> scope, the CC and CXX files do NOT supply the type of information that I was
> suggesting.
> 
> They contain things like "x86_64-pc-linux-gnu-g++" or
> "x86_64-pc-linux-gnu-gcc". What I was looking for was not only which
> compiler was used, but more importantly, what VERSION of that compiler was
> used.

Well, if you do what I do, that is:

  GCC_PV=4.8.3
  CC=${CHOST}-gcc-${GCC_PV}
  CXX=${CHOST}-g++-${GCC_PV}

you'd have that info there as well :). In fact, I think Gentoo should do such CC/CXX by default.