bintuils ar.c multiple instances of ar on same library
Navin P
navinp0304@gmail.com
Sat Aug 10 10:44:44 GMT 2024
On Sat, Aug 10, 2024, 14:39 Alan Modra <amodra@gmail.com> wrote:
> On Sat, Aug 10, 2024 at 01:45:57PM +0530, Navin P wrote:
> > Hi,
> > I ran multiple instances of ar during a parallel build and they
> > were updating different object files using ar rv sometimes the same
> > object file again.
> >
> > When i run make -j1 i find all the object files libx.a but when i do
> > make -j8 i find some missing object files inside libx.a.
> >
> > Then i looked at ar.c and found that there is no synchronization
> > between 2 instances of ar on same library. Am i missing something?
> >
> > What tool can i use instead of ar for such scenarios?
>
> This is really a "make" question. See
> https://www.gnu.org/software/make/manual/html_node/Archive-Pitfalls.html
Thanks Alan. I can't update the makefile in the coming days because it is
generated and lot of bash scripts are used. Hence was thinking of a
solution based on ar . I just saw a libtool answer on stackoverflow but not
sure if it suffers from the same problem.
Any more ideas are welcome.
I'll try asking in the gnu make list for ideas.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://sourceware.org/pipermail/binutils/attachments/20240810/67edeae1/attachment.htm>
More information about the Binutils
mailing list