From patchwork Mon Oct 10 15:31:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gaius Mulley X-Patchwork-Id: 1876 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1642591wrs; Mon, 10 Oct 2022 08:36:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6tMAprfOeo3bwha4ieNCGW/v9W+zTuCpGHdl4zvReb8QetnX8wFZ49j7Z22c1LCHQe4KeL X-Received: by 2002:a05:6402:2690:b0:459:e6b2:cae3 with SMTP id w16-20020a056402269000b00459e6b2cae3mr18103833edd.158.1665416175115; Mon, 10 Oct 2022 08:36:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665416175; cv=none; d=google.com; s=arc-20160816; b=sAh8WiPqlZEJw26csaGThtECH0oyyuipwa+NJdJlj7Ld+Le1OaAmZeLLuKtrNQtqLz pClL3kkRGZqO2LuYVrsTTJB6jKbsrZJ7YMU7SD5BwdhkNGdsI4eO7imJohl1RMLzlPKv PT1wwkOjAZ9rcfDB/ZGz2VPX+d2Sl7/a9BFCebDxrZCSxJgOQYouhKGIrqqiEYMRy0To 68drpem4B52HvPr8HVmDQes2JF64QyAQKOFau3sS5clYXZTvLL6C5RBjYoMFGXtVEMOS BOas2Mu5OGUT5m0L0dhEvbiRwW+9oTkIJlARzAzzs6lv/Me+3e6maLVWhq4rO4pIomLq QGbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:date:message-id:to :subject:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=k7jWlu/Q/lvemCQnug7uYw2KktHiPzDEbfyhl5fLYJw=; b=eum6m32qUXXuKUVaxkZFaCklKAysJqTG/Vpv5VLR3CS7izF4pYe/kubdAlmQKGTq1n SLRw3v6xQ3WubE4x1K85hcdWODBZmnpKgx59I/DrNLJke7xZC76zRbKxLpt4o+WABfbN lRpGS6RAbyLVbh5gJWWzugrdqQx90nFVT9ggj7/phz4PYEcnFuK4AkJ+Uf4+z4IosbWD eEOG9unyPYcNTvq5DeD+ZbCB48M1Wd2zzhRMexPuR4mFB4ci2d3r7bjUkaWZw9oed4C3 9ujB717AnbpGQF8N19XDb7Dc+b6IW5WwZw4M03Vxj1CoCZNQ4Vu/AQgWIm6YRC8k0pU5 5AQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=K4jQgGoK; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id ae10-20020a17090725ca00b0078d85177210si11186392ejc.756.2022.10.10.08.36.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Oct 2022 08:36:15 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=K4jQgGoK; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2BF6F395A456 for ; Mon, 10 Oct 2022 15:34:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2BF6F395A456 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665416070; bh=k7jWlu/Q/lvemCQnug7uYw2KktHiPzDEbfyhl5fLYJw=; h=Subject:To:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=K4jQgGoK2WBkBRszPy+E6pg0QsyU80EJvVmqe/AxbSttu9iQVnvf2sWcC81Oq31qt TwnURWjNP0L4yIrZMf71VZzJvsTuSNunNSZwog6PWT0LvmZzqiZh17Iq1vwntDeUZi Whp/6ELnedOVa6viWkbljHfTNbKFHhCzzZyXHdkw= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by sourceware.org (Postfix) with ESMTPS id 320123858D37 for ; Mon, 10 Oct 2022 15:31:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 320123858D37 Received: by mail-wr1-x435.google.com with SMTP id j7so17590502wrr.3 for ; Mon, 10 Oct 2022 08:31:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=date:message-id:to:subject:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=k7jWlu/Q/lvemCQnug7uYw2KktHiPzDEbfyhl5fLYJw=; b=Jo98DjjlDvClqRM3CIyGnbtBMEJ3T/bfn501aCt2H2fFitcEgu9eCO23lDKIJ/BOJv XMupqYBzboVFghWnvkMfBRXuoeHk0S7P/yBctKRTK6+hlBtcdp2TVX6nwvpQsx3cy5Up GIJgpCM8tI/4wxkHp/ytO+9TXwlcZI5igqsmi0wjfIMePQVUAGFBjwWfuFRnL/c/FaqP bwsFRZUNuTkdQNiii34EjvbTRe5+980LvGnDM3ykP4LglSjDnX20/KzqrWD/waPEdexA ICrNj1ySi5GfEZonleDizj+QQfGz6k49njycXXHT8DpzmwwRA45wzNUmhfJ94wfHnad4 pMJQ== X-Gm-Message-State: ACrzQf0S5i0V87t/lSsglk+qjlV+OIy0rAoP/BDhOWUYvnD0FHNSblhU UdVwu8aPzkBArYsSFYeNFRc2sfqKU7w= X-Received: by 2002:a5d:620c:0:b0:22b:e59:8d3a with SMTP id y12-20020a5d620c000000b0022b0e598d3amr11698752wru.28.1665415879834; Mon, 10 Oct 2022 08:31:19 -0700 (PDT) Received: from lancelot ([195.147.220.46]) by smtp.gmail.com with ESMTPSA id b6-20020a05600010c600b0022ae0965a8asm9009532wrx.24.2022.10.10.08.31.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Oct 2022 08:31:19 -0700 (PDT) X-Google-Original-From: Gaius Mulley Received: from gaius by lancelot with local (Exim 4.94.2) (envelope-from ) id 1ohukQ-00BlzX-GX for gcc-patches@gcc.gnu.org; Mon, 10 Oct 2022 16:31:18 +0100 Subject: [PATCH] 1/19 modula2 front end: changes outside gcc/m2, libgm2 and gcc/testsuite. To: X-Mailer: mail (GNU Mailutils 3.10) Message-Id: Date: Mon, 10 Oct 2022 16:31:18 +0100 X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Gaius Mulley via Gcc-patches From: Gaius Mulley Reply-To: Gaius Mulley Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746315431677102821?= X-GMAIL-MSGID: =?utf-8?q?1746315431677102821?= This patch set contains the non machine generated changes found in / for example the language die and documentation changes. It also contains the changes to the top level build Makefile infastructure and the install.texi sourcebuild.texi documentation. ------8<----------8<----------8<----------8<----------8<----------8<---- diff -ruw gcc-git-master/configure.ac gcc-git-devel-modula2/configure.ac --- gcc-git-master/configure.ac 2022-10-07 20:21:09.001978462 +0100 +++ gcc-git-devel-modula2/configure.ac 2022-10-07 20:21:18.522095368 +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, @@ -3616,6 +3625,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) @@ -3654,6 +3664,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]) @@ -3780,6 +3792,9 @@ # 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*" +compare_exclusions="$compare_exclusions | gcc/m2/gm2version*" case "$target" in hppa*64*-*-hpux*) ;; powerpc*-ibm-aix*) compare_exclusions="$compare_exclusions | *libgomp*\$(objext)" ;; diff -ruw gcc-git-master/gcc/doc/sourcebuild.texi gcc-git-devel-modula2/gcc/doc/sourcebuild.texi --- gcc-git-master/gcc/doc/sourcebuild.texi 2022-10-07 20:21:09.761987791 +0100 +++ gcc-git-devel-modula2/gcc/doc/sourcebuild.texi 2022-10-07 20:21:18.606096399 +0100 @@ -97,6 +97,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}. @@ -187,13 +190,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 diff -ruw gcc-git-master/gcc/doc/install.texi gcc-git-devel-modula2/gcc/doc/install.texi --- gcc-git-master/gcc/doc/install.texi 2022-10-07 20:21:09.749987645 +0100 +++ gcc-git-devel-modula2/gcc/doc/install.texi 2022-10-07 20:21:18.602096351 +0100 @@ -1832,18 +1832,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 @@ -1866,6 +1867,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. @@ -3126,10 +3131,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 diff -ruw gcc-git-master/gcc/dwarf2out.cc gcc-git-devel-modula2/gcc/dwarf2out.cc --- gcc-git-master/gcc/dwarf2out.cc 2022-10-07 20:21:09.769987890 +0100 +++ gcc-git-devel-modula2/gcc/dwarf2out.cc 2022-10-07 20:21:18.614096498 +0100 @@ -25206,6 +25206,8 @@ } else if (strcmp (language_string, "GNU F77") == 0) language = DW_LANG_Fortran77; + else if (strcmp (language_string, "GNU Modula-2") == 0) + language = DW_LANG_Modula2; else if (dwarf_version >= 3 || !dwarf_strict) { if (strcmp (language_string, "GNU Ada") == 0) diff -ruw gcc-git-master/Makefile.def gcc-git-devel-modula2/Makefile.def --- gcc-git-master/Makefile.def 2022-10-07 20:21:08.985978266 +0100 +++ gcc-git-devel-modula2/Makefile.def 2022-10-07 20:21:18.510095220 +0100 @@ -186,6 +186,7 @@ target_modules = { module= zlib; bootstrap=true; }; 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; bootstrap=true; lib_path=.libs; }; @@ -308,6 +309,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 ; }; @@ -619,6 +622,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; }; @@ -678,6 +683,8 @@ 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; }; languages = { language=d; gcc-check-target=check-d; lib-check-target=check-target-libphobos; }; languages = { language=jit; gcc-check-target=check-jit; }; diff -ruw gcc-git-master/Makefile.tpl gcc-git-devel-modula2/Makefile.tpl --- gcc-git-master/Makefile.tpl 2022-10-07 20:21:08.989978315 +0100 +++ gcc-git-devel-modula2/Makefile.tpl 2022-10-07 20:21:18.518095319 +0100 @@ -166,6 +166,8 @@ GOCFLAGS="$(GOCFLAGS_FOR_BUILD)"; export GOCFLAGS; \ GDC="$(GDC_FOR_BUILD)"; export GDC; \ GDCFLAGS="$(GDCFLAGS_FOR_BUILD)"; export GDCFLAGS; \ + GM2="$(GM2_FOR_BUILD)"; export GM2; \ + GM2FLAGS="$(GM2FLAGS_FOR_BUILD)"; export GM2FLAGS; \ DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \ DSYMUTIL="$(DSYMUTIL_FOR_BUILD)"; export DSYMUTIL; \ LD="$(LD_FOR_BUILD)"; export LD; \ @@ -204,6 +206,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; \ @@ -307,6 +310,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; \ DSYMUTIL="$(DSYMUTIL_FOR_TARGET)"; export DSYMUTIL; \ LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \ @@ -373,6 +377,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@ @@ -443,6 +448,7 @@ LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates GOCFLAGS = $(CFLAGS) GDCFLAGS = $(CFLAGS) +GM2FLAGS = $(CFLAGS) # Pass additional PGO and LTO compiler options to the PGO build. BUILD_CFLAGS = $(PGO_BUILD_CFLAGS) $(PGO_BUILD_LTO_CFLAGS) @@ -578,6 +584,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@ DSYMUTIL_FOR_TARGET=@DSYMUTIL_FOR_TARGET@ LD_FOR_TARGET=@LD_FOR_TARGET@ @@ -603,6 +610,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 @@ -709,6 +717,7 @@ 'GFORTRAN=$(GFORTRAN)' \ 'GOC=$(GOC)' \ 'GDC=$(GDC)' \ + 'GM2=$(GM2)' \ 'LD=$(LD)' \ 'LIPO=$(LIPO)' \ 'NM=$(NM)' \ @@ -735,6 +744,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}" \ @@ -770,6 +780,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)' \ @@ -796,6 +808,7 @@ # cross-building scheme. EXTRA_GCC_FLAGS = \ "GCC_FOR_TARGET=$(GCC_FOR_TARGET) $$TFLAGS" \ + "GM2_FOR_TARGET=$(GM2_FOR_TARGET) $$TFLAGS" \ "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"