tech-pkg archive

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

discussion seeked for c++ variants in USE_LANGUAGES



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.



Home | Main Index | Thread Index | Old Index