public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Janis Johnson <janis187@us.ibm.com>
To: Eric Botcazou <ebotcazou@libertysurf.fr>
Cc: Janis Johnson <janis187@us.ibm.com>, gcc@gcc.gnu.org
Subject: Re: Running the compat testsuite in "non-mirror" mode
Date: Sat, 20 Nov 2004 01:01:00 -0000	[thread overview]
Message-ID: <20041120005359.GA7885@us.ibm.com> (raw)
In-Reply-To: <200411191912.43024.ebotcazou@libertysurf.fr>

On Fri, Nov 19, 2004 at 07:12:59PM +0100, Eric Botcazou wrote:
> > I think I understand now.  For anyone testing a particular target, the
> > compat tests would be run first using the compiler under test to compile
> > both parts of each test using default options, and again using different
> > sets of options for the two parts of each test to make sure those
> > options don't affect binary compatibility.  Is that right?
> 
> Yes; a maintainer of a given platform could decide that it is important to 
> always test a particular couple of options on this platform, and set the 
> appropriate bits in the right driver file.
> 
> > This is probably easy to set up in the compat.exp file for each compat
> > testsuite; I'll take a look.

Does this do the kind of thing you want?  This is just an example, not
options I actually want to add for powerpc.

Other files that set COMPAT_OPTIONS are lib/compat.exp,
gcc.dg/compat/struct-layout-1.exp, and g++.dg/compat/compat.exp.  This
continues to allow the default sets of options to be overridden.

Janis

Index: gcc.dg/compat/compat.exp
===================================================================
RCS file: /opt/gcc-cvs/gcc/gcc/testsuite/gcc.dg/compat/compat.exp,v
retrieving revision 1.1
diff -u -p -r1.1 compat.exp
--- gcc.dg/compat/compat.exp	5 May 2003 21:59:35 -0000	1.1
+++ gcc.dg/compat/compat.exp	20 Nov 2004 00:25:50 -0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -34,6 +34,20 @@ global GCC_UNDER_TEST
 # Load procedures from common libraries. 
 load_lib standard.exp
 load_lib gcc.exp
+load_lib target-supports.exp
+
+# Some targets run the tests multiple times with different sets of options.
+if ![info exists COMPAT_OPTIONS] {
+    if { [istarget powerpc*-*-linux*] && [is-effective-target vmx_hw] } {
+	set COMPAT_OPTIONS [list \
+		[list {} {}] \
+		[list {-maltivec -mabi=altivec} {-mno-altivec -mabi=altivec}]]
+    } elseif [istarget powerpc*-*-linux*] {
+	set COMPAT_OPTIONS [list \
+		[list {} {}] \
+		[list {-O1} {-O2}]]
+    }
+}
 
 #
 # compat-use-alt-compiler -- make the alternate compiler the default
@@ -65,7 +79,8 @@ proc compat-use-tst-compiler { } {
 }
 
 # Load the language-independent compabibility support procedures.
-# This must be done after the compat-use-*-compiler definitions.
+# This must be done after the compat-use-*-compiler definitions and
+# after defining COMPAT_OPTIONS.
 load_lib compat.exp
 
 gcc_init

  reply	other threads:[~2004-11-20  0:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-18  9:21 Eric Botcazou
2004-11-18 22:35 ` Janis Johnson
2004-11-18 23:36   ` Eric Botcazou
2004-11-19  0:14     ` Janis Johnson
2004-11-19  0:15       ` Eric Botcazou
2004-11-19  0:37         ` Janis Johnson
2004-11-19 11:20           ` Eric Botcazou
2004-11-19 18:37             ` Janis Johnson
2004-11-19 19:17               ` Eric Botcazou
2004-11-20  1:01                 ` Janis Johnson [this message]
2004-11-20  1:30                   ` Eric Botcazou
2004-11-22  0:59                   ` Eric Botcazou

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=20041120005359.GA7885@us.ibm.com \
    --to=janis187@us.ibm.com \
    --cc=ebotcazou@libertysurf.fr \
    --cc=gcc@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: link
Be 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).