Hi,
I wonder what is the right way to target an old glibc?
I have a machine which is up to date (glibc 2.32 and clang+lld 10.0.1).
So far I've been able to target older glibc by having a C file containing:
__asm__(".symver powf,powf@GLIBC_2.2.5");
__asm__(".symver expf,expf@GLIBC_2.2.5");
__asm__(".symver exp2f,exp2f@GLIBC_2.2.5");
__asm__(".symver log2f,log2f@GLIBC_2.2.5");
__asm__(".symver logf,logf@GLIBC_2.2.5");
__asm__(".symver log,log@GLIBC_2.2.5");
__asm__(".symver log2,log2@GLIBC_2.2.5");
__asm__(".symver exp,exp@GLIBC_2.2.5");
__asm__(".symver exp2,exp2@GLIBC_2.2.5");
__asm__(".symver pow,pow@GLIBC_2.2.5");
But after updating clang and re-creating the cmake build directory it
does not work anymore and I have dependencies toward glibc 2.29:
nm -D /home/abique/.u-he/Zebra2/Zebra2.64.so | grep GLIBC.*29
U exp@@GLIBC_2.29
U exp2@@GLIBC_2.29
U log@@GLIBC_2.29
U pow@@GLIBC_2.29
At first I thought that it was due to LTO, but even after disabling
LTO the problem still occurs.
How to solve it?
Is there a better approach to this problem?
Maybe lld never supported it, and now it is using lld to link instead
of the GNU linker?
Anyway, I'd like to solve this with the LLVM tools while full LTO is
enabled, which requires lld right?
Many thanks.
Regards,
Alexandre Bique