From owner-freebsd-arm@FreeBSD.ORG Fri Apr 15 14:31:35 2011 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7F78106564A for ; Fri, 15 Apr 2011 14:31:35 +0000 (UTC) (envelope-from damjan.marion@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6CBC28FC18 for ; Fri, 15 Apr 2011 14:31:35 +0000 (UTC) Received: by qwc9 with SMTP id 9so1758010qwc.13 for ; Fri, 15 Apr 2011 07:31:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to:x-mailer; bh=2XcSwj/vSKOuozKTxJ5b2VHwKpyoE91jTAcIc+3Io9o=; b=d9EqJHkyuxHAt9bx9mFy2Gz9zOrWx9DSCgVKmPthQ7UdGilboXrSWc1ayc7isOVWAA 6D8Fe0iJ3QYblLRIzuYcMuRMGcapj3f5MpWsINIIMpb0RFfueF4I9CiHAN0MrVkg96qH 5WQxeCmf+5xFDlwrTHmg2GPYUlwjFdiDYvD1I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=FTHJCLWn7O2NeJc0Qev8h5DVO/lwKaSd6EZMNmD/Jqj0MH++7Lze5lrGxoADMkJ037 I3hlG3W7opss8xjxQ/EBBzfSJyNGp4UQ9aMkAJBmDIwQdnR7P/rwOSYroduyr5g3Dfw9 JZ+SDAFoP4aN5RgwaQo3llyWKJmZHDm0NI+zM= Received: by 10.229.13.227 with SMTP id d35mr1487611qca.237.1302877894643; Fri, 15 Apr 2011 07:31:34 -0700 (PDT) Received: from rtp-vpn3-329.cisco.com (rtp-isp-nat1.cisco.com [64.102.254.33]) by mx.google.com with ESMTPS id t17sm1980591qcs.11.2011.04.15.07.31.31 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 15 Apr 2011 07:31:33 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Damjan Marion In-Reply-To: <475540.33003.qm@web112105.mail.gq1.yahoo.com> Date: Fri, 15 Apr 2011 16:31:27 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <475540.33003.qm@web112105.mail.gq1.yahoo.com> To: Vassilis Laganakos X-Mailer: Apple Mail (2.1084) Cc: "freebsd-arm@freebsd.org" Subject: Re: LLVM/Clang cross-compiling for ARM X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2011 14:31:35 -0000 Hi Vassilis, On Apr 14, 2011, at 1:06 PM, Vassilis Laganakos wrote: > Hi Damjan, Mark, >=20 > ----- Original Message ----- >=20 >> From:Damjan Marion >> To:Mark Tinguely >> Cc:Vassilis Laganakos ; = "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 >> >=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