aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorFX Coudert <fxcoudert@gmail.com>2024-07-12 15:39:50 +0100
committerGaius Mulley <gaiusmod2@gmail.com>2024-07-12 15:39:50 +0100
commitf4047a8614d2215e0d6acf071c521ac08ab1bbb2 (patch)
tree3cd5a4178a6a38f44324081d30583499f647d861 /gcc
parentae829a27785307232e4db0df6a30ca275941b613 (diff)
downloadgcc-f4047a8614d2215e0d6acf071c521ac08ab1bbb2.zip
gcc-f4047a8614d2215e0d6acf071c521ac08ab1bbb2.tar.gz
gcc-f4047a8614d2215e0d6acf071c521ac08ab1bbb2.tar.bz2
modula2: bootstrap fix for string and vector headers.
This patch fixes the include of headers (<string> and <vector>) which are included after GCC's system.h has been included. It defines INCLUDE_STRING before including "system.h". This allows gcc to bootstrap with Apple clang 15. gcc/m2/ChangeLog: * gm2-gcc/m2linemap.cc (INCLUDE_STRING): Define before include of gcc-consolidation.h. * gm2spec.cc (INCLUDE_STRING): Define before include of system.h. (INCLUDE_VECTOR): Ditto. Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/m2/gm2-gcc/m2linemap.cc2
-rw-r--r--gcc/m2/gm2spec.cc4
2 files changed, 3 insertions, 3 deletions
diff --git a/gcc/m2/gm2-gcc/m2linemap.cc b/gcc/m2/gm2-gcc/m2linemap.cc
index c916ba6..fcf589e 100644
--- a/gcc/m2/gm2-gcc/m2linemap.cc
+++ b/gcc/m2/gm2-gcc/m2linemap.cc
@@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_STRING
#include "gcc-consolidation.h"
/* Utilize some of the C build routines */
@@ -36,7 +37,6 @@ along with GNU Modula-2; see the file COPYING3. If not see
#define m2linemap_c
#include "m2linemap.h"
#include "m2color.h"
-#include <string>
static int inFile = FALSE;
diff --git a/gcc/m2/gm2spec.cc b/gcc/m2/gm2spec.cc
index a4faf88..2a4dccf 100644
--- a/gcc/m2/gm2spec.cc
+++ b/gcc/m2/gm2spec.cc
@@ -20,6 +20,8 @@ along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#include "config.h"
+#define INCLUDE_STRING
+#define INCLUDE_VECTOR
#include "system.h"
#include "coretypes.h"
#include "tm.h"
@@ -31,8 +33,6 @@ along with GNU Modula-2; see the file COPYING3. If not see
#include "gcc.h"
#include "opts.h"
#include "vec.h"
-#include <vector>
-#include <string>
#include "m2/gm2config.h"