Old glibc LDFLAGS: pass sysroot only to the linker
In order to link against an old version of the glibc, we have to pass a set of flags, some at compile time (CFLAGS), some at link-time (LDFLAGS). At compile-time, we set the sysroot to root/link-only, in order to have the compiler look there first for header. At link-time, we manually specify `-Lroot/link-only/lib` and reset sysroot to /. However, this often creates issues at configure-time, since in this situation CFLAGS and LDFLAGS are often use at the same time, leading to usage of / as sysroot. This commit fixes the problem by ensuring that the `--sysroot` flag in LDFLAGS will be available only to the link, by simply adding `-Wl,`.
Please register or sign in to comment