tech-pkg archive

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

Re: USE_LANGUAGES and wrappers



nia <nia%NetBSD.org@localhost> writes:

> It seems that most of the disagreements are over defaulting to c++03,

Yes, it seems that way.

> which I now understand the drawbacks for.

It's clear we don't have consensus on that part, and I'll leave it at
that for this message.

> Do we agree that USE_LANGUAGES should be replaced?
>
> I would introduce two new vars, FORCE_C_STD and FORCE_CXX_STD.
> Unlike USE_CC_FEATURES and USE_CXX_FEATURES, each variable can only be
> set once.
>
> Adding e.g. gnu++11 would cause c++11 to be removed, which
> would remove a lot of uses of BUILDLINK_TRANSFORM in indiviaul
> packages to allow use of alloca().

If what you mean is (rephrasing and trying to be a bit more to
pseudocode to be sure we are all seeing it the same way):

  1) If e.g. FORCE_CXX_STD=gnu++11 is defined, then wrappers will

    add --std=gnu++11 to all $CXX invocations, for all compilers

    remove all --std args that are not gnu++11 for all $CXX invocations,
    for all compilers

  If FORCE_CXX_STD contains 2 or more tokens, error.

  2) We will either

    a) treat it as if it were in FORCE_CXX_STD instead (which is what we do
    now) with a warning, or

    b) be an error,

  or perhaps a and then b.  (I don't care as long as ~zero failures from
  this affect the next branch and there is fairly little fallout from
  now until then.)
 
then I think that's consistent with what I proposed and I believe there
were zero objections to this part.  It's been proposed and timed out, so
if you are in the mood to do it, that sounds good to me.

(We still have non-c wrappers, and I think those should be kept
consistent.  That seems like our obvious longstanding practice and I
don't view that opinion as controversial.  There is no proposal on the
table to remove the non-c wrappers.)


Home | Main Index | Thread Index | Old Index