On Mon, Oct 16, 2006 at 11:47:48AM +0200, ThMO via RT wrote:
> 
> What I would like to see is a single Makefile doing both in one go, which
> simplies things a lot, e.g. considering the openssl binary, the following
> procedure is needed:
> · make -f Makefile.shared
> · installing the stuff
> · make -f Makefile.static
> · cd apps
> · cp Makefile GNUmakefile
> · vi GNUmakefile [replacing the ../lib*.a with -l*]
> · make -C ..
> · rm GNUmakefile
> · installing lib*.a and openssl
> 
> 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 depending
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/libcrypto.so.0.9.8
-rw-r--r--   1 root root  252640 Oct  2 18:55 
/usr/lib/i686/cmov/libssl.so.0.9.8-rw-r--r--   1 root root 1319672 Oct  2 18:55 
/usr/lib/libcrypto.so.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/lib4758cca.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/libatalla.so
-rw-r--r--   1 root root   19592 Oct  2 18:55 /usr/lib/ssl/engines/libchil.so
-rw-r--r--   1 root root   17560 Oct  2 18:55 /usr/lib/ssl/engines/libcswift.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/libnuron.so
-rw-r--r--   1 root root   19312 Oct  2 18:55 
/usr/lib/ssl/engines/libsureware.so
-rw-r--r--   1 root root   15668 Oct  2 18:55 /usr/lib/ssl/engines/libubsec.so


Kurt

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to