Hi! 1. Did you strip it? # ls -l /usr/local/bin/opensm -rwxr-xr-x 1 root root 2124734 Nov 15 10:07 /usr/local/bin/opensm # strip /usr/local/bin/opensm # ls -l /usr/local/bin/opensm -rwxr-xr-x 1 root root 333024 Nov 15 10:22 /usr/local/bin/opensm
2. Compile with -Os: edit Makefile in /usr/src/openib/trunk/src/userspace/management/osm/opensm, replace -O2 with -Os. # ls -l /usr/local/bin/opensm -rwxr-xr-x 1 root root 2119341 Nov 15 10:23 /usr/local/bin/opensm # ls -l /usr/local/bin/opensm -rwxr-xr-x 1 root root 316608 Nov 15 10:24 /usr/local/bin/opensm 3. Do you bzip with -9? # bzip2 -9 /usr/local/bin/opensm # ls -l /usr/local/bin/opensm.bz2 -rwxr-xr-x 1 root root 115566 Nov 15 10:24 /usr/local/bin/opensm.bz2 Thats on x86_64. 4. Go 32 bit (needs 32 bit libraries, so its a bit trickier). you need to add -m32 to cflags and ldflags to all management libraries. But this is sure to cut the size down even more. Hope this helps, MST Quoting yipee <[EMAIL PROTECTED]>: > Subject: Re: OpenSM size > > Hal Rosenstock <halr <at> voltaire.com> writes: > > > How small does it need to be ? What processor architecture ? > > The processor I'm using is a x86_64, but I guess I can compile OpenSM > for x86 > (32bits). > The binary size I'm seeing is about 2MB. After bzip'ing it shrinks to > 670KB. If > I could reduce it to 200KB or smaller it would be much better, but even > taking > off 20% would be good. > > Thanks > > > > > _______________________________________________ > openib-general mailing list > [email protected] > http://openib.org/mailman/listinfo/openib-general > > To unsubscribe, please visit > http://openib.org/mailman/listinfo/openib-general > -- MST _______________________________________________ openib-general mailing list [email protected] http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
