1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

configure: 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
This commit is contained in:
David Seifert 2022-11-19 17:51:08 +01:00 committed by Zdenek Kabelac
parent 2da4ca7ce1
commit 3dee7b7266
3 changed files with 4 additions and 2 deletions

View File

@ -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)

View File

@ -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

View File

@ -34,6 +34,7 @@ ifeq ($(CC), cc)
endif
RANLIB = @RANLIB@
READELF = @READELF@
INSTALL = @INSTALL@
MKDIR_P = @MKDIR_P@
MSGFMT = @MSGFMT@