From owner-svn-src-all@FreeBSD.ORG Sun Feb 24 18:11:36 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9465991E; Sun, 24 Feb 2013 18:11:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) by mx1.freebsd.org (Postfix) with ESMTP id 4CC61CD5; Sun, 24 Feb 2013 18:11:36 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:204:4bff:fe01:de8a] (spaceball.andric.com [IPv6:2001:7b8:3a7:0:204:4bff:fe01:de8a]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id AB7455C43; Sun, 24 Feb 2013 19:11:32 +0100 (CET) Message-ID: <512A57D1.6050006@FreeBSD.org> Date: Sun, 24 Feb 2013 19:11:29 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20130117 Thunderbird/19.0 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: svn commit: r247166 - head/contrib/llvm/tools/clang/lib/Driver References: <201302222240.r1MMeAsu042087@svn.freebsd.org> <20130222235332.GB2454@kib.kiev.ua> <5128AED6.2020906@FreeBSD.org> <20130223201857.GD2454@kib.kiev.ua> <51294081.1060505@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Feb 2013 18:11:36 -0000 On 2013-02-24 03:04, Adrian Chadd wrote: > Just curious about the OS detection - is the default platform > detection based on the currently running OS, or the cross-built target > OS? > > eg, if I were cross-compiling FreeBSD on (say) haiku, which has > different CPU defaults, what would the default CPU output be? When you are cross-compiling, you usually specify -target $target_triple, e.g.: clang -target amd64-unknown-freebsd10.0 -c foo.c or you make a link or symlink from clang to ${target_triple}-clang, like so: amd64-unknown-freebsd10.0-clang -c foo.c In either case, the default CPU is whatever the default CPU is for that target triple. So for the amd64-unknown-freebsd triple, it would be x86_64, for i386-unknown-freebsd it would be i486, etc.