From owner-freebsd-arch@freebsd.org Fri Oct 6 16:55:31 2017 Return-Path: Delivered-To: freebsd-arch@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 05B96E3BBA7 for ; Fri, 6 Oct 2017 16:55:31 +0000 (UTC) (envelope-from phk@phk.freebsd.dk) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id E3AF5662A3 for ; Fri, 6 Oct 2017 16:55:30 +0000 (UTC) (envelope-from phk@phk.freebsd.dk) Received: by mailman.ysv.freebsd.org (Postfix) id E3126E3BBA6; Fri, 6 Oct 2017 16:55:30 +0000 (UTC) Delivered-To: arch@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 E29D1E3BBA5; Fri, 6 Oct 2017 16:55:30 +0000 (UTC) (envelope-from phk@phk.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id ABB44662A2; Fri, 6 Oct 2017 16:55:30 +0000 (UTC) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.55.3]) by phk.freebsd.dk (Postfix) with ESMTP id 55C10273A4; Fri, 6 Oct 2017 16:48:04 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.15.2/8.15.2) with ESMTP id v96GlmvQ029631; Fri, 6 Oct 2017 16:47:48 GMT (envelope-from phk@phk.freebsd.dk) To: Baptiste Daroussin cc: John Baldwin , "freebsd-arch@freebsd.org" , freebsd-arch@freebsd.org Subject: Re: Making C++11 a hard requirement for FreeBSD In-reply-to: <20171006072010.ygq3k5ygwxykk4nb@ivaldir.net> From: "Poul-Henning Kamp" References: <2116882.XEKuxOb729@ralph.baldwin.cx> <20171006072010.ygq3k5ygwxykk4nb@ivaldir.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <29629.1507308468.1@critter.freebsd.dk> Date: Fri, 06 Oct 2017 16:47:48 +0000 Message-ID: <29630.1507308468@critter.freebsd.dk> X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Oct 2017 16:55:31 -0000 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@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.