sim: use AC_CHECK_TOOL to find ar

Message ID 20210222043841.10959-1-vapier@gentoo.org
State New
Headers show
Series
  • sim: use AC_CHECK_TOOL to find ar
Related show

Commit Message

Simon Marchi via Gdb-patches Feb. 22, 2021, 4:38 a.m.
Rather than require $AR be set and then default to `ar`, use the
standard AC_CHECK_TOOL helper to find a good prefixed tool.  In
practice this shouldn't change much as we seem to have macros in
the tree that were already setting it up, but we shouldn't rely
on that implicitly.
---
 sim/m4/sim_ac_common.m4 | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

-- 
2.30.0

Patch

diff --git a/sim/m4/sim_ac_common.m4 b/sim/m4/sim_ac_common.m4
index 32d7f14c96a4..0f3052abec37 100644
--- a/sim/m4/sim_ac_common.m4
+++ b/sim/m4/sim_ac_common.m4
@@ -41,8 +41,7 @@  fi
 AC_SUBST(CC_FOR_BUILD)
 
 AC_SUBST(CFLAGS)
-AR=${AR-ar}
-AC_SUBST(AR)
+AC_CHECK_TOOL(AR, ar)
 AC_PROG_RANLIB
 
 # Require C11 or newer.  Autoconf-2.70 provides ac_cv_prog_cc_c11 when using