carta
diet(1)

diet1

Mangle gcc command line arguments

Usage

diet [-v] [-Os] [normal gcc command line]

Overview

diet is a small wrapper around gcc or clang. It will try to look at the command line you specify and try to mangle it so that gcc/clang will compile against the diet libc header files and link against the diet libc itself.

diet tries to be smart for cross compiling. If the first argument is not gcc but sparc-linux-gcc, diet will guess that you want to cross compile for sparc and use bin-sparc/dietlibc.a instead of the dietlibc.a for your default architecture. This does not work yet for clang.

The -v option will make diet print the modified gcc command line before executing it.

When passed the -Os option before the gcc argument, diet will mangle the gcc options to include the best known for-size optimization settings for the platform.

Files

~/.diet/compiler may contain compiler options as you would specify them on the command line, i.e. separated by spaces. Those will then be used instead of the built-in defaults for diet -Os.

History

  • Debian 13 (Trixie) to Debian 9 (Stretch): the text shown here
  • Debian 8 (Jessie) to Debian 7 (Wheezy)
  • Debian 6.0 (Squeeze) to Debian 3.1 (Sarge)
  • Debian 3.0 (Woody)

Author

Felix von Leitner <[email protected]>

From dietlibc-dev 0.34~cvs20160606-18 in Debian 13 (Trixie). Parsed by carta from the page's man source.