* [PATCH,testsuite] Skip pic-3,4.c and pie-3,4.c for mips*-*-linux-*.
@ 2017-03-23 17:25 Toma Tabacu
2017-03-27 19:41 ` Matthew Fortune
0 siblings, 1 reply; 3+ messages in thread
From: Toma Tabacu @ 2017-03-23 17:25 UTC (permalink / raw)
To: gcc-patches; +Cc: Catherine Moore (catherine_moore@mentor.com), Matthew Fortune
Hi,
The pic-3,4.c and pie-3,4.c tests are failing for some configurations of
mips*-*-linux-*.
This is because PIC is always on for MIPS Linux by default, except when the
compiler is built with --with-mips-plt, in which case PIC is on by default only
for the n64 ABI, because in this case -mplt "has no effect without '-msym32'",
to quote the documentation, so -mplt is not passed by default.
Richard Sandiford also talked about this in the summary of a patch which was
skipping a test for mips*-*-linux-* because of PIC:
https://gcc.gnu.org/ml/gcc-patches/2009-01/msg00801.html
Therefore, I think the most reasonable solution would be to just skip these
tests for mips*-*-linux-*. The patch below does so.
Tested with mips-mti-linux-gnu.
Catherine, Matthew what do you think ?
Regards,
Toma
gcc/testsuite/
* gcc.dg/pic-3.c: Skip for mips*-*-linux-*.
* gcc.dg/pic-4.c: Likewise.
* gcc.dg/pie-3.c: Likewise.
* gcc.dg/pie-4.c: Likewise.
diff --git a/gcc/testsuite/gcc.dg/pic-3.c b/gcc/testsuite/gcc.dg/pic-3.c
index 23ce999..c56f06f 100644
--- a/gcc/testsuite/gcc.dg/pic-3.c
+++ b/gcc/testsuite/gcc.dg/pic-3.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target { ! { *-*-darwin* hppa*64*-*-* } } } } */
+/* { dg-do compile { target { ! { *-*-darwin* hppa*64*-*-* mips*-*-linux-* } } } } */
/* { dg-options "-fno-pic" } */
#ifdef __PIC__
diff --git a/gcc/testsuite/gcc.dg/pic-4.c b/gcc/testsuite/gcc.dg/pic-4.c
index 8e14714..2afdd99 100644
--- a/gcc/testsuite/gcc.dg/pic-4.c
+++ b/gcc/testsuite/gcc.dg/pic-4.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target { ! { *-*-darwin* hppa*64*-*-* } } } } */
+/* { dg-do compile { target { ! { *-*-darwin* hppa*64*-*-* mips*-*-linux-* } } } } */
/* { dg-options "-fno-PIC" } */
#ifdef __PIC__
diff --git a/gcc/testsuite/gcc.dg/pie-3.c b/gcc/testsuite/gcc.dg/pie-3.c
index a7201c0..5577437 100644
--- a/gcc/testsuite/gcc.dg/pie-3.c
+++ b/gcc/testsuite/gcc.dg/pie-3.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target { ! { *-*-darwin* hppa*64*-*-* } } } } */
+/* { dg-do compile { target { ! { *-*-darwin* hppa*64*-*-* mips*-*-linux-* } } } } */
/* { dg-options "-fno-pie" } */
#ifdef __PIC__
diff --git a/gcc/testsuite/gcc.dg/pie-4.c b/gcc/testsuite/gcc.dg/pie-4.c
index b24eb8c..4134676 100644
--- a/gcc/testsuite/gcc.dg/pie-4.c
+++ b/gcc/testsuite/gcc.dg/pie-4.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target { ! { *-*-darwin* hppa*64*-*-* } } } } */
+/* { dg-do compile { target { ! { *-*-darwin* hppa*64*-*-* mips*-*-linux-* } } } } */
/* { dg-options "-fno-PIE" } */
#ifdef __PIC__
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH,testsuite] Skip pic-3,4.c and pie-3,4.c for mips*-*-linux-*.
2017-03-23 17:25 [PATCH,testsuite] Skip pic-3,4.c and pie-3,4.c for mips*-*-linux-* Toma Tabacu
@ 2017-03-27 19:41 ` Matthew Fortune
2017-03-28 12:51 ` Toma Tabacu
0 siblings, 1 reply; 3+ messages in thread
From: Matthew Fortune @ 2017-03-27 19:41 UTC (permalink / raw)
To: Toma Tabacu, gcc-patches; +Cc: Catherine Moore (catherine_moore@mentor.com)
Toma Tabacu <Toma.Tabacu@imgtec.com> writes:
> The pic-3,4.c and pie-3,4.c tests are failing for some configurations of
> mips*-*-linux-*.
>
> This is because PIC is always on for MIPS Linux by default, except when the
> compiler is built with --with-mips-plt, in which case PIC is on by default only
> for the n64 ABI, because in this case -mplt "has no effect without '-msym32'",
> to quote the documentation, so -mplt is not passed by default.
>
> Richard Sandiford also talked about this in the summary of a patch which was
> skipping a test for mips*-*-linux-* because of PIC:
> https://gcc.gnu.org/ml/gcc-patches/2009-01/msg00801.html
>
> Therefore, I think the most reasonable solution would be to just skip these
> tests for mips*-*-linux-*. The patch below does so.
>
> Tested with mips-mti-linux-gnu.
>
> Catherine, Matthew what do you think ?
Given the acceptance that MIPS PIC behaviour is semi-unique then checking MIPS
complies with the rules around pre-processor behaviour doesn't add much value.
I'm happy to skip these tests on the basis that software can't make the same
assumptions about MIPS and __PIC__ as other architectures do.
OK to commit.
Thanks,
Matthew
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH,testsuite] Skip pic-3,4.c and pie-3,4.c for mips*-*-linux-*.
2017-03-27 19:41 ` Matthew Fortune
@ 2017-03-28 12:51 ` Toma Tabacu
0 siblings, 0 replies; 3+ messages in thread
From: Toma Tabacu @ 2017-03-28 12:51 UTC (permalink / raw)
To: Matthew Fortune, gcc-patches; +Cc: Catherine Moore (catherine_moore@mentor.com)
> From: Matthew Fortune
>
> Given the acceptance that MIPS PIC behaviour is semi-unique then checking
> MIPS
> complies with the rules around pre-processor behaviour doesn't add much
> value.
> I'm happy to skip these tests on the basis that software can't make the same
> assumptions about MIPS and __PIC__ as other architectures do.
>
> OK to commit.
>
> Thanks,
> Matthew
Committed as r246533.
Thanks,
Toma
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-03-28 12:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-23 17:25 [PATCH,testsuite] Skip pic-3,4.c and pie-3,4.c for mips*-*-linux-* Toma Tabacu
2017-03-27 19:41 ` Matthew Fortune
2017-03-28 12:51 ` Toma Tabacu
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).