From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 126644 invoked by alias); 25 Jul 2019 14:41:18 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 126635 invoked by uid 89); 25 Jul 2019 14:41:18 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-10.8 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_ASCII_DIVIDERS,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 25 Jul 2019 14:41:16 +0000 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x6PEdZES103332; Thu, 25 Jul 2019 10:41:13 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 2tycw9cfcs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Jul 2019 10:41:13 -0400 Received: from m0098420.ppops.net (m0098420.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.27/8.16.0.27) with SMTP id x6PEdeuj103796; Thu, 25 Jul 2019 10:41:12 -0400 Received: from ppma01wdc.us.ibm.com (fd.55.37a9.ip4.static.sl-reverse.com [169.55.85.253]) by mx0b-001b2d01.pphosted.com with ESMTP id 2tycw9cfc5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Jul 2019 10:41:12 -0400 Received: from pps.filterd (ppma01wdc.us.ibm.com [127.0.0.1]) by ppma01wdc.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id x6PEeCPB029874; Thu, 25 Jul 2019 14:41:12 GMT Received: from b01cxnp23033.gho.pok.ibm.com (b01cxnp23033.gho.pok.ibm.com [9.57.198.28]) by ppma01wdc.us.ibm.com with ESMTP id 2tx61n7a8v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Jul 2019 14:41:11 +0000 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x6PEfBdb49414566 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 25 Jul 2019 14:41:11 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5C68FB2088; Thu, 25 Jul 2019 14:41:11 +0000 (GMT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 08029B2086; Thu, 25 Jul 2019 14:41:11 +0000 (GMT) Received: from otta.local (unknown [9.85.186.128]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Thu, 25 Jul 2019 14:41:10 +0000 (GMT) Subject: Re: [PATCH, rs6000] Fix PR91050 by adding a DRIVER_SELF_SPECS spec To: Iain Sandoe Cc: GCC Patches , Segher Boessenkool References: From: Peter Bergner Message-ID: <39ef9829-c6c2-0ed5-cfaa-3c999af898bb@linux.ibm.com> Date: Thu, 25 Jul 2019 14:42:00 -0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2019-07/txt/msg01641.txt.bz2 On 7/25/19 2:50 AM, Iain Sandoe wrote: > This will break Darwin which has used DRIVER_SELF_SPECS in config/darwin.h > since they were introduced (and the equivalent before). > > This is because Darwin has driver self-specs common to the PPC and X86 ports. > > If this change is seen the way to go, then I guess one solution would be to rename the > driver specs in config/darwin.h => SUBTARGET_DRIVER_SELF_SPECS*** and then > put a dummy DRIVER_SELF_SPECS in i386/i386.h > and append SUBTARGET_DRIVER_SELF_SPECS to both the i386.h and rs6000.h > cases. (or something along those lines) Hi Iain, The patch below uses your suggestion. Does this work for you on x86 and ppc? >> Segher, I tried your suggestion of writing the spec more generically >> (ie, %{mdejagnu-*: ... -m*}), which worked in that it did the correct >> replacement. However, the %> option(s) would need to be written like %> at all. > > not sure what the objective is here - if you want to remove all pre-existing -mcpu from > the command line won’t % if it gets invented) .. We only want to remove all pre-existing -mcpu= options IF the user also used -mdejagnu-cpu=. You do not want to remove -mcpu= options if the user used -mdejagnu-tune=. That's why I tried: %{mdejagnu-*: %= 0) - rs6000_cpu_index = rs6000_dejagnu_cpu_index; - /* Process the -mcpu= and -mtune= argument. If the user changed the cpu in a target attribute or pragma, but did not specify a tuning option, use the cpu for the tuning option rather than the option specified Index: gcc/config/rs6000/rs6000.h =================================================================== --- gcc/config/rs6000/rs6000.h (revision 273707) +++ gcc/config/rs6000/rs6000.h (working copy) @@ -77,6 +77,20 @@ #define PPC405_ERRATUM77 0 #endif +/* Only for use in the testsuite: -mdejagnu-cpu= simply overrides -mcpu=. + 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=. */ +#define DRIVER_SELF_SPECS \ + "%{mdejagnu-cpu=*: %