Difference between revisions of "Cross Compiler"

From Void Linux Wiki
Jump to: navigation, search
(Introduction to installing pre-built cross compilers.)
(No difference)

Revision as of 11:19, 9 June 2019

Void Linux's pre-built cross-compiler toolchains. These allow you to compile binaries for a foreign host.

Compared to most other Linux distributions, Void linux uses triplet tuples for distinguishing toolchains. Other distro's tuples generally follow the ARCH-VENDOR-OS-LIBC model, however on void, we use ARCH-OS-LIBC tuples to identify our toolchains.

For example, other distro's may use arm-unknown-linux-gnueabihf. Void Linux's comparable toolchain would be arm-linux-gnueabihf. The package name has removed the $VENDOR identifier from the toolchain name.

Installation

Void offers pre-build toolchains. Check which toolchains are available.

xbps-query -Rs --regex 'cross-(\w)+-(\w)+(\w)+'

Once you have found your target architecture, os and glibc implementation, you can install it. The example below will install the original Raspberry Pi's toolchain.

xbps-install -Sy cross-arm-linux-gnueabihf