linux from scratch standard build unit

build binutils

SEAN K.H. LIAO

linux from scratch standard build unit

build binutils

standard build unit

Linux From Scratch has an interesting way of measuring how long it takes to do things. Since most of your time is going to be spent compiling C code, everything is measured in Standard Build Units (SBUs), or the time it takes to build binutils.

At the time of writing, the instructions are: In short, grab binutils, unpack, configure, and compile (adjust -j to number of CPUs). Dependencies include gcc, libc6-dev, texinfo... (the configure step will fail if it's missing dependencies).

1$ curl -LO https://sourceware.org/pub/binutils/releases/binutils-2.41.tar.xz
2$ tar xvf binutils-2.41.tar.xz
3$ cd binutils-2.41
4$ mkdir build && cd build
5$ ../configure --disable-nls --enable-gprofng=no --disable-werror
6$ time make -j 16

On my Framework 13 with a 12th Gen Intel i7-1260P (16) @ 4.700GHz CPU, running gcc version 13.2.1 20230801 (GCC) from Arch Linux, 1 SBU is make -j 16 181.20s user 24.22s system 607% cpu 33.802 total, or 33 seconds wall clock time.

On my newly acquired Lichee Pi 4A with a TH1520, 12nm, RISC-V 2.0G C910 x4 CPU, running gcc version 13.2.0 (Debian 13.2.0-4revyos1) from Debian / RevyOS, 1 SBU is make -j 4 953.23s user 197.58s system 322% cpu 5:56.51 total, or 6 minutes of wall clock time.