Path: utzoo!utgpu!watserv1!watmath!att!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!samsung!umich!terminator!pisa.ifs.umich.edu!rees From: rees@pisa.ifs.umich.edu (Jim Rees) Newsgroups: comp.sys.apollo Subject: Re: Inlib'ing on SR10.n Message-ID: <1990Sep9.184747@pisa.ifs.umich.edu> Date: 9 Sep 90 22:51:52 GMT References: <4cac30987.000bdbe@caen.engin.umich.edu> Sender: usenet@terminator.cc.umich.edu (usenet news) Reply-To: rees@citi.umich.edu (Jim Rees) Organization: University of Michigan IFS Project Lines: 19 In article <4cac30987.000bdbe@caen.engin.umich.edu>, conliffe@CAEN.ENGIN.UMICH.EDU (Darryl C. Conliffe) writes: Mark's explanation about 'pic' code is correct. The three commands that would handle your example are: cc -c hp_main.c cc -W0,-pic -c hp_foo.c ld -o hp hp_main.o -A inlib,hp_foo.o Better yet: cc -W0,-pic -c hp_foo.c cc -c -W0,-inlib,hp_foo.o hp_main.c ld -o hp hp_main.o -A inlib,hp_foo.o The linker will warn you when the extra '-W0,-inlib' in the compile step is necessary. Unfortunately, there's a bug in /bin/cc and it doesn't pass the '-A inlib' on to the compiler. That's why you have to use -W0 instead of -A in step two above.