mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-04 13:57:12 +08:00
gdbserver: modernize configure.ac
Run autoupdate on gdbserver/configure.ac and then tweak it to use easier to read indentation. This removes a few warnings when running `autoreconf -vf -Wall`. * Replace AC_INIT with AC_INIT and no arguments plus AC_CONFIG_SRCDIR. * Replace AC_GNU_SOURCE with AC_USE_SYSTEM_EXTENSIONS. * Replace AC_TRY_COMPILE with AC_COMPILE_IFELSE. * Replace AC_TRY_LINK with AC_LINK_IFELSE. autoupdate gets it right, except this one here: --- a/gdbserver/configure.ac +++ b/gdbserver/configure.ac @@ -304,7 +304,7 @@ if test "$srv_linux_thread_db" = "yes"; then AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[found="-Wl,--dynamic-list" RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'],[RDYNAMIC="-rdynamic" LDFLAGS="$old_LDFLAGS $RDYNAMIC" - AC_TRY_LINK([], [], + _au_m4_changequote([,])AC_TRY_LINK([], [], [found="-rdynamic"], [found="no" RDYNAMIC=""])]) ... which I had to convert manually. The changes in the generated configure file only contain insignificant whitespace changes, so that gives confidence that the conversion is correct. gdbserver/ChangeLog: * configure.ac: Modernize. * configure: Re-generate. Change-Id: Ia769aaec2aafac595504f477da955e91dffa4d8f
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
|
||||||
|
|
||||||
|
* configure.ac: Modernize.
|
||||||
|
* configure: Re-generate.
|
||||||
|
|
||||||
2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
|
2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
|
||||||
|
|
||||||
* configure.ac: Use AC_CANONICAL_{BUILD,HOST,TARGET} instead of
|
* configure.ac: Use AC_CANONICAL_{BUILD,HOST,TARGET} instead of
|
||||||
|
25
gdbserver/configure
vendored
25
gdbserver/configure
vendored
@ -2713,6 +2713,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ac_config_headers="$ac_config_headers config.h:config.in"
|
ac_config_headers="$ac_config_headers config.h:config.in"
|
||||||
|
|
||||||
|
|
||||||
@ -4245,7 +4246,6 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
|
|||||||
$as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
|
$as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Check whether --enable-largefile was given.
|
# Check whether --enable-largefile was given.
|
||||||
if test "${enable_largefile+set}" = set; then :
|
if test "${enable_largefile+set}" = set; then :
|
||||||
enableval=$enable_largefile;
|
enableval=$enable_largefile;
|
||||||
@ -9653,6 +9653,7 @@ int
|
|||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -9660,11 +9661,14 @@ _ACEOF
|
|||||||
if ac_fn_c_try_compile "$LINENO"; then :
|
if ac_fn_c_try_compile "$LINENO"; then :
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||||
$as_echo "yes" >&6; };
|
$as_echo "yes" >&6; };
|
||||||
|
|
||||||
$as_echo "#define HAVE_UST 1" >>confdefs.h
|
$as_echo "#define HAVE_UST 1" >>confdefs.h
|
||||||
|
|
||||||
else
|
else
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
$as_echo "no" >&6; }; ustlibs= ; ustinc=
|
$as_echo "no" >&6; }
|
||||||
|
ustlibs= ; ustinc=
|
||||||
|
|
||||||
fi
|
fi
|
||||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
CFLAGS="$saved_CFLAGS"
|
CFLAGS="$saved_CFLAGS"
|
||||||
@ -10314,8 +10318,10 @@ if ac_fn_c_try_compile "$LINENO"; then :
|
|||||||
gdbsrv_cv_have_ptrace_getregs=yes
|
gdbsrv_cv_have_ptrace_getregs=yes
|
||||||
else
|
else
|
||||||
gdbsrv_cv_have_ptrace_getregs=no
|
gdbsrv_cv_have_ptrace_getregs=no
|
||||||
|
|
||||||
fi
|
fi
|
||||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getregs" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getregs" >&5
|
||||||
@ -10346,8 +10352,10 @@ if ac_fn_c_try_compile "$LINENO"; then :
|
|||||||
gdbsrv_cv_have_ptrace_getfpxregs=yes
|
gdbsrv_cv_have_ptrace_getfpxregs=yes
|
||||||
else
|
else
|
||||||
gdbsrv_cv_have_ptrace_getfpxregs=no
|
gdbsrv_cv_have_ptrace_getfpxregs=no
|
||||||
|
|
||||||
fi
|
fi
|
||||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getfpxregs" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getfpxregs" >&5
|
||||||
@ -10533,9 +10541,11 @@ if ac_fn_c_try_link "$LINENO"; then :
|
|||||||
else
|
else
|
||||||
found="no"
|
found="no"
|
||||||
RDYNAMIC=""
|
RDYNAMIC=""
|
||||||
|
|
||||||
fi
|
fi
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
|
|
||||||
fi
|
fi
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
@ -10571,8 +10581,10 @@ if ac_fn_c_try_compile "$LINENO"; then :
|
|||||||
gdbsrv_cv_have_td_version=yes
|
gdbsrv_cv_have_td_version=yes
|
||||||
else
|
else
|
||||||
gdbsrv_cv_have_td_version=no
|
gdbsrv_cv_have_td_version=no
|
||||||
|
|
||||||
fi
|
fi
|
||||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
|
|
||||||
fi
|
fi
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_td_version" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_td_version" >&5
|
||||||
$as_echo "$gdbsrv_cv_have_td_version" >&6; }
|
$as_echo "$gdbsrv_cv_have_td_version" >&6; }
|
||||||
@ -10619,14 +10631,15 @@ $as_echo_n "checking whether the target supports __sync_*_compare_and_swap... "
|
|||||||
if ${gdbsrv_cv_have_sync_builtins+:} false; then :
|
if ${gdbsrv_cv_have_sync_builtins+:} false; then :
|
||||||
$as_echo_n "(cached) " >&6
|
$as_echo_n "(cached) " >&6
|
||||||
else
|
else
|
||||||
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
|
|
||||||
int
|
int
|
||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
int foo, bar; bar = __sync_val_compare_and_swap(&foo, 0, 1);
|
int foo, bar;
|
||||||
|
bar = __sync_val_compare_and_swap(&foo, 0, 1);
|
||||||
|
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -10635,9 +10648,11 @@ if ac_fn_c_try_link "$LINENO"; then :
|
|||||||
gdbsrv_cv_have_sync_builtins=yes
|
gdbsrv_cv_have_sync_builtins=yes
|
||||||
else
|
else
|
||||||
gdbsrv_cv_have_sync_builtins=no
|
gdbsrv_cv_have_sync_builtins=no
|
||||||
|
|
||||||
fi
|
fi
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
|
|
||||||
fi
|
fi
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_sync_builtins" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_sync_builtins" >&5
|
||||||
$as_echo "$gdbsrv_cv_have_sync_builtins" >&6; }
|
$as_echo "$gdbsrv_cv_have_sync_builtins" >&6; }
|
||||||
|
@ -18,14 +18,15 @@ dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
dnl Process this file with autoconf to produce a configure script.
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
AC_INIT(server.cc)
|
AC_INIT
|
||||||
|
AC_CONFIG_SRCDIR([server.cc])
|
||||||
AC_CONFIG_HEADERS(config.h:config.in, [echo > stamp-h])
|
AC_CONFIG_HEADERS(config.h:config.in, [echo > stamp-h])
|
||||||
|
|
||||||
AM_MAINTAINER_MODE
|
AM_MAINTAINER_MODE
|
||||||
|
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AC_PROG_CXX
|
AC_PROG_CXX
|
||||||
AC_GNU_SOURCE
|
AC_USE_SYSTEM_EXTENSIONS
|
||||||
AC_SYS_LARGEFILE
|
AC_SYS_LARGEFILE
|
||||||
AM_PROG_INSTALL_STRIP
|
AM_PROG_INSTALL_STRIP
|
||||||
|
|
||||||
@ -124,12 +125,19 @@ if test "x$with_ust" != "xno"; then
|
|||||||
saved_CFLAGS="$CFLAGS"
|
saved_CFLAGS="$CFLAGS"
|
||||||
CFLAGS="$CFLAGS $ustinc"
|
CFLAGS="$CFLAGS $ustinc"
|
||||||
AC_MSG_CHECKING([for ust])
|
AC_MSG_CHECKING([for ust])
|
||||||
AC_TRY_COMPILE([
|
AC_COMPILE_IFELSE(
|
||||||
|
[AC_LANG_PROGRAM(
|
||||||
|
[
|
||||||
#define CONFIG_UST_GDB_INTEGRATION
|
#define CONFIG_UST_GDB_INTEGRATION
|
||||||
#include <ust/ust.h>
|
#include <ust/ust.h>
|
||||||
],[],
|
],
|
||||||
[AC_MSG_RESULT([yes]); AC_DEFINE(HAVE_UST, 1, [Define if UST is available])],
|
[]
|
||||||
[AC_MSG_RESULT([no]); ustlibs= ; ustinc= ])
|
)],
|
||||||
|
[AC_MSG_RESULT([yes]);
|
||||||
|
AC_DEFINE(HAVE_UST, 1, [Define if UST is available])],
|
||||||
|
[AC_MSG_RESULT([no])
|
||||||
|
ustlibs= ; ustinc= ]
|
||||||
|
)
|
||||||
CFLAGS="$saved_CFLAGS"
|
CFLAGS="$saved_CFLAGS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -249,11 +257,14 @@ if test "${srv_linux_regsets}" = "yes"; then
|
|||||||
[Define if the target supports register sets.])
|
[Define if the target supports register sets.])
|
||||||
|
|
||||||
AC_MSG_CHECKING(for PTRACE_GETREGS)
|
AC_MSG_CHECKING(for PTRACE_GETREGS)
|
||||||
AC_CACHE_VAL(gdbsrv_cv_have_ptrace_getregs,
|
AC_CACHE_VAL(
|
||||||
[AC_TRY_COMPILE([#include <sys/ptrace.h>],
|
[gdbsrv_cv_have_ptrace_getregs],
|
||||||
[PTRACE_GETREGS;],
|
[AC_COMPILE_IFELSE(
|
||||||
|
[AC_LANG_PROGRAM([#include <sys/ptrace.h>], [PTRACE_GETREGS;])],
|
||||||
[gdbsrv_cv_have_ptrace_getregs=yes],
|
[gdbsrv_cv_have_ptrace_getregs=yes],
|
||||||
[gdbsrv_cv_have_ptrace_getregs=no])])
|
[gdbsrv_cv_have_ptrace_getregs=no]
|
||||||
|
)]
|
||||||
|
)
|
||||||
AC_MSG_RESULT($gdbsrv_cv_have_ptrace_getregs)
|
AC_MSG_RESULT($gdbsrv_cv_have_ptrace_getregs)
|
||||||
if test "${gdbsrv_cv_have_ptrace_getregs}" = "yes"; then
|
if test "${gdbsrv_cv_have_ptrace_getregs}" = "yes"; then
|
||||||
AC_DEFINE(HAVE_PTRACE_GETREGS, 1,
|
AC_DEFINE(HAVE_PTRACE_GETREGS, 1,
|
||||||
@ -262,11 +273,14 @@ if test "${srv_linux_regsets}" = "yes"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
AC_MSG_CHECKING(for PTRACE_GETFPXREGS)
|
AC_MSG_CHECKING(for PTRACE_GETFPXREGS)
|
||||||
AC_CACHE_VAL(gdbsrv_cv_have_ptrace_getfpxregs,
|
AC_CACHE_VAL(
|
||||||
[AC_TRY_COMPILE([#include <sys/ptrace.h>],
|
[gdbsrv_cv_have_ptrace_getfpxregs],
|
||||||
[PTRACE_GETFPXREGS;],
|
[AC_COMPILE_IFELSE(
|
||||||
|
[AC_LANG_PROGRAM([#include <sys/ptrace.h>], [PTRACE_GETFPXREGS;])],
|
||||||
[gdbsrv_cv_have_ptrace_getfpxregs=yes],
|
[gdbsrv_cv_have_ptrace_getfpxregs=yes],
|
||||||
[gdbsrv_cv_have_ptrace_getfpxregs=no])])
|
[gdbsrv_cv_have_ptrace_getfpxregs=no]
|
||||||
|
)]
|
||||||
|
)
|
||||||
AC_MSG_RESULT($gdbsrv_cv_have_ptrace_getfpxregs)
|
AC_MSG_RESULT($gdbsrv_cv_have_ptrace_getfpxregs)
|
||||||
if test "${gdbsrv_cv_have_ptrace_getfpxregs}" = "yes"; then
|
if test "${gdbsrv_cv_have_ptrace_getfpxregs}" = "yes"; then
|
||||||
AC_DEFINE(HAVE_PTRACE_GETFPXREGS, 1,
|
AC_DEFINE(HAVE_PTRACE_GETFPXREGS, 1,
|
||||||
@ -308,15 +322,19 @@ if test "$srv_linux_thread_db" = "yes"; then
|
|||||||
# supported there.
|
# supported there.
|
||||||
RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
|
RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
|
||||||
LDFLAGS="$LDFLAGS $RDYNAMIC"
|
LDFLAGS="$LDFLAGS $RDYNAMIC"
|
||||||
AC_TRY_LINK([], [],
|
AC_LINK_IFELSE(
|
||||||
|
[AC_LANG_PROGRAM([],[])],
|
||||||
[found="-Wl,--dynamic-list"
|
[found="-Wl,--dynamic-list"
|
||||||
RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'],
|
RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'],
|
||||||
[RDYNAMIC="-rdynamic"
|
[RDYNAMIC="-rdynamic"
|
||||||
LDFLAGS="$old_LDFLAGS $RDYNAMIC"
|
LDFLAGS="$old_LDFLAGS $RDYNAMIC"
|
||||||
AC_TRY_LINK([], [],
|
AC_LINK_IFELSE(
|
||||||
|
[AC_LANG_PROGRAM([], [])],
|
||||||
[found="-rdynamic"],
|
[found="-rdynamic"],
|
||||||
[found="no"
|
[found="no"
|
||||||
RDYNAMIC=""])])
|
RDYNAMIC=""]
|
||||||
|
)]
|
||||||
|
)
|
||||||
AC_SUBST(RDYNAMIC)
|
AC_SUBST(RDYNAMIC)
|
||||||
LDFLAGS="$old_LDFLAGS"
|
LDFLAGS="$old_LDFLAGS"
|
||||||
AC_MSG_RESULT($found)
|
AC_MSG_RESULT($found)
|
||||||
@ -326,10 +344,15 @@ if test "$srv_linux_thread_db" = "yes"; then
|
|||||||
|
|
||||||
srv_thread_depfiles="thread-db.o proc-service.o"
|
srv_thread_depfiles="thread-db.o proc-service.o"
|
||||||
AC_DEFINE(USE_THREAD_DB, 1, [Define if we should use libthread_db.])
|
AC_DEFINE(USE_THREAD_DB, 1, [Define if we should use libthread_db.])
|
||||||
AC_CACHE_CHECK([for TD_VERSION], gdbsrv_cv_have_td_version,
|
AC_CACHE_CHECK(
|
||||||
[AC_TRY_COMPILE([#include <thread_db.h>], [TD_VERSION;],
|
[for TD_VERSION],
|
||||||
|
[gdbsrv_cv_have_td_version],
|
||||||
|
[AC_COMPILE_IFELSE(
|
||||||
|
[AC_LANG_PROGRAM([#include <thread_db.h>], [TD_VERSION;])],
|
||||||
[gdbsrv_cv_have_td_version=yes],
|
[gdbsrv_cv_have_td_version=yes],
|
||||||
[gdbsrv_cv_have_td_version=no])])
|
[gdbsrv_cv_have_td_version=no]
|
||||||
|
)]
|
||||||
|
)
|
||||||
if test "$gdbsrv_cv_have_td_version" = yes; then
|
if test "$gdbsrv_cv_have_td_version" = yes; then
|
||||||
AC_DEFINE(HAVE_TD_VERSION, 1, [Define if TD_VERSION is available.])
|
AC_DEFINE(HAVE_TD_VERSION, 1, [Define if TD_VERSION is available.])
|
||||||
fi
|
fi
|
||||||
@ -360,11 +383,19 @@ GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_hostio_err_objs $srv_thread_dep
|
|||||||
GDBSERVER_LIBS="$srv_libs"
|
GDBSERVER_LIBS="$srv_libs"
|
||||||
|
|
||||||
dnl Check whether the target supports __sync_*_compare_and_swap.
|
dnl Check whether the target supports __sync_*_compare_and_swap.
|
||||||
AC_CACHE_CHECK([whether the target supports __sync_*_compare_and_swap],
|
AC_CACHE_CHECK(
|
||||||
gdbsrv_cv_have_sync_builtins, [
|
[whether the target supports __sync_*_compare_and_swap],
|
||||||
AC_TRY_LINK([], [int foo, bar; bar = __sync_val_compare_and_swap(&foo, 0, 1);],
|
[gdbsrv_cv_have_sync_builtins],
|
||||||
gdbsrv_cv_have_sync_builtins=yes,
|
[AC_LINK_IFELSE(
|
||||||
gdbsrv_cv_have_sync_builtins=no)])
|
[AC_LANG_PROGRAM(
|
||||||
|
[],
|
||||||
|
[int foo, bar;
|
||||||
|
bar = __sync_val_compare_and_swap(&foo, 0, 1);]
|
||||||
|
)],
|
||||||
|
[gdbsrv_cv_have_sync_builtins=yes],
|
||||||
|
[gdbsrv_cv_have_sync_builtins=no]
|
||||||
|
)]
|
||||||
|
)
|
||||||
if test "$gdbsrv_cv_have_sync_builtins" = yes; then
|
if test "$gdbsrv_cv_have_sync_builtins" = yes; then
|
||||||
AC_DEFINE(HAVE_SYNC_BUILTINS, 1,
|
AC_DEFINE(HAVE_SYNC_BUILTINS, 1,
|
||||||
[Define to 1 if the target supports __sync_*_compare_and_swap])
|
[Define to 1 if the target supports __sync_*_compare_and_swap])
|
||||||
|
Reference in New Issue
Block a user