/etc/portage/make.conf

The (formerly ) file is used to customize the Portage environment on a global level. Settings here will apply to every package that is emerged; they control many elements of Portage functionality such as global USE flags, language (linguas) options, Portage mirrors, etc.

An example setup can be found at

Precedence
Portage configuration is not limited to, global settings defined in this file are refined on a per-package basis in the files, as well as the local environment.

may exist as or, however the latter is depreciated for the former. Therefore if settings exist in should be migrated to. Settings from precedence over those in.

Variables
There are many possible variables to customize in, but only the most commonly used are explained in detail within this article. For more information, and the full list of variables, consult the man page by running:

CHOST
This variable is passed through the configure step of ebuilds to set the build-host of the system. See the CHOST article. Note that the profile already should have defined the appropriate.

CFLAGS and CXXFLAGS
These flags are given when C or C++ packages are compiled to modify the behavior of the compiler. Not all packages will utilize these variables, as some programs require a specific set of compilation flags in order to compile correctly.

While setting proper  can increase the speed and stability of the system, absurd settings (e.g.  ) will more likely cripple the system rather than it blazing fast.

GENTOO_MIRRORS
This variable defines a list of Gentoo mirrors to check before downloading from the source defined in the ebuild. Properly chosen mirrors will generally be able to offer faster download speeds. Try using mirrorselect to find the fastest mirror server.

See also https://www.gentoo.org/downloads/mirrors/

MAKEOPTS
This variable is used to specify arguments passed to make when packages are built from source. Make can be told to run multiple jobs in parallel (a potentially substantial speed increase, depending on processor). This can be done either through  (short form:  ), which runs   (number) jobs at a time (without an argument,   will flood the processor with as many jobs as possible, and is not recommended). For example, to run three jobs:

Another option is  (short form  ), which will have make keep the load average of the system to , however many parallel tasks that ends up being or up to limit set by   if it is set as well.

PORTDIR
The  variable has been deprecated in favor of settings in repos.conf

PORTDIR_OVERLAY
This variable has been deprecated in favor of settings in repos.conf

To use overlays with layman versions <2.3.0, the following should be included in :

USE
The  variable allows the setting of a common set of USE flags for all packages. These are flags for a common set of package functionality desired (such as X11 or PulseAudio capability), or system capabilities.

Do not set package-specific USE flags here, those should be set instead in

For a list of the available global USE flags to be set in, see http://www.gentoo.org/dyn/use-index.xml and