[klibc] can I create lib.a from dir/lib.a?

H. Peter Anvin hpa at zytor.com
Sun Jul 9 15:14:04 PDT 2006

Sam Ravnborg wrote:
> On Sun, Jul 09, 2006 at 07:27:12PM +0200, Luc Van Oostenryck wrote:
>> It can be done with "MRI scripts" (described in ar.info).
>> Something like the following should do the job:
>> ar -M << EOF
>> CREATE lib.a
>> ADDLIB dir/lib.a
>> ADDLIB dir2/lib.a
>> EOF
> Thanks. But info ar said this was some backward compatibility cruft
> so I decided to create a file for each directory that lists the .o files
> then it is quite simple to use ar.

Another alternative would be to create a wrapper script for ar which 
would detect an archive, unpack it, and include the unpacked files. 
Hacky, though.


More information about the klibc mailing list