Re: Clang now builds world and kernel, on i386 and amd64

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Wed, 29 Sep 2010 19:41:19 +0200
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.<eof>  parser at end of file
> 2.      Code generation
> 3.      Running pass 'X86 FP Stackifier' on function '_at_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. :)
Received on Wed Sep 29 2010 - 15:41:19 UTC

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