[U-Boot] [PATCH v3 0/8] add clang support for some ARM boards
Albert ARIBAUD
albert.u.boot at aribaud.net
Thu Sep 11 10:32:31 CEST 2014
Hi Jeroen,
On Wed, 10 Sep 2014 20:08:50 +0200, Jeroen Hofstee
<jeroen at myspectrum.nl> wrote:
> Changes since v2:
> - As Albert pointed out the clang instructions don't work with
> Debian based binary packages. While I was aware of that it is
> for a different reason then I thought, it is not that ARM is not
> enabled as a backend but older versions are a bit more picky on
> the target argument and don't tolerate a trailing dash to it as
> used for CROSS_COMPILE etc. The README is updated accordingly.
>
> As a side note clang3.5-svn as shipped in Ubuntu is not the 3.5
> release but an snapshot of some svn commit and hence explain why
> the recompiled 3.5 can behave different then the ubuntu clang-3.5.
> Since it misses some patches, the clang3.5-svn can build less
> boards then 3.4 or an actual 3.5 release.
>
> - While add it, include Masahiro suggestion to also use c++ instead
> of g++.
> - Drop dependencies from the cover-letter as they are merged.
> - only patch 7/8 and 8/8 are reposted. 1..6 are the same as v2.
Thanks, tested building rpi_b, it works now.
The, tested on versatileqemu out of curiosity and got the following
results:
1.
clang warns about Unused static functions in common/console.c, namely
console_printdevs and console_doenv (1). Why gcc does not flag this?
We have -Wall set which is supposed to imply -Wunused-functions.
There is also an unused variable warning in disk/part.c28
(block_drvr). I haven't looked at why clang warns about it and not gcc,
but it could raise the same question as the functions above.
2.
clang errors on arch/arm/lib/cache.c:28 for this:
asm("0: mrc p15, 0, r15, c7, c10, 3\n\t" "bne 0b\n" : : : "memory");
and that is a clang mistake, as for ARM926EJS r15 is a valid (albeit
quite special semantically) Rd for Test and Clean DCache, see page 2-24.
Jeroen, do you feel like raising point 2 to the clang/LLVM folks?
(1) and BTW it's not like the functions are used in some configuration
other than versatileqemu; they're completely unused.
Other than that, the patch series seems to be good. I'll apply it
soonish.
Amicalement,
--
Albert.
More information about the U-Boot
mailing list