libaltm.a -- libm.so Replacement for OpenServer 5.04

Here it is... libaltm.a is a regular ar library containing -fPIC (Position Independent Code) versions of libm.a source files. It was compiled with gcc 2.95.2 for SCO OpenServer 5.04. I needed this to get Python 2.1.2 to build, and when I went looking I found many other poor suckers in the same boat.

I built a libm.so file the same way I have successfully built shared libs on Linux systems, but it just doesn't work. So then I got this harebrained idea, and it does work.

This was taken from glibc-1.09.tar.gz off my old Linux Secrets CD. I coerced it into building as a static library, then in the math subdirectory I changed the Makefile to add:

CFLAGS += -fPIC

Then I did

make clean
make
ar cruv libaltm.a *.o
ranlib libaltm.a

I tried to build a libm.so like this:

gcc -shared -o libm.so *.o

but when I link against it I get errors running the resulting binaries.

 


Installation:

You need to put libaltm.a in the /usr/local/lib folder. Change -lm to -laltm in the CFLAGS or on the gcc command line to get programs to link with it.

So far it seems to work...


THIS BINARY IS OFFERED "AS IS," WITHOUT WARRANTY, AND IS OFFERED UNDER THE TERMS OF THE GPL. ORIGINAL SOURCE IS AVAILABLE FROM:

ftp://ftp.gnu.org/gnu/glibc/

Comments