From owner-freebsd-current@freebsd.org Thu Oct 5 18:59:07 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5AE83E3FB1C for ; Thu, 5 Oct 2017 18:59:07 +0000 (UTC) (envelope-from davidtgoldblatt@gmail.com) Received: from mail-wm0-x230.google.com (mail-wm0-x230.google.com [IPv6:2a00:1450:400c:c09::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E641581E5D for ; Thu, 5 Oct 2017 18:59:06 +0000 (UTC) (envelope-from davidtgoldblatt@gmail.com) Received: by mail-wm0-x230.google.com with SMTP id f4so4015976wme.0 for ; Thu, 05 Oct 2017 11:59:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=r4ULis5AFnuTEPq6Xc+z8QLu290mxemNUAHF/mKrHBM=; b=ZZ/uAxDaipfP+KxGPIl5quCeqxFcbIOeFdlfe2j3c0W5IXvj1Co5jlGyfswCOxluiJ M5ngbjW059h+gdnM057eW1u2LU6koIZCNLg7nt07bSYHyqZ8UMWCppkiLMPVUIsM3mpt jazmdFgdQtKz/ohdF5VLQImpp2r1WKz5KoCTTx++6r+ayDHD4ZxjNbO3punGkmT2LAnR DVHHNMVuE/IXNmd2VdpaybF4vYpuecsX3NNAARBzlGRIm9EX9AjLhJupxOXxcGSp5pGb HzN79+VaGmQbOOtgqRE/N2Wa+CfmfxnCjJqT+1yadkLb5sRRozVaMAlIv6wo57u+f356 w0Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=r4ULis5AFnuTEPq6Xc+z8QLu290mxemNUAHF/mKrHBM=; b=Ol2pSC/L45/RvpKJlG6Vx4DFn6/kPBGFnORl2PGnZjTsXkOMa0raGKDCVbbg7Srf7a zsqJ73Yup/Tp3XNK9EasvP2J29I1xPzO+SYYAu7ghyIbAeYaU2xGji6ljWVmfIGRbdVA Fd2neR3PQ3d0N+rLRvgTdVrINsDRQzfPXEcSG1Wee2SslgffSpbpuCTAenpocjdKvucQ KJCvcErkhC7qmIlMhualJF2sWlwtt9DUhgzwz4MRLJi4v5rM8OZCBki0IwruXtaUdII+ eEmMVedmhQM3bef/HbxbjZyG5ZJ6DmGylgVBFNzTdGsnvxy6bfQY9KTy7yvlbY4kvPS4 oO0g== X-Gm-Message-State: AMCzsaXk0SoxvHwm43aP+mCmFmtx/gabj9NBLfX5xVL1mAA7F8kn1CRD SORnHHQO8XsZt59kljRPUZLnVtzOHPDGiSP3FPtsv22l X-Google-Smtp-Source: AOwi7QDVMGAFqyYofZQsfcVFKmJNhYzm9thI6ACgM4b/3+/2ys4DZBA9Qd++x62OqwHgnPtjZ0j3NYrcuPPGg2Dy5Mc= X-Received: by 10.28.29.68 with SMTP id d65mr74326wmd.93.1507229944125; Thu, 05 Oct 2017 11:59:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.21.196 with HTTP; Thu, 5 Oct 2017 11:59:03 -0700 (PDT) From: David Goldblatt Date: Thu, 5 Oct 2017 11:59:03 -0700 Message-ID: Subject: C++ in jemalloc To: freebsd-current@freebsd.org X-Mailman-Approved-At: Thu, 05 Oct 2017 20:38:38 +0000 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Oct 2017 18:59:07 -0000 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.