From owner-freebsd-questions@FreeBSD.ORG Sat Mar 31 13:56:29 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1AB1F1065672 for ; Sat, 31 Mar 2012 13:56:29 +0000 (UTC) (envelope-from mail@ozzmosis.com) Received: from outbound.icp-qv1-irony-out3.iinet.net.au (outbound.icp-qv1-irony-out3.iinet.net.au [203.59.1.148]) by mx1.freebsd.org (Postfix) with ESMTP id 7F6E18FC14 for ; Sat, 31 Mar 2012 13:56:28 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EABsMd098lKjS/2dsb2JhbABFuH6BB4IJAQEEATo/BQsLDTkUGDETiAQEDLoCkDljBJVggRKETDWKHYJ7 X-IronPort-AV: E=Sophos;i="4.75,348,1330876800"; d="scan'208";a="771652881" Received: from unknown (HELO smtp.phoenix) ([124.148.168.210]) by outbound.icp-qv1-irony-out3.iinet.net.au with ESMTP; 31 Mar 2012 21:56:25 +0800 Received: by smtp.phoenix (Postfix, from userid 1001) id 0EDC9443D; Sun, 1 Apr 2012 00:56:25 +1100 (EST) Date: Sun, 1 Apr 2012 00:56:24 +1100 From: andrew clarke To: R Skinner Message-ID: <20120331135624.GA46283@ozzmosis.com> References: <4F76DD24.4060104@herveybayaustralia.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F76DD24.4060104@herveybayaustralia.com.au> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: FreeBSD Questions Subject: Re: ps, clang and make variables X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Mar 2012 13:56:29 -0000 On Sat 2012-03-31 20:32:04 UTC+1000, R Skinner (rocky@herveybayaustralia.com.au) wrote: > Stupid question, but I need to clarify and make sure I'm right here: > what should I see as the running process if clang is compiling? ATM I > see cc1plus. clang for C, clang++ for C++ > I'm trying to set CC and friends make variables to clang for a build, > but it doesn't appear to be 'sticking'. It seems to change the shell env > to bash, but that shouldn't be the problem. So I'm trying to work out > whats up. I have this in /etc/make.conf: .include "/etc/make.clang.conf" and /etc/make.clang.conf itself: .if !defined(CC) || ${CC} == "cc" CC=clang .endif .if !defined(CXX) || ${CXX} == "c++" CXX=clang++ .endif .if !defined(CPP) || ${CPP} == "cpp" CPP=clang -E .endif # Don't die on warnings NO_WERROR= WERROR= # Don't forget this when using Jails! NO_FSCHG= This is from http://wiki.freebsd.org/BuildingFreeBSDWithClang which talks about building the FreeBSD kernel & base, but it's also used by the Ports system. Another option is to set CC & CXX explicitly: cd /usr/ports/*/foobar make CC=clang CXX=clang++ > FWIW I'm trying to build libreoffice with clang as it doesn't build, or > more accurately doesn't build and test correctly. It doesn't appear to > honor the CC variables (CC, CXX, CPP, etc). Worth a shot anyway :) I've never tried building LibreOffice at all, let alone with Clang, but apparently it can be done: http://nabble.documentfoundation.org/libreoffice-clang-success-td3788899.html Regards Andrew