From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3729 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: C++ ABI compatibility and musl-gcc Date: Wed, 24 Jul 2013 19:21:41 -0400 Message-ID: <20130724232141.GA6531@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1374708115 17096 80.91.229.3 (24 Jul 2013 23:21:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Jul 2013 23:21:55 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3733-gllmg-musl=m.gmane.org@lists.openwall.com Thu Jul 25 01:21:57 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1V28NX-00030p-Ql for gllmg-musl@plane.gmane.org; Thu, 25 Jul 2013 01:21:55 +0200 Original-Received: (qmail 3073 invoked by uid 550); 24 Jul 2013 23:21:55 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 2037 invoked from network); 24 Jul 2013 23:21:54 -0000 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:3729 Archived-At: I've just committed the last of a series of changes that make it possible to load the glibc-built libstdc++.so.6 under musl. While it may look like a bit of ugliness, roughly half of the changes were needed anyway to lay the ground for future locale support; the long-term goal is to support customizable LC_TIME, LC_MONETARY, LC_COLLATE, and LC_MESSAGES, but I don't expect any of that to happen until after the 1.0 release. Anyway, back to musl-gcc. My hope was that supporting the glibc libstdc++ would make it possible to use musl-gcc to compile C++ code, which could in turn be useful for bootstrapping compilers written in C++ (gcc 4.8 or clang/LLVM). However, it seems the installed C++ headers are also full of glibc-header-specific assumptions, so using musl-gcc for C++ is not as easy as I'd hoped it might be. I''ve already spent a great deal of time and effort onthis C++ ABI topic and would rather focus on release prep and other issues for a while now. But perhaps someone interested in this topic could do some research and see if the idea of using musl-gcc for C++ can be salvaged. Here are some possible approaches: 1. Figuring out what's wrong with the headers and working around it. Or, in other words: lets write a musl-fixincludes :P 2. Determining if the C++ headers that result from building a musl-targetted libstdc++ are clean and arch-agnostic, and if so, just packaging them up in a tarball that users could download and install. Whichever approach is taken, if we get this working there should be a doc on the wiki explaining what to do. This would include not only dealing with the header issue, but also things like copying libstdc++.so.6 into $(prefix)/lib or similar. By the way, merely running existing C++ apps linked against glibc IS possible under musl now, and it should work with either the original glibc libstdc++.so.6 or the (new, post-ABI-fixes) musl libstdc++.so.6. Rich