crosstool-NG(1) User Commands crosstool-NG(1)

# [NAME](#NAME)

ct-ng, crosstool-NG - Build cross-toolchains

# [SYNOPSIS](#SYNOPSIS)

**ct-ng ACTION**

# [DESCRIPTION](#DESCRIPTION)

Building a cross-toolchain can be a real pain.

**crosstool-NG** makes it easy to build cross-toolchains, and allows you to take all the juice out of your target by configuring the different components of the toolchain according to the targeted processor.

# [ACTIONS](#ACTIONS)

Here are the most commonly used actions. For other actions, please see the documentation in */usr/share/doc/crosstool-ng*

[**help**](#help)

Prints a little help text.

[**menuconfig**](#menuconfig)

Configures **crosstool-NG** using a configurator menu very similar to that of the Linux kernel.

[**oldconfig**](#oldconfig)

Apply options found in an existing *.config* file, and ask for newer options if there are any.

[**saveconfig**](#saveconfig)

Save the current **crosstool-NG** configuration, and associated components' config files, into a sample. Samples are saved in their own sub-directory, named after the target's tuple, in the *samples* sub-directory of the current directory. Samples can be later recalled by calling **ct-ng** with the target tuple they represent.

[**savedefconfig**](#savedefconfig)

Save the current configuration to a mini-defconfig file, that contains only the strictly required symbols to reproduce the configuration. defconfig files are much smaller than a complete .config, so it is easy to send by mail. As only non-default symbols are present in a defconfig, it easy to spot the meaningful values. Also, it is easy to use defconfig files with newer versions of **crosstool-NG**. By default the mini-defconfig is saved to a file named *defconfig*, unless the variable **$DEFCONFIG** is set, in which case the mini-defconfig will be saved to the file referenced by **$DEFCONFIG**.

Note: only the *.config* file for **crosstool-NG** is saved. Config files for the components are **not** saved. Use **saveconfig** for that

[**defconfig**](#defconfig)

Configure **crosstool-NG** using a mini-defconfig file (previously saved with **savedefconfig** or manually edited). The default mini-defconfig is read from the file *defconfig*, unless the variable **$DEFCONFIG** is set, in which case the mini-defconfig will be read from the file referenced by **$DEFCONFIG**

[**build**](#build)

Builds the configured toolchain.

[**clean**](#clean)

Remove files generated by **crosstool-NG** for itself (these are mostly the configurators' binaries).

[**distclean**](#distclean)

Same as **clean** , but also removes the toolchain build directory, the downloaded files and the *.config* configuration file. The generated toolchain is left untouched, as well as samples which are not removed.

[**updatetools**](#updatetools)

Updates the *config.guess* and *config.sub* scripts. These scripts are used by **crosstool-NG** to canonicalise the machines' name (host, build and target machines).

# [ENVIRONMENT](#ENVIRONMENT)

[**STOP, RESTART**](#STOP,)

Respectively stops and restarts the build just before this step. To restart a step, a previous build should have run at least to that step, or further.

The list of steps is viewable with the action **list-steps**.

Note that if the **Keep only the last-saved step's state** option is enabled, only the most recently saved step is retained, so the build can only be restarted from that step.

# [EXIT VALUE](#EXIT_VALUE)

The **ct-ng** frontend is in fact a [**make**(1)](/man/os/crosstool-ng/make.1) script. See the man page for [**make**(1)](/man/os/crosstool-ng/make.1) to have the meaning of the exit values.

# [SECURITY](#SECURITY)

**Don't run as root!** Great care has been taken to avoid mistakes, but bug-free programs don't exist. During normal operation, **crosstool-NG** removes entire directories. If you run as root, and there is a bug or you mis-configured **crosstool-NG**, entire important directories could be removed (eg. */usr*), although **crosstool-NG** will refuse to install toolchains in some well known critical directories.

# [AUTHORS](#AUTHORS)

Yann E. MORIN and a lot of contributors.

# [SEE ALSO](#SEE_ALSO)

You can find more in-depth documentation in */usr/share/doc/crosstool-ng*.

Please have a look at the

Thu Sep 10 18:07:54 2026 version 1.29.0

---

Document: ct-ng(1) from crosstool-ng 1.29.0-r2 (Chainguard OS)
Source: https://github.com/crosstool-ng/crosstool-ng
