how to link with old versions of glibc?

Florian Weimer fweimer@redhat.com
Wed May 20 14:50:58 GMT 2020


* Paul Zimmermann:

>        Dear Florian,
>
> thank you for your answer. In fact any solution that works (statically or
> dynamically) is fine for my application.

See the instructions here:

  <https://sourceware.org/glibc/wiki/Testing/Builds#Compile_against_glibc_build_tree>

I'm not sure if this actually works, I would have expected some -L
arguments as well, so maybe this:

gcc \
  -Wl,-rpath=${GLIBC}:\
${GLIBC}/math:\
${GLIBC}/elf:\
${GLIBC}/dlfcn:\
${GLIBC}/nss:\
${GLIBC}/nis:\
${GLIBC}/rt:\
${GLIBC}/resolv:\
${GLIBC}/crypt:\
${GLIBC}/nptl:\
${GLIBC}/dfp \
-L ${GLIBC} \
-L ${GLIBC}/math \
-L ${GLIBC}/elf \
-L ${GLIBC}/dlfcn \
-L ${GLIBC}/nss \
-L ${GLIBC}/nis \
-L ${GLIBC}/rt \
-L ${GLIBC}/resolv \
-L ${GLIBC}/crypt \
-L ${GLIBC}/nptl \
-L ${GLIBC}/dfp \
  -Wl,--dynamic-linker=${GLIBC}/elf/ld.so \
  …

Does this help?

Thanks,
Florian



More information about the Libc-help mailing list