tech-pkg archive

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

Re: First go at adding GCC_VERSIONS_ACCEPTED support



Joerg Sonnenberger <joerg%britannica.bec.de@localhost> writes:

> On Thu, Oct 15, 2015 at 08:38:22AM -0400, Greg Troxel wrote:
>> 
>> Thomas Klausner <wiz%NetBSD.org@localhost> writes:
>> 
>> > I'd like to introduce a different point in the discussion.
>> >
>> > I usually don't care about compiler versions, but about compiler
>> > features.
>> >
>> > So I'd be more interested in a way to say:
>> > I want c99/c++03/c++11/c++whatever
>> > than specifying compiler versions.
>> 
>> That's a fair point.  We have c99 in USE_LANGUAGES.   But we also have
>> c++, and that's a bug, because c++ is a family of languages, not a
>> language.
>
> So is "c", "c++" is not really different.

Sure, true for c, but not so much for c99.   We see to have added c99
and left c to mean c89.   So maybe we should define that c++ means c++03
and require tagging of c++11 in USE_LANGUAGES.

>> Your point doesn't get us out of the fundamental difficulty that it is
>> unsound to mix c++ compilers.   Perhaps we need to just define that
>> USE_LANGUAGES=c++ means c++11 and force a c++11-compatible compiler (gcc
>> 4.8?).
>
> I don't think we are at the point where the majority of all C++ code in
> pkgsrc is C++11 by far.

OK.  Let's separate the issues:

  1) how to tag C++11 code (GCC_REQD is bogus for this)

  2) how to deal with mixed compilers and libs.  If there's a c++
  library, and it doesn't need C++11, and then a C++ porgram does and
  links to the library, is that sound?  What about the other way around?

(1) seems to obviously need USE_LANGUAGES support, or the logical
equivalent.  Do you agree, and if not what do you think we should do?

What do you think about (2)?

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index