Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!usc!apple!netcom!hue From: hue@netcom.UUCP (Jonathan Hue) Newsgroups: comp.unix.aix Subject: Re: ar, lorder & tsort Keywords: ranlib ld ar lorder tsort Message-ID: <9795@netcom.UUCP> Date: 23 Mar 90 05:14:47 GMT References: <2394@csm9a.UUCP> <4500@ibmpa.UUCP> Distribution: usa Organization: NetCom- The Bay Area's Public Access Unix System {408 249-0290 guest} Lines: 16 In article <4500@ibmpa.UUCP> jsalter@slo.UUCP (James Salter) writes: > ar qv `lorder | tsort` > >It should be relatively simple to create a shell script which would take >an existing archive and make sure it's in the correct order using lorder >and tsort, also. What's "correct order"? I'm using AIX 1.1 and ld seems to be able to link fine from an archive full of .o's with cyclic dependencies. Too bad the shared library generator thinks ld can't handle cyclic dependencies. It's useless for all but the most trivial shared libraries. The workaround I'm using is to write a phony tsort program that forces the X******.o file to the end of the file name list. Works fine for me. -Jonathan