summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc/glibc/0025-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-01-26 11:27:43 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-27 16:48:09 +0000
commit81437a813ff18ac95cb5fdcc7e40dd9a98678707 (patch)
tree3b4f012e7cee70c5a6320a008e9514f363f5096e /meta/recipes-core/glibc/glibc/0025-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch
parent176d1c0169b84978648230ab98cf966640ae8ce0 (diff)
downloadpoky-81437a813ff18ac95cb5fdcc7e40dd9a98678707.tar.gz
glibc: Update to final 2.31 release
Drop ppc 8xx clear cache optimization, which we have been carrying through eglibc days, it has been redone in glibc now (From OE-Core rev: 5c48e655cbd9a45d43c37602db8e09e2e91d2722) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/glibc/glibc/0025-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch')
-rw-r--r--meta/recipes-core/glibc/glibc/0025-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch80
1 files changed, 80 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc/0025-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch b/meta/recipes-core/glibc/glibc/0025-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch
new file mode 100644
index 0000000000..543f65d6ea
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0025-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch
@@ -0,0 +1,80 @@
1From 8f4b0bac85d14b184e08848b02de3f30775f05b1 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 3 Aug 2018 09:42:06 -0700
4Subject: [PATCH] localedef --add-to-archive uses a hard-coded locale path
5
6it doesn't exist in normal use, and there's no way to pass an
7alternative filename.
8
9Add a fallback of $LOCALEARCHIVE from the environment, and allow
10creation of new locale archives that are not the system archive.
11
12Upstream-Status: Inappropriate (OE-specific)
13
14Signed-off-by: Ross Burton <ross.burton@intel.com>
15Signed-off-by: Khem Raj <raj.khem@gmail.com>
16---
17 locale/programs/locarchive.c | 35 +++++++++++++++++++++++++----------
18 1 file changed, 25 insertions(+), 10 deletions(-)
19
20diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c
21index dccaf04e3b..ae0b7fe155 100644
22--- a/locale/programs/locarchive.c
23+++ b/locale/programs/locarchive.c
24@@ -340,12 +340,24 @@ enlarge_archive (struct locarhandle *ah, const struct locarhead *head)
25 struct namehashent *oldnamehashtab;
26 struct locarhandle new_ah;
27 size_t prefix_len = output_prefix ? strlen (output_prefix) : 0;
28- char archivefname[prefix_len + sizeof (ARCHIVE_NAME)];
29- char fname[prefix_len + sizeof (ARCHIVE_NAME) + sizeof (".XXXXXX") - 1];
30+ char *archivefname;
31+ char *fname;
32+ char *envarchive = getenv("LOCALEARCHIVE");
33
34- if (output_prefix)
35- memcpy (archivefname, output_prefix, prefix_len);
36- strcpy (archivefname + prefix_len, ARCHIVE_NAME);
37+ if (envarchive != NULL)
38+ {
39+ archivefname = xmalloc(strlen(envarchive) + 1);
40+ fname = xmalloc(strlen(envarchive) + sizeof (".XXXXXX"));
41+ strcpy (archivefname, envarchive);
42+ }
43+ else
44+ {
45+ archivefname = xmalloc(prefix_len + sizeof (ARCHIVE_NAME));
46+ fname = xmalloc(prefix_len + sizeof (ARCHIVE_NAME) + sizeof (".XXXXXX") - 1);
47+ if (output_prefix)
48+ memcpy (archivefname, output_prefix, prefix_len);
49+ strcpy (archivefname + prefix_len, ARCHIVE_NAME);
50+ }
51 strcpy (stpcpy (fname, archivefname), ".XXXXXX");
52
53 /* Not all of the old file has to be mapped. Change this now this
54@@ -569,10 +581,13 @@ open_archive (struct locarhandle *ah, bool readonly)
55 /* If ah has a non-NULL fname open that otherwise open the default. */
56 if (archivefname == NULL)
57 {
58- archivefname = default_fname;
59- if (output_prefix)
60- memcpy (default_fname, output_prefix, prefix_len);
61- strcpy (default_fname + prefix_len, ARCHIVE_NAME);
62+ archivefname = getenv("LOCALEARCHIVE");
63+ if (archivefname == NULL) {
64+ archivefname = default_fname;
65+ if (output_prefix)
66+ memcpy (default_fname, output_prefix, prefix_len);
67+ strcpy (default_fname + prefix_len, ARCHIVE_NAME);
68+ }
69 }
70
71 while (1)
72@@ -585,7 +600,7 @@ open_archive (struct locarhandle *ah, bool readonly)
73 the default locale archive we ignore the failure and
74 list an empty archive, otherwise we print an error
75 and exit. */
76- if (errno == ENOENT && archivefname == default_fname)
77+ if (errno == ENOENT)
78 {
79 if (readonly)
80 {