aboutsummaryrefslogtreecommitdiff
path: root/sim/common/acinclude.m4
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-10-19 21:28:27 +0000
committerMike Frysinger <vapier@gentoo.org>2011-10-19 21:28:27 +0000
commit4399a56be2e20b4a0862c6d67cf20a497571ac9d (patch)
treeac14ddec2889375d8e3fab152f08ac30ffb428c5 /sim/common/acinclude.m4
parentf05e2e1de66ff08f7551de7bb8e1411540c9fffa (diff)
downloadgdb-4399a56be2e20b4a0862c6d67cf20a497571ac9d.zip
gdb-4399a56be2e20b4a0862c6d67cf20a497571ac9d.tar.gz
gdb-4399a56be2e20b4a0862c6d67cf20a497571ac9d.tar.bz2
sim: dv-cfi: check for log2 support in libm when enabled
The dv-cfi model uses log2() internally, so make sure we automatically link in libm when required. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'sim/common/acinclude.m4')
-rw-r--r--sim/common/acinclude.m46
1 files changed, 5 insertions, 1 deletions
diff --git a/sim/common/acinclude.m4 b/sim/common/acinclude.m4
index 11398f5..9979746 100644
--- a/sim/common/acinclude.m4
+++ b/sim/common/acinclude.m4
@@ -623,7 +623,11 @@ if test "$sim_hw_p" != yes; then
fi
if test x"$silent" != x"yes"; then
echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
-fi])dnl
+fi])
+dnl Some devices require extra libraries.
+case " $hardware " in
+ *" cfi "*) AC_CHECK_LIB(m, log2);;
+esac
])
AC_SUBST(sim_hw_cflags)
AC_SUBST(sim_hw_objs)