[comp.unix.ultrix] compiling the Andrew Toolkit on a DecStation

alex@umbc3.UMBC.EDU (Alex S. Crain) (02/27/90)

	I'm trying to build the Andrew Toolkit on a DecStation and I'm
haveing some trouble. The Andrew Toolkit (An X toolkit from CMU) is
based on dynamic loading. One of the restriction of dynamic loading is
that the loaded objects are not able to use the GP register because 
the linking is done incrementally, some of it after the executable is
created. This means that any libraries used to create linked objects
must not use the gp register.

	The usual solution to this problem is to have two sets of libraries,
one compiled -G 8 (Or a suitable default) and another -G 0 (No global pointer
data), the latter having a _G0 suffix to the name. On our 5400, for example,
there is a library /usr/lib/libm_G0.a in addition to the normal libm.a.

	Unfortunately, the _G0 suffix is misleading in this case, because
lib_G0.a is a symlink to libm.a which is *not* compiled -G 0 (why?), and in
any case, there is no libc_G0.a or crt0_G0.o to complete the set.

	Having source, I can (and have) generated libc_G0.a and libm_G0.a,
but it seems that source for crt0.o was not supplied. I could dissassemble
crt0.o and rebuild it (It's pretty small) but that is probably illegal
and certainly an pain. It is possible that DEC (or Mips?) could provide
these animals to ultrix sites? This problem has cropped up on the andrew
mailing list several times so it is likely that it would be useful to others
as well.

	ThanX in advance.




-- 
#################################		:alex.
#Disclamer: Anyone who agrees   #    University of Maryland Baltimore County
#with me deserves what they get.#	alex@umbc3.umbc.edu
#################################