On Mon, Oct 16, 2006 at 11:47:48AM +0200, ThMO via RT wrote:
>=20
> What I would like to see is a single Makefile doing both in one go, whi=

ch
> simplies things a lot, e.g. considering the openssl binary, the followi=

ng
> procedure is needed:
> =B7 make -f Makefile.shared
> =B7 installing the stuff
> =B7 make -f Makefile.static
> =B7 cd apps
> =B7 cp Makefile GNUmakefile
> =B7 vi GNUmakefile [replacing the ../lib*.a with -l*]
> =B7 make -C ..
> =B7 rm GNUmakefile
> =B7 installing lib*.a and openssl
>=20
> The binary will be reduced in size with the above procedure from 300 kB
> down to 287 kB, since during the first run it will be compiled with
> -fPIC too...


In Debian on Linux / i386, we actually build the shared library 4
times with different optimizations. Once for i386, once for i486, 586,
686/cmov. The dynamic linker will then pick up the right version dependi=
ng
on the cpu you use. We do the same for alpha for ev4 and ev5,
and sparc for v8 and v9.

On i386 with 0.9.8c this results in the following shared objects:
-rw-r--r-- 1 root root 1209080 Oct 2 18:55 /usr/lib/i486/libcrypto.so.=
0.9.8
-rw-r--r-- 1 root root 241664 Oct 2 18:55 /usr/lib/i486/libssl.so.0.9=
..8
-rw-r--r-- 1 root root 1193080 Oct 2 18:55 /usr/lib/i586/libcrypto.so.=
0.9.8
-rw-r--r-- 1 root root 236736 Oct 2 18:55 /usr/lib/i586/libssl.so.0.9=
..8
-rw-r--r-- 1 root root 1270520 Oct 2 18:55 /usr/lib/i686/cmov/libcrypt=
o.so.0.9.8
-rw-r--r-- 1 root root 252640 Oct 2 18:55 /usr/lib/i686/cmov/libssl.s=
o.0.9.8-rw-r--r-- 1 root root 1319672 Oct 2 18:55 /usr/lib/libcrypto.s=
o.0.9.8
-rw-r--r-- 1 root root 252864 Oct 2 18:55 /usr/lib/libssl.so.0.9.8

static:
-rw-r--r-- 1 root root 2217720 Oct 2 18:55 /usr/lib/libcrypto.a
-rw-r--r-- 1 root root 359702 Oct 2 18:55 /usr/lib/libssl.a

And some engines:
-rw-r--r-- 1 root root 14704 Oct 2 18:55 /usr/lib/ssl/engines/lib475=
8cca.so-rw-r--r-- 1 root root 14596 Oct 2 18:55 /usr/lib/ssl/engines=
/libaep.so
-rw-r--r-- 1 root root 11312 Oct 2 18:55 /usr/lib/ssl/engines/libata=
lla.so
-rw-r--r-- 1 root root 19592 Oct 2 18:55 /usr/lib/ssl/engines/libchi=
l.so
-rw-r--r-- 1 root root 17560 Oct 2 18:55 /usr/lib/ssl/engines/libcsw=
ift.so
-rw-r--r-- 1 root root 2856 Oct 2 18:55 /usr/lib/ssl/engines/libgmp=
..so
-rw-r--r-- 1 root root 9404 Oct 2 18:55 /usr/lib/ssl/engines/libnur=
on.so
-rw-r--r-- 1 root root 19312 Oct 2 18:55 /usr/lib/ssl/engines/libsur=
eware.so
-rw-r--r-- 1 root root 15668 Oct 2 18:55 /usr/lib/ssl/engines/libubs=
ec.so


Kurt

__________________________________________________ ____________________
OpenSSL Project http://www.openssl.org
Development Mailing List openssl-dev@openssl.org
Automated List Manager majordomo@openssl.org