From owner-freebsd-current@FreeBSD.ORG Wed Sep 29 17:41:19 2010 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91158106564A; Wed, 29 Sep 2010 17:41:19 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 4BB308FC1D; Wed, 29 Sep 2010 17:41:19 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:20e5:f9f9:5cd3:9694] (unknown [IPv6:2001:7b8:3a7:0:20e5:f9f9:5cd3:9694]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 7C4635C43; Wed, 29 Sep 2010 19:41:18 +0200 (CEST) Message-ID: <4CA37A3F.7020107@FreeBSD.org> Date: Wed, 29 Sep 2010 19:41:19 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.11pre) Gecko/20100928 Lanikai/3.1.5pre MIME-Version: 1.0 To: Renato Botelho References: <4C99A53E.7060707@FreeBSD.org> <20100929002843.GA5001@oriental.arm.org> <4CA2E00D.3080102@FreeBSD.org> <4CA3244D.7030907@FreeBSD.org> <20100929140657.GA50873@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Roman Divacky , dlt@mebtel.net, current@freebsd.org Subject: Re: Clang now builds world and kernel, on i386 and amd64 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 29 Sep 2010 17:41:19 -0000 On 2010-09-29 17:48, Renato Botelho wrote: > 0. Program arguments: /usr/bin/clang -cc1 -triple > x86_64-undermydesk-freebsd9.0 -S -disable-free -main-file-name ldexp.c > -mrelocation-model static -mdisable-fp-elim -mconstructor-aliases > -munwind-tables -target-cpu x86-64 -resource-dir /usr/lib/clang/2.8 -D > NLS -D __DBINTERFACE_PRIVATE -D INET6 -D _ACL_PRIVATE -D POSIX_MISTAKE > -D BROKEN_DES -D PORTMAP -D DES_BUILTIN -D YP -D NS_CACHING -D > SYMBOL_VERSIONING -I /usr/src/lib/libc/include -I > /usr/src/lib/libc/../../include -I /usr/src/lib/libc/amd64 -I > /usr/src/lib/libc/../../contrib/gdtoa -I /usr/obj/usr/src/lib/libc -I > /usr/src/lib/libc/resolv -I > /usr/src/lib/libc/../../contrib/tzcode/stdtime -I > /usr/src/lib/libc/stdtime -I /usr/src/lib/libc/locale -I > /usr/src/lib/libc/rpc -O0 -Wsystem-headers -Wall -Wno-format-y2k > -Wno-uninitialized -Wno-pointer-sign -std=gnu99 -ferror-limit 19 > -fmessage-length 105 -stack-protector 1 -fgnu-runtime > -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/cc-8DfzyK.s -x c > /usr/src/lib/libc/amd64/gen/ldexp.c > 1. parser at end of file > 2. Code generation > 3. Running pass 'X86 FP Stackifier' on function '@ldexp' ... > Removing -O0 from CFLAGS it builds fine. Am I doing something > wrong? No, but unfortunately ldexp.c is well-known problem case for clang's inline assembly support. Its handling of floating point arguments is rather fragile, and sometimes breaks, as you can see here. For now, only use the standard settings to compile it. :)