From: Jeroen Hofstee <jeroen@myspectrum.nl>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 0/8] add clang support for some ARM boards
Date: Thu, 11 Sep 2014 13:17:20 +0200 [thread overview]
Message-ID: <1410434240.21166.21.camel@yellow> (raw)
In-Reply-To: <E1XRzns-0006T1-Ue@janus>
Hello Albert,
On do, 2014-09-11 at 10:32 +0200, Albert ARIBAUD wrote:
>
> On Wed, 10 Sep 2014 20:08:50 +0200, Jeroen Hofstee
> <jeroen@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.
It is a gcc feature, see [1]: "Warn whenever a static function is
declared but not defined or a _non-inline static function_ is unused.
This warning is enabled by -Wall."
>
> 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.
>
Also a gcc feature, see [2]. The constant is indeed not used.
> 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.
>
This is the integrated-as complaining (the README tells you to disable
it for the moment). The clang folks push UAL hard, up to a point we need
to think about minimum gcc version etc. To avoid that, I just left out
such changes and just use gas instead, at least for the time being.
Below are some changes to compile versatileqemu with llvm integrated-as
and gcc/gas. No idea if it actually boots though.
> Jeroen, do you feel like raising point 2 to the clang/LLVM folks?
It is removed on purpose as far as I understood. I don't think they
regards it as a bug, see obfuscated patch below.
> Other than that, the patch series seems to be good. I'll apply it
> soonish.
>
Thanks,
Jeroen
[1] https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=13029
s/~/-/g
~~~
next prev parent reply other threads:[~2014-09-11 11:17 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-31 20:32 [U-Boot] [RFC 00/10] clang support for ARM Jeroen Hofstee
2014-05-31 20:32 ` [U-Boot] [RFC 01/10] ARM: crt0.S: clear the global data Jeroen Hofstee
2014-06-03 2:02 ` Simon Glass
2014-06-03 19:41 ` Jeroen Hofstee
2014-06-03 15:36 ` Tim Harvey
2014-07-11 17:55 ` Jeroen Hofstee
2014-05-31 20:32 ` [U-Boot] [RFC 02/10] ARM: omap3/board: add spl specific board_init_f Jeroen Hofstee
2014-05-31 20:32 ` [U-Boot] [RFC 03/10] board_r: only assign gd when requested Jeroen Hofstee
2014-06-03 2:05 ` Simon Glass
2014-06-03 20:52 ` Jeroen Hofstee
2014-06-04 3:52 ` Stefan Roese
2014-06-04 4:19 ` York Sun
2014-05-31 20:32 ` [U-Boot] [RFC 04/10] ARM: do not set gd in generic board again Jeroen Hofstee
2014-06-03 2:06 ` Simon Glass
2014-05-31 20:32 ` [U-Boot] [RFC 05/10] ARM: SPL: do not set gd again Jeroen Hofstee
2014-06-03 2:07 ` Simon Glass
2014-06-03 15:38 ` Tim Harvey
2014-05-31 20:32 ` [U-Boot] [RFC 06/10] cc-option: make it work with clang Jeroen Hofstee
2014-06-10 8:39 ` Masahiro Yamada
2014-06-10 8:52 ` Albert ARIBAUD
2014-07-05 13:34 ` Jeroen Hofstee
2014-05-31 20:32 ` [U-Boot] [RFC 07/10] ARM: make gd a function a function for clang Jeroen Hofstee
2014-06-03 2:20 ` Simon Glass
2014-06-03 19:44 ` Jeroen Hofstee
2014-06-03 19:58 ` Jeroen Hofstee
2014-06-03 20:00 ` Simon Glass
2014-05-31 20:32 ` [U-Boot] [RFC 08/10] inline: use the gcc inline version instead of the c99 one Jeroen Hofstee
2014-05-31 20:32 ` [U-Boot] [RFC 09/10] eabi_compat: add __aeabi_memcpy __aeabi_memset Jeroen Hofstee
2014-05-31 20:32 ` [U-Boot] [RFC 10/10] README.clang: build command with clang Jeroen Hofstee
2014-07-30 19:54 ` [U-Boot] [PATCH v2 0/8] add clang support for some ARM boards Jeroen Hofstee
2014-07-30 19:54 ` [U-Boot] [PATCH v2 1/8] board_r: ARM[64] do not set gd again Jeroen Hofstee
2014-07-30 19:54 ` [U-Boot] [PATCH v2 2/8] ARM: SPL: " Jeroen Hofstee
2014-07-30 19:54 ` [U-Boot] [PATCH v2 3/8] cc-option: also detect unsupported warnings options Jeroen Hofstee
2014-07-30 19:54 ` [U-Boot] [PATCH v2 4/8] ARM: make gd a function for clang Jeroen Hofstee
2014-07-30 19:54 ` [U-Boot] [PATCH v2 5/8] eabi_compat: add __aeabi_memcpy __aeabi_memset Jeroen Hofstee
2014-07-30 19:54 ` [U-Boot] [PATCH v2 6/8] clang: workaround for generated constants Jeroen Hofstee
2014-07-30 19:54 ` [U-Boot] [PATCH v2 7/8] Makefile: default to cc for host compiler Jeroen Hofstee
2014-07-31 10:01 ` Masahiro Yamada
2014-09-09 14:31 ` Albert ARIBAUD
2014-09-09 17:34 ` Jeroen Hofstee
2014-09-09 19:59 ` Albert ARIBAUD
2014-09-09 21:48 ` Jeroen Hofstee
2014-09-10 10:02 ` Jeroen Hofstee
2014-09-11 5:03 ` Masahiro Yamada
2014-07-30 19:54 ` [U-Boot] [PATCH v2 8/8] README.clang: build command with clang Jeroen Hofstee
2014-09-10 18:08 ` [U-Boot] [PATCH v3 0/8] add clang support for some ARM boards Jeroen Hofstee
2014-09-10 18:08 ` [U-Boot] [PATCH v3 7/8] Makefile: default to cc for host compiler Jeroen Hofstee
2014-09-10 18:08 ` [U-Boot] [PATCH v3 8/8] README.clang: build command with clang Jeroen Hofstee
2014-09-11 8:32 ` [U-Boot] [PATCH v3 0/8] add clang support for some ARM boards Albert ARIBAUD
2014-09-11 11:17 ` Jeroen Hofstee [this message]
2014-09-11 13:31 ` Albert ARIBAUD
2014-09-11 20:12 ` Jeroen Hofstee
2014-09-11 15:43 ` Albert ARIBAUD
2014-09-11 19:36 ` Jeroen Hofstee
2014-09-11 15:48 ` Albert ARIBAUD
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1410434240.21166.21.camel@yellow \
--to=jeroen@myspectrum.nl \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.