diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-10-19 21:28:27 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-10-19 21:28:27 +0000 |
commit | 4399a56be2e20b4a0862c6d67cf20a497571ac9d (patch) | |
tree | ac14ddec2889375d8e3fab152f08ac30ffb428c5 /sim/m68hc11 | |
parent | f05e2e1de66ff08f7551de7bb8e1411540c9fffa (diff) | |
download | gdb-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/m68hc11')
-rw-r--r-- | sim/m68hc11/ChangeLog | 4 | ||||
-rwxr-xr-x | sim/m68hc11/configure | 48 |
2 files changed, 52 insertions, 0 deletions
diff --git a/sim/m68hc11/ChangeLog b/sim/m68hc11/ChangeLog index 39caeef..617ec1e 100644 --- a/sim/m68hc11/ChangeLog +++ b/sim/m68hc11/ChangeLog @@ -1,3 +1,7 @@ +2011-10-19 Mike Frysinger <vapier@gentoo.org> + + * configure: Regenerate after common/acinclude.m4 update. + 2011-10-17 Mike Frysinger <vapier@gentoo.org> * configure.ac: Change include to common/acinclude.m4. diff --git a/sim/m68hc11/configure b/sim/m68hc11/configure index 3d44c5e..450cb76 100755 --- a/sim/m68hc11/configure +++ b/sim/m68hc11/configure @@ -5022,6 +5022,54 @@ if test x"$silent" != x"yes"; then fi fi +case " $hardware " in + *" cfi "*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for log2 in -lm" >&5 +$as_echo_n "checking for log2 in -lm... " >&6; } +if test "${ac_cv_lib_m_log2+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char log2 (); +int +main () +{ +return log2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_log2=yes +else + ac_cv_lib_m_log2=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_log2" >&5 +$as_echo "$ac_cv_lib_m_log2" >&6; } +if test "x$ac_cv_lib_m_log2" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBM 1 +_ACEOF + + LIBS="-lm $LIBS" + +fi +;; +esac + for ac_header in string.h strings.h stdlib.h stdlib.h fcntl.h do : |