{"id":2225921,"url":"http://patchwork.ozlabs.org/api/1.2/patches/2225921/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/patch/20260421201422.3119679-1-gaiusmod2@gmail.com/","project":{"id":17,"url":"http://patchwork.ozlabs.org/api/1.2/projects/17/?format=json","name":"GNU Compiler Collection","link_name":"gcc","list_id":"gcc-patches.gcc.gnu.org","list_email":"gcc-patches@gcc.gnu.org","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260421201422.3119679-1-gaiusmod2@gmail.com>","list_archive_url":null,"date":"2026-04-21T20:14:22","name":"[pushed] PR modula2/120189 Bugfix to documentation and fix prototypes in m2rts.h","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"c0ef89c1378b2981e4712d8e4ed4ce89740631c2","submitter":{"id":80961,"url":"http://patchwork.ozlabs.org/api/1.2/people/80961/?format=json","name":"Gaius Mulley","email":"gaiusmod2@gmail.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/gcc/patch/20260421201422.3119679-1-gaiusmod2@gmail.com/mbox/","series":[{"id":500888,"url":"http://patchwork.ozlabs.org/api/1.2/series/500888/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/list/?series=500888","date":"2026-04-21T20:14:22","name":"[pushed] PR modula2/120189 Bugfix to documentation and fix prototypes in m2rts.h","version":1,"mbox":"http://patchwork.ozlabs.org/series/500888/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2225921/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2225921/checks/","tags":{},"related":[],"headers":{"Return-Path":"<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":["incoming@patchwork.ozlabs.org","gcc-patches@gcc.gnu.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","gcc-patches@gcc.gnu.org"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=cR+wKH+c;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=2620:52:6:3111::32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)","sourceware.org;\n\tdkim=pass (2048-bit key,\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=cR+wKH+c","sourceware.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com","sourceware.org; spf=pass smtp.mailfrom=gmail.com","server2.sourceware.org;\n arc=none smtp.remote-ip=209.85.128.48"],"Received":["from vm01.sourceware.org (vm01.sourceware.org\n [IPv6:2620:52:6:3111::32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g0YVp54zSz1yHB\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 06:14:57 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 55DF54BA901D\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 21 Apr 2026 20:14:55 +0000 (GMT)","from mail-wm1-f48.google.com (mail-wm1-f48.google.com\n [209.85.128.48])\n by sourceware.org (Postfix) with ESMTPS id 56B804BA23D5\n for <gcc-patches@gcc.gnu.org>; Tue, 21 Apr 2026 20:14:27 +0000 (GMT)","by mail-wm1-f48.google.com with SMTP id\n 5b1f17b1804b1-488b3f8fa2bso51377135e9.1\n for <gcc-patches@gcc.gnu.org>; Tue, 21 Apr 2026 13:14:27 -0700 (PDT)","from gawain ([82.153.81.102]) by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-488fb78becdsm189486805e9.5.2026.04.21.13.14.25\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 21 Apr 2026 13:14:25 -0700 (PDT)","from gaius by gawain with local (Exim 4.98.2)\n (envelope-from <gaius@gawain>) id 1wFHUG-0000000D5Zc-3A2u;\n Tue, 21 Apr 2026 21:14:24 +0100"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org 55DF54BA901D","OpenDKIM Filter v2.11.0 sourceware.org 56B804BA23D5"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org 56B804BA23D5","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org 56B804BA23D5","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776802467; cv=none;\n b=ASCncLqSx67vBgfBz7MWMzXuwchVwJye6uB1ywWDNm4NLh2yyf4kJYR7urXSoKsOnjrAIUyS/fmVa1IVFxtEA6jjqP3cHvriRsoqE5bbXCYYz8ljnZyA9tN+kcgxFESEAAew64Ufp4k8shXfwuAccbTcqj1HL7zBBce3z16Nkeo=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776802467; c=relaxed/simple;\n bh=kTQY2QGCm4Cm8jiH49aTa1R/PygwsoYDy+w8ckhDBKU=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=Fv9aA4xbRJI735p+xYsy9+dBIBSIwWO30vjKjGrkPEywDQoC5DIBkCnBx++96CoLItOgpjN1BQMo/vA8FO3fa2ci/Tt+x7xyFoUYfpHqa0k+oH9o6u3zfyHMN6I6OSsBhTx2PuncppQmZs9CF5N9y12gTaS+mKB28lagmT8gA3c=","ARC-Authentication-Results":"i=1; server2.sourceware.org","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1776802466; x=1777407266; darn=gcc.gnu.org;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:from:to:cc:subject:date:message-id:reply-to;\n bh=IGHfPIxc84dhRcB1M9GaNypriulZ/ztmArskjXO0uYs=;\n b=cR+wKH+cmeqBl73mrAcveYEIhOHvdZ4DPQA1lspWFZ/OinNpujoMacQN3IP8u3nE1e\n mnPJWLxnYGkzEdg6lCcayxbfe6bpkjgEpMpqudxUmnouGdc5RJmYELPrq0oA8Ly/wqwC\n Dxvmec5mGfMeDVOLY8mC9fPTZX1mcO00i8vdrNqEP+k9Gr2rIyt4AudJMUsHCstJZtMT\n 5tJd9g3nIN5sPNmgRVY/0FDzWruhTGLu71q4tJWV8fMeVAiwJ1g7tL76TT7AOEIUm3rR\n yKP8xhpMWKpd61p/ybWR5Mdji/BjJ6E3BFDIQdHs6bybiJW2zORkafOB5Q3A1RBZdLK3\n Gt7w==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776802466; x=1777407266;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=IGHfPIxc84dhRcB1M9GaNypriulZ/ztmArskjXO0uYs=;\n b=eVFe2OOMWyTrwhOVLekfbJokKf54aCtjk29PDs1Eei44Zq8qtbs2TpLmiPIXibQc1M\n qxvZasbCNu2Wdw3rdv0sKbQMhs5E/6kZcLGFjqkvHHO9WGyTRkAEwr5s+LOxU5qZhfZr\n BvMZPnCZPC0tvZqqvcp1Bml9HRTAytacaHcjldE0PTfaDG4Cv9a7QHmqVlDZAZ7oMVwD\n uT2jJYL7TeCxmvEHOHzb1mGqCKTH077YK6Wh+rOsVVw+B/M6p9ZdNrHCNGeCYoP2yXIX\n e5+f+tsHUYXnWCsJToc3OodaI3bKtTdb8iEyDB+PdylZKqdWa3GkS9tEmPJPc0wKIRC/\n 8WUA==","X-Gm-Message-State":"AOJu0YwusoOTyCu1A0zq954R9JdQRPuEFcEg2BA6i25mktyi7pk5JNmQ\n mKUSHSNM+j9SCxUn3oKdA6n9dZue1f5ohD/pYF23eecq8dtWvsZDsZKOPo91OA==","X-Gm-Gg":"AeBDievTwCW6/EtGze/ibeBpkbaPwZzeU2SrcQ68W3Msg/UpqQVdEDBKth8E8zze5Uc\n ueCe0ffMi0ZvBE4NLd2wB0EvxTfjIobxopsMKp10NgYJ6nsu/XjHkTJJTE9gMeRkP9X4qZ5RRNi\n rJc+bUDTvHqEOhAfqO8iONAMKG72CvD23hPs3T1ploKwL4Mnz58g6ztiUm2yiDgLPH6dO2mlueS\n aPecXmAEkgT2yxom+LbQGZjQzikZIzu96in1p0/txZmclFZn2pg8jIjP+stmYn0FTB0TpOM9KaJ\n 8IBXc6qleTzjNc8V9ylQv/Psd7qU1g73wnhXPdPoMWJ72VznpdrI+wMI/6X+9yTkYwtM1e+Or22\n xLoLdJcvRaoxbYNuq5P9cR8Kp0cvJ8gCCBSyJNHE0JoJDYcq+RXLnnXUvFeKwlsqDPOKvrLXFAI\n bSXmG/SIFfy6CNNKY=","X-Received":"by 2002:a05:600c:19d3:b0:48a:55ec:c007 with SMTP id\n 5b1f17b1804b1-48a55ecc113mr52690645e9.15.1776802466010;\n Tue, 21 Apr 2026 13:14:26 -0700 (PDT)","From":"Gaius Mulley <gaiusmod2@gmail.com>","To":"gcc-patches@gcc.gnu.org","Cc":"Gaius Mulley <gaiusmod2@gmail.com>","Subject":"[pushed]PR modula2/120189 Bugfix to documentation and fix prototypes\n in m2rts.h","Date":"Tue, 21 Apr 2026 21:14:22 +0100","Message-ID":"<20260421201422.3119679-1-gaiusmod2@gmail.com>","X-Mailer":"git-send-email 2.47.3","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-BeenThere":"gcc-patches@gcc.gnu.org","X-Mailman-Version":"2.1.30","Precedence":"list","List-Id":"Gcc-patches mailing list <gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<https://gcc.gnu.org/mailman/options/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe>","List-Archive":"<https://gcc.gnu.org/pipermail/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-request@gcc.gnu.org?subject=help>","List-Subscribe":"<https://gcc.gnu.org/mailman/listinfo/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>","Errors-To":"gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org"},"content":"This is a tidyup patch for a define in m2rts.h DEFAULT_RUNTIME_MODULE_OVERRIDE\nand it is used in the documentation example gcc/doc/gm2.texi.\n\ngcc/ChangeLog:\n\n\tPR modula2/120189\n\t* doc/gm2.texi (Building a shared library): Replace\n\tconstant string with DEFAULT_RUNTIME_MODULE_OVERRIDE.\n\ngcc/m2/ChangeLog:\n\n\tPR modula2/120189\n\t* gm2-compiler/M2Options.mod (DefaultRuntimeModuleOverride): Add\n\treference comment to libgm2/libm2iso/m2rts.h.\n\nlibgm2/ChangeLog:\n\n\tPR modula2/120189\n\t* libm2iso/m2rts.h (Copyright): Correct dates.\n\t(DEFAULT_RUNTIME_MODULE_OVERRIDE): New define.\n\nSigned-off-by: Gaius Mulley <gaiusmod2@gmail.com>\n---\n gcc/doc/gm2.texi                  | 13 +++++--------\n gcc/m2/gm2-compiler/M2Options.mod |  2 ++\n libgm2/libm2iso/m2rts.h           |  6 +++++-\n 3 files changed, 12 insertions(+), 9 deletions(-)","diff":"diff --git a/gcc/doc/gm2.texi b/gcc/doc/gm2.texi\nindex 74bd858abf6..e4a0e963563 100644\n--- a/gcc/doc/gm2.texi\n+++ b/gcc/doc/gm2.texi\n@@ -2329,20 +2329,16 @@ libtool --tag=CC --mode=link gcc -g a.lo b.lo c.lo \\\n At this point the shared library @file{libabc.so} will have been\n created inside the directory @file{.libs}.\n \n-This library can be called from C using the following technique.\n-The define @code{INIT_ORDER} should not be changed as it defines the\n-initialization order of the core base modules.\n+This library can be called from C++ using the following technique.\n The define @code{USER_LIB} is the name of the library dialect and\n maybe changed if required.\n+The @code{DEFAULT_RUNTIME_MODULE_OVERRIDE} is a predefined string\n+containing the default base core module initialization order.\n \n @example\n #include <stdio.h>\n #include <m2rts.h>\n \n-#define INIT_ORDER \"m2iso:RTentity,m2iso:Storage,\" \\\n-                   \"m2iso:SYSTEM,m2iso:M2RTS,\" \\\n-                   \"m2iso:RTExceptions,m2iso:IOLink\"\n-\n #define USER_LIB NULL\n \n /* Add the runtime dependency for this file on modules a, b and c.  */\n@@ -2373,7 +2369,8 @@ construct_scaffold (int argc, char *argv[], char *envp[])\n   m2iso_M2RTS_RegisterModule (__FILE__, USER_LIB,\n                               init, fini, dep);\n   m2iso_M2RTS_ConstructModules (__FILE__, USER_LIB,\n-                                INIT_ORDER, argc, argv, envp);\n+                                DEFAULT_RUNTIME_MODULE_OVERRIDE,\n+                                argc, argv, envp);\n @}\n \n void\ndiff --git a/gcc/m2/gm2-compiler/M2Options.mod b/gcc/m2/gm2-compiler/M2Options.mod\nindex d067c5a9b0b..4842d7a960c 100644\n--- a/gcc/m2/gm2-compiler/M2Options.mod\n+++ b/gcc/m2/gm2-compiler/M2Options.mod\n@@ -54,6 +54,8 @@ FROM DynamicStrings IMPORT String, Length, InitString, Mark, Slice, EqualArray,\n \n CONST\n    Debugging = FALSE ;\n+   (* DefaultRuntimeModuleOverride must match\n+      DEFAULT_RUNTIME_MODULE_OVERRIDE in libgm2/libm2iso/m2rts.h.  *)\n    DefaultRuntimeModuleOverride = \"m2iso:RTentity,m2iso:Storage,m2iso:SYSTEM,m2iso:M2RTS,m2iso:RTExceptions,m2iso:IOLink\" ;\n \n VAR\ndiff --git a/libgm2/libm2iso/m2rts.h b/libgm2/libm2iso/m2rts.h\nindex fbeae51b7ae..07a96586ea8 100644\n--- a/libgm2/libm2iso/m2rts.h\n+++ b/libgm2/libm2iso/m2rts.h\n@@ -1,6 +1,6 @@\n /* m2rts.h provides a C interface to M2RTS.mod.\n \n-Copyright (C) 2019-2022 Free Software Foundation, Inc.\n+Copyright (C) 2019-2026 Free Software Foundation, Inc.\n Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.\n \n This file is part of GNU Modula-2.\n@@ -26,6 +26,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see\n \n \n #define str(X)  #X\n+/* DEFAULT_RUNTIME_MODULE_OVERRIDE must match the m2 declaration in\n+   gcc/m2/gm2-compiler/M2Options.mod.  */\n+\n+#define DEFAULT_RUNTIME_MODULE_OVERRIDE \"m2iso:RTentity,m2iso:Storage,m2iso:SYSTEM,m2iso:M2RTS,m2iso:RTExceptions,m2iso:IOLink\"\n \n typedef void (*proc_con) (int, char **, char **);\n typedef void (*proc_dep) (void);\n","prefixes":["pushed"]}