summaryrefslogtreecommitdiffstats
path: root/debuginfod
diff options
context:
space:
mode:
authorMichael Pratt <[email protected]>2025-01-13 23:56:38 +0000
committerMark Wielaard <[email protected]>2025-01-21 18:57:34 +0100
commit4eff110a60cb9c7b77884c61f5925fe844c52acb (patch)
tree4538147d63a33160f36fe49f975577e300c82639 /debuginfod
parent412ffac6e5a789d200677a84e7fe4b0e1e897e95 (diff)
Replace usage of ar with stored library manifest files
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. * .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. Signed-off-by: Michael Pratt <[email protected]>
Diffstat (limited to 'debuginfod')
-rw-r--r--debuginfod/Makefile.am7
1 files changed, 6 insertions, 1 deletions
diff --git a/debuginfod/Makefile.am b/debuginfod/Makefile.am
index 45b5339f..4727e5fa 100644
--- a/debuginfod/Makefile.am
+++ b/debuginfod/Makefile.am
@@ -126,8 +126,13 @@ endif
EXTRA_DIST = libdebuginfod.map
+EXTRA_libdebuginfod_a_DEPENDENCIES = libdebuginfod.manifest
+
+libdebuginfod.manifest: $(libdebuginfod_a_OBJECTS)
+ $(AM_V_GEN)echo $^ > $@
+
MOSTLYCLEANFILES = $(am_libdebuginfod_a_OBJECTS) $(am_libdebuginfod_pic_a_OBJECTS) $(LIBDEBUGINFOD_SONAME)
-CLEANFILES = libdebuginfod.so
+CLEANFILES = libdebuginfod.so $(EXTRA_libdebuginfod_a_DEPENDENCIES)
# automake std-options override: arrange to pass LD_LIBRARY_PATH
installcheck-binPROGRAMS: $(bin_PROGRAMS)