Hi Michael, On Mon, 2025-01-13 at 23:56 +0000, Michael Pratt wrote: > The ar program is called to assemble a list of objects > within each archive to assist in building combined libraries, > however make already has this information > when processing the subdirectory for that respective library. > The list can be saved in a "manifest" file > instead of being generated whenever it is needed > for use with other subdirectories. > > Even though the difference in time is insignificant, > a simple "echo" and "cat" is as much as 10 times faster > than a call to "ar t" for printing the archive members. > > Since elfutils builds ar, > this also removes the awkward circular dependency > where an installation of ar is required > to build the libraries for ar. > > Additionally, not every version of ar is equally portable, > as native versions of ar on macOS and other BSD-like distributions > may print out a special archive member like "__.SYMDEF" > which is not a compiled object but rather just metadata > from ranlib, leading to a build failure. > > Avoid these limitations by removing usage of ar > and adding build and clean rules > for the usage of archive manifest files.
Even though I wasn't even aware of these limitations (I don't think anybody ever reported running into them), I really like this change. And the implementation is also very clean. > * .gitignore: exclude ".manifest" file extension. > * backends/Makefile.am: add manifest file build and clean rules. > * debuginfod/Makefile.am: Likewise. > * lib/Makefile.am: Likewise. > * libasm/Makefile.am: Likewise. > * libcpu/Makefile.am: Likewise. > * libdw/Makefile.am: Likewise, > and set object lists to manifest contents. > * libdwelf/Makefile.am: Likewise. > * libdwfl/Makefile.am: Likewise. > * libebl/Makefile.am: Likewise. > * libelf/Makefile.am: Likewise, > and set object lists to manifest contents. > * src/Makefile.am: Likewise. Pushed as is. Thanks, Mark