Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README

bingcc is a wrapper around gcc and mjau's gensymoverride for generating binaries
which do not depend on newer glibc versions. It's got a pretty basic website at
http://davidgow.net/hacks/bingcc.html

It doesn't touch libstdc++ at all, just libc, so while it should fix most of the
GLIBC errors, it won't do a thing about the GLIBCXX ones. Try statically linking
libstdc++ or using an old compiler (before gcc 4.6; you're probably pretty safe
if you don't use many fancy STL features).

Be warned: there a several cases where using bingcc will simply stop your
program from compiling. Basically, if you try to use too new a feature, it'll
give up. You can get around this sort of thing by running setup-bingcc with a
higher glibc version, or by somehow finding a compiler switch to disable the
missing functionality. bingcc will add some of these flags automatically.

Hopefully this will help make the world just a little more compatible. If it's
not working (it's really just a bit of an experiment), let me know. Using an
older toolchain (or indeed an older distro in a VM) will probably be a bit more
reliable.

It's all in the public domain (or Creative Commons Zero) except for
gensymoverride, which isn't mine to license. Have fun with it, and let me know
if you make any improvements. The "32" versions of things simply add "-m32" to
the cflags for cross-compiling.

You'll probably need to hack some of the paths in the various files in order
to get it to work on anything other than the latest amd64 ubuntu release.

You also might need to add CFLAGS=-fno-finite-math-only to your environment to
counteract the use of -ffast-math.

Usage:

[optional]: run ./setup-bingcc [max glibc version]
 - This scans your system libraries and generates the header using mjau's
   gensymoverride. Max glibc version defaults to 2.3.6.

run bingcc-env:
 - This launces a bash shell which will have bingcc set up: it sets the CC and
   CXX environment variables to point to bingcc/bing++. ./configure (or
   cmake) and build within this shell.

check to see if it worked:
 - use objdump -p <binary> to have a look at what's required
 - objdump -CT <binary> | grep <version> to see what symbols are causing
   problems.

Notes:

There's some commented out code for stdc++ stuff, which might work pre gcc4.6,
but I've not had much luck yet myself.

There's a script to download and compile the Simple Directmedia Layer (v1.2) in
the examples/ directory. Have a look if that's your thing. There's also one to
build libogg/libvorbis and friends.


About

A wrapper around gcc for creating binaries without dependencies on newer glibc versions

Resources

Releases

No releases published

Packages

No packages published