SlideShare a Scribd company logo
1 of 35
Download to read offline
LLVM/Clang integration to Buildroot
Romain Naour
romain.naour@smile.fr
September 22, 2019
www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 1/35
Overview
1 Introduction
2 LLVM and Clang
3 Objectives
4 LLVM/Clang initial integration into Buildroot
5 Cross-compiling Linux with Clang
6 Conclusions
www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 2/35
Plan
1 Introduction
2 LLVM and Clang
3 Objectives
4 LLVM/Clang initial integration into Buildroot
5 Cross-compiling Linux with Clang
6 Conclusions
www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 3/35
Disclaimer
Purpose of the talk is to present the current state of
llvm/clang integration into Buildroot.
I am not a llvm/clang developer. Not pretending to know
everything about llvm/clang.
Experience gained from experimenting llvm/clang in the
context of Buildroot.
I am only interested in its integration in Buildroot to enable
new features.
Focused on AArch64 and x86_64 target.
www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 4/35
Buildroot at a glance
From ELCE 2017 "Buildroot: What’s New?"1
Is an embedded Linux build system, builds from
source:
cross-compilation toolchain
root filesystem with many libraries/applications,
cross-built
kernel and bootloader images
More than 2500 packages available
Generates filesystem images, not a distribution
1
https://www.youtube.com/watch?v=D6zO4nMX9KY
www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 5/35
Plan
1 Introduction
2 LLVM and Clang
3 Objectives
4 LLVM/Clang initial integration into Buildroot
5 Cross-compiling Linux with Clang
6 Conclusions
www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 6/35
LLVM
Open source project started in 2000. LLVM 1.0 released in
October 2003
Several subprojects: LLVM Core, Clang, lldb, compiler-rt, libclc,
lld
Provides a compiler infrastructure written in C++11 (C++14)
Designed as an API from the beginning
Focusing on compile time and performance of the generated
code
Well structured and documented
Some existing backends:
ARM, ARM64, Hexagon, Mips, Mipsel, NVIDIA PTX 32/64,
PowerPC 32/64, AMDGPU, Sparc, Thumb, x86, x86-64, XCore
www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 7/35
LLVM - Three-phase approach
www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 8/35
LLVM - Internal aspects
Intermediate Representation (IR)
Mostly architecture-independent instruction set (RISC)
Strongly typed
Unlimited number of virtual registers in SSA
IR Code example:
define i32 @main() #0 {
entry:
%retval = alloca i32, align 4
%c = alloca i32, align 4
store i32 0, i32* %retval, align 4
%0 = load i32, i32* @a, align 4
%1 = load i32, i32* @b, align 4
%add = add nsw i32 %0, %1
store i32 %add, i32* %c, align 4
ret i32 0
}
www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 9/35
Clang
Frontend C/C++, Objective C/C++ and OpenCL C for LLVM
Clear and concise diagnostics (error and warning messages)
Natively a cross-compiler: -target <triple>
Sanitizers
Goals
Designed to be highly compatible with GCC
C++11 supported since Clang 3.3
C++14 supported since Clang 3.4
C++17 supported since Clang 5
C++2a implementation started since Clang 6
Performance vs GCC ?2 3
2
http://www.phoronix.com/vr.php?view=25742
3
https://www.phoronix.com/vr.php?view=28232
www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 10/35
Toolchain components
Component LLVM GNU
C/C++ Compiler clang gcc
Assembler cc1as as
Linker lld ld
Runtime compiler-rt libgcc
Debugger lldb gdb
Unwinder libunwind libgcc_s
C++ library libc++abi, libc++ libsupc++ libstdc++
Tools llvm-ar, llvm-as etc. ar, objdump, etc.
C library - libc (Glibc, Musl)
There is a proposal from Google about an LLVM libc4
.
4
https://lists.llvm.org/pipermail/llvm-dev/2019-June/133269.html
www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 11/35
Plan
1 Introduction
2 LLVM and Clang
3 Objectives
4 LLVM/Clang initial integration into Buildroot
5 Cross-compiling Linux with Clang
6 Conclusions
www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 12/35
Objectives
Initial integration by Valentin Korenblit (2018)
Preliminary study of LLVM/Clang.
LLVM/Clang integration to Buildroot for the target.
llvmpipe for Mesa 3D.
AMDGPU backend.
OpenCL implementations, most of them rely on LLVM
Enable OpenCL for AMD GPUs (Clover) and Broadcom
Videocore IV (VC4CL).
OpenCL support for already existing packages in Buildroot.
Integration of new packages that can benefit from OpenCL:
image processing (i.e. Darktable), simulation, cryptography.
Integration of new packages that can benefit from libLLVM or
libclang.
Use Clang as a cross-compiler (2019/2020?).
www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 13/35
Plan
1 Introduction
2 LLVM and Clang
3 Objectives
4 LLVM/Clang initial integration into Buildroot
5 Cross-compiling Linux with Clang
6 Conclusions
www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 14/35
Available hardware for testing
.
Platform 1 - x86_64 (HP ProBook)
Processor: AMD A4-3300M Dual Core @ 1.9 GHz.
GPU: AMD Radeon Dual Graphics (HD6480G + HD7450M).
Ease testing.
Platform 2 - ARM (Raspberry Pi 2 Model B).
Processor: ARMv7 Cortex-A7 Quad Core @ 900 MHz.
GPU: Broadcom Videocore IV.
Platform 3 - ARM/AArch64 (Raspberry Pi 3 Model B).
Processor: ARMv8 Cortex-A53 Quad Core @ 1.2 GHz.
GPU: Broadcom Videocore IV.
www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 15/35
LLVM packaging for Buildroot
CMake-based project
Buildroot provides a CMake infrastructure
Plenty of options, some with misleading names
LLVM_TARGETS_TO_BUILD
LLVM_TARGET_ARCH
LLVM_DEFAULT_TARGET_TRIPLE
LLVM_HOST_TRIPLE
Difficult to be cross-compiled
At least llvm-tblgen must be compiled for the host first
It requires a modern and fully-featured toolchain (C++11 -> C++14)
Takes a lot of time to compile (host + target)
www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 16/35
LLVM packaging for Buildroot
LLVM 5.0.1 is the first packaged version
Only LLVM libraries are needed (libLLVM.so), no tools
The main problem: llvm-config not giving the desired output
It’s a compiled program. Normally ”config” programs are scripts.
llvm-config compiled for the host must be installed to the
target’s sysroot.
Some output depends on its location and some other is
contained in the binary
Solution: do a full installation of LLVM for the host using the
same5
configuration options as for the target and link LLVM
tools with libLLVM (needed for AMDGPU backend).
5
Tools are not built for the target
www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 17/35
LLVM support for Mesa 3D drivers
Gallium llvmpipe driver: software rasterizer that uses LLVM to
do runtime code generation.
OpenCL using Gallium R600 and RadeonSI
Both use AMDGPU LLVM backend
Some benchmarks (LLVM 5.0.1):
Gallium Driver GLMark2 GLMark2-es2
R600 on HD6480 156 156
softpipe on AMD A4-3300M 3 3
softpipe on Cortex-A53 (32-bit) NS 0
softpipe on Cortex-A53 (64-bit) NS 0
llvmpipe on AMD A4-3300M 47 52
llvmpipe on Cortex-A53 (32-bit) NS 11
llvmpipe on Cortex-A53 (64-bit) NS 13
www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 18/35
Selecting llvmpipe
www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 19/35
Clang packaging for Buildroot
LLVM and Clang should be version bumped together.
It is normally built inside LLVM source tree (llvm/tools) but
Buildroot uses per-package build directories.
Some more tweaks are needed.
Binaries, headers and some scripts must be removed from the
target.
Only libclang.so is necessary on the target.
Buildroot does not provide a standard infrastructure to install a
compiler on the target (you’re on your own).
Clang, Clang++ binaries can’t be easily disabled from the build
system.
www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 20/35
OpenCL: Clover: Computing Language over Gallium
Clover needs libclang and libclc.
Valentin added Mesa3d OpenCL support.
Added AMDGPU LLVM backend support, libclc and clinfo
packages.
Tested VC4CL for Broadcom Videocore IV.
Runtime testing using Piglit.
See Linuxembedded blog6
for more details on OpenCL.
6
http:
//www.linuxembedded.fr/2018/07/llvmclang-integration-into-buildroot
www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 21/35
LLVM/Clang in Buildroot - Current State
Commited to Buildroot’s master:
LLVM package (2018.05)
LLVM support for Mesa 3D (2018.05)
Clang package (2018.05)
Libclc package (2018.11)
libopencl, clinfo packages (2018.11)
Piglit package (2019.08)
Keep LLVM/Clang at the latest version
Buildroot LTS 2019.02.x use LLVM/Clang 7.0.1
TODO & WIP
Add OpenCL support for already existing packages (i.e opencv)
Add new packages that depend on LLVM/Clang or OpenCL
Use Clang as a cross-compiler
www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 22/35
LLVM/Clang in Buildroot - Work in progress
Chromium7
& lld8
by Joseph Kogut
Chromium needs Clang as compiler.
Lld used as GNU ld drop-in replacement.
Compiler-rt & Libfuzzer9
by Matt Weber (Rockwell Collins)
Compiler-rt to run the code with sanitizer instrumentation.
Libfuzzer: a library for coverage-guided fuzz testing.
BCC (BPF Compiler Collection)10
by Jugurtha Belkalem (Smile)
BCC use libclang to build eBPF programs to do debugging11
.
7
https://github.com/jakogut/buildroot/commits/chromium-v7-wip
8
http://patchwork.ozlabs.org/project/buildroot/list/?series=121282
9
http://patchwork.ozlabs.org/project/buildroot/list/?series=105601
10
http://patchwork.ozlabs.org/project/buildroot/list/?series=106280
11
http://www.linuxembedded.fr/2019/05/bcc-integration-into-buildroot
www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 23/35
Plan
1 Introduction
2 LLVM and Clang
3 Objectives
4 LLVM/Clang initial integration into Buildroot
5 Cross-compiling Linux with Clang
6 Conclusions
www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 24/35
Compiling a Linux system with Clang
Until recently, Linux kernel expected to use some GCC
behavior that are not supported by Clang:
Variable Length Arrays inside structures
(VLA removed since 4.20)
Nested functions
Explicit register variables
LLVM assembler cannot be used to build the kernel
Support for asm goto in LLVM & Clang for x86_6412
LLVMLinux Project: Kernel 4.4 and 4.9 built with Clang for
x86_64 and ARM64 (patches applied)13
Dependency on GNU as and ld
Glibc14
? Musl15
?
12
https://bugs.llvm.org/show_bug.cgi?id=9295
13
https://lwn.net/Articles/734071/
14
https://sourceware.org/glibc/wiki/GlibcMeetsClang
15
https://wiki.musl-libc.org/supported-platforms.html
www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 25/35
Compiling a Linux distribution with Clang
2019 EuroLLVM Developers’ Meeting: Switching a Linux
distribution’s main toolchains to LLVM/Clang16
- Bernhard
Rosenkränzer
From the OpenMandriva Wiki17
"Over 98% of packages in our
main repository are now built with LLVM/clang."
32757 Debian packages have been rebuild with Clang 8.
Among them, 1322 (4 %) failed18
16
https://www.youtube.com/watch?v=QinoajSKQ1k
17
https://wiki.openmandriva.org/en/4.0/Release_Notes#LLVM.2Fclang
18
https://clang.debian.net/status.php?version=8svn
www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 26/35
Cross-compiling with Clang with Buildroot
In Buildroot we take advantage of all previous upstream work
to build an embedded system with Clang.
Objectives:
Build vanilla Linux kernels.
Build most of userspace applications.
Select GCC or Clang globally in the defconfig.
Limitations:
Keep toolchain components and bootloaders build with GCC
Rebuild LLVM/Clang for each defconfig build.
We expects build and runtime issue due to cross-compiling
with Clang.
www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 27/35
Cross-compiling with Clang with Buildroot
What’s remain to do to use Clang as a cross-compiler into
Buildroot?
Fix Clang’s libgcc and crt*.o search path to build userspace
applications19
.
Add a toolchain wrapper as for GCC to executes the real
compiler with a number of arguments (sysroot) hardcoded.
Improve the package infrastructure where GCC is explicitely
used (generic packages, meson, cmake etc).
Add an option to select Clang or GCC in the defconfig.
Fixes most build issues on the long term.
Still a lot of warning due to GCC compiler flags used with Clang.
19
http://patchwork.ozlabs.org/patch/1159304/
www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 28/35
Current issues with Clang
Busybox (segfault with applets (i.e init))20
.
Bootloader & firmware (uboot, barebox, grub2, ATF).
uboot: use global register variables.
grub2: inline asm constructs (.addrsig etc.)
Python3 build issue with _ctype module.
rng-tools: Outdated version (from 2004) using a VLA.
Valgrind: __builtin_longjmp not supported in LLVM/Clang for
Aarch64 target21
.
20
http://lists.busybox.net/pipermail/busybox/2019-June/087337.html
21
https://bugs.kde.org/show_bug.cgi?id=369723
www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 29/35
Qemu runtime testing: AArch64 & x86_64
qemu_aarch64_virt_defconfig
qemu_x86_64_defconfig
Using the latest kernel version (5.2.7)
Using LLVM/Clang 9.0.0rc3 for x86_64 (asm-goto support)
Welcome to Buildroot
# uname −a
Linux buildroot 5.2.7 #1 SMP Thu Sep 5 17:33:00 CEST 2019 aarch64 GNU/Linux
# dmesg | head −n 2
Booting Linux on physical CPU 0x0000000000 [0x410fd034]
Linux version 5.2.7 (clang version 8.0.1 (tags/RELEASE_801/final)) #1 SMP Thu Sep 5 17:33:00 CEST
# cat /etc/os−release
NAME=Buildroot
VERSION=2019.11−git−00175−g0cc6fbbdf5
ID=buildroot
VERSION_ID=2019.11−git
PRETTY_NAME="Buildroot 2019.11−git"
www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 30/35
Available hardware for testing
.
Aarch64 (Le Potato AML-S905X-CC).
Processor: ARM Cortex-A53 Quad Core @ 1.512GHz.
GPU: ARM Mali-450 @ 750MHz.
Potato board received two years ago at Kernel recipes (Thanks!)
Live Demo (kernel built with Clang)
www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 31/35
Plan
1 Introduction
2 LLVM and Clang
3 Objectives
4 LLVM/Clang initial integration into Buildroot
5 Cross-compiling Linux with Clang
6 Conclusions
www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 32/35
Conclusions
LLVM/Clang is already available for the target.
Clang can now build vanilla Linux Kernel.
It’s possible to use Clang as cross-compiler to build a Linux
embedded system.
Initial patch series to review:
"Add the support for Clang cross-compiler"22
Not yet ready for production, needs more build and runtime
testing.
Compared to Debian and OpenMandriva, Buildroot only have
2500+ packages.
Cross-compilation with clang remains complicated.
Many projects don’t test building with anything but native GCC
(x86 or x86_64).
22
http://patchwork.ozlabs.org/project/buildroot/list/?series=129565
www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 33/35
Questions
Thanks for your attention!
Questions?
Romain Naour
romain.naour@smile.fr
Slides under CC-BY-SA 3.0
www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 34/35
References
http://www.linuxembedded.fr/2018/07/
llvmclang-integration-into-buildroot
http://www.linuxembedded.fr/2019/08/
my-first-linux-kernel-built-with-clang-compiler
https://www.lowrisc.org/blog/2019/07/
large-scale-risc-v-llvm-testing-with-buildroot
https:
//www.phoronix.com/scan.php?page=news_item&px=LLVM-Asm-Goto-Merged
https://www.youtube.com/watch?v=QinoajSKQ1k
https://clang.debian.net/status.php?version=8svn
https://bootlin.com/pub/conferences/2016/elce/
petazzoni-toolchain-anatomy
www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 35/35

More Related Content

What's hot

First Steps Developing Embedded Applications using Heterogeneous Multi-core P...
First Steps Developing Embedded Applications using Heterogeneous Multi-core P...First Steps Developing Embedded Applications using Heterogeneous Multi-core P...
First Steps Developing Embedded Applications using Heterogeneous Multi-core P...Toradex
 
Porting a new architecture (NDS32) to open wrt project
Porting a new architecture (NDS32) to open wrt projectPorting a new architecture (NDS32) to open wrt project
Porting a new architecture (NDS32) to open wrt projectMacpaul Lin
 
Debian Linux on Zynq (Xilinx ARM-SoC FPGA) Setup Flow (Vivado 2015.4)
Debian Linux on Zynq (Xilinx ARM-SoC FPGA) Setup Flow (Vivado 2015.4)Debian Linux on Zynq (Xilinx ARM-SoC FPGA) Setup Flow (Vivado 2015.4)
Debian Linux on Zynq (Xilinx ARM-SoC FPGA) Setup Flow (Vivado 2015.4)Shinya Takamaeda-Y
 
Kernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and futureKernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and futureAnne Nicolas
 
LCA14: LCA14-112: Upstreaming 201
LCA14: LCA14-112: Upstreaming 201LCA14: LCA14-112: Upstreaming 201
LCA14: LCA14-112: Upstreaming 201Linaro
 
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime RipardKernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime RipardAnne Nicolas
 
Best Current Operational Practices - Dos, Don’ts and lessons learned
Best Current Operational Practices - Dos, Don’ts and lessons learnedBest Current Operational Practices - Dos, Don’ts and lessons learned
Best Current Operational Practices - Dos, Don’ts and lessons learnedMaximilan Wilhelm
 
Kernel Recipes 2014 - NDIV: a low overhead network traffic diverter
Kernel Recipes 2014 - NDIV: a low overhead network traffic diverterKernel Recipes 2014 - NDIV: a low overhead network traffic diverter
Kernel Recipes 2014 - NDIV: a low overhead network traffic diverterAnne Nicolas
 
[COSCUP 2021] LLVM Project: The Good, The Bad, and The Ugly
[COSCUP 2021] LLVM Project: The Good, The Bad, and The Ugly[COSCUP 2021] LLVM Project: The Good, The Bad, and The Ugly
[COSCUP 2021] LLVM Project: The Good, The Bad, and The UglyMin-Yih Hsu
 
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...Anne Nicolas
 
Reverse Engineering of Rocket Chip
Reverse Engineering of Rocket ChipReverse Engineering of Rocket Chip
Reverse Engineering of Rocket ChipRISC-V International
 
Select, manage, and backport the long term stable kernels
Select, manage, and backport the long term stable kernelsSelect, manage, and backport the long term stable kernels
Select, manage, and backport the long term stable kernelsSZ Lin
 
Intel® RDT Hands-on Lab
Intel® RDT Hands-on LabIntel® RDT Hands-on Lab
Intel® RDT Hands-on LabMichelle Holley
 
DMA Survival Guide
DMA Survival GuideDMA Survival Guide
DMA Survival GuideKernel TLV
 
Learning notes on Open Source License
Learning notes on Open Source License Learning notes on Open Source License
Learning notes on Open Source License SZ Lin
 
What should you know about Net Core?
What should you know about Net Core?What should you know about Net Core?
What should you know about Net Core?Damir Dobric
 
Kernel Recipes 2017 - HDMI CEC: Status Report - Hans Verkuil
Kernel Recipes 2017 - HDMI CEC: Status Report - Hans VerkuilKernel Recipes 2017 - HDMI CEC: Status Report - Hans Verkuil
Kernel Recipes 2017 - HDMI CEC: Status Report - Hans VerkuilAnne Nicolas
 
Software update for embedded systems
Software update for embedded systemsSoftware update for embedded systems
Software update for embedded systemsSZ Lin
 
How to cross compile ROS2 distro by taken VxWorks RTOS as an example
How to cross compile ROS2 distro by taken VxWorks RTOS as an exampleHow to cross compile ROS2 distro by taken VxWorks RTOS as an example
How to cross compile ROS2 distro by taken VxWorks RTOS as an exampleAndrei Kholodnyi
 

What's hot (20)

First Steps Developing Embedded Applications using Heterogeneous Multi-core P...
First Steps Developing Embedded Applications using Heterogeneous Multi-core P...First Steps Developing Embedded Applications using Heterogeneous Multi-core P...
First Steps Developing Embedded Applications using Heterogeneous Multi-core P...
 
Porting a new architecture (NDS32) to open wrt project
Porting a new architecture (NDS32) to open wrt projectPorting a new architecture (NDS32) to open wrt project
Porting a new architecture (NDS32) to open wrt project
 
Using Qt under LGPLv3
Using Qt under LGPLv3Using Qt under LGPLv3
Using Qt under LGPLv3
 
Debian Linux on Zynq (Xilinx ARM-SoC FPGA) Setup Flow (Vivado 2015.4)
Debian Linux on Zynq (Xilinx ARM-SoC FPGA) Setup Flow (Vivado 2015.4)Debian Linux on Zynq (Xilinx ARM-SoC FPGA) Setup Flow (Vivado 2015.4)
Debian Linux on Zynq (Xilinx ARM-SoC FPGA) Setup Flow (Vivado 2015.4)
 
Kernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and futureKernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and future
 
LCA14: LCA14-112: Upstreaming 201
LCA14: LCA14-112: Upstreaming 201LCA14: LCA14-112: Upstreaming 201
LCA14: LCA14-112: Upstreaming 201
 
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime RipardKernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
 
Best Current Operational Practices - Dos, Don’ts and lessons learned
Best Current Operational Practices - Dos, Don’ts and lessons learnedBest Current Operational Practices - Dos, Don’ts and lessons learned
Best Current Operational Practices - Dos, Don’ts and lessons learned
 
Kernel Recipes 2014 - NDIV: a low overhead network traffic diverter
Kernel Recipes 2014 - NDIV: a low overhead network traffic diverterKernel Recipes 2014 - NDIV: a low overhead network traffic diverter
Kernel Recipes 2014 - NDIV: a low overhead network traffic diverter
 
[COSCUP 2021] LLVM Project: The Good, The Bad, and The Ugly
[COSCUP 2021] LLVM Project: The Good, The Bad, and The Ugly[COSCUP 2021] LLVM Project: The Good, The Bad, and The Ugly
[COSCUP 2021] LLVM Project: The Good, The Bad, and The Ugly
 
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
 
Reverse Engineering of Rocket Chip
Reverse Engineering of Rocket ChipReverse Engineering of Rocket Chip
Reverse Engineering of Rocket Chip
 
Select, manage, and backport the long term stable kernels
Select, manage, and backport the long term stable kernelsSelect, manage, and backport the long term stable kernels
Select, manage, and backport the long term stable kernels
 
Intel® RDT Hands-on Lab
Intel® RDT Hands-on LabIntel® RDT Hands-on Lab
Intel® RDT Hands-on Lab
 
DMA Survival Guide
DMA Survival GuideDMA Survival Guide
DMA Survival Guide
 
Learning notes on Open Source License
Learning notes on Open Source License Learning notes on Open Source License
Learning notes on Open Source License
 
What should you know about Net Core?
What should you know about Net Core?What should you know about Net Core?
What should you know about Net Core?
 
Kernel Recipes 2017 - HDMI CEC: Status Report - Hans Verkuil
Kernel Recipes 2017 - HDMI CEC: Status Report - Hans VerkuilKernel Recipes 2017 - HDMI CEC: Status Report - Hans Verkuil
Kernel Recipes 2017 - HDMI CEC: Status Report - Hans Verkuil
 
Software update for embedded systems
Software update for embedded systemsSoftware update for embedded systems
Software update for embedded systems
 
How to cross compile ROS2 distro by taken VxWorks RTOS as an example
How to cross compile ROS2 distro by taken VxWorks RTOS as an exampleHow to cross compile ROS2 distro by taken VxWorks RTOS as an example
How to cross compile ROS2 distro by taken VxWorks RTOS as an example
 

Similar to Embedded Recipes 2019 - LLVM / Clang integration

Cross-compilation native sous android
Cross-compilation native sous androidCross-compilation native sous android
Cross-compilation native sous androidThierry Gayet
 
Using open source software to build an industrial grade embedded linux platfo...
Using open source software to build an industrial grade embedded linux platfo...Using open source software to build an industrial grade embedded linux platfo...
Using open source software to build an industrial grade embedded linux platfo...SZ Lin
 
Llilum 161108 at MVP Global Summit 2016
Llilum 161108 at MVP Global Summit 2016Llilum 161108 at MVP Global Summit 2016
Llilum 161108 at MVP Global Summit 2016Atomu Hidaka
 
OpenMP-OpenACC-Offload-Cauldron2022-1.pdf
OpenMP-OpenACC-Offload-Cauldron2022-1.pdfOpenMP-OpenACC-Offload-Cauldron2022-1.pdf
OpenMP-OpenACC-Offload-Cauldron2022-1.pdfssuser866937
 
Porting C++ apps to FLASCC
Porting C++ apps to FLASCCPorting C++ apps to FLASCC
Porting C++ apps to FLASCCPavel Nakaznenko
 
Getting started with AGL using a Raspberry Pi
Getting started with AGL using a Raspberry PiGetting started with AGL using a Raspberry Pi
Getting started with AGL using a Raspberry PiLeon Anavi
 
Embedded Webinar #12 “GloDroid or Boosting True Open Source Android Stack Dev...
Embedded Webinar #12 “GloDroid or Boosting True Open Source Android Stack Dev...Embedded Webinar #12 “GloDroid or Boosting True Open Source Android Stack Dev...
Embedded Webinar #12 “GloDroid or Boosting True Open Source Android Stack Dev...GlobalLogic Ukraine
 
Flutter Vikings 2022 - Full Stack Dart
Flutter Vikings 2022  - Full Stack DartFlutter Vikings 2022  - Full Stack Dart
Flutter Vikings 2022 - Full Stack DartChris Swan
 
Lpc2020 the-light weight-jit-compiler-slides
Lpc2020 the-light weight-jit-compiler-slidesLpc2020 the-light weight-jit-compiler-slides
Lpc2020 the-light weight-jit-compiler-slidesVladimir Makarov
 
Developing Applications for Beagle Bone Black, Raspberry Pi and SoC Single Bo...
Developing Applications for Beagle Bone Black, Raspberry Pi and SoC Single Bo...Developing Applications for Beagle Bone Black, Raspberry Pi and SoC Single Bo...
Developing Applications for Beagle Bone Black, Raspberry Pi and SoC Single Bo...ryancox
 
Morello Software and Toolchain Work in Arm - Mark Nicholson, Arm
Morello Software and Toolchain Work in Arm - Mark Nicholson, ArmMorello Software and Toolchain Work in Arm - Mark Nicholson, Arm
Morello Software and Toolchain Work in Arm - Mark Nicholson, ArmKTN
 
Webinar gravado: Programando Microcontroladores ARM da Microchip usando MPLAB...
Webinar gravado: Programando Microcontroladores ARM da Microchip usando MPLAB...Webinar gravado: Programando Microcontroladores ARM da Microchip usando MPLAB...
Webinar gravado: Programando Microcontroladores ARM da Microchip usando MPLAB...Embarcados
 
LCA13: KVM for Core, LEG and LNG
LCA13: KVM for Core, LEG and LNGLCA13: KVM for Core, LEG and LNG
LCA13: KVM for Core, LEG and LNGLinaro
 
Maemo Development Environment
Maemo Development EnvironmentMaemo Development Environment
Maemo Development Environmentjtukkine
 
Legacy of Void*
Legacy of Void*Legacy of Void*
Legacy of Void*Adam Crain
 
"Building Complete Embedded Vision Systems on Linux—From Camera to Display," ...
"Building Complete Embedded Vision Systems on Linux—From Camera to Display," ..."Building Complete Embedded Vision Systems on Linux—From Camera to Display," ...
"Building Complete Embedded Vision Systems on Linux—From Camera to Display," ...Edge AI and Vision Alliance
 

Similar to Embedded Recipes 2019 - LLVM / Clang integration (20)

Cross-compilation native sous android
Cross-compilation native sous androidCross-compilation native sous android
Cross-compilation native sous android
 
Using open source software to build an industrial grade embedded linux platfo...
Using open source software to build an industrial grade embedded linux platfo...Using open source software to build an industrial grade embedded linux platfo...
Using open source software to build an industrial grade embedded linux platfo...
 
Llilum 161108 at MVP Global Summit 2016
Llilum 161108 at MVP Global Summit 2016Llilum 161108 at MVP Global Summit 2016
Llilum 161108 at MVP Global Summit 2016
 
OpenMP-OpenACC-Offload-Cauldron2022-1.pdf
OpenMP-OpenACC-Offload-Cauldron2022-1.pdfOpenMP-OpenACC-Offload-Cauldron2022-1.pdf
OpenMP-OpenACC-Offload-Cauldron2022-1.pdf
 
Porting C++ apps to FLASCC
Porting C++ apps to FLASCCPorting C++ apps to FLASCC
Porting C++ apps to FLASCC
 
Getting started with AGL using a Raspberry Pi
Getting started with AGL using a Raspberry PiGetting started with AGL using a Raspberry Pi
Getting started with AGL using a Raspberry Pi
 
Embedded Webinar #12 “GloDroid or Boosting True Open Source Android Stack Dev...
Embedded Webinar #12 “GloDroid or Boosting True Open Source Android Stack Dev...Embedded Webinar #12 “GloDroid or Boosting True Open Source Android Stack Dev...
Embedded Webinar #12 “GloDroid or Boosting True Open Source Android Stack Dev...
 
Flutter Vikings 2022 - Full Stack Dart
Flutter Vikings 2022  - Full Stack DartFlutter Vikings 2022  - Full Stack Dart
Flutter Vikings 2022 - Full Stack Dart
 
Lpc2020 the-light weight-jit-compiler-slides
Lpc2020 the-light weight-jit-compiler-slidesLpc2020 the-light weight-jit-compiler-slides
Lpc2020 the-light weight-jit-compiler-slides
 
Developing Applications for Beagle Bone Black, Raspberry Pi and SoC Single Bo...
Developing Applications for Beagle Bone Black, Raspberry Pi and SoC Single Bo...Developing Applications for Beagle Bone Black, Raspberry Pi and SoC Single Bo...
Developing Applications for Beagle Bone Black, Raspberry Pi and SoC Single Bo...
 
Morello Software and Toolchain Work in Arm - Mark Nicholson, Arm
Morello Software and Toolchain Work in Arm - Mark Nicholson, ArmMorello Software and Toolchain Work in Arm - Mark Nicholson, Arm
Morello Software and Toolchain Work in Arm - Mark Nicholson, Arm
 
Webinar gravado: Programando Microcontroladores ARM da Microchip usando MPLAB...
Webinar gravado: Programando Microcontroladores ARM da Microchip usando MPLAB...Webinar gravado: Programando Microcontroladores ARM da Microchip usando MPLAB...
Webinar gravado: Programando Microcontroladores ARM da Microchip usando MPLAB...
 
LCA13: KVM for Core, LEG and LNG
LCA13: KVM for Core, LEG and LNGLCA13: KVM for Core, LEG and LNG
LCA13: KVM for Core, LEG and LNG
 
Maemo Development Environment
Maemo Development EnvironmentMaemo Development Environment
Maemo Development Environment
 
Container BoM Inspection with TERN
Container BoM Inspection with TERNContainer BoM Inspection with TERN
Container BoM Inspection with TERN
 
Legacy of Void*
Legacy of Void*Legacy of Void*
Legacy of Void*
 
"Building Complete Embedded Vision Systems on Linux—From Camera to Display," ...
"Building Complete Embedded Vision Systems on Linux—From Camera to Display," ..."Building Complete Embedded Vision Systems on Linux—From Camera to Display," ...
"Building Complete Embedded Vision Systems on Linux—From Camera to Display," ...
 
HPC_MPI_CICD.pptx
HPC_MPI_CICD.pptxHPC_MPI_CICD.pptx
HPC_MPI_CICD.pptx
 
.Net Core
.Net Core.Net Core
.Net Core
 
Readme
ReadmeReadme
Readme
 

More from Anne Nicolas

Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelKernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelAnne Nicolas
 
Kernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are moneyKernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are moneyAnne Nicolas
 
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary dataKernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary dataAnne Nicolas
 
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre SiliconEmbedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre SiliconAnne Nicolas
 
Embedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops wayEmbedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops wayAnne Nicolas
 
Embedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - Herd your socs become a matchmakerEmbedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - Herd your socs become a matchmakerAnne Nicolas
 
Embedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debuggingEmbedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debuggingAnne Nicolas
 
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimediaEmbedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimediaAnne Nicolas
 
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all startedKernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all startedAnne Nicolas
 
Kernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Suricata and XDPKernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Suricata and XDPAnne Nicolas
 
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)Anne Nicolas
 
Kernel Recipes 2019 - Formal modeling made easy
Kernel Recipes 2019 - Formal modeling made easyKernel Recipes 2019 - Formal modeling made easy
Kernel Recipes 2019 - Formal modeling made easyAnne Nicolas
 
Kernel Recipes 2019 - CVEs are dead, long live the CVE!
Kernel Recipes 2019 - CVEs are dead, long live the CVE!Kernel Recipes 2019 - CVEs are dead, long live the CVE!
Kernel Recipes 2019 - CVEs are dead, long live the CVE!Anne Nicolas
 
Kernel Recipes 2019 - XDP closer integration with network stack
Kernel Recipes 2019 -  XDP closer integration with network stackKernel Recipes 2019 -  XDP closer integration with network stack
Kernel Recipes 2019 - XDP closer integration with network stackAnne Nicolas
 
Kernel Recipes 2019 - Kernel hacking behind closed doors
Kernel Recipes 2019 - Kernel hacking behind closed doorsKernel Recipes 2019 - Kernel hacking behind closed doors
Kernel Recipes 2019 - Kernel hacking behind closed doorsAnne Nicolas
 
Kernel Recipes 2019 - Faster IO through io_uring
Kernel Recipes 2019 - Faster IO through io_uringKernel Recipes 2019 - Faster IO through io_uring
Kernel Recipes 2019 - Faster IO through io_uringAnne Nicolas
 
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelKernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelAnne Nicolas
 
Kernel Recipes 2019 - pidfds: Process file descriptors on Linux
Kernel Recipes 2019 - pidfds: Process file descriptors on LinuxKernel Recipes 2019 - pidfds: Process file descriptors on Linux
Kernel Recipes 2019 - pidfds: Process file descriptors on LinuxAnne Nicolas
 
Kernel Recipes 2019 - BPF at Facebook
Kernel Recipes 2019 - BPF at FacebookKernel Recipes 2019 - BPF at Facebook
Kernel Recipes 2019 - BPF at FacebookAnne Nicolas
 
Kernel Recipes 2019 - The ubiquity but also the necessity of eBPF as a techno...
Kernel Recipes 2019 - The ubiquity but also the necessity of eBPF as a techno...Kernel Recipes 2019 - The ubiquity but also the necessity of eBPF as a techno...
Kernel Recipes 2019 - The ubiquity but also the necessity of eBPF as a techno...Anne Nicolas
 

More from Anne Nicolas (20)

Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelKernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
 
Kernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are moneyKernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are money
 
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary dataKernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
 
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre SiliconEmbedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
 
Embedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops wayEmbedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops way
 
Embedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - Herd your socs become a matchmakerEmbedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - Herd your socs become a matchmaker
 
Embedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debuggingEmbedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debugging
 
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimediaEmbedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
 
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all startedKernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
 
Kernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Suricata and XDPKernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Suricata and XDP
 
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
 
Kernel Recipes 2019 - Formal modeling made easy
Kernel Recipes 2019 - Formal modeling made easyKernel Recipes 2019 - Formal modeling made easy
Kernel Recipes 2019 - Formal modeling made easy
 
Kernel Recipes 2019 - CVEs are dead, long live the CVE!
Kernel Recipes 2019 - CVEs are dead, long live the CVE!Kernel Recipes 2019 - CVEs are dead, long live the CVE!
Kernel Recipes 2019 - CVEs are dead, long live the CVE!
 
Kernel Recipes 2019 - XDP closer integration with network stack
Kernel Recipes 2019 -  XDP closer integration with network stackKernel Recipes 2019 -  XDP closer integration with network stack
Kernel Recipes 2019 - XDP closer integration with network stack
 
Kernel Recipes 2019 - Kernel hacking behind closed doors
Kernel Recipes 2019 - Kernel hacking behind closed doorsKernel Recipes 2019 - Kernel hacking behind closed doors
Kernel Recipes 2019 - Kernel hacking behind closed doors
 
Kernel Recipes 2019 - Faster IO through io_uring
Kernel Recipes 2019 - Faster IO through io_uringKernel Recipes 2019 - Faster IO through io_uring
Kernel Recipes 2019 - Faster IO through io_uring
 
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelKernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
 
Kernel Recipes 2019 - pidfds: Process file descriptors on Linux
Kernel Recipes 2019 - pidfds: Process file descriptors on LinuxKernel Recipes 2019 - pidfds: Process file descriptors on Linux
Kernel Recipes 2019 - pidfds: Process file descriptors on Linux
 
Kernel Recipes 2019 - BPF at Facebook
Kernel Recipes 2019 - BPF at FacebookKernel Recipes 2019 - BPF at Facebook
Kernel Recipes 2019 - BPF at Facebook
 
Kernel Recipes 2019 - The ubiquity but also the necessity of eBPF as a techno...
Kernel Recipes 2019 - The ubiquity but also the necessity of eBPF as a techno...Kernel Recipes 2019 - The ubiquity but also the necessity of eBPF as a techno...
Kernel Recipes 2019 - The ubiquity but also the necessity of eBPF as a techno...
 

Recently uploaded

call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 

Recently uploaded (20)

call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 

Embedded Recipes 2019 - LLVM / Clang integration

  • 1. LLVM/Clang integration to Buildroot Romain Naour romain.naour@smile.fr September 22, 2019 www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 1/35
  • 2. Overview 1 Introduction 2 LLVM and Clang 3 Objectives 4 LLVM/Clang initial integration into Buildroot 5 Cross-compiling Linux with Clang 6 Conclusions www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 2/35
  • 3. Plan 1 Introduction 2 LLVM and Clang 3 Objectives 4 LLVM/Clang initial integration into Buildroot 5 Cross-compiling Linux with Clang 6 Conclusions www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 3/35
  • 4. Disclaimer Purpose of the talk is to present the current state of llvm/clang integration into Buildroot. I am not a llvm/clang developer. Not pretending to know everything about llvm/clang. Experience gained from experimenting llvm/clang in the context of Buildroot. I am only interested in its integration in Buildroot to enable new features. Focused on AArch64 and x86_64 target. www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 4/35
  • 5. Buildroot at a glance From ELCE 2017 "Buildroot: What’s New?"1 Is an embedded Linux build system, builds from source: cross-compilation toolchain root filesystem with many libraries/applications, cross-built kernel and bootloader images More than 2500 packages available Generates filesystem images, not a distribution 1 https://www.youtube.com/watch?v=D6zO4nMX9KY www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 5/35
  • 6. Plan 1 Introduction 2 LLVM and Clang 3 Objectives 4 LLVM/Clang initial integration into Buildroot 5 Cross-compiling Linux with Clang 6 Conclusions www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 6/35
  • 7. LLVM Open source project started in 2000. LLVM 1.0 released in October 2003 Several subprojects: LLVM Core, Clang, lldb, compiler-rt, libclc, lld Provides a compiler infrastructure written in C++11 (C++14) Designed as an API from the beginning Focusing on compile time and performance of the generated code Well structured and documented Some existing backends: ARM, ARM64, Hexagon, Mips, Mipsel, NVIDIA PTX 32/64, PowerPC 32/64, AMDGPU, Sparc, Thumb, x86, x86-64, XCore www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 7/35
  • 8. LLVM - Three-phase approach www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 8/35
  • 9. LLVM - Internal aspects Intermediate Representation (IR) Mostly architecture-independent instruction set (RISC) Strongly typed Unlimited number of virtual registers in SSA IR Code example: define i32 @main() #0 { entry: %retval = alloca i32, align 4 %c = alloca i32, align 4 store i32 0, i32* %retval, align 4 %0 = load i32, i32* @a, align 4 %1 = load i32, i32* @b, align 4 %add = add nsw i32 %0, %1 store i32 %add, i32* %c, align 4 ret i32 0 } www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 9/35
  • 10. Clang Frontend C/C++, Objective C/C++ and OpenCL C for LLVM Clear and concise diagnostics (error and warning messages) Natively a cross-compiler: -target <triple> Sanitizers Goals Designed to be highly compatible with GCC C++11 supported since Clang 3.3 C++14 supported since Clang 3.4 C++17 supported since Clang 5 C++2a implementation started since Clang 6 Performance vs GCC ?2 3 2 http://www.phoronix.com/vr.php?view=25742 3 https://www.phoronix.com/vr.php?view=28232 www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 10/35
  • 11. Toolchain components Component LLVM GNU C/C++ Compiler clang gcc Assembler cc1as as Linker lld ld Runtime compiler-rt libgcc Debugger lldb gdb Unwinder libunwind libgcc_s C++ library libc++abi, libc++ libsupc++ libstdc++ Tools llvm-ar, llvm-as etc. ar, objdump, etc. C library - libc (Glibc, Musl) There is a proposal from Google about an LLVM libc4 . 4 https://lists.llvm.org/pipermail/llvm-dev/2019-June/133269.html www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 11/35
  • 12. Plan 1 Introduction 2 LLVM and Clang 3 Objectives 4 LLVM/Clang initial integration into Buildroot 5 Cross-compiling Linux with Clang 6 Conclusions www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 12/35
  • 13. Objectives Initial integration by Valentin Korenblit (2018) Preliminary study of LLVM/Clang. LLVM/Clang integration to Buildroot for the target. llvmpipe for Mesa 3D. AMDGPU backend. OpenCL implementations, most of them rely on LLVM Enable OpenCL for AMD GPUs (Clover) and Broadcom Videocore IV (VC4CL). OpenCL support for already existing packages in Buildroot. Integration of new packages that can benefit from OpenCL: image processing (i.e. Darktable), simulation, cryptography. Integration of new packages that can benefit from libLLVM or libclang. Use Clang as a cross-compiler (2019/2020?). www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 13/35
  • 14. Plan 1 Introduction 2 LLVM and Clang 3 Objectives 4 LLVM/Clang initial integration into Buildroot 5 Cross-compiling Linux with Clang 6 Conclusions www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 14/35
  • 15. Available hardware for testing . Platform 1 - x86_64 (HP ProBook) Processor: AMD A4-3300M Dual Core @ 1.9 GHz. GPU: AMD Radeon Dual Graphics (HD6480G + HD7450M). Ease testing. Platform 2 - ARM (Raspberry Pi 2 Model B). Processor: ARMv7 Cortex-A7 Quad Core @ 900 MHz. GPU: Broadcom Videocore IV. Platform 3 - ARM/AArch64 (Raspberry Pi 3 Model B). Processor: ARMv8 Cortex-A53 Quad Core @ 1.2 GHz. GPU: Broadcom Videocore IV. www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 15/35
  • 16. LLVM packaging for Buildroot CMake-based project Buildroot provides a CMake infrastructure Plenty of options, some with misleading names LLVM_TARGETS_TO_BUILD LLVM_TARGET_ARCH LLVM_DEFAULT_TARGET_TRIPLE LLVM_HOST_TRIPLE Difficult to be cross-compiled At least llvm-tblgen must be compiled for the host first It requires a modern and fully-featured toolchain (C++11 -> C++14) Takes a lot of time to compile (host + target) www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 16/35
  • 17. LLVM packaging for Buildroot LLVM 5.0.1 is the first packaged version Only LLVM libraries are needed (libLLVM.so), no tools The main problem: llvm-config not giving the desired output It’s a compiled program. Normally ”config” programs are scripts. llvm-config compiled for the host must be installed to the target’s sysroot. Some output depends on its location and some other is contained in the binary Solution: do a full installation of LLVM for the host using the same5 configuration options as for the target and link LLVM tools with libLLVM (needed for AMDGPU backend). 5 Tools are not built for the target www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 17/35
  • 18. LLVM support for Mesa 3D drivers Gallium llvmpipe driver: software rasterizer that uses LLVM to do runtime code generation. OpenCL using Gallium R600 and RadeonSI Both use AMDGPU LLVM backend Some benchmarks (LLVM 5.0.1): Gallium Driver GLMark2 GLMark2-es2 R600 on HD6480 156 156 softpipe on AMD A4-3300M 3 3 softpipe on Cortex-A53 (32-bit) NS 0 softpipe on Cortex-A53 (64-bit) NS 0 llvmpipe on AMD A4-3300M 47 52 llvmpipe on Cortex-A53 (32-bit) NS 11 llvmpipe on Cortex-A53 (64-bit) NS 13 www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 18/35
  • 19. Selecting llvmpipe www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 19/35
  • 20. Clang packaging for Buildroot LLVM and Clang should be version bumped together. It is normally built inside LLVM source tree (llvm/tools) but Buildroot uses per-package build directories. Some more tweaks are needed. Binaries, headers and some scripts must be removed from the target. Only libclang.so is necessary on the target. Buildroot does not provide a standard infrastructure to install a compiler on the target (you’re on your own). Clang, Clang++ binaries can’t be easily disabled from the build system. www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 20/35
  • 21. OpenCL: Clover: Computing Language over Gallium Clover needs libclang and libclc. Valentin added Mesa3d OpenCL support. Added AMDGPU LLVM backend support, libclc and clinfo packages. Tested VC4CL for Broadcom Videocore IV. Runtime testing using Piglit. See Linuxembedded blog6 for more details on OpenCL. 6 http: //www.linuxembedded.fr/2018/07/llvmclang-integration-into-buildroot www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 21/35
  • 22. LLVM/Clang in Buildroot - Current State Commited to Buildroot’s master: LLVM package (2018.05) LLVM support for Mesa 3D (2018.05) Clang package (2018.05) Libclc package (2018.11) libopencl, clinfo packages (2018.11) Piglit package (2019.08) Keep LLVM/Clang at the latest version Buildroot LTS 2019.02.x use LLVM/Clang 7.0.1 TODO & WIP Add OpenCL support for already existing packages (i.e opencv) Add new packages that depend on LLVM/Clang or OpenCL Use Clang as a cross-compiler www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 22/35
  • 23. LLVM/Clang in Buildroot - Work in progress Chromium7 & lld8 by Joseph Kogut Chromium needs Clang as compiler. Lld used as GNU ld drop-in replacement. Compiler-rt & Libfuzzer9 by Matt Weber (Rockwell Collins) Compiler-rt to run the code with sanitizer instrumentation. Libfuzzer: a library for coverage-guided fuzz testing. BCC (BPF Compiler Collection)10 by Jugurtha Belkalem (Smile) BCC use libclang to build eBPF programs to do debugging11 . 7 https://github.com/jakogut/buildroot/commits/chromium-v7-wip 8 http://patchwork.ozlabs.org/project/buildroot/list/?series=121282 9 http://patchwork.ozlabs.org/project/buildroot/list/?series=105601 10 http://patchwork.ozlabs.org/project/buildroot/list/?series=106280 11 http://www.linuxembedded.fr/2019/05/bcc-integration-into-buildroot www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 23/35
  • 24. Plan 1 Introduction 2 LLVM and Clang 3 Objectives 4 LLVM/Clang initial integration into Buildroot 5 Cross-compiling Linux with Clang 6 Conclusions www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 24/35
  • 25. Compiling a Linux system with Clang Until recently, Linux kernel expected to use some GCC behavior that are not supported by Clang: Variable Length Arrays inside structures (VLA removed since 4.20) Nested functions Explicit register variables LLVM assembler cannot be used to build the kernel Support for asm goto in LLVM & Clang for x86_6412 LLVMLinux Project: Kernel 4.4 and 4.9 built with Clang for x86_64 and ARM64 (patches applied)13 Dependency on GNU as and ld Glibc14 ? Musl15 ? 12 https://bugs.llvm.org/show_bug.cgi?id=9295 13 https://lwn.net/Articles/734071/ 14 https://sourceware.org/glibc/wiki/GlibcMeetsClang 15 https://wiki.musl-libc.org/supported-platforms.html www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 25/35
  • 26. Compiling a Linux distribution with Clang 2019 EuroLLVM Developers’ Meeting: Switching a Linux distribution’s main toolchains to LLVM/Clang16 - Bernhard Rosenkränzer From the OpenMandriva Wiki17 "Over 98% of packages in our main repository are now built with LLVM/clang." 32757 Debian packages have been rebuild with Clang 8. Among them, 1322 (4 %) failed18 16 https://www.youtube.com/watch?v=QinoajSKQ1k 17 https://wiki.openmandriva.org/en/4.0/Release_Notes#LLVM.2Fclang 18 https://clang.debian.net/status.php?version=8svn www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 26/35
  • 27. Cross-compiling with Clang with Buildroot In Buildroot we take advantage of all previous upstream work to build an embedded system with Clang. Objectives: Build vanilla Linux kernels. Build most of userspace applications. Select GCC or Clang globally in the defconfig. Limitations: Keep toolchain components and bootloaders build with GCC Rebuild LLVM/Clang for each defconfig build. We expects build and runtime issue due to cross-compiling with Clang. www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 27/35
  • 28. Cross-compiling with Clang with Buildroot What’s remain to do to use Clang as a cross-compiler into Buildroot? Fix Clang’s libgcc and crt*.o search path to build userspace applications19 . Add a toolchain wrapper as for GCC to executes the real compiler with a number of arguments (sysroot) hardcoded. Improve the package infrastructure where GCC is explicitely used (generic packages, meson, cmake etc). Add an option to select Clang or GCC in the defconfig. Fixes most build issues on the long term. Still a lot of warning due to GCC compiler flags used with Clang. 19 http://patchwork.ozlabs.org/patch/1159304/ www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 28/35
  • 29. Current issues with Clang Busybox (segfault with applets (i.e init))20 . Bootloader & firmware (uboot, barebox, grub2, ATF). uboot: use global register variables. grub2: inline asm constructs (.addrsig etc.) Python3 build issue with _ctype module. rng-tools: Outdated version (from 2004) using a VLA. Valgrind: __builtin_longjmp not supported in LLVM/Clang for Aarch64 target21 . 20 http://lists.busybox.net/pipermail/busybox/2019-June/087337.html 21 https://bugs.kde.org/show_bug.cgi?id=369723 www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 29/35
  • 30. Qemu runtime testing: AArch64 & x86_64 qemu_aarch64_virt_defconfig qemu_x86_64_defconfig Using the latest kernel version (5.2.7) Using LLVM/Clang 9.0.0rc3 for x86_64 (asm-goto support) Welcome to Buildroot # uname −a Linux buildroot 5.2.7 #1 SMP Thu Sep 5 17:33:00 CEST 2019 aarch64 GNU/Linux # dmesg | head −n 2 Booting Linux on physical CPU 0x0000000000 [0x410fd034] Linux version 5.2.7 (clang version 8.0.1 (tags/RELEASE_801/final)) #1 SMP Thu Sep 5 17:33:00 CEST # cat /etc/os−release NAME=Buildroot VERSION=2019.11−git−00175−g0cc6fbbdf5 ID=buildroot VERSION_ID=2019.11−git PRETTY_NAME="Buildroot 2019.11−git" www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 30/35
  • 31. Available hardware for testing . Aarch64 (Le Potato AML-S905X-CC). Processor: ARM Cortex-A53 Quad Core @ 1.512GHz. GPU: ARM Mali-450 @ 750MHz. Potato board received two years ago at Kernel recipes (Thanks!) Live Demo (kernel built with Clang) www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 31/35
  • 32. Plan 1 Introduction 2 LLVM and Clang 3 Objectives 4 LLVM/Clang initial integration into Buildroot 5 Cross-compiling Linux with Clang 6 Conclusions www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 32/35
  • 33. Conclusions LLVM/Clang is already available for the target. Clang can now build vanilla Linux Kernel. It’s possible to use Clang as cross-compiler to build a Linux embedded system. Initial patch series to review: "Add the support for Clang cross-compiler"22 Not yet ready for production, needs more build and runtime testing. Compared to Debian and OpenMandriva, Buildroot only have 2500+ packages. Cross-compilation with clang remains complicated. Many projects don’t test building with anything but native GCC (x86 or x86_64). 22 http://patchwork.ozlabs.org/project/buildroot/list/?series=129565 www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 33/35
  • 34. Questions Thanks for your attention! Questions? Romain Naour romain.naour@smile.fr Slides under CC-BY-SA 3.0 www.smile.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 34/35