SlideShare a Scribd company logo
Cross build in the FreeBSD ports tree
Baptiste Daroussin
bapt@FreeBSD.org
EuroBSDCon 2014
Sofia - Bulgaria
September 28, 2014
Goals
Building packages for Tiers-2 arches
Building packages for low power machines
Building boostrap packages for non self hosting languages
Building ”emulation” ports (aka linuxulator)
Easier way: qemu user emulation
binary image activator
18k packages sucessfully build for armv6 (thanks sbruno!)
Requires no particular modification of the ports tree beside
Easier way: qemu user emulation
binary image activator
18k packages sucessfully build for armv6 (thanks sbruno!)
Requires no particular modification of the ports tree beside
qemu-bsd-user is still buggy and fragile
slow
Hybrid way: qemu user emulation + native cross tools
use qemu-bsd + binary image activator
native cross toolchain
Hybrid way: qemu user emulation + native cross tools
use qemu-bsd + binary image activator
native cross toolchain
qemu-bsd-user is still buggy and fragile
still slow
The one true way: cross compilation
Faster
Simpler
Easier to use for regular users
The one true way: cross compilation
Faster
Simpler
Easier to use for regular users
overhead some ports are built twice
Build systems
Good Players:
Build systems
Good Players:
autotools:
Build systems
Good Players:
autotools: really works out of box
Build systems
Good Players:
autotools: really works out of box ... when used correctly...
Build systems
Good Players:
autotools: really works out of box ... when used correctly...
cmake
Build systems
Good Players:
autotools: really works out of box ... when used correctly...
cmake
/usr/share/mk/* (somehow)
Build systems
Good Players:
autotools: really works out of box ... when used correctly...
cmake
/usr/share/mk/* (somehow)
The bad players
Build systems
Good Players:
autotools: really works out of box ... when used correctly...
cmake
/usr/share/mk/* (somehow)
The bad players
scons
Build systems
Good Players:
autotools: really works out of box ... when used correctly...
cmake
/usr/share/mk/* (somehow)
The bad players
scons
The cusom home made build systems
Build systems
Good Players:
autotools: really works out of box ... when used correctly...
cmake
/usr/share/mk/* (somehow)
The bad players
scons
The cusom home made build systems
./please build me.sh
Main complications
Main complications
Perl
Cross build friendly
Main complications
Perl
Cross build friendly
Main complications
Perl
Cross build friendly
by requiring a ssh connection to a target server ...
Main complications
Perl
Cross build friendly
by requiring a ssh connection to a target server ...
Python
Cross build friendly
Main complications
Perl
Cross build friendly
by requiring a ssh connection to a target server ...
Python
Cross build friendly ... almost
Main complications
Perl
Cross build friendly
by requiring a ssh connection to a target server ...
Python
Cross build friendly ... almost
try to run the built python instead of a native one :(
Main complications
Perl
Cross build friendly
by requiring a ssh connection to a target server ...
Python
Cross build friendly ... almost
try to run the built python instead of a native one :(
FreeBSD ports wtf
Main complications
Perl
Cross build friendly
by requiring a ssh connection to a target server ...
Python
Cross build friendly ... almost
try to run the built python instead of a native one :(
FreeBSD ports wtf (fixed now thanks python@)
Main complications
Perl
Cross build friendly
by requiring a ssh connection to a target server ...
Python
Cross build friendly ... almost
try to run the built python instead of a native one :(
FreeBSD ports wtf (fixed now thanks python@)
Working patches available for very very long still not fully in
python 3.3
Python 3.4?
OpenJDK
Main complications
Perl
Cross build friendly
by requiring a ssh connection to a target server ...
Python
Cross build friendly ... almost
try to run the built python instead of a native one :(
FreeBSD ports wtf (fixed now thanks python@)
Working patches available for very very long still not fully in
python 3.3
Python 3.4?
OpenJDK
Cross build friendly
Main complications
Perl
Cross build friendly
by requiring a ssh connection to a target server ...
Python
Cross build friendly ... almost
try to run the built python instead of a native one :(
FreeBSD ports wtf (fixed now thanks python@)
Working patches available for very very long still not fully in
python 3.3
Python 3.4?
OpenJDK
Cross build friendly ... It really is!
Toolchains
Toolchains
Clang
a cross build friendly compiler
Toolchains
Clang
a cross build friendly compiler
number of targets very limited (only sane arm on FreeBSD)
Toolchains
Clang
a cross build friendly compiler
number of targets very limited (only sane arm on FreeBSD)
GCC
gcc 4.2
Toolchains
Clang
a cross build friendly compiler
number of targets very limited (only sane arm on FreeBSD)
GCC
gcc 4.2 ... real world needs a modern compiler
Toolchains
Clang
a cross build friendly compiler
number of targets very limited (only sane arm on FreeBSD)
GCC
gcc 4.2 ... real world needs a modern compiler
FreeBSD people never upstream lots of patches
Toolchains
Clang
a cross build friendly compiler
number of targets very limited (only sane arm on FreeBSD)
GCC
gcc 4.2 ... real world needs a modern compiler
FreeBSD people never upstream lots of patches
Not really a cross build friendly compiler
Toolchains
Clang
a cross build friendly compiler
number of targets very limited (only sane arm on FreeBSD)
GCC
gcc 4.2 ... real world needs a modern compiler
FreeBSD people never upstream lots of patches
Not really a cross build friendly compiler
No consistent behaviour between gcc and clang
Toolchains
Clang
a cross build friendly compiler
number of targets very limited (only sane arm on FreeBSD)
GCC
gcc 4.2 ... real world needs a modern compiler
FreeBSD people never upstream lots of patches
Not really a cross build friendly compiler
No consistent behaviour between gcc and clang
binutils
Toolchains
Clang
a cross build friendly compiler
number of targets very limited (only sane arm on FreeBSD)
GCC
gcc 4.2 ... real world needs a modern compiler
FreeBSD people never upstream lots of patches
Not really a cross build friendly compiler
No consistent behaviour between gcc and clang
binutils
FreeBSD patches for arm were missing
Toolchains
Clang
a cross build friendly compiler
number of targets very limited (only sane arm on FreeBSD)
GCC
gcc 4.2 ... real world needs a modern compiler
FreeBSD people never upstream lots of patches
Not really a cross build friendly compiler
No consistent behaviour between gcc and clang
binutils
FreeBSD patches for arm were missing
Cross build friendly for all
Toolchains
Clang
a cross build friendly compiler
number of targets very limited (only sane arm on FreeBSD)
GCC
gcc 4.2 ... real world needs a modern compiler
FreeBSD people never upstream lots of patches
Not really a cross build friendly compiler
No consistent behaviour between gcc and clang
binutils
FreeBSD patches for arm were missing
Cross build friendly for all ... but gas
Making a cross building environment
make xdev
Making a cross building environment
make xdev
Create a sysroot
Create a cross build toolchain
Making a cross building environment
make xdev
Create a sysroot
Create a cross build toolchain
Inconsistent over versions
gcc/clang problems
Use clang
clang from base is available and recent enough
fall back on clang from ports otherwise
use binutils from ports all the time
Making a cross building environment
make xdev
Create a sysroot
Create a cross build toolchain
Inconsistent over versions
gcc/clang problems
Use clang
clang from base is available and recent enough
fall back on clang from ports otherwise
use binutils from ports all the time ...requires fixing our *.S
files
Making a cross building environment
make xdev
Create a sysroot
Create a cross build toolchain
Inconsistent over versions
gcc/clang problems
Use clang
clang from base is available and recent enough
fall back on clang from ports otherwise
use binutils from ports all the time ...requires fixing our *.S
files
create a ports cross building aware version of freebsd
Making a cross building environment
make xdev
Create a sysroot
Create a cross build toolchain
Inconsistent over versions
gcc/clang problems
Use clang
clang from base is available and recent enough
fall back on clang from ports otherwise
use binutils from ports all the time ...requires fixing our *.S
files
create a ports cross building aware version of freebsd ...
requires upstreaming our patches
Making a cross building environment
make xdev
Create a sysroot
Create a cross build toolchain
Inconsistent over versions
gcc/clang problems
Use clang
clang from base is available and recent enough
fall back on clang from ports otherwise
use binutils from ports all the time ...requires fixing our *.S
files
create a ports cross building aware version of freebsd ...
requires upstreaming our patches
Making a cross building environment (create the sysroot)
$make sysroot:
make: don’t know how to make sysroot. Stop
Making a cross building environment (create the sysroot)
$make sysroot:
make: don’t know how to make sysroot. Stop
any way manually that is easy
Making a cross building environment (create the sysroot)
$make sysroot:
make: don’t know how to make sysroot. Stop
any way manually that is easy
TARGET?= arm
TARGET_ARCH?= armv6
XCFLAGS= isystem ${WRKDIR}/tmp/usr/include -L${WRKDIR}/tmp/usr/lib 
--sysroot=${WRKDIR}/tmp/ -B${LOCALBASE}/arm-gnueabi-freebsd/bin 
-B/usr/bin 
-target armv6-gnueabi-freebsd10.0
XMAKE_ENV= PATH=${LOCALBASE}/arm-gnueabi-freebsd/bin:/usr/bin:/usr/sbin:/bin 
WITHOUT_PROFILE=yes __MAKE_CONF=/dev/null SRCCONF=/dev/null 
NO_FSCHG=yes MAKEOBJDIRPREFIX=${WRKDIR}/obj 
TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} 
MACHINE=${TARGET} MACHINE_ARCH=${TARGET_ARCH} 
_SHLIBDIRPREFIX=${WRKDIR}/tmp 
CC="${CC} ${XCFLAGS}" 
CPP="${CPP} ${XCFLAGS}" 
CXX="${CXX} ${XCFLAGS}" 
NO_WERROR=yes NO_WARNS=yes
NOFUN= -DNO_FSCHG MK_HTML=no MK_INFO=no -DNO_LINT 
MK_MAN=no MK_NLS=no -DNO_PROFILE 
MK_KERBEROS=no MK_RESCUE=no MK_TESTS=no -DNO_WARNS
cd ${WRKSRC}/lib/ncurses/ncurses ; 
MAKEOBJDIRPREFIX=${WRKDIR}/obj make build-tools
cd ${WRKSRC}; 
mtree -R uid,gid -deU -f etc/mtree/BSD.root.dist -p ${WRKDIR}/tmp >/dev/null ; 
mtree -R uid,gid -deU -f etc/mtree/BSD.usr.dist -p ${WRKDIR}/tmp/usr >/dev/null ; 
mtree -R uid,gid -deU -f etc/mtree/BSD.include.dist -p ${WRKDIR}/tmp/usr/include >/dev/null ; 
setenv -i ${XMAKE_ENV} WITHOUT_MAN=yes -f Makefile.inc1 par-includes libraries 
DESTDIR=${WRKDIR}/tmp
Changes to the ports infrastructure
Variable set when cross building
HCC/HCXX (host compiler)
CC/CXX (set to the cross compiler + special flags)
STRIP CMD to the cross binutils version
ABI FILE=${X SYSROOT}/usr/lib/crt1.o
PKG CONFIG SYSROOT DIR=”${X SYSROOT}”
Changes to the ports infrastructure
Behaviour changed
LIB DEPENDS BUILD DEPENDS are built twice: native and
target
native are installed on the host
target are installed to the sysroot
Automatically add dependencies to sysroot (if not provided)
and toolchain
Changes to the ports infrastructure
Behaviour changed
LIB DEPENDS BUILD DEPENDS are built twice: native and
target
native are installed on the host
target are installed to the sysroot
Automatically add dependencies to sysroot (if not provided)
and toolchain
tweaks have to be done ports by ports
Ports tweak
Perl
perl-cross (unofficial)
provide config.h per supported architecture/freebsd version
Ports tweak
Perl
perl-cross (unofficial)
provide config.h per supported architecture/freebsd version
Python
patch python 2.7 to 3.3 to use native python
check python 3.4
Ports tweak
Perl
perl-cross (unofficial)
provide config.h per supported architecture/freebsd version
Python
patch python 2.7 to 3.3 to use native python
check python 3.4
Scons
impossible to get a global solution
use a saner build system
Ports point of view
Without sysroot
# cd devel/pkgconf
# make X_BUILD_FOR=armv6-gnueabi-freebsd10.0 package
With sysroot
# cd devel/pkgconf
# make X_BUILD_FOR=armv6-gnueabi-freebsd10.0 
X_SYSROOT=/path/to/sysroot package
Limitations
ports requiring a different compiler than the default are not
supported (meaning openmp and non libc++ ports ports
using C nested functions)
plateforms using gcc as a default compiler doesn’t work
Thank you!
Questions ?

More Related Content

What's hot

Rootless Containers & Unresolved issues
Rootless Containers & Unresolved issuesRootless Containers & Unresolved issues
Rootless Containers & Unresolved issuesAkihiro Suda
 
Taming the resource tiger
Taming the resource tigerTaming the resource tiger
Taming the resource tigerElizabeth Smith
 
Gemification for Ruby 2.5/3.0
Gemification for Ruby 2.5/3.0Gemification for Ruby 2.5/3.0
Gemification for Ruby 2.5/3.0Hiroshi SHIBATA
 
Modern Black Mages Fighting in the Real World
Modern Black Mages Fighting in the Real WorldModern Black Mages Fighting in the Real World
Modern Black Mages Fighting in the Real WorldSATOSHI TAGOMORI
 
The State of Rootless Containers
The State of Rootless ContainersThe State of Rootless Containers
The State of Rootless ContainersAkihiro Suda
 
Middleware as Code with mruby
Middleware as Code with mrubyMiddleware as Code with mruby
Middleware as Code with mrubyHiroshi SHIBATA
 
Kernel Recipes 2016 - Kernel documentation: what we have and where it’s going
Kernel Recipes 2016 - Kernel documentation: what we have and where it’s goingKernel Recipes 2016 - Kernel documentation: what we have and where it’s going
Kernel Recipes 2016 - Kernel documentation: what we have and where it’s goingAnne Nicolas
 
Deploying 3 times a day without a downtime @ Rocket Tech Summit in Berlin
Deploying 3 times a day without a downtime @ Rocket Tech Summit in BerlinDeploying 3 times a day without a downtime @ Rocket Tech Summit in Berlin
Deploying 3 times a day without a downtime @ Rocket Tech Summit in BerlinAlessandro Nadalin
 
Highly concurrent yet natural programming
Highly concurrent yet natural programmingHighly concurrent yet natural programming
Highly concurrent yet natural programmingInfinit
 
2008-12-21 Rubinius
2008-12-21 Rubinius2008-12-21 Rubinius
2008-12-21 RubiniusLin Jen-Shin
 
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo..."Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...Yandex
 
Be pinched by a cRUSTacean to prevent programming errors !
Be pinched by a cRUSTacean to prevent programming errors !Be pinched by a cRUSTacean to prevent programming errors !
Be pinched by a cRUSTacean to prevent programming errors !René Ribaud
 
Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014D
 
Golang Project Layout and Practice
Golang Project Layout and PracticeGolang Project Layout and Practice
Golang Project Layout and PracticeBo-Yi Wu
 
20140626 red dotrubyconf2014
20140626 red dotrubyconf201420140626 red dotrubyconf2014
20140626 red dotrubyconf2014Hiroshi SHIBATA
 

What's hot (20)

Jaoo irony
Jaoo ironyJaoo irony
Jaoo irony
 
Rootless Containers & Unresolved issues
Rootless Containers & Unresolved issuesRootless Containers & Unresolved issues
Rootless Containers & Unresolved issues
 
Taming the resource tiger
Taming the resource tigerTaming the resource tiger
Taming the resource tiger
 
Gemification for Ruby 2.5/3.0
Gemification for Ruby 2.5/3.0Gemification for Ruby 2.5/3.0
Gemification for Ruby 2.5/3.0
 
Modern Black Mages Fighting in the Real World
Modern Black Mages Fighting in the Real WorldModern Black Mages Fighting in the Real World
Modern Black Mages Fighting in the Real World
 
The State of Rootless Containers
The State of Rootless ContainersThe State of Rootless Containers
The State of Rootless Containers
 
Spacebrew @ SFPC
Spacebrew @ SFPCSpacebrew @ SFPC
Spacebrew @ SFPC
 
IronRuby And The DLR
IronRuby And The DLRIronRuby And The DLR
IronRuby And The DLR
 
Conscious Coupling
Conscious CouplingConscious Coupling
Conscious Coupling
 
Middleware as Code with mruby
Middleware as Code with mrubyMiddleware as Code with mruby
Middleware as Code with mruby
 
Kernel Recipes 2016 - Kernel documentation: what we have and where it’s going
Kernel Recipes 2016 - Kernel documentation: what we have and where it’s goingKernel Recipes 2016 - Kernel documentation: what we have and where it’s going
Kernel Recipes 2016 - Kernel documentation: what we have and where it’s going
 
Php’s guts
Php’s gutsPhp’s guts
Php’s guts
 
Deploying 3 times a day without a downtime @ Rocket Tech Summit in Berlin
Deploying 3 times a day without a downtime @ Rocket Tech Summit in BerlinDeploying 3 times a day without a downtime @ Rocket Tech Summit in Berlin
Deploying 3 times a day without a downtime @ Rocket Tech Summit in Berlin
 
Highly concurrent yet natural programming
Highly concurrent yet natural programmingHighly concurrent yet natural programming
Highly concurrent yet natural programming
 
2008-12-21 Rubinius
2008-12-21 Rubinius2008-12-21 Rubinius
2008-12-21 Rubinius
 
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo..."Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
 
Be pinched by a cRUSTacean to prevent programming errors !
Be pinched by a cRUSTacean to prevent programming errors !Be pinched by a cRUSTacean to prevent programming errors !
Be pinched by a cRUSTacean to prevent programming errors !
 
Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014
 
Golang Project Layout and Practice
Golang Project Layout and PracticeGolang Project Layout and Practice
Golang Project Layout and Practice
 
20140626 red dotrubyconf2014
20140626 red dotrubyconf201420140626 red dotrubyconf2014
20140626 red dotrubyconf2014
 

Similar to Cross Building the FreeBSD ports tree by Baptiste Daroussin

Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsLee Hanxue
 
Onivim: Modal Editing from the Future
Onivim: Modal Editing from the FutureOnivim: Modal Editing from the Future
Onivim: Modal Editing from the FutureBryan Phelps
 
#Include os - From bootloader to REST API with the new C++
#Include os - From bootloader to REST API with the new C++#Include os - From bootloader to REST API with the new C++
#Include os - From bootloader to REST API with the new C++IncludeOS
 
Why Rust? - Matthias Endler - Codemotion Amsterdam 2016
Why Rust? - Matthias Endler - Codemotion Amsterdam 2016Why Rust? - Matthias Endler - Codemotion Amsterdam 2016
Why Rust? - Matthias Endler - Codemotion Amsterdam 2016Codemotion
 
Embedding Qt
Embedding QtEmbedding Qt
Embedding QtFSCONS
 
Making Security Invisible
Making Security InvisibleMaking Security Invisible
Making Security InvisibleJ On The Beach
 
Linux Kernel - Let's Contribute!
Linux Kernel - Let's Contribute!Linux Kernel - Let's Contribute!
Linux Kernel - Let's Contribute!Levente Kurusa
 
Functional IoT: Hardware and Platform
Functional IoT: Hardware and PlatformFunctional IoT: Hardware and Platform
Functional IoT: Hardware and PlatformKiwamu Okabe
 
Dependent things dependency management for apple sw - slideshare
Dependent things   dependency management for apple sw - slideshareDependent things   dependency management for apple sw - slideshare
Dependent things dependency management for apple sw - slideshareCavelle Benjamin
 
Настройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'aНастройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'acorehard_by
 
Introducing cvm...
Introducing cvm...Introducing cvm...
Introducing cvm...Offirmo
 
oSC-2023-Cross-Build.pdf
oSC-2023-Cross-Build.pdfoSC-2023-Cross-Build.pdf
oSC-2023-Cross-Build.pdfAdrianSchrter1
 
차세대컴파일러, VM의미래: 애플 오픈소스 LLVM
차세대컴파일러, VM의미래: 애플 오픈소스 LLVM차세대컴파일러, VM의미래: 애플 오픈소스 LLVM
차세대컴파일러, VM의미래: 애플 오픈소스 LLVMJung Kim
 
Beginning Kindle Hackery
Beginning Kindle HackeryBeginning Kindle Hackery
Beginning Kindle HackeryJesse Vincent
 
Realtime autonomous car for studying and ROS2 cross compiling
Realtime autonomous car for studying and ROS2 cross compilingRealtime autonomous car for studying and ROS2 cross compiling
Realtime autonomous car for studying and ROS2 cross compiling聖文 鄭
 

Similar to Cross Building the FreeBSD ports tree by Baptiste Daroussin (20)

Toolchain
ToolchainToolchain
Toolchain
 
Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: Foundations
 
Onivim: Modal Editing from the Future
Onivim: Modal Editing from the FutureOnivim: Modal Editing from the Future
Onivim: Modal Editing from the Future
 
#Include os - From bootloader to REST API with the new C++
#Include os - From bootloader to REST API with the new C++#Include os - From bootloader to REST API with the new C++
#Include os - From bootloader to REST API with the new C++
 
Why Rust? - Matthias Endler - Codemotion Amsterdam 2016
Why Rust? - Matthias Endler - Codemotion Amsterdam 2016Why Rust? - Matthias Endler - Codemotion Amsterdam 2016
Why Rust? - Matthias Endler - Codemotion Amsterdam 2016
 
Embedding Qt
Embedding QtEmbedding Qt
Embedding Qt
 
Making Security Invisible
Making Security InvisibleMaking Security Invisible
Making Security Invisible
 
Linux Kernel - Let's Contribute!
Linux Kernel - Let's Contribute!Linux Kernel - Let's Contribute!
Linux Kernel - Let's Contribute!
 
QEMU in Cross building
QEMU in Cross buildingQEMU in Cross building
QEMU in Cross building
 
Functional IoT: Hardware and Platform
Functional IoT: Hardware and PlatformFunctional IoT: Hardware and Platform
Functional IoT: Hardware and Platform
 
Dependent things dependency management for apple sw - slideshare
Dependent things   dependency management for apple sw - slideshareDependent things   dependency management for apple sw - slideshare
Dependent things dependency management for apple sw - slideshare
 
Настройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'aНастройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'a
 
RunningFreeBSDonLinuxKVM
RunningFreeBSDonLinuxKVMRunningFreeBSDonLinuxKVM
RunningFreeBSDonLinuxKVM
 
Introducing cvm...
Introducing cvm...Introducing cvm...
Introducing cvm...
 
Building For Mer
Building For MerBuilding For Mer
Building For Mer
 
Core OS
Core OSCore OS
Core OS
 
oSC-2023-Cross-Build.pdf
oSC-2023-Cross-Build.pdfoSC-2023-Cross-Build.pdf
oSC-2023-Cross-Build.pdf
 
차세대컴파일러, VM의미래: 애플 오픈소스 LLVM
차세대컴파일러, VM의미래: 애플 오픈소스 LLVM차세대컴파일러, VM의미래: 애플 오픈소스 LLVM
차세대컴파일러, VM의미래: 애플 오픈소스 LLVM
 
Beginning Kindle Hackery
Beginning Kindle HackeryBeginning Kindle Hackery
Beginning Kindle Hackery
 
Realtime autonomous car for studying and ROS2 cross compiling
Realtime autonomous car for studying and ROS2 cross compilingRealtime autonomous car for studying and ROS2 cross compiling
Realtime autonomous car for studying and ROS2 cross compiling
 

More from eurobsdcon

EuroBSDCon 2014 Program Front
EuroBSDCon 2014 Program FrontEuroBSDCon 2014 Program Front
EuroBSDCon 2014 Program Fronteurobsdcon
 
EuroBSDCon 2014 tutorials program Thursday & Friday
EuroBSDCon 2014 tutorials program Thursday & FridayEuroBSDCon 2014 tutorials program Thursday & Friday
EuroBSDCon 2014 tutorials program Thursday & Fridayeurobsdcon
 
EuroBSDCon 2014 Sofia Welcome
EuroBSDCon 2014 Sofia WelcomeEuroBSDCon 2014 Sofia Welcome
EuroBSDCon 2014 Sofia Welcomeeurobsdcon
 
EuroBSDCon 2014 Sofia Closing talk
EuroBSDCon 2014 Sofia Closing talkEuroBSDCon 2014 Sofia Closing talk
EuroBSDCon 2014 Sofia Closing talkeurobsdcon
 
Submitting documents anonymously by Atanas Chobanov
Submitting documents anonymously by Atanas ChobanovSubmitting documents anonymously by Atanas Chobanov
Submitting documents anonymously by Atanas Chobanoveurobsdcon
 
Porting the drm/kms graphic drivers to DragonFlyBSD by Francois Tigeot
Porting the drm/kms graphic drivers to DragonFlyBSD by Francois TigeotPorting the drm/kms graphic drivers to DragonFlyBSD by Francois Tigeot
Porting the drm/kms graphic drivers to DragonFlyBSD by Francois Tigeoteurobsdcon
 
University of Oslo's TSD service - storing sensitive & restricted data by D...
  University of Oslo's TSD service - storing sensitive & restricted data by D...  University of Oslo's TSD service - storing sensitive & restricted data by D...
University of Oslo's TSD service - storing sensitive & restricted data by D...eurobsdcon
 
secure lazy binding, and the 64bit time_t development process by Philip Guenther
secure lazy binding, and the 64bit time_t development process by Philip Guenthersecure lazy binding, and the 64bit time_t development process by Philip Guenther
secure lazy binding, and the 64bit time_t development process by Philip Guenthereurobsdcon
 
The entropic principle: /dev/u?random and NetBSD by Taylor R Campbell
  The entropic principle: /dev/u?random and NetBSD by Taylor R Campbell  The entropic principle: /dev/u?random and NetBSD by Taylor R Campbell
The entropic principle: /dev/u?random and NetBSD by Taylor R Campbelleurobsdcon
 
The LLDB Debugger in FreeBSD by Ed Maste
The LLDB Debugger in FreeBSD by Ed MasteThe LLDB Debugger in FreeBSD by Ed Maste
The LLDB Debugger in FreeBSD by Ed Masteeurobsdcon
 
Porting Valgrind to NetBSD and OpenBSD by Masao Uebayashi
Porting Valgrind to NetBSD and OpenBSD by Masao UebayashiPorting Valgrind to NetBSD and OpenBSD by Masao Uebayashi
Porting Valgrind to NetBSD and OpenBSD by Masao Uebayashieurobsdcon
 
Multiplatform JIT Code Generator for NetBSD by Alexander Nasonov
Multiplatform JIT Code Generator for NetBSD by Alexander NasonovMultiplatform JIT Code Generator for NetBSD by Alexander Nasonov
Multiplatform JIT Code Generator for NetBSD by Alexander Nasonoveurobsdcon
 
OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel
OpenStack and OpenContrail for FreeBSD platform by Michał DubielOpenStack and OpenContrail for FreeBSD platform by Michał Dubiel
OpenStack and OpenContrail for FreeBSD platform by Michał Dubieleurobsdcon
 
Porting NetBSD to the LatticeMico32 open source CPU by Yann Sionneau
Porting NetBSD to the LatticeMico32 open source CPU by Yann SionneauPorting NetBSD to the LatticeMico32 open source CPU by Yann Sionneau
Porting NetBSD to the LatticeMico32 open source CPU by Yann Sionneaueurobsdcon
 
Smartcom's control plane software, a customized version of FreeBSD by Boris A...
Smartcom's control plane software, a customized version of FreeBSD by Boris A...Smartcom's control plane software, a customized version of FreeBSD by Boris A...
Smartcom's control plane software, a customized version of FreeBSD by Boris A...eurobsdcon
 
Bugs Ex Ante by Kristaps Dzonsons
Bugs Ex Ante by Kristaps DzonsonsBugs Ex Ante by Kristaps Dzonsons
Bugs Ex Ante by Kristaps Dzonsonseurobsdcon
 
Building packages through emulation by Sean Bruno
Building packages through emulation by Sean BrunoBuilding packages through emulation by Sean Bruno
Building packages through emulation by Sean Brunoeurobsdcon
 
Making OpenBSD Useful on the Octeon Network Gear by Paul Irofti
Making OpenBSD Useful on the Octeon Network Gear by Paul IroftiMaking OpenBSD Useful on the Octeon Network Gear by Paul Irofti
Making OpenBSD Useful on the Octeon Network Gear by Paul Iroftieurobsdcon
 
A Reimplementation of NetBSD Based on a Microkernel by Andrew S. Tanenbaum
A Reimplementation of NetBSD Based on a Microkernel by Andrew S. TanenbaumA Reimplementation of NetBSD Based on a Microkernel by Andrew S. Tanenbaum
A Reimplementation of NetBSD Based on a Microkernel by Andrew S. Tanenbaumeurobsdcon
 
Using routing domains / routing tables in a production network by Peter Hessler
Using routing domains / routing tables in a production network by Peter HesslerUsing routing domains / routing tables in a production network by Peter Hessler
Using routing domains / routing tables in a production network by Peter Hesslereurobsdcon
 

More from eurobsdcon (20)

EuroBSDCon 2014 Program Front
EuroBSDCon 2014 Program FrontEuroBSDCon 2014 Program Front
EuroBSDCon 2014 Program Front
 
EuroBSDCon 2014 tutorials program Thursday & Friday
EuroBSDCon 2014 tutorials program Thursday & FridayEuroBSDCon 2014 tutorials program Thursday & Friday
EuroBSDCon 2014 tutorials program Thursday & Friday
 
EuroBSDCon 2014 Sofia Welcome
EuroBSDCon 2014 Sofia WelcomeEuroBSDCon 2014 Sofia Welcome
EuroBSDCon 2014 Sofia Welcome
 
EuroBSDCon 2014 Sofia Closing talk
EuroBSDCon 2014 Sofia Closing talkEuroBSDCon 2014 Sofia Closing talk
EuroBSDCon 2014 Sofia Closing talk
 
Submitting documents anonymously by Atanas Chobanov
Submitting documents anonymously by Atanas ChobanovSubmitting documents anonymously by Atanas Chobanov
Submitting documents anonymously by Atanas Chobanov
 
Porting the drm/kms graphic drivers to DragonFlyBSD by Francois Tigeot
Porting the drm/kms graphic drivers to DragonFlyBSD by Francois TigeotPorting the drm/kms graphic drivers to DragonFlyBSD by Francois Tigeot
Porting the drm/kms graphic drivers to DragonFlyBSD by Francois Tigeot
 
University of Oslo's TSD service - storing sensitive & restricted data by D...
  University of Oslo's TSD service - storing sensitive & restricted data by D...  University of Oslo's TSD service - storing sensitive & restricted data by D...
University of Oslo's TSD service - storing sensitive & restricted data by D...
 
secure lazy binding, and the 64bit time_t development process by Philip Guenther
secure lazy binding, and the 64bit time_t development process by Philip Guenthersecure lazy binding, and the 64bit time_t development process by Philip Guenther
secure lazy binding, and the 64bit time_t development process by Philip Guenther
 
The entropic principle: /dev/u?random and NetBSD by Taylor R Campbell
  The entropic principle: /dev/u?random and NetBSD by Taylor R Campbell  The entropic principle: /dev/u?random and NetBSD by Taylor R Campbell
The entropic principle: /dev/u?random and NetBSD by Taylor R Campbell
 
The LLDB Debugger in FreeBSD by Ed Maste
The LLDB Debugger in FreeBSD by Ed MasteThe LLDB Debugger in FreeBSD by Ed Maste
The LLDB Debugger in FreeBSD by Ed Maste
 
Porting Valgrind to NetBSD and OpenBSD by Masao Uebayashi
Porting Valgrind to NetBSD and OpenBSD by Masao UebayashiPorting Valgrind to NetBSD and OpenBSD by Masao Uebayashi
Porting Valgrind to NetBSD and OpenBSD by Masao Uebayashi
 
Multiplatform JIT Code Generator for NetBSD by Alexander Nasonov
Multiplatform JIT Code Generator for NetBSD by Alexander NasonovMultiplatform JIT Code Generator for NetBSD by Alexander Nasonov
Multiplatform JIT Code Generator for NetBSD by Alexander Nasonov
 
OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel
OpenStack and OpenContrail for FreeBSD platform by Michał DubielOpenStack and OpenContrail for FreeBSD platform by Michał Dubiel
OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel
 
Porting NetBSD to the LatticeMico32 open source CPU by Yann Sionneau
Porting NetBSD to the LatticeMico32 open source CPU by Yann SionneauPorting NetBSD to the LatticeMico32 open source CPU by Yann Sionneau
Porting NetBSD to the LatticeMico32 open source CPU by Yann Sionneau
 
Smartcom's control plane software, a customized version of FreeBSD by Boris A...
Smartcom's control plane software, a customized version of FreeBSD by Boris A...Smartcom's control plane software, a customized version of FreeBSD by Boris A...
Smartcom's control plane software, a customized version of FreeBSD by Boris A...
 
Bugs Ex Ante by Kristaps Dzonsons
Bugs Ex Ante by Kristaps DzonsonsBugs Ex Ante by Kristaps Dzonsons
Bugs Ex Ante by Kristaps Dzonsons
 
Building packages through emulation by Sean Bruno
Building packages through emulation by Sean BrunoBuilding packages through emulation by Sean Bruno
Building packages through emulation by Sean Bruno
 
Making OpenBSD Useful on the Octeon Network Gear by Paul Irofti
Making OpenBSD Useful on the Octeon Network Gear by Paul IroftiMaking OpenBSD Useful on the Octeon Network Gear by Paul Irofti
Making OpenBSD Useful on the Octeon Network Gear by Paul Irofti
 
A Reimplementation of NetBSD Based on a Microkernel by Andrew S. Tanenbaum
A Reimplementation of NetBSD Based on a Microkernel by Andrew S. TanenbaumA Reimplementation of NetBSD Based on a Microkernel by Andrew S. Tanenbaum
A Reimplementation of NetBSD Based on a Microkernel by Andrew S. Tanenbaum
 
Using routing domains / routing tables in a production network by Peter Hessler
Using routing domains / routing tables in a production network by Peter HesslerUsing routing domains / routing tables in a production network by Peter Hessler
Using routing domains / routing tables in a production network by Peter Hessler
 

Recently uploaded

Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxDavid Michel
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...Sri Ambati
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxAbida Shariff
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaRTTS
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform EngineeringJemma Hussein Allen
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupCatarinaPereira64715
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Product School
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoTAnalytics
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...Product School
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...Product School
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsVlad Stirbu
 

Recently uploaded (20)

Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 

Cross Building the FreeBSD ports tree by Baptiste Daroussin

  • 1. Cross build in the FreeBSD ports tree Baptiste Daroussin bapt@FreeBSD.org EuroBSDCon 2014 Sofia - Bulgaria September 28, 2014
  • 2. Goals Building packages for Tiers-2 arches Building packages for low power machines Building boostrap packages for non self hosting languages Building ”emulation” ports (aka linuxulator)
  • 3. Easier way: qemu user emulation binary image activator 18k packages sucessfully build for armv6 (thanks sbruno!) Requires no particular modification of the ports tree beside
  • 4. Easier way: qemu user emulation binary image activator 18k packages sucessfully build for armv6 (thanks sbruno!) Requires no particular modification of the ports tree beside qemu-bsd-user is still buggy and fragile slow
  • 5. Hybrid way: qemu user emulation + native cross tools use qemu-bsd + binary image activator native cross toolchain
  • 6. Hybrid way: qemu user emulation + native cross tools use qemu-bsd + binary image activator native cross toolchain qemu-bsd-user is still buggy and fragile still slow
  • 7. The one true way: cross compilation Faster Simpler Easier to use for regular users
  • 8. The one true way: cross compilation Faster Simpler Easier to use for regular users overhead some ports are built twice
  • 11. Build systems Good Players: autotools: really works out of box
  • 12. Build systems Good Players: autotools: really works out of box ... when used correctly...
  • 13. Build systems Good Players: autotools: really works out of box ... when used correctly... cmake
  • 14. Build systems Good Players: autotools: really works out of box ... when used correctly... cmake /usr/share/mk/* (somehow)
  • 15. Build systems Good Players: autotools: really works out of box ... when used correctly... cmake /usr/share/mk/* (somehow) The bad players
  • 16. Build systems Good Players: autotools: really works out of box ... when used correctly... cmake /usr/share/mk/* (somehow) The bad players scons
  • 17. Build systems Good Players: autotools: really works out of box ... when used correctly... cmake /usr/share/mk/* (somehow) The bad players scons The cusom home made build systems
  • 18. Build systems Good Players: autotools: really works out of box ... when used correctly... cmake /usr/share/mk/* (somehow) The bad players scons The cusom home made build systems ./please build me.sh
  • 22. Main complications Perl Cross build friendly by requiring a ssh connection to a target server ...
  • 23. Main complications Perl Cross build friendly by requiring a ssh connection to a target server ... Python Cross build friendly
  • 24. Main complications Perl Cross build friendly by requiring a ssh connection to a target server ... Python Cross build friendly ... almost
  • 25. Main complications Perl Cross build friendly by requiring a ssh connection to a target server ... Python Cross build friendly ... almost try to run the built python instead of a native one :(
  • 26. Main complications Perl Cross build friendly by requiring a ssh connection to a target server ... Python Cross build friendly ... almost try to run the built python instead of a native one :( FreeBSD ports wtf
  • 27. Main complications Perl Cross build friendly by requiring a ssh connection to a target server ... Python Cross build friendly ... almost try to run the built python instead of a native one :( FreeBSD ports wtf (fixed now thanks python@)
  • 28. Main complications Perl Cross build friendly by requiring a ssh connection to a target server ... Python Cross build friendly ... almost try to run the built python instead of a native one :( FreeBSD ports wtf (fixed now thanks python@) Working patches available for very very long still not fully in python 3.3 Python 3.4? OpenJDK
  • 29. Main complications Perl Cross build friendly by requiring a ssh connection to a target server ... Python Cross build friendly ... almost try to run the built python instead of a native one :( FreeBSD ports wtf (fixed now thanks python@) Working patches available for very very long still not fully in python 3.3 Python 3.4? OpenJDK Cross build friendly
  • 30. Main complications Perl Cross build friendly by requiring a ssh connection to a target server ... Python Cross build friendly ... almost try to run the built python instead of a native one :( FreeBSD ports wtf (fixed now thanks python@) Working patches available for very very long still not fully in python 3.3 Python 3.4? OpenJDK Cross build friendly ... It really is!
  • 32. Toolchains Clang a cross build friendly compiler
  • 33. Toolchains Clang a cross build friendly compiler number of targets very limited (only sane arm on FreeBSD)
  • 34. Toolchains Clang a cross build friendly compiler number of targets very limited (only sane arm on FreeBSD) GCC gcc 4.2
  • 35. Toolchains Clang a cross build friendly compiler number of targets very limited (only sane arm on FreeBSD) GCC gcc 4.2 ... real world needs a modern compiler
  • 36. Toolchains Clang a cross build friendly compiler number of targets very limited (only sane arm on FreeBSD) GCC gcc 4.2 ... real world needs a modern compiler FreeBSD people never upstream lots of patches
  • 37. Toolchains Clang a cross build friendly compiler number of targets very limited (only sane arm on FreeBSD) GCC gcc 4.2 ... real world needs a modern compiler FreeBSD people never upstream lots of patches Not really a cross build friendly compiler
  • 38. Toolchains Clang a cross build friendly compiler number of targets very limited (only sane arm on FreeBSD) GCC gcc 4.2 ... real world needs a modern compiler FreeBSD people never upstream lots of patches Not really a cross build friendly compiler No consistent behaviour between gcc and clang
  • 39. Toolchains Clang a cross build friendly compiler number of targets very limited (only sane arm on FreeBSD) GCC gcc 4.2 ... real world needs a modern compiler FreeBSD people never upstream lots of patches Not really a cross build friendly compiler No consistent behaviour between gcc and clang binutils
  • 40. Toolchains Clang a cross build friendly compiler number of targets very limited (only sane arm on FreeBSD) GCC gcc 4.2 ... real world needs a modern compiler FreeBSD people never upstream lots of patches Not really a cross build friendly compiler No consistent behaviour between gcc and clang binutils FreeBSD patches for arm were missing
  • 41. Toolchains Clang a cross build friendly compiler number of targets very limited (only sane arm on FreeBSD) GCC gcc 4.2 ... real world needs a modern compiler FreeBSD people never upstream lots of patches Not really a cross build friendly compiler No consistent behaviour between gcc and clang binutils FreeBSD patches for arm were missing Cross build friendly for all
  • 42. Toolchains Clang a cross build friendly compiler number of targets very limited (only sane arm on FreeBSD) GCC gcc 4.2 ... real world needs a modern compiler FreeBSD people never upstream lots of patches Not really a cross build friendly compiler No consistent behaviour between gcc and clang binutils FreeBSD patches for arm were missing Cross build friendly for all ... but gas
  • 43. Making a cross building environment make xdev
  • 44. Making a cross building environment make xdev Create a sysroot Create a cross build toolchain
  • 45. Making a cross building environment make xdev Create a sysroot Create a cross build toolchain Inconsistent over versions gcc/clang problems Use clang clang from base is available and recent enough fall back on clang from ports otherwise use binutils from ports all the time
  • 46. Making a cross building environment make xdev Create a sysroot Create a cross build toolchain Inconsistent over versions gcc/clang problems Use clang clang from base is available and recent enough fall back on clang from ports otherwise use binutils from ports all the time ...requires fixing our *.S files
  • 47. Making a cross building environment make xdev Create a sysroot Create a cross build toolchain Inconsistent over versions gcc/clang problems Use clang clang from base is available and recent enough fall back on clang from ports otherwise use binutils from ports all the time ...requires fixing our *.S files create a ports cross building aware version of freebsd
  • 48. Making a cross building environment make xdev Create a sysroot Create a cross build toolchain Inconsistent over versions gcc/clang problems Use clang clang from base is available and recent enough fall back on clang from ports otherwise use binutils from ports all the time ...requires fixing our *.S files create a ports cross building aware version of freebsd ... requires upstreaming our patches
  • 49. Making a cross building environment make xdev Create a sysroot Create a cross build toolchain Inconsistent over versions gcc/clang problems Use clang clang from base is available and recent enough fall back on clang from ports otherwise use binutils from ports all the time ...requires fixing our *.S files create a ports cross building aware version of freebsd ... requires upstreaming our patches
  • 50. Making a cross building environment (create the sysroot) $make sysroot: make: don’t know how to make sysroot. Stop
  • 51. Making a cross building environment (create the sysroot) $make sysroot: make: don’t know how to make sysroot. Stop any way manually that is easy
  • 52. Making a cross building environment (create the sysroot) $make sysroot: make: don’t know how to make sysroot. Stop any way manually that is easy TARGET?= arm TARGET_ARCH?= armv6 XCFLAGS= isystem ${WRKDIR}/tmp/usr/include -L${WRKDIR}/tmp/usr/lib --sysroot=${WRKDIR}/tmp/ -B${LOCALBASE}/arm-gnueabi-freebsd/bin -B/usr/bin -target armv6-gnueabi-freebsd10.0 XMAKE_ENV= PATH=${LOCALBASE}/arm-gnueabi-freebsd/bin:/usr/bin:/usr/sbin:/bin WITHOUT_PROFILE=yes __MAKE_CONF=/dev/null SRCCONF=/dev/null NO_FSCHG=yes MAKEOBJDIRPREFIX=${WRKDIR}/obj TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} MACHINE=${TARGET} MACHINE_ARCH=${TARGET_ARCH} _SHLIBDIRPREFIX=${WRKDIR}/tmp CC="${CC} ${XCFLAGS}" CPP="${CPP} ${XCFLAGS}" CXX="${CXX} ${XCFLAGS}" NO_WERROR=yes NO_WARNS=yes NOFUN= -DNO_FSCHG MK_HTML=no MK_INFO=no -DNO_LINT MK_MAN=no MK_NLS=no -DNO_PROFILE MK_KERBEROS=no MK_RESCUE=no MK_TESTS=no -DNO_WARNS cd ${WRKSRC}/lib/ncurses/ncurses ; MAKEOBJDIRPREFIX=${WRKDIR}/obj make build-tools cd ${WRKSRC}; mtree -R uid,gid -deU -f etc/mtree/BSD.root.dist -p ${WRKDIR}/tmp >/dev/null ; mtree -R uid,gid -deU -f etc/mtree/BSD.usr.dist -p ${WRKDIR}/tmp/usr >/dev/null ; mtree -R uid,gid -deU -f etc/mtree/BSD.include.dist -p ${WRKDIR}/tmp/usr/include >/dev/null ; setenv -i ${XMAKE_ENV} WITHOUT_MAN=yes -f Makefile.inc1 par-includes libraries DESTDIR=${WRKDIR}/tmp
  • 53. Changes to the ports infrastructure Variable set when cross building HCC/HCXX (host compiler) CC/CXX (set to the cross compiler + special flags) STRIP CMD to the cross binutils version ABI FILE=${X SYSROOT}/usr/lib/crt1.o PKG CONFIG SYSROOT DIR=”${X SYSROOT}”
  • 54. Changes to the ports infrastructure Behaviour changed LIB DEPENDS BUILD DEPENDS are built twice: native and target native are installed on the host target are installed to the sysroot Automatically add dependencies to sysroot (if not provided) and toolchain
  • 55. Changes to the ports infrastructure Behaviour changed LIB DEPENDS BUILD DEPENDS are built twice: native and target native are installed on the host target are installed to the sysroot Automatically add dependencies to sysroot (if not provided) and toolchain tweaks have to be done ports by ports
  • 56. Ports tweak Perl perl-cross (unofficial) provide config.h per supported architecture/freebsd version
  • 57. Ports tweak Perl perl-cross (unofficial) provide config.h per supported architecture/freebsd version Python patch python 2.7 to 3.3 to use native python check python 3.4
  • 58. Ports tweak Perl perl-cross (unofficial) provide config.h per supported architecture/freebsd version Python patch python 2.7 to 3.3 to use native python check python 3.4 Scons impossible to get a global solution use a saner build system
  • 59. Ports point of view Without sysroot # cd devel/pkgconf # make X_BUILD_FOR=armv6-gnueabi-freebsd10.0 package With sysroot # cd devel/pkgconf # make X_BUILD_FOR=armv6-gnueabi-freebsd10.0 X_SYSROOT=/path/to/sysroot package
  • 60. Limitations ports requiring a different compiler than the default are not supported (meaning openmp and non libc++ ports ports using C nested functions) plateforms using gcc as a default compiler doesn’t work