From owner-freebsd-questions@FreeBSD.ORG Tue Oct 16 17:25:17 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E46F6DE for ; Tue, 16 Oct 2012 17:25:17 +0000 (UTC) (envelope-from mail@ozzmosis.com) Received: from icp-osb-irony-out3.external.iinet.net.au (icp-osb-irony-out3.external.iinet.net.au [203.59.1.219]) by mx1.freebsd.org (Postfix) with ESMTP id 5718B8FC17 for ; Tue, 16 Oct 2012 17:25:16 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAN2XfVA6Bu5+/2dsb2JhbABFDr92gQiCIAEBBAE6PwULCw0oERQYMROHfgW7TJEsYAOVaoVQNYougjJP X-IronPort-AV: E=Sophos;i="4.80,595,1344182400"; d="scan'208";a="58650014" Received: from unknown (HELO smtp.phoenix) ([58.6.238.126]) by icp-osb-irony-out3.iinet.net.au with ESMTP; 17 Oct 2012 01:25:14 +0800 Received: by smtp.phoenix (Postfix, from userid 1001) id 6D01C614; Wed, 17 Oct 2012 04:25:14 +1100 (EST) Date: Wed, 17 Oct 2012 04:25:14 +1100 From: andrew clarke To: Scott Bennett Subject: Re: clang options question Message-ID: <20121016172514.GB64734@ozzmosis.com> References: <201210161552.q9GFqaXj022507@mp.cs.niu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201210161552.q9GFqaXj022507@mp.cs.niu.edu> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Oct 2012 17:25:18 -0000 On Tue 2012-10-16 10:52:36 UTC-0500, Scott Bennett (bennett@cs.niu.edu) wrote: > From looking at the clang(1) man page, it is not clear to me what the > difference is between the -arch option and the -march= option. Would > someone please summarize the difference(s) for me? Thanks much! >From the users POV, clang is supposed to be a drop-in replacement for gcc, where -arch is also an option. Looking online though, it would appear it's an Apple Darwin (OS X) only feature of gcc for generating universal binaries. The question is a bit academic as it doesn't actually do anything in FreeBSD, at least not for me: $ clang -o hello -arch x86_64 hello.c clang: warning: argument unused during compilation: '-arch x86_64' $ clang -v clang version 3.1 (branches/release_31) Target: amd64-portbld-freebsd8.3 Thread model: posix Nor in Linux (an old version, admittedly): $ clang -o hello -arch i386 hello.c clang: warning: argument unused during compilation: '-arch i386' $ clang -v clang version 1.1 (branches/release_27) Target: x86_64-pc-linux-gnu Thread model: posix Regards Andrew