This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH 1/2] Introduce dg-require-target-object-format
- From: Egeyar Bagcioglu <egeyar dot bagcioglu at oracle dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Egeyar Bagcioglu <egeyar dot bagcioglu at oracle dot com>
- Date: Wed, 6 Nov 2019 18:21:33 +0100
- Subject: [PATCH 1/2] Introduce dg-require-target-object-format
- References: <1573060894-16490-1-git-send-email-egeyar.bagcioglu@oracle.com>
gcc/testsuite/ChangeLog:
2019-11-06 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
* lib/target-supports-dg.exp: Define dg-require-target-object-format.
---
gcc/testsuite/lib/target-supports-dg.exp | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/gcc/testsuite/lib/target-supports-dg.exp b/gcc/testsuite/lib/target-supports-dg.exp
index e1da57a..e923754 100644
--- a/gcc/testsuite/lib/target-supports-dg.exp
+++ b/gcc/testsuite/lib/target-supports-dg.exp
@@ -164,6 +164,17 @@ proc dg-require-dll { args } {
set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
}
+# If this target does not produce the given object format skip this test.
+
+proc dg-require-target-object-format { args } {
+ if { [gcc_target_object_format] == [lindex $args 1] } {
+ return
+ }
+
+ upvar dg-do-what dg-do-what
+ set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
+}
+
# If this host does not support an ASCII locale, skip this test.
proc dg-require-ascii-locale { args } {
--
1.8.3.1