From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.CeBiTec.Uni-Bielefeld.DE (smtp.CeBiTec.Uni-Bielefeld.DE [129.70.160.84]) by sourceware.org (Postfix) with ESMTPS id 2FBBA3858404 for ; Mon, 11 Jul 2022 20:36:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2FBBA3858404 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=CeBiTec.Uni-Bielefeld.DE Authentication-Results: sourceware.org; spf=none smtp.mailfrom=cebitec.uni-bielefeld.de Received: from localhost (localhost [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id D7A2062AD1; Mon, 11 Jul 2022 22:36:55 +0200 (CEST) X-Virus-Scanned: amavisd-new at CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (smtp.cebitec.uni-bielefeld.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2l3Cd0Aqq1ry; Mon, 11 Jul 2022 22:36:55 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p508547b6.dip0.t-ipconnect.de [80.133.71.182]) (Authenticated sender: ro) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id 2E83D62B5E; Mon, 11 Jul 2022 22:36:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=CeBiTec.Uni-Bielefeld.DE; s=20200306; t=1657571815; bh=damY/sIKi7rkGM49Psxrv8r8Uy9qudVclW2447jixQg=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=TD6kL5dGrPDiEmamZ/SYbVOCqdQWYKGnM9CUNnmM/XEeOXF1rKUWtp8jXmfb2uunX 1sNTAkmC3tdiOpGvjfvMZsftuDaSn9ZjOskUi2UiMtmW9c8LdFh6gvdIJAG8pmoSUR aD0SvaqPC26ggHMLH1O5a8/b44t/NaMD5NpsSNKfaPCAdIiO3lyncxdL1eYflPTyTK QpfTsCbQcnnnQlyRg/O5bWVgnwThImj/nC4qRu7kluboveA4e9wJJrqqxSqKcglq1s Wb2Rel4FJ2ZlOP8m9TPnf2y9mrp+DfpHCdvnxI3pYjpg0DTUorxXvr05AjfQOqLZ7z 3Nb+Z6GEFjbww== From: Rainer Orth To: Gaius Mulley Cc: Gaius Mulley via Gcc-patches Subject: Re: Modula-2: merge followup (brief update on the progress of the new linking implementation) References: <87h73qy3vb.fsf@debian> <87o7xv4rjg.fsf@debian> Date: Mon, 11 Jul 2022 22:36:54 +0200 In-Reply-To: <87o7xv4rjg.fsf@debian> (Gaius Mulley's message of "Mon, 11 Jul 2022 16:06:59 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.90 (usg-unix-v) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Status: No, score=-3794.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jul 2022 20:37:00 -0000 --=-=-= Content-Type: text/plain Hi Gaius, > thanks for the report - the first bug report (above) is now fixed on > devel/modula-2. thanks, that got me closer, but not quite there yet: * First, I get: /vol/gcc/src/hg/master/modula-2/gcc/m2/gm2-libs-min/SYSTEM.mod:29:1: error: In implementation module 'SYSTEM': module 'M2RTS' does not export procedure 'RequestDependant' /vol/gcc/src/hg/master/modula-2/libgm2/libm2min/../../gcc/m2/gm2-libs-min/M2RTS.mod:29:1: error: In implementation module 'M2RTS': module 'M2RTS' does not export procedure 'RegisterModule' /vol/gcc/src/hg/master/modula-2/libgm2/libm2min/../../gcc/m2/gm2-libs-min/SYSTEM.mod:29:1: error: In implementation module 'SYSTEM': module 'M2RTS' does not export procedure 'RequestDependant' Fixed by adding dummy declarations/definitions as in the attached patch. * Then, I run into make[9]: Entering directory '/var/gcc/modula-2/11.4-gcc-modula-2/i386-pc-solaris2.11/amd64/libgm2/libm2pim' Makefile:913: warning: ignoring prerequisites on suffix rule definition make[9]: *** No rule to make target 'UnixArgs.c', needed by 'libm2pim_la-UnixArgs.lo'. make[9]: *** No rule to make target 'Selective.c', needed by 'libm2pim_la-Selective.lo'. make[9]: *** No rule to make target 'sckt.c', needed by 'libm2pim_la-sckt.lo'. make[9]: *** No rule to make target 'errno.c', needed by 'libm2pim_la-errno.lo'. make[9]: *** No rule to make target 'dtoa.c', needed by 'libm2pim_la-dtoa.lo'. make[9]: *** No rule to make target 'ldtoa.c', needed by 'libm2pim_la-ldtoa.lo'. make[9]: *** No rule to make target 'termios.c', needed by 'libm2pim_la-termios.lo'. make[9]: *** No rule to make target 'SysExceptions.c', needed by 'libm2pim_la-SysExceptions.lo'. make[9]: Target 'all-am' not remade because of errors. make[9]: Leaving directory '/var/gcc/modula-2/11.4-gcc-modula-2/i386-pc-solaris2.11/amd64/libgm2/libm2pim' It turns out none of the generated auto* files had been regenerated in tree; fixed by running autoconf; autoheader; automake. * Next, on Solaris only: /vol/gcc/src/hg/master/modula-2/libgm2/libm2pim/dtoa.cc: In function 'int dtoa_calcmaxsig(char*, int)': /vol/gcc/src/hg/master/modula-2/libgm2/libm2pim/dtoa.cc:139:7: error: 'index' was not declared in this scope; did you mean 'index_t'? 139 | e = index (p, 'E'); | ^~~~~ | index_t /vol/gcc/src/hg/master/modula-2/libgm2/libm2pim/dtoa.cc: In function 'int dtoa_calcdecimal(char*, int, int)': /vol/gcc/src/hg/master/modula-2/libgm2/libm2pim/dtoa.cc:171:7: error: 'index' was not declared in this scope; did you mean 'index_t'? 171 | e = index (p, 'E'); | ^~~~~ | index_t While index is declared in , the declaration is guarded by !_XPG7 || __EXTENSIONS__, but g++ defines _XPG7/_XOPEN_SOURCE=700 on Solaris. I think it's better to just use the standard strchr instead, as the attached patch does. * While this lets the build finish on all of i386-pc-solaris2.11, sparcv9-sun-solaris2.11, and x86_64-pc-linux-gnu, I get thousands of testsuite failures, all of the same kind: Undefined first referenced symbol in file RTco_signal /var/gcc/modula-2/11.4-gcc-modula-2/i386-pc-solaris2.11/./libgm2/libm2pim/.libs/libm2pim.so RTco_select /var/gcc/modula-2/11.4-gcc-modula-2/i386-pc-solaris2.11/./libgm2/libm2pim/.libs/libm2pim.so RTco_initSemaphore /var/gcc/modula-2/11.4-gcc-modula-2/i386-pc-solaris2.11/./libgm2/libm2pim/.libs/libm2pim.so RTco_wait /var/gcc/modula-2/11.4-gcc-modula-2/i386-pc-solaris2.11/./libgm2/libm2pim/.libs/libm2pim.so ld: fatal: symbol referencing errors collect2: error: ld returned 1 exit status compiler exited with status 1 FAIL: gm2/exceptions/run/pass/libexcept.mod compilation, -g I haven't yet tried to fix those. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=m2link.patch diff --git a/gcc/m2/gm2-libs-min/M2RTS.def b/gcc/m2/gm2-libs-min/M2RTS.def --- a/gcc/m2/gm2-libs-min/M2RTS.def +++ b/gcc/m2/gm2-libs-min/M2RTS.def @@ -31,11 +31,17 @@ DEFINITION MODULE M2RTS ; FROM SYSTEM IMPORT ADDRESS ; +TYPE + ArgCVEnvP = PROCEDURE (INTEGER, ADDRESS, ADDRESS) ; (* all these procedures do nothing except satisfy the linker. *) +PROCEDURE RegisterModule (name: ADDRESS; + init, fini: ArgCVEnvP; + dependencies: PROC) ; +PROCEDURE RequestDependant (modulename, dependantmodule: ADDRESS) ; PROCEDURE ExecuteTerminationProcedures ; PROCEDURE ExecuteInitialProcedures ; PROCEDURE HALT ; diff --git a/gcc/m2/gm2-libs-min/M2RTS.mod b/gcc/m2/gm2-libs-min/M2RTS.mod --- a/gcc/m2/gm2-libs-min/M2RTS.mod +++ b/gcc/m2/gm2-libs-min/M2RTS.mod @@ -70,4 +70,10 @@ BEGIN END DeconstructModules ; +PROCEDURE RegisterModule (name: ADDRESS; + init, fini: ArgCVEnvP; + dependencies: PROC) ; +BEGIN +END RegisterModule ; + END M2RTS. diff --git a/libgm2/libm2pim/dtoa.cc b/libgm2/libm2pim/dtoa.cc --- a/libgm2/libm2pim/dtoa.cc +++ b/libgm2/libm2pim/dtoa.cc @@ -136,7 +136,7 @@ dtoa_calcmaxsig (char *p, int ndigits) char *o; int x; - e = index (p, 'E'); + e = strchr (p, 'E'); if (e == NULL) x = 0; else @@ -145,7 +145,7 @@ dtoa_calcmaxsig (char *p, int ndigits) x = atoi (e + 1); } - o = index (p, '.'); + o = strchr (p, '.'); if (o == NULL) return strlen (p) + x; else @@ -168,7 +168,7 @@ dtoa_calcdecimal (char *p, int str_size, int x; int l; - e = index (p, 'E'); + e = strchr (p, 'E'); if (e == NULL) x = 0; else @@ -178,7 +178,7 @@ dtoa_calcdecimal (char *p, int str_size, } l = strlen (p); - o = index (p, '.'); + o = strchr (p, '.'); if (o == NULL) x += strlen (p); else --=-=-=--