Gnu make option to fix parallel multiple ar on a shared archive

2024-08-10 Thread Navin P
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 looke

Re: Gnu make option to fix parallel multiple ar on a shared archive

2024-08-10 Thread Dmitry Goncharov
On Sat, Aug 10, 2024 at 8:51 AM Navin P wrote: >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. https://www.gnu.org/software/make/manual/make.html#Archive-Pitfalls regards, Dmitry

Re: Gnu make option to fix parallel multiple ar on a shared archive

2024-08-10 Thread Kaz Kylheku
Your makefile is broken, or at least not suitable for parallel builds. You should add .NOTPARALLEL: to it. That's the minimal change that will fix it. A makefile with the .NOTPARALLEL: target will not be parallelized even if -j is requested on the command line or via the environment. Why it's b

Re: Gnu make option to fix parallel multiple ar on a shared archive

2024-08-10 Thread Navin P
On Sun, Aug 11, 2024, 06:29 Kaz Kylheku wrote: > Your makefile is broken, or at least not suitable for parallel builds. > > You should add .NOTPARALLEL: to it. That's the minimal change that will > fix it. A makefile with the .NOTPARALLEL: target will not be parallelized > even if -j is requested

Re: Gnu make option to fix parallel multiple ar on a shared archive

2024-08-10 Thread Philip Guenther
On Sat, Aug 10, 2024 at 8:16 PM Navin P wrote: > > On Sun, Aug 11, 2024, 06:29 Kaz Kylheku wrote: > > > Your makefile is broken, or at least not suitable for parallel builds. > > > > You should add .NOTPARALLEL: to it. That's the minimal change that will > > fix it. A makefile with the .NOTPARALL