Re: clang 3.2 RC2 miscompiles libgcc?

From: Nathan Whitehorn <nwhitehorn_at_freebsd.org>
Date: Sun, 06 Jan 2013 11:48:52 -0500
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)
>> _at__at_ -6,6 +6,8 _at__at_
>> SHLIB_NAME=	libgcc_s.so.1
>> SHLIBDIR?=	/lib
>>
>> +CC=	gcc
>> +
>> .include <bsd.own.mk>
>> #
>> # 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
Received on Sun Jan 06 2013 - 15:48:55 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:33 UTC