tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Selecting a C++ compiler



> I think we are overdue for solving the problem
Yes. I hope basing discussion on my proposal, we'll finally get something 
that (mostly) works.

I'm pretty confident my approach can quite easily address the issues 
mentioned once we aggree on what the desired behaviour is, exactly (or 
aggree on disaggreement and have user-tunable knobs).

Default GCC version for C++:
I guess some _GCC_CXX_VERSION_DEFALULT in platform-specific files will do. 
Of course, someone need to fill in the desired values.

Mixing different GCC versions for C and C++:
-- Either it's neccessary to build everything with the same compiler, 
   then just remove the .if !empty(USE_LANGUAGES:Mc++)
-- Or only a few packages are affected, then either add c++ to their 
   USE_LANGUAGES (including a comment) or tag them with some 
   need-the-same-gcc-as-c++ flag that invokes the same branch as if 
   USE_LANGUAGES contained c++.

Support for various C++ versions by individual GCC versions:
-- If, for any (X,Y) GCC version X accepts -std=c++Y but is considered to 
   in fact not really do so, simply add this combination to my 
   _GCC_CXX_STD_UNSUPP.
-- If this would be too gross, add GCC_REQD to the affected packages.

Bootstrapping issues:
-- When built with gcc-inplace-math and -nls, the only dependency of 
   lang/gcc{49,5,6} is gsed. I doubt that is correct, but it would be 
   harmless, no?
-- lang/gcc48 additionally depends on gmp, isl and cloog. Do we need 
   lang/gcc48 as a default C++ compiler?
-- We need to assure gcc-inplace-math (and -nls) when building GCC as a 
   build dependency, either by making that the default or temporarily 
   overriding the options.
-- for lang/gccN itself, we could set a special flag circumventing the 
   must-build-GCC-first logic or invent a native-c++ pseudo-USE_LANGUAGES 
   value.

People never using C++:
In case any choice of the above options would affect people never ever 
building anything using C++ (embedded systems come to my mind), we could 
use a special setting of GCC_CXX_VERSION (empty or "none") that would 
preserve the current behaviour for non-c++ packages and fail for c++ 
packages.


Home | Main Index | Thread Index | Old Index