From owner-freebsd-current@FreeBSD.ORG Mon Aug 1 09:15:17 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3419106566B for ; Mon, 1 Aug 2011 09:15:17 +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 67EC18FC13 for ; Mon, 1 Aug 2011 09:15:17 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:c068:3281:5b90:f86c] (unknown [IPv6:2001:7b8:3a7:0:c068:3281:5b90:f86c]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 6D0D25C59; Mon, 1 Aug 2011 11:15:15 +0200 (CEST) Message-ID: <4E366E9E.1050600@FreeBSD.org> Date: Mon, 01 Aug 2011 11:15:10 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: Alex Kuster References: <201107311416.07307.vertex.Symphony@gmail.com> In-Reply-To: <201107311416.07307.vertex.Symphony@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org Subject: Re: libc build broken with clang ? 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: Mon, 01 Aug 2011 09:15:17 -0000 On 2011-07-31 19:15, Alex Kuster wrote: > Hi! I'm writing because I'm having some issues with -CURRENT and clang in > amd64. > I first compiled latest revision at this date and everything went ok: > >> [0][root@Symphony ~]# uname -a >> FreeBSD Symphony.Gl 9.0-CURRENT FreeBSD 9.0-CURRENT #4: Sun Jul 10 10:38:28 >> ART 2011 toor@Symphony.Gl:/usr/obj/usr/src/sys/GENERIC amd64 > > Now, a week or two later, something around libc broke. > here's the output of make buildworld with clang : > >> lang -fpic -DPIC -O2 -pipe "-march=native" -I/usr/src/lib/libc/include >> -I/usr/src/lib/libc/../../include -I/usr/src/lib/libc/amd64 -DNLS >> -D__DBINTERFACE_PRIVATE -I/usr/src/lib/libc/../../contrib/gdtoa -DINET6 >> -I/usr/obj/usr/src/lib/libc -I/usr/src/lib/libc/resolv -D_ACL_PRIVATE >> -DPOSIX_MISTAKE -I/usr/src/lib/libc/../../contrib/tzcode/stdtime >> -I/usr/src/lib/libc/stdtime -I/usr/src/lib/libc/locale -DBROKEN_DES >> -DPORTMAP -DDES_BUILTIN -I/usr/src/lib/libc/rpc -DYP -DNS_CACHING >> -DSYMBOL_VERSIONING -std=gnu99 -fstack-protector -Wsystem-headers -Wall >> -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -c >> /usr/src/lib/libc/string/wmemset.c -o wmemset.So building shared library >> libc.so.7 >> /usr/bin/ld: cap_getrights.So: relocation R_X86_64_32S against >> `SYS_cap_getrights' can not be used when making a shared object; recompile >> with -fPIC cap_getrights.So: could not read symbols: Bad value >> clang: error: linker command failed with exit code 1 (use -v to see >> invocation) *** Error code 1 For now, remove the line: CFLAGS+="-march=native" from your make.conf, and try again. Clang still has some problems with this setting, and you are most likely hitting them.