BUILDER-C++(1)
π builder-c++ β the g++ wrapper that's lowkey carrying pentium optimizations
okay bestie, welcome to builder-c++(1) from the Debian GNU/Linux manual set π this is a lil wrapper script that sits in front of g++ and does the most when you need it to, and literally nothing when you don't. no cap.
β¨ NAME β¨
builder-c++ β a g++ wrapper whose whole job is to make pentium-optimizations easy π¦
πΈ SYNOPSIS πΈ
export DEBIAN_BUILDARCH=architecture
export DEBIAN_BUILDGCCVER=gcc-version
g++ ...
π DESCRIPTION π
so here's the tea β β the builder-c++ wrapper is normally used by just calling g++ like you always do. no drama, no extra steps, iykyk.
If the environment variable DEBIAN_BUILDARCH is not set, builder-c++ does nothing at all, and the real g++ gets invoked with the arguments you specified. it's giving "i'm just standing here, minding my business" π
But when DEBIAN_BUILDARCH is set, everything changes bestie. builder-c++ invokes g++ with the arguments you specified, plus:
-mcpu=DEBIAN_BUILDARCH -march=DEBIAN_BUILDARCH
which has the effect of telling g++ to use architecture-specific optimizations without changing the command line. iconic behavior honestly π
This is particularly useful for package builds. slay. π
Now for the second plot twist: if DEBIAN_BUILDGCCVER is not set, builder-c++ calls g++.real. If DEBIAN_BUILDGCCVER is set, builder-c++ calls g++-DEBIAN_BUILDGCCVER instead. choose your fighter β¨
π ENVIRONMENT π
DEBIAN_BUILDARCHβ if set, this is the architecture to compile for. the useful values arepentiumorpentiumproπDEBIAN_BUILDGCCVERβ if set, this is the version ofg++to be invoked. the useful values are3.0or2.95β
π NOTES π
The real g++ is renamed g++.real, and a diversion is registered with dpkg-divert(1). π«Ά
So builder-c++'s idea of the default g++ is dictated by whatever package installed /usr/bin/g++. like, whoever got there first is the main character, fr fr.
π¦ SEE ALSO π¦
mwah π this page came straight from the Debian Project, dated 2002-03-02, and it's been serving looks ever since. go build something cute, bestie πΈβ¨
π¦ where this page comes from
- debian bookworm: pentium-builder 0.21+nmu2
- ubuntu jammy: pentium-builder 0.21ubuntu1
- ubuntu noble: pentium-builder 0.21+nmu2ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms