From owner-freebsd-arm@FreeBSD.ORG Sat May 18 22:34:36 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id BF48E416 for ; Sat, 18 May 2013 22:34:36 +0000 (UTC) (envelope-from tim@kientzle.com) Received: from mail-ie0-x22e.google.com (mail-ie0-x22e.google.com [IPv6:2607:f8b0:4001:c03::22e]) by mx1.freebsd.org (Postfix) with ESMTP id 8B24C7EB for ; Sat, 18 May 2013 22:34:36 +0000 (UTC) Received: by mail-ie0-f174.google.com with SMTP id 10so11509228ied.19 for ; Sat, 18 May 2013 15:34:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to:x-mailer:x-gm-message-state; bh=9Aeye0aj9OaJwcFEt/tF91KCBW4dV/grrDsHxWIhAzI=; b=hdBP1x6VtfxQhy3CahYMXc1L8JFkb3j3P7pvgPf1nvp1CbQ4VGanyUWwFRWi34kyWq YCdT+lv4SSSEcYdroDajJ/VN3Zql7J13GtnBzYJphx4PQ1gpIjXUd1Nu9fOH3dzrZecD L8o3kZJPIbCytFKdbd1wgStfZxWGeKgaD+JRYnXoCiCuQZ4fRwTyrXjpJaKOi8jm63Oh vTzY3Cnv7qmmMjWWyeus5f9YNmqawenQyTrjYw57FaIfj3I77BQIZz2oniacmFTEfNLv ZNDa+acsBMdLq9FwOu5aVh9G3n712aSdHajMHsjWg/8nFTkQpyDs3xfSv3CBlmbupCQE obNw== X-Received: by 10.50.16.202 with SMTP id i10mr1997484igd.33.1368916476290; Sat, 18 May 2013 15:34:36 -0700 (PDT) Received: from [172.24.137.243] ([137.122.64.8]) by mx.google.com with ESMTPSA id kc10sm6808183igb.0.2013.05.18.15.34.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 18 May 2013 15:34:35 -0700 (PDT) Subject: Re: Port: U-Boot for BeagleBone Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: multipart/signed; boundary="Apple-Mail=_09B759BD-7495-40CD-A68C-37E5BA6CC2AB"; protocol="application/pgp-signature"; micalg=pgp-sha1 From: Tim Kientzle In-Reply-To: <20130518224335.16aa88de@bender.Home> Date: Sat, 18 May 2013 18:34:32 -0400 Message-Id: References: <3B16A2E5-C92B-4248-BE98-DD5C1194CB05@freebsd.org> <20130518100512.57c47fe6@bender> <8D318315-A18E-4B16-B37A-1073CB36CA66@bsdimp.com> <695C0935-9AFC-4C99-B6FE-E7B6F260FB59@kientzle.com> <9A15C7DB-BC23-40DC-8059-CDCE3CFD5CEB@bsdimp.com> <90152894-5643-4189-B6DF-394E4F463FA3@kientzle.com> <20130518224335.16aa88de@bender.Home> To: Andrew Turner X-Mailer: Apple Mail (2.1283) X-Gm-Message-State: ALoCoQlUeaFYU3iAdlU4yv1O1QlQ/zoF52OmAKH3Uesck2tHgTICOIwLNNrwVSrZEZoherhVB8xi Cc: freebsd-arm X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 May 2013 22:34:36 -0000 --Apple-Mail=_09B759BD-7495-40CD-A68C-37E5BA6CC2AB Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On May 18, 2013, at 5:43 PM, Andrew Turner wrote: > On Sat, 18 May 2013 13:59:45 -0400 > Tim Kientzle wrote: >=20 >>=20 >> On May 18, 2013, at 10:54 AM, Warner Losh wrote: >>=20 >>>=20 >>> On May 18, 2013, at 10:46 AM, Tim Kientzle wrote: >>>=20 >>>> On May 18, 2013, at 10:41 AM, Warner Losh wrote: >>>>>=20 >>>>> On May 18, 2013, at 10:38 AM, Jason Birch wrote: >>>>>=20 >>>>>> I'm not sure how it'd work internally in the ports tree (I'm a >>>>>> ports consumer, not a contributor), but I'd find it weird if a >>>>>> U-Boot port required me to get any devel/cross-* ports if U-Boot >>>>>> was able to be built by Clang native to FreeBSD 9.X+ and I had >>>>>> Clang set as my CC, CPP, CXX. >>>>>=20 >>>>> u-boot can't be built with clang. >>>>=20 >>>> Yes, it can. Since the ARM clang switch was thrown, >>>> the xdev tools now build clang (unnecessarily, of course). >>>> U-Boot builds just fine with it: >>>>=20 >>>> $ armv6-freebsd-cc --version >>>> FreeBSD clang version 3.3 (trunk 178860) 20130405 >>>> Target: armv6--freebsd >>>> Thread model: posix >>>=20 >>> Do these boot? >>=20 >> Gosh. Now you've made me nervous that >> I might still be using old GCC-compiled versions. >>=20 >> Just a sec =85. >> $ rm -rf u-boot-2013.04 >> $ tar xf u-boot-2013.04.tar.bz2 >> $ sudo ./crochet.sh -c beagleblack.sh >>=20 >> Copy to SD card =85 >>=20 >> Yep. It boots. ;-) >>=20 >>> I was under the impression that u-boot used global register flags >>> in gcc that clang wasn't going to support... I'd be happy if I'm >>> wrong though=85 > My understanding is clang doesn't support it. I have removed the only > one in our kernel when adding support for clang. >=20 >> Don't know the details. Maybe Andrew knows what has changed? >=20 > The variable in question is in a macro in > arch/arm/include/asm/global_data.h. There is a pointer to a global = data > structure in register r8. This register is reserved through the use of > the -ffixed-r8 compiler flag. I'm not sure if clang supports the > -ffixed-* flag or not. >=20 > Given this if you manage to get clang to build U-Boot is is unlikely = to > work as it could change r8 within some functions unless there is some > way to tell it otherwise. Hmmm=85. Maybe I've just been lucky, and certainly my memory isn't what it should be, but I recall switching my U-Boot builds to use clang shortly after clang was made the default for ARM and I've been booting real systems with the result ever since. Doesn't clang complain about unsupported options? My U-Boot build logs definitely show this option in the compiler invocations and there are no warnings about it. (Plenty of warnings about other things, but none about this option.) Maybe --fixed- was added some time recently? I found a thread from back in October where some clang developers were discussing how to implement it: https://groups.google.com/forum/?fromgroups#!topic/llvm-dev/FKw1fWqwcW0 Tim --Apple-Mail=_09B759BD-7495-40CD-A68C-37E5BA6CC2AB Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.18 (Darwin) iQEcBAEBAgAGBQJRmAH5AAoJEGMNyGo0rfFBKWQIAN1eNLPoOa5gV3jsWvNPNkxy JUM+LTcCw/TdhIM21XBxYzyj0SksOHND3tSt7bNriXkBAJHpE2YTuyc7ZZaASQl2 rI+ohqrb5prL7OB6bUGc+CwlPABdI+oPe9OrQ6KBYVhW+FI8UJW4/ywWW4SFibLR 2ljzi3euCGuf2YmsI46vY7QFGpg2apF2i0gt8kHUb/YSh44Cc3Y3DOx6IEi5q9i6 QyWNwie6s7EI3P96amoQQyWGqGx5f4yJPjBrffBiXmpAKRLko4CVi2aNXkPf05B8 d1qb7O063Ea5agFKSahD0q9FHl9qSBskw1+5nUy7xyutEJDbmwFMmm1lQ1CcHmM= =l/Pc -----END PGP SIGNATURE----- --Apple-Mail=_09B759BD-7495-40CD-A68C-37E5BA6CC2AB--