public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/modula-2] Purge of unnecessary files.
@ 2022-10-05 14:13 Gaius Mulley
0 siblings, 0 replies; only message in thread
From: Gaius Mulley @ 2022-10-05 14:13 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:c9e2b1929bc4495127b76d0399e1e67935798135
commit c9e2b1929bc4495127b76d0399e1e67935798135
Author: Gaius Mulley <gaiusmod2@gmail.com>
Date: Wed Oct 5 15:03:20 2022 +0100
Purge of unnecessary files.
Removal of unnecessary files for the integration to GCC mainline.
Also removal of all references to gm2tools and unused development
scripts.
gcc/ChangeLog:
* doc/sourcebuild.texi (Top level): Remove description
about gm2tools.
gcc/m2/ChangeLog:
* config-lang.in: Reordered the directory names.
* gm2-gcc/gcc-consolidation.h: Remove ununsed #ifdef.
* m2/m2-tree.h: Removed #if 0.
* m2/m2.flex: Removed ununsed #ifdef.
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
Diff:
---
gcc/doc/sourcebuild.texi | 3 -
gcc/m2/config-lang.in | 8 +-
gcc/m2/gm2-gcc/gcc-consolidation.h | 5 -
gcc/m2/init/gm2lccinit | 54 -
gcc/m2/init/gm2lgeninit | 55 -
gcc/m2/init/gm2lorderinit | 56 -
gcc/m2/init/gm2minit | 63 -
gcc/m2/m2-tree.h | 17 +-
gcc/m2/m2.flex | 30 +-
gcc/m2/patches/gcc/11.1.0/01-patches | 345 -----
gcc/m2/patches/gcc/11.1.0/02-patches | 49 -
gcc/m2/patches/gcc/11.1.0/03-patches | 12 -
gcc/m2/patches/gcc/11.1.0/04-patches | 12 -
gcc/m2/patches/gcc/11.1.0/05-patches | 12 -
gcc/m2/patches/gcc/11.1.0/06-patches | 316 -----
gcc/m2/patches/gcc/11.1.0/07-patches | 40 -
gcc/m2/patches/gcc/11.1.0/08-patches | 27 -
gcc/m2/patches/gcc/11.1.0/09-patches | 778 -----------
gcc/m2/patches/gcc/11.1.0/10-patches | 83 --
gcc/m2/patches/gcc/11.1.0/11-patches | 12 -
gcc/m2/patches/gcc/11.1.0/12-patches | 16 -
gcc/m2/patches/gcc/11.1.0/13-patches | 13 -
gcc/m2/patches/gcc/11.1.0/14-patches | 14 -
gcc/m2/patches/gcc/11.1.0/15-patches | 12 -
gcc/m2/patches/gcc/11.1.0/16-patches | 221 ---
gcc/m2/patches/gcc/11.1.0/17-patches | 12 -
gcc/m2/patches/gcc/11.1.0/18-patches | 28 -
gcc/m2/patches/gcc/11.1.0/19-patches | 16 -
gcc/m2/patches/gcc/11.1.0/20-patches | 12 -
gcc/m2/patches/gcc/11.1.0/21-patches | 12 -
gcc/m2/patches/gcc/11.1.0/22-patches | 479 -------
gcc/m2/patches/gcc/11.1.0/23-patches | 21 -
gcc/m2/patches/gcc/3.3.6/01.waldek_patch_gcc | 35 -
gcc/m2/patches/gcc/3.3.6/02.gaius_patch_gcc | 350 -----
gcc/m2/patches/gcc/4.1.0/01.gaius_patch_gcc | 165 ---
gcc/m2/patches/gcc/4.1.1/01.gaius_patch_gcc | 163 ---
gcc/m2/patches/gcc/4.1.2/01-patches | 366 -----
gcc/m2/patches/gcc/4.1.2/02-patches | 83 --
gcc/m2/patches/gcc/4.1.2/ChangeLog | 56 -
gcc/m2/patches/gcc/4.1.2/old/01.gaius_patch_gcc | 202 ---
gcc/m2/patches/gcc/4.1.2/old/02.gaius_rs6000_lang | 11 -
gcc/m2/patches/gcc/4.1.2/old/03.michael_i386 | 11 -
gcc/m2/patches/gcc/4.1.2/old/04.gaius_patch_gcc | 31 -
gcc/m2/patches/gcc/4.1.2/old/05.gaius_patch_gcc | 21 -
gcc/m2/patches/gcc/4.1.2/old/06.gaius_patch_tree | 95 --
gcc/m2/patches/gcc/4.1.2/old/07.michael_i386 | 15 -
.../gcc/4.1.2/old/08.gaius_ipa_type_escape.c | 55 -
gcc/m2/patches/gcc/4.1.2/old/09.gaius_patch_config | 51 -
.../patches/gcc/4.1.2/old/10.michael_snowleopard1 | 68 -
.../patches/gcc/4.1.2/old/11.michael_snowleopard2 | 12 -
.../4.1.2/old/12.gaius_patch_tree_flow_inline_h | 20 -
gcc/m2/patches/gcc/4.7.1/01-patches | 32 -
gcc/m2/patches/gcc/4.7.1/02-patches | 14 -
gcc/m2/patches/gcc/4.7.3/01-patches | 319 -----
gcc/m2/patches/gcc/4.7.3/02-patches | 64 -
gcc/m2/patches/gcc/4.7.3/03-patches | 742 ----------
gcc/m2/patches/gcc/4.7.3/04-patches | 26 -
gcc/m2/patches/gcc/4.7.3/05-patches | 58 -
gcc/m2/patches/gcc/4.7.3/06-patches | 218 ---
gcc/m2/patches/gcc/4.7.3/07-patches | 29 -
gcc/m2/patches/gcc/4.7.3/08-patches | 14 -
gcc/m2/patches/gcc/4.7.3/09-patches | 13 -
gcc/m2/patches/gcc/4.7.3/10-patches | 12 -
gcc/m2/patches/gcc/4.7.3/11-patches | 12 -
gcc/m2/patches/gcc/4.7.3/12-patches | 11 -
gcc/m2/patches/gcc/4.7.4/01-patches | 319 -----
gcc/m2/patches/gcc/4.7.4/02-patches | 64 -
gcc/m2/patches/gcc/4.7.4/03-patches | 742 ----------
gcc/m2/patches/gcc/4.7.4/04-patches | 26 -
gcc/m2/patches/gcc/4.7.4/05-patches | 58 -
gcc/m2/patches/gcc/4.7.4/06-patches | 218 ---
gcc/m2/patches/gcc/4.7.4/07-patches | 29 -
gcc/m2/patches/gcc/4.7.4/08-patches | 14 -
gcc/m2/patches/gcc/4.7.4/09-patches | 13 -
gcc/m2/patches/gcc/4.7.4/10-patches | 12 -
gcc/m2/patches/gcc/4.7.4/11-patches | 12 -
gcc/m2/patches/gcc/4.7.4/12-patches | 11 -
gcc/m2/patches/gcc/5.2.0/01-patches | 319 -----
gcc/m2/patches/gcc/5.2.0/02-patches | 64 -
gcc/m2/patches/gcc/5.2.0/03-patches | 12 -
gcc/m2/patches/gcc/5.2.0/04-patches | 12 -
gcc/m2/patches/gcc/5.2.0/05-patches | 12 -
gcc/m2/patches/gcc/5.2.0/06-patches | 218 ---
gcc/m2/patches/gcc/5.2.0/07-patches | 29 -
gcc/m2/patches/gcc/5.2.0/08-patches | 26 -
gcc/m2/patches/gcc/5.2.0/09-patches | 743 ----------
gcc/m2/patches/gcc/5.2.0/10-patches | 58 -
gcc/m2/patches/gcc/5.2.0/11-patches | 17 -
gcc/m2/patches/gcc/5.2.0/12-patches | 49 -
gcc/m2/patches/gcc/6.4.0/01-patches | 319 -----
gcc/m2/patches/gcc/6.4.0/02-patches | 64 -
gcc/m2/patches/gcc/6.4.0/03-patches | 12 -
gcc/m2/patches/gcc/6.4.0/04-patches | 12 -
gcc/m2/patches/gcc/6.4.0/05-patches | 12 -
gcc/m2/patches/gcc/6.4.0/06-patches | 218 ---
gcc/m2/patches/gcc/6.4.0/07-patches | 29 -
gcc/m2/patches/gcc/6.4.0/08-patches | 95 --
gcc/m2/patches/gcc/6.4.0/09-patches | 743 ----------
gcc/m2/patches/gcc/6.4.0/10-patches | 58 -
gcc/m2/patches/gcc/6.4.0/11-patches | 16 -
gcc/m2/patches/gcc/trunc/01-patches | 319 -----
gcc/m2/patches/gcc/trunc/02-patches | 64 -
gcc/m2/patches/gcc/trunc/03-patches | 12 -
gcc/m2/patches/gcc/trunc/04-patches | 12 -
gcc/m2/patches/gcc/trunc/05-patches | 12 -
gcc/m2/patches/gcc/trunc/06-patches | 273 ----
gcc/m2/patches/gcc/trunc/07-patches | 29 -
gcc/m2/patches/gcc/trunc/08-patches | 95 --
gcc/m2/patches/gcc/trunc/09-patches | 743 ----------
gcc/m2/patches/gcc/trunc/10-patches | 58 -
gcc/m2/patches/gcc/trunc/11-patches | 0
gcc/m2/patches/gcc/trunk/01-patches | 356 -----
gcc/m2/patches/gcc/trunk/02-patches | 60 -
gcc/m2/patches/gcc/trunk/03-patches | 12 -
gcc/m2/patches/gcc/trunk/04-patches | 12 -
gcc/m2/patches/gcc/trunk/05-patches | 12 -
gcc/m2/patches/gcc/trunk/06-patches | 317 -----
gcc/m2/patches/gcc/trunk/07-patches | 40 -
gcc/m2/patches/gcc/trunk/08-patches | 55 -
gcc/m2/patches/gcc/trunk/09-patches | 1426 -------------------
gcc/m2/patches/gcc/trunk/10-patches | 100 --
gcc/m2/patches/gcc/trunk/11-patches | 12 -
gcc/m2/patches/gcc/trunk/12-patches | 16 -
gcc/m2/patches/gcc/trunk/13-patches | 13 -
gcc/m2/patches/gcc/trunk/15-patches | 12 -
gcc/m2/patches/gcc/trunk/23-patches | 33 -
gcc/m2/patches/gcc/trunk/24-patches | 60 -
gcc/m2/patches/gcc/trunk/25-patches | 42 -
gcc/m2/patches/gdb/6.3/01.waldek_patch_gdb | 83 --
gcc/m2/patches/gdb/6.3/02.gaius_patch_gdb | 1462 --------------------
gcc/m2/tools-src/array2index.py | 368 -----
gcc/m2/tools-src/buildsyntax | 91 --
gcc/m2/tools-src/def2texi.py | 2 +-
gcc/m2/tools-src/incfile | 34 -
gcc/m2/tools-src/makeconfigure | 341 -----
gcc/m2/tools-src/tidydates.py | 2 +-
136 files changed, 16 insertions(+), 17424 deletions(-)
diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index f07899a66a8..0d8cff2fdf3 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -52,9 +52,6 @@ including optimizers, support for different target architectures,
language front ends, and testsuites. @xref{gcc Directory, , The
@file{gcc} Subdirectory}, for details.
-@item gm2tools
-Support tools for Modula-2.
-
@item gnattools
Support tools for GNAT.
diff --git a/gcc/m2/config-lang.in b/gcc/m2/config-lang.in
index cdba438d99d..68bb525355a 100644
--- a/gcc/m2/config-lang.in
+++ b/gcc/m2/config-lang.in
@@ -58,7 +58,6 @@ mkdir -p m2/gm2-libs-boot
mkdir -p m2/gm2-ici-boot
mkdir -p m2/gm2-libiberty
mkdir -p m2/gm2-gcc
-mkdir -p m2/gm2-auto
mkdir -p m2/gm2-compiler
mkdir -p m2/gm2-libs
mkdir -p m2/gm2-libs-iso
@@ -75,9 +74,10 @@ mkdir -p stage1/m2 stage2/m2 stage3/m2 stage4/m2
# directories used by Make-maintainer
+mkdir -p m2/gm2-auto
+mkdir -p m2/gm2-pg-boot
+mkdir -p m2/gm2-pge-boot
+mkdir -p m2/gm2-ppg-boot
mkdir -p m2/mc-boot
mkdir -p m2/mc-boot-ch
mkdir -p m2/mc-boot-gen
-mkdir -p m2/gm2-ppg-boot
-mkdir -p m2/gm2-pge-boot
-mkdir -p m2/gm2-pg-boot
diff --git a/gcc/m2/gm2-gcc/gcc-consolidation.h b/gcc/m2/gm2-gcc/gcc-consolidation.h
index 1b4ae6df5fd..99f1c5b7455 100644
--- a/gcc/m2/gm2-gcc/gcc-consolidation.h
+++ b/gcc/m2/gm2-gcc/gcc-consolidation.h
@@ -51,9 +51,6 @@ along with GNU Modula-2; see the file COPYING3. If not see
#include "spellcheck.h"
#include "opt-suggestions.h"
-
-#if !defined(GM2TOOLS)
-
/* Utilize some of the C build routines. */
#include "fold-const.h"
@@ -93,5 +90,3 @@ along with GNU Modula-2; see the file COPYING3. If not see
#include "ipa-ref.h"
#include "cgraph.h"
#include "stmt.h"
-
-#endif /* GM2TOOLS. */
diff --git a/gcc/m2/init/gm2lccinit b/gcc/m2/init/gm2lccinit
deleted file mode 100755
index bd86cf93f9d..00000000000
--- a/gcc/m2/init/gm2lccinit
+++ /dev/null
@@ -1,54 +0,0 @@
-# gm2lccinit list of Modula-2 modules used by gm2lcc.
-#
-# Copyright (C) 2000-2020 Free Software Foundation, Inc.
-#
-# This file is part of GCC.
-#
-# GCC is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GCC is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GCC; see the file COPYING3. If not see
-# <http://www.gnu.org/licenses/>.
-#
-Debug
-DynamicStrings
-Assertion
-FormatStrings
-StringConvert
-StrLib
-RTExceptions
-M2EXCEPTION
-M2RTS
-SysExceptions
-Environment
-SEnvironment
-SysStorage
-Storage
-IO
-StdIO
-StrIO
-FIO
-SFIO
-CmdArgs
-NumberIO
-M2Defaults
-UnixArgs
-M2FileName
-M2Printf
-Indexing
-NameKey
-Args
-SArgs
-M2Search
-dtoa
-ldtoa
-gm2lcc
-mod_init
diff --git a/gcc/m2/init/gm2lgeninit b/gcc/m2/init/gm2lgeninit
deleted file mode 100755
index ec5c703af0b..00000000000
--- a/gcc/m2/init/gm2lgeninit
+++ /dev/null
@@ -1,55 +0,0 @@
-# gm2lgeninit list of Modula-2 modules used by gm2lgen.
-#
-# Copyright (C) 2000-2020 Free Software Foundation, Inc.
-#
-# This file is part of GCC.
-#
-# GCC is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GCC is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GCC; see the file COPYING3. If not see
-# <http://www.gnu.org/licenses/>.
-#
-Debug
-DynamicStrings
-Assertion
-FormatStrings
-StringConvert
-StrLib
-RTExceptions
-M2EXCEPTION
-M2RTS
-SysExceptions
-Environment
-SEnvironment
-IO
-StdIO
-NumberIO
-StrIO
-SysStorage
-Storage
-FIO
-SFIO
-CmdArgs
-M2Defaults
-UnixArgs
-M2FileName
-M2Printf
-Lists
-Indexing
-NameKey
-Args
-SArgs
-M2Search
-gm2lgen
-dtoa
-ldtoa
-mod_init
diff --git a/gcc/m2/init/gm2lorderinit b/gcc/m2/init/gm2lorderinit
deleted file mode 100755
index af16e1a948e..00000000000
--- a/gcc/m2/init/gm2lorderinit
+++ /dev/null
@@ -1,56 +0,0 @@
-# gm2lorderinit list of Modula-2 modules used by gm2lorder.
-#
-# Copyright (C) 2000-2020 Free Software Foundation, Inc.
-#
-# This file is part of GCC.
-#
-# GCC is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GCC is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GCC; see the file COPYING3. If not see
-# <http://www.gnu.org/licenses/>.
-#
-Debug
-DynamicStrings
-Assertion
-FormatStrings
-StringConvert
-StrLib
-RTExceptions
-M2EXCEPTION
-M2RTS
-SysExceptions
-Environment
-SEnvironment
-IO
-StdIO
-NumberIO
-StrIO
-SysStorage
-Storage
-FIO
-SFIO
-CmdArgs
-M2Defaults
-UnixArgs
-M2FileName
-M2Printf
-Lists
-Indexing
-NameKey
-Args
-SArgs
-M2Search
-dtoa
-ldtoa
-m2color
-gm2lorder
-mod_init
diff --git a/gcc/m2/init/gm2minit b/gcc/m2/init/gm2minit
deleted file mode 100755
index 49f30f0669c..00000000000
--- a/gcc/m2/init/gm2minit
+++ /dev/null
@@ -1,63 +0,0 @@
-# gm2minit list of Modula-2 modules used by gm2m.
-#
-# Copyright (C) 2000-2020 Free Software Foundation, Inc.
-#
-# This file is part of GCC.
-#
-# GCC is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GCC is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GCC; see the file COPYING3. If not see
-# <http://www.gnu.org/licenses/>.
-#
-Debug
-DynamicStrings
-Assertion
-FormatStrings
-StringConvert
-RTExceptions
-M2EXCEPTION
-M2RTS
-SysExceptions
-Environment
-SEnvironment
-IO
-StrLib
-StdIO
-StrIO
-FIO
-SFIO
-SysStorage
-Storage
-M2Defaults
-Indexing
-NameKey
-NumberIO
-CmdArgs
-UnixArgs
-SymbolKey
-M2Search
-M2Printf
-Args
-SArgs
-Lists
-M2Debug
-M2Error
-M2DriverOptions
-M2Preprocess
-choosetemp
-M2Version
-M2FileName
-M2LexBuf
-dtoa
-ldtoa
-gm2m
-mod_init
diff --git a/gcc/m2/m2-tree.h b/gcc/m2/m2-tree.h
index c9bae4424f2..ce8e261838c 100644
--- a/gcc/m2/m2-tree.h
+++ b/gcc/m2/m2-tree.h
@@ -27,23 +27,8 @@ along with GNU Modula-2; see the file COPYING3. If not see
#include "hashtab.h"
#include "vec.h"
-/* Currently disabled, as Modula-2 uses WORD (unsigned int) for a set
- type. */
-
-#if 0
-/* Modula-2 language-specific tree codes. */
-#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) SYM,
-enum m2_tree_code {
- M2_DUMMY_TREE_CODE = LAST_C_TREE_CODE,
-#include "gm2-tree.def"
- LAST_M2_TREE_CODE
-};
-#undef DEFTREECODE
+/* These macros provide convenient access to the various statement nodes. */
-#endif
-
-/* These macros provide convenient access to the various _STMT nodes
- created when parsing template declarations. */
#define TRY_STMTS(NODE) TREE_OPERAND (TRY_BLOCK_CHECK (NODE), 0)
#define TRY_HANDLERS(NODE) TREE_OPERAND (TRY_BLOCK_CHECK (NODE), 1)
diff --git a/gcc/m2/m2.flex b/gcc/m2/m2.flex
index 0709aae8e25..14e90f03fee 100644
--- a/gcc/m2/m2.flex
+++ b/gcc/m2/m2.flex
@@ -32,33 +32,21 @@ along with GNU Modula-2; see the file COPYING3. If not see
# include "ggc.h"
#endif
-#if defined(GM2TOOLS)
-# define START_FILE(F,L)
-# define END_FILE()
-# define START_LINE(N,S)
-# define GET_LOCATION(COLUMN_START,COLUMN_END) 0
-# define TIMEVAR_PUSH_LEX
-# define TIMEVAR_POP_LEX
-#else
-# include "timevar.h"
-
-# define START_FILE(F,L) m2linemap_StartFile(F,L)
-# define END_FILE() m2linemap_EndFile()
-# define START_LINE(N,S) m2linemap_StartLine(N,S)
-# define GET_LOCATION(COLUMN_START,COLUMN_END) \
- m2linemap_GetLocationRange(COLUMN_START,COLUMN_END)
-# define TIMEVAR_PUSH_LEX timevar_push (TV_LEX)
-# define TIMEVAR_POP_LEX timevar_pop (TV_LEX)
-#endif
+#include "timevar.h"
+#define START_FILE(F,L) m2linemap_StartFile(F,L)
+#define END_FILE() m2linemap_EndFile()
+#define START_LINE(N,S) m2linemap_StartLine(N,S)
+#define GET_LOCATION(COLUMN_START,COLUMN_END) \
+ m2linemap_GetLocationRange(COLUMN_START,COLUMN_END)
+#define TIMEVAR_PUSH_LEX timevar_push (TV_LEX)
+#define TIMEVAR_POP_LEX timevar_pop (TV_LEX)
#ifdef __cplusplus
#define EXTERN extern "C"
#endif
- /*
- * m2.flex - provides a lexical analyser for GNU Modula-2
- */
+ /* m2.flex provides a lexical analyser for GNU Modula-2. */
struct lineInfo {
char *linebuf; /* line contents */
diff --git a/gcc/m2/patches/gcc/11.1.0/01-patches b/gcc/m2/patches/gcc/11.1.0/01-patches
deleted file mode 100644
index e8ad8884110..00000000000
--- a/gcc/m2/patches/gcc/11.1.0/01-patches
+++ /dev/null
@@ -1,345 +0,0 @@
---- git-gcc/configure 2021-01-27 10:18:11.174735164 +0000
-+++ gm2-floppsie/configure 2021-01-27 12:58:15.702970949 +0000
-@@ -612,6 +612,7 @@
- DLLTOOL_FOR_TARGET
- AS_FOR_TARGET
- AR_FOR_TARGET
-+GM2_FOR_TARGET
- GDC_FOR_TARGET
- GOC_FOR_TARGET
- GFORTRAN_FOR_TARGET
-@@ -756,6 +757,7 @@
- docdir
- oldincludedir
- includedir
-+runstatedir
- localstatedir
- sharedstatedir
- sysconfdir
-@@ -792,6 +794,7 @@
- enable_libquadmath
- enable_libquadmath_support
- enable_libada
-+enable_libgm2
- enable_libssp
- enable_libstdcxx
- enable_liboffloadmic
-@@ -870,6 +873,7 @@
- GFORTRAN_FOR_TARGET
- GOC_FOR_TARGET
- GDC_FOR_TARGET
-+GM2_FOR_TARGET
- AR_FOR_TARGET
- AS_FOR_TARGET
- DLLTOOL_FOR_TARGET
-@@ -922,6 +926,7 @@
- sysconfdir='${prefix}/etc'
- sharedstatedir='${prefix}/com'
- localstatedir='${prefix}/var'
-+runstatedir='${localstatedir}/run'
- includedir='${prefix}/include'
- oldincludedir='/usr/include'
- docdir='${datarootdir}/doc/${PACKAGE}'
-@@ -1174,6 +1179,15 @@
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
-+ -runstatedir | --runstatedir | --runstatedi | --runstated \
-+ | --runstate | --runstat | --runsta | --runst | --runs \
-+ | --run | --ru | --r)
-+ ac_prev=runstatedir ;;
-+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
-+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
-+ | --run=* | --ru=* | --r=*)
-+ runstatedir=$ac_optarg ;;
-+
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-@@ -1311,7 +1325,7 @@
- for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
- datadir sysconfdir sharedstatedir localstatedir includedir \
- oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-- libdir localedir mandir
-+ libdir localedir mandir runstatedir
- do
- eval ac_val=\$$ac_var
- # Remove trailing slashes.
-@@ -1471,6 +1485,7 @@
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
-+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
-@@ -1524,6 +1539,7 @@
- --disable-libquadmath-support
- disable libquadmath support for Fortran
- --enable-libada build libada directory
-+ --enable-libgm2 build libgm2 directory
- --enable-libssp build libssp directory
- --disable-libstdcxx do not build libstdc++-v3 directory
- --enable-liboffloadmic=ARG
-@@ -1659,6 +1675,8 @@
- GOC for the target
- GDC_FOR_TARGET
- GDC for the target
-+ GM2_FOR_TARGET
-+ GM2 for the target
- AR_FOR_TARGET
- AR for the target
- AS_FOR_TARGET
-@@ -2818,6 +2836,7 @@
- target-libffi \
- target-libobjc \
- target-libada \
-+ target-libgm2 \
- target-libgo \
- target-libphobos \
- target-zlib"
-@@ -3147,6 +3166,15 @@
- noconfigdirs="$noconfigdirs gnattools"
- fi
-
-+# Check whether --enable-libgm2 was given.
-+if test "${enable_libgm2+set}" = set; then :
-+ enableval=$enable_libgm2; ENABLE_LIBGM2=$enableval
-+else
-+ ENABLE_LIBGM2=yes
-+fi
-+
-+
-+
- # Check whether --enable-libssp was given.
- if test "${enable_libssp+set}" = set; then :
- enableval=$enable_libssp; ENABLE_LIBSSP=$enableval
-@@ -13244,6 +13272,167 @@
-
-
-
-+if test -n "$GM2_FOR_TARGET"; then
-+ ac_cv_prog_GM2_FOR_TARGET=$GM2_FOR_TARGET
-+elif test -n "$ac_cv_prog_GM2_FOR_TARGET"; then
-+ GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
-+fi
-+
-+if test -n "$ac_cv_prog_GM2_FOR_TARGET"; then
-+ for ncn_progname in gm2; do
-+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
-+set dummy ${ncn_progname}; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if ${ac_cv_prog_GM2_FOR_TARGET+:} false; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ if test -n "$GM2_FOR_TARGET"; then
-+ ac_cv_prog_GM2_FOR_TARGET="$GM2_FOR_TARGET" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-+ ac_cv_prog_GM2_FOR_TARGET="${ncn_progname}"
-+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+ break 2
-+ fi
-+done
-+ done
-+IFS=$as_save_IFS
-+
-+fi
-+fi
-+GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
-+if test -n "$GM2_FOR_TARGET"; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GM2_FOR_TARGET" >&5
-+$as_echo "$GM2_FOR_TARGET" >&6; }
-+else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
-+
-+
-+ done
-+fi
-+
-+if test -z "$ac_cv_prog_GM2_FOR_TARGET" && test -n "$with_build_time_tools"; then
-+ for ncn_progname in gm2; do
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
-+$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
-+ if test -x $with_build_time_tools/${ncn_progname}; then
-+ ac_cv_prog_GM2_FOR_TARGET=$with_build_time_tools/${ncn_progname}
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
-+ break
-+ else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+ fi
-+ done
-+fi
-+
-+if test -z "$ac_cv_prog_GM2_FOR_TARGET"; then
-+ for ncn_progname in gm2; do
-+ if test -n "$ncn_target_tool_prefix"; then
-+ # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
-+set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if ${ac_cv_prog_GM2_FOR_TARGET+:} false; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ if test -n "$GM2_FOR_TARGET"; then
-+ ac_cv_prog_GM2_FOR_TARGET="$GM2_FOR_TARGET" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-+ ac_cv_prog_GM2_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
-+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+ break 2
-+ fi
-+done
-+ done
-+IFS=$as_save_IFS
-+
-+fi
-+fi
-+GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
-+if test -n "$GM2_FOR_TARGET"; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GM2_FOR_TARGET" >&5
-+$as_echo "$GM2_FOR_TARGET" >&6; }
-+else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
-+
-+
-+ fi
-+ if test -z "$ac_cv_prog_GM2_FOR_TARGET" && test $build = $target ; then
-+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
-+set dummy ${ncn_progname}; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if ${ac_cv_prog_GM2_FOR_TARGET+:} false; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ if test -n "$GM2_FOR_TARGET"; then
-+ ac_cv_prog_GM2_FOR_TARGET="$GM2_FOR_TARGET" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-+ ac_cv_prog_GM2_FOR_TARGET="${ncn_progname}"
-+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+ break 2
-+ fi
-+done
-+ done
-+IFS=$as_save_IFS
-+
-+fi
-+fi
-+GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
-+if test -n "$GM2_FOR_TARGET"; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GM2_FOR_TARGET" >&5
-+$as_echo "$GM2_FOR_TARGET" >&6; }
-+else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
-+
-+
-+ fi
-+ test -n "$ac_cv_prog_GM2_FOR_TARGET" && break
-+ done
-+fi
-+
-+if test -z "$ac_cv_prog_GM2_FOR_TARGET" ; then
-+ set dummy gm2
-+ if test $build = $target ; then
-+ GM2_FOR_TARGET="$2"
-+ else
-+ GM2_FOR_TARGET="${ncn_target_tool_prefix}$2"
-+ fi
-+else
-+ GM2_FOR_TARGET="$ac_cv_prog_GM2_FOR_TARGET"
-+fi
-+
-+
-+
- cat > conftest.c << \EOF
- #ifdef __GNUC__
- gcc_yay;
-@@ -16915,6 +17104,51 @@
- fi
- fi
-
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target gm2" >&5
-+$as_echo_n "checking where to find the target gm2... " >&6; }
-+if test "x${build}" != "x${host}" ; then
-+ if expr "x$GM2_FOR_TARGET" : "x/" > /dev/null; then
-+ # We already found the complete path
-+ ac_dir=`dirname $GM2_FOR_TARGET`
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
-+$as_echo "pre-installed in $ac_dir" >&6; }
-+ else
-+ # Canadian cross, just use what we found
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
-+$as_echo "pre-installed" >&6; }
-+ fi
-+else
-+ ok=yes
-+ case " ${configdirs} " in
-+ *" gcc "*) ;;
-+ *) ok=no ;;
-+ esac
-+ case ,${enable_languages}, in
-+ *,m2,*) ;;
-+ *) ok=no ;;
-+ esac
-+ if test $ok = yes; then
-+ # An in-tree tool is available and we can use it
-+ GM2_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/gm2 -B$$r/$(HOST_SUBDIR)/gcc/'
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
-+$as_echo "just compiled" >&6; }
-+ elif expr "x$GM2_FOR_TARGET" : "x/" > /dev/null; then
-+ # We already found the complete path
-+ ac_dir=`dirname $GM2_FOR_TARGET`
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
-+$as_echo "pre-installed in $ac_dir" >&6; }
-+ elif test "x$target" = "x$host"; then
-+ # We can use an host tool
-+ GM2_FOR_TARGET='$(GM2)'
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
-+$as_echo "host tool" >&6; }
-+ else
-+ # We need a cross tool
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
-+$as_echo "pre-installed" >&6; }
-+ fi
-+fi
-+
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target ld" >&5
- $as_echo_n "checking where to find the target ld... " >&6; }
- if test "x${build}" != "x${host}" ; then
-@@ -17476,6 +17710,8 @@
- # Specify what files to not compare during bootstrap.
-
- compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/*"
-+compare_exclusions="$compare_exclusions | *m2/*/M2Version*\$(objext)"
-+compare_exclusions="$compare_exclusions | *m2/*/SYSTEM*\$(objext)"
- case "$target" in
- hppa*64*-*-hpux*) ;;
- hppa*-*-hpux*) compare_exclusions="$compare_exclusions | */libgcc/lib2funcs* | gcc/function-tests.o" ;;
diff --git a/gcc/m2/patches/gcc/11.1.0/02-patches b/gcc/m2/patches/gcc/11.1.0/02-patches
deleted file mode 100644
index 9d5890ae2bc..00000000000
--- a/gcc/m2/patches/gcc/11.1.0/02-patches
+++ /dev/null
@@ -1,49 +0,0 @@
---- git-gcc/configure.ac 2021-01-27 10:18:11.174735164 +0000
-+++ gm2-floppsie/configure.ac 2021-01-27 12:58:00.794865361 +0000
-@@ -163,6 +163,7 @@
- target-libffi \
- target-libobjc \
- target-libada \
-+ target-libgm2 \
- target-libgo \
- target-libphobos \
- target-zlib"
-@@ -452,6 +453,12 @@
- noconfigdirs="$noconfigdirs gnattools"
- fi
-
-+AC_ARG_ENABLE(libgm2,
-+[AS_HELP_STRING([--enable-libgm2], [build libgm2 directory])],
-+ENABLE_LIBGM2=$enableval,
-+ENABLE_LIBGM2=yes)
-+
-+
- AC_ARG_ENABLE(libssp,
- [AS_HELP_STRING([--enable-libssp], [build libssp directory])],
- ENABLE_LIBSSP=$enableval,
-@@ -3504,6 +3511,7 @@
- NCN_STRICT_CHECK_TARGET_TOOLS(GFORTRAN_FOR_TARGET, gfortran)
- NCN_STRICT_CHECK_TARGET_TOOLS(GOC_FOR_TARGET, gccgo)
- NCN_STRICT_CHECK_TARGET_TOOLS(GDC_FOR_TARGET, gdc)
-+NCN_STRICT_CHECK_TARGET_TOOLS(GM2_FOR_TARGET, gm2)
-
- ACX_CHECK_INSTALLED_TARGET_TOOL(AR_FOR_TARGET, ar)
- ACX_CHECK_INSTALLED_TARGET_TOOL(AS_FOR_TARGET, as)
-@@ -3540,6 +3548,8 @@
- [gcc/gccgo -B$$r/$(HOST_SUBDIR)/gcc/], go)
- GCC_TARGET_TOOL(gdc, GDC_FOR_TARGET, GDC,
- [gcc/gdc -B$$r/$(HOST_SUBDIR)/gcc/], d)
-+GCC_TARGET_TOOL(gm2, GM2_FOR_TARGET, GM2,
-+ [gcc/gm2 -B$$r/$(HOST_SUBDIR)/gcc/], m2)
- GCC_TARGET_TOOL(ld, LD_FOR_TARGET, LD, [ld/ld-new])
- GCC_TARGET_TOOL(lipo, LIPO_FOR_TARGET, LIPO)
- GCC_TARGET_TOOL(nm, NM_FOR_TARGET, NM, [binutils/nm-new])
-@@ -3666,6 +3676,8 @@
- # Specify what files to not compare during bootstrap.
-
- compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/*"
-+compare_exclusions="$compare_exclusions | *m2/*/M2Version*\$(objext)"
-+compare_exclusions="$compare_exclusions | *m2/*/SYSTEM*\$(objext)"
- case "$target" in
- hppa*64*-*-hpux*) ;;
- hppa*-*-hpux*) compare_exclusions="$compare_exclusions | */libgcc/lib2funcs* | gcc/function-tests.o" ;;
diff --git a/gcc/m2/patches/gcc/11.1.0/03-patches b/gcc/m2/patches/gcc/11.1.0/03-patches
deleted file mode 100644
index 9ba16d9bfe1..00000000000
--- a/gcc/m2/patches/gcc/11.1.0/03-patches
+++ /dev/null
@@ -1,12 +0,0 @@
---- git-gcc/gcc/c/gccspec.c 2021-01-27 10:18:11.954740797 +0000
-+++ gm2-floppsie/gcc/c/gccspec.c 2021-01-27 12:58:00.794865361 +0000
-@@ -105,3 +105,9 @@
-
- /* Number of extra output files that lang_specific_pre_link may generate. */
- int lang_specific_extra_outfiles = 0; /* Not used for C. */
-+
-+/* lang_register_spec_functions. Not used for C. */
-+void
-+lang_register_spec_functions (void)
-+{
-+}
diff --git a/gcc/m2/patches/gcc/11.1.0/04-patches b/gcc/m2/patches/gcc/11.1.0/04-patches
deleted file mode 100644
index 18aba4a8491..00000000000
--- a/gcc/m2/patches/gcc/11.1.0/04-patches
+++ /dev/null
@@ -1,12 +0,0 @@
---- git-gcc/gcc/c-family/cppspec.c 2021-01-27 10:18:11.942740709 +0000
-+++ gm2-floppsie/gcc/c-family/cppspec.c 2021-01-27 12:58:00.798865389 +0000
-@@ -198,3 +198,9 @@
-
- /* Number of extra output files that lang_specific_pre_link may generate. */
- int lang_specific_extra_outfiles = 0; /* Not used for cpp. */
-+
-+/* lang_register_spec_functions. Not used for cpp. */
-+void
-+lang_register_spec_functions (void)
-+{
-+}
diff --git a/gcc/m2/patches/gcc/11.1.0/05-patches b/gcc/m2/patches/gcc/11.1.0/05-patches
deleted file mode 100644
index 246c218e446..00000000000
--- a/gcc/m2/patches/gcc/11.1.0/05-patches
+++ /dev/null
@@ -1,12 +0,0 @@
---- git-gcc/gcc/cp/g++spec.c 2021-01-27 10:18:12.410744089 +0000
-+++ gm2-floppsie/gcc/cp/g++spec.c 2021-01-27 12:58:00.798865389 +0000
-@@ -434,3 +434,9 @@
-
- /* Number of extra output files that lang_specific_pre_link may generate. */
- int lang_specific_extra_outfiles = 0; /* Not used for C++. */
-+
-+/* lang_register_spec_functions. Not used for C++. */
-+void
-+lang_register_spec_functions (void)
-+{
-+}
diff --git a/gcc/m2/patches/gcc/11.1.0/06-patches b/gcc/m2/patches/gcc/11.1.0/06-patches
deleted file mode 100644
index 03ac86edea1..00000000000
--- a/gcc/m2/patches/gcc/11.1.0/06-patches
+++ /dev/null
@@ -1,316 +0,0 @@
---- git-gcc/gcc/gcc.c 2021-01-27 10:18:12.614745562 +0000
-+++ gm2-floppsie/gcc/gcc.c 2021-01-27 12:58:00.806865446 +0000
-@@ -328,6 +328,10 @@
- static const char *cross_compile = "0";
- #endif
-
-+/* The lang specs might wish to override the default linker.
-+ */
-+int allow_linker = 1;
-+
- /* Greatest exit code of sub-processes that has been encountered up to
- now. */
- static int greatest_status = 1;
-@@ -356,7 +360,6 @@
- static struct compiler *lookup_compiler (const char *, size_t, const char *);
- static char *build_search_list (const struct path_prefix *, const char *,
- bool, bool);
--static void xputenv (const char *);
- static void putenv_from_prefixes (const struct path_prefix *, const char *,
- bool);
- static int access_check (const char *, int);
-@@ -1142,6 +1145,7 @@
- /* We pass any -flto flags on to the linker, which is expected
- to understand them. In practice, this means it had better be collect2. */
- /* %{e*} includes -export-dynamic; see comment in common.opt. */
-+
- #ifndef LINK_COMMAND_SPEC
- #define LINK_COMMAND_SPEC "\
- %{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
-@@ -1775,6 +1779,10 @@
- { 0, 0 }
- };
-
-+/* front end registered spec functions */
-+static struct spec_function *lang_spec_functions = NULL;
-+static unsigned int lang_spec_functions_length = 0;
-+
- static int processing_spec_function;
- \f
- /* Add appropriate libgcc specs to OBSTACK, taking into account
-@@ -2937,12 +2945,20 @@
-
- /* Add or change the value of an environment variable, outputting the
- change to standard error if in verbose mode. */
--static void
-+void
- xputenv (const char *string)
- {
- env.xput (string);
- }
-
-+/* Get the environment variable through the managed env. */
-+
-+const char *
-+xgetenv (const char *key)
-+{
-+ return env.get (key);
-+}
-+
- /* Build a list of search directories from PATHS.
- PREFIX is a string to prepend to the list.
- If CHECK_DIR_P is true we ensure the directory exists.
-@@ -3871,7 +3887,7 @@
- /* Save an option OPT with N_ARGS arguments in array ARGS, marking it
- as validated if VALIDATED and KNOWN if it is an internal switch. */
-
--static void
-+void
- save_switch (const char *opt, size_t n_args, const char *const *args,
- bool validated, bool known)
- {
-@@ -3916,6 +3932,66 @@
- setenv ("SOURCE_DATE_EPOCH", source_date_epoch, 0);
- }
-
-+void
-+fe_add_linker_option (const char *option)
-+{
-+ add_linker_option (option, strlen (option));
-+}
-+
-+/* Handle the -B option by adding the prefix to exec, startfile and
-+ include search paths. */
-+
-+void
-+handle_OPT_B (const char *arg)
-+{
-+ size_t len = strlen (arg);
-+
-+ /* Catch the case where the user has forgotten to append a
-+ directory separator to the path. Note, they may be using
-+ -B to add an executable name prefix, eg "i386-elf-", in
-+ order to distinguish between multiple installations of
-+ GCC in the same directory. Hence we must check to see
-+ if appending a directory separator actually makes a
-+ valid directory name. */
-+ if (!IS_DIR_SEPARATOR (arg[len - 1])
-+ && is_directory (arg, false))
-+ {
-+ char *tmp = XNEWVEC (char, len + 2);
-+ strcpy (tmp, arg);
-+ tmp[len] = DIR_SEPARATOR;
-+ tmp[++len] = 0;
-+ arg = tmp;
-+ }
-+
-+ add_prefix (&exec_prefixes, arg, NULL,
-+ PREFIX_PRIORITY_B_OPT, 0, 0);
-+ add_prefix (&startfile_prefixes, arg, NULL,
-+ PREFIX_PRIORITY_B_OPT, 0, 0);
-+ add_prefix (&include_prefixes, arg, NULL,
-+ PREFIX_PRIORITY_B_OPT, 0, 0);
-+}
-+
-+/* Save the infile. */
-+
-+void
-+fe_add_infile (const char *infile, const char *lang)
-+{
-+ add_infile (infile, lang);
-+}
-+
-+/* Mark a file as compiled. */
-+
-+void
-+fe_mark_compiled (const char *name)
-+{
-+ int max = n_infiles + lang_specific_extra_outfiles;
-+ int i;
-+
-+ for (i = 0; i < max; i++)
-+ if (filename_cmp (name, infiles[i].name) == 0)
-+ infiles[i].compiled = true;
-+}
-+
- /* Handle an option DECODED that is unknown to the option-processing
- machinery. */
-
-@@ -4417,33 +4493,7 @@
- break;
-
- case OPT_B:
-- {
-- size_t len = strlen (arg);
--
-- /* Catch the case where the user has forgotten to append a
-- directory separator to the path. Note, they may be using
-- -B to add an executable name prefix, eg "i386-elf-", in
-- order to distinguish between multiple installations of
-- GCC in the same directory. Hence we must check to see
-- if appending a directory separator actually makes a
-- valid directory name. */
-- if (!IS_DIR_SEPARATOR (arg[len - 1])
-- && is_directory (arg, false))
-- {
-- char *tmp = XNEWVEC (char, len + 2);
-- strcpy (tmp, arg);
-- tmp[len] = DIR_SEPARATOR;
-- tmp[++len] = 0;
-- arg = tmp;
-- }
--
-- add_prefix (&exec_prefixes, arg, NULL,
-- PREFIX_PRIORITY_B_OPT, 0, 0);
-- add_prefix (&startfile_prefixes, arg, NULL,
-- PREFIX_PRIORITY_B_OPT, 0, 0);
-- add_prefix (&include_prefixes, arg, NULL,
-- PREFIX_PRIORITY_B_OPT, 0, 0);
-- }
-+ handle_OPT_B (arg);
- validated = true;
- break;
-
-@@ -4566,6 +4616,68 @@
- return ret;
- }
-
-+/* print_option a debugging routine to display option i with a leading desc
-+ string. */
-+
-+void
-+print_option (const char *desc, unsigned int i,
-+ struct cl_decoded_option *in_decoded_options)
-+{
-+ printf (desc);
-+ printf (" [%d]", i);
-+ switch (in_decoded_options[i].opt_index)
-+ {
-+
-+ case N_OPTS:
-+ break;
-+ case OPT_SPECIAL_unknown:
-+ printf (" flag <unknown>");
-+ break;
-+ case OPT_SPECIAL_ignore:
-+ printf (" flag <ignore>");
-+ break;
-+ case OPT_SPECIAL_program_name:
-+ printf (" flag <program name>");
-+ break;
-+ case OPT_SPECIAL_input_file:
-+ printf (" flag <input file name>");
-+ break;
-+ default:
-+ printf (" flag [%s]",
-+ cl_options[in_decoded_options[i].opt_index].opt_text);
-+ }
-+
-+ if (in_decoded_options[i].arg == NULL)
-+ printf (" no arg");
-+ else
-+ printf (" arg [%s]", in_decoded_options[i].arg);
-+ printf (" orig text [%s]",
-+ in_decoded_options[i].orig_option_with_args_text);
-+ printf (" value [%ld]", in_decoded_options[i].value);
-+ printf (" error [%d]\n", in_decoded_options[i].errors);
-+}
-+
-+/* print_options display all options with a leading string desc. */
-+
-+void
-+print_options (const char *desc,
-+ unsigned int in_decoded_options_count,
-+ struct cl_decoded_option *in_decoded_options)
-+{
-+ for (unsigned int i = 0; i < in_decoded_options_count; i++)
-+ print_option (desc, i, in_decoded_options);
-+}
-+
-+/* dbg_options display all options. */
-+
-+void
-+dbg_options (unsigned int in_decoded_options_count,
-+ struct cl_decoded_option *in_decoded_options)
-+{
-+ print_options ("dbg_options", in_decoded_options_count,
-+ in_decoded_options);
-+}
-+
- /* Create the vector `switches' and its contents.
- Store its length in `n_switches'. */
-
-@@ -6720,6 +6832,33 @@
- return 0;
- }
-
-+/* Allow the front end to register a spec function. */
-+
-+void fe_add_spec_function (const char *name, const char *(*func) (int, const char **))
-+{
-+ const struct spec_function *f = lookup_spec_function (name);
-+ struct spec_function *fl;
-+ unsigned int i;
-+
-+ if (f != NULL)
-+ fatal_error (input_location, "spec function (%s) already registered", name);
-+
-+ if (lang_spec_functions == NULL)
-+ lang_spec_functions_length = 1;
-+
-+ lang_spec_functions_length++;
-+ fl = (struct spec_function *) xmalloc (sizeof (const struct spec_function)*lang_spec_functions_length);
-+ for (i=0; i<lang_spec_functions_length-2; i++)
-+ fl[i] = lang_spec_functions[i];
-+ free (lang_spec_functions);
-+ lang_spec_functions = fl;
-+
-+ lang_spec_functions[lang_spec_functions_length-2].name = name;
-+ lang_spec_functions[lang_spec_functions_length-2].func = func;
-+ lang_spec_functions[lang_spec_functions_length-1].name = NULL;
-+ lang_spec_functions[lang_spec_functions_length-1].func = NULL;
-+}
-+
- /* Look up a spec function. */
-
- static const struct spec_function *
-@@ -6731,6 +6870,11 @@
- if (strcmp (sf->name, name) == 0)
- return sf;
-
-+ if (lang_spec_functions != NULL)
-+ for (sf = lang_spec_functions; sf->name != NULL; sf++)
-+ if (strcmp (sf->name, name) == 0)
-+ return sf;
-+
- return NULL;
- }
-
-@@ -8217,6 +8361,8 @@
- accel_dir_suffix, dir_separator_str, NULL);
- just_machine_suffix = concat (spec_machine, dir_separator_str, NULL);
-
-+ lang_register_spec_functions ();
-+
- specs_file = find_a_file (&startfile_prefixes, "specs", R_OK, true);
- /* Read the specs file unless it is a default one. */
- if (specs_file != 0 && strcmp (specs_file, "specs"))
-@@ -8947,7 +9093,8 @@
-
- /* Run ld to link all the compiler output files. */
-
-- if (num_linker_inputs > 0 && !seen_error () && print_subprocess_help < 2)
-+ if (num_linker_inputs > 0 && !seen_error () && print_subprocess_help < 2
-+ && allow_linker)
- {
- int tmp = execution_count;
-
-@@ -9016,7 +9163,7 @@
- /* If options said don't run linker,
- complain about input files to be given to the linker. */
-
-- if (! linker_was_run && !seen_error ())
-+ if (! linker_was_run && !seen_error () && allow_linker)
- for (i = 0; (int) i < n_infiles; i++)
- if (explicit_link_files[i]
- && !(infiles[i].language && infiles[i].language[0] == '*'))
diff --git a/gcc/m2/patches/gcc/11.1.0/07-patches b/gcc/m2/patches/gcc/11.1.0/07-patches
deleted file mode 100644
index 0b33adbf88d..00000000000
--- a/gcc/m2/patches/gcc/11.1.0/07-patches
+++ /dev/null
@@ -1,40 +0,0 @@
---- git-gcc/gcc/gcc.h 2021-01-27 10:18:12.614745562 +0000
-+++ gm2-floppsie/gcc/gcc.h 2021-01-27 12:58:00.806865446 +0000
-@@ -73,9 +73,28 @@
- extern int do_spec (const char *);
- extern void record_temp_file (const char *, int, int);
- extern void set_input (const char *);
-+extern void save_switch (const char *opt, size_t n_args,
-+ const char *const *args,
-+ bool validated, bool known);
-+extern void handle_OPT_B (const char *arg);
-+extern void fe_add_infile (const char *infile, const char *lang);
-+extern void fe_add_linker_option (const char *option);
-+extern void fe_add_spec_function (const char *name, const char *(*func) (int, const char **));
-+extern void xputenv (const char *value);
-+extern const char *xgetenv (const char *key);
-+extern void print_options (const char *desc,
-+ unsigned int in_decoded_options_count,
-+ struct cl_decoded_option *in_decoded_options);
-+extern void print_option (const char *desc, unsigned int i,
-+ struct cl_decoded_option *in_decoded_options);
-+extern void dbg_options (unsigned int in_decoded_options_count,
-+ struct cl_decoded_option *in_decoded_options);
-+
-
- /* Spec files linked with gcc.c must provide definitions for these. */
-
-+extern void lang_register_spec_functions (void);
-+
- /* Called before processing to change/add/remove arguments. */
- extern void lang_specific_driver (struct cl_decoded_option **,
- unsigned int *, int *);
-@@ -97,4 +116,8 @@
- void *user_data),
- void *user_data);
-
-+/* Default setting is true, but can be overridden by the language
-+ front end to prohibit the linker from being invoked. */
-+extern int allow_linker;
-+
- #endif /* ! GCC_GCC_H */
diff --git a/gcc/m2/patches/gcc/11.1.0/08-patches b/gcc/m2/patches/gcc/11.1.0/08-patches
deleted file mode 100644
index fa336377154..00000000000
--- a/gcc/m2/patches/gcc/11.1.0/08-patches
+++ /dev/null
@@ -1,27 +0,0 @@
---- git-gcc/Makefile.def 2021-01-27 10:18:11.138734904 +0000
-+++ gm2-floppsie/Makefile.def 2021-01-27 12:58:00.810865474 +0000
-@@ -180,6 +180,7 @@
- target_modules = { module= zlib; };
- target_modules = { module= rda; };
- target_modules = { module= libada; };
-+target_modules = { module= libgm2; lib_path=.libs; };
- target_modules = { module= libgomp; bootstrap= true; lib_path=.libs; };
- target_modules = { module= libitm; lib_path=.libs; };
- target_modules = { module= libatomic; lib_path=.libs; };
-@@ -298,6 +299,8 @@
- flags_to_pass = { flag= GOCFLAGS_FOR_TARGET ; };
- flags_to_pass = { flag= GDC_FOR_TARGET ; };
- flags_to_pass = { flag= GDCFLAGS_FOR_TARGET ; };
-+flags_to_pass = { flag= GM2_FOR_TARGET ; };
-+flags_to_pass = { flag= GM2FLAGS_FOR_TARGET ; };
- flags_to_pass = { flag= LD_FOR_TARGET ; };
- flags_to_pass = { flag= LIPO_FOR_TARGET ; };
- flags_to_pass = { flag= LDFLAGS_FOR_TARGET ; };
-@@ -652,6 +655,7 @@
- languages = { language=go; gcc-check-target=check-go;
- lib-check-target=check-target-libgo;
- lib-check-target=check-gotools; };
-+languages = { language=m2; gcc-check-target=check-m2; };
- languages = { language=brig; gcc-check-target=check-brig;
- lib-check-target=check-target-libhsail-rt; };
- languages = { language=d; gcc-check-target=check-d;
diff --git a/gcc/m2/patches/gcc/11.1.0/09-patches b/gcc/m2/patches/gcc/11.1.0/09-patches
deleted file mode 100644
index 705b24fe017..00000000000
--- a/gcc/m2/patches/gcc/11.1.0/09-patches
+++ /dev/null
@@ -1,778 +0,0 @@
---- git-gcc/Makefile.in 2021-01-27 10:18:11.150734991 +0000
-+++ gm2-floppsie/Makefile.in 2021-01-27 12:58:13.000000000 +0000
-@@ -158,6 +158,7 @@
- GOCFLAGS="$(GOCFLAGS_FOR_BUILD)"; export GOCFLAGS; \
- GDC="$(GDC_FOR_BUILD)"; export GDC; \
- GDCFLAGS="$(GDCFLAGS_FOR_BUILD)"; export GDCFLAGS; \
-+ GM2="$(GM2_FOR_BUILD)"; export GM2; \
- DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
- LD="$(LD_FOR_BUILD)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
-@@ -195,6 +196,7 @@
- GFORTRAN="$(GFORTRAN)"; export GFORTRAN; \
- GOC="$(GOC)"; export GOC; \
- GDC="$(GDC)"; export GDC; \
-+ GM2="$(GM2)"; export GM2; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
-@@ -293,6 +295,7 @@
- GFORTRAN="$(GFORTRAN_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GFORTRAN; \
- GOC="$(GOC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GOC; \
- GDC="$(GDC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GDC; \
-+ GM2="$(GM2_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GM2; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
-@@ -359,6 +362,7 @@
- GFORTRAN_FOR_BUILD = @GFORTRAN_FOR_BUILD@
- GOC_FOR_BUILD = @GOC_FOR_BUILD@
- GDC_FOR_BUILD = @GDC_FOR_BUILD@
-+GM2_FOR_BUILD = @GM2_FOR_BUILD@
- LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
- LD_FOR_BUILD = @LD_FOR_BUILD@
- NM_FOR_BUILD = @NM_FOR_BUILD@
-@@ -428,6 +432,7 @@
- LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
- GOCFLAGS = $(CFLAGS)
- GDCFLAGS = $(CFLAGS)
-+GM2FLAGS = $(CFLAGS)
-
- CREATE_GCOV = create_gcov
-
-@@ -565,7 +570,7 @@
- STAGEtrain_CFLAGS = $(filter-out -fchecking=1,$(STAGE3_CFLAGS))
- STAGEtrain_TFLAGS = $(filter-out -fchecking=1,$(STAGE3_TFLAGS))
-
--STAGEfeedback_CFLAGS = $(STAGE4_CFLAGS) -fprofile-use -fprofile-reproducible=parallel-runs
-+STAGEfeedback_CFLAGS = $(STAGE4_CFLAGS) -fprofile-use
- STAGEfeedback_TFLAGS = $(STAGE4_TFLAGS)
-
- STAGEautoprofile_CFLAGS = $(STAGE2_CFLAGS) -g
-@@ -595,6 +600,7 @@
- GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@
- GOC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GOC_FOR_TARGET@
- GDC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GDC_FOR_TARGET@
-+GM2_FOR_TARGET=$(STAGE_CC_WRAPPER) @GM2_FOR_TARGET@
- DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
- LD_FOR_TARGET=@LD_FOR_TARGET@
-
-@@ -645,7 +651,7 @@
-
- # This is the list of directories that may be needed in RPATH_ENVVAR
- # so that programs built for the target machine work.
--TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libsanitizer)$(TARGET_LIB_PATH_libvtv)$(TARGET_LIB_PATH_liboffloadmic)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libphobos)$(TARGET_LIB_PATH_libgomp)$(TARGET_LIB_PATH_libitm)$(TARGET_LIB_PATH_libatomic)$(HOST_LIB_PATH_gcc)
-+TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libsanitizer)$(TARGET_LIB_PATH_libvtv)$(TARGET_LIB_PATH_liboffloadmic)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libphobos)$(TARGET_LIB_PATH_libgm2)$(TARGET_LIB_PATH_libgomp)$(TARGET_LIB_PATH_libitm)$(TARGET_LIB_PATH_libatomic)$(HOST_LIB_PATH_gcc)
-
- @if target-libstdc++-v3
- TARGET_LIB_PATH_libstdc++-v3 = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:
-@@ -671,6 +677,10 @@
- TARGET_LIB_PATH_libphobos = $$r/$(TARGET_SUBDIR)/libphobos/src/.libs:
- @endif target-libphobos
-
-+@if target-libgm2
-+TARGET_LIB_PATH_libgm2 = $$r/$(TARGET_SUBDIR)/libgm2/.libs:
-+@endif target-libgm2
-+
- @if target-libgomp
- TARGET_LIB_PATH_libgomp = $$r/$(TARGET_SUBDIR)/libgomp/.libs:
- @endif target-libgomp
-@@ -820,6 +830,8 @@
- "GOCFLAGS_FOR_TARGET=$(GOCFLAGS_FOR_TARGET)" \
- "GDC_FOR_TARGET=$(GDC_FOR_TARGET)" \
- "GDCFLAGS_FOR_TARGET=$(GDCFLAGS_FOR_TARGET)" \
-+ "GM2_FOR_TARGET=$(GM2_FOR_TARGET)" \
-+ "GM2FLAGS_FOR_TARGET=$(GM2FLAGS_FOR_TARGET)" \
- "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
- "LIPO_FOR_TARGET=$(LIPO_FOR_TARGET)" \
- "LDFLAGS_FOR_TARGET=$(LDFLAGS_FOR_TARGET)" \
-@@ -892,6 +904,7 @@
- 'GFORTRAN=$(GFORTRAN)' \
- 'GOC=$(GOC)' \
- 'GDC=$(GDC)' \
-+ 'GM2=$(GM2)' \
- 'LD=$(LD)' \
- 'LIPO=$(LIPO)' \
- 'NM=$(NM)' \
-@@ -918,6 +931,7 @@
- CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \
- CXX="$${CXX}" CXX_FOR_BUILD="$${CXX_FOR_BUILD}" \
- GDC="$${GDC}" GDC_FOR_BUILD="$${GDC_FOR_BUILD}" \
-+ GM2="$${GM2}" GM2_FOR_BUILD="$${GM2_FOR_BUILD}" \
- GNATBIND="$${GNATBIND}" \
- LDFLAGS="$${LDFLAGS}" \
- HOST_LIBS="$${HOST_LIBS}" \
-@@ -952,6 +966,8 @@
- 'GOCFLAGS=$$(GOCFLAGS_FOR_TARGET)' \
- 'GDC=$$(GDC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
- 'GDCFLAGS=$$(GDCFLAGS_FOR_TARGET)' \
-+ 'GM2=$$(GM2_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
-+ 'GM2FLAGS=$$(GM2FLAGS_FOR_TARGET)' \
- 'LD=$(COMPILER_LD_FOR_TARGET)' \
- 'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \
- 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
-@@ -978,6 +994,7 @@
- # cross-building scheme.
- EXTRA_GCC_FLAGS = \
- "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
-+ "GM2_FOR_TARGET=$(GM2_FOR_TARGET)" \
- "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
- "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"
-
-@@ -1067,6 +1084,7 @@
- maybe-configure-target-zlib \
- maybe-configure-target-rda \
- maybe-configure-target-libada \
-+ maybe-configure-target-libgm2 \
- maybe-configure-target-libgomp \
- maybe-configure-target-libitm \
- maybe-configure-target-libatomic
-@@ -1240,6 +1258,7 @@
- all-target: maybe-all-target-zlib
- all-target: maybe-all-target-rda
- all-target: maybe-all-target-libada
-+all-target: maybe-all-target-libgm2
- @if target-libgomp-no-bootstrap
- all-target: maybe-all-target-libgomp
- @endif target-libgomp-no-bootstrap
-@@ -1338,6 +1357,7 @@
- info-target: maybe-info-target-zlib
- info-target: maybe-info-target-rda
- info-target: maybe-info-target-libada
-+info-target: maybe-info-target-libgm2
- info-target: maybe-info-target-libgomp
- info-target: maybe-info-target-libitm
- info-target: maybe-info-target-libatomic
-@@ -1429,6 +1449,7 @@
- dvi-target: maybe-dvi-target-zlib
- dvi-target: maybe-dvi-target-rda
- dvi-target: maybe-dvi-target-libada
-+dvi-target: maybe-dvi-target-libgm2
- dvi-target: maybe-dvi-target-libgomp
- dvi-target: maybe-dvi-target-libitm
- dvi-target: maybe-dvi-target-libatomic
-@@ -1520,6 +1541,7 @@
- pdf-target: maybe-pdf-target-zlib
- pdf-target: maybe-pdf-target-rda
- pdf-target: maybe-pdf-target-libada
-+pdf-target: maybe-pdf-target-libgm2
- pdf-target: maybe-pdf-target-libgomp
- pdf-target: maybe-pdf-target-libitm
- pdf-target: maybe-pdf-target-libatomic
-@@ -1611,6 +1633,7 @@
- html-target: maybe-html-target-zlib
- html-target: maybe-html-target-rda
- html-target: maybe-html-target-libada
-+html-target: maybe-html-target-libgm2
- html-target: maybe-html-target-libgomp
- html-target: maybe-html-target-libitm
- html-target: maybe-html-target-libatomic
-@@ -1702,6 +1725,7 @@
- TAGS-target: maybe-TAGS-target-zlib
- TAGS-target: maybe-TAGS-target-rda
- TAGS-target: maybe-TAGS-target-libada
-+TAGS-target: maybe-TAGS-target-libgm2
- TAGS-target: maybe-TAGS-target-libgomp
- TAGS-target: maybe-TAGS-target-libitm
- TAGS-target: maybe-TAGS-target-libatomic
-@@ -1793,6 +1817,7 @@
- install-info-target: maybe-install-info-target-zlib
- install-info-target: maybe-install-info-target-rda
- install-info-target: maybe-install-info-target-libada
-+install-info-target: maybe-install-info-target-libgm2
- install-info-target: maybe-install-info-target-libgomp
- install-info-target: maybe-install-info-target-libitm
- install-info-target: maybe-install-info-target-libatomic
-@@ -1884,6 +1909,7 @@
- install-pdf-target: maybe-install-pdf-target-zlib
- install-pdf-target: maybe-install-pdf-target-rda
- install-pdf-target: maybe-install-pdf-target-libada
-+install-pdf-target: maybe-install-pdf-target-libgm2
- install-pdf-target: maybe-install-pdf-target-libgomp
- install-pdf-target: maybe-install-pdf-target-libitm
- install-pdf-target: maybe-install-pdf-target-libatomic
-@@ -1975,6 +2001,7 @@
- install-html-target: maybe-install-html-target-zlib
- install-html-target: maybe-install-html-target-rda
- install-html-target: maybe-install-html-target-libada
-+install-html-target: maybe-install-html-target-libgm2
- install-html-target: maybe-install-html-target-libgomp
- install-html-target: maybe-install-html-target-libitm
- install-html-target: maybe-install-html-target-libatomic
-@@ -2066,6 +2093,7 @@
- installcheck-target: maybe-installcheck-target-zlib
- installcheck-target: maybe-installcheck-target-rda
- installcheck-target: maybe-installcheck-target-libada
-+installcheck-target: maybe-installcheck-target-libgm2
- installcheck-target: maybe-installcheck-target-libgomp
- installcheck-target: maybe-installcheck-target-libitm
- installcheck-target: maybe-installcheck-target-libatomic
-@@ -2157,6 +2185,7 @@
- mostlyclean-target: maybe-mostlyclean-target-zlib
- mostlyclean-target: maybe-mostlyclean-target-rda
- mostlyclean-target: maybe-mostlyclean-target-libada
-+mostlyclean-target: maybe-mostlyclean-target-libgm2
- mostlyclean-target: maybe-mostlyclean-target-libgomp
- mostlyclean-target: maybe-mostlyclean-target-libitm
- mostlyclean-target: maybe-mostlyclean-target-libatomic
-@@ -2248,6 +2277,7 @@
- clean-target: maybe-clean-target-zlib
- clean-target: maybe-clean-target-rda
- clean-target: maybe-clean-target-libada
-+clean-target: maybe-clean-target-libgm2
- clean-target: maybe-clean-target-libgomp
- clean-target: maybe-clean-target-libitm
- clean-target: maybe-clean-target-libatomic
-@@ -2339,6 +2369,7 @@
- distclean-target: maybe-distclean-target-zlib
- distclean-target: maybe-distclean-target-rda
- distclean-target: maybe-distclean-target-libada
-+distclean-target: maybe-distclean-target-libgm2
- distclean-target: maybe-distclean-target-libgomp
- distclean-target: maybe-distclean-target-libitm
- distclean-target: maybe-distclean-target-libatomic
-@@ -2430,6 +2461,7 @@
- maintainer-clean-target: maybe-maintainer-clean-target-zlib
- maintainer-clean-target: maybe-maintainer-clean-target-rda
- maintainer-clean-target: maybe-maintainer-clean-target-libada
-+maintainer-clean-target: maybe-maintainer-clean-target-libgm2
- maintainer-clean-target: maybe-maintainer-clean-target-libgomp
- maintainer-clean-target: maybe-maintainer-clean-target-libitm
- maintainer-clean-target: maybe-maintainer-clean-target-libatomic
-@@ -2577,6 +2609,7 @@
- maybe-check-target-zlib \
- maybe-check-target-rda \
- maybe-check-target-libada \
-+ maybe-check-target-libgm2 \
- maybe-check-target-libgomp \
- maybe-check-target-libitm \
- maybe-check-target-libatomic
-@@ -2770,6 +2803,7 @@
- maybe-install-target-zlib \
- maybe-install-target-rda \
- maybe-install-target-libada \
-+ maybe-install-target-libgm2 \
- maybe-install-target-libgomp \
- maybe-install-target-libitm \
- maybe-install-target-libatomic
-@@ -2881,6 +2915,7 @@
- maybe-install-strip-target-zlib \
- maybe-install-strip-target-rda \
- maybe-install-strip-target-libada \
-+ maybe-install-strip-target-libgm2 \
- maybe-install-strip-target-libgomp \
- maybe-install-strip-target-libitm \
- maybe-install-strip-target-libatomic
-@@ -54794,6 +54829,464 @@
-
-
-
-+.PHONY: configure-target-libgm2 maybe-configure-target-libgm2
-+maybe-configure-target-libgm2:
-+@if gcc-bootstrap
-+configure-target-libgm2: stage_current
-+@endif gcc-bootstrap
-+@if target-libgm2
-+maybe-configure-target-libgm2: configure-target-libgm2
-+configure-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ echo "Checking multilib configuration for libgm2..."; \
-+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgm2; \
-+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgm2/multilib.tmp 2> /dev/null; \
-+ if test -r $(TARGET_SUBDIR)/libgm2/multilib.out; then \
-+ if cmp -s $(TARGET_SUBDIR)/libgm2/multilib.tmp $(TARGET_SUBDIR)/libgm2/multilib.out; then \
-+ rm -f $(TARGET_SUBDIR)/libgm2/multilib.tmp; \
-+ else \
-+ rm -f $(TARGET_SUBDIR)/libgm2/Makefile; \
-+ mv $(TARGET_SUBDIR)/libgm2/multilib.tmp $(TARGET_SUBDIR)/libgm2/multilib.out; \
-+ fi; \
-+ else \
-+ mv $(TARGET_SUBDIR)/libgm2/multilib.tmp $(TARGET_SUBDIR)/libgm2/multilib.out; \
-+ fi; \
-+ test ! -f $(TARGET_SUBDIR)/libgm2/Makefile || exit 0; \
-+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgm2; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo Configuring in $(TARGET_SUBDIR)/libgm2; \
-+ cd "$(TARGET_SUBDIR)/libgm2" || exit 1; \
-+ case $(srcdir) in \
-+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-+ *) topdir=`echo $(TARGET_SUBDIR)/libgm2/ | \
-+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-+ esac; \
-+ module_srcdir=libgm2; \
-+ rm -f no-such-file || : ; \
-+ CONFIG_SITE=no-such-file $(SHELL) \
-+ $$s/$$module_srcdir/configure \
-+ --srcdir=$${topdir}/$$module_srcdir \
-+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
-+ --target=${target_alias} \
-+ || exit 1
-+@endif target-libgm2
-+
-+
-+
-+
-+
-+.PHONY: all-target-libgm2 maybe-all-target-libgm2
-+maybe-all-target-libgm2:
-+@if gcc-bootstrap
-+all-target-libgm2: stage_current
-+@endif gcc-bootstrap
-+@if target-libgm2
-+TARGET-target-libgm2=all
-+maybe-all-target-libgm2: all-target-libgm2
-+all-target-libgm2: configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
-+ $(TARGET-target-libgm2))
-+@endif target-libgm2
-+
-+
-+
-+
-+
-+.PHONY: check-target-libgm2 maybe-check-target-libgm2
-+maybe-check-target-libgm2:
-+@if target-libgm2
-+maybe-check-target-libgm2: check-target-libgm2
-+
-+check-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
-+
-+@endif target-libgm2
-+
-+.PHONY: install-target-libgm2 maybe-install-target-libgm2
-+maybe-install-target-libgm2:
-+@if target-libgm2
-+maybe-install-target-libgm2: install-target-libgm2
-+
-+install-target-libgm2: installdirs
-+ @: $(MAKE); $(unstage)
-+ @r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
-+
-+@endif target-libgm2
-+
-+.PHONY: install-strip-target-libgm2 maybe-install-strip-target-libgm2
-+maybe-install-strip-target-libgm2:
-+@if target-libgm2
-+maybe-install-strip-target-libgm2: install-strip-target-libgm2
-+
-+install-strip-target-libgm2: installdirs
-+ @: $(MAKE); $(unstage)
-+ @r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install-strip)
-+
-+@endif target-libgm2
-+
-+# Other targets (info, dvi, pdf, etc.)
-+
-+.PHONY: maybe-info-target-libgm2 info-target-libgm2
-+maybe-info-target-libgm2:
-+@if target-libgm2
-+maybe-info-target-libgm2: info-target-libgm2
-+
-+info-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing info in $(TARGET_SUBDIR)/libgm2"; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ info) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-dvi-target-libgm2 dvi-target-libgm2
-+maybe-dvi-target-libgm2:
-+@if target-libgm2
-+maybe-dvi-target-libgm2: dvi-target-libgm2
-+
-+dvi-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing dvi in $(TARGET_SUBDIR)/libgm2"; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ dvi) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-pdf-target-libgm2 pdf-target-libgm2
-+maybe-pdf-target-libgm2:
-+@if target-libgm2
-+maybe-pdf-target-libgm2: pdf-target-libgm2
-+
-+pdf-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing pdf in $(TARGET_SUBDIR)/libgm2"; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ pdf) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-html-target-libgm2 html-target-libgm2
-+maybe-html-target-libgm2:
-+@if target-libgm2
-+maybe-html-target-libgm2: html-target-libgm2
-+
-+html-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing html in $(TARGET_SUBDIR)/libgm2"; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ html) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-TAGS-target-libgm2 TAGS-target-libgm2
-+maybe-TAGS-target-libgm2:
-+@if target-libgm2
-+maybe-TAGS-target-libgm2: TAGS-target-libgm2
-+
-+TAGS-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing TAGS in $(TARGET_SUBDIR)/libgm2"; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ TAGS) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-install-info-target-libgm2 install-info-target-libgm2
-+maybe-install-info-target-libgm2:
-+@if target-libgm2
-+maybe-install-info-target-libgm2: install-info-target-libgm2
-+
-+install-info-target-libgm2: \
-+ configure-target-libgm2 \
-+ info-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing install-info in $(TARGET_SUBDIR)/libgm2"; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ install-info) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-install-pdf-target-libgm2 install-pdf-target-libgm2
-+maybe-install-pdf-target-libgm2:
-+@if target-libgm2
-+maybe-install-pdf-target-libgm2: install-pdf-target-libgm2
-+
-+install-pdf-target-libgm2: \
-+ configure-target-libgm2 \
-+ pdf-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libgm2"; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ install-pdf) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-install-html-target-libgm2 install-html-target-libgm2
-+maybe-install-html-target-libgm2:
-+@if target-libgm2
-+maybe-install-html-target-libgm2: install-html-target-libgm2
-+
-+install-html-target-libgm2: \
-+ configure-target-libgm2 \
-+ html-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing install-html in $(TARGET_SUBDIR)/libgm2"; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ install-html) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-installcheck-target-libgm2 installcheck-target-libgm2
-+maybe-installcheck-target-libgm2:
-+@if target-libgm2
-+maybe-installcheck-target-libgm2: installcheck-target-libgm2
-+
-+installcheck-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing installcheck in $(TARGET_SUBDIR)/libgm2"; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ installcheck) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-mostlyclean-target-libgm2 mostlyclean-target-libgm2
-+maybe-mostlyclean-target-libgm2:
-+@if target-libgm2
-+maybe-mostlyclean-target-libgm2: mostlyclean-target-libgm2
-+
-+mostlyclean-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgm2"; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ mostlyclean) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-clean-target-libgm2 clean-target-libgm2
-+maybe-clean-target-libgm2:
-+@if target-libgm2
-+maybe-clean-target-libgm2: clean-target-libgm2
-+
-+clean-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing clean in $(TARGET_SUBDIR)/libgm2"; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ clean) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-distclean-target-libgm2 distclean-target-libgm2
-+maybe-distclean-target-libgm2:
-+@if target-libgm2
-+maybe-distclean-target-libgm2: distclean-target-libgm2
-+
-+distclean-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing distclean in $(TARGET_SUBDIR)/libgm2"; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ distclean) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-maintainer-clean-target-libgm2 maintainer-clean-target-libgm2
-+maybe-maintainer-clean-target-libgm2:
-+@if target-libgm2
-+maybe-maintainer-clean-target-libgm2: maintainer-clean-target-libgm2
-+
-+maintainer-clean-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libgm2"; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ maintainer-clean) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+
-+
-+
-+
- .PHONY: configure-target-libgomp maybe-configure-target-libgomp
- maybe-configure-target-libgomp:
- @if gcc-bootstrap
-@@ -57045,6 +57538,14 @@
- (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-go);
- check-go: check-gcc-go check-target-libgo check-gotools
-
-+.PHONY: check-gcc-m2 check-m2
-+check-gcc-m2:
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(HOST_EXPORTS) \
-+ (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-m2);
-+check-m2: check-gcc-m2
-+
- .PHONY: check-gcc-brig check-brig
- check-gcc-brig:
- r=`${PWD_COMMAND}`; export r; \
-@@ -60473,6 +60974,7 @@
- configure-target-zlib: stage_last
- configure-target-rda: stage_last
- configure-target-libada: stage_last
-+configure-target-libgm2: stage_last
- configure-stage1-target-libgomp: maybe-all-stage1-gcc
- configure-stage2-target-libgomp: maybe-all-stage2-gcc
- configure-stage3-target-libgomp: maybe-all-stage3-gcc
-@@ -60508,6 +61010,7 @@
- configure-target-zlib: maybe-all-gcc
- configure-target-rda: maybe-all-gcc
- configure-target-libada: maybe-all-gcc
-+configure-target-libgm2: maybe-all-gcc
- configure-target-libgomp: maybe-all-gcc
- configure-target-libitm: maybe-all-gcc
- configure-target-libatomic: maybe-all-gcc
-@@ -61804,6 +62307,7 @@
- configure-target-zlib: maybe-all-target-libgcc
- configure-target-rda: maybe-all-target-libgcc
- configure-target-libada: maybe-all-target-libgcc
-+configure-target-libgm2: maybe-all-target-libgcc
- configure-target-libgomp: maybe-all-target-libgcc
- configure-target-libitm: maybe-all-target-libgcc
- configure-target-libatomic: maybe-all-target-libgcc
-@@ -61851,6 +62355,8 @@
-
- configure-target-libada: maybe-all-target-newlib maybe-all-target-libgloss
-
-+configure-target-libgm2: maybe-all-target-newlib maybe-all-target-libgloss
-+
- configure-target-libgomp: maybe-all-target-newlib maybe-all-target-libgloss
-
- configure-target-libitm: maybe-all-target-newlib maybe-all-target-libgloss
diff --git a/gcc/m2/patches/gcc/11.1.0/10-patches b/gcc/m2/patches/gcc/11.1.0/10-patches
deleted file mode 100644
index 02a4103d2b7..00000000000
--- a/gcc/m2/patches/gcc/11.1.0/10-patches
+++ /dev/null
@@ -1,83 +0,0 @@
---- git-gcc/Makefile.tpl 2021-01-27 10:18:11.154735020 +0000
-+++ gm2-floppsie/Makefile.tpl 2021-01-27 12:58:00.830865616 +0000
-@@ -161,6 +161,7 @@
- GOCFLAGS="$(GOCFLAGS_FOR_BUILD)"; export GOCFLAGS; \
- GDC="$(GDC_FOR_BUILD)"; export GDC; \
- GDCFLAGS="$(GDCFLAGS_FOR_BUILD)"; export GDCFLAGS; \
-+ GM2="$(GM2_FOR_BUILD)"; export GM2; \
- DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
- LD="$(LD_FOR_BUILD)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
-@@ -198,6 +199,7 @@
- GFORTRAN="$(GFORTRAN)"; export GFORTRAN; \
- GOC="$(GOC)"; export GOC; \
- GDC="$(GDC)"; export GDC; \
-+ GM2="$(GM2)"; export GM2; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
-@@ -296,6 +298,7 @@
- GFORTRAN="$(GFORTRAN_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GFORTRAN; \
- GOC="$(GOC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GOC; \
- GDC="$(GDC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GDC; \
-+ GM2="$(GM2_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GM2; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
-@@ -362,6 +365,7 @@
- GFORTRAN_FOR_BUILD = @GFORTRAN_FOR_BUILD@
- GOC_FOR_BUILD = @GOC_FOR_BUILD@
- GDC_FOR_BUILD = @GDC_FOR_BUILD@
-+GM2_FOR_BUILD = @GM2_FOR_BUILD@
- LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
- LD_FOR_BUILD = @LD_FOR_BUILD@
- NM_FOR_BUILD = @NM_FOR_BUILD@
-@@ -431,6 +435,7 @@
- LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
- GOCFLAGS = $(CFLAGS)
- GDCFLAGS = $(CFLAGS)
-+GM2FLAGS = $(CFLAGS)
-
- CREATE_GCOV = create_gcov
-
-@@ -518,6 +523,7 @@
- GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@
- GOC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GOC_FOR_TARGET@
- GDC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GDC_FOR_TARGET@
-+GM2_FOR_TARGET=$(STAGE_CC_WRAPPER) @GM2_FOR_TARGET@
- DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
- LD_FOR_TARGET=@LD_FOR_TARGET@
-
-@@ -647,6 +653,7 @@
- 'GFORTRAN=$(GFORTRAN)' \
- 'GOC=$(GOC)' \
- 'GDC=$(GDC)' \
-+ 'GM2=$(GM2)' \
- 'LD=$(LD)' \
- 'LIPO=$(LIPO)' \
- 'NM=$(NM)' \
-@@ -673,6 +680,7 @@
- CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \
- CXX="$${CXX}" CXX_FOR_BUILD="$${CXX_FOR_BUILD}" \
- GDC="$${GDC}" GDC_FOR_BUILD="$${GDC_FOR_BUILD}" \
-+ GM2="$${GM2}" GM2_FOR_BUILD="$${GM2_FOR_BUILD}" \
- GNATBIND="$${GNATBIND}" \
- LDFLAGS="$${LDFLAGS}" \
- HOST_LIBS="$${HOST_LIBS}" \
-@@ -707,6 +715,8 @@
- 'GOCFLAGS=$$(GOCFLAGS_FOR_TARGET)' \
- 'GDC=$$(GDC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
- 'GDCFLAGS=$$(GDCFLAGS_FOR_TARGET)' \
-+ 'GM2=$$(GM2_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
-+ 'GM2FLAGS=$$(GM2FLAGS_FOR_TARGET)' \
- 'LD=$(COMPILER_LD_FOR_TARGET)' \
- 'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \
- 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
-@@ -733,6 +743,7 @@
- # cross-building scheme.
- EXTRA_GCC_FLAGS = \
- "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
-+ "GM2_FOR_TARGET=$(GM2_FOR_TARGET)" \
- "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
- "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"
-
diff --git a/gcc/m2/patches/gcc/11.1.0/11-patches b/gcc/m2/patches/gcc/11.1.0/11-patches
deleted file mode 100644
index 25a1f1b3fd5..00000000000
--- a/gcc/m2/patches/gcc/11.1.0/11-patches
+++ /dev/null
@@ -1,12 +0,0 @@
---- git-gcc/gcc/go/gospec.c 2021-01-27 10:18:12.670745966 +0000
-+++ gm2-floppsie/gcc/go/gospec.c 2021-01-27 12:58:00.830865616 +0000
-@@ -440,3 +440,9 @@
-
- /* Number of extra output files that lang_specific_pre_link may generate. */
- int lang_specific_extra_outfiles = 0; /* Not used for Go. */
-+
-+/* lang_register_spec_functions. Not used for Go. */
-+void
-+lang_register_spec_functions (void)
-+{
-+}
diff --git a/gcc/m2/patches/gcc/11.1.0/12-patches b/gcc/m2/patches/gcc/11.1.0/12-patches
deleted file mode 100644
index 6064aee1d25..00000000000
--- a/gcc/m2/patches/gcc/11.1.0/12-patches
+++ /dev/null
@@ -1,16 +0,0 @@
---- git-gcc/gcc/fortran/gfortranspec.c 2021-01-27 10:18:12.574745273 +0000
-+++ gm2-floppsie/gcc/fortran/gfortranspec.c 2021-01-27 12:58:00.834865645 +0000
-@@ -447,4 +447,12 @@
- }
-
- /* Number of extra output files that lang_specific_pre_link may generate. */
--int lang_specific_extra_outfiles = 0; /* Not used for F77. */
-+int lang_specific_extra_outfiles = 0; /* Not used for Fortran. */
-+
-+/* lang_register_spec_functions register the Fortran associated spec
-+ functions. */
-+
-+void
-+lang_register_spec_functions (void)
-+{
-+}
diff --git a/gcc/m2/patches/gcc/11.1.0/13-patches b/gcc/m2/patches/gcc/11.1.0/13-patches
deleted file mode 100644
index 0cefa29f188..00000000000
--- a/gcc/m2/patches/gcc/11.1.0/13-patches
+++ /dev/null
@@ -1,13 +0,0 @@
---- git-gcc/gcc/d/d-spec.cc 2021-01-27 10:18:12.446744348 +0000
-+++ gm2-floppsie/gcc/d/d-spec.cc 2021-01-27 12:58:00.838865672 +0000
-@@ -490,3 +490,10 @@
-
- int lang_specific_extra_outfiles = 0; /* Not used for D. */
-
-+/* lang_register_spec_functions register the D associated spec
-+ functions. Not used for D. */
-+
-+void
-+lang_register_spec_functions (void)
-+{
-+}
diff --git a/gcc/m2/patches/gcc/11.1.0/14-patches b/gcc/m2/patches/gcc/11.1.0/14-patches
deleted file mode 100644
index 9c616887053..00000000000
--- a/gcc/m2/patches/gcc/11.1.0/14-patches
+++ /dev/null
@@ -1,14 +0,0 @@
---- git-gcc/gcc/brig/brigspec.c 2021-01-27 10:18:11.922740565 +0000
-+++ gm2-floppsie/gcc/brig/brigspec.c 2021-01-27 12:58:00.838865672 +0000
-@@ -134,3 +134,11 @@
- /* Number of extra output files that lang_specific_pre_link may generate. */
-
- int lang_specific_extra_outfiles = 0; /* Not used for Brig. */
-+
-+/* lang_register_spec_functions register the Brig associated spec
-+ functions. Not used for Brig. */
-+
-+void
-+lang_register_spec_functions (void)
-+{
-+}
diff --git a/gcc/m2/patches/gcc/11.1.0/15-patches b/gcc/m2/patches/gcc/11.1.0/15-patches
deleted file mode 100644
index e08504a27aa..00000000000
--- a/gcc/m2/patches/gcc/11.1.0/15-patches
+++ /dev/null
@@ -1,12 +0,0 @@
---- git-gcc/gcc/jit/jit-spec.c 2021-01-27 10:18:12.722746342 +0000
-+++ gm2-floppsie/gcc/jit/jit-spec.c 2021-01-27 12:58:00.842865701 +0000
-@@ -39,3 +39,9 @@
-
- /* Number of extra output files that lang_specific_pre_link may generate. */
- int lang_specific_extra_outfiles = 0; /* Not used for jit. */
-+
-+/* lang_register_spec_functions. Not used for jit. */
-+void
-+lang_register_spec_functions (void)
-+{
-+}
diff --git a/gcc/m2/patches/gcc/11.1.0/16-patches b/gcc/m2/patches/gcc/11.1.0/16-patches
deleted file mode 100644
index df5b65eef5a..00000000000
--- a/gcc/m2/patches/gcc/11.1.0/16-patches
+++ /dev/null
@@ -1,221 +0,0 @@
-diff --git a/gcc/analyzer/sm-malloc.cc b/gcc/analyzer/sm-malloc.cc
-index 1d5b8601b1f..95d6ee18431 100644
---- a/gcc/analyzer/sm-malloc.cc
-+++ b/gcc/analyzer/sm-malloc.cc
-@@ -22,6 +22,8 @@ along with GCC; see the file COPYING3. If not see
- #include "system.h"
- #include "coretypes.h"
- #include "tree.h"
-+#include "langhooks-def.h"
-+#include "langhooks.h"
- #include "function.h"
- #include "basic-block.h"
- #include "gimple.h"
-@@ -44,6 +46,7 @@ along with GCC; see the file COPYING3. If not see
- #include "analyzer/region-model.h"
- #include "stringpool.h"
- #include "attribs.h"
-+#include "print-tree.h"
-
- #if ENABLE_ANALYZER
-
-@@ -385,8 +388,14 @@ public:
- bool is_mutable) const FINAL OVERRIDE;
-
- standard_deallocator_set m_free;
-- standard_deallocator_set m_scalar_delete;
-- standard_deallocator_set m_vector_delete;
-+
-+ /* C++ scalar delete and vector delete[]. */
-+ standard_deallocator_set m_cp_scalar_delete;
-+ standard_deallocator_set m_cp_vector_delete;
-+
-+ /* Modula 2 user and system heaps. */
-+ standard_deallocator_set m_m2_storage_deallocate;
-+ standard_deallocator_set m_m2_sysstorage_deallocate;
-
- standard_deallocator m_realloc;
-
-@@ -419,13 +428,18 @@ private:
- const supernode *node,
- const gcall *call,
- const deallocator *d,
-- unsigned argno) const;
-+ unsigned argno,
-+ bool pass_by_reference = false) const;
- void on_realloc_call (sm_context *sm_ctxt,
- const supernode *node,
- const gcall *call) const;
- void on_zero_assignment (sm_context *sm_ctxt,
- const gimple *stmt,
- tree lhs) const;
-+ void on_allocator_call_pass_by_ref (sm_context *sm_ctxt,
-+ const gcall *call,
-+ const deallocator_set
-+ *deallocators) const;
-
- /* A map for consolidating deallocators so that they are
- unique per deallocator FUNCTION_DECL. */
-@@ -1368,8 +1382,12 @@ allocation_state::get_nonnull () const
- malloc_state_machine::malloc_state_machine (logger *logger)
- : state_machine ("malloc", logger),
- m_free (this, "free", WORDING_FREED),
-- m_scalar_delete (this, "delete", WORDING_DELETED),
-- m_vector_delete (this, "delete[]", WORDING_DELETED),
-+ m_cp_scalar_delete (this, "delete", WORDING_DELETED),
-+ m_cp_vector_delete (this, "delete[]", WORDING_DELETED),
-+ m_m2_storage_deallocate (this, "DISPOSE via Storage.DEALLOCATE",
-+ WORDING_DEALLOCATED),
-+ m_m2_sysstorage_deallocate (this, "DISPOSE via SysStorage.DEALLOCATE",
-+ WORDING_DEALLOCATED),
- m_realloc (this, "realloc", WORDING_REALLOCATED)
- {
- gcc_assert (m_start->get_id () == 0);
-@@ -1526,21 +1544,36 @@ malloc_state_machine::on_stmt (sm_context *sm_ctxt,
- return true;
- }
-
-+ if (lang_hooks.new_dispose_storage_substitution ())
-+ {
-+ /* m2 allocation. */
-+ if (is_named_call_p (callee_fndecl, "Storage_ALLOCATE", call, 2))
-+ {
-+ on_allocator_call_pass_by_ref (sm_ctxt, call, &m_m2_storage_deallocate);
-+ return true;
-+ }
-+ else if (is_named_call_p (callee_fndecl, "SysStorage_ALLOCATE", call, 2))
-+ {
-+ on_allocator_call_pass_by_ref (sm_ctxt, call, &m_m2_sysstorage_deallocate);
-+ return true;
-+ }
-+ }
-+
- if (is_named_call_p (callee_fndecl, "operator new", call, 1))
-- on_allocator_call (sm_ctxt, call, &m_scalar_delete);
-+ on_allocator_call (sm_ctxt, call, &m_cp_scalar_delete);
- else if (is_named_call_p (callee_fndecl, "operator new []", call, 1))
-- on_allocator_call (sm_ctxt, call, &m_vector_delete);
-+ on_allocator_call (sm_ctxt, call, &m_cp_vector_delete);
- else if (is_named_call_p (callee_fndecl, "operator delete", call, 1)
- || is_named_call_p (callee_fndecl, "operator delete", call, 2))
- {
- on_deallocator_call (sm_ctxt, node, call,
-- &m_scalar_delete.m_deallocator, 0);
-+ &m_cp_scalar_delete.m_deallocator, 0);
- return true;
- }
- else if (is_named_call_p (callee_fndecl, "operator delete []", call, 1))
- {
- on_deallocator_call (sm_ctxt, node, call,
-- &m_vector_delete.m_deallocator, 0);
-+ &m_cp_vector_delete.m_deallocator, 0);
- return true;
- }
-
-@@ -1562,6 +1595,23 @@ malloc_state_machine::on_stmt (sm_context *sm_ctxt,
- return true;
- }
-
-+ if (lang_hooks.new_dispose_storage_substitution ())
-+ {
-+ /* m2 deallocation. */
-+ if (is_named_call_p (callee_fndecl, "Storage_DEALLOCATE", call, 2))
-+ {
-+ on_deallocator_call (sm_ctxt, node, call,
-+ &m_m2_storage_deallocate.m_deallocator, 0, true);
-+ return true;
-+ }
-+ else if (is_named_call_p (callee_fndecl, "SysStorage_DEALLOCATE", call, 2))
-+ {
-+ on_deallocator_call (sm_ctxt, node, call,
-+ &m_m2_sysstorage_deallocate.m_deallocator, 0, true);
-+ return true;
-+ }
-+ }
-+
- if (is_named_call_p (callee_fndecl, "realloc", call, 2)
- || is_named_call_p (callee_fndecl, "__builtin_realloc", call, 2))
- {
-@@ -1731,16 +1781,71 @@ malloc_state_machine::on_allocator_call (sm_context *sm_ctxt,
- }
- }
-
-+/* Skips an ADDR_EXPR if seen. */
-+
-+static
-+tree
-+skip_reference (tree arg)
-+{
-+ if (TREE_CODE (arg) == ADDR_EXPR)
-+ return TREE_OPERAND (arg, 0);
-+ return NULL;
-+}
-+
-+
-+/* Handle allocators which return the value through a pass by reference parameter. */
-+
-+void
-+malloc_state_machine::on_allocator_call_pass_by_ref (sm_context *sm_ctxt,
-+ const gcall *call,
-+ const deallocator_set
-+ *deallocators) const
-+{
-+ if (gimple_call_num_args (call) == 0)
-+ return;
-+ tree arg = gimple_call_arg (call, 0);
-+ if (arg)
-+ {
-+ /* in Modula-2 the heap allocator API is: ALLOCATE (VAR ADDRESS;
-+ CARDINAL). So we need to skip the reference or pointer in
-+ the first parameter. */
-+ tree diag_arg_lvalue = sm_ctxt->get_diagnostic_tree (arg);
-+ tree diag_arg_rvalue = skip_reference (diag_arg_lvalue);
-+ if ((diag_arg_rvalue != NULL)
-+ && (sm_ctxt->get_state (call, diag_arg_rvalue) == m_start))
-+ sm_ctxt->set_next_state (call, diag_arg_rvalue,
-+ deallocators->m_unchecked);
-+ }
-+}
-+
- void
- malloc_state_machine::on_deallocator_call (sm_context *sm_ctxt,
- const supernode *node,
- const gcall *call,
- const deallocator *d,
-- unsigned argno) const
-+ unsigned argno,
-+ bool pass_by_reference) const
- {
- if (argno >= gimple_call_num_args (call))
- return;
- tree arg = gimple_call_arg (call, argno);
-+ if (pass_by_reference)
-+ {
-+ tree diag_arg = sm_ctxt->get_diagnostic_tree (arg);
-+ /* in Modula-2 the API is: DEALLOCATE (VAR a: ADDRESS; size:
-+ CARDINAL). So we need to skip the pointer or reference in
-+ the first parameter. We also know the pointer is assigned to
-+ NULL. In C this could be described as:
-+
-+ DEALLOCATE (void **address, unsigned int size)
-+ {
-+ free (*address);
-+ *address = NULL;
-+ }. */
-+ arg = skip_reference (diag_arg);
-+ if (arg == NULL)
-+ return;
-+ }
-
- state_t state = sm_ctxt->get_state (call, arg);
-
-@@ -1783,6 +1888,9 @@ malloc_state_machine::on_deallocator_call (sm_context *sm_ctxt,
- d->m_name));
- sm_ctxt->set_next_state (call, arg, m_stop);
- }
-+ /* in Modula-2 the DEALLOCATE assigns the pointer to NULL. However
-+ we don't do this in the analyzer as it ignores NULL pointers
-+ during deallocation. */
- }
-
- /* Implementation of realloc(3):
diff --git a/gcc/m2/patches/gcc/11.1.0/17-patches b/gcc/m2/patches/gcc/11.1.0/17-patches
deleted file mode 100644
index d5d0adce41b..00000000000
--- a/gcc/m2/patches/gcc/11.1.0/17-patches
+++ /dev/null
@@ -1,12 +0,0 @@
---- gcc-git/gcc/langhooks.h 2021-04-12 00:27:11.634099346 +0100
-+++ gm2-floppsie/gcc/langhooks.h 2021-04-12 17:50:27.915232631 +0100
-@@ -611,6 +611,9 @@
- /* Invoked before the early_finish debug hook is invoked. */
- void (*finalize_early_debug) (void);
-
-+ /* Does the language substitute NEW into ALLOCATE and DISPOSE into DEALLOCATE? */
-+ bool (*new_dispose_storage_substitution) (void);
-+
- /* Whenever you add entries here, make sure you adjust langhooks-def.h
- and langhooks.c accordingly. */
- };
diff --git a/gcc/m2/patches/gcc/11.1.0/18-patches b/gcc/m2/patches/gcc/11.1.0/18-patches
deleted file mode 100644
index f38148e195c..00000000000
--- a/gcc/m2/patches/gcc/11.1.0/18-patches
+++ /dev/null
@@ -1,28 +0,0 @@
---- gcc-git/gcc/langhooks-def.h 2021-04-12 00:27:11.634099346 +0100
-+++ gm2-floppsie/gcc/langhooks-def.h 2021-04-12 17:46:05.180533649 +0100
-@@ -95,6 +95,7 @@
- extern int lhd_decl_dwarf_attribute (const_tree, int);
- extern int lhd_type_dwarf_attribute (const_tree, int);
- extern void lhd_finalize_early_debug (void);
-+extern bool lhd_new_dispose_storage_substitution (void);
-
- #define LANG_HOOKS_NAME "GNU unknown"
- #define LANG_HOOKS_IDENTIFIER_SIZE sizeof (struct lang_identifier)
-@@ -147,6 +148,7 @@
- #define LANG_HOOKS_RUN_LANG_SELFTESTS lhd_do_nothing
- #define LANG_HOOKS_GET_SUBSTRING_LOCATION lhd_get_substring_location
- #define LANG_HOOKS_FINALIZE_EARLY_DEBUG lhd_finalize_early_debug
-+#define LANG_HOOKS_NEW_DISPOSE_STORAGE_SUBSTITUTION lhd_new_dispose_storage_substitution
-
- /* Attribute hooks. */
- #define LANG_HOOKS_ATTRIBUTE_TABLE NULL
-@@ -381,7 +383,8 @@
- LANG_HOOKS_EMITS_BEGIN_STMT, \
- LANG_HOOKS_RUN_LANG_SELFTESTS, \
- LANG_HOOKS_GET_SUBSTRING_LOCATION, \
-- LANG_HOOKS_FINALIZE_EARLY_DEBUG \
-+ LANG_HOOKS_FINALIZE_EARLY_DEBUG, \
-+ LANG_HOOKS_NEW_DISPOSE_STORAGE_SUBSTITUTION \
- }
-
- #endif /* GCC_LANG_HOOKS_DEF_H */
diff --git a/gcc/m2/patches/gcc/11.1.0/19-patches b/gcc/m2/patches/gcc/11.1.0/19-patches
deleted file mode 100644
index a8e4162fc01..00000000000
--- a/gcc/m2/patches/gcc/11.1.0/19-patches
+++ /dev/null
@@ -1,16 +0,0 @@
---- gcc-git/gcc/langhooks.c 2021-04-12 00:27:11.634099346 +0100
-+++ gm2-floppsie/gcc/langhooks.c 2021-04-12 17:44:00.563326216 +0100
-@@ -896,6 +896,13 @@
- (*debug_hooks->early_global_decl) (cnode->decl);
- }
-
-+/* Should the analyzer check for NEW/DISPOSE Storage_ALLOCATE/Storage_DEALLOCATE? */
-+
-+bool lhd_new_dispose_storage_substitution (void)
-+{
-+ return false;
-+}
-+
- /* Returns true if the current lang_hooks represents the GNU C frontend. */
-
- bool
diff --git a/gcc/m2/patches/gcc/11.1.0/20-patches b/gcc/m2/patches/gcc/11.1.0/20-patches
deleted file mode 100644
index 68c074497ba..00000000000
--- a/gcc/m2/patches/gcc/11.1.0/20-patches
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/gcc/analyzer/sm.cc b/gcc/analyzer/sm.cc
-index 2d227dd1be0..4c8d89f1d51 100644
---- a/gcc/analyzer/sm.cc
-+++ b/gcc/analyzer/sm.cc
-@@ -159,6 +159,7 @@ make_checkers (auto_delete_vec <state_machine> &out, logger *logger)
- out.safe_push (make_taint_state_machine (logger));
- out.safe_push (make_sensitive_state_machine (logger));
- out.safe_push (make_signal_state_machine (logger));
-+ out.safe_push (make_m2rts_state_machine (logger));
-
- /* We only attempt to run the pattern tests if it might have been manually
- enabled (for DejaGnu purposes). */
diff --git a/gcc/m2/patches/gcc/11.1.0/21-patches b/gcc/m2/patches/gcc/11.1.0/21-patches
deleted file mode 100644
index 9014ed267f2..00000000000
--- a/gcc/m2/patches/gcc/11.1.0/21-patches
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/gcc/analyzer/sm.h b/gcc/analyzer/sm.h
-index 8d4d030394a..ef4901842e6 100644
---- a/gcc/analyzer/sm.h
-+++ b/gcc/analyzer/sm.h
-@@ -248,6 +248,7 @@ protected:
- extern void make_checkers (auto_delete_vec <state_machine> &out,
- logger *logger);
-
-+extern state_machine *make_m2rts_state_machine (logger *logger);
- extern state_machine *make_malloc_state_machine (logger *logger);
- extern state_machine *make_fileptr_state_machine (logger *logger);
- extern state_machine *make_taint_state_machine (logger *logger);
diff --git a/gcc/m2/patches/gcc/11.1.0/22-patches b/gcc/m2/patches/gcc/11.1.0/22-patches
deleted file mode 100644
index b6564fcc5ab..00000000000
--- a/gcc/m2/patches/gcc/11.1.0/22-patches
+++ /dev/null
@@ -1,479 +0,0 @@
---- /dev/null 2019-02-14 10:11:58.467999981 +0000
-+++ gm2-floppsie.12/gcc/analyzer/sm-m2rts.cc 2021-04-24 12:53:26.390173287 +0100
-@@ -0,0 +1,476 @@
-+/* An experimental state machine, for tracking bad calls from within
-+ signal handlers.
-+
-+ Copyright (C) 2021 Free Software Foundation, Inc.
-+ Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>
-+ heavily derived from work written by
-+ David Malcolm <dmalcolm@redhat.com>.
-+
-+This file is part of GCC.
-+
-+GCC is free software; you can redistribute it and/or modify it
-+under the terms of the GNU General Public License as published by
-+the Free Software Foundation; either version 3, or (at your option)
-+any later version.
-+
-+GCC is distributed in the hope that it will be useful, but
-+WITHOUT ANY WARRANTY; without even the implied warranty of
-+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+General Public License for more details.
-+
-+You should have received a copy of the GNU General Public License
-+along with GCC; see the file COPYING3. If not see
-+<http://www.gnu.org/licenses/>. */
-+
-+#include "config.h"
-+#include "system.h"
-+#include "coretypes.h"
-+#include "tree.h"
-+#include "function.h"
-+#include "basic-block.h"
-+#include "gimple.h"
-+#include "options.h"
-+#include "bitmap.h"
-+#include "diagnostic-path.h"
-+#include "diagnostic-metadata.h"
-+#include "function.h"
-+#include "json.h"
-+#include "analyzer/analyzer.h"
-+#include "diagnostic-event-id.h"
-+#include "analyzer/analyzer-logging.h"
-+#include "analyzer/sm.h"
-+#include "analyzer/pending-diagnostic.h"
-+#include "sbitmap.h"
-+#include "tristate.h"
-+#include "ordered-hash-map.h"
-+#include "selftest.h"
-+#include "analyzer/call-string.h"
-+#include "analyzer/program-point.h"
-+#include "analyzer/store.h"
-+#include "analyzer/region-model.h"
-+#include "analyzer/program-state.h"
-+#include "analyzer/checker-path.h"
-+#include "digraph.h"
-+#include "cfg.h"
-+#include "gimple-iterator.h"
-+#include "cgraph.h"
-+#include "analyzer/supergraph.h"
-+#include "alloc-pool.h"
-+#include "fibonacci_heap.h"
-+#include "analyzer/diagnostic-manager.h"
-+#include "shortest-paths.h"
-+#include "analyzer/exploded-graph.h"
-+#include "analyzer/function-set.h"
-+#include "analyzer/analyzer-selftests.h"
-+#include "print-tree.h"
-+#include "gimple-iterator.h"
-+#include "gimple-walk.h"
-+#include "analyzer/call-string.h"
-+#include "analyzer/program-point.h"
-+#include "analyzer/store.h"
-+#include "analyzer/region-model.h"
-+#include "analyzer/program-state.h"
-+#include "analyzer/checker-path.h"
-+#include "gimple-iterator.h"
-+#include "analyzer/supergraph.h"
-+#include "analyzer/pending-diagnostic.h"
-+#include "analyzer/diagnostic-manager.h"
-+#include "analyzer/constraint-manager.h"
-+#include "analyzer/diagnostic-manager.h"
-+#include "analyzer/checker-path.h"
-+#include "analyzer/exploded-graph.h"
-+
-+/* The Modula-2 front end will place calls to NoReturnException
-+ calls at the end of every procedure function (if -fsoft-check-all)
-+ is present. The analyzer is run after enough optimization has been
-+ done to remove any unreachable blocks - hence detecting the presense
-+ of a remaining NoReturnException is a valid concern. */
-+
-+/* This analyzer module effectively provides the stubs so that the following
-+ algorithm is run:
-+
-+ for each function call; res = f (); do
-+ check function f and see if NoReturnException is called.
-+ if f calls NoReturnException
-+ warn that f may return an indeterminant result.
-+ warn that the lhs of the caller (res) will be indeterminant
-+ when the call f completes. */
-+
-+#if ENABLE_ANALYZER
-+
-+namespace ana {
-+
-+namespace {
-+
-+/* An experimental state machine, for tracking calls to M2RTS NoReturn
-+ handlers from within procedures. */
-+
-+class m2rts_state_machine : public state_machine
-+{
-+public:
-+ m2rts_state_machine (logger *logger);
-+
-+ bool inherited_state_p () const FINAL OVERRIDE { return false; }
-+
-+ bool on_stmt (sm_context *sm_ctxt,
-+ const supernode *node,
-+ const gimple *stmt) const FINAL OVERRIDE;
-+
-+ void on_condition (sm_context *sm_ctxt,
-+ const supernode *node,
-+ const gimple *stmt,
-+ tree lhs,
-+ enum tree_code op,
-+ tree rhs) const FINAL OVERRIDE;
-+
-+ bool can_purge_p (state_t s) const FINAL OVERRIDE;
-+
-+#if 0
-+ const gcall *last_call;
-+ const gcall *current_call;
-+#endif
-+
-+ /* These states are "global", rather than per-expression. */
-+
-+ /* State for when we're exploring a function for a no return exception. */
-+ state_t m_in_function;
-+
-+ /* Stop state. */
-+ state_t m_stop;
-+};
-+
-+/* Concrete subclass for describing call to a m2 procedure
-+ from an unconditional statement. */
-+
-+class m2_procedure_call
-+ : public pending_diagnostic_subclass<m2_procedure_call>
-+{
-+public:
-+ m2_procedure_call (const m2rts_state_machine &sm,
-+ tree lhs,
-+ const gcall *last_call,
-+ const gcall *current_call)
-+ : m_sm (sm),
-+ m_lhs (lhs),
-+ m_last_call (last_call),
-+ m_current_call (current_call)
-+ {
-+ }
-+
-+ const char *get_kind () const FINAL OVERRIDE
-+ {
-+ return "call to the procedure function may not return a result";
-+ }
-+
-+ bool operator== (const m2_procedure_call &other) const
-+ {
-+ return m_current_call == other.m_current_call;
-+ }
-+
-+ bool emit (rich_location *rich_loc) FINAL OVERRIDE
-+ {
-+ auto_diagnostic_group d;
-+ diagnostic_metadata m;
-+
-+ tree last_call = gimple_call_fndecl (m_last_call);
-+ if (warning_meta (rich_loc, m,
-+ OPT_fanalyzer,
-+ "call to the procedure function %qE may not return a result"
-+ " and therefore the value of %qD maybe indeterminate",
-+ last_call, m_lhs))
-+ return true;
-+ return false;
-+ }
-+
-+ label_text describe_final_event (const evdesc::final_event &ev) FINAL OVERRIDE
-+ {
-+ tree last_call = gimple_call_fndecl (m_last_call);
-+ return ev.formatted_print ("the procedure function might return an indeterminate value"
-+ " (procedure function %qD is missing a return statement)",
-+ last_call);
-+ }
-+
-+ const m2rts_state_machine &m_sm;
-+
-+private:
-+ tree m_lhs;
-+ const gcall *m_last_call;
-+ const gcall *m_current_call;
-+};
-+
-+/* m2rts_state_machine's ctor. */
-+
-+m2rts_state_machine::m2rts_state_machine (logger *logger)
-+: state_machine ("m2rts", logger)
-+{
-+ m_in_function = add_state ("in_function");
-+ m_stop = add_state ("stop");
-+#if 0
-+ last_call = NULL;
-+ current_call = NULL;
-+#endif
-+}
-+
-+/* Custom exploded_edge info: entry into a m2rts-handler. */
-+
-+class m2rts_delivery_edge_info_t : public exploded_edge::custom_info_t
-+{
-+public:
-+ void print (pretty_printer *pp) FINAL OVERRIDE
-+ {
-+ pp_string (pp, "m2rts delivered");
-+ }
-+
-+ json::object *to_json () const
-+ {
-+ json::object *custom_obj = new json::object ();
-+ return custom_obj;
-+ }
-+
-+ void update_model (region_model *model,
-+ const exploded_edge &eedge) FINAL OVERRIDE
-+ {
-+#if 0
-+ fprintf (stderr, "depth of stack here is: %d\n",
-+ eedge.m_dest->get_stack_depth ());
-+ function *f = eedge.m_dest->get_function ();
-+ fprintf (stderr, " eedge.m_dest: \n");
-+ debug_tree (f->decl);
-+ f = eedge.m_src->get_function ();
-+ fprintf (stderr, " eedge.m_src: \n");
-+ debug_tree (f->decl);
-+ const gimple *g = eedge.m_src->get_stmt ();
-+ fprintf (stderr, " eedge.m_src.lhs: \n");
-+ debug_tree (gimple_get_lhs (g));
-+#endif
-+#if 0
-+ update_model_for_m2rts_handler (model, eedge.m_src->get_function ());
-+#endif
-+ model->push_frame (eedge.m_src->get_function (), NULL, NULL);
-+ }
-+
-+ void add_events_to_path (checker_path *emission_path,
-+ const exploded_edge &eedge)
-+ FINAL OVERRIDE
-+ {
-+#if 0
-+ fprintf (stderr, "add_events_to_path: depth of stack here is: %d\n",
-+ eedge.m_dest->get_stack_depth ());
-+ function *f = eedge.m_dest->get_function ();
-+ fprintf (stderr, " add_events_to_path: eedge.m_dest: \n");
-+ debug_tree (f->decl);
-+#endif
-+ function *f = eedge.m_src->get_function ();
-+#if 0
-+ fprintf (stderr, " add_events_to_path: eedge.m_src: \n");
-+ debug_tree (f->decl);
-+#endif
-+ tree fndecl = f->decl;
-+ const gimple *g = eedge.m_src->get_stmt ();
-+#if 0
-+ fprintf (stderr, " add_events_to_path: eedge.m_src.lhs: \n");
-+ debug_tree (gimple_get_lhs (g));
-+#endif
-+ tree lhs = gimple_get_lhs (g);
-+ if (lhs)
-+ emission_path->add_event
-+ (new custom_event (g->location, fndecl, eedge.m_dest->get_stack_depth (),
-+ "later on,"
-+ " when the indeterminate value is returned"));
-+ }
-+};
-+
-+/* Concrete subclass of custom_transition for modeling registration of a
-+ m2rts handler and the m2rts handler later being called. */
-+
-+class m2_procedure_function : public custom_transition
-+{
-+public:
-+ m2_procedure_function (const m2rts_state_machine &sm,
-+ tree fndecl, tree lhs)
-+ : m_sm (sm), m_fndecl (fndecl), m_lhs (lhs) {}
-+
-+ /* Model a signal-handler FNDECL being called at some later point
-+ by injecting an edge to a new function-entry node with an empty
-+ callstring, setting the 'in-signal-handler' global state
-+ on the node. */
-+ void impl_transition (exploded_graph *eg,
-+ exploded_node *src_enode,
-+ int sm_idx) FINAL OVERRIDE
-+ {
-+ function *handler_fun = DECL_STRUCT_FUNCTION (m_fndecl);
-+ if (!handler_fun)
-+ return;
-+
-+ program_point entering_handler
-+ = program_point::from_function_entry (eg->get_supergraph (),
-+ handler_fun);
-+
-+ program_state state_entering_handler (eg->get_ext_state ());
-+ state_entering_handler.m_checker_states[sm_idx]->set_global_state
-+ (m_sm.m_in_function);
-+
-+ state_entering_handler.m_region_model->push_frame (handler_fun, NULL, NULL);
-+
-+ exploded_node *dst_enode = eg->get_or_create_node (entering_handler,
-+ state_entering_handler,
-+ src_enode);
-+ if (dst_enode)
-+ eg->add_edge (src_enode, dst_enode, NULL, /*state_change (),*/
-+ new m2rts_delivery_edge_info_t ());
-+ }
-+
-+ const m2rts_state_machine &m_sm;
-+ tree m_fndecl;
-+ tree m_lhs;
-+};
-+
-+/* Get a set of m2rts exception functions which must be conditionally called. */
-+
-+static function_set
-+get_m2rts_exception_fns ()
-+{
-+ // TODO: populate this list more fully
-+ static const char * const m2rts_exception_fns[] = {
-+ /* This array must be kept sorted. */
-+ "M2RTS_NoReturnException",
-+ };
-+ const size_t count
-+ = sizeof (m2rts_exception_fns) / sizeof (m2rts_exception_fns[0]);
-+ function_set fs (m2rts_exception_fns, count);
-+ return fs;
-+}
-+
-+/* "M2RTS_PointerNilException",
-+ "M2RTS_ReturnException",
-+ "M2RTS_AssignmentException" */
-+
-+
-+/* Return true if FNDECL is known to be a m2rts exception handler. */
-+
-+static bool
-+m2rts_exception_p (tree fndecl)
-+{
-+ function_set fs = get_m2rts_exception_fns ();
-+ return fs.contains_decl_p (fndecl);
-+}
-+
-+#if 1
-+static const gcall *last_call;
-+static const gcall *current_call;
-+
-+void
-+update_procedure_function (const gcall *call)
-+{
-+ last_call = current_call;
-+ current_call = call;
-+}
-+#endif
-+
-+
-+/* Implementation of state_machine::on_stmt vfunc for m2rts_state_machine. */
-+
-+bool
-+m2rts_state_machine::on_stmt (sm_context *sm_ctxt,
-+ const supernode *node,
-+ const gimple *stmt) const
-+{
-+ const state_t global_state = sm_ctxt->get_global_state ();
-+ if (global_state == m_start)
-+ {
-+ if (const gcall *call = dyn_cast <const gcall *> (stmt))
-+ {
-+ tree fndecl = gimple_call_fndecl (call);
-+ if (fndecl != NULL)
-+ {
-+ if (m2rts_exception_p (fndecl))
-+ // ignore lack of return statements from the start state.
-+ return false;
-+ if (tree lhs = gimple_get_lhs (call))
-+ {
-+ m2_procedure_function m2pf (*this, fndecl, lhs);
-+#if 1
-+ update_procedure_function (call);
-+#endif
-+ sm_ctxt->on_custom_transition (&m2pf);
-+ }
-+ }
-+ }
-+ }
-+ else if (global_state == m_in_function)
-+ {
-+ if (const gcall *call = dyn_cast <const gcall *> (stmt))
-+ if (tree callee_fndecl = sm_ctxt->get_fndecl_for_call (call))
-+ {
-+ if (m2rts_exception_p (callee_fndecl))
-+ {
-+ const gcall *call_noreturn = node->get_final_call ();
-+ tree lhs = gimple_get_lhs (current_call);
-+ if (lhs != NULL)
-+ {
-+ tree diag_lhs = sm_ctxt->get_diagnostic_tree (lhs);
-+ pending_diagnostic *pd
-+ = new m2_procedure_call (*this,
-+ diag_lhs, current_call,
-+ call_noreturn);
-+ sm_ctxt->warn (node, current_call, lhs, pd);
-+ return true;
-+ }
-+ }
-+ }
-+ }
-+
-+ return false;
-+}
-+
-+/* Implementation of state_machine::on_condition vfunc for
-+ m2rts_state_machine. */
-+
-+void
-+m2rts_state_machine::on_condition (sm_context *sm_ctxt ATTRIBUTE_UNUSED,
-+ const supernode *node ATTRIBUTE_UNUSED,
-+ const gimple *stmt ATTRIBUTE_UNUSED,
-+ tree lhs ATTRIBUTE_UNUSED,
-+ enum tree_code op ATTRIBUTE_UNUSED,
-+ tree rhs ATTRIBUTE_UNUSED) const
-+{
-+ // Empty
-+}
-+
-+bool
-+m2rts_state_machine::can_purge_p (state_t s ATTRIBUTE_UNUSED) const
-+{
-+ return true;
-+}
-+
-+} // anonymous namespace
-+
-+/* Internal interface to this file. */
-+
-+state_machine *
-+make_m2rts_state_machine (logger *logger)
-+{
-+ return new m2rts_state_machine (logger);
-+}
-+
-+#if CHECKING_P
-+
-+namespace selftest {
-+
-+/* Run all of the selftests within this file. */
-+
-+void
-+analyzer_sm_m2rts_cc_tests ()
-+{
-+ function_set fs = get_m2rts_exception_fns ();
-+ fs.assert_sorted ();
-+ fs.assert_sane ();
-+}
-+
-+} // namespace selftest
-+
-+#endif /* CHECKING_P */
-+
-+} // namespace ana
-+
-+#endif /* #if ENABLE_ANALYZER */
diff --git a/gcc/m2/patches/gcc/11.1.0/23-patches b/gcc/m2/patches/gcc/11.1.0/23-patches
deleted file mode 100644
index 09bd1926ed9..00000000000
--- a/gcc/m2/patches/gcc/11.1.0/23-patches
+++ /dev/null
@@ -1,21 +0,0 @@
-diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index 8a5fb3fd99c..73e550cb866 100644
---- a/gcc/Makefile.in
-+++ b/gcc/Makefile.in
-@@ -1266,6 +1266,7 @@ ANALYZER_OBJS = \
- analyzer/region-model-reachability.o \
- analyzer/sm.o \
- analyzer/sm-file.o \
-+ analyzer/sm-m2rts.o \
- analyzer/sm-malloc.o \
- analyzer/sm-pattern-test.o \
- analyzer/sm-sensitive.o \
-@@ -2731,7 +2732,7 @@ ALL_GTFILES_H := $(sort $(GTFILES_H) $(GTFILES_LANG_H))
- $(ALL_GTFILES_H) gtype-desc.c gtype-desc.h gtype.state: s-gtype ; @true
-
- ### Common flags to gengtype [e.g. -v or -B backupdir]
--GENGTYPE_FLAGS=
-+GENGTYPE_FLAGS=
-
- gtyp-input.list: s-gtyp-input ; @true
- s-gtyp-input: Makefile
diff --git a/gcc/m2/patches/gcc/3.3.6/01.waldek_patch_gcc b/gcc/m2/patches/gcc/3.3.6/01.waldek_patch_gcc
deleted file mode 100755
index 39923f46aa9..00000000000
--- a/gcc/m2/patches/gcc/3.3.6/01.waldek_patch_gcc
+++ /dev/null
@@ -1,35 +0,0 @@
-*** cvs/gcc/config/i386/i386.c.orig Tue May 18 07:07:52 2004
---- modified/gcc/config/i386/i386.c Sun Oct 24 11:26:55 2004
-***************
-*** 1879,1884 ****
---- 1879,1909 ----
- }
- }
- }
-+ else if (TREE_CODE (type) == SET_TYPE)
-+ {
-+ if (bytes <= 4)
-+ {
-+ classes[0] = X86_64_INTEGERSI_CLASS;
-+ return 1;
-+ }
-+ else if (bytes <= 8)
-+ {
-+ classes[0] = X86_64_INTEGER_CLASS;
-+ return 1;
-+ }
-+ else if (bytes <= 12)
-+ {
-+ classes[0] = X86_64_INTEGER_CLASS;
-+ classes[1] = X86_64_INTEGERSI_CLASS;
-+ return 2;
-+ }
-+ else
-+ {
-+ classes[0] = X86_64_INTEGER_CLASS;
-+ classes[1] = X86_64_INTEGER_CLASS;
-+ return 2;
-+ }
-+ }
- else
- abort ();
diff --git a/gcc/m2/patches/gcc/3.3.6/02.gaius_patch_gcc b/gcc/m2/patches/gcc/3.3.6/02.gaius_patch_gcc
deleted file mode 100755
index 14549bdee8e..00000000000
--- a/gcc/m2/patches/gcc/3.3.6/02.gaius_patch_gcc
+++ /dev/null
@@ -1,350 +0,0 @@
---- cvs-gcc-3.3.6/gcc/dwarf2out.c 2004-04-13 19:36:36.000000000 +0100
-+++ gcc-3.3.6/gcc/dwarf2out.c 2005-11-15 16:47:58.161938789 +0000
-@@ -317,6 +317,7 @@
- static void flush_queued_reg_saves PARAMS ((void));
- static bool clobbers_queued_reg_save PARAMS ((rtx));
- static void dwarf2out_frame_debug_expr PARAMS ((rtx, const char *));
-+static bool is_subrange_type PARAMS ((tree));
-
- /* Support for complex CFA locations. */
- static void output_cfa_loc PARAMS ((dw_cfi_ref));
-@@ -2330,6 +2331,8 @@
- static unsigned long size_of_locs PARAMS ((dw_loc_descr_ref));
- static void output_loc_operands PARAMS ((dw_loc_descr_ref));
- static void output_loc_sequence PARAMS ((dw_loc_descr_ref));
-+static void gen_set_subrange_die PARAMS ((tree, dw_die_ref));
-+static dw_die_ref subrange_type_die PARAMS ((tree, dw_die_ref));
-
- /* Convert a DWARF stack opcode into its string name. */
-
-@@ -3583,6 +3586,8 @@
- static int is_cxx PARAMS ((void));
- static int is_java PARAMS ((void));
- static int is_fortran PARAMS ((void));
-+static int is_modula2 PARAMS ((void));
-+
- static void remove_AT PARAMS ((dw_die_ref,
- enum dwarf_attribute));
- static inline void free_die PARAMS ((dw_die_ref));
-@@ -3719,7 +3724,7 @@
- static void gen_inlined_enumeration_type_die PARAMS ((tree, dw_die_ref));
- static void gen_inlined_structure_type_die PARAMS ((tree, dw_die_ref));
- static void gen_inlined_union_type_die PARAMS ((tree, dw_die_ref));
--static void gen_enumeration_type_die PARAMS ((tree, dw_die_ref));
-+static dw_die_ref gen_enumeration_type_die PARAMS ((tree, dw_die_ref));
- static dw_die_ref gen_formal_parameter_die PARAMS ((tree, dw_die_ref));
- static void gen_unspecified_parameters_die PARAMS ((tree, dw_die_ref));
- static void gen_formal_types_die PARAMS ((tree, dw_die_ref));
-@@ -4993,6 +4998,14 @@
- return (lang == DW_LANG_Java);
- }
-
-+static inline int
-+is_modula2 ()
-+{
-+ unsigned lang = get_AT_unsigned (comp_unit_die, DW_AT_language);
-+
-+ return (lang == DW_LANG_Modula2);
-+}
-+
- /* Free up the memory used by A. */
-
- static inline void free_AT PARAMS ((dw_attr_ref));
-@@ -7874,6 +7887,112 @@
- return 0;
- }
-
-+/* Return true if the debug information for the given type should be
-+ emitted as a subrange type. */
-+
-+static inline bool
-+is_subrange_type (type)
-+ tree type;
-+{
-+ tree subtype = TREE_TYPE (type);
-+
-+ /* Subrange types are identified by the fact that they are integer
-+ types, and that they have a subtype which is either an integer type
-+ or an enumeral type. */
-+
-+ if (TREE_CODE (type) != INTEGER_TYPE
-+ || subtype == NULL_TREE)
-+ return false;
-+
-+ if (TREE_CODE (subtype) != INTEGER_TYPE
-+ && TREE_CODE (subtype) != ENUMERAL_TYPE
-+ && TREE_CODE (subtype) != CHAR_TYPE)
-+ return false;
-+
-+ if (TREE_CODE (type) == TREE_CODE (subtype)
-+ && int_size_in_bytes (type) == int_size_in_bytes (subtype)
-+ && TYPE_MIN_VALUE (type) != NULL
-+ && TYPE_MIN_VALUE (subtype) != NULL
-+ && tree_int_cst_equal (TYPE_MIN_VALUE (type), TYPE_MIN_VALUE (subtype))
-+ && TYPE_MAX_VALUE (type) != NULL
-+ && TYPE_MAX_VALUE (subtype) != NULL
-+ && tree_int_cst_equal (TYPE_MAX_VALUE (type), TYPE_MAX_VALUE (subtype)))
-+ {
-+ /* The type and its subtype have the same representation. If in
-+ addition the two types also have the same name, then the given
-+ type is not a subrange type, but rather a plain base type. */
-+ /* FIXME: brobecker/2004-03-22:
-+ Sizetype INTEGER_CSTs nodes are canonicalized. It should
-+ therefore be sufficient to check the TYPE_SIZE node pointers
-+ rather than checking the actual size. Unfortunately, we have
-+ found some cases, such as in the Ada "integer" type, where
-+ this is not the case. Until this problem is solved, we need to
-+ keep checking the actual size. */
-+ tree type_name = TYPE_NAME (type);
-+ tree subtype_name = TYPE_NAME (subtype);
-+
-+ if (type_name != NULL && TREE_CODE (type_name) == TYPE_DECL)
-+ type_name = DECL_NAME (type_name);
-+
-+ if (subtype_name != NULL && TREE_CODE (subtype_name) == TYPE_DECL)
-+ subtype_name = DECL_NAME (subtype_name);
-+
-+ if (type_name == subtype_name)
-+ return false;
-+ }
-+
-+ return true;
-+}
-+
-+/* Given a pointer to a tree node for a subrange type, return a pointer
-+ to a DIE that describes the given type. */
-+
-+static dw_die_ref
-+subrange_type_die (type, context_die)
-+ tree type;
-+ dw_die_ref context_die;
-+{
-+ dw_die_ref subtype_die;
-+ dw_die_ref subrange_die;
-+ tree name = TYPE_NAME (type);
-+ const HOST_WIDE_INT size_in_bytes = int_size_in_bytes (type);
-+ tree subtype = TREE_TYPE (type);
-+
-+ if (context_die == NULL)
-+ context_die = comp_unit_die;
-+
-+ if (TREE_CODE (subtype) == ENUMERAL_TYPE)
-+ subtype_die = gen_enumeration_type_die (subtype, context_die);
-+ else
-+ subtype_die = base_type_die (subtype);
-+
-+ subrange_die = new_die (DW_TAG_subrange_type, context_die, type);
-+
-+ if (name != NULL)
-+ {
-+ if (TREE_CODE (name) == TYPE_DECL)
-+ name = DECL_NAME (name);
-+ add_name_attribute (subrange_die, IDENTIFIER_POINTER (name));
-+ }
-+
-+ if (int_size_in_bytes (subtype) != size_in_bytes)
-+ {
-+ /* The size of the subrange type and its base type do not match,
-+ so we need to generate a size attribute for the subrange type. */
-+ add_AT_unsigned (subrange_die, DW_AT_byte_size, size_in_bytes);
-+ }
-+
-+ if (TYPE_MIN_VALUE (type) != NULL)
-+ add_bound_info (subrange_die, DW_AT_lower_bound,
-+ TYPE_MIN_VALUE (type));
-+ if (TYPE_MAX_VALUE (type) != NULL)
-+ add_bound_info (subrange_die, DW_AT_upper_bound,
-+ TYPE_MAX_VALUE (type));
-+ add_AT_die_ref (subrange_die, DW_AT_type, subtype_die);
-+
-+ return subrange_die;
-+}
-+
- /* Given a pointer to an arbitrary ..._TYPE tree node, return a debugging
- entry that chains various modifiers in front of the given type. */
-
-@@ -7966,6 +8085,8 @@
- #endif
- item_type = TREE_TYPE (type);
- }
-+ else if (is_subrange_type (type))
-+ mod_type_die = subrange_type_die (type, context_die);
- else if (is_base_type (type))
- mod_type_die = base_type_die (type);
- else
-@@ -9637,7 +9758,7 @@
- /* Generate an DW_AT_name attribute given some string value to be included as
- the value of the attribute. */
-
--static inline void
-+static void
- add_name_attribute (die, name_string)
- dw_die_ref die;
- const char *name_string;
-@@ -9668,12 +9789,25 @@
- /* All fixed-bounds are represented by INTEGER_CST nodes. */
- case INTEGER_CST:
- if (! host_integerp (bound, 0)
-- || (bound_attr == DW_AT_lower_bound
-- && (((is_c_family () || is_java ()) && integer_zerop (bound))
-- || (is_fortran () && integer_onep (bound)))))
-+ || (bound_attr == DW_AT_lower_bound
-+ && (((is_c_family () || is_java ()) && integer_zerop (bound))
-+ || (is_fortran () && integer_onep (bound)))))
- /* use the default */
- ;
-- else
-+ else if (is_modula2() && bound) {
-+ if (bound_attr == DW_AT_lower_bound) {
-+ if (tree_int_cst_sgn (bound) < 0)
-+ add_AT_int (subrange_die, bound_attr, tree_low_cst (bound, tree_int_cst_sgn (bound) > 0));
-+ else
-+ add_AT_unsigned (subrange_die, bound_attr, tree_low_cst (bound, 0));
-+ }
-+ else if (bound_attr == DW_AT_upper_bound) {
-+ if (tree_int_cst_sgn (bound) < 0)
-+ add_AT_int (subrange_die, bound_attr, tree_low_cst (bound, tree_int_cst_sgn (bound) > 0));
-+ else
-+ add_AT_unsigned (subrange_die, bound_attr, tree_low_cst (bound, 0));
-+ }
-+ } else
- add_AT_unsigned (subrange_die, bound_attr, tree_low_cst (bound, 0));
- break;
-
-@@ -9840,7 +9974,8 @@
- if (TREE_CODE (domain) == INTEGER_TYPE
- && TYPE_NAME (domain) == NULL_TREE
- && TREE_CODE (TREE_TYPE (domain)) == INTEGER_TYPE
-- && TYPE_NAME (TREE_TYPE (domain)) == NULL_TREE)
-+ && TYPE_NAME (TREE_TYPE (domain)) == NULL_TREE
-+ && (! is_modula2()))
- ;
- else
- add_type_attribute (subrange_die, TREE_TYPE (domain), 0, 0,
-@@ -10234,8 +10369,16 @@
- support for unnamed types in base_type_die. This can happen if this is
- an Ada subrange type. Correct solution is emit a subrange type die. */
- if ((code == INTEGER_TYPE || code == REAL_TYPE)
-- && TREE_TYPE (type) != 0 && TYPE_NAME (type) == 0)
-- type = TREE_TYPE (type), code = TREE_CODE (type);
-+ && TREE_TYPE (type) != 0 && TYPE_NAME (type) == 0) {
-+ if (is_modula2 ()) {
-+ type_die = subrange_type_die (type, context_die);
-+ if (type_die != NULL)
-+ add_AT_die_ref (object_die, DW_AT_type, type_die);
-+ return;
-+ }
-+ else
-+ type = TREE_TYPE (type), code = TREE_CODE (type);
-+ }
-
- if (code == ERROR_MARK
- /* Handle a special case. For functions whose return type is void, we
-@@ -10399,7 +10542,7 @@
- = new_die (DW_TAG_set_type, scope_die_for (type, context_die), type);
-
- equate_type_number_to_die (type, type_die);
-- add_type_attribute (type_die, TREE_TYPE (type), 0, 0, context_die);
-+ add_type_attribute (type_die, TYPE_DOMAIN (type), 0, 0, context_die);
- }
-
- #if 0
-@@ -10486,7 +10629,7 @@
- enumerated type name/value is listed as a child of the enumerated type
- DIE. */
-
--static void
-+static dw_die_ref
- gen_enumeration_type_die (type, context_die)
- tree type;
- dw_die_ref context_die;
-@@ -10501,7 +10644,7 @@
- add_name_attribute (type_die, type_tag (type));
- }
- else if (! TYPE_SIZE (type))
-- return;
-+ return type_die;
- else
- remove_AT (type_die, DW_AT_declaration);
-
-@@ -10522,7 +10665,7 @@
- if (type_die->die_parent == NULL)
- add_child_die (scope_die_for (type, context_die), type_die);
-
-- for (link = TYPE_FIELDS (type);
-+ for (link = TYPE_VALUES (type);
- link != NULL; link = TREE_CHAIN (link))
- {
- dw_die_ref enum_die = new_die (DW_TAG_enumerator, type_die, link);
-@@ -10544,6 +10687,8 @@
- }
- else
- add_AT_flag (type_die, DW_AT_declaration, 1);
-+
-+ return type_die;
- }
-
- /* Generate a DIE to represent either a real live formal parameter decl or to
-@@ -11371,6 +11516,8 @@
- language = DW_LANG_Fortran77;
- else if (strcmp (language_string, "GNU Pascal") == 0)
- language = DW_LANG_Pascal83;
-+ else if (strcmp (language_string, "GNU Modula-2") == 0)
-+ language = DW_LANG_Modula2;
- else if (strcmp (language_string, "GNU Java") == 0)
- language = DW_LANG_Java;
- else
-@@ -11628,6 +11775,20 @@
- equate_decl_number_to_die (decl, type_die);
- }
-
-+static void
-+gen_set_subrange_die (domain, context_die)
-+ tree domain;
-+ dw_die_ref context_die;
-+{
-+ if (TREE_TYPE (domain) == 0)
-+ gen_type_die (domain, context_die);
-+ else
-+ {
-+ dw_die_ref subrange_die = subrange_type_die (domain, context_die);
-+ equate_type_number_to_die (domain, subrange_die);
-+ }
-+}
-+
- /* Generate a type description DIE. */
-
- static void
-@@ -11699,7 +11860,7 @@
- break;
-
- case SET_TYPE:
-- gen_type_die (TYPE_DOMAIN (type), context_die);
-+ gen_set_subrange_die (TYPE_DOMAIN (type), context_die);
- gen_set_type_die (type, context_die);
- break;
-
-@@ -11774,8 +11935,8 @@
- when appropriate. */
- return;
-
-- case VOID_TYPE:
- case INTEGER_TYPE:
-+ case VOID_TYPE:
- case REAL_TYPE:
- case COMPLEX_TYPE:
- case BOOLEAN_TYPE:
-@@ -12126,9 +12287,10 @@
-
- case FIELD_DECL:
- /* Ignore the nameless fields that are used to skip bits but handle C++
-- anonymous unions. */
-- if (DECL_NAME (decl) != NULL_TREE
-- || TREE_CODE (TREE_TYPE (decl)) == UNION_TYPE)
-+ anonymous unions. Except for Modula-2. */
-+ if ((is_modula2()) ||
-+ (DECL_NAME (decl) != NULL_TREE
-+ || TREE_CODE (TREE_TYPE (decl)) == UNION_TYPE))
- {
- gen_type_die (member_declared_type (decl), context_die);
- gen_field_die (decl, context_die);
diff --git a/gcc/m2/patches/gcc/4.1.0/01.gaius_patch_gcc b/gcc/m2/patches/gcc/4.1.0/01.gaius_patch_gcc
deleted file mode 100644
index a40f833a13c..00000000000
--- a/gcc/m2/patches/gcc/4.1.0/01.gaius_patch_gcc
+++ /dev/null
@@ -1,165 +0,0 @@
-diff -ru gcc-4.1.0/gcc/config/avr/avr.h ../../graft-4.1.0/gcc-4.1.0/gcc/config/avr/avr.h
---- gcc-4.1.0/gcc/config/avr/avr.h 2005-06-25 02:22:41.000000000 +0100
-+++ ../../graft-4.1.0/gcc-4.1.0/gcc/config/avr/avr.h 2006-08-03 15:56:02.000000000 +0100
-@@ -21,6 +21,9 @@
- the Free Software Foundation, 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-+/* Offset from the frame pointer register value to the top of the stack. */
-+#define FRAME_POINTER_CFA_OFFSET(FNDECL) 0
-+
- /* Names to predefine in the preprocessor for this target machine. */
-
- #define TARGET_CPU_CPP_BUILTINS() \
-diff -ru gcc-4.1.0/gcc/dwarf2out.c ../../graft-4.1.0/gcc-4.1.0/gcc/dwarf2out.c
---- gcc-4.1.0/gcc/dwarf2out.c 2006-02-04 22:13:20.000000000 +0000
-+++ ../../graft-4.1.0/gcc-4.1.0/gcc/dwarf2out.c 2006-06-16 11:38:50.000000000 +0100
-@@ -387,6 +387,7 @@
- static void flush_queued_reg_saves (void);
- static bool clobbers_queued_reg_save (rtx);
- static void dwarf2out_frame_debug_expr (rtx, const char *);
-+static bool is_subrange_type (tree);
-
- /* Support for complex CFA locations. */
- static void output_cfa_loc (dw_cfi_ref);
-@@ -2733,6 +2734,8 @@
- static unsigned long size_of_locs (dw_loc_descr_ref);
- static void output_loc_operands (dw_loc_descr_ref);
- static void output_loc_sequence (dw_loc_descr_ref);
-+static void gen_set_subrange_die (tree, dw_die_ref);
-+static dw_die_ref subrange_type_die (tree, dw_die_ref);
-
- /* Convert a DWARF stack opcode into its string name. */
-
-@@ -4003,6 +4006,7 @@
- static bool is_cxx (void);
- static bool is_java (void);
- static bool is_fortran (void);
-+static bool is_modula2 (void);
- static bool is_ada (void);
- static void remove_AT (dw_die_ref, enum dwarf_attribute);
- static void remove_child_TAG (dw_die_ref, enum dwarf_tag);
-@@ -5355,6 +5359,14 @@
- return lang == DW_LANG_Ada95 || lang == DW_LANG_Ada83;
- }
-
-+static inline bool
-+is_modula2 (void)
-+{
-+ unsigned lang = get_AT_unsigned (comp_unit_die, DW_AT_language);
-+
-+ return (lang == DW_LANG_Modula2);
-+}
-+
- /* Free up the memory used by A. */
-
- static inline void free_AT (dw_attr_ref);
-@@ -8263,7 +8275,8 @@
- return false;
-
- if (TREE_CODE (subtype) != INTEGER_TYPE
-- && TREE_CODE (subtype) != ENUMERAL_TYPE)
-+ && TREE_CODE (subtype) != ENUMERAL_TYPE
-+ && TREE_CODE (subtype) != CHAR_TYPE)
- return false;
-
- if (TREE_CODE (type) == TREE_CODE (subtype)
-@@ -10491,7 +10504,20 @@
- || (is_fortran () && integer_onep (bound)))))
- /* Use the default. */
- ;
-- else
-+ else if (is_modula2() && bound) {
-+ if (bound_attr == DW_AT_lower_bound) {
-+ if (tree_int_cst_sgn (bound) < 0)
-+ add_AT_int (subrange_die, bound_attr, tree_low_cst (bound, tree_int_cst_sgn (bound) > 0));
-+ else
-+ add_AT_unsigned (subrange_die, bound_attr, tree_low_cst (bound, 0));
-+ }
-+ else if (bound_attr == DW_AT_upper_bound) {
-+ if (tree_int_cst_sgn (bound) < 0)
-+ add_AT_int (subrange_die, bound_attr, tree_low_cst (bound, tree_int_cst_sgn (bound) > 0));
-+ else
-+ add_AT_unsigned (subrange_die, bound_attr, tree_low_cst (bound, 0));
-+ }
-+ } else
- add_AT_unsigned (subrange_die, bound_attr, tree_low_cst (bound, 0));
- break;
-
-@@ -10601,7 +10627,9 @@
- if (TREE_CODE (domain) == INTEGER_TYPE
- && TYPE_NAME (domain) == NULL_TREE
- && TREE_CODE (TREE_TYPE (domain)) == INTEGER_TYPE
-- && TYPE_NAME (TREE_TYPE (domain)) == NULL_TREE)
-+ && TYPE_NAME (TREE_TYPE (domain)) == NULL_TREE
-+ && TYPE_NAME (TREE_TYPE (domain)) == NULL_TREE
-+ && (! is_modula2()))
- ;
- else
- add_type_attribute (subrange_die, TREE_TYPE (domain), 0, 0,
-@@ -10978,8 +11006,18 @@
- support for unnamed types in base_type_die. This can happen if this is
- an Ada subrange type. Correct solution is emit a subrange type die. */
- if ((code == INTEGER_TYPE || code == REAL_TYPE)
-- && TREE_TYPE (type) != 0 && TYPE_NAME (type) == 0)
-- type = TREE_TYPE (type), code = TREE_CODE (type);
-+ && TREE_TYPE (type) != 0 && TYPE_NAME (type) == 0) {
-+ if (is_modula2 ()) {
-+ type_die = subrange_type_die (type, context_die);
-+ if (type_die != NULL)
-+ add_AT_die_ref (object_die, DW_AT_type, type_die);
-+ return;
-+ }
-+ else {
-+ type = TREE_TYPE (type);
-+ code = TREE_CODE (type);
-+ }
-+ }
-
- if (code == ERROR_MARK
- /* Handle a special case. For functions whose return type is void, we
-@@ -12184,6 +12222,8 @@
- language = DW_LANG_Fortran95;
- else if (strcmp (language_string, "GNU Pascal") == 0)
- language = DW_LANG_Pascal83;
-+ else if (strcmp (language_string, "GNU Modula-2") == 0)
-+ language = DW_LANG_Modula2;
- else if (strcmp (language_string, "GNU Java") == 0)
- language = DW_LANG_Java;
- else
-@@ -12432,6 +12472,20 @@
- equate_decl_number_to_die (decl, type_die);
- }
-
-+static void
-+gen_set_subrange_die (domain, context_die)
-+ tree domain;
-+ dw_die_ref context_die;
-+{
-+ if (TREE_TYPE (domain) == 0)
-+ gen_type_die (domain, context_die);
-+ else
-+ {
-+ dw_die_ref subrange_die = subrange_type_die (domain, context_die);
-+ equate_type_number_to_die (domain, subrange_die);
-+ }
-+}
-+
- /* Generate a type description DIE. */
-
- static void
-@@ -13111,10 +13165,10 @@
-
- case FIELD_DECL:
- /* Ignore the nameless fields that are used to skip bits but handle C++
-- anonymous unions and structs. */
-- if (DECL_NAME (decl) != NULL_TREE
-- || TREE_CODE (TREE_TYPE (decl)) == UNION_TYPE
-- || TREE_CODE (TREE_TYPE (decl)) == RECORD_TYPE)
-+ anonymous unions. Except for Modula-2. */
-+ if ((is_modula2()) ||
-+ (DECL_NAME (decl) != NULL_TREE
-+ || TREE_CODE (TREE_TYPE (decl)) == UNION_TYPE))
- {
- gen_type_die (member_declared_type (decl), context_die);
- gen_field_die (decl, context_die);
diff --git a/gcc/m2/patches/gcc/4.1.1/01.gaius_patch_gcc b/gcc/m2/patches/gcc/4.1.1/01.gaius_patch_gcc
deleted file mode 100644
index c8d5546acef..00000000000
--- a/gcc/m2/patches/gcc/4.1.1/01.gaius_patch_gcc
+++ /dev/null
@@ -1,163 +0,0 @@
---- cvs-gcc-4.1.1/gcc/dwarf2out.c 2006-04-10 14:21:13.000000000 +0100
-+++ gcc-4.1.1/gcc/dwarf2out.c 2006-10-12 15:46:33.000000000 +0100
-@@ -387,6 +387,7 @@
- static void flush_queued_reg_saves (void);
- static bool clobbers_queued_reg_save (rtx);
- static void dwarf2out_frame_debug_expr (rtx, const char *);
-+static bool is_subrange_type (tree);
-
- /* Support for complex CFA locations. */
- static void output_cfa_loc (dw_cfi_ref);
-@@ -2733,6 +2734,8 @@
- static unsigned long size_of_locs (dw_loc_descr_ref);
- static void output_loc_operands (dw_loc_descr_ref);
- static void output_loc_sequence (dw_loc_descr_ref);
-+static void gen_set_subrange_die (tree, dw_die_ref);
-+static dw_die_ref subrange_type_die (tree, dw_die_ref);
-
- /* Convert a DWARF stack opcode into its string name. */
-
-@@ -4003,6 +4006,7 @@
- static bool is_cxx (void);
- static bool is_java (void);
- static bool is_fortran (void);
-+static bool is_modula2 (void);
- static bool is_ada (void);
- static void remove_AT (dw_die_ref, enum dwarf_attribute);
- static void remove_child_TAG (dw_die_ref, enum dwarf_tag);
-@@ -5355,6 +5359,14 @@
- return lang == DW_LANG_Ada95 || lang == DW_LANG_Ada83;
- }
-
-+static inline bool
-+is_modula2 (void)
-+{
-+ unsigned lang = get_AT_unsigned (comp_unit_die, DW_AT_language);
-+
-+ return (lang == DW_LANG_Modula2);
-+}
-+
- /* Free up the memory used by A. */
-
- static inline void free_AT (dw_attr_ref);
-@@ -8264,7 +8276,8 @@
- return false;
-
- if (TREE_CODE (subtype) != INTEGER_TYPE
-- && TREE_CODE (subtype) != ENUMERAL_TYPE)
-+ && TREE_CODE (subtype) != ENUMERAL_TYPE
-+ && TREE_CODE (subtype) != CHAR_TYPE)
- return false;
-
- if (TREE_CODE (type) == TREE_CODE (subtype)
-@@ -10492,7 +10505,20 @@
- || (is_fortran () && integer_onep (bound)))))
- /* Use the default. */
- ;
-- else
-+ else if (is_modula2() && bound) {
-+ if (bound_attr == DW_AT_lower_bound) {
-+ if (tree_int_cst_sgn (bound) < 0)
-+ add_AT_int (subrange_die, bound_attr, tree_low_cst (bound, tree_int_cst_sgn (bound) > 0));
-+ else
-+ add_AT_unsigned (subrange_die, bound_attr, tree_low_cst (bound, 0));
-+ }
-+ else if (bound_attr == DW_AT_upper_bound) {
-+ if (tree_int_cst_sgn (bound) < 0)
-+ add_AT_int (subrange_die, bound_attr, tree_low_cst (bound, tree_int_cst_sgn (bound) > 0));
-+ else
-+ add_AT_unsigned (subrange_die, bound_attr, tree_low_cst (bound, 0));
-+ }
-+ } else
- add_AT_unsigned (subrange_die, bound_attr, tree_low_cst (bound, 0));
- break;
-
-@@ -10602,7 +10628,9 @@
- if (TREE_CODE (domain) == INTEGER_TYPE
- && TYPE_NAME (domain) == NULL_TREE
- && TREE_CODE (TREE_TYPE (domain)) == INTEGER_TYPE
-- && TYPE_NAME (TREE_TYPE (domain)) == NULL_TREE)
-+ && TYPE_NAME (TREE_TYPE (domain)) == NULL_TREE
-+ && TYPE_NAME (TREE_TYPE (domain)) == NULL_TREE
-+ && (! is_modula2()))
- ;
- else
- add_type_attribute (subrange_die, TREE_TYPE (domain), 0, 0,
-@@ -10979,8 +11007,18 @@
- support for unnamed types in base_type_die. This can happen if this is
- an Ada subrange type. Correct solution is emit a subrange type die. */
- if ((code == INTEGER_TYPE || code == REAL_TYPE)
-- && TREE_TYPE (type) != 0 && TYPE_NAME (type) == 0)
-- type = TREE_TYPE (type), code = TREE_CODE (type);
-+ && TREE_TYPE (type) != 0 && TYPE_NAME (type) == 0) {
-+ if (is_modula2 ()) {
-+ type_die = subrange_type_die (type, context_die);
-+ if (type_die != NULL)
-+ add_AT_die_ref (object_die, DW_AT_type, type_die);
-+ return;
-+ }
-+ else {
-+ type = TREE_TYPE (type);
-+ code = TREE_CODE (type);
-+ }
-+ }
-
- if (code == ERROR_MARK
- /* Handle a special case. For functions whose return type is void, we
-@@ -12185,6 +12223,8 @@
- language = DW_LANG_Fortran95;
- else if (strcmp (language_string, "GNU Pascal") == 0)
- language = DW_LANG_Pascal83;
-+ else if (strcmp (language_string, "GNU Modula-2") == 0)
-+ language = DW_LANG_Modula2;
- else if (strcmp (language_string, "GNU Java") == 0)
- language = DW_LANG_Java;
- else
-@@ -12433,6 +12473,20 @@
- equate_decl_number_to_die (decl, type_die);
- }
-
-+static void
-+gen_set_subrange_die (domain, context_die)
-+ tree domain;
-+ dw_die_ref context_die;
-+{
-+ if (TREE_TYPE (domain) == 0)
-+ gen_type_die (domain, context_die);
-+ else
-+ {
-+ dw_die_ref subrange_die = subrange_type_die (domain, context_die);
-+ equate_type_number_to_die (domain, subrange_die);
-+ }
-+}
-+
- /* Generate a type description DIE. */
-
- static void
-@@ -13112,10 +13166,10 @@
-
- case FIELD_DECL:
- /* Ignore the nameless fields that are used to skip bits but handle C++
-- anonymous unions and structs. */
-- if (DECL_NAME (decl) != NULL_TREE
-- || TREE_CODE (TREE_TYPE (decl)) == UNION_TYPE
-- || TREE_CODE (TREE_TYPE (decl)) == RECORD_TYPE)
-+ anonymous unions. Except for Modula-2. */
-+ if ((is_modula2()) ||
-+ (DECL_NAME (decl) != NULL_TREE
-+ || TREE_CODE (TREE_TYPE (decl)) == UNION_TYPE))
- {
- gen_type_die (member_declared_type (decl), context_die);
- gen_field_die (decl, context_die);
---- cvs-gcc-4.1.1/gcc/config/avr/avr.h 2005-06-25 02:22:41.000000000 +0100
-+++ gcc-4.1.1/gcc/config/avr/avr.h 2006-10-12 15:46:33.000000000 +0100
-@@ -21,6 +21,9 @@
- the Free Software Foundation, 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-+/* Offset from the frame pointer register value to the top of the stack. */
-+#define FRAME_POINTER_CFA_OFFSET(FNDECL) 0
-+
- /* Names to predefine in the preprocessor for this target machine. */
-
- #define TARGET_CPU_CPP_BUILTINS() \
diff --git a/gcc/m2/patches/gcc/4.1.2/01-patches b/gcc/m2/patches/gcc/4.1.2/01-patches
deleted file mode 100644
index b727dfa8bc9..00000000000
--- a/gcc/m2/patches/gcc/4.1.2/01-patches
+++ /dev/null
@@ -1,366 +0,0 @@
---- gcc-4.1.2-orig/gcc/dwarf2out.c 2006-12-27 22:23:55.000000000 +0000
-+++ gcc-4.1.2/gcc/dwarf2out.c 2011-04-22 11:27:18.000000000 +0100
-@@ -2740,6 +2740,7 @@
- static unsigned long size_of_locs (dw_loc_descr_ref);
- static void output_loc_operands (dw_loc_descr_ref);
- static void output_loc_sequence (dw_loc_descr_ref);
-+static dw_die_ref subrange_type_die (tree, dw_die_ref);
-
- /* Convert a DWARF stack opcode into its string name. */
-
-@@ -4014,6 +4015,7 @@
- static bool is_cxx (void);
- static bool is_java (void);
- static bool is_fortran (void);
-+static bool is_modula2 (void);
- static bool is_ada (void);
- static void remove_AT (dw_die_ref, enum dwarf_attribute);
- static void remove_child_TAG (dw_die_ref, enum dwarf_tag);
-@@ -5366,6 +5368,16 @@
- return lang == DW_LANG_Ada95 || lang == DW_LANG_Ada83;
- }
-
-+/* Return TRUE if the language is Modula-2. */
-+
-+static inline bool
-+is_modula2 (void)
-+{
-+ unsigned lang = get_AT_unsigned (comp_unit_die, DW_AT_language);
-+
-+ return (lang == DW_LANG_Modula2);
-+}
-+
- /* Free up the memory used by A. */
-
- static inline void free_AT (dw_attr_ref);
-@@ -10515,7 +10527,7 @@
- || (is_fortran () && integer_onep (bound)))))
- /* Use the default. */
- ;
-- else
-+ else
- add_AT_unsigned (subrange_die, bound_attr, tree_low_cst (bound, 0));
- break;
-
-@@ -10625,7 +10637,8 @@
- if (TREE_CODE (domain) == INTEGER_TYPE
- && TYPE_NAME (domain) == NULL_TREE
- && TREE_CODE (TREE_TYPE (domain)) == INTEGER_TYPE
-- && TYPE_NAME (TREE_TYPE (domain)) == NULL_TREE)
-+ && TYPE_NAME (TREE_TYPE (domain)) == NULL_TREE
-+ && (! is_modula2 ()))
- ;
- else
- add_type_attribute (subrange_die, TREE_TYPE (domain), 0, 0,
-@@ -11003,8 +11016,20 @@
- an Ada subrange type. Correct solution is emit a subrange type die. */
- if ((code == INTEGER_TYPE || code == REAL_TYPE)
- && TREE_TYPE (type) != 0 && TYPE_NAME (type) == 0)
-- type = TREE_TYPE (type), code = TREE_CODE (type);
--
-+ {
-+ if (is_modula2 ())
-+ {
-+ type_die = subrange_type_die (type, context_die);
-+ if (type_die != NULL)
-+ add_AT_die_ref (object_die, DW_AT_type, type_die);
-+ return;
-+ }
-+ else
-+ {
-+ type = TREE_TYPE (type);
-+ code = TREE_CODE (type);
-+ }
-+ }
- if (code == ERROR_MARK
- /* Handle a special case. For functions whose return type is void, we
- generate *no* type attribute. (Note that no object may have type
-@@ -12208,6 +12233,8 @@
- language = DW_LANG_Fortran95;
- else if (strcmp (language_string, "GNU Pascal") == 0)
- language = DW_LANG_Pascal83;
-+ else if (strcmp (language_string, "GNU Modula-2") == 0)
-+ language = DW_LANG_Modula2;
- else if (strcmp (language_string, "GNU Java") == 0)
- language = DW_LANG_Java;
- else
-@@ -13140,8 +13167,9 @@
-
- case FIELD_DECL:
- /* Ignore the nameless fields that are used to skip bits but handle C++
-- anonymous unions and structs. */
-- if (DECL_NAME (decl) != NULL_TREE
-+ anonymous unions and structs. Except for Modula-2. */
-+ if ((is_modula2())
-+ || DECL_NAME (decl) != NULL_TREE
- || TREE_CODE (TREE_TYPE (decl)) == UNION_TYPE
- || TREE_CODE (TREE_TYPE (decl)) == RECORD_TYPE)
- {
---- gcc-4.1.2-orig/gcc/ggc-page.c 2005-09-07 04:50:08.000000000 +0100
-+++ gcc-4.1.2/gcc/ggc-page.c 2010-11-03 11:10:19.000000000 +0000
-@@ -1859,6 +1859,10 @@
- if (G.allocated < allocated_last_gc + min_expand && !ggc_force_collect)
- return;
-
-+#if 1
-+ return; /* one gross hack (gaius) */
-+#endif
-+
- timevar_push (TV_GC);
- if (!quiet_flag)
- fprintf (stderr, " {GC %luk -> ", (unsigned long) G.allocated / 1024);
---- gcc-4.1.2-orig/gcc/config/i386/i386.c 2006-11-17 07:01:22.000000000 +0000
-+++ gcc-4.1.2/gcc/config/i386/i386.c 2008-05-06 12:43:13.000000000 +0100
-@@ -16666,7 +16666,7 @@
- {
- fprintf (file, "\tcall LPC$%d\nLPC$%d:\tpopl %%eax\n", label, label);
- fprintf (file, "\tmovl %s-LPC$%d(%%eax),%%edx\n", lazy_ptr_name, label);
-- fprintf (file, "\tjmp %%edx\n");
-+ fprintf (file, "\tjmp *%%edx\n");
- }
- else
- fprintf (file, "\tjmp *%s\n", lazy_ptr_name);
---- gcc-4.1.2-orig/gcc/gcc.c 2006-11-07 14:26:21.000000000 +0000
-+++ gcc-4.1.2/gcc/gcc.c 2011-04-19 19:39:38.000000000 +0100
-@@ -262,6 +262,10 @@
- run if this is nonzero. */
- static int error_count = 0;
-
-+/* The lang specs might wish to override the default linker.
-+ */
-+int force_no_linker = 0;
-+
- /* Greatest exit code of sub-processes that has been encountered up to
- now. */
- static int greatest_status = 1;
-@@ -6618,7 +6622,7 @@
-
- /* Run ld to link all the compiler output files. */
-
-- if (num_linker_inputs > 0 && error_count == 0)
-+ if (num_linker_inputs > 0 && error_count == 0 && (! force_no_linker))
- {
- int tmp = execution_count;
-
-@@ -6643,7 +6647,7 @@
- /* If options said don't run linker,
- complain about input files to be given to the linker. */
-
-- if (! linker_was_run && error_count == 0)
-+ if (! linker_was_run && error_count == 0 && (! force_no_linker))
- for (i = 0; (int) i < n_infiles; i++)
- if (explicit_link_files[i])
- error ("%s: linker input file unused because linking not done",
-@@ -7755,3 +7759,11 @@
-
- return argv[nargs + 2];
- }
-+
-+const char *find_executable (const char *prog_name)
-+{
-+#if defined(HAVE_TARGET_OBJECT_SUFFIX) || defined(HAVE_TARGET_EXECUTABLE_SUFFIX)
-+ prog_name = convert_filename (prog_name, TRUE, FALSE);
-+#endif
-+ return find_a_file (&exec_prefixes, prog_name, X_OK, 0);
-+}
---- gcc-4.1.2-orig/gcc/gcc.h 2005-06-25 03:02:01.000000000 +0100
-+++ gcc-4.1.2/gcc/gcc.h 2008-11-01 01:41:25.000000000 +0000
-@@ -61,6 +61,7 @@
- extern void error (const char *, ...) ATTRIBUTE_PRINTF_1;
- extern void pfatal_with_name (const char *) ATTRIBUTE_NORETURN;
- extern void set_input (const char *);
-+extern const char *find_executable (const char *prog_name);
-
- /* Spec files linked with gcc.c must provide definitions for these. */
-
---- gcc-4.1.2-orig/gcc/tree.h 2007-02-09 02:52:53.000000000 +0000
-+++ gcc-4.1.2/gcc/tree.h 2010-10-27 11:19:16.000000000 +0100
-@@ -3231,6 +3231,8 @@
- extern tree build_index_type (tree);
- extern tree build_index_2_type (tree, tree);
- extern tree build_array_type (tree, tree);
-+extern tree finish_build_array_type (tree, tree, tree); /* gaius */
-+extern tree canonicalize_array (tree array); /* gaius */
- extern tree build_function_type (tree, tree);
- extern tree build_function_type_list (tree, ...);
- extern tree build_method_type_directly (tree, tree, tree);
---- gcc-4.1.2-orig/gcc/tree.c 2007-01-05 20:59:15.000000000 +0000
-+++ gcc-4.1.2/gcc/tree.c 2011-03-18 13:44:12.000000000 +0000
-@@ -5025,6 +5025,73 @@
- return build_range_type (sizetype, lowval, highval);
- }
-
-+#if 1
-+/* (gaius) new patch here */
-+
-+/* Construct, lay out and return the type of arrays of elements with ELT_TYPE
-+ and number of elements specified by the range of values of INDEX_TYPE.
-+ If such a type has already been constructed, reuse it. */
-+
-+tree
-+finish_build_array_type (tree t, tree elt_type, tree index_type)
-+{
-+ if (TREE_CODE (elt_type) == FUNCTION_TYPE)
-+ {
-+ error ("arrays of functions are not meaningful");
-+ elt_type = integer_type_node;
-+ }
-+
-+ TREE_TYPE (t) = elt_type;
-+ TYPE_DOMAIN (t) = index_type;
-+
-+ if (index_type == 0)
-+ {
-+ tree save = t;
-+ t = canonicalize_array (t);
-+ if (save == t)
-+ layout_type (t);
-+ return t;
-+ }
-+
-+ t = canonicalize_array (t);
-+ if (!COMPLETE_TYPE_P (t))
-+ layout_type (t);
-+ return t;
-+}
-+
-+/* Construct, lay out and return the type of arrays of elements with ELT_TYPE
-+ and number of elements specified by the range of values of INDEX_TYPE.
-+ If such a type has already been constructed, reuse it. */
-+
-+tree
-+build_array_type (tree elt_type, tree index_type)
-+{
-+ return finish_build_array_type (make_node (ARRAY_TYPE),
-+ elt_type, index_type);
-+}
-+
-+/* canonicalize_array, given an ARRAY_TYPE node, array, lookup a
-+ canonicalized version of this array. If no canonicalized version exists
-+ then register, array, as the canonical version. Return the canonical
-+ version of, array. */
-+
-+tree canonicalize_array (tree array)
-+{
-+ hashval_t hashcode = 0;
-+ tree elt_type = TREE_TYPE (array);
-+ tree index_type = TYPE_DOMAIN (array);
-+
-+ if (index_type == 0)
-+ {
-+ hashcode = iterative_hash_object (TYPE_HASH (elt_type), hashcode);
-+ return type_hash_canon (hashcode, array);
-+ }
-+ hashcode = iterative_hash_object (TYPE_HASH (elt_type), hashcode);
-+ hashcode = iterative_hash_object (TYPE_HASH (index_type), hashcode);
-+ return type_hash_canon (hashcode, array);
-+}
-+#else
-+
- /* Construct, lay out and return the type of arrays of elements with ELT_TYPE
- and number of elements specified by the range of values of INDEX_TYPE.
- If such a type has already been constructed, reuse it. */
-@@ -5063,6 +5130,7 @@
- layout_type (t);
- return t;
- }
-+#endif
-
- /* Return the TYPE of the elements comprising
- the innermost dimension of ARRAY. */
---- gcc-4.1.2-orig/gcc/ipa-type-escape.c 2005-09-25 06:28:01.000000000 +0100
-+++ gcc-4.1.2/gcc/ipa-type-escape.c 2009-07-20 10:36:11.000000000 +0100
-@@ -259,10 +259,33 @@
- static bool
- type_to_consider (tree type)
- {
-+ int stackSize = 1;
-+ int stackUsed = 1;
-+ int oldSize;
-+ int i;
-+ tree *oldStack;
-+ tree *stack = (tree *) alloca (sizeof (tree) * stackSize);
-+ stack[0] = type;
-+
-+ /* return false if we detect a cyclic declaration of "array of pointer to ..." */
-+
- /* Strip the *'s off. */
- type = TYPE_MAIN_VARIANT (type);
-- while (POINTER_TYPE_P (type) || TREE_CODE (type) == ARRAY_TYPE)
-+ while (POINTER_TYPE_P (type) || TREE_CODE (type) == ARRAY_TYPE) {
- type = TYPE_MAIN_VARIANT (TREE_TYPE (type));
-+ for (i=0; i<stackUsed; i++)
-+ if (stack[i] == type)
-+ return false;
-+ if (stackSize == stackUsed) {
-+ oldSize = stackSize;
-+ stackSize *= 2;
-+ oldStack = stack;
-+ stack = (tree *) alloca (sizeof (tree) * stackSize);
-+ memcpy (stack, oldStack, oldSize);
-+ }
-+ stack[stackUsed] = type;
-+ stackUsed++;
-+ }
-
- switch (TREE_CODE (type))
- {
---- gcc-4.1.2-orig/configure 2006-11-21 17:48:36.000000000 +0000
-+++ gcc-4.1.2/configure 2009-11-06 21:44:06.000000000 +0000
-@@ -3549,7 +3549,9 @@
- # For an installed makeinfo, we require it to be from texinfo 4.2 or
- # higher, else we use the "missing" dummy.
- if ${MAKEINFO} --version \
-- | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])' >/dev/null 2>&1; then
-+ | egrep 'texinfo[^0-9]*(4\.([7-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then
-+# | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])' >/dev/null 2>&1; then
-+ ${MAKEINFO} --version
- :
- else
- MAKEINFO="$MISSING makeinfo"
---- gcc-4.1.2-orig/configure.in 2006-11-21 17:48:36.000000000 +0000
-+++ gcc-4.1.2/configure.in 2009-11-06 21:44:16.000000000 +0000
-@@ -2134,7 +2134,9 @@
- # For an installed makeinfo, we require it to be from texinfo 4.2 or
- # higher, else we use the "missing" dummy.
- if ${MAKEINFO} --version \
-- | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])' >/dev/null 2>&1; then
-+ | egrep 'texinfo[^0-9]*(4\.([7-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then
-+# | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])' >/dev/null 2>&1; then
-+ ${MAKEINFO} --version
- :
- else
- MAKEINFO="$MISSING makeinfo"
---- gcc-4.1.2-orig/gcc/configure.ac 2006-11-13 22:09:55.000000000 +0000
-+++ gcc-4.1.2/gcc/configure.ac 2009-11-06 21:44:46.000000000 +0000
-@@ -833,7 +833,9 @@
- # that we can use it.
- gcc_AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version,
- [GNU texinfo.* \([0-9][0-9.]*\)],
-- [4.[2-9]*])
-+ [4.[7-9]*|4.[1-9][0-9]*|[5-9]*|[1-9][0-9]*])
-+# [GNU texinfo.* \([0-9][0-9.]*\)],
-+# [4.[2-9]*])
- if test $gcc_cv_prog_makeinfo_modern = no; then
- MAKEINFO="$MISSING makeinfo"
- AC_MSG_WARN([
---- gcc-4.1.2-orig/gcc/tree-flow-inline.h 2006-04-18 14:24:45.000000000 +0100
-+++ gcc-4.1.2/gcc/tree-flow-inline.h 2011-04-22 11:19:06.000000000 +0100
-@@ -1469,8 +1469,17 @@
- if (TREE_THIS_VOLATILE (v))
- return false;
-
-+#if 0
-+ /* original gcc code below here (gaius) */
- return (AGGREGATE_TYPE_P (TREE_TYPE (v)) &&
- TREE_CODE (TREE_TYPE (v)) != ARRAY_TYPE);
-+#else
-+ /* gaius' attempt at a solution */
-+ return (AGGREGATE_TYPE_P (TREE_TYPE (v)) &&
-+ TREE_CODE (TREE_TYPE (v)) != ARRAY_TYPE &&
-+ (! ((TREE_CODE (v) == CONST_DECL) &&
-+ (TREE_CODE (TREE_TYPE (v)) == RECORD_TYPE))));
-+#endif
- }
-
-
diff --git a/gcc/m2/patches/gcc/4.1.2/02-patches b/gcc/m2/patches/gcc/4.1.2/02-patches
deleted file mode 100644
index 4ae56e03327..00000000000
--- a/gcc/m2/patches/gcc/4.1.2/02-patches
+++ /dev/null
@@ -1,83 +0,0 @@
---- gcc-4.1.2/libstdc++-v3/scripts/make_exports.pl 2006-04-26 20:59:05.000000000 +0100
-+++ gcc-4.1.2+gm2-20090624/libstdc++-v3/scripts/make_exports.pl 2009-06-24 12:16:06.000000000 +0100
-@@ -92,7 +92,11 @@
- print STDERR $nm.' -P '.(join ' ',@ARGV).'|';
- open NM,$nm.' -P '.(join ' ',@ARGV).'|' or die $!;
- # Talk to c++filt through a pair of file descriptors.
--open2(*FILTIN, *FILTOUT, "c++filt --strip-underscores") or die $!;
-+if ($^O eq "darwin") {
-+ open2(*FILTIN, *FILTOUT, "c++filt --strip-underscore") or die $!;
-+} else {
-+ open2(*FILTIN, *FILTOUT, "c++filt --strip-underscores") or die $!;
-+}
- NAME: while (<NM>) {
- my $i;
- chomp;
---- gcc-4.1.2/ltcf-c.sh.sav 2005-11-18 17:53:08.000000000 -0500
-+++ gcc-4.1.2/ltcf-c.sh 2009-11-30 20:35:50.000000000 -0500
-@@ -402,10 +402,13 @@
- esac
- # Disable shared library build on OS-X older than 10.3.
- case $host_os in
-+ darwin10*)
-+ can_build_shared=yes
-+ ;;
- darwin[1-6]*)
- can_build_shared=no
- ;;
-- darwin7*)
-+ darwin[7-9]*)
- can_build_shared=yes
- ;;
- esac
---- gcc-4.1.2/ltcf-cxx.sh.sav 2005-07-15 22:30:53.000000000 -0400
-+++ gcc-4.1.2/ltcf-cxx.sh 2009-11-30 20:35:34.000000000 -0500
-@@ -247,10 +247,13 @@
- esac
- # Disable shared library build on OS-X older than 10.3.
- case $host_os in
-+ darwin10*)
-+ can_build_shared=yes
-+ ;;
- darwin[1-6]*)
- can_build_shared=no
- ;;
-- darwin7*)
-+ darwin[7-9]*)
- can_build_shared=yes
- ;;
- esac
---- gcc-4.1.2/ltcf-gcj.sh.sav 2005-07-15 22:30:53.000000000 -0400
-+++ gcc-4.1.2/ltcf-gcj.sh 2009-11-30 20:36:51.000000000 -0500
-@@ -401,10 +401,13 @@
- esac
- # Disable shared library build on OS-X older than 10.3.
- case $host_os in
-+ darwin10*)
-+ can_build_shared=yes
-+ ;;
- darwin[1-6]*)
- can_build_shared=no
- ;;
-- darwin7*)
-+ darwin[7-9]*)
- can_build_shared=yes
- ;;
- esac
---- gcc-4.1.2/ltconfig.sav 2006-07-04 16:30:34.000000000 -0400
-+++ gcc-4.1.2/ltconfig 2009-11-30 20:37:44.000000000 -0500
-@@ -1112,10 +1112,13 @@
- need_version=no
- # Disable shared library build on OS-X older than 10.3.
- case $host_os in
-+ darwin10*)
-+ can_build_shared=yes
-+ ;;
- darwin[1-6]*)
- can_build_shared=no
- ;;
-- darwin7*)
-+ darwin[7-9]*)
- can_build_shared=yes
- ;;
- esac
diff --git a/gcc/m2/patches/gcc/4.1.2/ChangeLog b/gcc/m2/patches/gcc/4.1.2/ChangeLog
deleted file mode 100644
index f60720650e0..00000000000
--- a/gcc/m2/patches/gcc/4.1.2/ChangeLog
+++ /dev/null
@@ -1,56 +0,0 @@
-Notes
-
- * make check-gcc check-g++ produces exactly the same
- results with and without these patches applied.
- * the obvious strategy is to ensure that all new patches
- can only be invoked by the GNU Modula-2 front end.
- This is true for all patches except gcc/tree-flow-inline.h.
- However this patch cannot be applied to
- a gcc-4.6.0 tree as gcc/tree-flow-inline.h and tree-ssa-alias.c has
- been rewritten. It does not effect C or C++ (according to the
- regression tests) - indeed the particular construct it detects
- cannot be created in C or C++. It is possible that this patch
- might effect other front ends: Java, Pascal, Ada. But
- as this one patch will never make it to trunc, I think this
- is acceptable.
-
-ChangeLog
-
- * dwarf2out.c (subrange_type_die): Prototype added.
- (is_modula2): New function).
- (add_subscript_info): Do not ignore TREE_TYPE (domain)
- for Modula-2 subscripts as they are subranges.
- (add_type_attribute): If the type is unnamed subrange type
- the emit a subrange type die for Modula-2 and return.
- (gen_decl_die): Do not ignore nameless fields in records
- or unions in Modula-2.
- (gen_compile_unit_die): Set language to DW_LANG_Modula2.
- * config/i386/i386.c: backport asm syntax change.
- * gcc/gcc.c (force_no_linker): Allow specs to suppress linking.
- (main): Suppress call to linker if option is set.
- Ensure that error messages relating to linker not running was
- not due to this option.
- (find_executable): New function.
- * gcc/gcc.h (find_executable): Added prototype.
- * gcc/tree.h (finish_build_array_type): Added prototype.
- (canonicalize_array): Added prototype.
- * gcc/tree.c (finish_build_array_type): New function.
- (build_array_type): Reimplemented to use make_node and
- finish_build_array_type.
- (canonicalize_array): New function.
- * gcc/ipa-type-escape.c (type_to_consider): include
- cyclic types such as: foo = ARRAY [ ] OF POINTER TO foo
- to the list of goofy types to skip. This is safe for all
- front ends as this patch detects and avoids infinite loops.
- * configure: Altered regexp to allow later versions of
- texinfo to build the documentation.
- * gcc-4.1.2/configure.in: Altered regexp to allow later
- versions of texinfo to build the documentation.
- * gcc-4.1.2/gcc/configure.ac: Altered regexp to allow later
- versions of texinfo to build the documentation.
- * gcc/tree-flow-inline.h (var_can_have_subvars): returns false
- if the tree is a CONST_DECL whose type is RECORD_TYPE.
- This change is safe for C as C does not generate CONST_DECL RECORD_TYPES.
- It can occur in Modula-2 via CONST foo = type {field1, field2}.
- This patch is no longer relevant in gcc-4.6.0 and beyond as
- tree-ssa-alias.c has been completely rewritten.
diff --git a/gcc/m2/patches/gcc/4.1.2/old/01.gaius_patch_gcc b/gcc/m2/patches/gcc/4.1.2/old/01.gaius_patch_gcc
deleted file mode 100644
index c16d15ecbbc..00000000000
--- a/gcc/m2/patches/gcc/4.1.2/old/01.gaius_patch_gcc
+++ /dev/null
@@ -1,202 +0,0 @@
---- gcc-4.1.2-orig/gcc/dwarf2out.c 2006-12-27 22:23:55.000000000 +0000
-+++ gcc-4.1.2/gcc/dwarf2out.c 2007-07-04 15:31:07.000000000 +0100
-@@ -2740,6 +2740,9 @@
- static unsigned long size_of_locs (dw_loc_descr_ref);
- static void output_loc_operands (dw_loc_descr_ref);
- static void output_loc_sequence (dw_loc_descr_ref);
-+static void gen_set_subrange_die (tree, dw_die_ref);
-+static dw_die_ref subrange_type_die (tree, dw_die_ref);
-+
-
- /* Convert a DWARF stack opcode into its string name. */
-
-@@ -4014,6 +4017,7 @@
- static bool is_cxx (void);
- static bool is_java (void);
- static bool is_fortran (void);
-+static bool is_modula2 (void);
- static bool is_ada (void);
- static void remove_AT (dw_die_ref, enum dwarf_attribute);
- static void remove_child_TAG (dw_die_ref, enum dwarf_tag);
-@@ -5366,6 +5370,16 @@
- return lang == DW_LANG_Ada95 || lang == DW_LANG_Ada83;
- }
-
-+/* Return TRUE if the language is Modula-2. */
-+
-+static inline bool
-+is_modula2 (void)
-+{
-+ unsigned lang = get_AT_unsigned (comp_unit_die, DW_AT_language);
-+
-+ return (lang == DW_LANG_Modula2);
-+}
-+
- /* Free up the memory used by A. */
-
- static inline void free_AT (dw_attr_ref);
-@@ -8275,7 +8289,8 @@
- return false;
-
- if (TREE_CODE (subtype) != INTEGER_TYPE
-- && TREE_CODE (subtype) != ENUMERAL_TYPE)
-+ && TREE_CODE (subtype) != ENUMERAL_TYPE
-+ && TREE_CODE (subtype) != CHAR_TYPE)
- return false;
-
- if (TREE_CODE (type) == TREE_CODE (subtype)
-@@ -10515,7 +10530,24 @@
- || (is_fortran () && integer_onep (bound)))))
- /* Use the default. */
- ;
-- else
-+ else if (is_modula2() && bound)
-+ {
-+ if (bound_attr == DW_AT_lower_bound)
-+ {
-+ if (tree_int_cst_sgn (bound) < 0)
-+ add_AT_int (subrange_die, bound_attr, tree_low_cst (bound, tree_int_cst_sgn (bound) > 0));
-+ else
-+ add_AT_unsigned (subrange_die, bound_attr, tree_low_cst (bound, 0));
-+ }
-+ else if (bound_attr == DW_AT_upper_bound)
-+ {
-+ if (tree_int_cst_sgn (bound) < 0)
-+ add_AT_int (subrange_die, bound_attr, tree_low_cst (bound, tree_int_cst_sgn (bound) > 0));
-+ else
-+ add_AT_unsigned (subrange_die, bound_attr, tree_low_cst (bound, 0));
-+ }
-+ }
-+ else
- add_AT_unsigned (subrange_die, bound_attr, tree_low_cst (bound, 0));
- break;
-
-@@ -10625,7 +10657,8 @@
- if (TREE_CODE (domain) == INTEGER_TYPE
- && TYPE_NAME (domain) == NULL_TREE
- && TREE_CODE (TREE_TYPE (domain)) == INTEGER_TYPE
-- && TYPE_NAME (TREE_TYPE (domain)) == NULL_TREE)
-+ && TYPE_NAME (TREE_TYPE (domain)) == NULL_TREE
-+ && (! is_modula2 ()))
- ;
- else
- add_type_attribute (subrange_die, TREE_TYPE (domain), 0, 0,
-@@ -11003,8 +11036,20 @@
- an Ada subrange type. Correct solution is emit a subrange type die. */
- if ((code == INTEGER_TYPE || code == REAL_TYPE)
- && TREE_TYPE (type) != 0 && TYPE_NAME (type) == 0)
-- type = TREE_TYPE (type), code = TREE_CODE (type);
--
-+ {
-+ if (is_modula2 ())
-+ {
-+ type_die = subrange_type_die (type, context_die);
-+ if (type_die != NULL)
-+ add_AT_die_ref (object_die, DW_AT_type, type_die);
-+ return;
-+ }
-+ else
-+ {
-+ type = TREE_TYPE (type);
-+ code = TREE_CODE (type);
-+ }
-+ }
- if (code == ERROR_MARK
- /* Handle a special case. For functions whose return type is void, we
- generate *no* type attribute. (Note that no object may have type
-@@ -12208,6 +12253,8 @@
- language = DW_LANG_Fortran95;
- else if (strcmp (language_string, "GNU Pascal") == 0)
- language = DW_LANG_Pascal83;
-+ else if (strcmp (language_string, "GNU Modula-2") == 0)
-+ language = DW_LANG_Modula2;
- else if (strcmp (language_string, "GNU Java") == 0)
- language = DW_LANG_Java;
- else
-@@ -12456,6 +12503,18 @@
- equate_decl_number_to_die (decl, type_die);
- }
-
-+static void
-+gen_set_subrange_die (tree domain, dw_die_ref context_die)
-+{
-+ if (TREE_TYPE (domain) == 0)
-+ gen_type_die (domain, context_die);
-+ else
-+ {
-+ dw_die_ref subrange_die = subrange_type_die (domain, context_die);
-+ equate_type_number_to_die (domain, subrange_die);
-+ }
-+}
-+
- /* Generate a type description DIE. */
-
- static void
-@@ -13140,8 +13199,9 @@
-
- case FIELD_DECL:
- /* Ignore the nameless fields that are used to skip bits but handle C++
-- anonymous unions and structs. */
-- if (DECL_NAME (decl) != NULL_TREE
-+ anonymous unions and structs. Except for Modula-2. */
-+ if ((is_modula2())
-+ || DECL_NAME (decl) != NULL_TREE
- || TREE_CODE (TREE_TYPE (decl)) == UNION_TYPE
- || TREE_CODE (TREE_TYPE (decl)) == RECORD_TYPE)
- {
---- gcc-4.1.2-orig/gcc/ggc-page.c 2005-09-07 04:50:08.000000000 +0100
-+++ gcc-4.1.2/gcc/ggc-page.c 2007-07-04 15:26:28.000000000 +0100
-@@ -1859,6 +1859,10 @@
- if (G.allocated < allocated_last_gc + min_expand && !ggc_force_collect)
- return;
-
-+#if 1
-+ return; /* one gross hack (gaius) */
-+#endif
-+
- timevar_push (TV_GC);
- if (!quiet_flag)
- fprintf (stderr, " {GC %luk -> ", (unsigned long) G.allocated / 1024);
---- gcc-4.1.2-orig/gcc/gimple-low.c 2005-08-19 06:41:13.000000000 +0100
-+++ gcc-4.1.2/gcc/gimple-low.c 2007-07-04 15:26:33.000000000 +0100
-@@ -246,6 +246,7 @@
- }
-
- record_vars (BIND_EXPR_VARS (stmt));
-+ gcc_assert (TREE_CODE (BIND_EXPR_BODY (stmt)) == STATEMENT_LIST);
- lower_stmt_body (BIND_EXPR_BODY (stmt), data);
-
- if (new_block)
---- gcc-4.1.2-orig/gcc/tree-ssa-dom.c 2006-11-17 09:01:31.000000000 +0000
-+++ gcc-4.1.2/gcc/tree-ssa-dom.c 2007-07-09 17:35:04.000000000 +0100
-@@ -1976,6 +1976,9 @@
- return NULL;
- }
-
-+static void stop (void) {}
-+static int mycount = 0;
-+
- /* STMT is a COND_EXPR for which we could not trivially determine its
- result. This routine attempts to find equivalent forms of the
- condition which we may be able to optimize better. It also
-@@ -1988,6 +1991,9 @@
- {
- tree cond = COND_EXPR_COND (stmt);
-
-+ mycount++;
-+ if (mycount == 140)
-+ stop ();
- if (COMPARISON_CLASS_P (cond))
- {
- tree op0 = TREE_OPERAND (cond, 0);
---- gcc-4.1.2-orig/gcc/tree-ssa-forwprop.c 2005-06-25 03:02:01.000000000 +0100
-+++ gcc-4.1.2/gcc/tree-ssa-forwprop.c 2007-07-04 14:45:54.000000000 +0100
-@@ -572,7 +572,7 @@
- /* This should always succeed in creating gimple, so there is
- no need to save enough state to undo this propagation. */
- TREE_OPERAND (lhs, 0) = unshare_expr (TREE_OPERAND (stmt, 1));
-- fold_stmt_inplace (use_stmt);
-+ gcc_assert (fold_stmt_inplace (use_stmt));
- tidy_after_forward_propagate_addr (use_stmt);
- return true;
- }
diff --git a/gcc/m2/patches/gcc/4.1.2/old/02.gaius_rs6000_lang b/gcc/m2/patches/gcc/4.1.2/old/02.gaius_rs6000_lang
deleted file mode 100644
index e5ae6394cc5..00000000000
--- a/gcc/m2/patches/gcc/4.1.2/old/02.gaius_rs6000_lang
+++ /dev/null
@@ -1,11 +0,0 @@
---- gcc-4.1.2+gm2-20070808-orig/gcc/config/rs6000/rs6000.c 2007-08-14 11:16:46.000000000 +0100
-+++ gcc-4.1.2+gm2-20070808/gcc/config/rs6000/rs6000.c 2007-08-14 11:31:08.000000000 +0100
-@@ -15314,6 +15314,8 @@
- i = 2;
- else if (! strcmp (language_string, "GNU Ada"))
- i = 3;
-+ else if (! strcmp (language_string, "GNU Modula-2"))
-+ i = 8;
- else if (! strcmp (language_string, "GNU C++"))
- i = 9;
- else if (! strcmp (language_string, "GNU Java"))
diff --git a/gcc/m2/patches/gcc/4.1.2/old/03.michael_i386 b/gcc/m2/patches/gcc/4.1.2/old/03.michael_i386
deleted file mode 100644
index 8e6a946ff6b..00000000000
--- a/gcc/m2/patches/gcc/4.1.2/old/03.michael_i386
+++ /dev/null
@@ -1,11 +0,0 @@
---- gcc-4.1.2/gcc/config/i386/i386.c-was 2008-05-06 12:42:44.000000000 +0100
-+++ gcc-4.1.2/gcc/config/i386/i386.c 2008-05-06 12:43:13.000000000 +0100
-@@ -16666,7 +16666,7 @@
- {
- fprintf (file, "\tcall LPC$%d\nLPC$%d:\tpopl %%eax\n", label, label);
- fprintf (file, "\tmovl %s-LPC$%d(%%eax),%%edx\n", lazy_ptr_name, label);
-- fprintf (file, "\tjmp %%edx\n");
-+ fprintf (file, "\tjmp *%%edx\n");
- }
- else
- fprintf (file, "\tjmp *%s\n", lazy_ptr_name);
diff --git a/gcc/m2/patches/gcc/4.1.2/old/04.gaius_patch_gcc b/gcc/m2/patches/gcc/4.1.2/old/04.gaius_patch_gcc
deleted file mode 100644
index fa6ffafb65d..00000000000
--- a/gcc/m2/patches/gcc/4.1.2/old/04.gaius_patch_gcc
+++ /dev/null
@@ -1,31 +0,0 @@
---- gcc-4.1.2-orig/gcc/gcc.c 2006-11-07 14:26:21.000000000 +0000
-+++ gcc-4.1.2/gcc/gcc.c 2008-05-27 10:19:47.000000000 +0100
-@@ -262,6 +262,10 @@
- run if this is nonzero. */
- static int error_count = 0;
-
-+/* The lang specs might wish to overrise the default linker.
-+ */
-+int force_no_linker = 0;
-+
- /* Greatest exit code of sub-processes that has been encountered up to
- now. */
- static int greatest_status = 1;
-@@ -6618,7 +6622,7 @@
-
- /* Run ld to link all the compiler output files. */
-
-- if (num_linker_inputs > 0 && error_count == 0)
-+ if (num_linker_inputs > 0 && error_count == 0 && (! force_no_linker))
- {
- int tmp = execution_count;
-
-@@ -6643,7 +6647,7 @@
- /* If options said don't run linker,
- complain about input files to be given to the linker. */
-
-- if (! linker_was_run && error_count == 0)
-+ if (! linker_was_run && error_count == 0 && (! force_no_linker))
- for (i = 0; (int) i < n_infiles; i++)
- if (explicit_link_files[i])
- error ("%s: linker input file unused because linking not done",
diff --git a/gcc/m2/patches/gcc/4.1.2/old/05.gaius_patch_gcc b/gcc/m2/patches/gcc/4.1.2/old/05.gaius_patch_gcc
deleted file mode 100644
index e9cbdba1c8a..00000000000
--- a/gcc/m2/patches/gcc/4.1.2/old/05.gaius_patch_gcc
+++ /dev/null
@@ -1,21 +0,0 @@
---- gcc-4.1.2-at-04/gcc/gcc.c 2008-05-27 10:19:47.000000000 +0100
-+++ gcc-4.1.2/gcc/gcc.c 2008-10-25 16:24:51.000000000 +0100
-@@ -7759,3 +7759,8 @@
-
- return argv[nargs + 2];
- }
-+
-+const char *find_executable (const char *prog_name)
-+{
-+ return find_a_file (&exec_prefixes, prog_name, X_OK, 0);
-+}
---- gcc-4.1.2-at-04/gcc/gcc.h 2005-06-25 03:02:01.000000000 +0100
-+++ gcc-4.1.2/gcc/gcc.h 2008-10-25 16:25:26.000000000 +0100
-@@ -61,6 +61,7 @@
- extern void error (const char *, ...) ATTRIBUTE_PRINTF_1;
- extern void pfatal_with_name (const char *) ATTRIBUTE_NORETURN;
- extern void set_input (const char *);
-+extern const char *find_executable (const char *prog_name);
-
- /* Spec files linked with gcc.c must provide definitions for these. */
-
diff --git a/gcc/m2/patches/gcc/4.1.2/old/06.gaius_patch_tree b/gcc/m2/patches/gcc/4.1.2/old/06.gaius_patch_tree
deleted file mode 100644
index ec4442dd563..00000000000
--- a/gcc/m2/patches/gcc/4.1.2/old/06.gaius_patch_tree
+++ /dev/null
@@ -1,95 +0,0 @@
---- gcc-4.1.2-orig/gcc/tree.h 2007-02-09 02:52:53.000000000 +0000
-+++ gcc-4.1.2/gcc/tree.h 2009-09-02 20:28:05.000000000 +0100
-@@ -3231,6 +3231,8 @@
- extern tree build_index_type (tree);
- extern tree build_index_2_type (tree, tree);
- extern tree build_array_type (tree, tree);
-+extern tree finish_build_array_type (tree, tree, tree); /* gaius */
-+extern tree canonicalize_array (tree array); /* gaius */
- extern tree build_function_type (tree, tree);
- extern tree build_function_type_list (tree, ...);
- extern tree build_method_type_directly (tree, tree, tree);
---- gcc-4.1.2-orig/gcc/tree.c 2007-01-05 20:59:15.000000000 +0000
-+++ gcc-4.1.2/gcc/tree.c 2009-09-03 13:05:46.000000000 +0100
-@@ -5025,6 +5025,73 @@
- return build_range_type (sizetype, lowval, highval);
- }
-
-+#if 1
-+/* (gaius) new patch here */
-+
-+/* Construct, lay out and return the type of arrays of elements with ELT_TYPE
-+ and number of elements specified by the range of values of INDEX_TYPE.
-+ If such a type has already been constructed, reuse it. */
-+
-+tree
-+finish_build_array_type (tree t, tree elt_type, tree index_type)
-+{
-+ if (TREE_CODE (elt_type) == FUNCTION_TYPE)
-+ {
-+ error ("arrays of functions are not meaningful");
-+ elt_type = integer_type_node;
-+ }
-+
-+ TREE_TYPE (t) = elt_type;
-+ TYPE_DOMAIN (t) = index_type;
-+
-+ if (index_type == 0)
-+ {
-+ tree save = t;
-+ t = canonicalize_array (t);
-+ if (save == t)
-+ layout_type (t);
-+ return t;
-+ }
-+
-+ t = canonicalize_array (t);
-+ if (!COMPLETE_TYPE_P (t))
-+ layout_type (t);
-+ return t;
-+}
-+
-+/* Construct, lay out and return the type of arrays of elements with ELT_TYPE
-+ and number of elements specified by the range of values of INDEX_TYPE.
-+ If such a type has already been constructed, reuse it. */
-+
-+tree
-+build_array_type (tree elt_type, tree index_type)
-+{
-+ return finish_build_array_type (make_node (ARRAY_TYPE),
-+ elt_type, index_type);
-+}
-+
-+/* canonicalize_array, given an ARRAY_TYPE node, array, lookup a
-+ canonicalized version of this array. If no canonicalized version exists
-+ then register, array, as the canonical version. Return the canonical
-+ version of, array. */
-+
-+tree canonicalize_array (tree array)
-+{
-+ hashval_t hashcode = 0;
-+ tree elt_type = TREE_TYPE (array);
-+ tree index_type = TYPE_DOMAIN (array);
-+
-+ if (index_type == 0)
-+ {
-+ hashcode = iterative_hash_object (TYPE_HASH (elt_type), hashcode);
-+ return type_hash_canon (hashcode, array);
-+ }
-+ hashcode = iterative_hash_object (TYPE_HASH (elt_type), hashcode);
-+ hashcode = iterative_hash_object (TYPE_HASH (index_type), hashcode);
-+ return type_hash_canon (hashcode, array);
-+}
-+#else
-+
- /* Construct, lay out and return the type of arrays of elements with ELT_TYPE
- and number of elements specified by the range of values of INDEX_TYPE.
- If such a type has already been constructed, reuse it. */
-@@ -5063,6 +5130,7 @@
- layout_type (t);
- return t;
- }
-+#endif
-
- /* Return the TYPE of the elements comprising
- the innermost dimension of ARRAY. */
diff --git a/gcc/m2/patches/gcc/4.1.2/old/07.michael_i386 b/gcc/m2/patches/gcc/4.1.2/old/07.michael_i386
deleted file mode 100644
index d15f73f440d..00000000000
--- a/gcc/m2/patches/gcc/4.1.2/old/07.michael_i386
+++ /dev/null
@@ -1,15 +0,0 @@
---- gcc-4.1.2/libstdc++-v3/scripts/make_exports.pl 2006-04-26 20:59:05.000000000 +0100
-+++ gcc-4.1.2+gm2-20090624/libstdc++-v3/scripts/make_exports.pl 2009-06-24 12:16:06.000000000 +0100
-@@ -92,7 +92,11 @@
- print STDERR $nm.' -P '.(join ' ',@ARGV).'|';
- open NM,$nm.' -P '.(join ' ',@ARGV).'|' or die $!;
- # Talk to c++filt through a pair of file descriptors.
--open2(*FILTIN, *FILTOUT, "c++filt --strip-underscores") or die $!;
-+if ($^O eq "darwin") {
-+ open2(*FILTIN, *FILTOUT, "c++filt --strip-underscore") or die $!;
-+} else {
-+ open2(*FILTIN, *FILTOUT, "c++filt --strip-underscores") or die $!;
-+}
- NAME: while (<NM>) {
- my $i;
- chomp;
diff --git a/gcc/m2/patches/gcc/4.1.2/old/08.gaius_ipa_type_escape.c b/gcc/m2/patches/gcc/4.1.2/old/08.gaius_ipa_type_escape.c
deleted file mode 100644
index 8471ac85583..00000000000
--- a/gcc/m2/patches/gcc/4.1.2/old/08.gaius_ipa_type_escape.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/* Copyright (C) 2010
- * Free Software Foundation, Inc. */
-/* This file is part of GNU Modula-2.
-
-GNU Modula-2 is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 3, or (at your option) any later
-version.
-
-GNU Modula-2 is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with gm2; see the file COPYING. If not, write to the Free Software
-Foundation, 51 Franklin Street, Fifth Floor, Boston,
-MA 02110-1301, USA. */
---- gcc-4.1.2-orig/gcc/ipa-type-escape.c 2005-09-25 06:28:01.000000000 +0100
-+++ gcc-4.1.2/gcc/ipa-type-escape.c 2009-07-20 10:36:11.000000000 +0100
-@@ -259,10 +259,33 @@
- static bool
- type_to_consider (tree type)
- {
-+ int stackSize = 1;
-+ int stackUsed = 1;
-+ int oldSize;
-+ int i;
-+ tree *oldStack;
-+ tree *stack = (tree *) alloca (sizeof (tree) * stackSize);
-+ stack[0] = type;
-+
-+ /* return false if we detect a cyclic declaration of "array of pointer to ..." */
-+
- /* Strip the *'s off. */
- type = TYPE_MAIN_VARIANT (type);
-- while (POINTER_TYPE_P (type) || TREE_CODE (type) == ARRAY_TYPE)
-+ while (POINTER_TYPE_P (type) || TREE_CODE (type) == ARRAY_TYPE) {
- type = TYPE_MAIN_VARIANT (TREE_TYPE (type));
-+ for (i=0; i<stackUsed; i++)
-+ if (stack[i] == type)
-+ return false;
-+ if (stackSize == stackUsed) {
-+ oldSize = stackSize;
-+ stackSize *= 2;
-+ oldStack = stack;
-+ stack = (tree *) alloca (sizeof (tree) * stackSize);
-+ memcpy (stack, oldStack, oldSize);
-+ }
-+ stack[stackUsed] = type;
-+ stackUsed++;
-+ }
-
- switch (TREE_CODE (type))
- {
diff --git a/gcc/m2/patches/gcc/4.1.2/old/09.gaius_patch_config b/gcc/m2/patches/gcc/4.1.2/old/09.gaius_patch_config
deleted file mode 100644
index 5954b3fe67f..00000000000
--- a/gcc/m2/patches/gcc/4.1.2/old/09.gaius_patch_config
+++ /dev/null
@@ -1,51 +0,0 @@
---- gcc-4.1.2-orig/configure 2006-11-21 17:48:36.000000000 +0000
-+++ gcc-4.1.2/configure 2009-11-06 21:44:06.000000000 +0000
-@@ -3549,7 +3549,9 @@
- # For an installed makeinfo, we require it to be from texinfo 4.2 or
- # higher, else we use the "missing" dummy.
- if ${MAKEINFO} --version \
-- | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])' >/dev/null 2>&1; then
-+ | egrep 'texinfo[^0-9]*(4\.([7-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then
-+# | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])' >/dev/null 2>&1; then
-+ ${MAKEINFO} --version
- :
- else
- MAKEINFO="$MISSING makeinfo"
---- gcc-4.1.2-orig/configure.in 2006-11-21 17:48:36.000000000 +0000
-+++ gcc-4.1.2/configure.in 2009-11-06 21:44:16.000000000 +0000
-@@ -2134,7 +2134,9 @@
- # For an installed makeinfo, we require it to be from texinfo 4.2 or
- # higher, else we use the "missing" dummy.
- if ${MAKEINFO} --version \
-- | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])' >/dev/null 2>&1; then
-+ | egrep 'texinfo[^0-9]*(4\.([7-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then
-+# | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])' >/dev/null 2>&1; then
-+ ${MAKEINFO} --version
- :
- else
- MAKEINFO="$MISSING makeinfo"
---- gcc-4.1.2-orig/gcc/configure.ac 2006-11-13 22:09:55.000000000 +0000
-+++ gcc-4.1.2/gcc/configure.ac 2009-11-06 21:44:46.000000000 +0000
-@@ -833,7 +833,9 @@
- # that we can use it.
- gcc_AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version,
- [GNU texinfo.* \([0-9][0-9.]*\)],
-- [4.[2-9]*])
-+ [4.[7-9]*|4.[1-9][0-9]*|[5-9]*|[1-9][0-9]*])
-+# [GNU texinfo.* \([0-9][0-9.]*\)],
-+# [4.[2-9]*])
- if test $gcc_cv_prog_makeinfo_modern = no; then
- MAKEINFO="$MISSING makeinfo"
- AC_MSG_WARN([
---- gcc-4.1.2-orig/gcc/configure 2006-11-13 22:09:55.000000000 +0000
-+++ gcc-4.1.2/gcc/configure 2009-11-06 21:44:34.000000000 +0000
-@@ -7495,7 +7495,8 @@
- echo "configure:7495: version of makeinfo is $ac_prog_version" >&5
- case $ac_prog_version in
- '') gcc_cv_prog_makeinfo_modern=no;;
-- 4.[2-9]*)
-+# 4.[2-9]*)
-+ 4.[7-9]*|4.[1-9][0-9]*|[5-9]*|[1-9][0-9]*)
- gcc_cv_prog_makeinfo_modern=yes;;
- *) gcc_cv_prog_makeinfo_modern=no;;
- esac
diff --git a/gcc/m2/patches/gcc/4.1.2/old/10.michael_snowleopard1 b/gcc/m2/patches/gcc/4.1.2/old/10.michael_snowleopard1
deleted file mode 100644
index a8d362b0b7f..00000000000
--- a/gcc/m2/patches/gcc/4.1.2/old/10.michael_snowleopard1
+++ /dev/null
@@ -1,68 +0,0 @@
---- gcc-4.1.2/ltcf-c.sh.sav 2005-11-18 17:53:08.000000000 -0500
-+++ gcc-4.1.2/ltcf-c.sh 2009-11-30 20:35:50.000000000 -0500
-@@ -402,10 +402,13 @@
- esac
- # Disable shared library build on OS-X older than 10.3.
- case $host_os in
-+ darwin10*)
-+ can_build_shared=yes
-+ ;;
- darwin[1-6]*)
- can_build_shared=no
- ;;
-- darwin7*)
-+ darwin[7-9]*)
- can_build_shared=yes
- ;;
- esac
---- gcc-4.1.2/ltcf-cxx.sh.sav 2005-07-15 22:30:53.000000000 -0400
-+++ gcc-4.1.2/ltcf-cxx.sh 2009-11-30 20:35:34.000000000 -0500
-@@ -247,10 +247,13 @@
- esac
- # Disable shared library build on OS-X older than 10.3.
- case $host_os in
-+ darwin10*)
-+ can_build_shared=yes
-+ ;;
- darwin[1-6]*)
- can_build_shared=no
- ;;
-- darwin7*)
-+ darwin[7-9]*)
- can_build_shared=yes
- ;;
- esac
---- gcc-4.1.2/ltcf-gcj.sh.sav 2005-07-15 22:30:53.000000000 -0400
-+++ gcc-4.1.2/ltcf-gcj.sh 2009-11-30 20:36:51.000000000 -0500
-@@ -401,10 +401,13 @@
- esac
- # Disable shared library build on OS-X older than 10.3.
- case $host_os in
-+ darwin10*)
-+ can_build_shared=yes
-+ ;;
- darwin[1-6]*)
- can_build_shared=no
- ;;
-- darwin7*)
-+ darwin[7-9]*)
- can_build_shared=yes
- ;;
- esac
---- gcc-4.1.2/ltconfig.sav 2006-07-04 16:30:34.000000000 -0400
-+++ gcc-4.1.2/ltconfig 2009-11-30 20:37:44.000000000 -0500
-@@ -1112,10 +1112,13 @@
- need_version=no
- # Disable shared library build on OS-X older than 10.3.
- case $host_os in
-+ darwin10*)
-+ can_build_shared=yes
-+ ;;
- darwin[1-6]*)
- can_build_shared=no
- ;;
-- darwin7*)
-+ darwin[7-9]*)
- can_build_shared=yes
- ;;
- esac
diff --git a/gcc/m2/patches/gcc/4.1.2/old/11.michael_snowleopard2 b/gcc/m2/patches/gcc/4.1.2/old/11.michael_snowleopard2
deleted file mode 100644
index abd9ab9316c..00000000000
--- a/gcc/m2/patches/gcc/4.1.2/old/11.michael_snowleopard2
+++ /dev/null
@@ -1,12 +0,0 @@
---- gcc-4.1.2/gcc/gm2/Make-lang.in.sav 2009-12-02 21:53:58.000000000 -0500
-+++ gcc-4.1.2/gcc/gm2/Make-lang.in 2009-12-02 22:29:41.000000000 -0500
-@@ -723,7 +723,8 @@
-
- # the C implementation module bridging the Modula-2 -> GCC
- GM2_OBJS = gm2/gccgm2.o gm2/gm2builtins.o gm2/gm2-lang.o gm2/gm2except.o \
-- gm2/stor-layout.o gm2/m2pp.o
-+ gm2/m2pp.o
-+ # gm2/stor-layout.o gm2/m2pp.o
- # gm2/gm2-common.o
- GM2_LIBS = gm2/gm2-compiler/gm2.a gm2/gm2-libs/libgm2.a # the final Modula-2 front end
- GM2_LIBS_BOOT = gm2/gm2-compiler-boot/gm2.a \
diff --git a/gcc/m2/patches/gcc/4.1.2/old/12.gaius_patch_tree_flow_inline_h b/gcc/m2/patches/gcc/4.1.2/old/12.gaius_patch_tree_flow_inline_h
deleted file mode 100644
index 167c6708c65..00000000000
--- a/gcc/m2/patches/gcc/4.1.2/old/12.gaius_patch_tree_flow_inline_h
+++ /dev/null
@@ -1,20 +0,0 @@
---- gcc-4.1.2-at-04/gcc/tree-flow-inline.h 2006-04-18 14:24:45.000000000 +0100
-+++ gcc-4.1.2/gcc/tree-flow-inline.h 2010-06-16 17:24:46.000000000 +0100
-@@ -1469,8 +1469,17 @@
- if (TREE_THIS_VOLATILE (v))
- return false;
-
-+#if 0
-+ /* original gcc code (gaius) */
- return (AGGREGATE_TYPE_P (TREE_TYPE (v)) &&
- TREE_CODE (TREE_TYPE (v)) != ARRAY_TYPE);
-+#else
-+ /* gaius' attempt at a solution */
-+ return (AGGREGATE_TYPE_P (TREE_TYPE (v)) &&
-+ TREE_CODE (TREE_TYPE (v)) != ARRAY_TYPE &&
-+ (! ((TREE_CODE (v) == CONST_DECL) &&
-+ (TREE_CODE (TREE_TYPE (v)) == RECORD_TYPE))));
-+#endif
- }
-
-
diff --git a/gcc/m2/patches/gcc/4.7.1/01-patches b/gcc/m2/patches/gcc/4.7.1/01-patches
deleted file mode 100644
index 2e68dd3e1fc..00000000000
--- a/gcc/m2/patches/gcc/4.7.1/01-patches
+++ /dev/null
@@ -1,32 +0,0 @@
---- gcc-4.7.1-orig/gcc/gcc.c 2012-02-28 17:31:38.000000000 +0000
-+++ gcc-4.7.1/gcc/gcc.c 2012-07-26 07:38:24.000000000 +0100
-@@ -167,6 +167,10 @@
- static const char *cross_compile = "0";
- #endif
-
-+/* The lang specs might wish to override the default linker.
-+ */
-+int force_no_linker = 0;
-+
- /* Greatest exit code of sub-processes that has been encountered up to
- now. */
- static int greatest_status = 1;
-@@ -6843,7 +6847,8 @@
-
- /* Run ld to link all the compiler output files. */
-
-- if (num_linker_inputs > 0 && !seen_error () && print_subprocess_help < 2)
-+ if (num_linker_inputs > 0 && !seen_error () && print_subprocess_help < 2
-+ && (! force_no_linker))
- {
- int tmp = execution_count;
-
-@@ -6908,7 +6913,7 @@
- /* If options said don't run linker,
- complain about input files to be given to the linker. */
-
-- if (! linker_was_run && !seen_error ())
-+ if (! linker_was_run && !seen_error () && (! force_no_linker))
- for (i = 0; (int) i < n_infiles; i++)
- if (explicit_link_files[i]
- && !(infiles[i].language && infiles[i].language[0] == '*'))
diff --git a/gcc/m2/patches/gcc/4.7.1/02-patches b/gcc/m2/patches/gcc/4.7.1/02-patches
deleted file mode 100644
index e2a0ddccd3e..00000000000
--- a/gcc/m2/patches/gcc/4.7.1/02-patches
+++ /dev/null
@@ -1,14 +0,0 @@
---- gcc-4.7.1-orig/gcc/Makefile.in 2012-05-18 17:32:05.000000000 +0100
-+++ gcc-4.7.1/gcc/Makefile.in 2013-01-03 23:39:48.000000000 +0000
-@@ -1800,9 +1800,9 @@
-
- cc1-checksum.o : cc1-checksum.c $(CONFIG_H) $(SYSTEM_H)
-
--cc1$(exeext): $(C_OBJS) cc1-checksum.o $(BACKEND) $(LIBDEPS)
-+cc1$(exeext): $(C_OBJS) cc1-checksum.o $(BACKEND) $(LIBDEPS) c-family/m2pp.o
- +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) \
-- cc1-checksum.o $(BACKEND) $(LIBS) $(BACKENDLIBS)
-+ cc1-checksum.o $(BACKEND) $(LIBS) $(BACKENDLIBS) c-family/m2pp.o
-
- #\f
- # Build libgcc.a.
diff --git a/gcc/m2/patches/gcc/4.7.3/01-patches b/gcc/m2/patches/gcc/4.7.3/01-patches
deleted file mode 100644
index e0a11e39246..00000000000
--- a/gcc/m2/patches/gcc/4.7.3/01-patches
+++ /dev/null
@@ -1,319 +0,0 @@
---- gcc-4.7.3-orig/configure 2013-06-19 14:55:55.000000000 +0100
-+++ gcc-4.7.3/configure 2014-05-11 22:41:28.000000000 +0100
-@@ -580,6 +580,7 @@
- DLLTOOL_FOR_TARGET
- AS_FOR_TARGET
- AR_FOR_TARGET
-+GM2_FOR_TARGET
- GOC_FOR_TARGET
- GFORTRAN_FOR_TARGET
- GCJ_FOR_TARGET
-@@ -613,6 +614,7 @@
- NM_FOR_BUILD
- LD_FOR_BUILD
- LDFLAGS_FOR_BUILD
-+GM2_FOR_BUILD
- GOC_FOR_BUILD
- GFORTRAN_FOR_BUILD
- GCJ_FOR_BUILD
-@@ -749,6 +751,7 @@
- enable_libquadmath
- enable_libquadmath_support
- enable_libada
-+enable_libgm2
- enable_libssp
- enable_static_libjava
- enable_bootstrap
-@@ -824,6 +827,7 @@
- GCJ_FOR_TARGET
- GFORTRAN_FOR_TARGET
- GOC_FOR_TARGET
-+GM2_FOR_TARGET
- AR_FOR_TARGET
- AS_FOR_TARGET
- DLLTOOL_FOR_TARGET
-@@ -1467,6 +1471,7 @@
- --disable-libquadmath-support
- disable libquadmath support for Fortran
- --enable-libada build libada directory
-+ --enable-libgm2 build libgm2 directory
- --enable-libssp build libssp directory
- --enable-static-libjava[=ARG]
- build static libjava [default=no]
-@@ -1594,6 +1599,8 @@
- GFORTRAN for the target
- GOC_FOR_TARGET
- GOC for the target
-+ GM2_FOR_TARGET
-+ GM2 for the target
- AR_FOR_TARGET
- AR for the target
- AS_FOR_TARGET
-@@ -2698,6 +2705,7 @@
- ${libgcj} \
- target-libobjc \
- target-libada \
-+ target-libgm2 \
- target-libgo"
-
- # these tools are built using the target libraries, and are intended to
-@@ -2985,6 +2993,15 @@
- noconfigdirs="$noconfigdirs gnattools"
- fi
-
-+# Check whether --enable-libgm2 was given.
-+if test "${enable_libgm2+set}" = set; then :
-+ enableval=$enable_libgm2; ENABLE_LIBGM2=$enableval
-+else
-+ ENABLE_LIBGM2=yes
-+fi
-+
-+
-+
- # Check whether --enable-libssp was given.
- if test "${enable_libssp+set}" = set; then :
- enableval=$enable_libssp; ENABLE_LIBSSP=$enableval
-@@ -3703,6 +3720,7 @@
- GCJ_FOR_BUILD=${GCJ_FOR_BUILD-gcj}
- GFORTRAN_FOR_BUILD=${GFORTRAN_FOR_BUILD-gfortran}
- GOC_FOR_BUILD=${GOC_FOR_BUILD-gccgo}
-+ GM2_FOR_BUILD=${GM2_FOR_BUILD-gm2}
- DLLTOOL_FOR_BUILD=${DLLTOOL_FOR_BUILD-dlltool}
- LD_FOR_BUILD=${LD_FOR_BUILD-ld}
- NM_FOR_BUILD=${NM_FOR_BUILD-nm}
-@@ -3717,6 +3735,7 @@
- GCJ_FOR_BUILD="\$(GCJ)"
- GFORTRAN_FOR_BUILD="\$(GFORTRAN)"
- GOC_FOR_BUILD="\$(GOC)"
-+ GM2_FOR_BUILD="\$(GM2)"
- DLLTOOL_FOR_BUILD="\$(DLLTOOL)"
- LD_FOR_BUILD="\$(LD)"
- NM_FOR_BUILD="\$(NM)"
-@@ -7535,6 +7554,7 @@
-
-
-
-+
- # Generate default definitions for YACC, M4, LEX and other programs that run
- # on the build machine. These are used if the Makefile can't locate these
- # programs in objdir.
-@@ -10750,6 +10770,167 @@
-
-
-
-+if test -n "$GM2_FOR_TARGET"; then
-+ ac_cv_prog_GM2_FOR_TARGET=$GM2_FOR_TARGET
-+elif test -n "$ac_cv_prog_GM2_FOR_TARGET"; then
-+ GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
-+fi
-+
-+if test -n "$ac_cv_prog_GM2_FOR_TARGET"; then
-+ for ncn_progname in gm2; do
-+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
-+set dummy ${ncn_progname}; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_GM2_FOR_TARGET+set}" = set; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ if test -n "$GM2_FOR_TARGET"; then
-+ ac_cv_prog_GM2_FOR_TARGET="$GM2_FOR_TARGET" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+ ac_cv_prog_GM2_FOR_TARGET="${ncn_progname}"
-+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+ break 2
-+ fi
-+done
-+ done
-+IFS=$as_save_IFS
-+
-+fi
-+fi
-+GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
-+if test -n "$GM2_FOR_TARGET"; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GM2_FOR_TARGET" >&5
-+$as_echo "$GM2_FOR_TARGET" >&6; }
-+else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
-+
-+
-+ done
-+fi
-+
-+if test -z "$ac_cv_prog_GM2_FOR_TARGET" && test -n "$with_build_time_tools"; then
-+ for ncn_progname in gm2; do
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
-+$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
-+ if test -x $with_build_time_tools/${ncn_progname}; then
-+ ac_cv_prog_GM2_FOR_TARGET=$with_build_time_tools/${ncn_progname}
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
-+ break
-+ else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+ fi
-+ done
-+fi
-+
-+if test -z "$ac_cv_prog_GM2_FOR_TARGET"; then
-+ for ncn_progname in gm2; do
-+ if test -n "$ncn_target_tool_prefix"; then
-+ # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
-+set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_GM2_FOR_TARGET+set}" = set; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ if test -n "$GM2_FOR_TARGET"; then
-+ ac_cv_prog_GM2_FOR_TARGET="$GM2_FOR_TARGET" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+ ac_cv_prog_GM2_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
-+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+ break 2
-+ fi
-+done
-+ done
-+IFS=$as_save_IFS
-+
-+fi
-+fi
-+GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
-+if test -n "$GM2_FOR_TARGET"; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GM2_FOR_TARGET" >&5
-+$as_echo "$GM2_FOR_TARGET" >&6; }
-+else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
-+
-+
-+ fi
-+ if test -z "$ac_cv_prog_GM2_FOR_TARGET" && test $build = $target ; then
-+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
-+set dummy ${ncn_progname}; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_GM2_FOR_TARGET+set}" = set; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ if test -n "$GM2_FOR_TARGET"; then
-+ ac_cv_prog_GM2_FOR_TARGET="$GM2_FOR_TARGET" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+ ac_cv_prog_GM2_FOR_TARGET="${ncn_progname}"
-+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+ break 2
-+ fi
-+done
-+ done
-+IFS=$as_save_IFS
-+
-+fi
-+fi
-+GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
-+if test -n "$GM2_FOR_TARGET"; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GM2_FOR_TARGET" >&5
-+$as_echo "$GM2_FOR_TARGET" >&6; }
-+else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
-+
-+
-+ fi
-+ test -n "$ac_cv_prog_GM2_FOR_TARGET" && break
-+ done
-+fi
-+
-+if test -z "$ac_cv_prog_GM2_FOR_TARGET" ; then
-+ set dummy gm2
-+ if test $build = $target ; then
-+ GM2_FOR_TARGET="$2"
-+ else
-+ GM2_FOR_TARGET="${ncn_target_tool_prefix}$2"
-+ fi
-+else
-+ GM2_FOR_TARGET="$ac_cv_prog_GM2_FOR_TARGET"
-+fi
-+
-+
-+
- cat > conftest.c << \EOF
- #ifdef __GNUC__
- gcc_yay;
-@@ -13955,6 +14136,51 @@
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
- $as_echo "host tool" >&6; }
- else
-+ # We need a cross tool
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
-+$as_echo "pre-installed" >&6; }
-+ fi
-+fi
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target gm2" >&5
-+$as_echo_n "checking where to find the target gm2... " >&6; }
-+if test "x${build}" != "x${host}" ; then
-+ if expr "x$GM2_FOR_TARGET" : "x/" > /dev/null; then
-+ # We already found the complete path
-+ ac_dir=`dirname $GM2_FOR_TARGET`
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
-+$as_echo "pre-installed in $ac_dir" >&6; }
-+ else
-+ # Canadian cross, just use what we found
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
-+$as_echo "pre-installed" >&6; }
-+ fi
-+else
-+ ok=yes
-+ case " ${configdirs} " in
-+ *" gcc "*) ;;
-+ *) ok=no ;;
-+ esac
-+ case ,${enable_languages}, in
-+ *,gm2,*) ;;
-+ *) ok=no ;;
-+ esac
-+ if test $ok = yes; then
-+ # An in-tree tool is available and we can use it
-+ GM2_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgm2 -B$$r/$(HOST_SUBDIR)/gcc/'
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
-+$as_echo "just compiled" >&6; }
-+ elif expr "x$GM2_FOR_TARGET" : "x/" > /dev/null; then
-+ # We already found the complete path
-+ ac_dir=`dirname $GM2_FOR_TARGET`
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
-+$as_echo "pre-installed in $ac_dir" >&6; }
-+ elif test "x$target" = "x$host"; then
-+ # We can use an host tool
-+ GM2_FOR_TARGET='$(GM2)'
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
-+$as_echo "host tool" >&6; }
-+ else
- # We need a cross tool
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
- $as_echo "pre-installed" >&6; }
diff --git a/gcc/m2/patches/gcc/4.7.3/02-patches b/gcc/m2/patches/gcc/4.7.3/02-patches
deleted file mode 100644
index 5aed92b685a..00000000000
--- a/gcc/m2/patches/gcc/4.7.3/02-patches
+++ /dev/null
@@ -1,64 +0,0 @@
---- gcc-4.7.3-orig/configure.ac 2013-06-19 14:56:00.000000000 +0100
-+++ gcc-4.7.3/configure.ac 2014-05-11 22:39:51.000000000 +0100
-@@ -164,6 +164,7 @@
- ${libgcj} \
- target-libobjc \
- target-libada \
-+ target-libgm2 \
- target-libgo"
-
- # these tools are built using the target libraries, and are intended to
-@@ -419,6 +420,12 @@
- noconfigdirs="$noconfigdirs gnattools"
- fi
-
-+AC_ARG_ENABLE(libgm2,
-+[AS_HELP_STRING([--enable-libgm2], [build libgm2 directory])],
-+ENABLE_LIBGM2=$enableval,
-+ENABLE_LIBGM2=yes)
-+
-+
- AC_ARG_ENABLE(libssp,
- [AS_HELP_STRING([--enable-libssp], [build libssp directory])],
- ENABLE_LIBSSP=$enableval,
-@@ -1110,6 +1117,7 @@
- GCJ_FOR_BUILD=${GCJ_FOR_BUILD-gcj}
- GFORTRAN_FOR_BUILD=${GFORTRAN_FOR_BUILD-gfortran}
- GOC_FOR_BUILD=${GOC_FOR_BUILD-gccgo}
-+ GM2_FOR_BUILD=${GM2_FOR_BUILD-gm2}
- DLLTOOL_FOR_BUILD=${DLLTOOL_FOR_BUILD-dlltool}
- LD_FOR_BUILD=${LD_FOR_BUILD-ld}
- NM_FOR_BUILD=${NM_FOR_BUILD-nm}
-@@ -1124,6 +1132,7 @@
- GCJ_FOR_BUILD="\$(GCJ)"
- GFORTRAN_FOR_BUILD="\$(GFORTRAN)"
- GOC_FOR_BUILD="\$(GOC)"
-+ GM2_FOR_BUILD="\$(GM2)"
- DLLTOOL_FOR_BUILD="\$(DLLTOOL)"
- LD_FOR_BUILD="\$(LD)"
- NM_FOR_BUILD="\$(NM)"
-@@ -2985,6 +2994,7 @@
- AC_SUBST(GCJ_FOR_BUILD)
- AC_SUBST(GFORTRAN_FOR_BUILD)
- AC_SUBST(GOC_FOR_BUILD)
-+AC_SUBST(GM2_FOR_BUILD)
- AC_SUBST(LDFLAGS_FOR_BUILD)
- AC_SUBST(LD_FOR_BUILD)
- AC_SUBST(NM_FOR_BUILD)
-@@ -3095,6 +3105,7 @@
- NCN_STRICT_CHECK_TARGET_TOOLS(GCJ_FOR_TARGET, gcj)
- NCN_STRICT_CHECK_TARGET_TOOLS(GFORTRAN_FOR_TARGET, gfortran)
- NCN_STRICT_CHECK_TARGET_TOOLS(GOC_FOR_TARGET, gccgo)
-+NCN_STRICT_CHECK_TARGET_TOOLS(GM2_FOR_TARGET, gm2)
-
- ACX_CHECK_INSTALLED_TARGET_TOOL(AR_FOR_TARGET, ar)
- ACX_CHECK_INSTALLED_TARGET_TOOL(AS_FOR_TARGET, as)
-@@ -3129,6 +3140,8 @@
- [gcc/gfortran -B$$r/$(HOST_SUBDIR)/gcc/], fortran)
- GCC_TARGET_TOOL(gccgo, GOC_FOR_TARGET, GOC,
- [gcc/gccgo -B$$r/$(HOST_SUBDIR)/gcc/], go)
-+GCC_TARGET_TOOL(gm2, GM2_FOR_TARGET, GM2,
-+ [gcc/xgm2 -B$$r/$(HOST_SUBDIR)/gcc/], gm2)
- GCC_TARGET_TOOL(ld, LD_FOR_TARGET, LD, [ld/ld-new])
- GCC_TARGET_TOOL(lipo, LIPO_FOR_TARGET, LIPO)
- GCC_TARGET_TOOL(nm, NM_FOR_TARGET, NM, [binutils/nm-new])
diff --git a/gcc/m2/patches/gcc/4.7.3/03-patches b/gcc/m2/patches/gcc/4.7.3/03-patches
deleted file mode 100644
index 3087556d9cd..00000000000
--- a/gcc/m2/patches/gcc/4.7.3/03-patches
+++ /dev/null
@@ -1,742 +0,0 @@
---- gcc-4.7.3-orig/Makefile.in 2013-06-19 14:56:00.000000000 +0100
-+++ gcc-4.7.3/Makefile.in 2014-08-30 14:15:48.000000000 +0100
-@@ -157,6 +157,7 @@
- GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \
- GOC="$(GOC_FOR_BUILD)"; export GOC; \
- GOCFLAGS="$(GOCFLAGS_FOR_BUILD)"; export GOCFLAGS; \
-+ GM2="$(GM2_FOR_BUILD)"; export GM2; \
- DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
- LD="$(LD_FOR_BUILD)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
-@@ -194,6 +195,7 @@
- GCJ="$(GCJ)"; export GCJ; \
- GFORTRAN="$(GFORTRAN)"; export GFORTRAN; \
- GOC="$(GOC)"; export GOC; \
-+ GM2="$(GM2)"; export GM2; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
-@@ -280,6 +282,7 @@
- GCJ="$(GCJ_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GCJ; \
- GFORTRAN="$(GFORTRAN_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GFORTRAN; \
- GOC="$(GOC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GOC; \
-+ GM2="$(GM2_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GM2; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
-@@ -350,6 +353,7 @@
- GCJ_FOR_BUILD = @GCJ_FOR_BUILD@
- GFORTRAN_FOR_BUILD = @GFORTRAN_FOR_BUILD@
- GOC_FOR_BUILD = @GOC_FOR_BUILD@
-+GM2_FOR_BUILD = @GM2_FOR_BUILD@
- LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
- LD_FOR_BUILD = @LD_FOR_BUILD@
- NM_FOR_BUILD = @NM_FOR_BUILD@
-@@ -552,6 +556,7 @@
- GCJ_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCJ_FOR_TARGET@
- GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@
- GOC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GOC_FOR_TARGET@
-+GM2_FOR_TARGET=$(STAGE_CC_WRAPPER) @GM2_FOR_TARGET@
- DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
- LD_FOR_TARGET=@LD_FOR_TARGET@
-
-@@ -599,7 +604,7 @@
-
- # This is the list of directories that may be needed in RPATH_ENVVAR
- # so that programs built for the target machine work.
--TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libmudflap)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libgomp)$(TARGET_LIB_PATH_libitm)$(HOST_LIB_PATH_gcc)
-+TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libmudflap)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libgm2)$(TARGET_LIB_PATH_libgomp)$(TARGET_LIB_PATH_libitm)$(HOST_LIB_PATH_gcc)
-
- @if target-libstdc++-v3
- TARGET_LIB_PATH_libstdc++-v3 = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:
-@@ -613,6 +618,10 @@
- TARGET_LIB_PATH_libssp = $$r/$(TARGET_SUBDIR)/libssp/.libs:
- @endif target-libssp
-
-+@if target-libgm2
-+TARGET_LIB_PATH_libgm2 = $$r/$(TARGET_SUBDIR)/libgm2/.libs:
-+@endif target-libgm2
-+
- @if target-libgomp
- TARGET_LIB_PATH_libgomp = $$r/$(TARGET_SUBDIR)/libgomp/.libs:
- @endif target-libgomp
-@@ -768,6 +777,7 @@
- "GFORTRAN_FOR_TARGET=$(GFORTRAN_FOR_TARGET)" \
- "GOC_FOR_TARGET=$(GOC_FOR_TARGET)" \
- "GOCFLAGS_FOR_TARGET=$(GOCFLAGS_FOR_TARGET)" \
-+ "GM2_FOR_TARGET=$(GM2_FOR_TARGET)" \
- "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
- "LIPO_FOR_TARGET=$(LIPO_FOR_TARGET)" \
- "LDFLAGS_FOR_TARGET=$(LDFLAGS_FOR_TARGET)" \
-@@ -820,6 +830,7 @@
- 'GCJ=$(GCJ)' \
- 'GFORTRAN=$(GFORTRAN)' \
- 'GOC=$(GOC)' \
-+ 'GM2=$(GM2)' \
- 'LD=$(LD)' \
- 'LIPO=$(LIPO)' \
- 'NM=$(NM)' \
-@@ -859,6 +870,7 @@
- 'GFORTRAN=$$(GFORTRAN_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
- 'GOC=$$(GOC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
- 'GOCFLAGS=$$(GOCFLAGS_FOR_TARGET)' \
-+ 'GM2=$$(GM2_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
- 'LD=$(COMPILER_LD_FOR_TARGET)' \
- 'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \
- 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
-@@ -959,6 +971,7 @@
- maybe-configure-target-boehm-gc \
- maybe-configure-target-rda \
- maybe-configure-target-libada \
-+ maybe-configure-target-libgm2 \
- maybe-configure-target-libgomp \
- maybe-configure-target-libitm
-
-@@ -1104,6 +1117,7 @@
- all-target: maybe-all-target-boehm-gc
- all-target: maybe-all-target-rda
- all-target: maybe-all-target-libada
-+all-target: maybe-all-target-libgm2
- @if target-libgomp-no-bootstrap
- all-target: maybe-all-target-libgomp
- @endif target-libgomp-no-bootstrap
-@@ -1189,6 +1203,7 @@
- info-target: maybe-info-target-boehm-gc
- info-target: maybe-info-target-rda
- info-target: maybe-info-target-libada
-+info-target: maybe-info-target-libgm2
- info-target: maybe-info-target-libgomp
- info-target: maybe-info-target-libitm
-
-@@ -1267,6 +1282,7 @@
- dvi-target: maybe-dvi-target-boehm-gc
- dvi-target: maybe-dvi-target-rda
- dvi-target: maybe-dvi-target-libada
-+dvi-target: maybe-dvi-target-libgm2
- dvi-target: maybe-dvi-target-libgomp
- dvi-target: maybe-dvi-target-libitm
-
-@@ -1345,6 +1361,7 @@
- pdf-target: maybe-pdf-target-boehm-gc
- pdf-target: maybe-pdf-target-rda
- pdf-target: maybe-pdf-target-libada
-+pdf-target: maybe-pdf-target-libgm2
- pdf-target: maybe-pdf-target-libgomp
- pdf-target: maybe-pdf-target-libitm
-
-@@ -1423,6 +1440,7 @@
- html-target: maybe-html-target-boehm-gc
- html-target: maybe-html-target-rda
- html-target: maybe-html-target-libada
-+html-target: maybe-html-target-libgm2
- html-target: maybe-html-target-libgomp
- html-target: maybe-html-target-libitm
-
-@@ -1501,6 +1519,7 @@
- TAGS-target: maybe-TAGS-target-boehm-gc
- TAGS-target: maybe-TAGS-target-rda
- TAGS-target: maybe-TAGS-target-libada
-+TAGS-target: maybe-TAGS-target-libgm2
- TAGS-target: maybe-TAGS-target-libgomp
- TAGS-target: maybe-TAGS-target-libitm
-
-@@ -1579,6 +1598,7 @@
- install-info-target: maybe-install-info-target-boehm-gc
- install-info-target: maybe-install-info-target-rda
- install-info-target: maybe-install-info-target-libada
-+install-info-target: maybe-install-info-target-libgm2
- install-info-target: maybe-install-info-target-libgomp
- install-info-target: maybe-install-info-target-libitm
-
-@@ -1657,6 +1677,7 @@
- install-pdf-target: maybe-install-pdf-target-boehm-gc
- install-pdf-target: maybe-install-pdf-target-rda
- install-pdf-target: maybe-install-pdf-target-libada
-+install-pdf-target: maybe-install-pdf-target-libgm2
- install-pdf-target: maybe-install-pdf-target-libgomp
- install-pdf-target: maybe-install-pdf-target-libitm
-
-@@ -1735,6 +1756,7 @@
- install-html-target: maybe-install-html-target-boehm-gc
- install-html-target: maybe-install-html-target-rda
- install-html-target: maybe-install-html-target-libada
-+install-html-target: maybe-install-html-target-libgm2
- install-html-target: maybe-install-html-target-libgomp
- install-html-target: maybe-install-html-target-libitm
-
-@@ -1813,6 +1835,7 @@
- installcheck-target: maybe-installcheck-target-boehm-gc
- installcheck-target: maybe-installcheck-target-rda
- installcheck-target: maybe-installcheck-target-libada
-+installcheck-target: maybe-installcheck-target-libgm2
- installcheck-target: maybe-installcheck-target-libgomp
- installcheck-target: maybe-installcheck-target-libitm
-
-@@ -1891,6 +1914,7 @@
- mostlyclean-target: maybe-mostlyclean-target-boehm-gc
- mostlyclean-target: maybe-mostlyclean-target-rda
- mostlyclean-target: maybe-mostlyclean-target-libada
-+mostlyclean-target: maybe-mostlyclean-target-libgm2
- mostlyclean-target: maybe-mostlyclean-target-libgomp
- mostlyclean-target: maybe-mostlyclean-target-libitm
-
-@@ -1969,6 +1993,7 @@
- clean-target: maybe-clean-target-boehm-gc
- clean-target: maybe-clean-target-rda
- clean-target: maybe-clean-target-libada
-+clean-target: maybe-clean-target-libgm2
- clean-target: maybe-clean-target-libgomp
- clean-target: maybe-clean-target-libitm
-
-@@ -2047,6 +2072,7 @@
- distclean-target: maybe-distclean-target-boehm-gc
- distclean-target: maybe-distclean-target-rda
- distclean-target: maybe-distclean-target-libada
-+distclean-target: maybe-distclean-target-libgm2
- distclean-target: maybe-distclean-target-libgomp
- distclean-target: maybe-distclean-target-libitm
-
-@@ -2125,6 +2151,7 @@
- maintainer-clean-target: maybe-maintainer-clean-target-boehm-gc
- maintainer-clean-target: maybe-maintainer-clean-target-rda
- maintainer-clean-target: maybe-maintainer-clean-target-libada
-+maintainer-clean-target: maybe-maintainer-clean-target-libgm2
- maintainer-clean-target: maybe-maintainer-clean-target-libgomp
- maintainer-clean-target: maybe-maintainer-clean-target-libitm
-
-@@ -2258,6 +2285,7 @@
- maybe-check-target-boehm-gc \
- maybe-check-target-rda \
- maybe-check-target-libada \
-+ maybe-check-target-libgm2 \
- maybe-check-target-libgomp \
- maybe-check-target-libitm
-
-@@ -2408,6 +2436,7 @@
- maybe-install-target-boehm-gc \
- maybe-install-target-rda \
- maybe-install-target-libada \
-+ maybe-install-target-libgm2 \
- maybe-install-target-libgomp \
- maybe-install-target-libitm
-
-@@ -2506,6 +2535,7 @@
- maybe-install-strip-target-boehm-gc \
- maybe-install-strip-target-rda \
- maybe-install-strip-target-libada \
-+ maybe-install-strip-target-libgm2 \
- maybe-install-strip-target-libgomp \
- maybe-install-strip-target-libitm
-
-@@ -39192,6 +39222,463 @@
-
-
-
-+.PHONY: configure-target-libgm2 maybe-configure-target-libgm2
-+maybe-configure-target-libgm2:
-+@if gcc-bootstrap
-+configure-target-libgm2: stage_current
-+@endif gcc-bootstrap
-+@if target-libgm2
-+maybe-configure-target-libgm2: configure-target-libgm2
-+configure-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ echo "Checking multilib configuration for libgm2..."; \
-+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgm2 ; \
-+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgm2/multilib.tmp 2> /dev/null ; \
-+ if test -r $(TARGET_SUBDIR)/libgm2/multilib.out; then \
-+ if cmp -s $(TARGET_SUBDIR)/libgm2/multilib.tmp $(TARGET_SUBDIR)/libgm2/multilib.out; then \
-+ rm -f $(TARGET_SUBDIR)/libgm2/multilib.tmp; \
-+ else \
-+ rm -f $(TARGET_SUBDIR)/libgm2/Makefile; \
-+ mv $(TARGET_SUBDIR)/libgm2/multilib.tmp $(TARGET_SUBDIR)/libgm2/multilib.out; \
-+ fi; \
-+ else \
-+ mv $(TARGET_SUBDIR)/libgm2/multilib.tmp $(TARGET_SUBDIR)/libgm2/multilib.out; \
-+ fi; \
-+ test ! -f $(TARGET_SUBDIR)/libgm2/Makefile || exit 0; \
-+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgm2 ; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo Configuring in $(TARGET_SUBDIR)/libgm2; \
-+ cd "$(TARGET_SUBDIR)/libgm2" || exit 1; \
-+ case $(srcdir) in \
-+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-+ *) topdir=`echo $(TARGET_SUBDIR)/libgm2/ | \
-+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-+ esac; \
-+ srcdiroption="--srcdir=$${topdir}/libgm2"; \
-+ libsrcdir="$$s/libgm2"; \
-+ rm -f no-such-file || : ; \
-+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
-+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
-+ --target=${target_alias} $${srcdiroption} \
-+ || exit 1
-+@endif target-libgm2
-+
-+
-+
-+
-+
-+.PHONY: all-target-libgm2 maybe-all-target-libgm2
-+maybe-all-target-libgm2:
-+@if gcc-bootstrap
-+all-target-libgm2: stage_current
-+@endif gcc-bootstrap
-+@if target-libgm2
-+TARGET-target-libgm2=all
-+maybe-all-target-libgm2: all-target-libgm2
-+all-target-libgm2: configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
-+ $(TARGET-target-libgm2))
-+@endif target-libgm2
-+
-+
-+
-+
-+
-+.PHONY: check-target-libgm2 maybe-check-target-libgm2
-+maybe-check-target-libgm2:
-+@if target-libgm2
-+maybe-check-target-libgm2: check-target-libgm2
-+
-+check-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
-+
-+@endif target-libgm2
-+
-+.PHONY: install-target-libgm2 maybe-install-target-libgm2
-+maybe-install-target-libgm2:
-+@if target-libgm2
-+maybe-install-target-libgm2: install-target-libgm2
-+
-+install-target-libgm2: installdirs
-+ @: $(MAKE); $(unstage)
-+ @r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
-+
-+@endif target-libgm2
-+
-+.PHONY: install-strip-target-libgm2 maybe-install-strip-target-libgm2
-+maybe-install-strip-target-libgm2:
-+@if target-libgm2
-+maybe-install-strip-target-libgm2: install-strip-target-libgm2
-+
-+install-strip-target-libgm2: installdirs
-+ @: $(MAKE); $(unstage)
-+ @r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install-strip)
-+
-+@endif target-libgm2
-+
-+# Other targets (info, dvi, pdf, etc.)
-+
-+.PHONY: maybe-info-target-libgm2 info-target-libgm2
-+maybe-info-target-libgm2:
-+@if target-libgm2
-+maybe-info-target-libgm2: info-target-libgm2
-+
-+info-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing info in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ info) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-dvi-target-libgm2 dvi-target-libgm2
-+maybe-dvi-target-libgm2:
-+@if target-libgm2
-+maybe-dvi-target-libgm2: dvi-target-libgm2
-+
-+dvi-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing dvi in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ dvi) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-pdf-target-libgm2 pdf-target-libgm2
-+maybe-pdf-target-libgm2:
-+@if target-libgm2
-+maybe-pdf-target-libgm2: pdf-target-libgm2
-+
-+pdf-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing pdf in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ pdf) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-html-target-libgm2 html-target-libgm2
-+maybe-html-target-libgm2:
-+@if target-libgm2
-+maybe-html-target-libgm2: html-target-libgm2
-+
-+html-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing html in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ html) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-TAGS-target-libgm2 TAGS-target-libgm2
-+maybe-TAGS-target-libgm2:
-+@if target-libgm2
-+maybe-TAGS-target-libgm2: TAGS-target-libgm2
-+
-+TAGS-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing TAGS in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ TAGS) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-install-info-target-libgm2 install-info-target-libgm2
-+maybe-install-info-target-libgm2:
-+@if target-libgm2
-+maybe-install-info-target-libgm2: install-info-target-libgm2
-+
-+install-info-target-libgm2: \
-+ configure-target-libgm2 \
-+ info-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing install-info in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ install-info) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-install-pdf-target-libgm2 install-pdf-target-libgm2
-+maybe-install-pdf-target-libgm2:
-+@if target-libgm2
-+maybe-install-pdf-target-libgm2: install-pdf-target-libgm2
-+
-+install-pdf-target-libgm2: \
-+ configure-target-libgm2 \
-+ pdf-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ install-pdf) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-install-html-target-libgm2 install-html-target-libgm2
-+maybe-install-html-target-libgm2:
-+@if target-libgm2
-+maybe-install-html-target-libgm2: install-html-target-libgm2
-+
-+install-html-target-libgm2: \
-+ configure-target-libgm2 \
-+ html-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing install-html in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ install-html) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-installcheck-target-libgm2 installcheck-target-libgm2
-+maybe-installcheck-target-libgm2:
-+@if target-libgm2
-+maybe-installcheck-target-libgm2: installcheck-target-libgm2
-+
-+installcheck-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing installcheck in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ installcheck) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-mostlyclean-target-libgm2 mostlyclean-target-libgm2
-+maybe-mostlyclean-target-libgm2:
-+@if target-libgm2
-+maybe-mostlyclean-target-libgm2: mostlyclean-target-libgm2
-+
-+mostlyclean-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ mostlyclean) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-clean-target-libgm2 clean-target-libgm2
-+maybe-clean-target-libgm2:
-+@if target-libgm2
-+maybe-clean-target-libgm2: clean-target-libgm2
-+
-+clean-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing clean in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ clean) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-distclean-target-libgm2 distclean-target-libgm2
-+maybe-distclean-target-libgm2:
-+@if target-libgm2
-+maybe-distclean-target-libgm2: distclean-target-libgm2
-+
-+distclean-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing distclean in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ distclean) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-maintainer-clean-target-libgm2 maintainer-clean-target-libgm2
-+maybe-maintainer-clean-target-libgm2:
-+@if target-libgm2
-+maybe-maintainer-clean-target-libgm2: maintainer-clean-target-libgm2
-+
-+maintainer-clean-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ maintainer-clean) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+
-+
-+
-+
- .PHONY: configure-target-libgomp maybe-configure-target-libgomp
- maybe-configure-target-libgomp:
- @if gcc-bootstrap
-@@ -40721,6 +41208,14 @@
- (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-go);
- check-go: check-gcc-go check-target-libgo
-
-+.PHONY: check-gcc-gm2 check-gm2
-+check-gcc-gm2:
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(HOST_EXPORTS) \
-+ (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-gm2);
-+check-gm2: check-gcc-gm2
-+
-
- # The gcc part of install-no-fixedincludes, which relies on an intimate
- # knowledge of how a number of gcc internal targets (inter)operate. Delegate.
-@@ -42706,6 +43201,7 @@
- configure-target-boehm-gc: stage_last
- configure-target-rda: stage_last
- configure-target-libada: stage_last
-+configure-target-libgm2: stage_last
- configure-stage1-target-libgomp: maybe-all-stage1-gcc
- configure-stage2-target-libgomp: maybe-all-stage2-gcc
- configure-stage3-target-libgomp: maybe-all-stage3-gcc
-@@ -42734,6 +43230,7 @@
- configure-target-boehm-gc: maybe-all-gcc
- configure-target-rda: maybe-all-gcc
- configure-target-libada: maybe-all-gcc
-+configure-target-libgm2: maybe-all-gcc
- configure-target-libgomp: maybe-all-gcc
- configure-target-libitm: maybe-all-gcc
- @endif gcc-no-bootstrap
-@@ -43509,6 +44006,7 @@
- configure-target-boehm-gc: maybe-all-target-libgcc
- configure-target-rda: maybe-all-target-libgcc
- configure-target-libada: maybe-all-target-libgcc
-+configure-target-libgm2: maybe-all-target-libgcc
- configure-target-libgomp: maybe-all-target-libgcc
- configure-target-libitm: maybe-all-target-libgcc
- @endif gcc-no-bootstrap
-@@ -43548,6 +44046,8 @@
-
- configure-target-libada: maybe-all-target-newlib maybe-all-target-libgloss
-
-+configure-target-libgm2: maybe-all-target-newlib maybe-all-target-libgloss
-+
- configure-target-libgomp: maybe-all-target-newlib maybe-all-target-libgloss
-
- configure-target-libitm: maybe-all-target-newlib maybe-all-target-libgloss
diff --git a/gcc/m2/patches/gcc/4.7.3/04-patches b/gcc/m2/patches/gcc/4.7.3/04-patches
deleted file mode 100644
index db73818bc4e..00000000000
--- a/gcc/m2/patches/gcc/4.7.3/04-patches
+++ /dev/null
@@ -1,26 +0,0 @@
---- gcc-4.7.3-orig/Makefile.def 2013-06-19 15:00:33.000000000 +0100
-+++ gcc-4.7.3/Makefile.def 2014-06-23 15:43:47.000000000 +0100
-@@ -138,6 +138,7 @@
- target_modules = { module= boehm-gc; };
- target_modules = { module= rda; };
- target_modules = { module= libada; };
-+target_modules = { module= libgm2; lib_path=.libs; };
- target_modules = { module= libgomp; bootstrap= true; lib_path=.libs; };
- target_modules = { module= libitm; lib_path=.libs; };
-
-@@ -252,6 +253,7 @@
- flags_to_pass = { flag= GFORTRAN_FOR_TARGET ; };
- flags_to_pass = { flag= GOC_FOR_TARGET ; };
- flags_to_pass = { flag= GOCFLAGS_FOR_TARGET ; };
-+flags_to_pass = { flag= GM2_FOR_TARGET ; };
- flags_to_pass = { flag= LD_FOR_TARGET ; };
- flags_to_pass = { flag= LIPO_FOR_TARGET ; };
- flags_to_pass = { flag= LDFLAGS_FOR_TARGET ; };
-@@ -530,6 +532,7 @@
- languages = { language=obj-c++; gcc-check-target=check-obj-c++; };
- languages = { language=go; gcc-check-target=check-go;
- lib-check-target=check-target-libgo; };
-+languages = { language=gm2; gcc-check-target=check-gm2; };
-
- // Toplevel bootstrap
- bootstrap_stage = { id=1 ; };
diff --git a/gcc/m2/patches/gcc/4.7.3/05-patches b/gcc/m2/patches/gcc/4.7.3/05-patches
deleted file mode 100644
index 3cd6da1acdd..00000000000
--- a/gcc/m2/patches/gcc/4.7.3/05-patches
+++ /dev/null
@@ -1,58 +0,0 @@
---- gcc-4.7.3-orig/Makefile.tpl 2013-06-19 15:00:34.000000000 +0100
-+++ gcc-4.7.3/Makefile.tpl 2014-05-12 14:54:48.000000000 +0100
-@@ -160,6 +160,7 @@
- GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \
- GOC="$(GOC_FOR_BUILD)"; export GOC; \
- GOCFLAGS="$(GOCFLAGS_FOR_BUILD)"; export GOCFLAGS; \
-+ GM2="$(GM2_FOR_BUILD)"; export GM2; \
- DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
- LD="$(LD_FOR_BUILD)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
-@@ -197,6 +198,7 @@
- GCJ="$(GCJ)"; export GCJ; \
- GFORTRAN="$(GFORTRAN)"; export GFORTRAN; \
- GOC="$(GOC)"; export GOC; \
-+ GM2="$(GM2)"; export GM2; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
-@@ -283,6 +285,7 @@
- GCJ="$(GCJ_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GCJ; \
- GFORTRAN="$(GFORTRAN_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GFORTRAN; \
- GOC="$(GOC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GOC; \
-+ GM2="$(GM2_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GM2; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
-@@ -353,6 +356,7 @@
- GCJ_FOR_BUILD = @GCJ_FOR_BUILD@
- GFORTRAN_FOR_BUILD = @GFORTRAN_FOR_BUILD@
- GOC_FOR_BUILD = @GOC_FOR_BUILD@
-+GM2_FOR_BUILD = @GM2_FOR_BUILD@
- LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
- LD_FOR_BUILD = @LD_FOR_BUILD@
- NM_FOR_BUILD = @NM_FOR_BUILD@
-@@ -490,6 +494,7 @@
- GCJ_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCJ_FOR_TARGET@
- GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@
- GOC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GOC_FOR_TARGET@
-+GM2_FOR_TARGET=$(STAGE_CC_WRAPPER) @GM2_FOR_TARGET@
- DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
- LD_FOR_TARGET=@LD_FOR_TARGET@
-
-@@ -612,6 +617,7 @@
- 'GCJ=$(GCJ)' \
- 'GFORTRAN=$(GFORTRAN)' \
- 'GOC=$(GOC)' \
-+ 'GM2=$(GM2)' \
- 'LD=$(LD)' \
- 'LIPO=$(LIPO)' \
- 'NM=$(NM)' \
-@@ -651,6 +657,7 @@
- 'GFORTRAN=$$(GFORTRAN_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
- 'GOC=$$(GOC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
- 'GOCFLAGS=$$(GOCFLAGS_FOR_TARGET)' \
-+ 'GM2=$$(GM2_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
- 'LD=$(COMPILER_LD_FOR_TARGET)' \
- 'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \
- 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
diff --git a/gcc/m2/patches/gcc/4.7.3/06-patches b/gcc/m2/patches/gcc/4.7.3/06-patches
deleted file mode 100644
index 6b4bbd7a2f7..00000000000
--- a/gcc/m2/patches/gcc/4.7.3/06-patches
+++ /dev/null
@@ -1,218 +0,0 @@
---- gcc-4.7.3-orig/gcc/gcc.c 2013-06-19 15:00:24.000000000 +0100
-+++ gcc-4.7.3/gcc/gcc.c 2013-11-20 13:14:53.000000000 +0000
-@@ -167,6 +167,10 @@
- static const char *cross_compile = "0";
- #endif
-
-+/* The lang specs might wish to override the default linker.
-+ */
-+int allow_linker = 1;
-+
- /* Greatest exit code of sub-processes that has been encountered up to
- now. */
- static int greatest_status = 1;
-@@ -268,6 +272,7 @@
- static const char *compare_debug_auxbase_opt_spec_function (int, const char **);
- static const char *pass_through_libs_spec_func (int, const char **);
- static char *convert_white_space (char *);
-+static void handle_OPT_B (const char *arg);
- \f
- /* The Specs Language
-
-@@ -665,6 +670,7 @@
- /* We pass any -flto flags on to the linker, which is expected
- to understand them. In practice, this means it had better be collect2. */
- /* %{e*} includes -export-dynamic; see comment in common.opt. */
-+
- #ifndef LINK_COMMAND_SPEC
- #define LINK_COMMAND_SPEC "\
- %{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
-@@ -1272,6 +1278,10 @@
- { 0, 0 }
- };
-
-+/* front end registered spec functions */
-+static struct spec_function *lang_spec_functions = NULL;
-+static unsigned int lang_spec_functions_length = 0;
-+
- static int processing_spec_function;
- \f
- /* Add appropriate libgcc specs to OBSTACK, taking into account
-@@ -3131,6 +3141,68 @@
- n_switches++;
- }
-
-+/* Save an option OPT with N_ARGS arguments in array ARGS, marking it
-+ as validated if VALIDATED. */
-+
-+void
-+fe_save_switch (const char *opt, size_t n_args, const char *const *args,
-+ bool validated)
-+{
-+ save_switch (opt, n_args, args, validated);
-+}
-+
-+void fe_B_prefix (const char *arg)
-+{
-+ handle_OPT_B (arg);
-+}
-+
-+void
-+fe_add_linker_option (const char *option)
-+{
-+ add_linker_option (option, strlen (option));
-+}
-+
-+/* Handle the -B option by adding the prefix to exec, startfile and
-+ include search paths. */
-+
-+static
-+void handle_OPT_B (const char *arg)
-+{
-+ size_t len = strlen (arg);
-+
-+ /* Catch the case where the user has forgotten to append a
-+ directory separator to the path. Note, they may be using
-+ -B to add an executable name prefix, eg "i386-elf-", in
-+ order to distinguish between multiple installations of
-+ GCC in the same directory. Hence we must check to see
-+ if appending a directory separator actually makes a
-+ valid directory name. */
-+ if (!IS_DIR_SEPARATOR (arg[len - 1])
-+ && is_directory (arg, false))
-+ {
-+ char *tmp = XNEWVEC (char, len + 2);
-+ strcpy (tmp, arg);
-+ tmp[len] = DIR_SEPARATOR;
-+ tmp[++len] = 0;
-+ arg = tmp;
-+ }
-+
-+ add_prefix (&exec_prefixes, arg, NULL,
-+ PREFIX_PRIORITY_B_OPT, 0, 0);
-+ add_prefix (&startfile_prefixes, arg, NULL,
-+ PREFIX_PRIORITY_B_OPT, 0, 0);
-+ add_prefix (&include_prefixes, arg, NULL,
-+ PREFIX_PRIORITY_B_OPT, 0, 0);
-+}
-+
-+/* Save the infile */
-+
-+void
-+fe_add_infile (const char *infile, const char *lang)
-+{
-+ add_infile (infile, lang);
-+}
-+
- /* Handle an option DECODED that is unknown to the option-processing
- machinery. */
-
-@@ -3477,33 +3549,7 @@
- break;
-
- case OPT_B:
-- {
-- size_t len = strlen (arg);
--
-- /* Catch the case where the user has forgotten to append a
-- directory separator to the path. Note, they may be using
-- -B to add an executable name prefix, eg "i386-elf-", in
-- order to distinguish between multiple installations of
-- GCC in the same directory. Hence we must check to see
-- if appending a directory separator actually makes a
-- valid directory name. */
-- if (!IS_DIR_SEPARATOR (arg[len - 1])
-- && is_directory (arg, false))
-- {
-- char *tmp = XNEWVEC (char, len + 2);
-- strcpy (tmp, arg);
-- tmp[len] = DIR_SEPARATOR;
-- tmp[++len] = 0;
-- arg = tmp;
-- }
--
-- add_prefix (&exec_prefixes, arg, NULL,
-- PREFIX_PRIORITY_B_OPT, 0, 0);
-- add_prefix (&startfile_prefixes, arg, NULL,
-- PREFIX_PRIORITY_B_OPT, 0, 0);
-- add_prefix (&include_prefixes, arg, NULL,
-- PREFIX_PRIORITY_B_OPT, 0, 0);
-- }
-+ handle_OPT_B (arg);
- validated = true;
- break;
-
-@@ -5312,6 +5358,33 @@
- return 0;
- }
-
-+/* Allow the front end to register a spec function. */
-+
-+void fe_add_spec_function (const char *name, const char *(*func) (int, const char **))
-+{
-+ const struct spec_function *f = lookup_spec_function (name);
-+ struct spec_function *fl;
-+ unsigned int i;
-+
-+ if (f != NULL)
-+ fatal_error ("spec function (%s) already registered", name);
-+
-+ if (lang_spec_functions == NULL)
-+ lang_spec_functions_length = 1;
-+
-+ lang_spec_functions_length++;
-+ fl = (struct spec_function *) xmalloc (sizeof (const struct spec_function)*lang_spec_functions_length);
-+ for (i=0; i<lang_spec_functions_length-2; i++)
-+ fl[i] = lang_spec_functions[i];
-+ free (lang_spec_functions);
-+ lang_spec_functions = fl;
-+
-+ lang_spec_functions[lang_spec_functions_length-2].name = name;
-+ lang_spec_functions[lang_spec_functions_length-2].func = func;
-+ lang_spec_functions[lang_spec_functions_length-1].name = NULL;
-+ lang_spec_functions[lang_spec_functions_length-1].func = NULL;
-+}
-+
- /* Look up a spec function. */
-
- static const struct spec_function *
-@@ -5323,6 +5396,11 @@
- if (strcmp (sf->name, name) == 0)
- return sf;
-
-+ if (lang_spec_functions != NULL)
-+ for (sf = lang_spec_functions; sf->name != NULL; sf++)
-+ if (strcmp (sf->name, name) == 0)
-+ return sf;
-+
- return NULL;
- }
-
-@@ -6285,6 +6363,8 @@
- spec_version, dir_separator_str, NULL);
- just_machine_suffix = concat (spec_machine, dir_separator_str, NULL);
-
-+ lang_register_spec_functions ();
-+
- specs_file = find_a_file (&startfile_prefixes, "specs", R_OK, true);
- /* Read the specs file unless it is a default one. */
- if (specs_file != 0 && strcmp (specs_file, "specs"))
-@@ -6885,7 +6965,8 @@
-
- /* Run ld to link all the compiler output files. */
-
-- if (num_linker_inputs > 0 && !seen_error () && print_subprocess_help < 2)
-+ if (num_linker_inputs > 0 && !seen_error () && print_subprocess_help < 2
-+ && allow_linker)
- {
- int tmp = execution_count;
-
-@@ -6951,7 +7032,7 @@
- /* If options said don't run linker,
- complain about input files to be given to the linker. */
-
-- if (! linker_was_run && !seen_error ())
-+ if (! linker_was_run && !seen_error () && allow_linker)
- for (i = 0; (int) i < n_infiles; i++)
- if (explicit_link_files[i]
- && !(infiles[i].language && infiles[i].language[0] == '*'))
diff --git a/gcc/m2/patches/gcc/4.7.3/07-patches b/gcc/m2/patches/gcc/4.7.3/07-patches
deleted file mode 100644
index dda0dd20fd4..00000000000
--- a/gcc/m2/patches/gcc/4.7.3/07-patches
+++ /dev/null
@@ -1,29 +0,0 @@
---- gcc-4.7.3-orig/gcc/gcc.h 2013-06-19 15:00:29.000000000 +0100
-+++ gcc-4.7.3/gcc/gcc.h 2013-12-31 12:03:16.000000000 +0000
-@@ -37,9 +37,17 @@
- extern void record_temp_file (const char *, int, int);
- extern void pfatal_with_name (const char *) ATTRIBUTE_NORETURN;
- extern void set_input (const char *);
-+extern void fe_save_switch (const char *opt, size_t n_args,
-+ const char *const *args, bool validated);
-+extern void fe_B_prefix (const char *arg);
-+extern void fe_add_infile (const char *infile, const char *lang);
-+extern void fe_add_linker_option (const char *option);
-+extern void fe_add_spec_function (const char *name, const char *(*func) (int, const char **));
-
- /* Spec files linked with gcc.c must provide definitions for these. */
-
-+extern void lang_register_spec_functions (void);
-+
- /* Called before processing to change/add/remove arguments. */
- extern void lang_specific_driver (struct cl_decoded_option **,
- unsigned int *, int *);
-@@ -56,4 +64,8 @@
-
- extern const char **outfiles;
-
-+/* Default setting is true, but can be overridden by the language
-+ front end to prohibit the linker from being invoked. */
-+extern int allow_linker;
-+
- #endif /* ! GCC_GCC_H */
diff --git a/gcc/m2/patches/gcc/4.7.3/08-patches b/gcc/m2/patches/gcc/4.7.3/08-patches
deleted file mode 100644
index 5f94635f250..00000000000
--- a/gcc/m2/patches/gcc/4.7.3/08-patches
+++ /dev/null
@@ -1,14 +0,0 @@
---- gcc-4.7.3-orig/gcc/Makefile.in 2013-06-19 14:58:49.000000000 +0100
-+++ gcc-4.7.3/gcc/Makefile.in 2013-11-06 14:36:18.000000000 +0000
-@@ -1815,9 +1815,9 @@
-
- cc1-checksum.o : cc1-checksum.c $(CONFIG_H) $(SYSTEM_H)
-
--cc1$(exeext): $(C_OBJS) cc1-checksum.o $(BACKEND) $(LIBDEPS)
-+cc1$(exeext): $(C_OBJS) cc1-checksum.o $(BACKEND) $(LIBDEPS) c-family/m2pp.o
- +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) \
-- cc1-checksum.o $(BACKEND) $(LIBS) $(BACKENDLIBS)
-+ cc1-checksum.o $(BACKEND) $(LIBS) $(BACKENDLIBS) c-family/m2pp.o
-
- #\f
- # Build libgcc.a.
diff --git a/gcc/m2/patches/gcc/4.7.3/09-patches b/gcc/m2/patches/gcc/4.7.3/09-patches
deleted file mode 100644
index 6014f77ee25..00000000000
--- a/gcc/m2/patches/gcc/4.7.3/09-patches
+++ /dev/null
@@ -1,13 +0,0 @@
---- gcc-4.7.3-orig/gcc/gccspec.c 2013-06-19 14:58:50.000000000 +0100
-+++ gcc-4.7.3/gcc/gccspec.c 2013-11-06 14:36:18.000000000 +0000
-@@ -106,3 +106,10 @@
-
- /* Number of extra output files that lang_specific_pre_link may generate. */
- int lang_specific_extra_outfiles = 0; /* Not used for C. */
-+
-+
-+/* lang_register_spec_functions. Not used for C. */
-+void
-+lang_register_spec_functions (void)
-+{
-+}
diff --git a/gcc/m2/patches/gcc/4.7.3/10-patches b/gcc/m2/patches/gcc/4.7.3/10-patches
deleted file mode 100644
index 4134f76c241..00000000000
--- a/gcc/m2/patches/gcc/4.7.3/10-patches
+++ /dev/null
@@ -1,12 +0,0 @@
---- gcc-4.7.3-orig/gcc/cppspec.c 2013-06-19 14:58:49.000000000 +0100
-+++ gcc-4.7.3/gcc/cppspec.c 2013-11-06 14:36:18.000000000 +0000
-@@ -196,3 +196,9 @@
-
- /* Number of extra output files that lang_specific_pre_link may generate. */
- int lang_specific_extra_outfiles = 0; /* Not used for cpp. */
-+
-+/* lang_register_spec_functions. Not used for cpp. */
-+void
-+lang_register_spec_functions (void)
-+{
-+}
diff --git a/gcc/m2/patches/gcc/4.7.3/11-patches b/gcc/m2/patches/gcc/4.7.3/11-patches
deleted file mode 100644
index fa1b67e3285..00000000000
--- a/gcc/m2/patches/gcc/4.7.3/11-patches
+++ /dev/null
@@ -1,12 +0,0 @@
---- gcc-4.7.3-orig/gcc/cp/g++spec.c 2013-06-19 15:00:32.000000000 +0100
-+++ gcc-4.7.3/gcc/cp/g++spec.c 2013-11-06 14:36:18.000000000 +0000
-@@ -372,3 +372,9 @@
-
- /* Number of extra output files that lang_specific_pre_link may generate. */
- int lang_specific_extra_outfiles = 0; /* Not used for C++. */
-+
-+/* lang_register_spec_functions. Not used for cpp. */
-+void
-+lang_register_spec_functions (void)
-+{
-+}
diff --git a/gcc/m2/patches/gcc/4.7.3/12-patches b/gcc/m2/patches/gcc/4.7.3/12-patches
deleted file mode 100644
index 8e2b831856c..00000000000
--- a/gcc/m2/patches/gcc/4.7.3/12-patches
+++ /dev/null
@@ -1,11 +0,0 @@
---- gcc-4.7.3-orig/gcc/tree-ssa-loop-im.c 2013-06-19 14:58:47.000000000 +0100
-+++ gcc-4.7.3/gcc/tree-ssa-loop-im.c 2014-07-12 07:13:15.000000000 +0100
-@@ -687,7 +687,7 @@
- hash = iterative_hash_expr (*mem, 0);
- ref = (mem_ref_p) htab_find_with_hash (memory_accesses.refs, *mem, hash);
-
-- gcc_assert (ref != NULL);
-+ // gcc_assert (ref != NULL);
- return ref;
- }
-
diff --git a/gcc/m2/patches/gcc/4.7.4/01-patches b/gcc/m2/patches/gcc/4.7.4/01-patches
deleted file mode 100644
index e0a11e39246..00000000000
--- a/gcc/m2/patches/gcc/4.7.4/01-patches
+++ /dev/null
@@ -1,319 +0,0 @@
---- gcc-4.7.3-orig/configure 2013-06-19 14:55:55.000000000 +0100
-+++ gcc-4.7.3/configure 2014-05-11 22:41:28.000000000 +0100
-@@ -580,6 +580,7 @@
- DLLTOOL_FOR_TARGET
- AS_FOR_TARGET
- AR_FOR_TARGET
-+GM2_FOR_TARGET
- GOC_FOR_TARGET
- GFORTRAN_FOR_TARGET
- GCJ_FOR_TARGET
-@@ -613,6 +614,7 @@
- NM_FOR_BUILD
- LD_FOR_BUILD
- LDFLAGS_FOR_BUILD
-+GM2_FOR_BUILD
- GOC_FOR_BUILD
- GFORTRAN_FOR_BUILD
- GCJ_FOR_BUILD
-@@ -749,6 +751,7 @@
- enable_libquadmath
- enable_libquadmath_support
- enable_libada
-+enable_libgm2
- enable_libssp
- enable_static_libjava
- enable_bootstrap
-@@ -824,6 +827,7 @@
- GCJ_FOR_TARGET
- GFORTRAN_FOR_TARGET
- GOC_FOR_TARGET
-+GM2_FOR_TARGET
- AR_FOR_TARGET
- AS_FOR_TARGET
- DLLTOOL_FOR_TARGET
-@@ -1467,6 +1471,7 @@
- --disable-libquadmath-support
- disable libquadmath support for Fortran
- --enable-libada build libada directory
-+ --enable-libgm2 build libgm2 directory
- --enable-libssp build libssp directory
- --enable-static-libjava[=ARG]
- build static libjava [default=no]
-@@ -1594,6 +1599,8 @@
- GFORTRAN for the target
- GOC_FOR_TARGET
- GOC for the target
-+ GM2_FOR_TARGET
-+ GM2 for the target
- AR_FOR_TARGET
- AR for the target
- AS_FOR_TARGET
-@@ -2698,6 +2705,7 @@
- ${libgcj} \
- target-libobjc \
- target-libada \
-+ target-libgm2 \
- target-libgo"
-
- # these tools are built using the target libraries, and are intended to
-@@ -2985,6 +2993,15 @@
- noconfigdirs="$noconfigdirs gnattools"
- fi
-
-+# Check whether --enable-libgm2 was given.
-+if test "${enable_libgm2+set}" = set; then :
-+ enableval=$enable_libgm2; ENABLE_LIBGM2=$enableval
-+else
-+ ENABLE_LIBGM2=yes
-+fi
-+
-+
-+
- # Check whether --enable-libssp was given.
- if test "${enable_libssp+set}" = set; then :
- enableval=$enable_libssp; ENABLE_LIBSSP=$enableval
-@@ -3703,6 +3720,7 @@
- GCJ_FOR_BUILD=${GCJ_FOR_BUILD-gcj}
- GFORTRAN_FOR_BUILD=${GFORTRAN_FOR_BUILD-gfortran}
- GOC_FOR_BUILD=${GOC_FOR_BUILD-gccgo}
-+ GM2_FOR_BUILD=${GM2_FOR_BUILD-gm2}
- DLLTOOL_FOR_BUILD=${DLLTOOL_FOR_BUILD-dlltool}
- LD_FOR_BUILD=${LD_FOR_BUILD-ld}
- NM_FOR_BUILD=${NM_FOR_BUILD-nm}
-@@ -3717,6 +3735,7 @@
- GCJ_FOR_BUILD="\$(GCJ)"
- GFORTRAN_FOR_BUILD="\$(GFORTRAN)"
- GOC_FOR_BUILD="\$(GOC)"
-+ GM2_FOR_BUILD="\$(GM2)"
- DLLTOOL_FOR_BUILD="\$(DLLTOOL)"
- LD_FOR_BUILD="\$(LD)"
- NM_FOR_BUILD="\$(NM)"
-@@ -7535,6 +7554,7 @@
-
-
-
-+
- # Generate default definitions for YACC, M4, LEX and other programs that run
- # on the build machine. These are used if the Makefile can't locate these
- # programs in objdir.
-@@ -10750,6 +10770,167 @@
-
-
-
-+if test -n "$GM2_FOR_TARGET"; then
-+ ac_cv_prog_GM2_FOR_TARGET=$GM2_FOR_TARGET
-+elif test -n "$ac_cv_prog_GM2_FOR_TARGET"; then
-+ GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
-+fi
-+
-+if test -n "$ac_cv_prog_GM2_FOR_TARGET"; then
-+ for ncn_progname in gm2; do
-+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
-+set dummy ${ncn_progname}; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_GM2_FOR_TARGET+set}" = set; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ if test -n "$GM2_FOR_TARGET"; then
-+ ac_cv_prog_GM2_FOR_TARGET="$GM2_FOR_TARGET" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+ ac_cv_prog_GM2_FOR_TARGET="${ncn_progname}"
-+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+ break 2
-+ fi
-+done
-+ done
-+IFS=$as_save_IFS
-+
-+fi
-+fi
-+GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
-+if test -n "$GM2_FOR_TARGET"; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GM2_FOR_TARGET" >&5
-+$as_echo "$GM2_FOR_TARGET" >&6; }
-+else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
-+
-+
-+ done
-+fi
-+
-+if test -z "$ac_cv_prog_GM2_FOR_TARGET" && test -n "$with_build_time_tools"; then
-+ for ncn_progname in gm2; do
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
-+$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
-+ if test -x $with_build_time_tools/${ncn_progname}; then
-+ ac_cv_prog_GM2_FOR_TARGET=$with_build_time_tools/${ncn_progname}
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
-+ break
-+ else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+ fi
-+ done
-+fi
-+
-+if test -z "$ac_cv_prog_GM2_FOR_TARGET"; then
-+ for ncn_progname in gm2; do
-+ if test -n "$ncn_target_tool_prefix"; then
-+ # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
-+set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_GM2_FOR_TARGET+set}" = set; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ if test -n "$GM2_FOR_TARGET"; then
-+ ac_cv_prog_GM2_FOR_TARGET="$GM2_FOR_TARGET" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+ ac_cv_prog_GM2_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
-+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+ break 2
-+ fi
-+done
-+ done
-+IFS=$as_save_IFS
-+
-+fi
-+fi
-+GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
-+if test -n "$GM2_FOR_TARGET"; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GM2_FOR_TARGET" >&5
-+$as_echo "$GM2_FOR_TARGET" >&6; }
-+else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
-+
-+
-+ fi
-+ if test -z "$ac_cv_prog_GM2_FOR_TARGET" && test $build = $target ; then
-+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
-+set dummy ${ncn_progname}; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_GM2_FOR_TARGET+set}" = set; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ if test -n "$GM2_FOR_TARGET"; then
-+ ac_cv_prog_GM2_FOR_TARGET="$GM2_FOR_TARGET" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+ ac_cv_prog_GM2_FOR_TARGET="${ncn_progname}"
-+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+ break 2
-+ fi
-+done
-+ done
-+IFS=$as_save_IFS
-+
-+fi
-+fi
-+GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
-+if test -n "$GM2_FOR_TARGET"; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GM2_FOR_TARGET" >&5
-+$as_echo "$GM2_FOR_TARGET" >&6; }
-+else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
-+
-+
-+ fi
-+ test -n "$ac_cv_prog_GM2_FOR_TARGET" && break
-+ done
-+fi
-+
-+if test -z "$ac_cv_prog_GM2_FOR_TARGET" ; then
-+ set dummy gm2
-+ if test $build = $target ; then
-+ GM2_FOR_TARGET="$2"
-+ else
-+ GM2_FOR_TARGET="${ncn_target_tool_prefix}$2"
-+ fi
-+else
-+ GM2_FOR_TARGET="$ac_cv_prog_GM2_FOR_TARGET"
-+fi
-+
-+
-+
- cat > conftest.c << \EOF
- #ifdef __GNUC__
- gcc_yay;
-@@ -13955,6 +14136,51 @@
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
- $as_echo "host tool" >&6; }
- else
-+ # We need a cross tool
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
-+$as_echo "pre-installed" >&6; }
-+ fi
-+fi
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target gm2" >&5
-+$as_echo_n "checking where to find the target gm2... " >&6; }
-+if test "x${build}" != "x${host}" ; then
-+ if expr "x$GM2_FOR_TARGET" : "x/" > /dev/null; then
-+ # We already found the complete path
-+ ac_dir=`dirname $GM2_FOR_TARGET`
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
-+$as_echo "pre-installed in $ac_dir" >&6; }
-+ else
-+ # Canadian cross, just use what we found
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
-+$as_echo "pre-installed" >&6; }
-+ fi
-+else
-+ ok=yes
-+ case " ${configdirs} " in
-+ *" gcc "*) ;;
-+ *) ok=no ;;
-+ esac
-+ case ,${enable_languages}, in
-+ *,gm2,*) ;;
-+ *) ok=no ;;
-+ esac
-+ if test $ok = yes; then
-+ # An in-tree tool is available and we can use it
-+ GM2_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgm2 -B$$r/$(HOST_SUBDIR)/gcc/'
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
-+$as_echo "just compiled" >&6; }
-+ elif expr "x$GM2_FOR_TARGET" : "x/" > /dev/null; then
-+ # We already found the complete path
-+ ac_dir=`dirname $GM2_FOR_TARGET`
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
-+$as_echo "pre-installed in $ac_dir" >&6; }
-+ elif test "x$target" = "x$host"; then
-+ # We can use an host tool
-+ GM2_FOR_TARGET='$(GM2)'
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
-+$as_echo "host tool" >&6; }
-+ else
- # We need a cross tool
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
- $as_echo "pre-installed" >&6; }
diff --git a/gcc/m2/patches/gcc/4.7.4/02-patches b/gcc/m2/patches/gcc/4.7.4/02-patches
deleted file mode 100644
index 5aed92b685a..00000000000
--- a/gcc/m2/patches/gcc/4.7.4/02-patches
+++ /dev/null
@@ -1,64 +0,0 @@
---- gcc-4.7.3-orig/configure.ac 2013-06-19 14:56:00.000000000 +0100
-+++ gcc-4.7.3/configure.ac 2014-05-11 22:39:51.000000000 +0100
-@@ -164,6 +164,7 @@
- ${libgcj} \
- target-libobjc \
- target-libada \
-+ target-libgm2 \
- target-libgo"
-
- # these tools are built using the target libraries, and are intended to
-@@ -419,6 +420,12 @@
- noconfigdirs="$noconfigdirs gnattools"
- fi
-
-+AC_ARG_ENABLE(libgm2,
-+[AS_HELP_STRING([--enable-libgm2], [build libgm2 directory])],
-+ENABLE_LIBGM2=$enableval,
-+ENABLE_LIBGM2=yes)
-+
-+
- AC_ARG_ENABLE(libssp,
- [AS_HELP_STRING([--enable-libssp], [build libssp directory])],
- ENABLE_LIBSSP=$enableval,
-@@ -1110,6 +1117,7 @@
- GCJ_FOR_BUILD=${GCJ_FOR_BUILD-gcj}
- GFORTRAN_FOR_BUILD=${GFORTRAN_FOR_BUILD-gfortran}
- GOC_FOR_BUILD=${GOC_FOR_BUILD-gccgo}
-+ GM2_FOR_BUILD=${GM2_FOR_BUILD-gm2}
- DLLTOOL_FOR_BUILD=${DLLTOOL_FOR_BUILD-dlltool}
- LD_FOR_BUILD=${LD_FOR_BUILD-ld}
- NM_FOR_BUILD=${NM_FOR_BUILD-nm}
-@@ -1124,6 +1132,7 @@
- GCJ_FOR_BUILD="\$(GCJ)"
- GFORTRAN_FOR_BUILD="\$(GFORTRAN)"
- GOC_FOR_BUILD="\$(GOC)"
-+ GM2_FOR_BUILD="\$(GM2)"
- DLLTOOL_FOR_BUILD="\$(DLLTOOL)"
- LD_FOR_BUILD="\$(LD)"
- NM_FOR_BUILD="\$(NM)"
-@@ -2985,6 +2994,7 @@
- AC_SUBST(GCJ_FOR_BUILD)
- AC_SUBST(GFORTRAN_FOR_BUILD)
- AC_SUBST(GOC_FOR_BUILD)
-+AC_SUBST(GM2_FOR_BUILD)
- AC_SUBST(LDFLAGS_FOR_BUILD)
- AC_SUBST(LD_FOR_BUILD)
- AC_SUBST(NM_FOR_BUILD)
-@@ -3095,6 +3105,7 @@
- NCN_STRICT_CHECK_TARGET_TOOLS(GCJ_FOR_TARGET, gcj)
- NCN_STRICT_CHECK_TARGET_TOOLS(GFORTRAN_FOR_TARGET, gfortran)
- NCN_STRICT_CHECK_TARGET_TOOLS(GOC_FOR_TARGET, gccgo)
-+NCN_STRICT_CHECK_TARGET_TOOLS(GM2_FOR_TARGET, gm2)
-
- ACX_CHECK_INSTALLED_TARGET_TOOL(AR_FOR_TARGET, ar)
- ACX_CHECK_INSTALLED_TARGET_TOOL(AS_FOR_TARGET, as)
-@@ -3129,6 +3140,8 @@
- [gcc/gfortran -B$$r/$(HOST_SUBDIR)/gcc/], fortran)
- GCC_TARGET_TOOL(gccgo, GOC_FOR_TARGET, GOC,
- [gcc/gccgo -B$$r/$(HOST_SUBDIR)/gcc/], go)
-+GCC_TARGET_TOOL(gm2, GM2_FOR_TARGET, GM2,
-+ [gcc/xgm2 -B$$r/$(HOST_SUBDIR)/gcc/], gm2)
- GCC_TARGET_TOOL(ld, LD_FOR_TARGET, LD, [ld/ld-new])
- GCC_TARGET_TOOL(lipo, LIPO_FOR_TARGET, LIPO)
- GCC_TARGET_TOOL(nm, NM_FOR_TARGET, NM, [binutils/nm-new])
diff --git a/gcc/m2/patches/gcc/4.7.4/03-patches b/gcc/m2/patches/gcc/4.7.4/03-patches
deleted file mode 100644
index 3087556d9cd..00000000000
--- a/gcc/m2/patches/gcc/4.7.4/03-patches
+++ /dev/null
@@ -1,742 +0,0 @@
---- gcc-4.7.3-orig/Makefile.in 2013-06-19 14:56:00.000000000 +0100
-+++ gcc-4.7.3/Makefile.in 2014-08-30 14:15:48.000000000 +0100
-@@ -157,6 +157,7 @@
- GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \
- GOC="$(GOC_FOR_BUILD)"; export GOC; \
- GOCFLAGS="$(GOCFLAGS_FOR_BUILD)"; export GOCFLAGS; \
-+ GM2="$(GM2_FOR_BUILD)"; export GM2; \
- DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
- LD="$(LD_FOR_BUILD)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
-@@ -194,6 +195,7 @@
- GCJ="$(GCJ)"; export GCJ; \
- GFORTRAN="$(GFORTRAN)"; export GFORTRAN; \
- GOC="$(GOC)"; export GOC; \
-+ GM2="$(GM2)"; export GM2; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
-@@ -280,6 +282,7 @@
- GCJ="$(GCJ_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GCJ; \
- GFORTRAN="$(GFORTRAN_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GFORTRAN; \
- GOC="$(GOC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GOC; \
-+ GM2="$(GM2_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GM2; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
-@@ -350,6 +353,7 @@
- GCJ_FOR_BUILD = @GCJ_FOR_BUILD@
- GFORTRAN_FOR_BUILD = @GFORTRAN_FOR_BUILD@
- GOC_FOR_BUILD = @GOC_FOR_BUILD@
-+GM2_FOR_BUILD = @GM2_FOR_BUILD@
- LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
- LD_FOR_BUILD = @LD_FOR_BUILD@
- NM_FOR_BUILD = @NM_FOR_BUILD@
-@@ -552,6 +556,7 @@
- GCJ_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCJ_FOR_TARGET@
- GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@
- GOC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GOC_FOR_TARGET@
-+GM2_FOR_TARGET=$(STAGE_CC_WRAPPER) @GM2_FOR_TARGET@
- DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
- LD_FOR_TARGET=@LD_FOR_TARGET@
-
-@@ -599,7 +604,7 @@
-
- # This is the list of directories that may be needed in RPATH_ENVVAR
- # so that programs built for the target machine work.
--TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libmudflap)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libgomp)$(TARGET_LIB_PATH_libitm)$(HOST_LIB_PATH_gcc)
-+TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libmudflap)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libgm2)$(TARGET_LIB_PATH_libgomp)$(TARGET_LIB_PATH_libitm)$(HOST_LIB_PATH_gcc)
-
- @if target-libstdc++-v3
- TARGET_LIB_PATH_libstdc++-v3 = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:
-@@ -613,6 +618,10 @@
- TARGET_LIB_PATH_libssp = $$r/$(TARGET_SUBDIR)/libssp/.libs:
- @endif target-libssp
-
-+@if target-libgm2
-+TARGET_LIB_PATH_libgm2 = $$r/$(TARGET_SUBDIR)/libgm2/.libs:
-+@endif target-libgm2
-+
- @if target-libgomp
- TARGET_LIB_PATH_libgomp = $$r/$(TARGET_SUBDIR)/libgomp/.libs:
- @endif target-libgomp
-@@ -768,6 +777,7 @@
- "GFORTRAN_FOR_TARGET=$(GFORTRAN_FOR_TARGET)" \
- "GOC_FOR_TARGET=$(GOC_FOR_TARGET)" \
- "GOCFLAGS_FOR_TARGET=$(GOCFLAGS_FOR_TARGET)" \
-+ "GM2_FOR_TARGET=$(GM2_FOR_TARGET)" \
- "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
- "LIPO_FOR_TARGET=$(LIPO_FOR_TARGET)" \
- "LDFLAGS_FOR_TARGET=$(LDFLAGS_FOR_TARGET)" \
-@@ -820,6 +830,7 @@
- 'GCJ=$(GCJ)' \
- 'GFORTRAN=$(GFORTRAN)' \
- 'GOC=$(GOC)' \
-+ 'GM2=$(GM2)' \
- 'LD=$(LD)' \
- 'LIPO=$(LIPO)' \
- 'NM=$(NM)' \
-@@ -859,6 +870,7 @@
- 'GFORTRAN=$$(GFORTRAN_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
- 'GOC=$$(GOC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
- 'GOCFLAGS=$$(GOCFLAGS_FOR_TARGET)' \
-+ 'GM2=$$(GM2_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
- 'LD=$(COMPILER_LD_FOR_TARGET)' \
- 'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \
- 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
-@@ -959,6 +971,7 @@
- maybe-configure-target-boehm-gc \
- maybe-configure-target-rda \
- maybe-configure-target-libada \
-+ maybe-configure-target-libgm2 \
- maybe-configure-target-libgomp \
- maybe-configure-target-libitm
-
-@@ -1104,6 +1117,7 @@
- all-target: maybe-all-target-boehm-gc
- all-target: maybe-all-target-rda
- all-target: maybe-all-target-libada
-+all-target: maybe-all-target-libgm2
- @if target-libgomp-no-bootstrap
- all-target: maybe-all-target-libgomp
- @endif target-libgomp-no-bootstrap
-@@ -1189,6 +1203,7 @@
- info-target: maybe-info-target-boehm-gc
- info-target: maybe-info-target-rda
- info-target: maybe-info-target-libada
-+info-target: maybe-info-target-libgm2
- info-target: maybe-info-target-libgomp
- info-target: maybe-info-target-libitm
-
-@@ -1267,6 +1282,7 @@
- dvi-target: maybe-dvi-target-boehm-gc
- dvi-target: maybe-dvi-target-rda
- dvi-target: maybe-dvi-target-libada
-+dvi-target: maybe-dvi-target-libgm2
- dvi-target: maybe-dvi-target-libgomp
- dvi-target: maybe-dvi-target-libitm
-
-@@ -1345,6 +1361,7 @@
- pdf-target: maybe-pdf-target-boehm-gc
- pdf-target: maybe-pdf-target-rda
- pdf-target: maybe-pdf-target-libada
-+pdf-target: maybe-pdf-target-libgm2
- pdf-target: maybe-pdf-target-libgomp
- pdf-target: maybe-pdf-target-libitm
-
-@@ -1423,6 +1440,7 @@
- html-target: maybe-html-target-boehm-gc
- html-target: maybe-html-target-rda
- html-target: maybe-html-target-libada
-+html-target: maybe-html-target-libgm2
- html-target: maybe-html-target-libgomp
- html-target: maybe-html-target-libitm
-
-@@ -1501,6 +1519,7 @@
- TAGS-target: maybe-TAGS-target-boehm-gc
- TAGS-target: maybe-TAGS-target-rda
- TAGS-target: maybe-TAGS-target-libada
-+TAGS-target: maybe-TAGS-target-libgm2
- TAGS-target: maybe-TAGS-target-libgomp
- TAGS-target: maybe-TAGS-target-libitm
-
-@@ -1579,6 +1598,7 @@
- install-info-target: maybe-install-info-target-boehm-gc
- install-info-target: maybe-install-info-target-rda
- install-info-target: maybe-install-info-target-libada
-+install-info-target: maybe-install-info-target-libgm2
- install-info-target: maybe-install-info-target-libgomp
- install-info-target: maybe-install-info-target-libitm
-
-@@ -1657,6 +1677,7 @@
- install-pdf-target: maybe-install-pdf-target-boehm-gc
- install-pdf-target: maybe-install-pdf-target-rda
- install-pdf-target: maybe-install-pdf-target-libada
-+install-pdf-target: maybe-install-pdf-target-libgm2
- install-pdf-target: maybe-install-pdf-target-libgomp
- install-pdf-target: maybe-install-pdf-target-libitm
-
-@@ -1735,6 +1756,7 @@
- install-html-target: maybe-install-html-target-boehm-gc
- install-html-target: maybe-install-html-target-rda
- install-html-target: maybe-install-html-target-libada
-+install-html-target: maybe-install-html-target-libgm2
- install-html-target: maybe-install-html-target-libgomp
- install-html-target: maybe-install-html-target-libitm
-
-@@ -1813,6 +1835,7 @@
- installcheck-target: maybe-installcheck-target-boehm-gc
- installcheck-target: maybe-installcheck-target-rda
- installcheck-target: maybe-installcheck-target-libada
-+installcheck-target: maybe-installcheck-target-libgm2
- installcheck-target: maybe-installcheck-target-libgomp
- installcheck-target: maybe-installcheck-target-libitm
-
-@@ -1891,6 +1914,7 @@
- mostlyclean-target: maybe-mostlyclean-target-boehm-gc
- mostlyclean-target: maybe-mostlyclean-target-rda
- mostlyclean-target: maybe-mostlyclean-target-libada
-+mostlyclean-target: maybe-mostlyclean-target-libgm2
- mostlyclean-target: maybe-mostlyclean-target-libgomp
- mostlyclean-target: maybe-mostlyclean-target-libitm
-
-@@ -1969,6 +1993,7 @@
- clean-target: maybe-clean-target-boehm-gc
- clean-target: maybe-clean-target-rda
- clean-target: maybe-clean-target-libada
-+clean-target: maybe-clean-target-libgm2
- clean-target: maybe-clean-target-libgomp
- clean-target: maybe-clean-target-libitm
-
-@@ -2047,6 +2072,7 @@
- distclean-target: maybe-distclean-target-boehm-gc
- distclean-target: maybe-distclean-target-rda
- distclean-target: maybe-distclean-target-libada
-+distclean-target: maybe-distclean-target-libgm2
- distclean-target: maybe-distclean-target-libgomp
- distclean-target: maybe-distclean-target-libitm
-
-@@ -2125,6 +2151,7 @@
- maintainer-clean-target: maybe-maintainer-clean-target-boehm-gc
- maintainer-clean-target: maybe-maintainer-clean-target-rda
- maintainer-clean-target: maybe-maintainer-clean-target-libada
-+maintainer-clean-target: maybe-maintainer-clean-target-libgm2
- maintainer-clean-target: maybe-maintainer-clean-target-libgomp
- maintainer-clean-target: maybe-maintainer-clean-target-libitm
-
-@@ -2258,6 +2285,7 @@
- maybe-check-target-boehm-gc \
- maybe-check-target-rda \
- maybe-check-target-libada \
-+ maybe-check-target-libgm2 \
- maybe-check-target-libgomp \
- maybe-check-target-libitm
-
-@@ -2408,6 +2436,7 @@
- maybe-install-target-boehm-gc \
- maybe-install-target-rda \
- maybe-install-target-libada \
-+ maybe-install-target-libgm2 \
- maybe-install-target-libgomp \
- maybe-install-target-libitm
-
-@@ -2506,6 +2535,7 @@
- maybe-install-strip-target-boehm-gc \
- maybe-install-strip-target-rda \
- maybe-install-strip-target-libada \
-+ maybe-install-strip-target-libgm2 \
- maybe-install-strip-target-libgomp \
- maybe-install-strip-target-libitm
-
-@@ -39192,6 +39222,463 @@
-
-
-
-+.PHONY: configure-target-libgm2 maybe-configure-target-libgm2
-+maybe-configure-target-libgm2:
-+@if gcc-bootstrap
-+configure-target-libgm2: stage_current
-+@endif gcc-bootstrap
-+@if target-libgm2
-+maybe-configure-target-libgm2: configure-target-libgm2
-+configure-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ echo "Checking multilib configuration for libgm2..."; \
-+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgm2 ; \
-+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgm2/multilib.tmp 2> /dev/null ; \
-+ if test -r $(TARGET_SUBDIR)/libgm2/multilib.out; then \
-+ if cmp -s $(TARGET_SUBDIR)/libgm2/multilib.tmp $(TARGET_SUBDIR)/libgm2/multilib.out; then \
-+ rm -f $(TARGET_SUBDIR)/libgm2/multilib.tmp; \
-+ else \
-+ rm -f $(TARGET_SUBDIR)/libgm2/Makefile; \
-+ mv $(TARGET_SUBDIR)/libgm2/multilib.tmp $(TARGET_SUBDIR)/libgm2/multilib.out; \
-+ fi; \
-+ else \
-+ mv $(TARGET_SUBDIR)/libgm2/multilib.tmp $(TARGET_SUBDIR)/libgm2/multilib.out; \
-+ fi; \
-+ test ! -f $(TARGET_SUBDIR)/libgm2/Makefile || exit 0; \
-+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgm2 ; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo Configuring in $(TARGET_SUBDIR)/libgm2; \
-+ cd "$(TARGET_SUBDIR)/libgm2" || exit 1; \
-+ case $(srcdir) in \
-+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-+ *) topdir=`echo $(TARGET_SUBDIR)/libgm2/ | \
-+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-+ esac; \
-+ srcdiroption="--srcdir=$${topdir}/libgm2"; \
-+ libsrcdir="$$s/libgm2"; \
-+ rm -f no-such-file || : ; \
-+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
-+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
-+ --target=${target_alias} $${srcdiroption} \
-+ || exit 1
-+@endif target-libgm2
-+
-+
-+
-+
-+
-+.PHONY: all-target-libgm2 maybe-all-target-libgm2
-+maybe-all-target-libgm2:
-+@if gcc-bootstrap
-+all-target-libgm2: stage_current
-+@endif gcc-bootstrap
-+@if target-libgm2
-+TARGET-target-libgm2=all
-+maybe-all-target-libgm2: all-target-libgm2
-+all-target-libgm2: configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
-+ $(TARGET-target-libgm2))
-+@endif target-libgm2
-+
-+
-+
-+
-+
-+.PHONY: check-target-libgm2 maybe-check-target-libgm2
-+maybe-check-target-libgm2:
-+@if target-libgm2
-+maybe-check-target-libgm2: check-target-libgm2
-+
-+check-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
-+
-+@endif target-libgm2
-+
-+.PHONY: install-target-libgm2 maybe-install-target-libgm2
-+maybe-install-target-libgm2:
-+@if target-libgm2
-+maybe-install-target-libgm2: install-target-libgm2
-+
-+install-target-libgm2: installdirs
-+ @: $(MAKE); $(unstage)
-+ @r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
-+
-+@endif target-libgm2
-+
-+.PHONY: install-strip-target-libgm2 maybe-install-strip-target-libgm2
-+maybe-install-strip-target-libgm2:
-+@if target-libgm2
-+maybe-install-strip-target-libgm2: install-strip-target-libgm2
-+
-+install-strip-target-libgm2: installdirs
-+ @: $(MAKE); $(unstage)
-+ @r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install-strip)
-+
-+@endif target-libgm2
-+
-+# Other targets (info, dvi, pdf, etc.)
-+
-+.PHONY: maybe-info-target-libgm2 info-target-libgm2
-+maybe-info-target-libgm2:
-+@if target-libgm2
-+maybe-info-target-libgm2: info-target-libgm2
-+
-+info-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing info in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ info) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-dvi-target-libgm2 dvi-target-libgm2
-+maybe-dvi-target-libgm2:
-+@if target-libgm2
-+maybe-dvi-target-libgm2: dvi-target-libgm2
-+
-+dvi-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing dvi in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ dvi) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-pdf-target-libgm2 pdf-target-libgm2
-+maybe-pdf-target-libgm2:
-+@if target-libgm2
-+maybe-pdf-target-libgm2: pdf-target-libgm2
-+
-+pdf-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing pdf in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ pdf) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-html-target-libgm2 html-target-libgm2
-+maybe-html-target-libgm2:
-+@if target-libgm2
-+maybe-html-target-libgm2: html-target-libgm2
-+
-+html-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing html in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ html) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-TAGS-target-libgm2 TAGS-target-libgm2
-+maybe-TAGS-target-libgm2:
-+@if target-libgm2
-+maybe-TAGS-target-libgm2: TAGS-target-libgm2
-+
-+TAGS-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing TAGS in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ TAGS) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-install-info-target-libgm2 install-info-target-libgm2
-+maybe-install-info-target-libgm2:
-+@if target-libgm2
-+maybe-install-info-target-libgm2: install-info-target-libgm2
-+
-+install-info-target-libgm2: \
-+ configure-target-libgm2 \
-+ info-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing install-info in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ install-info) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-install-pdf-target-libgm2 install-pdf-target-libgm2
-+maybe-install-pdf-target-libgm2:
-+@if target-libgm2
-+maybe-install-pdf-target-libgm2: install-pdf-target-libgm2
-+
-+install-pdf-target-libgm2: \
-+ configure-target-libgm2 \
-+ pdf-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ install-pdf) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-install-html-target-libgm2 install-html-target-libgm2
-+maybe-install-html-target-libgm2:
-+@if target-libgm2
-+maybe-install-html-target-libgm2: install-html-target-libgm2
-+
-+install-html-target-libgm2: \
-+ configure-target-libgm2 \
-+ html-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing install-html in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ install-html) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-installcheck-target-libgm2 installcheck-target-libgm2
-+maybe-installcheck-target-libgm2:
-+@if target-libgm2
-+maybe-installcheck-target-libgm2: installcheck-target-libgm2
-+
-+installcheck-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing installcheck in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ installcheck) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-mostlyclean-target-libgm2 mostlyclean-target-libgm2
-+maybe-mostlyclean-target-libgm2:
-+@if target-libgm2
-+maybe-mostlyclean-target-libgm2: mostlyclean-target-libgm2
-+
-+mostlyclean-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ mostlyclean) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-clean-target-libgm2 clean-target-libgm2
-+maybe-clean-target-libgm2:
-+@if target-libgm2
-+maybe-clean-target-libgm2: clean-target-libgm2
-+
-+clean-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing clean in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ clean) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-distclean-target-libgm2 distclean-target-libgm2
-+maybe-distclean-target-libgm2:
-+@if target-libgm2
-+maybe-distclean-target-libgm2: distclean-target-libgm2
-+
-+distclean-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing distclean in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ distclean) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-maintainer-clean-target-libgm2 maintainer-clean-target-libgm2
-+maybe-maintainer-clean-target-libgm2:
-+@if target-libgm2
-+maybe-maintainer-clean-target-libgm2: maintainer-clean-target-libgm2
-+
-+maintainer-clean-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ maintainer-clean) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+
-+
-+
-+
- .PHONY: configure-target-libgomp maybe-configure-target-libgomp
- maybe-configure-target-libgomp:
- @if gcc-bootstrap
-@@ -40721,6 +41208,14 @@
- (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-go);
- check-go: check-gcc-go check-target-libgo
-
-+.PHONY: check-gcc-gm2 check-gm2
-+check-gcc-gm2:
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(HOST_EXPORTS) \
-+ (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-gm2);
-+check-gm2: check-gcc-gm2
-+
-
- # The gcc part of install-no-fixedincludes, which relies on an intimate
- # knowledge of how a number of gcc internal targets (inter)operate. Delegate.
-@@ -42706,6 +43201,7 @@
- configure-target-boehm-gc: stage_last
- configure-target-rda: stage_last
- configure-target-libada: stage_last
-+configure-target-libgm2: stage_last
- configure-stage1-target-libgomp: maybe-all-stage1-gcc
- configure-stage2-target-libgomp: maybe-all-stage2-gcc
- configure-stage3-target-libgomp: maybe-all-stage3-gcc
-@@ -42734,6 +43230,7 @@
- configure-target-boehm-gc: maybe-all-gcc
- configure-target-rda: maybe-all-gcc
- configure-target-libada: maybe-all-gcc
-+configure-target-libgm2: maybe-all-gcc
- configure-target-libgomp: maybe-all-gcc
- configure-target-libitm: maybe-all-gcc
- @endif gcc-no-bootstrap
-@@ -43509,6 +44006,7 @@
- configure-target-boehm-gc: maybe-all-target-libgcc
- configure-target-rda: maybe-all-target-libgcc
- configure-target-libada: maybe-all-target-libgcc
-+configure-target-libgm2: maybe-all-target-libgcc
- configure-target-libgomp: maybe-all-target-libgcc
- configure-target-libitm: maybe-all-target-libgcc
- @endif gcc-no-bootstrap
-@@ -43548,6 +44046,8 @@
-
- configure-target-libada: maybe-all-target-newlib maybe-all-target-libgloss
-
-+configure-target-libgm2: maybe-all-target-newlib maybe-all-target-libgloss
-+
- configure-target-libgomp: maybe-all-target-newlib maybe-all-target-libgloss
-
- configure-target-libitm: maybe-all-target-newlib maybe-all-target-libgloss
diff --git a/gcc/m2/patches/gcc/4.7.4/04-patches b/gcc/m2/patches/gcc/4.7.4/04-patches
deleted file mode 100644
index db73818bc4e..00000000000
--- a/gcc/m2/patches/gcc/4.7.4/04-patches
+++ /dev/null
@@ -1,26 +0,0 @@
---- gcc-4.7.3-orig/Makefile.def 2013-06-19 15:00:33.000000000 +0100
-+++ gcc-4.7.3/Makefile.def 2014-06-23 15:43:47.000000000 +0100
-@@ -138,6 +138,7 @@
- target_modules = { module= boehm-gc; };
- target_modules = { module= rda; };
- target_modules = { module= libada; };
-+target_modules = { module= libgm2; lib_path=.libs; };
- target_modules = { module= libgomp; bootstrap= true; lib_path=.libs; };
- target_modules = { module= libitm; lib_path=.libs; };
-
-@@ -252,6 +253,7 @@
- flags_to_pass = { flag= GFORTRAN_FOR_TARGET ; };
- flags_to_pass = { flag= GOC_FOR_TARGET ; };
- flags_to_pass = { flag= GOCFLAGS_FOR_TARGET ; };
-+flags_to_pass = { flag= GM2_FOR_TARGET ; };
- flags_to_pass = { flag= LD_FOR_TARGET ; };
- flags_to_pass = { flag= LIPO_FOR_TARGET ; };
- flags_to_pass = { flag= LDFLAGS_FOR_TARGET ; };
-@@ -530,6 +532,7 @@
- languages = { language=obj-c++; gcc-check-target=check-obj-c++; };
- languages = { language=go; gcc-check-target=check-go;
- lib-check-target=check-target-libgo; };
-+languages = { language=gm2; gcc-check-target=check-gm2; };
-
- // Toplevel bootstrap
- bootstrap_stage = { id=1 ; };
diff --git a/gcc/m2/patches/gcc/4.7.4/05-patches b/gcc/m2/patches/gcc/4.7.4/05-patches
deleted file mode 100644
index 3cd6da1acdd..00000000000
--- a/gcc/m2/patches/gcc/4.7.4/05-patches
+++ /dev/null
@@ -1,58 +0,0 @@
---- gcc-4.7.3-orig/Makefile.tpl 2013-06-19 15:00:34.000000000 +0100
-+++ gcc-4.7.3/Makefile.tpl 2014-05-12 14:54:48.000000000 +0100
-@@ -160,6 +160,7 @@
- GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \
- GOC="$(GOC_FOR_BUILD)"; export GOC; \
- GOCFLAGS="$(GOCFLAGS_FOR_BUILD)"; export GOCFLAGS; \
-+ GM2="$(GM2_FOR_BUILD)"; export GM2; \
- DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
- LD="$(LD_FOR_BUILD)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
-@@ -197,6 +198,7 @@
- GCJ="$(GCJ)"; export GCJ; \
- GFORTRAN="$(GFORTRAN)"; export GFORTRAN; \
- GOC="$(GOC)"; export GOC; \
-+ GM2="$(GM2)"; export GM2; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
-@@ -283,6 +285,7 @@
- GCJ="$(GCJ_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GCJ; \
- GFORTRAN="$(GFORTRAN_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GFORTRAN; \
- GOC="$(GOC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GOC; \
-+ GM2="$(GM2_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GM2; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
-@@ -353,6 +356,7 @@
- GCJ_FOR_BUILD = @GCJ_FOR_BUILD@
- GFORTRAN_FOR_BUILD = @GFORTRAN_FOR_BUILD@
- GOC_FOR_BUILD = @GOC_FOR_BUILD@
-+GM2_FOR_BUILD = @GM2_FOR_BUILD@
- LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
- LD_FOR_BUILD = @LD_FOR_BUILD@
- NM_FOR_BUILD = @NM_FOR_BUILD@
-@@ -490,6 +494,7 @@
- GCJ_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCJ_FOR_TARGET@
- GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@
- GOC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GOC_FOR_TARGET@
-+GM2_FOR_TARGET=$(STAGE_CC_WRAPPER) @GM2_FOR_TARGET@
- DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
- LD_FOR_TARGET=@LD_FOR_TARGET@
-
-@@ -612,6 +617,7 @@
- 'GCJ=$(GCJ)' \
- 'GFORTRAN=$(GFORTRAN)' \
- 'GOC=$(GOC)' \
-+ 'GM2=$(GM2)' \
- 'LD=$(LD)' \
- 'LIPO=$(LIPO)' \
- 'NM=$(NM)' \
-@@ -651,6 +657,7 @@
- 'GFORTRAN=$$(GFORTRAN_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
- 'GOC=$$(GOC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
- 'GOCFLAGS=$$(GOCFLAGS_FOR_TARGET)' \
-+ 'GM2=$$(GM2_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
- 'LD=$(COMPILER_LD_FOR_TARGET)' \
- 'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \
- 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
diff --git a/gcc/m2/patches/gcc/4.7.4/06-patches b/gcc/m2/patches/gcc/4.7.4/06-patches
deleted file mode 100644
index 6b4bbd7a2f7..00000000000
--- a/gcc/m2/patches/gcc/4.7.4/06-patches
+++ /dev/null
@@ -1,218 +0,0 @@
---- gcc-4.7.3-orig/gcc/gcc.c 2013-06-19 15:00:24.000000000 +0100
-+++ gcc-4.7.3/gcc/gcc.c 2013-11-20 13:14:53.000000000 +0000
-@@ -167,6 +167,10 @@
- static const char *cross_compile = "0";
- #endif
-
-+/* The lang specs might wish to override the default linker.
-+ */
-+int allow_linker = 1;
-+
- /* Greatest exit code of sub-processes that has been encountered up to
- now. */
- static int greatest_status = 1;
-@@ -268,6 +272,7 @@
- static const char *compare_debug_auxbase_opt_spec_function (int, const char **);
- static const char *pass_through_libs_spec_func (int, const char **);
- static char *convert_white_space (char *);
-+static void handle_OPT_B (const char *arg);
- \f
- /* The Specs Language
-
-@@ -665,6 +670,7 @@
- /* We pass any -flto flags on to the linker, which is expected
- to understand them. In practice, this means it had better be collect2. */
- /* %{e*} includes -export-dynamic; see comment in common.opt. */
-+
- #ifndef LINK_COMMAND_SPEC
- #define LINK_COMMAND_SPEC "\
- %{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
-@@ -1272,6 +1278,10 @@
- { 0, 0 }
- };
-
-+/* front end registered spec functions */
-+static struct spec_function *lang_spec_functions = NULL;
-+static unsigned int lang_spec_functions_length = 0;
-+
- static int processing_spec_function;
- \f
- /* Add appropriate libgcc specs to OBSTACK, taking into account
-@@ -3131,6 +3141,68 @@
- n_switches++;
- }
-
-+/* Save an option OPT with N_ARGS arguments in array ARGS, marking it
-+ as validated if VALIDATED. */
-+
-+void
-+fe_save_switch (const char *opt, size_t n_args, const char *const *args,
-+ bool validated)
-+{
-+ save_switch (opt, n_args, args, validated);
-+}
-+
-+void fe_B_prefix (const char *arg)
-+{
-+ handle_OPT_B (arg);
-+}
-+
-+void
-+fe_add_linker_option (const char *option)
-+{
-+ add_linker_option (option, strlen (option));
-+}
-+
-+/* Handle the -B option by adding the prefix to exec, startfile and
-+ include search paths. */
-+
-+static
-+void handle_OPT_B (const char *arg)
-+{
-+ size_t len = strlen (arg);
-+
-+ /* Catch the case where the user has forgotten to append a
-+ directory separator to the path. Note, they may be using
-+ -B to add an executable name prefix, eg "i386-elf-", in
-+ order to distinguish between multiple installations of
-+ GCC in the same directory. Hence we must check to see
-+ if appending a directory separator actually makes a
-+ valid directory name. */
-+ if (!IS_DIR_SEPARATOR (arg[len - 1])
-+ && is_directory (arg, false))
-+ {
-+ char *tmp = XNEWVEC (char, len + 2);
-+ strcpy (tmp, arg);
-+ tmp[len] = DIR_SEPARATOR;
-+ tmp[++len] = 0;
-+ arg = tmp;
-+ }
-+
-+ add_prefix (&exec_prefixes, arg, NULL,
-+ PREFIX_PRIORITY_B_OPT, 0, 0);
-+ add_prefix (&startfile_prefixes, arg, NULL,
-+ PREFIX_PRIORITY_B_OPT, 0, 0);
-+ add_prefix (&include_prefixes, arg, NULL,
-+ PREFIX_PRIORITY_B_OPT, 0, 0);
-+}
-+
-+/* Save the infile */
-+
-+void
-+fe_add_infile (const char *infile, const char *lang)
-+{
-+ add_infile (infile, lang);
-+}
-+
- /* Handle an option DECODED that is unknown to the option-processing
- machinery. */
-
-@@ -3477,33 +3549,7 @@
- break;
-
- case OPT_B:
-- {
-- size_t len = strlen (arg);
--
-- /* Catch the case where the user has forgotten to append a
-- directory separator to the path. Note, they may be using
-- -B to add an executable name prefix, eg "i386-elf-", in
-- order to distinguish between multiple installations of
-- GCC in the same directory. Hence we must check to see
-- if appending a directory separator actually makes a
-- valid directory name. */
-- if (!IS_DIR_SEPARATOR (arg[len - 1])
-- && is_directory (arg, false))
-- {
-- char *tmp = XNEWVEC (char, len + 2);
-- strcpy (tmp, arg);
-- tmp[len] = DIR_SEPARATOR;
-- tmp[++len] = 0;
-- arg = tmp;
-- }
--
-- add_prefix (&exec_prefixes, arg, NULL,
-- PREFIX_PRIORITY_B_OPT, 0, 0);
-- add_prefix (&startfile_prefixes, arg, NULL,
-- PREFIX_PRIORITY_B_OPT, 0, 0);
-- add_prefix (&include_prefixes, arg, NULL,
-- PREFIX_PRIORITY_B_OPT, 0, 0);
-- }
-+ handle_OPT_B (arg);
- validated = true;
- break;
-
-@@ -5312,6 +5358,33 @@
- return 0;
- }
-
-+/* Allow the front end to register a spec function. */
-+
-+void fe_add_spec_function (const char *name, const char *(*func) (int, const char **))
-+{
-+ const struct spec_function *f = lookup_spec_function (name);
-+ struct spec_function *fl;
-+ unsigned int i;
-+
-+ if (f != NULL)
-+ fatal_error ("spec function (%s) already registered", name);
-+
-+ if (lang_spec_functions == NULL)
-+ lang_spec_functions_length = 1;
-+
-+ lang_spec_functions_length++;
-+ fl = (struct spec_function *) xmalloc (sizeof (const struct spec_function)*lang_spec_functions_length);
-+ for (i=0; i<lang_spec_functions_length-2; i++)
-+ fl[i] = lang_spec_functions[i];
-+ free (lang_spec_functions);
-+ lang_spec_functions = fl;
-+
-+ lang_spec_functions[lang_spec_functions_length-2].name = name;
-+ lang_spec_functions[lang_spec_functions_length-2].func = func;
-+ lang_spec_functions[lang_spec_functions_length-1].name = NULL;
-+ lang_spec_functions[lang_spec_functions_length-1].func = NULL;
-+}
-+
- /* Look up a spec function. */
-
- static const struct spec_function *
-@@ -5323,6 +5396,11 @@
- if (strcmp (sf->name, name) == 0)
- return sf;
-
-+ if (lang_spec_functions != NULL)
-+ for (sf = lang_spec_functions; sf->name != NULL; sf++)
-+ if (strcmp (sf->name, name) == 0)
-+ return sf;
-+
- return NULL;
- }
-
-@@ -6285,6 +6363,8 @@
- spec_version, dir_separator_str, NULL);
- just_machine_suffix = concat (spec_machine, dir_separator_str, NULL);
-
-+ lang_register_spec_functions ();
-+
- specs_file = find_a_file (&startfile_prefixes, "specs", R_OK, true);
- /* Read the specs file unless it is a default one. */
- if (specs_file != 0 && strcmp (specs_file, "specs"))
-@@ -6885,7 +6965,8 @@
-
- /* Run ld to link all the compiler output files. */
-
-- if (num_linker_inputs > 0 && !seen_error () && print_subprocess_help < 2)
-+ if (num_linker_inputs > 0 && !seen_error () && print_subprocess_help < 2
-+ && allow_linker)
- {
- int tmp = execution_count;
-
-@@ -6951,7 +7032,7 @@
- /* If options said don't run linker,
- complain about input files to be given to the linker. */
-
-- if (! linker_was_run && !seen_error ())
-+ if (! linker_was_run && !seen_error () && allow_linker)
- for (i = 0; (int) i < n_infiles; i++)
- if (explicit_link_files[i]
- && !(infiles[i].language && infiles[i].language[0] == '*'))
diff --git a/gcc/m2/patches/gcc/4.7.4/07-patches b/gcc/m2/patches/gcc/4.7.4/07-patches
deleted file mode 100644
index dda0dd20fd4..00000000000
--- a/gcc/m2/patches/gcc/4.7.4/07-patches
+++ /dev/null
@@ -1,29 +0,0 @@
---- gcc-4.7.3-orig/gcc/gcc.h 2013-06-19 15:00:29.000000000 +0100
-+++ gcc-4.7.3/gcc/gcc.h 2013-12-31 12:03:16.000000000 +0000
-@@ -37,9 +37,17 @@
- extern void record_temp_file (const char *, int, int);
- extern void pfatal_with_name (const char *) ATTRIBUTE_NORETURN;
- extern void set_input (const char *);
-+extern void fe_save_switch (const char *opt, size_t n_args,
-+ const char *const *args, bool validated);
-+extern void fe_B_prefix (const char *arg);
-+extern void fe_add_infile (const char *infile, const char *lang);
-+extern void fe_add_linker_option (const char *option);
-+extern void fe_add_spec_function (const char *name, const char *(*func) (int, const char **));
-
- /* Spec files linked with gcc.c must provide definitions for these. */
-
-+extern void lang_register_spec_functions (void);
-+
- /* Called before processing to change/add/remove arguments. */
- extern void lang_specific_driver (struct cl_decoded_option **,
- unsigned int *, int *);
-@@ -56,4 +64,8 @@
-
- extern const char **outfiles;
-
-+/* Default setting is true, but can be overridden by the language
-+ front end to prohibit the linker from being invoked. */
-+extern int allow_linker;
-+
- #endif /* ! GCC_GCC_H */
diff --git a/gcc/m2/patches/gcc/4.7.4/08-patches b/gcc/m2/patches/gcc/4.7.4/08-patches
deleted file mode 100644
index 5f94635f250..00000000000
--- a/gcc/m2/patches/gcc/4.7.4/08-patches
+++ /dev/null
@@ -1,14 +0,0 @@
---- gcc-4.7.3-orig/gcc/Makefile.in 2013-06-19 14:58:49.000000000 +0100
-+++ gcc-4.7.3/gcc/Makefile.in 2013-11-06 14:36:18.000000000 +0000
-@@ -1815,9 +1815,9 @@
-
- cc1-checksum.o : cc1-checksum.c $(CONFIG_H) $(SYSTEM_H)
-
--cc1$(exeext): $(C_OBJS) cc1-checksum.o $(BACKEND) $(LIBDEPS)
-+cc1$(exeext): $(C_OBJS) cc1-checksum.o $(BACKEND) $(LIBDEPS) c-family/m2pp.o
- +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) \
-- cc1-checksum.o $(BACKEND) $(LIBS) $(BACKENDLIBS)
-+ cc1-checksum.o $(BACKEND) $(LIBS) $(BACKENDLIBS) c-family/m2pp.o
-
- #\f
- # Build libgcc.a.
diff --git a/gcc/m2/patches/gcc/4.7.4/09-patches b/gcc/m2/patches/gcc/4.7.4/09-patches
deleted file mode 100644
index 6014f77ee25..00000000000
--- a/gcc/m2/patches/gcc/4.7.4/09-patches
+++ /dev/null
@@ -1,13 +0,0 @@
---- gcc-4.7.3-orig/gcc/gccspec.c 2013-06-19 14:58:50.000000000 +0100
-+++ gcc-4.7.3/gcc/gccspec.c 2013-11-06 14:36:18.000000000 +0000
-@@ -106,3 +106,10 @@
-
- /* Number of extra output files that lang_specific_pre_link may generate. */
- int lang_specific_extra_outfiles = 0; /* Not used for C. */
-+
-+
-+/* lang_register_spec_functions. Not used for C. */
-+void
-+lang_register_spec_functions (void)
-+{
-+}
diff --git a/gcc/m2/patches/gcc/4.7.4/10-patches b/gcc/m2/patches/gcc/4.7.4/10-patches
deleted file mode 100644
index 4134f76c241..00000000000
--- a/gcc/m2/patches/gcc/4.7.4/10-patches
+++ /dev/null
@@ -1,12 +0,0 @@
---- gcc-4.7.3-orig/gcc/cppspec.c 2013-06-19 14:58:49.000000000 +0100
-+++ gcc-4.7.3/gcc/cppspec.c 2013-11-06 14:36:18.000000000 +0000
-@@ -196,3 +196,9 @@
-
- /* Number of extra output files that lang_specific_pre_link may generate. */
- int lang_specific_extra_outfiles = 0; /* Not used for cpp. */
-+
-+/* lang_register_spec_functions. Not used for cpp. */
-+void
-+lang_register_spec_functions (void)
-+{
-+}
diff --git a/gcc/m2/patches/gcc/4.7.4/11-patches b/gcc/m2/patches/gcc/4.7.4/11-patches
deleted file mode 100644
index fa1b67e3285..00000000000
--- a/gcc/m2/patches/gcc/4.7.4/11-patches
+++ /dev/null
@@ -1,12 +0,0 @@
---- gcc-4.7.3-orig/gcc/cp/g++spec.c 2013-06-19 15:00:32.000000000 +0100
-+++ gcc-4.7.3/gcc/cp/g++spec.c 2013-11-06 14:36:18.000000000 +0000
-@@ -372,3 +372,9 @@
-
- /* Number of extra output files that lang_specific_pre_link may generate. */
- int lang_specific_extra_outfiles = 0; /* Not used for C++. */
-+
-+/* lang_register_spec_functions. Not used for cpp. */
-+void
-+lang_register_spec_functions (void)
-+{
-+}
diff --git a/gcc/m2/patches/gcc/4.7.4/12-patches b/gcc/m2/patches/gcc/4.7.4/12-patches
deleted file mode 100644
index 8e2b831856c..00000000000
--- a/gcc/m2/patches/gcc/4.7.4/12-patches
+++ /dev/null
@@ -1,11 +0,0 @@
---- gcc-4.7.3-orig/gcc/tree-ssa-loop-im.c 2013-06-19 14:58:47.000000000 +0100
-+++ gcc-4.7.3/gcc/tree-ssa-loop-im.c 2014-07-12 07:13:15.000000000 +0100
-@@ -687,7 +687,7 @@
- hash = iterative_hash_expr (*mem, 0);
- ref = (mem_ref_p) htab_find_with_hash (memory_accesses.refs, *mem, hash);
-
-- gcc_assert (ref != NULL);
-+ // gcc_assert (ref != NULL);
- return ref;
- }
-
diff --git a/gcc/m2/patches/gcc/5.2.0/01-patches b/gcc/m2/patches/gcc/5.2.0/01-patches
deleted file mode 100644
index 3439b81a54c..00000000000
--- a/gcc/m2/patches/gcc/5.2.0/01-patches
+++ /dev/null
@@ -1,319 +0,0 @@
---- gcc-5.2.0-orig/configure 2015-05-03 18:29:57.000000000 +0100
-+++ gcc-5.2.0/configure 2016-04-11 13:16:18.655000792 +0100
-@@ -581,6 +581,7 @@
- DLLTOOL_FOR_TARGET
- AS_FOR_TARGET
- AR_FOR_TARGET
-+GM2_FOR_TARGET
- GOC_FOR_TARGET
- GFORTRAN_FOR_TARGET
- GCJ_FOR_TARGET
-@@ -614,6 +615,7 @@
- NM_FOR_BUILD
- LD_FOR_BUILD
- LDFLAGS_FOR_BUILD
-+GM2_FOR_BUILD
- GOC_FOR_BUILD
- GFORTRAN_FOR_BUILD
- GCJ_FOR_BUILD
-@@ -754,6 +756,7 @@
- enable_libquadmath
- enable_libquadmath_support
- enable_libada
-+enable_libgm2
- enable_libssp
- enable_libstdcxx
- enable_liboffloadmic
-@@ -828,6 +831,7 @@
- GCJ_FOR_TARGET
- GFORTRAN_FOR_TARGET
- GOC_FOR_TARGET
-+GM2_FOR_TARGET
- AR_FOR_TARGET
- AS_FOR_TARGET
- DLLTOOL_FOR_TARGET
-@@ -1479,6 +1483,7 @@
- --disable-libquadmath-support
- disable libquadmath support for Fortran
- --enable-libada build libada directory
-+ --enable-libgm2 build libgm2 directory
- --enable-libssp build libssp directory
- --disable-libstdcxx do not build libstdc++-v3 directory
- --enable-liboffloadmic=ARG
-@@ -1601,6 +1606,8 @@
- GFORTRAN for the target
- GOC_FOR_TARGET
- GOC for the target
-+ GM2_FOR_TARGET
-+ GM2 for the target
- AR_FOR_TARGET
- AR for the target
- AS_FOR_TARGET
-@@ -2759,6 +2766,7 @@
- ${libgcj} \
- target-libobjc \
- target-libada \
-+ target-libgm2 \
- target-libgo"
-
- # these tools are built using the target libraries, and are intended to
-@@ -3065,6 +3073,15 @@
- noconfigdirs="$noconfigdirs gnattools"
- fi
-
-+# Check whether --enable-libgm2 was given.
-+if test "${enable_libgm2+set}" = set; then :
-+ enableval=$enable_libgm2; ENABLE_LIBGM2=$enableval
-+else
-+ ENABLE_LIBGM2=yes
-+fi
-+
-+
-+
- # Check whether --enable-libssp was given.
- if test "${enable_libssp+set}" = set; then :
- enableval=$enable_libssp; ENABLE_LIBSSP=$enableval
-@@ -4001,6 +4018,7 @@
- GCJ_FOR_BUILD=${GCJ_FOR_BUILD-gcj}
- GFORTRAN_FOR_BUILD=${GFORTRAN_FOR_BUILD-gfortran}
- GOC_FOR_BUILD=${GOC_FOR_BUILD-gccgo}
-+ GM2_FOR_BUILD=${GM2_FOR_BUILD-gm2}
- DLLTOOL_FOR_BUILD=${DLLTOOL_FOR_BUILD-dlltool}
- LD_FOR_BUILD=${LD_FOR_BUILD-ld}
- NM_FOR_BUILD=${NM_FOR_BUILD-nm}
-@@ -4015,6 +4033,7 @@
- GCJ_FOR_BUILD="\$(GCJ)"
- GFORTRAN_FOR_BUILD="\$(GFORTRAN)"
- GOC_FOR_BUILD="\$(GOC)"
-+ GM2_FOR_BUILD="\$(GM2)"
- DLLTOOL_FOR_BUILD="\$(DLLTOOL)"
- LD_FOR_BUILD="\$(LD)"
- NM_FOR_BUILD="\$(NM)"
-@@ -7624,6 +7643,7 @@
-
-
-
-+
- # Generate default definitions for YACC, M4, LEX and other programs that run
- # on the build machine. These are used if the Makefile can't locate these
- # programs in objdir.
-@@ -10839,6 +10859,167 @@
-
-
-
-+if test -n "$GM2_FOR_TARGET"; then
-+ ac_cv_prog_GM2_FOR_TARGET=$GM2_FOR_TARGET
-+elif test -n "$ac_cv_prog_GM2_FOR_TARGET"; then
-+ GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
-+fi
-+
-+if test -n "$ac_cv_prog_GM2_FOR_TARGET"; then
-+ for ncn_progname in gm2; do
-+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
-+set dummy ${ncn_progname}; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_GM2_FOR_TARGET+set}" = set; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ if test -n "$GM2_FOR_TARGET"; then
-+ ac_cv_prog_GM2_FOR_TARGET="$GM2_FOR_TARGET" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+ ac_cv_prog_GM2_FOR_TARGET="${ncn_progname}"
-+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+ break 2
-+ fi
-+done
-+ done
-+IFS=$as_save_IFS
-+
-+fi
-+fi
-+GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
-+if test -n "$GM2_FOR_TARGET"; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GM2_FOR_TARGET" >&5
-+$as_echo "$GM2_FOR_TARGET" >&6; }
-+else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
-+
-+
-+ done
-+fi
-+
-+if test -z "$ac_cv_prog_GM2_FOR_TARGET" && test -n "$with_build_time_tools"; then
-+ for ncn_progname in gm2; do
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
-+$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
-+ if test -x $with_build_time_tools/${ncn_progname}; then
-+ ac_cv_prog_GM2_FOR_TARGET=$with_build_time_tools/${ncn_progname}
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
-+ break
-+ else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+ fi
-+ done
-+fi
-+
-+if test -z "$ac_cv_prog_GM2_FOR_TARGET"; then
-+ for ncn_progname in gm2; do
-+ if test -n "$ncn_target_tool_prefix"; then
-+ # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
-+set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_GM2_FOR_TARGET+set}" = set; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ if test -n "$GM2_FOR_TARGET"; then
-+ ac_cv_prog_GM2_FOR_TARGET="$GM2_FOR_TARGET" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+ ac_cv_prog_GM2_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
-+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+ break 2
-+ fi
-+done
-+ done
-+IFS=$as_save_IFS
-+
-+fi
-+fi
-+GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
-+if test -n "$GM2_FOR_TARGET"; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GM2_FOR_TARGET" >&5
-+$as_echo "$GM2_FOR_TARGET" >&6; }
-+else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
-+
-+
-+ fi
-+ if test -z "$ac_cv_prog_GM2_FOR_TARGET" && test $build = $target ; then
-+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
-+set dummy ${ncn_progname}; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_GM2_FOR_TARGET+set}" = set; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ if test -n "$GM2_FOR_TARGET"; then
-+ ac_cv_prog_GM2_FOR_TARGET="$GM2_FOR_TARGET" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+ ac_cv_prog_GM2_FOR_TARGET="${ncn_progname}"
-+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+ break 2
-+ fi
-+done
-+ done
-+IFS=$as_save_IFS
-+
-+fi
-+fi
-+GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
-+if test -n "$GM2_FOR_TARGET"; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GM2_FOR_TARGET" >&5
-+$as_echo "$GM2_FOR_TARGET" >&6; }
-+else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
-+
-+
-+ fi
-+ test -n "$ac_cv_prog_GM2_FOR_TARGET" && break
-+ done
-+fi
-+
-+if test -z "$ac_cv_prog_GM2_FOR_TARGET" ; then
-+ set dummy gm2
-+ if test $build = $target ; then
-+ GM2_FOR_TARGET="$2"
-+ else
-+ GM2_FOR_TARGET="${ncn_target_tool_prefix}$2"
-+ fi
-+else
-+ GM2_FOR_TARGET="$ac_cv_prog_GM2_FOR_TARGET"
-+fi
-+
-+
-+
- cat > conftest.c << \EOF
- #ifdef __GNUC__
- gcc_yay;
-@@ -14055,6 +14236,51 @@
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
- $as_echo "host tool" >&6; }
- else
-+ # We need a cross tool
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
-+$as_echo "pre-installed" >&6; }
-+ fi
-+fi
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target gm2" >&5
-+$as_echo_n "checking where to find the target gm2... " >&6; }
-+if test "x${build}" != "x${host}" ; then
-+ if expr "x$GM2_FOR_TARGET" : "x/" > /dev/null; then
-+ # We already found the complete path
-+ ac_dir=`dirname $GM2_FOR_TARGET`
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
-+$as_echo "pre-installed in $ac_dir" >&6; }
-+ else
-+ # Canadian cross, just use what we found
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
-+$as_echo "pre-installed" >&6; }
-+ fi
-+else
-+ ok=yes
-+ case " ${configdirs} " in
-+ *" gcc "*) ;;
-+ *) ok=no ;;
-+ esac
-+ case ,${enable_languages}, in
-+ *,gm2,*) ;;
-+ *) ok=no ;;
-+ esac
-+ if test $ok = yes; then
-+ # An in-tree tool is available and we can use it
-+ GM2_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgm2 -B$$r/$(HOST_SUBDIR)/gcc/'
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
-+$as_echo "just compiled" >&6; }
-+ elif expr "x$GM2_FOR_TARGET" : "x/" > /dev/null; then
-+ # We already found the complete path
-+ ac_dir=`dirname $GM2_FOR_TARGET`
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
-+$as_echo "pre-installed in $ac_dir" >&6; }
-+ elif test "x$target" = "x$host"; then
-+ # We can use an host tool
-+ GM2_FOR_TARGET='$(GM2)'
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
-+$as_echo "host tool" >&6; }
-+ else
- # We need a cross tool
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
- $as_echo "pre-installed" >&6; }
diff --git a/gcc/m2/patches/gcc/5.2.0/02-patches b/gcc/m2/patches/gcc/5.2.0/02-patches
deleted file mode 100644
index 8f824253100..00000000000
--- a/gcc/m2/patches/gcc/5.2.0/02-patches
+++ /dev/null
@@ -1,64 +0,0 @@
---- gcc-5.2.0-orig/configure.ac 2015-05-03 18:29:57.000000000 +0100
-+++ gcc-5.2.0/configure.ac 2016-04-11 13:16:18.659000792 +0100
-@@ -170,6 +170,7 @@
- ${libgcj} \
- target-libobjc \
- target-libada \
-+ target-libgm2 \
- target-libgo"
-
- # these tools are built using the target libraries, and are intended to
-@@ -442,6 +443,12 @@
- noconfigdirs="$noconfigdirs gnattools"
- fi
-
-+AC_ARG_ENABLE(libgm2,
-+[AS_HELP_STRING([--enable-libgm2], [build libgm2 directory])],
-+ENABLE_LIBGM2=$enableval,
-+ENABLE_LIBGM2=yes)
-+
-+
- AC_ARG_ENABLE(libssp,
- [AS_HELP_STRING([--enable-libssp], [build libssp directory])],
- ENABLE_LIBSSP=$enableval,
-@@ -1329,6 +1336,7 @@
- GCJ_FOR_BUILD=${GCJ_FOR_BUILD-gcj}
- GFORTRAN_FOR_BUILD=${GFORTRAN_FOR_BUILD-gfortran}
- GOC_FOR_BUILD=${GOC_FOR_BUILD-gccgo}
-+ GM2_FOR_BUILD=${GM2_FOR_BUILD-gm2}
- DLLTOOL_FOR_BUILD=${DLLTOOL_FOR_BUILD-dlltool}
- LD_FOR_BUILD=${LD_FOR_BUILD-ld}
- NM_FOR_BUILD=${NM_FOR_BUILD-nm}
-@@ -1343,6 +1351,7 @@
- GCJ_FOR_BUILD="\$(GCJ)"
- GFORTRAN_FOR_BUILD="\$(GFORTRAN)"
- GOC_FOR_BUILD="\$(GOC)"
-+ GM2_FOR_BUILD="\$(GM2)"
- DLLTOOL_FOR_BUILD="\$(DLLTOOL)"
- LD_FOR_BUILD="\$(LD)"
- NM_FOR_BUILD="\$(NM)"
-@@ -3257,6 +3266,7 @@
- AC_SUBST(GCJ_FOR_BUILD)
- AC_SUBST(GFORTRAN_FOR_BUILD)
- AC_SUBST(GOC_FOR_BUILD)
-+AC_SUBST(GM2_FOR_BUILD)
- AC_SUBST(LDFLAGS_FOR_BUILD)
- AC_SUBST(LD_FOR_BUILD)
- AC_SUBST(NM_FOR_BUILD)
-@@ -3367,6 +3377,7 @@
- NCN_STRICT_CHECK_TARGET_TOOLS(GCJ_FOR_TARGET, gcj)
- NCN_STRICT_CHECK_TARGET_TOOLS(GFORTRAN_FOR_TARGET, gfortran)
- NCN_STRICT_CHECK_TARGET_TOOLS(GOC_FOR_TARGET, gccgo)
-+NCN_STRICT_CHECK_TARGET_TOOLS(GM2_FOR_TARGET, gm2)
-
- ACX_CHECK_INSTALLED_TARGET_TOOL(AR_FOR_TARGET, ar)
- ACX_CHECK_INSTALLED_TARGET_TOOL(AS_FOR_TARGET, as)
-@@ -3402,6 +3413,8 @@
- [gcc/gfortran -B$$r/$(HOST_SUBDIR)/gcc/], fortran)
- GCC_TARGET_TOOL(gccgo, GOC_FOR_TARGET, GOC,
- [gcc/gccgo -B$$r/$(HOST_SUBDIR)/gcc/], go)
-+GCC_TARGET_TOOL(gm2, GM2_FOR_TARGET, GM2,
-+ [gcc/xgm2 -B$$r/$(HOST_SUBDIR)/gcc/], gm2)
- GCC_TARGET_TOOL(ld, LD_FOR_TARGET, LD, [ld/ld-new])
- GCC_TARGET_TOOL(lipo, LIPO_FOR_TARGET, LIPO)
- GCC_TARGET_TOOL(nm, NM_FOR_TARGET, NM, [binutils/nm-new])
diff --git a/gcc/m2/patches/gcc/5.2.0/03-patches b/gcc/m2/patches/gcc/5.2.0/03-patches
deleted file mode 100644
index e83ef5449b2..00000000000
--- a/gcc/m2/patches/gcc/5.2.0/03-patches
+++ /dev/null
@@ -1,12 +0,0 @@
---- gcc-5.2.0-orig/gcc/c/gccspec.c 2015-01-05 12:33:28.000000000 +0000
-+++ gcc-5.2.0/gcc/c/gccspec.c 2016-04-11 13:16:18.659000792 +0100
-@@ -106,3 +106,9 @@
-
- /* Number of extra output files that lang_specific_pre_link may generate. */
- int lang_specific_extra_outfiles = 0; /* Not used for C. */
-+
-+/* lang_register_spec_functions. Not used for C. */
-+void
-+lang_register_spec_functions (void)
-+{
-+}
diff --git a/gcc/m2/patches/gcc/5.2.0/04-patches b/gcc/m2/patches/gcc/5.2.0/04-patches
deleted file mode 100644
index ce559d91ebd..00000000000
--- a/gcc/m2/patches/gcc/5.2.0/04-patches
+++ /dev/null
@@ -1,12 +0,0 @@
---- gcc-5.2.0-orig/gcc/c-family/cppspec.c 2015-01-30 16:15:00.000000000 +0000
-+++ gcc-5.2.0/gcc/c-family/cppspec.c 2016-04-11 13:16:18.659000792 +0100
-@@ -197,3 +197,9 @@
-
- /* Number of extra output files that lang_specific_pre_link may generate. */
- int lang_specific_extra_outfiles = 0; /* Not used for cpp. */
-+
-+/* lang_register_spec_functions. Not used for cpp. */
-+void
-+lang_register_spec_functions (void)
-+{
-+}
diff --git a/gcc/m2/patches/gcc/5.2.0/05-patches b/gcc/m2/patches/gcc/5.2.0/05-patches
deleted file mode 100644
index 8d94b260cef..00000000000
--- a/gcc/m2/patches/gcc/5.2.0/05-patches
+++ /dev/null
@@ -1,12 +0,0 @@
---- gcc-5.2.0-orig/gcc/cp/g++spec.c 2015-01-05 12:33:28.000000000 +0000
-+++ gcc-5.2.0/gcc/cp/g++spec.c 2016-04-11 13:16:18.663000792 +0100
-@@ -403,3 +403,9 @@
-
- /* Number of extra output files that lang_specific_pre_link may generate. */
- int lang_specific_extra_outfiles = 0; /* Not used for C++. */
-+
-+/* lang_register_spec_functions. Not used for C++. */
-+void
-+lang_register_spec_functions (void)
-+{
-+}
diff --git a/gcc/m2/patches/gcc/5.2.0/06-patches b/gcc/m2/patches/gcc/5.2.0/06-patches
deleted file mode 100644
index f5d3cafe23b..00000000000
--- a/gcc/m2/patches/gcc/5.2.0/06-patches
+++ /dev/null
@@ -1,218 +0,0 @@
---- gcc-5.2.0-orig/gcc/gcc.c 2015-03-10 09:37:41.000000000 +0000
-+++ gcc-5.2.0/gcc/gcc.c 2016-04-11 13:16:18.663000792 +0100
-@@ -172,6 +172,10 @@
- static const char *cross_compile = "0";
- #endif
-
-+/* The lang specs might wish to override the default linker.
-+ */
-+int allow_linker = 1;
-+
- /* Greatest exit code of sub-processes that has been encountered up to
- now. */
- static int greatest_status = 1;
-@@ -276,6 +280,7 @@
- static const char *pass_through_libs_spec_func (int, const char **);
- static const char *replace_extension_spec_func (int, const char **);
- static char *convert_white_space (char *);
-+static void handle_OPT_B (const char *arg);
- \f
- /* The Specs Language
-
-@@ -825,6 +830,7 @@
- /* We pass any -flto flags on to the linker, which is expected
- to understand them. In practice, this means it had better be collect2. */
- /* %{e*} includes -export-dynamic; see comment in common.opt. */
-+
- #ifndef LINK_COMMAND_SPEC
- #define LINK_COMMAND_SPEC "\
- %{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
-@@ -1442,6 +1448,10 @@
- { 0, 0 }
- };
-
-+/* front end registered spec functions */
-+static struct spec_function *lang_spec_functions = NULL;
-+static unsigned int lang_spec_functions_length = 0;
-+
- static int processing_spec_function;
- \f
- /* Add appropriate libgcc specs to OBSTACK, taking into account
-@@ -3328,6 +3338,68 @@
- n_switches++;
- }
-
-+/* Save an option OPT with N_ARGS arguments in array ARGS, marking it
-+ as validated if VALIDATED. */
-+
-+void
-+fe_save_switch (const char *opt, size_t n_args, const char *const *args,
-+ bool validated, bool known)
-+{
-+ save_switch (opt, n_args, args, validated, known);
-+}
-+
-+void fe_B_prefix (const char *arg)
-+{
-+ handle_OPT_B (arg);
-+}
-+
-+void
-+fe_add_linker_option (const char *option)
-+{
-+ add_linker_option (option, strlen (option));
-+}
-+
-+/* Handle the -B option by adding the prefix to exec, startfile and
-+ include search paths. */
-+
-+static
-+void handle_OPT_B (const char *arg)
-+{
-+ size_t len = strlen (arg);
-+
-+ /* Catch the case where the user has forgotten to append a
-+ directory separator to the path. Note, they may be using
-+ -B to add an executable name prefix, eg "i386-elf-", in
-+ order to distinguish between multiple installations of
-+ GCC in the same directory. Hence we must check to see
-+ if appending a directory separator actually makes a
-+ valid directory name. */
-+ if (!IS_DIR_SEPARATOR (arg[len - 1])
-+ && is_directory (arg, false))
-+ {
-+ char *tmp = XNEWVEC (char, len + 2);
-+ strcpy (tmp, arg);
-+ tmp[len] = DIR_SEPARATOR;
-+ tmp[++len] = 0;
-+ arg = tmp;
-+ }
-+
-+ add_prefix (&exec_prefixes, arg, NULL,
-+ PREFIX_PRIORITY_B_OPT, 0, 0);
-+ add_prefix (&startfile_prefixes, arg, NULL,
-+ PREFIX_PRIORITY_B_OPT, 0, 0);
-+ add_prefix (&include_prefixes, arg, NULL,
-+ PREFIX_PRIORITY_B_OPT, 0, 0);
-+}
-+
-+/* Save the infile */
-+
-+void
-+fe_add_infile (const char *infile, const char *lang)
-+{
-+ add_infile (infile, lang);
-+}
-+
- /* Handle an option DECODED that is unknown to the option-processing
- machinery. */
-
-@@ -3792,33 +3864,7 @@
- break;
-
- case OPT_B:
-- {
-- size_t len = strlen (arg);
--
-- /* Catch the case where the user has forgotten to append a
-- directory separator to the path. Note, they may be using
-- -B to add an executable name prefix, eg "i386-elf-", in
-- order to distinguish between multiple installations of
-- GCC in the same directory. Hence we must check to see
-- if appending a directory separator actually makes a
-- valid directory name. */
-- if (!IS_DIR_SEPARATOR (arg[len - 1])
-- && is_directory (arg, false))
-- {
-- char *tmp = XNEWVEC (char, len + 2);
-- strcpy (tmp, arg);
-- tmp[len] = DIR_SEPARATOR;
-- tmp[++len] = 0;
-- arg = tmp;
-- }
--
-- add_prefix (&exec_prefixes, arg, NULL,
-- PREFIX_PRIORITY_B_OPT, 0, 0);
-- add_prefix (&startfile_prefixes, arg, NULL,
-- PREFIX_PRIORITY_B_OPT, 0, 0);
-- add_prefix (&include_prefixes, arg, NULL,
-- PREFIX_PRIORITY_B_OPT, 0, 0);
-- }
-+ handle_OPT_B (arg);
- validated = true;
- break;
-
-@@ -5678,6 +5724,33 @@
- return 0;
- }
-
-+/* Allow the front end to register a spec function. */
-+
-+void fe_add_spec_function (const char *name, const char *(*func) (int, const char **))
-+{
-+ const struct spec_function *f = lookup_spec_function (name);
-+ struct spec_function *fl;
-+ unsigned int i;
-+
-+ if (f != NULL)
-+ fatal_error (input_location, "spec function (%s) already registered", name);
-+
-+ if (lang_spec_functions == NULL)
-+ lang_spec_functions_length = 1;
-+
-+ lang_spec_functions_length++;
-+ fl = (struct spec_function *) xmalloc (sizeof (const struct spec_function)*lang_spec_functions_length);
-+ for (i=0; i<lang_spec_functions_length-2; i++)
-+ fl[i] = lang_spec_functions[i];
-+ free (lang_spec_functions);
-+ lang_spec_functions = fl;
-+
-+ lang_spec_functions[lang_spec_functions_length-2].name = name;
-+ lang_spec_functions[lang_spec_functions_length-2].func = func;
-+ lang_spec_functions[lang_spec_functions_length-1].name = NULL;
-+ lang_spec_functions[lang_spec_functions_length-1].func = NULL;
-+}
-+
- /* Look up a spec function. */
-
- static const struct spec_function *
-@@ -5689,6 +5762,11 @@
- if (strcmp (sf->name, name) == 0)
- return sf;
-
-+ if (lang_spec_functions != NULL)
-+ for (sf = lang_spec_functions; sf->name != NULL; sf++)
-+ if (strcmp (sf->name, name) == 0)
-+ return sf;
-+
- return NULL;
- }
-
-@@ -7101,6 +7179,8 @@
- accel_dir_suffix, dir_separator_str, NULL);
- just_machine_suffix = concat (spec_machine, dir_separator_str, NULL);
-
-+ lang_register_spec_functions ();
-+
- specs_file = find_a_file (&startfile_prefixes, "specs", R_OK, true);
- /* Read the specs file unless it is a default one. */
- if (specs_file != 0 && strcmp (specs_file, "specs"))
-@@ -7789,7 +7869,8 @@
-
- /* Run ld to link all the compiler output files. */
-
-- if (num_linker_inputs > 0 && !seen_error () && print_subprocess_help < 2)
-+ if (num_linker_inputs > 0 && !seen_error () && print_subprocess_help < 2
-+ && allow_linker)
- {
- int tmp = execution_count;
-
-@@ -7856,7 +7937,7 @@
- /* If options said don't run linker,
- complain about input files to be given to the linker. */
-
-- if (! linker_was_run && !seen_error ())
-+ if (! linker_was_run && !seen_error () && allow_linker)
- for (i = 0; (int) i < n_infiles; i++)
- if (explicit_link_files[i]
- && !(infiles[i].language && infiles[i].language[0] == '*'))
diff --git a/gcc/m2/patches/gcc/5.2.0/07-patches b/gcc/m2/patches/gcc/5.2.0/07-patches
deleted file mode 100644
index e9049168fa8..00000000000
--- a/gcc/m2/patches/gcc/5.2.0/07-patches
+++ /dev/null
@@ -1,29 +0,0 @@
---- gcc-5.2.0-orig/gcc/gcc.h 2015-02-03 17:19:58.000000000 +0000
-+++ gcc-5.2.0/gcc/gcc.h 2016-04-11 13:16:18.663000792 +0100
-@@ -69,9 +69,17 @@
- extern void record_temp_file (const char *, int, int);
- extern void pfatal_with_name (const char *) ATTRIBUTE_NORETURN;
- extern void set_input (const char *);
-+extern void fe_save_switch (const char *opt, size_t n_args,
-+ const char *const *args, bool validated);
-+extern void fe_B_prefix (const char *arg);
-+extern void fe_add_infile (const char *infile, const char *lang);
-+extern void fe_add_linker_option (const char *option);
-+extern void fe_add_spec_function (const char *name, const char *(*func) (int, const char **));
-
- /* Spec files linked with gcc.c must provide definitions for these. */
-
-+extern void lang_register_spec_functions (void);
-+
- /* Called before processing to change/add/remove arguments. */
- extern void lang_specific_driver (struct cl_decoded_option **,
- unsigned int *, int *);
-@@ -93,4 +101,8 @@
- void *user_data),
- void *user_data);
-
-+/* Default setting is true, but can be overridden by the language
-+ front end to prohibit the linker from being invoked. */
-+extern int allow_linker;
-+
- #endif /* ! GCC_GCC_H */
diff --git a/gcc/m2/patches/gcc/5.2.0/08-patches b/gcc/m2/patches/gcc/5.2.0/08-patches
deleted file mode 100644
index 19738ca7578..00000000000
--- a/gcc/m2/patches/gcc/5.2.0/08-patches
+++ /dev/null
@@ -1,26 +0,0 @@
---- gcc-5.2.0-orig/Makefile.def 2015-03-10 09:37:41.000000000 +0000
-+++ gcc-5.2.0/Makefile.def 2016-04-11 13:16:18.667000792 +0100
-@@ -164,6 +164,7 @@
- target_modules = { module= boehm-gc; };
- target_modules = { module= rda; };
- target_modules = { module= libada; };
-+target_modules = { module= libgm2; lib_path=.libs; };
- target_modules = { module= libgomp; bootstrap= true; lib_path=.libs; };
- target_modules = { module= libitm; lib_path=.libs; };
- target_modules = { module= libatomic; lib_path=.libs; };
-@@ -279,6 +280,7 @@
- flags_to_pass = { flag= GFORTRAN_FOR_TARGET ; };
- flags_to_pass = { flag= GOC_FOR_TARGET ; };
- flags_to_pass = { flag= GOCFLAGS_FOR_TARGET ; };
-+flags_to_pass = { flag= GM2_FOR_TARGET ; };
- flags_to_pass = { flag= LD_FOR_TARGET ; };
- flags_to_pass = { flag= LIPO_FOR_TARGET ; };
- flags_to_pass = { flag= LDFLAGS_FOR_TARGET ; };
-@@ -603,6 +605,7 @@
- languages = { language=obj-c++; gcc-check-target=check-obj-c++; };
- languages = { language=go; gcc-check-target=check-go;
- lib-check-target=check-target-libgo; };
-+languages = { language=gm2; gcc-check-target=check-gm2; };
-
- // Toplevel bootstrap
- bootstrap_stage = { id=1 ; };
diff --git a/gcc/m2/patches/gcc/5.2.0/09-patches b/gcc/m2/patches/gcc/5.2.0/09-patches
deleted file mode 100644
index b6cb44e1917..00000000000
--- a/gcc/m2/patches/gcc/5.2.0/09-patches
+++ /dev/null
@@ -1,743 +0,0 @@
---- gcc-5.2.0-orig/Makefile.in 2015-03-25 12:05:22.000000000 +0000
-+++ gcc-5.2.0/Makefile.in 2016-04-11 13:16:18.675000792 +0100
-@@ -157,6 +157,7 @@
- GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \
- GOC="$(GOC_FOR_BUILD)"; export GOC; \
- GOCFLAGS="$(GOCFLAGS_FOR_BUILD)"; export GOCFLAGS; \
-+ GM2="$(GM2_FOR_BUILD)"; export GM2; \
- DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
- LD="$(LD_FOR_BUILD)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
-@@ -194,6 +195,7 @@
- GCJ="$(GCJ)"; export GCJ; \
- GFORTRAN="$(GFORTRAN)"; export GFORTRAN; \
- GOC="$(GOC)"; export GOC; \
-+ GM2="$(GM2)"; export GM2; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
-@@ -280,6 +282,7 @@
- GCJ="$(GCJ_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GCJ; \
- GFORTRAN="$(GFORTRAN_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GFORTRAN; \
- GOC="$(GOC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GOC; \
-+ GM2="$(GM2_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GM2; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
-@@ -347,6 +350,7 @@
- GCJ_FOR_BUILD = @GCJ_FOR_BUILD@
- GFORTRAN_FOR_BUILD = @GFORTRAN_FOR_BUILD@
- GOC_FOR_BUILD = @GOC_FOR_BUILD@
-+GM2_FOR_BUILD = @GM2_FOR_BUILD@
- LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
- LD_FOR_BUILD = @LD_FOR_BUILD@
- NM_FOR_BUILD = @NM_FOR_BUILD@
-@@ -529,6 +533,7 @@
- GCJ_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCJ_FOR_TARGET@
- GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@
- GOC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GOC_FOR_TARGET@
-+GM2_FOR_TARGET=$(STAGE_CC_WRAPPER) @GM2_FOR_TARGET@
- DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
- LD_FOR_TARGET=@LD_FOR_TARGET@
-
-@@ -577,7 +582,7 @@
-
- # This is the list of directories that may be needed in RPATH_ENVVAR
- # so that programs built for the target machine work.
--TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libsanitizer)$(TARGET_LIB_PATH_libmpx)$(TARGET_LIB_PATH_libvtv)$(TARGET_LIB_PATH_libcilkrts)$(TARGET_LIB_PATH_liboffloadmic)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libgomp)$(TARGET_LIB_PATH_libitm)$(TARGET_LIB_PATH_libatomic)$(HOST_LIB_PATH_gcc)
-+TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libsanitizer)$(TARGET_LIB_PATH_libmpx)$(TARGET_LIB_PATH_libvtv)$(TARGET_LIB_PATH_libcilkrts)$(TARGET_LIB_PATH_liboffloadmic)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libgm2)$(TARGET_LIB_PATH_libgomp)$(TARGET_LIB_PATH_libitm)$(TARGET_LIB_PATH_libatomic)$(HOST_LIB_PATH_gcc)
-
- @if target-libstdc++-v3
- TARGET_LIB_PATH_libstdc++-v3 = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:
-@@ -607,6 +612,10 @@
- TARGET_LIB_PATH_libssp = $$r/$(TARGET_SUBDIR)/libssp/.libs:
- @endif target-libssp
-
-+@if target-libgm2
-+TARGET_LIB_PATH_libgm2 = $$r/$(TARGET_SUBDIR)/libgm2/.libs:
-+@endif target-libgm2
-+
- @if target-libgomp
- TARGET_LIB_PATH_libgomp = $$r/$(TARGET_SUBDIR)/libgomp/.libs:
- @endif target-libgomp
-@@ -751,6 +760,7 @@
- "GFORTRAN_FOR_TARGET=$(GFORTRAN_FOR_TARGET)" \
- "GOC_FOR_TARGET=$(GOC_FOR_TARGET)" \
- "GOCFLAGS_FOR_TARGET=$(GOCFLAGS_FOR_TARGET)" \
-+ "GM2_FOR_TARGET=$(GM2_FOR_TARGET)" \
- "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
- "LIPO_FOR_TARGET=$(LIPO_FOR_TARGET)" \
- "LDFLAGS_FOR_TARGET=$(LDFLAGS_FOR_TARGET)" \
-@@ -804,6 +814,7 @@
- 'GCJ=$(GCJ)' \
- 'GFORTRAN=$(GFORTRAN)' \
- 'GOC=$(GOC)' \
-+ 'GM2=$(GM2)' \
- 'LD=$(LD)' \
- 'LIPO=$(LIPO)' \
- 'NM=$(NM)' \
-@@ -852,6 +863,7 @@
- 'GFORTRAN=$$(GFORTRAN_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
- 'GOC=$$(GOC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
- 'GOCFLAGS=$$(GOCFLAGS_FOR_TARGET)' \
-+ 'GM2=$$(GM2_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
- 'LD=$(COMPILER_LD_FOR_TARGET)' \
- 'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \
- 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
-@@ -963,6 +975,7 @@
- maybe-configure-target-boehm-gc \
- maybe-configure-target-rda \
- maybe-configure-target-libada \
-+ maybe-configure-target-libgm2 \
- maybe-configure-target-libgomp \
- maybe-configure-target-libitm \
- maybe-configure-target-libatomic
-@@ -1128,6 +1141,7 @@
- all-target: maybe-all-target-boehm-gc
- all-target: maybe-all-target-rda
- all-target: maybe-all-target-libada
-+all-target: maybe-all-target-libgm2
- @if target-libgomp-no-bootstrap
- all-target: maybe-all-target-libgomp
- @endif target-libgomp-no-bootstrap
-@@ -1222,6 +1236,7 @@
- info-target: maybe-info-target-boehm-gc
- info-target: maybe-info-target-rda
- info-target: maybe-info-target-libada
-+info-target: maybe-info-target-libgm2
- info-target: maybe-info-target-libgomp
- info-target: maybe-info-target-libitm
- info-target: maybe-info-target-libatomic
-@@ -1309,6 +1324,7 @@
- dvi-target: maybe-dvi-target-boehm-gc
- dvi-target: maybe-dvi-target-rda
- dvi-target: maybe-dvi-target-libada
-+dvi-target: maybe-dvi-target-libgm2
- dvi-target: maybe-dvi-target-libgomp
- dvi-target: maybe-dvi-target-libitm
- dvi-target: maybe-dvi-target-libatomic
-@@ -1396,6 +1412,7 @@
- pdf-target: maybe-pdf-target-boehm-gc
- pdf-target: maybe-pdf-target-rda
- pdf-target: maybe-pdf-target-libada
-+pdf-target: maybe-pdf-target-libgm2
- pdf-target: maybe-pdf-target-libgomp
- pdf-target: maybe-pdf-target-libitm
- pdf-target: maybe-pdf-target-libatomic
-@@ -1483,6 +1500,7 @@
- html-target: maybe-html-target-boehm-gc
- html-target: maybe-html-target-rda
- html-target: maybe-html-target-libada
-+html-target: maybe-html-target-libgm2
- html-target: maybe-html-target-libgomp
- html-target: maybe-html-target-libitm
- html-target: maybe-html-target-libatomic
-@@ -1570,6 +1588,7 @@
- TAGS-target: maybe-TAGS-target-boehm-gc
- TAGS-target: maybe-TAGS-target-rda
- TAGS-target: maybe-TAGS-target-libada
-+TAGS-target: maybe-TAGS-target-libgm2
- TAGS-target: maybe-TAGS-target-libgomp
- TAGS-target: maybe-TAGS-target-libitm
- TAGS-target: maybe-TAGS-target-libatomic
-@@ -1657,6 +1676,7 @@
- install-info-target: maybe-install-info-target-boehm-gc
- install-info-target: maybe-install-info-target-rda
- install-info-target: maybe-install-info-target-libada
-+install-info-target: maybe-install-info-target-libgm2
- install-info-target: maybe-install-info-target-libgomp
- install-info-target: maybe-install-info-target-libitm
- install-info-target: maybe-install-info-target-libatomic
-@@ -1744,6 +1764,7 @@
- install-pdf-target: maybe-install-pdf-target-boehm-gc
- install-pdf-target: maybe-install-pdf-target-rda
- install-pdf-target: maybe-install-pdf-target-libada
-+install-pdf-target: maybe-install-pdf-target-libgm2
- install-pdf-target: maybe-install-pdf-target-libgomp
- install-pdf-target: maybe-install-pdf-target-libitm
- install-pdf-target: maybe-install-pdf-target-libatomic
-@@ -1831,6 +1852,7 @@
- install-html-target: maybe-install-html-target-boehm-gc
- install-html-target: maybe-install-html-target-rda
- install-html-target: maybe-install-html-target-libada
-+install-html-target: maybe-install-html-target-libgm2
- install-html-target: maybe-install-html-target-libgomp
- install-html-target: maybe-install-html-target-libitm
- install-html-target: maybe-install-html-target-libatomic
-@@ -1918,6 +1940,7 @@
- installcheck-target: maybe-installcheck-target-boehm-gc
- installcheck-target: maybe-installcheck-target-rda
- installcheck-target: maybe-installcheck-target-libada
-+installcheck-target: maybe-installcheck-target-libgm2
- installcheck-target: maybe-installcheck-target-libgomp
- installcheck-target: maybe-installcheck-target-libitm
- installcheck-target: maybe-installcheck-target-libatomic
-@@ -2005,6 +2028,7 @@
- mostlyclean-target: maybe-mostlyclean-target-boehm-gc
- mostlyclean-target: maybe-mostlyclean-target-rda
- mostlyclean-target: maybe-mostlyclean-target-libada
-+mostlyclean-target: maybe-mostlyclean-target-libgm2
- mostlyclean-target: maybe-mostlyclean-target-libgomp
- mostlyclean-target: maybe-mostlyclean-target-libitm
- mostlyclean-target: maybe-mostlyclean-target-libatomic
-@@ -2092,6 +2116,7 @@
- clean-target: maybe-clean-target-boehm-gc
- clean-target: maybe-clean-target-rda
- clean-target: maybe-clean-target-libada
-+clean-target: maybe-clean-target-libgm2
- clean-target: maybe-clean-target-libgomp
- clean-target: maybe-clean-target-libitm
- clean-target: maybe-clean-target-libatomic
-@@ -2179,6 +2204,7 @@
- distclean-target: maybe-distclean-target-boehm-gc
- distclean-target: maybe-distclean-target-rda
- distclean-target: maybe-distclean-target-libada
-+distclean-target: maybe-distclean-target-libgm2
- distclean-target: maybe-distclean-target-libgomp
- distclean-target: maybe-distclean-target-libitm
- distclean-target: maybe-distclean-target-libatomic
-@@ -2266,6 +2292,7 @@
- maintainer-clean-target: maybe-maintainer-clean-target-boehm-gc
- maintainer-clean-target: maybe-maintainer-clean-target-rda
- maintainer-clean-target: maybe-maintainer-clean-target-libada
-+maintainer-clean-target: maybe-maintainer-clean-target-libgm2
- maintainer-clean-target: maybe-maintainer-clean-target-libgomp
- maintainer-clean-target: maybe-maintainer-clean-target-libitm
- maintainer-clean-target: maybe-maintainer-clean-target-libatomic
-@@ -2408,6 +2435,7 @@
- maybe-check-target-boehm-gc \
- maybe-check-target-rda \
- maybe-check-target-libada \
-+ maybe-check-target-libgm2 \
- maybe-check-target-libgomp \
- maybe-check-target-libitm \
- maybe-check-target-libatomic
-@@ -2582,6 +2610,7 @@
- maybe-install-target-boehm-gc \
- maybe-install-target-rda \
- maybe-install-target-libada \
-+ maybe-install-target-libgm2 \
- maybe-install-target-libgomp \
- maybe-install-target-libitm \
- maybe-install-target-libatomic
-@@ -2689,6 +2718,7 @@
- maybe-install-strip-target-boehm-gc \
- maybe-install-strip-target-rda \
- maybe-install-strip-target-libada \
-+ maybe-install-strip-target-libgm2 \
- maybe-install-strip-target-libgomp \
- maybe-install-strip-target-libitm \
- maybe-install-strip-target-libatomic
-@@ -45368,6 +45398,464 @@
-
-
-
-+.PHONY: configure-target-libgm2 maybe-configure-target-libgm2
-+maybe-configure-target-libgm2:
-+@if gcc-bootstrap
-+configure-target-libgm2: stage_current
-+@endif gcc-bootstrap
-+@if target-libgm2
-+maybe-configure-target-libgm2: configure-target-libgm2
-+configure-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ echo "Checking multilib configuration for libgm2..."; \
-+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgm2 ; \
-+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgm2/multilib.tmp 2> /dev/null ; \
-+ if test -r $(TARGET_SUBDIR)/libgm2/multilib.out; then \
-+ if cmp -s $(TARGET_SUBDIR)/libgm2/multilib.tmp $(TARGET_SUBDIR)/libgm2/multilib.out; then \
-+ rm -f $(TARGET_SUBDIR)/libgm2/multilib.tmp; \
-+ else \
-+ rm -f $(TARGET_SUBDIR)/libgm2/Makefile; \
-+ mv $(TARGET_SUBDIR)/libgm2/multilib.tmp $(TARGET_SUBDIR)/libgm2/multilib.out; \
-+ fi; \
-+ else \
-+ mv $(TARGET_SUBDIR)/libgm2/multilib.tmp $(TARGET_SUBDIR)/libgm2/multilib.out; \
-+ fi; \
-+ test ! -f $(TARGET_SUBDIR)/libgm2/Makefile || exit 0; \
-+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgm2 ; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo Configuring in $(TARGET_SUBDIR)/libgm2; \
-+ cd "$(TARGET_SUBDIR)/libgm2" || exit 1; \
-+ case $(srcdir) in \
-+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-+ *) topdir=`echo $(TARGET_SUBDIR)/libgm2/ | \
-+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-+ esac; \
-+ module_srcdir=libgm2; \
-+ rm -f no-such-file || : ; \
-+ CONFIG_SITE=no-such-file $(SHELL) \
-+ $$s/$$module_srcdir/configure \
-+ --srcdir=$${topdir}/$$module_srcdir \
-+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
-+ --target=${target_alias} \
-+ || exit 1
-+@endif target-libgm2
-+
-+
-+
-+
-+
-+.PHONY: all-target-libgm2 maybe-all-target-libgm2
-+maybe-all-target-libgm2:
-+@if gcc-bootstrap
-+all-target-libgm2: stage_current
-+@endif gcc-bootstrap
-+@if target-libgm2
-+TARGET-target-libgm2=all
-+maybe-all-target-libgm2: all-target-libgm2
-+all-target-libgm2: configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
-+ $(TARGET-target-libgm2))
-+@endif target-libgm2
-+
-+
-+
-+
-+
-+.PHONY: check-target-libgm2 maybe-check-target-libgm2
-+maybe-check-target-libgm2:
-+@if target-libgm2
-+maybe-check-target-libgm2: check-target-libgm2
-+
-+check-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
-+
-+@endif target-libgm2
-+
-+.PHONY: install-target-libgm2 maybe-install-target-libgm2
-+maybe-install-target-libgm2:
-+@if target-libgm2
-+maybe-install-target-libgm2: install-target-libgm2
-+
-+install-target-libgm2: installdirs
-+ @: $(MAKE); $(unstage)
-+ @r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
-+
-+@endif target-libgm2
-+
-+.PHONY: install-strip-target-libgm2 maybe-install-strip-target-libgm2
-+maybe-install-strip-target-libgm2:
-+@if target-libgm2
-+maybe-install-strip-target-libgm2: install-strip-target-libgm2
-+
-+install-strip-target-libgm2: installdirs
-+ @: $(MAKE); $(unstage)
-+ @r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install-strip)
-+
-+@endif target-libgm2
-+
-+# Other targets (info, dvi, pdf, etc.)
-+
-+.PHONY: maybe-info-target-libgm2 info-target-libgm2
-+maybe-info-target-libgm2:
-+@if target-libgm2
-+maybe-info-target-libgm2: info-target-libgm2
-+
-+info-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing info in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ info) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-dvi-target-libgm2 dvi-target-libgm2
-+maybe-dvi-target-libgm2:
-+@if target-libgm2
-+maybe-dvi-target-libgm2: dvi-target-libgm2
-+
-+dvi-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing dvi in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ dvi) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-pdf-target-libgm2 pdf-target-libgm2
-+maybe-pdf-target-libgm2:
-+@if target-libgm2
-+maybe-pdf-target-libgm2: pdf-target-libgm2
-+
-+pdf-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing pdf in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ pdf) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-html-target-libgm2 html-target-libgm2
-+maybe-html-target-libgm2:
-+@if target-libgm2
-+maybe-html-target-libgm2: html-target-libgm2
-+
-+html-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing html in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ html) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-TAGS-target-libgm2 TAGS-target-libgm2
-+maybe-TAGS-target-libgm2:
-+@if target-libgm2
-+maybe-TAGS-target-libgm2: TAGS-target-libgm2
-+
-+TAGS-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing TAGS in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ TAGS) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-install-info-target-libgm2 install-info-target-libgm2
-+maybe-install-info-target-libgm2:
-+@if target-libgm2
-+maybe-install-info-target-libgm2: install-info-target-libgm2
-+
-+install-info-target-libgm2: \
-+ configure-target-libgm2 \
-+ info-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing install-info in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ install-info) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-install-pdf-target-libgm2 install-pdf-target-libgm2
-+maybe-install-pdf-target-libgm2:
-+@if target-libgm2
-+maybe-install-pdf-target-libgm2: install-pdf-target-libgm2
-+
-+install-pdf-target-libgm2: \
-+ configure-target-libgm2 \
-+ pdf-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ install-pdf) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-install-html-target-libgm2 install-html-target-libgm2
-+maybe-install-html-target-libgm2:
-+@if target-libgm2
-+maybe-install-html-target-libgm2: install-html-target-libgm2
-+
-+install-html-target-libgm2: \
-+ configure-target-libgm2 \
-+ html-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing install-html in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ install-html) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-installcheck-target-libgm2 installcheck-target-libgm2
-+maybe-installcheck-target-libgm2:
-+@if target-libgm2
-+maybe-installcheck-target-libgm2: installcheck-target-libgm2
-+
-+installcheck-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing installcheck in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ installcheck) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-mostlyclean-target-libgm2 mostlyclean-target-libgm2
-+maybe-mostlyclean-target-libgm2:
-+@if target-libgm2
-+maybe-mostlyclean-target-libgm2: mostlyclean-target-libgm2
-+
-+mostlyclean-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ mostlyclean) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-clean-target-libgm2 clean-target-libgm2
-+maybe-clean-target-libgm2:
-+@if target-libgm2
-+maybe-clean-target-libgm2: clean-target-libgm2
-+
-+clean-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing clean in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ clean) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-distclean-target-libgm2 distclean-target-libgm2
-+maybe-distclean-target-libgm2:
-+@if target-libgm2
-+maybe-distclean-target-libgm2: distclean-target-libgm2
-+
-+distclean-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing distclean in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ distclean) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-maintainer-clean-target-libgm2 maintainer-clean-target-libgm2
-+maybe-maintainer-clean-target-libgm2:
-+@if target-libgm2
-+maybe-maintainer-clean-target-libgm2: maintainer-clean-target-libgm2
-+
-+maintainer-clean-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ maintainer-clean) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+
-+
-+
-+
- .PHONY: configure-target-libgomp maybe-configure-target-libgomp
- maybe-configure-target-libgomp:
- @if gcc-bootstrap
-@@ -47356,6 +47844,14 @@
- (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-go);
- check-go: check-gcc-go check-target-libgo
-
-+.PHONY: check-gcc-gm2 check-gm2
-+check-gcc-gm2:
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(HOST_EXPORTS) \
-+ (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-gm2);
-+check-gm2: check-gcc-gm2
-+
-
- # The gcc part of install-no-fixedincludes, which relies on an intimate
- # knowledge of how a number of gcc internal targets (inter)operate. Delegate.
-@@ -49501,6 +49997,7 @@
- configure-target-boehm-gc: stage_last
- configure-target-rda: stage_last
- configure-target-libada: stage_last
-+configure-target-libgm2: stage_last
- configure-stage1-target-libgomp: maybe-all-stage1-gcc
- configure-stage2-target-libgomp: maybe-all-stage2-gcc
- configure-stage3-target-libgomp: maybe-all-stage3-gcc
-@@ -49535,6 +50032,7 @@
- configure-target-boehm-gc: maybe-all-gcc
- configure-target-rda: maybe-all-gcc
- configure-target-libada: maybe-all-gcc
-+configure-target-libgm2: maybe-all-gcc
- configure-target-libgomp: maybe-all-gcc
- configure-target-libitm: maybe-all-gcc
- configure-target-libatomic: maybe-all-gcc
-@@ -50445,6 +50943,7 @@
- configure-target-boehm-gc: maybe-all-target-libgcc
- configure-target-rda: maybe-all-target-libgcc
- configure-target-libada: maybe-all-target-libgcc
-+configure-target-libgm2: maybe-all-target-libgcc
- configure-target-libgomp: maybe-all-target-libgcc
- configure-target-libitm: maybe-all-target-libgcc
- configure-target-libatomic: maybe-all-target-libgcc
-@@ -50497,6 +50996,8 @@
-
- configure-target-libada: maybe-all-target-newlib maybe-all-target-libgloss
-
-+configure-target-libgm2: maybe-all-target-newlib maybe-all-target-libgloss
-+
- configure-target-libgomp: maybe-all-target-newlib maybe-all-target-libgloss
-
- configure-target-libitm: maybe-all-target-newlib maybe-all-target-libgloss
diff --git a/gcc/m2/patches/gcc/5.2.0/10-patches b/gcc/m2/patches/gcc/5.2.0/10-patches
deleted file mode 100644
index e6afec52a73..00000000000
--- a/gcc/m2/patches/gcc/5.2.0/10-patches
+++ /dev/null
@@ -1,58 +0,0 @@
---- gcc-5.2.0-orig/Makefile.tpl 2015-03-25 12:05:22.000000000 +0000
-+++ gcc-5.2.0/Makefile.tpl 2016-04-11 13:16:18.675000792 +0100
-@@ -160,6 +160,7 @@
- GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \
- GOC="$(GOC_FOR_BUILD)"; export GOC; \
- GOCFLAGS="$(GOCFLAGS_FOR_BUILD)"; export GOCFLAGS; \
-+ GM2="$(GM2_FOR_BUILD)"; export GM2; \
- DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
- LD="$(LD_FOR_BUILD)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
-@@ -197,6 +198,7 @@
- GCJ="$(GCJ)"; export GCJ; \
- GFORTRAN="$(GFORTRAN)"; export GFORTRAN; \
- GOC="$(GOC)"; export GOC; \
-+ GM2="$(GM2)"; export GM2; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
-@@ -283,6 +285,7 @@
- GCJ="$(GCJ_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GCJ; \
- GFORTRAN="$(GFORTRAN_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GFORTRAN; \
- GOC="$(GOC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GOC; \
-+ GM2="$(GM2_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GM2; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
-@@ -350,6 +353,7 @@
- GCJ_FOR_BUILD = @GCJ_FOR_BUILD@
- GFORTRAN_FOR_BUILD = @GFORTRAN_FOR_BUILD@
- GOC_FOR_BUILD = @GOC_FOR_BUILD@
-+GM2_FOR_BUILD = @GM2_FOR_BUILD@
- LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
- LD_FOR_BUILD = @LD_FOR_BUILD@
- NM_FOR_BUILD = @NM_FOR_BUILD@
-@@ -482,6 +486,7 @@
- GCJ_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCJ_FOR_TARGET@
- GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@
- GOC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GOC_FOR_TARGET@
-+GM2_FOR_TARGET=$(STAGE_CC_WRAPPER) @GM2_FOR_TARGET@
- DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
- LD_FOR_TARGET=@LD_FOR_TARGET@
-
-@@ -605,6 +610,7 @@
- 'GCJ=$(GCJ)' \
- 'GFORTRAN=$(GFORTRAN)' \
- 'GOC=$(GOC)' \
-+ 'GM2=$(GM2)' \
- 'LD=$(LD)' \
- 'LIPO=$(LIPO)' \
- 'NM=$(NM)' \
-@@ -653,6 +659,7 @@
- 'GFORTRAN=$$(GFORTRAN_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
- 'GOC=$$(GOC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
- 'GOCFLAGS=$$(GOCFLAGS_FOR_TARGET)' \
-+ 'GM2=$$(GM2_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
- 'LD=$(COMPILER_LD_FOR_TARGET)' \
- 'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \
- 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
diff --git a/gcc/m2/patches/gcc/5.2.0/11-patches b/gcc/m2/patches/gcc/5.2.0/11-patches
deleted file mode 100644
index ee3c6a44db8..00000000000
--- a/gcc/m2/patches/gcc/5.2.0/11-patches
+++ /dev/null
@@ -1,17 +0,0 @@
---- gcc-5.2.0-orig/gcc/tree-ssa-loop-im.c 2015-01-09 20:18:42.000000000 +0000
-+++ gcc-5.2.0/gcc/tree-ssa-loop-im.c 2017-03-12 00:33:02.082243568 +0000
-@@ -628,7 +628,7 @@
- hash = iterative_hash_expr (*mem, 0);
- ref = memory_accesses.refs->find_with_hash (*mem, hash);
-
-- gcc_assert (ref != NULL);
-+ // gcc_assert (ref != NULL);
- return ref;
- }
-
-@@ -2625,5 +2625,3 @@
- {
- return new pass_lim (ctxt);
- }
--
--
diff --git a/gcc/m2/patches/gcc/5.2.0/12-patches b/gcc/m2/patches/gcc/5.2.0/12-patches
deleted file mode 100644
index 3b4056be4f6..00000000000
--- a/gcc/m2/patches/gcc/5.2.0/12-patches
+++ /dev/null
@@ -1,49 +0,0 @@
---- gcc-5.2.0-orig/gcc/tree-vrp.c 2015-04-27 13:21:17.000000000 +0100
-+++ gcc-5.2.0/gcc/tree-vrp.c 2017-03-14 20:52:02.748592946 +0000
-@@ -474,6 +474,10 @@
- gcc_assert (!vrp_val_is_min (min) || !vrp_val_is_max (max));
-
- cmp = compare_values (min, max);
-+#if 1
-+ if (cmp == 1)
-+ error ("overflow found");
-+#endif
- gcc_assert (cmp == 0 || cmp == -1 || cmp == -2);
-
- if (needs_overflow_infinity (TREE_TYPE (min)))
-@@ -1221,7 +1225,7 @@
- && DECL_IS_OPERATOR_NEW (fndecl)
- && !TREE_NOTHROW (fndecl))
- return true;
-- if (flag_delete_null_pointer_checks &&
-+ if (flag_delete_null_pointer_checks &&
- lookup_attribute ("returns_nonnull",
- TYPE_ATTRIBUTES (gimple_call_fntype (stmt))))
- return true;
-@@ -1606,7 +1610,7 @@
- value_range_nonnegative_p (value_range_t *vr)
- {
- /* Testing for VR_ANTI_RANGE is not useful here as any anti-range
-- which would return a useful value should be encoded as a
-+ which would return a useful value should be encoded as a
- VR_RANGE. */
- if (vr->type == VR_RANGE)
- {
-@@ -5359,7 +5363,7 @@
- }
- }
- }
--
-+
- if (TREE_CODE_CLASS (comp_code) == tcc_comparison
- && TREE_CODE (val) == INTEGER_CST)
- {
-@@ -10186,7 +10190,7 @@
- /* We're basically looking for a switch or any kind of conditional with
- integral or pointer type arguments. Note the type of the second
- argument will be the same as the first argument, so no need to
-- check it explicitly.
-+ check it explicitly.
-
- We also handle the case where there are no statements in the
- block. This come up with forwarder blocks that are not
diff --git a/gcc/m2/patches/gcc/6.4.0/01-patches b/gcc/m2/patches/gcc/6.4.0/01-patches
deleted file mode 100644
index acca4f9db47..00000000000
--- a/gcc/m2/patches/gcc/6.4.0/01-patches
+++ /dev/null
@@ -1,319 +0,0 @@
---- gcc-6.4.0-orig/configure 2017-07-24 16:03:40.553367784 +0100
-+++ gcc-6.4.0/configure 2017-07-24 16:23:05.629928268 +0100
-@@ -581,6 +581,7 @@
- DLLTOOL_FOR_TARGET
- AS_FOR_TARGET
- AR_FOR_TARGET
-+GM2_FOR_TARGET
- GOC_FOR_TARGET
- GFORTRAN_FOR_TARGET
- GCJ_FOR_TARGET
-@@ -614,6 +615,7 @@
- NM_FOR_BUILD
- LD_FOR_BUILD
- LDFLAGS_FOR_BUILD
-+GM2_FOR_BUILD
- GOC_FOR_BUILD
- GFORTRAN_FOR_BUILD
- GCJ_FOR_BUILD
-@@ -758,6 +760,7 @@
- enable_libquadmath
- enable_libquadmath_support
- enable_libada
-+enable_libgm2
- enable_libssp
- enable_libstdcxx
- enable_liboffloadmic
-@@ -831,6 +834,7 @@
- GCJ_FOR_TARGET
- GFORTRAN_FOR_TARGET
- GOC_FOR_TARGET
-+GM2_FOR_TARGET
- AR_FOR_TARGET
- AS_FOR_TARGET
- DLLTOOL_FOR_TARGET
-@@ -1485,6 +1489,7 @@
- --disable-libquadmath-support
- disable libquadmath support for Fortran
- --enable-libada build libada directory
-+ --enable-libgm2 build libgm2 directory
- --enable-libssp build libssp directory
- --disable-libstdcxx do not build libstdc++-v3 directory
- --enable-liboffloadmic=ARG
-@@ -1606,6 +1611,8 @@
- GFORTRAN for the target
- GOC_FOR_TARGET
- GOC for the target
-+ GM2_FOR_TARGET
-+ GM2 for the target
- AR_FOR_TARGET
- AR for the target
- AS_FOR_TARGET
-@@ -2764,6 +2771,7 @@
- ${libgcj} \
- target-libobjc \
- target-libada \
-+ target-libgm2 \
- target-libgo"
-
- # these tools are built using the target libraries, and are intended to
-@@ -3091,6 +3099,15 @@
- noconfigdirs="$noconfigdirs gnattools"
- fi
-
-+# Check whether --enable-libgm2 was given.
-+if test "${enable_libgm2+set}" = set; then :
-+ enableval=$enable_libgm2; ENABLE_LIBGM2=$enableval
-+else
-+ ENABLE_LIBGM2=yes
-+fi
-+
-+
-+
- # Check whether --enable-libssp was given.
- if test "${enable_libssp+set}" = set; then :
- enableval=$enable_libssp; ENABLE_LIBSSP=$enableval
-@@ -4048,6 +4065,7 @@
- GCJ_FOR_BUILD=${GCJ_FOR_BUILD-gcj}
- GFORTRAN_FOR_BUILD=${GFORTRAN_FOR_BUILD-gfortran}
- GOC_FOR_BUILD=${GOC_FOR_BUILD-gccgo}
-+ GM2_FOR_BUILD=${GM2_FOR_BUILD-gm2}
- DLLTOOL_FOR_BUILD=${DLLTOOL_FOR_BUILD-dlltool}
- LD_FOR_BUILD=${LD_FOR_BUILD-ld}
- NM_FOR_BUILD=${NM_FOR_BUILD-nm}
-@@ -4062,6 +4080,7 @@
- GCJ_FOR_BUILD="\$(GCJ)"
- GFORTRAN_FOR_BUILD="\$(GFORTRAN)"
- GOC_FOR_BUILD="\$(GOC)"
-+ GM2_FOR_BUILD="\$(GM2)"
- DLLTOOL_FOR_BUILD="\$(DLLTOOL)"
- LD_FOR_BUILD="\$(LD)"
- NM_FOR_BUILD="\$(NM)"
-@@ -7713,6 +7732,7 @@
-
-
-
-+
- # Generate default definitions for YACC, M4, LEX and other programs that run
- # on the build machine. These are used if the Makefile can't locate these
- # programs in objdir.
-@@ -10928,6 +10948,167 @@
-
-
-
-+if test -n "$GM2_FOR_TARGET"; then
-+ ac_cv_prog_GM2_FOR_TARGET=$GM2_FOR_TARGET
-+elif test -n "$ac_cv_prog_GM2_FOR_TARGET"; then
-+ GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
-+fi
-+
-+if test -n "$ac_cv_prog_GM2_FOR_TARGET"; then
-+ for ncn_progname in gm2; do
-+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
-+set dummy ${ncn_progname}; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_GM2_FOR_TARGET+set}" = set; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ if test -n "$GM2_FOR_TARGET"; then
-+ ac_cv_prog_GM2_FOR_TARGET="$GM2_FOR_TARGET" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+ ac_cv_prog_GM2_FOR_TARGET="${ncn_progname}"
-+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+ break 2
-+ fi
-+done
-+ done
-+IFS=$as_save_IFS
-+
-+fi
-+fi
-+GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
-+if test -n "$GM2_FOR_TARGET"; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GM2_FOR_TARGET" >&5
-+$as_echo "$GM2_FOR_TARGET" >&6; }
-+else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
-+
-+
-+ done
-+fi
-+
-+if test -z "$ac_cv_prog_GM2_FOR_TARGET" && test -n "$with_build_time_tools"; then
-+ for ncn_progname in gm2; do
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
-+$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
-+ if test -x $with_build_time_tools/${ncn_progname}; then
-+ ac_cv_prog_GM2_FOR_TARGET=$with_build_time_tools/${ncn_progname}
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
-+ break
-+ else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+ fi
-+ done
-+fi
-+
-+if test -z "$ac_cv_prog_GM2_FOR_TARGET"; then
-+ for ncn_progname in gm2; do
-+ if test -n "$ncn_target_tool_prefix"; then
-+ # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
-+set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_GM2_FOR_TARGET+set}" = set; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ if test -n "$GM2_FOR_TARGET"; then
-+ ac_cv_prog_GM2_FOR_TARGET="$GM2_FOR_TARGET" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+ ac_cv_prog_GM2_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
-+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+ break 2
-+ fi
-+done
-+ done
-+IFS=$as_save_IFS
-+
-+fi
-+fi
-+GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
-+if test -n "$GM2_FOR_TARGET"; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GM2_FOR_TARGET" >&5
-+$as_echo "$GM2_FOR_TARGET" >&6; }
-+else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
-+
-+
-+ fi
-+ if test -z "$ac_cv_prog_GM2_FOR_TARGET" && test $build = $target ; then
-+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
-+set dummy ${ncn_progname}; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_GM2_FOR_TARGET+set}" = set; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ if test -n "$GM2_FOR_TARGET"; then
-+ ac_cv_prog_GM2_FOR_TARGET="$GM2_FOR_TARGET" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+ ac_cv_prog_GM2_FOR_TARGET="${ncn_progname}"
-+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+ break 2
-+ fi
-+done
-+ done
-+IFS=$as_save_IFS
-+
-+fi
-+fi
-+GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
-+if test -n "$GM2_FOR_TARGET"; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GM2_FOR_TARGET" >&5
-+$as_echo "$GM2_FOR_TARGET" >&6; }
-+else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
-+
-+
-+ fi
-+ test -n "$ac_cv_prog_GM2_FOR_TARGET" && break
-+ done
-+fi
-+
-+if test -z "$ac_cv_prog_GM2_FOR_TARGET" ; then
-+ set dummy gm2
-+ if test $build = $target ; then
-+ GM2_FOR_TARGET="$2"
-+ else
-+ GM2_FOR_TARGET="${ncn_target_tool_prefix}$2"
-+ fi
-+else
-+ GM2_FOR_TARGET="$ac_cv_prog_GM2_FOR_TARGET"
-+fi
-+
-+
-+
- cat > conftest.c << \EOF
- #ifdef __GNUC__
- gcc_yay;
-@@ -14144,6 +14325,51 @@
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
- $as_echo "host tool" >&6; }
- else
-+ # We need a cross tool
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
-+$as_echo "pre-installed" >&6; }
-+ fi
-+fi
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target gm2" >&5
-+$as_echo_n "checking where to find the target gm2... " >&6; }
-+if test "x${build}" != "x${host}" ; then
-+ if expr "x$GM2_FOR_TARGET" : "x/" > /dev/null; then
-+ # We already found the complete path
-+ ac_dir=`dirname $GM2_FOR_TARGET`
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
-+$as_echo "pre-installed in $ac_dir" >&6; }
-+ else
-+ # Canadian cross, just use what we found
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
-+$as_echo "pre-installed" >&6; }
-+ fi
-+else
-+ ok=yes
-+ case " ${configdirs} " in
-+ *" gcc "*) ;;
-+ *) ok=no ;;
-+ esac
-+ case ,${enable_languages}, in
-+ *,gm2,*) ;;
-+ *) ok=no ;;
-+ esac
-+ if test $ok = yes; then
-+ # An in-tree tool is available and we can use it
-+ GM2_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgm2 -B$$r/$(HOST_SUBDIR)/gcc/'
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
-+$as_echo "just compiled" >&6; }
-+ elif expr "x$GM2_FOR_TARGET" : "x/" > /dev/null; then
-+ # We already found the complete path
-+ ac_dir=`dirname $GM2_FOR_TARGET`
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
-+$as_echo "pre-installed in $ac_dir" >&6; }
-+ elif test "x$target" = "x$host"; then
-+ # We can use an host tool
-+ GM2_FOR_TARGET='$(GM2)'
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
-+$as_echo "host tool" >&6; }
-+ else
- # We need a cross tool
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
- $as_echo "pre-installed" >&6; }
diff --git a/gcc/m2/patches/gcc/6.4.0/02-patches b/gcc/m2/patches/gcc/6.4.0/02-patches
deleted file mode 100644
index 9bc7a2a9892..00000000000
--- a/gcc/m2/patches/gcc/6.4.0/02-patches
+++ /dev/null
@@ -1,64 +0,0 @@
---- gcc-6.4.0-orig/configure.ac 2017-07-24 16:03:40.553367784 +0100
-+++ gcc-6.4.0/configure.ac 2017-07-24 16:23:05.633928359 +0100
-@@ -170,6 +170,7 @@
- ${libgcj} \
- target-libobjc \
- target-libada \
-+ target-libgm2 \
- target-libgo"
-
- # these tools are built using the target libraries, and are intended to
-@@ -457,6 +458,12 @@
- noconfigdirs="$noconfigdirs gnattools"
- fi
-
-+AC_ARG_ENABLE(libgm2,
-+[AS_HELP_STRING([--enable-libgm2], [build libgm2 directory])],
-+ENABLE_LIBGM2=$enableval,
-+ENABLE_LIBGM2=yes)
-+
-+
- AC_ARG_ENABLE(libssp,
- [AS_HELP_STRING([--enable-libssp], [build libssp directory])],
- ENABLE_LIBSSP=$enableval,
-@@ -1365,6 +1372,7 @@
- GCJ_FOR_BUILD=${GCJ_FOR_BUILD-gcj}
- GFORTRAN_FOR_BUILD=${GFORTRAN_FOR_BUILD-gfortran}
- GOC_FOR_BUILD=${GOC_FOR_BUILD-gccgo}
-+ GM2_FOR_BUILD=${GM2_FOR_BUILD-gm2}
- DLLTOOL_FOR_BUILD=${DLLTOOL_FOR_BUILD-dlltool}
- LD_FOR_BUILD=${LD_FOR_BUILD-ld}
- NM_FOR_BUILD=${NM_FOR_BUILD-nm}
-@@ -1379,6 +1387,7 @@
- GCJ_FOR_BUILD="\$(GCJ)"
- GFORTRAN_FOR_BUILD="\$(GFORTRAN)"
- GOC_FOR_BUILD="\$(GOC)"
-+ GM2_FOR_BUILD="\$(GM2)"
- DLLTOOL_FOR_BUILD="\$(DLLTOOL)"
- LD_FOR_BUILD="\$(LD)"
- NM_FOR_BUILD="\$(NM)"
-@@ -3305,6 +3314,7 @@
- AC_SUBST(GCJ_FOR_BUILD)
- AC_SUBST(GFORTRAN_FOR_BUILD)
- AC_SUBST(GOC_FOR_BUILD)
-+AC_SUBST(GM2_FOR_BUILD)
- AC_SUBST(LDFLAGS_FOR_BUILD)
- AC_SUBST(LD_FOR_BUILD)
- AC_SUBST(NM_FOR_BUILD)
-@@ -3415,6 +3425,7 @@
- NCN_STRICT_CHECK_TARGET_TOOLS(GCJ_FOR_TARGET, gcj)
- NCN_STRICT_CHECK_TARGET_TOOLS(GFORTRAN_FOR_TARGET, gfortran)
- NCN_STRICT_CHECK_TARGET_TOOLS(GOC_FOR_TARGET, gccgo)
-+NCN_STRICT_CHECK_TARGET_TOOLS(GM2_FOR_TARGET, gm2)
-
- ACX_CHECK_INSTALLED_TARGET_TOOL(AR_FOR_TARGET, ar)
- ACX_CHECK_INSTALLED_TARGET_TOOL(AS_FOR_TARGET, as)
-@@ -3450,6 +3461,8 @@
- [gcc/gfortran -B$$r/$(HOST_SUBDIR)/gcc/], fortran)
- GCC_TARGET_TOOL(gccgo, GOC_FOR_TARGET, GOC,
- [gcc/gccgo -B$$r/$(HOST_SUBDIR)/gcc/], go)
-+GCC_TARGET_TOOL(gm2, GM2_FOR_TARGET, GM2,
-+ [gcc/xgm2 -B$$r/$(HOST_SUBDIR)/gcc/], gm2)
- GCC_TARGET_TOOL(ld, LD_FOR_TARGET, LD, [ld/ld-new])
- GCC_TARGET_TOOL(lipo, LIPO_FOR_TARGET, LIPO)
- GCC_TARGET_TOOL(nm, NM_FOR_TARGET, NM, [binutils/nm-new])
diff --git a/gcc/m2/patches/gcc/6.4.0/03-patches b/gcc/m2/patches/gcc/6.4.0/03-patches
deleted file mode 100644
index 953f56f1fc2..00000000000
--- a/gcc/m2/patches/gcc/6.4.0/03-patches
+++ /dev/null
@@ -1,12 +0,0 @@
---- gcc-6.4.0-orig/gcc/c/gccspec.c 2017-07-24 16:03:41.353356856 +0100
-+++ gcc-6.4.0/gcc/c/gccspec.c 2017-07-24 16:23:05.633928359 +0100
-@@ -105,3 +105,9 @@
-
- /* Number of extra output files that lang_specific_pre_link may generate. */
- int lang_specific_extra_outfiles = 0; /* Not used for C. */
-+
-+/* lang_register_spec_functions. Not used for C. */
-+void
-+lang_register_spec_functions (void)
-+{
-+}
diff --git a/gcc/m2/patches/gcc/6.4.0/04-patches b/gcc/m2/patches/gcc/6.4.0/04-patches
deleted file mode 100644
index ec36e8a712e..00000000000
--- a/gcc/m2/patches/gcc/6.4.0/04-patches
+++ /dev/null
@@ -1,12 +0,0 @@
---- gcc-6.4.0-orig/gcc/c-family/cppspec.c 2017-07-24 16:03:41.665352594 +0100
-+++ gcc-6.4.0/gcc/c-family/cppspec.c 2017-07-24 16:23:05.633928359 +0100
-@@ -197,3 +197,9 @@
-
- /* Number of extra output files that lang_specific_pre_link may generate. */
- int lang_specific_extra_outfiles = 0; /* Not used for cpp. */
-+
-+/* lang_register_spec_functions. Not used for cpp. */
-+void
-+lang_register_spec_functions (void)
-+{
-+}
diff --git a/gcc/m2/patches/gcc/6.4.0/05-patches b/gcc/m2/patches/gcc/6.4.0/05-patches
deleted file mode 100644
index e9bfd77f9fe..00000000000
--- a/gcc/m2/patches/gcc/6.4.0/05-patches
+++ /dev/null
@@ -1,12 +0,0 @@
---- gcc-6.4.0-orig/gcc/cp/g++spec.c 2017-07-24 16:03:41.669352539 +0100
-+++ gcc-6.4.0/gcc/cp/g++spec.c 2017-07-24 16:23:05.637928450 +0100
-@@ -402,3 +402,9 @@
-
- /* Number of extra output files that lang_specific_pre_link may generate. */
- int lang_specific_extra_outfiles = 0; /* Not used for C++. */
-+
-+/* lang_register_spec_functions. Not used for C++. */
-+void
-+lang_register_spec_functions (void)
-+{
-+}
diff --git a/gcc/m2/patches/gcc/6.4.0/06-patches b/gcc/m2/patches/gcc/6.4.0/06-patches
deleted file mode 100644
index 4189d0757c2..00000000000
--- a/gcc/m2/patches/gcc/6.4.0/06-patches
+++ /dev/null
@@ -1,218 +0,0 @@
---- gcc-6.4.0-orig/gcc/gcc.c 2017-07-24 16:03:41.289357730 +0100
-+++ gcc-6.4.0/gcc/gcc.c 2017-07-24 16:23:05.637928450 +0100
-@@ -299,6 +299,10 @@
- static const char *cross_compile = "0";
- #endif
-
-+/* The lang specs might wish to override the default linker.
-+ */
-+int allow_linker = 1;
-+
- /* Greatest exit code of sub-processes that has been encountered up to
- now. */
- static int greatest_status = 1;
-@@ -403,6 +407,7 @@
- static const char *replace_extension_spec_func (int, const char **);
- static const char *greater_than_spec_func (int, const char **);
- static char *convert_white_space (char *);
-+static void handle_OPT_B (const char *arg);
- \f
- /* The Specs Language
-
-@@ -1007,6 +1012,7 @@
- /* We pass any -flto flags on to the linker, which is expected
- to understand them. In practice, this means it had better be collect2. */
- /* %{e*} includes -export-dynamic; see comment in common.opt. */
-+
- #ifndef LINK_COMMAND_SPEC
- #define LINK_COMMAND_SPEC "\
- %{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
-@@ -1633,6 +1639,10 @@
- { 0, 0 }
- };
-
-+/* front end registered spec functions */
-+static struct spec_function *lang_spec_functions = NULL;
-+static unsigned int lang_spec_functions_length = 0;
-+
- static int processing_spec_function;
- \f
- /* Add appropriate libgcc specs to OBSTACK, taking into account
-@@ -3541,6 +3551,68 @@
- n_switches++;
- }
-
-+/* Save an option OPT with N_ARGS arguments in array ARGS, marking it
-+ as validated if VALIDATED. */
-+
-+void
-+fe_save_switch (const char *opt, size_t n_args, const char *const *args,
-+ bool validated, bool known)
-+{
-+ save_switch (opt, n_args, args, validated, known);
-+}
-+
-+void fe_B_prefix (const char *arg)
-+{
-+ handle_OPT_B (arg);
-+}
-+
-+void
-+fe_add_linker_option (const char *option)
-+{
-+ add_linker_option (option, strlen (option));
-+}
-+
-+/* Handle the -B option by adding the prefix to exec, startfile and
-+ include search paths. */
-+
-+static
-+void handle_OPT_B (const char *arg)
-+{
-+ size_t len = strlen (arg);
-+
-+ /* Catch the case where the user has forgotten to append a
-+ directory separator to the path. Note, they may be using
-+ -B to add an executable name prefix, eg "i386-elf-", in
-+ order to distinguish between multiple installations of
-+ GCC in the same directory. Hence we must check to see
-+ if appending a directory separator actually makes a
-+ valid directory name. */
-+ if (!IS_DIR_SEPARATOR (arg[len - 1])
-+ && is_directory (arg, false))
-+ {
-+ char *tmp = XNEWVEC (char, len + 2);
-+ strcpy (tmp, arg);
-+ tmp[len] = DIR_SEPARATOR;
-+ tmp[++len] = 0;
-+ arg = tmp;
-+ }
-+
-+ add_prefix (&exec_prefixes, arg, NULL,
-+ PREFIX_PRIORITY_B_OPT, 0, 0);
-+ add_prefix (&startfile_prefixes, arg, NULL,
-+ PREFIX_PRIORITY_B_OPT, 0, 0);
-+ add_prefix (&include_prefixes, arg, NULL,
-+ PREFIX_PRIORITY_B_OPT, 0, 0);
-+}
-+
-+/* Save the infile */
-+
-+void
-+fe_add_infile (const char *infile, const char *lang)
-+{
-+ add_infile (infile, lang);
-+}
-+
- /* Handle an option DECODED that is unknown to the option-processing
- machinery. */
-
-@@ -4004,33 +4076,7 @@
- break;
-
- case OPT_B:
-- {
-- size_t len = strlen (arg);
--
-- /* Catch the case where the user has forgotten to append a
-- directory separator to the path. Note, they may be using
-- -B to add an executable name prefix, eg "i386-elf-", in
-- order to distinguish between multiple installations of
-- GCC in the same directory. Hence we must check to see
-- if appending a directory separator actually makes a
-- valid directory name. */
-- if (!IS_DIR_SEPARATOR (arg[len - 1])
-- && is_directory (arg, false))
-- {
-- char *tmp = XNEWVEC (char, len + 2);
-- strcpy (tmp, arg);
-- tmp[len] = DIR_SEPARATOR;
-- tmp[++len] = 0;
-- arg = tmp;
-- }
--
-- add_prefix (&exec_prefixes, arg, NULL,
-- PREFIX_PRIORITY_B_OPT, 0, 0);
-- add_prefix (&startfile_prefixes, arg, NULL,
-- PREFIX_PRIORITY_B_OPT, 0, 0);
-- add_prefix (&include_prefixes, arg, NULL,
-- PREFIX_PRIORITY_B_OPT, 0, 0);
-- }
-+ handle_OPT_B (arg);
- validated = true;
- break;
-
-@@ -5928,6 +5974,33 @@
- return 0;
- }
-
-+/* Allow the front end to register a spec function. */
-+
-+void fe_add_spec_function (const char *name, const char *(*func) (int, const char **))
-+{
-+ const struct spec_function *f = lookup_spec_function (name);
-+ struct spec_function *fl;
-+ unsigned int i;
-+
-+ if (f != NULL)
-+ fatal_error (input_location, "spec function (%s) already registered", name);
-+
-+ if (lang_spec_functions == NULL)
-+ lang_spec_functions_length = 1;
-+
-+ lang_spec_functions_length++;
-+ fl = (struct spec_function *) xmalloc (sizeof (const struct spec_function)*lang_spec_functions_length);
-+ for (i=0; i<lang_spec_functions_length-2; i++)
-+ fl[i] = lang_spec_functions[i];
-+ free (lang_spec_functions);
-+ lang_spec_functions = fl;
-+
-+ lang_spec_functions[lang_spec_functions_length-2].name = name;
-+ lang_spec_functions[lang_spec_functions_length-2].func = func;
-+ lang_spec_functions[lang_spec_functions_length-1].name = NULL;
-+ lang_spec_functions[lang_spec_functions_length-1].func = NULL;
-+}
-+
- /* Look up a spec function. */
-
- static const struct spec_function *
-@@ -5939,6 +6012,11 @@
- if (strcmp (sf->name, name) == 0)
- return sf;
-
-+ if (lang_spec_functions != NULL)
-+ for (sf = lang_spec_functions; sf->name != NULL; sf++)
-+ if (strcmp (sf->name, name) == 0)
-+ return sf;
-+
- return NULL;
- }
-
-@@ -7381,6 +7459,8 @@
- accel_dir_suffix, dir_separator_str, NULL);
- just_machine_suffix = concat (spec_machine, dir_separator_str, NULL);
-
-+ lang_register_spec_functions ();
-+
- specs_file = find_a_file (&startfile_prefixes, "specs", R_OK, true);
- /* Read the specs file unless it is a default one. */
- if (specs_file != 0 && strcmp (specs_file, "specs"))
-@@ -8173,7 +8253,8 @@
-
- /* Run ld to link all the compiler output files. */
-
-- if (num_linker_inputs > 0 && !seen_error () && print_subprocess_help < 2)
-+ if (num_linker_inputs > 0 && !seen_error () && print_subprocess_help < 2
-+ && allow_linker)
- {
- int tmp = execution_count;
-
-@@ -8240,7 +8321,7 @@
- /* If options said don't run linker,
- complain about input files to be given to the linker. */
-
-- if (! linker_was_run && !seen_error ())
-+ if (! linker_was_run && !seen_error () && allow_linker)
- for (i = 0; (int) i < n_infiles; i++)
- if (explicit_link_files[i]
- && !(infiles[i].language && infiles[i].language[0] == '*'))
diff --git a/gcc/m2/patches/gcc/6.4.0/07-patches b/gcc/m2/patches/gcc/6.4.0/07-patches
deleted file mode 100644
index 390ead25aa7..00000000000
--- a/gcc/m2/patches/gcc/6.4.0/07-patches
+++ /dev/null
@@ -1,29 +0,0 @@
---- gcc-6.4.0-orig/gcc/gcc.h 2017-07-24 16:03:41.289357730 +0100
-+++ gcc-6.4.0/gcc/gcc.h 2017-07-24 16:23:05.641928541 +0100
-@@ -75,9 +75,17 @@
- extern void record_temp_file (const char *, int, int);
- extern void pfatal_with_name (const char *) ATTRIBUTE_NORETURN;
- extern void set_input (const char *);
-+extern void fe_save_switch (const char *opt, size_t n_args,
-+ const char *const *args, bool validated);
-+extern void fe_B_prefix (const char *arg);
-+extern void fe_add_infile (const char *infile, const char *lang);
-+extern void fe_add_linker_option (const char *option);
-+extern void fe_add_spec_function (const char *name, const char *(*func) (int, const char **));
-
- /* Spec files linked with gcc.c must provide definitions for these. */
-
-+extern void lang_register_spec_functions (void);
-+
- /* Called before processing to change/add/remove arguments. */
- extern void lang_specific_driver (struct cl_decoded_option **,
- unsigned int *, int *);
-@@ -99,4 +107,8 @@
- void *user_data),
- void *user_data);
-
-+/* Default setting is true, but can be overridden by the language
-+ front end to prohibit the linker from being invoked. */
-+extern int allow_linker;
-+
- #endif /* ! GCC_GCC_H */
diff --git a/gcc/m2/patches/gcc/6.4.0/08-patches b/gcc/m2/patches/gcc/6.4.0/08-patches
deleted file mode 100644
index 56b16e0c2a4..00000000000
--- a/gcc/m2/patches/gcc/6.4.0/08-patches
+++ /dev/null
@@ -1,95 +0,0 @@
---- gcc-6.4.0-orig/Makefile.def 2017-07-24 16:03:40.557367730 +0100
-+++ gcc-6.4.0/Makefile.def 2017-07-24 16:24:18.063444640 +0100
-@@ -10,12 +10,12 @@
- // it under the terms of the GNU General Public License as published by
- // the Free Software Foundation; either version 3 of the License, or
- // (at your option) any later version.
--//
-+//
- // This program is distributed in the hope that it will be useful,
- // but WITHOUT ANY WARRANTY; without even the implied warranty of
- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- // GNU General Public License for more details.
--//
-+//
- // You should have received a copy of the GNU General Public License
- // along with this program; see the file COPYING3. If not see
- // <http://www.gnu.org/licenses/>.
-@@ -45,7 +45,7 @@
- missing= TAGS; };
- host_modules= { module= flex; no_check_cross= true; };
- host_modules= { module= gas; bootstrap=true; };
--host_modules= { module= gcc; bootstrap=true;
-+host_modules= { module= gcc; bootstrap=true;
- extra_make_flags="$(EXTRA_GCC_FLAGS)"; };
- host_modules= { module= gmp; lib_path=.libs; bootstrap=true;
- // Work around in-tree gmp configure bug with missing flex.
-@@ -115,7 +115,7 @@
- host_modules= { module= expect; };
- host_modules= { module= guile; };
- host_modules= { module= tk; };
--host_modules= { module= libtermcap; no_check=true;
-+host_modules= { module= libtermcap; no_check=true;
- missing=mostlyclean;
- missing=clean;
- missing=distclean;
-@@ -170,6 +170,7 @@
- target_modules = { module= boehm-gc; };
- target_modules = { module= rda; };
- target_modules = { module= libada; };
-+target_modules = { module= libgm2; lib_path=.libs; };
- target_modules = { module= libgomp; bootstrap= true; lib_path=.libs; };
- target_modules = { module= libitm; lib_path=.libs; };
- target_modules = { module= libatomic; lib_path=.libs; };
-@@ -178,26 +179,26 @@
- // Not all; these are the ones which don't have special options.
- // "depend" indicates that a target depends on another target uniformly
- // for each subdirectory. There can be several such lines per target.
--recursive_targets = { make_target= info;
-+recursive_targets = { make_target= info;
- depend=configure; };
--recursive_targets = { make_target= dvi;
-+recursive_targets = { make_target= dvi;
- depend=configure; };
--recursive_targets = { make_target= pdf;
-+recursive_targets = { make_target= pdf;
- depend=configure; };
--recursive_targets = { make_target= html;
-+recursive_targets = { make_target= html;
- depend=configure; };
--recursive_targets = { make_target= TAGS;
-+recursive_targets = { make_target= TAGS;
- depend=configure; };
--recursive_targets = { make_target= install-info;
-+recursive_targets = { make_target= install-info;
- depend=configure;
- depend=info; };
--recursive_targets = { make_target= install-pdf;
-+recursive_targets = { make_target= install-pdf;
- depend=configure;
- depend=pdf; };
--recursive_targets = { make_target= install-html;
-+recursive_targets = { make_target= install-html;
- depend=configure;
- depend=html; };
--recursive_targets = { make_target= installcheck;
-+recursive_targets = { make_target= installcheck;
- depend=configure; };
- recursive_targets = { make_target= mostlyclean; };
- recursive_targets = { make_target= clean; };
-@@ -285,6 +286,7 @@
- flags_to_pass = { flag= GFORTRAN_FOR_TARGET ; };
- flags_to_pass = { flag= GOC_FOR_TARGET ; };
- flags_to_pass = { flag= GOCFLAGS_FOR_TARGET ; };
-+flags_to_pass = { flag= GM2_FOR_TARGET ; };
- flags_to_pass = { flag= LD_FOR_TARGET ; };
- flags_to_pass = { flag= LIPO_FOR_TARGET ; };
- flags_to_pass = { flag= LDFLAGS_FOR_TARGET ; };
-@@ -618,6 +620,7 @@
- languages = { language=obj-c++; gcc-check-target=check-obj-c++; };
- languages = { language=go; gcc-check-target=check-go;
- lib-check-target=check-target-libgo; };
-+languages = { language=gm2; gcc-check-target=check-gm2; }
-
- // Toplevel bootstrap
- bootstrap_stage = { id=1 ; };
diff --git a/gcc/m2/patches/gcc/6.4.0/09-patches b/gcc/m2/patches/gcc/6.4.0/09-patches
deleted file mode 100644
index 5f3135ea2a3..00000000000
--- a/gcc/m2/patches/gcc/6.4.0/09-patches
+++ /dev/null
@@ -1,743 +0,0 @@
---- gcc-6.4.0-orig/Makefile.in 2017-07-24 16:03:35.133441927 +0100
-+++ gcc-6.4.0/Makefile.in 2017-07-24 16:23:05.657928905 +0100
-@@ -157,6 +157,7 @@
- GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \
- GOC="$(GOC_FOR_BUILD)"; export GOC; \
- GOCFLAGS="$(GOCFLAGS_FOR_BUILD)"; export GOCFLAGS; \
-+ GM2="$(GM2_FOR_BUILD)"; export GM2; \
- DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
- LD="$(LD_FOR_BUILD)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
-@@ -194,6 +195,7 @@
- GCJ="$(GCJ)"; export GCJ; \
- GFORTRAN="$(GFORTRAN)"; export GFORTRAN; \
- GOC="$(GOC)"; export GOC; \
-+ GM2="$(GM2)"; export GM2; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
-@@ -282,6 +284,7 @@
- GCJ="$(GCJ_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GCJ; \
- GFORTRAN="$(GFORTRAN_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GFORTRAN; \
- GOC="$(GOC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GOC; \
-+ GM2="$(GM2_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GM2; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
-@@ -350,6 +353,7 @@
- GCJ_FOR_BUILD = @GCJ_FOR_BUILD@
- GFORTRAN_FOR_BUILD = @GFORTRAN_FOR_BUILD@
- GOC_FOR_BUILD = @GOC_FOR_BUILD@
-+GM2_FOR_BUILD = @GM2_FOR_BUILD@
- LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
- LD_FOR_BUILD = @LD_FOR_BUILD@
- NM_FOR_BUILD = @NM_FOR_BUILD@
-@@ -530,6 +534,7 @@
- GCJ_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCJ_FOR_TARGET@
- GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@
- GOC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GOC_FOR_TARGET@
-+GM2_FOR_TARGET=$(STAGE_CC_WRAPPER) @GM2_FOR_TARGET@
- DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
- LD_FOR_TARGET=@LD_FOR_TARGET@
-
-@@ -578,7 +583,7 @@
-
- # This is the list of directories that may be needed in RPATH_ENVVAR
- # so that programs built for the target machine work.
--TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libsanitizer)$(TARGET_LIB_PATH_libmpx)$(TARGET_LIB_PATH_libvtv)$(TARGET_LIB_PATH_libcilkrts)$(TARGET_LIB_PATH_liboffloadmic)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libgomp)$(TARGET_LIB_PATH_libitm)$(TARGET_LIB_PATH_libatomic)$(HOST_LIB_PATH_gcc)
-+TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libsanitizer)$(TARGET_LIB_PATH_libmpx)$(TARGET_LIB_PATH_libvtv)$(TARGET_LIB_PATH_libcilkrts)$(TARGET_LIB_PATH_liboffloadmic)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libgm2)$(TARGET_LIB_PATH_libgomp)$(TARGET_LIB_PATH_libitm)$(TARGET_LIB_PATH_libatomic)$(HOST_LIB_PATH_gcc)
-
- @if target-libstdc++-v3
- TARGET_LIB_PATH_libstdc++-v3 = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:
-@@ -608,6 +613,10 @@
- TARGET_LIB_PATH_libssp = $$r/$(TARGET_SUBDIR)/libssp/.libs:
- @endif target-libssp
-
-+@if target-libgm2
-+TARGET_LIB_PATH_libgm2 = $$r/$(TARGET_SUBDIR)/libgm2/.libs:
-+@endif target-libgm2
-+
- @if target-libgomp
- TARGET_LIB_PATH_libgomp = $$r/$(TARGET_SUBDIR)/libgomp/.libs:
- @endif target-libgomp
-@@ -754,6 +763,7 @@
- "GFORTRAN_FOR_TARGET=$(GFORTRAN_FOR_TARGET)" \
- "GOC_FOR_TARGET=$(GOC_FOR_TARGET)" \
- "GOCFLAGS_FOR_TARGET=$(GOCFLAGS_FOR_TARGET)" \
-+ "GM2_FOR_TARGET=$(GM2_FOR_TARGET)" \
- "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
- "LIPO_FOR_TARGET=$(LIPO_FOR_TARGET)" \
- "LDFLAGS_FOR_TARGET=$(LDFLAGS_FOR_TARGET)" \
-@@ -808,6 +818,7 @@
- 'GCJ=$(GCJ)' \
- 'GFORTRAN=$(GFORTRAN)' \
- 'GOC=$(GOC)' \
-+ 'GM2=$(GM2)' \
- 'LD=$(LD)' \
- 'LIPO=$(LIPO)' \
- 'NM=$(NM)' \
-@@ -864,6 +875,7 @@
- 'GFORTRAN=$$(GFORTRAN_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
- 'GOC=$$(GOC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
- 'GOCFLAGS=$$(GOCFLAGS_FOR_TARGET)' \
-+ 'GM2=$$(GM2_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
- 'LD=$(COMPILER_LD_FOR_TARGET)' \
- 'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \
- 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
-@@ -975,6 +987,7 @@
- maybe-configure-target-boehm-gc \
- maybe-configure-target-rda \
- maybe-configure-target-libada \
-+ maybe-configure-target-libgm2 \
- maybe-configure-target-libgomp \
- maybe-configure-target-libitm \
- maybe-configure-target-libatomic
-@@ -1142,6 +1155,7 @@
- all-target: maybe-all-target-boehm-gc
- all-target: maybe-all-target-rda
- all-target: maybe-all-target-libada
-+all-target: maybe-all-target-libgm2
- @if target-libgomp-no-bootstrap
- all-target: maybe-all-target-libgomp
- @endif target-libgomp-no-bootstrap
-@@ -1236,6 +1250,7 @@
- info-target: maybe-info-target-boehm-gc
- info-target: maybe-info-target-rda
- info-target: maybe-info-target-libada
-+info-target: maybe-info-target-libgm2
- info-target: maybe-info-target-libgomp
- info-target: maybe-info-target-libitm
- info-target: maybe-info-target-libatomic
-@@ -1323,6 +1338,7 @@
- dvi-target: maybe-dvi-target-boehm-gc
- dvi-target: maybe-dvi-target-rda
- dvi-target: maybe-dvi-target-libada
-+dvi-target: maybe-dvi-target-libgm2
- dvi-target: maybe-dvi-target-libgomp
- dvi-target: maybe-dvi-target-libitm
- dvi-target: maybe-dvi-target-libatomic
-@@ -1410,6 +1426,7 @@
- pdf-target: maybe-pdf-target-boehm-gc
- pdf-target: maybe-pdf-target-rda
- pdf-target: maybe-pdf-target-libada
-+pdf-target: maybe-pdf-target-libgm2
- pdf-target: maybe-pdf-target-libgomp
- pdf-target: maybe-pdf-target-libitm
- pdf-target: maybe-pdf-target-libatomic
-@@ -1497,6 +1514,7 @@
- html-target: maybe-html-target-boehm-gc
- html-target: maybe-html-target-rda
- html-target: maybe-html-target-libada
-+html-target: maybe-html-target-libgm2
- html-target: maybe-html-target-libgomp
- html-target: maybe-html-target-libitm
- html-target: maybe-html-target-libatomic
-@@ -1584,6 +1602,7 @@
- TAGS-target: maybe-TAGS-target-boehm-gc
- TAGS-target: maybe-TAGS-target-rda
- TAGS-target: maybe-TAGS-target-libada
-+TAGS-target: maybe-TAGS-target-libgm2
- TAGS-target: maybe-TAGS-target-libgomp
- TAGS-target: maybe-TAGS-target-libitm
- TAGS-target: maybe-TAGS-target-libatomic
-@@ -1671,6 +1690,7 @@
- install-info-target: maybe-install-info-target-boehm-gc
- install-info-target: maybe-install-info-target-rda
- install-info-target: maybe-install-info-target-libada
-+install-info-target: maybe-install-info-target-libgm2
- install-info-target: maybe-install-info-target-libgomp
- install-info-target: maybe-install-info-target-libitm
- install-info-target: maybe-install-info-target-libatomic
-@@ -1758,6 +1778,7 @@
- install-pdf-target: maybe-install-pdf-target-boehm-gc
- install-pdf-target: maybe-install-pdf-target-rda
- install-pdf-target: maybe-install-pdf-target-libada
-+install-pdf-target: maybe-install-pdf-target-libgm2
- install-pdf-target: maybe-install-pdf-target-libgomp
- install-pdf-target: maybe-install-pdf-target-libitm
- install-pdf-target: maybe-install-pdf-target-libatomic
-@@ -1845,6 +1866,7 @@
- install-html-target: maybe-install-html-target-boehm-gc
- install-html-target: maybe-install-html-target-rda
- install-html-target: maybe-install-html-target-libada
-+install-html-target: maybe-install-html-target-libgm2
- install-html-target: maybe-install-html-target-libgomp
- install-html-target: maybe-install-html-target-libitm
- install-html-target: maybe-install-html-target-libatomic
-@@ -1932,6 +1954,7 @@
- installcheck-target: maybe-installcheck-target-boehm-gc
- installcheck-target: maybe-installcheck-target-rda
- installcheck-target: maybe-installcheck-target-libada
-+installcheck-target: maybe-installcheck-target-libgm2
- installcheck-target: maybe-installcheck-target-libgomp
- installcheck-target: maybe-installcheck-target-libitm
- installcheck-target: maybe-installcheck-target-libatomic
-@@ -2019,6 +2042,7 @@
- mostlyclean-target: maybe-mostlyclean-target-boehm-gc
- mostlyclean-target: maybe-mostlyclean-target-rda
- mostlyclean-target: maybe-mostlyclean-target-libada
-+mostlyclean-target: maybe-mostlyclean-target-libgm2
- mostlyclean-target: maybe-mostlyclean-target-libgomp
- mostlyclean-target: maybe-mostlyclean-target-libitm
- mostlyclean-target: maybe-mostlyclean-target-libatomic
-@@ -2106,6 +2130,7 @@
- clean-target: maybe-clean-target-boehm-gc
- clean-target: maybe-clean-target-rda
- clean-target: maybe-clean-target-libada
-+clean-target: maybe-clean-target-libgm2
- clean-target: maybe-clean-target-libgomp
- clean-target: maybe-clean-target-libitm
- clean-target: maybe-clean-target-libatomic
-@@ -2193,6 +2218,7 @@
- distclean-target: maybe-distclean-target-boehm-gc
- distclean-target: maybe-distclean-target-rda
- distclean-target: maybe-distclean-target-libada
-+distclean-target: maybe-distclean-target-libgm2
- distclean-target: maybe-distclean-target-libgomp
- distclean-target: maybe-distclean-target-libitm
- distclean-target: maybe-distclean-target-libatomic
-@@ -2280,6 +2306,7 @@
- maintainer-clean-target: maybe-maintainer-clean-target-boehm-gc
- maintainer-clean-target: maybe-maintainer-clean-target-rda
- maintainer-clean-target: maybe-maintainer-clean-target-libada
-+maintainer-clean-target: maybe-maintainer-clean-target-libgm2
- maintainer-clean-target: maybe-maintainer-clean-target-libgomp
- maintainer-clean-target: maybe-maintainer-clean-target-libitm
- maintainer-clean-target: maybe-maintainer-clean-target-libatomic
-@@ -2423,6 +2450,7 @@
- maybe-check-target-boehm-gc \
- maybe-check-target-rda \
- maybe-check-target-libada \
-+ maybe-check-target-libgm2 \
- maybe-check-target-libgomp \
- maybe-check-target-libitm \
- maybe-check-target-libatomic
-@@ -2606,6 +2634,7 @@
- maybe-install-target-boehm-gc \
- maybe-install-target-rda \
- maybe-install-target-libada \
-+ maybe-install-target-libgm2 \
- maybe-install-target-libgomp \
- maybe-install-target-libitm \
- maybe-install-target-libatomic
-@@ -2713,6 +2742,7 @@
- maybe-install-strip-target-boehm-gc \
- maybe-install-strip-target-rda \
- maybe-install-strip-target-libada \
-+ maybe-install-strip-target-libgm2 \
- maybe-install-strip-target-libgomp \
- maybe-install-strip-target-libitm \
- maybe-install-strip-target-libatomic
-@@ -45795,6 +45825,464 @@
-
-
-
-+.PHONY: configure-target-libgm2 maybe-configure-target-libgm2
-+maybe-configure-target-libgm2:
-+@if gcc-bootstrap
-+configure-target-libgm2: stage_current
-+@endif gcc-bootstrap
-+@if target-libgm2
-+maybe-configure-target-libgm2: configure-target-libgm2
-+configure-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ echo "Checking multilib configuration for libgm2..."; \
-+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgm2 ; \
-+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgm2/multilib.tmp 2> /dev/null ; \
-+ if test -r $(TARGET_SUBDIR)/libgm2/multilib.out; then \
-+ if cmp -s $(TARGET_SUBDIR)/libgm2/multilib.tmp $(TARGET_SUBDIR)/libgm2/multilib.out; then \
-+ rm -f $(TARGET_SUBDIR)/libgm2/multilib.tmp; \
-+ else \
-+ rm -f $(TARGET_SUBDIR)/libgm2/Makefile; \
-+ mv $(TARGET_SUBDIR)/libgm2/multilib.tmp $(TARGET_SUBDIR)/libgm2/multilib.out; \
-+ fi; \
-+ else \
-+ mv $(TARGET_SUBDIR)/libgm2/multilib.tmp $(TARGET_SUBDIR)/libgm2/multilib.out; \
-+ fi; \
-+ test ! -f $(TARGET_SUBDIR)/libgm2/Makefile || exit 0; \
-+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgm2 ; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo Configuring in $(TARGET_SUBDIR)/libgm2; \
-+ cd "$(TARGET_SUBDIR)/libgm2" || exit 1; \
-+ case $(srcdir) in \
-+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-+ *) topdir=`echo $(TARGET_SUBDIR)/libgm2/ | \
-+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-+ esac; \
-+ module_srcdir=libgm2; \
-+ rm -f no-such-file || : ; \
-+ CONFIG_SITE=no-such-file $(SHELL) \
-+ $$s/$$module_srcdir/configure \
-+ --srcdir=$${topdir}/$$module_srcdir \
-+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
-+ --target=${target_alias} \
-+ || exit 1
-+@endif target-libgm2
-+
-+
-+
-+
-+
-+.PHONY: all-target-libgm2 maybe-all-target-libgm2
-+maybe-all-target-libgm2:
-+@if gcc-bootstrap
-+all-target-libgm2: stage_current
-+@endif gcc-bootstrap
-+@if target-libgm2
-+TARGET-target-libgm2=all
-+maybe-all-target-libgm2: all-target-libgm2
-+all-target-libgm2: configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
-+ $(TARGET-target-libgm2))
-+@endif target-libgm2
-+
-+
-+
-+
-+
-+.PHONY: check-target-libgm2 maybe-check-target-libgm2
-+maybe-check-target-libgm2:
-+@if target-libgm2
-+maybe-check-target-libgm2: check-target-libgm2
-+
-+check-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
-+
-+@endif target-libgm2
-+
-+.PHONY: install-target-libgm2 maybe-install-target-libgm2
-+maybe-install-target-libgm2:
-+@if target-libgm2
-+maybe-install-target-libgm2: install-target-libgm2
-+
-+install-target-libgm2: installdirs
-+ @: $(MAKE); $(unstage)
-+ @r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
-+
-+@endif target-libgm2
-+
-+.PHONY: install-strip-target-libgm2 maybe-install-strip-target-libgm2
-+maybe-install-strip-target-libgm2:
-+@if target-libgm2
-+maybe-install-strip-target-libgm2: install-strip-target-libgm2
-+
-+install-strip-target-libgm2: installdirs
-+ @: $(MAKE); $(unstage)
-+ @r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install-strip)
-+
-+@endif target-libgm2
-+
-+# Other targets (info, dvi, pdf, etc.)
-+
-+.PHONY: maybe-info-target-libgm2 info-target-libgm2
-+maybe-info-target-libgm2:
-+@if target-libgm2
-+maybe-info-target-libgm2: info-target-libgm2
-+
-+info-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing info in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ info) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-dvi-target-libgm2 dvi-target-libgm2
-+maybe-dvi-target-libgm2:
-+@if target-libgm2
-+maybe-dvi-target-libgm2: dvi-target-libgm2
-+
-+dvi-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing dvi in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ dvi) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-pdf-target-libgm2 pdf-target-libgm2
-+maybe-pdf-target-libgm2:
-+@if target-libgm2
-+maybe-pdf-target-libgm2: pdf-target-libgm2
-+
-+pdf-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing pdf in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ pdf) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-html-target-libgm2 html-target-libgm2
-+maybe-html-target-libgm2:
-+@if target-libgm2
-+maybe-html-target-libgm2: html-target-libgm2
-+
-+html-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing html in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ html) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-TAGS-target-libgm2 TAGS-target-libgm2
-+maybe-TAGS-target-libgm2:
-+@if target-libgm2
-+maybe-TAGS-target-libgm2: TAGS-target-libgm2
-+
-+TAGS-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing TAGS in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ TAGS) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-install-info-target-libgm2 install-info-target-libgm2
-+maybe-install-info-target-libgm2:
-+@if target-libgm2
-+maybe-install-info-target-libgm2: install-info-target-libgm2
-+
-+install-info-target-libgm2: \
-+ configure-target-libgm2 \
-+ info-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing install-info in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ install-info) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-install-pdf-target-libgm2 install-pdf-target-libgm2
-+maybe-install-pdf-target-libgm2:
-+@if target-libgm2
-+maybe-install-pdf-target-libgm2: install-pdf-target-libgm2
-+
-+install-pdf-target-libgm2: \
-+ configure-target-libgm2 \
-+ pdf-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ install-pdf) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-install-html-target-libgm2 install-html-target-libgm2
-+maybe-install-html-target-libgm2:
-+@if target-libgm2
-+maybe-install-html-target-libgm2: install-html-target-libgm2
-+
-+install-html-target-libgm2: \
-+ configure-target-libgm2 \
-+ html-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing install-html in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ install-html) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-installcheck-target-libgm2 installcheck-target-libgm2
-+maybe-installcheck-target-libgm2:
-+@if target-libgm2
-+maybe-installcheck-target-libgm2: installcheck-target-libgm2
-+
-+installcheck-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing installcheck in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ installcheck) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-mostlyclean-target-libgm2 mostlyclean-target-libgm2
-+maybe-mostlyclean-target-libgm2:
-+@if target-libgm2
-+maybe-mostlyclean-target-libgm2: mostlyclean-target-libgm2
-+
-+mostlyclean-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ mostlyclean) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-clean-target-libgm2 clean-target-libgm2
-+maybe-clean-target-libgm2:
-+@if target-libgm2
-+maybe-clean-target-libgm2: clean-target-libgm2
-+
-+clean-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing clean in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ clean) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-distclean-target-libgm2 distclean-target-libgm2
-+maybe-distclean-target-libgm2:
-+@if target-libgm2
-+maybe-distclean-target-libgm2: distclean-target-libgm2
-+
-+distclean-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing distclean in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ distclean) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-maintainer-clean-target-libgm2 maintainer-clean-target-libgm2
-+maybe-maintainer-clean-target-libgm2:
-+@if target-libgm2
-+maybe-maintainer-clean-target-libgm2: maintainer-clean-target-libgm2
-+
-+maintainer-clean-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0 ; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libgm2" ; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ maintainer-clean) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+
-+
-+
-+
- .PHONY: configure-target-libgomp maybe-configure-target-libgomp
- maybe-configure-target-libgomp:
- @if gcc-bootstrap
-@@ -47683,6 +48171,14 @@
-
- @endif target-libatomic
-
-+.PHONY: check-gcc-gm2 check-gm2
-+check-gcc-gm2:
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(HOST_EXPORTS) \
-+ (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-gm2);
-+check-gm2: check-gcc-gm2
-+
-
-
- @if target-libgomp
-@@ -49998,6 +50494,7 @@
- configure-target-boehm-gc: stage_last
- configure-target-rda: stage_last
- configure-target-libada: stage_last
-+configure-target-libgm2: stage_last
- configure-stage1-target-libgomp: maybe-all-stage1-gcc
- configure-stage2-target-libgomp: maybe-all-stage2-gcc
- configure-stage3-target-libgomp: maybe-all-stage3-gcc
-@@ -50032,6 +50529,7 @@
- configure-target-boehm-gc: maybe-all-gcc
- configure-target-rda: maybe-all-gcc
- configure-target-libada: maybe-all-gcc
-+configure-target-libgm2: maybe-all-gcc
- configure-target-libgomp: maybe-all-gcc
- configure-target-libitm: maybe-all-gcc
- configure-target-libatomic: maybe-all-gcc
-@@ -50999,6 +51497,7 @@
- configure-target-boehm-gc: maybe-all-target-libgcc
- configure-target-rda: maybe-all-target-libgcc
- configure-target-libada: maybe-all-target-libgcc
-+configure-target-libgm2: maybe-all-target-libgcc
- configure-target-libgomp: maybe-all-target-libgcc
- configure-target-libitm: maybe-all-target-libgcc
- configure-target-libatomic: maybe-all-target-libgcc
-@@ -51052,6 +51551,8 @@
-
- configure-target-libada: maybe-all-target-newlib maybe-all-target-libgloss
-
-+configure-target-libgm2: maybe-all-target-newlib maybe-all-target-libgloss
-+
- configure-target-libgomp: maybe-all-target-newlib maybe-all-target-libgloss
-
- configure-target-libitm: maybe-all-target-newlib maybe-all-target-libgloss
diff --git a/gcc/m2/patches/gcc/6.4.0/10-patches b/gcc/m2/patches/gcc/6.4.0/10-patches
deleted file mode 100644
index 9804ac0b41e..00000000000
--- a/gcc/m2/patches/gcc/6.4.0/10-patches
+++ /dev/null
@@ -1,58 +0,0 @@
---- gcc-6.4.0-orig/Makefile.tpl 2017-07-24 16:03:40.557367730 +0100
-+++ gcc-6.4.0/Makefile.tpl 2017-07-24 16:23:05.661928996 +0100
-@@ -160,6 +160,7 @@
- GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \
- GOC="$(GOC_FOR_BUILD)"; export GOC; \
- GOCFLAGS="$(GOCFLAGS_FOR_BUILD)"; export GOCFLAGS; \
-+ GM2="$(GM2_FOR_BUILD)"; export GM2; \
- DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
- LD="$(LD_FOR_BUILD)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
-@@ -197,6 +198,7 @@
- GCJ="$(GCJ)"; export GCJ; \
- GFORTRAN="$(GFORTRAN)"; export GFORTRAN; \
- GOC="$(GOC)"; export GOC; \
-+ GM2="$(GM2)"; export GM2; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
-@@ -285,6 +287,7 @@
- GCJ="$(GCJ_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GCJ; \
- GFORTRAN="$(GFORTRAN_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GFORTRAN; \
- GOC="$(GOC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GOC; \
-+ GM2="$(GM2_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GM2; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
-@@ -353,6 +356,7 @@
- GCJ_FOR_BUILD = @GCJ_FOR_BUILD@
- GFORTRAN_FOR_BUILD = @GFORTRAN_FOR_BUILD@
- GOC_FOR_BUILD = @GOC_FOR_BUILD@
-+GM2_FOR_BUILD = @GM2_FOR_BUILD@
- LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
- LD_FOR_BUILD = @LD_FOR_BUILD@
- NM_FOR_BUILD = @NM_FOR_BUILD@
-@@ -483,6 +487,7 @@
- GCJ_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCJ_FOR_TARGET@
- GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@
- GOC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GOC_FOR_TARGET@
-+GM2_FOR_TARGET=$(STAGE_CC_WRAPPER) @GM2_FOR_TARGET@
- DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
- LD_FOR_TARGET=@LD_FOR_TARGET@
-
-@@ -609,6 +614,7 @@
- 'GCJ=$(GCJ)' \
- 'GFORTRAN=$(GFORTRAN)' \
- 'GOC=$(GOC)' \
-+ 'GM2=$(GM2)' \
- 'LD=$(LD)' \
- 'LIPO=$(LIPO)' \
- 'NM=$(NM)' \
-@@ -665,6 +671,7 @@
- 'GFORTRAN=$$(GFORTRAN_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
- 'GOC=$$(GOC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
- 'GOCFLAGS=$$(GOCFLAGS_FOR_TARGET)' \
-+ 'GM2=$$(GM2_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
- 'LD=$(COMPILER_LD_FOR_TARGET)' \
- 'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \
- 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
diff --git a/gcc/m2/patches/gcc/6.4.0/11-patches b/gcc/m2/patches/gcc/6.4.0/11-patches
deleted file mode 100644
index 3837891029b..00000000000
--- a/gcc/m2/patches/gcc/6.4.0/11-patches
+++ /dev/null
@@ -1,16 +0,0 @@
---- gcc-6.4.0-orig/gcc/tree-ssa-loop-im.c 2017-07-24 16:03:41.285357784 +0100
-+++ gcc-6.4.0/gcc/tree-ssa-loop-im.c 2017-07-24 16:23:05.661928996 +0100
-@@ -602,7 +602,6 @@
- hash = iterative_hash_expr (*mem, 0);
- ref = memory_accesses.refs->find_with_hash (*mem, hash);
-
-- gcc_assert (ref != NULL);
- return ref;
- }
-
-@@ -2600,5 +2599,3 @@
- {
- return new pass_lim (ctxt);
- }
--
--
diff --git a/gcc/m2/patches/gcc/trunc/01-patches b/gcc/m2/patches/gcc/trunc/01-patches
deleted file mode 100644
index e580fea2fc1..00000000000
--- a/gcc/m2/patches/gcc/trunc/01-patches
+++ /dev/null
@@ -1,319 +0,0 @@
---- gcc-versionno-orig/configure 2018-04-13 16:08:32.998838551 +0100
-+++ gcc-versionno/configure 2018-04-14 01:45:29.684712479 +0100
-@@ -580,6 +580,7 @@
- DLLTOOL_FOR_TARGET
- AS_FOR_TARGET
- AR_FOR_TARGET
-+GM2_FOR_TARGET
- GOC_FOR_TARGET
- GFORTRAN_FOR_TARGET
- GCC_FOR_TARGET
-@@ -612,6 +613,7 @@
- NM_FOR_BUILD
- LD_FOR_BUILD
- LDFLAGS_FOR_BUILD
-+GM2_FOR_BUILD
- GOC_FOR_BUILD
- GFORTRAN_FOR_BUILD
- DLLTOOL_FOR_BUILD
-@@ -755,6 +757,7 @@
- enable_libquadmath
- enable_libquadmath_support
- enable_libada
-+enable_libgm2
- enable_libssp
- enable_libstdcxx
- enable_liboffloadmic
-@@ -830,6 +833,7 @@
- GCC_FOR_TARGET
- GFORTRAN_FOR_TARGET
- GOC_FOR_TARGET
-+GM2_FOR_TARGET
- AR_FOR_TARGET
- AS_FOR_TARGET
- DLLTOOL_FOR_TARGET
-@@ -1484,6 +1488,7 @@
- --disable-libquadmath-support
- disable libquadmath support for Fortran
- --enable-libada build libada directory
-+ --enable-libgm2 build libgm2 directory
- --enable-libssp build libssp directory
- --disable-libstdcxx do not build libstdc++-v3 directory
- --enable-liboffloadmic=ARG
-@@ -1613,6 +1618,8 @@
- GFORTRAN for the target
- GOC_FOR_TARGET
- GOC for the target
-+ GM2_FOR_TARGET
-+ GM2 for the target
- AR_FOR_TARGET
- AR for the target
- AS_FOR_TARGET
-@@ -2765,6 +2772,7 @@
- target-libffi \
- target-libobjc \
- target-libada \
-+ target-libgm2 \
- target-libgo"
-
- # these tools are built using the target libraries, and are intended to
-@@ -3092,6 +3100,15 @@
- noconfigdirs="$noconfigdirs gnattools"
- fi
-
-+# Check whether --enable-libgm2 was given.
-+if test "${enable_libgm2+set}" = set; then :
-+ enableval=$enable_libgm2; ENABLE_LIBGM2=$enableval
-+else
-+ ENABLE_LIBGM2=yes
-+fi
-+
-+
-+
- # Check whether --enable-libssp was given.
- if test "${enable_libssp+set}" = set; then :
- enableval=$enable_libssp; ENABLE_LIBSSP=$enableval
-@@ -3936,6 +3953,7 @@
- CXX_FOR_BUILD=${CXX_FOR_BUILD-g++}
- GFORTRAN_FOR_BUILD=${GFORTRAN_FOR_BUILD-gfortran}
- GOC_FOR_BUILD=${GOC_FOR_BUILD-gccgo}
-+ GM2_FOR_BUILD=${GM2_FOR_BUILD-gm2}
- DLLTOOL_FOR_BUILD=${DLLTOOL_FOR_BUILD-dlltool}
- LD_FOR_BUILD=${LD_FOR_BUILD-ld}
- NM_FOR_BUILD=${NM_FOR_BUILD-nm}
-@@ -3949,6 +3967,7 @@
- CXX_FOR_BUILD="\$(CXX)"
- GFORTRAN_FOR_BUILD="\$(GFORTRAN)"
- GOC_FOR_BUILD="\$(GOC)"
-+ GM2_FOR_BUILD="\$(GM2)"
- DLLTOOL_FOR_BUILD="\$(DLLTOOL)"
- LD_FOR_BUILD="\$(LD)"
- NM_FOR_BUILD="\$(NM)"
-@@ -7666,6 +7685,7 @@
-
-
-
-+
- # Generate default definitions for YACC, M4, LEX and other programs that run
- # on the build machine. These are used if the Makefile can't locate these
- # programs in objdir.
-@@ -10720,6 +10740,167 @@
-
-
-
-+if test -n "$GM2_FOR_TARGET"; then
-+ ac_cv_prog_GM2_FOR_TARGET=$GM2_FOR_TARGET
-+elif test -n "$ac_cv_prog_GM2_FOR_TARGET"; then
-+ GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
-+fi
-+
-+if test -n "$ac_cv_prog_GM2_FOR_TARGET"; then
-+ for ncn_progname in gm2; do
-+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
-+set dummy ${ncn_progname}; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_GM2_FOR_TARGET+set}" = set; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ if test -n "$GM2_FOR_TARGET"; then
-+ ac_cv_prog_GM2_FOR_TARGET="$GM2_FOR_TARGET" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+ ac_cv_prog_GM2_FOR_TARGET="${ncn_progname}"
-+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+ break 2
-+ fi
-+done
-+ done
-+IFS=$as_save_IFS
-+
-+fi
-+fi
-+GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
-+if test -n "$GM2_FOR_TARGET"; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GM2_FOR_TARGET" >&5
-+$as_echo "$GM2_FOR_TARGET" >&6; }
-+else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
-+
-+
-+ done
-+fi
-+
-+if test -z "$ac_cv_prog_GM2_FOR_TARGET" && test -n "$with_build_time_tools"; then
-+ for ncn_progname in gm2; do
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
-+$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
-+ if test -x $with_build_time_tools/${ncn_progname}; then
-+ ac_cv_prog_GM2_FOR_TARGET=$with_build_time_tools/${ncn_progname}
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
-+ break
-+ else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+ fi
-+ done
-+fi
-+
-+if test -z "$ac_cv_prog_GM2_FOR_TARGET"; then
-+ for ncn_progname in gm2; do
-+ if test -n "$ncn_target_tool_prefix"; then
-+ # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
-+set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_GM2_FOR_TARGET+set}" = set; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ if test -n "$GM2_FOR_TARGET"; then
-+ ac_cv_prog_GM2_FOR_TARGET="$GM2_FOR_TARGET" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+ ac_cv_prog_GM2_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
-+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+ break 2
-+ fi
-+done
-+ done
-+IFS=$as_save_IFS
-+
-+fi
-+fi
-+GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
-+if test -n "$GM2_FOR_TARGET"; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GM2_FOR_TARGET" >&5
-+$as_echo "$GM2_FOR_TARGET" >&6; }
-+else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
-+
-+
-+ fi
-+ if test -z "$ac_cv_prog_GM2_FOR_TARGET" && test $build = $target ; then
-+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
-+set dummy ${ncn_progname}; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_GM2_FOR_TARGET+set}" = set; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ if test -n "$GM2_FOR_TARGET"; then
-+ ac_cv_prog_GM2_FOR_TARGET="$GM2_FOR_TARGET" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+ ac_cv_prog_GM2_FOR_TARGET="${ncn_progname}"
-+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+ break 2
-+ fi
-+done
-+ done
-+IFS=$as_save_IFS
-+
-+fi
-+fi
-+GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
-+if test -n "$GM2_FOR_TARGET"; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GM2_FOR_TARGET" >&5
-+$as_echo "$GM2_FOR_TARGET" >&6; }
-+else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
-+
-+
-+ fi
-+ test -n "$ac_cv_prog_GM2_FOR_TARGET" && break
-+ done
-+fi
-+
-+if test -z "$ac_cv_prog_GM2_FOR_TARGET" ; then
-+ set dummy gm2
-+ if test $build = $target ; then
-+ GM2_FOR_TARGET="$2"
-+ else
-+ GM2_FOR_TARGET="${ncn_target_tool_prefix}$2"
-+ fi
-+else
-+ GM2_FOR_TARGET="$ac_cv_prog_GM2_FOR_TARGET"
-+fi
-+
-+
-+
- cat > conftest.c << \EOF
- #ifdef __GNUC__
- gcc_yay;
-@@ -14110,6 +14291,51 @@
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
- $as_echo "host tool" >&6; }
- else
-+ # We need a cross tool
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
-+$as_echo "pre-installed" >&6; }
-+ fi
-+fi
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target gm2" >&5
-+$as_echo_n "checking where to find the target gm2... " >&6; }
-+if test "x${build}" != "x${host}" ; then
-+ if expr "x$GM2_FOR_TARGET" : "x/" > /dev/null; then
-+ # We already found the complete path
-+ ac_dir=`dirname $GM2_FOR_TARGET`
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
-+$as_echo "pre-installed in $ac_dir" >&6; }
-+ else
-+ # Canadian cross, just use what we found
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
-+$as_echo "pre-installed" >&6; }
-+ fi
-+else
-+ ok=yes
-+ case " ${configdirs} " in
-+ *" gcc "*) ;;
-+ *) ok=no ;;
-+ esac
-+ case ,${enable_languages}, in
-+ *,gm2,*) ;;
-+ *) ok=no ;;
-+ esac
-+ if test $ok = yes; then
-+ # An in-tree tool is available and we can use it
-+ GM2_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgm2 -B$$r/$(HOST_SUBDIR)/gcc/'
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
-+$as_echo "just compiled" >&6; }
-+ elif expr "x$GM2_FOR_TARGET" : "x/" > /dev/null; then
-+ # We already found the complete path
-+ ac_dir=`dirname $GM2_FOR_TARGET`
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
-+$as_echo "pre-installed in $ac_dir" >&6; }
-+ elif test "x$target" = "x$host"; then
-+ # We can use an host tool
-+ GM2_FOR_TARGET='$(GM2)'
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
-+$as_echo "host tool" >&6; }
-+ else
- # We need a cross tool
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
- $as_echo "pre-installed" >&6; }
diff --git a/gcc/m2/patches/gcc/trunc/02-patches b/gcc/m2/patches/gcc/trunc/02-patches
deleted file mode 100644
index f8d12739875..00000000000
--- a/gcc/m2/patches/gcc/trunc/02-patches
+++ /dev/null
@@ -1,64 +0,0 @@
---- gcc-versionno-orig/configure.ac 2018-04-13 16:08:32.978838666 +0100
-+++ gcc-versionno/configure.ac 2018-04-14 01:29:42.341961879 +0100
-@@ -164,6 +164,7 @@
- target-libffi \
- target-libobjc \
- target-libada \
-+ target-libgm2 \
- target-libgo"
-
- # these tools are built using the target libraries, and are intended to
-@@ -451,6 +452,12 @@
- noconfigdirs="$noconfigdirs gnattools"
- fi
-
-+AC_ARG_ENABLE(libgm2,
-+[AS_HELP_STRING([--enable-libgm2], [build libgm2 directory])],
-+ENABLE_LIBGM2=$enableval,
-+ENABLE_LIBGM2=yes)
-+
-+
- AC_ARG_ENABLE(libssp,
- [AS_HELP_STRING([--enable-libssp], [build libssp directory])],
- ENABLE_LIBSSP=$enableval,
-@@ -1248,6 +1255,7 @@
- CXX_FOR_BUILD=${CXX_FOR_BUILD-g++}
- GFORTRAN_FOR_BUILD=${GFORTRAN_FOR_BUILD-gfortran}
- GOC_FOR_BUILD=${GOC_FOR_BUILD-gccgo}
-+ GM2_FOR_BUILD=${GM2_FOR_BUILD-gm2}
- DLLTOOL_FOR_BUILD=${DLLTOOL_FOR_BUILD-dlltool}
- LD_FOR_BUILD=${LD_FOR_BUILD-ld}
- NM_FOR_BUILD=${NM_FOR_BUILD-nm}
-@@ -1261,6 +1269,7 @@
- CXX_FOR_BUILD="\$(CXX)"
- GFORTRAN_FOR_BUILD="\$(GFORTRAN)"
- GOC_FOR_BUILD="\$(GOC)"
-+ GM2_FOR_BUILD="\$(GM2)"
- DLLTOOL_FOR_BUILD="\$(DLLTOOL)"
- LD_FOR_BUILD="\$(LD)"
- NM_FOR_BUILD="\$(NM)"
-@@ -3248,6 +3257,7 @@
- AC_SUBST(DLLTOOL_FOR_BUILD)
- AC_SUBST(GFORTRAN_FOR_BUILD)
- AC_SUBST(GOC_FOR_BUILD)
-+AC_SUBST(GM2_FOR_BUILD)
- AC_SUBST(LDFLAGS_FOR_BUILD)
- AC_SUBST(LD_FOR_BUILD)
- AC_SUBST(NM_FOR_BUILD)
-@@ -3357,6 +3367,7 @@
- NCN_STRICT_CHECK_TARGET_TOOLS(GCC_FOR_TARGET, gcc, ${CC_FOR_TARGET})
- NCN_STRICT_CHECK_TARGET_TOOLS(GFORTRAN_FOR_TARGET, gfortran)
- NCN_STRICT_CHECK_TARGET_TOOLS(GOC_FOR_TARGET, gccgo)
-+NCN_STRICT_CHECK_TARGET_TOOLS(GM2_FOR_TARGET, gm2)
-
- ACX_CHECK_INSTALLED_TARGET_TOOL(AR_FOR_TARGET, ar)
- ACX_CHECK_INSTALLED_TARGET_TOOL(AS_FOR_TARGET, as)
-@@ -3390,6 +3401,8 @@
- [gcc/gfortran -B$$r/$(HOST_SUBDIR)/gcc/], fortran)
- GCC_TARGET_TOOL(gccgo, GOC_FOR_TARGET, GOC,
- [gcc/gccgo -B$$r/$(HOST_SUBDIR)/gcc/], go)
-+GCC_TARGET_TOOL(gm2, GM2_FOR_TARGET, GM2,
-+ [gcc/xgm2 -B$$r/$(HOST_SUBDIR)/gcc/], gm2)
- GCC_TARGET_TOOL(ld, LD_FOR_TARGET, LD, [ld/ld-new])
- GCC_TARGET_TOOL(lipo, LIPO_FOR_TARGET, LIPO)
- GCC_TARGET_TOOL(nm, NM_FOR_TARGET, NM, [binutils/nm-new])
diff --git a/gcc/m2/patches/gcc/trunc/03-patches b/gcc/m2/patches/gcc/trunc/03-patches
deleted file mode 100644
index de7b33e7f1c..00000000000
--- a/gcc/m2/patches/gcc/trunc/03-patches
+++ /dev/null
@@ -1,12 +0,0 @@
---- gcc-versionno-orig/gcc/c/gccspec.c 2018-04-13 16:08:36.070820977 +0100
-+++ gcc-versionno/gcc/c/gccspec.c 2018-04-14 01:29:42.341961879 +0100
-@@ -105,3 +105,9 @@
-
- /* Number of extra output files that lang_specific_pre_link may generate. */
- int lang_specific_extra_outfiles = 0; /* Not used for C. */
-+
-+/* lang_register_spec_functions. Not used for C. */
-+void
-+lang_register_spec_functions (void)
-+{
-+}
diff --git a/gcc/m2/patches/gcc/trunc/04-patches b/gcc/m2/patches/gcc/trunc/04-patches
deleted file mode 100644
index 764dc4bc1f0..00000000000
--- a/gcc/m2/patches/gcc/trunc/04-patches
+++ /dev/null
@@ -1,12 +0,0 @@
---- gcc-versionno-orig/gcc/c-family/cppspec.c 2018-04-13 16:08:36.070820977 +0100
-+++ gcc-versionno/gcc/c-family/cppspec.c 2018-04-14 01:29:42.469961191 +0100
-@@ -197,3 +197,9 @@
-
- /* Number of extra output files that lang_specific_pre_link may generate. */
- int lang_specific_extra_outfiles = 0; /* Not used for cpp. */
-+
-+/* lang_register_spec_functions. Not used for cpp. */
-+void
-+lang_register_spec_functions (void)
-+{
-+}
diff --git a/gcc/m2/patches/gcc/trunc/05-patches b/gcc/m2/patches/gcc/trunc/05-patches
deleted file mode 100644
index 63e5d4aaf66..00000000000
--- a/gcc/m2/patches/gcc/trunc/05-patches
+++ /dev/null
@@ -1,12 +0,0 @@
---- gcc-versionno-orig/gcc/cp/g++spec.c 2018-04-13 16:08:50.078740751 +0100
-+++ gcc-versionno/gcc/cp/g++spec.c 2018-04-14 01:29:42.469961191 +0100
-@@ -402,3 +402,9 @@
-
- /* Number of extra output files that lang_specific_pre_link may generate. */
- int lang_specific_extra_outfiles = 0; /* Not used for C++. */
-+
-+/* lang_register_spec_functions. Not used for C++. */
-+void
-+lang_register_spec_functions (void)
-+{
-+}
diff --git a/gcc/m2/patches/gcc/trunc/06-patches b/gcc/m2/patches/gcc/trunc/06-patches
deleted file mode 100644
index c9229556991..00000000000
--- a/gcc/m2/patches/gcc/trunc/06-patches
+++ /dev/null
@@ -1,273 +0,0 @@
---- gcc-versionno-orig/gcc/gcc.c 2018-04-13 16:08:34.610829329 +0100
-+++ gcc-versionno/gcc/gcc.c 2018-07-14 14:52:45.879680088 +0100
-@@ -300,6 +300,10 @@
- static const char *cross_compile = "0";
- #endif
-
-+/* The lang specs might wish to override the default linker.
-+ */
-+int allow_linker = 1;
-+
- /* Greatest exit code of sub-processes that has been encountered up to
- now. */
- static int greatest_status = 1;
-@@ -405,6 +409,7 @@
- static const char *greater_than_spec_func (int, const char **);
- static const char *debug_level_greater_than_spec_func (int, const char **);
- static char *convert_white_space (char *);
-+static void handle_OPT_B (const char *arg);
- \f
- /* The Specs Language
-
-@@ -1027,6 +1032,7 @@
- /* We pass any -flto flags on to the linker, which is expected
- to understand them. In practice, this means it had better be collect2. */
- /* %{e*} includes -export-dynamic; see comment in common.opt. */
-+
- #ifndef LINK_COMMAND_SPEC
- #define LINK_COMMAND_SPEC "\
- %{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
-@@ -1648,6 +1654,10 @@
- { 0, 0 }
- };
-
-+/* front end registered spec functions */
-+static struct spec_function *lang_spec_functions = NULL;
-+static unsigned int lang_spec_functions_length = 0;
-+
- static int processing_spec_function;
- \f
- /* Add appropriate libgcc specs to OBSTACK, taking into account
-@@ -3606,6 +3616,81 @@
- setenv ("SOURCE_DATE_EPOCH", source_date_epoch, 0);
- }
-
-+/* Save an option OPT with N_ARGS arguments in array ARGS, marking it
-+ as validated if VALIDATED. */
-+
-+void
-+fe_save_switch (const char *opt, size_t n_args, const char *const *args,
-+ bool validated, bool known)
-+{
-+ save_switch (opt, n_args, args, validated, known);
-+}
-+
-+void fe_B_prefix (const char *arg)
-+{
-+ handle_OPT_B (arg);
-+}
-+
-+void
-+fe_add_linker_option (const char *option)
-+{
-+ add_linker_option (option, strlen (option));
-+}
-+
-+/* Handle the -B option by adding the prefix to exec, startfile and
-+ include search paths. */
-+
-+static
-+void handle_OPT_B (const char *arg)
-+{
-+ size_t len = strlen (arg);
-+
-+ /* Catch the case where the user has forgotten to append a
-+ directory separator to the path. Note, they may be using
-+ -B to add an executable name prefix, eg "i386-elf-", in
-+ order to distinguish between multiple installations of
-+ GCC in the same directory. Hence we must check to see
-+ if appending a directory separator actually makes a
-+ valid directory name. */
-+ if (!IS_DIR_SEPARATOR (arg[len - 1])
-+ && is_directory (arg, false))
-+ {
-+ char *tmp = XNEWVEC (char, len + 2);
-+ strcpy (tmp, arg);
-+ tmp[len] = DIR_SEPARATOR;
-+ tmp[++len] = 0;
-+ arg = tmp;
-+ }
-+
-+ add_prefix (&exec_prefixes, arg, NULL,
-+ PREFIX_PRIORITY_B_OPT, 0, 0);
-+ add_prefix (&startfile_prefixes, arg, NULL,
-+ PREFIX_PRIORITY_B_OPT, 0, 0);
-+ add_prefix (&include_prefixes, arg, NULL,
-+ PREFIX_PRIORITY_B_OPT, 0, 0);
-+}
-+
-+/* Save the infile. */
-+
-+void
-+fe_add_infile (const char *infile, const char *lang)
-+{
-+ add_infile (infile, lang);
-+}
-+
-+/* Remove an object file, name. */
-+
-+void
-+fe_remove_infile (const char *name)
-+{
-+ int max = n_infiles + lang_specific_extra_outfiles;
-+ int i;
-+
-+ for (i = 0; i < max; i++)
-+ if (filename_cmp (name, infiles[i].name) == 0)
-+ infiles[i].compiled = true;
-+}
-+
- /* Handle an option DECODED that is unknown to the option-processing
- machinery. */
-
-@@ -4075,33 +4160,7 @@
- break;
-
- case OPT_B:
-- {
-- size_t len = strlen (arg);
--
-- /* Catch the case where the user has forgotten to append a
-- directory separator to the path. Note, they may be using
-- -B to add an executable name prefix, eg "i386-elf-", in
-- order to distinguish between multiple installations of
-- GCC in the same directory. Hence we must check to see
-- if appending a directory separator actually makes a
-- valid directory name. */
-- if (!IS_DIR_SEPARATOR (arg[len - 1])
-- && is_directory (arg, false))
-- {
-- char *tmp = XNEWVEC (char, len + 2);
-- strcpy (tmp, arg);
-- tmp[len] = DIR_SEPARATOR;
-- tmp[++len] = 0;
-- arg = tmp;
-- }
--
-- add_prefix (&exec_prefixes, arg, NULL,
-- PREFIX_PRIORITY_B_OPT, 0, 0);
-- add_prefix (&startfile_prefixes, arg, NULL,
-- PREFIX_PRIORITY_B_OPT, 0, 0);
-- add_prefix (&include_prefixes, arg, NULL,
-- PREFIX_PRIORITY_B_OPT, 0, 0);
-- }
-+ handle_OPT_B (arg);
- validated = true;
- break;
-
-@@ -5927,7 +5986,7 @@
- "%{foo=*:bar%*}%{foo=*:one%*two}"
-
- matches -foo=hello then it will produce:
--
-+
- barhello onehellotwo
- */
- if (*p == 0 || *p == '}')
-@@ -6004,6 +6063,33 @@
- return 0;
- }
-
-+/* Allow the front end to register a spec function. */
-+
-+void fe_add_spec_function (const char *name, const char *(*func) (int, const char **))
-+{
-+ const struct spec_function *f = lookup_spec_function (name);
-+ struct spec_function *fl;
-+ unsigned int i;
-+
-+ if (f != NULL)
-+ fatal_error (input_location, "spec function (%s) already registered", name);
-+
-+ if (lang_spec_functions == NULL)
-+ lang_spec_functions_length = 1;
-+
-+ lang_spec_functions_length++;
-+ fl = (struct spec_function *) xmalloc (sizeof (const struct spec_function)*lang_spec_functions_length);
-+ for (i=0; i<lang_spec_functions_length-2; i++)
-+ fl[i] = lang_spec_functions[i];
-+ free (lang_spec_functions);
-+ lang_spec_functions = fl;
-+
-+ lang_spec_functions[lang_spec_functions_length-2].name = name;
-+ lang_spec_functions[lang_spec_functions_length-2].func = func;
-+ lang_spec_functions[lang_spec_functions_length-1].name = NULL;
-+ lang_spec_functions[lang_spec_functions_length-1].func = NULL;
-+}
-+
- /* Look up a spec function. */
-
- static const struct spec_function *
-@@ -6015,6 +6101,11 @@
- if (strcmp (sf->name, name) == 0)
- return sf;
-
-+ if (lang_spec_functions != NULL)
-+ for (sf = lang_spec_functions; sf->name != NULL; sf++)
-+ if (strcmp (sf->name, name) == 0)
-+ return sf;
-+
- return NULL;
- }
-
-@@ -7497,6 +7588,8 @@
- accel_dir_suffix, dir_separator_str, NULL);
- just_machine_suffix = concat (spec_machine, dir_separator_str, NULL);
-
-+ lang_register_spec_functions ();
-+
- specs_file = find_a_file (&startfile_prefixes, "specs", R_OK, true);
- /* Read the specs file unless it is a default one. */
- if (specs_file != 0 && strcmp (specs_file, "specs"))
-@@ -8290,7 +8383,8 @@
-
- /* Run ld to link all the compiler output files. */
-
-- if (num_linker_inputs > 0 && !seen_error () && print_subprocess_help < 2)
-+ if (num_linker_inputs > 0 && !seen_error () && print_subprocess_help < 2
-+ && allow_linker)
- {
- int tmp = execution_count;
-
-@@ -8357,7 +8451,7 @@
- /* If options said don't run linker,
- complain about input files to be given to the linker. */
-
-- if (! linker_was_run && !seen_error ())
-+ if (! linker_was_run && !seen_error () && allow_linker)
- for (i = 0; (int) i < n_infiles; i++)
- if (explicit_link_files[i]
- && !(infiles[i].language && infiles[i].language[0] == '*'))
-@@ -9660,9 +9754,9 @@
- get_random_number (void)
- {
- unsigned HOST_WIDE_INT ret = 0;
-- int fd;
-+ int fd;
-
-- fd = open ("/dev/urandom", O_RDONLY);
-+ fd = open ("/dev/urandom", O_RDONLY);
- if (fd >= 0)
- {
- read (fd, &ret, sizeof (HOST_WIDE_INT));
-@@ -9964,16 +10058,16 @@
- return NULL;
- }
-
--/* Insert backslash before spaces in ORIG (usually a file path), to
-+/* Insert backslash before spaces in ORIG (usually a file path), to
- avoid being broken by spec parser.
-
- This function is needed as do_spec_1 treats white space (' ' and '\t')
- as the end of an argument. But in case of -plugin /usr/gcc install/xxx.so,
- the file name should be treated as a single argument rather than being
-- broken into multiple. Solution is to insert '\\' before the space in a
-+ broken into multiple. Solution is to insert '\\' before the space in a
- file name.
--
-- This function converts and only converts all occurrence of ' '
-+
-+ This function converts and only converts all occurrence of ' '
- to '\\' + ' ' and '\t' to '\\' + '\t'. For example:
- "a b" -> "a\\ b"
- "a b" -> "a\\ \\ b"
diff --git a/gcc/m2/patches/gcc/trunc/07-patches b/gcc/m2/patches/gcc/trunc/07-patches
deleted file mode 100644
index e53c25ac8c5..00000000000
--- a/gcc/m2/patches/gcc/trunc/07-patches
+++ /dev/null
@@ -1,29 +0,0 @@
---- gcc-versionno-orig/gcc/gcc.h 2018-04-13 16:08:34.614829306 +0100
-+++ gcc-versionno/gcc/gcc.h 2018-04-14 01:29:42.501961017 +0100
-@@ -75,9 +75,17 @@
- extern void record_temp_file (const char *, int, int);
- extern void pfatal_with_name (const char *) ATTRIBUTE_NORETURN;
- extern void set_input (const char *);
-+extern void fe_save_switch (const char *opt, size_t n_args,
-+ const char *const *args, bool validated);
-+extern void fe_B_prefix (const char *arg);
-+extern void fe_add_infile (const char *infile, const char *lang);
-+extern void fe_add_linker_option (const char *option);
-+extern void fe_add_spec_function (const char *name, const char *(*func) (int, const char **));
-
- /* Spec files linked with gcc.c must provide definitions for these. */
-
-+extern void lang_register_spec_functions (void);
-+
- /* Called before processing to change/add/remove arguments. */
- extern void lang_specific_driver (struct cl_decoded_option **,
- unsigned int *, int *);
-@@ -99,4 +107,8 @@
- void *user_data),
- void *user_data);
-
-+/* Default setting is true, but can be overridden by the language
-+ front end to prohibit the linker from being invoked. */
-+extern int allow_linker;
-+
- #endif /* ! GCC_GCC_H */
diff --git a/gcc/m2/patches/gcc/trunc/08-patches b/gcc/m2/patches/gcc/trunc/08-patches
deleted file mode 100644
index c2a9d2c4c5f..00000000000
--- a/gcc/m2/patches/gcc/trunc/08-patches
+++ /dev/null
@@ -1,95 +0,0 @@
---- gcc-versionno-orig/Makefile.def 2018-04-13 16:08:28.202865979 +0100
-+++ gcc-versionno/Makefile.def 2018-04-14 01:29:42.501961017 +0100
-@@ -10,12 +10,12 @@
- // it under the terms of the GNU General Public License as published by
- // the Free Software Foundation; either version 3 of the License, or
- // (at your option) any later version.
--//
-+//
- // This program is distributed in the hope that it will be useful,
- // but WITHOUT ANY WARRANTY; without even the implied warranty of
- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- // GNU General Public License for more details.
--//
-+//
- // You should have received a copy of the GNU General Public License
- // along with this program; see the file COPYING3. If not see
- // <http://www.gnu.org/licenses/>.
-@@ -45,7 +45,7 @@
- missing= TAGS; };
- host_modules= { module= flex; no_check_cross= true; };
- host_modules= { module= gas; bootstrap=true; };
--host_modules= { module= gcc; bootstrap=true;
-+host_modules= { module= gcc; bootstrap=true;
- extra_make_flags="$(EXTRA_GCC_FLAGS)"; };
- host_modules= { module= gmp; lib_path=.libs; bootstrap=true;
- // Work around in-tree gmp configure bug with missing flex.
-@@ -116,7 +116,7 @@
- host_modules= { module= expect; };
- host_modules= { module= guile; };
- host_modules= { module= tk; };
--host_modules= { module= libtermcap; no_check=true;
-+host_modules= { module= libtermcap; no_check=true;
- missing=mostlyclean;
- missing=clean;
- missing=distclean;
-@@ -167,6 +167,7 @@
- target_modules = { module= zlib; };
- target_modules = { module= rda; };
- target_modules = { module= libada; };
-+target_modules = { module= libgm2; lib_path=.libs; };
- target_modules = { module= libgomp; bootstrap= true; lib_path=.libs; };
- target_modules = { module= libitm; lib_path=.libs; };
- target_modules = { module= libatomic; lib_path=.libs; };
-@@ -175,26 +176,26 @@
- // Not all; these are the ones which don't have special options.
- // "depend" indicates that a target depends on another target uniformly
- // for each subdirectory. There can be several such lines per target.
--recursive_targets = { make_target= info;
-+recursive_targets = { make_target= info;
- depend=configure; };
--recursive_targets = { make_target= dvi;
-+recursive_targets = { make_target= dvi;
- depend=configure; };
--recursive_targets = { make_target= pdf;
-+recursive_targets = { make_target= pdf;
- depend=configure; };
--recursive_targets = { make_target= html;
-+recursive_targets = { make_target= html;
- depend=configure; };
--recursive_targets = { make_target= TAGS;
-+recursive_targets = { make_target= TAGS;
- depend=configure; };
--recursive_targets = { make_target= install-info;
-+recursive_targets = { make_target= install-info;
- depend=configure;
- depend=info; };
--recursive_targets = { make_target= install-pdf;
-+recursive_targets = { make_target= install-pdf;
- depend=configure;
- depend=pdf; };
--recursive_targets = { make_target= install-html;
-+recursive_targets = { make_target= install-html;
- depend=configure;
- depend=html; };
--recursive_targets = { make_target= installcheck;
-+recursive_targets = { make_target= installcheck;
- depend=configure; };
- recursive_targets = { make_target= mostlyclean; };
- recursive_targets = { make_target= clean; };
-@@ -281,6 +282,7 @@
- flags_to_pass = { flag= GFORTRAN_FOR_TARGET ; };
- flags_to_pass = { flag= GOC_FOR_TARGET ; };
- flags_to_pass = { flag= GOCFLAGS_FOR_TARGET ; };
-+flags_to_pass = { flag= GM2_FOR_TARGET ; };
- flags_to_pass = { flag= LD_FOR_TARGET ; };
- flags_to_pass = { flag= LIPO_FOR_TARGET ; };
- flags_to_pass = { flag= LDFLAGS_FOR_TARGET ; };
-@@ -598,6 +600,7 @@
- languages = { language=go; gcc-check-target=check-go;
- lib-check-target=check-target-libgo;
- lib-check-target=check-gotools; };
-+languages = { language=gm2; gcc-check-target=check-gm2; };
- languages = { language=brig; gcc-check-target=check-brig;
- lib-check-target=check-target-libhsail-rt; };
-
diff --git a/gcc/m2/patches/gcc/trunc/09-patches b/gcc/m2/patches/gcc/trunc/09-patches
deleted file mode 100644
index 2fbab7b27cf..00000000000
--- a/gcc/m2/patches/gcc/trunc/09-patches
+++ /dev/null
@@ -1,743 +0,0 @@
---- gcc-versionno-orig/Makefile.in 2018-04-13 16:08:27.934867511 +0100
-+++ gcc-versionno/Makefile.in 2018-07-12 18:12:30.000000000 +0100
-@@ -156,6 +156,7 @@
- GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \
- GOC="$(GOC_FOR_BUILD)"; export GOC; \
- GOCFLAGS="$(GOCFLAGS_FOR_BUILD)"; export GOCFLAGS; \
-+ GM2="$(GM2_FOR_BUILD)"; export GM2; \
- DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
- LD="$(LD_FOR_BUILD)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
-@@ -192,6 +193,7 @@
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- GFORTRAN="$(GFORTRAN)"; export GFORTRAN; \
- GOC="$(GOC)"; export GOC; \
-+ GM2="$(GM2)"; export GM2; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
-@@ -278,6 +280,7 @@
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GFORTRAN="$(GFORTRAN_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GFORTRAN; \
- GOC="$(GOC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GOC; \
-+ GM2="$(GM2_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GM2; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
-@@ -342,6 +345,7 @@
- DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@
- GFORTRAN_FOR_BUILD = @GFORTRAN_FOR_BUILD@
- GOC_FOR_BUILD = @GOC_FOR_BUILD@
-+GM2_FOR_BUILD = @GM2_FOR_BUILD@
- LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
- LD_FOR_BUILD = @LD_FOR_BUILD@
- NM_FOR_BUILD = @NM_FOR_BUILD@
-@@ -564,6 +568,7 @@
- RAW_CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @RAW_CXX_FOR_TARGET@
- GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@
- GOC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GOC_FOR_TARGET@
-+GM2_FOR_TARGET=$(STAGE_CC_WRAPPER) @GM2_FOR_TARGET@
- DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
- LD_FOR_TARGET=@LD_FOR_TARGET@
-
-@@ -612,7 +617,7 @@
-
- # This is the list of directories that may be needed in RPATH_ENVVAR
- # so that programs built for the target machine work.
--TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libsanitizer)$(TARGET_LIB_PATH_libmpx)$(TARGET_LIB_PATH_libvtv)$(TARGET_LIB_PATH_liboffloadmic)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libgomp)$(TARGET_LIB_PATH_libitm)$(TARGET_LIB_PATH_libatomic)$(HOST_LIB_PATH_gcc)
-+TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libsanitizer)$(TARGET_LIB_PATH_libmpx)$(TARGET_LIB_PATH_libvtv)$(TARGET_LIB_PATH_liboffloadmic)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libgm2)$(TARGET_LIB_PATH_libgomp)$(TARGET_LIB_PATH_libitm)$(TARGET_LIB_PATH_libatomic)$(HOST_LIB_PATH_gcc)
-
- @if target-libstdc++-v3
- TARGET_LIB_PATH_libstdc++-v3 = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:
-@@ -638,6 +643,10 @@
- TARGET_LIB_PATH_libssp = $$r/$(TARGET_SUBDIR)/libssp/.libs:
- @endif target-libssp
-
-+@if target-libgm2
-+TARGET_LIB_PATH_libgm2 = $$r/$(TARGET_SUBDIR)/libgm2/.libs:
-+@endif target-libgm2
-+
- @if target-libgomp
- TARGET_LIB_PATH_libgomp = $$r/$(TARGET_SUBDIR)/libgomp/.libs:
- @endif target-libgomp
-@@ -783,6 +792,7 @@
- "GFORTRAN_FOR_TARGET=$(GFORTRAN_FOR_TARGET)" \
- "GOC_FOR_TARGET=$(GOC_FOR_TARGET)" \
- "GOCFLAGS_FOR_TARGET=$(GOCFLAGS_FOR_TARGET)" \
-+ "GM2_FOR_TARGET=$(GM2_FOR_TARGET)" \
- "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
- "LIPO_FOR_TARGET=$(LIPO_FOR_TARGET)" \
- "LDFLAGS_FOR_TARGET=$(LDFLAGS_FOR_TARGET)" \
-@@ -845,6 +855,7 @@
- 'DLLTOOL=$(DLLTOOL)' \
- 'GFORTRAN=$(GFORTRAN)' \
- 'GOC=$(GOC)' \
-+ 'GM2=$(GM2)' \
- 'LD=$(LD)' \
- 'LIPO=$(LIPO)' \
- 'NM=$(NM)' \
-@@ -901,6 +912,7 @@
- 'GFORTRAN=$$(GFORTRAN_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
- 'GOC=$$(GOC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
- 'GOCFLAGS=$$(GOCFLAGS_FOR_TARGET)' \
-+ 'GM2=$$(GM2_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
- 'LD=$(COMPILER_LD_FOR_TARGET)' \
- 'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \
- 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
-@@ -1010,6 +1022,7 @@
- maybe-configure-target-zlib \
- maybe-configure-target-rda \
- maybe-configure-target-libada \
-+ maybe-configure-target-libgm2 \
- maybe-configure-target-libgomp \
- maybe-configure-target-libitm \
- maybe-configure-target-libatomic
-@@ -1175,6 +1188,7 @@
- all-target: maybe-all-target-zlib
- all-target: maybe-all-target-rda
- all-target: maybe-all-target-libada
-+all-target: maybe-all-target-libgm2
- @if target-libgomp-no-bootstrap
- all-target: maybe-all-target-libgomp
- @endif target-libgomp-no-bootstrap
-@@ -1267,6 +1281,7 @@
- info-target: maybe-info-target-zlib
- info-target: maybe-info-target-rda
- info-target: maybe-info-target-libada
-+info-target: maybe-info-target-libgm2
- info-target: maybe-info-target-libgomp
- info-target: maybe-info-target-libitm
- info-target: maybe-info-target-libatomic
-@@ -1352,6 +1367,7 @@
- dvi-target: maybe-dvi-target-zlib
- dvi-target: maybe-dvi-target-rda
- dvi-target: maybe-dvi-target-libada
-+dvi-target: maybe-dvi-target-libgm2
- dvi-target: maybe-dvi-target-libgomp
- dvi-target: maybe-dvi-target-libitm
- dvi-target: maybe-dvi-target-libatomic
-@@ -1437,6 +1453,7 @@
- pdf-target: maybe-pdf-target-zlib
- pdf-target: maybe-pdf-target-rda
- pdf-target: maybe-pdf-target-libada
-+pdf-target: maybe-pdf-target-libgm2
- pdf-target: maybe-pdf-target-libgomp
- pdf-target: maybe-pdf-target-libitm
- pdf-target: maybe-pdf-target-libatomic
-@@ -1522,6 +1539,7 @@
- html-target: maybe-html-target-zlib
- html-target: maybe-html-target-rda
- html-target: maybe-html-target-libada
-+html-target: maybe-html-target-libgm2
- html-target: maybe-html-target-libgomp
- html-target: maybe-html-target-libitm
- html-target: maybe-html-target-libatomic
-@@ -1607,6 +1625,7 @@
- TAGS-target: maybe-TAGS-target-zlib
- TAGS-target: maybe-TAGS-target-rda
- TAGS-target: maybe-TAGS-target-libada
-+TAGS-target: maybe-TAGS-target-libgm2
- TAGS-target: maybe-TAGS-target-libgomp
- TAGS-target: maybe-TAGS-target-libitm
- TAGS-target: maybe-TAGS-target-libatomic
-@@ -1692,6 +1711,7 @@
- install-info-target: maybe-install-info-target-zlib
- install-info-target: maybe-install-info-target-rda
- install-info-target: maybe-install-info-target-libada
-+install-info-target: maybe-install-info-target-libgm2
- install-info-target: maybe-install-info-target-libgomp
- install-info-target: maybe-install-info-target-libitm
- install-info-target: maybe-install-info-target-libatomic
-@@ -1777,6 +1797,7 @@
- install-pdf-target: maybe-install-pdf-target-zlib
- install-pdf-target: maybe-install-pdf-target-rda
- install-pdf-target: maybe-install-pdf-target-libada
-+install-pdf-target: maybe-install-pdf-target-libgm2
- install-pdf-target: maybe-install-pdf-target-libgomp
- install-pdf-target: maybe-install-pdf-target-libitm
- install-pdf-target: maybe-install-pdf-target-libatomic
-@@ -1862,6 +1883,7 @@
- install-html-target: maybe-install-html-target-zlib
- install-html-target: maybe-install-html-target-rda
- install-html-target: maybe-install-html-target-libada
-+install-html-target: maybe-install-html-target-libgm2
- install-html-target: maybe-install-html-target-libgomp
- install-html-target: maybe-install-html-target-libitm
- install-html-target: maybe-install-html-target-libatomic
-@@ -1947,6 +1969,7 @@
- installcheck-target: maybe-installcheck-target-zlib
- installcheck-target: maybe-installcheck-target-rda
- installcheck-target: maybe-installcheck-target-libada
-+installcheck-target: maybe-installcheck-target-libgm2
- installcheck-target: maybe-installcheck-target-libgomp
- installcheck-target: maybe-installcheck-target-libitm
- installcheck-target: maybe-installcheck-target-libatomic
-@@ -2032,6 +2055,7 @@
- mostlyclean-target: maybe-mostlyclean-target-zlib
- mostlyclean-target: maybe-mostlyclean-target-rda
- mostlyclean-target: maybe-mostlyclean-target-libada
-+mostlyclean-target: maybe-mostlyclean-target-libgm2
- mostlyclean-target: maybe-mostlyclean-target-libgomp
- mostlyclean-target: maybe-mostlyclean-target-libitm
- mostlyclean-target: maybe-mostlyclean-target-libatomic
-@@ -2117,6 +2141,7 @@
- clean-target: maybe-clean-target-zlib
- clean-target: maybe-clean-target-rda
- clean-target: maybe-clean-target-libada
-+clean-target: maybe-clean-target-libgm2
- clean-target: maybe-clean-target-libgomp
- clean-target: maybe-clean-target-libitm
- clean-target: maybe-clean-target-libatomic
-@@ -2202,6 +2227,7 @@
- distclean-target: maybe-distclean-target-zlib
- distclean-target: maybe-distclean-target-rda
- distclean-target: maybe-distclean-target-libada
-+distclean-target: maybe-distclean-target-libgm2
- distclean-target: maybe-distclean-target-libgomp
- distclean-target: maybe-distclean-target-libitm
- distclean-target: maybe-distclean-target-libatomic
-@@ -2287,6 +2313,7 @@
- maintainer-clean-target: maybe-maintainer-clean-target-zlib
- maintainer-clean-target: maybe-maintainer-clean-target-rda
- maintainer-clean-target: maybe-maintainer-clean-target-libada
-+maintainer-clean-target: maybe-maintainer-clean-target-libgm2
- maintainer-clean-target: maybe-maintainer-clean-target-libgomp
- maintainer-clean-target: maybe-maintainer-clean-target-libitm
- maintainer-clean-target: maybe-maintainer-clean-target-libatomic
-@@ -2428,6 +2455,7 @@
- maybe-check-target-zlib \
- maybe-check-target-rda \
- maybe-check-target-libada \
-+ maybe-check-target-libgm2 \
- maybe-check-target-libgomp \
- maybe-check-target-libitm \
- maybe-check-target-libatomic
-@@ -2609,6 +2637,7 @@
- maybe-install-target-zlib \
- maybe-install-target-rda \
- maybe-install-target-libada \
-+ maybe-install-target-libgm2 \
- maybe-install-target-libgomp \
- maybe-install-target-libitm \
- maybe-install-target-libatomic
-@@ -2714,6 +2743,7 @@
- maybe-install-strip-target-zlib \
- maybe-install-strip-target-rda \
- maybe-install-strip-target-libada \
-+ maybe-install-strip-target-libgm2 \
- maybe-install-strip-target-libgomp \
- maybe-install-strip-target-libitm \
- maybe-install-strip-target-libatomic
-@@ -51327,6 +51357,464 @@
-
-
-
-+.PHONY: configure-target-libgm2 maybe-configure-target-libgm2
-+maybe-configure-target-libgm2:
-+@if gcc-bootstrap
-+configure-target-libgm2: stage_current
-+@endif gcc-bootstrap
-+@if target-libgm2
-+maybe-configure-target-libgm2: configure-target-libgm2
-+configure-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ echo "Checking multilib configuration for libgm2..."; \
-+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgm2; \
-+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgm2/multilib.tmp 2> /dev/null; \
-+ if test -r $(TARGET_SUBDIR)/libgm2/multilib.out; then \
-+ if cmp -s $(TARGET_SUBDIR)/libgm2/multilib.tmp $(TARGET_SUBDIR)/libgm2/multilib.out; then \
-+ rm -f $(TARGET_SUBDIR)/libgm2/multilib.tmp; \
-+ else \
-+ rm -f $(TARGET_SUBDIR)/libgm2/Makefile; \
-+ mv $(TARGET_SUBDIR)/libgm2/multilib.tmp $(TARGET_SUBDIR)/libgm2/multilib.out; \
-+ fi; \
-+ else \
-+ mv $(TARGET_SUBDIR)/libgm2/multilib.tmp $(TARGET_SUBDIR)/libgm2/multilib.out; \
-+ fi; \
-+ test ! -f $(TARGET_SUBDIR)/libgm2/Makefile || exit 0; \
-+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgm2; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo Configuring in $(TARGET_SUBDIR)/libgm2; \
-+ cd "$(TARGET_SUBDIR)/libgm2" || exit 1; \
-+ case $(srcdir) in \
-+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-+ *) topdir=`echo $(TARGET_SUBDIR)/libgm2/ | \
-+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-+ esac; \
-+ module_srcdir=libgm2; \
-+ rm -f no-such-file || : ; \
-+ CONFIG_SITE=no-such-file $(SHELL) \
-+ $$s/$$module_srcdir/configure \
-+ --srcdir=$${topdir}/$$module_srcdir \
-+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
-+ --target=${target_alias} \
-+ || exit 1
-+@endif target-libgm2
-+
-+
-+
-+
-+
-+.PHONY: all-target-libgm2 maybe-all-target-libgm2
-+maybe-all-target-libgm2:
-+@if gcc-bootstrap
-+all-target-libgm2: stage_current
-+@endif gcc-bootstrap
-+@if target-libgm2
-+TARGET-target-libgm2=all
-+maybe-all-target-libgm2: all-target-libgm2
-+all-target-libgm2: configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
-+ $(TARGET-target-libgm2))
-+@endif target-libgm2
-+
-+
-+
-+
-+
-+.PHONY: check-target-libgm2 maybe-check-target-libgm2
-+maybe-check-target-libgm2:
-+@if target-libgm2
-+maybe-check-target-libgm2: check-target-libgm2
-+
-+check-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
-+
-+@endif target-libgm2
-+
-+.PHONY: install-target-libgm2 maybe-install-target-libgm2
-+maybe-install-target-libgm2:
-+@if target-libgm2
-+maybe-install-target-libgm2: install-target-libgm2
-+
-+install-target-libgm2: installdirs
-+ @: $(MAKE); $(unstage)
-+ @r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
-+
-+@endif target-libgm2
-+
-+.PHONY: install-strip-target-libgm2 maybe-install-strip-target-libgm2
-+maybe-install-strip-target-libgm2:
-+@if target-libgm2
-+maybe-install-strip-target-libgm2: install-strip-target-libgm2
-+
-+install-strip-target-libgm2: installdirs
-+ @: $(MAKE); $(unstage)
-+ @r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install-strip)
-+
-+@endif target-libgm2
-+
-+# Other targets (info, dvi, pdf, etc.)
-+
-+.PHONY: maybe-info-target-libgm2 info-target-libgm2
-+maybe-info-target-libgm2:
-+@if target-libgm2
-+maybe-info-target-libgm2: info-target-libgm2
-+
-+info-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing info in $(TARGET_SUBDIR)/libgm2"; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ info) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-dvi-target-libgm2 dvi-target-libgm2
-+maybe-dvi-target-libgm2:
-+@if target-libgm2
-+maybe-dvi-target-libgm2: dvi-target-libgm2
-+
-+dvi-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing dvi in $(TARGET_SUBDIR)/libgm2"; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ dvi) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-pdf-target-libgm2 pdf-target-libgm2
-+maybe-pdf-target-libgm2:
-+@if target-libgm2
-+maybe-pdf-target-libgm2: pdf-target-libgm2
-+
-+pdf-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing pdf in $(TARGET_SUBDIR)/libgm2"; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ pdf) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-html-target-libgm2 html-target-libgm2
-+maybe-html-target-libgm2:
-+@if target-libgm2
-+maybe-html-target-libgm2: html-target-libgm2
-+
-+html-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing html in $(TARGET_SUBDIR)/libgm2"; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ html) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-TAGS-target-libgm2 TAGS-target-libgm2
-+maybe-TAGS-target-libgm2:
-+@if target-libgm2
-+maybe-TAGS-target-libgm2: TAGS-target-libgm2
-+
-+TAGS-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing TAGS in $(TARGET_SUBDIR)/libgm2"; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ TAGS) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-install-info-target-libgm2 install-info-target-libgm2
-+maybe-install-info-target-libgm2:
-+@if target-libgm2
-+maybe-install-info-target-libgm2: install-info-target-libgm2
-+
-+install-info-target-libgm2: \
-+ configure-target-libgm2 \
-+ info-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing install-info in $(TARGET_SUBDIR)/libgm2"; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ install-info) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-install-pdf-target-libgm2 install-pdf-target-libgm2
-+maybe-install-pdf-target-libgm2:
-+@if target-libgm2
-+maybe-install-pdf-target-libgm2: install-pdf-target-libgm2
-+
-+install-pdf-target-libgm2: \
-+ configure-target-libgm2 \
-+ pdf-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libgm2"; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ install-pdf) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-install-html-target-libgm2 install-html-target-libgm2
-+maybe-install-html-target-libgm2:
-+@if target-libgm2
-+maybe-install-html-target-libgm2: install-html-target-libgm2
-+
-+install-html-target-libgm2: \
-+ configure-target-libgm2 \
-+ html-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing install-html in $(TARGET_SUBDIR)/libgm2"; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ install-html) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-installcheck-target-libgm2 installcheck-target-libgm2
-+maybe-installcheck-target-libgm2:
-+@if target-libgm2
-+maybe-installcheck-target-libgm2: installcheck-target-libgm2
-+
-+installcheck-target-libgm2: \
-+ configure-target-libgm2
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing installcheck in $(TARGET_SUBDIR)/libgm2"; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ installcheck) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-mostlyclean-target-libgm2 mostlyclean-target-libgm2
-+maybe-mostlyclean-target-libgm2:
-+@if target-libgm2
-+maybe-mostlyclean-target-libgm2: mostlyclean-target-libgm2
-+
-+mostlyclean-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgm2"; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ mostlyclean) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-clean-target-libgm2 clean-target-libgm2
-+maybe-clean-target-libgm2:
-+@if target-libgm2
-+maybe-clean-target-libgm2: clean-target-libgm2
-+
-+clean-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing clean in $(TARGET_SUBDIR)/libgm2"; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ clean) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-distclean-target-libgm2 distclean-target-libgm2
-+maybe-distclean-target-libgm2:
-+@if target-libgm2
-+maybe-distclean-target-libgm2: distclean-target-libgm2
-+
-+distclean-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing distclean in $(TARGET_SUBDIR)/libgm2"; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ distclean) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+.PHONY: maybe-maintainer-clean-target-libgm2 maintainer-clean-target-libgm2
-+maybe-maintainer-clean-target-libgm2:
-+@if target-libgm2
-+maybe-maintainer-clean-target-libgm2: maintainer-clean-target-libgm2
-+
-+maintainer-clean-target-libgm2:
-+ @: $(MAKE); $(unstage)
-+ @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(NORMAL_TARGET_EXPORTS) \
-+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libgm2"; \
-+ for flag in $(EXTRA_TARGET_FLAGS); do \
-+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-+ done; \
-+ (cd $(TARGET_SUBDIR)/libgm2 && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-+ "RANLIB=$${RANLIB}" \
-+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-+ maintainer-clean) \
-+ || exit 1
-+
-+@endif target-libgm2
-+
-+
-+
-+
-+
- .PHONY: configure-target-libgomp maybe-configure-target-libgomp
- maybe-configure-target-libgomp:
- @if gcc-bootstrap
-@@ -53574,6 +54062,14 @@
- (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-go);
- check-go: check-gcc-go check-target-libgo check-gotools
-
-+.PHONY: check-gcc-gm2 check-gm2
-+check-gcc-gm2:
-+ r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(HOST_EXPORTS) \
-+ (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-gm2);
-+check-gm2: check-gcc-gm2
-+
- .PHONY: check-gcc-brig check-brig
- check-gcc-brig:
- r=`${PWD_COMMAND}`; export r; \
-@@ -56790,6 +57286,7 @@
- configure-target-zlib: stage_last
- configure-target-rda: stage_last
- configure-target-libada: stage_last
-+configure-target-libgm2: stage_last
- configure-stage1-target-libgomp: maybe-all-stage1-gcc
- configure-stage2-target-libgomp: maybe-all-stage2-gcc
- configure-stage3-target-libgomp: maybe-all-stage3-gcc
-@@ -56825,6 +57322,7 @@
- configure-target-zlib: maybe-all-gcc
- configure-target-rda: maybe-all-gcc
- configure-target-libada: maybe-all-gcc
-+configure-target-libgm2: maybe-all-gcc
- configure-target-libgomp: maybe-all-gcc
- configure-target-libitm: maybe-all-gcc
- configure-target-libatomic: maybe-all-gcc
-@@ -58074,6 +58572,7 @@
- configure-target-zlib: maybe-all-target-libgcc
- configure-target-rda: maybe-all-target-libgcc
- configure-target-libada: maybe-all-target-libgcc
-+configure-target-libgm2: maybe-all-target-libgcc
- configure-target-libgomp: maybe-all-target-libgcc
- configure-target-libitm: maybe-all-target-libgcc
- configure-target-libatomic: maybe-all-target-libgcc
-@@ -58121,6 +58620,8 @@
-
- configure-target-libada: maybe-all-target-newlib maybe-all-target-libgloss
-
-+configure-target-libgm2: maybe-all-target-newlib maybe-all-target-libgloss
-+
- configure-target-libgomp: maybe-all-target-newlib maybe-all-target-libgloss
-
- configure-target-libitm: maybe-all-target-newlib maybe-all-target-libgloss
diff --git a/gcc/m2/patches/gcc/trunc/10-patches b/gcc/m2/patches/gcc/trunc/10-patches
deleted file mode 100644
index 616c159837e..00000000000
--- a/gcc/m2/patches/gcc/trunc/10-patches
+++ /dev/null
@@ -1,58 +0,0 @@
---- gcc-versionno-orig/Makefile.tpl 2018-04-13 16:08:28.214865910 +0100
-+++ gcc-versionno/Makefile.tpl 2018-04-14 01:29:42.513960953 +0100
-@@ -159,6 +159,7 @@
- GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \
- GOC="$(GOC_FOR_BUILD)"; export GOC; \
- GOCFLAGS="$(GOCFLAGS_FOR_BUILD)"; export GOCFLAGS; \
-+ GM2="$(GM2_FOR_BUILD)"; export GM2; \
- DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
- LD="$(LD_FOR_BUILD)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
-@@ -195,6 +196,7 @@
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- GFORTRAN="$(GFORTRAN)"; export GFORTRAN; \
- GOC="$(GOC)"; export GOC; \
-+ GM2="$(GM2)"; export GM2; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
-@@ -281,6 +283,7 @@
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GFORTRAN="$(GFORTRAN_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GFORTRAN; \
- GOC="$(GOC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GOC; \
-+ GM2="$(GM2_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GM2; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
-@@ -345,6 +348,7 @@
- DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@
- GFORTRAN_FOR_BUILD = @GFORTRAN_FOR_BUILD@
- GOC_FOR_BUILD = @GOC_FOR_BUILD@
-+GM2_FOR_BUILD = @GM2_FOR_BUILD@
- LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
- LD_FOR_BUILD = @LD_FOR_BUILD@
- NM_FOR_BUILD = @NM_FOR_BUILD@
-@@ -487,6 +491,7 @@
- RAW_CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @RAW_CXX_FOR_TARGET@
- GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@
- GOC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GOC_FOR_TARGET@
-+GM2_FOR_TARGET=$(STAGE_CC_WRAPPER) @GM2_FOR_TARGET@
- DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
- LD_FOR_TARGET=@LD_FOR_TARGET@
-
-@@ -612,6 +617,7 @@
- 'DLLTOOL=$(DLLTOOL)' \
- 'GFORTRAN=$(GFORTRAN)' \
- 'GOC=$(GOC)' \
-+ 'GM2=$(GM2)' \
- 'LD=$(LD)' \
- 'LIPO=$(LIPO)' \
- 'NM=$(NM)' \
-@@ -668,6 +674,7 @@
- 'GFORTRAN=$$(GFORTRAN_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
- 'GOC=$$(GOC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
- 'GOCFLAGS=$$(GOCFLAGS_FOR_TARGET)' \
-+ 'GM2=$$(GM2_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
- 'LD=$(COMPILER_LD_FOR_TARGET)' \
- 'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \
- 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
diff --git a/gcc/m2/patches/gcc/trunc/11-patches b/gcc/m2/patches/gcc/trunc/11-patches
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/gcc/m2/patches/gcc/trunk/01-patches b/gcc/m2/patches/gcc/trunk/01-patches
deleted file mode 100644
index 463007d8453..00000000000
--- a/gcc/m2/patches/gcc/trunk/01-patches
+++ /dev/null
@@ -1,356 +0,0 @@
---- gcc-git/configure 2021-06-10 11:58:16.842976709 +0100
-+++ gm2-floppsie/configure 2021-06-17 10:21:32.547445349 +0100
-@@ -612,6 +612,7 @@
- DLLTOOL_FOR_TARGET
- AS_FOR_TARGET
- AR_FOR_TARGET
-+GM2_FOR_TARGET
- GDC_FOR_TARGET
- GOC_FOR_TARGET
- GFORTRAN_FOR_TARGET
-@@ -756,6 +757,7 @@
- docdir
- oldincludedir
- includedir
-+runstatedir
- localstatedir
- sharedstatedir
- sysconfdir
-@@ -793,6 +795,7 @@
- enable_libquadmath
- enable_libquadmath_support
- enable_libada
-+enable_libgm2
- enable_libssp
- enable_libstdcxx
- enable_liboffloadmic
-@@ -871,6 +874,7 @@
- GFORTRAN_FOR_TARGET
- GOC_FOR_TARGET
- GDC_FOR_TARGET
-+GM2_FOR_TARGET
- AR_FOR_TARGET
- AS_FOR_TARGET
- DLLTOOL_FOR_TARGET
-@@ -923,6 +927,7 @@
- sysconfdir='${prefix}/etc'
- sharedstatedir='${prefix}/com'
- localstatedir='${prefix}/var'
-+runstatedir='${localstatedir}/run'
- includedir='${prefix}/include'
- oldincludedir='/usr/include'
- docdir='${datarootdir}/doc/${PACKAGE}'
-@@ -1175,6 +1180,15 @@
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
-+ -runstatedir | --runstatedir | --runstatedi | --runstated \
-+ | --runstate | --runstat | --runsta | --runst | --runs \
-+ | --run | --ru | --r)
-+ ac_prev=runstatedir ;;
-+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
-+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
-+ | --run=* | --ru=* | --r=*)
-+ runstatedir=$ac_optarg ;;
-+
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-@@ -1312,7 +1326,7 @@
- for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
- datadir sysconfdir sharedstatedir localstatedir includedir \
- oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-- libdir localedir mandir
-+ libdir localedir mandir runstatedir
- do
- eval ac_val=\$$ac_var
- # Remove trailing slashes.
-@@ -1472,6 +1486,7 @@
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
-+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
-@@ -1530,6 +1545,7 @@
- --disable-libquadmath-support
- disable libquadmath support for Fortran
- --enable-libada build libada directory
-+ --enable-libgm2 build libgm2 directory
- --enable-libssp build libssp directory
- --disable-libstdcxx do not build libstdc++-v3 directory
- --enable-liboffloadmic=ARG
-@@ -1665,6 +1681,8 @@
- GOC for the target
- GDC_FOR_TARGET
- GDC for the target
-+ GM2_FOR_TARGET
-+ GM2 for the target
- AR_FOR_TARGET
- AR for the target
- AS_FOR_TARGET
-@@ -2801,7 +2819,7 @@
- # binutils, gas and ld appear in that order because it makes sense to run
- # "make check" in that particular order.
- # If --enable-gold is used, "gold" may replace "ld".
--host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gdbserver gprof etc expect dejagnu m4 utils guile fastjar gnattools libcc1 gotools c++tools"
-+host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gdbserver gprof etc expect dejagnu m4 utils guile fastjar gnattools libcc1 gm2tools gotools c++tools"
-
- # these libraries are built for the target environment, and are built after
- # the host libraries and the host tools (which may be a cross compiler)
-@@ -2823,6 +2841,7 @@
- target-libffi \
- target-libobjc \
- target-libada \
-+ target-libgm2 \
- target-libgo \
- target-libphobos \
- target-zlib"
-@@ -3160,6 +3179,17 @@
- noconfigdirs="$noconfigdirs gnattools"
- fi
-
-+# Check whether --enable-libgm2 was given.
-+if test "${enable_libgm2+set}" = set; then :
-+ enableval=$enable_libgm2; ENABLE_LIBGM2=$enableval
-+else
-+ ENABLE_LIBGM2=no
-+fi
-+
-+if test "${ENABLE_LIBGM2}" != "yes" ; then
-+ noconfigdirs="$noconfigdirs gm2tools"
-+fi
-+
- # Check whether --enable-libssp was given.
- if test "${enable_libssp+set}" = set; then :
- enableval=$enable_libssp; ENABLE_LIBSSP=$enableval
-@@ -13414,6 +13444,167 @@
-
-
-
-+if test -n "$GM2_FOR_TARGET"; then
-+ ac_cv_prog_GM2_FOR_TARGET=$GM2_FOR_TARGET
-+elif test -n "$ac_cv_prog_GM2_FOR_TARGET"; then
-+ GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
-+fi
-+
-+if test -n "$ac_cv_prog_GM2_FOR_TARGET"; then
-+ for ncn_progname in gm2; do
-+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
-+set dummy ${ncn_progname}; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if ${ac_cv_prog_GM2_FOR_TARGET+:} false; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ if test -n "$GM2_FOR_TARGET"; then
-+ ac_cv_prog_GM2_FOR_TARGET="$GM2_FOR_TARGET" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-+ ac_cv_prog_GM2_FOR_TARGET="${ncn_progname}"
-+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+ break 2
-+ fi
-+done
-+ done
-+IFS=$as_save_IFS
-+
-+fi
-+fi
-+GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
-+if test -n "$GM2_FOR_TARGET"; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GM2_FOR_TARGET" >&5
-+$as_echo "$GM2_FOR_TARGET" >&6; }
-+else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
-+
-+
-+ done
-+fi
-+
-+if test -z "$ac_cv_prog_GM2_FOR_TARGET" && test -n "$with_build_time_tools"; then
-+ for ncn_progname in gm2; do
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
-+$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
-+ if test -x $with_build_time_tools/${ncn_progname}; then
-+ ac_cv_prog_GM2_FOR_TARGET=$with_build_time_tools/${ncn_progname}
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
-+ break
-+ else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+ fi
-+ done
-+fi
-+
-+if test -z "$ac_cv_prog_GM2_FOR_TARGET"; then
-+ for ncn_progname in gm2; do
-+ if test -n "$ncn_target_tool_prefix"; then
-+ # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
-+set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if ${ac_cv_prog_GM2_FOR_TARGET+:} false; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ if test -n "$GM2_FOR_TARGET"; then
-+ ac_cv_prog_GM2_FOR_TARGET="$GM2_FOR_TARGET" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-+ ac_cv_prog_GM2_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
-+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+ break 2
-+ fi
-+done
-+ done
-+IFS=$as_save_IFS
-+
-+fi
-+fi
-+GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
-+if test -n "$GM2_FOR_TARGET"; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GM2_FOR_TARGET" >&5
-+$as_echo "$GM2_FOR_TARGET" >&6; }
-+else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
-+
-+
-+ fi
-+ if test -z "$ac_cv_prog_GM2_FOR_TARGET" && test $build = $target ; then
-+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
-+set dummy ${ncn_progname}; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if ${ac_cv_prog_GM2_FOR_TARGET+:} false; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ if test -n "$GM2_FOR_TARGET"; then
-+ ac_cv_prog_GM2_FOR_TARGET="$GM2_FOR_TARGET" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-+ ac_cv_prog_GM2_FOR_TARGET="${ncn_progname}"
-+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+ break 2
-+ fi
-+done
-+ done
-+IFS=$as_save_IFS
-+
-+fi
-+fi
-+GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
-+if test -n "$GM2_FOR_TARGET"; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GM2_FOR_TARGET" >&5
-+$as_echo "$GM2_FOR_TARGET" >&6; }
-+else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
-+
-+
-+ fi
-+ test -n "$ac_cv_prog_GM2_FOR_TARGET" && break
-+ done
-+fi
-+
-+if test -z "$ac_cv_prog_GM2_FOR_TARGET" ; then
-+ set dummy gm2
-+ if test $build = $target ; then
-+ GM2_FOR_TARGET="$2"
-+ else
-+ GM2_FOR_TARGET="${ncn_target_tool_prefix}$2"
-+ fi
-+else
-+ GM2_FOR_TARGET="$ac_cv_prog_GM2_FOR_TARGET"
-+fi
-+
-+
-+
- cat > conftest.c << \EOF
- #ifdef __GNUC__
- gcc_yay;
-@@ -17085,6 +17276,51 @@
- fi
- fi
-
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target gm2" >&5
-+$as_echo_n "checking where to find the target gm2... " >&6; }
-+if test "x${build}" != "x${host}" ; then
-+ if expr "x$GM2_FOR_TARGET" : "x/" > /dev/null; then
-+ # We already found the complete path
-+ ac_dir=`dirname $GM2_FOR_TARGET`
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
-+$as_echo "pre-installed in $ac_dir" >&6; }
-+ else
-+ # Canadian cross, just use what we found
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
-+$as_echo "pre-installed" >&6; }
-+ fi
-+else
-+ ok=yes
-+ case " ${configdirs} " in
-+ *" gcc "*) ;;
-+ *) ok=no ;;
-+ esac
-+ case ,${enable_languages}, in
-+ *,m2,*) ;;
-+ *) ok=no ;;
-+ esac
-+ if test $ok = yes; then
-+ # An in-tree tool is available and we can use it
-+ GM2_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/gm2 -B$$r/$(HOST_SUBDIR)/gcc/'
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
-+$as_echo "just compiled" >&6; }
-+ elif expr "x$GM2_FOR_TARGET" : "x/" > /dev/null; then
-+ # We already found the complete path
-+ ac_dir=`dirname $GM2_FOR_TARGET`
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
-+$as_echo "pre-installed in $ac_dir" >&6; }
-+ elif test "x$target" = "x$host"; then
-+ # We can use an host tool
-+ GM2_FOR_TARGET='$(GM2)'
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
-+$as_echo "host tool" >&6; }
-+ else
-+ # We need a cross tool
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
-+$as_echo "pre-installed" >&6; }
-+ fi
-+fi
-+
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target ld" >&5
- $as_echo_n "checking where to find the target ld... " >&6; }
- if test "x${build}" != "x${host}" ; then
-@@ -17646,6 +17882,8 @@
- # Specify what files to not compare during bootstrap.
-
- compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/*"
-+compare_exclusions="$compare_exclusions | gcc/m2/gm2-compiler-boot/M2Version*"
-+compare_exclusions="$compare_exclusions | gcc/m2/gm2-compiler-boot/SYSTEM*"
- case "$target" in
- hppa*64*-*-hpux*) ;;
- hppa*-*-hpux*) compare_exclusions="$compare_exclusions | */libgcc/lib2funcs* | gcc/function-tests.o" ;;
diff --git a/gcc/m2/patches/gcc/trunk/02-patches b/gcc/m2/patches/gcc/trunk/02-patches
deleted file mode 100644
index 512f2f74dda..00000000000
--- a/gcc/m2/patches/gcc/trunk/02-patches
+++ /dev/null
@@ -1,60 +0,0 @@
---- gcc-git/configure.ac 2021-06-10 11:58:16.842976709 +0100
-+++ gm2-floppsie/configure.ac 2021-06-17 10:20:53.191400495 +0100
-@@ -140,7 +140,7 @@
- # binutils, gas and ld appear in that order because it makes sense to run
- # "make check" in that particular order.
- # If --enable-gold is used, "gold" may replace "ld".
--host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gdbserver gprof etc expect dejagnu m4 utils guile fastjar gnattools libcc1 gotools c++tools"
-+host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gdbserver gprof etc expect dejagnu m4 utils guile fastjar gnattools libcc1 gm2tools gotools c++tools"
-
- # these libraries are built for the target environment, and are built after
- # the host libraries and the host tools (which may be a cross compiler)
-@@ -162,6 +162,7 @@
- target-libffi \
- target-libobjc \
- target-libada \
-+ target-libgm2 \
- target-libgo \
- target-libphobos \
- target-zlib"
-@@ -459,6 +460,14 @@
- noconfigdirs="$noconfigdirs gnattools"
- fi
-
-+AC_ARG_ENABLE(libgm2,
-+[AS_HELP_STRING([--enable-libgm2], [build libgm2 directory])],
-+ENABLE_LIBGM2=$enableval,
-+ENABLE_LIBGM2=no)
-+if test "${ENABLE_LIBGM2}" != "yes" ; then
-+ noconfigdirs="$noconfigdirs gm2tools"
-+fi
-+
- AC_ARG_ENABLE(libssp,
- [AS_HELP_STRING([--enable-libssp], [build libssp directory])],
- ENABLE_LIBSSP=$enableval,
-@@ -3494,6 +3503,7 @@
- NCN_STRICT_CHECK_TARGET_TOOLS(GFORTRAN_FOR_TARGET, gfortran)
- NCN_STRICT_CHECK_TARGET_TOOLS(GOC_FOR_TARGET, gccgo)
- NCN_STRICT_CHECK_TARGET_TOOLS(GDC_FOR_TARGET, gdc)
-+NCN_STRICT_CHECK_TARGET_TOOLS(GM2_FOR_TARGET, gm2)
-
- ACX_CHECK_INSTALLED_TARGET_TOOL(AR_FOR_TARGET, ar)
- ACX_CHECK_INSTALLED_TARGET_TOOL(AS_FOR_TARGET, as)
-@@ -3530,6 +3540,8 @@
- [gcc/gccgo -B$$r/$(HOST_SUBDIR)/gcc/], go)
- GCC_TARGET_TOOL(gdc, GDC_FOR_TARGET, GDC,
- [gcc/gdc -B$$r/$(HOST_SUBDIR)/gcc/], d)
-+GCC_TARGET_TOOL(gm2, GM2_FOR_TARGET, GM2,
-+ [gcc/gm2 -B$$r/$(HOST_SUBDIR)/gcc/], m2)
- GCC_TARGET_TOOL(ld, LD_FOR_TARGET, LD, [ld/ld-new])
- GCC_TARGET_TOOL(lipo, LIPO_FOR_TARGET, LIPO)
- GCC_TARGET_TOOL(nm, NM_FOR_TARGET, NM, [binutils/nm-new])
-@@ -3656,6 +3668,8 @@
- # Specify what files to not compare during bootstrap.
-
- compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/*"
-+compare_exclusions="$compare_exclusions | gcc/m2/gm2-compiler-boot/M2Version*"
-+compare_exclusions="$compare_exclusions | gcc/m2/gm2-compiler-boot/SYSTEM*"
- case "$target" in
- hppa*64*-*-hpux*) ;;
- hppa*-*-hpux*) compare_exclusions="$compare_exclusions | */libgcc/lib2funcs* | gcc/function-tests.o" ;;
diff --git a/gcc/m2/patches/gcc/trunk/03-patches b/gcc/m2/patches/gcc/trunk/03-patches
deleted file mode 100644
index ffaeb756180..00000000000
--- a/gcc/m2/patches/gcc/trunk/03-patches
+++ /dev/null
@@ -1,12 +0,0 @@
---- gcc-git/gcc/c/gccspec.c 2021-06-10 11:58:17.710982159 +0100
-+++ gm2-floppsie/gcc/c/gccspec.c 2021-06-17 10:20:53.195400499 +0100
-@@ -105,3 +105,9 @@
-
- /* Number of extra output files that lang_specific_pre_link may generate. */
- int lang_specific_extra_outfiles = 0; /* Not used for C. */
-+
-+/* lang_register_spec_functions. Not used for C. */
-+void
-+lang_register_spec_functions (void)
-+{
-+}
diff --git a/gcc/m2/patches/gcc/trunk/04-patches b/gcc/m2/patches/gcc/trunk/04-patches
deleted file mode 100644
index 6422d56ea65..00000000000
--- a/gcc/m2/patches/gcc/trunk/04-patches
+++ /dev/null
@@ -1,12 +0,0 @@
---- gcc-git/gcc/c-family/cppspec.c 2021-06-10 11:58:17.694982057 +0100
-+++ gm2-floppsie/gcc/c-family/cppspec.c 2021-06-17 10:20:53.195400499 +0100
-@@ -198,3 +198,9 @@
-
- /* Number of extra output files that lang_specific_pre_link may generate. */
- int lang_specific_extra_outfiles = 0; /* Not used for cpp. */
-+
-+/* lang_register_spec_functions. Not used for cpp. */
-+void
-+lang_register_spec_functions (void)
-+{
-+}
diff --git a/gcc/m2/patches/gcc/trunk/05-patches b/gcc/m2/patches/gcc/trunk/05-patches
deleted file mode 100644
index 880ee0f9d89..00000000000
--- a/gcc/m2/patches/gcc/trunk/05-patches
+++ /dev/null
@@ -1,12 +0,0 @@
---- gcc-git/gcc/cp/g++spec.c 2021-06-10 11:58:18.246985525 +0100
-+++ gm2-floppsie/gcc/cp/g++spec.c 2021-06-17 10:20:53.195400499 +0100
-@@ -434,3 +434,9 @@
-
- /* Number of extra output files that lang_specific_pre_link may generate. */
- int lang_specific_extra_outfiles = 0; /* Not used for C++. */
-+
-+/* lang_register_spec_functions. Not used for C++. */
-+void
-+lang_register_spec_functions (void)
-+{
-+}
diff --git a/gcc/m2/patches/gcc/trunk/06-patches b/gcc/m2/patches/gcc/trunk/06-patches
deleted file mode 100644
index cbb82ab629a..00000000000
--- a/gcc/m2/patches/gcc/trunk/06-patches
+++ /dev/null
@@ -1,317 +0,0 @@
---- gcc-git/gcc/gcc.c 2021-06-10 11:58:18.494987083 +0100
-+++ gm2-floppsie/gcc/gcc.c 2021-06-17 10:20:53.199400503 +0100
-@@ -334,6 +334,10 @@
- static const char *cross_compile = "0";
- #endif
-
-+/* The lang specs might wish to override the default linker.
-+ */
-+int allow_linker = 1;
-+
- /* Greatest exit code of sub-processes that has been encountered up to
- now. */
- static int greatest_status = 1;
-@@ -362,7 +366,6 @@
- static struct compiler *lookup_compiler (const char *, size_t, const char *);
- static char *build_search_list (const struct path_prefix *, const char *,
- bool, bool);
--static void xputenv (const char *);
- static void putenv_from_prefixes (const struct path_prefix *, const char *,
- bool);
- static int access_check (const char *, int);
-@@ -1148,6 +1151,7 @@
- /* We pass any -flto flags on to the linker, which is expected
- to understand them. In practice, this means it had better be collect2. */
- /* %{e*} includes -export-dynamic; see comment in common.opt. */
-+
- #ifndef LINK_COMMAND_SPEC
- #define LINK_COMMAND_SPEC "\
- %{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
-@@ -1781,6 +1785,10 @@
- { 0, 0 }
- };
-
-+/* front end registered spec functions */
-+static struct spec_function *lang_spec_functions = NULL;
-+static unsigned int lang_spec_functions_length = 0;
-+
- static int processing_spec_function;
- \f
- /* Add appropriate libgcc specs to OBSTACK, taking into account
-@@ -2943,12 +2951,20 @@
-
- /* Add or change the value of an environment variable, outputting the
- change to standard error if in verbose mode. */
--static void
-+void
- xputenv (const char *string)
- {
- env.xput (string);
- }
-
-+/* Get the environment variable through the managed env. */
-+
-+const char *
-+xgetenv (const char *key)
-+{
-+ return env.get (key);
-+}
-+
- /* Build a list of search directories from PATHS.
- PREFIX is a string to prepend to the list.
- If CHECK_DIR_P is true we ensure the directory exists.
-@@ -3877,7 +3893,7 @@
- /* Save an option OPT with N_ARGS arguments in array ARGS, marking it
- as validated if VALIDATED and KNOWN if it is an internal switch. */
-
--static void
-+void
- save_switch (const char *opt, size_t n_args, const char *const *args,
- bool validated, bool known)
- {
-@@ -3922,6 +3938,66 @@
- setenv ("SOURCE_DATE_EPOCH", source_date_epoch, 0);
- }
-
-+void
-+fe_add_linker_option (const char *option)
-+{
-+ add_linker_option (option, strlen (option));
-+}
-+
-+/* Handle the -B option by adding the prefix to exec, startfile and
-+ include search paths. */
-+
-+void
-+handle_OPT_B (const char *arg)
-+{
-+ size_t len = strlen (arg);
-+
-+ /* Catch the case where the user has forgotten to append a
-+ directory separator to the path. Note, they may be using
-+ -B to add an executable name prefix, eg "i386-elf-", in
-+ order to distinguish between multiple installations of
-+ GCC in the same directory. Hence we must check to see
-+ if appending a directory separator actually makes a
-+ valid directory name. */
-+ if (!IS_DIR_SEPARATOR (arg[len - 1])
-+ && is_directory (arg, false))
-+ {
-+ char *tmp = XNEWVEC (char, len + 2);
-+ strcpy (tmp, arg);
-+ tmp[len] = DIR_SEPARATOR;
-+ tmp[++len] = 0;
-+ arg = tmp;
-+ }
-+
-+ add_prefix (&exec_prefixes, arg, NULL,
-+ PREFIX_PRIORITY_B_OPT, 0, 0);
-+ add_prefix (&startfile_prefixes, arg, NULL,
-+ PREFIX_PRIORITY_B_OPT, 0, 0);
-+ add_prefix (&include_prefixes, arg, NULL,
-+ PREFIX_PRIORITY_B_OPT, 0, 0);
-+}
-+
-+/* Save the infile. */
-+
-+void
-+fe_add_infile (const char *infile, const char *lang)
-+{
-+ add_infile (infile, lang);
-+}
-+
-+/* Mark a file as compiled. */
-+
-+void
-+fe_mark_compiled (const char *name)
-+{
-+ int max = n_infiles + lang_specific_extra_outfiles;
-+ int i;
-+
-+ for (i = 0; i < max; i++)
-+ if (filename_cmp (name, infiles[i].name) == 0)
-+ infiles[i].compiled = true;
-+}
-+
- /* Handle an option DECODED that is unknown to the option-processing
- machinery. */
-
-@@ -4423,33 +4499,7 @@
- break;
-
- case OPT_B:
-- {
-- size_t len = strlen (arg);
--
-- /* Catch the case where the user has forgotten to append a
-- directory separator to the path. Note, they may be using
-- -B to add an executable name prefix, eg "i386-elf-", in
-- order to distinguish between multiple installations of
-- GCC in the same directory. Hence we must check to see
-- if appending a directory separator actually makes a
-- valid directory name. */
-- if (!IS_DIR_SEPARATOR (arg[len - 1])
-- && is_directory (arg, false))
-- {
-- char *tmp = XNEWVEC (char, len + 2);
-- strcpy (tmp, arg);
-- tmp[len] = DIR_SEPARATOR;
-- tmp[++len] = 0;
-- arg = tmp;
-- }
--
-- add_prefix (&exec_prefixes, arg, NULL,
-- PREFIX_PRIORITY_B_OPT, 0, 0);
-- add_prefix (&startfile_prefixes, arg, NULL,
-- PREFIX_PRIORITY_B_OPT, 0, 0);
-- add_prefix (&include_prefixes, arg, NULL,
-- PREFIX_PRIORITY_B_OPT, 0, 0);
-- }
-+ handle_OPT_B (arg);
- validated = true;
- break;
-
-@@ -4572,6 +4622,69 @@
- return ret;
- }
-
-+/* print_option a debugging routine to display option i with a leading desc
-+ string. */
-+
-+void
-+print_option (const char *desc, unsigned int i,
-+ struct cl_decoded_option *in_decoded_options)
-+{
-+ printf (desc);
-+ printf (" [%d]", i);
-+ switch (in_decoded_options[i].opt_index)
-+ {
-+
-+ case N_OPTS:
-+ break;
-+ case OPT_SPECIAL_unknown:
-+ printf (" flag <unknown>");
-+ break;
-+ case OPT_SPECIAL_ignore:
-+ printf (" flag <ignore>");
-+ break;
-+ case OPT_SPECIAL_program_name:
-+ printf (" flag <program name>");
-+ break;
-+ case OPT_SPECIAL_input_file:
-+ printf (" flag <input file name>");
-+ break;
-+ default:
-+ printf (" flag [%s]",
-+ cl_options[in_decoded_options[i].opt_index].opt_text);
-+ }
-+
-+ if (in_decoded_options[i].arg == NULL)
-+ printf (" no arg");
-+ else
-+ printf (" arg [%s]", in_decoded_options[i].arg);
-+ printf (" orig text [%s]",
-+ in_decoded_options[i].orig_option_with_args_text);
-+ /* On some hosts value is declared as a long long int. */
-+ printf (" value [%ld]", (long int)in_decoded_options[i].value);
-+ printf (" error [%d]\n", in_decoded_options[i].errors);
-+}
-+
-+/* print_options display all options with a leading string desc. */
-+
-+void
-+print_options (const char *desc,
-+ unsigned int in_decoded_options_count,
-+ struct cl_decoded_option *in_decoded_options)
-+{
-+ for (unsigned int i = 0; i < in_decoded_options_count; i++)
-+ print_option (desc, i, in_decoded_options);
-+}
-+
-+/* dbg_options display all options. */
-+
-+void
-+dbg_options (unsigned int in_decoded_options_count,
-+ struct cl_decoded_option *in_decoded_options)
-+{
-+ print_options ("dbg_options", in_decoded_options_count,
-+ in_decoded_options);
-+}
-+
- /* Create the vector `switches' and its contents.
- Store its length in `n_switches'. */
-
-@@ -6731,6 +6844,33 @@
- return 0;
- }
-
-+/* Allow the front end to register a spec function. */
-+
-+void fe_add_spec_function (const char *name, const char *(*func) (int, const char **))
-+{
-+ const struct spec_function *f = lookup_spec_function (name);
-+ struct spec_function *fl;
-+ unsigned int i;
-+
-+ if (f != NULL)
-+ fatal_error (input_location, "spec function (%s) already registered", name);
-+
-+ if (lang_spec_functions == NULL)
-+ lang_spec_functions_length = 1;
-+
-+ lang_spec_functions_length++;
-+ fl = (struct spec_function *) xmalloc (sizeof (const struct spec_function)*lang_spec_functions_length);
-+ for (i=0; i<lang_spec_functions_length-2; i++)
-+ fl[i] = lang_spec_functions[i];
-+ free (lang_spec_functions);
-+ lang_spec_functions = fl;
-+
-+ lang_spec_functions[lang_spec_functions_length-2].name = name;
-+ lang_spec_functions[lang_spec_functions_length-2].func = func;
-+ lang_spec_functions[lang_spec_functions_length-1].name = NULL;
-+ lang_spec_functions[lang_spec_functions_length-1].func = NULL;
-+}
-+
- /* Look up a spec function. */
-
- static const struct spec_function *
-@@ -6742,6 +6882,11 @@
- if (strcmp (sf->name, name) == 0)
- return sf;
-
-+ if (lang_spec_functions != NULL)
-+ for (sf = lang_spec_functions; sf->name != NULL; sf++)
-+ if (strcmp (sf->name, name) == 0)
-+ return sf;
-+
- return NULL;
- }
-
-@@ -8228,6 +8373,8 @@
- accel_dir_suffix, dir_separator_str, NULL);
- just_machine_suffix = concat (spec_machine, dir_separator_str, NULL);
-
-+ lang_register_spec_functions ();
-+
- specs_file = find_a_file (&startfile_prefixes, "specs", R_OK, true);
- /* Read the specs file unless it is a default one. */
- if (specs_file != 0 && strcmp (specs_file, "specs"))
-@@ -8962,7 +9109,8 @@
-
- /* Run ld to link all the compiler output files. */
-
-- if (num_linker_inputs > 0 && !seen_error () && print_subprocess_help < 2)
-+ if (num_linker_inputs > 0 && !seen_error () && print_subprocess_help < 2
-+ && allow_linker)
- {
- int tmp = execution_count;
-
-@@ -9031,7 +9179,7 @@
- /* If options said don't run linker,
- complain about input files to be given to the linker. */
-
-- if (! linker_was_run && !seen_error ())
-+ if (! linker_was_run && !seen_error () && allow_linker)
- for (i = 0; (int) i < n_infiles; i++)
- if (explicit_link_files[i]
- && !(infiles[i].language && infiles[i].language[0] == '*'))
diff --git a/gcc/m2/patches/gcc/trunk/07-patches b/gcc/m2/patches/gcc/trunk/07-patches
deleted file mode 100644
index 06d8ef97a43..00000000000
--- a/gcc/m2/patches/gcc/trunk/07-patches
+++ /dev/null
@@ -1,40 +0,0 @@
---- gcc-git/gcc/gcc.h 2021-06-10 11:58:18.494987083 +0100
-+++ gm2-floppsie/gcc/gcc.h 2021-06-17 10:20:53.199400503 +0100
-@@ -73,9 +73,28 @@
- extern int do_spec (const char *);
- extern void record_temp_file (const char *, int, int);
- extern void set_input (const char *);
-+extern void save_switch (const char *opt, size_t n_args,
-+ const char *const *args,
-+ bool validated, bool known);
-+extern void handle_OPT_B (const char *arg);
-+extern void fe_add_infile (const char *infile, const char *lang);
-+extern void fe_add_linker_option (const char *option);
-+extern void fe_add_spec_function (const char *name, const char *(*func) (int, const char **));
-+extern void xputenv (const char *value);
-+extern const char *xgetenv (const char *key);
-+extern void print_options (const char *desc,
-+ unsigned int in_decoded_options_count,
-+ struct cl_decoded_option *in_decoded_options);
-+extern void print_option (const char *desc, unsigned int i,
-+ struct cl_decoded_option *in_decoded_options);
-+extern void dbg_options (unsigned int in_decoded_options_count,
-+ struct cl_decoded_option *in_decoded_options);
-+
-
- /* Spec files linked with gcc.c must provide definitions for these. */
-
-+extern void lang_register_spec_functions (void);
-+
- /* Called before processing to change/add/remove arguments. */
- extern void lang_specific_driver (struct cl_decoded_option **,
- unsigned int *, int *);
-@@ -97,4 +116,8 @@
- void *user_data),
- void *user_data);
-
-+/* Default setting is true, but can be overridden by the language
-+ front end to prohibit the linker from being invoked. */
-+extern int allow_linker;
-+
- #endif /* ! GCC_GCC_H */
diff --git a/gcc/m2/patches/gcc/trunk/08-patches b/gcc/m2/patches/gcc/trunk/08-patches
deleted file mode 100644
index b8afd8bf359..00000000000
--- a/gcc/m2/patches/gcc/trunk/08-patches
+++ /dev/null
@@ -1,55 +0,0 @@
---- gcc-git/Makefile.def 2021-06-10 11:58:16.806976484 +0100
-+++ gm2-floppsie/Makefile.def 2021-06-17 10:20:53.203400506 +0100
-@@ -140,6 +140,7 @@
- extra_configure_flags='--enable-shared @extra_linker_plugin_flags@ @extra_linker_plugin_configure_flags@';
- extra_make_flags='@extra_linker_plugin_flags@'; };
- host_modules= { module= libcc1; extra_configure_flags=--enable-shared; };
-+host_modules= { module= gm2tools; };
- host_modules= { module= gotools; };
- host_modules= { module= libctf; bootstrap=true; };
-
-@@ -179,6 +180,7 @@
- target_modules = { module= zlib; };
- target_modules = { module= rda; };
- target_modules = { module= libada; };
-+target_modules = { module= libgm2; lib_path=.libs; };
- target_modules = { module= libgomp; bootstrap= true; lib_path=.libs; };
- target_modules = { module= libitm; lib_path=.libs; };
- target_modules = { module= libatomic; lib_path=.libs; };
-@@ -297,6 +299,8 @@
- flags_to_pass = { flag= GOCFLAGS_FOR_TARGET ; };
- flags_to_pass = { flag= GDC_FOR_TARGET ; };
- flags_to_pass = { flag= GDCFLAGS_FOR_TARGET ; };
-+flags_to_pass = { flag= GM2_FOR_TARGET ; };
-+flags_to_pass = { flag= GM2FLAGS_FOR_TARGET ; };
- flags_to_pass = { flag= LD_FOR_TARGET ; };
- flags_to_pass = { flag= LIPO_FOR_TARGET ; };
- flags_to_pass = { flag= LDFLAGS_FOR_TARGET ; };
-@@ -393,6 +397,8 @@
- // we want version.o from gcc, and implicitly depend on libcody
- dependencies = { module=all-c++tools; on=all-gcc; };
- dependencies = { module=all-gotools; on=all-target-libgo; };
-+dependencies = { module=all-gm2tools; on=all-target-libgm2; };
-+dependencies = { module=all-gm2tools; on=all-target-libstdc++-v3; };
-
- dependencies = { module=all-utils; on=all-libiberty; };
-
-@@ -593,6 +599,8 @@
- dependencies = { module=all-target-libgo; on=all-target-libbacktrace; };
- dependencies = { module=all-target-libgo; on=all-target-libffi; };
- dependencies = { module=all-target-libgo; on=all-target-libatomic; };
-+dependencies = { module=configure-target-libgm2; on=all-target-libstdc++-v3; };
-+dependencies = { module=all-target-libgm2; on=all-target-libatomic; };
- dependencies = { module=configure-target-libphobos; on=configure-target-libbacktrace; };
- dependencies = { module=configure-target-libphobos; on=configure-target-zlib; };
- dependencies = { module=all-target-libphobos; on=all-target-libbacktrace; };
-@@ -651,6 +659,9 @@
- languages = { language=go; gcc-check-target=check-go;
- lib-check-target=check-target-libgo;
- lib-check-target=check-gotools; };
-+languages = { language=m2; gcc-check-target=check-m2;
-+ lib-check-target=check-target-libgm2;
-+ lib-check-target=check-gm2tools; };
- languages = { language=d; gcc-check-target=check-d;
- lib-check-target=check-target-libphobos; };
-
diff --git a/gcc/m2/patches/gcc/trunk/09-patches b/gcc/m2/patches/gcc/trunk/09-patches
deleted file mode 100644
index 813889feb9c..00000000000
--- a/gcc/m2/patches/gcc/trunk/09-patches
+++ /dev/null
@@ -1,1426 +0,0 @@
---- gcc-git/Makefile.in 2021-06-10 11:58:16.818976558 +0100
-+++ gm2-floppsie/Makefile.in 2021-06-17 10:21:30.000000000 +0100
-@@ -158,6 +158,7 @@
- GOCFLAGS="$(GOCFLAGS_FOR_BUILD)"; export GOCFLAGS; \
- GDC="$(GDC_FOR_BUILD)"; export GDC; \
- GDCFLAGS="$(GDCFLAGS_FOR_BUILD)"; export GDCFLAGS; \
-+ GM2="$(GM2_FOR_BUILD)"; export GM2; \
- DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
- LD="$(LD_FOR_BUILD)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
-@@ -195,6 +196,7 @@
- GFORTRAN="$(GFORTRAN)"; export GFORTRAN; \
- GOC="$(GOC)"; export GOC; \
- GDC="$(GDC)"; export GDC; \
-+ GM2="$(GM2)"; export GM2; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
-@@ -293,6 +295,7 @@
- GFORTRAN="$(GFORTRAN_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GFORTRAN; \
- GOC="$(GOC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GOC; \
- GDC="$(GDC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GDC; \
-+ GM2="$(GM2_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GM2; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
-@@ -359,6 +362,7 @@
- GFORTRAN_FOR_BUILD = @GFORTRAN_FOR_BUILD@
- GOC_FOR_BUILD = @GOC_FOR_BUILD@
- GDC_FOR_BUILD = @GDC_FOR_BUILD@
-+GM2_FOR_BUILD = @GM2_FOR_BUILD@
- LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
- LD_FOR_BUILD = @LD_FOR_BUILD@
- NM_FOR_BUILD = @NM_FOR_BUILD@
-@@ -428,6 +432,7 @@
- LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
- GOCFLAGS = $(CFLAGS)
- GDCFLAGS = $(CFLAGS)
-+GM2FLAGS = $(CFLAGS)
-
- CREATE_GCOV = create_gcov
-
-@@ -595,6 +600,7 @@
- GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@
- GOC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GOC_FOR_TARGET@
- GDC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GDC_FOR_TARGET@
-+GM2_FOR_TARGET=$(STAGE_CC_WRAPPER) @GM2_FOR_TARGET@
- DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
- LD_FOR_TARGET=@LD_FOR_TARGET@
-
-@@ -619,6 +625,7 @@
- LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
- LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
- LDFLAGS_FOR_TARGET = @LDFLAGS_FOR_TARGET@
-+GM2FLAGS_FOR_TARGET = -O2 -g
- GOCFLAGS_FOR_TARGET = -O2 -g
- GDCFLAGS_FOR_TARGET = -O2 -g
-
-@@ -645,7 +652,7 @@
-
- # This is the list of directories that may be needed in RPATH_ENVVAR
- # so that programs built for the target machine work.
--TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libsanitizer)$(TARGET_LIB_PATH_libvtv)$(TARGET_LIB_PATH_liboffloadmic)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libphobos)$(TARGET_LIB_PATH_libgomp)$(TARGET_LIB_PATH_libitm)$(TARGET_LIB_PATH_libatomic)$(HOST_LIB_PATH_gcc)
-+TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libsanitizer)$(TARGET_LIB_PATH_libvtv)$(TARGET_LIB_PATH_liboffloadmic)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libphobos)$(TARGET_LIB_PATH_libgm2)$(TARGET_LIB_PATH_libgomp)$(TARGET_LIB_PATH_libitm)$(TARGET_LIB_PATH_libatomic)$(HOST_LIB_PATH_gcc)
-
- @if target-libstdc++-v3
- TARGET_LIB_PATH_libstdc++-v3 = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:
-@@ -671,6 +678,10 @@
- TARGET_LIB_PATH_libphobos = $$r/$(TARGET_SUBDIR)/libphobos/src/.libs:
- @endif target-libphobos
-
-+@if target-libgm2
-+TARGET_LIB_PATH_libgm2 = $$r/$(TARGET_SUBDIR)/libgm2/.libs:
-+@endif target-libgm2
-+
- @if target-libgomp
- TARGET_LIB_PATH_libgomp = $$r/$(TARGET_SUBDIR)/libgomp/.libs:
- @endif target-libgomp
-@@ -820,6 +831,8 @@
- "GOCFLAGS_FOR_TARGET=$(GOCFLAGS_FOR_TARGET)" \
- "GDC_FOR_TARGET=$(GDC_FOR_TARGET)" \
- "GDCFLAGS_FOR_TARGET=$(GDCFLAGS_FOR_TARGET)" \
-+ "GM2_FOR_TARGET=$(GM2_FOR_TARGET)" \
-+ "GM2FLAGS_FOR_TARGET=$(GM2FLAGS_FOR_TARGET)" \
- "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
- "LIPO_FOR_TARGET=$(LIPO_FOR_TARGET)" \
- "LDFLAGS_FOR_TARGET=$(LDFLAGS_FOR_TARGET)" \
-@@ -892,6 +905,7 @@
- 'GFORTRAN=$(GFORTRAN)' \
- 'GOC=$(GOC)' \
- 'GDC=$(GDC)' \
-+ 'GM2=$(GM2)' \
- 'LD=$(LD)' \
- 'LIPO=$(LIPO)' \
- 'NM=$(NM)' \
-@@ -918,6 +932,7 @@
- CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \
- CXX="$${CXX}" CXX_FOR_BUILD="$${CXX_FOR_BUILD}" \
- GDC="$${GDC}" GDC_FOR_BUILD="$${GDC_FOR_BUILD}" \
-+ GM2="$${GM2}" GM2_FOR_BUILD="$${GM2_FOR_BUILD}" \
- GNATBIND="$${GNATBIND}" \
- LDFLAGS="$${LDFLAGS}" \
- HOST_LIBS="$${HOST_LIBS}" \
-@@ -952,6 +967,8 @@
- 'GOCFLAGS=$$(GOCFLAGS_FOR_TARGET)' \
- 'GDC=$$(GDC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
- 'GDCFLAGS=$$(GDCFLAGS_FOR_TARGET)' \
-+ 'GM2=$$(GM2_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
-+ 'GM2FLAGS=$$(GM2FLAGS_FOR_TARGET)' \
- 'LD=$(COMPILER_LD_FOR_TARGET)' \
- 'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \
- 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
-@@ -978,6 +995,7 @@
- # cross-building scheme.
- EXTRA_GCC_FLAGS = \
- "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
-+ "GM2_FOR_TARGET=$(GM2_FOR_TARGET)" \
- "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
- "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"
-
-@@ -1042,6 +1060,7 @@
- maybe-configure-gnattools \
- maybe-configure-lto-plugin \
- maybe-configure-libcc1 \
-+ maybe-configure-gm2tools \
- maybe-configure-gotools \
- maybe-configure-libctf
- .PHONY: configure-target
-@@ -1066,6 +1085,7 @@
- maybe-configure-target-zlib \
- maybe-configure-target-rda \
- maybe-configure-target-libada \
-+ maybe-configure-target-libgm2 \
- maybe-configure-target-libgomp \
- maybe-configure-target-libitm \
- maybe-configure-target-libatomic
-@@ -1203,6 +1223,7 @@
- all-host: maybe-all-lto-plugin
- @endif lto-plugin-no-bootstrap
- all-host: maybe-all-libcc1
-+all-host: maybe-all-gm2tools
- all-host: maybe-all-gotools
- @if libctf-no-bootstrap
- all-host: maybe-all-libctf
-@@ -1238,6 +1259,7 @@
- all-target: maybe-all-target-zlib
- all-target: maybe-all-target-rda
- all-target: maybe-all-target-libada
-+all-target: maybe-all-target-libgm2
- @if target-libgomp-no-bootstrap
- all-target: maybe-all-target-libgomp
- @endif target-libgomp-no-bootstrap
-@@ -1310,6 +1332,7 @@
- info-host: maybe-info-gnattools
- info-host: maybe-info-lto-plugin
- info-host: maybe-info-libcc1
-+info-host: maybe-info-gm2tools
- info-host: maybe-info-gotools
- info-host: maybe-info-libctf
-
-@@ -1335,6 +1358,7 @@
- info-target: maybe-info-target-zlib
- info-target: maybe-info-target-rda
- info-target: maybe-info-target-libada
-+info-target: maybe-info-target-libgm2
- info-target: maybe-info-target-libgomp
- info-target: maybe-info-target-libitm
- info-target: maybe-info-target-libatomic
-@@ -1400,6 +1424,7 @@
- dvi-host: maybe-dvi-gnattools
- dvi-host: maybe-dvi-lto-plugin
- dvi-host: maybe-dvi-libcc1
-+dvi-host: maybe-dvi-gm2tools
- dvi-host: maybe-dvi-gotools
- dvi-host: maybe-dvi-libctf
-
-@@ -1425,6 +1450,7 @@
- dvi-target: maybe-dvi-target-zlib
- dvi-target: maybe-dvi-target-rda
- dvi-target: maybe-dvi-target-libada
-+dvi-target: maybe-dvi-target-libgm2
- dvi-target: maybe-dvi-target-libgomp
- dvi-target: maybe-dvi-target-libitm
- dvi-target: maybe-dvi-target-libatomic
-@@ -1490,6 +1516,7 @@
- pdf-host: maybe-pdf-gnattools
- pdf-host: maybe-pdf-lto-plugin
- pdf-host: maybe-pdf-libcc1
-+pdf-host: maybe-pdf-gm2tools
- pdf-host: maybe-pdf-gotools
- pdf-host: maybe-pdf-libctf
-
-@@ -1515,6 +1542,7 @@
- pdf-target: maybe-pdf-target-zlib
- pdf-target: maybe-pdf-target-rda
- pdf-target: maybe-pdf-target-libada
-+pdf-target: maybe-pdf-target-libgm2
- pdf-target: maybe-pdf-target-libgomp
- pdf-target: maybe-pdf-target-libitm
- pdf-target: maybe-pdf-target-libatomic
-@@ -1580,6 +1608,7 @@
- html-host: maybe-html-gnattools
- html-host: maybe-html-lto-plugin
- html-host: maybe-html-libcc1
-+html-host: maybe-html-gm2tools
- html-host: maybe-html-gotools
- html-host: maybe-html-libctf
-
-@@ -1605,6 +1634,7 @@
- html-target: maybe-html-target-zlib
- html-target: maybe-html-target-rda
- html-target: maybe-html-target-libada
-+html-target: maybe-html-target-libgm2
- html-target: maybe-html-target-libgomp
- html-target: maybe-html-target-libitm
- html-target: maybe-html-target-libatomic
-@@ -1670,6 +1700,7 @@
- TAGS-host: maybe-TAGS-gnattools
- TAGS-host: maybe-TAGS-lto-plugin
- TAGS-host: maybe-TAGS-libcc1
-+TAGS-host: maybe-TAGS-gm2tools
- TAGS-host: maybe-TAGS-gotools
- TAGS-host: maybe-TAGS-libctf
-
-@@ -1695,6 +1726,7 @@
- TAGS-target: maybe-TAGS-target-zlib
- TAGS-target: maybe-TAGS-target-rda
- TAGS-target: maybe-TAGS-target-libada
-+TAGS-target: maybe-TAGS-target-libgm2
- TAGS-target: maybe-TAGS-target-libgomp
- TAGS-target: maybe-TAGS-target-libitm
- TAGS-target: maybe-TAGS-target-libatomic
-@@ -1760,6 +1792,7 @@
- install-info-host: maybe-install-info-gnattools
- install-info-host: maybe-install-info-lto-plugin
- install-info-host: maybe-install-info-libcc1
-+install-info-host: maybe-install-info-gm2tools
- install-info-host: maybe-install-info-gotools
- install-info-host: maybe-install-info-libctf
-
-@@ -1785,6 +1818,7 @@
- install-info-target: maybe-install-info-target-zlib
- install-info-target: maybe-install-info-target-rda
- install-info-target: maybe-install-info-target-libada
-+install-info-target: maybe-install-info-target-libgm2
- install-info-target: maybe-install-info-target-libgomp
- install-info-target: maybe-install-info-target-libitm
- install-info-target: maybe-install-info-target-libatomic
-@@ -1850,6 +1884,7 @@
- install-pdf-host: maybe-install-pdf-gnattools
- install-pdf-host: maybe-install-pdf-lto-plugin
- install-pdf-host: maybe-install-pdf-libcc1
-+install-pdf-host: maybe-install-pdf-gm2tools
- install-pdf-host: maybe-install-pdf-gotools
- install-pdf-host: maybe-install-pdf-libctf
-
-@@ -1875,6 +1910,7 @@
- install-pdf-target: maybe-install-pdf-target-zlib
- install-pdf-target: maybe-install-pdf-target-rda
- install-pdf-target: maybe-install-pdf-target-libada
-+install-pdf-target: maybe-install-pdf-target-libgm2
- install-pdf-target: maybe-install-pdf-target-libgomp
- install-pdf-target: maybe-install-pdf-target-libitm
- install-pdf-target: maybe-install-pdf-target-libatomic
-@@ -1940,6 +1976,7 @@
- install-html-host: maybe-install-html-gnattools
- install-html-host: maybe-install-html-lto-plugin
- install-html-host: maybe-install-html-libcc1
-+install-html-host: maybe-install-html-gm2tools
- install-html-host: maybe-install-html-gotools
- install-html-host: maybe-install-html-libctf
-
-@@ -1965,6 +2002,7 @@
- install-html-target: maybe-install-html-target-zlib
- install-html-target: maybe-install-html-target-rda
- install-html-target: maybe-install-html-target-libada
-+install-html-target: maybe-install-html-target-libgm2
- install-html-target: maybe-install-html-target-libgomp
- install-html-target: maybe-install-html-target-libitm
- install-html-target: maybe-install-html-target-libatomic
-@@ -2030,6 +2068,7 @@
- installcheck-host: maybe-installcheck-gnattools
- installcheck-host: maybe-installcheck-lto-plugin
- installcheck-host: maybe-installcheck-libcc1
-+installcheck-host: maybe-installcheck-gm2tools
- installcheck-host: maybe-installcheck-gotools
- installcheck-host: maybe-installcheck-libctf
-
-@@ -2055,6 +2094,7 @@
- installcheck-target: maybe-installcheck-target-zlib
- installcheck-target: maybe-installcheck-target-rda
- installcheck-target: maybe-installcheck-target-libada
-+installcheck-target: maybe-installcheck-target-libgm2
- installcheck-target: maybe-installcheck-target-libgomp
- installcheck-target: maybe-installcheck-target-libitm
- installcheck-target: maybe-installcheck-target-libatomic
-@@ -2120,6 +2160,7 @@
- mostlyclean-host: maybe-mostlyclean-gnattools
- mostlyclean-host: maybe-mostlyclean-lto-plugin
- mostlyclean-host: maybe-mostlyclean-libcc1
-+mostlyclean-host: maybe-mostlyclean-gm2tools
- mostlyclean-host: maybe-mostlyclean-gotools
- mostlyclean-host: maybe-mostlyclean-libctf
-
-@@ -2145,6 +2186,7 @@
- mostlyclean-target: maybe-mostlyclean-target-zlib
- mostlyclean-target: maybe-mostlyclean-target-rda
- mostlyclean-target: maybe-mostlyclean-target-libada
-+mostlyclean-target: maybe-mostlyclean-target-libgm2
- mostlyclean-target: maybe-mostlyclean-target-libgomp
- mostlyclean-target: maybe-mostlyclean-target-libitm
- mostlyclean-target: maybe-mostlyclean-target-libatomic
-@@ -2210,6 +2252,7 @@
- clean-host: maybe-clean-gnattools
- clean-host: maybe-clean-lto-plugin
- clean-host: maybe-clean-libcc1
-+clean-host: maybe-clean-gm2tools
- clean-host: maybe-clean-gotools
- clean-host: maybe-clean-libctf
-
-@@ -2235,6 +2278,7 @@
- clean-target: maybe-clean-target-zlib
- clean-target: maybe-clean-target-rda
- clean-target: maybe-clean-target-libada
-+clean-target: maybe-clean-target-libgm2
- clean-target: maybe-clean-target-libgomp
- clean-target: maybe-clean-target-libitm
- clean-target: maybe-clean-target-libatomic
-@@ -2300,6 +2344,7 @@
- distclean-host: maybe-distclean-gnattools
- distclean-host: maybe-distclean-lto-plugin
- distclean-host: maybe-distclean-libcc1
-+distclean-host: maybe-distclean-gm2tools
- distclean-host: maybe-distclean-gotools
- distclean-host: maybe-distclean-libctf
-
-@@ -2325,6 +2370,7 @@
- distclean-target: maybe-distclean-target-zlib
- distclean-target: maybe-distclean-target-rda
- distclean-target: maybe-distclean-target-libada
-+distclean-target: maybe-distclean-target-libgm2
- distclean-target: maybe-distclean-target-libgomp
- distclean-target: maybe-distclean-target-libitm
- distclean-target: maybe-distclean-target-libatomic
-@@ -2390,6 +2436,7 @@
- maintainer-clean-host: maybe-maintainer-clean-gnattools
- maintainer-clean-host: maybe-maintainer-clean-lto-plugin
- maintainer-clean-host: maybe-maintainer-clean-libcc1
-+maintainer-clean-host: maybe-maintainer-clean-gm2tools
- maintainer-clean-host: maybe-maintainer-clean-gotools
- maintainer-clean-host: maybe-maintainer-clean-libctf
-
-@@ -2415,6 +2462,7 @@
- maintainer-clean-target: maybe-maintainer-clean-target-zlib
- maintainer-clean-target: maybe-maintainer-clean-target-rda
- maintainer-clean-target: maybe-maintainer-clean-target-libada
-+maintainer-clean-target: maybe-maintainer-clean-target-libgm2
- maintainer-clean-target: maybe-maintainer-clean-target-libgomp
- maintainer-clean-target: maybe-maintainer-clean-target-libitm
- maintainer-clean-target: maybe-maintainer-clean-target-libatomic
-@@ -2463,7 +2511,7 @@
- -rm -f texinfo/doc/Makefile texinfo/po/POTFILES
- -rmdir texinfo/doc texinfo/info texinfo/intl texinfo/lib 2>/dev/null
- -rmdir texinfo/makeinfo texinfo/po texinfo/util 2>/dev/null
-- -rmdir c++tools fastjar gcc gnattools gotools 2>/dev/null
-+ -rmdir c++tools fastjar gcc gnattools gm2tools gotools 2>/dev/null
- -rmdir libcc1 libiberty texinfo zlib 2>/dev/null
- -find . -name config.cache -exec rm -f {} \; \; 2>/dev/null
-
-@@ -2536,6 +2584,7 @@
- maybe-check-gnattools \
- maybe-check-lto-plugin \
- maybe-check-libcc1 \
-+ maybe-check-gm2tools \
- maybe-check-gotools \
- maybe-check-libctf
-
-@@ -2561,6 +2610,7 @@
- maybe-check-target-zlib \
- maybe-check-target-rda \
- maybe-check-target-libada \
-+ maybe-check-target-libgm2 \
- maybe-check-target-libgomp \
- maybe-check-target-libitm \
- maybe-check-target-libatomic
-@@ -2673,6 +2723,7 @@
- maybe-install-gnattools \
- maybe-install-lto-plugin \
- maybe-install-libcc1 \
-+ maybe-install-gm2tools \
- maybe-install-gotools \
- maybe-install-libctf
-
-@@ -2728,6 +2779,7 @@
- maybe-install-gnattools \
- maybe-install-lto-plugin \
- maybe-install-libcc1 \
-+ maybe-install-gm2tools \
- maybe-install-gotools \
- maybe-install-libctf
-
-@@ -2753,6 +2805,7 @@
- maybe-install-target-zlib \
- maybe-install-target-rda \
- maybe-install-target-libada \
-+ maybe-install-target-libgm2 \
- maybe-install-target-libgomp \
- maybe-install-target-libitm \
- maybe-install-target-libatomic
-@@ -2838,6 +2891,7 @@
- maybe-install-strip-gnattools \
- maybe-install-strip-lto-plugin \
- maybe-install-strip-libcc1 \
-+ maybe-install-strip-gm2tools \
- maybe-install-strip-gotools \
- maybe-install-strip-libctf
-
-@@ -2863,6 +2917,7 @@
- maybe-install-strip-target-zlib \
- maybe-install-strip-target-rda \
- maybe-install-strip-target-libada \
-+ maybe-install-strip-target-libgm2 \
- maybe-install-strip-target-libgomp \
- maybe-install-strip-target-libitm \
- maybe-install-strip-target-libatomic
-@@ -40541,6 +40596,447 @@
-
-
-
-+.PHONY: configure-gm2tools maybe-configure-gm2tools
-+maybe-configure-gm2tools:
-+@if gcc-bootstrap
-+configure-gm2tools: stage_current
-+@endif gcc-bootstrap
-+@if gm2tools
-+maybe-configure-gm2tools: configure-gm2tools
-+configure-gm2tools:
-+ @: $(MAKE); $(unstage)
-+ @r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ test ! -f $(HOST_SUBDIR)/gm2tools/Makefile || exit 0; \
-+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gm2tools; \
-+ $(HOST_EXPORTS) \
-+ echo Configuring in $(HOST_SUBDIR)/gm2tools; \
-+ cd "$(HOST_SUBDIR)/gm2tools" || exit 1; \
-+ case $(srcdir) in \
-+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-+ *) topdir=`echo $(HOST_SUBDIR)/gm2tools/ | \
-+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-+ esac; \
-+ module_srcdir=gm2tools; \
-+ $(SHELL) \
-+ $$s/$$module_srcdir/configure \
-+ --srcdir=$${topdir}/$$module_srcdir \
-+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-+ --target=${target_alias} \
-+ || exit 1
-+@endif gm2tools
-+
-+
-+
-+
-+
-+.PHONY: all-gm2tools maybe-all-gm2tools
-+maybe-all-gm2tools:
-+@if gcc-bootstrap
-+all-gm2tools: stage_current
-+@endif gcc-bootstrap
-+@if gm2tools
-+TARGET-gm2tools=all
-+maybe-all-gm2tools: all-gm2tools
-+all-gm2tools: configure-gm2tools
-+ @: $(MAKE); $(unstage)
-+ @r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(HOST_EXPORTS) \
-+ (cd $(HOST_SUBDIR)/gm2tools && \
-+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
-+ $(TARGET-gm2tools))
-+@endif gm2tools
-+
-+
-+
-+
-+.PHONY: check-gm2tools maybe-check-gm2tools
-+maybe-check-gm2tools:
-+@if gm2tools
-+maybe-check-gm2tools: check-gm2tools
-+
-+check-gm2tools:
-+ @: $(MAKE); $(unstage)
-+ @r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(HOST_EXPORTS) \
-+ (cd $(HOST_SUBDIR)/gm2tools && \
-+ $(MAKE) $(FLAGS_TO_PASS) check)
-+
-+@endif gm2tools
-+
-+.PHONY: install-gm2tools maybe-install-gm2tools
-+maybe-install-gm2tools:
-+@if gm2tools
-+maybe-install-gm2tools: install-gm2tools
-+
-+install-gm2tools: installdirs
-+ @: $(MAKE); $(unstage)
-+ @r=`${PWD_COMMAND}`; export r; \
-+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-+ $(HOST_EXPORTS) \
-+ (cd $(HOST_SUBDIR)/gm2tools && \
-+ $(MAKE) $(FLAGS_TO_PASS) install)
-+
-+@endif gm2tools
-+
-+[...]
[diff truncated at 524288 bytes]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-10-05 14:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-05 14:13 [gcc/devel/modula-2] Purge of unnecessary files Gaius Mulley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).