SlideShare a Scribd company logo
1 of 54
Download to read offline
Make Debian compiler agnostic :
        A rebuild with Clang


Sylvestre Ledru – sylvestre@debian.org
Disclamer !




April, 04 2013   Make Debian compiler agnostic
                       Sylvestre Ledru
Current status :
     All C, C++, Objective-C sources are being built
     with gcc for all supported Debian arches and
                         Kernel.




April, 04 2013       Make Debian compiler agnostic
                           Sylvestre Ledru
gcc is THE FLOSS compiler for the last 25 years
   Used for (pretty much) everywhere or anything

            Still growing and maintained (cf gcc 4.8)




April, 04 2013            Make Debian compiler agnostic
                                Sylvestre Ledru
Why a new compiler in Debian ?




April, 04 2013            Make Debian compiler agnostic
                                Sylvestre Ledru
Other compilers can find programming errors that
                gcc could not find




April, 04 2013    Make Debian compiler agnostic
                        Sylvestre Ledru
Code built by many compilers is more likely to
    be more strictly correct and more portable then
                code only built with gcc




April, 04 2013       Make Debian compiler agnostic
                           Sylvestre Ledru
Some compilers can have advantages on some
           archs (ex : clang on ARM)




April, 04 2013    Make Debian compiler agnostic
                        Sylvestre Ledru
Provide some interesting side projects (lldb, scan-
           build, ASAN, libc++, etc)




April, 04 2013     Make Debian compiler agnostic
                         Sylvestre Ledru
As we were able to do with decoupling Linux
from Debian with kFreeBSD and the HURD, we're
       aiming to decouple gcc in Debian.

     Open the door to other compilers or analyzers




April, 04 2013       Make Debian compiler agnostic
                           Sylvestre Ledru
LLVM/Clang




April, 04 2013   Make Debian compiler agnostic
                       Sylvestre Ledru
Started as an academic project
       Versatile platform for compilation and virtual
                         machine

       Designed originally for the investigation of
     dynamic compilation techniques for static and
                 dynamic languages




April, 04 2013         Make Debian compiler agnostic
                             Sylvestre Ledru
Developed initially as a base for a next major
                      GCC release
                 Source:
                 http://gcc.gnu.org/ml/gcc/2005-11/msg00888.html




April, 04 2013               Make Debian compiler agnostic
                                   Sylvestre Ledru
Sponsored by Apple since 2005 to replace gcc
                  (GPL vs BSD)

          Has now a strong and diverse community
          (academics, individuals and corporates)

     Many universities/research centers are basing
               their research on LLVM




April, 04 2013         Make Debian compiler agnostic
                             Sylvestre Ledru
April, 04 2013   Make Debian compiler agnostic
                       Sylvestre Ledru
Clang

                 C, C++ & Objective-C compiler.
                          (no Fortran)
                        Based on LLVM

    Default compiler for Mac OS X (Xcode)/iOS [1]
                  and FreeBSD [2]


                           Sources:
                           [1] https://developer.apple.com/technologies/tools/
                           [2] http://lists.freebsd.org/pipermail/freebsd-stable/2012-May/067486.html

April, 04 2013           Make Debian compiler agnostic
                               Sylvestre Ledru
Some advantages :

       More recent base code (ie less legacy code)

   Strong interest of hardware manufactors (ARM,
               MIPS, Intel, Nvidia, etc)

      Supposed to be faster to build code than gcc

                 Accept the same arguments as gcc



April, 04 2013             Make Debian compiler agnostic
                                 Sylvestre Ledru
Example
            Full build of Scilab (doc, essential tests)
                         ~24 minutes gcc
                        ~22 minutes clang




April, 04 2013            Make Debian compiler agnostic
                                Sylvestre Ledru
Some advantages (bis)
                  More intelligent detections
– foo.c –                                     $ gcc -Wall -Werror foo.c ; echo $?

int main() {                                  0

            unsigned int i = 0;               $ clang -Werror foo.c
                                              foo.c:3:17: error: comparison of
            return i < 0;
                                              unsigned expression < 0 is always
}                                             false
                                                   [-Werror,-Wtautological-compare]
                                                  return i < 0;
                                                        ~^~
                                              1 error generated.




April, 04 2013              Make Debian compiler agnostic
                                  Sylvestre Ledru
Side effect
          => Brings (friendly) competition in the free
                        compiler world.




April, 04 2013           Make Debian compiler agnostic
                               Sylvestre Ledru
http://gcc.gnu.org/wiki/ClangDiagnosticsComparison


April, 04 2013    Make Debian compiler agnostic
                        Sylvestre Ledru
http://clang.llvm.org/comparison.html#gcc


April, 04 2013           Make Debian compiler agnostic
                               Sylvestre Ledru
Rebuild of Debian using Clang




April, 04 2013           Make Debian compiler agnostic
                               Sylvestre Ledru
Crappy method :

VERSION=4.7
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 -




April, 04 2013    Make Debian compiler agnostic
                        Sylvestre Ledru
Testing the rebuild of the package under amd64.

   NOT the performances (build time or execution)
         nor the execution of the binaries




April, 04 2013      Make Debian compiler agnostic
                          Sylvestre Ledru
Full results published:
                 http://clang.debian.net/




      Done on the cloud-qa - EC2 (Amazon cloud)
             Thanks to Lucas Nussbaum

April, 04 2013        Make Debian compiler agnostic
                            Sylvestre Ledru
Rebuild with clang 3.0
                    February 28, 2012

         15658 packages built : 1381 (8.8 %) failed.




April, 04 2013          Make Debian compiler agnostic
                              Sylvestre Ledru
Rebuild with clang 3.1
                    June 23, 2012

       17710 packages built : 2137 (12.1 %) failed.




April, 04 2013        Make Debian compiler agnostic
                            Sylvestre Ledru
Rebuild with clang 3.2
                   January 28, 2013

        18264 packages built : 2204 (12.1 %) failed.




April, 04 2013         Make Debian compiler agnostic
                             Sylvestre Ledru
Why these differences between 3.0 vs 3.1/3.2?




April, 04 2013      Make Debian compiler agnostic
                          Sylvestre Ledru
Some information about -Wall & -Werror :

                         -Wall enables many warnings

                   -Werror transforms Warning to Error
int main() {              $ gcc -Wall -Werror foo.c && echo $?
   unsigned int i = 0;    0
   return i < 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;
                                  ~^~
                          1 error generated.


  April, 04 2013                      Make Debian compiler agnostic
                                            Sylvestre Ledru
-Werror & unused args
                         40 occurrences


Clang detects unused argument.

clang --param ssp-buffer-size=4                           clang: error: argument unused
-Werror foo.c                                             during compilation: '--param ssp-
                                                          buffer-size=4'
And generates a normal warning …
                                                          96 occurrences
Which becomes an error with -Werror




   April, 04 2013                 Make Debian compiler agnostic
                                        Sylvestre Ledru
Security check introduced in clang 3.1
                           9 occurences


                                             $ gcc -Werror -c foo.c && echo $?
#include <stdio.h>
                                             0
void foo(void) {                             $ clang -Werror -c foo.c && echo $?
    char buffer[1024];                       foo.c:5:23: error: use of '%n' in
    sprintf(buffer, "%n", 2);                format string discouraged
                                                (potentially insecure) [-Werror,-
}
                                             Wformat-security]
                                                 sprintf(buffer, "%n", 2);
                                                               ~^
                                             1 error generated.


    April, 04 2013         Make Debian compiler agnostic
                                 Sylvestre Ledru
Some of the most common errors




April, 04 2013           Make Debian compiler agnostic
                               Sylvestre Ledru
Unsupported options
                            50 occurrences
      $ gcc -O9 foo.c && echo $?
      0

      $ clang -O9 foo.c
      error: invalid value '9' in '-O9'




      Record by libdbi-drivers with -O20 o/




April, 04 2013                   Make Debian compiler agnostic
                                       Sylvestre Ledru
Different default behavior
                     133 occurrences
– noreturn.c –                           $ gcc -c noreturn.c; echo $?

int foo(void) {                          0
                                         # -Wall shows it as warning
    return;
                                         $ clang -c noreturn.c
}
                                         noreturn.c:2:2: error: non-void
                                         function 'foo' should return a value
                                              [-Wreturn-type]
                                                return;
                                                ^
                                         1 error generated.




April, 04 2013         Make Debian compiler agnostic
                             Sylvestre Ledru
Different default behavior (bis)
                        15 occurrences
                                            $ gcc -c returninvoid.c; echo $?
– returninvoid.c –
                                            returninvoid.c: In function ‘foo’:
void foo(void) {
                                            returninvoid.c:2:2: warning: ‘return’ with a
    return 42;                              value, in function returning void [enabled
                                            by default]
}
                                            0
                                            $ clang -c returninvoid.c
                                            returninvoid.c:2:2: error: void function
                                            'foo' should not return a value
                                                 [-Wreturn-type]
                                                   return 42;
                                                   ^      ~~
                                            1 error generated.


April, 04 2013            Make Debian compiler agnostic
                                Sylvestre Ledru
Different understanding of the C++ standard
– mailboxField.cpp –                              $ g++ -c mailboxField.cpp && echo $?
class address {
                                                  0
protected:
      static int parseNext(int a);                $ clang++ -c mailboxField.cpp
};
                                                  mailboxField.cpp:17:22: error: 'parseNext' is a
class mailbox : public address {                  protected member of 'address'
      friend class mailboxField;                           address::parseNext(a);
};                                                                ^
class mailboxField {
                                                  mailboxField.cpp:4:16: note: declared protected
      void parse(int a)            {              here
                 address::parseNext(a);               static int parseNext(int a);
                 // will work with:                          ^
                 // mailbox::parseNext(a);
            }
                                            References:
};                                          http://llvm.org/bugs/show_bug.cgi?id=6840
                                            http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52136
April, 04 2013                    Make Debian compiler agnostic
                                        Sylvestre Ledru
Different set of warnings with -Wall
                            Plenty of occurences echo $?
                                    $ gcc -Wall -Werror -c foo.cpp &&
– plop.c –                                 0

void foo() {                               $ clang -Wall -Werror -c foo.cpp
                                           foo.cpp:3:13: error: equality comparison with extraneous
        int a=1;                           parentheses

        if ((a == 1)) {                        [-Werror,-Wparentheses-equality]
                                               if ((a == 1)) {
              return;                             ~~^~~~
                                           foo.cpp:3:13: note: remove extraneous parentheses around the
        }                                  comparison to

}                                              silence this warning
                                               if ((a == 1)) {
                                                 ~ ^ ~
                                           foo.cpp:3:13: note: use '=' to turn this equality comparison into an
                                           assignment
                                               if ((a == 1)) {
                                                    ^~
                                                    =
                                          1 error generated.
    April, 04 2013                  Make Debian compiler agnostic
                                          Sylvestre Ledru
gcc extensions which won't be supported
                   25 occurences
– foo.cpp –                                $ g++ -c foo.cpp; echo $?

#include <vector>                          0
                                           $ clang++ -c foo.cpp
void foo() {
                                           foo.cpp:4:29: error: variable length
    int N=2;
                                           array of non-POD element type
    std::vector<int> best[2][N];                'std::vector<int>'
}                                              std::vector<int> best[2][N];
                                                                       ^
                                           1 error generated.




April, 04 2013           Make Debian compiler agnostic
                               Sylvestre Ledru
gcc accepts stuff which should not
                              34 occurences
                                                $ g++ -c foo.cpp; echo $?
– foo.cpp –
                                                0
// Uncomment this line will fix the issue.
                                                $ clang++ -c foo.cpp
// template<typename Value_t>
                                                foo.cpp:6:5: error: call to function 'b' that is neither
// void b(Value_t value)
                                                visible in the template
template<typename Value_t>                              definition nor found by argument-dependent lookup
void a(Value_t value) {
                                                    b(value);
      b(value);
                                                    ^
}
                                                foo.cpp:15:5: note: in instantiation of function template
                                                specialization
                                                        'a<int>' requested here
template<typename Value_t>
void b(Value_t value) {                             a(y);

}                                                   ^
                                                foo.cpp:9:33: note: 'b' should be declared prior to the call site
                                                template<typename Value_t> void b(Value_t value)
void foo(int y) {
                                                                        ^
      a(y);
                                                1 error generated.
}

    April, 04 2013              Make Debian compiler agnostic
                                      Sylvestre Ledru
Last rebuild proved that clang is now ready

                 Remaining problems are upstream

        Some work started to report bugs upstream




April, 04 2013            Make Debian compiler agnostic
                                Sylvestre Ledru
Status




April, 04 2013   Make Debian compiler agnostic
                       Sylvestre Ledru
Packages LLVM-toolchain containing
           LLVM + Clang + compiler-rt + polly + lldb

           version 3.2 & 3.3 waiting in Debian NEW




April, 04 2013           Make Debian compiler agnostic
                               Sylvestre Ledru
Build results integrated on the Debian
                       Package Tracking System

                             By Paul Wise




April, 04 2013               Make Debian compiler agnostic
                                   Sylvestre Ledru
Version of pbuilder/cowbuilder with a hook to
                  change the compiler
                   By Junich Uekawa
                                      Exemple :

       sudo CHOOSE_COMPILER=clang cowbuilder --build yourpackage_1.00-1.dsc




April, 04 2013                Make Debian compiler agnostic
                                    Sylvestre Ledru
Interest by upstreams (Google, Intel & Apple)

    Publication of Debian (wheezy, unstable) and
     Ubuntu (Quantal, Precise, Raring) of Nightly
    packages of LLVM, Clang, Compiler-rt, Polly &
                        LLDB

                                  http://llvm.org/apt
                 http://blog.llvm.org/2013/04/llvm-debianubuntu-nightly-packages.html




April, 04 2013                        Make Debian compiler agnostic
                                            Sylvestre Ledru
Future




April, 04 2013   Make Debian compiler agnostic
                       Sylvestre Ledru
Discussions to move the build as a new port
             on http://www.debian-ports.org/

 Various potential issues (not really new arch, mix
         of gcc/clang-built packages, etc)




April, 04 2013        Make Debian compiler agnostic
                            Sylvestre Ledru
Hack the Debian tools to :

            Force dpkg to export CC=/usr/bin/cc,
                 ●

          CXX=/usr/bin/c++ and OBJC=/usr/bin/objc

    ●   Check for hardcoded CC=gcc in debian/rules

      ●   Set the /usr/bin/{cc,c++,objc} alternatives to
                        {clang, clang++}




April, 04 2013             Make Debian compiler agnostic
                                 Sylvestre Ledru
Update the debian policy to include something
                       like :
 Hardcoded usage of CC or CXX (for example, CC=gcc) should be
                 avoid and documented if necessary.
   Debian build tools must respect the CC and CXX variables if
  provided. If not, they shall default to /usr/bin/cc and /usr/bin/c++

                                    See :
       http://lists.debian.org/debian-devel/2012/08/msg00783.html




April, 04 2013             Make Debian compiler agnostic
                                 Sylvestre Ledru
Add a lintian warning like

       W: yourpackage: Hardcoded call to gcc/g++.
          Use /usr/bin/cc or /usr/bin/c++ instead




April, 04 2013         Make Debian compiler agnostic
                             Sylvestre Ledru
Potential the rebuild of Debian with :

●clang+plugin. Ex : polly : cache-locality
optimisation auto-parallelism and vectorization, etc

●   address sanitizer (ASAN)

●   scan-build : static C/C++ analyzer




●   Intel compilers
April, 04 2013              Make Debian compiler agnostic
                                  Sylvestre Ledru
Any questions ? Remarks ?
                        Troll ? (+1)




April, 04 2013          Make Debian compiler agnostic
                              Sylvestre Ledru

More Related Content

What's hot

LXC, Docker, and the future of software delivery | LinuxCon 2013
LXC, Docker, and the future of software delivery | LinuxCon 2013LXC, Docker, and the future of software delivery | LinuxCon 2013
LXC, Docker, and the future of software delivery | LinuxCon 2013dotCloud
 
Docker, Linux Containers (LXC), and security
Docker, Linux Containers (LXC), and securityDocker, Linux Containers (LXC), and security
Docker, Linux Containers (LXC), and securityJérôme Petazzoni
 
Docker, Linux Containers, and Security: Does It Add Up?
Docker, Linux Containers, and Security: Does It Add Up?Docker, Linux Containers, and Security: Does It Add Up?
Docker, Linux Containers, and Security: Does It Add Up?Jérôme Petazzoni
 
Evoluation of Linux Container Virtualization
Evoluation of Linux Container VirtualizationEvoluation of Linux Container Virtualization
Evoluation of Linux Container VirtualizationImesh Gunaratne
 
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special EditionIntroduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special EditionJérôme Petazzoni
 
Container Torture: Run any binary, in any container
Container Torture: Run any binary, in any containerContainer Torture: Run any binary, in any container
Container Torture: Run any binary, in any containerDocker, Inc.
 
Linux Container Brief for IEEE WG P2302
Linux Container Brief for IEEE WG P2302Linux Container Brief for IEEE WG P2302
Linux Container Brief for IEEE WG P2302Boden Russell
 
Fast boot
Fast bootFast boot
Fast bootSZ Lin
 
Lxc – next gen virtualization for cloud intro (cloudexpo)
Lxc – next gen virtualization for cloud   intro (cloudexpo)Lxc – next gen virtualization for cloud   intro (cloudexpo)
Lxc – next gen virtualization for cloud intro (cloudexpo)Boden Russell
 
Red Teaming macOS Environments with Hermes the Swift Messenger
Red Teaming macOS Environments with Hermes the Swift MessengerRed Teaming macOS Environments with Hermes the Swift Messenger
Red Teaming macOS Environments with Hermes the Swift MessengerJustin Bui
 
Security of Linux containers in the cloud
Security of Linux containers in the cloudSecurity of Linux containers in the cloud
Security of Linux containers in the cloudDobrica Pavlinušić
 
Docker - container and lightweight virtualization
Docker - container and lightweight virtualization Docker - container and lightweight virtualization
Docker - container and lightweight virtualization Sim Janghoon
 
Tokyo OpenStack Summit 2015: Unraveling Docker Security
Tokyo OpenStack Summit 2015: Unraveling Docker SecurityTokyo OpenStack Summit 2015: Unraveling Docker Security
Tokyo OpenStack Summit 2015: Unraveling Docker SecurityPhil Estes
 
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxConAnatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxConJérôme Petazzoni
 
How Secure Is Your Container? ContainerCon Berlin 2016
How Secure Is Your Container? ContainerCon Berlin 2016How Secure Is Your Container? ContainerCon Berlin 2016
How Secure Is Your Container? ContainerCon Berlin 2016Phil Estes
 
Docker and kernel security
Docker and kernel securityDocker and kernel security
Docker and kernel securitysmart_bit
 
Thinking inside the box (shared)
Thinking inside the box (shared)Thinking inside the box (shared)
Thinking inside the box (shared)Joe Brockmeier
 
SCALE 2011 Deploying OpenStack with Chef
SCALE 2011 Deploying OpenStack with ChefSCALE 2011 Deploying OpenStack with Chef
SCALE 2011 Deploying OpenStack with ChefMatt Ray
 
Distributed Compiler Icecc
Distributed Compiler IceccDistributed Compiler Icecc
Distributed Compiler IceccSZ Lin
 
Linux containers – next gen virtualization for cloud (atl summit) ar4 3 - copy
Linux containers – next gen virtualization for cloud (atl summit) ar4 3 - copyLinux containers – next gen virtualization for cloud (atl summit) ar4 3 - copy
Linux containers – next gen virtualization for cloud (atl summit) ar4 3 - copyBoden Russell
 

What's hot (20)

LXC, Docker, and the future of software delivery | LinuxCon 2013
LXC, Docker, and the future of software delivery | LinuxCon 2013LXC, Docker, and the future of software delivery | LinuxCon 2013
LXC, Docker, and the future of software delivery | LinuxCon 2013
 
Docker, Linux Containers (LXC), and security
Docker, Linux Containers (LXC), and securityDocker, Linux Containers (LXC), and security
Docker, Linux Containers (LXC), and security
 
Docker, Linux Containers, and Security: Does It Add Up?
Docker, Linux Containers, and Security: Does It Add Up?Docker, Linux Containers, and Security: Does It Add Up?
Docker, Linux Containers, and Security: Does It Add Up?
 
Evoluation of Linux Container Virtualization
Evoluation of Linux Container VirtualizationEvoluation of Linux Container Virtualization
Evoluation of Linux Container Virtualization
 
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special EditionIntroduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
 
Container Torture: Run any binary, in any container
Container Torture: Run any binary, in any containerContainer Torture: Run any binary, in any container
Container Torture: Run any binary, in any container
 
Linux Container Brief for IEEE WG P2302
Linux Container Brief for IEEE WG P2302Linux Container Brief for IEEE WG P2302
Linux Container Brief for IEEE WG P2302
 
Fast boot
Fast bootFast boot
Fast boot
 
Lxc – next gen virtualization for cloud intro (cloudexpo)
Lxc – next gen virtualization for cloud   intro (cloudexpo)Lxc – next gen virtualization for cloud   intro (cloudexpo)
Lxc – next gen virtualization for cloud intro (cloudexpo)
 
Red Teaming macOS Environments with Hermes the Swift Messenger
Red Teaming macOS Environments with Hermes the Swift MessengerRed Teaming macOS Environments with Hermes the Swift Messenger
Red Teaming macOS Environments with Hermes the Swift Messenger
 
Security of Linux containers in the cloud
Security of Linux containers in the cloudSecurity of Linux containers in the cloud
Security of Linux containers in the cloud
 
Docker - container and lightweight virtualization
Docker - container and lightweight virtualization Docker - container and lightweight virtualization
Docker - container and lightweight virtualization
 
Tokyo OpenStack Summit 2015: Unraveling Docker Security
Tokyo OpenStack Summit 2015: Unraveling Docker SecurityTokyo OpenStack Summit 2015: Unraveling Docker Security
Tokyo OpenStack Summit 2015: Unraveling Docker Security
 
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxConAnatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
 
How Secure Is Your Container? ContainerCon Berlin 2016
How Secure Is Your Container? ContainerCon Berlin 2016How Secure Is Your Container? ContainerCon Berlin 2016
How Secure Is Your Container? ContainerCon Berlin 2016
 
Docker and kernel security
Docker and kernel securityDocker and kernel security
Docker and kernel security
 
Thinking inside the box (shared)
Thinking inside the box (shared)Thinking inside the box (shared)
Thinking inside the box (shared)
 
SCALE 2011 Deploying OpenStack with Chef
SCALE 2011 Deploying OpenStack with ChefSCALE 2011 Deploying OpenStack with Chef
SCALE 2011 Deploying OpenStack with Chef
 
Distributed Compiler Icecc
Distributed Compiler IceccDistributed Compiler Icecc
Distributed Compiler Icecc
 
Linux containers – next gen virtualization for cloud (atl summit) ar4 3 - copy
Linux containers – next gen virtualization for cloud (atl summit) ar4 3 - copyLinux containers – next gen virtualization for cloud (atl summit) ar4 3 - copy
Linux containers – next gen virtualization for cloud (atl summit) ar4 3 - copy
 

Viewers also liked

Tutorial RAID nível 1
Tutorial RAID nível 1Tutorial RAID nível 1
Tutorial RAID nível 1Kelvin Romero
 
Resume of Angelo Dosel Arendain
Resume of Angelo Dosel ArendainResume of Angelo Dosel Arendain
Resume of Angelo Dosel ArendainAngelo Arendain
 
Kernel Recipes 2016 - New hwmon device registration API - Jean Delvare
Kernel Recipes 2016 -  New hwmon device registration API - Jean DelvareKernel Recipes 2016 -  New hwmon device registration API - Jean Delvare
Kernel Recipes 2016 - New hwmon device registration API - Jean DelvareAnne 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 - Understanding a Real-Time System (more than just a kernel)
Kernel Recipes 2016 - Understanding a Real-Time System (more than just a kernel)Kernel Recipes 2016 - Understanding a Real-Time System (more than just a kernel)
Kernel Recipes 2016 - Understanding a Real-Time System (more than just a kernel)Anne Nicolas
 
Kernel Recipes 2016 - Upstream Kernel Graphics is (Finally) Winning
Kernel Recipes 2016 - Upstream Kernel Graphics is (Finally) WinningKernel Recipes 2016 - Upstream Kernel Graphics is (Finally) Winning
Kernel Recipes 2016 - Upstream Kernel Graphics is (Finally) WinningAnne Nicolas
 
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
 
Understanding RAID Levels (RAID 0, RAID 1, RAID 2, RAID 3, RAID 4, RAID 5)
Understanding RAID Levels (RAID 0, RAID 1, RAID 2, RAID 3, RAID 4, RAID 5)Understanding RAID Levels (RAID 0, RAID 1, RAID 2, RAID 3, RAID 4, RAID 5)
Understanding RAID Levels (RAID 0, RAID 1, RAID 2, RAID 3, RAID 4, RAID 5)Raid Data Recovery
 

Viewers also liked (9)

Tutorial RAID nível 1
Tutorial RAID nível 1Tutorial RAID nível 1
Tutorial RAID nível 1
 
Resume of Angelo Dosel Arendain
Resume of Angelo Dosel ArendainResume of Angelo Dosel Arendain
Resume of Angelo Dosel Arendain
 
Kernel Recipes 2016 - New hwmon device registration API - Jean Delvare
Kernel Recipes 2016 -  New hwmon device registration API - Jean DelvareKernel Recipes 2016 -  New hwmon device registration API - Jean Delvare
Kernel Recipes 2016 - New hwmon device registration API - Jean Delvare
 
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 - Understanding a Real-Time System (more than just a kernel)
Kernel Recipes 2016 - Understanding a Real-Time System (more than just a kernel)Kernel Recipes 2016 - Understanding a Real-Time System (more than just a kernel)
Kernel Recipes 2016 - Understanding a Real-Time System (more than just a kernel)
 
Kernel Recipes 2016 - Upstream Kernel Graphics is (Finally) Winning
Kernel Recipes 2016 - Upstream Kernel Graphics is (Finally) WinningKernel Recipes 2016 - Upstream Kernel Graphics is (Finally) Winning
Kernel Recipes 2016 - Upstream Kernel Graphics is (Finally) Winning
 
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)
 
Understanding RAID Levels (RAID 0, RAID 1, RAID 2, RAID 3, RAID 4, RAID 5)
Understanding RAID Levels (RAID 0, RAID 1, RAID 2, RAID 3, RAID 4, RAID 5)Understanding RAID Levels (RAID 0, RAID 1, RAID 2, RAID 3, RAID 4, RAID 5)
Understanding RAID Levels (RAID 0, RAID 1, RAID 2, RAID 3, RAID 4, RAID 5)
 
RAID
RAIDRAID
RAID
 

Similar to Distro Recipes 2013 : Make Debian and compiler agnostic

Kernel Recipes 2014 - Quick state of the art of clang
Kernel Recipes 2014 - Quick state of the art of clangKernel Recipes 2014 - Quick state of the art of clang
Kernel Recipes 2014 - Quick state of the art of clangAnne Nicolas
 
Apigee deploy grunt plugin.1.0
Apigee deploy grunt plugin.1.0Apigee deploy grunt plugin.1.0
Apigee deploy grunt plugin.1.0Diego Zuluaga
 
Глеб Смирнов: Что нового в FreeBSD 10.0
Глеб Смирнов: Что нового в FreeBSD 10.0Глеб Смирнов: Что нового в FreeBSD 10.0
Глеб Смирнов: Что нового в FreeBSD 10.0Yandex
 
Defcon 22 - Stitching numbers - generating rop payloads from in memory numbers
Defcon 22 - Stitching numbers - generating rop payloads from in memory numbersDefcon 22 - Stitching numbers - generating rop payloads from in memory numbers
Defcon 22 - Stitching numbers - generating rop payloads from in memory numbersAlexandre Moneger
 
What's new in FreeBSD 10
What's new in FreeBSD 10What's new in FreeBSD 10
What's new in FreeBSD 10Gleb Smirnoff
 
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
Why everyone is excited about Docker (and you should too...) -  Carlo Bonamic...Why everyone is excited about Docker (and you should too...) -  Carlo Bonamic...
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...Codemotion
 
codemotion-docker-2014
codemotion-docker-2014codemotion-docker-2014
codemotion-docker-2014Carlo Bonamico
 
Poky meets Debian: Understanding how to make an embedded Linux by using an ex...
Poky meets Debian: Understanding how to make an embedded Linux by using an ex...Poky meets Debian: Understanding how to make an embedded Linux by using an ex...
Poky meets Debian: Understanding how to make an embedded Linux by using an ex...Yoshitake Kobayashi
 
Get started with AAR
Get started with AARGet started with AAR
Get started with AARRené Mertins
 
End-to-end CI/CD deployments of containerized applications using AWS services
End-to-end CI/CD deployments of containerized applications using AWS servicesEnd-to-end CI/CD deployments of containerized applications using AWS services
End-to-end CI/CD deployments of containerized applications using AWS servicesMassimo Ferre'
 
Linux containers & Devops
Linux containers & DevopsLinux containers & Devops
Linux containers & DevopsMaciej Lasyk
 
Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725miguel dominguez
 
Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725MortazaJohari
 
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...Yevgeniy Brikman
 
Ada in Fedora linux
Ada in Fedora linuxAda in Fedora linux
Ada in Fedora linuxPavel Zhukov
 
Operating Neo4j Fabric in Multi-Zone Kubernetes Cluster.pptx
Operating Neo4j Fabric in Multi-Zone Kubernetes Cluster.pptxOperating Neo4j Fabric in Multi-Zone Kubernetes Cluster.pptx
Operating Neo4j Fabric in Multi-Zone Kubernetes Cluster.pptxNeo4j
 

Similar to Distro Recipes 2013 : Make Debian and compiler agnostic (20)

Kernel Recipes 2014 - Quick state of the art of clang
Kernel Recipes 2014 - Quick state of the art of clangKernel Recipes 2014 - Quick state of the art of clang
Kernel Recipes 2014 - Quick state of the art of clang
 
Building For Mer
Building For MerBuilding For Mer
Building For Mer
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Apigee deploy grunt plugin.1.0
Apigee deploy grunt plugin.1.0Apigee deploy grunt plugin.1.0
Apigee deploy grunt plugin.1.0
 
Глеб Смирнов: Что нового в FreeBSD 10.0
Глеб Смирнов: Что нового в FreeBSD 10.0Глеб Смирнов: Что нового в FreeBSD 10.0
Глеб Смирнов: Что нового в FreeBSD 10.0
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Defcon 22 - Stitching numbers - generating rop payloads from in memory numbers
Defcon 22 - Stitching numbers - generating rop payloads from in memory numbersDefcon 22 - Stitching numbers - generating rop payloads from in memory numbers
Defcon 22 - Stitching numbers - generating rop payloads from in memory numbers
 
What's new in FreeBSD 10
What's new in FreeBSD 10What's new in FreeBSD 10
What's new in FreeBSD 10
 
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
Why everyone is excited about Docker (and you should too...) -  Carlo Bonamic...Why everyone is excited about Docker (and you should too...) -  Carlo Bonamic...
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
 
codemotion-docker-2014
codemotion-docker-2014codemotion-docker-2014
codemotion-docker-2014
 
Poky meets Debian: Understanding how to make an embedded Linux by using an ex...
Poky meets Debian: Understanding how to make an embedded Linux by using an ex...Poky meets Debian: Understanding how to make an embedded Linux by using an ex...
Poky meets Debian: Understanding how to make an embedded Linux by using an ex...
 
.NET RDF APIs
.NET RDF APIs.NET RDF APIs
.NET RDF APIs
 
Get started with AAR
Get started with AARGet started with AAR
Get started with AAR
 
End-to-end CI/CD deployments of containerized applications using AWS services
End-to-end CI/CD deployments of containerized applications using AWS servicesEnd-to-end CI/CD deployments of containerized applications using AWS services
End-to-end CI/CD deployments of containerized applications using AWS services
 
Linux containers & Devops
Linux containers & DevopsLinux containers & Devops
Linux containers & Devops
 
Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725
 
Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725
 
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
 
Ada in Fedora linux
Ada in Fedora linuxAda in Fedora linux
Ada in Fedora linux
 
Operating Neo4j Fabric in Multi-Zone Kubernetes Cluster.pptx
Operating Neo4j Fabric in Multi-Zone Kubernetes Cluster.pptxOperating Neo4j Fabric in Multi-Zone Kubernetes Cluster.pptx
Operating Neo4j Fabric in Multi-Zone Kubernetes Cluster.pptx
 

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

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 

Recently uploaded (20)

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 

Distro Recipes 2013 : Make Debian and compiler agnostic

  • 1. Make Debian compiler agnostic : A rebuild with Clang Sylvestre Ledru – sylvestre@debian.org
  • 2. Disclamer ! April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 3. Current status : All C, C++, Objective-C sources are being built with gcc for all supported Debian arches and Kernel. April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 4. gcc is THE FLOSS compiler for the last 25 years Used for (pretty much) everywhere or anything Still growing and maintained (cf gcc 4.8) April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 5. Why a new compiler in Debian ? April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 6. Other compilers can find programming errors that gcc could not find April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 7. Code built by many compilers is more likely to be more strictly correct and more portable then code only built with gcc April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 8. Some compilers can have advantages on some archs (ex : clang on ARM) April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 9. Provide some interesting side projects (lldb, scan- build, ASAN, libc++, etc) April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 10. As we were able to do with decoupling Linux from Debian with kFreeBSD and the HURD, we're aiming to decouple gcc in Debian. Open the door to other compilers or analyzers April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 11. LLVM/Clang April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 12. Started as an academic project Versatile platform for compilation and virtual machine Designed originally for the investigation of dynamic compilation techniques for static and dynamic languages April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 13. Developed initially as a base for a next major GCC release Source: http://gcc.gnu.org/ml/gcc/2005-11/msg00888.html April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 14. Sponsored by Apple since 2005 to replace gcc (GPL vs BSD) Has now a strong and diverse community (academics, individuals and corporates) Many universities/research centers are basing their research on LLVM April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 15. April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 16. Clang C, C++ & Objective-C compiler. (no Fortran) Based on LLVM Default compiler for Mac OS X (Xcode)/iOS [1] and FreeBSD [2] Sources: [1] https://developer.apple.com/technologies/tools/ [2] http://lists.freebsd.org/pipermail/freebsd-stable/2012-May/067486.html April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 17. Some advantages : More recent base code (ie less legacy code) Strong interest of hardware manufactors (ARM, MIPS, Intel, Nvidia, etc) Supposed to be faster to build code than gcc Accept the same arguments as gcc April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 18. Example Full build of Scilab (doc, essential tests) ~24 minutes gcc ~22 minutes clang April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 19. Some advantages (bis) More intelligent detections – foo.c – $ gcc -Wall -Werror foo.c ; echo $? int main() { 0 unsigned int i = 0; $ clang -Werror foo.c foo.c:3:17: error: comparison of return i < 0; unsigned expression < 0 is always } false [-Werror,-Wtautological-compare] return i < 0; ~^~ 1 error generated. April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 20. Side effect => Brings (friendly) competition in the free compiler world. April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 21. http://gcc.gnu.org/wiki/ClangDiagnosticsComparison April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 22. http://clang.llvm.org/comparison.html#gcc April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 23. Rebuild of Debian using Clang April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 24. Crappy method : VERSION=4.7 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 - April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 25. Testing the rebuild of the package under amd64. NOT the performances (build time or execution) nor the execution of the binaries April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 26. Full results published: http://clang.debian.net/ Done on the cloud-qa - EC2 (Amazon cloud) Thanks to Lucas Nussbaum April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 27. Rebuild with clang 3.0 February 28, 2012 15658 packages built : 1381 (8.8 %) failed. April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 28. Rebuild with clang 3.1 June 23, 2012 17710 packages built : 2137 (12.1 %) failed. April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 29. Rebuild with clang 3.2 January 28, 2013 18264 packages built : 2204 (12.1 %) failed. April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 30. Why these differences between 3.0 vs 3.1/3.2? April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 31. Some information about -Wall & -Werror : -Wall enables many warnings -Werror transforms Warning to Error int main() { $ gcc -Wall -Werror foo.c && echo $? unsigned int i = 0; 0 return i < 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; ~^~ 1 error generated. April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 32. -Werror & unused args 40 occurrences Clang detects unused argument. clang --param ssp-buffer-size=4 clang: error: argument unused -Werror foo.c during compilation: '--param ssp- buffer-size=4' And generates a normal warning … 96 occurrences Which becomes an error with -Werror April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 33. Security check introduced in clang 3.1 9 occurences $ gcc -Werror -c foo.c && echo $? #include <stdio.h> 0 void foo(void) { $ clang -Werror -c foo.c && echo $? char buffer[1024]; foo.c:5:23: error: use of '%n' in sprintf(buffer, "%n", 2); format string discouraged (potentially insecure) [-Werror,- } Wformat-security] sprintf(buffer, "%n", 2); ~^ 1 error generated. April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 34. Some of the most common errors April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 35. Unsupported options 50 occurrences $ gcc -O9 foo.c && echo $? 0 $ clang -O9 foo.c error: invalid value '9' in '-O9' Record by libdbi-drivers with -O20 o/ April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 36. Different default behavior 133 occurrences – noreturn.c – $ gcc -c noreturn.c; echo $? int foo(void) { 0 # -Wall shows it as warning return; $ clang -c noreturn.c } noreturn.c:2:2: error: non-void function 'foo' should return a value [-Wreturn-type] return; ^ 1 error generated. April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 37. Different default behavior (bis) 15 occurrences $ gcc -c returninvoid.c; echo $? – returninvoid.c – returninvoid.c: In function ‘foo’: void foo(void) { returninvoid.c:2:2: warning: ‘return’ with a return 42; value, in function returning void [enabled by default] } 0 $ clang -c returninvoid.c returninvoid.c:2:2: error: void function 'foo' should not return a value [-Wreturn-type] return 42; ^ ~~ 1 error generated. April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 38. Different understanding of the C++ standard – mailboxField.cpp – $ g++ -c mailboxField.cpp && echo $? class address { 0 protected: static int parseNext(int a); $ clang++ -c mailboxField.cpp }; mailboxField.cpp:17:22: error: 'parseNext' is a class mailbox : public address { protected member of 'address' friend class mailboxField; address::parseNext(a); }; ^ class mailboxField { mailboxField.cpp:4:16: note: declared protected void parse(int a) { here address::parseNext(a); static int parseNext(int a); // will work with: ^ // mailbox::parseNext(a); } References: }; http://llvm.org/bugs/show_bug.cgi?id=6840 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52136 April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 39. Different set of warnings with -Wall Plenty of occurences echo $? $ gcc -Wall -Werror -c foo.cpp && – plop.c – 0 void foo() { $ clang -Wall -Werror -c foo.cpp foo.cpp:3:13: error: equality comparison with extraneous int a=1; parentheses if ((a == 1)) { [-Werror,-Wparentheses-equality] if ((a == 1)) { return; ~~^~~~ foo.cpp:3:13: note: remove extraneous parentheses around the } comparison to } silence this warning if ((a == 1)) { ~ ^ ~ foo.cpp:3:13: note: use '=' to turn this equality comparison into an assignment if ((a == 1)) { ^~ = 1 error generated. April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 40. gcc extensions which won't be supported 25 occurences – foo.cpp – $ g++ -c foo.cpp; echo $? #include <vector> 0 $ clang++ -c foo.cpp void foo() { foo.cpp:4:29: error: variable length int N=2; array of non-POD element type std::vector<int> best[2][N]; 'std::vector<int>' } std::vector<int> best[2][N]; ^ 1 error generated. April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 41. gcc accepts stuff which should not 34 occurences $ g++ -c foo.cpp; echo $? – foo.cpp – 0 // Uncomment this line will fix the issue. $ clang++ -c foo.cpp // template<typename Value_t> foo.cpp:6:5: error: call to function 'b' that is neither // void b(Value_t value) visible in the template template<typename Value_t> definition nor found by argument-dependent lookup void a(Value_t value) { b(value); b(value); ^ } foo.cpp:15:5: note: in instantiation of function template specialization 'a<int>' requested here template<typename Value_t> void b(Value_t value) { a(y); } ^ foo.cpp:9:33: note: 'b' should be declared prior to the call site template<typename Value_t> void b(Value_t value) void foo(int y) { ^ a(y); 1 error generated. } April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 42. Last rebuild proved that clang is now ready Remaining problems are upstream Some work started to report bugs upstream April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 43. Status April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 44. Packages LLVM-toolchain containing LLVM + Clang + compiler-rt + polly + lldb version 3.2 & 3.3 waiting in Debian NEW April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 45. Build results integrated on the Debian Package Tracking System By Paul Wise April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 46. Version of pbuilder/cowbuilder with a hook to change the compiler By Junich Uekawa Exemple : sudo CHOOSE_COMPILER=clang cowbuilder --build yourpackage_1.00-1.dsc April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 47. Interest by upstreams (Google, Intel & Apple) Publication of Debian (wheezy, unstable) and Ubuntu (Quantal, Precise, Raring) of Nightly packages of LLVM, Clang, Compiler-rt, Polly & LLDB http://llvm.org/apt http://blog.llvm.org/2013/04/llvm-debianubuntu-nightly-packages.html April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 48. Future April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 49. Discussions to move the build as a new port on http://www.debian-ports.org/ Various potential issues (not really new arch, mix of gcc/clang-built packages, etc) April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 50. Hack the Debian tools to : Force dpkg to export CC=/usr/bin/cc, ● CXX=/usr/bin/c++ and OBJC=/usr/bin/objc ● Check for hardcoded CC=gcc in debian/rules ● Set the /usr/bin/{cc,c++,objc} alternatives to {clang, clang++} April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 51. Update the debian policy to include something like : Hardcoded usage of CC or CXX (for example, CC=gcc) should be avoid and documented if necessary. Debian build tools must respect the CC and CXX variables if provided. If not, they shall default to /usr/bin/cc and /usr/bin/c++ See : http://lists.debian.org/debian-devel/2012/08/msg00783.html April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 52. Add a lintian warning like W: yourpackage: Hardcoded call to gcc/g++. Use /usr/bin/cc or /usr/bin/c++ instead April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 53. Potential the rebuild of Debian with : ●clang+plugin. Ex : polly : cache-locality optimisation auto-parallelism and vectorization, etc ● address sanitizer (ASAN) ● scan-build : static C/C++ analyzer ● Intel compilers April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru
  • 54. Any questions ? Remarks ? Troll ? (+1) April, 04 2013 Make Debian compiler agnostic Sylvestre Ledru