From patchwork Tue Apr 5 10:26:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Liebler X-Patchwork-Id: 11630 Received: (qmail 116307 invoked by alias); 5 Apr 2016 10:27:11 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 116297 invoked by uid 89); 5 Apr 2016 10:27:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy=sk:glibc-2, sk:glibc2, strong_alias, ___printf_fp X-HELO: plane.gmane.org To: libc-alpha@sourceware.org From: Stefan Liebler Subject: Re: [PATCH] strfmon_l: Use specified locale for number formatting [BZ #19633] Date: Tue, 5 Apr 2016 12:26:48 +0200 Lines: 115 Message-ID: References: <56CF62D0.8060803@redhat.com> <56CF7D30.2090000@redhat.com> <56DD80AF.3000408@redhat.com> <56DD9E1C.5030408@redhat.com> <56DDA516.4090509@redhat.com> <56DDB33A.1000405@redhat.com> <56DDDF0D.8040601@redhat.com> <56FBBDE3.2050106@redhat.com> <56FBEBED.6050206@gmail.com> <57027826.4000308@redhat.com> Mime-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 In-Reply-To: <57027826.4000308@redhat.com> On 04/04/2016 04:20 PM, Florian Weimer wrote: > On 03/30/2016 05:08 PM, Martin Sebor wrote: >> On 03/30/2016 05:52 AM, Florian Weimer wrote: >>> On 03/07/2016 09:05 PM, Florian Weimer wrote: >>>> On 03/07/2016 05:58 PM, Carlos O'Donell wrote: >>>>> On 03/07/2016 10:58 AM, Florian Weimer wrote: >>>>>> On 03/07/2016 04:28 PM, Carlos O'Donell wrote: >>>>>> >>>>>>> I tend to agree with Martin here, having that separation between >>>>>>> test and data makes it easier to read and change the test or add >>>>>>> more tests. >>>>>>> >>>>>>> If you're getting a warning from the compiler you expect but don't >>>>>>> care about then you can just silence the warning with the appropriate >>>>>>> attribute? >>>>>> >>>>>> The warning is not enabled by default (or even -W), so I'm not sure if >>>>>> that's even necessary. >>>>> >>>>> If the warning isn't enabled, then we don't need to worry about it >>>>> today. >>>>> The vision here is that we can run everything with -Werror, but we >>>>> aren't >>>>> there yet in some cases (see -Wundef fixes required). >>>> >>>> Okay, here is a table-based version of the test. Other parts of the >>>> patch are unchanged. >>> >>> Ping? >>> >>> https://sourceware.org/ml/libc-alpha/2016-03/msg00176.html >> >> I like it. > > Thanks, committed. > > Florian > > Hi, on s390, i get elf/check-abi-libc.out: --- ../sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist 2016-03-04 14:08:24.443047376 +0100 +++ /home/stli/glibcDir/glibc-20160405-build/libc.symlist 2016-04-05 08:34:18.215255347 +0200 @@ -2131,0 +2132 @@ GLIBC_2.4 __printf_fp F +GLIBC_2.4 __printf_fp_l F In stdio-common/printf_fp.c ldbl_-macros are used for __printf_fp_l ...: ldbl_hidden_def (___printf_fp_l, __printf_fp_l) ldbl_strong_alias (___printf_fp_l, __printf_fp_l) ... which are defined in sysdeps/generic/math_ldbl_opt.h (e.g. used on x86_64): #define ldbl_hidden_def(local, name) libc_hidden_def (name) #define ldbl_strong_alias(name, aliasname) strong_alias (name, aliasname) ... or sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h (e.g used on s390): #ifdef SHARED # define ldbl_hidden_def(local, name) libc_hidden_ver (local, name) # define ldbl_strong_alias(name, aliasname) \ strong_alias (name, __GL_##name##_##aliasname) \ long_double_symbol (libc, __GL_##name##_##aliasname, aliasname); The attached patch uses the libc_hidden_def and strong_alias instead of ldbl_hidden_def and ldbl_strong_alias macros. Then, the testsuite is clean on x86_64 and s390. Please verify. ChangeLog: 2016-04-05 Stefan Liebler * stdio-common/printf_fp.c (__printf_fp_l): Use libc_hidden_def and strong_alias instead of ldbl_hidden_def and ldbl_strong_alias macros. diff --git a/stdio-common/printf_fp.c b/stdio-common/printf_fp.c index baada9e..fb2a763 100644 --- a/stdio-common/printf_fp.c +++ b/stdio-common/printf_fp.c @@ -1248,8 +1248,8 @@ ___printf_fp_l (FILE *fp, locale_t loc, } return done; } -ldbl_hidden_def (___printf_fp_l, __printf_fp_l) -ldbl_strong_alias (___printf_fp_l, __printf_fp_l) +libc_hidden_def (__printf_fp_l) +strong_alias (___printf_fp_l, __printf_fp_l) int ___printf_fp (FILE *fp, const struct printf_info *info,