tech-pkg archive

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

Re: Add c++11 to USE_LANGUAGES



On Fri, Apr 14, 2017 at 08:08:25AM -0500, Jason Bacon wrote:
>     As I said the last time this was brought up -- I don't think this
>     actually solves the problem and in many cases will make it much worse.
>     I.e. it is much easier with this change to end up with a mix of
>     different C++ compilers and all the associated major problems.
> 
>     Joerg
> 
> Does it necessarily have to allow mixing tool chains?  In my view, it could
> mean that a CentOS installation would use GCC4X for all c++11 code now, and at
> some future date, we could switch to GCC5 or clang for everything, requiring
> packages to be recompiled, but not modified.  I Think NetBSD6 could probably
> use a similar approach.

Sure, setting up a modern compiler up-front and using it for everything
works fine. That's kind of exactly my point here: piecewise picking a
different compiler doesn't work well and with GCC's enforcement of its
own copy of runtime libraries, it is begging for mismatches.

> We regularly mix clang and GCC object code in FreeBSD ports, with very few
> issues.  I don't know how much effort, if any, is required to maintain ABI
> compatibility, though.

The object code itself is rarely the problem. For C code, the RTL issue
is also pretty small (might need some kicks into GCC balls). Situation
is quite a bit more complicated for C++ -- e.g. do you use libstdc++ for
both, libstdc++ for GCC and libc++ for clang etc?

Joerg


Home | Main Index | Thread Index | Old Index