Date: Thu, 17 Apr 2014 19:01:31 +0100 From: Mark R V Murray <mark@grondar.org> To: Ian Lepore <ian@FreeBSD.org> Cc: Tim Kientzle <tim@kientzle.com>, freebsd-arm <freebsd-arm@FreeBSD.org>, ticso@cicely.de Subject: Re: Building an ARM/RPI-B release (hacked) on CURRENT/AMD64. Message-ID: <ED243420-AC33-4D90-A23D-0266C142F3C1@grondar.org> In-Reply-To: <1397738961.1124.157.camel@revolution.hippie.lan> References: <9FDD6F0E-B2A9-48D9-A3E4-181868995FDA@grondar.org> <EC41E53F-96EF-4652-9A02-D49448D104BE@kientzle.com> <20140417103117.GE44138@cicely7.cicely.de> <1397738961.1124.157.camel@revolution.hippie.lan>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
On 17 Apr 2014, at 13:49, Ian Lepore <ian@FreeBSD.org> wrote:
> 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.
Correct.
The pig in trying to build u-boot 2004.04 with Clang/XDEV is the use of
#define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("r9”)
which means “gd is an alias for the r9 register and is a pointer to type …”
… I think. :-)
Clang doesn’t like this one bit. First objection is to “global register variables”, so if I experimentally knock out the “register”, I simply get the second objection - to "multiple instances of the r9 global variable”.
Googling a bit suggests that Clang just plain can’t do this. :-(
M
--
Mark R V Murray
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
Comment: GPGTools - http://gpgtools.org
iQCVAwUBU1AW/958vKOKE6LNAQrR9wP8DMQ8uE2b/wnYmacp3WBinrKQKcle5EjQ
YhGVIZvXiqfksXv0k8lVkrlbeTDwg90BqMxhnFGIUdf9/XrohBlK2blw1S4eTL+q
7TjerwJP9MDVgjyLCxsrqXHz1VVLrJl2FHbukrkj2MHK7DnOq8YQDe/x4yaeyNyg
LRuOkgbzC0s=
=aAjc
-----END PGP SIGNATURE-----
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ED243420-AC33-4D90-A23D-0266C142F3C1>
