From owner-freebsd-current@FreeBSD.ORG Tue Aug 30 16:20:41 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 8954C106564A for ; Tue, 30 Aug 2011 16:20:41 +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 4B5138FC0C for ; Tue, 30 Aug 2011 16:20:41 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:69e1:3c2f:3372:e532] (unknown [IPv6:2001:7b8:3a7:0:69e1:3c2f:3372:e532]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 2F4CE5C37; Tue, 30 Aug 2011 18:20:40 +0200 (CEST) Message-ID: <4E5D0DD3.20606@FreeBSD.org> Date: Tue, 30 Aug 2011 18:20:35 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0) Gecko/20110812 Thunderbird/6.0 MIME-Version: 1.0 To: "Hartmann, O." References: <4E5CB1E9.9080801@zedat.fu-berlin.de> In-Reply-To: <4E5CB1E9.9080801@zedat.fu-berlin.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current Subject: Re: CLANG; still cc in use when building the WORLD 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: Tue, 30 Aug 2011 16:20:41 -0000 On 2011-08-30 11:48, Hartmann, O. wrote: > I'm building world with CLANG (or I pretend to do so). > In my /etc/make.conf I use these lines: > ### > ### CLANG > ### > .if defined(USE_CLANG) > .if !empty(.CURDIR:M/usr/src*) You should add "|| !empty(.CURDIR:M:/usr/obj*)" to this .if statement, because the build build process changes to directories inside /usr/obj for various steps. Alternatively, use the simpler: .if empty(.CURDIR:N/usr/src*:N/usr/obj*) Alternatively, just remove the statement, and use clang for everything, and help fix bugs in ports. :) > CFLAGS= -O3 -march=native -mtune=native -fno-strict-aliasing -pipe > COPTFLAGS= -O3 -march=native -mtune=native -pipe Take care when using clang and -march=native, there are still some issues with it (search this mailing list for specifics). If anything goes wrong, first revert to the default CFLAGS and COPTFLAGS (e.g. comment them out), and try again.