This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: archive of archives
- From: NightStrike <nightstrike at gmail dot com>
- To: Cary Coutant <ccoutant at google dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Tue, 30 Apr 2013 09:46:31 -0400
- Subject: Re: archive of archives
- References: <CAF1jjLtCm9Nuua4hytxsvgE1tSnypLUan=R1L6o0BCNjSd437g at mail dot gmail dot com> <CAHACq4qM+2ZziXdncX-VZibHmJ6NArR0fg9yAFy=jFQTN1Z8uw at mail dot gmail dot com> <CAF1jjLv3-9-tvQh0z-=FzjfGFVm4HywFT3DKm19qGA1ZUfWUXQ at mail dot gmail dot com>
On Mon, Apr 15, 2013 at 12:03 PM, NightStrike <nightstrike@gmail.com> wrote:
> On Mon, Apr 15, 2013 at 11:50 AM, Cary Coutant <ccoutant@google.com> wrote:
>>> $ x86_64-w64-mingw32-ar cru liba.a libb.a
>>> $ x86_64-w64-mingw32-ranlib liba.a
>>>
>>> The resulting liba.a doesn't work too well:
>>>
>>> $ x86_64-w64-mingw32-nm liba.a
>>> x86_64-w64-mingw32-nm: liba.a: File format not recognized
>>>
>>> ..and other failures.
>>>
>>> Should the above work, though? Alan just kindly fixed a bug that let
>>> objdump correctly tell me what's inside liba.a, so presumably it's a
>>> supported thing to do. Am I out in left field, though?
>>
>> No, it's not supposed to work. You can only nest archives with the thin
>> archive option (T). Otherwise, you're just building an archive of ordinary
>> files, not a library.
>
> Darn. Ok, thanks for the quick reply.
Cary,
Could you take a look at this:
http://mingw-w64.svn.sourceforge.net/viewvc/mingw-w64/trunk/mingw-w64-crt/Makefile.am?view=markup
Line 1057
We use an MRI linker script to combine 3 libX.a files into a single
libZ.a file. It seems to work. Based on what you are saying, are we
doing something that will not be supported in the future? Can you
explain why this method works, yet what I describe at the beginning of
this thread does not work?
The MRI script is here:
http://mingw-w64.svn.sourceforge.net/viewvc/mingw-w64/trunk/mingw-w64-crt/lib64/vfw32.mri?view=markup
And is short:
CREATE lib64/libvfw32.a
ADDLIB lib64/libmsvfw32.a
ADDLIB lib64/libavicap32.a
ADDLIB lib64/libavifil32.a
SAVE
END
Can you shed some light on this?