diff options
author | Manoj Gupta <manojgupta@google.com> | 2023-04-17 13:33:15 -0700 |
---|---|---|
committer | Roland McGrath <mcgrathr@google.com> | 2023-04-29 00:35:11 -0700 |
commit | e0f4b3ec5f36ff90dbea21aab2190fb4565ca67b (patch) | |
tree | 4bc6cccc146f7213100c5f1fc9642a3eb63fbdb4 /gdb/minsyms.c | |
parent | bc752bfbd98b6c2b02d59ed0a6c7ca88fbf4e3e0 (diff) | |
download | binutils-e0f4b3ec5f36ff90dbea21aab2190fb4565ca67b.zip binutils-e0f4b3ec5f36ff90dbea21aab2190fb4565ca67b.tar.gz binutils-e0f4b3ec5f36ff90dbea21aab2190fb4565ca67b.tar.bz2 |
gdb: Fix building with latest libc++
Latest libc++[1] causes transitive include to <locale> when
<mutex> or <thread> header is included. This causes
gdb to not build[2] since <locale> defines isupper/islower etc.
functions that are explicitly macroed-out in safe-ctype.h to
prevent their use.
Use the suggestion from libc++ to include <locale> internally when
building in C++ mode to avoid build errors.
Use safe-gdb-ctype.h as the include instead of "safe-ctype.h"
to keep this isolated to gdb since rest of binutils
does not seem to use much C++.
[1]: https://reviews.llvm.org/D144331
[2]: https://issuetracker.google.com/issues/277967395
Diffstat (limited to 'gdb/minsyms.c')
-rw-r--r-- | gdb/minsyms.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/minsyms.c b/gdb/minsyms.c index 5fcc724..07e83e8 100644 --- a/gdb/minsyms.c +++ b/gdb/minsyms.c @@ -52,7 +52,7 @@ #include "cli/cli-utils.h" #include "gdbsupport/symbol.h" #include <algorithm> -#include "safe-ctype.h" +#include "gdbsupport/gdb-safe-ctype.h" #include "gdbsupport/parallel-for.h" #include "inferior.h" |