Path: utzoo!utgpu!watmath!att!rutgers!ucsd!usc!apple!sun-barr!newstop!sun!sally!plocher From: plocher@sally.Sun.COM (John Plocher) Newsgroups: comp.unix.microport Subject: Re: Default rules for make Message-ID: <127968@sun.Eng.Sun.COM> Date: 16 Nov 89 06:51:43 GMT References: <1989Nov8.033800.5104@monymsys.uucp> <1989Nov10.191703.8167@twwells.com> Sender: news@sun.Eng.Sun.COM Reply-To: plocher@sun.UUCP (John Plocher) Organization: Sun Microsystems, Mountain View Lines: 19 +-- In <1989Nov10.191703.8167@twwells.com> bill@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.