BUILDER-C++(1)

πŸ“¦ version 0.21ubuntu1, in debian bookworm, ubuntu jammy, ubuntu noble

πŸ’… 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 are pentium or pentiumpro πŸ’œ
  • DEBIAN_BUILDGCCVER β€” if set, this is the version of g++ to be invoked. the 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). 🫢

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 πŸ¦‹

g++(1)


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