From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1383) id 4E0A13857022; Sat, 19 Jun 2021 13:47:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4E0A13857022 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" From: Segher Boessenkool To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/segher/heads/gm2)] Import from Gaius' 20210617 post X-Act-Checkin: gcc X-Git-Author: Gaius Mulley X-Git-Refname: refs/users/segher/heads/gm2 X-Git-Oldrev: ec3fafa9ec7d16b9d89076efd3bac1d1af0502b8 X-Git-Newrev: dfe58afc95f7b59ce71039f8265fb76f6c39d081 Message-Id: <20210619134752.4E0A13857022@sourceware.org> Date: Sat, 19 Jun 2021 13:47:52 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jun 2021 13:47:52 -0000 https://gcc.gnu.org/g:dfe58afc95f7b59ce71039f8265fb76f6c39d081 commit dfe58afc95f7b59ce71039f8265fb76f6c39d081 Author: Gaius Mulley Date: Thu Jun 17 23:26:41 2021 +0100 Import from Gaius' 20210617 post 2021-06-17 Gaius Mulley * 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/gm2.texi: New. * 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. * gcc/m2: New directory. TODO: Should list the files in here :-) *** from Segher: I renamed gm2-libs/getopt.def to gm2-libs/cgetopt.def . This probably won't work, but the way the current GCC Git is configured it is impossible to have files that differ in name case only (GetOpt.def in this case). Diff: --- Makefile.def | 11 + Makefile.in | 976 +- Makefile.tpl | 14 +- configure | 242 +- configure.ac | 16 +- gcc/c-family/cppspec.c | 6 + gcc/c/gccspec.c | 6 + gcc/cp/g++spec.c | 6 + gcc/d/d-spec.cc | 7 + gcc/doc/gm2.texi | 2902 ++ gcc/doc/install.texi | 37 +- gcc/doc/sourcebuild.texi | 19 +- gcc/fortran/gfortranspec.c | 10 +- gcc/gcc.c | 212 +- gcc/gcc.h | 23 + gcc/go/gospec.c | 6 + gcc/hwint.h | 7 +- gcc/jit/jit-spec.c | 6 + gcc/m2/COPYING.FDL | 397 + gcc/m2/COPYING.RUNTIME | 73 + gcc/m2/COPYING3 | 675 + gcc/m2/COPYING3.LIB | 165 + gcc/m2/ChangeLog | 975 + gcc/m2/ChangeLog-2001 | 68 + gcc/m2/ChangeLog-2002 | 59 + gcc/m2/ChangeLog-2003 | 284 + gcc/m2/ChangeLog-2004 | 396 + gcc/m2/ChangeLog-2005 | 535 + gcc/m2/ChangeLog-2006 | 388 + gcc/m2/ChangeLog-2007 | 378 + gcc/m2/ChangeLog-2008 | 1994 ++ gcc/m2/ChangeLog-2009 | 1720 ++ gcc/m2/ChangeLog-2010 | 3680 +++ gcc/m2/ChangeLog-2011 | 493 + gcc/m2/ChangeLog-2012 | 310 + gcc/m2/ChangeLog-2013 | 810 + gcc/m2/ChangeLog-2014 | 936 + gcc/m2/ChangeLog-2015 | 601 + gcc/m2/ChangeLog-2016 | 1352 + gcc/m2/ChangeLog-2017 | 1077 + gcc/m2/ChangeLog-2018 | 607 + gcc/m2/ChangeLog-2019 | 4638 ++++ gcc/m2/ChangeLog-2020 | 1707 ++ gcc/m2/Make-lang.in | 2284 ++ gcc/m2/Make-lang.in- | 2273 ++ gcc/m2/NEWS | 231 + gcc/m2/README | 35 + gcc/m2/aclocal.m4 | 12 + gcc/m2/bnf/README | 2 + gcc/m2/bnf/gm2l.bnf | 1371 + gcc/m2/bnf/gm2m.bnf | 2402 ++ gcc/m2/bnf/m2-1.bnf | 1031 + gcc/m2/bnf/m2-2.bnf | 1184 + gcc/m2/bnf/m2-3.bnf | 1653 ++ gcc/m2/bnf/m2-c.bnf | 1237 + gcc/m2/bnf/m2-h.bnf | 1245 + gcc/m2/bnf/m2.bnf | 868 + gcc/m2/bnf/mc-1.bnf | 1099 + gcc/m2/bnf/mc-2.bnf | 1134 + gcc/m2/bnf/mc-3.bnf | 1290 + gcc/m2/bnf/mc-4.bnf | 1265 + gcc/m2/bnf/mc-5.bnf | 1566 ++ gcc/m2/config-lang.in | 85 + gcc/m2/config-make.in | 2 + gcc/m2/configure | 4842 ++++ gcc/m2/configure.ac | 50 + gcc/m2/el/gm2-mode.el | 2501 ++ gcc/m2/gm2-compiler/CLexBuf.def | 264 + gcc/m2/gm2-compiler/CLexBuf.mod | 1033 + gcc/m2/gm2-compiler/FifoQueue.def | 103 + gcc/m2/gm2-compiler/FifoQueue.mod | 170 + gcc/m2/gm2-compiler/Lists.def | 128 + gcc/m2/gm2-compiler/Lists.mod | 341 + gcc/m2/gm2-compiler/M2ALU.def | 989 + gcc/m2/gm2-compiler/M2ALU.mod | 5260 ++++ gcc/m2/gm2-compiler/M2AsmUtil.def | 114 + gcc/m2/gm2-compiler/M2AsmUtil.mod | 326 + gcc/m2/gm2-compiler/M2Base.def | 403 + gcc/m2/gm2-compiler/M2Base.mod | 2632 ++ gcc/m2/gm2-compiler/M2BasicBlock.def | 87 + gcc/m2/gm2-compiler/M2BasicBlock.mod | 350 + gcc/m2/gm2-compiler/M2Batch.def | 180 + gcc/m2/gm2-compiler/M2Batch.mod | 467 + gcc/m2/gm2-compiler/M2Bitset.def | 54 + gcc/m2/gm2-compiler/M2Bitset.mod | 89 + gcc/m2/gm2-compiler/M2CaseList.def | 123 + gcc/m2/gm2-compiler/M2CaseList.mod | 935 + gcc/m2/gm2-compiler/M2Check.def | 66 + gcc/m2/gm2-compiler/M2Check.mod | 1501 ++ gcc/m2/gm2-compiler/M2Code.def | 54 + gcc/m2/gm2-compiler/M2Code.mod | 522 + gcc/m2/gm2-compiler/M2ColorString.def | 142 + gcc/m2/gm2-compiler/M2ColorString.mod | 218 + gcc/m2/gm2-compiler/M2Comp.def | 70 + gcc/m2/gm2-compiler/M2Comp.mod | 616 + gcc/m2/gm2-compiler/M2Configure.def | 73 + gcc/m2/gm2-compiler/M2Configure.mod | 24 + gcc/m2/gm2-compiler/M2Const.def | 39 + gcc/m2/gm2-compiler/M2Const.mod | 501 + gcc/m2/gm2-compiler/M2Debug.def | 49 + gcc/m2/gm2-compiler/M2Debug.mod | 57 + gcc/m2/gm2-compiler/M2DebugStack.def | 51 + gcc/m2/gm2-compiler/M2DebugStack.mod | 884 + gcc/m2/gm2-compiler/M2Defaults.def | 54 + gcc/m2/gm2-compiler/M2Defaults.mod | 64 + gcc/m2/gm2-compiler/M2Depth.def | 52 + gcc/m2/gm2-compiler/M2Depth.mod | 498 + gcc/m2/gm2-compiler/M2DriverOptions.def | 43 + gcc/m2/gm2-compiler/M2DriverOptions.mod | 95 + gcc/m2/gm2-compiler/M2Emit.def | 59 + gcc/m2/gm2-compiler/M2Emit.mod | 82 + gcc/m2/gm2-compiler/M2Error.def | 221 + gcc/m2/gm2-compiler/M2Error.mod | 792 + gcc/m2/gm2-compiler/M2EvalSym.def | 42 + gcc/m2/gm2-compiler/M2FileName.def | 74 + gcc/m2/gm2-compiler/M2FileName.mod | 106 + gcc/m2/gm2-compiler/M2GCCDeclare.def | 235 + gcc/m2/gm2-compiler/M2GCCDeclare.mod | 6259 +++++ gcc/m2/gm2-compiler/M2GenGCC.def | 103 + gcc/m2/gm2-compiler/M2GenGCC.mod | 7395 ++++++ gcc/m2/gm2-compiler/M2Lex.def | 106 + gcc/m2/gm2-compiler/M2Lex.mod | 418 + gcc/m2/gm2-compiler/M2LexBuf.def | 263 + gcc/m2/gm2-compiler/M2LexBuf.mod | 1084 + gcc/m2/gm2-compiler/M2MetaError.def | 179 + gcc/m2/gm2-compiler/M2MetaError.mod | 2119 ++ gcc/m2/gm2-compiler/M2Optimize.def | 59 + gcc/m2/gm2-compiler/M2Optimize.mod | 519 + gcc/m2/gm2-compiler/M2Options.def | 666 + gcc/m2/gm2-compiler/M2Options.mod | 1049 + gcc/m2/gm2-compiler/M2Pass.def | 178 + gcc/m2/gm2-compiler/M2Pass.mod | 246 + gcc/m2/gm2-compiler/M2Preprocess.def | 51 + gcc/m2/gm2-compiler/M2Preprocess.mod | 132 + gcc/m2/gm2-compiler/M2Printf.def | 66 + gcc/m2/gm2-compiler/M2Printf.mod | 312 + gcc/m2/gm2-compiler/M2Quads.def | 2620 ++ gcc/m2/gm2-compiler/M2Quads.mod | 14396 ++++++++++ gcc/m2/gm2-compiler/M2Quiet.def | 46 + gcc/m2/gm2-compiler/M2Quiet.mod | 74 + gcc/m2/gm2-compiler/M2Range.def | 417 + gcc/m2/gm2-compiler/M2Range.mod | 3489 +++ gcc/m2/gm2-compiler/M2Reserved.def | 128 + gcc/m2/gm2-compiler/M2Reserved.mod | 358 + gcc/m2/gm2-compiler/M2SSA.def | 27 + gcc/m2/gm2-compiler/M2SSA.mod | 174 + gcc/m2/gm2-compiler/M2Scope.def | 65 + gcc/m2/gm2-compiler/M2Scope.mod | 360 + gcc/m2/gm2-compiler/M2Search.def | 115 + gcc/m2/gm2-compiler/M2Search.mod | 299 + gcc/m2/gm2-compiler/M2Size.def | 46 + gcc/m2/gm2-compiler/M2Size.mod | 52 + gcc/m2/gm2-compiler/M2StackAddress.def | 99 + gcc/m2/gm2-compiler/M2StackAddress.mod | 288 + gcc/m2/gm2-compiler/M2StackWord.def | 99 + gcc/m2/gm2-compiler/M2StackWord.mod | 290 + gcc/m2/gm2-compiler/M2Students.def | 54 + gcc/m2/gm2-compiler/M2Students.mod | 256 + gcc/m2/gm2-compiler/M2Swig.def | 44 + gcc/m2/gm2-compiler/M2Swig.mod | 985 + gcc/m2/gm2-compiler/M2System.def | 253 + gcc/m2/gm2-compiler/M2System.mod | 795 + gcc/m2/gm2-compiler/M2Version.def | 70 + gcc/m2/gm2-compiler/NameKey.def | 122 + gcc/m2/gm2-compiler/NameKey.mod | 417 + gcc/m2/gm2-compiler/ObjectFiles.def | 71 + gcc/m2/gm2-compiler/ObjectFiles.mod | 171 + gcc/m2/gm2-compiler/P0SymBuild.def | 134 + gcc/m2/gm2-compiler/P0SymBuild.mod | 723 + gcc/m2/gm2-compiler/P0SyntaxCheck.def | 44 + gcc/m2/gm2-compiler/P1Build.def | 44 + gcc/m2/gm2-compiler/P1SymBuild.def | 530 + gcc/m2/gm2-compiler/P1SymBuild.mod | 1097 + gcc/m2/gm2-compiler/P2Build.def | 43 + gcc/m2/gm2-compiler/P2SymBuild.def | 1286 + gcc/m2/gm2-compiler/P2SymBuild.mod | 3008 +++ gcc/m2/gm2-compiler/P3Build.def | 43 + gcc/m2/gm2-compiler/P3SymBuild.def | 395 + gcc/m2/gm2-compiler/P3SymBuild.mod | 679 + gcc/m2/gm2-compiler/PCBuild.def | 44 + gcc/m2/gm2-compiler/PCSymBuild.def | 497 + gcc/m2/gm2-compiler/PCSymBuild.mod | 2286 ++ gcc/m2/gm2-compiler/PHBuild.def | 44 + gcc/m2/gm2-compiler/README | 1 + gcc/m2/gm2-compiler/Sets.def | 104 + gcc/m2/gm2-compiler/Sets.mod | 319 + gcc/m2/gm2-compiler/SymbolConversion.def | 87 + gcc/m2/gm2-compiler/SymbolConversion.mod | 247 + gcc/m2/gm2-compiler/SymbolKey.def | 121 + gcc/m2/gm2-compiler/SymbolKey.mod | 338 + gcc/m2/gm2-compiler/SymbolTable.def | 3197 +++ gcc/m2/gm2-compiler/SymbolTable.mod | 13298 ++++++++++ gcc/m2/gm2-compiler/bnflex.def | 156 + gcc/m2/gm2-compiler/bnflex.mod | 417 + gcc/m2/gm2-compiler/cflex.def | 98 + gcc/m2/gm2-compiler/gm2.mod | 52 + gcc/m2/gm2-compiler/gm2lcc.mod | 842 + gcc/m2/gm2-compiler/gm2lgen.mod | 424 + gcc/m2/gm2-compiler/gm2lorder.mod | 271 + gcc/m2/gm2-compiler/m2flex.def | 101 + gcc/m2/gm2-compiler/ppg.mod | 5445 ++++ gcc/m2/gm2-gcc/README | 5 + gcc/m2/gm2-gcc/dynamicstrings.h | 38 + gcc/m2/gm2-gcc/gcc-consolidation.h | 97 + gcc/m2/gm2-gcc/init.c | 196 + gcc/m2/gm2-gcc/init.def | 43 + gcc/m2/gm2-gcc/init.h | 35 + gcc/m2/gm2-gcc/m2assert.c | 41 + gcc/m2/gm2-gcc/m2assert.h | 68 + gcc/m2/gm2-gcc/m2block.c | 783 + gcc/m2/gm2-gcc/m2block.def | 225 + gcc/m2/gm2-gcc/m2block.h | 78 + gcc/m2/gm2-gcc/m2builtins.c | 1330 + gcc/m2/gm2-gcc/m2builtins.def | 121 + gcc/m2/gm2-gcc/m2builtins.h | 56 + gcc/m2/gm2-gcc/m2color.c | 48 + gcc/m2/gm2-gcc/m2color.def | 42 + gcc/m2/gm2-gcc/m2color.h | 47 + gcc/m2/gm2-gcc/m2convert.c | 659 + gcc/m2/gm2-gcc/m2convert.def | 98 + gcc/m2/gm2-gcc/m2convert.h | 54 + gcc/m2/gm2-gcc/m2decl.c | 388 + gcc/m2/gm2-gcc/m2decl.def | 171 + gcc/m2/gm2-gcc/m2decl.h | 72 + gcc/m2/gm2-gcc/m2except.c | 646 + gcc/m2/gm2-gcc/m2except.def | 79 + gcc/m2/gm2-gcc/m2except.h | 70 + gcc/m2/gm2-gcc/m2expr.c | 4272 +++ gcc/m2/gm2-gcc/m2expr.def | 700 + gcc/m2/gm2-gcc/m2expr.h | 243 + gcc/m2/gm2-gcc/m2linemap.c | 257 + gcc/m2/gm2-gcc/m2linemap.def | 61 + gcc/m2/gm2-gcc/m2linemap.h | 72 + gcc/m2/gm2-gcc/m2misc.c | 56 + gcc/m2/gm2-gcc/m2misc.def | 29 + gcc/m2/gm2-gcc/m2misc.h | 44 + gcc/m2/gm2-gcc/m2options.h | 113 + gcc/m2/gm2-gcc/m2range.h | 40 + gcc/m2/gm2-gcc/m2search.h | 35 + gcc/m2/gm2-gcc/m2statement.c | 1011 + gcc/m2/gm2-gcc/m2statement.def | 307 + gcc/m2/gm2-gcc/m2statement.h | 109 + gcc/m2/gm2-gcc/m2top.c | 65 + gcc/m2/gm2-gcc/m2top.def | 46 + gcc/m2/gm2-gcc/m2top.h | 44 + gcc/m2/gm2-gcc/m2tree.c | 132 + gcc/m2/gm2-gcc/m2tree.def | 41 + gcc/m2/gm2-gcc/m2tree.h | 58 + gcc/m2/gm2-gcc/m2treelib.c | 430 + gcc/m2/gm2-gcc/m2treelib.def | 109 + gcc/m2/gm2-gcc/m2treelib.h | 66 + gcc/m2/gm2-gcc/m2type.c | 3104 +++ gcc/m2/gm2-gcc/m2type.def | 986 + gcc/m2/gm2-gcc/m2type.h | 222 + gcc/m2/gm2-gcc/rtegraph.c | 526 + gcc/m2/gm2-gcc/rtegraph.h | 42 + gcc/m2/gm2-ici/M2Emit.mod | 179 + gcc/m2/gm2-ici/README | 3 + gcc/m2/gm2-ici/m2linemap.c | 30 + gcc/m2/gm2-internals.texi | 1067 + gcc/m2/gm2-lang.c | 939 + gcc/m2/gm2-lang.h | 56 + gcc/m2/gm2-libiberty/README | 2 + gcc/m2/gm2-libiberty/choosetemp.def | 34 + gcc/m2/gm2-libiberty/pexecute.def | 82 + gcc/m2/gm2-libs-ch/README | 3 + gcc/m2/gm2-libs-ch/RTcodummy.c | 128 + gcc/m2/gm2-libs-ch/RTintdummy.c | 43 + gcc/m2/gm2-libs-ch/Selective.c | 231 + gcc/m2/gm2-libs-ch/SysExceptions.c | 242 + gcc/m2/gm2-libs-ch/UnixArgs.c | 40 + gcc/m2/gm2-libs-ch/choosetemp.c | 51 + gcc/m2/gm2-libs-ch/dtoa.c | 176 + gcc/m2/gm2-libs-ch/errno.c | 51 + gcc/m2/gm2-libs-ch/getopt.c | 153 + gcc/m2/gm2-libs-ch/host.c | 56 + gcc/m2/gm2-libs-ch/ldtoa.c | 106 + gcc/m2/gm2-libs-ch/pthdummy.c | 50 + gcc/m2/gm2-libs-ch/termios.c | 1928 ++ gcc/m2/gm2-libs-ch/tools.c | 35 + gcc/m2/gm2-libs-ch/wrapc.c | 234 + gcc/m2/gm2-libs-ch/xlibc.c | 40 + gcc/m2/gm2-libs-coroutines/Debug.def | 79 + gcc/m2/gm2-libs-coroutines/Debug.mod | 180 + gcc/m2/gm2-libs-coroutines/Executive.def | 152 + gcc/m2/gm2-libs-coroutines/Executive.mod | 962 + gcc/m2/gm2-libs-coroutines/KeyBoardLEDs.def | 63 + gcc/m2/gm2-libs-coroutines/README.texi | 48 + gcc/m2/gm2-libs-coroutines/SYSTEM.def | 262 + gcc/m2/gm2-libs-coroutines/SYSTEM.mod | 484 + gcc/m2/gm2-libs-coroutines/TimerHandler.def | 102 + gcc/m2/gm2-libs-coroutines/TimerHandler.mod | 758 + gcc/m2/gm2-libs-iso/COROUTINES.def | 112 + gcc/m2/gm2-libs-iso/COROUTINES.mod | 602 + gcc/m2/gm2-libs-iso/ChanConsts.def | 64 + gcc/m2/gm2-libs-iso/ChanConsts.h | 47 + gcc/m2/gm2-libs-iso/ChanConsts.mod | 29 + gcc/m2/gm2-libs-iso/CharClass.def | 35 + gcc/m2/gm2-libs-iso/CharClass.mod | 81 + gcc/m2/gm2-libs-iso/ClientSocket.def | 59 + gcc/m2/gm2-libs-iso/ClientSocket.mod | 468 + gcc/m2/gm2-libs-iso/ComplexMath.def | 73 + gcc/m2/gm2-libs-iso/ComplexMath.mod | 164 + gcc/m2/gm2-libs-iso/ConvStringLong.def | 60 + gcc/m2/gm2-libs-iso/ConvStringLong.mod | 292 + gcc/m2/gm2-libs-iso/ConvStringReal.def | 60 + gcc/m2/gm2-libs-iso/ConvStringReal.mod | 299 + gcc/m2/gm2-libs-iso/ConvTypes.def | 37 + gcc/m2/gm2-libs-iso/ConvTypes.mod | 29 + gcc/m2/gm2-libs-iso/EXCEPTIONS.def | 58 + gcc/m2/gm2-libs-iso/EXCEPTIONS.mod | 138 + gcc/m2/gm2-libs-iso/ErrnoCategory.c | 138 + gcc/m2/gm2-libs-iso/ErrnoCategory.def | 74 + gcc/m2/gm2-libs-iso/GeneralUserExceptions.def | 36 + gcc/m2/gm2-libs-iso/GeneralUserExceptions.mod | 87 + gcc/m2/gm2-libs-iso/IOChan.def | 177 + gcc/m2/gm2-libs-iso/IOChan.mod | 550 + gcc/m2/gm2-libs-iso/IOConsts.def | 28 + gcc/m2/gm2-libs-iso/IOConsts.mod | 29 + gcc/m2/gm2-libs-iso/IOLink.def | 142 + gcc/m2/gm2-libs-iso/IOLink.mod | 373 + gcc/m2/gm2-libs-iso/IOResult.def | 37 + gcc/m2/gm2-libs-iso/IOResult.mod | 37 + gcc/m2/gm2-libs-iso/LongComplexMath.def | 73 + gcc/m2/gm2-libs-iso/LongComplexMath.mod | 164 + gcc/m2/gm2-libs-iso/LongConv.def | 61 + gcc/m2/gm2-libs-iso/LongConv.mod | 350 + gcc/m2/gm2-libs-iso/LongIO.def | 68 + gcc/m2/gm2-libs-iso/LongIO.mod | 172 + gcc/m2/gm2-libs-iso/LongMath.def | 62 + gcc/m2/gm2-libs-iso/LongMath.mod | 110 + gcc/m2/gm2-libs-iso/LongStr.def | 73 + gcc/m2/gm2-libs-iso/LongStr.mod | 150 + gcc/m2/gm2-libs-iso/LongWholeIO.def | 69 + gcc/m2/gm2-libs-iso/LongWholeIO.mod | 175 + gcc/m2/gm2-libs-iso/LowLong.def | 85 + gcc/m2/gm2-libs-iso/LowLong.mod | 299 + gcc/m2/gm2-libs-iso/LowReal.def | 85 + gcc/m2/gm2-libs-iso/LowReal.mod | 299 + gcc/m2/gm2-libs-iso/LowShort.def | 99 + gcc/m2/gm2-libs-iso/LowShort.mod | 299 + gcc/m2/gm2-libs-iso/M2EXCEPTION.def | 35 + gcc/m2/gm2-libs-iso/M2EXCEPTION.mod | 62 + gcc/m2/gm2-libs-iso/M2RTS.def | 170 + gcc/m2/gm2-libs-iso/M2RTS.mod | 492 + gcc/m2/gm2-libs-iso/MemStream.def | 120 + gcc/m2/gm2-libs-iso/MemStream.mod | 748 + gcc/m2/gm2-libs-iso/Preemptive.def | 38 + gcc/m2/gm2-libs-iso/Preemptive.mod | 125 + gcc/m2/gm2-libs-iso/Processes.def | 159 + gcc/m2/gm2-libs-iso/Processes.mod | 730 + gcc/m2/gm2-libs-iso/ProgramArgs.def | 39 + gcc/m2/gm2-libs-iso/ProgramArgs.mod | 481 + gcc/m2/gm2-libs-iso/README.texi | 79 + gcc/m2/gm2-libs-iso/RTco.def | 76 + gcc/m2/gm2-libs-iso/RTdata.def | 79 + gcc/m2/gm2-libs-iso/RTdata.mod | 167 + gcc/m2/gm2-libs-iso/RTentity.def | 58 + gcc/m2/gm2-libs-iso/RTentity.mod | 283 + gcc/m2/gm2-libs-iso/RTfio.def | 123 + gcc/m2/gm2-libs-iso/RTfio.mod | 178 + gcc/m2/gm2-libs-iso/RTgen.def | 129 + gcc/m2/gm2-libs-iso/RTgen.mod | 483 + gcc/m2/gm2-libs-iso/RTgenif.def | 159 + gcc/m2/gm2-libs-iso/RTgenif.mod | 200 + gcc/m2/gm2-libs-iso/RTio.def | 110 + gcc/m2/gm2-libs-iso/RTio.mod | 133 + gcc/m2/gm2-libs-iso/RandomNumber.def | 131 + gcc/m2/gm2-libs-iso/RandomNumber.mod | 200 + gcc/m2/gm2-libs-iso/RawIO.def | 32 + gcc/m2/gm2-libs-iso/RawIO.mod | 108 + gcc/m2/gm2-libs-iso/RealConv.def | 61 + gcc/m2/gm2-libs-iso/RealConv.mod | 349 + gcc/m2/gm2-libs-iso/RealIO.def | 67 + gcc/m2/gm2-libs-iso/RealIO.mod | 172 + gcc/m2/gm2-libs-iso/RealMath.def | 62 + gcc/m2/gm2-libs-iso/RealMath.mod | 109 + gcc/m2/gm2-libs-iso/RealStr.def | 73 + gcc/m2/gm2-libs-iso/RealStr.mod | 150 + gcc/m2/gm2-libs-iso/RndFile.def | 116 + gcc/m2/gm2-libs-iso/RndFile.mod | 511 + gcc/m2/gm2-libs-iso/SIOResult.def | 37 + gcc/m2/gm2-libs-iso/SIOResult.mod | 37 + gcc/m2/gm2-libs-iso/SLongIO.def | 65 + gcc/m2/gm2-libs-iso/SLongIO.mod | 93 + gcc/m2/gm2-libs-iso/SLongWholeIO.def | 67 + gcc/m2/gm2-libs-iso/SLongWholeIO.mod | 78 + gcc/m2/gm2-libs-iso/SRawIO.def | 31 + gcc/m2/gm2-libs-iso/SRawIO.mod | 55 + gcc/m2/gm2-libs-iso/SRealIO.def | 62 + gcc/m2/gm2-libs-iso/SRealIO.mod | 93 + gcc/m2/gm2-libs-iso/SShortIO.def | 80 + gcc/m2/gm2-libs-iso/SShortIO.mod | 93 + gcc/m2/gm2-libs-iso/SShortWholeIO.def | 67 + gcc/m2/gm2-libs-iso/SShortWholeIO.mod | 78 + gcc/m2/gm2-libs-iso/STextIO.def | 65 + gcc/m2/gm2-libs-iso/STextIO.mod | 118 + gcc/m2/gm2-libs-iso/SWholeIO.def | 52 + gcc/m2/gm2-libs-iso/SWholeIO.mod | 78 + gcc/m2/gm2-libs-iso/SYSTEM.def | 220 + gcc/m2/gm2-libs-iso/SYSTEM.mod | 273 + gcc/m2/gm2-libs-iso/Semaphores.def | 51 + gcc/m2/gm2-libs-iso/Semaphores.mod | 287 + gcc/m2/gm2-libs-iso/SeqFile.def | 115 + gcc/m2/gm2-libs-iso/SeqFile.mod | 455 + gcc/m2/gm2-libs-iso/ServerSocket.def | 84 + gcc/m2/gm2-libs-iso/ServerSocket.mod | 83 + gcc/m2/gm2-libs-iso/ShortComplexMath.def | 88 + gcc/m2/gm2-libs-iso/ShortComplexMath.mod | 164 + gcc/m2/gm2-libs-iso/ShortIO.def | 82 + gcc/m2/gm2-libs-iso/ShortIO.mod | 105 + gcc/m2/gm2-libs-iso/ShortWholeIO.def | 69 + gcc/m2/gm2-libs-iso/ShortWholeIO.mod | 175 + gcc/m2/gm2-libs-iso/SimpleCipher.def | 60 + gcc/m2/gm2-libs-iso/SimpleCipher.mod | 452 + gcc/m2/gm2-libs-iso/StdChans.def | 67 + gcc/m2/gm2-libs-iso/StdChans.mod | 312 + gcc/m2/gm2-libs-iso/Storage.def | 57 + gcc/m2/gm2-libs-iso/Storage.mod | 152 + gcc/m2/gm2-libs-iso/StreamFile.def | 56 + gcc/m2/gm2-libs-iso/StreamFile.mod | 290 + gcc/m2/gm2-libs-iso/StringChan.def | 65 + gcc/m2/gm2-libs-iso/StringChan.mod | 76 + gcc/m2/gm2-libs-iso/Strings.def | 157 + gcc/m2/gm2-libs-iso/Strings.mod | 524 + gcc/m2/gm2-libs-iso/SysClock.def | 61 + gcc/m2/gm2-libs-iso/SysClock.mod | 277 + gcc/m2/gm2-libs-iso/TERMINATION.def | 22 + gcc/m2/gm2-libs-iso/TERMINATION.mod | 53 + gcc/m2/gm2-libs-iso/TermFile.def | 68 + gcc/m2/gm2-libs-iso/TermFile.mod | 639 + gcc/m2/gm2-libs-iso/TextIO.def | 74 + gcc/m2/gm2-libs-iso/TextIO.mod | 243 + gcc/m2/gm2-libs-iso/WholeConv.def | 73 + gcc/m2/gm2-libs-iso/WholeConv.mod | 374 + gcc/m2/gm2-libs-iso/WholeIO.def | 54 + gcc/m2/gm2-libs-iso/WholeIO.mod | 175 + gcc/m2/gm2-libs-iso/WholeStr.def | 56 + gcc/m2/gm2-libs-iso/WholeStr.mod | 99 + gcc/m2/gm2-libs-iso/wrapsock.c | 260 + gcc/m2/gm2-libs-iso/wrapsock.def | 125 + gcc/m2/gm2-libs-iso/wraptime.c | 292 + gcc/m2/gm2-libs-iso/wraptime.def | 207 + gcc/m2/gm2-libs-min/M2RTS.def | 46 + gcc/m2/gm2-libs-min/M2RTS.mod | 56 + gcc/m2/gm2-libs-min/SYSTEM.def | 45 + gcc/m2/gm2-libs-min/SYSTEM.mod | 29 + gcc/m2/gm2-libs-min/libc.c | 36 + gcc/m2/gm2-libs-min/libc.def | 35 + gcc/m2/gm2-libs-pim/BitBlockOps.def | 132 + gcc/m2/gm2-libs-pim/BitBlockOps.mod | 303 + gcc/m2/gm2-libs-pim/BitByteOps.def | 143 + gcc/m2/gm2-libs-pim/BitByteOps.mod | 227 + gcc/m2/gm2-libs-pim/BitWordOps.def | 143 + gcc/m2/gm2-libs-pim/BitWordOps.mod | 252 + gcc/m2/gm2-libs-pim/BlockOps.def | 90 + gcc/m2/gm2-libs-pim/BlockOps.mod | 193 + gcc/m2/gm2-libs-pim/Break.c | 128 + gcc/m2/gm2-libs-pim/Break.def | 65 + gcc/m2/gm2-libs-pim/CardinalIO.def | 146 + gcc/m2/gm2-libs-pim/CardinalIO.mod | 257 + gcc/m2/gm2-libs-pim/Conversions.def | 55 + gcc/m2/gm2-libs-pim/Conversions.mod | 126 + gcc/m2/gm2-libs-pim/DebugPMD.def | 29 + gcc/m2/gm2-libs-pim/DebugPMD.mod | 29 + gcc/m2/gm2-libs-pim/DebugTrace.def | 29 + gcc/m2/gm2-libs-pim/DebugTrace.mod | 29 + gcc/m2/gm2-libs-pim/Delay.def | 39 + gcc/m2/gm2-libs-pim/Delay.mod | 43 + gcc/m2/gm2-libs-pim/Display.def | 41 + gcc/m2/gm2-libs-pim/Display.mod | 54 + gcc/m2/gm2-libs-pim/ErrorCode.def | 56 + gcc/m2/gm2-libs-pim/ErrorCode.mod | 71 + gcc/m2/gm2-libs-pim/FileSystem.def | 275 + gcc/m2/gm2-libs-pim/FileSystem.mod | 658 + gcc/m2/gm2-libs-pim/FloatingUtilities.def | 105 + gcc/m2/gm2-libs-pim/FloatingUtilities.mod | 153 + gcc/m2/gm2-libs-pim/InOut.def | 190 + gcc/m2/gm2-libs-pim/InOut.mod | 434 + gcc/m2/gm2-libs-pim/Keyboard.def | 48 + gcc/m2/gm2-libs-pim/Keyboard.mod | 74 + gcc/m2/gm2-libs-pim/LongIO.def | 38 + gcc/m2/gm2-libs-pim/LongIO.mod | 65 + gcc/m2/gm2-libs-pim/NumberConversion.def | 31 + gcc/m2/gm2-libs-pim/NumberConversion.mod | 31 + gcc/m2/gm2-libs-pim/README.texi | 44 + gcc/m2/gm2-libs-pim/Random.def | 83 + gcc/m2/gm2-libs-pim/Random.mod | 133 + gcc/m2/gm2-libs-pim/RealConversions.def | 135 + gcc/m2/gm2-libs-pim/RealConversions.mod | 467 + gcc/m2/gm2-libs-pim/RealInOut.def | 124 + gcc/m2/gm2-libs-pim/RealInOut.mod | 248 + gcc/m2/gm2-libs-pim/Strings.def | 92 + gcc/m2/gm2-libs-pim/Strings.mod | 179 + gcc/m2/gm2-libs-pim/Termbase.def | 107 + gcc/m2/gm2-libs-pim/Termbase.mod | 220 + gcc/m2/gm2-libs-pim/Terminal.def | 91 + gcc/m2/gm2-libs-pim/Terminal.mod | 142 + gcc/m2/gm2-libs-pim/TimeDate.def | 98 + gcc/m2/gm2-libs-pim/TimeDate.mod | 140 + gcc/m2/gm2-libs/ASCII.def | 54 + gcc/m2/gm2-libs/ASCII.mod | 29 + gcc/m2/gm2-libs/Args.def | 48 + gcc/m2/gm2-libs/Args.mod | 87 + gcc/m2/gm2-libs/Assertion.def | 39 + gcc/m2/gm2-libs/Assertion.mod | 46 + gcc/m2/gm2-libs/Break.def | 29 + gcc/m2/gm2-libs/Break.mod | 29 + gcc/m2/gm2-libs/Builtins.def | 229 + gcc/m2/gm2-libs/Builtins.mod | 686 + gcc/m2/gm2-libs/COROUTINES.def | 36 + gcc/m2/gm2-libs/COROUTINES.mod | 29 + gcc/m2/gm2-libs/CmdArgs.def | 49 + gcc/m2/gm2-libs/CmdArgs.mod | 224 + gcc/m2/gm2-libs/Debug.def | 61 + gcc/m2/gm2-libs/Debug.mod | 107 + gcc/m2/gm2-libs/DynamicStrings.def | 369 + gcc/m2/gm2-libs/DynamicStrings.mod | 1878 ++ gcc/m2/gm2-libs/Environment.def | 40 + gcc/m2/gm2-libs/Environment.mod | 63 + gcc/m2/gm2-libs/FIO.def | 337 + gcc/m2/gm2-libs/FIO.mod | 1708 ++ gcc/m2/gm2-libs/FormatStrings.def | 81 + gcc/m2/gm2-libs/FormatStrings.mod | 580 + gcc/m2/gm2-libs/FpuIO.def | 50 + gcc/m2/gm2-libs/FpuIO.mod | 190 + gcc/m2/gm2-libs/GetOpt.def | 115 + gcc/m2/gm2-libs/GetOpt.mod | 213 + gcc/m2/gm2-libs/IO.def | 85 + gcc/m2/gm2-libs/IO.mod | 365 + gcc/m2/gm2-libs/Indexing.def | 133 + gcc/m2/gm2-libs/Indexing.mod | 345 + gcc/m2/gm2-libs/LMathLib0.def | 44 + gcc/m2/gm2-libs/LMathLib0.mod | 81 + gcc/m2/gm2-libs/LegacyReal.def | 33 + gcc/m2/gm2-libs/LegacyReal.mod | 29 + gcc/m2/gm2-libs/M2EXCEPTION.def | 54 + gcc/m2/gm2-libs/M2EXCEPTION.mod | 69 + gcc/m2/gm2-libs/M2RTS.def | 171 + gcc/m2/gm2-libs/M2RTS.mod | 432 + gcc/m2/gm2-libs/MathLib0.def | 44 + gcc/m2/gm2-libs/MathLib0.mod | 161 + gcc/m2/gm2-libs/MemUtils.def | 47 + gcc/m2/gm2-libs/MemUtils.mod | 85 + gcc/m2/gm2-libs/NumberIO.def | 83 + gcc/m2/gm2-libs/NumberIO.mod | 600 + gcc/m2/gm2-libs/OptLib.def | 106 + gcc/m2/gm2-libs/OptLib.mod | 279 + gcc/m2/gm2-libs/PushBackInput.def | 135 + gcc/m2/gm2-libs/PushBackInput.mod | 307 + gcc/m2/gm2-libs/README.texi | 18 + gcc/m2/gm2-libs/RTExceptions.def | 195 + gcc/m2/gm2-libs/RTExceptions.mod | 830 + gcc/m2/gm2-libs/RTint.def | 127 + gcc/m2/gm2-libs/RTint.mod | 847 + gcc/m2/gm2-libs/SArgs.def | 51 + gcc/m2/gm2-libs/SArgs.mod | 89 + gcc/m2/gm2-libs/SCmdArgs.def | 51 + gcc/m2/gm2-libs/SCmdArgs.mod | 211 + gcc/m2/gm2-libs/SEnvironment.def | 43 + gcc/m2/gm2-libs/SEnvironment.mod | 75 + gcc/m2/gm2-libs/SFIO.def | 94 + gcc/m2/gm2-libs/SFIO.mod | 148 + gcc/m2/gm2-libs/SMathLib0.def | 44 + gcc/m2/gm2-libs/SMathLib0.mod | 81 + gcc/m2/gm2-libs/SYSTEM.def | 181 + gcc/m2/gm2-libs/SYSTEM.mod | 273 + gcc/m2/gm2-libs/Scan.def | 85 + gcc/m2/gm2-libs/Scan.mod | 420 + gcc/m2/gm2-libs/Selective.def | 72 + gcc/m2/gm2-libs/StdIO.def | 102 + gcc/m2/gm2-libs/StdIO.mod | 165 + gcc/m2/gm2-libs/Storage.def | 69 + gcc/m2/gm2-libs/Storage.mod | 57 + gcc/m2/gm2-libs/StrCase.def | 67 + gcc/m2/gm2-libs/StrCase.mod | 116 + gcc/m2/gm2-libs/StrIO.def | 57 + gcc/m2/gm2-libs/StrIO.mod | 194 + gcc/m2/gm2-libs/StrLib.def | 84 + gcc/m2/gm2-libs/StrLib.mod | 214 + gcc/m2/gm2-libs/StringConvert.def | 337 + gcc/m2/gm2-libs/StringConvert.mod | 1406 + gcc/m2/gm2-libs/SysExceptions.def | 47 + gcc/m2/gm2-libs/SysStorage.def | 81 + gcc/m2/gm2-libs/SysStorage.mod | 181 + gcc/m2/gm2-libs/TimeString.def | 40 + gcc/m2/gm2-libs/TimeString.mod | 62 + gcc/m2/gm2-libs/UnixArgs.def | 39 + gcc/m2/gm2-libs/cbuiltin.def | 208 + gcc/m2/gm2-libs/cgetopt.def | 107 + gcc/m2/gm2-libs/config-host | 5629 ++++ gcc/m2/gm2-libs/config-host.in | 148 + gcc/m2/gm2-libs/cxxabi.def | 41 + gcc/m2/gm2-libs/dtoa.def | 59 + gcc/m2/gm2-libs/errno.def | 37 + gcc/m2/gm2-libs/gdbif.def | 60 + gcc/m2/gm2-libs/gdbif.mod | 109 + gcc/m2/gm2-libs/gm2-libs-host.h.in | 324 + gcc/m2/gm2-libs/ldtoa.def | 59 + gcc/m2/gm2-libs/libc.def | 461 + gcc/m2/gm2-libs/libm.def | 92 + gcc/m2/gm2-libs/sckt.def | 160 + gcc/m2/gm2-libs/termios.def | 233 + gcc/m2/gm2-libs/wrapc.def | 124 + gcc/m2/gm2config.h.in | 67 + gcc/m2/gm2spec.c | 1510 ++ gcc/m2/gm2version.h | 22 + gcc/m2/images/LICENSE.IMG | 20 + gcc/m2/images/gnu.eps | 547 + gcc/m2/images/gnupng | Bin 0 -> 9192 bytes gcc/m2/init/README | 3 + gcc/m2/init/gm2-gccinit | 97 + gcc/m2/init/gm2lccinit | 54 + gcc/m2/init/gm2lgeninit | 55 + gcc/m2/init/gm2linit | 66 + gcc/m2/init/gm2lorderinit | 56 + gcc/m2/init/gm2minit | 63 + gcc/m2/init/mcinit | 136 + gcc/m2/init/ppginit | 51 + gcc/m2/lang-options.h | 186 + gcc/m2/lang-specs.h | 47 + gcc/m2/lang.opt | 357 + gcc/m2/m2-link-support.h | 184 + gcc/m2/m2-tree.def | 24 + gcc/m2/m2-tree.h | 63 + gcc/m2/m2.flex | 768 + gcc/m2/m2pp.c | 2646 ++ gcc/m2/m2pp.h | 40 + gcc/m2/mc-boot-ch/GBuiltins.c | 34 + gcc/m2/mc-boot-ch/GRTco.c | 109 + gcc/m2/mc-boot-ch/GSYSTEM.c | 30 + gcc/m2/mc-boot-ch/GSelective.c | 241 + gcc/m2/mc-boot-ch/GSysExceptions.c | 227 + gcc/m2/mc-boot-ch/GUnixArgs.c | 35 + gcc/m2/mc-boot-ch/Gcbuiltin.c | 173 + gcc/m2/mc-boot-ch/Gdtoa.c | 172 + gcc/m2/mc-boot-ch/Gerrno.c | 46 + gcc/m2/mc-boot-ch/Gldtoa.c | 99 + gcc/m2/mc-boot-ch/Glibc.c | 204 + gcc/m2/mc-boot-ch/Glibm.c | 224 + gcc/m2/mc-boot-ch/Gmcrts.c | 53 + gcc/m2/mc-boot-ch/Gmcrts.h | 37 + gcc/m2/mc-boot-ch/Gnetwork.h | 56 + gcc/m2/mc-boot-ch/Gpth.c | 53 + gcc/m2/mc-boot-ch/Gtermios.c | 1923 ++ gcc/m2/mc-boot-ch/Gwrapc.c | 183 + gcc/m2/mc-boot-ch/README | 2 + gcc/m2/mc-boot-ch/network.c | 40 + gcc/m2/mc-boot/GASCII.c | 86 + gcc/m2/mc-boot/GASCII.h | 94 + gcc/m2/mc-boot/GArgs.c | 116 + gcc/m2/mc-boot/GArgs.h | 69 + gcc/m2/mc-boot/GAssertion.c | 71 + gcc/m2/mc-boot/GAssertion.h | 61 + gcc/m2/mc-boot/GBreak.c | 47 + gcc/m2/mc-boot/GBreak.h | 55 + gcc/m2/mc-boot/GCOROUTINES.h | 60 + gcc/m2/mc-boot/GCmdArgs.c | 322 + gcc/m2/mc-boot/GCmdArgs.h | 69 + gcc/m2/mc-boot/GDebug.c | 168 + gcc/m2/mc-boot/GDebug.h | 72 + gcc/m2/mc-boot/GDynamicStrings.c | 2682 ++ gcc/m2/mc-boot/GDynamicStrings.h | 328 + gcc/m2/mc-boot/GEnvironment.c | 96 + gcc/m2/mc-boot/GEnvironment.h | 62 + gcc/m2/mc-boot/GFIO.c | 2310 ++ gcc/m2/mc-boot/GFIO.h | 297 + gcc/m2/mc-boot/GFormatStrings.c | 845 + gcc/m2/mc-boot/GFormatStrings.h | 98 + gcc/m2/mc-boot/GFpuIO.c | 336 + gcc/m2/mc-boot/GFpuIO.h | 67 + gcc/m2/mc-boot/GIO.c | 479 + gcc/m2/mc-boot/GIO.h | 88 + gcc/m2/mc-boot/GIndexing.c | 489 + gcc/m2/mc-boot/GIndexing.h | 141 + gcc/m2/mc-boot/GM2EXCEPTION.c | 89 + gcc/m2/mc-boot/GM2EXCEPTION.h | 59 + gcc/m2/mc-boot/GM2RTS.c | 560 + gcc/m2/mc-boot/GM2RTS.h | 160 + gcc/m2/mc-boot/GMemUtils.c | 118 + gcc/m2/mc-boot/GMemUtils.h | 68 + gcc/m2/mc-boot/GNumberIO.c | 776 + gcc/m2/mc-boot/GNumberIO.h | 78 + gcc/m2/mc-boot/GPushBackInput.c | 486 + gcc/m2/mc-boot/GPushBackInput.h | 142 + gcc/m2/mc-boot/GRTExceptions.c | 1214 + gcc/m2/mc-boot/GRTExceptions.h | 190 + gcc/m2/mc-boot/GRTco.h | 114 + gcc/m2/mc-boot/GRTint.c | 1122 + gcc/m2/mc-boot/GRTint.h | 137 + gcc/m2/mc-boot/GSArgs.c | 123 + gcc/m2/mc-boot/GSArgs.h | 72 + gcc/m2/mc-boot/GSFIO.c | 216 + gcc/m2/mc-boot/GSFIO.h | 110 + gcc/m2/mc-boot/GSYSTEM.h | 111 + gcc/m2/mc-boot/GSelective.h | 82 + gcc/m2/mc-boot/GStdIO.c | 269 + gcc/m2/mc-boot/GStdIO.h | 119 + gcc/m2/mc-boot/GStorage.c | 74 + gcc/m2/mc-boot/GStorage.h | 86 + gcc/m2/mc-boot/GStrCase.c | 175 + gcc/m2/mc-boot/GStrCase.h | 85 + gcc/m2/mc-boot/GStrIO.c | 277 + gcc/m2/mc-boot/GStrIO.h | 76 + gcc/m2/mc-boot/GStrLib.c | 332 + gcc/m2/mc-boot/GStrLib.h | 99 + gcc/m2/mc-boot/GStringConvert.c | 2005 ++ gcc/m2/mc-boot/GStringConvert.h | 317 + gcc/m2/mc-boot/GSysExceptions.h | 62 + gcc/m2/mc-boot/GSysStorage.c | 249 + gcc/m2/mc-boot/GSysStorage.h | 95 + gcc/m2/mc-boot/GTimeString.c | 89 + gcc/m2/mc-boot/GTimeString.h | 62 + gcc/m2/mc-boot/GUnixArgs.h | 58 + gcc/m2/mc-boot/Galists.c | 440 + gcc/m2/mc-boot/Galists.h | 131 + gcc/m2/mc-boot/Gdecl.c | 26317 +++++++++++++++++++ gcc/m2/mc-boot/Gdecl.h | 1281 + gcc/m2/mc-boot/Gdtoa.h | 76 + gcc/m2/mc-boot/Gerrno.h | 59 + gcc/m2/mc-boot/Gkeyc.c | 1598 ++ gcc/m2/mc-boot/Gkeyc.h | 301 + gcc/m2/mc-boot/Gldtoa.h | 76 + gcc/m2/mc-boot/Glibc.h | 397 + gcc/m2/mc-boot/Glibm.h | 97 + gcc/m2/mc-boot/Glists.c | 439 + gcc/m2/mc-boot/Glists.h | 127 + gcc/m2/mc-boot/GmcComment.c | 468 + gcc/m2/mc-boot/GmcComment.h | 131 + gcc/m2/mc-boot/GmcComp.c | 660 + gcc/m2/mc-boot/GmcComp.h | 63 + gcc/m2/mc-boot/GmcDebug.c | 86 + gcc/m2/mc-boot/GmcDebug.h | 63 + gcc/m2/mc-boot/GmcError.c | 1195 + gcc/m2/mc-boot/GmcError.h | 170 + gcc/m2/mc-boot/GmcFileName.c | 152 + gcc/m2/mc-boot/GmcFileName.h | 84 + gcc/m2/mc-boot/GmcLexBuf.c | 1849 ++ gcc/m2/mc-boot/GmcLexBuf.h | 233 + gcc/m2/mc-boot/GmcMetaError.c | 1880 ++ gcc/m2/mc-boot/GmcMetaError.h | 76 + gcc/m2/mc-boot/GmcOptions.c | 994 + gcc/m2/mc-boot/GmcOptions.h | 128 + gcc/m2/mc-boot/GmcPreprocess.c | 181 + gcc/m2/mc-boot/GmcPreprocess.h | 63 + gcc/m2/mc-boot/GmcPretty.c | 468 + gcc/m2/mc-boot/GmcPretty.h | 158 + gcc/m2/mc-boot/GmcPrintf.c | 655 + gcc/m2/mc-boot/GmcPrintf.h | 122 + gcc/m2/mc-boot/GmcQuiet.c | 129 + gcc/m2/mc-boot/GmcQuiet.h | 56 + gcc/m2/mc-boot/GmcReserved.c | 40 + gcc/m2/mc-boot/GmcReserved.h | 52 + gcc/m2/mc-boot/GmcSearch.c | 408 + gcc/m2/mc-boot/GmcSearch.h | 119 + gcc/m2/mc-boot/GmcStack.c | 228 + gcc/m2/mc-boot/GmcStack.h | 102 + gcc/m2/mc-boot/GmcStream.c | 264 + gcc/m2/mc-boot/GmcStream.h | 73 + gcc/m2/mc-boot/Gmcflex.h | 89 + gcc/m2/mc-boot/Gmcp1.c | 7136 +++++ gcc/m2/mc-boot/Gmcp1.h | 57 + gcc/m2/mc-boot/Gmcp2.c | 7506 ++++++ gcc/m2/mc-boot/Gmcp2.h | 57 + gcc/m2/mc-boot/Gmcp3.c | 7673 ++++++ gcc/m2/mc-boot/Gmcp3.h | 57 + gcc/m2/mc-boot/Gmcp4.c | 7592 ++++++ gcc/m2/mc-boot/Gmcp4.h | 57 + gcc/m2/mc-boot/Gmcp5.c | 8459 ++++++ gcc/m2/mc-boot/Gmcp5.h | 57 + gcc/m2/mc-boot/GnameKey.c | 584 + gcc/m2/mc-boot/GnameKey.h | 111 + gcc/m2/mc-boot/Gpth.h | 43 + gcc/m2/mc-boot/GsymbolKey.c | 406 + gcc/m2/mc-boot/GsymbolKey.h | 127 + gcc/m2/mc-boot/Gtermios.h | 207 + gcc/m2/mc-boot/Gtop.c | 69 + gcc/m2/mc-boot/Gvarargs.c | 419 + gcc/m2/mc-boot/Gvarargs.h | 119 + gcc/m2/mc-boot/Gwlists.c | 471 + gcc/m2/mc-boot/Gwlists.h | 139 + gcc/m2/mc-boot/Gwrapc.h | 125 + gcc/m2/mc-boot/README | 3 + gcc/m2/mc/Indexing.def | 128 + gcc/m2/mc/Indexing.mod | 343 + gcc/m2/mc/README | 65 + gcc/m2/mc/alists.def | 112 + gcc/m2/mc/alists.mod | 305 + gcc/m2/mc/decl.def | 1442 + gcc/m2/mc/decl.mod | 16517 ++++++++++++ gcc/m2/mc/decl.mod-extra | 64 + gcc/m2/mc/keyc.def | 316 + gcc/m2/mc/keyc.mod | 1137 + gcc/m2/mc/lists.def | 112 + gcc/m2/mc/lists.mod | 304 + gcc/m2/mc/m2flex.def | 78 + gcc/m2/mc/mc.flex | 749 + gcc/m2/mc/mcComment.def | 116 + gcc/m2/mc/mcComment.h | 40 + gcc/m2/mc/mcComment.mod | 293 + gcc/m2/mc/mcComp.def | 41 + gcc/m2/mc/mcComp.mod | 477 + gcc/m2/mc/mcDebug.def | 40 + gcc/m2/mc/mcDebug.mod | 54 + gcc/m2/mc/mcError.def | 178 + gcc/m2/mc/mcError.mod | 806 + gcc/m2/mc/mcFileName.def | 64 + gcc/m2/mc/mcFileName.mod | 103 + gcc/m2/mc/mcLexBuf.def | 244 + gcc/m2/mc/mcLexBuf.h | 224 + gcc/m2/mc/mcLexBuf.mod | 1197 + gcc/m2/mc/mcMetaError.def | 128 + gcc/m2/mc/mcMetaError.mod | 1035 + gcc/m2/mc/mcOptions.def | 123 + gcc/m2/mc/mcOptions.mod | 686 + gcc/m2/mc/mcPreprocess.def | 41 + gcc/m2/mc/mcPreprocess.mod | 133 + gcc/m2/mc/mcPretty.def | 140 + gcc/m2/mc/mcPretty.mod | 304 + gcc/m2/mc/mcPrintf.def | 57 + gcc/m2/mc/mcPrintf.mod | 309 + gcc/m2/mc/mcQuiet.def | 39 + gcc/m2/mc/mcQuiet.mod | 70 + gcc/m2/mc/mcReserved.def | 52 + gcc/m2/mc/mcReserved.h | 62 + gcc/m2/mc/mcReserved.mod | 21 + gcc/m2/mc/mcSearch.def | 107 + gcc/m2/mc/mcSearch.mod | 296 + gcc/m2/mc/mcStack.def | 84 + gcc/m2/mc/mcStack.mod | 145 + gcc/m2/mc/mcStream.def | 52 + gcc/m2/mc/mcStream.mod | 178 + gcc/m2/mc/mcflex.def | 78 + gcc/m2/mc/mcp1.def | 33 + gcc/m2/mc/mcp2.def | 32 + gcc/m2/mc/mcp3.def | 33 + gcc/m2/mc/mcp4.def | 33 + gcc/m2/mc/mcp5.def | 33 + gcc/m2/mc/nameKey.def | 101 + gcc/m2/mc/nameKey.mod | 398 + gcc/m2/mc/symbolKey.def | 104 + gcc/m2/mc/symbolKey.mod | 298 + gcc/m2/mc/top.mod | 43 + gcc/m2/mc/varargs.def | 105 + gcc/m2/mc/varargs.mod | 288 + gcc/m2/mc/wlists.def | 122 + gcc/m2/mc/wlists.mod | 327 + gcc/m2/patches/gcc/11.1.0/01-patches | 345 + gcc/m2/patches/gcc/11.1.0/02-patches | 49 + gcc/m2/patches/gcc/11.1.0/03-patches | 12 + gcc/m2/patches/gcc/11.1.0/04-patches | 12 + gcc/m2/patches/gcc/11.1.0/05-patches | 12 + gcc/m2/patches/gcc/11.1.0/06-patches | 316 + gcc/m2/patches/gcc/11.1.0/07-patches | 40 + gcc/m2/patches/gcc/11.1.0/08-patches | 27 + gcc/m2/patches/gcc/11.1.0/09-patches | 778 + gcc/m2/patches/gcc/11.1.0/10-patches | 83 + gcc/m2/patches/gcc/11.1.0/11-patches | 12 + gcc/m2/patches/gcc/11.1.0/12-patches | 16 + gcc/m2/patches/gcc/11.1.0/13-patches | 13 + gcc/m2/patches/gcc/11.1.0/14-patches | 14 + gcc/m2/patches/gcc/11.1.0/15-patches | 12 + gcc/m2/patches/gcc/11.1.0/16-patches | 221 + gcc/m2/patches/gcc/11.1.0/17-patches | 12 + gcc/m2/patches/gcc/11.1.0/18-patches | 28 + gcc/m2/patches/gcc/11.1.0/19-patches | 16 + gcc/m2/patches/gcc/11.1.0/20-patches | 12 + gcc/m2/patches/gcc/11.1.0/21-patches | 12 + gcc/m2/patches/gcc/11.1.0/22-patches | 479 + gcc/m2/patches/gcc/11.1.0/23-patches | 21 + gcc/m2/patches/gcc/3.3.6/01.waldek_patch_gcc | 35 + gcc/m2/patches/gcc/3.3.6/02.gaius_patch_gcc | 350 + gcc/m2/patches/gcc/4.1.0/01.gaius_patch_gcc | 165 + gcc/m2/patches/gcc/4.1.1/01.gaius_patch_gcc | 163 + gcc/m2/patches/gcc/4.1.2/01-patches | 366 + gcc/m2/patches/gcc/4.1.2/02-patches | 83 + gcc/m2/patches/gcc/4.1.2/ChangeLog | 56 + gcc/m2/patches/gcc/4.1.2/old/01.gaius_patch_gcc | 202 + gcc/m2/patches/gcc/4.1.2/old/02.gaius_rs6000_lang | 11 + gcc/m2/patches/gcc/4.1.2/old/03.michael_i386 | 11 + gcc/m2/patches/gcc/4.1.2/old/04.gaius_patch_gcc | 31 + gcc/m2/patches/gcc/4.1.2/old/05.gaius_patch_gcc | 21 + gcc/m2/patches/gcc/4.1.2/old/06.gaius_patch_tree | 95 + gcc/m2/patches/gcc/4.1.2/old/07.michael_i386 | 15 + .../gcc/4.1.2/old/08.gaius_ipa_type_escape.c | 55 + gcc/m2/patches/gcc/4.1.2/old/09.gaius_patch_config | 51 + .../patches/gcc/4.1.2/old/10.michael_snowleopard1 | 68 + .../patches/gcc/4.1.2/old/11.michael_snowleopard2 | 12 + .../4.1.2/old/12.gaius_patch_tree_flow_inline_h | 20 + gcc/m2/patches/gcc/4.7.1/01-patches | 32 + gcc/m2/patches/gcc/4.7.1/02-patches | 14 + gcc/m2/patches/gcc/4.7.3/01-patches | 319 + gcc/m2/patches/gcc/4.7.3/02-patches | 64 + gcc/m2/patches/gcc/4.7.3/03-patches | 742 + gcc/m2/patches/gcc/4.7.3/04-patches | 26 + gcc/m2/patches/gcc/4.7.3/05-patches | 58 + gcc/m2/patches/gcc/4.7.3/06-patches | 218 + gcc/m2/patches/gcc/4.7.3/07-patches | 29 + gcc/m2/patches/gcc/4.7.3/08-patches | 14 + gcc/m2/patches/gcc/4.7.3/09-patches | 13 + gcc/m2/patches/gcc/4.7.3/10-patches | 12 + gcc/m2/patches/gcc/4.7.3/11-patches | 12 + gcc/m2/patches/gcc/4.7.3/12-patches | 11 + gcc/m2/patches/gcc/4.7.4/01-patches | 319 + gcc/m2/patches/gcc/4.7.4/02-patches | 64 + gcc/m2/patches/gcc/4.7.4/03-patches | 742 + gcc/m2/patches/gcc/4.7.4/04-patches | 26 + gcc/m2/patches/gcc/4.7.4/05-patches | 58 + gcc/m2/patches/gcc/4.7.4/06-patches | 218 + gcc/m2/patches/gcc/4.7.4/07-patches | 29 + gcc/m2/patches/gcc/4.7.4/08-patches | 14 + gcc/m2/patches/gcc/4.7.4/09-patches | 13 + gcc/m2/patches/gcc/4.7.4/10-patches | 12 + gcc/m2/patches/gcc/4.7.4/11-patches | 12 + gcc/m2/patches/gcc/4.7.4/12-patches | 11 + gcc/m2/patches/gcc/5.2.0/01-patches | 319 + gcc/m2/patches/gcc/5.2.0/02-patches | 64 + gcc/m2/patches/gcc/5.2.0/03-patches | 12 + gcc/m2/patches/gcc/5.2.0/04-patches | 12 + gcc/m2/patches/gcc/5.2.0/05-patches | 12 + gcc/m2/patches/gcc/5.2.0/06-patches | 218 + gcc/m2/patches/gcc/5.2.0/07-patches | 29 + gcc/m2/patches/gcc/5.2.0/08-patches | 26 + gcc/m2/patches/gcc/5.2.0/09-patches | 743 + gcc/m2/patches/gcc/5.2.0/10-patches | 58 + gcc/m2/patches/gcc/5.2.0/11-patches | 17 + gcc/m2/patches/gcc/5.2.0/12-patches | 49 + gcc/m2/patches/gcc/6.4.0/01-patches | 319 + gcc/m2/patches/gcc/6.4.0/02-patches | 64 + gcc/m2/patches/gcc/6.4.0/03-patches | 12 + gcc/m2/patches/gcc/6.4.0/04-patches | 12 + gcc/m2/patches/gcc/6.4.0/05-patches | 12 + gcc/m2/patches/gcc/6.4.0/06-patches | 218 + gcc/m2/patches/gcc/6.4.0/07-patches | 29 + gcc/m2/patches/gcc/6.4.0/08-patches | 95 + gcc/m2/patches/gcc/6.4.0/09-patches | 743 + gcc/m2/patches/gcc/6.4.0/10-patches | 58 + gcc/m2/patches/gcc/6.4.0/11-patches | 16 + gcc/m2/patches/gcc/trunc/01-patches | 319 + gcc/m2/patches/gcc/trunc/02-patches | 64 + gcc/m2/patches/gcc/trunc/03-patches | 12 + gcc/m2/patches/gcc/trunc/04-patches | 12 + gcc/m2/patches/gcc/trunc/05-patches | 12 + gcc/m2/patches/gcc/trunc/06-patches | 273 + gcc/m2/patches/gcc/trunc/07-patches | 29 + gcc/m2/patches/gcc/trunc/08-patches | 95 + gcc/m2/patches/gcc/trunc/09-patches | 743 + gcc/m2/patches/gcc/trunc/10-patches | 58 + gcc/m2/patches/gcc/trunc/11-patches | 0 gcc/m2/patches/gcc/trunk/01-patches | 356 + gcc/m2/patches/gcc/trunk/02-patches | 60 + gcc/m2/patches/gcc/trunk/03-patches | 12 + gcc/m2/patches/gcc/trunk/04-patches | 12 + gcc/m2/patches/gcc/trunk/05-patches | 12 + gcc/m2/patches/gcc/trunk/06-patches | 317 + gcc/m2/patches/gcc/trunk/07-patches | 40 + gcc/m2/patches/gcc/trunk/08-patches | 55 + gcc/m2/patches/gcc/trunk/09-patches | 1426 + gcc/m2/patches/gcc/trunk/10-patches | 100 + gcc/m2/patches/gcc/trunk/11-patches | 12 + gcc/m2/patches/gcc/trunk/12-patches | 16 + gcc/m2/patches/gcc/trunk/13-patches | 13 + gcc/m2/patches/gcc/trunk/15-patches | 12 + gcc/m2/patches/gcc/trunk/23-patches | 33 + gcc/m2/patches/gcc/trunk/24-patches | 70 + gcc/m2/patches/gcc/trunk/25-patches | 42 + gcc/m2/patches/gdb/6.3/01.waldek_patch_gdb | 83 + gcc/m2/patches/gdb/6.3/02.gaius_patch_gdb | 1462 + gcc/m2/plugin/README | 2 + gcc/m2/plugin/m2rte.c | 352 + gcc/m2/tools-src/README | 3 + gcc/m2/tools-src/array2index.py | 368 + gcc/m2/tools-src/boilerplate.py | 599 + gcc/m2/tools-src/buildpg | 289 + gcc/m2/tools-src/buildsyntax | 91 + gcc/m2/tools-src/createUlmSys | 514 + gcc/m2/tools-src/def2texi.py | 423 + gcc/m2/tools-src/gensum.py | 428 + gcc/m2/tools-src/incfile | 34 + gcc/m2/tools-src/makeSystem | 104 + gcc/m2/tools-src/makeconfigure | 341 + gcc/m2/tools-src/makeversion | 203 + gcc/m2/tools-src/mklink.c | 810 + gcc/m2/tools-src/tidydates.py | 184 + gcc/m2/version.c | 1 + gcc/m2/www/Makefile.in | 119 + gcc/m2/www/README | 6 + gcc/m2/www/gm2-logo.ms | 26 + gcc/m2/www/gm2.css | 17 + gcc/m2/www/tools/texi2tr/html/about.html | 69 + gcc/m2/www/tools/texi2tr/html/community.html | 9 + gcc/m2/www/tools/texi2tr/html/development.html | 9 + gcc/m2/www/tools/texi2tr/html/download.html | 100 + gcc/m2/www/tools/texi2tr/html/footer.ht | 3 + gcc/m2/www/tools/texi2tr/html/header.ht | 11 + gcc/m2/www/tools/texi2tr/html/heading.ht | 2 + gcc/m2/www/tools/texi2tr/html/homepage.html | 63 + gcc/m2/www/tools/texi2tr/html/index.html | 9 + gcc/m2/www/tools/texi2tr/html/license.html | 67 + gcc/m2/www/tools/texi2tr/html/news.html | 9 + gcc/m2/www/tools/texi2tr/html/platforms.html | 98 + gcc/m2/www/tools/texi2tr/html/release.html | 67 + gcc/m2/www/tools/texi2tr/html/texi2tr.css | 263 + gcc/m2/www/tools/texi2tr/html/title.ht | 17 + gcc/m2/www/tools/texi2tr/html/users.html | 87 + .../tools/texi2tr/png/200px-Heckert_GNU_white.png | Bin 0 -> 20990 bytes gcc/m2/www/tools/texi2tr/png/debian-swirl48x48.png | Bin 0 -> 1791 bytes gcc/m2/www/tools/texi2tr/png/develop.png | Bin 0 -> 2957 bytes gcc/m2/www/tools/texi2tr/png/install.png | Bin 0 -> 6296 bytes gcc/m2/www/tools/texi2tr/png/library.png | Bin 0 -> 4159 bytes gcc/m2/www/tools/texi2tr/png/menu-left-tab.png | Bin 0 -> 266 bytes gcc/m2/www/tools/texi2tr/png/menu-right-tab.png | Bin 0 -> 572 bytes .../tools/texi2tr/png/menu-selected-left-tab.png | Bin 0 -> 248 bytes .../tools/texi2tr/png/menu-selected-right-tab.png | Bin 0 -> 577 bytes gcc/m2/www/tools/texi2tr/png/next.png | Bin 0 -> 1334 bytes gcc/m2/www/tools/texi2tr/png/note.png | Bin 0 -> 3027 bytes gcc/m2/www/tools/texi2tr/png/prev.png | Bin 0 -> 1404 bytes gcc/m2/www/tools/texi2tr/png/release.png | Bin 0 -> 4280 bytes gcc/m2/www/tools/texi2tr/png/snapshot.png | Bin 0 -> 1843 bytes gcc/m2/www/tools/texi2tr/png/terminal.png | Bin 0 -> 1642 bytes gcc/m2/www/tools/texi2tr/png/users.png | Bin 0 -> 6292 bytes gcc/m2/www/tools/texi2tr/src/config.py | 38 + gcc/m2/www/tools/texi2tr/src/navigation.py | 271 + gcc/m2/www/tools/texi2tr/src/outputdev.py | 557 + gcc/m2/www/tools/texi2tr/src/texi2tr.py | 1438 + gm2tools/ChangeLog | 50 + gm2tools/Makefile.am | 211 + gm2tools/Makefile.in | 843 + gm2tools/aclocal.m4 | 1060 + gm2tools/autogen.sh | 31 + gm2tools/configure | 4849 ++++ gm2tools/configure.ac | 53 + gm2tools/errors.c | 43 + gm2tools/gm2l.1 | 77 + gm2tools/gm2lcc.1 | 142 + gm2tools/gm2lgen.1 | 58 + gm2tools/gm2lorder.1 | 119 + gm2tools/m2color.c | 46 + libgm2/ChangeLog | 479 + libgm2/Makefile.am | 104 + libgm2/Makefile.in | 723 + libgm2/aclocal.m4 | 1087 + libgm2/autogen.sh | 31 + libgm2/config.h.in | 313 + libgm2/configure | 22104 ++++++++++++++++ libgm2/configure.ac | 372 + libgm2/libm2cor/KeyBoardLEDs.c | 139 + libgm2/libm2cor/Makefile.am | 153 + libgm2/libm2cor/Makefile.in | 767 + libgm2/libm2iso/ChanConsts.h | 57 + libgm2/libm2iso/ErrnoCategory.c | 165 + libgm2/libm2iso/Makefile.am | 227 + libgm2/libm2iso/Makefile.in | 897 + libgm2/libm2iso/RTco.c | 452 + libgm2/libm2iso/wrapsock.c | 250 + libgm2/libm2iso/wraptime.c | 408 + libgm2/libm2log/Break.c | 134 + libgm2/libm2log/Makefile.am | 167 + libgm2/libm2log/Makefile.in | 794 + libgm2/libm2min/Makefile.am | 148 + libgm2/libm2min/Makefile.in | 769 + libgm2/libm2min/libc.c | 40 + libgm2/libm2pim/Makefile.am | 203 + libgm2/libm2pim/Makefile.in | 925 + libgm2/libm2pim/Selective.c | 304 + libgm2/libm2pim/SysExceptions.c | 252 + libgm2/libm2pim/UnixArgs.c | 40 + libgm2/libm2pim/dtoa.c | 261 + libgm2/libm2pim/errno.c | 55 + libgm2/libm2pim/getopt.c | 144 + libgm2/libm2pim/ldtoa.c | 180 + libgm2/libm2pim/sckt.c | 456 + libgm2/libm2pim/target.c | 61 + libgm2/libm2pim/termios.c | 1948 ++ libgm2/libm2pim/wrapc.c | 288 + 1075 files changed, 463927 insertions(+), 63 deletions(-) diff --git a/Makefile.def b/Makefile.def index c83d9c4a813..bf99ca5cec1 100644 --- a/Makefile.def +++ b/Makefile.def @@ -140,6 +140,7 @@ host_modules= { module= lto-plugin; bootstrap=true; 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= libffi; no_install=true; }; 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= GOC_FOR_TARGET ; }; 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 @@ dependencies = { module=all-libcc1; on=all-gcc; }; // 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=configure-target-libgo; on=all-target-libstdc++-v3; }; 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=obj-c++; gcc-check-target=check-obj-c++; }; languages = { language=go; gcc-check-target=check-go; lib-check-target=check-target-libgo; lib-check-target=check-gotools; }; +languages = { language=m2; gcc-check-target=check-m2; + lib-check-target=check-target-libgm2; + lib-check-target=check-gm2tools; }; languages = { language=d; gcc-check-target=check-d; lib-check-target=check-target-libphobos; }; diff --git a/Makefile.in b/Makefile.in index ab883f69115..1867545f49d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -158,6 +158,7 @@ BUILD_EXPORTS = \ 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 @@ HOST_EXPORTS = \ 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 @@ BASE_TARGET_EXPORTS = \ 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 @@ DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@ 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 @@ CXXFLAGS = @CXXFLAGS@ LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates GOCFLAGS = $(CFLAGS) GDCFLAGS = $(CFLAGS) +GM2FLAGS = $(CFLAGS) CREATE_GCOV = create_gcov @@ -595,6 +600,7 @@ RAW_CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @RAW_CXX_FOR_TARGET@ GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@ GOC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GOC_FOR_TARGET@ 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 @@ CXXFLAGS_FOR_TARGET = @CXXFLAGS_FOR_TARGET@ 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 @@ all: # 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_libssp = $$r/$(TARGET_SUBDIR)/libssp/.libs: 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 @@ BASE_FLAGS_TO_PASS = \ "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 @@ EXTRA_HOST_FLAGS = \ 'GFORTRAN=$(GFORTRAN)' \ 'GOC=$(GOC)' \ 'GDC=$(GDC)' \ + 'GM2=$(GM2)' \ 'LD=$(LD)' \ 'LIPO=$(LIPO)' \ 'NM=$(NM)' \ @@ -918,6 +932,7 @@ POSTSTAGE1_FLAGS_TO_PASS = \ 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 @@ EXTRA_TARGET_FLAGS = \ '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 @@ TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) # 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 @@ configure-host: \ 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 @@ configure-target: \ 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-gnattools 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-libffi 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-c++tools 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-libffi 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-c++tools 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-libffi 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-c++tools 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-libffi 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-c++tools 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-libffi 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-c++tools 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-libffi 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-c++tools 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-libffi 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-c++tools 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-libffi 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-c++tools 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-libffi 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-c++tools 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-libffi 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-c++tools 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-libffi 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-c++tools 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-libffi 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-c++tools 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-libffi 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-c++tools 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-libffi 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 @@ local-distclean: -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 @@ check-host: \ maybe-check-gnattools \ maybe-check-lto-plugin \ maybe-check-libcc1 \ + maybe-check-gm2tools \ maybe-check-gotools \ maybe-check-libctf @@ -2561,6 +2610,7 @@ check-target: \ 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 @@ install-host-nogcc: \ maybe-install-gnattools \ maybe-install-lto-plugin \ maybe-install-libcc1 \ + maybe-install-gm2tools \ maybe-install-gotools \ maybe-install-libctf @@ -2728,6 +2779,7 @@ install-host: \ maybe-install-gnattools \ maybe-install-lto-plugin \ maybe-install-libcc1 \ + maybe-install-gm2tools \ maybe-install-gotools \ maybe-install-libctf @@ -2753,6 +2805,7 @@ install-target: \ 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 @@ install-strip-host: \ 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 @@ install-strip-target: \ 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 @@ maintainer-clean-libcc1: +.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 @@ maintainer-clean-target-libada: +.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 @@ check-gcc-go: (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-libffi: stage_last 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-libffi: maybe-all-gcc 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-stagefeedback-lto-plugin: maybe-all-stagefeedback-libiberty-linker-plugin 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 @@ configure-target-libgo: maybe-configure-target-libffi 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-target-libgfortran: maybe-all-target-libbacktrace 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 @@ all-gnattools: maybe-all-target-libstdc++-v3 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-bison: maybe-all-intl 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-libffi: maybe-all-target-libgcc 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-rda: maybe-all-target-newlib maybe-all-target-libgloss configure-target-libada: maybe-all-target-newlib maybe-all-target-libgloss +configure-target-libgm2: maybe-all-target-newlib maybe-all-target-libgloss + configure-target-libgomp: maybe-all-target-newlib maybe-all-target-libgloss configure-target-libitm: maybe-all-target-newlib maybe-all-target-libgloss diff --git a/Makefile.tpl b/Makefile.tpl index 6e0337fb48f..3400f9468f3 100644 --- a/Makefile.tpl +++ b/Makefile.tpl @@ -161,6 +161,7 @@ BUILD_EXPORTS = \ 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 @@ HOST_EXPORTS = \ 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 @@ BASE_TARGET_EXPORTS = \ 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 @@ DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@ 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 @@ CXXFLAGS = @CXXFLAGS@ LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates GOCFLAGS = $(CFLAGS) GDCFLAGS = $(CFLAGS) +GM2FLAGS = $(CFLAGS) CREATE_GCOV = create_gcov @@ -518,6 +523,7 @@ RAW_CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @RAW_CXX_FOR_TARGET@ GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@ GOC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GOC_FOR_TARGET@ 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 @@ CXXFLAGS_FOR_TARGET = @CXXFLAGS_FOR_TARGET@ 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 @@ EXTRA_HOST_FLAGS = \ 'GFORTRAN=$(GFORTRAN)' \ 'GOC=$(GOC)' \ 'GDC=$(GDC)' \ + 'GM2=$(GM2)' \ 'LD=$(LD)' \ 'LIPO=$(LIPO)' \ 'NM=$(NM)' \ @@ -673,6 +681,7 @@ POSTSTAGE1_FLAGS_TO_PASS = \ 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 @@ EXTRA_TARGET_FLAGS = \ '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 @@ TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) # 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 @@ local-distclean: -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 diff --git a/configure b/configure index 1224fc4039e..95167e48807 100755 --- a/configure +++ b/configure @@ -612,6 +612,7 @@ LD_FOR_TARGET 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 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -793,6 +795,7 @@ enable_compressed_debug_sections enable_libquadmath enable_libquadmath_support enable_libada +enable_libgm2 enable_libssp enable_libstdcxx enable_liboffloadmic @@ -871,6 +874,7 @@ GCC_FOR_TARGET 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 @@ datadir='${datarootdir}' 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 @@ do | -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 @@ fi 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 @@ Fine tuning of the installation directories: --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 @@ Optional Features: --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 @@ Some influential environment variables: 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 @@ host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktr # 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_libraries="target-libgcc \ target-libffi \ target-libobjc \ target-libada \ + target-libgm2 \ target-libgo \ target-libphobos \ target-zlib" @@ -3160,6 +3179,17 @@ if test "${ENABLE_LIBADA}" != "yes" ; then 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 @@ fi +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 @@ $as_echo "pre-installed" >&6; } fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target gm2" >&5 +$as_echo_n "checking where to find the target gm2... " >&6; } +if test "x${build}" != "x${host}" ; then + if expr "x$GM2_FOR_TARGET" : "x/" > /dev/null; then + # We already found the complete path + ac_dir=`dirname $GM2_FOR_TARGET` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5 +$as_echo "pre-installed in $ac_dir" >&6; } + else + # Canadian cross, just use what we found + { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5 +$as_echo "pre-installed" >&6; } + fi +else + ok=yes + case " ${configdirs} " in + *" gcc "*) ;; + *) ok=no ;; + esac + case ,${enable_languages}, in + *,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 @@ fi # Specify what files to not compare during bootstrap. compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/*" +compare_exclusions="$compare_exclusions | gcc/m2/gm2-compiler-boot/M2Version*" +compare_exclusions="$compare_exclusions | gcc/m2/gm2-compiler-boot/SYSTEM*" case "$target" in hppa*64*-*-hpux*) ;; hppa*-*-hpux*) compare_exclusions="$compare_exclusions | */libgcc/lib2funcs* | gcc/function-tests.o" ;; diff --git a/configure.ac b/configure.ac index 66d637d70dc..70a8438e75b 100644 --- a/configure.ac +++ b/configure.ac @@ -140,7 +140,7 @@ host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktr # 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_libraries="target-libgcc \ target-libffi \ target-libobjc \ target-libada \ + target-libgm2 \ target-libgo \ target-libphobos \ target-zlib" @@ -459,6 +460,14 @@ if test "${ENABLE_LIBADA}" != "yes" ; then 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(GCC_FOR_TARGET, gcc, ${CC_FOR_TARGET}) NCN_STRICT_CHECK_TARGET_TOOLS(GFORTRAN_FOR_TARGET, gfortran) NCN_STRICT_CHECK_TARGET_TOOLS(GOC_FOR_TARGET, gccgo) NCN_STRICT_CHECK_TARGET_TOOLS(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_TARGET_TOOL(gccgo, GOC_FOR_TARGET, GOC, [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 @@ AC_SUBST(stage2_werror_flag) # Specify what files to not compare during bootstrap. compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/*" +compare_exclusions="$compare_exclusions | gcc/m2/gm2-compiler-boot/M2Version*" +compare_exclusions="$compare_exclusions | gcc/m2/gm2-compiler-boot/SYSTEM*" case "$target" in hppa*64*-*-hpux*) ;; hppa*-*-hpux*) compare_exclusions="$compare_exclusions | */libgcc/lib2funcs* | gcc/function-tests.o" ;; diff --git a/gcc/c-family/cppspec.c b/gcc/c-family/cppspec.c index 65902b9f0d5..7a1f8d10a21 100644 --- a/gcc/c-family/cppspec.c +++ b/gcc/c-family/cppspec.c @@ -198,3 +198,9 @@ int lang_specific_pre_link (void) /* Number of extra output files that lang_specific_pre_link may generate. */ int lang_specific_extra_outfiles = 0; /* Not used for cpp. */ + +/* lang_register_spec_functions. Not used for cpp. */ +void +lang_register_spec_functions (void) +{ +} diff --git a/gcc/c/gccspec.c b/gcc/c/gccspec.c index db353a35585..67af876eb99 100644 --- a/gcc/c/gccspec.c +++ b/gcc/c/gccspec.c @@ -105,3 +105,9 @@ lang_specific_pre_link (void) /* Number of extra output files that lang_specific_pre_link may generate. */ int lang_specific_extra_outfiles = 0; /* Not used for C. */ + +/* lang_register_spec_functions. Not used for C. */ +void +lang_register_spec_functions (void) +{ +} diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c index 3c9bd1490b4..88a302c2157 100644 --- a/gcc/cp/g++spec.c +++ b/gcc/cp/g++spec.c @@ -434,3 +434,9 @@ int lang_specific_pre_link (void) /* Not used for C++. */ /* Number of extra output files that lang_specific_pre_link may generate. */ int lang_specific_extra_outfiles = 0; /* Not used for C++. */ + +/* lang_register_spec_functions. Not used for C++. */ +void +lang_register_spec_functions (void) +{ +} diff --git a/gcc/d/d-spec.cc b/gcc/d/d-spec.cc index 16ff1539e9f..e2fb787f5e1 100644 --- a/gcc/d/d-spec.cc +++ b/gcc/d/d-spec.cc @@ -490,3 +490,10 @@ lang_specific_pre_link (void) int lang_specific_extra_outfiles = 0; /* Not used for D. */ +/* lang_register_spec_functions register the D associated spec + functions. Not used for D. */ + +void +lang_register_spec_functions (void) +{ +} diff --git a/gcc/doc/gm2.texi b/gcc/doc/gm2.texi new file mode 100644 index 00000000000..8a34bda4659 --- /dev/null +++ b/gcc/doc/gm2.texi @@ -0,0 +1,2902 @@ +\input texinfo +@c -*-texinfo-*- +@c Copyright (C) 2001-2021 Free Software Foundation, Inc. +@c This is part of the GM2 manual. + +@c User level documentation for GNU Modula-2 +@c +@c header + +@setfilename gm2.info +@settitle The GNU Modula-2 Compiler + +@include version.texi +@set version-python 3.5 + +@include gcc-common.texi + +@c Copyright years for this manual. +@set copyrights-gm2 1999-2021 + +@copying +@c man begin COPYRIGHT +Copyright @copyright{} @value{copyrights-gm2} Free Software Foundation, Inc. + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with no +Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. +A copy of the license is included in the +@c man end +section entitled ``GNU Free Documentation License''. +@ignore +@c man begin COPYRIGHT +man page gfdl(7). +@c man end +@end ignore +@end copying + +@ifinfo +@format +@dircategory Software development +@direntry +* gm2: (gm2). A GCC-based compiler for the Modula-2 language +@end direntry +@end format + +@insertcopying +@end ifinfo + +@titlepage +@title The GNU Modula-2 Compiler +@versionsubtitle +@author Gaius Mulley + +@page +@vskip 0pt plus 1filll +Published by the Free Software Foundation @* +51 Franklin Street, Fifth Floor@* +Boston, MA 02110-1301, USA@* +@sp 1 +@insertcopying +@end titlepage +@contents +@page + +@c `Top' Node and Master Menu + +@ifinfo +@node Top, Overview, (dir), (dir) +@top Introduction +@end ifinfo + +@menu +* Overview:: What is GNU Modula-2. +* Using:: Using GNU Modula-2. +* Licence:: Licence of GNU Modula-2. +* Contributing:: Contributing to GNU Modula-2. +* Internals:: GNU Modula-2 internals. +* EBNF:: EBNF of GNU Modula-2 +* Copying:: GNU Public Licence V3. +* Libraries:: PIM and ISO library definitions. +* Indices:: Document and function indices. +@end menu + +@node Overview, Using, Top, Top +@chapter Overview of GNU Modula-2 + +@menu +* What is GNU Modula-2:: Brief description of GNU Modula-2. +* Why use GNU Modula-2:: Advantages of GNU Modula-2. +* News:: Latest news about GNU Modula-2. +* Features:: GNU Modula-2 Features +@end menu + +@node What is GNU Modula-2, Why use GNU Modula-2, , Using +@section What is GNU Modula-2 + +GNU Modula-2 is a @uref{http://gcc.gnu.org/frontends.html, front end} +for the GNU Compiler Collection (@uref{http://gcc.gnu.org/, GCC}). +The GNU Modula-2 compiler is compliant with the PIM2, PIM3, PIM4 and +ISO dialects. Also implemented are a complete set of free ISO +libraries and PIM libraries. + +@footnote{The four Modula-2 dialects supported are defined in the following +references: + +PIM2: 'Programming in Modula-2', 2nd Edition, Springer Verlag, 1982, +1983 by Niklaus Wirth (PIM2). + +PIM3: 'Programming in Modula-2', 3rd Corrected Edition, Springer Verlag, +1985 (PIM3). + +PIM4: 'Programming in Modula-2', 4th Edition, Springer Verlag, 1988 +(@uref{http://freepages.modula2.org/report4/modula-2.html, PIM4}). + +ISO: the ISO Modula-2 language as defined in 'ISO/IEC Information +technology - programming languages - part 1: Modula-2 Language, +ISO/IEC 10514-1 (1996)' +} + +@node Why use GNU Modula-2, Release map, What is GNU Modula-2, Using +@section Why use GNU Modula-2 + +There are a number of advantages of using GNU Modula-2 rather than +translate an existing project into another language. + +The first advantage is of maintainability of the original sources +and the ability to debug the original project source code using a +combination of gm2 and gdb. + +The second advantage is that gcc runs on many processors and +platforms. gm2 builds and runs on powerpc64le, amd64, i386, aarch64 +to name but a few processors. + +The compiler provides semantic analysis and runtime checking (full ISO +Modula-2 checking is implemented) and there is a plugin which can, +under certain conditions, detect runtime errors at compile time. +See @xref{Semantic checking, , ,gm2}. + +gm2 can produce swig interface headers to allow access from Python and +other scripting languages. The compiler supports PIM2, PIM3, PIM4 and +ISO dialects of Modula-2, work is underway to implement M2R10. Many +of the GCC builtins are available and access to assembly programming +is achieved using the same syntax as that used by GCC. + +@node Release map, News, Why use GNU Modula-2, Using +@section Release map + +GNU Modula-2 is now part of GCC and therefore will adopt the GCC +release schedule with a git branches matching the various GCC release +numbers. It is intended that GNU Modula-2 implement more of the GCC +builtins (vararg access) and GCC features. + +There is an intention to implement the M2R10 dialect of Modula-2 and +any of the language changes. If you wish to see something different +please email @email{gaius.mulley@@southwales.ac.uk} with your ideas. + +@node News, Features, Release map, Using +@section News + +@table @code + +@item gm2 release numbers +are now superceded by gcc branch numbers as gm2 +is tracking the gcc release model. + +@item accuracy of error messages +has been improved and offending subexpressions are now highlighted. + +@item new type checker +has been implemented which will check +all data types, including recursive procedure parameter types. + +@item libraries +the gm2 driver program has been enhanced to allow third party +libraries to be installed alongside gm2 libraries. For example if the +user specifies library @code{foo} using @code{-flibs=foo} the driver +will check the standard GCC install directory for a subdirectory +@code{foo}. + +@item libpth +has been removed from gm2 and the coroutines are now implemented using +the gcc portable threading library. + +@item libulm +the Ulm libraries have been removed from the gm2 tree as they were not +GPL3. + +@item Talk given at The GNU Tools Cauldron 2018 +here is a talk on GNU Modula-2 given at +@url{https://gcc.gnu.org/wiki/cauldron2018,The GNU Tools Cauldron}, +Manchester on 8th September 2018. +The title is, ``GNU Modula-2 update, catching semantic errors post +code optimisation and improved debugging'' +[@url{http://floppsie.comp.glam.ac.uk/Papers/paper23/gaius-mulley-gnu-m2.pdf,slides} +and @url{https://www.youtube.com/watch?v=6jf6weRuHjk,video}]. + +@item gm2 1.8.2 +was released on Aug 30th 2018. gm2-1.8.2 grafts onto gcc-8.2.0 +and contains integer overflow detection for addition, subtraction, +negation and multiplication. It also detects and traps when +a floating point nan occurs. This is the first release with the +new semantic checking plugin which checks whether any exception +will occur post optimization (see -fsoft-check-all). The compiler +also works well with the automake tools. + +@item gm2 1.2.0 +was released on May 11th 2017. gm2-1.2.0 grafts onto gcc-5.2.0 and +supports much better line number accuracy in debugging output. +Source to code relationship can be further improved by the new option +-fm2-g. -fm2-whole-program also provides whole program optimization. +@item Talk given at The GNU Tools Cauldron 2016 +here is a talk on GNU Modula-2 given at +@url{https://gcc.gnu.org/wiki/cauldron2016,The GNU Tools Cauldron}, +Hebden Bridge on 9th September 2016. +The title is, ``GNU Modula-2 status, whole +program optimisation and language interoperability'' +[@url{http://floppsie.comp.glam.ac.uk/Papers/paper22/gaius-gcc-cauldron-2016.pdf,slides} +and @url{https://www.youtube.com/watch?v=8GMyxwHdr1E,video}]. +@item gm2 1.1.6 +was released on February 22nd 2016. gm2-1.1.6 grafts onto gcc-4.7.4. +@item gm2 1.1.5 +was released on September 3 2015, passes all regression tests and has +many bug fixes applied. Arrays and Records can be assigned to and from +WORD, LOC, BYTE providing sizes permit. Also a small number of fixes +to the library module MemStream.mod. Fixed a number of bugs shown by +valgrind. +@item gm2 1.1.3 +was released on April 15 2015. gm2-1.1.3 passes all regression +tests on Debian Wheezy (x86_64) and (i686). Also passes all regression tests +under Debian Jessie (x86_64). It also builds on armv7l Ubuntu Trusty Tahr. +@item gm2 1.1.1 +was released on January 26 2015. gm2-1.1.1 passes all regression +tests on Debian Wheezy (x86_64) and (i686). Also passes all regression tests +under Debian Jessie (x86_64). +@item gm2 1.1.0 +was released on January 02 2015. gm2-1.1.0 passes all regression +tests on Debian Wheezy (x86_64) and (i686). +@item gm2 1.0.9 +Beta was released on September 23 2014, all regressions passed on +x86_64 Debian Wheezy. +@item gm2 1.0.4 +was released on September 30 2011. This is a bug fix release. +@item gm2 1.0 +was released on December 11 2010. +@end table + +@node Features, Documentation, News, Using +@section GNU Modula-2 Features + +@itemize @bullet + +@item +the compiler currently complies with Programming in Modula-2 Edition +2, 3, 4 and ISO Modula-2. Users can switch on specific mutually +exclusive features by using: @samp{-fpim}, @samp{-fpim2}, +@samp{-fpim3}, @samp{-fpim4} or @samp{-fiso}. + +@item +the option @samp{-fswig} will automatically create a swig interface +file which corresponds to the definition module of the file being +compiled. + +@item +exception handling is compatible with C++ and swig. Modula-2 code can +be used with C or C++ code. + +@item +Python can call GNU Modula-2 modules via swig. + +@item +shared libraries can be built. + +@item +fixed sized types are now available from @samp{SYSTEM}. + +@item +support for dynamic @code{ARRAY}s has been added into @samp{gdb}. + +@item +variables can be declared at addresses. + +@item +much better dwarf-2 debugging support and when used with +@samp{gdb} the programmer can display @code{RECORD}s, +@code{ARRAY}s, @code{SET}s, subranges and constant char literals +in Modula-2 syntax. + +@item +supports sets of any ordinal size (memory permitting). + +@item +easy interface to C, and varargs can be passed to C routines. + +@item +many Logitech libraries have been implemented and can be accessed via: +@samp{-flibs=m2iso,m2pim}. + +@item +coroutines have been implemented in the PIM style and these are +accessible from SYSTEM. A number of supporting libraries (executive +and file descriptor mapping to interrupt vector libraries are +available through the @samp{-flibs=m2iso,m2pim} switch). + +@item +can be built as a cross compiler (for embedded microprocessors +such as the AVR and the ARM). + +@end itemize + +@node Documentation, Regression tests, Features, Using +@section Documentation + +The GNU Modula-2 documentation is available on line or as a +pdf @url{gm2.pdf}. + +@node Regression tests, Limitations, Documentation, Using +@section Regression tests for gm2 in the repository + +The result of the GNU Modula-2 regression tests for the current +snapshot are held at +@url{http://floppsie.comp.glam.ac.uk/gm2-results/regression-tests.html}. + +Other combinations almost certainly work, if you successfully +build gm2 on a different platform please email +@email{gaius.mulley@@southwales.ac.uk} +or the +@email{gm2@@nongnu.org} +GNU Modula-2 +mailing list. You will need to subscribe to send email to +the mailing list. + +@node Limitations, Objectives, Regression tests, Using +@section Limitations + +Logitech compatibility library is incomplete. The principle modules +for this platform exist however for a comprehensive list of completed +modules please check the documentation +@url{gm2.html}. + +@node Objectives, FAQ, , Using +@section Objectives + +@itemize @bullet + +@item +The intention of GNU Modula-2 is to provide a production Modula-2 +front end to GCC. + +@item +It should support all Niklaus Wirth PIM Dialects [234] and also ISO +Modula-2 including a reimplementation of all the ISO modules. + +@item +There should be an easy interface to C. + +@item +Exploit the features of GCC. + +@item +Listen to the requests of the users. +@end itemize + +@node FAQ, Community, Objectives, Using +@section FAQ + +@subsection Why use the C++ exception mechanism in GCC, rather than a bespoke Modula-2 mechanism? + +The C++ mechanism is tried and tested, it also provides GNU Modula-2 +with the ability to link with C++ modules and via swig it can raise +Python exceptions. + +@node Community, Other languages, FAQ, Using +@section Community + +You can subscribe to the GNU Modula-2 mailing by sending an +email to: +@email{gm2-subscribe@@nongnu.org} +or by +@url{http://lists.nongnu.org/mailman/listinfo/gm2}. +The mailing list contents can be viewed +@url{http://lists.gnu.org/archive/html/gm2}. + +@node Other languages, Papers and talks, Community, Using +@section Other languages for GCC + +These exist and can be found on the frontends web page on the +@uref{http://gcc.gnu.org/frontends.html, gcc web site}. + +@node Papers and talks, , Other languages, Using +@section Papers and talks + +A paper was presented at the @uref{http://www.gccsummit.org/2006, +GCC 2006 conference} on +@uref{http://floppsie.comp.glam.ac.uk/Papers/paper15/mulley-proc.pdf, +the state of GNU Modula-2}. + +A @uref{http://www.gccsummit.org/2010/speakers.php?types=LIGHTNING, +lightening talk} has been given at the GCC 2010 conference titled +"Exploiting front end knowledge to effortlessly create Python modules" +and the slides are +@uref{http://floppsie.comp.glam.ac.uk/Papers/paper20/talk.pdf, +available}. + +@node Using, , Overview, Top +@chapter Using GNU Modula-2 + +@menu +* Example usage:: Example compile and link. +* Compiler options:: GNU Modula-2 compiler options. +* Environment variables:: GNU Modula-2 related environment variables. +* Elementary data types:: Data types supported by GNU Modula-2. +* Standard procedures:: Permanently accessible base procedures. +* Dialect:: GNU Modula-2 supported dialects. +* Exceptions:: Exception implementation +* Semantic checking:: How to detect runtime problems at compile time. +* Extensions:: GNU Modula-2 language extensions. +* Type compatibility:: Data type compatibility. +* Unbounded by reference::Explanation of a language optimization. +* Building a shared library:: How to build a shared library. +* Interface for Python:: How to produce swig interface files. +* Producing a Python module:: How to produce a Python module. +* Interface to C:: Interfacing GNU Modula-2 to C. +* Assembly language:: Interface to assembly language. +* Alignment:: Data type alignment. +* Packed:: Packing data types. +* Built-ins:: Accessing GNU Modula-2 Built-ins. +* The PIM system module:: SYSTEM data types and procedures. +* The ISO system module:: SYSTEM data types, procedures and run time. +* Papers and talks:: Papers and talks. +* Other languages:: Other languages for GCC. +* What is GNU Modula-2:: Brief description of GNU Modula-2. +* Why use GNU Modula-2:: Advantages of GNU Modula-2. +@end menu + +This document contains the user and design issues relevant to the +Modula-2 front end to gcc. Throughout this document the GNU Modula-2 +front end is often referred to as @samp{gm2-@value{version-GM2}} or +@samp{gm2} for short. This corresponds to GCC version +@value{version-GCC} and GNU Modula-2 version @value{version-GM2}. + +@node Example usage, Compiler options, Using, Using +@section Example compile and link + +@ignore +@c man begin SYNOPSIS gm2 +gm2 [@option{-c}|@option{-S}] [@option{-g}] [@option{-pg}] + [@option{-O}@var{level}] [@option{-W}@var{warn}@dots{}] + [@option{-I}@var{dir}@dots{}] [@option{-L}@var{dir}@dots{}] + [@option{-f}@var{option}@dots{}] [@option{-m}@var{machine-option}@dots{}] + [@option{-o} @var{outfile}] [@@@var{file}] @var{infile}@dots{} + +Only the most useful options are listed here; see below for the +remainder. +@c man end +@c man begin SEEALSO +gpl(7), gfdl(7), fsf-funding(7), gcc(1) +and the Info entries for @file{gm2} and @file{gcc}. +@c man end +@end ignore + +@c man begin DESCRIPTION gm2 + +The @command{gm2} command is the GNU compiler for the Modula-2 language and +supports many of the same options as @command{gcc}. @xref{Option Summary, , +Option Summary, gcc, Using the GNU Compiler Collection (GCC)}. +This manual only documents the options specific to @command{gm2}. + +@c man end + +This section describes how to compile and link a simple hello world +program. It provides a few examples of using the different options +mentioned in @xref{Compiler options, , ,gm2}. Assuming that you have +a file called @file{hello.mod} in your current directory which +contains: + +@example +MODULE hello ; + +FROM StrIO IMPORT WriteString, WriteLn ; + +BEGIN + WriteString('hello world') ; WriteLn +END hello. +@end example + +You can compile and link it by: @samp{gm2 -g hello.mod}. +The result will be an @samp{a.out} file created in your directory. + +You can split this command into two steps if you prefer. The compile +step can be achieved by: @samp{gm2 -g -c hello.mod} and the link via: +@samp{gm2 -g -fonlylink hello.mod}. + +@footnote{To see all the compile actions taken by @samp{gm2} users can also +add the @samp{-v} flag at the command line, for example: + +@samp{gm2 -v -g -I. hello.mod} + +This displays the subprocesses initiated by @samp{gm2} which can be useful +when trouble shooting.} + +@node Compiler options, Environment variables, Example usage, Using +@section Compiler options + +This section describes the compiler options specific to GNU Modula-2 +for generic flags details see @xref{Invoking GCC, , ,gcc}. + +@c man begin OPTIONS + +For any given input file, the file name suffix determines what kind of +compilation is done. The following kinds of input file names are supported: + +@table @gcctabopt +@item @var{file}.mod +Modula-2 implementation or program source files. See the +@samp{-fmod=} option if you wish to compile a project which uses a +different source file extension. +@item @var{file}.def +Modula-2 definition module source files. Definition modules are not +compiled separately, in GNU Modula-2 definition modules are parsed as +required when program or implementation modules are compiled. See the +@samp{-fdef=} option if you wish to compile a project which uses a +different source file extension. +@end table + +You can specify more than one input file on the @command{gm2} command line, + +@table @code + +@item -g +create debugging information so that debuggers such as @file{gdb} +can inspect and control executables. + +@item -I +used to specify the search path for definition and implementation +modules. An example is: @code{gm2 -g -c -I.:../../libs foo.mod}. +If this option is not specified then the default path is added +which consists of the current directory followed by the appropriate +language dialect library directories. + +@item -fobject-path= +used to specify the path for objects during the linking stage. An +example is: @code{gm2 -g -fobject-path=.:../../libs/O2 -I.:../../libs +foo.mod}. The combination of @code{-I} and @code{-fobject-path=} +allows projects to keep various styles of objects separate from their +source counterparts. For example it would be possible to compile +implementation modules with different levels of optimization and +with/without debugging and keep them in separate directories. If the +@code{-fobject-path=} option is not specified then it is set +internally by using the path as specified by the @code{-I} option. If +the @code{-I} was also not specified then it uses the current +directory. In all cases the appropriate language dialect library +directories are appended to the end of the path. + +@item -fdebug-builtins +call a real function, rather than the builtin equivalent. This can +be useful for debugging parameter values to a builtin function as +it allows users to single step code into a real function. + +@item -fdump-system-exports +display all inbuilt system items. +This is an internal command line option. + +@item -fswig +generate a swig interface file. + +@item -fshared +generate a shared library from the module. + +@item -fmakeinit +generate the start up C++ code for the module, a file +@file{_m2_modulename.cpp} is created. This is an internal command +line option. + +@item -fruntime-modules= +specify, using a comma separated list, the runtime modules and their +order. These modules will initialized first before any other modules +in the application dependancy. By default the runtime modules list is +set to @code{Storage,SYSTEM,M2RTS,RTExceptions,IOLink}. Note that +these modules will only be linked into your executable if they are +required. So adding a long list of dependant modules will not effect +the size of the executable it merely states the initialisation order +should they be required. + +@item -fnil +generate code to detect accessing data through a +@code{NIL} value pointer. + +@item -fno-nil +do not generate code to detect accessing data through a +@code{NIL} value pointer. + +@item -fwholediv +generate code to detect whole number division by zero or modulus by zero. + +@item -fno-wholediv +do not generate code to detect whole number division by zero or +modulus by zero. + +@c @item -fwholevalue +@c generate code to detect whole number overflow and underflow. + +@c @item -fno-wholevalue +@c do not generate code to detect whole number overflow and underflow. + +@c @item -frealdiv +@c generate code to detect real number division by zero. + +@c @item -fno-realdiv +@c do not generate code to detect real number division by zero. + +@c @item -frealvalue +@c generate code to detect @code{NaN}s real number overflow and underflow. + +@c @item -fno-realvalue +@c do not generate code to detect @code{NaN}s real number overflow and underflow. + +@item -findex +generate code to check whether array index values are out of bounds. + +@item -fno-index +do not generate code to check whether array index values are out of +bounds. + +@item -frange +generate code to check the assignment range, return value range +set range and constructor range. + +@item -fno-range +do not generate code to check the assignment range, return value range +set range and constructor range. + +@item -freturn +generate code to check that functions always exit with a @code{RETURN} +and do not fall out at the end. + +@item -fcase +turns on compile time checking to check whether a @code{CASE} +statement requires an @code{ELSE} clause when on was not specified. + +@item -fsoft-check-all +turns on all runtime checks. This is the same as invoking +GNU Modula-2 using the command options +@code{-fnil} @code{-frange} @code{-findex} +@c @code{-fwholevalue} --fixme-- add this when working +@code{-fwholediv} @code{-fcase} @code{-freturn}. + +@item -fauto-init +turns on auto initialization of pointers to NIL. Whenever a block is +created all pointers declarated within this scope will have their +addresses assigned to NIL. + +@item -fno-exceptions +turns off all generation of exception handling code and no references +are made to the runtime exception libraries. + +@item -v +display all calls to subsidiary programs, such as the C preprocessor, +the GNU Modula-2 linker and compiler. + +@item -fm2-statistics +generates quadruple information: number of quadruples generated, +number of quadruples remaining after optimisation and number of source +lines compiled. + +@item -fm2-whole-program +compile all implementation modules and program module at once. Notice +that you need to take care if you are compiling different dialect +modules (particularly with the negative operands to modulus). But +this option, when coupled together with @code{-O3}, can deliver huge +performance improvements. + +@item -fm2-g +improve the debugging experience for new programmers at the expense +of generating @code{nop} instructions if necessary to ensure single +stepping precision over all code related keywords. An example +of this is in termination of a list of nested @code{IF} statements +where multiple @code{END} keywords are mapped onto a sequence of +@code{nop} instructions. + +@item -fm2-lower-case +render keywords in error messages using lower case. + +@item -fmakelist +this option is only applicable when linking a program module. The +compiler will generate a @file{modulename.lst} file which contains a +list indicating the initialisation order of all modules which are to +be linked. The actual link does not occur. The GNU Modula-2 linker +scans all @code{IMPORT}s, generates a list of dependencies and +produces an ordered list for initialisation. It will probably get the +order wrong if your project has cyclic dependencies, but the +@file{.lst} file is plain text and can be modified if required. Once +the @file{.lst} file is created it can be used by the compiler to link +your project via the @samp{-fuselist} option. It has no effect if the +@samp{-c} option is present. + +@item fno-pthread +do not automatically link against the pthread library. This option is +likely useful if gm2 is configured as a cross compiler targetting +embedded systems. By default GNU Modula-2 uses the GCC pthread +libraries to implement coroutines (see the SYSTEM implementation +module). + +@item -fuselist +providing @samp{gm2} has been told to link the program module this +option uses the file @file{modulename.lst} for the initialisation +order of modules. + +@item -fcpp +preprocess the source with @samp{cpp -lang-asm -traditional-cpp} +For further details about these options see @xref{Invocation, , ,cpp}. +If @samp{-fcpp} is supplied then all definition modules and +implementation modules which are parsed will be preprocessed by +@samp{cpp}. + +@item -fiso +turn on ISO standard features. Currently this enables the ISO +@code{SYSTEM} module and alters the default library search path so +that the ISO libraries are searched before the PIM libraries. It also +effects the behaviour of @code{DIV} and @code{MOD} operators. +See @xref{Dialect, , ,gm2}. + +@item -fpim +turn on PIM standard features. Currently this enables the PIM +@code{SYSTEM} module and determines which identifiers are pervasive +(declared in the base module). If no other @samp{-fpim[234]} switch is +used then division and modulus operators behave as defined in PIM4. +See @xref{Dialect, , ,gm2}. + +@item -fpim2 +turn on PIM-2 standard features. Currently this removes @code{SIZE} +from being a pervasive identifier (declared in the base module). It +places @code{SIZE} in the @code{SYSTEM} module. It also effects the +behaviour of @code{DIV} and @code{MOD} operators. +See @xref{Dialect, , ,gm2}. + +@item -fpim3 +turn on PIM-3 standard features. Currently this only effects the +behaviour of @code{DIV} and @code{MOD} operators. +See @xref{Dialect, , ,gm2}. + +@item -fpim4 +turn on PIM-4 standard features. Currently this only effects the +behaviour of @code{DIV} and @code{MOD} operators. +See @xref{Dialect, , ,gm2}. + +@item -fpositive-mod-floor-div +forces the @code{DIV} and @code{MOD} operators to behave as defined by PIM4. +All modulus results are positive and the results from the division are +rounded to the floor. +See @xref{Dialect, , ,gm2}. + +@item -flibs= +modifies the default library search path. The libraries supplied are: +m2pim, m2iso, m2min, m2log and m2cor. These map onto the +Programming in Modula-2 base libraries, ISO standard libraries, minimal +library support, Logitech compatible library and Programming in +Modula-2 with coroutines. +Multiple libraries can be specified and are comma separated with precidence +going to the first in the list. It is not necessary to use -flibs=m2pim or +-flibs=m2iso if you also specify -fpim, -fpim2, -fpim3, -fpim4 or +-fiso. Unless you are using -flibs=m2min you should include m2pim as +the they provide the base modules which all other dialects utilize. + +@item -fextended-opaque +allows opaque types to be implemented as any type. This is a GNU +Modula-2 extension and it requires that the implementation module +defining the opaque type is available so that it can be resolved when +compiling the module which imports the opaque type. + +@item -fsources +displays the path to the source of each module. This option +can be used at compile time to check the correct definition module +is being used. + +@item -fmodules +displays the path to each modules object file. This option +can only be invoked with the @code{-c} option. +It is used to see the location of objects when linking occurs. + +@item -fdef= +recognise the specified suffix as a definition module filename. +The default implmentation and module filename suffix is @file{.def}. +If this option is used GNU Modula-2 will still fall back to this +default if a requested definition module is not found. + +@item -fmod= +recognise the specified suffix as implementation and module filenames. +The default implmentation and module filename suffix is @file{.mod}. +If this option is used GNU Modula-2 will still fall back to this +default if it needs to read an implmentation module and the specified +suffixed filename does not exist. + +@item -fxcode +issues all errors and warnings in the @file{Xcode} format. + +@item -fonlylink +only link the modula-2 application, do not compile the program module +beforehand. + +@item -funbounded-by-reference +enable optimization of unbounded parameters by attempting to pass non +@code{VAR} unbounded parameters by reference. This optimization +avoids the implicit copy inside the callee procedure. GNU Modula-2 +will only allow unbounded parameters to be passed by reference if, +inside the callee procedure, they are not written to, no address is +calculated on the array and it is not passed as a @code{VAR} +parameter. Note that it is possible to write code to break this +optimization, therefore this option should be used carefully. +For example it would be possible to take the address of an array, pass +the address and the array to a procedure, read from the array in +the procedure and write to the location using the address parameter. + +Due to the dangerous nature of this option it is not enabled +when the -O option is specified. + +@item -Wverbose-unbounded +inform the user which non @code{VAR} unbounded parameters will be +passed by reference. This only produces output if the option +@samp{-funbounded-by-reference} is also supplied on the command line. + +@item -Wstudents +checks for bad programming style. This option is aimed at new users of +Modula-2 in that it checks for situations which might cause confusion +and thus mistakes. It checks whether variables of the same name are +declared in different scopes and whether variables look like keywords. +Experienced users might find this option too aggressive. + +@item -Wpedantic +forces the compiler to reject nested @code{WITH} statements +referencing the same record type. Does not allow multiple imports of +the same item from a module. It also checks that: procedure variables +are written to before being read; variables are not only written to +but read from; variables are declared and used. If the compiler +encounters a variable being read before written it will terminate with +a message. It will check that @code{FOR} loop indices are not used +outside the end of this loop without being reset. + +@item -Wpedantic-param-names +procedure parameter names are checked in the definition module +against their implementation module counterpart. This is not +necessary in ISO or PIM versions of Modula-2, but it can be +extremely useful, as long as code is intentionally +written in this way. + +@item -Wpedantic-cast +warns if the ISO system function is used and if the size of +the variable is different from that of the type. This is legal +in ISO Modula-2, however it can be dangerous. Some users may prefer +to use @code{VAL} instead in these situations and use @code{CAST} +exclusively for changes in type on objects which have the same size. + +@item -Wunused-variable +warns if a variable has been declared and it not used. + +@item -Wunused-parameter +warns if a parameter has been declared and it not used. + +@item -Wall +turn on all Modula-2 warnings. + +@end table + +@c man end + +@node Environment variables, Elementary data types, Compiler options, Using +@section GNU Modula-2 related environment variables + +@c man begin ENVIRONMENT gm2 + +This section descibes the environment variables used by GNU Modula-2 and +how they can be used to switch between releases of the compiler. Other +environment variables can be set to modify the default library path. +Initially we will consider environment variables most likely used by +the end user. These two environment variables are @code{GM2IPATH} +and @code{GM2OPATH}. + +For example suppose a compile and link on the command line looks like +this: + +@example +$ gm2 -g -c -I. -I../project -I../project/unix foo.mod +$ gm2 -fonlylink -g -I. -I../project -I../project/unix \ + -fobject-path=../project/obj -Iobject-path=../project/unix/obj -I. foo.mod +@end example + +they can be simplified by utilising two environment variables to do +exactly the same compile and link. + +@example +$ export GM2IPATH=../project:../project/unix +$ export GM2OPATH=../project/obj:../project/unix/obj +$ gm2 -g -I. foo.mod +@end example + +It is important to note that the two environment variables +@code{GM2IPATH} and @code{GM2OPATH} have a lower priority than any +@code{-I} or @code{-fobject-path=} command line option. The search +order for compiling and linking is: command line switches followed by +environment variable paths followed by default runtime libraries or +Modula-2 dialect libraries. If in doubt include the @code{-v} option +to see the search path used between the compiler subcomponents. + +Lastly there is the @code{GM2_ROOT} environment variable which +determines where the compiler subcomponents reside in the +filesystem. This environment variable overrides the compiler time +configure option @code{--prefix=}. For example suppose the compiler +was built to reside in @file{/usr/local} and the system administrator +decided to move the entire compiler tree to +@file{/architecture/i386/usr}. Once the tree is moved then a system +wide environment variable (@code{GM2_ROOT}) could be set to: + +@example +$ export GM2_ROOT=/architecture/i386/usr +@end example + +The system administrator needs to ensure that the front end binary +@file{gm2} can be seen by the users path. At that point a user can +invoke @code{gm2 -g -c -I. hello.mod} from the command line and all +subcomponents will be picked up from @file{/architecture/i386/usr}. +This allows users to try out different GNU Modula-2 releases and also +allows system administrators to install compiler binaries at different +locations to where they were initially configured to reside. + +The environment variable @code{GM2_ROOT} has no effect if either the +@code{LIBRARY_PATH} or @code{COMPILE_PATH} is set. The last two +environment variables are used by @code{gcc}. However if by mistake +@code{GM2_ROOT} and either @code{LIBRARY_PATH} or @code{COMPILE_PATH} +is set then an error message is issued. + +@c man end + +@node Elementary data types, Standard procedures, Environment variables, Using +@section Elementary data types + +This section describes the elementary data types supported by GNU +Modula-2. It also describes the relationship between these data types +and the equivalent C data types. + +The following data types are supported: @code{INTEGER}, +@code{LONGINT}, @code{SHORTINT}, @code{CARDINAL}, @code{LONGCARD}, +@code{SHORTCARD}, @code{BOOLEAN}, @code{REAL}, @code{LONGREAL}, +@code{SHORTREAL}, @code{COMPLEX}, @code{LONGCOMPLEX}, +@code{SHORTCOMPLEX} and @code{CHAR}. + +An equivalence table is given below: + +@example +GNU Modula-2 GNU C +====================================== +INTEGER int +LONGINT long long int +SHORTINT short int +CARDINAL unsigned int +LONGCARD long long unsigned int +SHORTCARD short unsigned int +BOOLEAN int +REAL double +LONGREAL long double +SHORTREAL float +CHAR char +SHORTCOMPLEX complex float +COMPLEX complex double +LONGCOMPLEX complex long double +@end example + +Note that GNU Modula-2 also supports fixed sized data types which are +exported from the @code{SYSTEM} module. +@xref{The PIM system module, , ,gm2}. +@xref{The ISO system module, , ,gm2}. + +@node Standard procedures, Dialect, Elementary data types, Using +@section Permanently accessible base procedures. + +This section describes the procedures and functions which are +always visible. + +@subsection Standard procedures and functions common to PIM and ISO + +The following procedures are implemented and conform with Programming +in Modula-2 and ISO Modula-2: @code{NEW}, @code{DISPOSE}, @code{INC}, +@code{DEC}, @code{INCL}, @code{EXCL} and @code{HALT}. The standard +functions are: @code{ABS}, @code{CAP}, @code{CHR}, @code{FLOAT}, +@code{HIGH}, @code{LFLOAT}, @code{LTRUNC}, @code{MIN}, @code{MAX}, +@code{ODD}, @code{SFLOAT}, @code{STRUNC} @code{TRUNC} and +@code{VAL}. All these functions and procedures (except @code{HALT}, +@code{NEW}, @code{DISPOSE} and, under non constant conditions, +@code{LENGTH}) generate in-line code for efficiency. + +@example + +(* + ABS - returns the positive value of, i. +*) + +@findex ABS +PROCEDURE ABS (i: ) : ; + +@end example + +@example + +(* + CAP - returns the capital of character, ch, providing + ch lies within the range 'a'..'z'. Otherwise, ch, + is returned unaltered. +*) + +@findex CAP +PROCEDURE CAP (ch: CHAR) : CHAR ; + +@end example + +@example + +(* + CHR - converts a value of a into a CHAR. + CHR(x) is shorthand for VAL(CHAR, x). +*) + +@findex CHR +PROCEDURE CHR (x: ) : CHAR ; + +@end example + +@example + +(* + DISPOSE - the procedure DISPOSE is replaced by: + DEALLOCATE(p, TSIZE(p^)) ; + The user is expected to import the procedure DEALLOCATE + (normally found in the module, Storage.) + + In: a variable p: of any pointer type which has been + initialized by a call to NEW. + Out: the area of memory + holding p^ is returned to the system. + Note that the underlying procedure DEALLOCATE + procedure in module Storage will assign p to NIL. +*) + +@findex DISPOSE +PROCEDURE DISPOSE (VAR p:) ; +@end example + +@example + +(* + DEC - can either take one or two parameters. If supplied + with one parameter then on the completion of the call to + DEC, v will have its predecessor value. If two + parameters are supplied then the value, v, will have its + n'th predecessor. For these reasons the value of n + must be >=0. +*) + +@findex DEC +PROCEDURE DEC (VAR v: ; [n: = 1]) ; +@end example + +@example + +(* + EXCL - excludes bit element, e, from a set type, s. +*) + +@findex EXCL +PROCEDURE EXCL (VAR s: ; e: ) ; +@end example + +@example + +(* + FLOAT - will return a REAL number whose value is the same as, o. +*) + +@findex FLOAT +PROCEDURE FLOAT (o: ) : REAL ; +@end example + +@example + +(* + FLOATS - will return a SHORTREAL number whose value is the same as, o. +*) + +@findex FLOATS +PROCEDURE FLOATS (o: ) : REAL ; +@end example + +@example + +(* + FLOATL - will return a LONGREAL number whose value is the same as, o. +*) + +@findex FLOATL +PROCEDURE FLOATL (o: ) : REAL ; +@end example + +@example + +(* + HALT - will call the HALT procedure inside the module M2RTS. + Users can replace M2RTS. +*) + +@findex HALT +PROCEDURE HALT ; +@end example + +@example + +(* + HIGH - returns the last accessible index of an parameter declared as + ARRAY OF CHAR. Thus + + PROCEDURE foo (a: ARRAY OF CHAR) ; + VAR + c: CARDINAL ; + BEGIN + c := HIGH(a) + END foo ; + + BEGIN + foo('hello') + END + + will cause the local variable, c, to contain the value 4 +*) + +@findex HIGH +PROCEDURE HIGH (a: ARRAY OF CHAR) : CARDINAL ; +@end example + +@example + +(* + INC - can either take one or two parameters. If supplied + with one parameter then on the completion of the call to + INC, v will have its successor value. If two + parameters are supplied then the value, v, will have its + n'th successor. For these reasons the value of n + must be >=0. +*) + +@findex INC +PROCEDURE INC (VAR v: ; [n: = 1]) ; +@end example + +@example + +(* + INCL - includes bit element, e, to a set type, s. +*) + +@findex INCL +PROCEDURE INCL (VAR s: ; e: ) ; +@end example + +@example + +(* + LFLOAT - will return a LONGREAL number whose value is the same as, o. +*) + +@findex LFLOAT +PROCEDURE LFLOAT (o: ) : LONGREAL ; +@end example + +@example + +(* + LTRUNC - will return a LONG number whose value is the same as, o. + PIM2, PIM3 and ISO Modula-2 will return a LONGCARD + whereas PIM4 returns LONGINT. +*) + +@findex LTRUNC +PROCEDURE LTRUNC (o: ) : LONG ; +@end example + +@example + +(* + MIN - returns the lowest legal value of an ordinal type. +*) + +@findex MIN +PROCEDURE MIN (t: ) : ; + +@end example + +@example + +(* + MAX - returns the largest legal value of an ordinal type. +*) + +@findex MAX +PROCEDURE MAX (t: ) : ; + +@end example + +@example + +(* + NEW - the procedure NEW is replaced by: + ALLOCATE(p, TSIZE(p^)) ; + The user is expected to import the procedure ALLOCATE + (normally found in the module, Storage.) + + In: a variable p: of any pointer type. + Out: variable, p, is set to some allocated memory + which is large enough to hold all the contents of p^. +*) + +@findex NEW +PROCEDURE NEW (VAR p:) ; +@end example + +@example + +(* + ODD - returns TRUE if the value is not divisible by 2. +*) + +@findex ODD +PROCEDURE ODD (x: ) : BOOLEAN ; + +@end example + +@example + +(* + SFLOAT - will return a SHORTREAL number whose value is the same as, o. +*) + +@findex SFLOAT +PROCEDURE SFLOAT (o: ) : SHORTREAL ; +@end example + +@example + +(* + STRUNC - will return a SHORT number whose value is the same as, o. + PIM2, PIM3 and ISO Modula-2 will return a SHORTCARD + whereas PIM4 returns SHORTINT. +*) + +@findex STRUNC +PROCEDURE STRUNC (o: ) : SHORT ; +@end example + +@example + +(* + TRUNC - will return a number whose value is the same as, o. + PIM2, PIM3 and ISO Modula-2 will return a CARDINAL + whereas PIM4 returns INTEGER. +*) + +@findex TRUNC +PROCEDURE TRUNC (o: ) : ; +@end example + +@example + +(* + TRUNCS - will return a number whose value is the same as, o. + PIM2, PIM3 and ISO Modula-2 will return a SHORTCARD + whereas PIM4 returns SHORTINT. +*) + +@findex TRUNCS +PROCEDURE TRUNCS (o: ) : ; +@end example + +@example + +(* + TRUNCL - will return a number whose value is the same as, o. + PIM2, PIM3 and ISO Modula-2 will return a LONGCARD + whereas PIM4 returns LONGINT. +*) + +@findex TRUNCL +PROCEDURE TRUNCL (o: ) : ; +@end example + +@example + +(* + VAL - converts data, i, of to + and returns this value. + No range checking is performed during this conversion. +*) + +@findex VAL +PROCEDURE VAL (, + i: ) : ; + +@end example + +@subsection ISO specific standard procedures and functions + +The standard function @code{LENGTH} is specific to ISO Modula-2 and +is defined as: + +@example + +(* + IM - returns the imaginary component of a complex type. + The return value will the same type as the imaginary field + within the complex type. +*) + +@findex IM +PROCEDURE IM (c: ) : ; +@end example + +@example + +(* + INT - returns an INTEGER value which has the same value as, v. + This function is equivalent to: VAL(INTEGER, v). +*) + +@findex INT +PROCEDURE INT (v: ) : INTEGER ; +@end example + +@example + +(* + LENGTH - returns the length of string, a. +*) + +@findex LENGTH +PROCEDURE LENGTH (a: ARRAY OF CHAR) : CARDINAL ; +@end example + +This function is evaluated at compile time, providing that string +@code{a} is a constant. If @code{a} cannot be evaluated then a call is +made to @code{M2RTS.Length}. + +@example + +(* + ODD - returns a BOOLEAN indicating whether the whole number + value, v, is odd. +*) + +@findex ODD +PROCEDURE ODD (v: ) : BOOLEAN ; +@end example + +@example + +(* + RE - returns the real component of a complex type. + The return value will the same type as the real field + within the complex type. +*) + +@findex RE +PROCEDURE RE (c: ) : ; +@end example + +@node Dialect, Exceptions, Standard procedures, Using +@section GNU Modula-2 supported dialects + +This section describes the dialects understood by GNU Modula-2. +It also describes the differences between the dialects and +any command line switches which determine dialect behaviour. + +The GNU Modula-2 compiler is compliant with four dialects of Modula-2. +The language as defined in 'Programming in Modula-2' 2nd Edition, +Springer Verlag, 1982, 1983 by Niklaus Wirth (PIM2), 'Programming in +Modula-2', 3rd Corrected Edition, Springer Verlag, 1985 (PIM3) and +'Programming in Modula-2', 4th Edition, Springer Verlag, 1988 (PIM4) +@uref{http://freepages.modula2.org/report4/modula-2.html} and the ISO +Modula-2 language as defined in ISO/IEC Information technology - +programming languages - part 1: Modula-2 Language, ISO/IEC 10514-1 +(1996) (ISO). + +The command line switches @samp{-fpim2}, @samp{-fpim3}, +@samp{-fpim4} and @samp{-fiso} can be used to force mutually +exclusive features. However by default the compiler will not +agressively fail if a non mutually exclusive feature is used +from another dialect. For example it is possible to specify +@samp{-fpim2} and still utilise @samp{DEFINITION} @samp{MODULES} +which have no export list. + +Some dialect differences will force a compile time error, for example +in PIM2 the user must @code{IMPORT} @code{SIZE} from the module +@code{SYSTEM}, whereas in PIM3 and PIM4 @code{SIZE} is a pervasive +function. Thus compiling PIM4 source code with the @samp{-fpim2} +switch will cause a compile time error. This can be fixed quickly +with an additional @code{IMPORT} or alternatively by compiling with +the @samp{-fpim4} switch. + +However there are some very important differences between the dialects +which are mutually exclusive and therefore it is vital that users +choose the dialects with care when these language features are used. + +@subsection Integer division, remainder and modulus + +The most dangerous set of mutually exclusive features found in the +four dialects supported by GNU Modula-2 are the @code{INTEGER} +division, remainder and modulus arithmetic operators. It is important +to note that the same source code can be compiled to give different +runtime results depending upon these switches! The reference manual +for the various dialects of Modula-2 are quite clear about this +behaviour and sadly there are three distinct definitions. + +The table below illustrates the problem when a negative operand is +used. + +@example + Pim2/3 Pim4 ISO + ----------- ----------- ---------------------- +lval rval DIV MOD DIV MOD DIV MOD / REM + 31 10 3 1 3 1 3 1 3 1 +-31 10 -3 -1 -4 9 -4 9 -3 -1 + 31 -10 -3 1 -3 1 Exception -3 1 +-31 -10 3 -1 4 9 Exception 3 -1 +@end example + +See also P24 of PIM2, P27 of PIM3, P29 of PIM4 and P201 of the ISO +Standard. At present all dialect division, remainder and modulus are +implemented as above, apart from the exception calling in the ISO +dialect. Instead of exception handling the results are the same as the +PIM4 dialect. This is a temporary implementation situation. + +@node Exceptions, Semantic checking, Dialect, Using +@section Exception implementation + +This section describes how exceptions are implemented in GNU Modula-2 +and how command line switches affect their behaviour. The option +@samp{-fsoft-check-all} enables all software checking of nil +dereferences, division by zero etc. Additional code is produced to +check these conditions and exception handlers are invoked if the +conditions prevail. + +Without @samp{-fsoft-check-all} these exceptions will be caught by +hardware (assuming the hardware support exists) and a signal handler +is invoked. The signal handler will in turn @code{THROW} an exception +which will be caught by the appropriate Modula-2 handler. However the +action of throwing an exception from within a signal handler is +implementation defined (according to the C++ documentation). For +example on the x86_64 architecture this works whereas on the i686 +architecture it does not. Therefore to ensure portability it is +recommended to use @samp{-fsoft-check-all}. + +@footnote{@samp{-fsoft-check-all} can be effectively combined with +@samp{-O2} to semantically analyse source code for possible runtime +errors at compile time.} + +@node Semantic checking, Extensions, Exceptions, Using +@section How to detect runtime problems at compile time + +Consider the following program: + +@example +MODULE assignvalue ; (*!m2iso+gm2*) + + +PROCEDURE bad () : INTEGER ; +VAR + i: INTEGER ; +BEGIN + i := -1 ; + RETURN i +END bad ; + + +VAR + foo: CARDINAL ; +BEGIN + (* the m2rte plugin will detect this as an error, post optimization. *) + foo := bad () +END assignvalue. +@end example + +here we see that the programmer has not seen that the return value +from @samp{bad} will cause an overflow to @samp{foo}. If we compile +the code with the following options: + +@example +$ gm2 -g -fsoft-check-all -O2 -c assignvalue.mod +assignvalue.mod:16:0:inevitable that this error will occur at runtime, assignment will result in an overflow +@end example + +The gm2 semantic plugin is automatically run and will generate a +warning message for every exception call which is known as reachable. +It is highly advised to run the optimizer (@samp{-O2} or @samp{-O3}) +with @samp{-fsoft-check-all} so that the compiler is able to run the +optimizer and perform variable and flow analysis before the semantic +plugin is invoked. + +@node Extensions, Type compatibility, Semantic checking, Using +@section GNU Modula-2 language extensions + +This section introduces the GNU Modula-2 language extensions. +The GNU Modula-2 compiler allows abstract data types to be any type, +not just restricted to a pointer type providing the +@samp{-fextended-opaque} option is supplied +@xref{Compiler options, , ,gm2}. + +Declarations can be made in any order, whether they are +types, constants, procedures, nested modules or variables. +@c (see @xref{Passes, , ,}.) + +GNU Modula-2 also allows programmers to interface to @code{C} and +assembly language. + +GNU Modula-2 provides support for the special tokens @code{__LINE__}, +@code{__FILE__}, @code{__FUNCTION__} and @code{__DATE__}. Support for +these tokens will occur even if the @samp{-fcpp} option is not +supplied. A table of these identifiers and their data type and values +is given below: + +@example +Scope GNU Modula-2 token Data type and example value + +anywhere __LINE__ Constant Literal compatible + with CARDINAL, INTEGER and WORD. + Example 1234 + +anywhere __FILE__ Constant string compatible + with parameter ARRAY OF CHAR or + an ARRAY whose SIZE is >= string + length. Example + "hello.mod" + +procedure __FUNCTION__ Constant string compatible + with parameter ARRAY OF CHAR or + an ARRAY whose SIZE is >= string + length. Example + "calc" + +module __FUNCTION__ Example + "module hello initialization" + +anywhere __DATE__ Constant string compatible + with parameter ARRAY OF CHAR or + an ARRAY whose SIZE is >= string + length. Example + "Thu Apr 29 10:07:16 BST 2004" + +anywhere __COLUMN__ Gives a contant literal number + determining the left hand column + where the first _ appears in + __COLUMN__. The left most column + is 1. + +@end example + +The preprocessor @samp{cpp} can be invoked via the @samp{-fcpp} +command line option. This in turn invokes @samp{cpp} with the +following arguments @samp{-traditional -lang-asm}. These options +preserve comments and all quotations. @samp{gm2} treats a @samp{#} +character in the first column as a preprocessor directive. + +For example here is a module which calls @code{FatalError} +via the macro @code{ERROR}. + +@example +MODULE cpp ; + +FROM SYSTEM IMPORT ADR, SIZE ; +FROM libc IMPORT exit, printf, malloc ; + +PROCEDURE FatalError (a, file: ARRAY OF CHAR; + line: CARDINAL; + func: ARRAY OF CHAR) ; +BEGIN + printf("%s:%d:fatal error, %s, in %s\n", + ADR(file), line, ADR(a), ADR(func)) ; + exit(1) +END FatalError ; + +#define ERROR(X) FatalError(X, __FILE__, __LINE__, __FUNCTION__) + +VAR + pc: POINTER TO CARDINAL; +BEGIN + pc := malloc(SIZE(CARDINAL)) ; + IF pc=NIL + THEN + ERROR('out of memory') + END +END cpp. +@end example + +Another use for the C preprocessor in Modula-2 might be to turn on +debugging code. For example the library module +@file{FormatStrings.mod} uses procedures from @file{DynamicStrings.mod} +and to track down memory leaks it was useful to track the source file +and line where each string was created. Here is a section of +@file{FormatStrings.mod} which shows how the debugging code was +enabled and disabled by adding @code{-fcpp} to the command line. + +@example +FROM DynamicStrings IMPORT String, InitString, InitStringChar, Mark, + ConCat, Slice, Index, char, + Assign, Length, Mult, Dup, ConCatChar, + PushAllocation, PopAllocationExemption, + InitStringDB, InitStringCharStarDB, + InitStringCharDB, MultDB, DupDB, SliceDB ; + +(* +#define InitString(X) InitStringDB(X, __FILE__, __LINE__) +#define InitStringCharStar(X) InitStringCharStarDB(X, __FILE__, __LINE__) +#define InitStringChar(X) InitStringCharDB(X, __FILE__, __LINE__) +#define Mult(X,Y) MultDB(X, Y, __FILE__, __LINE__) +#define Dup(X) DupDB(X, __FILE__, __LINE__) +#define Slice(X,Y,Z) SliceDB(X, Y, Z, __FILE__, __LINE__) +*) + +PROCEDURE doDSdbEnter ; +BEGIN + PushAllocation +END doDSdbEnter ; + +PROCEDURE doDSdbExit (s: String) ; +BEGIN + s := PopAllocationExemption(TRUE, s) +END doDSdbExit ; + +PROCEDURE DSdbEnter ; +BEGIN +END DSdbEnter ; + +PROCEDURE DSdbExit (s: String) ; +BEGIN +END DSdbExit ; + +(* +#define DBsbEnter doDBsbEnter +#define DBsbExit doDBsbExit +*) + +PROCEDURE Sprintf1 (s: String; w: ARRAY OF BYTE) : String ; +BEGIN + DSdbEnter ; + s := FormatString(HandleEscape(s), w) ; + DSdbExit(s) ; + RETURN( s ) +END Sprintf1 ; +@end example + +It is worth noting that the overhead of this code once @code{-fcpp} is +not present and -O2 is used will be zero since the local empty +procedures @code{DSdbEnter} and @code{DSdbExit} will be thrown away by +the optimization passes of the GCC backend. + +@subsection Optional procedure parameter + +GNU Modula-2 allows the last parameter to a procedure or function +parameter to be optional. For example in the ISO library +@file{COROUTINES.def} the procedure @code{NEWCOROUTINE} is defined as +having an optional fifth argument (@code{initProtection}) which, if +absent, is automatically replaced by @code{NIL}. + +@example +@findex NEWCOROUTINE +PROCEDURE NEWCOROUTINE (procBody: PROC; workspace: SYSTEM.ADDRESS; + size: CARDINAL; VAR cr: COROUTINE; + [initProtection: PROTECTION = NIL]); + + (* Creates a new coroutine whose body is given by procBody, + and returns the identity of the coroutine in cr. + workspace is a pointer to the work space allocated to + the coroutine; size specifies the size of this workspace + in terms of SYSTEM.LOC. + + The optional fifth argument may contain a single parameter + which specifies the initial protection level of the coroutine. + *) +@end example + +The implementation module @file{COROUTINES.mod} implements this +procedure using the following syntax: + +@example +PROCEDURE NEWCOROUTINE (procBody: PROC; workspace: SYSTEM.ADDRESS; + size: CARDINAL; VAR cr: COROUTINE; + [initProtection: PROTECTION]); +BEGIN + +END NEWCOROUTINE ; +@end example + +Note that it is illegal for this declaration to contain an initialiser +value for @code{initProtection}. However it is necessary to surround +this parameter with the brackets @code{[} and @code{]}. This serves to +remind the programmer that the last parameter was declared as optional +in the definition module. + +Local procedures can be declared to have an optional final parameter +in which case the initializer is mandatory in the implementation or +program module. + +GNU Modula-2 also provides additional fixed sized data types which +are all exported from the @code{SYSTEM} module. +@xref{The PIM system module, , ,gm2}. +@xref{The ISO system module, , ,gm2}. + +@node Type compatibility, Unbounded by reference, Extensions, Using +@section Type compatibility + +This section discuss the issues surrounding assignment, expression +and parameter compatibility, their effect of the additional +fixed sized datatypes and also their effect of runtime checking. +The data types supported by the compiler are: + +@example +GNU Modula-2 scope switches +============================================= +INTEGER pervasive +LONGINT pervasive +SHORTINT pervasive +CARDINAL pervasive +LONGCARD pervasive +SHORTCARD pervasive +BOOLEAN pervasive +BITSET pervasive +REAL pervasive +LONGREAL pervasive +SHORTREAL pervasive +CHAR pervasive +SHORTCOMPLEX pervasive +COMPLEX pervasive +LONGCOMPLEX pervasive + +LOC SYSTEM -fiso +BYTE SYSTEM +WORD SYSTEM +ADDRESS SYSTEM + +The following extensions are supported for +most architectures (please check SYSTEM.def). +============================================= +INTEGER8 SYSTEM +INTEGER16 SYSTEM +INTEGER32 SYSTEM +INTEGER64 SYSTEM +CARDINAL8 SYSTEM +CARDINAL16 SYSTEM +CARDINAL32 SYSTEM +CARDINAL64 SYSTEM +BITSET8 SYSTEM +BITSET16 SYSTEM +BITSET32 SYSTEM +WORD16 SYSTEM +WORD32 SYSTEM +WORD64 SYSTEM +REAL32 SYSTEM +REAL64 SYSTEM +REAL96 SYSTEM +REAL128 SYSTEM +COMPLEX32 SYSTEM +COMPLEX64 SYSTEM +COMPLEX96 SYSTEM +COMPLEX128 SYSTEM +@end example + +The Modula-2 language categorises compatibility between entities of +possibly differing types into three subcomponents: expressions, +assignments, and parameters. Parameter compatibility is further +divided into two sections for pass by reference and pass by value +compatibility. + +For more detail on the Modula-2 type compatibility see the Modula-2 +ISO standard BS ISO/IEC 10514-1:1996 page 121-125. For detail on the +PIM type compatibility see Programming in Modula-2 Edition 4 page 29, +(Elementary Data Types). + +@subsection Expression compatibility + +Modula-2 restricts the types of expressions to the same type. +Expression compatibility is a symmetric relation. + +For example two sub expressions of @code{INTEGER} and @code{CARDINAL} +are not expression compatible +(@uref{http://freepages.modula2.org/report4/modula-2.html} and ISO +Modula-2). + +In GNU Modula-2 this rule is also extended across all fixed sized data +types (imported from SYSTEM). + +@subsection Assignment compatibility + +This section discusses the assignment issues surrounding assignment +compatibility of elementary types (@code{INTEGER}, @code{CARDINAL}, +@code{REAL} and @code{CHAR} for example). The information here is +found in more detail in the Modula-2 ISO standard BS ISO/IEC +10514-1:1996 page 122. + +Assignment compatibility exists between the same sized elementary +types. + +Same type family of different sizes are +also compatible as long as the @code{MAX(}type@code{)} and +@code{MIN(}type@code{)} is known. So for example this includes the +@code{INTEGER} family, @code{CARDINAL} family and the @code{REAL} +family. + +The reason for this is that when the assignment is performed +the compiler will check to see that the expression (on the right of +the @code{:=}) lies within the range of the designator type (on the +left hand side of the @code{:=}). Thus these ordinal types can be +assignment compatible. However it does mean that @code{WORD32} is not +compatible with @code{WORD16} as @code{WORD32} does not have a minimum +or maximum value and therefore cannot be checked. The compiler does +not know which of the two bytes from @code{WORD32} should be copied +into @code{WORD16} and which two should be ignored. Currently the +types @code{BITSET8}, @code{BITSET16} and @code{BITSET32} are +assignment incompatible. However this restriction maybe lifted when +further runtime checking is achieved. + +Modula-2 does allow @code{INTEGER} to be assignment compatible with +@code{WORD} as they are the same size. Likewise GNU Modula-2 allows +@code{INTEGER16} to be compatible with @code{WORD16} and the same for +the other fixed sized types and their sized equivalent in either +@code{WORD}n, @code{BYTE} or @code{LOC} types. However it prohibits +assignment between @code{WORD} and @code{WORD32} even though on many +systems these sizes will be the same. The reasoning behind this rule +is that the extended fixed sized types are meant to be used by +applications requiring fixed sized data types and it is more portable +to forbid the bluring of the boundaries between fixed sized and +machine dependant sized types. + +Intemediate code runtime checking is always generated by the front +end. However this intemediate code is only translated into actual +code if the appropriate command line switches are specified. This +allows the compiler to perform limited range checking at compile time. +In the future it will allow the extensive GCC optimisations to +propagate constant values through to the range checks which if they +are found to exceed the type range will result in a compile time +error message. + +@subsection Parameter compatibility + +Parameter compatibility is divided into two areas, pass by value and +pass by reference (@code{VAR}). In the case of pass by value the +rules are exactly the same as assignment. However in the second case, +pass by reference, the actual parameter and formal parameter must be +the same size and family. Furthermore @code{INTEGER} and +@code{CARDINAL}s are not treated as compatible in the pass by +reference case. + +The types @code{BYTE}, @code{LOC}, @code{WORD} and @code{WORD}n +derivitives are assignment and parameter compatible with any data type +of the same size. + +@node Unbounded by reference, Building a shared library, Type compatibility, Using +@section Unbounded by reference + +This section documents a GNU Modula-2 compiler switch which implements +a language optimisation surrounding the implementation of unbounded +arrays. In GNU Modula-2 the unbounded array is implemented by +utilising an internal structure @code{struct @{dataType *address, +unsigned int high@}}. So given the Modula-2 procedure declaration: + +@example +PROCEDURE foo (VAR a: ARRAY OF dataType) ; +BEGIN + IF a[2]= (* etc *) +END foo ; +@end example + +it is translated into GCC @code{tree}s, which can be represented +in their C form thus: + +@example +void foo (struct @{dataType *address, unsigned int high@} a) +@{ + if (a.address[2] == /* etc */ +@} +@end example + +Whereas if the procedure @code{foo} was declared as: + +@example +PROCEDURE foo (a: ARRAY OF dataType) ; +BEGIN + IF a[2]= (* etc *) +END foo ; +@end example + +then it is implemented by being translated into the following +GCC @code{tree}s, which can be represented in their C form thus: + +@example +void foo (struct @{dataType *address, unsigned int high@} a) +@{ + dataType *copyContents = (dataType *)alloca (a.high+1); + memcpy(copyContents, a.address, a.high+1); + a.address = copyContents; + + if (a.address[2] == /* etc */ +@} +@end example + +This implementation works, but it makes a copy of each non VAR +unbounded array when a procedure is entered. If the unbounded array +is not changed during procedure @code{foo} then this implementation +will be very inefficient. In effect Modula-2 lacks the @code{REF} +keyword of Ada. Consequently the programmer maybe tempted to +sacrifice semantic clarity for greater efficiency by declaring the +parameter using the @code{VAR} keyword in place of @code{REF}. + +The @code{-funbounded-by-reference} switch instructs the compiler to +check and see if the programmer is modifying the content of any +unbounded array. If it is modified then a copy will be made upon +entry into the procedure. Conversely if the content is only read and +never modified then this non @code{VAR} unbounded array is a candidate +for being passed by reference. It is only a candidate as it is still +possible that passing this parameter by reference could alter the +meaning of the source code. For example consider the following case: + +@example +PROCEDURE StrConCat (VAR a: ARRAY OF CHAR; b, c: ARRAY OF CHAR) ; +BEGIN + (* code which performs string a := b + c *) +END StrConCat ; + +PROCEDURE foo ; +VAR + a: ARRAY [0..3] OF CHAR ; +BEGIN + a := 'q' ; + StrConCat(a, a, a) +END foo ; +@end example + +In the code above we see that the same parameter, @code{a}, is being +passed three times to @code{StrConCat}. Clearly even though parameters +@code{b} and @code{c} are never modified it would be incorrect to +implement them as pass by reference. Therefore the compiler checks to +see if any non @code{VAR} parameter is type compatible with any +@code{VAR} parameter and if so it generates runtime procedure entry +checks to determine whether the contents of parameters @code{b} or +@code{c} matches the contents of @code{a}. If a match is detected +then a copy is made and the @code{address} in the unbounded +@code{struct}ure is modified. + +The compiler will check the address range of each candidate against +the address range of any @code{VAR} parameter, providing they are type +compatible. For example consider: + +@example +PROCEDURE foo (a: ARRAY OF BYTE; VAR f: REAL) ; +BEGIN + f := 3.14 ; + IF a[0]=BYTE(0) + THEN + (* etc *) + END +END foo ; + +PROCEDURE bar ; +BEGIN + r := 2.0 ; + foo(r, r) +END bar ; +@end example + +Here we see that although parameter, @code{a}, is a candidate for the +passing by reference, it would be incorrect to use this +transformation. Thus the compiler detects that parameters, @code{a} +and @code{f} are type compatible and will produce runtime checking +code to test whether the address range of their respective contents +intersect. + +@node Building a shared library, Interface for Python, Unbounded by reference, Using +@section Building a shared library + +This section describes building a tiny shared library implemented in +Modula-2 and built with @file{libtool}. Suppose a project consists of +two definition modules and two implementation modules and a program +module @file{a.def}, @file{a.mod}, @file{b.def}, @file{b.mod} and +@file{c.mod}. The first step is to compile the modules using position +independent code. This can be achieved by the following three +commands: + +@example +libtool --tag=CC --mode=compile gm2 -g -c a.mod -o a.lo +libtool --tag=CC --mode=compile gm2 -g -c b.mod -o b.lo +libtool --tag=CC --mode=compile gm2 -g -c c.mod -o c.lo +@end example + +The second step is to generate the shared library initialization and +finalization routines. We can do this by asking gm2 to generate a +list of dependant modules and then use this to generate the scaffold. +We also must compile the scaffold. + +@example +gm2 -c -g -fmakelist c.mod +gm2 -c -g -fmakeinit -fshared c.mod +libtool --tag=CC --mode=compile g++ -g -c _m2_c.cpp -o _m2_c.lo +@end example + +The third step is to link all these @file{.lo} files. + +@example +libtool --mode=link gcc -g _m2_c.lo a.lo b.lo c.lo \ + -L$(prefix)/lib64 \ + -rpath `pwd` -lgm2 -lstdc++ -lm -o libabc.la +@end example + +At this point the shared library @file{libabc.so} will have been +created inside the directory @file{.libs}. + +@node Interface for Python, Producing a Python module, Building a shared library, Using +@section How to produce swig interface files + +This section describes how your Modula-2 implementation modules can be +called from Python (and other scripting languages such as TCL and +Perl). GNU Modula-2 can be instructed to create a swig interface when +it is compiling an implementation module. Swig then uses the +interface file to generate all the necessary wrapping to that the +desired scripting language may access your implementation module. + +Here is an example of how you might call upon the services of the +Modula-2 library module @code{NumberIO} from Python. +This example can be found in the directory +@file{gm2/examples/swig/full-strlib} and can be run using the commands: + +@example +$ cd build-@value{version-GCC}/gcc/gm2/examples/swig/full-strlib +$ make numberio +@end example + +The build commands can be run individually from the command line via: + +@example +export yoursrc=@samp{path to the sources} +export yourprefix=@samp{path to where the compiler is installed} +export yourpython=@samp{your python version} +gm2 -I$(yoursrc) -c -g -fswig $(yoursrc)/../../../gm2-libs/NumberIO.mod +gm2 -I$(yoursrc) -c -g -fmakelist $(yoursrc)/../../../gm2-libs/NumberIO.mod +gm2 -I$(yoursrc) -c -g -fmakeinit -fshared $(yoursrc)/../../../gm2-libs/NumberIO.mod +swig -c++ -python NumberIO.i + +libtool --mode=compile g++ -g -c -I$(yoursrc) _m2_NumberIO.cpp -o _m2_NumberIO.lo +libtool --tag=CC --mode=compile gm2 -g -c -I$(yoursrc)../../../gm2-libs $(yoursrc)/../../../gm2-libs/NumberIO.mod -o NumberIO.lo +libtool --tag=CC --mode=compile g++ -g -c NumberIO_wrap.cxx -I/usr/include/python$(yourpython) -o NumberIO_wrap.lo + +libtool --mode=link gcc -g _m2_NumberIO.lo NumberIO_wrap.lo \ + -L$(yourprefix)/lib64 \ + -rpath `pwd` -lgm2 -lstdc++ -lm -o libNumberIO.la +cp .libs/libNumberIO.so _NumberIO.so +@end example + +The first four commands, generate the swig interface file +@file{NumberIO.i} and python wrap files @file{NumberIO_wrap.cxx} and +@file{NumberIO.py}. The next three @file{libtool} commnads compile +the C++ and Modula-2 source code into @file{.lo} objects. The last +@file{libtool} command links all the @file{.lo} files into a +@file{.la} file and includes all shared library dependencies. + +Now it is possible to run the following Python script +(called @file{testnum.py}): + +@example +import NumberIO + +print "1234 x 2 =", NumberIO.NumberIO_StrToInt("1234")*2 +@end example + +like this: + +@example +$ python testnum.py +1234 x 2 = 2468 +@end example + +@subsection Limitations of automatic generated of Swig files + +This section discusses the limitations of automatically generating +swig files. From the previous example we see that the module +@code{NumberIO} had a swig interface file @file{NumberIO.i} +automatically generated by the compiler. If we consider three of the +procedure definitions in @file{NumberIO.def} we can see the +success and limitations of the automatic interface generation. + +@example +PROCEDURE StrToHex (a: ARRAY OF CHAR; VAR x: CARDINAL) ; +PROCEDURE StrToInt (a: ARRAY OF CHAR; VAR x: INTEGER) ; +PROCEDURE ReadInt (VAR x: CARDINAL) ; +@end example + +Below are the swig interface prototypes: + +@example +extern void NumberIO_StrToHex (char *_m2_address_a, + int _m2_high_a, unsigned int *OUTPUT); +/* parameters: x is known to be an OUTPUT */ +extern void NumberIO_StrToInt (char *_m2_address_a, + int _m2_high_a, int *OUTPUT); +/* parameters: x is guessed to be an OUTPUT */ +extern void NumberIO_ReadInt (int *x); +/* parameters: x is unknown */ +@end example + +In the case of @code{StrToHex} it can be seen that the compiler +detects that the last parameter is an output. It explicitly tells +swig this by using the parameter name @code{OUTPUT} and in the +following comment it informs the user that it knows this to be an +output parameter. In the second procedure @code{StrToInt} it marks +the final parameter as an output, but it tells the user that this is +only a guess. Finally in @code{ReadInt} it informs the user that +it does not know whether the parameter, @code{x}, is an output, input +or an inout parameter. + +The compiler decides whether to mark a parameter as either: +@code{INPUT}, @code{OUTPUT} or @code{INOUT} if it is read before +written or visa versa in the first basic block. At this point +it will write output that the parameter is known. If it is not +read or written in the first basic block then subsequent basic blocks +are searched and the result is commented as a guess. Finally if +no read or write occurs then the parameter is commented as unknown. +However, clearly it is possible to fool this mechanism. Nevertheless +automatic generation of implementation module into swig interface files +was thought sufficiently useful despite these limitations. + +In conclusion it would be wise to check all parameters in any +automatically generated swig interface file. Furthermore you can +force the automatic mechanism to generate correct interface files by +reading or writing to the @code{VAR} parameter in the first basic +block of a procedure. + +@node Producing a Python module, Interface to C, Interface for Python, Using +@section How to produce a Python module + +This section descibes how it is possible to produce a Python module +from your Modula-2 code. There are a number of advantages to this +approach, it ensures your code reaches a wider audience, maybe it is +easier to initialize your application in Python, maybe users of your +code are familiar with Python and can use it to configure your +application. + +The examples given here can be found in the source tree +@file{gcc-@var{version-GCC}/gcc/gm2/examples/gravity/}. The example used +here is a pedagogical two dimensional gravity next event simulation. +The Python module needs to have a clear API, this also needs to be +placed in a single definition module. In the gravity simulation +example this is found in the file: +@file{gcc-@var{version-GCC}/gcc/gm2/examples/gravity/twoDsim.def}. +Furthermore the API should only use fundamental pervasive data types +and strings. Below is @file{twoDsim.def}: + +@example +DEFINITION MODULE twoDsim ; + +EXPORT UNQUALIFIED gravity, box, poly3, poly5, poly6, mass, + fix, circle, pivot, velocity, accel, fps, + replayRate, simulateFor, addDebugging ; +(* + gravity - turn on gravity at: g m^2 +*) + +PROCEDURE gravity (g: REAL) ; + + +(* + box - place a box in the world at (x0,y0),(x0+i,y0+j) +*) + +PROCEDURE box (x0, y0, i, j: REAL) : CARDINAL ; + + +(* + poly3 - place a triangle in the world at: + (x0,y0),(x1,y1),(x2,y2) +*) + +PROCEDURE poly3 (x0, y0, x1, y1, x2, y2: REAL) : CARDINAL ; + + +(* + poly5 - place a pentagon in the world at: + (x0,y0),(x1,y1),(x2,y2),(x3,y3),(x4,y4) +*) + +PROCEDURE poly5 (x0, y0, x1, y1, x2, y2, x3, y3, x4, y4: REAL) : CARDINAL ; + + +(* + poly6 - place a hexagon in the world at: + (x0,y0),(x1,y1),(x2,y2),(x3,y3),(x4,y4),(x5,y5) +*) + +PROCEDURE poly6 (x0, y0, x1, y1, x2, y2, x3, y3, x4, y4, x5, y5: REAL) : CARDINAL ; + + +(* + mass - specify the mass of an object and return the, id. +*) + +PROCEDURE mass (id: CARDINAL; m: REAL) : CARDINAL ; + + +(* + fix - fix the object to the world. +*) + +PROCEDURE fix (id: CARDINAL) : CARDINAL ; + + +(* + circle - adds a circle to the world. Center + defined by: x0, y0 radius, r. +*) + +PROCEDURE circle (x0, y0, r: REAL) : CARDINAL ; + + +(* + pivot - pivot an object at position, (x0,y0). +*) + +PROCEDURE pivot (x0, y0: REAL; id1: CARDINAL) : CARDINAL ; + + +(* + velocity - give an object, id, a velocity, vx, vy. +*) + +PROCEDURE velocity (id: CARDINAL; vx, vy: REAL) : CARDINAL ; + + +(* + accel - give an object, id, an acceleration, ax, ay. +*) + +PROCEDURE accel (id: CARDINAL; ax, ay: REAL) : CARDINAL ; + + +(* + fps - set frames per second. +*) + +PROCEDURE fps (f: REAL) ; + + +(* + replayRate - set frames per second during replay. +*) + +PROCEDURE replayRate (f: REAL) ; + + +(* + simulateFor - render for, t, seconds. +*) + +PROCEDURE simulateFor (t: REAL) ; + + +(* + addDebugging - add a debugging event at time, t, which colours objects, + a, and, b, blue. +*) + +PROCEDURE addDebugging (t: REAL; a, b: CARDINAL) ; + + +END twoDsim. +@end example + +By using the keyword @code{UNQUALIFIED} we ensure that the +compiler will provide externally accessible functions +@code{gravity}, @code{box}, @code{poly3}, @code{poly5}, @code{poly6}, +@code{mass}, @code{fix}, @code{circle}, @code{pivot}, @code{velocity}, +@code{accel}, @code{fps}, @code{replayRate}, @code{simulateFor}, +@code{addDebugging} rather than name mangled alternatives. +Hence in our Python application we could write: + +@example +#!/usr/bin/python + +from twoDsim import * + +b = box(0.0, 0.0, 1.0, 1.0) +b = fix(b) +c1 = circle(0.7, 0.7, 0.05) +c1 = mass(c1, 0.01) +c2 = circle(0.7, 0.1, 0.05) +c2 = mass(c2, 0.01) +c2 = fix(c2) +gravity(-9.81) +fps(24.0*4.0) +replayRate(24.0) +print "creating frames" +try: + simulateFor(1.0) + print "all done" +except: + print "exception raised" +@end example + +which accesses the various functions defined and implemented by the +module @code{twoDsim}. The Modula-2 source code is compiled via: + +@example +$ gm2 -g -fiso -c -fswig twoDsim.mod +$ gm2 -g -fiso -c -fmakelist twoDsim.mod +$ gm2 -g -fiso -c -fmakeinit twoDsim.mod +@end example + +Notice that the last command both compiled and produced a swig +interface file @file{swig.i}. We now use @code{swig} and @code{gcc} +to produce and compile the interface wrappers: + +@example +$ libtool --mode=compile g++ -g -c _m2_twoDsim.cpp -o _m2_twoDsim.lo +$ swig -c++ -python twoDsim.i +$ libtool --mode=compile g++ -c -fPIC twoDsim_wrap.cxx -I/usr/include/python@value{version-python} -o twoDsim_wrap.lo +$ libtool --mode=compile gm2 -g -fPIC -fiso -c deviceGnuPic.mod +$ libtool --mode=compile gm2 -g -fPIC -fiso -c roots.mod +$ libtool --mode=compile gm2 -g -fPIC -fiso -c -fswig twoDsim.mod -o twoDsim.lo +@end example + +Finally the application is linked into a shared library: + +@example +$ libtool --mode=link gcc -g _m2_twoDsim.lo twoDsim_wrap.lo \ + roots.lo deviceGnuPic.lo \ + -L$(yourprefix)/lib64 \ + -rpath `pwd` -lgm2 -lstdc++ -lm -o libtwoDsim.la +cp .libs/libtwoDsim.so _twoDsim.so +@end example + +The library name must start with a @code{_} to comply with the Python +naming scheme. + +@node Interface to C, Assembly language, Producing a Python module, Using +@section Interfacing GNU Modula-2 to C + +The GNU Modula-2 compiler tries to use the C calling convention +wherever possible however some parameters have no C equivalent and +thus a language specific method is used. For example unbounded arrays +are passed as a @code{struct @{void *address, unsigned int high@}} and +the contents of these arrays are copied by callee functions when they +are declared as non @code{VAR} parameters. The @code{VAR} equivalent +unbounded array parameters need no copy, but still use the +@code{struct} representation. + +The recommended method of interfacing GNU Modula-2 to C is by telling +the definition module that the implementation is in the C language. +This is achieved by using the tokens @code{DEFINITION MODULE FOR "C"}. +Here is an example which can be found in the source tree +@file{gcc-@var{version-GCC}/gcc/gm2/examples/callingC/libprintf.def} + +@example +DEFINITION MODULE FOR "C" libprintf ; + +EXPORT UNQUALIFIED printf ; + +PROCEDURE printf (a: ARRAY OF CHAR; ...) : [ INTEGER ] ; + +END libprintf. +@end example + +the @code{UNQUALIFIED} keyword in the definition module informs +GNU Modula-2 not to prefix the module name to exported references +in the object file. + +The @code{printf} declaration states that the first parameter +semantically matches @code{ARRAY OF CHAR} but since the module is for +the C language it will be mapped onto @code{char *}. The token +@code{...} indicates a variable number of arguments (varargs) and all +parameters passed here are mapped onto their C equivalents. Arrays and +constant strings are passed as pointers. Lastly the @code{[ INTEGER ]} +states that the caller can ignore the function return result if desired. + +The hello world program can be rewritten as: + +@example +MODULE hello ; + +FROM libprintf IMPORT printf ; + +BEGIN + printf("hello world\n") +END hello. +@end example + +and it can be compiled by: + +@samp{gm2 -g -I. hello.mod -lc} + +In reality the @samp{-lc} is redundant as libc is always included in the +linking process. It is shown here to emphasize that the C library or +object file containing @code{printf} must be present. + +If a procedure function is declared using varargs then some parameter +values are converted. The table below summarises the default conversions +and default types used. + +@example +Actual Parameter | Default conversion | Type of actual + | | value passed +=============================================================== +123 | none | long long int +"hello world" | none | const char * +a: ARRAY OF CHAR | ADR(a) | char * +a: ARRAY [0..5] OF CHAR| ADR(a) | char * +3.14 | none | long double +@end example + +If you wish to pass @code{int} values then you should explicitly +convert the constants using one of the conversion mechanisms. +For example: @code{INTEGER(10)} or @code{VAL(INTEGER, 10)} or +@code{CAST(INTEGER, 10)}. + +@node Assembly language, Alignment, Interface to C, Using +@section Interface to assembly language + +The interface for GNU Modula-2 to assembly language is almost +identical to GNU C. The only alterations are that the keywords +@code{asm} and @code{volatile} are in capitals, following the Modula-2 +convention. + +A simple, but highly non optimal, example is given below. Here we want +to add the two @code{CARDINAL}s @code{foo} and @code{bar} together and +return the result. The target processor is assumed to be executing +the x86_64 instruction set. + +@example +PROCEDURE Example (foo, bar: CARDINAL) : CARDINAL ; +VAR + myout: CARDINAL ; +BEGIN + ASM VOLATILE ("movq %1,%%rax; addq %2,%%rax; movq %%rax,%0" + : "=rm" (myout) (* outputs *) + : "rm" (foo), "rm" (bar) (* inputs *) + : "rax") ; (* we trash *) + RETURN( myout ) +END Example ; +@end example + +For a full description of this interface we refer the reader to the GNU C manual. + +@xref{Extended Asm, ,Extensions to the C Language Family,gcc}. + +The same example can be written using the newer extensions of naming +the operands rather than using numbered arguments. + +@example +PROCEDURE Example (foo, bar: CARDINAL) : CARDINAL ; +VAR + myout: CARDINAL ; +BEGIN + ASM VOLATILE ("movq %[left],%%rax; addq %[right],%%rax; movq %%rax,%[output]" + : [output] "=rm" (myout) (* outputs *) + : [left] "rm" (foo), [right] "rm" (bar) (* inputs *) + : "rax") ; (* we trash *) + RETURN( myout ) +END Example ; +@end example + +Both examples generate exactly the same code. It is worth noting that +the specifier ``rm'' indicates that the operand can be either a +register or memory. Of course you must choose an instruction which +can take either, but this allows the compiler to take make more +efficient choices depending upon the optimization level given to the +compiler. + +@node Alignment, Packed, Assembly language, Using +@section Data type alignment + +GNU Modula-2 allows you to specify alignment for types and variables. +The syntax for alignment is to use the ISO pragma directives @code{<*} +@code{bytealignment (} expression @code{)} and @code{*>}. These directives +can be used after type and variable declarations. + +The ebnf of the alignment production is: + +@example +Alignment := [ ByteAlignment ] =: +ByteAlignment := '<*' AttributeExpression '*>' =: +AlignmentExpression := "(" ConstExpression ")" =: +@end example + +The @code{Alignment} ebnf statement may be used during contruction of +types, records, record fields, arrays, pointers and variables. Below +is an example of aligning a type so that the variable @code{bar} is +aligned on a 1024 address. + +@example +MODULE align ; + +TYPE + foo = INTEGER <* bytealignment(1024) *> ; + +VAR + z : INTEGER ; + bar: foo ; +BEGIN +END align. +@end example + +The next example aligns a variable on a 1024 byte boundary. + +@example +MODULE align2 ; + +VAR + x : CHAR ; + z : ARRAY [0..255] OF INTEGER <* bytealignment(1024) *> ; +BEGIN +END align2. +@end example + +Here the example aligns a pointer on a 1024 byte boundary. + +@example +MODULE align4 ; + +FROM SYSTEM IMPORT ADR ; +FROM libc IMPORT exit ; + +VAR + x : CHAR ; + z : POINTER TO INTEGER <* bytealignment(1024) *> ; +BEGIN + IF ADR(z) MOD 1024=0 + THEN + exit(0) + ELSE + exit(1) + END +END align4. +@end example + +In example @code{align5} record field @code{y} is aligned on a 1024 +byte boundary. + +@example +MODULE align5 ; + +FROM SYSTEM IMPORT ADR ; +FROM libc IMPORT exit ; + +TYPE + rec = RECORD + x: CHAR ; + y: CHAR <* bytealignment(1024) *> ; + END ; +VAR + r: rec ; +BEGIN + IF ADR(r.y) MOD 1024=0 + THEN + exit(0) + ELSE + exit(1) + END +END align5. +@end example + +In the example below module @code{align6} declares @code{foo} as an +array of 256 @code{INTEGER}s. The array @code{foo} is aligned on a +1024 byte boundary. + +@example +MODULE align6 ; + +FROM SYSTEM IMPORT ADR ; +FROM libc IMPORT exit ; + +TYPE + foo = ARRAY [0..255] OF INTEGER <* bytealignment(1024) *> ; + +VAR + x : CHAR ; + z : foo ; +BEGIN + IF ADR(z) MOD 1024=0 + THEN + exit(0) + ELSE + exit(1) + END +END align6. +@end example + +@node Packed, Built-ins, Alignment, Using +@section Packing data types + +The pragma @code{<* bytealignment(0) *>} can be used to specify that +the fields within a @code{RECORD} are to be packed. Currently this +only applies to fields which are declared as subranges, ordinal types +and enumerated types. Here is an example of how two subranges might +be packed into a byte. + +@example +TYPE + bits3c = [0..7] ; + bits3i = [-4..3] ; + + byte = RECORD + <* bytealignment(0) *> + x: bits3c ; + <* bitsunused(2) *> + y: bits3i ; + END ; +@end example + +Notice that the user has specified that in between fields @code{x} and +@code{y} there are two bits unused. + +Now the user wishes to create a record with byte numbers zero and one +occupied and then an @code{INTEGER32} field which is four byte +aligned. In this case byte numbers two and three will be unused. The +pragma @code{bytealignment} can be issued at the start of the record +indicating the default alignment for the whole record and this can be +overridden by individual fields if necessary. + +@example + rec = RECORD + <* bytealignment (1) *> ; + a, b: byte ; + x: INTEGER32 <* bytealignment(4) *> ; + END ; +@end example + +In the following example the user has specified that a record has two +fields @code{p} and @code{q} but that there are three bytes unused between +these fields. + +@example + header = RECORD + <* bytealignment(1) *> + p: byte ; + <* bytesunused(3) *> + q: byte ; + END ; +@end example + +The pragma @code{<* bytesunused(x) *>} can only be used if the current +field is on a byte boundary. There is also a @code{SYSTEM} pseudo +procedure function @code{TBITSIZE(T)} which returns the minimum number of +bits necessary to represent type @code{T}. + +Another example of packing record bit fields is given below: + +@example +MODULE align21 ; + +FROM libc IMPORT exit ; + +TYPE + colour = (red, blue, green, purple, white, black) ; + + soc = PACKEDSET OF colour ; + + rec = RECORD + <* bytealignment(0) *> + x: soc ; + y: [-1..1] ; + END ; + +VAR + r: rec ; + v: CARDINAL ; +BEGIN + v := SIZE(r) ; + IF SIZE(r)#1 + THEN + exit(1) + END ; + r.x := soc@{blue@} ; + IF r.x#soc@{blue@} + THEN + exit(2) + END +END align21. +@end example + +Here we see that the total size of this record is one byte and consists +of a six bit set type followed by a 2 bit integer subrange. + +@node Built-ins, The PIM system module, Packed, Using +@section Accessing GNU Modula-2 Built-ins + +This section describes the built-in constants and functions defined in +GNU Modula-2. The following compiler constants can be accessed using +the @code{__ATTRIBUTE__} @code{__BUILTIN__} keywords. These are not +part of the Modula-2 language and they may differ depending upon the +target architecture but they provide a method whereby common +libraries can interface to a different underlying architecture. + +The built-in constants are: @code{BITS_PER_UNIT}, @code{BITS_PER_WORD}, +@code{BITS_PER_CHAR} and @code{UNITS_PER_WORD}. They are integrated into +GNU Modula-2 by an extension to the @code{ConstFactor} rule: + +@example +ConstFactor := ConstQualidentOrSet | Number | ConstString | + "(" ConstExpression ")" | "NOT" ConstFactor | + ConstAttribute =: + +ConstAttribute := "__ATTRIBUTE__" "__BUILTIN__" "(" "(" Ident ")" ")" =: +@end example + +Here is an example taken from the ISO library @code{SYSTEM.def}: + +@example +CONST + BITSPERLOC = __ATTRIBUTE__ __BUILTIN__ ((BITS_PER_UNIT)) ; + LOCSPERWORD = __ATTRIBUTE__ __BUILTIN__ ((UNITS_PER_WORD)) ; +@end example + +Built-in functions are transparent to the end user. All built-in +functions are declared in @code{DEFINITION MODULE}s and are imported +as and when required. Built-in functions are declared in definition +modules by using the @code{__BUILTIN__} keyword. Here is a section of +the ISO library @code{LongMath.def} which demonstrates this feature. + +@example +PROCEDURE __BUILTIN__ sqrt (x: LONGREAL): LONGREAL; + (* Returns the square root of x *) +@end example + +This indicates that the function @code{sqrt} will be implemented using +the gcc built-in maths library. If gcc cannot utilise the built-in +function (for example if the programmer requested the address of +@code{sqrt}) then code is generated to call the alternative function +implemented in the @code{IMPLEMENTATION} @code{MODULE}. + +Sometimes a function exported from the @code{DEFINITION} @code{MODULE} +will have a different name from the built-in function within gcc. In +such cases the mapping between the GNU Modula-2 function name and the +gcc name is expressed using the keywords @code{__ATTRIBUTE__} +@code{__BUILTIN__} @code{((Ident))}. For example the function +@code{sqrt} in @code{LongMath.def} maps onto the gcc built-in function +@code{sqrtl} and this is expressed as: + +@example +PROCEDURE __ATTRIBUTE__ __BUILTIN__ ((sqrtl)) sqrt + (x: LONGREAL) : LONGREAL; + (* Returns the positive square root of x *) +@end example + +The following module @code{Builtins.def} enumerates the list of +built-in functions which can be accessed in GNU Modula-2. It also +serves to define the parameter and return value for each function: + +@include Builtins.texi + +Although this module exists and will result in the generation of +in-line code if optimization flags are passed to GNU Modula-2, users +are advised to utilize the same functions from more generic libraries. +The built-in mechanism will be applied to these generic +libraries where appropriate. Note for the mathematical routines to +be in-lined you need to specify the @samp{-ffast-math -O} options. + +@node The PIM system module, The ISO system module, Built-ins, Using +@section The PIM system module + +@include SYSTEM-pim.texi + +The different dialects of Modula-2 PIM-[234] and ISO Modula-2 declare +the function @code{SIZE} in different places. PIM-[34] and ISO +Modula-2 declare @code{SIZE} as a pervasive function (declared in the +base module). PIM-2 defined @code{SIZE} in the @code{SYSTEM} module +(as shown above). + +GNU Modula-2 allows users to specify the dialect of Modula-2 by using +the @code{-fiso} and @code{-fpim2} command line switches. + +The data types @code{CSIZE_T} and @code{CSSIZE_T} are also exported from +the @code{SYSTEM} module. The type @code{CSIZE_T} is unsigned and is +mapped onto the target C data type @code{size_t} whereas the type +@code{CSSIZE_T} is mapped onto the signed C data type @code{ssize_t}. + +It is anticipated that these should only be used to provide cross +platform definition modules for C libraries. + +There are also a variety of fixed sized @code{INTEGER} and +@code{CARDINAL} types. The variety of the fixed sized types will +depend upon the target architecture. + +@node The ISO system module, , The PIM system module, Using +@section The ISO system module + +@include SYSTEM-iso.texi + +The data types @code{CSIZE_T} and @code{CSSIZE_T} are also exported from +the @code{SYSTEM} module. The type @code{CSIZE_T} is unsigned and is +mapped onto the target C data type @code{size_t} whereas the type +@code{CSSIZE_T} is mapped onto the signed C data type @code{ssize_t}. + +It is anticipated that these should only be used to provide cross +platform definition modules for C libraries. + +There are also a variety of fixed sized @code{INTEGER} and +@code{CARDINAL} types. The variety of the fixed sized types will +depend upon the target architecture. + +@node Licence, Contributing, The ISO system module, Top +@section Licence of GNU Modula-2 + +GNU Modula-2 is free software, the compiler is held under the GPL v3 +@uref{http://www.gnu.org/licenses/gpl.txt}, +its libraries (pim, iso and Logitech compatible) are under the +GPL v3 with the GCC runtime library exception clause. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. + +More information on how these licences work is available +@uref{http://www.gnu.org/licenses/licenses.html} on the GNU web site. + +@include gpl_v3.texi + +@node Contributing, Internals, Licence, Top +@section Contributing to GNU Modula-2 + +Please do. But also please read the GNU Emacs info under + +@example +* Standards: (standards). GNU coding standards. +* Intellectual Property:: Keeping Free Software Free +* Reading Non-Free Code:: Referring to Proprietary Programs +* Contributions:: Accepting Contributions +@end example + +You might consider joining the GM2 Mailing list before you start +coding. The mailing list may be subscribed via a web interface +@uref{http://lists.nongnu.org/mailman/listinfo/gm2} or via email +@email{gm2-subscribe@@nongnu.org}. + +Many thanks and enjoy your coding! + +@node Internals, EBNF, Contributing, Top + +This section is still being written. +@c @include gm2-internals.texi + +@node EBNF, Libraries, Internals, Top +@chapter EBNF of GNU Modula-2 + +This chapter contains the EBNF of GNU Modula-2. This grammer currently +supports both PIM and ISO dialects. The rules here are automatically +extracted from the grammer files in GNU Modula-2 and serve to document +the syntax of the extensions described earlier and how they fit in +with the base language. + +Note that the first six productions are built into the lexical analysis +phase. + +@include gm2-ebnf.texi + +@node Libraries, Indices, EBNF, Top +@chapter PIM and ISO library definitions + +This chapter contains M2F, PIM and ISO libraries. + +@c Permission has been kindly granted by +@c the authors of the ULM libraries to include them with GNU +@c Modula-2. +@c These libraries (under the GNU GPL) were written at the +@c University of Ulm and were originally shipped with the ULM sparc +@c Modula-2 compiler. + +@include gm2-libs.texi + +@node Indices, , Libraries, Top +@section Indices + +@ifhtml +@menu +* Contents:: Section and subsections. +* Functions:: Function, constants, types, ebnf indices. +@end menu + +@node Contents, Functions, , +@section Section and subsections +@printindex cp + +@node Functions, , Contents, +@section Function, constants, types, ebnf indices. +@end ifhtml + +@printindex fn + +@summarycontents +@contents +@bye diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index 94b167a3ed3..96b0c6738af 100644 --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi @@ -1777,18 +1777,19 @@ their runtime libraries should be built. For a list of valid values for @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 @@ be built. This can be useful for debugging, or for compatibility with 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 @@ on a simulator as described at @uref{http://gcc.gnu.org/simtest-howto.html}. 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 --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index 16c6a3b8e99..faaadd1e4fc 100644 --- a/gcc/doc/sourcebuild.texi +++ b/gcc/doc/sourcebuild.texi @@ -52,6 +52,9 @@ including optimizers, support for different target architectures, language front ends, and testsuites. @xref{gcc Directory, , The @file{gcc} Subdirectory}, for details. +@item gm2tools +Support tools for Modula-2. + @item gnattools Support tools for GNAT. @@ -84,6 +87,9 @@ The GCC runtime library. @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 @@ The @file{gcc} directory contains the following subdirectories: @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 --git a/gcc/fortran/gfortranspec.c b/gcc/fortran/gfortranspec.c index 97db139deea..4c6045b9f06 100644 --- a/gcc/fortran/gfortranspec.c +++ b/gcc/fortran/gfortranspec.c @@ -447,4 +447,12 @@ lang_specific_pre_link (void) } /* Number of extra output files that lang_specific_pre_link may generate. */ -int lang_specific_extra_outfiles = 0; /* Not used for F77. */ +int lang_specific_extra_outfiles = 0; /* Not used for Fortran. */ + +/* lang_register_spec_functions register the Fortran associated spec + functions. */ + +void +lang_register_spec_functions (void) +{ +} diff --git a/gcc/gcc.c b/gcc/gcc.c index af286400a4a..360c8d5e150 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -334,6 +334,10 @@ static const char *cross_compile = "1"; 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 void set_spec (const char *, const char *, bool); 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 @@ proper position among the other output files. */ /* 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 @@ static const struct spec_function static_spec_functions[] = { 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_to_obstack (char *path, void *data) /* 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 @@ alloc_switch (void) /* 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 @@ set_source_date_epoch_envvar () 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 @@ driver_handle_option (struct gcc_options *opts, 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 @@ single_input_file_index () 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 "); + break; + case OPT_SPECIAL_ignore: + printf (" flag "); + break; + case OPT_SPECIAL_program_name: + printf (" flag "); + break; + case OPT_SPECIAL_input_file: + printf (" flag "); + 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'. */ @@ -6726,6 +6839,33 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part) 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; iname, 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; } @@ -8223,6 +8368,8 @@ driver::set_up_specs () const 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")) @@ -8955,7 +9102,8 @@ driver::maybe_run_linker (const char *argv0) const /* 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; @@ -9024,7 +9172,7 @@ driver::maybe_run_linker (const char *argv0) const /* If options said don't run linker, complain about input files to be given to the linker. */ - if (! linker_was_run && !seen_error ()) + if (! linker_was_run && !seen_error () && allow_linker) for (i = 0; (int) i < n_infiles; i++) if (explicit_link_files[i] && !(infiles[i].language && infiles[i].language[0] == '*')) diff --git a/gcc/gcc.h b/gcc/gcc.h index 244edbc26c6..217352fef73 100644 --- a/gcc/gcc.h +++ b/gcc/gcc.h @@ -73,9 +73,28 @@ struct spec_function 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 @@ driver_get_configure_time_options (void (*cb)(const char *option, void *user_data), void *user_data); +/* Default setting is true, but can be overridden by the language + front end to prohibit the linker from being invoked. */ +extern int allow_linker; + #endif /* ! GCC_GCC_H */ diff --git a/gcc/go/gospec.c b/gcc/go/gospec.c index cf8d0f2b60e..0292536d264 100644 --- a/gcc/go/gospec.c +++ b/gcc/go/gospec.c @@ -464,3 +464,9 @@ int lang_specific_pre_link (void) /* Not used for Go. */ /* Number of extra output files that lang_specific_pre_link may generate. */ int lang_specific_extra_outfiles = 0; /* Not used for Go. */ + +/* lang_register_spec_functions. Not used for Go. */ +void +lang_register_spec_functions (void) +{ +} diff --git a/gcc/hwint.h b/gcc/hwint.h index 0e895f86466..101be3dcdf2 100644 --- a/gcc/hwint.h +++ b/gcc/hwint.h @@ -257,11 +257,14 @@ exact_log2 (unsigned HOST_WIDE_INT x) (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 @@ zext_hwi (unsigned HOST_WIDE_INT src, unsigned int prec) } } +#ifdef __cplusplus /* Compute the absolute value of X. */ inline HOST_WIDE_INT @@ -374,5 +378,6 @@ mul_hwi (HOST_WIDE_INT a, HOST_WIDE_INT b, bool *overflow) return result; #endif } +#endif /* ! __cplusplus */ #endif /* ! GCC_HWINT_H */ diff --git a/gcc/jit/jit-spec.c b/gcc/jit/jit-spec.c index 2c0535d5de2..69507a9d89e 100644 --- a/gcc/jit/jit-spec.c +++ b/gcc/jit/jit-spec.c @@ -39,3 +39,9 @@ lang_specific_pre_link (void) /* Number of extra output files that lang_specific_pre_link may generate. */ int lang_specific_extra_outfiles = 0; /* Not used for jit. */ + +/* lang_register_spec_functions. Not used for jit. */ +void +lang_register_spec_functions (void) +{ +} diff --git a/gcc/m2/COPYING.FDL b/gcc/m2/COPYING.FDL new file mode 100644 index 00000000000..4a0fe1c8dee --- /dev/null +++ b/gcc/m2/COPYING.FDL @@ -0,0 +1,397 @@ + GNU Free Documentation License + Version 1.2, November 2002 + + + Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + +0. PREAMBLE + +The purpose of this License is to make a manual, textbook, or other +functional and useful document "free" in the sense of freedom: to +assure everyone the effective freedom to copy and redistribute it, +with or without modifying it, either commercially or noncommercially. +Secondarily, this License preserves for the author and publisher a way +to get credit for their work, while not being considered responsible +for modifications made by others. + +This License is a kind of "copyleft", which means that derivative +works of the document must themselves be free in the same sense. It +complements the GNU General Public License, which is a copyleft +license designed for free software. + +We have designed this License in order to use it for manuals for free +software, because free software needs free documentation: a free +program should come with manuals providing the same freedoms that the +software does. But this License is not limited to software manuals; +it can be used for any textual work, regardless of subject matter or +whether it is published as a printed book. We recommend this License +principally for works whose purpose is instruction or reference. + + +1. APPLICABILITY AND DEFINITIONS + +This License applies to any manual or other work, in any medium, that +contains a notice placed by the copyright holder saying it can be +distributed under the terms of this License. Such a notice grants a +world-wide, royalty-free license, unlimited in duration, to use that +work under the conditions stated herein. The "Document", below, +refers to any such manual or work. Any member of the public is a +licensee, and is addressed as "you". You accept the license if you +copy, modify or distribute the work in a way requiring permission +under copyright law. + +A "Modified Version" of the Document means any work containing the +Document or a portion of it, either copied verbatim, or with +modifications and/or translated into another language. + +A "Secondary Section" is a named appendix or a front-matter section of +the Document that deals exclusively with the relationship of the +publishers or authors of the Document to the Document's overall subject +(or to related matters) and contains nothing that could fall directly +within that overall subject. (Thus, if the Document is in part a +textbook of mathematics, a Secondary Section may not explain any +mathematics.) The relationship could be a matter of historical +connection with the subject or with related matters, or of legal, +commercial, philosophical, ethical or political position regarding +them. + +The "Invariant Sections" are certain Secondary Sections whose titles +are designated, as being those of Invariant Sections, in the notice +that says that the Document is released under this License. If a +section does not fit the above definition of Secondary then it is not +allowed to be designated as Invariant. The Document may contain zero +Invariant Sections. If the Document does not identify any Invariant +Sections then there are none. + +The "Cover Texts" are certain short passages of text that are listed, +as Front-Cover Texts or Back-Cover Texts, in the notice that says that +the Document is released under this License. A Front-Cover Text may +be at most 5 words, and a Back-Cover Text may be at most 25 words. + +A "Transparent" copy of the Document means a machine-readable copy, +represented in a format whose specification is available to the +general public, that is suitable for revising the document +straightforwardly with generic text editors or (for images composed of +pixels) generic paint programs or (for drawings) some widely available +drawing editor, and that is suitable for input to text formatters or +for automatic translation to a variety of formats suitable for input +to text formatters. A copy made in an otherwise Transparent file +format whose markup, or absence of markup, has been arranged to thwart +or discourage subsequent modification by readers is not Transparent. +An image format is not Transparent if used for any substantial amount +of text. A copy that is not "Transparent" is called "Opaque". + +Examples of suitable formats for Transparent copies include plain +ASCII without markup, Texinfo input format, LaTeX input format, SGML +or XML using a publicly available DTD, and standard-conforming simple +HTML, PostScript or PDF designed for human modification. Examples of +transparent image formats include PNG, XCF and JPG. Opaque formats +include proprietary formats that can be read and edited only by +proprietary word processors, SGML or XML for which the DTD and/or +processing tools are not generally available, and the +machine-generated HTML, PostScript or PDF produced by some word +processors for output purposes only. + +The "Title Page" means, for a printed book, the title page itself, +plus such following pages as are needed to hold, legibly, the material +this License requires to appear in the title page. For works in +formats which do not have any title page as such, "Title Page" means +the text near the most prominent appearance of the work's title, +preceding the beginning of the body of the text. + +A section "Entitled XYZ" means a named subunit of the Document whose +title either is precisely XYZ or contains XYZ in parentheses following +text that translates XYZ in another language. (Here XYZ stands for a +specific section name mentioned below, such as "Acknowledgements", +"Dedications", "Endorsements", or "History".) To "Preserve the Title" +of such a section when you modify the Document means that it remains a +section "Entitled XYZ" according to this definition. + +The Document may include Warranty Disclaimers next to the notice which +states that this License applies to the Document. These Warranty +Disclaimers are considered to be included by reference in this +License, but only as regards disclaiming warranties: any other +implication that these Warranty Disclaimers may have is void and has +no effect on the meaning of this License. + + +2. VERBATIM COPYING + +You may copy and distribute the Document in any medium, either +commercially or noncommercially, provided that this License, the +copyright notices, and the license notice saying this License applies +to the Document are reproduced in all copies, and that you add no other +conditions whatsoever to those of this License. You may not use +technical measures to obstruct or control the reading or further +copying of the copies you make or distribute. However, you may accept +compensation in exchange for copies. If you distribute a large enough +number of copies you must also follow the conditions in section 3. + +You may also lend copies, under the same conditions stated above, and +you may publicly display copies. + + +3. COPYING IN QUANTITY + +If you publish printed copies (or copies in media that commonly have +printed covers) of the Document, numbering more than 100, and the +Document's license notice requires Cover Texts, you must enclose the +copies in covers that carry, clearly and legibly, all these Cover +Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on +the back cover. Both covers must also clearly and legibly identify +you as the publisher of these copies. The front cover must present +the full title with all words of the title equally prominent and +visible. You may add other material on the covers in addition. +Copying with changes limited to the covers, as long as they preserve +the title of the Document and satisfy these conditions, can be treated +as verbatim copying in other respects. + +If the required texts for either cover are too voluminous to fit +legibly, you should put the first ones listed (as many as fit +reasonably) on the actual cover, and continue the rest onto adjacent +pages. + +If you publish or distribute Opaque copies of the Document numbering +more than 100, you must either include a machine-readable Transparent +copy along with each Opaque copy, or state in or with each Opaque copy +a computer-network location from which the general network-using +public has access to download using public-standard network protocols +a complete Transparent copy of the Document, free of added material. +If you use the latter option, you must take reasonably prudent steps, +when you begin distribution of Opaque copies in quantity, to ensure +that this Transparent copy will remain thus accessible at the stated +location until at least one year after the last time you distribute an +Opaque copy (directly or through your agents or retailers) of that +edition to the public. + +It is requested, but not required, that you contact the authors of the +Document well before redistributing any large number of copies, to give +them a chance to provide you with an updated version of the Document. + + +4. MODIFICATIONS + +You may copy and distribute a Modified Version of the Document under +the conditions of sections 2 and 3 above, provided that you release +the Modified Version under precisely this License, with the Modified +Version filling the role of the Document, thus licensing distribution +and modification of the Modified Version to whoever possesses a copy +of it. In addition, you must do these things in the Modified Version: + +A. Use in the Title Page (and on the covers, if any) a title distinct + from that of the Document, and from those of previous versions + (which should, if there were any, be listed in the History section + of the Document). You may use the same title as a previous version + if the original publisher of that version gives permission. +B. List on the Title Page, as authors, one or more persons or entities + responsible for authorship of the modifications in the Modified + Version, together with at least five of the principal authors of the + Document (all of its principal authors, if it has fewer than five), + unless they release you from this requirement. +C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. +D. Preserve all the copyright notices of the Document. +E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. +F. Include, immediately after the copyright notices, a license notice + giving the public permission to use the Modified Version under the + terms of this License, in the form shown in the Addendum below. +G. Preserve in that license notice the full lists of Invariant Sections + and required Cover Texts given in the Document's license notice. +H. Include an unaltered copy of this License. +I. Preserve the section Entitled "History", Preserve its Title, and add + to it an item stating at least the title, year, new authors, and + publisher of the Modified Version as given on the Title Page. If + there is no section Entitled "History" in the Document, create one + stating the title, year, authors, and publisher of the Document as + given on its Title Page, then add an item describing the Modified + Version as stated in the previous sentence. +J. Preserve the network location, if any, given in the Document for + public access to a Transparent copy of the Document, and likewise + the network locations given in the Document for previous versions + it was based on. These may be placed in the "History" section. + You may omit a network location for a work that was published at + least four years before the Document itself, or if the original + publisher of the version it refers to gives permission. +K. For any section Entitled "Acknowledgements" or "Dedications", + Preserve the Title of the section, and preserve in the section all + the substance and tone of each of the contributor acknowledgements + and/or dedications given therein. +L. Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers + or the equivalent are not considered part of the section titles. +M. Delete any section Entitled "Endorsements". Such a section + may not be included in the Modified Version. +N. Do not retitle any existing section to be Entitled "Endorsements" + or to conflict in title with any Invariant Section. +O. Preserve any Warranty Disclaimers. + +If the Modified Version includes new front-matter sections or +appendices that qualify as Secondary Sections and contain no material +copied from the Document, you may at your option designate some or all +of these sections as invariant. To do this, add their titles to the +list of Invariant Sections in the Modified Version's license notice. +These titles must be distinct from any other section titles. + +You may add a section Entitled "Endorsements", provided it contains +nothing but endorsements of your Modified Version by various +parties--for example, statements of peer review or that the text has +been approved by an organization as the authoritative definition of a +standard. + +You may add a passage of up to five words as a Front-Cover Text, and a +passage of up to 25 words as a Back-Cover Text, to the end of the list +of Cover Texts in the Modified Version. Only one passage of +Front-Cover Text and one of Back-Cover Text may be added by (or +through arrangements made by) any one entity. If the Document already +includes a cover text for the same cover, previously added by you or +by arrangement made by the same entity you are acting on behalf of, +you may not add another; but you may replace the old one, on explicit +permission from the previous publisher that added the old one. + +The author(s) and publisher(s) of the Document do not by this License +give permission to use their names for publicity for or to assert or +imply endorsement of any Modified Version. + + +5. COMBINING DOCUMENTS + +You may combine the Document with other documents released under this +License, under the terms defined in section 4 above for modified +versions, provided that you include in the combination all of the +Invariant Sections of all of the original documents, unmodified, and +list them all as Invariant Sections of your combined work in its +license notice, and that you preserve all their Warranty Disclaimers. + +The combined work need only contain one copy of this License, and +multiple identical Invariant Sections may be replaced with a single +copy. If there are multiple Invariant Sections with the same name but +different contents, make the title of each such section unique by +adding at the end of it, in parentheses, the name of the original +author or publisher of that section if known, or else a unique number. +Make the same adjustment to the section titles in the list of +Invariant Sections in the license notice of the combined work. + +In the combination, you must combine any sections Entitled "History" +in the various original documents, forming one section Entitled +"History"; likewise combine any sections Entitled "Acknowledgements", +and any sections Entitled "Dedications". You must delete all sections +Entitled "Endorsements". + + +6. COLLECTIONS OF DOCUMENTS + +You may make a collection consisting of the Document and other documents +released under this License, and replace the individual copies of this +License in the various documents with a single copy that is included in +the collection, provided that you follow the rules of this License for +verbatim copying of each of the documents in all other respects. + +You may extract a single document from such a collection, and distribute +it individually under this License, provided you insert a copy of this +License into the extracted document, and follow this License in all +other respects regarding verbatim copying of that document. + + +7. AGGREGATION WITH INDEPENDENT WORKS + +A compilation of the Document or its derivatives with other separate +and independent documents or works, in or on a volume of a storage or +distribution medium, is called an "aggregate" if the copyright +resulting from the compilation is not used to limit the legal rights +of the compilation's users beyond what the individual works permit. +When the Document is included in an aggregate, this License does not +apply to the other works in the aggregate which are not themselves +derivative works of the Document. + +If the Cover Text requirement of section 3 is applicable to these +copies of the Document, then if the Document is less than one half of +the entire aggregate, the Document's Cover Texts may be placed on +covers that bracket the Document within the aggregate, or the +electronic equivalent of covers if the Document is in electronic form. +Otherwise they must appear on printed covers that bracket the whole +aggregate. + + +8. TRANSLATION + +Translation is considered a kind of modification, so you may +distribute translations of the Document under the terms of section 4. +Replacing Invariant Sections with translations requires special +permission from their copyright holders, but you may include +translations of some or all Invariant Sections in addition to the +original versions of these Invariant Sections. You may include a +translation of this License, and all the license notices in the +Document, and any Warranty Disclaimers, provided that you also include +the original English version of this License and the original versions +of those notices and disclaimers. In case of a disagreement between +the translation and the original version of this License or a notice +or disclaimer, the original version will prevail. + +If a section in the Document is Entitled "Acknowledgements", +"Dedications", or "History", the requirement (section 4) to Preserve +its Title (section 1) will typically require changing the actual +title. + + +9. TERMINATION + +You may not copy, modify, sublicense, or distribute the Document except +as expressly provided for under this License. Any other attempt to +copy, modify, sublicense or distribute the Document is void, and will +automatically terminate your rights under this License. However, +parties who have received copies, or rights, from you under this +License will not have their licenses terminated so long as such +parties remain in full compliance. + + +10. FUTURE REVISIONS OF THIS LICENSE + +The Free Software Foundation may publish new, revised versions +of the GNU Free Documentation License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. See +http://www.gnu.org/copyleft/. + +Each version of the License is given a distinguishing version number. +If the Document specifies that a particular numbered version of this +License "or any later version" applies to it, you have the option of +following the terms and conditions either of that specified version or +of any later version that has been published (not as a draft) by the +Free Software Foundation. If the Document does not specify a version +number of this License, you may choose any version ever published (not +as a draft) by the Free Software Foundation. + + +ADDENDUM: How to use this License for your documents + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and +license notices just after the title page: + + Copyright (c) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + A copy of the license is included in the section entitled "GNU + Free Documentation License". + +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, +replace the "with...Texts." line with this: + + with the Invariant Sections being LIST THEIR TITLES, with the + Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. + +If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. + +If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, +to permit their use in free software. diff --git a/gcc/m2/COPYING.RUNTIME b/gcc/m2/COPYING.RUNTIME new file mode 100644 index 00000000000..e1b3c69c179 --- /dev/null +++ b/gcc/m2/COPYING.RUNTIME @@ -0,0 +1,73 @@ +GCC RUNTIME LIBRARY EXCEPTION + +Version 3.1, 31 March 2009 + +Copyright (C) 2009 Free Software Foundation, Inc. + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + +This GCC Runtime Library Exception ("Exception") is an additional +permission under section 7 of the GNU General Public License, version +3 ("GPLv3"). It applies to a given file (the "Runtime Library") that +bears a notice placed by the copyright holder of the file stating that +the file is governed by GPLv3 along with this Exception. + +When you use GCC to compile a program, GCC may combine portions of +certain GCC header files and runtime libraries with the compiled +program. The purpose of this Exception is to allow compilation of +non-GPL (including proprietary) programs to use, in this way, the +header files and runtime libraries covered by this Exception. + +0. Definitions. + +A file is an "Independent Module" if it either requires the Runtime +Library for execution after a Compilation Process, or makes use of an +interface provided by the Runtime Library, but is not otherwise based +on the Runtime Library. + +"GCC" means a version of the GNU Compiler Collection, with or without +modifications, governed by version 3 (or a specified later version) of +the GNU General Public License (GPL) with the option of using any +subsequent versions published by the FSF. + +"GPL-compatible Software" is software whose conditions of propagation, +modification and use would permit combination with GCC in accord with +the license of GCC. + +"Target Code" refers to output from any compiler for a real or virtual +target processor architecture, in executable form or suitable for +input to an assembler, loader, linker and/or execution +phase. Notwithstanding that, Target Code does not include data in any +format that is used as a compiler intermediate representation, or used +for producing a compiler intermediate representation. + +The "Compilation Process" transforms code entirely represented in +non-intermediate languages designed for human-written code, and/or in +Java Virtual Machine byte code, into Target Code. Thus, for example, +use of source code generators and preprocessors need not be considered +part of the Compilation Process, since the Compilation Process can be +understood as starting with the output of the generators or +preprocessors. + +A Compilation Process is "Eligible" if it is done using GCC, alone or +with other GPL-compatible software, or if it is done without using any +work based on GCC. For example, using non-GPL-compatible Software to +optimize any GCC intermediate representations would not qualify as an +Eligible Compilation Process. + +1. Grant of Additional Permission. + +You have permission to propagate a work of Target Code formed by +combining the Runtime Library with Independent Modules, even if such +propagation would otherwise violate the terms of GPLv3, provided that +all Target Code was generated by Eligible Compilation Processes. You +may then convey such a combination under terms of your choice, +consistent with the licensing of the Independent Modules. + +2. No Weakening of GCC Copyleft. + +The availability of this Exception does not imply any general +presumption that third-party software is unaffected by the copyleft +requirements of the license of GCC. + diff --git a/gcc/m2/COPYING3 b/gcc/m2/COPYING3 new file mode 100644 index 00000000000..10926e87f11 --- /dev/null +++ b/gcc/m2/COPYING3 @@ -0,0 +1,675 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. + diff --git a/gcc/m2/COPYING3.LIB b/gcc/m2/COPYING3.LIB new file mode 100644 index 00000000000..fc8a5de7edf --- /dev/null +++ b/gcc/m2/COPYING3.LIB @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/gcc/m2/ChangeLog b/gcc/m2/ChangeLog new file mode 100644 index 00000000000..1ba532f0ab5 --- /dev/null +++ b/gcc/m2/ChangeLog @@ -0,0 +1,975 @@ +2021-06-17 Gaius Mulley + + * Make-lang.in: removed gm2m from the tools to be installed. + * tools-src/makeSystem: write SYSTEM.o to /dev/null. + * patches/gcc/trunk/01-patches: (rebuilt). + * patches/gcc/trunk/02-patches: (rebuilt). Add objects + containing a date string into the list of objects to be ignored. + * Make-lang.in: added header dependancies to m2rte. + +2021-06-16 Gaius Mulley + + * patches/gcc/trunk/01-patches: (Rebuilt). Cast value + since on some hosts value is declared as a long long int. + * tools-src/makeSystem: remove SYSTEM.o after creating definition + module. + * Make-lang.in: rewritten m2.info rule. + * Make-lang.in: added $(M2LINK) as a dependancy to all link + rules. Added GCC header dependancies to object build rules. + +2021-06-15 Gaius Mulley + + * patches/gcc/trunk/01-patches: (Rebuilt). Disable libgm2 + by default and do not configure it unless Modula-2 was specified. + * patches/gcc/trunk/02-patches: (Rebuilt). Disable libgm2 + by default and do not configure it unless Modula-2 was specified. + * patches/gcc/trunk/08-patches: (Rebuilt). add libstdc++-v3 + as a dependant for gm2tools. + +2021-06-14 Gaius Mulley + + * Make-lang.in: corrected many include paths to pick up + gm2-libs-host.h. + * gm2-gcc/rtegraph.c: remove include use "mpfr.h" instead. + * gm2-ici/m2linemap.c: remove include use config.h system.h. + * gm2-libs-ch/Selective.c: remove system includes and use gcc + config.h system.h instead. + * gm2-libs-ch/SysExceptions.c: remove system includes and use gcc + config.h system.h instead. + * gm2-libs-ch/choosetemp.c: remove system includes and use gcc + config.h system.h instead. + * gm2-libs-ch/dtoa.c: remove system includes and use gcc + config.h system.h instead. + * gm2-libs-ch/errno.c: remove system includes and use gcc + config.h system.h instead. + * gm2-libs-ch/getopt.c: remove system includes and use gcc + config.h system.h instead. + * gm2-libs-ch/host.c: remove system includes and use gcc + config.h system.h instead. + * gm2-libs-ch/ldtoa.c: remove system includes and use gcc + config.h system.h instead. + * gm2-libs-ch/termios.c: remove system includes and use gcc + config.h system.h instead. + * gm2-libs-ch/tools.c: remove system includes and use gcc + config.h system.h instead. + * gm2-libs-ch/wrapc.c: remove system includes and use gcc + config.h system.h instead. + * gm2-libs-ch/xlibc.c: remove system includes and use gcc + config.h system.h instead. + * gm2-libs/gm2-libs-host.h.in: remove PACKAGE_BUGREPORT, + PACKAGE_NAME, PACKAGE_STRING, PACKAGE_TARNAME, PACKAGE_VERSION and + PACKAGE_URL. + * mc-boot-ch/GSelective.c: remove system includes and use gcc + config.h system.h instead. + * mc-boot-ch/GSysExceptions.c: remove system includes and use gcc + config.h system.h instead. + * mc-boot-ch/Gcbuiltin.c: remove system includes and use gcc + config.h system.h instead. + * mc-boot-ch/Gdtoa.c: remove system includes and use gcc + config.h system.h instead. + * mc-boot-ch/Gerrno.c: remove system includes and use gcc + config.h system.h instead. + * mc-boot-ch/Gldtoa.c: remove system includes and use gcc + config.h system.h instead. + * mc-boot-ch/Glibc.c: remove system includes and use gcc + config.h system.h instead. + * mc-boot-ch/Glibm.c: remove system includes and use gcc + config.h system.h instead. + * mc-boot-ch/Gmcrts.c: remove system includes and use gcc + config.h system.h instead. + * mc-boot-ch/Gpth.c: remove system includes and use gcc + config.h system.h instead. + * mc-boot-ch/Gtermios.c: remove system includes and use gcc + config.h system.h instead. + * mc-boot-ch/Gwrapc.c: remove system includes and use gcc + config.h system.h instead. + * mc-boot-ch/network.c: remove system includes and use gcc + config.h system.h instead. + * analyzer branch created. + * removed all analyzer patches and analyzer testsuite tests + on master for now. + +2021-06-12 Gaius Mulley + + * Make-lang.in: remove duplicate --gcc-config-system from + mc. Documentation rules now refer to gm2.texi contained in ../gcc. + * NEWS: (updated gm2 into the gcc tree). + * config-lang.in: removed examples. + * el/gm2-mode.el: fixed date. + * gm2-compiler/M2Base.mod: (InitSystem) no longer has a parameter. + * gm2-compiler/M2LexBuf.mod: improved formatting. + * gm2-compiler/M2Quads.mod: (PushTFADrwtok) corrected end name. + * gm2-compiler/M2SSA.def: (EnableSSA) disabled. + * gm2-compiler/M2System.def: (InitSystem) no longer has a parameter. + * gm2-compiler/M2System.mod: (InitSystem) no longer has a parameter. + * gm2-compiler/P1SymBuild.mod: + (P1StartBuildImplementationModule) removed unused variable and + tidied up formatting. + * gm2-gcc/m2block.c: added comment explaining why + commented out code should remain. + * gm2-gcc/m2builtins.c: removed commented out code. + * gm2-gcc/m2expr.c: removed commented out code. + +2021-06-11 Gaius Mulley + + * patches/gcc/trunk/23-patches: (New file). Patch for hwint.h. + * patches/gcc/trunk/24-patches: (new file). Patch for + install.texi. + * patches/gcc/trunk/24-patches: (new file). Patch for + sourcebuild.texi. + * m2/Make-lang.in: (m2.html) renamed documentation m2.texi. + (m2.dvi) renamed documentation m2.texi, + (m2.pdf) renamed documentation m2.texi. + (MC_ARGS) add --gcc-config-system. (m2/gm2-libs-boot/%.o) + use --gcc-config-system. Add --gcc-config-system to all bootstrap + rules to use GCC config.h and system.h rather than installed + headers. Alter all include search paths to find config.h and + system.h and libiberty. + * bnf/gm2l.bnf: (DisplayUsage) New procedure called when + -h or --help is used. + * gm2-compiler/gm2lcc.mod: (DisplayHelp) New procedure called + when -h or --help is used. + * gm2-compiler/gm2lgen.mod: (DisplayHelp) New procedure called + when -h or --help is used. Tidied up formatting. + * gm2-compiler/gm2lorder.mod: Tidied up formatting. + * gm2-compiler/ppg.mod: (DisplayHelp) New procedure called + when -h or --help is used. + * gm2-libs-ch/choosetemp.c: use "libiberty.h" rather than + . + * gm2.texi: removed subsection. + * gm2spec.c: remove dependance upon installed headers. + * mc-boot: (all files in this directory rebuilt). + * mc/README: removed old done markers. + * mc/decl.mod: (doCapC) detect getGccConfigSystem and use TOUPPER + rather than toupper. + * mc/keyc.mod: import getGccConfigSystem and issue include + config.h include system.h if this switch is on. Also use + safe-ctype.h rather than ctype.h. Avoid system headers if this + switch is on. Add true and false to the macros to be avoided. + Add new to the list of keywords to be avoided. + * mc/mcOptions.def: (getGccConfigSystem) New procedure function. + * mc/mcOptions.mod: Updated year and implemented + (getGccConfigSystem). Update help to include --gcc-config-system. + (handleOption) detect --gcc-config-system. + * tools-src/mklink.c: allow to be build by a c++ compiler. + Remove dependance upon installed headers, use config.h and system.h. + +2021-06-07 Gaius Mulley + + * gm2-ici/README: added gm2m to list of tools. + * Make-lang.in: (GM2_LINK_TOOLS) only set to gm2m. + (HAVE_STPCPY) removed. (m2/gm2config.h) removed debugging + diagnostic. Removed commented out rules and tidied comments + to use GNU style. (check_module-2) Removed redundant + equivalence rule. + * bnf/gm2m.bnf: (ParseArgs) use printf1 and use correct format + specifier (%s). + * gm2-compiler/M2GCCDeclare.mod: tidied up long comment. + * m2/gm2-gcc/m2linemap.def: change definition module to + definition for "C" and explicitly export qualified all + identifiers. + * gm2-libiberty/pexecute.def: change to definition module for + "C". + * patches/gcc/trunk/[01-22]-patches: (rebuilt). + * Make-lang.in: (GM2_LINK_TOOLS_INSTALL) new definition. + (GM2_LINK_TOOLS) defined to allow bootstrapping gm2tools. + +2021-05-31 Gaius Mulley + + * Make-lang.in: renamed gm2-tools directory to gm2-ici. + Updated all gm2-tool rules. + * config-lang.in: mkdir gm2-ici and gm2-ici-boot. Remove + mkdir gm2-tools and gm2-tools-boot. + +2021-05-30 Gaius Mulley + + * gm2-gcc/gcc-consolidation.h: include realmpfr.h. + remove include stdio.h. + * gm2-gcc/init.c: remove include stdio.h. include + config.h and system.h. + * m2/gm2-lang.c: remove include mpfr.h. + +2021-05-28 Gaius Mulley + + * patches/gcc/trunk/22-patches: rebuilt after tidying up + the code. + * gm2-gcc/m2decl.c: (m2decl_DeclareKnownVariable) tidied up + safety checks with calls to gcc_assert. + +2021-05-27 Gaius Mulley + + * patches/gcc/trunk/14-patches: (removed brig patch). + * patches/gcc/trunk/23-patches: (renamed as 14-patches). + * patches/gcc/trunk/{01-22}-patches: rebuilt. + * Make-lang.in: removed reference to version.o + * gm2-compiler/M2SSA.def: (New file). + * gm2-compiler/M2SSA.mod: (New file). + * patches/gcc/trunk/{01-22}-patches: rebuilt. + +2021-05-26 Gaius Mulley + + * Make-lang.in: added entries for M2SSA.def and M2SSA.mod. + * bnf/m2-2.bnf: (Qualident) pass tok to RequestSym. + * bnf/m2-3.bnf: (Qualident) rewritten to generate a virtual + token for the complete qualident. + * bnf/m2-c.bnf: (Qualident) rewritten to generate a virtual + token for the complete qualident. + * bnf/m2-h.bnf: (Qualident) rewritten to generate a virtual + token for the complete qualident. + * gm2-compiler/M2Base.def: (IsNeededAtRunTime) introduce + extra parameter, tok. + * gm2-compiler/M2Base.mod: ImportFrom changed to include + location position. RequestSym changed to include location + position. FromModuleGetSym changed to include location + position. (IsCompatible) short circuit the same types. + * gm2-compiler/M2Code.mod: (DetermineSubExpTemporaries) New + procedure. (Code) call DetermineSubExpTemporaries after + dependant types have been created. + * gm2-compiler/M2GCCDeclare.def: (DeclareLocalVariable) + New procedure. + * gm2-compiler/M2GCCDeclare.def: (DeclareLocalVariables) + changed parameter names to be more informative. + (DeclareLocalVariable) New procedure. Updated formatting to + use GNU coding standard spacing. + * gm2-compiler/M2GenGCC.mod: (Replace) New procedure. + (CodeFunctValue) check for SSA variable and call Replace if + necessary. (checkDeclare) New procedure. (CodeBinaryCheck) + check if SSA variable needs to be replaced. (CodeUnaryCheck) + check if SSA variable needs to be replaced. (CodeBecomes) + check if SSA variable needs to be replaced. + * gm2-compiler/M2Quads.mod: Updated some of the procedures + to adhere to GNU coding standard spacing. Change all calls to + RequestSym to pass location reference. (BuildCaseEquality) + no longer use GetTokenNo but the location of the expression on + the expression stack. + * gm2-compiler/M2Scope.mod: added developer + debugging information. + * gm2-compiler/M2System.def: (InitSystem) pass location rather + than tokenno. + * gm2-compiler/P1SymBuild.mod: use tokenno on the expression + stack rather than GetTokenNo when building import/export lists. + * gm2-compiler/P2SymBuild.mod: (BuildImportOuterModule) + (BuildImportInnerModule) change GetExported to pass token number + stored on the expression stack. (BuildVarientSelector) + pass token number on the expression stack rather than GetTokenNo. + * gm2-compiler/P3SymBuild.mod: (StartBuildInnerModule) use + expression stack tokenno when calling RequestSym. + (CheckImportListOuterModule) use expression stack tokenno when + calling RequestSym. (StartBuildProcedure) use expression stack + tokenno when calling RequestSym. (BuildConst) use expression stack + tokenno when calling RequestSym. + (BuildVarAtAddress) use expression stack tokenno when calling + RequestSym. + * gm2-compiler/PCSymBuild.mod: (PCStartBuildInnerModule) use + expression stack tokenno when calling RequestSym. + (PCStartBuildProcedure) use expression stack + tokenno when calling RequestSym. (BuildConst) use expression stack + tokenno when calling RequestSym. (StartDesConst) use expression stack + tokenno when calling RequestSym. + * gm2-compiler/SymbolConversion.mod: (AddTemporaryKnown) + New procedure. + * gm2-compiler/SymbolTable.def: (PutVariableSSA) New + procedure. (IsVariableSSA) New procedure function. + (GetDeclareSym) introduce token position parameter. + (FromModuleGetSym) introduce token position parameter. + (RequestSym) introduce token position parameter. + (PutExportQualified) introduce token position parameter. + (PutExportUnQualified) introduce token position parameter. + (PutExportUnImplemented) introduce token position parameter. + (GetExported) introduce token position parameter. + (GetFromOuterModule) introduce token position parameter. + (UnknownReported) New procedure. + * gm2-compiler/SymbolTable.mod: (PutVariableSSA) Implement + new procedure. (IsVariableSSA) New procedure function. + (GetDeclareSym) introduce token position parameter. + (FromModuleGetSym) introduce token position parameter. + (RequestSym) introduce token position parameter. + (PutExportQualified) introduce token position parameter. + (PutExportUnQualified) introduce token position parameter. + (PutExportUnImplemented) introduce token position parameter. + (GetExported) introduce token position parameter. + (GetFromOuterModule) introduce token position parameter. + (UnknownReported) Implement new procedure. + * gm2-gcc/init.c: call M2_M2SSA_init before module + compilation. + * gm2-gcc/m2decl.c: attempt to create a nameless temporary + if necessary. + * gm2-gcc/m2statement.c: GNU coding standard formatting + changes. + * init/gm2-gccinit: add M2SSA to list of compiler modules. + +2021-05-06 Gaius Mulley + + * gm2-compiler/M2GenGCC.mod: remove GetTokenNo + from import. (UseBuiltin) introduce new parameter tokenno + and use this instead of GetTokenNo (). Change all calls to + UseBuiltin to pass the tokenno across. Fixes a bug (a bad error + position) seen if a constant is created by a folded builtin + procedure function. + +2021-04-29 Gaius Mulley + + * NEWS: version 1.9.5. + * gm2-libs/config-host.in: updated to 1.9.5. + * version.c: 1.9.5. + +2021-04-28 Gaius Mulley + + * Make-lang.in: added gmp.h header file include directories to + the m2rte plugin compile rule. + * mc-boot/GDynamicStrings.c: regenerated. + * mc-boot/GEnvironment.c: regenerated. + * mc-boot/GFIO.c: regenerated. + * mc-boot/GFormatStrings.c: regenerated. + * mc-boot/GIO.c: regenerated. + * mc-boot/GIndexing.c: regenerated. + * mc-boot/GM2EXCEPTION.c: regenerated. + * mc-boot/GPushBackInput.c: regenerated. + * mc-boot/GRTExceptions.c: regenerated. + * mc-boot/GRTint.c: regenerated. + * mc-boot/GSArgs.c: regenerated. + * mc-boot/GSFIO.c: regenerated. + * mc-boot/GStdIO.c: regenerated. + * mc-boot/GStringConvert.c: regenerated. + * mc-boot/GSysStorage.c: regenerated. + * mc-boot/GTimeString.c: regenerated. + * mc-boot/Galists.c: regenerated. + * mc-boot/Gdecl.c: regenerated. + * mc-boot/Gkeyc.c: regenerated. + * mc-boot/Glists.c: regenerated. + * mc-boot/GmcComment.c: regenerated. + * mc-boot/GmcComp.c: regenerated. + * mc-boot/GmcDebug.c: regenerated. + * mc-boot/GmcError.c: regenerated. + * mc-boot/GmcLexBuf.c: regenerated. + * mc-boot/GmcMetaError.c: regenerated. + * mc-boot/GmcOptions.c: regenerated. + * mc-boot/GmcPretty.c: regenerated. + * mc-boot/GmcPrintf.c: regenerated. + * mc-boot/GmcSearch.c: regenerated. + * mc-boot/GmcStack.c: regenerated. + * mc-boot/GmcStream.c: regenerated. + * mc-boot/Gmcp1.c: regenerated. + * mc-boot/Gmcp2.c: regenerated. + * mc-boot/Gmcp3.c: regenerated. + * mc-boot/Gmcp4.c: regenerated. + * mc-boot/Gmcp5.c: regenerated. + * mc-boot/GnameKey.c: regenerated. + * mc-boot/GsymbolKey.c: regenerated. + * mc-boot/Gvarargs.c: regenerated. + * mc-boot/Gwlists.c: regenerated. + * mc/keyc.mod: redefine NULL for OpenBSD. + * testsuite/gm2/analyzer/fail/callbyref3badreturn.mod: added dg-warning. + * testsuite/gm2/analyzer/fail/testnoreturn.mod: added dg-warning. + +2021-04-26 Gaius Mulley + + * gm2-compiler/M2Quads.mod: improve formatting. + * gm2-compiler/SymbolTable.mod: improve formatting. + * patches/gcc/trunk/19-patches: (New file). + * patches/gcc/trunk/20-patches: (New file). + * patches/gcc/trunk/21-patches: (New file). + * patches/gcc/trunk/22-patches: (New file). + * patches/gcc/trunk/23-patches: (New file). + +2021-04-18 Gaius Mulley + + * patches/gcc/trunk/16-patch: (on_deallocator_call) + defends against skip_reference returning NULL. + +2021-04-17 Gaius Mulley + + * bnf/m2-1.bnf: calls to BuildNumber pass tokenpos. + * bnf/m2-2.bnf: calls to BuildNumber pass tokenpos. + * bnf/m2-3.bnf: calls to BuildNumber pass tokenpos. + * bnf/m2-c.bnf: calls to BuildNumber pass tokenpos. + * bnf/m2-h.bnf: calls to BuildNumber pass tokenpos. + * bnf/m2.bnf: calls to BuildNumber pass tokenpos. + * gm2-compiler/M2Base.mod: improved formatting. + * gm2-compiler/M2GCCDeclare.def: (TryDeclareConstructor) + removed unused quad parameter. + * gm2-compiler/M2GCCDeclare.mod: (TryDeclareConstructor) + removed unused quad parameter. + * gm2-compiler/M2GenGCC.mod: Removed unused quad parameter + to TryDeclareConstructor. + * gm2-compiler/M2Quads.def: (BuildEndFor) use endpostok. + Tightened up the accuracy of the tokens used in subexpressions. + * gm2-compiler/M2Quads.mod: (BuildEndFor) use endpostok. + Tightened up the accuracy of the tokens used in subexpressions. + +2021-04-16 Gaius Mulley + + * patches/gcc/trunk/16-patch: (remade patch with + ability to track SysStorage and Storage heaps). + * testsuite/gm2/analyzer/fail: (new tests added). + * gm2-compiler/M2Quads.mod: (BuildDesignatorPointer) + use ptrtok position and check for NIL dereference. + Create virtual token for resulting subexpression. + * gm2-compiler/M2Quads.def: (BuildDesignatorPointer) + pass ptrtok position. + * bnf/m2-3.bnf: pass token number to BuildDesignatorPointer. + +2021-04-14 Gaius Mulley + + * bnf/m2-3.bnf: cosmetic formatting changes. + * gm2-compiler/M2Quads.mod: (BuildAssignmentWithoutBounds) + introduce a tok position and use it. (MoveWithMode) use token + position. (doBuildAssignment) use token position and use GenQuadO + with the token position parameter. + (AssignHighField) pass token position to + BuildAssignmentWithoutBounds. Changed all calls to + BuildAssignmentWithoutBounds passing in the becomes token + position. (BuildReturn) use GenQuadO with the token position of + the RETURN keyword. (BuildStaticArray) create virtual token + position for subexpression. (BuildDynamicArray) create virtual + token for subexpression. (ConvertBooleanToVariable) + introduce token position and use it instead of GetTokenNo (). + (BuildBooleanVariable) use token number on the stack associated + with the operand. (PushTFADrwtok) replaces PushTFADrw. + (PushTFDtok) replaces PushTFD. (PushTFDrwtok) replaces PushTFDrw. + Changed all calls to replacement procedures. + * patches/gcc/trunk/16-patch: (remade patch). + * patches/gcc/trunk/17-patch: (remade patch). + * patches/gcc/trunk/18-patch: (remade patch). + * patches/gcc/trunk/19-patch: (New patch). + * gm2-lang.c: (gm2_langhook_new_dispose_storage_substitution) + New function. (LANG_HOOKS_NEW_DISPOSE_STORAGE_SUBSTITUTION) + defined to gm2_langhook_new_dispose_storage_substitution. + +2021-04-10 Gaius Mulley + + * gm2-libs/RTint.mod: guard against NEW (v) failing. + * patches/gcc/trunk/16-patch: (remade patch). + +2021-04-09 Gaius Mulley + + * patches/gcc/trunk/16-patch: (remade patch). + +2021-04-08 Gaius Mulley + + * bnf/m2-3.bnf: (AssignmentOrProcedureCall) pass function token + number to BuildProcedureCall. + * gm2-compiler/M2Quads.mod: (BuildProcedureCall) use functok + and generate combinedtok. + (BuildNewProcedure) use functok and combinedtok for + accurate token position for generated results. + (BuildDisposeProcedure) use functok and combinedtok for + accurate token position for generated results. + (BuildRealFunctionCall) pass tokno to BuildRealFunctionCall. + (BuildPseudoProcedureCall) pass tokno to lower level procedures. + * gm2-lang.c: remove #if 1 debugging aids. + * patches/gcc/trunk/{17,18}-patch: (New files). + * patches/gcc/trunk/{16,17,18-patch}: (remade patches). + +2021-04-07 Gaius Mulley + + * patches/gcc/trunk/16-patches: added analyzer patch. + +2021-03-05 Gaius Mulley + + * Make-lang.in: invoke all shell scripts using sh. + +2021-03-04 Gaius Mulley + + * gm2-tools/M2Emit.mod: (InternalError) call abort. + * Make-lang.in: invoke all shell scripts with the appropriate + interpreter. + +2021-02-16 Gaius Mulley + + * gm2-compiler/M2ALU.mod: changed calls to InternalError to use + a single parameter. + * gm2-compiler/M2Base.mod: changed calls to InternalError to + use a single parameter. + * gm2-compiler/M2Check.mod: changed calls to InternalError to + use a single parameter. + * gm2-compiler/M2Error.mod: changed calls to InternalError to + use a single parameter. + * gm2-compiler/M2GCCDeclare.mod: changed calls to InternalError + to use a single parameter. + * gm2-compiler/M2GenGCC.mod: changed calls to InternalError to + use a single parameter. + * gm2-compiler/M2MetaError.mod: changed calls to InternalError + to use a single parameter. + * gm2-compiler/M2Quads.mod: changed calls to InternalError to + use a single parameter. + * gm2-compiler/M2Range.mod: changed calls to InternalError to + use a single parameter. + * gm2-compiler/P2SymBuild.mod: changed calls to InternalError + to use a single parameter. + * gm2-compiler/P3SymBuild.mod: changed calls to InternalError + to use a single parameter. + * gm2-compiler/PCSymBuild.mod: changed calls to InternalError + to use a single parameter. + * gm2-compiler/Sets.mod: changed calls to InternalError to use + a single parameter. + * gm2-compiler/SymbolConversion.mod: changed calls to + InternalError to use a single parameter. + * gm2-compiler/SymbolTable.mod: changed calls to InternalError + to use a single parameter. + * gm2-tools/M2Emit.mod: changed calls to InternalError to use + a single parameter. + +2021-02-15 Gaius Mulley + + * gm2-compiler/Lists.mod: all calls to InternalError changed + to use single parameter. + * gm2-compiler/M2ALU.mod: all calls to InternalError changed + to use single parameter. + * gm2-compiler/M2AsmUtil.mod: all calls to InternalError + changed to use single parameter. + * gm2-compiler/M2Base.mod: all calls to InternalError changed + to use single parameter. + * gm2-compiler/M2Batch.mod: all calls to InternalError changed + to use single parameter. + * gm2-compiler/M2CaseList.mod: all calls to InternalError + changed to use single parameter. + * gm2-compiler/M2Check.mod: all calls to InternalError changed + to use single parameter. + * gm2-compiler/M2Const.mod: all calls to InternalError changed + to use single parameter. + * gm2-compiler/M2Debug.mod: all calls to InternalError changed + to use single parameter. + * gm2-compiler/M2DebugStack.mod: all calls to InternalError + changed to use single parameter. + * gm2-compiler/M2Emit.def: all calls to InternalError changed + to use single parameter. + * gm2-compiler/M2Emit.mod: all calls to InternalError changed + to use single parameter. + * gm2-compiler/M2Error.def: all calls to InternalError changed + to use single parameter. + * gm2-compiler/M2Error.mod: all calls to InternalError changed + to use single parameter. + * gm2-compiler/M2GCCDeclare.mod: all calls to InternalError + changed to use single parameter. + * gm2-compiler/M2GenGCC.mod: all calls to InternalError + changed to use single parameter. + * gm2-compiler/M2MetaError.mod: all calls to InternalError + changed to use single parameter. + * gm2-compiler/M2Optimize.mod: all calls to InternalError + changed to use single parameter. + * gm2-compiler/M2Pass.mod: all calls to InternalError changed + to use single parameter. + * gm2-compiler/M2Quads.mod: all calls to InternalError changed + to use single parameter. + * gm2-compiler/M2Range.mod: all calls to InternalError changed + to use single parameter. + * gm2-compiler/M2StackAddress.mod: all calls to InternalError + changed to use single parameter. + * gm2-compiler/M2StackWord.mod: all calls to InternalError + changed to use single parameter. + * gm2-compiler/M2Swig.mod: all calls to InternalError changed + to use single parameter. + * gm2-compiler/M2System.mod: all calls to InternalError + changed to use single parameter. + * gm2-compiler/P2SymBuild.mod: all calls to InternalError + changed to use single parameter. + * gm2-compiler/PCSymBuild.mod: all calls to InternalError + changed to use single parameter. + * gm2-compiler/Sets.mod: all calls to InternalError changed to + use single parameter. + * gm2-compiler/SymbolConversion.mod: all calls to + InternalErrorchanged to use single parameter. + * gm2-compiler/SymbolTable.mod: all calls to InternalError + changed to use single parameter. + * gm2-tools/M2Emit.mod: all calls to InternalError changed to + use single parameter. + +2021-02-10 Gaius Mulley + + * mc-boot/Gmcp5.c: (SubDesignator) check to see if expression + is NIL. + * bnf/mc-5.bnf: (SubDesignator) check to see if expression + is NIL. + * gm2-gcc/rtegraph.c: (DEBUGGING) includes complete functions + rather than just the body of a function. + * gm2-compiler/M2Check.mod: (isTrue) commented out. + (checkTypeEquivalence) completed comment. (checkTypeEquivalence) + removed unused parameter tInfo and added comments. + (checkSubrange) completed comment and check for result known + at beginning. (checkGenericTypeEquivalence) completed comment. + (checkSystemEquivalence) completed comment and removed unused + tInfo parameter. (checkEnumerationEquivalence) removed unused + tInfo parameter. (checkPointerType) completed comment and removed + unused tInfo parameter. (checkValueEquivalence) completed comment and + removed unused tInfo parameter. (visit) removed. + (checkSkipEquivalence) removed unused parameter tInfo. + (checkRecordEquivalence) removed unused parameter tInfo. + (getCompatible) removed. + +2021-01-29 Gaius Mulley + + * gm2-compiler/M2GenGCC.mod: (ToSubrange) removed unused export. + * gm2-gcc/m2convert.c: (ToSubrange) removed. + * gm2-gcc/m2convert.h: (ToSubrange) removed. + * gm2-libs/SArgs.mod: Reverted change. + +2021-01-27 Gaius Mulley + + * gm2-compiler/M2BasicBlock.def: (KillBasicBlock) use + optional return. + * gm2-compiler/M2BasicBlock.mod: (KillBasicBlock) parameter + is VAR and the parameter is assigned to NIL. (FreeBasicBlocks) + New procedure. (BasicBlock) declared without unnecessary + forward type. (InitBasicBlocks) formatting. + * gm2-compiler/M2Code.mod: (Percent) formatting. + (SecondDeclareAndOptimize) remove unnecessary variable bb. + Use FreeBasicBlocks on functional basic block evaluations. + * gm2-compiler/M2GenGCC.mod: (IsExported) Reformatted. + * gm2-compiler/M2LexBuf.mod: (GetToken) call GetToken + without using the return result to advance token position. + * gm2-compiler/m2flex.def: (GetToken) declared with optional + return result. + * gm2-gcc/gcc-consolidation.h: corrected dates. + * gm2-gcc/init.c: corrected dates. + * gm2-gcc/init.def: corrected dates. + * gm2-gcc/init.h: corrected dates. + * gm2-gcc/m2assert.c: corrected dates. + * gm2-gcc/m2assert.h: corrected dates. + * gm2-gcc/m2block.c: corrected dates. + * gm2-gcc/m2block.def: corrected dates. + * gm2-gcc/m2block.h: corrected dates. + * gm2-gcc/m2builtins.c: corrected dates. + * gm2-gcc/m2builtins.def: corrected dates. + * gm2-gcc/m2builtins.h: corrected dates. + * gm2-gcc/m2color.c: corrected dates. + * gm2-gcc/m2color.def: corrected dates. + * gm2-gcc/m2color.h: corrected dates. + * gm2-gcc/m2convert.c: corrected dates. + * gm2-gcc/m2convert.def: corrected dates. + * gm2-gcc/m2convert.h: corrected dates. + * gm2-gcc/m2decl.c: corrected dates. + * gm2-gcc/m2decl.def: corrected dates. + * gm2-gcc/m2decl.h: corrected dates. + * gm2-gcc/m2except.c: corrected dates. + * gm2-gcc/m2except.def: corrected dates. + * gm2-gcc/m2except.h: corrected dates. + * gm2-gcc/m2expr.c: corrected dates. + * gm2-gcc/m2expr.def: corrected dates. + * gm2-gcc/m2expr.h: corrected dates. + * gm2-gcc/m2linemap.c: corrected dates. + * gm2-gcc/m2linemap.def: corrected dates. + * gm2-gcc/m2linemap.h: corrected dates. + * gm2-gcc/m2misc.c: corrected dates. + * gm2-gcc/m2misc.def: corrected dates. + * gm2-gcc/m2misc.h: corrected dates. + * gm2-gcc/m2options.h: corrected dates. + * gm2-gcc/m2range.h: corrected dates. + * gm2-gcc/m2search.h: corrected dates. + * gm2-gcc/m2statement.c: corrected dates. + * gm2-gcc/m2statement.def: corrected dates. + * gm2-gcc/m2statement.h: corrected dates. + * gm2-gcc/m2top.c: corrected dates. + * gm2-gcc/m2top.def: corrected dates. + * gm2-gcc/m2top.h: corrected dates. + * gm2-gcc/m2tree.c: corrected dates. + * gm2-gcc/m2tree.def: corrected dates. + * gm2-gcc/m2tree.h: corrected dates. + * gm2-gcc/m2treelib.c: corrected dates. + * gm2-gcc/m2treelib.def: corrected dates. + * gm2-gcc/m2treelib.h: corrected dates. + * gm2-gcc/m2type.c: corrected dates. + * gm2-gcc/m2type.def: corrected dates. + * gm2-gcc/m2type.h: corrected dates. + * gm2-gcc/rtegraph.c: corrected dates. + * gm2-gcc/rtegraph.h: corrected dates. + * patches/gcc/trunk: rebuilt all patches. + * gm2-compiler/M2Base.mod: (InitBuiltins) check builtins to + ensure source file was found. (GetBaseTypeMinMax) remove unused + local variable. (GetBaseTypeMinMax) reformatted. + (InitBaseProcedures): check rtexceptions to determine whether + source file was found. + * gm2-compiler/M2Code.mod: (CodeBlock) KillScopeBlock no + longer returns a value. + * gm2-compiler/M2GCCDeclare.mod: + (DeclareTypesConstantsProcedures) KillScopeBlock no longer returns + a value. + * gm2-compiler/M2Scope.def: (KillScopeBlock) remove + return result and pass sb by reference. + * gm2-compiler/M2Scope.mod: assign parameter to NIL. + * gm2-compiler/M2Swig.mod: (DetermineParameter) KillBasicBlock + no longer returns a value. + * gm2-gcc/m2type.c: (build_set_type) commented out. + (convert_type_to_range) commented out. + * gm2-libs/SArgs.mod: convert pointer to non void * pointer before + performing arithmetic. + * gcc/m2/gm2-compiler/M2Optimize.mod: (DisplayReachable) + exported. + * gcc/m2/gm2-compiler/M2Optimize.def: (DisplayReachable) + exported. + +2021-01-25 Gaius Mulley + + * gcc/m2/Make-lang.in: supply subdirectory parameter to makeversion. + Invoke makeversion without changing into a subdirectory. + * gcc/m2/tools-src/makeversion: added subdirectory argument. + All output files are placed into the supplied subdirectory. + * gcc/m2/patches/gcc/trunk/15-patches: (New file) git front end + patch. + +2021-01-16 Gaius Mulley + + * patches/gcc/trunk/02-patches: (corrected path depth). + * gcc/m2/Make-lang.in: added dependancies $(PLUGIN_HEADERS) alongside + $(TARGET_H). + * gcc/m2/config-lang.in: corrected dates. + * gcc/m2/configure.ac: corrected dates. + * gcc/m2/gm2-internals.texi: corrected dates. + * gcc/m2/gm2-lang.c: corrected dates. + * gcc/m2/gm2-lang.h: corrected dates. + * gcc/m2/gm2.texi: corrected dates. + * gcc/m2/gnu.texi: corrected dates. + * gcc/m2/lang-options.h: corrected dates. + * gcc/m2/lang-specs.h: corrected dates. + * gcc/m2/lang.opt: corrected dates. + * gcc/m2/m2-link-support.h: corrected dates. + * gcc/m2/m2-tree.def: corrected dates. + * gcc/m2/m2.flex: corrected dates. + * gcc/m2/mc-boot-ch/GRTco.c: corrected dates. + * gcc/m2/mc/mc.flex: corrected dates. + * gcc/m2/mc/mcComment.h: corrected dates. + * gcc/m2/mc/mcLexBuf.h: corrected dates. + * gcc/m2/mc/mcReserved.h: corrected dates. + * gcc/m2/tools-src/array2index.py: corrected dates. + * gcc/m2/tools-src/buildpg: corrected dates. + * gcc/m2/tools-src/buildsyntax: corrected dates. + * gcc/m2/tools-src/createUlmSys: corrected dates. + * gcc/m2/tools-src/def2texi.py: corrected dates. + * gcc/m2/tools-src/incfile: corrected dates. + * gcc/m2/tools-src/makeSystem: corrected dates. + * gcc/m2/tools-src/makeconfigure: corrected dates. + * gcc/m2/tools-src/makeversion: corrected dates. + * gcc/m2/tools-src/tidydates.py: corrected dates. + * gcc/m2/www/gm2-logo.ms: corrected dates. + * gcc/m2/www/tools/texi2tr/src/config.py: corrected dates. + * gcc/m2/www/tools/texi2tr/src/navigation.py: corrected dates. + * gcc/m2/www/tools/texi2tr/src/outputdev.py: corrected dates. + * gcc/m2/www/tools/texi2tr/src/texi2tr.py: corrected dates. + * gcc/m2/www/Makefile.in: regenerted. + * libgm2/Makefile.in: regenerted. + * libgm2/libm2cor/Makefile.in: regenerted. + * libgm2/libm2iso/Makefile.in: regenerted. + * libgm2/libm2log/Makefile.in: regenerted. + * libgm2/libm2min/Makefile.in: regenerted. + * libgm2/libm2pim/Makefile.in: regenerted. + +2021-01-14 Gaius Mulley + + * bnf/gm2m.bnf: removed unused local variables. + * gm2-compiler/M2CaseList.mod: removed unused local variables. + * gm2-compiler/M2Check.mod: removed unused local variables. + * gm2-compiler/M2DebugStack.mod: removed unused local variables. + * gm2-compiler/M2Range.mod: removed unused local variables. + * gm2-compiler/M2Students.mod: removed unused local variables. + * gm2-compiler/Sets.mod: removed unused local variables. + * gm2-libs/IO.mod: removed unused local variables. + +2021-01-13 Gaius Mulley + + * gm2-compiler/M2CaseList.mod: (DisposeRanges) remove + unused variable tag. (SubBitRange) remove dummy. Use + MetaErrorT0. + * gm2-compiler/M2GenGCC.mod: Use tokenno rather than + CurrentQuadToken when passed as a parameter. (CodeMakeAdr) + Initialize location before use. + * bnf/gm2l.bnf: altered grammar to include <* noreturn *> + attribute. + * bnf/gm2m.bnf: altered grammar to include <* noreturn *> + attribute. + * Make-lang.in: updated dates and also the bootstrap path + for mc. + * bnf/m2-1.bnf: altered grammar to include <* noreturn *> + attribute. + * bnf/m2-2.bnf: altered grammar to include <* noreturn *> + attribute. + * bnf/m2-3.bnf: altered grammar to include <* noreturn *> + attribute. + * bnf/m2-c.bnf: altered grammar to include <* noreturn *> + attribute. + * bnf/m2-h.bnf: altered grammar to include <* noreturn *> + attribute. + * bnf/m2.bnf: altered grammar to include <* noreturn *> + attribute. + * bnf/mc-1.bnf: altered grammar to include <* noreturn *> + attribute. + * bnf/mc-2.bnf: altered grammar to include <* noreturn *> + attribute. + * bnf/mc-3.bnf: altered grammar to include <* noreturn *> + attribute. + * bnf/mc-4.bnf: altered grammar to include <* noreturn *> + attribute. + * bnf/mc-5.bnf: altered grammar to include <* noreturn *> + attribute. + * gm2-compiler/M2BasicBlock.mod: (ConvertQuads2BasicBlock) removed + unused variable. + * gm2-compiler/M2Error.def: (InternalError) added <* noreturn *>. + * gm2-compiler/M2Error.mod: (InternalError) added <* noreturn *>. + * gm2-compiler/M2Quads.mod: (CheckCompatibleWithBecomes) improved + error messages and tidied up formatting. + * gm2-compiler/M2StackAddress.mod: (PushAddress) removed unused variable. + * gm2-compiler/P0SymBuild.mod: (pc) added comment. + * gm2-compiler/P1SymBuild.mod: (CheckFileName) corrected type of basename. + (P1StartBuildDefinitionModule) removed unused variable. (BuildImportInnerModule) + removed unused variable. (BuildExportInnerModule) removed unused variable. + * gm2-compiler/SymbolTable.mod: (IsLegal) removed useless comparison. + * gm2-compiler/gm2lgen.mod: (GenExternals) removed unused variable. + (GenInitializationCalls) removed unused variable. (GenFinalizationCalls) + removed unused variable. + * gm2-libs/M2RTS.def: (Terminate) added <* noreturn *>. (HALT) + added <* noreturn *>. (Halt) added <* noreturn *>. (ErrorMessage) + added <* noreturn *>. + * gm2-libs/M2RTS.mod: (Terminate) added <* noreturn *>. (HALT) + added <* noreturn *>. (Halt) added <* noreturn *>. (ErrorMessage) + added <* noreturn *>. + * gm2-libs/libc.def: (abort) <* noreturn *>. (exit) <* noreturn *>. + * mc-boot/GASCII.c: (rebuilt). + * mc-boot/GASCII.h: (rebuilt). + * mc-boot/GArgs.c: (rebuilt). + * mc-boot/GArgs.h: (rebuilt). + * mc-boot/GAssertion.c: (rebuilt). + * mc-boot/GAssertion.h: (rebuilt). + * mc-boot/GBreak.c: (rebuilt). + * mc-boot/GBreak.h: (rebuilt). + * mc-boot/GCOROUTINES.h: (rebuilt). + * mc-boot/GCmdArgs.c: (rebuilt). + * mc-boot/GCmdArgs.h: (rebuilt). + * mc-boot/GDebug.c: (rebuilt). + * mc-boot/GDebug.h: (rebuilt). + * mc-boot/GDynamicStrings.c: (rebuilt). + * mc-boot/GDynamicStrings.h: (rebuilt). + * mc-boot/GEnvironment.c: (rebuilt). + * mc-boot/GEnvironment.h: (rebuilt). + * mc-boot/GFIO.c: (rebuilt). + * mc-boot/GFIO.h: (rebuilt). + * mc-boot/GFormatStrings.c: (rebuilt). + * mc-boot/GFormatStrings.h: (rebuilt). + * mc-boot/GFpuIO.c: (rebuilt). + * mc-boot/GFpuIO.h: (rebuilt). + * mc-boot/GIO.c: (rebuilt). + * mc-boot/GIO.h: (rebuilt). + * mc-boot/GIndexing.c: (rebuilt). + * mc-boot/GIndexing.h: (rebuilt). + * mc-boot/GM2EXCEPTION.c: (rebuilt). + * mc-boot/GM2EXCEPTION.h: (rebuilt). + * mc-boot/GM2RTS.c: (rebuilt). + * mc-boot/GM2RTS.h: (rebuilt). + * mc-boot/GMemUtils.c: (rebuilt). + * mc-boot/GMemUtils.h: (rebuilt). + * mc-boot/GNumberIO.c: (rebuilt). + * mc-boot/GNumberIO.h: (rebuilt). + * mc-boot/GPushBackInput.c: (rebuilt). + * mc-boot/GPushBackInput.h: (rebuilt). + * mc-boot/GRTExceptions.c: (rebuilt). + * mc-boot/GRTExceptions.h: (rebuilt). + * mc-boot/GRTco.h: (rebuilt). + * mc-boot/GRTint.c: (rebuilt). + * mc-boot/GRTint.h: (rebuilt). + * mc-boot/GSArgs.c: (rebuilt). + * mc-boot/GSArgs.h: (rebuilt). + * mc-boot/GSFIO.c: (rebuilt). + * mc-boot/GSFIO.h: (rebuilt). + * mc-boot/GSYSTEM.h: (rebuilt). + * mc-boot/GSelective.h: (rebuilt). + * mc-boot/GStdIO.c: (rebuilt). + * mc-boot/GStdIO.h: (rebuilt). + * mc-boot/GStorage.c: (rebuilt). + * mc-boot/GStorage.h: (rebuilt). + * mc-boot/GStrCase.c: (rebuilt). + * mc-boot/GStrCase.h: (rebuilt). + * mc-boot/GStrIO.c: (rebuilt). + * mc-boot/GStrIO.h: (rebuilt). + * mc-boot/GStrLib.c: (rebuilt). + * mc-boot/GStrLib.h: (rebuilt). + * mc-boot/GStringConvert.c: (rebuilt). + * mc-boot/GStringConvert.h: (rebuilt). + * mc-boot/GSysExceptions.h: (rebuilt). + * mc-boot/GSysStorage.c: (rebuilt). + * mc-boot/GSysStorage.h: (rebuilt). + * mc-boot/GTimeString.c: (rebuilt). + * mc-boot/GTimeString.h: (rebuilt). + * mc-boot/GUnixArgs.h: (rebuilt). + * mc-boot/Galists.c: (rebuilt). + * mc-boot/Galists.h: (rebuilt). + * mc-boot/Gdecl.c: (rebuilt). + * mc-boot/Gdecl.h: (rebuilt). + * mc-boot/Gdtoa.h: (rebuilt). + * mc-boot/Gerrno.h: (rebuilt). + * mc-boot/Gkeyc.c: (rebuilt). + * mc-boot/Gkeyc.h: (rebuilt). + * mc-boot/Gldtoa.h: (rebuilt). + * mc-boot/Glibc.h: (rebuilt). + * mc-boot/Glibm.h: (rebuilt). + * mc-boot/Glists.h: (rebuilt). + * mc-boot/GmcComment.c: (rebuilt). + * mc-boot/GmcComment.h: (rebuilt). + * mc-boot/GmcComp.c: (rebuilt). + * mc-boot/GmcComp.h: (rebuilt). + * mc-boot/GmcDebug.c: (rebuilt). + * mc-boot/GmcDebug.h: (rebuilt). + * mc-boot/GmcError.c: (rebuilt). + * mc-boot/GmcError.h: (rebuilt). + * mc-boot/GmcFileName.h: (rebuilt). + * mc-boot/GmcLexBuf.c: (rebuilt). + * mc-boot/GmcLexBuf.h: (rebuilt). + * mc-boot/GmcMetaError.c: (rebuilt). + * mc-boot/GmcMetaError.h: (rebuilt). + * mc-boot/GmcOptions.h: (rebuilt). + * mc-boot/GmcPreprocess.h: (rebuilt). + * mc-boot/GmcPretty.h: (rebuilt). + * mc-boot/GmcPrintf.h: (rebuilt). + * mc-boot/GmcQuiet.h: (rebuilt). + * mc-boot/GmcReserved.h: (rebuilt). + * mc-boot/GmcSearch.h: (rebuilt). + * mc-boot/GmcStack.c: (rebuilt). + * mc-boot/GmcStack.h: (rebuilt). + * mc-boot/GmcStream.c: (rebuilt). + * mc-boot/GmcStream.h: (rebuilt). + * mc-boot/Gmcflex.h: (rebuilt). + * mc-boot/Gmcp1.c: (rebuilt). + * mc-boot/Gmcp1.h: (rebuilt). + * mc-boot/Gmcp2.c: (rebuilt). + * mc-boot/Gmcp2.h: (rebuilt). + * mc-boot/Gmcp3.c: (rebuilt). + * mc-boot/Gmcp3.h: (rebuilt). + * mc-boot/Gmcp4.c: (rebuilt). + * mc-boot/Gmcp4.h: (rebuilt). + * mc-boot/Gmcp5.c: (rebuilt). + * mc-boot/Gmcp5.h: (rebuilt). + * mc-boot/GnameKey.c: (rebuilt). + * mc-boot/GnameKey.h: (rebuilt). + * mc-boot/GsymbolKey.c: (rebuilt). + * mc-boot/GsymbolKey.h: (rebuilt). + * mc-boot/Gtermios.h: (rebuilt). + * mc-boot/Gtop.c: (rebuilt). + * mc-boot/Gvarargs.c: (rebuilt). + * mc-boot/Gvarargs.h: (rebuilt). + * mc-boot/Gwlists.c: (rebuilt). + * mc-boot/Gwlists.h: (rebuilt). + * mc-boot/Gwrapc.h: (rebuilt). + * mc/decl.def: (setNoReturn) new procedure. + * mc/decl.mod: (doProcedureHeadingC) added extra parameter for heading. + (setNoReturn) new procedure. + +2021-01-12 Gaius Mulley + + * gm2-compiler/M2Quads.mod: (BuildOddFunction) combinedok initialize + before use during error case. (BuildMinFunction) rewritten to + initialize all tokens before use when an error condition occurs. + (BuildConstFunctionCall) initialize paramtok and combinedtok before + use. + * m2pp.c: (pl) renamed as ptcl and declared as external. + * m2pp.h: (ptcl) declared as external. + +2021-01-11 Gaius Mulley + + * configure.ac: avoid comparing SYSTEM.o between stages during + bootstrap checks. + +2021-01-09 Gaius Mulley + + * lang.opt: commented out descriptions for options which are + used by C. + * updated all dates for the New Year. + * tools-src/boilerplate.py: detect GCC with runtime exceptions + licence. + * New year ChangeLog file. diff --git a/gcc/m2/ChangeLog-2001 b/gcc/m2/ChangeLog-2001 new file mode 100644 index 00000000000..204f68a7b9c --- /dev/null +++ b/gcc/m2/ChangeLog-2001 @@ -0,0 +1,68 @@ +2001-08-01 Gaius Mulley + + * brought gm2 up to date with gcc-3.0 + * fixed opaque handling in the new parser + * now using new parser by default + * rewritten NameKey.mod, removing any static limits on array + sizes by using dynamic data structures throughout. + * improved p2c so that it handles opaque types properly. + * modified Lists.def, SymbolKey.def to use opaque types. + +2001-03-09 Gaius Mulley + + * fixed bug in FpuIO.mod which failed to issue a '-' when emitting + real numbers. + * added many new tests to the regression directory (autotest). + * fixed bugs in the bnf descriptions. Compiler is now using + automatically generated parser for P1, P2 and P3. Just PH + remains hand built. + * Introduced a number of small regression tests following + Olivier's extensive bug report on (m2f). Fixed a number + of bugs reported, see gm2/m2/comp/BUGS for details. + * Fixed bug in M2Lexical.mod causing mismatch between + source line numbers and gdb information. + * Fixed + - / of constant sets. + * removed tests for the interim (they exist under + bitset3.mod.breaks and string.mod.breaks respectively) + * modifications to stop overflow on max CARDINAL when converting + numbers into strings (NumberIO.mod) + +2001-02-28 Gaius Mulley + + * using new parser P1SyntaxCheck.mod and P2Build.mod + P1SyntaxCheck.mod now inserts simple missing tokens. + * both automatically generated and provide better error + recovery + * improved some error messages + +2001-01-23 Gaius Mulley + + * brought gm2 up to date with gcc-20001204 + * introduced configure and moved all makefiles to Makefile.in + * tidied up p2c a little, in an attempt to reduce the compile + time warnings + +2000-12-02 Gaius Mulley + + * brought gm2 up to date with gcc-20001120 + * garbage collection now working in gm2 + * introduced EXPORT UNQUALIFIED as a method for writing + definition modules as interfaces for C libraries + * altered link tools to reflect EXPORT UNQUALIFIED + * started work on preprocessing source when -Wcpp is supplied + * tidied up gccgm2.c + +2000-09-25 Gaius Mulley + + * added error messages to lang-spec.h. Issued if wrong combination + of -Wuselist -Wmodules -Wmakelist and -c are supplied. + +2000-09-14 Matthias Kurz + + * Many makefile portability corrections (tests for symbol links). + Made makeversion more portable via guessing email address. + Added setenv emulation in libc.c. + Inserted missing Close(fo) to gm2lgen.mod.GenMain(). + Improved README, + Added QUIAT to the makefiles. + Cast EOF to (char) inside mkfor.c mklink.c. diff --git a/gcc/m2/ChangeLog-2002 b/gcc/m2/ChangeLog-2002 new file mode 100644 index 00000000000..27fa922bc1c --- /dev/null +++ b/gcc/m2/ChangeLog-2002 @@ -0,0 +1,59 @@ +2002-12-20 Gaius Mulley + + * added __ATTRIBUTE__ __BUILTIN__ ((Ident)) + rules for obtaining target compiler constants + * fixed handling of recursive procedure type definitions + bug reported by Iztok Kobal + * improved base types to aid gdb in displaying data types + * checked in some sketchy initial ISO library implementation + modules + +2002-11-03 Gaius Mulley + + * GM2 Release 0.33 + * implemented large sets + * implemented ISO complient sets + * definition modules no longer have to explicitly export + identifiers + +2002-06-20 Gaius Mulley + + * GM2 Release 0.32 + * now supports building a cross compiler (strong-arm) tested + +2002-06-09 Gaius Mulley + + * brought gm2 up to date with gcc-3.2 + * fixed the $(srcdir) in all Makefile.in's + * configuring and building gm2 is now recommended + to occur outside the source tree. + * many changes to gccgm2.c to reflect gcc-3.2 + +2002-05-04 Gaius Mulley + + * implemented DEFINITION MODULE FOR "C" + * implemented -Wmakeall + * implemented varargs in "C" modules + * added gm2/examples directory + * updated documentation + * gm2m and gm2l are now built from ebnf descriptions + by ppg + +2002-04-15 Gaius Mulley + + * GM2 Release 0.21 + * brought gm2 up to date with gcc-3.0.4 + * make paranoid works on Debian GNU/Linux (Athlon) + * finally finished rewrite of a number of key modules + * Strings.mod used instead of StrLib.mod allowing for + dynamic arrays + * new flex built lexical analyser in use. + * cpp is run on all definition/implementation modules if + -Wcpp is used. + * gm2m rewritten + * gm2 and its utilities now use -I for path specification + rather than -M + * Makefiles much simplified, removed most recursive makes. + * all parsers are now mechanically generated using ppg. + * ppg built if required. + diff --git a/gcc/m2/ChangeLog-2003 b/gcc/m2/ChangeLog-2003 new file mode 100644 index 00000000000..0bdc00026f6 --- /dev/null +++ b/gcc/m2/ChangeLog-2003 @@ -0,0 +1,284 @@ +2003-12-26 Gaius Mulley + + * increased the number of regression tests to 1332 + * gm2 passes 1317 and fails 15 + * many bug fixes.. + * improved documentation, gm2.texi. Now contains + a ebnf description of GNU Modula-2 extracted from + bnf/m2.bnf. + * completed the optional final parameter argument. + * reimplemented the CAP standard function so that it + can be used within constant expressions. + +2003-11-27 Gaius Mulley + + * fixed a bug in the handling of the -Wcpp option so that it uses + -traditional-cpp + * integrated the gm2 and m2f regression tests into the GNU GCC + dejagnu format - all the m2f tests are now used to test gm2. + * started work on a minor extension to GNU Modula-2 which allows + the last parameter to be optional. In turn this allows a + Modula-2 implementation of the ISO module COROUTINES which is + in development. + +2003-11-13 Gaius Mulley + + * modified the generated .h files to be prefixed with `G' to avoid + name clashes which in turn allows gm2 to be built under a vfat + file system. + +2003-11-07 Gaius Mulley + + * changed the flag name -Wverbose to -Wsources + +2003-11-07 Gaius Mulley + + * improved array index type debugging description in gccgm2.c + which allows gdb to understand that arrays are declared ARRAY + [low..high] rather than ARRAY [0..high-low] + +2003-11-04 Gaius Mulley + + * fixed bug in procedure type declaration. + +2003-11-03 Gaius Mulley + + * modified ProcedureBlock rule in bnf/m2.bnf, bnf/m2-[23h].bnf + to comply with ISO syntax. The 'BEGIN' statement sequence is + optional. + * updated the gm2.texi to include a description about + the -Wextended-opaque option. + +2003-10-23 Gaius Mulley + + * fixes to opaque type (in)compatibility for expression and assignments. + +2003-10-09 Gaius Mulley + + * fixed gm2 build with ./configure --enable-checking + +2003-10-07 Gaius Mulley + + * introduced -Wextended-opaque which enables the GM2 extension + to opaque types. This allows opaque types to be non pointer + types, but requires that GM2 parse the corresponding + implementation module. + * modified GM2 to default to the standard opaque implementation + of using SYSTEM.ADDRESS as the `opaque type' outside the + module of its declaration. + * introduced -Wverbose to allow users see the source file names + for modules as they are being compiled. + +2003-09-30 Gaius Mulley + + * fixed bug in ADDADR as reported by Iztok + * fixed bug in exported type name clashes as reported by Iztok + * fixed bug with multiple type references to a SET + * fixed Min`basetype' to contain the type `basetype' + * tidied up IsReallyPointer in M2Quads.mod + +2003-09-25 Gaius Mulley + + * fixed -Wmakeall option. + * fixed CARDINAL type to have range 0..max(unsigned int) + rather than 0..max(integer) as reported by Iztok. + * fixed set type incomparability as reported by Iztok. + * fixed README note about make gm2.paranoid as reported by + Matthias Kurz. + * fixed many of the example programs which were broken during + the migration to gcc-3.3.1. + * fixed lang-specs.h to invoke new cpp. + * removed the M2PATH environment variable usage. + * added more modules to make gm2.paranoid. + * fixed gm2->gcc declaration of arrays. + * fixed infinite loop in M2GenGCC.mod and M2Optimize.mod + * added more regression tests. + * fixed Make-file.in as suggested by Matthias Kurz. + * fixed tools-src/makeversion and tools-src/buildpg to be + more portable as suggested by Matthias Kurz. + * fixed examples/pthread + +2003-09-19 Gaius Mulley + + * GM2 release 0.40 + * brought GM2 up to date with gcc-3.3.1 + * introduced new files gm2-common.h, gm2-common.c, + gm2-lang.h, gm2-tree.h to reflect the new garbage collection + mechanism. + * major changes to gccgm2.c to reflect migration from gcc-3.2 to + gcc-3.3.1 + * introduced gm2-compiler/M2Scope.def, gm2-compiler/M2Scope.mod + to manage the quadruples which represent a particular scope + * major recoding of M2Code and the order that quadruples are coded + into GCC trees. This in turn fixes a very serious nested + procedure bug. (gm2/m2/comp/autotest/gm2/localproc.mod and + convert.mod). + * changes to M2GCCDeclare.mod, M2GenGCC.mod, M2BasicBlock.mod + to allow quadruples to be translated via outer scope to inner + scope ordering. + * M2Code.mod is much cleaner. + * fixed a number of uninitialised variable errors and bad pointer + errors. All caught by the extremely useful x86 utility valgrind. + In turn this fixes a Redhat 9.0 build problem. + * fixed bugs in DynamicStrings.mod, ppg.mod, SEnvironment.mod + * introduced the debian package files (gm2/debian) so that .deb + package (gm2) can be built. + * fixes to gm2 so that it can compile the University of Ulm's + system modules. + +2003-06-01 Gaius Mulley + + * added the LONGCARD data type. + * fixed subrange declarations so that they can be prefixed + by a qualident. + * fixed variant record for ISO syntax + (gm2/m2/comp/autotest/gm2/caseiso.mod). + * fixed importing of an enumerated element + (gm2/m2/comp/autotest/gm2/impm.mod). + +2003-05-27 Gaius Mulley + + * fixed bug reported by Iztok Kobal + (gm2/m2/comp/autotest/gm2/realbitscast.mod). + Fixed cast to copy data. + * enabled SIZE to be invoked from constant expressions. + +2003-05-20 Gaius Mulley + + * fixed bug reported by Iztok Kobal + (gm2/m2/comp/autotest/gm2/testlength3.mod) + LENGTH is now mapped onto M2RTS.Length if the parameter is + not a constant at compile time. + +2003-05-16 Gaius Mulley + + * fixed bug reported by Iztok Kobal + (gm2/m2/comp/autotest/gm2/longstrimp.mod) + and also (gm2/m2/comp/autotest/gm2/imp[deghij].mod) + +2003-05-08 Gaius Mulley + + * implemented the standard function LENGTH + * allowed standard functions to be called from constant expressions + * improved cyclic data type dependancy error messages + * SIZE is now only exported from SYSTEM if the switch -Wiso is absent + SIZE is declared as a standard procedure if -Wiso is present + +2003-05-07 Gaius Mulley + + * implemented ISO BITSET as a standard type which takes + effect when -Wiso is present on the command line. + * backed out garbage collection change to m2.lex + * fixed bugs reported by Iztok Kobal + (gm2/m2/comp/autotest/gm2/[testexit.mod, bitset3.mod bits32.mod]) + +2003-05-06 Gaius Mulley + + * modified Storage and SysStorage modules so that the procedure + DEALLOCATE assigns the pointer to NIL + * fixed bug reported by Iztok Kobal + (gm2/m2/comp/autotest/gm2/bitset2.mod) + +2003-05-05 Gaius Mulley + + * fixed two bugs reported by Iztok Kobal. + * fixed bug in M2GCCDeclare.mod (BITSET's subrange was undeclared). + * added BITNUM, the subrange from which BITSET is constructed, + in SYSTEM. + * added regression test case for this bug. + * also modified c.lex to use xstrdup and not strdup. + +2003-05-01 Gaius Mulley + + * added pseudo functions, CAP, ODD, ABS + * removed gm2-libs/Math.def which defined ABS + +2003-04-29 Gaius Mulley + + * examples/pthreads cleaned up + * introduced ISO SYSTEM. Limitations, TSIZE only takes one parameter, + and SHIFT, ROTATE are not implemented yet + * renamed gm2-libs/Strings to gm2-libs/DynamicStrings to avoid name + clash with gm2-iso/Strings + * p2c modified to understand DEFINITION MODULE FOR "C" + * gm2-libs/libc.def modified to use DEFINITION MODULE FOR "C" + * gm2-iso/libc.def removed + * linking references to libc (in gm2/init/*init) removed + * gm2/tools-src/def2texi finished + * gm2/gm2-libs.texi built via gm2/tools-src/def2texi + * gm2/gm2.texi now contains library definition modules and index + * added -Wiso switch to gm2 driver + +2003-04-12 Gaius Mulley + + * first cut of h2def released + * examples/pthreads introduced + * examples/vga.def generated by h2def + * fixed bug in CodeBecomes + * fixed constant set bug in M2GenGCC.mod + * updated gm2.texi to reflect introduction of h2def + * build mechanism tidied up. p2c is now built from the top level + makefile. + * some portability features of p2c fixed, so that it builds + cleanly under Apple Darwin + * many internal changes made to ppg to handle recursive ebnf + rules. + * fixed automatic export of unqualified identifiers from a + DEFINITION MODULE FOR "C" + +2003-02-02 Gaius Mulley + + * fixed bug reported by Iztok Kobal, the gm2-iso/ChanConsts module + failed to compile. Added a regression test to catch this. + +2003-02-01 Gaius Mulley + + * bug fixes in error handling. In particular duplicate symbols + are better handled. + * development checkin of the h2def tool and subsidiary modules. + +2003-01-20 Gaius Mulley + + * bug fixes for gm2m and link-specs.h which allow libraries + to be added with the -Wmakeall option. + * fixed a number of built-in definitions in Builtin.def + * also added MathLib0.def and MathLib0.mod to the pim libraries. + * fixed svga example test + * added long double math built-ins + +2003-01-17 Gaius Mulley + + * bug fixes to the line numbering debugging info + which is passed to gcc. Resulting in better gdb support. + +2003-01-14 Gaius Mulley + + * added the C `double' math built-ins + * fixed path in Make-lang.in which caused `file not found + error' during build + * updated documentation to show correspondance between C and + M2 data types. + * fixed bug in M2SubExp.mod shown by indirect procedure calls + * fixed bug in M2Constants.mod + * introduced SHORTREAL data type and removed the pseudo module + MATH as built-ins are handled via gcc backend. + * removed corresponding gm2-compiler/M2Math module. + +2003-01-11 Gaius Mulley + + * changed ebnf to allow empty variant clauses in a case + statement. Now complies with ISO case statement syntax. + (Bug reported by Iztok Kobal) + +2003-01-09 Gaius Mulley + + * initial checkin of complete built-in function support + to obvious C functions. + * gm2-libs/libc.c, gm2-libs/libc.def:: modified reference + to cfree to free as suggested by John Calley + +2003-01-02 Gaius Mulley + + * fixed bug reported by Matthias Manhart + (procedure type). + diff --git a/gcc/m2/ChangeLog-2004 b/gcc/m2/ChangeLog-2004 new file mode 100644 index 00000000000..6501854b772 --- /dev/null +++ b/gcc/m2/ChangeLog-2004 @@ -0,0 +1,396 @@ +2004-12-22 Gaius Mulley + + * more fixes to enable to the Z type to work. + * introduced GetM2ZRealType which maps onto the largest + real type tree. + * 24 regression test failures out of 2148 on the Opteron LP64 + 9 fail within ulm libraries (Procedure/Module scope nesting). + 15 fail with ISO import/export of enumeration types. + * exactly the same regression test failures on 32 bit i386 + implementation. + * fixed regression test path, all tests are build and run + using gm2-harness-0.3 + +2004-11-29 Gaius Mulley + + * internal changes to ordinal type which now use the Z + type (long_long_int) for internal calculations before + being converted into the actual ordinal type at assignment + to a variable or procedure parameter or return value. + * works on a 32 bit i386 but fails on the Opteron LP64 model. + +2004-11-22 Gaius Mulley + + * compiler now checks for overflow at compile time + when constructing constant expressions. + +2004-11-17 Gaius Mulley + + * fixed ppg to generate a comment for in-built rules when + producing the EBNF documentation within gm2.texi + * updated gm2/gm2.texi to reflect availability of the + gm2-harness which will build and test gm2 automatically. + +2004-11-12 Gaius Mulley + + * fixed bug reported by John B. Wallace, Jr + concerning negating a LONGINT constant + (see testsuite/gm2/pim/run/TestLong[34].mod). + * updated gm2/TODO list + * gm2/gccgm2.c added functions to determine the size necessary + for a Modula-2 constant. + * gm2/gm2.texi modified documentation to reflect the ISO rules + concerning importing enumerated types. + * gm2/gm2-compiler/SymbolTable.mod fixed possible buffer overflow + and integrated MakeConstLit with the changes to gccgm2.c. + * minor modifications made to gm2/gm2-libs-pim/README.texi + * moved a number of regression tests into pass/fail directories + to reflect the expected ISO enumeration behaviour. Note + that many of these now fail. + +2004-11-05 Gaius Mulley + + * fixed bug reported by John B. Wallace, Jr + concerning assignment of a constant to a LONGINT + (see testsuite/gm2/pim/run/TestLong.mod). + Creation of LONGINT and LONGCARD constant literals + was broken for values > MAX(INTEGER). + +2004-10-29 John B. Wallace, Jr + + * fixed infinite loop when calling StrToLongInt. + * contributed test code testsuite/gm2/pim/run/TestLong.mod + +2004-10-26 Gaius Mulley + + * fixed -Wpedantic-param-names option. + * added runtime tests and also parameter switch tests + * added testsuite/gm2/switches/pedantic-params + * added testsuite/gm2/pim/run and a number of old m2f tests + * made compiler check to see that opaque types are really + equivalent to a pointer type if -Wextended-opaque is absent. + * added testsuite/gm2/switches/extended-opaque/{pass,fail} + to stress this check. + +2004-10-19 Gaius Mulley + + * added -Wpedantic-param-names option to check that + parameters to procedures declared in definition modules + have identical names to their implementation module + procedure counterparts. + * fixed bug report by Iztok Kobal. The compiler would + crash when a constant was assigned to a procedure. + +2004-10-18 Gaius Mulley + + * modified gm2/lang-specs.h to make the front end run + with only the -S option. No longer requires -S -c. + Bug reported by john o goyo . + +2004-10-12 Diego Rodr=EDguez Rodr=EDguez + + * gm2/Make-lang.in introduced gm2.install rule so that + GNU Modula-2 can be installed without overwriting an + existing installation of gcc. + * gm2/README updated to explain how to only install gm2. + +2004-10-12 Gaius Mulley + + * fixed bug reported by John B. Wallace, Jr + . See testsuite/gm2/pim/run/pass/str6.mod. + +2004-10-07 Gaius Mulley + + * fixed bug reported by Iztok Kobal, + GNU Modula-2 now allows a RETURN statement in the + initialization section of the module. + * fixed another bug reported by Iztok Kobal, + binary and unary large set operators failed when + handling constant set values. + +2004-09-20 Gaius Mulley + + * fixed varient record bug as reported by John B. Wallace, Jr + . See testsuite/gm2/pim/pass/varient.mod. + +2004-09-16 Gaius Mulley + + * fixed bug in gm2/gm2-compiler/Indexing.mod which + occurred after the p2c translation. + * in turn this fixed a gm2m problem. The bug resulted in + touching memory which would not have been malloced so + this fix may have cured a number of problems. + +2004-09-14 Gaius Mulley + + * fixed the ncurses definition module and WindowDevice module. + * fixed M2RTS:Termination to call termination procedures in + reverse. + +2004-09-07 Gaius Mulley + + * tidied up gm2-compiler/M2Base.mod and introduced + compatability matrices which include all the base + types. + +2004-09-03 Gaius Mulley + + * introduced SHORTINT and SHORTCARD data types. + * added ncurses.def example in examples/ncurses + +2004-08-31 Gaius Mulley + + * modified SIZE handling so that SIZE is only available + from SYSTEM when -Wpim2 is present. + * fixed bug as reported by "John B. Wallace, Jr." + . A variable which when implicitly + imported via an IMPORT module; failed. + The variable was not being declared correctly by the + GNU Modula-2 front end to the GCC back end. + +2004-08-27 Gaius Mulley + + * added new switch -Wpim2 to stipulate the Modula-2 PIM-2 + dialect. + * Made SIZE pervasive for ISO Modula-2 and PIM-[34] Modula-2 + As reported by Diego Rodríguez Rodríguez . + SIZE can be imported from SYSTEM when -Wpim2 is present. + * removed the association with ".def" and "@modula-2" + inside gm2/lang-specs.h as this conflicts with shared library + file extension .def used by gcc. Bug reported by Gerrit P. Haase + . + +2004-08-26 Gaius Mulley + + * implemented type PROCESS for SYSTEM in the pim library + directory (gm2/gm2-libs-coroutines). + * SYSTEM implements NEWPROCESS, TRANSFER, IOTRANSFER. + This is achieved by using the GNU pthread library context + mechanism. + * provided an Executive and TimerHandler module in + (gm2/examples/executive). + * many bug fixes and regression tests show that 3 ulm standard + library modules fail. + * implemented MAX(REAL), MIN(REAL) and also provided access to + three more gcc builtin functions: huge_val, huge_vall, huge_valf + * started work on a Logitech 3.0 compatible library. + +2004-07-06 Gaius Mulley + + * improved error handling of unknown objects in EXPORT lists. + * added regression test + * implemented a few procedures in the ISO libraries. + +2004-07-02 Gaius Mulley + + * fixed many IMPORT bugs in inner modules + +2004-06-30 Gerrit Haase + + * cygwin patch for gm2/Make-lang.in + +2004-06-29 Gaius Mulley + + * fixed EXPORT of an object from an inner module into an + implementation module which EXPORTs the same object. + * fixed EXPORT of a procedure from an inner module into an + outer module which is not exported but is assigned to a + variable. + +2004-06-28 Gaius Mulley + + * made flex lexical analysers ignore carriage return + * fixed bug in M2Quads.mod checking parameter of + a const var before value was known. + * fixed local MODULEs so that they can FROM mod IMPORT + * tidied up some ulm implementation modules in ulm-lib-gm2/std + +2004-06-22 Gaius Mulley + + * allowed LONGCARD compatibility with INTEGER + * allowed LONGINT compatibility with CARDINAL + * allowed LONGCARD compatibility with CARDINAL + * allowed LONGINT compatibility with INTEGER + +2004-06-21 Gaius Mulley + + * fixed bug in constant set declaration + (see ulm library ulm-lib-gm2/std/Calendar.mod and + testsuite/gm2/pim/pass/setconst.mod and + testsuite/gm2/pim/pass/setconst2.mod) + * all regression tests pass on the Opteron port of gm2. + +2004-06-18 Gaius Mulley + + * implemented nested module within procedures. + This allows a few more ulm library modules to compile. + +2004-06-07 Gaius Mulley + + * renamed the -Wunbounded-by-reference option to + -funbounded-by-reference as suggested by Waldek Hebisch. + * finished ISO SYSTEM implementation. + * ROTATE, SHIFT now work with smaller than WORD sized sets, + WORD sized sets and larger than WORD sized sets. + * gm2-iso/SYSTEM.mod is called by the back end if larger than + WORD sized sets are ROTATEd or SHIFTed. + * updated gm2.texi to include new sections describing ISO and PIM + versions of the SYSTEM module. + * renamed m2.lex as m2.flex, c.lex as c.flex to fix a bug + reported by Gerrit Haase while attempting the cygwin port. + * renamed gm2-compiler/m2lex.def as gm2-compiler/m2flex.def + * modified gm2-compiler/M2Comp to use m2flex + * modified Make-lang.in to use m2.flex and c.flex + * modified init/h2definit, init/gm2linit to use m2flex + +2004-05-10 Gaius Mulley + + * gm2 now builds on FreeBSD 5.2.1 + * removed to_upper and to_lower in p2c + * made gm2/gm2-libs/configure and friends test for `strsignal' + * fixed initialization bug (missing memset) + in gm2/gm2-compiler/Indexing.mod + +2004-05-06 Gaius Mulley + + * added SHIFT and ROTATE into ISO SYSTEM and + made the compiler shift and rotate word and multi-word + set types. Multi-word set rotate and shifts are implemented + by calling ISO SYSTEM runtime procedures. Word sized sets or + smaller are implemented inline using shift/rotate instructions. + +2004-05-05 Gaius Mulley + + * fixed bug report by Paul Whittington + (see testsuite/gm2/link/pim/fail/import.mod). + +2004-04-30 Gaius Mulley + + * updated gm2.texi to reflect new options and changes to the + run-time system. + +2004-04-28 Gaius Mulley + + * introduced -Wunbounded-by-reference option which will make a + reference to non VAR unbounded data providing it is not written to + within the callee procedure. + * introduced -Wverbose-unbounded option which displays names of + unbounded parameters which the compiler will implement as + references even though they were specified as non VAR parameters. + +2004-04-27 Gaius Mulley + + * introduced -Wcase, -Wnil runtime checks + * introduced -Wcheck-all to enable all runtime flags + * updated documentation to refect new options + +2004-04-19 Gaius Mulley + + * added more address regression tests + * fixed address arithmetic bugs as reported by Waldek Hebisch + * fixed record referencing bug as reported by Waldek Hebisch + +2004-04-08 Gaius Mulley + + * tagged CVS using gm2_0_43 + +2004-04-07 Gaius Mulley + + * GM2 Release 0.43 + * The opteron port is finally integrated into CVS + * fixed bug in vararg parameter declaration which in turn.. + * fixed varargs within the opteron port + * checked in "work in progress" gm2/gm2-iso/COROUTINES.mod + +2004-04-06 Gaius Mulley + + * removed gm2-compiler/M2Stack.def gm2-compiler/M2Stack.mod + * made bnf/h2def.bnf 64 bit clean, but not fixed any bugs in h2def. + +2004-04-05 Gaius Mulley + + * fixed gm2.paranoid and all regression tests for the Opteron port + * checked in the opteron port which includes many changes + * int/word based types are now separated from pointer based types. + * modified p2c to use int for INTEGER and unsigned int for + CARDINAL rather than int and unsigned long. + * added gm2-compiler/M2StackWord and gm2-compiler/M2StackAddress + * added gm2-compiler/Indexing to handle arbitary sized arrays of + pointers. + * removed many INTEGER/CARDINAL <-> ADDRESS coersions + * fixed compiler to use new modules above (many changes) + * have moved away from M2Printf using WORD parameters to ARRAY OF + BYTE as this was not 64 bit clean + * fixed p2c to handle ARRAY OF BYTE correctly + * fixed gm2 to handle ARRAY OF BYTE correctly + +2004-04-01 Gaius Mulley + + * fixed record parameter equivalence bug as reported by Waldek + (see testsuite/gm2/pim/pass/record4.mod) + +2004-03-26 Gaius Mulley + + * fixed array type equivalence bug as reported by Waldek + (see testsuite/gm2/pim/pass/array2.mod) + +2004-03-25 Gaius Mulley + + * Implemented __FUNCTION__ keyword which is translated + into a string containing the name of the current visible + function. + * Retrofitted a function name into many of the runtime + procedures within M2RTS and added a new + procedure Halt to M2RTS. + +2004-03-18 Gaius Mulley + + * Implemented MIN and MAX for types LONGINT and LONGCARD + +2004-03-17 Gaius Mulley + + * GM2 Release 0.42 + * MinGW cross compilation port entered into CVS + * added -Wtarget-ar to gm2lcc.mod, gm2specs.c lang-specs.h + * added gm2/configure and associated files to determine + the whereabouts of target `ar'. + * added gm2/gm2-libs/configure and associated files to + test for target libraries, header files and C functions. + Required to implement the gm2-libs. + +2004-02-13 Gaius Mulley + + * GM2 Release 0.41 + * native sparc port passes make gm2.paranoid and make check-gm2 + * native i386 port passes make gm2.paranoid and make check-gm2 + * fixed bug in M2GenGCC.mod, coerced constant set parameter + values to correct set type. + * fixed bug in M2GenGCC.mod when assigning constant to an ISO WORD + +2004-02-10 Gaius Mulley + + * fixed bug in gccgm2.c CompareTrees should be tested for <= 0 + when testing for small set sizes. + * fixed Make-lang.in so that we only link gm2-compiler-boot/clex.o + during stage1. This build error showed up during cross building. + +2004-02-05 Gaius Mulley + + * fixed bug as demonstrated in + testsuite/gm2/pim/pass/subrange4.mod + * all regression tests now pass on the *86 platform + under Debian Woody. + +2004-02-05 Gaius Mulley + + * fixed more constant subrange bugs. + * added new quad to delimit the start of declaration + scope of a procedure. + * regression test failures reduced from 9 to 3. + +2004-01-03 Gaius Mulley + + * fixed bugs in forward and previous references within gm2.texi + * fixed more constant set conversion bugs which reduces + the number of regression failures from 15 to 9. + diff --git a/gcc/m2/ChangeLog-2005 b/gcc/m2/ChangeLog-2005 new file mode 100644 index 00000000000..795d8c76ffb --- /dev/null +++ b/gcc/m2/ChangeLog-2005 @@ -0,0 +1,535 @@ +2005-12-29 Gaius Mulley + + * corrections made to gm2/gm2.texi + +2005-12-24 Gaius Mulley + + * joined lines in gm2/tools-src/createUlmSys as + requested by Christoph + so that gm2 will build on netbsd 2.1. + * added time and tm to gm2/gm2-libs/libc.def. + * added partial implementation of + gm2/gm2-libs-pim/TimeDate.def + gm2/gm2-libs-pim/TimeDate.mod + +2005-12-22 Gaius Mulley + + * added gm2/gm2-libs-pim/Random.def and + gm2/gm2-libs-pim/Random.mod and + * modified gm2/Make-lang.in to install new module. + * remove Random from the TODO list. + +2005-12-21 Gaius Mulley + + * added gm2/gm2-libs-pim/Strings.def and + gm2/gm2-libs-pim/Strings.mod + * modified gm2/Make-lang.in to install new module. + +2005-12-19 Gaius Mulley + + * implemented logitech compatible library + gm2/gm2-libs-pim/RealConversions.def and + gm2/gm2-libs-pim/RealConversions.mod + * added regression test for RealConversions + testsuite/gm2/pimlib/logitech/run/pass/realconv.mod + * fixed regression test expect script to set the + library path correctly. + * updated gm2/gm2-libs.texi to reflect addition of + RealConversions.mods + * added gm2/gm2-libs-pim/FloatingUtilities.def + * added gm2/gm2-libs-pim/FloatingUtilities.mod + * increased number of builtin functions accessible to GNU Modula-2. + +2005-12-13 Gaius Mulley + + * gm2/gccgm2.c:default_conversion now checks the base type. + * gm2/gm2-compiler/M2GCCDeclare.mod: add Subrange types onto the + to do list, if they are not yet resolved. + +2005-12-10 Gaius Mulley + + * fixed Copyright in gm2/gm2-libs-pim library modules + * gm2/gm2-compiler/M2Quads.mod:BuildForToByDo allowed Z type by value. + * gm2/gm2-compiler/M2Quads.mod:BuildPseudoBy converted by value if type + is known. + * fixes a bug reported by: James V. Cox example given in + testsuite/gm2/pim/run/pass/EnumTest.mod + +2005-12-10 Gaius Mulley + + * fixed Copyright in gm2/gm2-libs-pim library modules + +2005-12-06 Gaius Mulley + + * fixed Copyright in University of Ulm modules and also p2c. + * heavily tidied up the p2c source tree. + +2005-12-05 Peter P. Eiserloh + + * contributed the gm2 manual page and associated Makefile + in the new subdirectory: gm2/man. + +2005-11-29 Gaius Mulley + + * fixed bug reported by John Wallace and Juan Reyes + concerning FOR loops with negative step values. + * added new runtime regression tests gm2/pim/run/pass/For[78].mod + to test these new changes. + * changes to gm2/gm2-compiler/M2Base.mod, gm2-compiler/M2Code.mod, + gm2/gm2-compiler/M2GenGCC.mod, gm2/gm2-compiler/M2Quads.mod + to ensure that the Negate operator works on large data types + LONGCARD contants are changed into LONGINT and overflow is + checked. + +2005-11-22 Gaius Mulley + + * modified ppg to take an extra parameter -f which emits the + Free Documentation License header when producing texinfo + ebnf rules. + * fixed many dates on source files. + +2005-11-21 Gaius Mulley + + * fixed many Copyright dates and GPL, LGPL and FDL license + issues. + * replaced gm2/ulm-lib-gm2/std/Storage.mod with an implementation + which uses malloc and free. This in turn fixes a runtime regression + test (hello world) now works with the Ulm libraries. + * fixed gm2/gm2.texi to include FDL notice and also fixed all + included texi files in the same way. + * added GPL, Modula-2 and Copyright notices to all gm2/tools-src + files. + +2005-11-15 Gaius Mulley + + * added more regression tests and + * completed the printing of set types within gdb + * completed the printing of array and subrange types within gdb + * made gdb print Modula-2 style CHARs and improved type printing + within gdb. + * rationalised the gdb and gcc patches within the gm2/patch + subdirectories. + * modified gm2-harness-0.6 to apply patches in order. + * minor fixes to gm2/gccgm2.c to give better type information. + * improved gdb section within gm2/gm2.texi + +2005-11-11 Gaius Mulley + + * fixed minor node bugs in gm2/gm2.texi, gm2/gpl.texi, gm2/gnu.texi + +2005-11-10 Gaius Mulley + + * added gm2/COPYING.LGPL + * changed all references of the old FSF address to the new address. + * fixed bugs reported by John Wallace (MAX(INTEGER), MAX(LONGINT), + MIN(INTEGER) and MIN(LONGINT)) were not correctly converted in + gm2/gm2-libs-pim/InOut.mod, gm2/gm2-libs/FpuIO.mod, + gm2/gm2-libs/NumberIO.mod. + * added new regression tests in + gm2/switches/pim4/run/pass/InOutBug.mod and + gm2/switches/pim4/run/pass/FpuIOBug.mod which perform regression + runtime tests. + +2005-11-07 Gaius Mulley + + * added gm2/COPYING and included licence information + inside gm2/gm2.texi + * added gm2/gnu.texi and gm2/gpl.texi and referenced + them from gm2/gm2.texi + +2005-11-06 Gaius Mulley + + * improved the gdb patches + +2005-11-03 Gaius Mulley + + * fixes to set types and subranges which in turn + when applied with the patches made to ../../gcc/dwarf2out.c + and also gdb/gdb/dwarf2read.c allow subranges and + set types to be debugged when using the dwarf2 format. + * included the patches to gcc-3.3.6 and gdb-6.3 under the + new directory gm2/patches + * fixed patch for gdb-6.3 + * updated gm2/gm2.texi + * released gm2-harness-0.6 which will automatically patch + gcc-3.3.6 and gdb-6.3, build and install these components. + * fixed warnings from within the gcc patch + +2005-10-14 Gaius Mulley + + * fixed set type debugging information. + Many changes to gm2/gccgm2.c and + minor changes to gm2/gm2-compiler/M2GenGCC.mod. + Debugging set types with gdb now works if -gstabs + are used on the command line of gm2 and also the + modified gdb-6.3 is used. + +2005-10-13 Gaius Mulley + + * fixed call to ranlib in gm2/gm2-compiler/gm2lcc.mod + +2005-10-10 Gaius Mulley + + * introduced an invocation to ranlib after producing the + archive to fix a linking bug on MacOS OS 10.3.9 reported + by: Thomas Ahn . + * propagated ranlib though the various subcomponents of + gm2: gm2/gm2spec.c gm2/lang-specs.h gm2/Make-lang.in + gm2/gm2-compiler/gm2lcc.mod gm2/gm2-compiler/M2Options.mod + +2005-10-07 Gaius Mulley + + * replaced MathLib.mod onto the list of ULM modules + which prior to installation. + * fixed ggc bug so that types are remembered and marked. + These types are declared in M2GCCDeclare.mod before + code generation takes place and do not experience the + `push_decl' function. + +2005-10-03 Michael H Lambert + + * removed $(LIBS) from the dependancies of cc1gm2 in + stage1, stage2 and stage3. + +2005-09-30 Gaius Mulley + + * fixed bug in gm2/gm2-libs/FpuIO.mod so that the sign is + not prepended to the string if the number is positive. + * fixed gm2/gm2-libs-pim/Break.c to use HAVE_STDLIB_H and + HAVE_MALLOC_H as detected by the configure script. + * removed ulm-lib-gm2/std/MathLib.mod from the build + process as a temporary work around to get gm2 working + under opendarwin. + +2005-09-27 Gaius Mulley + + * finally fixed _toupper porting problem in p2c as reported + by Thomas Ahn , Ed Smith-Rowland + <3dw4rd@verizon.net>, John o goyo , + Eduardo Abela , John Calley + and many others. + * finally fixed the linking problem when building under + opendarwin. I suspect this will fix the same problems + under MacOS. + +2005-09-16 Gaius Mulley + + * implemented -Wpositive-mod-floor-div option + * updated gm2/gm2.texi and added many switch testing + regression tests. + +2005-09-13 Gaius Mulley + + * implemented REM + * implemented MOD, DIV, / as per ISO, PIM2, PIM3, PIM4 + * updated gm2/gm2.texi documentation to reflect the rules + +2005-09-12 Gaius Mulley + + * fixed bug reported by John B. Wallace, Jr + testsuite/gm2/pim/options/bounds/fail/IdentifierBug.mod + * fixed bug reported by John B. Wallace, Jr + testsuite/gm2/testsuite/gm2/pim/pass/ABSBug.mod + * fixed bug reported by John B. Wallace, Jr + testsuite/gm2/pim/run/pass/FpuIOBug.mod + +2005-09-06 Gaius Mulley + + * fixed bug reported by John B. Wallace, Jr + gm2-libs/StringConvert.mod incorrect assumption of negative valued + modulus operator. + * added testsuite/gm2/pimlib/{logitech, ulm} with tests to check + that programs can be linked against logitech and the ulm libraries. + * added testsuite/gm2/pim/run/pass/modulus.mod which tests for + various division and modulus cases. + +2005-09-01 Gaius Mulley + + * implemented -Wdef=extension and -Wmod=extension switches + into GNU Modula-2 compiler and subcomponents (gm2l and gm2m). + * documented the new switches in gm2/gm2.texi + +2005-08-09 Gaius Mulley + + * fixed nested WITH statement bug and added + * testsuite/gm2/pim/run/pass/nestedwith.mod to regressively + check the fix. + +2005-08-08 Gaius Mulley + + * fixed many bugs in gm2/gm2-libs-coroutines/SysVec.mod + * minor updates to gm2/gm2-libs-coroutines/TimerHandler.mod + +2005-07-26 Gaius Mulley + + * modified debian directory so that 0.49 can be built as + a debian package + +2005-07-25 Michel Derosa + + * fixed malloc.h include for BSD based systems in + gm2/gm2-libs-pim/Break.c + +2005-07-21 Gaius Mulley + + * moved gm2/examples/executive/Executive, TimerHandler, Debug, + SysVec to gm2/gm2-libs-coroutines and + * made gm2/Make-lang.in install these modules + * removed the -Wulm option and replaced it with -Wlibs=ulm + * added -Wlibs=logitech, -Wlibs=pim, -Wlibs=iso, + -Wlibs=pim-coroutine + * altered gm2/Make-lang.in so that the correct library modules + are placed into the correct directories during install. + +2005-07-20 Gaius Mulley + + * fixed bug exposed by: testsuite/gm2/pim/pass/maxlongint.mod + * modified IsMathType in gm2/gm2-compiler/M2Base.mod accordingly. + +2005-07-18 Gaius Mulley + + * updated gm2/gm2.texi and gm2/gm2-libs.texi + * introduced modules Delay, ErrorCode, DebugTrace + and Break into gm2/gm2-libs-pim + * modified gm2/Make-file.in so that these modules + are built and installed. + +2005-07-14 Gaius Mulley + + * GM2 Release 0.49 + * tagged CVS using gm2_0_49 + + * introduced SHORTCARD into p2c + * added gm2/gm2-libs-pim/CardinalIO.def and + gm2/gm2-libs-pim/CardinalIO.mod + * added a number of procedures to implement CardinalIO.mod + in gm2/gm2-libs/StringConvert.mod + * improved gm2/gm2.texi + * modified gm2/Make-file.in so that the library modules + in gm2/gm2-libs-pim are also built and installed + +2005-07-10 Gaius Mulley + + * constant literal string array assignment of smaller sizes to + array variables and parameters. + +2005-07-09 Gaius Mulley + + * implemented MAX(ADDRESS) and MIN(ADDRESS) + +2005-07-08 Gaius Mulley + + * finally all ulm modules compile under GM2 + * fixed negative integer bug which was exposed in the 32 bit port + of gm2 when compiling testsuite/gm2/pim/pass/setoverflow.mod + and also gm2/ulm-lib-gm2/std/TimeIO.mod + +2005-07-06 Gaius Mulley + + * fixed a number of bugs relating to gm2 failuring to compile + gm2/ulm-lib-gm2/std/TimeIO.mod. Nested modules within + procedures exporting variables. + * alterations include correct type declaration ahead of + variable creation. + * creating all variables in the outer most procedure scope + if these variables are exported from inner modules. + * also fixed gm2/gccgm2.c so that pointer to sets are cast + into a generic ptr + * also fixed offset into sets (which had assumed sets started + with an element value zero). + +2005-06-22 Gaius Mulley + + * fixed bug reported by John O Goyo + multiple indexed arrays were internally defined incorrectly + and did not allow users to mix array indices by a[x,y,z] and + a[x][y,z] etc as per PIM and ISO specification. + see testsuite/gm2/pim/pass/index.mod and + testsuite/gm2/pim/pass/index2.mod and + testsuite/gm2/pim/run/pass/index3.mod + +2005-06-20 Gaius Mulley + + * added code to treat LOC as a system type in parameter + passing. + +2005-06-17 Gaius Mulley + + * fixed bug reported by John O Goyo + CAST of different sized variables would fail. + * added new switch -Wpedantic-cast which warns if a cast + is converting a variable of a different size to the type. + +2005-06-08 Gaius Mulley + + * fixed bug which occurred if a constant set was created + in a procedure through the CONST construct. + * fixed a number of -Wextended-opaque issues in gm2/bnf/m2-h.bnf + * modified gm2/Make-lang.in to use -Wextended-opaque (for testing) + +2005-06-07 Gaius Mulley + + * fixed bug which occurred if an enumerated type field + was imported by another module. + (See testsuite/gm2/pim/pass/set10.mod) + * fixed circular dependancy bug in record generation. + +2005-06-03 Gaius Mulley + + * reverted some of the changes made to the ulm libraries + in the light of fixing arrays with huge indices. + * mofified gm2/bnf/m2-h.bnf so that expressions within + statement sequences are ignored. + +2005-06-02 Gaius Mulley + + * gm2/gccgm2.c fixed BuildArrayIndexType so that gm2 can build + arrays which have huge indices. This removes a failure from + the regression tests on systems which have a 32 bit long. + +2005-06-01 Gaius Mulley + + * gm2/Make-file.in altered grep -e to aid portability under + Solaris (as reported by john o goyo ). + * gm2/examples/server added example of a threaded server + which uses the executive, transfer and iotransfer. + * gm2/examples/executive/Executive added KillProcess. + * gm2/gm2-libs-coroutines/SysVec.mod fixed vector selection + bug. + +2005-05-27 Gaius Mulley + + * gm2/gccgm2.c fixed to detect array indices which exceed + sizetype. + * gm2/lang-specs.h fixed to propagate the -Wcpp flags though + to gm2 subcomponents. + +2005-05-25 Michel Derosa + + * applied patches to gm2/gm2.texi which describe FreeBSD + build instructions. + +2005-05-19 Gaius Mulley + + * rebuilt gm2/gm2-libs/configure + * gm2/gm2.texi added section heading for advice on building + GNU Modula-2 under FreeBSD 5.3 + +2005-05-19 Michel Derosa + + * applied patches to make gm2 build on FreeBSD 5.3 + * gm2/gm2-libs/configure.in test for signal.h and direct.h + * gm2/gm2-libs/gm2-libs-host.h.in test for signal.h and direct.h + * gm2/tools-src/createUlmSys test for signal.h and direct.h + +2005-05-18 Gaius Mulley + + * testsuite/gm2/types/run/pass/varient5.mod introduced to stress + variant records (equivalent to a C union for casting BYTES + into a CARDINAL). Based on an idea from Michel Derosa. + +2005-05-17 Gaius Mulley + + * gm2/gm2-compiler/M2Quads.mod modified to accept zero length strings + as compatible with type CHAR. + * gm2/gm2-compiler/M2GenGCC.mod many modifications/refactoring to enable + strings of 1 or 0 characters to be type compatible with CHAR. + * these fixes allow Iztok's ISO library to compile cleanly. + +2005-05-16 Gaius Mulley + + * gm2/gm2-compiler/M2GenGCC.mod fixed to allow HIGH(ch) where ch is + of type CHAR. + * gm2/gm2-compiler/M2GenGCC.mod fixed to allow comparison of literals + against subrange types. + * gm2/gm2-compiler/M2GenGCC.mod fixed to allow automatic conversion + of strings of 1 or 0 characters to be passed to a parameter of + type CHAR. + * these fixes allow more of the third party tests (from Iztok) + to pass. + +2005-05-13 Gaius Mulley + + * gm2/Make-lang.in shell invocation to use $(SHELL) and also + converted bashisms into pure sh as suggested by + Michel Derosa + +2005-05-12 Gaius Mulley + + * gm2/gm2-compiler/SymbolTable.mod and gm2/gm2-compiler/P2SymBuild.mod + modified to detect double declaration on import and produce useful + error messages. + * gm2/Make-lang.in fixes to the gm2.install rule. + * gm2/gm2-compiler/M2Quads.mod fixed BuildStaticArray to calculate + indices using INTEGER data type. + +2005-05-11 Gaius Mulley + + * P2SymBuild.mod added call to CheckForEnumerationInCurrentModule + to fix 5 regression tests and allow enumeration types to be + visible when aliased via TYPEs and later IMPORTed. + (see testsuite/gm2/pim/pass/impf.mod) + +2005-05-10 Gaius Mulley + + * major changes which now allow GM2 to compile nested varient records + (such as found in gm2/ulm-lib-gm2/std/RTErrors.def) + * added runtime regression test in testsuite/types/run/pass + * gm2/Make-lang.in modified to include RTErrors.mod to be built with + the ulm libraries. Grammer files are built without the -l option to pge. + * gm2/gccgm2.c new functions gccgm2_BuildOffset1 determinePenultimateField + which implement modifications to record/varient field calculation. + * gm2/gm2.texi contains gm2 internal documentation on how the front end + symbol table represents records, field and varient records. + * gm2/bnf/m2-2.bnf removed commented out code. + * gm2/examples/map/Makefile builds the utility semantic. + * gm2/gm2-compiler/M2Base.mod modifications to reflect change in PutFieldRecord + * gm2/gm2-compiler/M2GCCDeclare.mod added debugging procedures PrintVerbose + and PrintSymbol, which can be called interactively from gdb. Also fixed + varient record declaration. + * gm2/gm2-compiler/M2GenGCC.mod fixed varient record field calculation. + * gm2/gm2-compiler/M2Quads.mod changed operands to OffsetOp. + * gm2/gm2-compiler/M2SubExp.mod changes to reflect OffsetOp change. + * gm2/gm2-compiler/P2SymBuild.mod changed to allow nested varient records. + * gm2/gm2-compiler/SymbolTable.[def, mod] changes to varient record + representation. Fixed memory leak. + * gm2/gm2-compiler/gccgm2.def changed BuildOffset and added BuildOffset1 + * gm2/ulm-lib-gm2/std/RTErrors.def changed parameter name to match + implementation module. + * gm2/ulm-lib-gm2/std/RTErrors.mod fixed pointer/integer constant type clash. + +2005-04-11 Gaius Mulley + + * fixed examples/executive + +2005-03-24 Gaius Mulley + + * included the keyword MODULE as an stop set element + in gm2m and gm2l. + +2005-03-15 Gaius Mulley + + * GM2 Release 0.44 + * tagged CVS using gm2_0_44 + +2005-03-14 Gaius Mulley + + * finished tools-src/createUlmSys which builds a SYSTEM.c + (from ./configure results) ULM library compatible interface. + * modified Make-lang.in to install the ULM libraries. + * added new switch -Wulm which modifies the default search + path so that the ULM libraries are included. + +2005-01-05 Gaius Mulley + + * fixed bug reported by john o goyo . + (testsuite/gm2/pim/run/pass/Countdown.mod) + * for loops are now implemented as per ISO description. + GNU Modula-2 now calculates the last iteration value + before the start of a loop. It then initializes the + iteration value and works towards the final value, + rather than testing to see whether the iteration value + exceeds or preceeds the limit value (this fails when using + a CARDINAL iterator and stopping at 0). + * added a number of run tests to exercise these changes. + diff --git a/gcc/m2/ChangeLog-2006 b/gcc/m2/ChangeLog-2006 new file mode 100644 index 00000000000..29718ed206f --- /dev/null +++ b/gcc/m2/ChangeLog-2006 @@ -0,0 +1,388 @@ +2006-12-25 Gaius Mulley + + * gm2/Make-file.in: fixed conditional building of library files. + Bug reported by Michael Lambert . + +2006-12-21 Gaius Mulley + + * gm2/Make-lang.in: fixed manual page installation. + * gm2/lang-options.h: include -Wlibs=min option. + * gm2/gm2-libs-min/libc.c: added parameters to functions. + * gm2/gm2-libs-min/libc.def: added. + +2006-12-20 Gaius Mulley + + * gm2/gm2-libs-min: added + * gm2/gm2spec.c: modified to relect introduction of -Wlibs=min + * gm2/gm2.texi: document -Wlibs=min + * gm2/config-lang.in: include gm2cc to be installed + * GNU Modula-2 can be built as a cross compiler for the avr + microprocessor. + +2006-12-18 Gaius Mulley + + * gm2/www/index.ms: updated web page to reflect G5 successful + make gm2.paranoid using gcc-3.3.6 and CVS + tag D2006.06.23.04.00.00 + * gm2/gccgm2.c: use integer_type_node instead of boolean_type_node + as the size of boolean_type_node can differ from the + size of an integer_type_node. + * make gm2.paranoid works on LP64 opteron with a patched gcc-4.1.0 + +2006-12-17 Gaius Mulley + + * fixed line number debugging information at the end of a + function. + +2006-12-05 Gaius Mulley + + * gm2/gm2-compiler/M2Quads.mod: BuildCastFunction allow arrays + to be cast. + * testsuite/gm2/iso/stringchar.mod: fixed typos. + * gm2/gm2-compiler/M2Quads.mod: BuildDynamicArray, + BuildStaticArray, BuildDesignatorArray all SkipType to allow + type equivalence between arrays. + +2006-11-02 Gaius Mulley + + * gm2/lang-specs.h: use gm2cc rather than the gcc driver. + * gm2/gm2-compiler/gm2lcc.mod: also use gm2cc rather + than gcc. + * gm2/gm2-compiler/gm2lcc.mod: corrected extern + declaration of exit. + * gm2/Make-lang.in: generate gm2cc from xgcc and install + it correcly. + * testsuite/gm2/pim/options/optimize/run/pass/gm2.exp: fixed + library module build. + +2006-10-20 Gaius Mulley + + * gm2/gccgm2.c: fixed building of constants strings. + Constants are also placed into the global scope so + that they are not garbage collected. + * gm2/M2GenGCC.mod: CodeXIndr handle special case of + null string. + * gm2/Make-lang.in: add automatically generated modules + to the verify12 rule. + * added a string assignment regression test. + +2006-10-19 Gaius Mulley + + * www/index.ms: updated gm2-harness release to 0.96. + * gm2/gm2-compiler/SymbolConversion.mod: Poison must + not check for gcc poisoning as it is called after a + function has been emitted and potentially poisoned. + +2006-10-18 Gaius Mulley + + * gm2/gm2-config.in: added. + * gm2/Make-lang.in: include gm2/gm2-config. + * gm2/configure.in: generate gm2/gm2-config. + * backed out above changes + +2006-10-17 Gaius Mulley + + * gm2/aclocal.m4: added. + * gm2/configure: rebuilt. + +2006-10-14 Gaius Mulley + + * gm2/Make-lang.in: minor fixes to build manual pages. + +2006-10-13 Gaius Mulley + + * gm2/gccgm2.c: call gimplify_function on all + functions. + * gm2/Make-lang.in: added ability to optionally build + the ulm libraries which matches gm2-harness-0.94. + +2006-10-12 Gaius Mulley + + * gm2/patches/gcc/4.1.1/01.gaius_patch_gcc: added. + +2006-10-07 Gaius Mulley + + * gm2/gccgm.2c: fixed conditional goto expressions. + +2006-10-04 Gaius Mulley + + * gm2/gccgm.2c: added debugging stub. + +2006-10-03 Gaius Mulley + + * gm2/gm2-compiler/M2GenGCC.mod: fixed BuildEnd + to use IsProcedureGccNested in CodeKillLocalVar. + * gm2/gm2-compiler/M2GCCDeclare.def: + export IsProcedureGccNested. + +2006-10-01 Gaius Mulley + + * gm2/gm2-compiler/M2GenGCC.mod: modified BuildEnd + to taken an extra parameter, nested, and set it + accordingly. + +2006-09-30 Waldek Hebisch + + * gm2/gccgm2.c: (gccgm2_BuildEndFunctionCode) only + call gimplify_function_tree and cgraph_finalize_function + if the procedure is not nested. + +2006-09-29 Gaius Mulley + + * removed execute permissions for source files. + * gm2/patches/gcc/4.1.0/01.gaius_patch_gcc: improved. + * gm2/gccgm2.c: fixed comment. + +2006-09-20 Gaius Mulley + + * gm2/patches/4.1.0/01.gaius_patch_gcc: added. + +2006-09-19 Gaius Mulley + + * huge amount of changes to bring gm2 up to gcc-4.1.0 and + also make it build with gcc-4.1.0. + * modified gm2/ + Make-lang.in config-lang.in configure.in gccgm2.c + gm2-common.h gm2-lang.c gm2-lang.h gm2-tree.h gm2.texi + gm2builtins.c gm2spec.c lang-specs.h bnf/m2-3.bnf + examples/server/sckt.c examples/server/sckt.def + gm2-compiler/M2Comp.mod gm2-compiler/M2GCCDeclare.mod + gm2-compiler/M2GenGCC.mod gm2-compiler/M2Options.def + gm2-compiler/M2Options.mod gm2-compiler/M2Preprocess.mod + gm2-compiler/gccgm2.def gm2-compiler/gm2.mod + gm2-compiler/gm2lgen.mod gm2-libs/ASCII.def gm2-libs/ASCII.mod + gm2-libs/Args.def gm2-libs/Debug.def gm2-libs/IO.mod + gm2-libs/SYSTEM.mod gm2-libs/StdIO.mod gm2-libs/StrLib.mod + gm2-libs/StringConvert.def gm2-libs/libc.def + gm2-libs-coroutines/KeyBoardLEDs.c + gm2-libs-coroutines/Makefile gm2-libs-coroutines/SysVec.mod + gm2-libs-coroutines/TimerHandler.mod p2c/p2c.h + p2c/p2c-src/src/makeproto.c p2c/p2c-src/src/p2c-config.h + p2c/p2c-src/src/p2clib.c tools-src/mklink.c www/index.ms + * added files: + gm2/gm2-common.c gm2/gm2-tree.def gm2/lang.opt + +2006-08-31 Gaius Mulley + + * gm2/gm2-libs/ASCII.def: changed EOL to equal to nl rather + than cr. + +2006-08-10 Gaius Mulley + + * fixed ASM statement. + * gm2/bnf/m2-3.bnf: fixed Pass3 and Pass2 const + * gm2/gccgm2.c: modified gccgm2_BuildAsm to use add_stmt + rather than expand_asm_expr. + +2006-08-09 Gaius Mulley + + * GM2 Release 0.53 + * changed release number in configure.in, gm2.texi, Make-lang.in + * builds with gcc-4.1.0 + +2006-08-08 Gaius Mulley + + * GM2 Release 0.52 + * tagged CVS using gm2_0_52 + * gm2/NEWS updated + * changed release number in configure.in, gm2.texi, Make-lang.in + * rebuilt configure + +2006-08-07 Gaius Mulley + + * gm2/www/index.ms: updated to reflect release of gm2-harness-0.9 + +2006-06-23 Gaius Mulley + + * gm2/www/index.ms: updated to reflect release of gdb-6.5 which + contains enhanced Modula-2 language support. It also + documents that gm2-harness-0.8 has been released. + +2006-05-22 Gaius Mulley + + * gm2/www/index.ms: updated to reflect sparc build success from + John O Goyo + +2006-05-04 Gaius Mulley + + * implemented __INLINE__ + * gm2/gccgm2.c: modified to inline procedures if requested. + * gm2/m2.flex: added new keyword __INLINE__ + * gm2/gm2-compiler/M2Reserved.def + * gm2/gm2-compiler/M2Reserved.mod: added new keyword __INLINE__ + * gm2/gm2-compiler/P1SymBuild.mod: builds inlined procedure + * gm2/gm2-compiler/M2GenGCC.mod: passes front end inlined procedure + to gccgm2. + +2006-04-24 Gaius Mulley + + * GM2 Release 0.51 + * tagged CVS using gm2_0_51 + * gm2/NEWS updated + * rebuilt configure + * finished implementing declaration of variables at addresses. + * modified gm2/bnf/m2-3.bnf, gm2/gm2-compiler/M2Quads, + gm2/gm2-compiler/SymbolTable.mod, gm2-compiler/P3SymBuild.mod + +2006-04-22 Gaius Mulley + + * implemented the declaration of a variable at an address. + * modified gm2/bnf/m2-3.bnf, gm2/bnf/m2-2.bnf, gm2/gm2-compiler/M2Quads.mod + +2006-04-21 Gaius Mulley + + * added testsuite/gm2/pim/pass/varaddress.mod + * modified gm2/bnf/m2.bnf, gm2/bnf/m2-2.bnf, gm2/bnf/m2-3.bnf, + gm2/bnf/m2-h.bnf to allow parsing of variables declared at addresses. + +2006-04-19 Gaius Mulley + + * added testsuite/gm2/pim/pass/sets5.mod + * fixed bug report by John O Goyo + * (testsuite/gm2/pim/pass/sets5.mod and testsuite/gm2/pim/pass/sets4.mod) + +2006-04-19 Gaius Mulley + + * added testsuite/gm2/pim/pass/sets5.mod + * fixed bug report by John O Goyo + * (testsuite/gm2/pim/pass/sets5.mod and testsuite/gm2/pim/pass/sets4.mod) + +2006-03-25 Gaius Mulley + + * added testsuite/gm2/pim/pass/sets4.mod + * gm2/gm2-compiler/P2SymBuild.mod: added more robust error detection + * gm2/gm2-compiler/M2GenGCC.mod: added more robust error detection + +2006-03-17 Gaius Mulley + + * added successful build reports to the web page + +2006-02-21 Gaius Mulley + + * gm2/gm2.texi: fixed new urls and added missing escaped @ + * gm2/gm2-libs.texi: rebuilt + * gm2/gm2-iso/README.texi: fixed typo + +2006-02-20 Gaius Mulley + + * gm2/NEWS updated + +2006-02-13 Gaius Mulley + + * GM2 Release 0.50 + * tagged CVS using gm2_0_50 + * gm2/NEWS: added, which contains news of user visible changes. + * gm2/Make-lang.in: updated version number + * gm2/gm2.texi: updated gm2 release number to 0.50 and gm2-harness number to 0.7 + and improved install section. + * gm2/www: added homepage documents + +2006-02-10 Gaius Mulley + + * gm2/ulm-lib-gm2/std/GetPass.mod: modified to work with: + * gm2/ulm-lib-gm2/sys/termios.def: new definition module for C + * gm2/ulm-lib-gm2/sys/termios.c: portable implmentation module for termios + interface + * gm2/ulm-lib-gm2/sys/SysTermIO.def: Modula-2 interface to the underlying + termios library. + * gm2/ulm-lib-gm2/sys/SysTermIO.mod: Modula-2 interface to termios.c. + * all regression tests pass on LP64 + +2006-02-07 Gaius Mulley + + * fixed copyright notices for all ISO definition modules in + gm2/gm2-iso. + +2006-01-23 Gaius Mulley + + * gm2/gm2-compiler/M2Options.mod: allow -p option. + * gm2/gm2-compiler/M2Quads.mod: remove call to stress stack during + Initialization + +2006-01-17 Michael H Lambert + + * testsuite/gm2/iso/pass/realbitscast.mod: modified to detect whether + it is being run under alpha and 64 bit architecture. + * testsuite/gm2/cpp/pass/subaddr.mod: modified to detect whether + it is being run under alpha and 64 bit architecture. + +2006-01-17 Gaius Mulley + + * gm2/gm2-compiler/M2GenGCC.mod: coerse constants passed to parameter + of SYSTEM types. Fixes the make gm2.paranoid on ppc architecture. + * testsuite/gm2/iso/pass/realbitscast.mod: modified to detect whether + it is being run under ia64 architecture. + * testsuite/gm2/cpp/pass/subaddr.mod: modified to detect whether + it is being run under ia64 architecture. + +2006-01-16 Gaius Mulley + + * gm2/gccgm2.c: altered INCL, EXCL and bit tests so that they subtract the + low value of the subrange before performing the bit operation. + * testsuite/gm2/pim/run/pass/setcritical.mod to test bugfix. + * gm2/gm2-compiler/gm2lcc.mod: added -B option + * gm2/lang-specs.h: pass -B option to gm2lcc + +2006-01-10 Gaius Mulley + + * fixed INTEGER, SHORTINT and LONGINT so that they all + call upon gccgm2_GetM2 rather than their C counterparts. + * fixed constant overflow on 32 bit address architectures when + compiling arrayhuge.mod and arrayhuge2.mod (as reported by + Michael H Lambert ) + * M2Code.mod::Code: call FlushWarnings and FlushErrors after StartDeclareScope + which flushes errors before code generation starts. This fixes + a timeout bug in the regression tests reported by + (John B Wallace Jr ). + * M2GenGCC.mod::CodeSavePriority: introduced PriorityDebugging and turned + off debugging messages + * M2GenGCC.mod::CodeRestorePriority: introduced PriorityDebugging and turned + off debugging messages + * all regression tests now pass on GNU/Linux i386 (Debian Sarge) + * gm2/gm2-compiler/M2Quads.mod::LoopAnalysis:fixed bug in while loop + * corrected testsuite/gm2/errors/fail/testimport.mod to include a double import. + +2006-01-09 Gaius Mulley + + * fixed LONGINT/LONGCARD bugs so that + testsuite/gm2/switches/pim4/run/pass/FpuIOBug.mod now passes. + LONGINT and LONGCARD are declared as long long int and + long long unsigned int respectively. + * updated gm2/gm2.texi to reflect changes in LONGINT and LONGCARD. + +2006-01-08 Gaius Mulley + + * modified examples to utilize the module priority mechanism. + +2006-01-06 Gaius Mulley + + * improved implementation of module priorities so that + only externally accessible procedures save and restore + interrupts. + * added testsuite/gm2/pimlib/coroutines/pass/priority3.mod and + testsuite/gm2/pimlib/coroutines/pass/priority3.def to test exporting + of procedures which need to save and restore interrupt priorities. + +2006-01-05 Gaius Mulley + + * gm2/Make-lang.in: removed GM2_DIRS from the dependancies of + various rules, which in turn removed a number of "build loops" + * gm2/config-lang.in: removed reference to gm2/p2c/p2c-src/examples/Makefile + +2006-01-04 Gaius Mulley + + * implemented module priorities. + * implemented gm2/gm2-libs-pim/TimeDate.mod + * added testsuite/gm2/pimlib/coroutines/pass/priority.mod, + testsuite/gm2/pimlib/coroutines/pass/priority2.mod and + testsuite/gm2/pimlib/logitech/run/pass/timedate.mod + * included TimeDate to be installed as part of the pim + libraries. + +2006-01-03 Michael H Lambert + + * fixed typo in gm2/gm2.texi + * added __ppc__ ifdefs into testsuite/gm2/iso/pass/realbitscast.mod + so that it ignores the REAL96 test on the G5 + * added __ppc__ ifdefs into testsuite/gm2/switches/pim4/run/pass/FpuIOBug.mod + diff --git a/gcc/m2/ChangeLog-2007 b/gcc/m2/ChangeLog-2007 new file mode 100644 index 00000000000..3594b09519f --- /dev/null +++ b/gcc/m2/ChangeLog-2007 @@ -0,0 +1,378 @@ +2007-12-10 Gaius Mulley + + * gm2/NEWS: updated. + * gm2/tools-src/def2texi.py: modified so that references + to types, variables and constants are added to the index + at the end of the documentation. + * gm2-libs-pim/RealInOut.def: all long procedures are also + exported. + +2007-12-07 Gaius Mulley + + * gm2/NEWS: updated. + * gm2/gm2.texi: documented new -fxcode option and minor + fixes. + * gm2/lang-options.h: added -fxcode to list of options. + * gm2/lang.opt: added -fxcode to list of options. + * gm2/m2.flex: added m2flex_GetColumnNo. + * gm2/gm2-compiler/M2Error.mod: OutString modified to + use column and produce GNU and Xcode format errors. + * gm2/gm2-compiler/M2LexBuf.def: export column + related procedures. + * gm2/gm2-compiler/M2LexBuf.mod: introduced recording + of the column position. GetColumnNo, TokenToColumnNo + new procedures. + * gm2/gm2-compiler/M2Options.def: added Xcode. + * gm2/gm2-compiler/M2Options.mod: set Xcode accordingly. + * gm2/gm2/gm2-compiler/M2Students.mod: fixed spelling + mistake. + * gm2/gm2-compiler/P1SymBuild.mod: tidied up error + message. + * gm2/gm2-compiler/SymbolTable.mod: ditto. + * gm2/gm2-compiler/m2flex.def: added GetColumnNo + procedure. + * gm2/gm2-libs-pim/BitBlockOps.mod: intemediate checkin. + +2007-12-06 Gaius Mulley + + * gm2/tools-src/gensum.py: new file. + +2007-11-14 Gaius Mulley + + * gm2/gm2.texi: corrected urls and last edit. + * gm2/gm2-libs.texi: recreated. + +2007-11-10 Gaius Mulley + + * gm2/m2.flex: added explicit cast. + * gm2/Make-lang.in: now build h2def during stage2. + * gm2/gm2/c.flex: modified so that it ignores tabs. + * gm2/bnf/h2def.bnf: many bugfixes, still broken though. + * gm2/gm2-compiler/CLexBuf.mod: improved Debugging support. + * gm2/gm2-compiler/gm2lcc.mod: refactored comment handling + code to use the RemoveComment, RemoveWhiteSuffix and + RemoveWhitePrefix procedures in DynamicStrings module. + * gm2/gm2-compiler/gm2lgen.mod: likewise handle comments. + * gm2/gm2-libs/DynamicStrings.def: export + RemoveWhitePrefix, RemoveWhitePostfix, RemoveComment. + * gm2/gm2-libs/DynamicStrings.mod: implement above. + +2007-11-07 Gaius Mulley + + * gm2/Make-lang.in: updated version to 0.63 + * gm2/gm2.texi: updated version to 0.63 and updated + unbounded-by-reference documentation. + * gm2/gm2-compiler/M2GenGCC.mod: modified optimization + of unbounded addresses to test the memory range of + each unbounded parameter against a type compatible + var parameter, any overlapping addresses results in + a alloca and memcpy of the non var unbounded array. + +2007-11-02 Gaius Mulley + + * gm2/gm2-compiler/M2GenGCC.mod: completed the further + optimization of unbounded addresses. It checks to + see if the contents of a type compatible unbounded + ARRAY matches the contents of a VAR parameter. + It checks against any VAR parameter (not just + unbounded VAR parameters - consider ARRAY OF BYTE). + * gm2/gm2.texi: documented the implementation of + the -funbounded-by-reference optimization flag + giving examples. + +2007-10-30 Gaius Mulley + + * gm2/gm2.texi: fixed @xref punctuation requirement. + * gm2/gm2-compiler/M2GenGCC.mod: fixed unbounded-by-reference + so that it works out whether two parameters might contain + the same contents. Further optimization is possible via + runtime checking of unbounded addresses. + * gm2/gm2-compiler/SymbolTable.mod: factored out some code. + +2007-10-26 Gaius Mulley + + * gm2/gm2-libs/sckt.def: moved here from examples/server. + * gm2/gm2-libs-ch/sckt.c: moved here from examples/server. + * gm2/examples/ncurses/Makefile: changed switches from -W + to -f + * gm2/gm2-libs-coroutines/Makefile: changed switches from -W + to -f + * gm2/gm2-libs-coroutines/SysVec.mod: added many Asserts and + fixed some bugs relating to microseconds. + * gm2/gm2-libs-coroutines/TimerHandler.mod: fixed bug relating + to time vector. + +2007-10-25 Gaius Mulley + + * gm2/gccgm2.c: CHAR is now declared as an unsigned char. + * testsuite/gm2/pimlib/logitech/run/pass/bbits.mod: new file. + * testsuite/gm2/pimlib/logitech/run/pass/intb.mod: new file. + +2007-10-23 Gaius Mulley + + * gm2/gm2.texi: more building documentation fixes. + * gm2/www/index.ms: updated documentation to reflect + changes to the gm2.texi building instructions. + +2007-10-22 Gaius Mulley + + * gm2/gm2-libs-pim/BitBlockOps.{def,mod}: added. + * gm2/Make-lang.in: added BitBlockOps to the Logitech list + of modules. + * gm2/gm2.texi: improved building documentation which now + relates to the daily CVS snapshot held on + http://floppsie.comp.glam.ac.uk/download/c + +2007-10-18 Gaius Mulley + + * gm2/www/index.ms: rationalised the building instructions + between the web page and gm2/gm2.texi + * gm2/gm2.texi: updated the building instructions. + +2007-10-14 Gaius Mulley + + * gm2/Make-lang.in: fixed bug in gm2/gm2-libs/gm2-libs-host.h + target so that configure uses the correct CC and CPP. + +2007-10-09 Gaius Mulley + + * gm2/README: updated to reflect new homepage and mailing + list address. + +2007-10-07 Gaius Mulley + + * fixed bug reported by Dmitry Shatrov + * gm2/gm2-compiler/M2Quads.mod: added CheckNotConstAndVar + procedure. BuildAssignment use CheckNotConstAndVar. + * gm2/testsuite/gm2/pim/fail/constvar.mod: added new + regression test. + * gm2/gm2.texi: updated the last update field. + +2007-10-05 Gaius Mulley + + * gm2/Make-lang.in: updated version to 0.62 + * gm2/Make-lang.in: altered all -W options to their new + -f counterparts + * gm2/README: modified the advised build command + * gm2/gccgm2.c: removed all section of code inside #if 0 + blocks (which were not part of the orig gcc source). + * gm2/gccgm2.c: modified OPT_W to OPT_f to reflect change + of -W flags to -f flags. + * gm2/gccgm2.c: reintroduced the -fcpp handling code. + * gm2/gm2.texi: updated version number to 0.62 + * gm2/gm2.texi: altered all -W options to -f options + for code generation options. Left warning options + to use -W to mirror the gcc paradigm. + * gm2/gm2/gm2builtins.c: memmove introduced. + * gm2/gm2spec.c: changed all -W options to -f. + * gm2/lang-specs.h: changed all -W options to -f. + * gm2/lang.opt: changed all -W options to -f. + * gm2/bnf/gm2l.bnf: changed all -W options to -f. + * gm2/bnf/gm2m.bnf: changed all -W options to -f. + * gm2/gm2-libs-pim/BlockOps.{def,mod}: added to repository. + * gm2/examples/map/Makefile: changed all -W options to -f and + added -O3. + * gm2/gm2/gm2-compiler/M2Options.def: changed comments. + * gm2/gm2-compiler/M2Options.mod: changed all -W options to -f. + * gm2/gm2-compiler/M2Quads.mod: changed all -W options to -f. + * gm2/gm2-compiler/SymbolTable.mod: changed all -W options to -f. + * gm2/gm2-compiler/gm2.mod: changed all -W options to -f. + * gm2/gm2-compiler/gm2lcc.mod: changed all -W options to -f. + * gm2/gm2/gm2-compiler/ppg.mod: modified compile-command. + * gm2/gm2-libs/Builtins.def: added memmove to the list of + builtins. + * gm2/gm2-libs/Builtins.mod: implemented M2 wrapper for memmove. + * gm2/gm2-libs/cbuiltin.def: added access to C memmove. + * gm2/man/gm2.man: changed all -W options to -f. + +2007-09-27 Gaius Mulley + + * gm2/gm2-libs/SYSTEM.mod: added SHIFT, ROTATE and their + support counterparts. + * gm2/gm2-libs-pim/BitByteOps.{def,mod}: added. + * gm2/gm2-libs-pim/BitWordOps.{def,mod}: completed. + * gm2/gm2.texi: updated to reflect the addition of SHIFT, + ROTATE procedures in PIM SYSTEM.mod. + * gm2/gm2/Make-lang.in: + * gm2/gm2/README: + * gm2/gm2/gccgm2.c: + * gm2/gm2/gm2.texi: + * gm2/gm2/gm2spec.c: + * gm2/gm2/lang-options.h: + * gm2/gm2/lang-specs.h: + * gm2/gm2/lang.opt: + * gm2/gm2/bnf/gm2l.bnf: + * gm2/gm2/bnf/gm2m.bnf: + * gm2/gm2/gm2-compiler/M2Options.def: + * gm2/gm2/gm2-compiler/M2Options.mod: + * gm2/gm2/gm2-compiler/M2Quads.mod: + * gm2/gm2/gm2-compiler/SymbolTable.mod: + * gm2/gm2/gm2-compiler/gm2.mod: + * gm2/gm2/gm2-compiler/gm2lcc.mod: + * gm2/gm2/gm2-compiler/ppg.mod: all changed to reflect moving + -W switches to -f switches as per gcc. Only using -W for + compile time warnings, -f for language features including + runtime checking. + +2007-09-14 Gaius Mulley + + * www/index.ms: updated web pages to reflect 0.60 release + and availability of debian packages. + +2007-08-14 Gaius Mulley + + * gm2/patches/gcc/4.1.2/02.gaius_rs6000_lang: new patch to + enable gm2 to build on the PS3 (ppc) based machines. + +2007-08-08 Gaius Mulley + + * gm2/Make-lang.in: fixes to enable avr cross compile to + build (use cross gcc and add -B./ when building libraries). + +2007-07-23 Gaius Mulley + + * gm2/gccgm2.c: gccgm2_BuildSubrangeType switched over to using + the implementation of the subrange type as opposed to the base + INTEGER type. + * gm2/gm2-compiler/M2Quads.mod: CheckSubrange converts the + Exp into an INTEGER type before generating the range checking + quadruples. This in turn allows M2SubExp.mod to be built with + optimization. make gm2.paranoid with -O works against gcc-4.1.2. + +2007-07-06 Gaius Mulley + + * added gm2/gm2-harness. + * gm2/Make-lang.in: added interactive debugging module + gm2/m2pp.o to link targets. + * gm2/gccgm2.c: rewritten pushdecl and friends and vastly + simplified and reduced the code. Modified all parameters + to use ANSI C rather than K&R C. Rewritten create + gccgm2_BuildStartFunctionCode and gccgm2_BuildEndFunctionCode. + Also ensured that all variables are added to the statement list + via DECL_EXPR and ensured that BIND_EXPR and BLOCKs are created + in exactly the same way as their C counterparts. + Fixed important bug in creating TREEs which represent parameters. + * gm2/m2pp.c: new interactive debugging module will print a GCC + tree using Modula-2 syntax. + * gm2/m2pp.h: prototype for the above. + * gm2/gm2-compiler/M2GCCDeclare.mod: unbounded types are now uniquely + created from their basic type. Improved debugging of unbounded type. + * gm2/gm2-compiler/M2GenGCC.mod: DoCopyString new function which is + used by CodeBecomes and CodeXIndr. Simplified CodeIndrX and CodeXIndr + in light of bugs fixed in gm2/gccgm2.c. + * gm2/gm2-compiler/M2Quads.mod: made the type following more accurate + during the construction of array arithmetic and indirection. This + in turn allows -O to be used in GCC's backend. + * gm2/gm2-compiler/SymbolTable.def: modified interface to unbounded + symbols. + * gm2/gm2-compiler/SymbolTable.def: implemented above. + * GM2 now builds when -O is suppled to stage2 or stage3. + * GM2 now builds with (a patched) gcc-4.1.2 + +2007-05-28 Gaius Mulley + + * gm2-compiler/M2Quads.mod: replaced PutVarTypeAndSize with + PutLeftValueFrontBackType. + * gm2-compiler/SymbolTable.mod: implemented + PutLeftValueFrontBackType and GetLeftValueFrontBackType. + * gm2/gm2-compiler/M2GCCDeclare.mod: rationalised variable + creation by introducing function: DoVariableDeclaration. + All variables are created via this function. + Use GetLeftValueFrontBackType. + +2007-05-18 Gaius Mulley + + * gm2/Make-lang.in: removed -O for paranoid + +2007-05-11 Gaius Mulley + + * gm2/Make-lang.in: added -O for paranoid + * gm2/gccgm2.c: + * gm2/gm2-compiler/M2Base.def: removed generic Unbounded type + * gm2/gm2-compiler/M2Base.mod: removed generic Unbounded type + creation. + * gm2/gm2-compiler/M2Code.mod: tidied up comments and semicolon. + * gm2/gm2-compiler/M2GCCDeclare.def: export DeclareParameters. + * gm2/gm2-compiler/M2GCCDeclare.mod: implement + DeclareParameters and new unbounded type mechanism. + * gm2/gm2-compiler/M2GenGCC.mod: modified references + to unbounded fields. Fixed two major optimization bugs + in CodeXIndr and CodeIndrX pointer types + now use generic pointer types when building indirect GCC + trees. + * gm2/gm2-compiler/M2Quads: now create a specific unbounded type + rather than cast to a generic unbounded record. Again this fixes + bugs in Tree construction which were exposed by the back end + when -O was enabled. + * gm2/gm2-compiler/SymbolTable.def: declared Unbounded record and + field operators. + * gm2/gm2-compiler/SymbolTable.mod: implement Unbounded record and + field operators. + +2007-04-25 Gaius Mulley + + * gm2/gm2-libs: regenerated configure + +2007-02-16 Gaius Mulley + + * gm2/bnf/gm2m.bnf: fixed string deallocation bug. + * gm2/gm2-libs-pim/FileSystem.{def,mod}: exported Reset + and fixed filename and string conversion. + +2007-02-07 Gaius Mulley + + * gm2/gm2-compiler/M2GCCDeclare.mod: added FindOuterModule + to determine whether a symbol should be declared in the + GCC global scope. + * fixes ulm library building problem introduced by the previous + interim checkin. + +2007-02-06 Gaius Mulley + + * interim checkin, due to optimization fixes. + * gm2/gccgm2.c: changes to the way variables are declared. + Removed calls to expand_decl. + * gm2-compiler/M2GCCDeclare.mod: passes boolean to + DeclareKnownVariable indicating whether the variable was + declared in the outer global scope. + +2007-01-26 Gaius Mulley + + * gm2/gccgm2.c: mark_function_addresses_referenced added. + * gm2/gccgm2.c: gccgm2_MarkFunctionReferenced added. + * gm2/gccgm2.c: gccgm2_SetFlagUnitAtATime added. + * gm2/gm2-compiler/M2Code.mod: MarkExported used. + * gm2-compiler/M2GCCDeclare.def: MakeExported defined. + * gm2-compiler/M2GCCDeclare.mod: MakeExported added. + * gm2/gm2-compiler/gccgm2.def: SetFlagUnitAtATime, + MarkFunctionReferenced, defined. + +2007-01-19 Gaius Mulley + + * gm2/gm2-libs-pim/FileSystem.mod: added. + * gm2/Make-lang.in: introduced GM2_O_S3 variable so that + optimization can be introduced into stage3 only. + * gm2/gccgm2.c: added gccgm2_FinishBackend. + * gm2/gm2-compiler/M2Code.mod: use gccgm2_FinishBackend. + +2007-01-18 Gaius Mulley + + * gm2/gccgm2.c: use gm2_mark_addressable rather than + the TREE_ADDRESSABLE macro for consistency. + +2007-01-05 Gaius Mulley + + * gm2/Make-file.in: added FileSystem.mod to the gm2-libs-pim + set of libraries. + * gm2/TODO: removed FileSystem.mod from the list + * gm2/gm2-compiler/P1SymBuild.mod: added error message + * gm2/gm2-libs/FIO.mod: fixed copyright message + * gm2/gm2-libs/M2RTS.def: fixed typo. + * gm2/gm2-libs/libc.def: added rename function. + * gm2/gm2-libs/wrapc.def: modified filesize so that it modifies + two unsigned ints as the size, rather than return a long unsigned. + * gm2/gm2/gm2-libs-ch/libc.c: added unlink function. + * gm2/gm2/gm2-libs-ch/wrapc.c: implemented filesize. + * gm2/gm2/gm2-libs-pim/FileSystem.def: improved comments and added + more file state to the File record. + diff --git a/gcc/m2/ChangeLog-2008 b/gcc/m2/ChangeLog-2008 new file mode 100644 index 00000000000..65c6aec6a2b --- /dev/null +++ b/gcc/m2/ChangeLog-2008 @@ -0,0 +1,1994 @@ +2008-12-31 Gaius Mulley + + * gm2/gm2-libs-ch/dtoa.c: new file. + * gm2/gm2-libs-ch/ldtoa.c: new file. + * gm2/gm2-libs/dtoa.def: new file. + * gm2/gm2-libs/ldtoa.def: new file. + * gm2/gm2-libs/StringConvert.mod: removed call to free. + * gm2/gm2-libs-iso/RealConv.mod: reimplemented + conversion routines using dtoa rather than + StringConvert. + * gm2/gm2-compiler/M2Quads.mod: fixed bug reported by + John O Goyo set expressions using + / did not reduce to xor. Confusion between DivTok (DIV) + and DivideTok (/) tokens. + * testsuite/gm2/pim/run/pass/bitsettest.def: new file. + * testsuite/gm2/pim/run/pass/bitsettest.mod: new file to + test this bugfix never regresses. + * gm2/Make-file.in: added dtoa.def and ldtoa.def to the + list of definition modules in GM2-LIBS-BOOT-DEFS and + GM2-LIBS-DEFS. + +2008-12-30 Gaius Mulley + + * gm2/Make-lang.in: modified SO, SO_O2 to contain -fPIC. + Added dtoa.c and ldtoa.c. + * gm2/gm2-libs/StringConvert.mod: corrected dates. + * gm2/gm2-libs/errno.def: added ERANGE. + * gm2/gm2-libs-iso/README.texi: added RealConv to list + of completed modules. + * gm2/init/gm2-gccinit: added dtoa and ldtoa. + * gm2/init/gm2lccinit: added dtoa and ldtoa. + * gm2/init/gm2lgeninit: added dtoa and ldtoa. + * gm2/init/gm2linit: added dtoa and ldtoa. + * gm2/init/gm2lorderinit: added dtoa and ldtoa. + * gm2/init/gm2minit: added dtoa and ldtoa. + * gm2/init/h2definit: added dtoa and ldtoa. + * gm2/gm2-libs/StringConvert.mod: replaced + implementation of LongrealToString with a call + to ldtoa. Replaced implementation with a call + to strtold. + * all regression tests pass on LP64. + +2008-12-19 Gaius Mulley + + * gm2/gm2-libs/StringConvert.mod: used powl instead + of exp10l due to portability issues. + +2008-12-18 Gaius Mulley + + * gm2/gm2/Make-lang.in: RealConv.mod new file. + * gm2/gm2/gm2builtins.c: added __builtin_log10f, + __builtin_log10 and __builtin_log10l. + * gm2-libs/Builtins.def: added definitions for + log10f, log10, log10l, exp10f, exp10, exp10l. + * gm2-libs/Builtins.mod: new functions + log10f, log10, log10l, exp10f, exp10, exp10l. + * gm2/gm2-compiler/M2Quads.mod: migrated more error + messages to use M2MetaError and also made + BuildTruncFunction recover if operands are the wrong type. + * gm2/gm2-libs/StringConvert.def: ToSigFig new function. + * gm2/gm2-libs/StringConvert.mod: refactored to use IsDigit. + Implemented ToSigFig. StringToLongreal improved to + minimise floating point operators. LongrealToString + now allows TotalWidth of zero in which case it keeps + converting until the precision is exhausted. + * gm2/gm2-libs/cbuiltin.def: new definitions log10f, + log10, log10l, exp10, exp10l, exp10f. + * gm2/gm2-libs/libm.def: new definitions exp10, exp10l, + exp10f. + * gm2/Make-lang.in: added -lm to all stage1 executables. + * gm2/gm2spec.c: added MATH_LIBRARY to the list + of base libraries on the final link command. + * gm2/gm2-libs/StringConvert.mod: added forward declaration + to help p2c. + +2008-12-15 Gaius Mulley + + * gm2/gm2-libs/MathLib0.def: included definitions for + expl, lnl, tanl, arctanl. + * gm2/gm2-libs/MathLib0.mod: implemented above functions + and also modified logs to use libm.logf, tanl to use + libm.tanl, arctans to use libm.atanf and arctanl to + use libm.atanl. + +2008-12-13 Gaius Mulley + + * testsuite/gm2/pimlib/logitech/run/pass + added runtime tests to check the values of REAL and + LONGREALs once converted. + * gm2/gm2-libs/FormatStrings.mod: tidied up comments. + * gm2/gm2-libs/MathLib0.def: entierl (new function). + * gm2/gm2-libs/MathLib0.mod: entierl implement + (new function). + * gm2/gm2-libs/StringConvert.def: added example of + use to the comments. + * gm2/gm2-libs/StringConvert.mod: DetermineSafeTruncation + tidied up comments and added examples, fixed bugs. + * gm2/gm2-libs-pim/RealConversions.def: tided up comments + and added examples. LongRealToString and ReadToString + now take an INTEGER width which matches the Logitech + definitions. + * gm2/gm2-libs-pim/RealConversions.mod: RealToString and + LongRealToString modified width parameter to take an INTEGER. + Reimplemented much of LongRealToString and altered its + definition to make it simpler to use. + +2008-12-05 Gaius Mulley + + * fixed bug reported by Steve Giess + which showed const+realvar was not converted to the + required REAL/LONGREAL/SHORTREAL type when passed + to a procedure. + * gm2/gm2-compiler/M2GenGCC.mod: ensure that actual + parameter are converted to formal parameter types if + they are a member of the real type family. + * testsuite/gm2/pim/run/pass/mathconst.mod: new file. + * testsuite/gm2/pim/run/pass/math.mod: new file. + * testsuite/gm2/pim/run/pass/math2.mod: new file. + * gm2/gm2-compiler/M2Base.mod: fixed MixTypes to + handle expressions of RType and (REAL|SHORTREAL|LONGREAL). + +2008-12-01 "Nestor" + + * gm2/gm2-libs/StringConvert.mod: appended + string to leading zeros. + +2008-11-28 Gaius Mulley + + * gm2/gm2spec.c: insert option "-shared-libgcc" onto + command line to fix linking problem exposed Darwin. + * gm2/Make-lang.in: use g++ as the gm2cc linker. + +2008-11-27 Gaius Mulley + + * gm2/gm2-compiler/M2Options.mod: added ability for + the Modula-2 frontend to ignore -d options. The -d + options are processed by gcc component of cc1gm2. + * gm2/gm2.texi: added -d to the list of supported + options. + +2008-11-26 Gaius Mulley + + * gm2/Make-lang.in: added cc1plus, cc1, cpp to the + list of executables to be installed as part of gm2. + +2008-11-25 Gaius Mulley + + * gm2/Make-lang.in: install all subsiduary binaries + into $(DESTDIR)$(libexecsubdir) instead of + $(DESTDIR)$(libsubdir). + +2008-11-24 Gaius Mulley + + * gm2/Make-lang.in: prefixed invocation of makeversion + with /bin/bash. Changed rule to build the paranoid version + of sckt.o. + * gm2/gccgm2.c: reset TYPE_SIZE when building PROCEDURE + types (this fixes a bug exposed by WholeConv.mod). + PROCEDURE type variables were not allocated any space. + General tidying up. + * gm2/m2pp.c: detect and avoid print out recursive data + structures. Added function types to be printed. + * gm2/gm2-compiler/M2Base.mod: completed type checking code + to ensure that procedure types are fully type checked. + * gm2/gm2-compiler/M2MetaError.mod: added test against NulSym. + * gm2/gm2-compiler/M2Quads.mod: added call to MetaWarnings2. + * gm2/gm2-compiler/M2Range.mod: tided up error messages if + the procedure type causes a type mismatch. + * gm2/gm2-libs-iso/WholeConv.mod: rewritten ValueInt and + ValueCard. + +2008-11-12 Gaius Mulley + + * gm2/gm2-libs-iso/WholeConv.mod: finished implementation + module. + * gm2/gm2-libs-iso/WholeStr.mod: finished implementation + module. + * gm2/gm2-libs-iso/WholeIO.mod: finished implementation + module. + * gm2/Make-lang.in: added WholeConv.mod, WholeStr.mod + and WholeIO.mod to the list of ISO modules to be built + and installed. + * gm2/gm2-libs-iso/README.texi: updated list of completed + modules. + * gm2/Make-lang.in: added cc1plus to the tools to be + installed as part of gm2. + * gm2/gm2.texi: new section written explaining how + to move an entire installation to a new directory. + * gm2/README: updated download instructions and + mentioned that the compiler may now be moved. + +2008-11-11 Gaius Mulley + + * gm2/gm2spec.c: modified add_default_directories + to use a default_library_path. lang_specific_driver + sets the default_library_path to getenv LIBRARY_PATH + or failing that to the LIBSUBDIR as determined by + configure. + +2008-11-10 Gaius Mulley + + * gm2/gm2-libs-iso/README.texi: added RndFile + to the list of completed implementation modules. + Removed duplicate StreamFile. + * gm2/gm2-libs-iso/RndFile.def: tidied up comments. + Set FilePosSize to SIZE(LONGINT) and + FilePos = LONGINT. + * gm2/gm2-libs-iso/Storage.mod: tidied up spaces. + * gm2/tools-src/makeversion: added gm2_version + prototype. + * gm2/gm2-libs-iso/RndFile.mod: new file. + +2008-11-08 Gaius Mulley + + * gm2/ChangeLog: + * gm2/examples/svga/DisplayBuffer.def: tidied up + spacing. + * gm2/examples/svga/Matrix3D.def: tidied up + spacing. + * gm2/examples/svga/Matrix3D.mod: tidied up + spacing. + * gm2/examples/svga/Transform.def: tidied up + spacing. + * gm2/gm2-compiler/SymbolTable.mod: introduced + test to make it more robust in the face of + erroneous code. + +2008-11-08 Michael Lambert + + * testsuite/gm2/iso/pass/realbitscast.mod: added test + against __LP64__. + * testsuite/gm2/cpp/pass/subaddr.mod: added test + against __LP64__. + +2008-11-07 Gaius Mulley + + * gm2/Make-lang.in: new rules to make gm2version.c + and M2Version.mod. New rule to compile gm2version.c + and modified link of xgm2 to include gm2version.o + * gm2/gm2.texi: removed entry to h2def.texi. + * gm2/gm2spec.c: detect --version or -fversion and + call gm2_version. + * gm2/lang-options.h: add new options --version and + -fversion. + * gm2/lang.opt: add new options --version and + -fversion. + * gm2/gm2-compiler/M2Options.mod: display version + in cc1gm2. + * tools-src/makeversion: rewriten. + * gm2/gm2-compiler/M2Options.mod: corrected licence + version. + * gm2/gm2/gm2-libs-ch/sckt.c: removed include to + stdio.h. + * gm2/gm2spec.c: added test for source file and only + enable linking if the source file found. + * gm2/gm2-libs-host.h.in: added HAVE_NETINET_IN_H + and HAVE_NETDB_H macros. + * gm2/gm2-libs/configure.in: added tests for netinet/in.h + netdb.h. Updated the version number and email address. + * gm2/gm2-libs/configure: rebuilt. + * gm2/Make-lang.in: added version.texi to the list of texi + files. + * gm2/gm2.texi: include version.texi. + * gm2/tools-src/makeversion: added -t argument and made it + test the version number in gm2/gm2-libs/configure.in. + +2008-11-05 Gaius Mulley + + * gm2/www/index.ms: reworded some of the FAQs. + * gm2/gm2.texi: fixed spacing + * testsuite/gm2/pim/options/optimize/run/pass/testadd.mod: + fixed dates. + * testsuite/gm2/pim/options/optimize/run/pass/gm2.exp: + fixed link command. + * testsuite/gm2/pim/options/optimize/run/pass/addition.mod: + fixed dates. + * testsuite/gm2/pim/options/optimize/run/pass/addition.def: + fixed dates. + * lib/gm2.exp: fixed ability to configure link path -L. + * lib/gm2-torture.exp: fixed ability to configure link + path -L. + +2008-11-04 Gaius Mulley + + * All regression tests pass on LP64 Athlon Debian + Etch. + * gm2/gccgm2.c: gccgm2_BuildArray (new function). + build_unary_op changed to handle Modula-2 array + arithemetic rather than C pointer and indice + computations. + * gm2/m2pp.c: m2pp_array_type (new function). + * gm2/gm2-compiler/Lists.mod: tidied up spacing. + * gm2/gm2-compiler/M2GenGCC.mod: CodeArray (new + procedure). FoldBase and CodeBase removed. + * gm2/gm2-compiler/M2Quads.def: ArrayOp replaces + BaseOp. + * gm2/gm2-compiler/M2Quads.mod: ArrayOp replaces + BaseOp. BuildStaticArray is reimplemented using + ArrayOp. + * gm2/gm2-compiler/M2SubExp.mod: ArrayOp replaces + BaseOp. + * gm2/gm2-compiler/SymbolTable.mod: modifications + to the debugging hooks. + * gm2/gm2-compiler/gccgm2.def: BuildArray (new + definition). + * gm2/gm2-libs/FIO.mod: tab space changes. + * gm2/www/index.ms: FAQ (new section). + +2008-11-03 Gaius Mulley + + * Cygwin port builds and installs. + * gm2/lang.opt: add -idirafter option which is used + by the preprocessor. + * gm2/gm2.texi: improved the cygwin build section. + * gm2/www/index.ms: updated web pages + * gm2/gm2.texi: modified version-GM2 to 0.68 to + reflect the version number in the CVS being worked + upon. + * gm2/Make-lang.in: modified GM2-VERSION to 0.68 to + reflect the version number in the CVS being worked + upon. + +2008-11-02 Gaius Mulley + + * gm2/gm2/Make-lang.in: removed $(exeext) from all + transformed names. + * gm2/gm2/gm2spec.c: append libraries at the end of the + command line rather than at the beginning. Only add + -lgcc_eh if ENABLE_SHARED_LIBGCC is defined. + * gm2/ulm-lib-gm2/sys/termios.c: added prototype for + _M2_termios_finish. + * gm2/gm2/gm2spec.c: removed test line. + * gm2/examples/hello/Makefile: clean removes a.exe + +2008-10-29 Gaius Mulley + + * gm2/gm2-compiler/M2GCCDeclare.mod: fixed bug in + DeclareDefaultType which caused a segfault when using + BITSET8, BITSET16, BITSET32 (reported by Scott Iverson). + The set type was incorrectly declared as a subrange. + * gm2/gm2-compiler/SymbolTable.mod: tidied up more + error messages. + * gm2/gm2-compiler/M2Quads.mod: moved the assignment + check after the BecomesOp, to ensure that during + code generation we can check the types after a + constant designator has been resolved. + +2008-10-28 Gaius Mulley + + * gm2/gccgm2.c: BuildArrayStringConstructor (new function). + * gm2/gm2-compiler/M2GenGCC.mod: DoCopyString remove + redundant parameter. BuildReturnValue check to see whether + we are returning a constant string and if so call + BuildArrayStringConstructor. + * gm2/gm2-compiler/M2LexBuf.mod: add Assert to ensure + that the CurrentTokeNo>=ListOfTokens.LastBucketOffset. + * gm2/gm2-compiler/M2Quads.mod: revoke yesterdays + changes to this file in an attempt to allow GM2/GCC + to propagate the constant string further. + * gm2/gm2-compiler/gccgm2.def: add + BuildArrayStringConstructor to definition module. + * gm2/gm2-compiler/M2LexBuf.mod: UpdateFromBucket (new + function). GetToken uses UpdateFromBucket and fixes + a buffer overrun bug reported by Scott Robinson. + +2008-10-27 Gaius Mulley + + * gm2/gm2-compiler/M2Quads.mod: modified BuildReturn + so that string constants can be returned from + functions with static array return types. + * testsuite/gm2/pim/pass/testreturnstr.mod: (new file). + * testsuite/gm2/pim/run/pass/testreturnstr.mod: (new file). + * testsuite/gm2/pim/run/pass/testreturnstr2.mod: (new file). + +2008-10-26 Gaius Mulley + + * gm2/gm2-libs-iso/LongMath.mod: tidied up comments. + * gm2/gm2-libs-iso/README.texi: brought list of + completed ISO modules up to date. + * gm2/NEWS: document 0.68 changes in readiness + for a release. + * gm2/gm2.texi: (Building GNU Modula-2 under Cygwin) + new section. Tidied up some text. + * gm2/gm2-compiler/M2Quads.mod: corrected SIZE + to return ZType constant rather than CARDINAL constant. + * gm2/gm2-libs/SYSTEM.def: corrected definition + of SIZE. + * gm2/gm2-compiler/M2System.mod: corrected definition + of ADDRESS so that it can be dereferenced. Fixed import + of ZType. + * gm2/gm2-compiler/SymbolTable.mod: improved some error + messages by using M2MetaError. Corrected dates. + +2008-10-25 Gaius Mulley + + * gm2/gm2spec.c: (add_exec_dir) new function, + add new function to list of gm2 spec functions. + * gm2/lang-specs.h: use exec_prefix to find + the executable cc1 when -fcpp is specified on the + command line. + * gm2/examples/swig/strlen: StrLib.def StrLib.i + removed both files. + * gm2/patches/gcc/4.1.2/05.gaius_patch_gcc: new + patch file. + +2008-10-24 Gaius Mulley + + * gm2/gm2-compiler/M2Quads.mod: (EnsureImportedFrom) + replaced with (GetQualidentImport). Fixes a bug + reported by Scott Iverson which was shown in + testsuite/gm2/isolib/run/pass/testappend.mod. + +2008-10-22 Michael Lambert + + * testsuite/gm2/iso/pass/realbitscast.mod: patch to + turn off 64 bit tests on an i386 and Apple OSX + combination. + +2008-10-22 Gaius Mulley + + * gm2/Make-lang.in: include library build directory + when building gm2-libs-pim libraries. + * gm2/gm2.texi: corrected documentation to include + c++ in the list of languages needed to build GNU + Modula-2. + * gm2/gm2-compiler/M2ALU.mod: corrected four parameter + errors. + * gm2/gm2-compiler/M2Base.def: IsValidParameter new + procedure. + * gm2/gm2-compiler/M2Base.mod: IsValidParameter implement + it and produce better error messages. Fixed parameter + compatibility between ZType and BYTE, WORD and ADDRESS. + * gm2/gm2-compiler/M2GCCDeclare.mod: correct debugging + information. + * gm2/gm2-compiler/M2MetaError.mod: give ability of the + error routines to handle %N (count) and also only quote + symbol names. + * gm2/gm2-compiler/M2Quads.mod: produce range checks + for parameter passing. + * gm2/gm2-compiler/M2Range.def: InitTypesParameterCheck + modify parameters to fully specify which parameter, + procedure, formal, actual parameters are being checked. + * gm2/gm2-compiler/M2Range.mod: implement above. + * gm2/gm2-compiler/M2Reserved.mod: corrected parameter + passing to AddKeyword. + * gm2/gm2-compiler/SymbolTable.def: extended + IsNameAnonymous. + * gm2/gm2-compiler/SymbolTable.mod: extended + IsNameAnonymous. + * gm2/gm2-compiler/gm2lorder.mod: improved the help message. + * gm2/gm2-libs/Debug.mod: tidied up comments. + * gm2/gm2-libs/M2RTS.mod: corrected parameters. + * gm2/gm2-libs/StrIO.def: tidied up comments. + * gm2/gm2-libs-iso/ClientSocket.mod: corrected parameters. + * gm2/gm2-libs-iso/M2EXCEPTION.mod: corrected parameters. + * gm2/gm2-libs-iso/M2RTS.mod: corrected parameters. + * gm2/gm2-libs-iso/ProgramArgs.mod: corrected parameters. + * gm2/gm2-libs-iso/RTgen.mod: corrected parameters. + * gm2/gm2-libs-iso/SeqFile.mod: corrected parameters. + * gm2/gm2-libs-iso/StreamFile.mod: corrected parameters. + * gm2/gm2-libs-pim/BitByteOps.mod: corrected type changes + by using fixed sized types. + * gm2/p2c/p2c-src/src/lex.c: fixed bug when implementing + __FUNCTION__ in p2c. + * gm2/ulm-lib-gm2/std/M2RTS.mod: import RTExceptions to + aid linker. + +2008-10-19 Gaius Mulley + + * gm2/gm2-compiler/M2Base.mod: AttemptToCreateSetType + modified parameter name and altered calls to this + function accordingly. Corrected set sized types. + +2008-10-18 Gaius Mulley + + * gm2/gm2/m2.flex: corrected dates. + * gm2/gm2/gm2-compiler/M2Base.mod: moved from M2Error + handling to M2MetaError handling. + * gm2/gm2/gm2-compiler/M2GCCDeclare.mod: moved from M2Error + handling to M2MetaError handling. + * gm2/gm2/gm2-compiler/M2LexBuf.mod: updated debugging + code. + * gm2/gm2/gm2-compiler/M2MetaError.def: MetaErrorString1, + MetaErrorString2, MetaErrorString3, MetaErrorStringT1, + MetaErrorStringT2, MetaErrorStringT3 (new procedures). + * gm2/gm2/gm2-compiler/M2MetaError.mod: MetaErrorString1, + MetaErrorString2, MetaErrorString3, MetaErrorStringT1, + MetaErrorStringT2, MetaErrorStringT3 (implemented + new procedures) and also the '!' operator and the '%n' + specifier. + * gm2/gm2/gm2-compiler/M2Quads.mod: migrated some of the + M2Error calls onto the new M2MetaError mechanism. + * gm2/gm2/gm2-compiler/M2Range.mod: moved from M2Error + handling to M2MetaError handling. + * gm2/gm2/gm2-compiler/NameKey.mod: corrected MakeKey + off by one error when comparing against HIGH(a). + * gm2/gm2/gm2-compiler/P2SymBuild.mod: removed + procedure CheckAnonymous. + * gm2/gm2/gm2-compiler/SymbolTable.def: added + procedure CheckAnonymous and IsNameAnonymous. + * gm2/gm2/gm2-compiler/SymbolTable.mod: implemented + CheckAnonymous and IsNameAnonymous. Also implemented + PutConstVarTemporary and modified IsTemporary to + test whether constants are also temporary. + * gm2/gm2/gm2-libs/DynamicStrings.mod: fixed off by + one error in procedure, char. + * gm2/gm2/Make-lang.in: added LongMath.mod to the list + of ISO modules. + * gm2/gm2/gm2-libs/libm.def: export floor, floorl, + floorf, ceil, ceill and ceilf. + * gm2/gm2/gm2-libs-iso/LongMath.def: fixed dates. + Use exp and ln builtins. + * gm2/gm2/gm2-libs-iso/LongMath.mod: implement + builtins. Finish non builtin equivalents of the + procedures. + * gm2/gm2-compiler/M2Base.mod: simplified expression + in IsBaseCompatible and corrected parameter type + matix (ZType and normint). + +2008-10-15 Gaius Mulley + + * gm2/M2MetaError.{def,mod}: new files. + * gm2/gm2/Make-lang.in: added M2MetaError to be built. + * gm2/gm2/gm2-compiler/Indexing.mod: use casts when + assigning different pointers. + * gm2/gm2/gm2-compiler/M2ALU.mod: fixed return value + declaration in ToArrayValue. + * gm2/gm2/gm2-compiler/M2MetaError.def: export all + MetaError procedures. + * gm2/gm2/gm2-compiler/M2MetaError.mod: added end + of case delimiter. + * gm2/gm2/gm2-compiler/M2Range.mod: use MetaError + rather than M2Error. + * gm2/gm2/gm2-libs/DynamicStrings.def: corrected dates + and tidied up comments. + * gm2/gm2/init/gm2-gccinit: add M2MetaError to list + of modules to be linked. + +2008-10-14 Gaius Mulley + + * gm2/Make-lang.in: added RTExceptions.mod and + M2EXCEPTION.mod to the build list of Ulm libraries + as way of GNU Modula-2 compatible runtime support. + * gm2/gccgm2.c: fixed bug in gccgm2_DetermineSizeOfConstant + which incorrectly set needsUnsigned. + * gm2/gm2-compiler/M2Base.mod: correct order of meta type + testing. + * gm2/gm2-compiler/M2Quads.mod: doBuildAssignment (new + procedure). Modified BuildAssignmentWithoutBounds to + use a parameter which determines whether type checking + should be done. + * gm2/gm2-compiler/M2System.mod: corrected 'SET' with + 'BITSET' in fixed sized data type procedure. + * gm2/gm2-libs-pim/BitBlockOps.mod: corrected pointer + type casts. + * gm2/gm2-libs-pim/BlockOps.mod: corrected pointer + type casts. + * gm2/gm2-libs-pim/Termbase.mod: corrected assignment + typo caught by new stronger type checking. + * gm2/gm2-compiler/M2Base.mod: correct bug to test + whether the types pointer to are the same. MixTypes + skips over type symbols. + * gm2/gm2-compiler/M2Quads.mod: CheckReturnType (new + procedure). BuildFunctionReturn uses CheckReturnType. + * gm2/gm2-compiler/M2Range.mod: generates return type + error messages if, des, is a procedure. + * gm2/gm2-compiler/SymbolTable.mod: added debugging. + * gm2/gm2-libs-iso/IOChan.mod: fixed wrong enumeration + bug, uncovered by new stricter assignment checks. + * gm2/gm2-libs-iso/StdChans.mod: fixed wrong enumeration + bug, uncovered by new stricter assignment checks. + +2008-10-13 Gaius Mulley + + * gm2/Make-lang.in: modified rule to build ISO C files. + * gm2/NEWS: updated to include implementation of + exception handling and swig. + * gm2/gm2-libs-coroutines/SYSTEM.mod: corrected dates + and removed redundant return value from printf. + * gm2/gm2-libs-coroutines/SysVec.mod: corrected dates + and removed redundant return value from printf. + * gm2/gm2-libs-coroutines/testiotransfer.mod: removed + redundant return value from printf. + * gm2/gm2-libs-coroutines/testtransfer.mod: removed + redundant return value from printf. + * gm2/gm2-libs-iso/ErrnoCategory.c: include + rather than . + * gm2/gm2-libs-iso/WholeConv.mod: intemediate checkin. + * gm2/gm2-libs-iso/WholeStr.def: corrected dates and + tidied up comments. + * gm2/gm2-libs-iso/wrapsock.c: remove include + * gm2/gm2-libs-pim/RealConversions.mod: removed + redundant return value from printf. + * gm2/gm2-compiler/M2BasicBlock.mod: removed unnecessary + import. + * gm2/gm2-compiler/M2Code.mod: call SetPassToCodeGeneration. + * gm2/gm2-compiler/M2Range.def: introduce + InitTypesParameterCheck. + * gm2/gm2-compiler/M2Range.mod: implement InitTypesParameterCheck. + * gm2/gm2-libs-iso/WholeStr.def: tidied up comments. + +2008-10-11 Gaius Mulley + + * gm2/gm2/gccgm2.c: removed STRIP_NOPS from FoldAndStrip. + * gm2/gm2/bnf/gm2l.bnf: InitStopSet changed to reflect p2c + corrections to INCL and EXCL. + * gm2/gm2/bnf/gm2m.bnf: InitStopSet changed to reflect p2c + corrections to INCL and EXCL. + * gm2/gm2/gm2-compiler/M2Base.def: CannotCheckTypeInPass3, + ExceptionIncl, ExceptionExcl new procedures. + * gm2/gm2/gm2-compiler/M2Base.mod: CannotCheckTypeInPass3, + ExceptionIncl, ExceptionExcl implemented. + * gm2/gm2/gm2-compiler/M2Code.mod: call ResolveConstructorTypes. + * gm2/gm2/gm2-compiler/M2Pass.def: corrected dates. + * gm2/gm2/gm2-compiler/M2Quads.mod: introduced additional + range check markers to check type compatibility post pass 3. + Removes many ugly hacks and makes type checking more resiliant. + * gm2/gm2/gm2-compiler/M2Range.def: InitInclCheck, InitExclCheck, + InitTypesAssignmentCheck, InitTypesExpressionnCheck new + procedures. + * gm2/gm2/gm2-compiler/M2Range.mod: InitInclCheck, InitExclCheck, + InitTypesAssignmentCheck, InitTypesExpressionnCheck implement + these procedures and flush errors should a type check fail. + * gm2/gm2/gm2-compiler/SymbolTable.def: MakeTemporaryFromExpression, + MakeTemporaryFromExpressions, PutConstructorFrom, + ResolveConstructorTypes new procedures. + * gm2/gm2/gm2-compiler/SymbolTable.mod: MakeTemporaryFromExpression, + MakeTemporaryFromExpressions, PutConstructorFrom, + ResolveConstructorTypes implement these new procedures. + * gm2/gm2/gm2-compiler/ppg.mod: emit the stop subrange used to + build the set. + * gm2/gm2/gm2-libs/M2RTS.def: InclException, ExclException new + procedures. + * gm2/gm2/gm2-libs/M2RTS.mod: InclException, ExclException implement + new procedures. + * gm2/gm2/gm2-libs-ch/sckt.c: tidied up spacing. + * gm2/gm2/gm2-libs-iso/M2EXCEPTION.def: corrected dates. + * gm2/gm2/gm2-libs-iso/M2RTS.def: InclException, ExclException + new procedures. + * gm2/gm2/gm2-libs-iso/M2RTS.mod: InclException, ExclException + implement new procedures. + * gm2/gm2/gm2-libs-iso/STextIO.mod: corrected copyright notice. + * gm2/gm2/gm2-libs-iso/TextIO.def: tidied up comment. + * gm2/gm2/gm2-libs-iso/WholeConv.def: corrected dates and + tidied up long lines. + * gm2/gm2/gm2-libs-pim/RealInOut.def: tidied up spacing. + * gm2/gm2/gm2-libs-pim/RealInOut.mod: corrected dates. + * gm2/gm2/p2c/p2c-src/src/decl.c: added debugging. + * gm2/gm2/p2c/p2c-src/src/funcs.c: corrected INCL and EXCL + to subract low bound of subrange from bit value. + * gm2/gm2/ulm-lib-gm2/std/M2RTS.mod: InclException, ExclException + implement new procedures. + +2008-10-11 Michael Lambert + + * gm2/Make-lang.in: set XGM2BUILD1 flags for + darwin, apple, i386 (leave out -gdwarf-2) + +2008-10-07 Gaius Mulley + + * gm2/gm2-libs/FIO.mod: reintroduced + InstallTerminationProcedure as p2c does + not use FINALLY. Thus a boottrap error + occurred when building gm2/gm2-auto/pg. + +2008-10-03 Gaius Mulley + + * gm2/examples/iso/socket/client.mod: improved + example program. + * gm2/gm2-libs/FIO.mod: tidied up increment and + removed InstallTerminationProcedure as the + module uses FINALLY instead. + * gm2/gm2-libs-iso/ClientSocket.mod: bug fixes. + * gm2/gm2-libs-iso/IOLink.mod: UnMakeChan + call doFlush and doFree. + * gm2/gm2-libs-iso/RTdata.mod: fixed typo bug + md should be m. + * gm2/gm2-libs-iso/RTfio.mod: iserror must not + call EOF. + * gm2/gm2-libs-iso/RTgen.mod: checkPostRead call + checkErrno. doLook call doUnReadChar. + * gm2/gm2-libs-iso/wrapsock.c: fixed + getPushBackChar and setPushBackChar. + +2008-10-01 Gaius Mulley + + * gm2/gm2-libs-iso/ClientSocket.def: new file. + * gm2/gm2-libs-iso/ClientSocket.mod: new file. + * gm2/gm2-libs-iso/wrapsock.def: new file. + * gm2/gm2-libs-iso/wrapsock.c: new file. + * gm2/gm2-libs-iso/ChanConsts.h: new file. + * gm2/Make-lang.in: added wrapsock.c to list of + GM2-LIBS-ISO-C files. Also added ClientSocket.mod + to GM2-LIBS-ISO-MODS. + * gm2/gm2-libs/sckt.def: tidied up comments. + * gm2/gm2-libs-iso/ErrnoCategory.c: use ChanConsts.h. + * gm2/gm2-libs-iso/SimpleCipher.def: RemoveCipherLayer + new function and fixed destructors. + * gm2/gm2-libs-iso/Strings.def: tidied up comments. + * gm2/examples/iso/socket/Makefile: new file. + * gm2/examples/iso/socket/client.mod: new file. + +2008-09-30 Gaius Mulley + + * gm2/Make-lang.in: added ProgramArgs, SimpleCipher, + RTData modules to be installed as part of the ISO + libraries. + * gm2/TODO: updated TODO with outstanding bugs. + * gm2/gm2.texi: updated modification date to reflect + new modules. + * gm2/gm2-libs/Args.mod: updated dates. + * gm2/gm2-libs-iso/M2RTS.mod: fixed bug regarding + whether an application is terminating. + * gm2/gm2-libs-iso/ProgramArgs.def: updated dates. + * gm2/gm2-libs-iso/README.texi: updated list of + completed modules and their licence. + * gm2/gm2-libs-iso/RTgen.mod: fixed bug when + examining pre read status. + * gm2/gm2-libs-iso/RawIO.def: tidied up comments. + * gm2/gm2-libs-iso/RawIO.mod: fixed read results + bug. + * gm2/gm2-libs-iso/STextIO.mod: tidied up comments. + * gm2/gm2-libs-iso/SimpleCipher.{def,mod}: new files. + * gm2/gm2-libs-iso/ProgramArgs.mod: new file. + * gm2/examples/iso/hello: new directory for example. + * gm2/examples/iso/hello/hello.mod: new file. + * gm2/examples/iso/files: new directory for example. + * gm2/examples/iso/files/rot13.mod: new file. + +2008-09-25 Gaius Mulley + + * gm2/gm2spec.c: add -lgcc_eh to the link command line. + * gm2/Make-lang.in: added many new implementation and + definition modules to be installed as part of the ISO + library. + * gm2/TODO: added more outstanding bug reports. + * gm2/gm2-compiler/M2ALU.mod: flush non recoverable + errors. Fixed bug during generation of constant array + if the subrange was an enumerated type. + * gm2/gm2-compiler/M2GCCDeclare.mod: fixed bug which + manifested itself if an implementation module imported + itself. The symbols were not emitted and incorrectly + defined as extern. + * gm2/gm2-compiler/M2GenGCC.mod: added more error checking + when constructing HIGH. + * gm2/gm2-compiler/M2Quads.mod: fixed bug in HIGH if the + operand is a constant string which has been concatenated. + * gm2/gm2-libs/FIO.def: changed all seek positions to + LONGINT. + * gm2/gm2-libs/FIO.mod: (SetPositionFromEnd) new procedure. + * gm2/gm2-libs/PushBackInput.def: tidied up code. + * gm2/gm2-libs/PushBackInput.mod: tidied up comments. + * gm2/gm2-libs/Selective.def: tidied up comments. + * gm2/gm2-libs/libc.def: changed seek offset from INTEGER + to LONGINT. + * gm2/gm2-libs-ch/libc.c: changed seek long offset to + long int offset. + * gm2/gm2-libs-iso/ErrnoCategory.c: (GetOpenResults) new + procedure. + * gm2/gm2-libs-iso/ErrnoCategory.def: (GetOpenResults) new + procedure. + * gm2/gm2-libs-iso/IOChan.def: tidied up comments. + * gm2/gm2-libs-iso/IOChan.mod: major rewrite. + * gm2/gm2-libs-iso/IOLink.def: tidied up comments. + * gm2/gm2-libs-iso/README.texi: updated README with list + of completed modules. + * gm2/gm2-libs-iso/RTio.def: major rewrite. + * gm2/gm2-libs-iso/RTio.mod: major rewrite. + * gm2/gm2-libs-iso/SeqFile.def: tidied up comments. + * gm2/gm2-libs-iso/SeqFile.mod: major rewrite. + * gm2/gm2-libs-iso/StdChans.def: tidied up comments. + * gm2/gm2-libs-iso/StdChans.mod: major rewrite. + * gm2/gm2-libs-iso/Storage.mod: major rewrite using + RTentity. + * gm2/gm2-libs-iso/StreamFile.def: tidied up comments. + * gm2/gm2-libs-iso/TextIO.def: tidied up comments. + * gm2/gm2-libs-iso/TextIO.mod: major rewrite. + * gm2/gm2-libs-pim/FileSystem.mod: fixed calls to + lseek to use LONGCARD rather than CARDINAL. + +2008-09-15 Gaius Mulley + + * gm2/m2pp.c: corrected prototypes and fixed format + specifier for snprintf. + +2008-09-11 Gaius Mulley + + * gm2/gm2.texi: added more information to the + release map. + * gm2/gm2-libs-iso/TextIO.mod: new file. + * gm2/gm2-libs-iso/STextIO.mod: new file. + * gm2/gm2-libs-iso/StdChans.mod: new file. + * testsuite/gm2/isolib/run/pass/hello.mod: new file. + * testsuite/gm2/isolib/run/pass/gm2.exp: new file. + * gm2/gm2-compiler/M2ALU.mod: fixed bug in + CollectConstructorDependants in which a unknown + value might be saved as a constant. + +2008-09-10 Gaius Mulley + + * gm2/gm2.texi: modified many examples to reflect + optional return value for printf. Also updated + the swig examples to use -c++. + * gm2/Make-lang.in: added entries for IOChan.mod, + RTio.mod and ErrnoCategory.c. Also added rule + to build ErrnoCategory.o. + * gm2/bnf/gm2m.bnf: moved FIO import list before + M2LexBuf to avoid getting the wrong definition of + GetFileName during p2c bootstrap phase. + * gm2/bnf/m2-2.bnf: added OptReturnType for + procedures (functions). Rationalized function + return values via OptReturnType. + * gm2/bnf/m2-3.bnf: added OptReturnType for + procedures (functions). Rationalized function + return values via OptReturnType. Also added + productions to implement functions using + an optional return type. + * gm2/bnf/m2-h.bnf: added OptReturnType for + procedures (functions). Rationalized function + return values via OptReturnType. + * gm2/bnf/m2.bnf: added OptReturnType for + procedures (functions). Rationalized function + return values via OptReturnType. + * gm2/examples/server/server.mod: modified code + to exploit calling printf and ignoring its return + value. + * gm2/examples/swig/exceptions/tiny.mod: ignore + return result for printf. + * gm2/gm2-compiler/M2Quads.def: define + CheckBuildFunction. + * gm2/gm2-compiler/M2Quads.mod: implement + CheckBuildFunction. + * gm2/gm2-compiler/P2SymBuild.def: corrected dates. + Added new procedure definition + BuildOptFunction. + * gm2/gm2-compiler/P2SymBuild.mod: corrected dates + and implemented BuildOptFunction. + * gm2/gm2-compiler/SymbolTable.def: PutOptFunction + (new definition). IsReturnOptional (new definition). + * gm2/gm2-compiler/SymbolTable.mod: ReturnOptional + new field for ProcedureSym and ProcTypeSym. + Implemented IsReturnOptional, SetReturnOptional, + CheckOptFunction and PutOptFunction. + Set ReturnOptional appropriately. + * gm2/gm2-libs/FIO.mod: implemented GetFileName. + Modified names of stdin, stdout and stderr to + , , respectively. + * gm2/gm2-libs/errno.c: added init and finish + functions. + * gm2/gm2-libs/libc.def: declare printf to have + an optional return value. + * gm2/gm2-libs-iso/ChanConsts.def: fixed dates. + * gm2/gm2-libs-iso/IOChan.mod: fixed dates + and reimplemented this module. + * gm2/gm2-libs-iso/RndFile.def: fixed dates. + * gm2/gm2-libs-iso/TextIO.def: fixed dates. + * gm2/p2c/p2c-src/src/decl.c: handle new syntax + for optional function return value. + +2008-09-07 Gaius Mulley + + * gm2/examples/cplusplus/cppcatchm2: new directory + containing an example of C++ catching a Modula-2 + exception. + * gm2/examples/cplusplus/m2catchcpp: new directory + containing an example of Modula-2 catching a C++ + exception. + +2008-09-06 Gaius Mulley + + * gm2/gm2-compiler/M2Swig.mod: modified so that it + produces a C++ style swig interface. Also modified + to include the language independent exception code. + * gm2/examples/swig/full-strlib/Makefile: modified + swig command line to use C++ style interface. + * gm2/examples/swig/strlib/Makefile: modified + swig command line to use C++ style interface. + * gm2/examples/swig/tiny/Makefile: modified + swig command line to use C++ style interface. + * gm2/examples/swig/exceptions: new example which + demonstrates Python catching a GNU Modula-2 + exception. + +2008-09-05 Gaius Mulley + + * gm2/gm2-compiler/gm2lorder.mod: Usage now writes + out the default list of system modules. + * gm2/gm2.texi: documented new flag (-fruntime-modules=). + * gm2/gm2-compiler/M2Quads.mod: added prototypes for + BuildRTExceptEnter and BuildRTExceptLeave. Also + added exception handling for module initialization + and finalization blocks. + * gm2/gm2-compiler/gm2lorder.mod: Usage now prints + the default settings. + +2008-09-04 Gaius Mulley + + * gm2/Make-lang.in: replaced gm2lsub with gm2lorder. + now build and install M2 ISO modules, M2EXCEPTION.mod, + EXCEPTIONS.mod and Storage.mod. + * gm2/Makefile.in: replaced gm2lsub with gm2lorder. + * gm2/gm2spec.c: tidied up static function declarations. + Added ability to remember link arguments and return these + as a string to lang-specs.h. + * gm2/lang-specs.h: replaced gm2lsub with gm2lorder. + Tidied up dates. pass linkargs to gm2lorder. Also pass + -fruntime-modules= to gm2lorder. + * gm2/gm2-compiler/Indexing.def: tidied up dates. + * gm2/gm2-compiler/Indexing.mod: tidied up dates. + * gm2/gm2-compiler/M2Base.mod: ensure that the runtime + module (RTExceptions) is parsed. + * gm2/gm2-compiler/M2GenGCC.mod: implement (CodeSaveException) + and (CodeRestoreException). Call these procedures + appropriately. + * gm2/gm2-compiler/M2Quads.mod: add SaveExceptionOp and + RestoreExceptionOp to the repetoir of quadruples. + (BuildRTExceptEnter) new function. (BuildRTExceptLeave) + new function. + * gm2/gm2-compiler/gm2lcc.mod: tidied up dates. Fixed off + by one bug when testing for '-l'. Added test for '-L'. + * gm2/gm2-compiler/gm2lgen.mod: fixed bug in writing out + DefaultErrorCatch prototype. Fixed cast bugs. + * gm2/gm2-libs/RTExceptions.def: (IsInExceptionState), + (SetExecptionState), (SwitchExceptionState), + (GetBaseExceptionBlock) new procedures defined. + * gm2/gm2-libs/RTExceptions.mod: (IsInExceptionState), + (SetExecptionState), (SwitchExceptionState), + (GetBaseExceptionBlock) new procedures implemented. + * gm2/gm2-libs/SYSTEM.def: fixed dates. + * gm2/gm2-libs-coroutines/SYSTEM.def: added THROW + to export list. + * gm2/gm2-libs-iso/COROUTINES.mod: fixed dates. + * gm2/gm2-libs-iso/EXCEPTIONS.mod: fixed dates. + Completed implementing the module. + * gm2/gm2-libs-iso/M2EXCEPTION.mod: completed implementing + the module. + * gm2/gm2-libs-iso/M2RTS.def: fixed dates. + * gm2/gm2-libs-iso/Storage.mod: completed implementing + the module. + * gm2/gm2-libs-min/SYSTEM.def: added THROW + to export list. + * gm2/ulm-lib-gm2/sys/SYSTEM.def: fixed dates and added THROW + to export list. + * gm2/gm2-compiler/gm2lsub.mod: removed file. + * gm2/gm2-compiler/gm2lorder.mod: new file (a placement for + gm2lsub.mod). + +2008-08-23 Gaius Mulley + + * gm2/Make-lang.in: replaces list of checking flags with + -fcheck-all. + * gm2/TODO: corrected sentance. + * gm2/lang-options.h: introduced new option, -fdiv-mod-rem. + * gm2/gm2-compiler/M2Base.def: ExceptionNonPosDiv, + ExceptionNonPosMod, ExceptionZeroDiv, ExceptionZeroRem new + exception handlers defined. + * gm2/gm2-compiler/M2Base.mod: ExceptionNonPosDiv, + ExceptionNonPosMod, ExceptionZeroDiv, ExceptionZeroRem new + exception handlers implemented. + * gm2/gm2-compiler/M2GenGCC.def: export + LValueToGenericPtr and ZConstToTypedConst. + * gm2/gm2-compiler/M2GenGCC.mod: removed (p2c) forward + declarations for LValueToGenericPtr and ZConstToTypedConst. + * gm2/gm2-compiler/M2Options.def: defined and export + DivModRemChecking. + * gm2/gm2-compiler/M2Options.mod: implement detection of + -fdiv-mod-rem. + * gm2/gm2-compiler/M2Quads.mod: (CheckDivModRem) new procedure. + (BuildBinaryOp) call CheckDivModRem. + * gm2/gm2-compiler/M2Range.def: define InitWholeNonPosDivCheck, + InitWholeNonPosModCheck, InitWholeZeroDivisionCheck and + InitWholeZeroRemainderCheck. + * gm2/gm2-compiler/M2Range.mod: implement InitWholeNonPosDivCheck, + InitWholeNonPosModCheck, InitWholeZeroDivisionCheck and + InitWholeZeroRemainderCheck. + * gm2/gm2-libs/M2RTS.def: define new exception handlers: + WholeNonPosDivException, WholeNonPosModException, + WholeZeroDivException and WholeZeroRemException. + * gm2/gm2-libs/M2RTS.mod: implement new exception handlers: + WholeNonPosDivException, WholeNonPosModException, + WholeZeroDivException and WholeZeroRemException. + * gm2/gm2-libs-iso/M2RTS.def: defined new exception handlers: + WholeNonPosDivException, WholeNonPosModException, + WholeZeroDivException and WholeZeroRemException. + * gm2/gm2-libs-iso/M2RTS.mod: implemented new exception + handlers WholeNonPosDivException, WholeNonPosModException, + WholeZeroDivException and WholeZeroRemException. + * gm2/gm2-libs-iso/SYSTEM.def: export THROW. + * gm2/ulm-lib-gm2/std/M2RTS.mod: implement new exception + handlers WholeNonPosDivException, WholeNonPosModException, + WholeZeroDivException and WholeZeroRemException. + +2008-08-16 Gaius Mulley + + * gm2/gm2spec.c: set linking to false if -S flag was seen. + * gm2/examples/cpp/Makefile: altered flag from -Wcpp to -fcpp. + * gm2/examples/pthread/libcwrap.c: (_M2_libcwrap_finish) new + function stub. + * gm2/gm2-compiler/M2BasicBlock.mod: preserve InitStart, InitEnd, + FinallyStart, FinallyEnd quadruples during basic block elimination. + * gm2/gm2-compiler/M2Quads.def: (IsInitStart) (IsInitEnd) + (IsFinallyStart) (IsFinallyEnd) new functions defined and exported. + * gm2/gm2-compiler/M2Quads.mod: (IsInitStart) (IsInitEnd) + (IsFinallyStart) (IsFinallyEnd) new functions implemented. + * gm2/gm2-libs-coroutines/KeyBoardLEDs.c: (_M2_KeyBoardLEDs_init) + (_M2_KeyBoardLEDs_finish) new functions. + * gm2/gm2.texi: changed configure example to include the build of + c++. + +2008-08-15 Gaius Mulley + + * gm2/gm2/Make-lang.in: include gm2/config-make for TARGET_SUBDIR + macro. Link stage2 and stage3 cc1gm2 against libstdc++.a. + * gm2/config-lang.in: require target-libstdc++-v3. Also generate + gm2/config-make during configure. + * gm2/gm2spec.c: (add_lstdcpp) new function which is called if + linking. + * gm2/lang-specs.h: gm2lgen enable generation of C++ main via -cpp. + Change references to %g.c to %g.cpp. + * gm2/p2crc: define ThrowName. + * gm2/gm2-compiler/gm2lcc.mod: correctly initialise LibrariesFound + to FALSE. + * gm2/gm2-compiler/gm2lgen.mod: introduced new switch -cpp which + informs gm2lgen to generate a C++ main with a try catch dispatcher. + * gm2/gm2-libs/M2RTS.mod: fixed space. + * gm2/gm2-libs/RTExceptions.def: define BaseExceptionsThrow and + DefaultErrorCatch. + * gm2/gm2-libs/RTExceptions.mod: implement BaseExceptionsThrow and + DefaultErrorCatch. Also fixed PushHandler and PopHandler. + * gm2/gm2-libs-boot/SYSTEM.def: tidied up header comment. + * gm2/p2c/p2c-src/src/decl.c: removed spaces. + * gm2/p2c/p2c-src/src/funcs.c: (proc_throw) new function. + * gm2/p2c/p2c-src/src/trans.h: define name_THROW. + * gm2/make-config.in: new file. + +2008-08-11 Gaius Mulley + + * gm2/bnf/m2-3.bnf: call BuildReThrow after statement sequence + in an exception block. + * gm2/gm2-compiler/M2GenGCC.mod: implement rethrow. + * gm2/gm2-compiler/M2Quads.def: (BuildReThrow) define and export. + * gm2/gm2-compiler/M2Quads.mod: (BuildReThrow) implemented. + * gm2/gm2-libs/M2RTS.mod: fixed dates. + +2008-08-09 Gaius Mulley + + * gm2/Make-lang.in: added gt dependancies for gm2builtins.h + and gm2except.h. Added rules and dependancies to build + gm2except.c and link it to cc1gm2. Updated GM2DISTFILES. + * gm2/config-lang.in: updated gtfiles to include gm2except.c + and gm2builtins.c. + * gm2/gccgm2.c: updated dates. Updated prototype (removed + PARAMS). (gimplify_expr_stmt) new function. + (genericize_try_block) new function. (genericize_catch_block) + new function. (init_m2_builtins) call gm2except_InitExceptions. + * gm2/gm2-tree.def: define TRY_BLOCK, HANDLER, EXPR_STMT nodes. + * gm2/gm2-tree.h: (TRY_STMTS), (TRY_HANDLERS), (FN_TRY_BLOCK_P), + (HANDLER_PARMS), (HANDLER_BODY), (HANDLER_TYPE), + (STMT_EXPR_STMT), (EXPR_STMT_EXPR) new macros. + * gm2/gm2.texi: minor cosmetic changes. Also heavily altered + exception handling internal section to reflect using C++ + tree nodes rather than setjmp/longjmp mechanism. + * gm2/gm2builtins.c: added GTY(()) clauses to global tree + variables and imported appropriate GTY related header files. + This has probably fixed a number of garbage collection bugs. + * gm2/m2pp.c: major changes to allow this file to be built and + linked to cc1plus as well as cc1gm2. (m2pp_print_char), + (m2pp_try_block), (m2pp_cleanup_point_expr), (m2pp_handler), + (m2pp_try_catch_expr), (m2pp_throw), (m2pp_catch_expr), + (m2pp_try_finally_expr), (m2pp_if_stmt), + (m2pp_compound_expression), (m2pp_target_expression) new + functions. + * gm2/bnf/m2-2.bnf: (PutExceptionFinally), (PutExceptionBlock), + (GetCurrentScope) call these building functions when parsing + source. (RetryStatement) new separate rule. + (InitialBlock), (FinalBlock) new rules. + * gm2/bnf/m2-3.bnf: (RetryStatement) new separate rule. + * gm2/bnf/m2-h.bnf: (RetryStatement) new separate rule. + * gm2/bnf/m2-2.bnf: (RetryStatement) new separate rule. + * gm2/gm2-compiler/M2Base.def: added space. + * gm2/gm2-compiler/M2BasicBlock.mod: (ConvertQuads2BasicBlock) + updated to understand about CatchBegin and CatchEnd quads. + * gm2/gm2-compiler/M2GenGCC.mod: (CodeTry), (CodeCatchBegin), + (CodeCatchEnd), (CodeRetry), (CodeThrow) new procedures. + * gm2/gm2-compiler/M2Optimize.def: fixed dates. + * gm2/gm2-compiler/M2Optimize.mod: fixed dates. + * gm2/gm2-compiler/M2Quads.def: (IsCatchBegin), (IsCatchEnd) + new functions defined and exported. + * gm2/gm2-compiler/M2Quads.mod: (BuildThrowProcedure) new + procedure. (IsUnConditional) understands ThrowOp and RetryOp. + (WriteQuad) displays ThrowOp. (IsQuadA) new function which + allows (IsCall), (IsReturn), (IsNewLocalVar), (IsKillLocalVar), + (ProcedureScope) to be refactored. (IsCatchBegin), + (IsCatchEnd), new functions. (BuildExceptInitial) new + procedure. (BuildExceptFinally) new procedure. + (BuildExceptProcedure) new procedure. (BuildRetry) new + procedure. + * gm2/gm2-compiler/M2System.def: fixed dates. (Throw) exported. + (IsPseudoSystemProcedure) exported. + * gm2/gm2-compiler/M2System.mod: initialize Throw, implement + IsPseudoSystemProcedure. + * gm2/gm2-compiler/SymbolTable.def: (PutExceptionBlock), + (HasExceptionBlock), (PutExceptionFinally), + (HasExceptionFinally) defined and export new procedures. + * gm2/gm2-compiler/SymbolTable.mod: (PutExceptionBlock), + (HasExceptionBlock), (PutExceptionFinally), + (HasExceptionFinally) new procedures implemented. + * gm2/gm2-compiler/gccgm2.def: (BuildTryCatch), + (BuildThrow) new functions defined. + * gm2/gm2-libs/M2RTS.mod: explicitly qualify RTExceptions.Raise. + * gm2/gm2-libs/SYSTEM.def: export new internal procedure THROW. + (THROW) defined. + * gm2/tools-src/createUlmSys: fixed dates. + +2008-07-10 Gaius Mulley + + * gm2/gm2builtins.c: added support for return_address + and frame_address as builtins. + * gm2/gm2-libs/Builtins.def: defined return_address + and frame_address. + * gm2/gm2-libs/Builtins.mod: defined return_address + and frame_address to their GCC builtin counterparts. + * gm2/gm2-tree.def: defined THROW_EXPR node for Modula-2. + +2008-07-07 Gaius Mulley + + * gm2/Make-lang.in: add new rules for building shared + libraries with -O2 and -O0. They are now stored in + separate directories and gm2 will link against the + appropriate variety given the command line options. + * gm2/NEWS: updated to reflect 0.63 and the new features. + * gm2/TODO: updated and removed completed tasks and introduced + new tasks. + * gm2/gm2.texi: updated internal runtime section which + now matches the new exception handling code. Also + introduced a section on how exception handling is implemented + in GNU Modula-2 (using the setjmp/longjmp mechanism). + * gm2/gm2builtins.c: added setjmp, longjmp to the builtins. + * gm2/gm2spec.c: detect -O2 and modify the link path accordingly. + * gm2/m2.flex: add RETRY and EXCEPT keywords. + * gm2/m2pp.c: fixed pretty printing of GCC Trees (in Modula-2 + syntax) so that nested procedures are displayed correctly. + * gm2/bnf/gm2l.bnf: add RETRY and EXCEPT keywords. + * gm2/bnf/gm2m.bnf: add RETRY and EXCEPT keywords. + * gm2/bnf/m2-2.bnf: add RETRY and EXCEPT keywords. + * gm2/bnf/m2-3.bnf: add RETRY and EXCEPT keywords. + * gm2/bnf/m2-h.bnf: add RETRY and EXCEPT keywords. + * gm2/bnf/m2.bnf: add RETRY and EXCEPT keywords. + * gm2/el/g-mode.el: add indent support for EXCEPT block. + * gm2/gm2-compiler/M2ALU.def: fixed date in comment. + * gm2/gm2-compiler/M2ALU.mod: fixed date in comment. + * gm2/gm2-compiler/M2GCCDeclare.def: fixed date in comment. + * gm2/gm2-compiler/M2GCCDeclare.mod: fixed date in comment. + * gm2/gm2-compiler/M2GenGCC.def: fixed date in comment. + * gm2/gm2-compiler/M2GenGCC.mod: fixed date in comment. + * gm2/gm2-compiler/M2Quads.def: introduced BuildExcept + procedures. + * gm2/gm2-compiler/M2Quads.mod: implement BuildExcept + procedures. Fixed GetNextQuad to do this and not skip + a DummyOp quadruple. Except block builds a local + nested procedure for the exception block. The + retry code is currently broken. + * gm2/gm2-compiler/M2Reserved.def: added RetryTok and + ExceptTok. + * gm2/gm2-compiler/NameKey.def: fixed spacing. + * gm2/gm2-libs/Break.mod: fixed comment. + * gm2/gm2-libs/Builtins.def: define and export longjmp + and setjmp. + * gm2/gm2-libs/M2EXCEPTION.def: fixed comment dates. + * gm2/gm2-libs/M2RTS.def: fixed comment dates. + * gm2/gm2-libs/RTExceptions.def: fixed indentation. + * gm2/tools-src/createUlmSys: now creates a + _M2_SYSTEM_finish section to the C SYSTEM implementation + module. + * gm2/ulm-lib-gm2/sys/termios.c: added a + _M2_termios_finish section. + * gm2/gm2builtins.c: fixed bug in longjump prototype and + included setjmp into the table of builtins. Also fixed + gm2builtins_BuildBuiltinTree to set the last function + to NULL_TREE if the function returns void. + * gm2/gm2-compiler/M2GenGCC.mod: refactored CodeDirectCall. + * gm2/gm2-libs/Builtins.def: added comment about internal + longjmp's restriction. + * gm2/gm2-libs/libc.def: added setjmp/longjmp definitions. + +2008-07-02 Gaius Mulley + + * fixed bugs reported by: Erik Irsch . + * gm2/gm2-libs/FIO.mod::ReadNBytes: changed local + variable to INTEGER from CARDINAL. + * gm2/gm2-libs-pim/FileSystem.mod: modified all read + routines to set eof if res is notdone. Also modified + so that lastByte is only set if res = done. + +2008-06-28 Gaius Mulley + + * fixed bug reported by Jim Cox which was exposed by + using unbounded arrays inside proc types. + * gm2/gm2-compiler/SymbolTable.def: add isUnbounded + as a parameter to PutProcTypeParam. + * gm2/gm2-compiler/SymbolTable.mod: use isUnbounded + when creating a ParamType. + * gm2/gm2-compiler/P2SymBuild.mod: pass a boolean + as the third parameter indicating whether parameter + was declared as an unbounded array. + +2008-06-24 Gaius Mulley + + * gm2/el/g-mode.el: fixed auto indentation for the keyword + EXCEPT. + * gm2/gm2builtins.c: added support for setjmp and longjmp. + * gm2/gm2-compiler/gm2builtins.def: added definitions for + setjmp and longjmp. + * gm2/gm2-libs/Builtins.{def,mod}: added definitions for + setjmp and longjmp. + +2008-06-16 Gaius Mulley + + * gm2/el/g-mode.el: fixed auto indentation for the keyword + FINALLY. + * gm2/gm2spec.c: enabled -O2 -fshared options. + +2008-06-15 Gaius Mulley + + * gm2/gm2-libs-ch/Selective.c: added finish function. + * gm2/examples/svga/Transform.mod: tidied up comment. + * gm2/examples/svga/testbox.mod: tidied up formatting. + * gm2/gm2-libs/UnixArgs.def: fixed dates. + * gm2/gm2-libs-ch/StdIO.c: added finish function. + * gm2/gm2-libs-ch/Storage.c: added finish function. + * gm2/gm2-libs-ch/UnixArgs.c: added finish function. + * gm2/gm2-libs-ch/choosetemp.c: added finish function. + * gm2/gm2-libs-ch/libc.c: added finish function. + * gm2/gm2-libs-ch/sckt.c: added finish function. + * gm2/gm2-libs-ch/wrapc.c: added finish function. + +2008-06-14 Michael Lambert + + * gm2/Make-lang.in: invoke bash explicity due to + Ubuntu Hardy Heron (and others) using /bin/dash + as /bin/sh rather than /bin/bash. + +2008-06-12 Gaius Mulley + + * examples/swig/tiny: new examples showing the + behaviour of FINALLY within a shared library. + * gm2/gm2/gccgm2.c: modify gccgm2_BuildCallInnerInit + to gccgm2_BuildCallInner. + * gm2/gm2/bnf/gm2l.bnf: modify grammer to + understand the keyword FINALLY. + * gm2/gm2/bnf/gm2m.bnf: modify grammer to + understand the keyword FINALLY. + * gm2/gm2/bnf/m2-3.bnf: modify grammer to + support FINALLY. + * gm2/gm2/examples/swig/strio/teststrio.py: + fix bug when calling WriteLn + * gm2/gm2/gm2-compiler/M2AsmUtil.def: export + GetModuleFinallyName. + * gm2/gm2/gm2-compiler/M2AsmUtil.mod: implement + GetModuleFinallyName. + * gm2/gm2/gm2-compiler/M2GCCDeclare.mod: declare + finally function for each module. + * gm2/gm2/gm2-compiler/M2GenGCC.mod: CodeFinallyStart, + CodeFinallyEnd new functions. + * gm2/gm2/gm2-compiler/M2Optimize.mod: make optimizer + understand new quadruples. + * gm2/gm2/gm2-compiler/M2Quads.def: added + InitStartOp, InitEndOp, FinallyStartOp and FinallyEndOp. + Export StartBuildFinally, EndBuildFinally. + * gm2/gm2/gm2-compiler/M2Quads.mod: introduced + InitStartOp, InitEndOp, FinallyStartOp and FinallyEndOp. + Modified StartBuildInit, EndBuildInit to use InitStartOp + and InitEndOp. StartBuildFinally, EndBuildFinally new + procedures. Modified AsmStartementsInBlock. + * gm2/gm2/gm2-compiler/M2Scope.mod: modified to search + for blocks using InitStartOp, InitEndOp, FinallyStartOp + and FinallyEndOp as markers. + * gm2/gm2/gm2-compiler/M2SubExp.mod: modified EndOp, StartOp + to InitStartOp, InitEndOp, FinallyStartOp and FinallyEndOp. + * gm2/gm2/gm2-compiler/SymbolTable.def: exported + PutModuleFinallyStartQuad, GetModuleFinallyStartQuad. + Modified GetModuleQuads to return finally range. + * gm2/gm2/gm2-compiler/SymbolTable.mod: added StartFinishQuad, + EndFinishQuad and FinallyFunction to module fields. + * gm2/gm2/gm2-compiler/gccgm2.def: modified BuildCallInnerInit + to BuildCallInner. + * gm2/gm2/gm2-compiler/gm2lgen.mod: uncommented the + calls to the final function in each module. + * gm2/gm2/gm2-libs/FIO.mod: uncommented the FINALLY + clause. + * gm2/gm2/gm2-libs/StrIO.mod: tidied up formatting and + updated dates. + +2008-06-06 Gaius Mulley + + * gm2/gm2/m2.flex: added FINALLY keyword. + * gm2/gm2/p2crc: added _M2_%s_fini function template name. + * gm2/gm2/bnf/m2-2.bnf: added FINALLY keyword and altered grammar. + * gm2/gm2/bnf/m2-3.bnf: added FINALLY keyword and altered grammar. + * gm2/gm2/bnf/m2-h.bnf: added FINALLY keyword and altered grammar. + * gm2/gm2/bnf/m2.bnf: added FINALLY keyword and altered grammar. + * gm2/gm2/gm2-compiler/M2Reserved.def: added FINALLY keyword. + * gm2/gm2/gm2-compiler/M2Reserved.mod: added FINALLY to the set of + keywords. + * gm2/gm2/gm2-libs/FIO.mod: added commented code to use the + FINALLY construct. This will be enabled once all the changes are + complete. + * gm2/gm2/p2c/p2c-src/src/decl.c: set new field isfinally to FALSE. + * gm2/gm2/p2c/p2c-src/src/lex.c: add new FINALLY keyword. + * gm2/gm2/p2c/p2c-src/src/p2crc: also added skeleton function name. + * gm2/gm2/p2c/p2c-src/src/parse.c: added new flags to determine + whether the block is in the initialization or finalization section. + Modified p_body accordingly. Added routines to generate the + finally function. + * gm2/gm2/p2c/p2c-src/src/trans.h: added FINALLY as a keyword to p2c. + +2008-06-04 Gaius Mulley + + * gm2/gm2/Make-lang.in: added RealMath to the + GM2-LIBS-ISO-MODS list. + * gm2/gm2/gm2.texi: added description of + -fdump-system-exports, -fswig, -fmakeinit and + modified description of -I and -fobject-path to + reflect changes. + * gm2/gm2/gm2spec.c: add -fobject-path if user has + omitted it. + * gm2/gm2/gm2-libs-iso/RealMath.def: use builtins + if possible. + * gm2/gm2/gm2-libs-iso/RealMath.mod: implementation + to use builtins if possible. Implemented ln. + +2008-06-03 Gaius Mulley + + * gm2/Make-file.in: introduce GM2_ISO_FLAGS. Fixed spelling + for GM2-LIBS-ISO-MODS, modified ISO library building rule. + * gm2/gm2.texi: updated documentation date stamp. + * gm2/gm2-libs-iso/ChanConsts.mod: fixed date. + * gm2/gm2-libs-iso/CharClass.mod: fixed import bug. + * gm2/gm2-libs-iso/ConvTypes.mod: fixed date. + * gm2/gm2/gm2-libs-iso/LongMath.mod: fixed date. + * gm2/gm2/gm2-libs-iso/RealMath.mod: fixed date. + * gm2/gm2-libs-iso/M2RTS.def: export HasHalted, IsTerminating. + * gm2/gm2-libs-iso/M2RTS.mod: implemented HasHalted, IsTerminating + and use CardToStr rather than ConvertCardinal. + * gm2/gm2-libs-iso/README.texi: updated dates and also which modules + are complete. + * gm2/gm2-libs-iso/Strings.mod: new file. + +2008-05-29 Gaius Mulley + + * gm2/patches/gcc/4.1.2/04.gaius_patch_gcc: new file. + * gm2/examples/swig/full-strlib/testnum.py: modified print. + * gm2/Make-lang.in: tidied up formatting and added + ability to generate and install shared library + versions of the pim libraries. + * gm2/gm2-lang.c: corrected dates. + * gm2/gm2-lang.h: corrected dates. + * gm2/gm2.texi: new section index, how to produce + swig interface files. Documented -I, -fobject-path= + and -fmodules flags. Added new section + "How to produce swig interface files". + * gm2/gm2spec.c: corrected dates and added ability + to force no linking to be done by ld/collect. + Also added ability to collect all object files. + Introduced styles of libraries (shared libraries, + libraries compiled with debugging and optimization + switches turned on/off). Front end will now + generate a -fobject-path= option if one is not + provided. Fixed several warnings. + * gm2/gm2spec.c:get_objects. new function. + * gm2/gm2spec.c:get_style. new function. + * gm2/gm2spec.c:no_link. new function. + * gm2/lang-options.h: -fshared, -fmakeinit, -fobject-path= + all introduced. + * gm2/lang-specs.h: modified to enable position independant + code to be created and linked against. Also modified to + reflect change in arguments needed in subsidiary linking + programs. + * gm2/lang.opt: list of options includes: fshared, fmakeinit + and fobject-path=. + * gm2/examples/executive/Makefile: modified to utilise + -fobject-path=. + * gm2/examples/ncurses/ColorText.mod: fixed bug caught by the + new stricter compatibility rules. + * gm2/examples/ncurses/WindowDevice.mod: fixed another bug + caught by the new stricter compatibility rules. + * gm2/examples/pthread/Makefile: changed -Wmakeall to -fmakeall. + * gm2/examples/svga/Makefile: changed -Wmakeall to -fmakeall. + * gm2/examples/swig/full-strlib/Makefile: removed many rules + now that automatic linking has been implemented. + * gm2/examples/swig/strlen/Makefile: changed StrLib to + MyStrLib to avoid a name clash. + * gm2/examples/swig/strlen/testlen.py: changed StrLib to + MyStrLib. + * gm2/examples/swig/strlib/MyStrLib.{def,mod}: new files. + * gm2/examples/swig/strlib/StrLib.{def,mod}: removed. + * gm2/gm2-compiler/M2BasicBlock.mod: fixed dates. + * gm2/gm2-compiler/M2Quads.mod: implemented + IsProcedureScope. + * gm2/gm2-compiler/M2Quads.def: defined + IsProcedureScope. + * gm2/gm2-compiler/M2Swig.mod: now explores basic blocks + of each external procedure to see if parameters are + in, out or inout. It also states whether a parameter + direction is unknown or likely to be in, out or inout. + * gm2/gm2-compiler/gm2lcc.mod: now understands -shared + and -fshared and passes all -f options to gcc. + * gm2/gm2-compiler/gm2lgen.mod: fixed dates and understands + -fshared. + * gm2/gm2-libs/FIO.{def,mod}: improved comment. + * gm2/gm2-libs/FpuIO.def: fixed date and comments. + * gm2/www/index.ms: updated web page to say documentation + is built nightly. + +2008-05-08 Gaius Mulley + + * gm2/gm2.texi: tidied up English and fixed a node + label. + * gm2/gm2-compiler/P2SymBuild.mod: fixed bug reported + by Scott Iverson involving + ARRAY BOOLEAN OF ARRAY BOOLEAN OF BITSET. + * gm2/gm2-compiler/SymbolTable.mod: modified some of + the debugging hooks. + +2008-05-07 Gaius Mulley + + * gm2/examples/swig/full-strlib/Makefile: added new + example rules. + * gm2/gm2/gm2-compiler/M2GCCDeclare.mod: improve + debugging information. + * gm2/gm2/gm2-compiler/M2Quads.mod: separated out + knowledge of read, write of LeftValues and RightValues. + Refactored EraseQuad and SubQuad. + * gm2/gm2/gm2-compiler/M2Range.mod: modified read, write + symbol information to determine whether LeftValue or RightValue. + * gm2/gm2/gm2-compiler/M2SubExp.mod: ditto. + * gm2/gm2/gm2-compiler/M2Swig.mod: ditto and also introduced + CalculateVarDirective which attempts to determine whether + a VAR paramete is used for INPUT, OUTPUT or INOUT. + * gm2/gm2/gm2-compiler/SymbolTable.def: provide symbol + read write quad procedure calls with LeftValue or RightValue + information. + * gm2/gm2/gm2-compiler/SymbolTable.mod: implement above. + * gm2/gm2/gm2-libs/NumberIO.mod: tidied up comments and + spacing. + * gm2/gm2/gm2-libs/TimeString.mod: tidied up comments. + + +2008-05-06 Michael Lambert + + * gm2/patches/gcc/4.1.2/03.michael_i386: new file + which patches gcc/config/i386/i386.c. + +2008-05-04 Gaius Mulley + + * gm2/gm2-compiler/gm2lgen.mod: fixed name at end of + procedure. + +2008-05-03 Gaius Mulley + + * gm2/gm2-compiler/gm2lgen.mod: replaced NULL for (void *)0. + +2008-05-02 Gaius Mulley + + * gm2/gm2-compiler/M2Swig.{def,mod}: new files. + Checked in this time. + * gm2/gm2-compiler/gm2lgen.mod: added and implemented + the -shared option. + * gm2/gm2-compiler/gm2lgen.mod: fixed finish function + parameter mismatch. + +2008-05-02 Gaius Mulley + + * gm2/Make-lang.in: added rules for M2Swig.def and + M2Swig.mod. + * gm2/lang.opt: added new option -fswig. + * gm2/gm2-compiler/M2Code.mod: import GenerateSwigFile + and call it appropriately. + * gm2/gm2-compiler/M2GCCDeclare.mod: improved debugging + of subranges. + * gm2/gm2-compiler/M2Options.def: added GenerateSwig. + * gm2/gm2-compiler/M2Options.mod: implemented case to + test for -fswig which sets GenerateSwig to TRUE. + * gm2/gm2-compiler/SymbolTable.def: export + IsParameterUnbounded, IsParameterVar. + * gm2/gm2-compiler/SymbolTable.mod: implemented above + procedures. + * gm2/init/gm2-gccinit: added reference to M2Swig. + * gm2/examples/swig/{full-strlib,strlen,strlib}: new + directories. + * gm2/examples/swig/full-strlib/{Makefile,testcopy.py, + testequ.py,testlen.py}: new files. + * gm2/examples/swig/strlen/{Makefile,StrLib.def,StrLib.i, + StrLib.mod,testlen.py}: new files. + * gm2/examples/swig/strlib/{Makefile,StrLib.def, + StrLib.mod,testlen.py}: new files. + * gm2/gm2-compiler/M2Swig.{def,mod}: new files which + implement an automatic way of producing swig interface + files from an implementation module. + +2008-04-29 Gaius Mulley + + * gm2/gccgm2.c: skip_type_decl in build constructor + functions. + * gm2/gm2-compiler/M2GCCDeclare.mod: handle subscripts + in PrintVerbose routines. + * gm2/gm2-compiler/M2GenGCC.mod: detect unbounded + arrays of generic type and use memcpy rather than + assignment. + * gm2/gm2/gm2-compiler/M2Quads.mod: improved error + messages for unknown types at the end of functions. + * gm2/gm2/gm2-compiler/M2System.def: export + IsGenericSystemType. + * gm2/gm2/gm2-compiler/M2System.mod: implement + IsGenericSystemType. + * gm2/gm2-compiler/SymbolTable.def: export + IsPartialUnbounded. + * gm2/gm2-compiler/SymbolTable.mod: implement + IsPartialUnbounded and added PartialUnbounded + cases to GetSymName and GetDeclared. + * fixed bug reported by James Cox. + +2008-04-27 Gaius Mulley + + * gm2/gccgm2.c: build_common_tree_nodes requesting + unsigned char type. + * gm2/gm2-compiler/M2GenGCC.mod: CalculateBase + must not assume GetType(Subscript) will always yield + a subrange. + * gm2/gm2-compiler/M2GCCDe[...] [diff truncated at 524288 bytes]