GithubHelp home page GithubHelp logo

machinamentum / bingcc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sulix/bingcc

0.0 2.0 0.0 178 KB

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

Shell 11.34% C++ 88.66%

bingcc's Introduction

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.


bingcc's People

Contributors

sulix avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.