Default rules for make

John Plocher plocher at sally.Sun.COM
Thu Nov 16 17:51:43 AEST 1989


+-- In <1989Nov10.191703.8167 at twwells.com> bill at twwells.com (T. William Wells) writes
| Oh, another thing: you can't use the shared libraries if you link
| with gcc, you have to use cc instead. This leads to my make files
+----

There was a "fix" for this - it involved the fact that crt0.o is used by ghc
and crt0.o is for static libraries.  You need to use crt1.o *.o *.a crtn.o
(i.e., crt1.o is the first thing linked, and crtn.o is the last).  These 
startup files include the initialization support for shared libraries.

In other words, a standard static link order is
	crt0.o foo.o libc.a
and the equivalent shared library link order is
	crt1.o foo.o libc_s.a crtn.o

   -John Plocher

PS, it doesn't hurt to use crt1.o ... crtn.o with static libraries so
it can safely be made the default.



More information about the Comp.unix.microport mailing list