This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[review v3] Add configure check for std::thread


Tom Tromey has posted comments on this change.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/167
......................................................................


Patch Set 3:

(1 comment)

I noticed that the thread pool wasn't using the result of this check,
so I'm updating that patch to do so as well.

| --- gdb/gdbsupport/common.m4
| +++ gdb/gdbsupport/common.m4
| @@ -39,1 +39,19 @@ AC_DEFUN([GDB_AC_COMMON], [
|  
| +  # Check for std::thread.  This does not work on some platforms, like
| +  # mingw and DJGPP.
| +  AC_LANG_PUSH([C++])
| +  AX_PTHREAD([threads=yes], [threads=no])
| +  if test "$threads" = "yes"; then
| +    save_LIBS="$LIBS"
| +    LIBS="$PTHREAD_LIBS $LIBS"
| +    save_CXXFLAGS="$CXXFLAGS"
| +    CXXFLAGS="$PTHREAD_CFLAGS $save_CFLAGS"

PS3, Line 48:

Done

| +    AC_CACHE_CHECK([for std::thread],
| +		   gdb_cv_cxx_std_thread,
| +		   [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
| +    [[#include <thread>
| +      void callback() { }]],
| +    [[std::thread t(callback);]])],
| +				  gdb_cv_cxx_std_thread=yes,
| +				  gdb_cv_cxx_std_thread=no)])
| +    LIBS="$save_LIBS"

-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I00ec55db6077f2615421a93461fc3be57e916aa0
Gerrit-Change-Number: 167
Gerrit-PatchSet: 3
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-Reviewer: Pedro Alves <palves@redhat.com>
Gerrit-Reviewer: Tom Tromey <tromey@sourceware.org>
Gerrit-Comment-Date: Fri, 22 Nov 2019 23:31:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Pedro Alves <palves@redhat.com>
Gerrit-MessageType: comment


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]