lambdaclass / concrete

Concrete is a simple programming language specifically crafted for creating highly scalable systems that are reliable, efficient, and easy to maintain.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make linker more consistent across systems

edg-l opened this issue · comments

On linux use ld.so --list-diagnostics and parse the results to find the system dirs to pass to the linker. The output looks like this on my gentoo:

...
path.prefix="/usr"
path.rtld="/lib64/ld-linux-x86-64.so.2"
path.sysconfdir="/etc"
path.system_dirs[0x0]="/lib64/"
path.system_dirs[0x1]="/usr/lib64/"
version.release="stable"
version.version="2.38"
...

and like this on debian

...
path.prefix="/usr"
path.rtld="/lib64/ld-linux-x86-64.so.2"
path.sysconfdir="/etc"
path.system_dirs[0x0]="/lib/x86_64-linux-gnu/"
path.system_dirs[0x1]="/usr/lib/x86_64-linux-gnu/"
path.system_dirs[0x2]="/lib/"
path.system_dirs[0x3]="/usr/lib/"
version.release="stable"
version.version="2.36"
...