Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Apr 2011 16:31:27 +0200
From:      Damjan Marion <damjan.marion@gmail.com>
To:        Vassilis Laganakos <vassilis.laganakos@yahoo.com>
Cc:        "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>
Subject:   Re: LLVM/Clang cross-compiling for ARM
Message-ID:  <DF84E1FC-F047-4DF7-B369-12B7675A7127@gmail.com>
In-Reply-To: <475540.33003.qm@web112105.mail.gq1.yahoo.com>
References:  <475540.33003.qm@web112105.mail.gq1.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help

Hi Vassilis,

On Apr 14, 2011, at 1:06 PM, Vassilis Laganakos wrote:

> Hi Damjan, Mark,
>=20
> ----- Original Message -----
>=20
>> From:Damjan Marion <damjan.marion@gmail.com>
>> To:Mark Tinguely <marktinguely@gmail.com>
>> Cc:Vassilis Laganakos <vassilis.laganakos@yahoo.com>; =
"freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>
>> Sent:Thursday, April 14, 2011 8:13 AM
>> Subject:Re: LLVM/Clang cross-compiling for ARM
>>=20
>>=20
>> Hi Mark,
>>=20
>> Seems that clang from current (made by i386 buildworld) is able to =
build ARM=20
>> code:
>>=20
>> # clang -v                                                            =
         =20
>>                                                                       =
         =20
>>     FreeBSD clang version 2.9 (trunk 126547) 20110226
>> Target: i386-undermydesk-freebsd9.0
>> Thread model: posix
>>=20
> That's the same I get when I build llvm/clang as a cross-compiler, and =
I thought that
> something was wrong. I'd expect that to be: "arm-unknown-freebsd9.0", =
but it
> seems from your test bellow that it does generate ARM code.

Seems that this just shows host architecture.

>=20
>> <snip>
>=20
> Well you proved the opposite from what we assumed, since this looks =
like ARM assembly to me :)
>=20
> Anyone knows if something has changed in =
http://wiki.freebsd.org/BuildingFreeBSDWithClang
> since it was last edited?

My understanding is that clang/LLVM architecture is build from day one =
to support cross compilation so same clang executable can build code for =
multiple targets. You can see the list of supported architectures with =
"llc --version"
For specific architecture you can see list of all variants and features =
with "llvm-as < /dev/null | llc -march=3Darm -mcpu=3Dhelp"

Unfortunately llc and llvm-as are not built as part of buildworld. =
According to folks from freebsd-clang IRC channel llc and llvm-as are =
not built because there is no use of them.

>=20
>=20
> Damjan, if you find some more info about this with llvm/clang, could =
you please post
> the links here? :)

I dont have any special reference, but looking into source code might =
help :)

BTW According to #freebsd-clang folks cross-compilation might work just =
by renaming or symlinking clang to arm-freebsd-clang triple (or =
similar). They are also looking for feedback.

Regards,

Damjan







Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?DF84E1FC-F047-4DF7-B369-12B7675A7127>