---
name: "builder-c++"
section: "1"
platform: "linux"
package: "pentium-builder"
version: "0.21+nmu2"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/builder-c++"
---

# builder-c++(1)

g++ wrapper to facilitate pentium-optimizations

## NAME

builder-c++ - g++ wrapper to facilitate pentium-optimizations

## SYNOPSIS

**export DEBIAN\_BUILDARCH=***architecture*\
 **export DEBIAN\_BUILDGCCVER=***gcc-version*\
 **g++** *...*

## DESCRIPTION

The **builder-c++** wrapper is normally used by calling **g++** as usual. If the environment variable **DEBIAN\_BUILDARCH** is not set, **builder-c++** does nothing, and the real **g++** is invoked with the specified arguments.

When the **DEBIAN\_BUILDARCH** environment variable is set, **builder-c++** invokes **g++** with the specified arguments, plus *-mcpu=***DEBIAN\_BUILDARCH** *-march=***DEBIAN\_BUILDARCH** This has the effect of telling **g++** to use architecture-specific optimizations without changing the command line. This is particularly useful for package builds.

If **DEBIAN\_BUILDGCCVER** is not set, **builder-c++** calls  **g++.real**. If **DEBIAN\_BUILDGCCVER** is set, **builder-c++** calls **g++-DEBIAN\_BUILDGCCVER** instead.

## ENVIRONMENT

- DEBIAN\_BUILDARCH

  If set, the architecture to compile for. Useful values are **pentium** or **pentiumpro**.

- DEBIAN\_BUILDGCCVER

  If set, the version of g++ to be invoked. Useful values are **3.0** or  **2.95**.

## NOTES

The real **g++** is renamed **g++.real**, and a diversion is registered with [**dpkg-divert**(1)](/dpkg-divert/1.md). Thus **builder-c++**'s idea of the default **g++** is dictated by whatever package installed */usr/bin/g++*.

## SEE ALSO

[**g++**(1)](/g++/1.md)
