public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ro at gcc dot gnu.org" <gcc-bugzilla@gcc.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 [thread overview] Message-ID: <bug-102342-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102342 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 UNRESOLVED: gm2/calling-c/datatypes/unbounded/run/pass/m.mod execution, -g (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 flags (-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.
next reply other threads:[~2021-09-15 9:58 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-09-15 9:58 ro at gcc dot gnu.org [this message] 2021-10-25 11:41 ` [Bug modula2/102342] " ro at gcc dot gnu.org 2022-04-23 11:52 ` gaius at gcc dot gnu.org 2022-04-26 9:40 ` ro at CeBiTec dot Uni-Bielefeld.DE
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-102342-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).