BSDCan2017 - 0722d

BSDCan 2017
The Technical BSD Conference

Speakers
Ed Maste
Schedule
Day Talks #2 - 10 June - 2017-06-10
Room DMS 1160
Start time 11:15
Duration 01:00
Info
ID 839
Event type Lecture
Track Hacking
Language used for presentation English

The FreeBSD Toolchain

As a BSD distribution FreeBSD has the concept of a base system, an integrated kernel, and core userland, which are developed, tested, and released together by a common team. The userland includes the C language runtime, the build toolchain, basic system utilities, and some third-party libraries and applications.

The toolchain includes the compiler and linker, which translate source code into executable objects, the debugger, and related utilities for inspecting or modifying those objects.

In this talk you will learn about the history of FreeBSD's toolchain, why certain choices were made when choosing toolchain components, the current state of the toolchain, and plans for the future.

For most of its history FreeBSD relied on the GNU toolchain: the GNU Compiler Collection (GCC), the GNU binutils linker and binary inspection tools, the GNU debugger GDB. This was the case between 1993 and 2007, and the copy of the toolchain included in the FreeBSD tree was regularly updated throughout that period. In 2007 the Free Software Foundation migrated to version 3 of the GNU Public License (GPLv3), which included new restrictions that some FreeBSD users and developers found objectionable. Broad updates to the GNU toolchain ceased, and it quickly became outdated.

A migration to permissively licensed toolchain components is in progress. FreeBSD now uses the Clang compiler for Tier-1 architectures, with ongoing effort to switch to Clang for the remainder. Work is ongoing to use LLVM's LLD linker, and it is currently usable on amd64. Binary utilities such as objcopy and readelf are obtained from the ELF Tool Chain project on all supported FreeBSD architectures. Runtime libraries largely come from the LLVM project. This includes the libc++ C++ runtime, the compiler-rt library used by the compiler, and sanitizer runtimes used for diagnostic and debugging tools. One library, libcxxrt, comes from Pathscale. A migration to LLVM's LLDB debugger is also underway.