aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2013-04-17 09:58:15 +0000
committerPedro Alves <palves@redhat.com>2013-04-17 09:58:15 +0000
commit7d4e5717e05d588f4b9037310863d8bfc9505064 (patch)
treef8bbbd7b7860f39a184107db29829cd61dbffcf7 /gdb/gdbserver
parentab11614906ce02b01fc6ef39b35757fa16a467f9 (diff)
downloadgdb-7d4e5717e05d588f4b9037310863d8bfc9505064.zip
gdb-7d4e5717e05d588f4b9037310863d8bfc9505064.tar.gz
gdb-7d4e5717e05d588f4b9037310863d8bfc9505064.tar.bz2
Use AC_DEFINE for USE_THREAD_DB
Use AC_DEFINE for USE_THREAD_DB instead of manually passing it down through -D flags. gdb/gdbserver/ 2013-04-17 Pedro Alves <palves@redhat.com> * configure.ac (USE_THREAD_DB): Delete variable. (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB. Don't AC_SUBST USE_THREAD_DB. * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@. * config.in, configure: Regenerate.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog8
-rw-r--r--gdb/gdbserver/Makefile.in3
-rw-r--r--gdb/gdbserver/config.in3
-rwxr-xr-xgdb/gdbserver/configure7
-rw-r--r--gdb/gdbserver/configure.ac4
5 files changed, 16 insertions, 9 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index f4c4543..5edc818 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,11 @@
+2013-04-17 Pedro Alves <palves@redhat.com>
+
+ * configure.ac (USE_THREAD_DB): Delete variable.
+ (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
+ Don't AC_SUBST USE_THREAD_DB.
+ * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
+ * config.in, configure: Regenerate.
+
2013-04-16 Pedro Alves <palves@redhat.com>
* linux-low.h (struct lwp_info) <thread_known>: Move under
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index a2281cb..faa0098 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -123,8 +123,7 @@ CFLAGS = @CFLAGS@
INTERNAL_CFLAGS_BASE = ${CFLAGS} ${GLOBAL_CFLAGS} \
${PROFILE_CFLAGS} ${INCLUDE_CFLAGS}
INTERNAL_WARN_CFLAGS = ${INTERNAL_CFLAGS_BASE} $(WARN_CFLAGS)
-INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) \
- @USE_THREAD_DB@ -DGDBSERVER
+INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) -DGDBSERVER
# LDFLAGS is specifically reserved for setting from the command line
# when running make.
diff --git a/gdb/gdbserver/config.in b/gdb/gdbserver/config.in
index 738c322..35a836d 100644
--- a/gdb/gdbserver/config.in
+++ b/gdb/gdbserver/config.in
@@ -289,6 +289,9 @@
#endif
+/* Define if we should use libthread_db. */
+#undef USE_THREAD_DB
+
/* Define if we should use the Windows API, instead of the POSIX API. On
Windows, we use the Windows API when building for MinGW, but the POSIX API
when building for Cygwin. */
diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure
index da257bb..5a56183 100755
--- a/gdb/gdbserver/configure
+++ b/gdb/gdbserver/configure
@@ -594,7 +594,6 @@ extra_libraries
IPA_DEPFILES
srv_xmlfiles
srv_xmlbuiltin
-USE_THREAD_DB
GDBSERVER_LIBS
GDBSERVER_DEPFILES
RDYNAMIC
@@ -5625,7 +5624,6 @@ LIBS="$old_LIBS"
srv_thread_depfiles=
srv_libs=
-USE_THREAD_DB=
if test "$srv_linux_thread_db" = "yes"; then
if test "$ac_cv_lib_dl_dlopen" = "yes"; then
@@ -5685,7 +5683,9 @@ $as_echo "$found" >&6; }
fi
srv_thread_depfiles="thread-db.o proc-service.o"
- USE_THREAD_DB="-DUSE_THREAD_DB"
+
+$as_echo "#define USE_THREAD_DB 1" >>confdefs.h
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TD_VERSION" >&5
$as_echo_n "checking for TD_VERSION... " >&6; }
if test "${gdbsrv_cv_have_td_version+set}" = set; then :
@@ -5918,7 +5918,6 @@ fi
-
GNULIB=build-gnulib-gdbserver/import
GNULIB_STDINT_H=
diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac
index f6227d1..fdd8918 100644
--- a/gdb/gdbserver/configure.ac
+++ b/gdb/gdbserver/configure.ac
@@ -322,7 +322,6 @@ LIBS="$old_LIBS"
srv_thread_depfiles=
srv_libs=
-USE_THREAD_DB=
if test "$srv_linux_thread_db" = "yes"; then
if test "$ac_cv_lib_dl_dlopen" = "yes"; then
@@ -350,7 +349,7 @@ if test "$srv_linux_thread_db" = "yes"; then
fi
srv_thread_depfiles="thread-db.o proc-service.o"
- USE_THREAD_DB="-DUSE_THREAD_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_TRY_COMPILE([#include <thread_db.h>], [TD_VERSION;],
[gdbsrv_cv_have_td_version=yes],
@@ -459,7 +458,6 @@ fi
AC_SUBST(GDBSERVER_DEPFILES)
AC_SUBST(GDBSERVER_LIBS)
-AC_SUBST(USE_THREAD_DB)
AC_SUBST(srv_xmlbuiltin)
AC_SUBST(srv_xmlfiles)
AC_SUBST(IPA_DEPFILES)