diff options
author | Iain Sandoe <iain@sandoe.co.uk> | 2021-03-30 14:56:39 +0100 |
---|---|---|
committer | Iain Sandoe <iain@sandoe.co.uk> | 2021-04-01 19:32:16 +0100 |
commit | af78514a18ca5c9aaa10813bb4dc639d7ccdf0cc (patch) | |
tree | 7bd4a70961432d96ca9aa4661fb70209d26f0229 /c++tools | |
parent | c++: Add ABI version for PR98481 fix (diff) | |
download | gcc-af78514a18ca5c9aaa10813bb4dc639d7ccdf0cc.tar.gz gcc-af78514a18ca5c9aaa10813bb4dc639d7ccdf0cc.tar.bz2 gcc-af78514a18ca5c9aaa10813bb4dc639d7ccdf0cc.tar.xz |
modules : Make sure we include <map> in system.h.
It appears that many targets include the map header transitively in
other std headers included from system.h. However there are some
editions of clang/libc++ in Xcode that do not, which results in a
bootstrap fail - since when resolver.h is included there is then a
conflict in declaring abort().
The fix is to ensure that map is pulled in by system.h and before
resolver.h is included. As a precautionary measure and to alert
anyone perhaps adding another header to resolver.h this patch also
gates the direct includes there on !IN_GCC.
c++tools/ChangeLog:
* resolver.h: Do not include std headers directly when
building in GCC.
gcc/cp/ChangeLog:
* mapper-client.cc (INCLUDE_MAP): New; require map to be
included from system.h.
* mapper-resolver.cc (INCLUDE_MAP): Likewise.
Diffstat (limited to 'c++tools')
-rw-r--r-- | c++tools/resolver.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/c++tools/resolver.h b/c++tools/resolver.h index 19339125b26..a9547bf6994 100644 --- a/c++tools/resolver.h +++ b/c++tools/resolver.h | |||
@@ -24,8 +24,10 @@ along with GCC; see the file COPYING3. If not see | |||
24 | // Mapper interface for client and server bits | 24 | // Mapper interface for client and server bits |
25 | #include "cody.hh" | 25 | #include "cody.hh" |
26 | // C++ | 26 | // C++ |
27 | #if !IN_GCC | ||
27 | #include <string> | 28 | #include <string> |
28 | #include <map> | 29 | #include <map> |
30 | #endif | ||
29 | 31 | ||
30 | // This is a GCC class, so GCC coding conventions on new bits. | 32 | // This is a GCC class, so GCC coding conventions on new bits. |
31 | class module_resolver : public Cody::Resolver | 33 | class module_resolver : public Cody::Resolver |