[U-Boot] [RFC 00/10] clang support for ARM
Jeroen Hofstee
jeroen at myspectrum.nl
Sat May 31 22:32:14 CEST 2014
Hi, I rebased some patches with should compile a working u-boot
with clang and gcc (besides a couple which don't have memset),
but I didn't bother too much about that for now.
Obviously this is not intended for the next release, but a
request for comment. Clang is not really fond of the gd
assignment and I tried to get rid of them since crt0.S already
handles this. I also added clearing gd (in a broken way) to
crt0.S to prevent all board_init_f having to do it again and
again (i2c / serial typically depends on it).
The most important question is if these patches break any
existing board. Your feedback is welcome.
Kind regards,
Jeroen
patches are also at (with some twister board specific ones):
https://github.com/jhofstee/u-boot/commits/v2014.07-rc2-clang
Jeroen Hofstee (10):
ARM: crt0.S: clear the global data
ARM: omap3/board: add spl specific board_init_f
board_r: only assign gd when requested
ARM: do not set gd in generic board again
ARM: SPL: do not set gd again
cc-option: make it work with clang
ARM: make gd a function a function for clang
inline: use the gcc inline version instead of the c99 one.
eabi_compat: add __aeabi_memcpy __aeabi_memset
README.clang: build command with clang
arch/arm/cpu/armv7/omap3/board.c | 15 ++++++++++-----
arch/arm/include/asm/config.h | 2 --
arch/arm/include/asm/global_data.h | 17 +++++++++++++++++
arch/arm/lib/crt0.S | 6 ++++++
arch/arm/lib/eabi_compat.c | 15 +++++++++++++--
arch/arm/lib/spl.c | 3 ---
common/board_r.c | 2 +-
doc/README.clang | 15 +++++++++++++++
include/linux/compiler-gcc.h | 7 ++++---
scripts/Kbuild.include | 4 ++--
10 files changed, 68 insertions(+), 18 deletions(-)
create mode 100644 doc/README.clang
--
1.8.3.2
More information about the U-Boot
mailing list