From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 09A843857C7A for ; Tue, 4 Oct 2022 16:57:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 09A843857C7A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=vnet.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=vnet.ibm.com Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 294FBDeX015926; Tue, 4 Oct 2022 16:57:40 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : subject : from : to : date : in-reply-to : references : content-type : mime-version : content-transfer-encoding; s=pp1; bh=dpHS6vGFjYfYr1XnkhW/3dYGlkUmy90ZM2ILj2MTyJQ=; b=AxMu8GIfRFWcxAT608Yuy/HFvXHHG6z5T8iGcz+DvJ6Z2g0K2zXF8QlCnp6flvkQaOtq J+Z95FMbwlZfjkieT8/2W6RKLODcQMvMmKPSlLaG/MLd6+3yTwWzGaYAJ9fEPC9zabMu iyM+/zZ7sBxQ3vqP8J5zxu6a7b+ws6TxH+Z7yI/Tr9Tg79BMdhocEAyYBPNWHP9gDDG3 2bcUG8fLP3G0Ii1fGmIbVO+NjF74/MweXeRzzZ87gqr1xCZv7aquZQY1fk66MiVTQPer dFEcJ/MUkfR4ljx8qBirvxuLM5YWj3PJSBkAudh/spU5RWBasPdG1WnFwDXfKPDgkjI0 Tg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3k0fsn1jf5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 04 Oct 2022 16:57:40 +0000 Received: from m0098410.ppops.net (m0098410.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 294GJTFY022027; Tue, 4 Oct 2022 16:57:39 GMT Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3k0fsn1jeh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 04 Oct 2022 16:57:39 +0000 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 294GqmBV017239; Tue, 4 Oct 2022 16:57:38 GMT Received: from b01cxnp23033.gho.pok.ibm.com (b01cxnp23033.gho.pok.ibm.com [9.57.198.28]) by ppma04wdc.us.ibm.com with ESMTP id 3jxd69p504-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 04 Oct 2022 16:57:38 +0000 Received: from smtpav03.wdc07v.mail.ibm.com ([9.208.128.112]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 294Gvbp57537186 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 4 Oct 2022 16:57:37 GMT Received: from smtpav03.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2EF8E58054; Tue, 4 Oct 2022 16:57:37 +0000 (GMT) Received: from smtpav03.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 503B05805F; Tue, 4 Oct 2022 16:57:36 +0000 (GMT) Received: from lexx (unknown [9.160.174.136]) by smtpav03.wdc07v.mail.ibm.com (Postfix) with ESMTP; Tue, 4 Oct 2022 16:57:36 +0000 (GMT) Message-ID: <9f2d48f5db9dd312dc7e68f7d6926e49d97caee5.camel@vnet.ibm.com> Subject: Re: [PATCH] fixincludes: Deal also with the _Float128x cases [PR107059] From: will schmidt To: Jakub Jelinek , Joseph Myers , Bruce Korb , Jason Merrill , gcc-patches@gcc.gnu.org Date: Tue, 04 Oct 2022 11:57:35 -0500 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 (3.28.5-18.el8) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: H4SZDKHhmIg6YgvlLh2VmJM0Y7MIFJBR X-Proofpoint-GUID: GQJXER1ec5k02UmLVOzh9qjfm5zplZE_ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-10-04_08,2022-09-29_03,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 adultscore=0 clxscore=1011 suspectscore=0 phishscore=0 spamscore=0 priorityscore=1501 malwarescore=0 mlxlogscore=999 impostorscore=0 mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210040107 X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Fri, 2022-09-30 at 09:20 +0200, Jakub Jelinek via Gcc-patches wrote: > On Wed, Sep 28, 2022 at 08:19:43PM +0200, Jakub Jelinek via Gcc- > patches wrote: > > Another case are the following 3 snippets: > > # if !__GNUC_PREREQ (7, 0) || defined __cplusplus > > # error "_Float128X supported but no constant suffix" > > # else > > # define __f128x(x) x##f128x > > # endif > > ... > > # if !__GNUC_PREREQ (7, 0) || defined __cplusplus > > # error "_Float128X supported but no complex type" > > # else > > # define __CFLOAT128X _Complex _Float128x > > # endif > > ... > > # if !__GNUC_PREREQ (7, 0) || defined __cplusplus > > # error "_Float128x supported but no type" > > # endif > > but as no target has _Float128x right now and don't see it > > coming soon, it isn't a big deal (on the glibc side it is of > > course ok to adjust those). > > This incremental patch deals handles the above 3 cases, so we > fixinclude what glibc itself changed too. > > Bootstrapped/regtested on x86_64-linux and i686-linux (together with > the > previously posted fixincludes/ change too), ok for trunk? Hi, The combination of these two patches allows me to build gcc successfully. (PPC64LE with RHEL9). A nit that Part1 needed massaging of the path/to/files (i.e. gcc/inclhack.def versus fixincludes/inclhack.def) to apply. I can't otherwise speak to the changes, aside from they seem to work for me. Thanks -WIll > > 2022-09-30 Jakub Jelinek > > PR bootstrap/107059 > * inclhack.def (glibc_cxx_floatn_5): New. > * fixincl.x: Regenerated. > * tests/base/bits/floatn.h: Regenerated. > > --- fixincludes/inclhack.def.jj 2022-09-29 22:18:47.974402688 > +0200 > +++ fixincludes/inclhack.def 2022-09-29 22:22:48.151145670 +0200 > @@ -2131,6 +2131,23 @@ fix = { > EOT; > }; > > +fix = { > + hackname = glibc_cxx_floatn_5; > + files = bits/floatn.h, bits/floatn-common.h, > "*/bits/floatn.h", "*/bits/floatn-common.h"; > + select = "^([ \t]*#[ \t]*if !__GNUC_PREREQ \\(7, 0\\) \\|\\| > )defined __cplusplus\n" > + "([ \t]*#[ \t]+error \"_Float128[xX] supported but no > )"; > + c_fix = format; > + c_fix_arg = "%1(defined __cplusplus && !__GNUC_PREREQ (13, > 0))\n%2"; > + test_text = <<-EOT > + # if !__GNUC_PREREQ (7, 0) || defined __cplusplus > + # error "_Float128X supported but no constant suffix" > + # endif > + # if !__GNUC_PREREQ (7, 0) || defined __cplusplus > + # error "_Float128x supported but no type" > + # endif > + EOT; > +}; > + > /* glibc-2.3.5 defines pthread mutex initializers incorrectly, > * so we replace them with versions that correspond to the > * definition. > --- fixincludes/fixincl.x.jj 2022-09-29 22:18:47.975402675 +0200 > +++ fixincludes/fixincl.x 2022-09-29 22:22:55.675909244 +0200 > @@ -2,11 +2,11 @@ > * > * DO NOT EDIT THIS FILE (fixincl.x) > * > - * It has been AutoGen-ed September 28, 2022 at 07:56:15 PM by > AutoGen 5.18.16 > + * It has been AutoGen-ed September 29, 2022 at 10:22:55 PM by > AutoGen 5.18.16 > * From the definitions inclhack.def > * and the template file fixincl > */ > -/* DO NOT SVN-MERGE THIS FILE, EITHER Wed Sep 28 19:56:15 CEST 2022 > +/* DO NOT SVN-MERGE THIS FILE, EITHER Thu Sep 29 22:22:55 CEST 2022 > * > * You must regenerate it. Use the ./genfixes script. > * > @@ -15,7 +15,7 @@ > * certain ANSI-incompatible system header files which are fixed to > work > * correctly with ANSI C and placed in a directory that GNU C will > search. > * > - * This file contains 271 fixup descriptions. > + * This file contains 272 fixup descriptions. > * > * See README for more information. > * > @@ -4273,6 +4273,43 @@ static const char* apzGlibc_Cxx_Floatn_4 > > /* * * * * * * * * * * * * * * * * * * * * * * * * * > * > + * Description of Glibc_Cxx_Floatn_5 fix > + */ > +tSCC zGlibc_Cxx_Floatn_5Name[] = > + "glibc_cxx_floatn_5"; > + > +/* > + * File name selection pattern > + */ > +tSCC zGlibc_Cxx_Floatn_5List[] = > + "bits/floatn.h\0bits/floatn- > common.h\0*/bits/floatn.h\0*/bits/floatn-common.h\0"; > +/* > + * Machine/OS name selection pattern > + */ > +#define apzGlibc_Cxx_Floatn_5Machs (const char**)NULL > + > +/* > + * content selection pattern - do fix if pattern found > + */ > +tSCC zGlibc_Cxx_Floatn_5Select0[] = > + "^([ \t]*#[ \t]*if !__GNUC_PREREQ \\(7, 0\\) \\|\\| )defined > __cplusplus\n\ > +([ \t]*#[ \t]+error \"_Float128[xX] supported but no )"; > + > +#define GLIBC_CXX_FLOATN_5_TEST_CT 1 > +static tTestDesc aGlibc_Cxx_Floatn_5Tests[] = { > + { TT_EGREP, zGlibc_Cxx_Floatn_5Select0, (regex_t*)NULL }, }; > + > +/* > + * Fix Command Arguments for Glibc_Cxx_Floatn_5 > + */ > +static const char* apzGlibc_Cxx_Floatn_5Patch[] = { > + "format", > + "%1(defined __cplusplus && !__GNUC_PREREQ (13, 0))\n\ > +%2", > + (char*)NULL }; > + > +/* * * * * * * * * * * * * * * * * * * * * * * * * * > + * > * Description of Glibc_Mutex_Init fix > */ > tSCC zGlibc_Mutex_InitName[] = > @@ -11038,9 +11075,9 @@ static const char* apzX11_SprintfPatch[] > * > * List of all fixes > */ > -#define REGEX_COUNT 309 > +#define REGEX_COUNT 310 > #define MACH_LIST_SIZE_LIMIT 187 > -#define FIX_COUNT 271 > +#define FIX_COUNT 272 > > /* > * Enumerate the fixes > @@ -11147,6 +11184,7 @@ typedef enum { > GLIBC_CXX_FLOATN_2_FIXIDX, > GLIBC_CXX_FLOATN_3_FIXIDX, > GLIBC_CXX_FLOATN_4_FIXIDX, > + GLIBC_CXX_FLOATN_5_FIXIDX, > GLIBC_MUTEX_INIT_FIXIDX, > GLIBC_STDINT_FIXIDX, > GLIBC_STRNCPY_FIXIDX, > @@ -11825,6 +11863,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { > GLIBC_CXX_FLOATN_4_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, > aGlibc_Cxx_Floatn_4Tests, apzGlibc_Cxx_Floatn_4Patch, 0 }, > > + { zGlibc_Cxx_Floatn_5Name, zGlibc_Cxx_Floatn_5List, > + apzGlibc_Cxx_Floatn_5Machs, > + GLIBC_CXX_FLOATN_5_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, > + aGlibc_Cxx_Floatn_5Tests, apzGlibc_Cxx_Floatn_5Patch, 0 }, > + > { zGlibc_Mutex_InitName, zGlibc_Mutex_InitList, > apzGlibc_Mutex_InitMachs, > GLIBC_MUTEX_INIT_TEST_CT, FD_MACH_ONLY, > --- fixincludes/tests/base/bits/floatn.h.jj 2022-09-29 > 22:18:47.976402661 +0200 > +++ fixincludes/tests/base/bits/floatn.h 2022-09-29 > 22:23:19.703717787 +0200 > @@ -84,3 +84,13 @@ typedef long double _Float128; > # define __CFLOAT128 _Complex long double > # endif > #endif /* GLIBC_CXX_FLOATN_4_CHECK */ > + > + > +#if defined( GLIBC_CXX_FLOATN_5_CHECK ) > +# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && > !__GNUC_PREREQ (13, 0)) > +# error "_Float128X supported but no constant suffix" > +# endif > +# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && > !__GNUC_PREREQ (13, 0)) > +# error "_Float128x supported but no type" > +# endif > +#endif /* GLIBC_CXX_FLOATN_5_CHECK */ > > > Jakub >