From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10870 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: libstdc++ namespace pollution Date: Tue, 3 Jan 2017 13:29:08 -0500 Message-ID: <20170103182908.GH1555@brightrain.aerifal.cx> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1483468174 1632 195.159.176.226 (3 Jan 2017 18:29:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 3 Jan 2017 18:29:34 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-10883-gllmg-musl=m.gmane.org@lists.openwall.com Tue Jan 03 19:29:29 2017 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1cOTpn-0007LD-23 for gllmg-musl@m.gmane.org; Tue, 03 Jan 2017 19:29:19 +0100 Original-Received: (qmail 15515 invoked by uid 550); 3 Jan 2017 18:29:21 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 15491 invoked from network); 3 Jan 2017 18:29:21 -0000 Content-Disposition: inline In-Reply-To: Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:10870 Archived-At: On Tue, Jan 03, 2017 at 05:44:47PM +0000, Justin Cormack wrote: > I have been trying to build a C++ program recently, and came across > the issue that > > 1. libstdc++ always defines _GNU_SOURCE see > https://gcc.gnu.org/onlinedocs/libstdc++/faq.html#faq.predefined > 2. Musl defines pretty much everything once _GNU_SOURCE is defined So does glibc. :) > In this case the issue was that the program included and > then the register names REG_RIP etc were #defined as numeric > constants, while the program wanted to use them as names for an enum. > > Does anyone have any recommendations (wondering about trying clang > libc++ perhaps)? This is a known issue that the gcc people want to fix, I think. It might be possible to patch it out already it you're prepared to track down things that break and fix them. Rich