Making C++11 a hard requirement for FreeBSD

Poul-Henning Kamp phk at phk.freebsd.dk
Fri Oct 6 16:55:31 UTC 2017


If we allow C++ in libc, it should not merely be for the convenience
of a few programmers, but because we have a vision for how it that
makes the world, or at least FreeBSD, a better place.

Having C++ in libc is no trivial detail, there is a number of areas
where this causes bootstrapping issues and conflicts.

We can solve those issues with unsightly local hacks, most
notably a bogo-malloc to malloc while C++ constructs jemalloc.

But hand on heart, we all know that is a bad idea, all of us have
been down that road before, and we also know that there is no way
to be a little bit pregnant.

The other way, the right way, to accomodate the jemalloc request
is to go all in.

Nothing in the ISO verbiage says that you cannot have C and C++
runtimes in the same library, as long as your linker knows the zip
code of it.

Libc as a combined C and C++ runtime can be implemented a lot cleaner
than a libc which hides C++ components in the closet.

So that is my input to this question:

Either we tell the jemalloc people "sorry, it's called libc for a
reason" or we decide to make our libc a native C *and* C++ runtime.

I see no sane or even possible "middle ground" or compromise position.

Poul-Henning


-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the freebsd-arch mailing list