|
From: Andreas A. <ar...@so...> - 2021-09-30 14:31:07
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=724460764d3613cb9092ede2a238d7dcb88f8055 commit 724460764d3613cb9092ede2a238d7dcb88f8055 Author: Andreas Arnez <ar...@li...> Date: Thu Sep 30 14:10:29 2021 +0200 configure.ac: Avoid the use of "which" The "which" command is not always installed, but configure.ac uses it in the function AC_HWCAP_CONTAINS_FLAG to force invocation of the executable "true" rather than the shell builtin with the same name. (The point here is to get LD_SHOW_AUXV=1 evaluated by the dynamic loader.) Another option might be to hard-wire the location /bin/true, because the filesystem hierarchy standard requires it to be there. However, the FHS doesn't apply to BSDs and at least some FreeBSD versions do not stick to that specific rule. On the other hand, the "env" command seems to be available on all relevant platforms, so use that instead. Diff: --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index beb5bba792..462068a5ac 100755 --- a/configure.ac +++ b/configure.ac @@ -1464,7 +1464,7 @@ AC_CHECK_MEMBER([pthread_mutex_t.__data.__kind], AC_DEFUN([AC_HWCAP_CONTAINS_FLAG],[ AUXV_CHECK_FOR=$1 AC_MSG_CHECKING([if AT_HWCAP contains the $AUXV_CHECK_FOR indicator]) - if LD_SHOW_AUXV=1 `which true` | grep ^AT_HWCAP | grep -q -w ${AUXV_CHECK_FOR} + if env LD_SHOW_AUXV=1 true | grep ^AT_HWCAP | grep -q -w ${AUXV_CHECK_FOR} then AC_MSG_RESULT([yes]) AC_SUBST([$2],[yes]) |