I need to distribute a binary that will run on as many x86 Linux distributions as possible. That means that I have to statically link some libraries, like glibc, because the
Try passing in the paths to the library files you're linking against on the linker command line (be they .a or .so libraries) and drop -static. That should do the trick.