From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2063) id 9195E385AE43; Tue, 2 Aug 2022 03:58:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9195E385AE43 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Kewen Lin To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-8651] rs6000: Adjust -mdejagnu-cpu to filter out -mtune [PR106345] X-Act-Checkin: gcc X-Git-Author: Peter Bergner X-Git-Refname: refs/heads/releases/gcc-12 X-Git-Oldrev: bd521701c819710a244eae87b097b6acb534756b X-Git-Newrev: 5f583aa1c56af983ca8f2b8bc57122c4be5a6e55 Message-Id: <20220802035831.9195E385AE43@sourceware.org> Date: Tue, 2 Aug 2022 03:58:31 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2022 03:58:31 -0000 https://gcc.gnu.org/g:5f583aa1c56af983ca8f2b8bc57122c4be5a6e55 commit r12-8651-g5f583aa1c56af983ca8f2b8bc57122c4be5a6e55 Author: Peter Bergner Date: Mon Jul 25 00:51:44 2022 -0500 rs6000: Adjust -mdejagnu-cpu to filter out -mtune [PR106345] As PR106345 shows, when configuring compiler with an explicit option --with-tune=, it would cause some test cases to fail if their test points are sensitive to tune setting, such as: group_ending_nop, loop align etc. It doesn't help that even to specify one explicit -mcpu=. This patch is to adjust the behavior of -mdejagnu-cpu by filtering out all -mcpu= and -mtune= options, then test cases would use as tune as the one specified by -mdejagnu-cpu. 2022-07-25 Peter Bergner Kewen Lin PR testsuite/106345 gcc/ChangeLog: * config/rs6000/rs6000.h (DRIVER_SELF_SPECS): Adjust -mdejagnu-cpu to filter out all -mtune options. (cherry picked from commit 75d20d6c84c12bedd65a904e462f02f0b9eb3f77) Diff: --- gcc/config/rs6000/rs6000.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index 523256a5c9d..bc48f450210 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -81,12 +81,15 @@ # define SUBTARGET_DRIVER_SELF_SPECS "" #endif -/* Only for use in the testsuite: -mdejagnu-cpu= simply overrides -mcpu=. +/* Only for use in the testsuite: -mdejagnu-cpu= filters out all + -mcpu= as well as -mtune= options then simply adds -mcpu=, + while -mdejagnu-tune= filters out all -mtune= options then + simply adds -mtune=. With older versions of Dejagnu the command line arguments you set in - RUNTESTFLAGS override those set in the testcases; with this option, - the testcase will always win. Ditto for -mdejagnu-tune=. */ + RUNTESTFLAGS override those set in the testcases; with these options, + the testcase will always win. */ #define DRIVER_SELF_SPECS \ - "%{mdejagnu-cpu=*: %