Path: utzoo!attcan!uunet!mcsun!ukc!newcastle.ac.uk!sun.com!tomj From: tomj@sun.com (Tom Jacobs) Newsgroups: comp.windows.x Subject: Re: Shared XView libraries Message-ID: <8910130138.AA02000@snowking.sun.com> Date: 13 Oct 89 01:38:35 GMT Sender: xpert-request@nsfnet-relay.ac.uk Organization: Sun Microsystems, Mountain View Lines: 47 In-Reply-To: <8909271840.AA27756@garm.idt.unit.no> X-Mailer: mail-news 2.0.3 In article <8909271840.AA27756@garm.idt.unit.no> you write: |Hi, all. | |Since I've yet to see a build procedure for creating shared XView |libraries, I thought I'd take the time and create one myself. My setup |follows below, complete with Imakefile and all. It has only been tested on |Sun-3's running SunOS 4.0.1. Rumour has it that it's more difficult to |create the Sun-4 shared libraries. We'll include the SunPro Makefiles that we use to build shared libraries on SunOS when we next update expo. When we build shared XView we also run the libraries through /usr/ucb/xstr and order the object files in the library for added performance. We haven't encountered any shared libraries problems between machines. Let us know problems you are having... |I thought this might save someone some |time, and certainly some disk space. As distributed, all the sample and |test applications linked into approx. 900KB large files, whereas now: | |% size xvclock xcmdtool xtextedit |text data bss dec hex |49152 16384 0 65536 10000 /local/X11/xvclock |8192 8192 0 16384 4000 /local/X11/xcmdtool |16384 8192 0 24576 6000 /local/X11/xtextedit |% ls -l !!:* |-rwxr-xr-x 1 he 24576 Sep 27 16:50 xcmdtool* |-rwxr-xr-x 1 he 32768 Sep 27 16:51 xtextedit* |-rwxr-xr-x 1 he 73728 Sep 27 16:51 xvclock* | |Especially the 'one page code, one page data' is impressive for xcmdtool. | |Admittedly, this is also with a shared libX11: I merely did as a recent |poster here suggested: compile it with -pic and omit the .sa part of the |library. Seems to work ok. I didn't see the earlier posting on this, but you're correct to use the -pic and that's about it. When you use xstr it gets more complicated, but the SunPro makefiles we'll give you will handle the problems. When you create your .sa library (which is randon archive), you'll only want to include the *data.o XView object files (which are not compiled -pic). Again, we'll make the other makefiles available soon. Tom Jacobs [tomj@sun.com (...!sun!tomj)] Sun Microsystems, Inc Mountain View, CA 94043