Date: Thu, 17 Apr 2014 06:49:21 -0600 From: Ian Lepore <ian@FreeBSD.org> To: ticso@cicely.de Cc: Tim Kientzle <tim@kientzle.com>, freebsd-arm <freebsd-arm@FreeBSD.org>, Mark R V Murray <mark@grondar.org> Subject: Re: Building an ARM/RPI-B release (hacked) on CURRENT/AMD64. Message-ID: <1397738961.1124.157.camel@revolution.hippie.lan> In-Reply-To: <20140417103117.GE44138@cicely7.cicely.de> References: <9FDD6F0E-B2A9-48D9-A3E4-181868995FDA@grondar.org> <EC41E53F-96EF-4652-9A02-D49448D104BE@kientzle.com> <20140417103117.GE44138@cicely7.cicely.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 2014-04-17 at 12:31 +0200, Bernd Walter wrote: > On Wed, Apr 16, 2014 at 06:25:39PM -0700, Tim Kientzle wrote: > > > > On Apr 15, 2014, at 12:23 PM, Mark R V Murray <mark@grondar.org> wrote: > > > > > Hi Tim > > > > > > I?ve been doing some local hacks to cross-build ARM/RPI releases on CURRENT/AMD64. > > > > > > What I?m doing aren?t clean releases in that I want to use the state of /usr/src and /usr/ports ?as-is? and not a clean check out. This allows me to experimentally break stuff without having to check it in first. It also give me a way to build bootable images for when (not ?if?!) I mess things up properly on the RPI. It has the advantage also of being quicker than the usual release build. > > > > > > (The hacks, as they stand now, are attached. I null-mount /usr/src and /usr/ports instead of checking them out, and I have local checkouts of crochet and u-boot to copy as checking them out during a release build fails too often.) > > > > > > The problem is that sometime in the last month or so, things stopped working, and its taken me until now to have the time to have a look at it. > > > > > > The problem is that during the u-boot build, a CLANG-based xdev build is used, and this has no *-gcc, only a *-cc. If I fix that with a symlink, clang then objects to the -ffixed-r8 option. Clang has an equivalent -ffixed-r9, but the u-boot that is mandated for FreeBSD/Arm/RPI use doesn?t have the R9 fix. > > > > > > Questions: > > > > > > 1) Are you aware of any of this? > > > > Yes. > > > > > > > > 2) Do you have a quick fix idea (preferably not involving GCC)? > > > > No. <sigh> > > > > Right now, the ?get it working? answer is to install GCC XDEV tools. > > > > Though I tried that on a clean system last weekend and it > > still failed to build. Haven?t tracked down why. > > > > > > > > I?m rather short of time right now, but may be able to get to this over Easter. > > > > Long-term, we?d all like to see U-Boot build with clang. > > > > No idea yet whether that?s hard or not. No idea if > > I?ll have time to work on it in the near future. > > What are the symptoms with clang U-Boot? > U-boot requires that a global register be set aside by the compiler and it's used to access all global vars. As I vaguely understand it, u-boot used to want r8 for this, and clang didn't used to support the concept at all. Now clang supports it, but only for r9, and apparently more recent u-boot expects r9 rather than r8. So the fix is probably to use more recent u-boot sources (I've been using 2014.01 for imx6 stuff), and probably to add the new -ffixed-r9 flag for a clang build. -- Ian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1397738961.1124.157.camel>