aboutsummaryrefslogtreecommitdiff
path: root/sim/common
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
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')
-rw-r--r--sim/common/ChangeLog4
-rw-r--r--sim/common/acinclude.m46
2 files changed, 9 insertions, 1 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 3ea3422..b5c5ed4 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,7 @@
+2011-10-19 Mike Frysinger <vapier@gentoo.org>
+
+ * acinclude.m4: Call AC_CHECK_LIB when $hardware contains cfi.
+
2011-10-18 John Wehle <john@feith.com> (tiny patch)
* sim-profile.c (profile_info): Only print the title once.
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)