public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/modula-2] PR-102342 - fixes to allow gm2 testsuite to work with multilib and extra gcc objects.
@ 2022-04-23 11:49 Gaius Mulley
0 siblings, 0 replies; only message in thread
From: Gaius Mulley @ 2022-04-23 11:49 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:6ac8c270eda44fc51104f450f35f91f2705e0c9f
commit 6ac8c270eda44fc51104f450f35f91f2705e0c9f
Author: Gaius Mulley <gaius.mulley@southwales.ac.uk>
Date: Sat Apr 23 12:43:18 2022 +0100
PR-102342 - fixes to allow gm2 testsuite to work with multilib and extra gcc objects.
2022-04-23 Gaius Mulley <gaius.mulley@southwales.ac.uk>
[Applying a patch provided by Rainer Orth <ro@gcc.gnu.org> from PR-102342]
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.
This patch ensures that the gcc invocation to generate additional objects
are also generated using the correct multilib options.
gcc/testsuite/gm2/ChangeLog:
* calling-c/datatypes/unbounded/run/pass/calling-c-datatypes-unbounded-run-pass.exp:
Remove XGCC and XGCC invocations and handbuilt tidyups. Use
target_compile instead.
* examples/callingC/run/pass/examples-callingC-run-pass.exp:
Remove XGCC and XGCC invocations and handbuilt tidyups. Use
target_compile instead.
* exceptions/run/pass/exceptions-run-pass.exp: Remove XGCC and
XGCC invocations and handbuilt tidyups. Use target_compile
instead.
* extensions/run/pass/extensions-run-pass.exp: Remove XGCC and
XGCC invocations and handbuilt tidyups. Use target_compile
instead.
* imports/run/pass/imports-run-pass.exp: Remove XGCC and XGCC
invocations and handbuilt tidyups. Use target_compile instead.
* linking/libarchive/pass/linking-libarchive-pass.exp: Remove XGCC
and XGCC invocations and handbuilt tidyups. Use target_compile
instead.
* gm2/pim/run/pass/pim-run-pass.exp: Remove XGCC and XGCC
invocations and handbuilt tidyups. Use target_compile instead.
* pimcoroutines/run/pass/pimcoroutines-run-pass.exp: Remove XGCC
and XGCC invocations and handbuilt tidyups. Use target_compile
instead.
* types/run/pass/types-run-pass.exp: Remove XGCC and XGCC
invocations and handbuilt tidyups. Use target_compile instead.
Signed-off-by: Gaius Mulley <gaius.mulley@southwales.ac.uk>
Diff:
---
.../run/pass/calling-c-datatypes-unbounded-run-pass.exp | 9 +--------
.../examples/callingC/run/pass/examples-callingC-run-pass.exp | 6 +-----
gcc/testsuite/gm2/exceptions/run/pass/exceptions-run-pass.exp | 7 ++-----
gcc/testsuite/gm2/extensions/run/pass/extensions-run-pass.exp | 6 +-----
gcc/testsuite/gm2/imports/run/pass/imports-run-pass.exp | 2 +-
.../gm2/linking/libarchive/pass/linking-libarchive-pass.exp | 7 +------
gcc/testsuite/gm2/pim/run/pass/pim-run-pass.exp | 2 +-
.../gm2/pimcoroutines/run/pass/pimcoroutines-run-pass.exp | 2 +-
gcc/testsuite/gm2/types/run/pass/types-run-pass.exp | 7 +------
9 files changed, 10 insertions(+), 38 deletions(-)
diff --git a/gcc/testsuite/gm2/calling-c/datatypes/unbounded/run/pass/calling-c-datatypes-unbounded-run-pass.exp b/gcc/testsuite/gm2/calling-c/datatypes/unbounded/run/pass/calling-c-datatypes-unbounded-run-pass.exp
index 31733fa5020..c526f40db05 100644
--- a/gcc/testsuite/gm2/calling-c/datatypes/unbounded/run/pass/calling-c-datatypes-unbounded-run-pass.exp
+++ b/gcc/testsuite/gm2/calling-c/datatypes/unbounded/run/pass/calling-c-datatypes-unbounded-run-pass.exp
@@ -29,14 +29,9 @@ load_lib gm2-torture.exp
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 @@ foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
gm2_target_compile $srcdir/$subdir/m.mod m.o object "-g"
gm2-torture-execute $testcase "" "pass"
}
-
-set output [exec rm -f c.o]
diff --git a/gcc/testsuite/gm2/examples/callingC/run/pass/examples-callingC-run-pass.exp b/gcc/testsuite/gm2/examples/callingC/run/pass/examples-callingC-run-pass.exp
index de4e3e500b0..3bef316bcdf 100644
--- a/gcc/testsuite/gm2/examples/callingC/run/pass/examples-callingC-run-pass.exp
+++ b/gcc/testsuite/gm2/examples/callingC/run/pass/examples-callingC-run-pass.exp
@@ -30,9 +30,7 @@ set gm2src ${srcdir}/../m2
gm2_init_iso "$srcdir/$subdir"
gm2_link_with "c.o -lm2iso -lm2pim -lpthread"
-set XGCC [lookfor_file $rootme xgcc];
-set output [exec rm -f c.o]
-set output [exec ${XGCC} -B[file dirname $rootme]/gcc -g -c $srcdir/$subdir/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.
@@ -43,5 +41,3 @@ foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
gm2_target_compile $srcdir/$subdir/m.mod m.o object "-g"
gm2-torture-execute $testcase "" "pass"
}
-
-set output [exec rm -f c.o]
diff --git a/gcc/testsuite/gm2/exceptions/run/pass/exceptions-run-pass.exp b/gcc/testsuite/gm2/exceptions/run/pass/exceptions-run-pass.exp
index a6543102b3d..0c4665543cc 100644
--- a/gcc/testsuite/gm2/exceptions/run/pass/exceptions-run-pass.exp
+++ b/gcc/testsuite/gm2/exceptions/run/pass/exceptions-run-pass.exp
@@ -28,11 +28,8 @@ load_lib prune.exp
load_lib gm2-torture.exp
-set XGPP [lookfor_file $rootme xg++];
-
-set output [exec rm -f cpp.o mycpp.o]
-set output [exec ${XGPP} -B[file dirname $rootme]/gcc -g -c $srcdir/gm2/exceptions/run/pass/cpp.cpp]
-set output [exec ${XGPP} -B[file dirname $rootme]/gcc -g -c $srcdir/gm2/exceptions/run/pass/mycpp.cpp]
+set output [target_compile $srcdir/$subdir/cpp.cpp cpp.o object "-g"]
+set output [target_compile $srcdir/$subdir/mycpp.cpp mycpp.o object "-g"]
#
# notice this uses PIM libraries with exceptions - this is a useful test.
diff --git a/gcc/testsuite/gm2/extensions/run/pass/extensions-run-pass.exp b/gcc/testsuite/gm2/extensions/run/pass/extensions-run-pass.exp
index 0ba1bc11027..04227121000 100644
--- a/gcc/testsuite/gm2/extensions/run/pass/extensions-run-pass.exp
+++ b/gcc/testsuite/gm2/extensions/run/pass/extensions-run-pass.exp
@@ -30,11 +30,7 @@ set gm2src ${srcdir}/../m2
gm2_init_pim "${srcdir}/gm2/extensions/run/pass" -fsoft-check-all
gm2_link_with "cvararg.o -lm2pim -lm2iso -lpthread"
-set XGCC [lookfor_file $rootme xgcc];
-
-set output [exec rm -f cvararg.o]
-set output [exec ${XGCC} -B[file dirname $rootme]/gcc -g -c $srcdir/gm2/extensions/run/pass/cvararg.c -o cvararg.o]
-
+set output [target_compile $srcdir/$subdir/cvararg.c cvararg.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.
diff --git a/gcc/testsuite/gm2/imports/run/pass/imports-run-pass.exp b/gcc/testsuite/gm2/imports/run/pass/imports-run-pass.exp
index 66e8d08dba8..ddd733a6719 100644
--- a/gcc/testsuite/gm2/imports/run/pass/imports-run-pass.exp
+++ b/gcc/testsuite/gm2/imports/run/pass/imports-run-pass.exp
@@ -31,7 +31,7 @@ gm2_init_pim "${srcdir}/gm2/imports/run/pass"
gm2_link_with "-lm2pim -lm2iso -lpthread"
foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
- set output [exec ../../gm2 -B../../ -g -c "-I${gccpath}/libgm2/libpim:${gm2src}/gm2-libs:${srcdir}/gm2/imports/run/pass" -fpim ${srcdir}/gm2/imports/run/pass/c.mod]
+ set output [gm2_target_compile ${srcdir}/${subdir}/c.mod c.o object "-g -I${gccpath}/libgm2/libpim:${gm2src}/gm2-libs:${srcdir}/${subdir} -fpim"]
# If we're only testing specific files and this isn't one of them, skip it.
if ![runtest_file_p $runtests $testcase] then {
diff --git a/gcc/testsuite/gm2/linking/libarchive/pass/linking-libarchive-pass.exp b/gcc/testsuite/gm2/linking/libarchive/pass/linking-libarchive-pass.exp
index 055782191e6..d1137cc82eb 100644
--- a/gcc/testsuite/gm2/linking/libarchive/pass/linking-libarchive-pass.exp
+++ b/gcc/testsuite/gm2/linking/libarchive/pass/linking-libarchive-pass.exp
@@ -29,11 +29,8 @@ set gm2src ${srcdir}/../gm2
gm2_init_iso "${srcdir}/gm2/linking/libarchive/pass"
-set XGCC [lookfor_file $rootme xgcc];
-
gm2_link_with c.o
-set output [exec rm -f c.o]
-set output [exec ${XGCC} -B[file dirname $rootme]/gcc -g -c $srcdir/gm2/linking/libarchive/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.
@@ -44,5 +41,3 @@ foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
gm2_target_compile $srcdir/$subdir/m.mod m.o object "-g"
gm2-torture-execute $testcase "" "pass"
}
-
-set output [exec rm -f c.o]
diff --git a/gcc/testsuite/gm2/pim/run/pass/pim-run-pass.exp b/gcc/testsuite/gm2/pim/run/pass/pim-run-pass.exp
index fa1e73d3eee..79ce46075f3 100644
--- a/gcc/testsuite/gm2/pim/run/pass/pim-run-pass.exp
+++ b/gcc/testsuite/gm2/pim/run/pass/pim-run-pass.exp
@@ -31,7 +31,7 @@ gm2_link_with "-lm2pim -lm2iso -lpthread"
foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
- set output [exec ../../gm2 -B../../ -g -c -I$srcdir/../m2/gm2-libs -I$srcdir/gm2/pim/run/pass -I$srcdir/../m2/gm2-compiler -I../m2/gm2-libs -I../m2/gm2-compiler -fpim $srcdir/gm2/pim/run/pass/sys.mod]
+ set output [gm2_target_compile $srcdir/$subdir/sys.mod sys.o object "-g -I$srcdir/../m2/gm2-libs -I$srcdir/$subdir -I$srcdir/../m2/gm2-compiler -I../m2/gm2-libs -I../m2/gm2-compiler -fpim"]
# If we're only testing specific files and this isn't one of them, skip it.
if ![runtest_file_p $runtests $testcase] then {
diff --git a/gcc/testsuite/gm2/pimcoroutines/run/pass/pimcoroutines-run-pass.exp b/gcc/testsuite/gm2/pimcoroutines/run/pass/pimcoroutines-run-pass.exp
index 11432beef9a..a224ce80892 100644
--- a/gcc/testsuite/gm2/pimcoroutines/run/pass/pimcoroutines-run-pass.exp
+++ b/gcc/testsuite/gm2/pimcoroutines/run/pass/pimcoroutines-run-pass.exp
@@ -31,7 +31,7 @@ gm2_link_with "-lm2cor -lm2pim -lm2iso -lpthread"
foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
- set output [exec ../../gm2 -B../../ -g -c -I$srcdir/../m2/gm2-libs -I$srcdir/gm2/pim/run/pass -I$srcdir/../m2/gm2-compiler -I../m2/gm2-libs -I../m2/gm2-compiler -fpim $srcdir/gm2/pim/run/pass/sys.mod]
+ set output [gm2_target_compile $srcdir/gm2/pim/run/pass/sys.mod sys.o object "-I$srcdir/../m2/gm2-libs -I$srcdir/gm2/pim/run/pass -I$srcdir/../m2/gm2-compiler -I../m2/gm2-libs -I../m2/gm2-compiler -fpim"]
# If we're only testing specific files and this isn't one of them, skip it.
if ![runtest_file_p $runtests $testcase] then {
diff --git a/gcc/testsuite/gm2/types/run/pass/types-run-pass.exp b/gcc/testsuite/gm2/types/run/pass/types-run-pass.exp
index dc221ec02d5..50903547367 100644
--- a/gcc/testsuite/gm2/types/run/pass/types-run-pass.exp
+++ b/gcc/testsuite/gm2/types/run/pass/types-run-pass.exp
@@ -30,10 +30,7 @@ set gm2src ${srcdir}/../m2
gm2_init_pim "${srcdir}/gm2/types/run/pass"
gm2_link_with "d.o -lm2pim -lm2iso -lpthread"
-set XGCC [lookfor_file $rootme xgcc];
-
-set output [exec rm -f d.o]
-set output [exec ${XGCC} -B[file dirname $rootme]/gcc -g -c $srcdir/gm2/types/run/pass/d.c -o d.o]
+set output [target_compile $srcdir/$subdir/d.c d.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.
@@ -43,5 +40,3 @@ foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
gm2-torture-execute $testcase "" "pass"
}
-
-set output [exec rm -f d.o]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-04-23 11:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-23 11:49 [gcc/devel/modula-2] PR-102342 - fixes to allow gm2 testsuite to work with multilib and extra gcc objects Gaius Mulley
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).