Date: Thu, 5 Oct 2017 11:59:03 -0700 From: David Goldblatt <davidtgoldblatt@gmail.com> To: freebsd-current@freebsd.org Subject: C++ in jemalloc Message-ID: <CAHD6eXdazBO4=R7m5odWLt0YyAoTsuZTKvYbEh4_U5ZUXzxt9g@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hi all, The jemalloc developers have wanted to start using C++ for a while, to enable some targeted refactorings of code we have trouble maintaining due to brittleness or complexity (e.g. moving thousand line macro definitions to templates, changing the build->extract symbols->rebuild mangling scheme for internal symbols to one using C++ namespaces). We'd been holding off because we thought that FreeBSD base all had to compile on GCC 4.2, in order to support some esoteric architectures[1]. The other day though, I noticed that there is some C++ shipping with FreeBSD; /usr/bin/dtc and /sbin/devd (the former claiming in the HACKING document that C++11 is a minimum for FreeBSD 11). This, combined with the fact that ports now points to a modern gcc, makes me think we were incorrect, and can turn on C++ without breaking FreeBSD builds. Am I right? Will anything break if jemalloc needs a C++ compiler to build? We will of course not use exceptions, RTTI, global constructors, the C++ stdlib, or anything else that might affect C source or link compatibility. Thanks, David (on behalf of the jemalloc developers [1] That being said, we don't compile or test on those architectures, and so probably don't work there in the first place if I'm being honest. But we'd also like to avoid making that a permanent state of affairs that can't be changed.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHD6eXdazBO4=R7m5odWLt0YyAoTsuZTKvYbEh4_U5ZUXzxt9g>