CHOST

The CHOST variable tells the compiler which platform code should be built 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:

ValuesDescriptions
ARCHSpecifies the CPU architecture.
VENDORSpecifies the hardware platform or vendor.
OSSpecifies the operating system.
LIBCSpecifies the C library to use.

Only ARCH is strictly required in all cases, but it is good practice to specify all four fields (for Linux machines at least). 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
hppa / hppa1.1 / hppa2.0 / hppa64
i386 / i486 / i586 / i686
ia64
m68k
mips / mips64
powerpc / powerpc64
s390
sh / sh4 / sh64
sparc / sparc64
x86_64

gentoo

pc
softfloat
hardfloat
unknown

elf

gentoo-freebsd9.0
linux
uclinux

eabi

gnu
gnueabi
uclibc

See also

This article is issued from Gentoo. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.