Re: Clang cross builds world

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Sat, 25 Sep 2010 14:04:05 +0200
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
Received on Sat Sep 25 2010 - 10:04:02 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:07 UTC