How to build math libraries of glibc package?
Asked Answered
G

1

1

I already know how to build the new version of Glibc (e.g. 2.3) beside the older version (e.g. 2.19). I followed the instructions in https://www.tldp.org/HOWTO/html_single/Glibc-Install-HOWTO/

But rather compiling whole libraries in Glibc, I only want to build math libraries (libm.so).

How can I only recompile libm.so in ubuntu?

The second question is that possible to recompile that specific part (maths) in glibc using the clang compiler? I found that I cannot recompile the whole Glibc using clang because of standards compliance and etc.

Gambrinus answered 20/11, 2019 at 22:50 Comment(0)
I
0

libm depends on internals in the dynamic loader and libc, for example for IFUNC resolvers. You cannot simply take libm from a newer version and use install it on a system with an older glibc version. A while back, a few patches were proposed to optionally enables this:

Even with those patches, it was still necessary to build glibc with --disable-multi-arch, incurring a significant performance loss for some math functions.

Internalize answered 21/11, 2019 at 7:27 Comment(1)
Thanks for your answer.Gambrinus

© 2022 - 2024 — McMap. All rights reserved.