From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5F8653858419; Wed, 15 Sep 2021 09:58:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5F8653858419 From: "ro at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug modula2/102342] New: gm2 testsuite failures for non-default multilib Date: Wed, 15 Sep 2021 09:58:49 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: modula2 X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ro at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2021 09:58:49 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102342 Bug ID: 102342 Summary: gm2 testsuite failures for non-default multilib Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: modula2 Assignee: unassigned at gcc dot gnu.org Reporter: ro at gcc dot gnu.org Target Milestone: --- When running the gm2 testsuite for non-default multilibs (e.g. x86_64-pc-linux-gnu for the default (-m64) and -m32, or i386-pc-solaris2.11 for the default -m32 and -m64), many tests for the non-default multilib FAIL, e.g. FAIL: gm2/calling-c/datatypes/unbounded/run/pass/m.mod compilation, -g=20 UNRESOLVED: gm2/calling-c/datatypes/unbounded/run/pass/m.mod execution, -g= =20 (link failed) /vol/gcc/bin/gld-2.35: i386:x86-64 architecture of input file `/tmp/ccTE5Kph.a(c.o)' is incompatible with i386 output While the main testcase is correctly compiled with the necessary multilib f= lags (-m32 here), additional objects (c.o here) are not. The common problem is = that those compilations are done manually with an explicit set output [exec ${XGCC} -B[file dirname $rootme]/gcc -g -c $srcdir/gm2/calling-c/datatypes/unbounded/run/pass/c.c -o c.o] in gm2.exp, not taking multilib flags into account. There are two ways to do this correctly. One is to do the compilation with target_compile like this: -- gm2.exp 2021-07-08 14:07:03.408049578 +0000 +++ m2.exp 2021-09-15 11:50:06.344101169 +0000 @@ -29,14 +29,9 @@ set gm2src ${srcdir}/../m2 gm2_init_pim "${srcdir}/gm2/calling-c/datatypes/unbounded/run/pass" - -set XGCC [lookfor_file $rootme xgcc]; - gm2_link_with "c.o -lm2pim -lm2iso -lpthread" - -set output [exec rm -f c.o] -set output [exec ${XGCC} -B[file dirname $rootme]/gcc -g -c $srcdir/gm2/calling-c/datatypes/unbounded/run/pass/c.c -o c.o] +set output [target_compile $srcdir/$subdir/c.c c.o object "-g"] foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] { # If we're only testing specific files and this isn't one of them, skip it. @@ -47,5 +42,3 @@ gm2_target_compile $srcdir/$subdir/m.mod m.o object "-g" gm2-torture-execute $testcase "" "pass" } - -set output [exec rm -f c.o] The other, canonical one, is to use dg-additonal-sources instead, avoiding = the need for special driver files. The above patch fixed the issue on i386-pc-solaris2.11 with -m32/-m64.=