bingcc — A symbol-version wrapper for gcc and glibc

bingcc is a very early, quite terrible program for limiting glibc symbol version dependencies when compiling things with modern versions of gcc. It's just a basic wraper around gcc and mjau's gensymoverride script, and was inspired by the late apgcc.

Basically, it's purpose is to get rid of these annoying messages:

/lib/x86_64-linux-gnu/libc.so.6: version 'GLIBC_2.15' not found

It's on GitHub, which is a first for me, so hopefully people can actually download it. I'll accept any (useful) patches either through "Pull Requests" or by email.

bingcc doesn't touch libstdc++ at all, just libc, so while it's great for simple C programs, it's not quite ideal for big C++ monstrosities; that's what cross-compilers and build machines running old distros are for. Bundling or statically linking libstdc++ is another nice trick to have up one's sleeve.

To use bingcc, you basically just have to run bingcc or bing++ instead of gcc or g++. If the program you're building has a build system that respects the CC and CXX environment variables, then you can get a shell with those set using bingcc-env. There are also bingcc32 scripts: these are just the same as their normal counterparts, but add a -m32 flag to the compiler's name in order to make cross-compiling things slightly less painful on multilib systems.

In order to support glibc 2.33 and newer, a wrapper object is also generated, which contains implementations for some functions which were migrated to the symbol versioning system in 2.33. See more details here. If you're using an older version of glibc than 2.33, you may need to either run the setup-bingcc script, or use the older version in the pre-glibc233 tag.

There are some other, similar projects out there. See also:

bingcc is mentioned, somewhat horrifyingly, in the Conan and AppImage documentation.

Let me know if you find any bugs, or if you know of a drastically better way of doing this. It's still a pretty quick hack, and is in no way polished enough to show off, but hopefully it'll save someone who's using a distro that's five years old some trouble.