I need to write a small utility that will run on a BeagleBone Black with glibc 2.26 (I have glibc 2.28 on my dev machine). So I need to find both a toolchain cross-compiler and a way to avoid linking to latest glibc symbols. I could find a COPR repository for fedora with the toolchain.
To link with older symbols, I found the solution on [https://stackoverflow.com/a/61327520/6020072](https://stackoverflow.com/a/61327520/6020072). basically, I create a file symver.h with: __asm__(".symver fcntl,fcntl@GLIBC_2.4"); Run And I then build with: `nim c --cpu:arm --os:linux --passC:--include=symver.h` (`--include` ensures that the `.symver` directive comes very early in linking process) it was quite hard to come to this, so I wanted to share it. Also, for some reason, I had to clean up `~/.cache/nim` to get the build pass.