From owner-freebsd-current@FreeBSD.ORG Sun Jan 6 16:48:55 2013 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id ED3F7E5A; Sun, 6 Jan 2013 16:48:55 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from agogare.doit.wisc.edu (agogare.doit.wisc.edu [144.92.197.211]) by mx1.freebsd.org (Postfix) with ESMTP id C4BD98EA; Sun, 6 Jan 2013 16:48:55 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from avs-daemon.smtpauth2.wiscmail.wisc.edu by smtpauth2.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) id <0MG700800QPJYW00@smtpauth2.wiscmail.wisc.edu>; Sun, 06 Jan 2013 10:48:55 -0600 (CST) Received: from wanderer.tachypleus.net (dhcp107-17-54-205.hil-sfofhhh.sfo.wayport.net [107.17.54.205]) by smtpauth2.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0MG7005HGQPHR710@smtpauth2.wiscmail.wisc.edu>; Sun, 06 Jan 2013 10:48:54 -0600 (CST) Date: Sun, 06 Jan 2013 11:48:52 -0500 From: Nathan Whitehorn Subject: Re: clang 3.2 RC2 miscompiles libgcc? In-reply-to: Sender: whitehorn@wisc.edu To: David Chisnall Message-id: <50E9AAF4.209@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=107.17.54.205 X-Spam-PmxInfo: Server=avs-15, Version=5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2013.1.6.163615, SenderIP=107.17.54.205 References: <20121227150724.GA1431@mole.fafoe.narf.at> <50DC65F5.6060004@freebsd.org> <50E0BD66.4070609@FreeBSD.org> <20130102135950.GA1464@mole.fafoe.narf.at> <20130104154940.GD1430@mole.fafoe.narf.at> <20130106141708.GA1418@mole.fafoe.narf.at> User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/17.0 Thunderbird/17.0 Cc: Stefan Farfeleder , Dimitry Andric , freebsd-current@FreeBSD.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 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: Sun, 06 Jan 2013 16:48:56 -0000 On 01/06/13 11:46, David Chisnall wrote: > On 6 Jan 2013, at 14:17, Stefan Farfeleder wrote: > >> On Fri, Jan 04, 2013 at 04:49:41PM +0100, Stefan Farfeleder wrote: >>> Here's a minimal test case that reproduces the bug: >> [...] >> >> Until someone fixes this bug, could we apply something like this as a >> work-around? >> >> Stefan >> >> Index: gnu/lib/libgcc/Makefile >> =================================================================== >> --- gnu/lib/libgcc/Makefile (revision 245055) >> +++ gnu/lib/libgcc/Makefile (working copy) >> @@ -6,6 +6,8 @@ >> SHLIB_NAME= libgcc_s.so.1 >> SHLIBDIR?= /lib >> >> +CC= gcc >> + >> .include >> # >> # libgcc is linked in last and thus cannot depend on ssp symbols coming > > This will break the build entirely for those of us who build without gcc, and as we are planning on removing gcc entirely by the 10.0 timeframe we should be encouraging people to do this, not discouraging it. > > Does compiling at a lower optimisation level (-O1? -O0) work as a temporary fix? > No. It's completely broken at all optimization levels. There do not appear to be any flags that change the behavior. Building unwind-dw2.c either with gcc or with the previous import of clang in our tree does fix it, however. -Nathan