SlideShare a Scribd company logo
1 of 28
Download to read offline
Debian and Clang 
Linux Kernel and Clang 
Sylvestre Ledru – sylvestre@debian.org
Current status: 
All C, C++, Objective-C sources are being built 
with gcc for all supported Debian arches (~13) 
and Kernel (3). 
September, 26 2014 Debian and Clang 
Sylvestre Ledru
Clang ? 
A C, C++ and Objective-C compiler 
September, 26 2014 Debian and Clang 
Sylvestre Ledru
Rebuild of Debian using Clang 
September, 26 2014 Debian and Clang 
Sylvestre Ledru
Crappy method: 
VERSION=4.9 
cd /usr/bin 
rm g++-$VERSION gcc-$VERSION cpp-$VERSION 
ln -s clang++ g++-$VERSION 
ln -s clang gcc-$VERSION 
ln -s clang cpp-$VERSION 
cd - 
September, 26 2014 Debian and Clang 
Sylvestre Ledru
Testing the rebuild of the package under amd64. 
NOT the performances (build time or execution) 
nor the execution of the binaries 
September, 26 2014 Debian and Clang 
Sylvestre Ledru
September, 26 2014 Debian and Clang 
Sylvestre Ledru
Causes of failure ? 
September, 26 2014 Debian and Clang 
Sylvestre Ledru
Various C/C++ issues: 
● Variable length array (gcc extension) 
● Inner functions 
● Clang is C99 by default 
● Gcc accept invalid C++ code (default arguments, 
scope, etc) 
● ... 
September, 26 2014 Debian and Clang 
Sylvestre Ledru
-Wall enables many warnings 
-Werror transforms Warning to Error 
$ gcc -Wall -Werror foo.c && echo $? 
0 
$ clang -Wall -Werror foo.c && echo $? 
foo.c:3:14: error: comparison of unsigned expression < 0 is always false 
[-Werror,-Wtautological-compare] 
return i < 0; 
September, 26 2014 Debian and Clang 
Sylvestre Ledru 
~ ^ ~ 
1 error generated. 
int main() { 
unsigned int i = 0; 
return i < 0; 
}
How we have been able to fix bugs? 
We used different paths 
September, 26 2014 Debian and Clang 
Sylvestre Ledru
1. Fix upstream bugs 
September, 26 2014 Debian and Clang 
Sylvestre Ledru
Different default behavior 
133 occurrences 
September, 26 2014 Debian and Clang 
Sylvestre Ledru 
– noreturn.c – 
int foo(void) { 
return; 
} 
$ gcc -c noreturn.c; echo $? 
0 
# -Wall shows it as warning 
$ clang -c noreturn.c 
noreturn.c:2:2: error: non-void 
function 'foo' should return a value 
[-Wreturn-type] 
return; 
^ 
1 error generated.
Other kind of errors fixed: 
● Wrong main declaration 
int main(void); 
int main(int argc, char *argv[]); 
int main(int argc, char **argv); 
int main(int argc, char **argv, char **envp); 
● Void function should not return a value 
void foo() { 
September, 26 2014 Debian and Clang 
Sylvestre Ledru 
return 1; 
} 
● Variable length array for a non POD (plain old data) element 
void foo() { 
int N=2; 
std::vector<int> best[2][N]; 
} 
● Missing symbols at link time (inline in C99) 
inline void xrealloc() { } // should be static inline void xrealloc() 
int main(){ 
xrealloc(); 
return 1; 
} 
● ...
Results : 
● 295 patches reported (Credits : Arthur Marble 
and Alexander Ovchinnikov, Debian GSoC) 
● 90 bug fixed (ie uploaded in the Debian archive 
with the fix) 
● Switch to Clang by FreeBSD & Mac OS X 
probably helped too 
September, 26 2014 Debian and Clang 
Sylvestre Ledru
2. Hack into Clang 
September, 26 2014 Debian and Clang 
Sylvestre Ledru
Unsupported options 
50 occurrences 
September, 26 2014 Debian and Clang 
Sylvestre Ledru 
$ gcc -O9 foo.c && echo $? 
0 
$ clang -O9 foo.c 
error: invalid value '9' in '-O9' 
Record by libdbi-drivers with -O20 o/ 
=> We transformed that into a warning. 
$ clang -O20 -c foo.c 
warning: optimization level '-O20' is unsupported; using '-O3' instead 
1 warning generated.
Unsupported args 
~145 occurrences 
$ clang-3.4 -c -fno-defer-pop /tmp/foo.c 
clang: error: unknown argument: '-fno-defer-pop' 
$ clang-3.5 -c -fno-defer-pop /tmp/foo.c 
clang: warning: optimization flag '-fno-defer-pop' is not supported 
clang: warning: argument unused during compilation: '-fno-defer-pop' 
------------------------------- 
$ clang-3.4 -c -finput-charset=UTF-8 /tmp/foo.c 
clang: error: unknown argument: '-finput-charset=UTF-8' 
$ clang-3.5 -c -finput-charset=UTF-8 /tmp/foo.c 
September, 26 2014 Debian and Clang 
Sylvestre Ledru
Unsupported args 
~145 occurrences 
Gcc : unknown arguments are forwarded to the linker 
Clang : unknown arguments trigger errors. Forward to the linker has to be 
explict 
$ clang-3.4 -z lazy /tmp/foo.c 
clang: error: unknown argument: '-z' 
clang: error: no such file or directory: 'lazy' 
$ clang-3.5 -z lazy /tmp/foo.c 
September, 26 2014 Debian and Clang 
Sylvestre Ledru
3. Hack into gcc 
September, 26 2014 Debian and Clang 
Sylvestre Ledru
Well, trying to... 
September, 26 2014 Debian and Clang 
Sylvestre Ledru
Last rebuild proved that clang is now ready 
Remaining problems are upstream 
September, 26 2014 Debian and Clang 
Sylvestre Ledru
Full results published: 
http://clang.debian.net/ 
Done on the cloud-qa - EC2 (Amazon cloud) 
Thanks to Lucas Nussbaum & David Suarez 
September, 26 2014 Debian and Clang 
Sylvestre Ledru
Now, what about the Linux Kernel? 
September, 26 2014 Debian and Clang 
Sylvestre Ledru
The LLVMLinux project 
Same approach : 
● Hack the kernel sources code 
● Update clang to support some black magic 
September, 26 2014 Debian and Clang 
Sylvestre Ledru
69 patches maintained on top of the kernel tree 
Example : build system, Variable Length Arrays in 
Structs (vlais), nested functions, etc 
http://git.linuxfoundation.org/llvmlinux.git/ 
arch/*/patches 
September, 26 2014 Debian and Clang 
Sylvestre Ledru
Status: 
● Working kernel on some archs (arm, arm64, 
amd64, x86, etc) 
● Still need to upstream a bunch of patches 
September, 26 2014 Debian and Clang 
Sylvestre Ledru
Thanks ! 
September, 26 2014 Debian and Clang 
Sylvestre Ledru

More Related Content

What's hot

Kubernetes DNS Horror Stories
Kubernetes DNS Horror StoriesKubernetes DNS Horror Stories
Kubernetes DNS Horror StoriesLaurent Bernaille
 
Orchestration? You Don't Need Orchestration. What You Want Is Choreography by...
Orchestration? You Don't Need Orchestration. What You Want Is Choreography by...Orchestration? You Don't Need Orchestration. What You Want Is Choreography by...
Orchestration? You Don't Need Orchestration. What You Want Is Choreography by...Docker, Inc.
 
Transforming Infrastructure into Code - Importing existing cloud resources u...
Transforming Infrastructure into Code  - Importing existing cloud resources u...Transforming Infrastructure into Code  - Importing existing cloud resources u...
Transforming Infrastructure into Code - Importing existing cloud resources u...Shih Oon Liong
 
Tale of Kafka Consumer for Spark Streaming
Tale of Kafka Consumer for Spark StreamingTale of Kafka Consumer for Spark Streaming
Tale of Kafka Consumer for Spark StreamingSigmoid
 
KubeCon EU 2016: Kubernetes and the Potential for Higher Level Interfaces
KubeCon EU 2016: Kubernetes and the Potential for Higher Level InterfacesKubeCon EU 2016: Kubernetes and the Potential for Higher Level Interfaces
KubeCon EU 2016: Kubernetes and the Potential for Higher Level InterfacesKubeAcademy
 
Docker Workshop - Orchestrating Docker Containers
Docker Workshop - Orchestrating Docker ContainersDocker Workshop - Orchestrating Docker Containers
Docker Workshop - Orchestrating Docker ContainersHugo Henley
 
Using Docker with OpenStack - Hands On!
 Using Docker with OpenStack - Hands On! Using Docker with OpenStack - Hands On!
Using Docker with OpenStack - Hands On!Adrian Otto
 
Machine learning with raspberrypi
Machine learning with raspberrypiMachine learning with raspberrypi
Machine learning with raspberrypielmokhtar Benfraj
 
Prometheus Everything, Observing Kubernetes in the Cloud
Prometheus Everything, Observing Kubernetes in the CloudPrometheus Everything, Observing Kubernetes in the Cloud
Prometheus Everything, Observing Kubernetes in the CloudSneha Inguva
 
Monitoring and Alerting with InfluxDB 2.0 | Nate Isley & Deniz Kusefoglu | In...
Monitoring and Alerting with InfluxDB 2.0 | Nate Isley & Deniz Kusefoglu | In...Monitoring and Alerting with InfluxDB 2.0 | Nate Isley & Deniz Kusefoglu | In...
Monitoring and Alerting with InfluxDB 2.0 | Nate Isley & Deniz Kusefoglu | In...InfluxData
 
Kyua and Jenkins: Testing Framework for BSD
Kyua and Jenkins: Testing Framework for BSDKyua and Jenkins: Testing Framework for BSD
Kyua and Jenkins: Testing Framework for BSDCraig Rodrigues
 
CDN on GKE with Ingress
CDN on GKE with IngressCDN on GKE with Ingress
CDN on GKE with IngressJo Hoon
 
The State of Logging on Docker
The State of Logging on DockerThe State of Logging on Docker
The State of Logging on DockerTrevor Parsons
 
Deploying .NET applications with the Nix package manager
Deploying .NET applications with the Nix package managerDeploying .NET applications with the Nix package manager
Deploying .NET applications with the Nix package managerSander van der Burg
 
From Docker to Production - ZendCon 2016
From Docker to Production - ZendCon 2016From Docker to Production - ZendCon 2016
From Docker to Production - ZendCon 2016Chris Tankersley
 
How to tune Kafka® for production
How to tune Kafka® for productionHow to tune Kafka® for production
How to tune Kafka® for productionconfluent
 
Collect distributed application logging using fluentd (EFK stack)
Collect distributed application logging using fluentd (EFK stack)Collect distributed application logging using fluentd (EFK stack)
Collect distributed application logging using fluentd (EFK stack)Marco Pas
 

What's hot (20)

Helm intro
Helm introHelm intro
Helm intro
 
Kubernetes DNS Horror Stories
Kubernetes DNS Horror StoriesKubernetes DNS Horror Stories
Kubernetes DNS Horror Stories
 
Orchestration? You Don't Need Orchestration. What You Want Is Choreography by...
Orchestration? You Don't Need Orchestration. What You Want Is Choreography by...Orchestration? You Don't Need Orchestration. What You Want Is Choreography by...
Orchestration? You Don't Need Orchestration. What You Want Is Choreography by...
 
Transforming Infrastructure into Code - Importing existing cloud resources u...
Transforming Infrastructure into Code  - Importing existing cloud resources u...Transforming Infrastructure into Code  - Importing existing cloud resources u...
Transforming Infrastructure into Code - Importing existing cloud resources u...
 
Tale of Kafka Consumer for Spark Streaming
Tale of Kafka Consumer for Spark StreamingTale of Kafka Consumer for Spark Streaming
Tale of Kafka Consumer for Spark Streaming
 
KubeCon EU 2016: Kubernetes and the Potential for Higher Level Interfaces
KubeCon EU 2016: Kubernetes and the Potential for Higher Level InterfacesKubeCon EU 2016: Kubernetes and the Potential for Higher Level Interfaces
KubeCon EU 2016: Kubernetes and the Potential for Higher Level Interfaces
 
Vagrant
VagrantVagrant
Vagrant
 
Docker Workshop - Orchestrating Docker Containers
Docker Workshop - Orchestrating Docker ContainersDocker Workshop - Orchestrating Docker Containers
Docker Workshop - Orchestrating Docker Containers
 
Using Docker with OpenStack - Hands On!
 Using Docker with OpenStack - Hands On! Using Docker with OpenStack - Hands On!
Using Docker with OpenStack - Hands On!
 
Machine learning with raspberrypi
Machine learning with raspberrypiMachine learning with raspberrypi
Machine learning with raspberrypi
 
Prometheus Everything, Observing Kubernetes in the Cloud
Prometheus Everything, Observing Kubernetes in the CloudPrometheus Everything, Observing Kubernetes in the Cloud
Prometheus Everything, Observing Kubernetes in the Cloud
 
Monitoring and Alerting with InfluxDB 2.0 | Nate Isley & Deniz Kusefoglu | In...
Monitoring and Alerting with InfluxDB 2.0 | Nate Isley & Deniz Kusefoglu | In...Monitoring and Alerting with InfluxDB 2.0 | Nate Isley & Deniz Kusefoglu | In...
Monitoring and Alerting with InfluxDB 2.0 | Nate Isley & Deniz Kusefoglu | In...
 
Kyua and Jenkins: Testing Framework for BSD
Kyua and Jenkins: Testing Framework for BSDKyua and Jenkins: Testing Framework for BSD
Kyua and Jenkins: Testing Framework for BSD
 
CDN on GKE with Ingress
CDN on GKE with IngressCDN on GKE with Ingress
CDN on GKE with Ingress
 
The State of Logging on Docker
The State of Logging on DockerThe State of Logging on Docker
The State of Logging on Docker
 
Dokku
DokkuDokku
Dokku
 
Deploying .NET applications with the Nix package manager
Deploying .NET applications with the Nix package managerDeploying .NET applications with the Nix package manager
Deploying .NET applications with the Nix package manager
 
From Docker to Production - ZendCon 2016
From Docker to Production - ZendCon 2016From Docker to Production - ZendCon 2016
From Docker to Production - ZendCon 2016
 
How to tune Kafka® for production
How to tune Kafka® for productionHow to tune Kafka® for production
How to tune Kafka® for production
 
Collect distributed application logging using fluentd (EFK stack)
Collect distributed application logging using fluentd (EFK stack)Collect distributed application logging using fluentd (EFK stack)
Collect distributed application logging using fluentd (EFK stack)
 

Viewers also liked

Kernel Recipes 2014 - What I’m forgetting when designing a new userspace inte...
Kernel Recipes 2014 - What I’m forgetting when designing a new userspace inte...Kernel Recipes 2014 - What I’m forgetting when designing a new userspace inte...
Kernel Recipes 2014 - What I’m forgetting when designing a new userspace inte...Anne Nicolas
 
Kernel Recipes 2015: Solving the Linux storage scalability bottlenecks
Kernel Recipes 2015: Solving the Linux storage scalability bottlenecksKernel Recipes 2015: Solving the Linux storage scalability bottlenecks
Kernel Recipes 2015: Solving the Linux storage scalability bottlenecksAnne Nicolas
 
Kernel Recipes 2015 - So you want to write a Linux driver framework
Kernel Recipes 2015 - So you want to write a Linux driver frameworkKernel Recipes 2015 - So you want to write a Linux driver framework
Kernel Recipes 2015 - So you want to write a Linux driver frameworkAnne Nicolas
 
Kernel Recipes 2016 - Patches carved into stone tablets...
Kernel Recipes 2016 - Patches carved into stone tablets...Kernel Recipes 2016 - Patches carved into stone tablets...
Kernel Recipes 2016 - Patches carved into stone tablets...Anne Nicolas
 
Kernel Recipes 2016 -
Kernel Recipes 2016 - Kernel Recipes 2016 -
Kernel Recipes 2016 - Anne Nicolas
 
Kernel Recipes 2016 - Control Group Status Update
Kernel Recipes 2016 -  Control Group Status UpdateKernel Recipes 2016 -  Control Group Status Update
Kernel Recipes 2016 - Control Group Status UpdateAnne Nicolas
 
Kernel Recipes 2016 - The Free Software Bastard Guide
Kernel Recipes 2016 - The Free Software Bastard GuideKernel Recipes 2016 - The Free Software Bastard Guide
Kernel Recipes 2016 - The Free Software Bastard GuideAnne Nicolas
 
Kernel Recipes 2015: Linux Kernel IO subsystem - How it works and how can I s...
Kernel Recipes 2015: Linux Kernel IO subsystem - How it works and how can I s...Kernel Recipes 2015: Linux Kernel IO subsystem - How it works and how can I s...
Kernel Recipes 2015: Linux Kernel IO subsystem - How it works and how can I s...Anne Nicolas
 

Viewers also liked (8)

Kernel Recipes 2014 - What I’m forgetting when designing a new userspace inte...
Kernel Recipes 2014 - What I’m forgetting when designing a new userspace inte...Kernel Recipes 2014 - What I’m forgetting when designing a new userspace inte...
Kernel Recipes 2014 - What I’m forgetting when designing a new userspace inte...
 
Kernel Recipes 2015: Solving the Linux storage scalability bottlenecks
Kernel Recipes 2015: Solving the Linux storage scalability bottlenecksKernel Recipes 2015: Solving the Linux storage scalability bottlenecks
Kernel Recipes 2015: Solving the Linux storage scalability bottlenecks
 
Kernel Recipes 2015 - So you want to write a Linux driver framework
Kernel Recipes 2015 - So you want to write a Linux driver frameworkKernel Recipes 2015 - So you want to write a Linux driver framework
Kernel Recipes 2015 - So you want to write a Linux driver framework
 
Kernel Recipes 2016 - Patches carved into stone tablets...
Kernel Recipes 2016 - Patches carved into stone tablets...Kernel Recipes 2016 - Patches carved into stone tablets...
Kernel Recipes 2016 - Patches carved into stone tablets...
 
Kernel Recipes 2016 -
Kernel Recipes 2016 - Kernel Recipes 2016 -
Kernel Recipes 2016 -
 
Kernel Recipes 2016 - Control Group Status Update
Kernel Recipes 2016 -  Control Group Status UpdateKernel Recipes 2016 -  Control Group Status Update
Kernel Recipes 2016 - Control Group Status Update
 
Kernel Recipes 2016 - The Free Software Bastard Guide
Kernel Recipes 2016 - The Free Software Bastard GuideKernel Recipes 2016 - The Free Software Bastard Guide
Kernel Recipes 2016 - The Free Software Bastard Guide
 
Kernel Recipes 2015: Linux Kernel IO subsystem - How it works and how can I s...
Kernel Recipes 2015: Linux Kernel IO subsystem - How it works and how can I s...Kernel Recipes 2015: Linux Kernel IO subsystem - How it works and how can I s...
Kernel Recipes 2015: Linux Kernel IO subsystem - How it works and how can I s...
 

Similar to Kernel Recipes 2014 - Quick state of the art of clang

Distro Recipes 2013 : Make Debian and compiler agnostic
Distro Recipes 2013 : Make Debian and  compiler agnostic Distro Recipes 2013 : Make Debian and  compiler agnostic
Distro Recipes 2013 : Make Debian and compiler agnostic Anne Nicolas
 
Writing your own augeasproviders
Writing your own augeasprovidersWriting your own augeasproviders
Writing your own augeasprovidersDominic Cleal
 
[k8s] Kubernetes terminology (1).pdf
[k8s] Kubernetes terminology (1).pdf[k8s] Kubernetes terminology (1).pdf
[k8s] Kubernetes terminology (1).pdfFrederik Wouters
 
Learn basic ansible using docker
Learn basic ansible using dockerLearn basic ansible using docker
Learn basic ansible using dockerLarry Cai
 
K8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingK8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingPiotr Perzyna
 
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...Puppet
 
Challenges of container configuration
Challenges of container configurationChallenges of container configuration
Challenges of container configurationlutter
 
Kubernetes laravel and kubernetes
Kubernetes   laravel and kubernetesKubernetes   laravel and kubernetes
Kubernetes laravel and kubernetesWilliam Stewart
 
DPDK in Containers Hands-on Lab
DPDK in Containers Hands-on LabDPDK in Containers Hands-on Lab
DPDK in Containers Hands-on LabMichelle Holley
 
Docker for mere mortals
Docker for mere mortalsDocker for mere mortals
Docker for mere mortalsHenryk Konsek
 
From Zero to Application Delivery with NixOS
From Zero to Application Delivery with NixOSFrom Zero to Application Delivery with NixOS
From Zero to Application Delivery with NixOSSusan Potter
 
Systemd: the modern Linux init system you will learn to love
Systemd: the modern Linux init system you will learn to loveSystemd: the modern Linux init system you will learn to love
Systemd: the modern Linux init system you will learn to loveAlison Chaiken
 
Drupal Camp Brighton 2015: Ansible Drupal Medicine show
Drupal Camp Brighton 2015: Ansible Drupal Medicine showDrupal Camp Brighton 2015: Ansible Drupal Medicine show
Drupal Camp Brighton 2015: Ansible Drupal Medicine showGeorge Boobyer
 
Software Packaging for Cross OS Distribution
Software Packaging for Cross OS DistributionSoftware Packaging for Cross OS Distribution
Software Packaging for Cross OS DistributionJian-Hong Pan
 
Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725miguel dominguez
 

Similar to Kernel Recipes 2014 - Quick state of the art of clang (20)

Distro Recipes 2013 : Make Debian and compiler agnostic
Distro Recipes 2013 : Make Debian and  compiler agnostic Distro Recipes 2013 : Make Debian and  compiler agnostic
Distro Recipes 2013 : Make Debian and compiler agnostic
 
Writing your own augeasproviders
Writing your own augeasprovidersWriting your own augeasproviders
Writing your own augeasproviders
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
[k8s] Kubernetes terminology (1).pdf
[k8s] Kubernetes terminology (1).pdf[k8s] Kubernetes terminology (1).pdf
[k8s] Kubernetes terminology (1).pdf
 
Learn basic ansible using docker
Learn basic ansible using dockerLearn basic ansible using docker
Learn basic ansible using docker
 
K8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingK8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals Training
 
Docker perl build
Docker perl buildDocker perl build
Docker perl build
 
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
 
Challenges of container configuration
Challenges of container configurationChallenges of container configuration
Challenges of container configuration
 
Smoking docker
Smoking dockerSmoking docker
Smoking docker
 
Kubernetes laravel and kubernetes
Kubernetes   laravel and kubernetesKubernetes   laravel and kubernetes
Kubernetes laravel and kubernetes
 
DPDK in Containers Hands-on Lab
DPDK in Containers Hands-on LabDPDK in Containers Hands-on Lab
DPDK in Containers Hands-on Lab
 
Docker for mere mortals
Docker for mere mortalsDocker for mere mortals
Docker for mere mortals
 
ABCs of docker
ABCs of dockerABCs of docker
ABCs of docker
 
From Zero to Application Delivery with NixOS
From Zero to Application Delivery with NixOSFrom Zero to Application Delivery with NixOS
From Zero to Application Delivery with NixOS
 
Systemd: the modern Linux init system you will learn to love
Systemd: the modern Linux init system you will learn to loveSystemd: the modern Linux init system you will learn to love
Systemd: the modern Linux init system you will learn to love
 
Drupal Camp Brighton 2015: Ansible Drupal Medicine show
Drupal Camp Brighton 2015: Ansible Drupal Medicine showDrupal Camp Brighton 2015: Ansible Drupal Medicine show
Drupal Camp Brighton 2015: Ansible Drupal Medicine show
 
Software Packaging for Cross OS Distribution
Software Packaging for Cross OS DistributionSoftware Packaging for Cross OS Distribution
Software Packaging for Cross OS Distribution
 
oSC22ww4.pdf
oSC22ww4.pdfoSC22ww4.pdf
oSC22ww4.pdf
 
Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725
 

More from Anne Nicolas

Kernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream firstKernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream firstAnne Nicolas
 
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMIKernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMIAnne 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 - 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
 
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...Anne 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
 
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
 
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and BareboxEmbedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and BareboxAnne Nicolas
 
Embedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Making embedded graphics less specialEmbedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Making embedded graphics less specialAnne 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 - From maintaining I2C to the big (embedded) picture
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) pictureEmbedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) pictureAnne 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 - LLVM / Clang integration
Embedded Recipes 2019 - LLVM / Clang integrationEmbedded Recipes 2019 - LLVM / Clang integration
Embedded Recipes 2019 - LLVM / Clang integrationAnne 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
 

More from Anne Nicolas (20)

Kernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream firstKernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream first
 
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMIKernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
 
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 - 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
 
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
 
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
 
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...
 
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and BareboxEmbedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
 
Embedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Making embedded graphics less specialEmbedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Making embedded graphics less special
 
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 - From maintaining I2C to the big (embedded) picture
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) pictureEmbedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
 
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 - LLVM / Clang integration
Embedded Recipes 2019 - LLVM / Clang integrationEmbedded Recipes 2019 - LLVM / Clang integration
Embedded Recipes 2019 - LLVM / Clang integration
 
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)
 

Recently uploaded

What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?Watsoo Telematics
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
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
 
buds n tech IT solutions
buds n  tech IT                solutionsbuds n  tech IT                solutions
buds n tech IT solutionsmonugehlot87
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 

Recently uploaded (20)

What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
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...
 
buds n tech IT solutions
buds n  tech IT                solutionsbuds n  tech IT                solutions
buds n tech IT solutions
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 

Kernel Recipes 2014 - Quick state of the art of clang

  • 1. Debian and Clang Linux Kernel and Clang Sylvestre Ledru – sylvestre@debian.org
  • 2. Current status: All C, C++, Objective-C sources are being built with gcc for all supported Debian arches (~13) and Kernel (3). September, 26 2014 Debian and Clang Sylvestre Ledru
  • 3. Clang ? A C, C++ and Objective-C compiler September, 26 2014 Debian and Clang Sylvestre Ledru
  • 4. Rebuild of Debian using Clang September, 26 2014 Debian and Clang Sylvestre Ledru
  • 5. Crappy method: VERSION=4.9 cd /usr/bin rm g++-$VERSION gcc-$VERSION cpp-$VERSION ln -s clang++ g++-$VERSION ln -s clang gcc-$VERSION ln -s clang cpp-$VERSION cd - September, 26 2014 Debian and Clang Sylvestre Ledru
  • 6. Testing the rebuild of the package under amd64. NOT the performances (build time or execution) nor the execution of the binaries September, 26 2014 Debian and Clang Sylvestre Ledru
  • 7. September, 26 2014 Debian and Clang Sylvestre Ledru
  • 8. Causes of failure ? September, 26 2014 Debian and Clang Sylvestre Ledru
  • 9. Various C/C++ issues: ● Variable length array (gcc extension) ● Inner functions ● Clang is C99 by default ● Gcc accept invalid C++ code (default arguments, scope, etc) ● ... September, 26 2014 Debian and Clang Sylvestre Ledru
  • 10. -Wall enables many warnings -Werror transforms Warning to Error $ gcc -Wall -Werror foo.c && echo $? 0 $ clang -Wall -Werror foo.c && echo $? foo.c:3:14: error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare] return i < 0; September, 26 2014 Debian and Clang Sylvestre Ledru ~ ^ ~ 1 error generated. int main() { unsigned int i = 0; return i < 0; }
  • 11. How we have been able to fix bugs? We used different paths September, 26 2014 Debian and Clang Sylvestre Ledru
  • 12. 1. Fix upstream bugs September, 26 2014 Debian and Clang Sylvestre Ledru
  • 13. Different default behavior 133 occurrences September, 26 2014 Debian and Clang Sylvestre Ledru – noreturn.c – int foo(void) { return; } $ gcc -c noreturn.c; echo $? 0 # -Wall shows it as warning $ clang -c noreturn.c noreturn.c:2:2: error: non-void function 'foo' should return a value [-Wreturn-type] return; ^ 1 error generated.
  • 14. Other kind of errors fixed: ● Wrong main declaration int main(void); int main(int argc, char *argv[]); int main(int argc, char **argv); int main(int argc, char **argv, char **envp); ● Void function should not return a value void foo() { September, 26 2014 Debian and Clang Sylvestre Ledru return 1; } ● Variable length array for a non POD (plain old data) element void foo() { int N=2; std::vector<int> best[2][N]; } ● Missing symbols at link time (inline in C99) inline void xrealloc() { } // should be static inline void xrealloc() int main(){ xrealloc(); return 1; } ● ...
  • 15. Results : ● 295 patches reported (Credits : Arthur Marble and Alexander Ovchinnikov, Debian GSoC) ● 90 bug fixed (ie uploaded in the Debian archive with the fix) ● Switch to Clang by FreeBSD & Mac OS X probably helped too September, 26 2014 Debian and Clang Sylvestre Ledru
  • 16. 2. Hack into Clang September, 26 2014 Debian and Clang Sylvestre Ledru
  • 17. Unsupported options 50 occurrences September, 26 2014 Debian and Clang Sylvestre Ledru $ gcc -O9 foo.c && echo $? 0 $ clang -O9 foo.c error: invalid value '9' in '-O9' Record by libdbi-drivers with -O20 o/ => We transformed that into a warning. $ clang -O20 -c foo.c warning: optimization level '-O20' is unsupported; using '-O3' instead 1 warning generated.
  • 18. Unsupported args ~145 occurrences $ clang-3.4 -c -fno-defer-pop /tmp/foo.c clang: error: unknown argument: '-fno-defer-pop' $ clang-3.5 -c -fno-defer-pop /tmp/foo.c clang: warning: optimization flag '-fno-defer-pop' is not supported clang: warning: argument unused during compilation: '-fno-defer-pop' ------------------------------- $ clang-3.4 -c -finput-charset=UTF-8 /tmp/foo.c clang: error: unknown argument: '-finput-charset=UTF-8' $ clang-3.5 -c -finput-charset=UTF-8 /tmp/foo.c September, 26 2014 Debian and Clang Sylvestre Ledru
  • 19. Unsupported args ~145 occurrences Gcc : unknown arguments are forwarded to the linker Clang : unknown arguments trigger errors. Forward to the linker has to be explict $ clang-3.4 -z lazy /tmp/foo.c clang: error: unknown argument: '-z' clang: error: no such file or directory: 'lazy' $ clang-3.5 -z lazy /tmp/foo.c September, 26 2014 Debian and Clang Sylvestre Ledru
  • 20. 3. Hack into gcc September, 26 2014 Debian and Clang Sylvestre Ledru
  • 21. Well, trying to... September, 26 2014 Debian and Clang Sylvestre Ledru
  • 22. Last rebuild proved that clang is now ready Remaining problems are upstream September, 26 2014 Debian and Clang Sylvestre Ledru
  • 23. Full results published: http://clang.debian.net/ Done on the cloud-qa - EC2 (Amazon cloud) Thanks to Lucas Nussbaum & David Suarez September, 26 2014 Debian and Clang Sylvestre Ledru
  • 24. Now, what about the Linux Kernel? September, 26 2014 Debian and Clang Sylvestre Ledru
  • 25. The LLVMLinux project Same approach : ● Hack the kernel sources code ● Update clang to support some black magic September, 26 2014 Debian and Clang Sylvestre Ledru
  • 26. 69 patches maintained on top of the kernel tree Example : build system, Variable Length Arrays in Structs (vlais), nested functions, etc http://git.linuxfoundation.org/llvmlinux.git/ arch/*/patches September, 26 2014 Debian and Clang Sylvestre Ledru
  • 27. Status: ● Working kernel on some archs (arm, arm64, amd64, x86, etc) ● Still need to upstream a bunch of patches September, 26 2014 Debian and Clang Sylvestre Ledru
  • 28. Thanks ! September, 26 2014 Debian and Clang Sylvestre Ledru