Chapter 2. Compiling code for Bering uClibc using Buildtool

Arne Bernin

Martin Hejl

Table of Contents

Introduction
What is buildtool?
Why bother?
Installation
CVS checkout
Initial configuration
Toolchain download/build
Buildtool usage
Options
Getting information about the sources that can be built
The difference between sources and packages
Downloading the sources for a package
Compiling the sources for a package
Creating buildtool sources/packages
Overview
Step by step guide to creating a simple config
Buildtool reference
Buildtool Tips and FAQ
What you find here
undefined reference to '__libc_start_main'
buildenv not building with gcc 4.0

Introduction

What is buildtool?

Buildtool is a set of perl-scripts/packages to build lrp/leaf-packages from source. Everything in the build process is automated, from downloading the sources and applying patches to configuring/building the source and creating the lrp-package.

Why bother?

Granted, the initial setup of a new package takes some time and tweaking, much more so than simply doing the compile manually would. So, for a one time shot, a package that will never be updated or modified, integrating it into buildtool is probably not worth the hassle.

But if you have a package that's security related (and therefore likely to receive security updates regularly) or one that is still under heavy development and new revisions are released all the time, the time invested in buildtool will pay off very quickly - since usually, all that's needed to integrate a new version of the software are a couple of changes in the config-files.

Besides, creating lrp-packages by hand can be tedious and error prone. And if the developer has to spend less time assembling the package, he can use that time for testing the package (or creating new packages).