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>
This commit is contained in:
parent
f05e2e1de6
commit
4399a56be2
@ -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>
|
2011-10-17 Mike Frysinger <vapier@gentoo.org>
|
||||||
|
|
||||||
* configure.ac: Change include to common/acinclude.m4.
|
* configure.ac: Change include to common/acinclude.m4.
|
||||||
|
48
sim/bfin/configure
vendored
48
sim/bfin/configure
vendored
@ -5138,6 +5138,54 @@ if test x"$silent" != x"yes"; then
|
|||||||
fi
|
fi
|
||||||
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_func in getuid getgid geteuid getegid setuid setgid mmap munmap kill pread
|
for ac_func in getuid getgid geteuid getegid setuid setgid mmap munmap kill pread
|
||||||
do :
|
do :
|
||||||
|
@ -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)
|
2011-10-18 John Wehle <john@feith.com> (tiny patch)
|
||||||
|
|
||||||
* sim-profile.c (profile_info): Only print the title once.
|
* sim-profile.c (profile_info): Only print the title once.
|
||||||
|
@ -623,7 +623,11 @@ if test "$sim_hw_p" != yes; then
|
|||||||
fi
|
fi
|
||||||
if test x"$silent" != x"yes"; then
|
if test x"$silent" != x"yes"; then
|
||||||
echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
|
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_cflags)
|
||||||
AC_SUBST(sim_hw_objs)
|
AC_SUBST(sim_hw_objs)
|
||||||
|
@ -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>
|
2011-10-17 Mike Frysinger <vapier@gentoo.org>
|
||||||
|
|
||||||
* configure.ac: Change include to common/acinclude.m4.
|
* configure.ac: Change include to common/acinclude.m4.
|
||||||
|
48
sim/cris/configure
vendored
48
sim/cris/configure
vendored
@ -5007,6 +5007,54 @@ if test x"$silent" != x"yes"; then
|
|||||||
fi
|
fi
|
||||||
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
|
||||||
|
|
||||||
|
|
||||||
# The default model shouldn't matter as long as there's a BFD.
|
# The default model shouldn't matter as long as there's a BFD.
|
||||||
|
|
||||||
|
@ -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>
|
2011-10-17 Mike Frysinger <vapier@gentoo.org>
|
||||||
|
|
||||||
* configure.ac: Change include to common/acinclude.m4.
|
* configure.ac: Change include to common/acinclude.m4.
|
||||||
|
48
sim/lm32/configure
vendored
48
sim/lm32/configure
vendored
@ -5003,6 +5003,54 @@ if test x"$silent" != x"yes"; then
|
|||||||
fi
|
fi
|
||||||
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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ac_sources="$sim_link_files"
|
ac_sources="$sim_link_files"
|
||||||
|
@ -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>
|
2011-10-17 Mike Frysinger <vapier@gentoo.org>
|
||||||
|
|
||||||
* configure.ac: Change include to common/acinclude.m4.
|
* configure.ac: Change include to common/acinclude.m4.
|
||||||
|
48
sim/m68hc11/configure
vendored
48
sim/m68hc11/configure
vendored
@ -5022,6 +5022,54 @@ if test x"$silent" != x"yes"; then
|
|||||||
fi
|
fi
|
||||||
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
|
for ac_header in string.h strings.h stdlib.h stdlib.h fcntl.h
|
||||||
do :
|
do :
|
||||||
|
@ -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>
|
2011-10-17 Mike Frysinger <vapier@gentoo.org>
|
||||||
|
|
||||||
* configure.ac: Change include to common/acinclude.m4.
|
* configure.ac: Change include to common/acinclude.m4.
|
||||||
|
48
sim/mips/configure
vendored
48
sim/mips/configure
vendored
@ -5602,6 +5602,54 @@ if test x"$silent" != x"yes"; then
|
|||||||
fi
|
fi
|
||||||
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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -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>
|
2011-10-17 Mike Frysinger <vapier@gentoo.org>
|
||||||
|
|
||||||
* configure.ac: Change include to common/acinclude.m4.
|
* configure.ac: Change include to common/acinclude.m4.
|
||||||
|
48
sim/mn10300/configure
vendored
48
sim/mn10300/configure
vendored
@ -5131,6 +5131,54 @@ if test x"$silent" != x"yes"; then
|
|||||||
fi
|
fi
|
||||||
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_func in time chmod utime fork execve execv chown
|
for ac_func in time chmod utime fork execve execv chown
|
||||||
do :
|
do :
|
||||||
|
Loading…
Reference in New Issue
Block a user