Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> nor is there a simple way to target an older Glibc version without spinning up a docker container

? I feel like you might be falling into the trap of assuming that the compiler always targets the current running system, but you 100% should always always always be doing a Linux-to-Linux "cross" compile with a sysroot... you don't need a docker container: you just extract an old Linux distribution into a folder and tell your current/modern compiler to target it.



> you just extract an old Linux distribution into a folder and tell your current/modern compiler to target it

That sounds like more work than spinning up a Docker container though. I'm imagining

    gcc --glibc-target=2.31


Spinning up a Docker container the way I'm kind of assuming you are talking about is going to involve running the compiler in there, which is super annoying -- and extremely limited, as you often are going to get stuck with old versions of all of your toolchain components as well -- and certainly way more difficult than just extracting the distribution to disk and using gcc --sysroot=/path/to/glibc-2.31.


How?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: