[PATCH] Modula-2 into the GCC tree on master
Gaius Mulley
gaius.mulley@southwales.ac.uk
Thu Jun 17 22:26:41 GMT 2021
Hello Richard, David, Matthias and GCC Steering Committee,
here are a set of patches which merge the gm2 front end into the
GCC tree. The patches have been bootstrapped under aarch64 GNU/Linux
Debian Stretch using make -j 4, x86_64 GNU/Linux Debian Stretch built
using make -j 24 and also under x86_64 GNU/Linux Debian Buster using
make -j 4.
Tested on Debian Stretch x86_64
===============================
built GCC bootstrap 3 times:
1. built vanilla GCC (enabling bootstrap) enabling front ends:
c,c++,go,d,fortran and ran the regression tests. (make -j 4).
2. the patches below were applied and associated tarball untarred.
The same front ends c,c++,go,d,fortran (again building from
bootstrap) were enabled (no m2) and ran the regression tests.
There were no changes to the regression test results between 1 and
2.
3. Then it was rebuilt (from bootstrap) enabling the front ends
c,c++,go,d,fortran,m2 and ran the
regression tests and again no extra failures were seen.
4. It has been built in source tree (./configure --enable-languages=m2)
and out of source tree with make -j 24.
Built on Debian Buster x86_64
=============================
1. built vanilla GCC (enabling bootstrap) enabling front ends:
c,c++,go,d,fortran and ran the regression tests.
2. the patches below were applied and associated tarball untarred.
The same front ends c,c++,go,d,fortran (again building from
bootstrap) were enabled (no m2) and ran the regression tests.
There were no changes to the regression test results between 1 and
2.
3. Then it was rebuilt (from bootstrap) enabling the front ends
c,c++,go,d,fortran,m2 and ran the
regression tests and again no extra failures were seen.
Built a patched tree enabling bootstrap make -j 4 for front ends
c,c++,m2 all compiled and bootstrapped.
How to merge
============
1. apply patches below to the master GCC tree.
2. cd gcc-git-top
wget http://floppsie.comp.glam.ac.uk/download/c/gm2-front-end-20210617-tar.gz
tar zxf gm2-front-end-20210617-tar.gz
rm gm2-front-end-20210617-tar.gz
# new directories gm2tools, libgm2, gcc/m2, gcc/testsuite/gm2 are created
# and populated. Documentation in gcc/doc and testsuite/lib contains some
# Modula-2 dejagnu scripts.
3. cd gcc-git-top
autogen Makefile.def
autoconf
cd libgm2
/bin/sh ./autogen.sh
cd ../gm2tools
/bin/sh ./autogen.sh
Thank you Richard for the extensive feedback from the last time the
patches were posted. I've gone though your points and addressed them
(I think).
> It looks like libgm2 is built independently on whether m2 is enabled
> or not? I'd like to see a while-listing of supported targets like
> done for example for libgomp via configure.tgt or for libgo (see
> toplevel configure).
I've added a test in libgm2/configure.ac to restict the building of
libgm2 - or to restrict it to building libm2min which is a near zero
runtime library. It restricts on host and target and can easily be
changed.
> The driver changes have been posted and reviewed previously but I
> didn't see any real OK there but motivational questions - they never
> were posted together with the m2 driver portion (I guess that would
> be gcc/m2/gm2spec.c in the tarball).
yes gcc/m2/gm2spec.c.
> I've not seen reviews or postings (besides as tarball) of the
> frontend or the library (but I don't remember seeing extensive
> reviews of other languages frontends or runtime portions at the
> point of their inclusion - still the glueing to the middle-end
> should get the chance to be reviewed).
the glue code is in m2/gm2-gcc/*.[ch]. The filenames adopt a similar
naming scheme to other front ends: m2/gm2-gcc/m2decl.c for
declarations, m2/gm2-gcc/m2expr.c for expressions etc. The exported
names are prefixed by the module name so that the code can be linked
against the Modula-2 version with an appropriate definition module
(for example m2/gm2-gcc/m2expr.def).
> I've tried to find my way through gcc/m2 but am quite lost in the
> number of subdirectories.
I've added a README in each directory giving an overview of the
contents.
> I do see in gm2-lang.c and elsewhere inclusion of system headers
> outside of system.h which is going to be a portability problem.
I've changed nearly all headers to use "config.h", "system.h" and
friends and modified the bootstrap tool to automatically generate
these gcc header includes.
> From the parse_file langhook we eventually dispatch to
> init_PerCompilationInit which looks like a Modula-2 scaffolding
> file?
yes indeed.
> Is the compiler written in Modula-2? It's not clear what
> parts make up the interface to the GCC middle-end.
yes most of the compiler and libraries are written in Modula-2 there
is some interface code written in C/C++. In particular, for the
compiler, the directory m2/gm2-gcc contains all the tree creation code.
m2/gm2-libs-ch is the small amount of C required to interface to the
host operating system. The bootstrap tool (m2/mc) is written in
Modula-2 and within the tree there is a C translation of mc for
bootstrapping purposes (m2/mc-boot). Given a small amount of time
this can easily be altered to C++ if desired. mc will generate C++ or
C and when translating the gm2 sources it produces C++ equivalents.
> I'm missing a patch for gcc/doc/install.texi which should list
> requirements plus a patch to sourcebuild.texi listing the new
> toplevel dirs (at least).
all done now. The documentation is now in gcc/doc/m2.texi and the
patches add information about m2 the two files (gcc/doc/sourcebuild.texi
and gcc/doc/install.texi).
> We don't usally ship "examples" in the GCC source tree,
ok - I've purged the examples and added some of these examples to the
regression testsuite instead.
> there's a gm2-tools directory which name suggests those are host
> tools which should usually reside in the toplevel.
I've now created a gm2tools directory in the top which will only be
configured if m2 is enabled.
> There's copies of gpl and gpl-3.0.texi files in m2/ but I think all
> .texi stuff (even language specific) should be in gcc/doc/ and not
> the lang specific subdirectory.
ok removed these.
> I've just tried following the merge instructions and a build on SUSE
> Leap 15.2 produces a toplevel m2/ and stage{1,2,3,4} directories
> (empty?!) which hints at some bootstrapping magic taking place? In
> the end the build fails like the following in stage2
> [...]
> I've just done ./configure --enable-languages=m2; make -j24
now fixed apologies.
> I would suggest to not rush this in now during stage4 but instead
> take the opportunity of this "quiet" phase to prepare an integration
> branch with all the issues above sorted out which we can merge at
> the beginning of stage1 for GCC 12 (or later during stage4 if
> everyone is happy and/or backport for GCC 11.2 when it landed in
> trunk).
I'm guessing my priorities are:
to keep polishing the code.
fix reported bugs.
backport to 11.x
(happy to adjust these if necessary).
thereafter I've got some analyzer patches (which are not posted here)
but which are a whole load of fun and I would like to see these in the
tree at some sensible time. Longer term I'd like to revisit the SET
type and get this to work with dwarf5/gdb and re-implement the large
set data type. Other ideas can wait for the moment though. But in
the meantime I hope this is useful - enjoy.
regards,
Gaius
[ these patches can also be found on:
http://git.savannah.gnu.org/cgit/gm2.git/tree/gcc-versionno/
and also in the tarball above at: gcc/m2/patches/gcc/trunk
]
They are also available at:
http://floppsie.comp.glam.ac.uk/download/c/gcc-patches-trunk-20210617-tar.gz
just in case anything below gets mangled.
2021-06-17 Gaius Mulley <gaius.mulley@southwales.ac.uk>
* Makefile.def (host_modules) includes gm2tools.
(target_modules): Includes libgm2.
(GM2_FOR_TARGET): Added.
(GM2FLAGS_FOR_TARGET): Added.
(dependencies): all-gm2tools on all-target-libgm2.
(dependencies): configure-target-libgm2 on all-target-libstdc++-v3.
(dependencies): all-target-libgm2 on all-target-libatomic.
(languages): m2 define gcc-check-target as check-m2,
define lib-check-target as check-target-libgm2 and
lib-check-target as check-gm2tools.
* Makefile.tpl: Assign GM2,
GM2_FOR_BUILD, GM2_FOR_TARGET and GM2FLAGS.
Pass variables to make.
* configure.ac (GM2_FOR_TARGET): Added.
Request build driver program gm2.
(libgm2) option added.
(GCC_TARGET_TOOL): define gm2 and how it is invoked.
(compare_exclusions) includes SYSTEM and M2Version.
gcc/
* doc/install.texi (m2): Add Modula-2 as a recognized front end
language. (--disable-libgm2) Add entry. (check-m2) Add reference
to run the Modula-2 regression tests.
* doc/sourcebuild.texi (gm2tools): Added top level directory additions.
(libgm2) Added top level directory entry. (m2) Added reference for
a new language subdirectory.
* gcc/c-family/cppspec.c (lang_register_spec_functions): Added.
* gcc/c/gccspec.c (lang_register_spec_functions): Added.
* gcc/cp/g++spec.c (lang_register_spec_functions): Added.
* gcc/d/d-spec.cc (lang_register_spec_functions): Added.
* gcc/fortran/gfortranspec.c (lang_register_spec_functions): Added.
* gcc/gcc.c (allow_linker): Global variable to disable
linker by the front end. (xputenv) available externally.
(xgetenv) New function. (save_switch) available externally.
(fe_add_linker_option) New function. (handle_OPT_B) New function.
(fe_add_infile) New function. (fe_mark_compiled) New function.
(driver_handle_option) call handle_OPT_B. (print_option) New
function. (print_options) New function. (dbg_options) New function.
(fe_add_spec_function) New function. (lookup_spec_function)
checks front end registered functions.
(driver::set_up_specs): call lang_register_spec_functions.
(maybe_run_linker): Check allow_linker before running the linker.
* gcc/gcc.h (fe_save_switch): Prototype.
(handle_OPT_B) Prototype. (fe_add_infile) Prototype.
(fe_add_linker_option) Prototype. (fe_add_spec_function) Prototype.
(xputenv) Prototype. (xgetenv) Prototype. (print_options) Prototype.
(print_option) Prototype. (dbg_options) Prototype.
(lang_register_spec_functions) Prototype.
(allow_linker): Extern.
* gcc/go/gospec.c (lang_register_spec_functions): Added.
Patches
=======
--- 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" ;;
--- 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" ;;
--- 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)
+{
+}
--- 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)
+{
+}
--- 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)
+{
+}
--- 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;
/* 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] == '*'))
--- 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 */
--- 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; };
--- 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
+
+.PHONY: install-strip-gm2tools maybe-install-strip-gm2tools
+maybe-install-strip-gm2tools:
+@if gm2tools
+maybe-install-strip-gm2tools: install-strip-gm2tools
+
+install-strip-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-strip)
+
+@endif gm2tools
+
+# Other targets (info, dvi, pdf, etc.)
+
+.PHONY: maybe-info-gm2tools info-gm2tools
+maybe-info-gm2tools:
+@if gm2tools
+maybe-info-gm2tools: info-gm2tools
+
+info-gm2tools: \
+ configure-gm2tools
+ @: $(MAKE); $(unstage)
+ @[ -f ./gm2tools/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in gm2tools"; \
+ (cd $(HOST_SUBDIR)/gm2tools && \
+ $(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 gm2tools
+
+.PHONY: maybe-dvi-gm2tools dvi-gm2tools
+maybe-dvi-gm2tools:
+@if gm2tools
+maybe-dvi-gm2tools: dvi-gm2tools
+
+dvi-gm2tools: \
+ configure-gm2tools
+ @: $(MAKE); $(unstage)
+ @[ -f ./gm2tools/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in gm2tools"; \
+ (cd $(HOST_SUBDIR)/gm2tools && \
+ $(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 gm2tools
+
+.PHONY: maybe-pdf-gm2tools pdf-gm2tools
+maybe-pdf-gm2tools:
+@if gm2tools
+maybe-pdf-gm2tools: pdf-gm2tools
+
+pdf-gm2tools: \
+ configure-gm2tools
+ @: $(MAKE); $(unstage)
+ @[ -f ./gm2tools/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in gm2tools"; \
+ (cd $(HOST_SUBDIR)/gm2tools && \
+ $(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 gm2tools
+
+.PHONY: maybe-html-gm2tools html-gm2tools
+maybe-html-gm2tools:
+@if gm2tools
+maybe-html-gm2tools: html-gm2tools
+
+html-gm2tools: \
+ configure-gm2tools
+ @: $(MAKE); $(unstage)
+ @[ -f ./gm2tools/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing html in gm2tools"; \
+ (cd $(HOST_SUBDIR)/gm2tools && \
+ $(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 gm2tools
+
+.PHONY: maybe-TAGS-gm2tools TAGS-gm2tools
+maybe-TAGS-gm2tools:
+@if gm2tools
+maybe-TAGS-gm2tools: TAGS-gm2tools
+
+TAGS-gm2tools: \
+ configure-gm2tools
+ @: $(MAKE); $(unstage)
+ @[ -f ./gm2tools/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in gm2tools"; \
+ (cd $(HOST_SUBDIR)/gm2tools && \
+ $(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 gm2tools
+
+.PHONY: maybe-install-info-gm2tools install-info-gm2tools
+maybe-install-info-gm2tools:
+@if gm2tools
+maybe-install-info-gm2tools: install-info-gm2tools
+
+install-info-gm2tools: \
+ configure-gm2tools \
+ info-gm2tools
+ @: $(MAKE); $(unstage)
+ @[ -f ./gm2tools/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in gm2tools"; \
+ (cd $(HOST_SUBDIR)/gm2tools && \
+ $(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 gm2tools
+
+.PHONY: maybe-install-pdf-gm2tools install-pdf-gm2tools
+maybe-install-pdf-gm2tools:
+@if gm2tools
+maybe-install-pdf-gm2tools: install-pdf-gm2tools
+
+install-pdf-gm2tools: \
+ configure-gm2tools \
+ pdf-gm2tools
+ @: $(MAKE); $(unstage)
+ @[ -f ./gm2tools/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in gm2tools"; \
+ (cd $(HOST_SUBDIR)/gm2tools && \
+ $(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 gm2tools
+
+.PHONY: maybe-install-html-gm2tools install-html-gm2tools
+maybe-install-html-gm2tools:
+@if gm2tools
+maybe-install-html-gm2tools: install-html-gm2tools
+
+install-html-gm2tools: \
+ configure-gm2tools \
+ html-gm2tools
+ @: $(MAKE); $(unstage)
+ @[ -f ./gm2tools/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-html in gm2tools"; \
+ (cd $(HOST_SUBDIR)/gm2tools && \
+ $(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 gm2tools
+
+.PHONY: maybe-installcheck-gm2tools installcheck-gm2tools
+maybe-installcheck-gm2tools:
+@if gm2tools
+maybe-installcheck-gm2tools: installcheck-gm2tools
+
+installcheck-gm2tools: \
+ configure-gm2tools
+ @: $(MAKE); $(unstage)
+ @[ -f ./gm2tools/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in gm2tools"; \
+ (cd $(HOST_SUBDIR)/gm2tools && \
+ $(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 gm2tools
+
+.PHONY: maybe-mostlyclean-gm2tools mostlyclean-gm2tools
+maybe-mostlyclean-gm2tools:
+@if gm2tools
+maybe-mostlyclean-gm2tools: mostlyclean-gm2tools
+
+mostlyclean-gm2tools:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gm2tools/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in gm2tools"; \
+ (cd $(HOST_SUBDIR)/gm2tools && \
+ $(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 gm2tools
+
+.PHONY: maybe-clean-gm2tools clean-gm2tools
+maybe-clean-gm2tools:
+@if gm2tools
+maybe-clean-gm2tools: clean-gm2tools
+
+clean-gm2tools:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gm2tools/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in gm2tools"; \
+ (cd $(HOST_SUBDIR)/gm2tools && \
+ $(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 gm2tools
+
+.PHONY: maybe-distclean-gm2tools distclean-gm2tools
+maybe-distclean-gm2tools:
+@if gm2tools
+maybe-distclean-gm2tools: distclean-gm2tools
+
+distclean-gm2tools:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gm2tools/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in gm2tools"; \
+ (cd $(HOST_SUBDIR)/gm2tools && \
+ $(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 gm2tools
+
+.PHONY: maybe-maintainer-clean-gm2tools maintainer-clean-gm2tools
+maybe-maintainer-clean-gm2tools:
+@if gm2tools
+maybe-maintainer-clean-gm2tools: maintainer-clean-gm2tools
+
+maintainer-clean-gm2tools:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gm2tools/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in gm2tools"; \
+ (cd $(HOST_SUBDIR)/gm2tools && \
+ $(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 gm2tools
+
+
+
.PHONY: configure-gotools maybe-configure-gotools
maybe-configure-gotools:
@if gcc-bootstrap
@@ -54318,6 +54814,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
@@ -56569,6 +57523,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 check-target-libgm2 check-gm2tools
+
.PHONY: check-gcc-d check-d
check-gcc-d:
r=`${PWD_COMMAND}`; export r; \
@@ -59988,6 +60950,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
@@ -60022,6 +60985,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
@@ -60509,6 +61473,7 @@
all-stageautoprofile-lto-plugin: maybe-all-stageautoprofile-libiberty-linker-plugin
all-stageautofeedback-lto-plugin: maybe-all-stageautofeedback-libiberty-linker-plugin
all-gotools: maybe-all-target-libgo
+all-gm2tools: maybe-all-target-libgm2
configure-intl: maybe-all-libiconv
configure-stage1-intl: maybe-all-stage1-libiconv
configure-stage2-intl: maybe-all-stage2-libiconv
@@ -61129,6 +62094,7 @@
all-target-libgo: maybe-all-target-libbacktrace
all-target-libgo: maybe-all-target-libffi
all-target-libgo: maybe-all-target-libatomic
+all-target-libgm2: maybe-all-target-libatomic
configure-target-libphobos: maybe-configure-target-libbacktrace
configure-target-libphobos: maybe-configure-target-zlib
all-target-libphobos: maybe-all-target-libbacktrace
@@ -61197,6 +62163,7 @@
configure-gnattools: stage_last
configure-libcc1: stage_last
configure-c++tools: stage_last
+configure-gm2tools: stage_last
configure-utils: stage_last
configure-gdb: stage_last
configure-gdbserver: stage_last
@@ -61215,6 +62182,7 @@
configure-libcc1: maybe-configure-gcc
all-libcc1: maybe-all-gcc
all-c++tools: maybe-all-gcc
+all-gm2tools: maybe-all-target-libstdc++-v3
all-utils: maybe-all-libiberty
configure-gdb: maybe-all-intl
configure-gdb: maybe-all-bfd
@@ -61247,6 +62215,7 @@
all-flex: maybe-all-intl
all-m4: maybe-all-intl
configure-target-libgo: maybe-all-target-libstdc++-v3
+configure-target-libgm2: maybe-all-target-libstdc++-v3
configure-target-liboffloadmic: maybe-configure-target-libgomp
all-target-liboffloadmic: maybe-all-target-libgomp
configure-target-newlib: maybe-all-binutils
@@ -61317,6 +62286,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
@@ -61362,6 +62332,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
--- gcc-git/Makefile.tpl 2021-06-10 11:58:16.822976584 +0100
+++ gm2-floppsie/Makefile.tpl 2021-06-17 10:20:53.215400517 +0100
@@ -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@
@@ -542,6 +548,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
@@ -647,6 +654,7 @@
'GFORTRAN=$(GFORTRAN)' \
'GOC=$(GOC)' \
'GDC=$(GDC)' \
+ 'GM2=$(GM2)' \
'LD=$(LD)' \
'LIPO=$(LIPO)' \
'NM=$(NM)' \
@@ -673,6 +681,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 +716,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 +744,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=/'`"
@@ -864,7 +876,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
--- gcc-git/gcc/go/gospec.c 2021-06-10 11:58:18.558987486 +0100
+++ gm2-floppsie/gcc/go/gospec.c 2021-06-17 10:20:53.219400521 +0100
@@ -464,3 +464,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)
+{
+}
--- gcc-git/gcc/fortran/gfortranspec.c 2021-06-10 11:58:18.450986807 +0100
+++ gm2-floppsie/gcc/fortran/gfortranspec.c 2021-06-17 10:20:53.219400521 +0100
@@ -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)
+{
+}
--- gcc-git/gcc/d/d-spec.cc 2021-06-10 11:58:18.298985852 +0100
+++ gm2-floppsie/gcc/d/d-spec.cc 2021-06-17 10:20:53.219400521 +0100
@@ -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)
+{
+}
--- gcc-git/gcc/jit/jit-spec.c 2021-06-10 11:58:18.618987863 +0100
+++ gm2-floppsie/gcc/jit/jit-spec.c 2021-06-17 10:20:53.219400521 +0100
@@ -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)
+{
+}
--- gcc-git/gcc/hwint.h 2021-06-10 11:58:18.570987562 +0100
+++ gm2-floppsie/gcc/hwint.h 2021-06-17 10:20:53.223400525 +0100
@@ -257,11 +257,14 @@
(HOST_WIDE_INT_1U << (HOST_BITS_PER_WIDE_INT - 1))
#define HOST_WIDE_INT_MAX (~(HOST_WIDE_INT_MIN))
+#ifndef __cplusplus
extern HOST_WIDE_INT abs_hwi (HOST_WIDE_INT);
extern unsigned HOST_WIDE_INT absu_hwi (HOST_WIDE_INT);
-extern HOST_WIDE_INT gcd (HOST_WIDE_INT, HOST_WIDE_INT);
extern HOST_WIDE_INT pos_mul_hwi (HOST_WIDE_INT, HOST_WIDE_INT);
extern HOST_WIDE_INT mul_hwi (HOST_WIDE_INT, HOST_WIDE_INT);
+#endif /* !cplusplus. */
+
+extern HOST_WIDE_INT gcd (HOST_WIDE_INT, HOST_WIDE_INT);
extern HOST_WIDE_INT least_common_multiple (HOST_WIDE_INT, HOST_WIDE_INT);
/* Like ctz_hwi, except 0 when x == 0. */
@@ -316,6 +319,7 @@
}
}
+#ifdef __cplusplus
/* Compute the absolute value of X. */
inline HOST_WIDE_INT
@@ -374,5 +378,6 @@
return result;
#endif
}
+#endif /* ! __cplusplus */
#endif /* ! GCC_HWINT_H */
--- gcc-git/gcc/doc/install.texi 2021-06-10 11:58:18.366986279 +0100
+++ gm2-floppsie/gcc/doc/install.texi 2021-06-17 17:22:04.645530103 +0100
@@ -1777,18 +1777,19 @@
@smallexample
grep ^language= */config-lang.in
@end smallexample
-Currently, you can use any of the following:
-@code{all}, @code{default}, @code{ada}, @code{c}, @code{c++}, @code{d},
-@code{fortran}, @code{go}, @code{jit}, @code{lto}, @code{objc}, @code{obj-c++}.
-Building the Ada compiler has special requirements, see below.
-If you do not pass this flag, or specify the option @code{default}, then the
-default languages available in the @file{gcc} sub-tree will be configured.
-Ada, D, Go, Jit, and Objective-C++ are not default languages. LTO is not a
-default language, but is built by default because @option{--enable-lto} is
-enabled by default. The other languages are default languages. If
-@code{all} is specified, then all available languages are built. An
-exception is @code{jit} language, which requires
-@option{--enable-host-shared} to be included with @code{all}.
+Currently, you can use any of the following: @code{all},
+@code{default}, @code{ada}, @code{c}, @code{c++}, @code{d},
+@code{fortran}, @code{go}, @code{jit}, @code{lto}, @code{m2},
+@code{objc}, @code{obj-c++}. Building the Ada compiler has special
+requirements, see below. If you do not pass this flag, or specify the
+option @code{default}, then the default languages available in the
+@file{gcc} sub-tree will be configured. Ada, D, Go, Jit,
+Objective-C++ and Modula-2 are not default languages. LTO is not a
+default language, but is built by default because
+@option{--enable-lto} is enabled by default. The other languages are
+default languages. If @code{all} is specified, then all available
+languages are built. An exception is @code{jit} language, which
+requires @option{--enable-host-shared} to be included with @code{all}.
@item --enable-stage1-languages=@var{lang1},@var{lang2},@dots{}
Specify that a particular subset of compilers and their runtime
@@ -1811,6 +1812,10 @@
previous Ada build procedures, when it was required to explicitly
do a @samp{make -C gcc gnatlib_and_tools}.
+@item --disable-libgm2
+Specify that the run-time libraries and tools used by Modula-2 should not
+be built. This can be useful for debugging.
+
@item --disable-libsanitizer
Specify that the run-time libraries for the various sanitizers should
not be built.
@@ -3070,10 +3075,10 @@
In order to run sets of tests selectively, there are targets
@samp{make check-gcc} and language specific @samp{make check-c},
@samp{make check-c++}, @samp{make check-d} @samp{make check-fortran},
-@samp{make check-ada}, @samp{make check-objc}, @samp{make check-obj-c++},
-@samp{make check-lto}
-in the @file{gcc} subdirectory of the object directory. You can also
-just run @samp{make check} in a subdirectory of the object directory.
+@samp{make check-ada}, @samp{make check-m2}, @samp{make check-objc},
+@samp{make check-obj-c++}, @samp{make check-lto} in the @file{gcc}
+subdirectory of the object directory. You can also just run
+@samp{make check} in a subdirectory of the object directory.
A more selective way to just run all @command{gcc} execute tests in the
--- gcc-git/gcc/doc/sourcebuild.texi 2021-06-10 11:58:18.382986380 +0100
+++ gm2-floppsie/gcc/doc/sourcebuild.texi 2021-06-17 10:20:53.227400528 +0100
@@ -52,6 +52,9 @@
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.
@@ -84,6 +87,9 @@
@item libgfortran
The Fortran runtime library.
+@item libgm2
+The Modula-2 runtime library.
+
@item libgo
The Go runtime library. The bulk of this library is mirrored from the
@uref{https://github.com/@/golang/go, master Go repository}.
@@ -163,13 +169,12 @@
@item @var{language}
Subdirectories for various languages. Directories containing a file
@file{config-lang.in} are language subdirectories. The contents of
-the subdirectories @file{c} (for C), @file{cp} (for C++),
-@file{objc} (for Objective-C), @file{objcp} (for Objective-C++),
-and @file{lto} (for LTO) are documented in this
-manual (@pxref{Passes, , Passes and Files of the Compiler});
-those for other languages are not. @xref{Front End, ,
-Anatomy of a Language Front End}, for details of the files in these
-directories.
+the subdirectories @file{c} (for C), @file{cp} (for C++), @file{m2}
+(for Modula-2), @file{objc} (for Objective-C), @file{objcp} (for
+Objective-C++), and @file{lto} (for LTO) are documented in this manual
+(@pxref{Passes, , Passes and Files of the Compiler}); those for other
+languages are not. @xref{Front End, , Anatomy of a Language Front
+End}, for details of the files in these directories.
@item common
Source files shared between the compiler drivers (such as
regards,
Gaius
More information about the Gcc-patches
mailing list