diff options
Diffstat (limited to 'sys-fs/lvm2/files/lvm2-2.03.17-readelf.patch')
-rw-r--r-- | sys-fs/lvm2/files/lvm2-2.03.17-readelf.patch | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/sys-fs/lvm2/files/lvm2-2.03.17-readelf.patch b/sys-fs/lvm2/files/lvm2-2.03.17-readelf.patch new file mode 100644 index 000000000000..82870b108e09 --- /dev/null +++ b/sys-fs/lvm2/files/lvm2-2.03.17-readelf.patch @@ -0,0 +1,56 @@ +From 2de7e5c222ff114f41dadcf904061d6c2a77eae2 Mon Sep 17 00:00:00 2001 +From: David Seifert <soap@gentoo.org> +Date: Sat, 19 Nov 2022 17:05:31 +0100 +Subject: [PATCH 1/2] Allow for overriding of `readelf` + +* This allows users to use e.g. `llvm-readelf` on systems with binutils as default. + +Bug: https://bugs.gentoo.org/840628 +--- + configure.ac | 1 + + libdm/Makefile.in | 4 ++-- + libdm/make.tmpl.in | 1 + + 3 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 704772b62..f39c87d08 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -83,6 +83,7 @@ AC_PROG_LN_S + AC_PROG_MAKE_SET + AC_PROG_MKDIR_P + AC_PROG_RANLIB ++AC_CHECK_TOOL([READELF], [readelf]) + AC_CHECK_TOOL(AR, ar) + AC_PATH_TOOL(CFLOW_CMD, cflow) + AC_PATH_TOOL(CSCOPE_CMD, cscope) +diff --git a/libdm/Makefile.in b/libdm/Makefile.in +index 35115d7f0..2758648e6 100644 +--- a/libdm/Makefile.in ++++ b/libdm/Makefile.in +@@ -71,8 +71,8 @@ libdevmapper.$(LIB_SUFFIX) libdevmapper.$(LIB_SUFFIX).$(LIB_VERSION): $(LIB_SHAR + # also the older symbol is built-in + .symver_check: $(LIB_SHARED) + @echo " [CHECK] $<" +- $(Q) if readelf -Ws $< | grep -q dm_stats_create_region@@; then \ +- SYM=$$(readelf -Ws $< | grep dm_stats_create_region@DM_1_02_106); \ ++ $(Q) if $(READELF) -Ws $< | grep -q dm_stats_create_region@@; then \ ++ SYM=$$($(READELF) -Ws $< | grep dm_stats_create_region@DM_1_02_106); \ + if test -n "$$SYM"; then touch $@; \ + else echo >&2 "Missing versioned symbols in $<"; false; fi; \ + else touch $@; fi +diff --git a/libdm/make.tmpl.in b/libdm/make.tmpl.in +index f1c88fac0..095fb028a 100644 +--- a/libdm/make.tmpl.in ++++ b/libdm/make.tmpl.in +@@ -34,6 +34,7 @@ ifeq ($(CC), cc) + endif + + RANLIB = @RANLIB@ ++READELF = @READELF@ + INSTALL = @INSTALL@ + MKDIR_P = @MKDIR_P@ + MSGFMT = @MSGFMT@ +-- +2.38.1 + |