This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.
Please visit our production wiki at https://wiki.gentoo.org
CHOST
The CHOST variable tells the compiler which platform code should be build for. Unlike the CFLAGS variable, which is used for the optimizations, the CHOST variable is fixed and cannot be changed easily.
The profile provides the default CHOST values, but it can be changed in the /etc/portage/make.conf file.
The variable is a dash-separated tuple in the form of ARCH-VENDOR-OS-LIBC:
Values | Descriptions |
---|---|
ARCH | Specifies the CPU architecture. |
VENDOR | Specifies the hardware platform or vendor. |
OS | Specifies the operating system. |
LIBC | Specifies the C library to use. |
Only ARCH is strictly required in all cases, but - for Linux machines at least - it is good practice to specify all four fields. The LIBC field is not supported for Gentoo/FreeBSD, so for these machines it must always be omitted.
The following table lists some field values known to work:
Architecture | Vendor | Operating System | C Library |
---|---|---|---|
required | optional | optional | optional |
alpha arm / armv4 / armv4t / armv5te / armv6j / armv7a |
gentoo pc |
elf gentoo-freebsd9.0 |
eabi gnu |