upvote
Luckily Zig makes this quite easy to do. In Mach[0] we are able to just `zig build -Dtarget=x86_64-linux-gnu.2.28` to build GUI apps against an ~8 year old glibc version for maximum compatibility.

This is possible because Zig allows for targeting most glibc versions out of the box with its cross-compilation support.

[0] https://machengine.org

reply
It's a pretty poor solution, to be honest.

1) Why should I limit myself to the available APIs?

2) Not just glibc. For example, if I build against the latest libstdc++, it will automatically support the more recent glibc. And pinning the old libstdc++ -well, that's just not a good idea.

reply