tech-pkg archive

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

Re: discussion seeked for c++ variants in USE_LANGUAGES



Le 07/07/14 07:46, Richard PALO a écrit :
> Not finding much discussion about c++ variants in USE_LANGUAGES, I'd 
> like to open this topic with a proposal to add 'c++0x', 'c++11', 'c++1y' 
> and probably very soon 'c++14' where the default c++ (in gcc at least) 
> is c++98 plus extensions (aka gnu++98.
> 
> http://www.netbsd.org/~richard/lang_c++.patch
> 
> I've tinkered mostly with g++ but clang seems straight forward.
> 
> Initial observations:
> Currently when 'c99' is set in USE_LANGUAGES, it is actually 'gnu99' 
> that is set for 'std=' (for gcc). I followed this usage in the prototype 
> for the above c++ variants.
> 
> Also, many pkgsrc Makefiles use, for example :
> "USE_LANGUAGES+= c99 c++"
> This may be okay for clang, but probably a message or some logic that 
> g++ use minimally 'c++0x' or 'c++11' is at hand.
> 
> While I notice that 'c11' hasn't been added, I wonder if adding all 
> these variants is really necessary (maybe only 'c++11' and 'c++14')
> again, not so difficult for clang, but there are a lot of gcc versions 
> out there... not to mention sunpro or others.
> Also, I guess I left out (on purpose) c++03....
> 
> The purpose of this is for simplicity in the vast majority of the pkgsrc 
> Makefiles... not having any c++ variants certainly does not simplify things.
> 
> 
In case there is any interest, I've updated http://www.netbsd.org/~richard/lang_c++.patch
with what I've been using for quite awhile now...
This may need to be revisited when/if gcc51 or greater hits pkgsrc, at least it may become more
useful since the gcc defaults changed.

-- 
Richard PALO



Home | Main Index | Thread Index | Old Index