From owner-freebsd-current@FreeBSD.ORG Sat Sep 25 12:04:02 2010 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1F121065675 for ; Sat, 25 Sep 2010 12:04:02 +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 5D98E8FC17 for ; Sat, 25 Sep 2010 12:04:02 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:94bc:a77:2ad8:3dae] (unknown [IPv6:2001:7b8:3a7:0:94bc:a77:2ad8:3dae]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 6EF3F5C43; Sat, 25 Sep 2010 14:04:00 +0200 (CEST) Message-ID: <4C9DE535.3060809@FreeBSD.org> Date: Sat, 25 Sep 2010 14:04:05 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.10pre) Gecko/20100910 Lanikai/3.1.4pre MIME-Version: 1.0 To: Mark Tinguely References: <4C99A53E.7060707@FreeBSD.org> <4C9A32B8.60204@kkip.pl> <4C9A6A38.4080307@freebsd.org> <4C9A7203.8010701@kkip.pl> <20100923065134.GA31455@freebsd.org> <4C9B3207.2070302@kkip.pl> <4C9B383A.6080008@FreeBSD.org> <4C9B38E2.7010403@kkip.pl> <4C9B6804.3070102@FreeBSD.org> <4C9D4CAF.3070508@gmail.com> In-Reply-To: <4C9D4CAF.3070508@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: current@freebsd.org Subject: Re: Clang cross builds world 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: Sat, 25 Sep 2010 12:04:02 -0000 On 2010-09-25 03:13, Mark Tinguely wrote: > I was inspired by the clang build world topic to try a cross build world > of ARM from a i386 computer. > > I use the build command: > > make TARGET_ARCH=arm TARGET_CPUTYPE=xscale buildworld > (I tried an "TARGET_CPUTYPE=cortex-a8" once also, I got the same errors > below). > > /etc/src.conf is taken from the FreeBSD clang web page,. > /etc/make.conf has perl version strings. > > The cross tools build stage apparently makes an i386 compiler: > /usr/obj/arm.arm/usr/src/tmp/usr/bin/clang -### > FreeBSD clang version 2.8 (branches/release_28 114020) 20100917 > Target: i386-undermydesk-freebsd9.0 > Thread model: posix > > When the library build stage begins, the assembler complains about the > unknown "--32" option from clang. I know the "--32" options is a i386 > target add-on option. Removing "--32" from the command line with a > script shim, and sure enough clang is generating i386 assembly code. > > I know the clang and ARM is not tested nor supported. I am just looking > for some clang cross architecture compiling wisdom. Clang is not yet ready for use as a cross-compiler, although support for it should be relatively easy to add. This is still being worked on upstream. See also this thread: http://lists.cs.uiuc.edu/pipermail/cfe-dev/2010-September/thread.html#11192 and this page (a more long term project): http://clang.llvm.org/UniversalDriver.html