From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 97238 invoked by alias); 19 Sep 2017 13:28:04 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 97229 invoked by uid 89); 19 Sep 2017 13:28:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=Hx-languages-length:2516, unintended, HTo:U*gabriel X-HELO: mx0a-001b2d01.pphosted.com From: "Tulio Magno Quites Machado Filho" To: "Gabriel F. T. Gomes" , libc-alpha@sourceware.org Cc: Subject: Re: [PATCH v3 2/5] powerpc: Add redirection for finitef128, isinf128, and isnanf128 In-Reply-To: <20170912123435.6592-3-gabriel@inconstante.eti.br> References: <20170912123435.6592-1-gabriel@inconstante.eti.br> <20170912123435.6592-3-gabriel@inconstante.eti.br> User-Agent: Notmuch/0.25 (http://notmuchmail.org) Emacs/25.2.1 (x86_64-redhat-linux-gnu) Date: Tue, 19 Sep 2017 13:28:00 -0000 MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 x-cbid: 17091913-2213-0000-0000-0000021DC5D1 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007762; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000230; SDB=6.00919284; UDB=6.00461853; IPR=6.00699510; BA=6.00005598; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017209; XFM=3.00000015; UTC=2017-09-19 13:27:58 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17091913-2214-0000-0000-00005798BDC1 Message-Id: <87efr2izs5.fsf@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-09-19_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1709190190 X-SW-Source: 2017-09/txt/msg00731.txt.bz2 "Gabriel F. T. Gomes" writes: > On powerpc64le, compiler support for float128 is not enabled by default > on gcc. To enable it, the flag -mfloat128 must be passed as a command > line option to the compiler. This means that only the few files that > actively have -mfloat128 passed as an argument get compiler support for > float128, whereas all other files don't. > > When -mfloat128 becomes enabled by default on powerpc [1], all the files > that do not currently have compiler support for float128 enabled during > their compilation, will start to have it. This will lead to build > errors in s_finite.c, s_isinf.c, and s_isnan.c. > > The errors are due to the unintended macro expansion of __finitef128 to > __redirect_finitef128 in math/bits/mathcalls-helper-functions.h. In AFAIU, the expansion of __finitef128 to __redirect_finitef128 in math/bits/mathcalls-helper-functions.h is expected. The problem happens when the same thing doesn't happen in include/math.h too. In that case, I suggest to rewrite this part as: The errors are due to the macro expansion of __finitef128 to __redirect_finitef128 in math/bits/mathcalls-helper-functions.h without expanding it in include/math.h too. > diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite.c > index a5ec36b72f..0382bfb95c 100644 > --- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite.c > +++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite.c > @@ -17,8 +17,15 @@ > . */ > > #define __finite __redirect___finite > + > +/* The following definitions, although not related to the 'double' > + version of 'finite', are required to compensate for the unintended > + macro expansion of __finitef to __redirect___finitef, etc. in > + math/bits/mathcalls-helper-functions.h. */ Likewise. I suggest the following change: /* The following definitions, although not related to the 'double' version of 'finite', are required to guarantee the macro expansion of __finitef to __redirect___finitef, etc. in math/bits/mathcalls-helper-functions.h and include/math.h. */ > #define __finitef __redirect___finitef > #define __finitel __redirect___finitel > +#define __finitef128 __redirect___finitef128 > + > #include > #include > #include Don't you have to undefine this macro later in this file? -- Tulio Magno