public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/aoliva/heads/testme)] run sysconf-requiring test on systems that support it
@ 2021-03-23 12:34 Alexandre Oliva
0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Oliva @ 2021-03-23 12:34 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:15a76f17f302707b4b1a4deabf364536044d8b0b
commit 15a76f17f302707b4b1a4deabf364536044d8b0b
Author: Alexandre Oliva <oliva@adacore.com>
Date: Tue Mar 23 09:28:02 2021 -0300
run sysconf-requiring test on systems that support it
The gcc.target/i386 test sse2-mmx-maskmovq.c requires the mmap
feature, but that's not enough for the test to be able to call
sysconf.
I've combined the target triplets used in other sysconf-calling tests,
omitting non-x86 ones, with the preexisting mmap requirement in this
test.
for gcc/testsuite/ChangeLog
* gcc.target/i386/sse2-mmx-maskmovq.c: Require
sysconf-supporting x86 target triplets.
Diff:
---
gcc/testsuite/gcc.target/i386/sse2-mmx-maskmovq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/testsuite/gcc.target/i386/sse2-mmx-maskmovq.c b/gcc/testsuite/gcc.target/i386/sse2-mmx-maskmovq.c
index 037f665f117..ad4bbf7c764 100644
--- a/gcc/testsuite/gcc.target/i386/sse2-mmx-maskmovq.c
+++ b/gcc/testsuite/gcc.target/i386/sse2-mmx-maskmovq.c
@@ -1,4 +1,4 @@
-/* { dg-do run { target mmap } } */
+/* { dg-do run { target { { *-*-linux* *-*-gnu* *-*-darwin[912]* *-*-uclinux* } && mmap } } } */
/* { dg-options "-O2 -fno-strict-aliasing -msse2" } */
/* { dg-additional-options "-mno-mmx" { target { ! ia32 } } } */
^ permalink raw reply [flat|nested] 4+ messages in thread
* [gcc(refs/users/aoliva/heads/testme)] run sysconf-requiring test on systems that support it
@ 2021-03-24 9:15 Alexandre Oliva
0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Oliva @ 2021-03-24 9:15 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:e6664089e87347903196b695c2aceb8972db0ff8
commit e6664089e87347903196b695c2aceb8972db0ff8
Author: Alexandre Oliva <oliva@adacore.com>
Date: Wed Mar 24 05:50:37 2021 -0300
run sysconf-requiring test on systems that support it
Some gcc.target/i386 tests requires the mmap feature, but that's not
enough for the test to be able to call sysconf.
This patch introduces a sysconf feature, analogous to mmap, and adds
it to tests in gcc.target/i386 that call sysconf.
There are other tests within gcc.dg and g++.dg that call sysconf, but
I haven't added the tag to them, because they already cover it with
target triplets. I was a little nervous about dropping the triplets,
and saw how they implied sysconf, so I left those alone.
for gcc/testsuite/ChangeLog
* lib/target-supports.exp (check_effective_target_sysconf): New.
* gcc/doc/sourcebuild.texi (syconf): Document it.
* gcc.target/i386/pr95443-1.c: Require it.
* gcc.target/i386/pr95443-2.c: Likewise.
* gcc.target/i386/sse2-mmx-maskmovq.c: Likewise.
* gcc.target/i386/strncmp-1.c: Likewise.
Diff:
---
gcc/doc/sourcebuild.texi | 3 +++
gcc/testsuite/gcc.target/i386/pr95443-1.c | 2 +-
gcc/testsuite/gcc.target/i386/pr95443-2.c | 2 +-
gcc/testsuite/gcc.target/i386/sse2-mmx-maskmovq.c | 2 +-
gcc/testsuite/gcc.target/i386/strncmp-1.c | 2 +-
gcc/testsuite/lib/target-supports.exp | 6 ++++++
6 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index 2bc362be449..0104916e660 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -2450,6 +2450,9 @@ all targets.
@item stpcpy
Target provides @code{stpcpy} function.
+@item sysconf
+Target supports @code{sysconf}.
+
@item trampolines
Target supports trampolines.
diff --git a/gcc/testsuite/gcc.target/i386/pr95443-1.c b/gcc/testsuite/gcc.target/i386/pr95443-1.c
index 698dfa02189..d846fcbda0a 100644
--- a/gcc/testsuite/gcc.target/i386/pr95443-1.c
+++ b/gcc/testsuite/gcc.target/i386/pr95443-1.c
@@ -1,4 +1,4 @@
-/* { dg-do run { target mmap } } */
+/* { dg-do run { target { sysconf && mmap } } } */
/* { dg-options "-O2 -minline-all-stringops" } */
#include <stdint.h>
diff --git a/gcc/testsuite/gcc.target/i386/pr95443-2.c b/gcc/testsuite/gcc.target/i386/pr95443-2.c
index 23bb13ab7ff..2ab260608bc 100644
--- a/gcc/testsuite/gcc.target/i386/pr95443-2.c
+++ b/gcc/testsuite/gcc.target/i386/pr95443-2.c
@@ -1,4 +1,4 @@
-/* { dg-do run { target mmap } } */
+/* { dg-do run { target { sysconf && mmap } } } */
/* { dg-options "-O2 -minline-all-stringops" } */
#include <stdint.h>
diff --git a/gcc/testsuite/gcc.target/i386/sse2-mmx-maskmovq.c b/gcc/testsuite/gcc.target/i386/sse2-mmx-maskmovq.c
index 037f665f117..87705be3f70 100644
--- a/gcc/testsuite/gcc.target/i386/sse2-mmx-maskmovq.c
+++ b/gcc/testsuite/gcc.target/i386/sse2-mmx-maskmovq.c
@@ -1,4 +1,4 @@
-/* { dg-do run { target mmap } } */
+/* { dg-do run { target { sysconf && mmap } } } */
/* { dg-options "-O2 -fno-strict-aliasing -msse2" } */
/* { dg-additional-options "-mno-mmx" { target { ! ia32 } } } */
diff --git a/gcc/testsuite/gcc.target/i386/strncmp-1.c b/gcc/testsuite/gcc.target/i386/strncmp-1.c
index 044fc5cc5fa..1ea3e0a57c1 100644
--- a/gcc/testsuite/gcc.target/i386/strncmp-1.c
+++ b/gcc/testsuite/gcc.target/i386/strncmp-1.c
@@ -1,4 +1,4 @@
-/* { dg-do run { target mmap } } */
+/* { dg-do run { target { sysconf && mmap } } } */
/* { dg-options "-O2" } */
#include <stdio.h>
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 733b6c84518..1230d194215 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -1067,6 +1067,12 @@ proc check_effective_target_mmap {} {
return [check_function_available "mmap"]
}
+# Return 1 if the target supports sysconf, 0 otherwise.
+
+proc check_effective_target_sysconf {} {
+ return [check_function_available "sysconf"]
+}
+
# Return 1 if the target supports dlopen, 0 otherwise.
proc check_effective_target_dlopen {} {
return [check_no_compiler_messages dlopen executable {
^ permalink raw reply [flat|nested] 4+ messages in thread
* [gcc(refs/users/aoliva/heads/testme)] run sysconf-requiring test on systems that support it
@ 2021-03-24 9:07 Alexandre Oliva
0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Oliva @ 2021-03-24 9:07 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:415bbf965507f1eecae1924f80059ed12d46f4a5
commit 415bbf965507f1eecae1924f80059ed12d46f4a5
Author: Alexandre Oliva <oliva@adacore.com>
Date: Wed Mar 24 05:50:37 2021 -0300
run sysconf-requiring test on systems that support it
Some gcc.target/i386 tests requires the mmap feature, but that's not
enough for the test to be able to call sysconf.
This patch introduces a sysconf feature, analogous to mmap, and adds
it to tests in gcc.target/i386 that call sysconf.
There are other tests within gcc.dg and g++.dg that call sysconf, but
I haven't added the tag to them, because they already cover it with
target triples. I was a little nervous about dropping the triplets,
and saw how they implied sysconf, so I left those alone.
for gcc/testsuite/ChangeLog
* lib/target-supports.exp (check_effective_target_sysconf): New.
* gcc/doc/sourcebuild.texi (syconf): Document it.
* gcc.target/i386/pr95443-1.c: Require it.
* gcc.target/i386/pr95443-2.c: Likewise.
* gcc.target/i386/sse2-mmx-maskmovq.c: Likewise.
* gcc.target/i386/strncmp-1.c: Likewise.
Diff:
---
gcc/doc/sourcebuild.texi | 3 +++
gcc/testsuite/gcc.target/i386/pr95443-1.c | 2 +-
gcc/testsuite/gcc.target/i386/pr95443-2.c | 2 +-
gcc/testsuite/gcc.target/i386/sse2-mmx-maskmovq.c | 2 +-
gcc/testsuite/gcc.target/i386/strncmp-1.c | 2 +-
gcc/testsuite/lib/target-supports.exp | 6 ++++++
6 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index 2bc362be449..0104916e660 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -2450,6 +2450,9 @@ all targets.
@item stpcpy
Target provides @code{stpcpy} function.
+@item sysconf
+Target supports @code{sysconf}.
+
@item trampolines
Target supports trampolines.
diff --git a/gcc/testsuite/gcc.target/i386/pr95443-1.c b/gcc/testsuite/gcc.target/i386/pr95443-1.c
index 698dfa02189..d846fcbda0a 100644
--- a/gcc/testsuite/gcc.target/i386/pr95443-1.c
+++ b/gcc/testsuite/gcc.target/i386/pr95443-1.c
@@ -1,4 +1,4 @@
-/* { dg-do run { target mmap } } */
+/* { dg-do run { target { sysconf && mmap } } } */
/* { dg-options "-O2 -minline-all-stringops" } */
#include <stdint.h>
diff --git a/gcc/testsuite/gcc.target/i386/pr95443-2.c b/gcc/testsuite/gcc.target/i386/pr95443-2.c
index 23bb13ab7ff..2ab260608bc 100644
--- a/gcc/testsuite/gcc.target/i386/pr95443-2.c
+++ b/gcc/testsuite/gcc.target/i386/pr95443-2.c
@@ -1,4 +1,4 @@
-/* { dg-do run { target mmap } } */
+/* { dg-do run { target { sysconf && mmap } } } */
/* { dg-options "-O2 -minline-all-stringops" } */
#include <stdint.h>
diff --git a/gcc/testsuite/gcc.target/i386/sse2-mmx-maskmovq.c b/gcc/testsuite/gcc.target/i386/sse2-mmx-maskmovq.c
index 037f665f117..87705be3f70 100644
--- a/gcc/testsuite/gcc.target/i386/sse2-mmx-maskmovq.c
+++ b/gcc/testsuite/gcc.target/i386/sse2-mmx-maskmovq.c
@@ -1,4 +1,4 @@
-/* { dg-do run { target mmap } } */
+/* { dg-do run { target { sysconf && mmap } } } */
/* { dg-options "-O2 -fno-strict-aliasing -msse2" } */
/* { dg-additional-options "-mno-mmx" { target { ! ia32 } } } */
diff --git a/gcc/testsuite/gcc.target/i386/strncmp-1.c b/gcc/testsuite/gcc.target/i386/strncmp-1.c
index 044fc5cc5fa..1ea3e0a57c1 100644
--- a/gcc/testsuite/gcc.target/i386/strncmp-1.c
+++ b/gcc/testsuite/gcc.target/i386/strncmp-1.c
@@ -1,4 +1,4 @@
-/* { dg-do run { target mmap } } */
+/* { dg-do run { target { sysconf && mmap } } } */
/* { dg-options "-O2" } */
#include <stdio.h>
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 733b6c84518..1230d194215 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -1067,6 +1067,12 @@ proc check_effective_target_mmap {} {
return [check_function_available "mmap"]
}
+# Return 1 if the target supports sysconf, 0 otherwise.
+
+proc check_effective_target_sysconf {} {
+ return [check_function_available "sysconf"]
+}
+
# Return 1 if the target supports dlopen, 0 otherwise.
proc check_effective_target_dlopen {} {
return [check_no_compiler_messages dlopen executable {
^ permalink raw reply [flat|nested] 4+ messages in thread
* [gcc(refs/users/aoliva/heads/testme)] run sysconf-requiring test on systems that support it
@ 2021-03-24 6:29 Alexandre Oliva
0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Oliva @ 2021-03-24 6:29 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:96a113b89acb7a7646ddf9b99f5dcd0c966ad125
commit 96a113b89acb7a7646ddf9b99f5dcd0c966ad125
Author: Alexandre Oliva <oliva@adacore.com>
Date: Tue Mar 23 09:28:02 2021 -0300
run sysconf-requiring test on systems that support it
The gcc.target/i386 test sse2-mmx-maskmovq.c requires the mmap
feature, but that's not enough for the test to be able to call
sysconf.
I've combined the target triplets used in other sysconf-calling tests,
omitting non-x86 ones, with the preexisting mmap requirement in this
test.
for gcc/testsuite/ChangeLog
* gcc.target/i386/sse2-mmx-maskmovq.c: Require
sysconf-supporting x86 target triplets.
Diff:
---
gcc/testsuite/gcc.target/i386/sse2-mmx-maskmovq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/testsuite/gcc.target/i386/sse2-mmx-maskmovq.c b/gcc/testsuite/gcc.target/i386/sse2-mmx-maskmovq.c
index 037f665f117..ad4bbf7c764 100644
--- a/gcc/testsuite/gcc.target/i386/sse2-mmx-maskmovq.c
+++ b/gcc/testsuite/gcc.target/i386/sse2-mmx-maskmovq.c
@@ -1,4 +1,4 @@
-/* { dg-do run { target mmap } } */
+/* { dg-do run { target { { *-*-linux* *-*-gnu* *-*-darwin[912]* *-*-uclinux* } && mmap } } } */
/* { dg-options "-O2 -fno-strict-aliasing -msse2" } */
/* { dg-additional-options "-mno-mmx" { target { ! ia32 } } } */
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-03-24 9:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-23 12:34 [gcc(refs/users/aoliva/heads/testme)] run sysconf-requiring test on systems that support it Alexandre Oliva
2021-03-24 6:29 Alexandre Oliva
2021-03-24 9:07 Alexandre Oliva
2021-03-24 9:15 Alexandre Oliva
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).