diff options
Diffstat (limited to 'debian/patches/gm2.diff')
-rw-r--r-- | debian/patches/gm2.diff | 1681 |
1 files changed, 1681 insertions, 0 deletions
diff --git a/debian/patches/gm2.diff b/debian/patches/gm2.diff new file mode 100644 index 0000000..a886e0e --- /dev/null +++ b/debian/patches/gm2.diff @@ -0,0 +1,1681 @@ +--- a/src/configure.ac ++++ b/src/configure.ac +@@ -111,11 +111,11 @@ + ### or a host dependent tool. Then put it into the appropriate list + ### (library or tools, host or target), doing a dependency sort. + +-# Subdirs will be configured in the order listed in build_configdirs, ++# Subdirs will be configured in the order listed in build_configdirs, + # configdirs, or target_configdirs; see the serialization section below. + +-# Dependency sorting is only needed when *configuration* must be done in +-# a particular order. In all cases a dependency should be specified in ++# Dependency sorting is only needed when *configuration* must be done in ++# a particular order. In all cases a dependency should be specified in + # the Makefile, whether or not it's implicitly specified here. + + # Double entries in build_configdirs, configdirs, or target_configdirs may +@@ -162,6 +162,7 @@ + target-libffi \ + target-libobjc \ + target-libada \ ++ target-libgm2 \ + target-libgo \ + target-libphobos \ + target-zlib" +@@ -209,7 +210,7 @@ + is_cross_compiler=no + else + is_cross_compiler=yes +-fi ++fi + + # Find the build and target subdir names. + GCC_TOPLEV_SUBDIRS +@@ -247,7 +248,7 @@ + noconfigdirs="$noconfigdirs zlib" + fi + +-# some tools are so dependent upon X11 that if we're not building with X, ++# some tools are so dependent upon X11 that if we're not building with X, + # it's not even worth trying to configure, much less build, that tool. + + case ${with_x} in +@@ -255,7 +256,7 @@ + no) + skipdirs="${skipdirs} tk itcl libgui" + # We won't be able to build gdbtk without X. +- enable_gdbtk=no ++ enable_gdbtk=no + ;; + *) echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2 ;; + esac +@@ -411,7 +412,7 @@ + # Only spaces may be used in this macro; not newlines or tabs. + unsupported_languages= + +-# Remove more programs from consideration, based on the host or ++# Remove more programs from consideration, based on the host or + # target this usually means that a port of the program doesn't + # exist yet. + +@@ -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, +@@ -907,7 +914,7 @@ + ;; + *-*-lynxos*) + noconfigdirs="$noconfigdirs target-newlib target-libgloss" +- ;; ++ ;; + *-*-mingw*) + noconfigdirs="$noconfigdirs target-newlib target-libgloss" + ;; +@@ -1247,7 +1254,7 @@ + hppa*-hp-hpux*) + host_makefile_frag="config/mh-pa" + ;; +- hppa*-*) ++ hppa*-*) + host_makefile_frag="config/mh-pa" + ;; + *-*-darwin*) +@@ -1270,6 +1277,7 @@ + GFORTRAN_FOR_BUILD=${GFORTRAN_FOR_BUILD-gfortran} + GOC_FOR_BUILD=${GOC_FOR_BUILD-gccgo} + GDC_FOR_BUILD=${GDC_FOR_BUILD-gdc} ++ 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} +@@ -1284,6 +1292,7 @@ + GFORTRAN_FOR_BUILD="\$(GFORTRAN)" + GOC_FOR_BUILD="\$(GOC)" + GDC_FOR_BUILD="\$(GDC)" ++ GM2_FOR_BUILD="\$(GM2)" + DLLTOOL_FOR_BUILD="\$(DLLTOOL)" + LD_FOR_BUILD="\$(LD)" + NM_FOR_BUILD="\$(NM)" +@@ -1907,7 +1916,7 @@ + # an apparent bug in bash 1.12 on linux. + ${srcdir}/gcc/[[*]]/config-lang.in) ;; + *) +- # From the config-lang.in, get $language, $target_libs, ++ # From the config-lang.in, get $language, $target_libs, + # $lang_dirs, $boot_language, and $build_by_default + language= + target_libs= +@@ -2140,7 +2149,7 @@ + AC_ARG_WITH([target-bdw-gc-lib], + [AS_HELP_STRING([--with-target-bdw-gc-lib=PATHLIST], + [specify directories for installed bdw-gc library])]) +- ++ + case ,${enable_languages},:${enable_objc_gc} in *,objc,*:yes|*,objc,*:auto) + AC_MSG_CHECKING([for bdw garbage collector]) + if test "x$with_target_bdw_gc$with_target_bdw_gc_include$with_target_bdw_gc_lib" = x; then +@@ -2219,7 +2228,7 @@ + build_configdirs_all="$build_configdirs" + build_configdirs= + for i in ${build_configdirs_all} ; do +- j=`echo $i | sed -e s/build-//g` ++ j=`echo $i | sed -e s/build-//g` + if test -f ${srcdir}/$j/configure ; then + build_configdirs="${build_configdirs} $i" + fi +@@ -2236,7 +2245,7 @@ + target_configdirs_all="$target_configdirs" + target_configdirs= + for i in ${target_configdirs_all} ; do +- j=`echo $i | sed -e s/target-//g` ++ j=`echo $i | sed -e s/target-//g` + if test -f ${srcdir}/$j/configure ; then + target_configdirs="${target_configdirs} $i" + fi +@@ -2322,7 +2331,7 @@ + + copy_dirs= + +-AC_ARG_WITH([build-sysroot], ++AC_ARG_WITH([build-sysroot], + [AS_HELP_STRING([--with-build-sysroot=SYSROOT], + [use sysroot as the system root during the build])], + [if test x"$withval" != x ; then +@@ -2421,11 +2430,11 @@ + # This is done by determining whether or not the appropriate directory + # is available, and by checking whether or not specific configurations + # have requested that this magic not happen. +-# +-# The command line options always override the explicit settings in ++# ++# The command line options always override the explicit settings in + # configure.ac, and the settings in configure.ac override this magic. + # +-# If the default for a toolchain is to use GNU as and ld, and you don't ++# If the default for a toolchain is to use GNU as and ld, and you don't + # want to do that, then you should use the --without-gnu-as and + # --without-gnu-ld options for the configure script. Similarly, if + # the default is to use the included zlib and you don't want to do that, +@@ -2532,7 +2541,7 @@ + target_makefile_frag="config/mt-gnu" + ;; + *-*-aix4.[[3456789]]* | *-*-aix[[56789]].*) +- # nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm ++ # nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm + # commands to handle both 32-bit and 64-bit objects. These flags are + # harmless if we're using GNU nm or ar. + extra_arflags_for_target=" -X32_64" +@@ -2602,7 +2611,7 @@ + if test -s conftest || test -s conftest.exe ; then + we_are_ok=yes + fi +-fi ++fi + case $we_are_ok in + no) + echo 1>&2 "*** The command '${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c' failed." +@@ -3017,7 +3026,7 @@ + # --program-suffix have been applied to it. Autoconf has already + # doubled dollar signs and backslashes in program_transform_name; we want + # the backslashes un-doubled, and then the entire thing wrapped in single +-# quotes, because this will be expanded first by make and then by the shell. ++# quotes, because this will be expanded first by make and then by the shell. + # Also, because we want to override the logic in subdir configure scripts to + # choose program_transform_name, replace any s,x,x, with s,y,y,. + sed -e "s,\\\\\\\\,\\\\,g; s,','\\\\'',g; s/s,x,x,/s,y,y,/" <<EOF_SED > conftestsed.out +@@ -3086,7 +3095,7 @@ + if test -s conftest || test -s conftest.exe ; then + dev64=yes + fi +- fi ++ fi + rm -f conftest* + if test x${dev64} != xyes ; then + AC_MSG_ERROR([I suspect your system does not have 32-bit development libraries (libc and headers). If you have them, rerun configure with --enable-multilib. If you do not have them, and want to build a 64-bit-only compiler, rerun configure with --disable-multilib.]) +@@ -3272,6 +3281,7 @@ + AC_SUBST(GFORTRAN_FOR_BUILD) + AC_SUBST(GOC_FOR_BUILD) + AC_SUBST(GDC_FOR_BUILD) ++AC_SUBST(GM2_FOR_BUILD) + AC_SUBST(LDFLAGS_FOR_BUILD) + AC_SUBST(LD_FOR_BUILD) + AC_SUBST(NM_FOR_BUILD) +@@ -3365,7 +3375,7 @@ + AC_SUBST(CXXFLAGS) + + # Target tools. +-AC_ARG_WITH([build-time-tools], ++AC_ARG_WITH([build-time-tools], + [AS_HELP_STRING([--with-build-time-tools=PATH], + [use given path to find target tools during the build])], + [case x"$withval" in +@@ -3383,6 +3393,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) +@@ -3419,6 +3430,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/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]) +@@ -3474,7 +3487,7 @@ + else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +-fi ++fi + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST(MAINT)dnl + +--- a/src/gcc/c/gccspec.c ++++ b/src/gcc/c/gccspec.c +@@ -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) ++{ ++} +--- a/src/gcc/c-family/cppspec.c ++++ b/src/gcc/c-family/cppspec.c +@@ -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) ++{ ++} +--- a/src/gcc/cp/g++spec.c ++++ b/src/gcc/cp/g++spec.c +@@ -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) ++{ ++} +--- a/src/gcc/gcc.c ++++ b/src/gcc/gcc.c +@@ -305,6 +305,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; +@@ -410,6 +414,7 @@ + static const char *debug_level_greater_than_spec_func (int, const char **); + static const char *find_fortran_preinclude_file (int, const char **); + static char *convert_white_space (char *); ++static void handle_OPT_B (const char *arg); + + /* The Specs Language + +@@ -1032,6 +1037,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:\ +@@ -1655,6 +1661,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; + + /* Add appropriate libgcc specs to OBSTACK, taking into account +@@ -3725,6 +3735,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. */ + +@@ -4204,33 +4289,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; + +@@ -5993,7 +6052,7 @@ + "%{foo=*:bar%*}%{foo=*:one%*two}" + + matches -foo=hello then it will produce: +- ++ + barhello onehellotwo + */ + if (*p == 0 || *p == '}') +@@ -6070,6 +6129,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 * +@@ -6081,6 +6167,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; + } + +@@ -7563,6 +7654,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")) +@@ -8257,7 +8350,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; + +@@ -8324,7 +8418,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] == '*')) +@@ -9631,9 +9725,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)); +@@ -9993,16 +10087,16 @@ + } + + +-/* 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" +--- a/src/gcc/gcc.h ++++ b/src/gcc/gcc.h +@@ -72,9 +72,17 @@ + extern int do_spec (const char *); + extern void record_temp_file (const char *, int, int); + 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 *); +@@ -96,4 +104,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 */ +--- a/src/Makefile.def ++++ b/src/Makefile.def +@@ -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; +@@ -166,6 +166,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; }; +@@ -174,26 +175,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; }; +@@ -284,6 +285,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 ; }; +@@ -608,6 +611,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; }; + languages = { language=d; gcc-check-target=check-d; +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -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/>. +@@ -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; \ +@@ -292,6 +294,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; \ +@@ -358,6 +361,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@ +@@ -427,6 +431,7 @@ + LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates + GOCFLAGS = $(CFLAGS) + GDCFLAGS = $(CFLAGS) ++GM2FLAGS = $(CFLAGS) + + CREATE_GCOV = create_gcov + +@@ -594,6 +599,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@ + +@@ -644,7 +650,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: +@@ -670,6 +676,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 +@@ -819,6 +829,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)" \ +@@ -891,6 +903,7 @@ + 'GFORTRAN=$(GFORTRAN)' \ + 'GOC=$(GOC)' \ + 'GDC=$(GDC)' \ ++ 'GM2=$(GM2)' \ + 'LD=$(LD)' \ + 'LIPO=$(LIPO)' \ + 'NM=$(NM)' \ +@@ -951,6 +964,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)' \ +@@ -1060,6 +1075,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 +@@ -1223,6 +1239,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 +@@ -1315,6 +1332,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 +1418,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 +@@ -1485,6 +1504,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 +@@ -1570,6 +1590,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 +@@ -1655,6 +1676,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 +@@ -1740,6 +1762,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 +@@ -1825,6 +1848,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 +@@ -1910,6 +1934,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 +@@ -1995,6 +2020,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 +@@ -2080,6 +2106,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 +@@ -2165,6 +2192,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 +@@ -2250,6 +2278,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 +@@ -2335,6 +2364,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 +@@ -2394,7 +2424,7 @@ + clean: do-clean local-clean + mostlyclean: do-mostlyclean local-clean + distclean: do-distclean local-clean local-distclean +-maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean ++maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean + maintainer-clean: local-distclean + realclean: maintainer-clean + +@@ -2476,6 +2506,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 +@@ -2657,6 +2688,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 +@@ -2762,6 +2794,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 +@@ -2785,7 +2818,7 @@ + + dist: + @echo "Building a full distribution of this tree isn't done" +- @echo "via 'make dist'. Check out the etc/ subdirectory" ++ @echo "via 'make dist'. Check out the etc/ subdirectory" + + etags tags: TAGS + +@@ -50788,6 +50821,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 +@@ -53039,6 +53530,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; \ +@@ -53114,7 +53613,7 @@ + # reliable. + + # 'touch' doesn't work right on some platforms. +-STAMP = echo timestamp > ++STAMP = echo timestamp > + + # We only want to compare .o files, so set this! + objext = .o +@@ -56255,6 +56754,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 +@@ -56290,6 +56790,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 +@@ -57459,6 +57960,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 +@@ -57506,6 +58008,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 +@@ -57522,7 +58026,7 @@ + install-gdb: $(INSTALL_GDB_TK) + + # Serialization dependencies. Host configures don't work well in parallel to +-# each other, due to contention over config.cache. Target configures and ++# each other, due to contention over config.cache. Target configures and + # build configures are similar. + @serialization_dependencies@ + +--- a/src/Makefile.tpl ++++ b/src/Makefile.tpl +@@ -13,12 +13,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/>. +@@ -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; \ +@@ -295,6 +297,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; \ +@@ -361,6 +364,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@ +@@ -430,6 +434,7 @@ + LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates + GOCFLAGS = $(CFLAGS) + GDCFLAGS = $(CFLAGS) ++GM2FLAGS = $(CFLAGS) + + CREATE_GCOV = create_gcov + +@@ -517,6 +522,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@ + +@@ -646,6 +652,7 @@ + 'GFORTRAN=$(GFORTRAN)' \ + 'GOC=$(GOC)' \ + 'GDC=$(GDC)' \ ++ 'GM2=$(GM2)' \ + 'LD=$(LD)' \ + 'LIPO=$(LIPO)' \ + 'NM=$(NM)' \ +@@ -706,6 +713,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)' \ +@@ -874,7 +883,7 @@ + clean: do-clean local-clean + mostlyclean: do-mostlyclean local-clean + distclean: do-distclean local-clean local-distclean +-maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean ++maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean + maintainer-clean: local-distclean + realclean: maintainer-clean + +@@ -1031,7 +1040,7 @@ + + dist: + @echo "Building a full distribution of this tree isn't done" +- @echo "via 'make dist'. Check out the etc/ subdirectory" ++ @echo "via 'make dist'. Check out the etc/ subdirectory" + + etags tags: TAGS + +@@ -1404,9 +1413,9 @@ + ENDIF raw_cxx +] + (cd $(TARGET_SUBDIR)/[+module+] && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) [+ +- IF raw_cxx +- +] 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' [+ +- ENDIF raw_cxx ++ IF raw_cxx ++ +] 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' [+ ++ ENDIF raw_cxx + +] [+extra_make_flags+] check) + [+ ENDIF no_check +] + @endif target-[+module+] +@@ -1599,7 +1608,7 @@ + # reliable. + + # 'touch' doesn't work right on some platforms. +-STAMP = echo timestamp > ++STAMP = echo timestamp > + + # We only want to compare .o files, so set this! + objext = .o +@@ -1981,7 +1990,7 @@ + install-gdb: $(INSTALL_GDB_TK) + + # Serialization dependencies. Host configures don't work well in parallel to +-# each other, due to contention over config.cache. Target configures and ++# each other, due to contention over config.cache. Target configures and + # build configures are similar. + @serialization_dependencies@ + +--- a/src/gcc/brig/brigspec.c ++++ b/src/gcc/brig/brigspec.c +@@ -134,3 +134,9 @@ + /* 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. Not used for Brig. */ ++void ++lang_register_spec_functions (void) ++{ ++} +--- a/src/gcc/d/d-spec.cc ++++ b/src/gcc/d/d-spec.cc +@@ -514,3 +514,8 @@ + + int lang_specific_extra_outfiles = 0; /* Not used for D. */ + ++/* lang_register_spec_functions. Not used for D. */ ++void ++lang_register_spec_functions (void) ++{ ++} +--- a/src/gcc/fortran/gfortranspec.c ++++ b/src/gcc/fortran/gfortranspec.c +@@ -200,7 +200,7 @@ + int need_math = (MATH_LIBRARY[0] != '\0'); + + /* Whether we should link a static libgfortran. */ +- int static_lib = 0; ++ int static_lib = 0; + + /* Whether we need to link statically. */ + int static_linking = 0; +@@ -448,3 +448,9 @@ + + /* Number of extra output files that lang_specific_pre_link may generate. */ + int lang_specific_extra_outfiles = 0; /* Not used for F77. */ ++ ++/* lang_register_spec_functions. Not used for F77. */ ++void ++lang_register_spec_functions (void) ++{ ++} +--- a/src/gcc/go/gospec.c ++++ b/src/gcc/go/gospec.c +@@ -125,7 +125,7 @@ + #endif + + /* The first input file with an extension of .go. */ +- const char *first_go_file = NULL; ++ const char *first_go_file = NULL; + + argc = *in_decoded_options_count; + decoded_options = *in_decoded_options; +@@ -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) ++{ ++} |