diff options
author | Tom Tromey <tom@tromey.com> | 2019-03-15 17:38:06 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-11-26 14:02:57 -0700 |
commit | 5e03027845ecc877621ea71bc342a30ecf2999ff (patch) | |
tree | d336c27969b6e4c6ca9d14be8becb15ed7d4cfa2 /gdb/gdbserver/Makefile.in | |
parent | 5a79c10755d00b71b33b8715e5a665bfd78c9222 (diff) | |
download | fsf-binutils-gdb-5e03027845ecc877621ea71bc342a30ecf2999ff.zip fsf-binutils-gdb-5e03027845ecc877621ea71bc342a30ecf2999ff.tar.gz fsf-binutils-gdb-5e03027845ecc877621ea71bc342a30ecf2999ff.tar.bz2 |
Add configure check for std::thread
This adds a configure check for std::thread. This is needed because
std::thread is not available on some systems, like some versions of
mingw and DJGPP.
This also adds configury to make sure that a threaded gdb links
against the correct threading library (-lpthread or the like), and
passes the right flags (e.g., -pthread) to the compilations.
Note that this also links gdbserver against the thread library. This
is not strictly necessary at this point in the series, but a later
patch will change gdbsupport to use pthread_sigmask, at which point
this will be needed.
gdb/ChangeLog
2019-11-26 Tom Tromey <tom@tromey.com>
* acinclude.m4: Include ax_pthread.m4.
* Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
(INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
(CLIBS): Use PTHREAD_LIBS.
(aclocal_m4_deps): Add ax_pthread.m4.
* config.in, configure: Rebuild.
* gdbsupport/common.m4 (GDB_AC_COMMON): Check for std::thread.
gdb/gdbserver/ChangeLog
2019-11-26 Tom Tromey <tom@tromey.com>
* Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
(INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
(GDBSERVER_LIBS): Use PTHREAD_LIBS.
* acinclude.m4: Include ax_pthread.m4.
* config.in, configure: Rebuild.
Change-Id: I00ec55db6077f2615421a93461fc3be57e916aa0
Diffstat (limited to 'gdb/gdbserver/Makefile.in')
-rw-r--r-- | gdb/gdbserver/Makefile.in | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in index 16012dd..e79d24f 100644 --- a/gdb/gdbserver/Makefile.in +++ b/gdb/gdbserver/Makefile.in @@ -139,9 +139,12 @@ CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ CPPFLAGS = @CPPFLAGS@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ + # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros. INTERNAL_CFLAGS_BASE = ${CXXFLAGS} ${GLOBAL_CFLAGS} \ - ${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${CPPFLAGS} + ${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${CPPFLAGS} $(PTHREAD_CFLAGS) INTERNAL_WARN_CFLAGS = ${INTERNAL_CFLAGS_BASE} $(WARN_CFLAGS) INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) -DGDBSERVER @@ -305,7 +308,7 @@ GDBREPLAY_OBS = \ utils.o \ version.o -GDBSERVER_LIBS = @GDBSERVER_LIBS@ +GDBSERVER_LIBS = @GDBSERVER_LIBS@ $(PTHREAD_LIBS) XM_CLIBS = @LIBS@ CDEPS = $(srcdir)/proc-service.list |