This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] locale: XFAIL newlocale usage in static binary (Bug 23164)
- From: Carlos O'Donell <carlos at redhat dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 23 May 2018 07:46:17 -0400
- Subject: Re: [PATCH] locale: XFAIL newlocale usage in static binary (Bug 23164)
- References: <3b445aba-1839-edab-537a-57db9987c220@redhat.com>
On 05/21/2018 02:14 PM, Carlos O'Donell wrote:
> There is a glibc optimization which allows for locale categories
> to be removed during static compilation. There have been various
> bugs for this support over the years, with bug 16915 being the
> most recent. The solution there was to emit a reference to all the
> categories to avoid any being removed. This fix, although it's in
> the generic __nl_langinfo_l function, doesn't appear to be enough
> to fix the case for a statically linked program that uses newlocale
> and nl_langinfo_l. This commit doesn't fix the problem, but it does
> add a XFAIL'd test case such that a fix can be applied against this
> and the XFAIL removed. It's not entirely clear that the problem is
> the same as that which was seen in bug 16915.
>
> The commit makes tst-langinfo.c into a test driver for use by two
> new tests which use setenv/nl_langinfo or newlocale/nl_langinfo_l,
> both dynamic (which pass) and static (for which tst-langinfo-newlocale-static
> fails and is XFAIL'd). In addition we add CURRENCY_SYMBOL test coverage
> which was the original problem reported in the related gcc/C++ PR.
>
> OK to commit?
If nobody objects I'll commit the new XFAIL'd test case next Monday.
--
Cheers,
Carlos.