summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-10-26 07:13:04 +0000
committerCoprDistGit <infra@openeuler.org>2023-10-26 07:13:04 +0000
commit0b7f50a76cdf3febc95fd5d24c220f9f2b4063e7 (patch)
tree2e316dcb876cd56a696fefade557cb35b68abff3
parent4d703ac84a58f22c5f93c1f5be4ea0cc21927101 (diff)
automatic import of glibcopeneuler23.09
-rw-r--r--.gitignore1
-rw-r--r--0001-Optimizing-__random-for-single-threaded-scenarios.patch44
-rw-r--r--0001-fix-glibc-build-error-on-x86.patch56
-rw-r--r--LanguageList196
-rw-r--r--LicenseList26
-rw-r--r--add-GB18030-2022-charmap-BZ-30243.patch853
-rw-r--r--add-pthread_cond_clockwait-GLIBC_2_28.patch66
-rw-r--r--bench.mk77
-rw-r--r--glibc-1070416.patch38
-rw-r--r--glibc-bench-compare153
-rw-r--r--glibc.spec1732
-rw-r--r--locale-delete-no-hard-link-to-avoid-all_language-pac.patch26
-rw-r--r--malloc-use-__get_nprocs-replace-__get_nprocs_sched.patch25
-rw-r--r--nscd.conf1
-rw-r--r--nsswitch.conf56
-rw-r--r--replace_same_file_to_hard_link.py98
-rw-r--r--sources1
-rw-r--r--strcmp-delete-align-for-loop_aligned.patch32
-rw-r--r--testsuite_whitelist129
-rw-r--r--turn-default-value-of-x86_rep_stosb_threshold_form_2K_to_1M.patch29
-rw-r--r--use-region-to-instead-of-country-for-extract-timezon.patch152
-rw-r--r--x86-use-total-l3cache-for-non_temporal_threshold.patch74
22 files changed, 3865 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..cb4776b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/glibc-2.38.tar.xz
diff --git a/0001-Optimizing-__random-for-single-threaded-scenarios.patch b/0001-Optimizing-__random-for-single-threaded-scenarios.patch
new file mode 100644
index 0000000..cbc113e
--- /dev/null
+++ b/0001-Optimizing-__random-for-single-threaded-scenarios.patch
@@ -0,0 +1,44 @@
+From f54e1ddea12343991b402abf28be2b94ffbac2c5 Mon Sep 17 00:00:00 2001
+From: Tian Tao <tiantao6@hisilicon.com>
+Date: Tue, 11 Jul 2023 08:42:56 +0800
+Subject: [PATCH] Optimizing __random for single-threaded scenarios
+
+The __random function does not need to be locked by __libc_lock_lock and
+unlocked by __libc_lock_unlock in a single-threaded scenario, so we can
+remove these locks in a single-threaded scenario to improve performance.
+
+Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
+---
+ stdlib/random.c | 14 +++++++++++---
+ 1 file changed, 11 insertions(+), 3 deletions(-)
+
+diff --git a/stdlib/random.c b/stdlib/random.c
+index 62f22fac8d..9035df8d18 100644
+--- a/stdlib/random.c
++++ b/stdlib/random.c
+@@ -288,11 +288,19 @@ __random (void)
+ {
+ int32_t retval;
+
+- __libc_lock_lock (lock);
++ if (__libc_single_threaded) {
+
+- (void) __random_r (&unsafe_state, &retval);
++ (void) __random_r (&unsafe_state, &retval);
+
+- __libc_lock_unlock (lock);
++ } else {
++
++ __libc_lock_lock (lock);
++
++ (void) __random_r (&unsafe_state, &retval);
++
++ __libc_lock_unlock (lock);
++
++ }
+
+ return retval;
+ }
+--
+2.33.0
+
diff --git a/0001-fix-glibc-build-error-on-x86.patch b/0001-fix-glibc-build-error-on-x86.patch
new file mode 100644
index 0000000..c27dd9d
--- /dev/null
+++ b/0001-fix-glibc-build-error-on-x86.patch
@@ -0,0 +1,56 @@
+From a2150b0d854b6ce3100d7823e3e48b2710161bfc Mon Sep 17 00:00:00 2001
+From: chenhaixiang <chenhaixiang3@huawei.com>
+Date: Wed, 16 Aug 2023 15:47:44 +0800
+Subject: [PATCH] skipping test case building fix glibc build error on x86
+
+Due to the upgrade of binutils to version 2.40,
+support for the -z pack-relative-relocs
+compilation option was added during glibc building.
+This caused the linking failure of the test cases
+tst-protected1a, tst-protected1b, and vismain.
+These files are only compiled when have-protected-data
+ is set to 'yes'.
+To ensure the successful building of glibc, these files are temporarily skipped.
+
+---
+ elf/Makefile | 19 -------------------
+ 1 file changed, 19 deletions(-)
+
+diff --git a/elf/Makefile b/elf/Makefile
+index c00e2ccf..8cd01845 100644
+--- a/elf/Makefile
++++ b/elf/Makefile
+@@ -986,30 +986,11 @@ tst-gnu2-tls1mod.so-no-z-defs = yes
+ CFLAGS-tst-gnu2-tls1mod.c += -mtls-dialect=gnu2
+ endif # $(have-mtls-dialect-gnu2)
+
+-ifeq (yes,$(have-protected-data))
+-modules-names += tst-protected1moda tst-protected1modb
+-tests += tst-protected1a tst-protected1b
+-$(objpfx)tst-protected1a: $(addprefix $(objpfx),tst-protected1moda.so tst-protected1modb.so)
+-$(objpfx)tst-protected1b: $(addprefix $(objpfx),tst-protected1modb.so tst-protected1moda.so)
+-tst-protected1modb.so-no-z-defs = yes
+-# These tests fail with GCC versions prior to 5.1 and with some versions
+-# of binutils. See https://sourceware.org/bugzilla/show_bug.cgi?id=17709
+-# and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248 for details.
+-# Perhaps in future we can make these XFAILs conditional on some detection
+-# of compiler/linker behavior/version.
+-test-xfail-tst-protected1a = yes
+-test-xfail-tst-protected1b = yes
+-endif
+ ifeq (yesyes,$(have-fpie)$(build-shared))
+ modules-names += tst-piemod1
+ tests += tst-pie1 tst-pie2 tst-dlopen-pie tst-dlopen-tlsmodid-pie \
+ tst-dlopen-self-pie
+ tests-pie += tst-pie1 tst-pie2 tst-dlopen-tlsmodid-pie tst-dlopen-self-pie
+-ifeq (yes,$(have-protected-data))
+-tests += vismain
+-tests-pie += vismain
+-CFLAGS-vismain.c += $(PIE-ccflag)
+-endif
+ endif
+ modules-execstack-yes = tst-execstack-mod
+ extra-test-objs += $(addsuffix .os,$(strip $(modules-names)))
+--
+2.41.0
+
diff --git a/LanguageList b/LanguageList
new file mode 100644
index 0000000..7ae6391
--- /dev/null
+++ b/LanguageList
@@ -0,0 +1,196 @@
+glibc-langpack-aa
+glibc-langpack-af
+glibc-langpack-agr
+glibc-langpack-ak
+glibc-langpack-am
+glibc-langpack-an
+glibc-langpack-anp
+glibc-langpack-ar
+glibc-langpack-as
+glibc-langpack-ast
+glibc-langpack-ayc
+glibc-langpack-az
+glibc-langpack-be
+glibc-langpack-bem
+glibc-langpack-ber
+glibc-langpack-bg
+glibc-langpack-bhb
+glibc-langpack-bho
+glibc-langpack-bi
+glibc-langpack-bn
+glibc-langpack-bo
+glibc-langpack-br
+glibc-langpack-brx
+glibc-langpack-bs
+glibc-langpack-byn
+glibc-langpack-ca
+glibc-langpack-ce
+glibc-langpack-chr
+glibc-langpack-cmn
+glibc-langpack-crh
+glibc-langpack-cs
+glibc-langpack-csb
+glibc-langpack-cv
+glibc-langpack-cy
+glibc-langpack-da
+glibc-langpack-de
+glibc-langpack-doi
+glibc-langpack-dsb
+glibc-langpack-dv
+glibc-langpack-dz
+glibc-langpack-el
+glibc-langpack-en
+glibc-langpack-eo
+glibc-langpack-es
+glibc-langpack-et
+glibc-langpack-eu
+glibc-langpack-fa
+glibc-langpack-ff
+glibc-langpack-fi
+glibc-langpack-fil
+glibc-langpack-fo
+glibc-langpack-fr
+glibc-langpack-fur
+glibc-langpack-fy
+glibc-langpack-ga
+glibc-langpack-gd
+glibc-langpack-gez
+glibc-langpack-gl
+glibc-langpack-gu
+glibc-langpack-gv
+glibc-langpack-ha
+glibc-langpack-hak
+glibc-langpack-he
+glibc-langpack-hi
+glibc-langpack-hif
+glibc-langpack-hne
+glibc-langpack-hr
+glibc-langpack-hsb
+glibc-langpack-ht
+glibc-langpack-hu
+glibc-langpack-hy
+glibc-langpack-ia
+glibc-langpack-id
+glibc-langpack-ig
+glibc-langpack-ik
+glibc-langpack-is
+glibc-langpack-it
+glibc-langpack-iu
+glibc-langpack-ja
+glibc-langpack-ka
+glibc-langpack-kab
+glibc-langpack-kk
+glibc-langpack-kl
+glibc-langpack-km
+glibc-langpack-kn
+glibc-langpack-ko
+glibc-langpack-kok
+glibc-langpack-ks
+glibc-langpack-ku
+glibc-langpack-kw
+glibc-langpack-ky
+glibc-langpack-lb
+glibc-langpack-lg
+glibc-langpack-li
+glibc-langpack-lij
+glibc-langpack-ln
+glibc-langpack-lo
+glibc-langpack-lt
+glibc-langpack-lv
+glibc-langpack-lzh
+glibc-langpack-mag
+glibc-langpack-mai
+glibc-langpack-mfe
+glibc-langpack-mg
+glibc-langpack-mhr
+glibc-langpack-mi
+glibc-langpack-miq
+glibc-langpack-mjw
+glibc-langpack-mk
+glibc-langpack-ml
+glibc-langpack-mn
+glibc-langpack-mni
+glibc-langpack-mr
+glibc-langpack-ms
+glibc-langpack-mt
+glibc-langpack-my
+glibc-langpack-nan
+glibc-langpack-nb
+glibc-langpack-nds
+glibc-langpack-ne
+glibc-langpack-nhn
+glibc-langpack-niu
+glibc-langpack-nl
+glibc-langpack-nn
+glibc-langpack-nr
+glibc-langpack-nso
+glibc-langpack-oc
+glibc-langpack-om
+glibc-langpack-or
+glibc-langpack-os
+glibc-langpack-pa
+glibc-langpack-pap
+glibc-langpack-pl
+glibc-langpack-ps
+glibc-langpack-pt
+glibc-langpack-quz
+glibc-langpack-raj
+glibc-langpack-ro
+glibc-langpack-ru
+glibc-langpack-rw
+glibc-langpack-sa
+glibc-langpack-sah
+glibc-langpack-sat
+glibc-langpack-sc
+glibc-langpack-sd
+glibc-langpack-se
+glibc-langpack-sgs
+glibc-langpack-shn
+glibc-langpack-shs
+glibc-langpack-si
+glibc-langpack-sid
+glibc-langpack-sk
+glibc-langpack-sl
+glibc-langpack-sm
+glibc-langpack-so
+glibc-langpack-sq
+glibc-langpack-sr
+glibc-langpack-ss
+glibc-langpack-st
+glibc-langpack-sv
+glibc-langpack-sw
+glibc-langpack-szl
+glibc-langpack-ta
+glibc-langpack-tcy
+glibc-langpack-te
+glibc-langpack-tg
+glibc-langpack-th
+glibc-langpack-the
+glibc-langpack-ti
+glibc-langpack-tig
+glibc-langpack-tk
+glibc-langpack-tl
+glibc-langpack-tn
+glibc-langpack-to
+glibc-langpack-tpi
+glibc-langpack-tr
+glibc-langpack-ts
+glibc-langpack-tt
+glibc-langpack-ug
+glibc-langpack-uk
+glibc-langpack-unm
+glibc-langpack-ur
+glibc-langpack-uz
+glibc-langpack-ve
+glibc-langpack-vi
+glibc-langpack-wa
+glibc-langpack-wae
+glibc-langpack-wal
+glibc-langpack-wo
+glibc-langpack-xh
+glibc-langpack-yi
+glibc-langpack-yo
+glibc-langpack-yue
+glibc-langpack-yuw
+glibc-langpack-zh
+glibc-langpack-zu
diff --git a/LicenseList b/LicenseList
new file mode 100644
index 0000000..bcffe7a
--- /dev/null
+++ b/LicenseList
@@ -0,0 +1,26 @@
+In general, GPLv2+ is used by programs, LGPLv2+ is used for
+libraries.
+
+LGPLv2+ with exceptions is used for things that are linked directly
+into dynamically linked programs and shared libraries (e.g. crt
+files, lib*_nonshared.a). Historically, this exception also applies
+to parts of libio.
+
+GPLv2+ with exceptions is used for parts of the Arm unwinder.
+
+GFDL is used for the documentation.
+
+Some other licenses are used in various places (BSD, Inner-Net,
+ISC, Public Domain).
+
+HSRL and FSFAP are only used in test cases, which currently do not
+ship in binary RPMs, so they are not listed here. MIT is used for
+scripts/install-sh, which does not ship, either.
+
+GPLv3+ is used by manual/texinfo.tex, which we do not use.
+
+LGPLv3+ is used by some Hurd code, which we do not build.
+
+LGPLv2 is used in one place (time/timespec_get.c, by mistake), but
+it is not actually compiled, so it does not matter for libraries.
+
diff --git a/add-GB18030-2022-charmap-BZ-30243.patch b/add-GB18030-2022-charmap-BZ-30243.patch
new file mode 100644
index 0000000..0c15b24
--- /dev/null
+++ b/add-GB18030-2022-charmap-BZ-30243.patch
@@ -0,0 +1,853 @@
+From 1dc4a7192a27142bf3b916287c9cd37a361784f5 Mon Sep 17 00:00:00 2001
+From: lijianglin <lijianglin2@huawei.com>
+Date: Thu, 15 Jun 2023 16:50:13 +0800
+Subject: [PATCH v3] add GB18030-2022 charmap and test the entire GB18030 charmap [BZ #30243]
+
+support GB18030-2022 after add and change some transcoding relationship
+of GB18030-2022.Details are as follows:
+add 25 transcoding relationship
+ UE81E 0x82359037
+ UE826 0x82359038
+ UE82B 0x82359039
+ UE82C 0x82359130
+ UE832 0x82359131
+ UE843 0x82359132
+ UE854 0x82359133
+ UE864 0x82359134
+ UE78D 0x84318236
+ UE78F 0x84318237
+ UE78E 0x84318238
+ UE790 0x84318239
+ UE791 0x84318330
+ UE792 0x84318331
+ UE793 0x84318332
+ UE794 0x84318333
+ UE795 0x84318334
+ UE796 0x84318335
+ UE816 0xfe51
+ UE817 0xfe52
+ UE818 0xfe53
+ UE831 0xfe6c
+ UE83B 0xfe76
+ UE855 0xfe91
+change 6 transcoding relationship
+ U20087 0x95329031
+ U20089 0x95329033
+ U200CC 0x95329730
+ U215D7 0x9536b937
+ U2298F 0x9630ba35
+ U241FE 0x9635b630
+Test the entire GB18030 charmap, not only the Unicode BMP part.
+
+Co-authored-by: yangyanchao <yangyanchao6@huawei.com>
+Co-authored-by: liqingqing <liqingqing3@huawei.com>
+Co-authored-by: Bruno Haible <bruno@clisp.org>
+Reviewed-by: Andreas Schwab <schwab@suse.de>
+---
+ iconvdata/gb18030.c | 423 +++++++++++++++++++-----------------
+ iconvdata/tst-table-from.c | 5 +-
+ iconvdata/tst-table-to.c | 12 +-
+ iconvdata/tst-table.sh | 50 +++--
+ localedata/charmaps/GB18030 | 91 +++-----
+ 5 files changed, 292 insertions(+), 289 deletions(-)
+
+diff --git a/iconvdata/gb18030.c b/iconvdata/gb18030.c
+index 0b03b9bb..ca383dc0 100644
+--- a/iconvdata/gb18030.c
++++ b/iconvdata/gb18030.c
+@@ -6020,49 +6020,50 @@ static const uint16_t __twobyte_to_ucs[] =
+ [0x5dc2] = 0xfa0e, [0x5dc3] = 0xfa0f, [0x5dc4] = 0xfa11, [0x5dc5] = 0xfa13,
+ [0x5dc6] = 0xfa14, [0x5dc7] = 0xfa18, [0x5dc8] = 0xfa1f, [0x5dc9] = 0xfa20,
+ [0x5dca] = 0xfa21, [0x5dcb] = 0xfa23, [0x5dcc] = 0xfa24, [0x5dcd] = 0xfa27,
+- [0x5dce] = 0xfa28, [0x5dcf] = 0xfa29, [0x5dd0] = 0x2e81, [0x5dd4] = 0x2e84,
+- [0x5dd5] = 0x3473, [0x5dd6] = 0x3447, [0x5dd7] = 0x2e88, [0x5dd8] = 0x2e8b,
+- [0x5dd9] = 0x9fb4, [0x5dda] = 0x359e, [0x5ddb] = 0x361a, [0x5ddc] = 0x360e,
+- [0x5ddd] = 0x2e8c, [0x5dde] = 0x2e97, [0x5ddf] = 0x396e, [0x5de0] = 0x3918,
+- [0x5de1] = 0x9fb5, [0x5de2] = 0x39cf, [0x5de3] = 0x39df, [0x5de4] = 0x3a73,
+- [0x5de5] = 0x39d0, [0x5de6] = 0x9fb6, [0x5de7] = 0x9fb7, [0x5de8] = 0x3b4e,
+- [0x5de9] = 0x3c6e, [0x5dea] = 0x3ce0, [0x5deb] = 0x2ea7, [0x5ded] = 0x9fb8,
++ [0x5dce] = 0xfa28, [0x5dcf] = 0xfa29, [0x5dd0] = 0x2e81, [0x5dd1] = 0xe816,
++ [0x5dd2] = 0xe817, [0x5dd3] = 0xe818, [0x5dd4] = 0x2e84, [0x5dd5] = 0x3473,
++ [0x5dd6] = 0x3447, [0x5dd7] = 0x2e88, [0x5dd8] = 0x2e8b, [0x5dd9] = 0x9fb4,
++ [0x5dda] = 0x359e, [0x5ddb] = 0x361a, [0x5ddc] = 0x360e, [0x5ddd] = 0x2e8c,
++ [0x5dde] = 0x2e97, [0x5ddf] = 0x396e, [0x5de0] = 0x3918, [0x5de1] = 0x9fb5,
++ [0x5de2] = 0x39cf, [0x5de3] = 0x39df, [0x5de4] = 0x3a73, [0x5de5] = 0x39d0,
++ [0x5de6] = 0x9fb6, [0x5de7] = 0x9fb7, [0x5de8] = 0x3b4e, [0x5de9] = 0x3c6e,
++ [0x5dea] = 0x3ce0, [0x5deb] = 0x2ea7, [0x5dec] = 0xe831, [0x5ded] = 0x9fb8,
+ [0x5dee] = 0x2eaa, [0x5def] = 0x4056, [0x5df0] = 0x415f, [0x5df1] = 0x2eae,
+ [0x5df2] = 0x4337, [0x5df3] = 0x2eb3, [0x5df4] = 0x2eb6, [0x5df5] = 0x2eb7,
+- [0x5df7] = 0x43b1, [0x5df8] = 0x43ac, [0x5df9] = 0x2ebb, [0x5dfa] = 0x43dd,
+- [0x5dfb] = 0x44d6, [0x5dfc] = 0x4661, [0x5dfd] = 0x464c, [0x5dfe] = 0x9fb9,
+- [0x5e00] = 0x4723, [0x5e01] = 0x4729, [0x5e02] = 0x477c, [0x5e03] = 0x478d,
+- [0x5e04] = 0x2eca, [0x5e05] = 0x4947, [0x5e06] = 0x497a, [0x5e07] = 0x497d,
+- [0x5e08] = 0x4982, [0x5e09] = 0x4983, [0x5e0a] = 0x4985, [0x5e0b] = 0x4986,
+- [0x5e0c] = 0x499f, [0x5e0d] = 0x499b, [0x5e0e] = 0x49b7, [0x5e0f] = 0x49b6,
+- [0x5e10] = 0x9fba, [0x5e12] = 0x4ca3, [0x5e13] = 0x4c9f, [0x5e14] = 0x4ca0,
+- [0x5e15] = 0x4ca1, [0x5e16] = 0x4c77, [0x5e17] = 0x4ca2, [0x5e18] = 0x4d13,
+- [0x5e19] = 0x4d14, [0x5e1a] = 0x4d15, [0x5e1b] = 0x4d16, [0x5e1c] = 0x4d17,
+- [0x5e1d] = 0x4d18, [0x5e1e] = 0x4d19, [0x5e1f] = 0x4dae, [0x5e20] = 0x9fbb,
+- [0x5e21] = 0xe468, [0x5e22] = 0xe469, [0x5e23] = 0xe46a, [0x5e24] = 0xe46b,
+- [0x5e25] = 0xe46c, [0x5e26] = 0xe46d, [0x5e27] = 0xe46e, [0x5e28] = 0xe46f,
+- [0x5e29] = 0xe470, [0x5e2a] = 0xe471, [0x5e2b] = 0xe472, [0x5e2c] = 0xe473,
+- [0x5e2d] = 0xe474, [0x5e2e] = 0xe475, [0x5e2f] = 0xe476, [0x5e30] = 0xe477,
+- [0x5e31] = 0xe478, [0x5e32] = 0xe479, [0x5e33] = 0xe47a, [0x5e34] = 0xe47b,
+- [0x5e35] = 0xe47c, [0x5e36] = 0xe47d, [0x5e37] = 0xe47e, [0x5e38] = 0xe47f,
+- [0x5e39] = 0xe480, [0x5e3a] = 0xe481, [0x5e3b] = 0xe482, [0x5e3c] = 0xe483,
+- [0x5e3d] = 0xe484, [0x5e3e] = 0xe485, [0x5e3f] = 0xe486, [0x5e40] = 0xe487,
+- [0x5e41] = 0xe488, [0x5e42] = 0xe489, [0x5e43] = 0xe48a, [0x5e44] = 0xe48b,
+- [0x5e45] = 0xe48c, [0x5e46] = 0xe48d, [0x5e47] = 0xe48e, [0x5e48] = 0xe48f,
+- [0x5e49] = 0xe490, [0x5e4a] = 0xe491, [0x5e4b] = 0xe492, [0x5e4c] = 0xe493,
+- [0x5e4d] = 0xe494, [0x5e4e] = 0xe495, [0x5e4f] = 0xe496, [0x5e50] = 0xe497,
+- [0x5e51] = 0xe498, [0x5e52] = 0xe499, [0x5e53] = 0xe49a, [0x5e54] = 0xe49b,
+- [0x5e55] = 0xe49c, [0x5e56] = 0xe49d, [0x5e57] = 0xe49e, [0x5e58] = 0xe49f,
+- [0x5e59] = 0xe4a0, [0x5e5a] = 0xe4a1, [0x5e5b] = 0xe4a2, [0x5e5c] = 0xe4a3,
+- [0x5e5d] = 0xe4a4, [0x5e5e] = 0xe4a5, [0x5e5f] = 0xe4a6, [0x5e60] = 0xe4a7,
+- [0x5e61] = 0xe4a8, [0x5e62] = 0xe4a9, [0x5e63] = 0xe4aa, [0x5e64] = 0xe4ab,
+- [0x5e65] = 0xe4ac, [0x5e66] = 0xe4ad, [0x5e67] = 0xe4ae, [0x5e68] = 0xe4af,
+- [0x5e69] = 0xe4b0, [0x5e6a] = 0xe4b1, [0x5e6b] = 0xe4b2, [0x5e6c] = 0xe4b3,
+- [0x5e6d] = 0xe4b4, [0x5e6e] = 0xe4b5, [0x5e6f] = 0xe4b6, [0x5e70] = 0xe4b7,
+- [0x5e71] = 0xe4b8, [0x5e72] = 0xe4b9, [0x5e73] = 0xe4ba, [0x5e74] = 0xe4bb,
+- [0x5e75] = 0xe4bc, [0x5e76] = 0xe4bd, [0x5e77] = 0xe4be, [0x5e78] = 0xe4bf,
+- [0x5e79] = 0xe4c0, [0x5e7a] = 0xe4c1, [0x5e7b] = 0xe4c2, [0x5e7c] = 0xe4c3,
+- [0x5e7d] = 0xe4c4, [0x5e7e] = 0xe4c5,
++ [0x5df6] = 0xe83b, [0x5df7] = 0x43b1, [0x5df8] = 0x43ac, [0x5df9] = 0x2ebb,
++ [0x5dfa] = 0x43dd, [0x5dfb] = 0x44d6, [0x5dfc] = 0x4661, [0x5dfd] = 0x464c,
++ [0x5dfe] = 0x9fb9, [0x5e00] = 0x4723, [0x5e01] = 0x4729, [0x5e02] = 0x477c,
++ [0x5e03] = 0x478d, [0x5e04] = 0x2eca, [0x5e05] = 0x4947, [0x5e06] = 0x497a,
++ [0x5e07] = 0x497d, [0x5e08] = 0x4982, [0x5e09] = 0x4983, [0x5e0a] = 0x4985,
++ [0x5e0b] = 0x4986, [0x5e0c] = 0x499f, [0x5e0d] = 0x499b, [0x5e0e] = 0x49b7,
++ [0x5e0f] = 0x49b6, [0x5e10] = 0x9fba, [0x5e11] = 0xe855, [0x5e12] = 0x4ca3,
++ [0x5e13] = 0x4c9f, [0x5e14] = 0x4ca0, [0x5e15] = 0x4ca1, [0x5e16] = 0x4c77,
++ [0x5e17] = 0x4ca2, [0x5e18] = 0x4d13, [0x5e19] = 0x4d14, [0x5e1a] = 0x4d15,
++ [0x5e1b] = 0x4d16, [0x5e1c] = 0x4d17, [0x5e1d] = 0x4d18, [0x5e1e] = 0x4d19,
++ [0x5e1f] = 0x4dae, [0x5e20] = 0x9fbb, [0x5e21] = 0xe468, [0x5e22] = 0xe469,
++ [0x5e23] = 0xe46a, [0x5e24] = 0xe46b, [0x5e25] = 0xe46c, [0x5e26] = 0xe46d,
++ [0x5e27] = 0xe46e, [0x5e28] = 0xe46f, [0x5e29] = 0xe470, [0x5e2a] = 0xe471,
++ [0x5e2b] = 0xe472, [0x5e2c] = 0xe473, [0x5e2d] = 0xe474, [0x5e2e] = 0xe475,
++ [0x5e2f] = 0xe476, [0x5e30] = 0xe477, [0x5e31] = 0xe478, [0x5e32] = 0xe479,
++ [0x5e33] = 0xe47a, [0x5e34] = 0xe47b, [0x5e35] = 0xe47c, [0x5e36] = 0xe47d,
++ [0x5e37] = 0xe47e, [0x5e38] = 0xe47f, [0x5e39] = 0xe480, [0x5e3a] = 0xe481,
++ [0x5e3b] = 0xe482, [0x5e3c] = 0xe483, [0x5e3d] = 0xe484, [0x5e3e] = 0xe485,
++ [0x5e3f] = 0xe486, [0x5e40] = 0xe487, [0x5e41] = 0xe488, [0x5e42] = 0xe489,
++ [0x5e43] = 0xe48a, [0x5e44] = 0xe48b, [0x5e45] = 0xe48c, [0x5e46] = 0xe48d,
++ [0x5e47] = 0xe48e, [0x5e48] = 0xe48f, [0x5e49] = 0xe490, [0x5e4a] = 0xe491,
++ [0x5e4b] = 0xe492, [0x5e4c] = 0xe493, [0x5e4d] = 0xe494, [0x5e4e] = 0xe495,
++ [0x5e4f] = 0xe496, [0x5e50] = 0xe497, [0x5e51] = 0xe498, [0x5e52] = 0xe499,
++ [0x5e53] = 0xe49a, [0x5e54] = 0xe49b, [0x5e55] = 0xe49c, [0x5e56] = 0xe49d,
++ [0x5e57] = 0xe49e, [0x5e58] = 0xe49f, [0x5e59] = 0xe4a0, [0x5e5a] = 0xe4a1,
++ [0x5e5b] = 0xe4a2, [0x5e5c] = 0xe4a3, [0x5e5d] = 0xe4a4, [0x5e5e] = 0xe4a5,
++ [0x5e5f] = 0xe4a6, [0x5e60] = 0xe4a7, [0x5e61] = 0xe4a8, [0x5e62] = 0xe4a9,
++ [0x5e63] = 0xe4aa, [0x5e64] = 0xe4ab, [0x5e65] = 0xe4ac, [0x5e66] = 0xe4ad,
++ [0x5e67] = 0xe4ae, [0x5e68] = 0xe4af, [0x5e69] = 0xe4b0, [0x5e6a] = 0xe4b1,
++ [0x5e6b] = 0xe4b2, [0x5e6c] = 0xe4b3, [0x5e6d] = 0xe4b4, [0x5e6e] = 0xe4b5,
++ [0x5e6f] = 0xe4b6, [0x5e70] = 0xe4b7, [0x5e71] = 0xe4b8, [0x5e72] = 0xe4b9,
++ [0x5e73] = 0xe4ba, [0x5e74] = 0xe4bb, [0x5e75] = 0xe4bc, [0x5e76] = 0xe4bd,
++ [0x5e77] = 0xe4be, [0x5e78] = 0xe4bf, [0x5e79] = 0xe4c0, [0x5e7a] = 0xe4c1,
++ [0x5e7b] = 0xe4c2, [0x5e7c] = 0xe4c3, [0x5e7d] = 0xe4c4, [0x5e7e] = 0xe4c5,
+ };
+
+ /* Table for GB18030 -> UCS-4, containing the four-byte characters only,
+@@ -8691,7 +8692,9 @@ static const uint16_t __fourbyte_to_ucs[0x99e2 - 6637 - 2110 - 14404 - 4295] =
+ [0x2838] = 0x9fa6, [0x2839] = 0x9fa7, [0x283a] = 0x9fa8, [0x283b] = 0x9fa9,
+ [0x283c] = 0x9faa, [0x283d] = 0x9fab, [0x283e] = 0x9fac, [0x283f] = 0x9fad,
+ [0x2840] = 0x9fae, [0x2841] = 0x9faf, [0x2842] = 0x9fb0, [0x2843] = 0x9fb1,
+- [0x2844] = 0x9fb2, [0x2845] = 0x9fb3, [0x284e] = 0xe76c, [0x284f] = 0xe7c8,
++ [0x2844] = 0x9fb2, [0x2845] = 0x9fb3, [0x2846] = 0xe81e, [0x2847] = 0xe826,
++ [0x2848] = 0xe82b, [0x2849] = 0xe82c, [0x284a] = 0xe832, [0x284b] = 0xe843,
++ [0x284c] = 0xe854, [0x284d] = 0xe864, [0x284e] = 0xe76c, [0x284f] = 0xe7c8,
+ [0x2850] = 0xe7e7, [0x2851] = 0xe7e8, [0x2852] = 0xe7e9, [0x2853] = 0xe7ea,
+ [0x2854] = 0xe7eb, [0x2855] = 0xe7ec, [0x2856] = 0xe7ed, [0x2857] = 0xe7ee,
+ [0x2858] = 0xe7ef, [0x2859] = 0xe7f0, [0x285a] = 0xe7f1, [0x285b] = 0xe7f2,
+@@ -9019,84 +9022,86 @@ static const uint16_t __fourbyte_to_ucs[0x99e2 - 6637 - 2110 - 14404 - 4295] =
+ [0x2d60] = 0xfe02, [0x2d61] = 0xfe03, [0x2d62] = 0xfe04, [0x2d63] = 0xfe05,
+ [0x2d64] = 0xfe06, [0x2d65] = 0xfe07, [0x2d66] = 0xfe08, [0x2d67] = 0xfe09,
+ [0x2d68] = 0xfe0a, [0x2d69] = 0xfe0b, [0x2d6a] = 0xfe0c, [0x2d6b] = 0xfe0d,
+- [0x2d6c] = 0xfe0e, [0x2d6d] = 0xfe0f, [0x2d78] = 0xfe1a, [0x2d79] = 0xfe1b,
+- [0x2d7a] = 0xfe1c, [0x2d7b] = 0xfe1d, [0x2d7c] = 0xfe1e, [0x2d7d] = 0xfe1f,
+- [0x2d7e] = 0xfe20, [0x2d7f] = 0xfe21, [0x2d80] = 0xfe22, [0x2d81] = 0xfe23,
+- [0x2d82] = 0xfe24, [0x2d83] = 0xfe25, [0x2d84] = 0xfe26, [0x2d85] = 0xfe27,
+- [0x2d86] = 0xfe28, [0x2d87] = 0xfe29, [0x2d88] = 0xfe2a, [0x2d89] = 0xfe2b,
+- [0x2d8a] = 0xfe2c, [0x2d8b] = 0xfe2d, [0x2d8c] = 0xfe2e, [0x2d8d] = 0xfe2f,
+- [0x2d8e] = 0xfe32, [0x2d8f] = 0xfe45, [0x2d90] = 0xfe46, [0x2d91] = 0xfe47,
+- [0x2d92] = 0xfe48, [0x2d93] = 0xfe53, [0x2d94] = 0xfe58, [0x2d95] = 0xfe67,
+- [0x2d96] = 0xfe6c, [0x2d97] = 0xfe6d, [0x2d98] = 0xfe6e, [0x2d99] = 0xfe6f,
+- [0x2d9a] = 0xfe70, [0x2d9b] = 0xfe71, [0x2d9c] = 0xfe72, [0x2d9d] = 0xfe73,
+- [0x2d9e] = 0xfe74, [0x2d9f] = 0xfe75, [0x2da0] = 0xfe76, [0x2da1] = 0xfe77,
+- [0x2da2] = 0xfe78, [0x2da3] = 0xfe79, [0x2da4] = 0xfe7a, [0x2da5] = 0xfe7b,
+- [0x2da6] = 0xfe7c, [0x2da7] = 0xfe7d, [0x2da8] = 0xfe7e, [0x2da9] = 0xfe7f,
+- [0x2daa] = 0xfe80, [0x2dab] = 0xfe81, [0x2dac] = 0xfe82, [0x2dad] = 0xfe83,
+- [0x2dae] = 0xfe84, [0x2daf] = 0xfe85, [0x2db0] = 0xfe86, [0x2db1] = 0xfe87,
+- [0x2db2] = 0xfe88, [0x2db3] = 0xfe89, [0x2db4] = 0xfe8a, [0x2db5] = 0xfe8b,
+- [0x2db6] = 0xfe8c, [0x2db7] = 0xfe8d, [0x2db8] = 0xfe8e, [0x2db9] = 0xfe8f,
+- [0x2dba] = 0xfe90, [0x2dbb] = 0xfe91, [0x2dbc] = 0xfe92, [0x2dbd] = 0xfe93,
+- [0x2dbe] = 0xfe94, [0x2dbf] = 0xfe95, [0x2dc0] = 0xfe96, [0x2dc1] = 0xfe97,
+- [0x2dc2] = 0xfe98, [0x2dc3] = 0xfe99, [0x2dc4] = 0xfe9a, [0x2dc5] = 0xfe9b,
+- [0x2dc6] = 0xfe9c, [0x2dc7] = 0xfe9d, [0x2dc8] = 0xfe9e, [0x2dc9] = 0xfe9f,
+- [0x2dca] = 0xfea0, [0x2dcb] = 0xfea1, [0x2dcc] = 0xfea2, [0x2dcd] = 0xfea3,
+- [0x2dce] = 0xfea4, [0x2dcf] = 0xfea5, [0x2dd0] = 0xfea6, [0x2dd1] = 0xfea7,
+- [0x2dd2] = 0xfea8, [0x2dd3] = 0xfea9, [0x2dd4] = 0xfeaa, [0x2dd5] = 0xfeab,
+- [0x2dd6] = 0xfeac, [0x2dd7] = 0xfead, [0x2dd8] = 0xfeae, [0x2dd9] = 0xfeaf,
+- [0x2dda] = 0xfeb0, [0x2ddb] = 0xfeb1, [0x2ddc] = 0xfeb2, [0x2ddd] = 0xfeb3,
+- [0x2dde] = 0xfeb4, [0x2ddf] = 0xfeb5, [0x2de0] = 0xfeb6, [0x2de1] = 0xfeb7,
+- [0x2de2] = 0xfeb8, [0x2de3] = 0xfeb9, [0x2de4] = 0xfeba, [0x2de5] = 0xfebb,
+- [0x2de6] = 0xfebc, [0x2de7] = 0xfebd, [0x2de8] = 0xfebe, [0x2de9] = 0xfebf,
+- [0x2dea] = 0xfec0, [0x2deb] = 0xfec1, [0x2dec] = 0xfec2, [0x2ded] = 0xfec3,
+- [0x2dee] = 0xfec4, [0x2def] = 0xfec5, [0x2df0] = 0xfec6, [0x2df1] = 0xfec7,
+- [0x2df2] = 0xfec8, [0x2df3] = 0xfec9, [0x2df4] = 0xfeca, [0x2df5] = 0xfecb,
+- [0x2df6] = 0xfecc, [0x2df7] = 0xfecd, [0x2df8] = 0xfece, [0x2df9] = 0xfecf,
+- [0x2dfa] = 0xfed0, [0x2dfb] = 0xfed1, [0x2dfc] = 0xfed2, [0x2dfd] = 0xfed3,
+- [0x2dfe] = 0xfed4, [0x2dff] = 0xfed5, [0x2e00] = 0xfed6, [0x2e01] = 0xfed7,
+- [0x2e02] = 0xfed8, [0x2e03] = 0xfed9, [0x2e04] = 0xfeda, [0x2e05] = 0xfedb,
+- [0x2e06] = 0xfedc, [0x2e07] = 0xfedd, [0x2e08] = 0xfede, [0x2e09] = 0xfedf,
+- [0x2e0a] = 0xfee0, [0x2e0b] = 0xfee1, [0x2e0c] = 0xfee2, [0x2e0d] = 0xfee3,
+- [0x2e0e] = 0xfee4, [0x2e0f] = 0xfee5, [0x2e10] = 0xfee6, [0x2e11] = 0xfee7,
+- [0x2e12] = 0xfee8, [0x2e13] = 0xfee9, [0x2e14] = 0xfeea, [0x2e15] = 0xfeeb,
+- [0x2e16] = 0xfeec, [0x2e17] = 0xfeed, [0x2e18] = 0xfeee, [0x2e19] = 0xfeef,
+- [0x2e1a] = 0xfef0, [0x2e1b] = 0xfef1, [0x2e1c] = 0xfef2, [0x2e1d] = 0xfef3,
+- [0x2e1e] = 0xfef4, [0x2e1f] = 0xfef5, [0x2e20] = 0xfef6, [0x2e21] = 0xfef7,
+- [0x2e22] = 0xfef8, [0x2e23] = 0xfef9, [0x2e24] = 0xfefa, [0x2e25] = 0xfefb,
+- [0x2e26] = 0xfefc, [0x2e27] = 0xfefd, [0x2e28] = 0xfefe, [0x2e29] = 0xfeff,
+- [0x2e2a] = 0xff00, [0x2e2b] = 0xff5f, [0x2e2c] = 0xff60, [0x2e2d] = 0xff61,
+- [0x2e2e] = 0xff62, [0x2e2f] = 0xff63, [0x2e30] = 0xff64, [0x2e31] = 0xff65,
+- [0x2e32] = 0xff66, [0x2e33] = 0xff67, [0x2e34] = 0xff68, [0x2e35] = 0xff69,
+- [0x2e36] = 0xff6a, [0x2e37] = 0xff6b, [0x2e38] = 0xff6c, [0x2e39] = 0xff6d,
+- [0x2e3a] = 0xff6e, [0x2e3b] = 0xff6f, [0x2e3c] = 0xff70, [0x2e3d] = 0xff71,
+- [0x2e3e] = 0xff72, [0x2e3f] = 0xff73, [0x2e40] = 0xff74, [0x2e41] = 0xff75,
+- [0x2e42] = 0xff76, [0x2e43] = 0xff77, [0x2e44] = 0xff78, [0x2e45] = 0xff79,
+- [0x2e46] = 0xff7a, [0x2e47] = 0xff7b, [0x2e48] = 0xff7c, [0x2e49] = 0xff7d,
+- [0x2e4a] = 0xff7e, [0x2e4b] = 0xff7f, [0x2e4c] = 0xff80, [0x2e4d] = 0xff81,
+- [0x2e4e] = 0xff82, [0x2e4f] = 0xff83, [0x2e50] = 0xff84, [0x2e51] = 0xff85,
+- [0x2e52] = 0xff86, [0x2e53] = 0xff87, [0x2e54] = 0xff88, [0x2e55] = 0xff89,
+- [0x2e56] = 0xff8a, [0x2e57] = 0xff8b, [0x2e58] = 0xff8c, [0x2e59] = 0xff8d,
+- [0x2e5a] = 0xff8e, [0x2e5b] = 0xff8f, [0x2e5c] = 0xff90, [0x2e5d] = 0xff91,
+- [0x2e5e] = 0xff92, [0x2e5f] = 0xff93, [0x2e60] = 0xff94, [0x2e61] = 0xff95,
+- [0x2e62] = 0xff96, [0x2e63] = 0xff97, [0x2e64] = 0xff98, [0x2e65] = 0xff99,
+- [0x2e66] = 0xff9a, [0x2e67] = 0xff9b, [0x2e68] = 0xff9c, [0x2e69] = 0xff9d,
+- [0x2e6a] = 0xff9e, [0x2e6b] = 0xff9f, [0x2e6c] = 0xffa0, [0x2e6d] = 0xffa1,
+- [0x2e6e] = 0xffa2, [0x2e6f] = 0xffa3, [0x2e70] = 0xffa4, [0x2e71] = 0xffa5,
+- [0x2e72] = 0xffa6, [0x2e73] = 0xffa7, [0x2e74] = 0xffa8, [0x2e75] = 0xffa9,
+- [0x2e76] = 0xffaa, [0x2e77] = 0xffab, [0x2e78] = 0xffac, [0x2e79] = 0xffad,
+- [0x2e7a] = 0xffae, [0x2e7b] = 0xffaf, [0x2e7c] = 0xffb0, [0x2e7d] = 0xffb1,
+- [0x2e7e] = 0xffb2, [0x2e7f] = 0xffb3, [0x2e80] = 0xffb4, [0x2e81] = 0xffb5,
+- [0x2e82] = 0xffb6, [0x2e83] = 0xffb7, [0x2e84] = 0xffb8, [0x2e85] = 0xffb9,
+- [0x2e86] = 0xffba, [0x2e87] = 0xffbb, [0x2e88] = 0xffbc, [0x2e89] = 0xffbd,
+- [0x2e8a] = 0xffbe, [0x2e8b] = 0xffbf, [0x2e8c] = 0xffc0, [0x2e8d] = 0xffc1,
+- [0x2e8e] = 0xffc2, [0x2e8f] = 0xffc3, [0x2e90] = 0xffc4, [0x2e91] = 0xffc5,
+- [0x2e92] = 0xffc6, [0x2e93] = 0xffc7, [0x2e94] = 0xffc8, [0x2e95] = 0xffc9,
+- [0x2e96] = 0xffca, [0x2e97] = 0xffcb, [0x2e98] = 0xffcc, [0x2e99] = 0xffcd,
+- [0x2e9a] = 0xffce, [0x2e9b] = 0xffcf, [0x2e9c] = 0xffd0, [0x2e9d] = 0xffd1,
+- [0x2e9e] = 0xffd2, [0x2e9f] = 0xffd3, [0x2ea0] = 0xffd4, [0x2ea1] = 0xffd5,
+- [0x2ea2] = 0xffd6, [0x2ea3] = 0xffd7, [0x2ea4] = 0xffd8, [0x2ea5] = 0xffd9,
+- [0x2ea6] = 0xffda, [0x2ea7] = 0xffdb, [0x2ea8] = 0xffdc, [0x2ea9] = 0xffdd,
+- [0x2eaa] = 0xffde, [0x2eab] = 0xffdf,
++ [0x2d6c] = 0xfe0e, [0x2d6d] = 0xfe0f, [0x2d6e] = 0xe78d, [0x2d6f] = 0xe78f,
++ [0x2d70] = 0xe78e, [0x2d71] = 0xe790, [0x2d72] = 0xe791, [0x2d73] = 0xe792,
++ [0x2d74] = 0xe793, [0x2d75] = 0xe794, [0x2d76] = 0xe795, [0x2d77] = 0xe796,
++ [0x2d78] = 0xfe1a, [0x2d79] = 0xfe1b, [0x2d7a] = 0xfe1c, [0x2d7b] = 0xfe1d,
++ [0x2d7c] = 0xfe1e, [0x2d7d] = 0xfe1f, [0x2d7e] = 0xfe20, [0x2d7f] = 0xfe21,
++ [0x2d80] = 0xfe22, [0x2d81] = 0xfe23, [0x2d82] = 0xfe24, [0x2d83] = 0xfe25,
++ [0x2d84] = 0xfe26, [0x2d85] = 0xfe27, [0x2d86] = 0xfe28, [0x2d87] = 0xfe29,
++ [0x2d88] = 0xfe2a, [0x2d89] = 0xfe2b, [0x2d8a] = 0xfe2c, [0x2d8b] = 0xfe2d,
++ [0x2d8c] = 0xfe2e, [0x2d8d] = 0xfe2f, [0x2d8e] = 0xfe32, [0x2d8f] = 0xfe45,
++ [0x2d90] = 0xfe46, [0x2d91] = 0xfe47, [0x2d92] = 0xfe48, [0x2d93] = 0xfe53,
++ [0x2d94] = 0xfe58, [0x2d95] = 0xfe67, [0x2d96] = 0xfe6c, [0x2d97] = 0xfe6d,
++ [0x2d98] = 0xfe6e, [0x2d99] = 0xfe6f, [0x2d9a] = 0xfe70, [0x2d9b] = 0xfe71,
++ [0x2d9c] = 0xfe72, [0x2d9d] = 0xfe73, [0x2d9e] = 0xfe74, [0x2d9f] = 0xfe75,
++ [0x2da0] = 0xfe76, [0x2da1] = 0xfe77, [0x2da2] = 0xfe78, [0x2da3] = 0xfe79,
++ [0x2da4] = 0xfe7a, [0x2da5] = 0xfe7b, [0x2da6] = 0xfe7c, [0x2da7] = 0xfe7d,
++ [0x2da8] = 0xfe7e, [0x2da9] = 0xfe7f, [0x2daa] = 0xfe80, [0x2dab] = 0xfe81,
++ [0x2dac] = 0xfe82, [0x2dad] = 0xfe83, [0x2dae] = 0xfe84, [0x2daf] = 0xfe85,
++ [0x2db0] = 0xfe86, [0x2db1] = 0xfe87, [0x2db2] = 0xfe88, [0x2db3] = 0xfe89,
++ [0x2db4] = 0xfe8a, [0x2db5] = 0xfe8b, [0x2db6] = 0xfe8c, [0x2db7] = 0xfe8d,
++ [0x2db8] = 0xfe8e, [0x2db9] = 0xfe8f, [0x2dba] = 0xfe90, [0x2dbb] = 0xfe91,
++ [0x2dbc] = 0xfe92, [0x2dbd] = 0xfe93, [0x2dbe] = 0xfe94, [0x2dbf] = 0xfe95,
++ [0x2dc0] = 0xfe96, [0x2dc1] = 0xfe97, [0x2dc2] = 0xfe98, [0x2dc3] = 0xfe99,
++ [0x2dc4] = 0xfe9a, [0x2dc5] = 0xfe9b, [0x2dc6] = 0xfe9c, [0x2dc7] = 0xfe9d,
++ [0x2dc8] = 0xfe9e, [0x2dc9] = 0xfe9f, [0x2dca] = 0xfea0, [0x2dcb] = 0xfea1,
++ [0x2dcc] = 0xfea2, [0x2dcd] = 0xfea3, [0x2dce] = 0xfea4, [0x2dcf] = 0xfea5,
++ [0x2dd0] = 0xfea6, [0x2dd1] = 0xfea7, [0x2dd2] = 0xfea8, [0x2dd3] = 0xfea9,
++ [0x2dd4] = 0xfeaa, [0x2dd5] = 0xfeab, [0x2dd6] = 0xfeac, [0x2dd7] = 0xfead,
++ [0x2dd8] = 0xfeae, [0x2dd9] = 0xfeaf, [0x2dda] = 0xfeb0, [0x2ddb] = 0xfeb1,
++ [0x2ddc] = 0xfeb2, [0x2ddd] = 0xfeb3, [0x2dde] = 0xfeb4, [0x2ddf] = 0xfeb5,
++ [0x2de0] = 0xfeb6, [0x2de1] = 0xfeb7, [0x2de2] = 0xfeb8, [0x2de3] = 0xfeb9,
++ [0x2de4] = 0xfeba, [0x2de5] = 0xfebb, [0x2de6] = 0xfebc, [0x2de7] = 0xfebd,
++ [0x2de8] = 0xfebe, [0x2de9] = 0xfebf, [0x2dea] = 0xfec0, [0x2deb] = 0xfec1,
++ [0x2dec] = 0xfec2, [0x2ded] = 0xfec3, [0x2dee] = 0xfec4, [0x2def] = 0xfec5,
++ [0x2df0] = 0xfec6, [0x2df1] = 0xfec7, [0x2df2] = 0xfec8, [0x2df3] = 0xfec9,
++ [0x2df4] = 0xfeca, [0x2df5] = 0xfecb, [0x2df6] = 0xfecc, [0x2df7] = 0xfecd,
++ [0x2df8] = 0xfece, [0x2df9] = 0xfecf, [0x2dfa] = 0xfed0, [0x2dfb] = 0xfed1,
++ [0x2dfc] = 0xfed2, [0x2dfd] = 0xfed3, [0x2dfe] = 0xfed4, [0x2dff] = 0xfed5,
++ [0x2e00] = 0xfed6, [0x2e01] = 0xfed7, [0x2e02] = 0xfed8, [0x2e03] = 0xfed9,
++ [0x2e04] = 0xfeda, [0x2e05] = 0xfedb, [0x2e06] = 0xfedc, [0x2e07] = 0xfedd,
++ [0x2e08] = 0xfede, [0x2e09] = 0xfedf, [0x2e0a] = 0xfee0, [0x2e0b] = 0xfee1,
++ [0x2e0c] = 0xfee2, [0x2e0d] = 0xfee3, [0x2e0e] = 0xfee4, [0x2e0f] = 0xfee5,
++ [0x2e10] = 0xfee6, [0x2e11] = 0xfee7, [0x2e12] = 0xfee8, [0x2e13] = 0xfee9,
++ [0x2e14] = 0xfeea, [0x2e15] = 0xfeeb, [0x2e16] = 0xfeec, [0x2e17] = 0xfeed,
++ [0x2e18] = 0xfeee, [0x2e19] = 0xfeef, [0x2e1a] = 0xfef0, [0x2e1b] = 0xfef1,
++ [0x2e1c] = 0xfef2, [0x2e1d] = 0xfef3, [0x2e1e] = 0xfef4, [0x2e1f] = 0xfef5,
++ [0x2e20] = 0xfef6, [0x2e21] = 0xfef7, [0x2e22] = 0xfef8, [0x2e23] = 0xfef9,
++ [0x2e24] = 0xfefa, [0x2e25] = 0xfefb, [0x2e26] = 0xfefc, [0x2e27] = 0xfefd,
++ [0x2e28] = 0xfefe, [0x2e29] = 0xfeff, [0x2e2a] = 0xff00, [0x2e2b] = 0xff5f,
++ [0x2e2c] = 0xff60, [0x2e2d] = 0xff61, [0x2e2e] = 0xff62, [0x2e2f] = 0xff63,
++ [0x2e30] = 0xff64, [0x2e31] = 0xff65, [0x2e32] = 0xff66, [0x2e33] = 0xff67,
++ [0x2e34] = 0xff68, [0x2e35] = 0xff69, [0x2e36] = 0xff6a, [0x2e37] = 0xff6b,
++ [0x2e38] = 0xff6c, [0x2e39] = 0xff6d, [0x2e3a] = 0xff6e, [0x2e3b] = 0xff6f,
++ [0x2e3c] = 0xff70, [0x2e3d] = 0xff71, [0x2e3e] = 0xff72, [0x2e3f] = 0xff73,
++ [0x2e40] = 0xff74, [0x2e41] = 0xff75, [0x2e42] = 0xff76, [0x2e43] = 0xff77,
++ [0x2e44] = 0xff78, [0x2e45] = 0xff79, [0x2e46] = 0xff7a, [0x2e47] = 0xff7b,
++ [0x2e48] = 0xff7c, [0x2e49] = 0xff7d, [0x2e4a] = 0xff7e, [0x2e4b] = 0xff7f,
++ [0x2e4c] = 0xff80, [0x2e4d] = 0xff81, [0x2e4e] = 0xff82, [0x2e4f] = 0xff83,
++ [0x2e50] = 0xff84, [0x2e51] = 0xff85, [0x2e52] = 0xff86, [0x2e53] = 0xff87,
++ [0x2e54] = 0xff88, [0x2e55] = 0xff89, [0x2e56] = 0xff8a, [0x2e57] = 0xff8b,
++ [0x2e58] = 0xff8c, [0x2e59] = 0xff8d, [0x2e5a] = 0xff8e, [0x2e5b] = 0xff8f,
++ [0x2e5c] = 0xff90, [0x2e5d] = 0xff91, [0x2e5e] = 0xff92, [0x2e5f] = 0xff93,
++ [0x2e60] = 0xff94, [0x2e61] = 0xff95, [0x2e62] = 0xff96, [0x2e63] = 0xff97,
++ [0x2e64] = 0xff98, [0x2e65] = 0xff99, [0x2e66] = 0xff9a, [0x2e67] = 0xff9b,
++ [0x2e68] = 0xff9c, [0x2e69] = 0xff9d, [0x2e6a] = 0xff9e, [0x2e6b] = 0xff9f,
++ [0x2e6c] = 0xffa0, [0x2e6d] = 0xffa1, [0x2e6e] = 0xffa2, [0x2e6f] = 0xffa3,
++ [0x2e70] = 0xffa4, [0x2e71] = 0xffa5, [0x2e72] = 0xffa6, [0x2e73] = 0xffa7,
++ [0x2e74] = 0xffa8, [0x2e75] = 0xffa9, [0x2e76] = 0xffaa, [0x2e77] = 0xffab,
++ [0x2e78] = 0xffac, [0x2e79] = 0xffad, [0x2e7a] = 0xffae, [0x2e7b] = 0xffaf,
++ [0x2e7c] = 0xffb0, [0x2e7d] = 0xffb1, [0x2e7e] = 0xffb2, [0x2e7f] = 0xffb3,
++ [0x2e80] = 0xffb4, [0x2e81] = 0xffb5, [0x2e82] = 0xffb6, [0x2e83] = 0xffb7,
++ [0x2e84] = 0xffb8, [0x2e85] = 0xffb9, [0x2e86] = 0xffba, [0x2e87] = 0xffbb,
++ [0x2e88] = 0xffbc, [0x2e89] = 0xffbd, [0x2e8a] = 0xffbe, [0x2e8b] = 0xffbf,
++ [0x2e8c] = 0xffc0, [0x2e8d] = 0xffc1, [0x2e8e] = 0xffc2, [0x2e8f] = 0xffc3,
++ [0x2e90] = 0xffc4, [0x2e91] = 0xffc5, [0x2e92] = 0xffc6, [0x2e93] = 0xffc7,
++ [0x2e94] = 0xffc8, [0x2e95] = 0xffc9, [0x2e96] = 0xffca, [0x2e97] = 0xffcb,
++ [0x2e98] = 0xffcc, [0x2e99] = 0xffcd, [0x2e9a] = 0xffce, [0x2e9b] = 0xffcf,
++ [0x2e9c] = 0xffd0, [0x2e9d] = 0xffd1, [0x2e9e] = 0xffd2, [0x2e9f] = 0xffd3,
++ [0x2ea0] = 0xffd4, [0x2ea1] = 0xffd5, [0x2ea2] = 0xffd6, [0x2ea3] = 0xffd7,
++ [0x2ea4] = 0xffd8, [0x2ea5] = 0xffd9, [0x2ea6] = 0xffda, [0x2ea7] = 0xffdb,
++ [0x2ea8] = 0xffdc, [0x2ea9] = 0xffdd, [0x2eaa] = 0xffde, [0x2eab] = 0xffdf,
+ };
+
+ /* Table for UCS-4 -> GB18030, for the range U+0080..U+9FBB.
+@@ -23448,71 +23453,79 @@ static const unsigned char __ucs_to_gb18030_tab2[][2] =
+ [0x0783] = "\xa5\xfd", [0x0784] = "\xa5\xfe", [0x0785] = "\xa6\xb9",
+ [0x0786] = "\xa6\xba", [0x0787] = "\xa6\xbb", [0x0788] = "\xa6\xbc",
+ [0x0789] = "\xa6\xbd", [0x078a] = "\xa6\xbe", [0x078b] = "\xa6\xbf",
+- [0x078c] = "\xa6\xc0", [0x0797] = "\xa6\xf6", [0x0798] = "\xa6\xf7",
+- [0x0799] = "\xa6\xf8", [0x079a] = "\xa6\xf9", [0x079b] = "\xa6\xfa",
+- [0x079c] = "\xa6\xfb", [0x079d] = "\xa6\xfc", [0x079e] = "\xa6\xfd",
+- [0x079f] = "\xa6\xfe", [0x07a0] = "\xa7\xc2", [0x07a1] = "\xa7\xc3",
+- [0x07a2] = "\xa7\xc4", [0x07a3] = "\xa7\xc5", [0x07a4] = "\xa7\xc6",
+- [0x07a5] = "\xa7\xc7", [0x07a6] = "\xa7\xc8", [0x07a7] = "\xa7\xc9",
+- [0x07a8] = "\xa7\xca", [0x07a9] = "\xa7\xcb", [0x07aa] = "\xa7\xcc",
+- [0x07ab] = "\xa7\xcd", [0x07ac] = "\xa7\xce", [0x07ad] = "\xa7\xcf",
+- [0x07ae] = "\xa7\xd0", [0x07af] = "\xa7\xf2", [0x07b0] = "\xa7\xf3",
+- [0x07b1] = "\xa7\xf4", [0x07b2] = "\xa7\xf5", [0x07b3] = "\xa7\xf6",
+- [0x07b4] = "\xa7\xf7", [0x07b5] = "\xa7\xf8", [0x07b6] = "\xa7\xf9",
+- [0x07b7] = "\xa7\xfa", [0x07b8] = "\xa7\xfb", [0x07b9] = "\xa7\xfc",
+- [0x07ba] = "\xa7\xfd", [0x07bb] = "\xa7\xfe", [0x07bc] = "\xa8\x96",
+- [0x07bd] = "\xa8\x97", [0x07be] = "\xa8\x98", [0x07bf] = "\xa8\x99",
+- [0x07c0] = "\xa8\x9a", [0x07c1] = "\xa8\x9b", [0x07c2] = "\xa8\x9c",
+- [0x07c3] = "\xa8\x9d", [0x07c4] = "\xa8\x9e", [0x07c5] = "\xa8\x9f",
+- [0x07c6] = "\xa8\xa0", [0x07c7] = "\x00\x01", [0x07c8] = "\x65\x9e",
+- [0x07c9] = "\xa8\xc1", [0x07ca] = "\xa8\xc2", [0x07cb] = "\xa8\xc3",
+- [0x07cc] = "\xa8\xc4", [0x07cd] = "\xa8\xea", [0x07ce] = "\xa8\xeb",
+- [0x07cf] = "\xa8\xec", [0x07d0] = "\xa8\xed", [0x07d1] = "\xa8\xee",
+- [0x07d2] = "\xa8\xef", [0x07d3] = "\xa8\xf0", [0x07d4] = "\xa8\xf1",
+- [0x07d5] = "\xa8\xf2", [0x07d6] = "\xa8\xf3", [0x07d7] = "\xa8\xf4",
+- [0x07d8] = "\xa8\xf5", [0x07d9] = "\xa8\xf6", [0x07da] = "\xa8\xf7",
+- [0x07db] = "\xa8\xf8", [0x07dc] = "\xa8\xf9", [0x07dd] = "\xa8\xfa",
+- [0x07de] = "\xa8\xfb", [0x07df] = "\xa8\xfc", [0x07e0] = "\xa8\xfd",
+- [0x07e1] = "\xa8\xfe", [0x07e2] = "\xa9\x58", [0x07e3] = "\xa9\x5b",
+- [0x07e4] = "\xa9\x5d", [0x07e5] = "\xa9\x5e", [0x07e6] = "\xa9\x5f",
+- [0x07e7] = "\x65\x9f", [0x07e8] = "\x65\xa0", [0x07e9] = "\x65\xa1",
+- [0x07ea] = "\x65\xa2", [0x07eb] = "\x65\xa3", [0x07ec] = "\x65\xa4",
+- [0x07ed] = "\x65\xa5", [0x07ee] = "\x65\xa6", [0x07ef] = "\x65\xa7",
+- [0x07f0] = "\x65\xa8", [0x07f1] = "\x65\xa9", [0x07f2] = "\x65\xaa",
+- [0x07f3] = "\x65\xab", [0x07f4] = "\xa9\x97", [0x07f5] = "\xa9\x98",
+- [0x07f6] = "\xa9\x99", [0x07f7] = "\xa9\x9a", [0x07f8] = "\xa9\x9b",
+- [0x07f9] = "\xa9\x9c", [0x07fa] = "\xa9\x9d", [0x07fb] = "\xa9\x9e",
+- [0x07fc] = "\xa9\x9f", [0x07fd] = "\xa9\xa0", [0x07fe] = "\xa9\xa1",
+- [0x07ff] = "\xa9\xa2", [0x0800] = "\xa9\xa3", [0x0801] = "\xa9\xf0",
+- [0x0802] = "\xa9\xf1", [0x0803] = "\xa9\xf2", [0x0804] = "\xa9\xf3",
+- [0x0805] = "\xa9\xf4", [0x0806] = "\xa9\xf5", [0x0807] = "\xa9\xf6",
+- [0x0808] = "\xa9\xf7", [0x0809] = "\xa9\xf8", [0x080a] = "\xa9\xf9",
+- [0x080b] = "\xa9\xfa", [0x080c] = "\xa9\xfb", [0x080d] = "\xa9\xfc",
+- [0x080e] = "\xa9\xfd", [0x080f] = "\xa9\xfe", [0x0810] = "\xd7\xfa",
+- [0x0811] = "\xd7\xfb", [0x0812] = "\xd7\xfc", [0x0813] = "\xd7\xfd",
+- [0x0814] = "\xd7\xfe", [0x0815] = "\x65\xac", [0x0819] = "\x65\xad",
+- [0x081a] = "\x65\xae", [0x081b] = "\x65\xaf", [0x081c] = "\x65\xb0",
+- [0x081d] = "\x65\xb1", [0x081f] = "\x65\xb2", [0x0820] = "\x65\xb3",
+- [0x0821] = "\x65\xb4", [0x0822] = "\x65\xb5", [0x0823] = "\x65\xb6",
+- [0x0824] = "\x65\xb7", [0x0825] = "\x65\xb8", [0x0827] = "\x65\xb9",
++ [0x078c] = "\xa6\xc0", [0x078d] = "\x7b\x84", [0x078e] = "\x7b\x86",
++ [0x078f] = "\x7b\x85", [0x0790] = "\x7b\x87", [0x0791] = "\x7b\x88",
++ [0x0792] = "\x7b\x89", [0x0793] = "\x7b\x8a", [0x0794] = "\x7b\x8b",
++ [0x0795] = "\x7b\x8c", [0x0796] = "\x7b\x8d", [0x0797] = "\xa6\xf6",
++ [0x0798] = "\xa6\xf7", [0x0799] = "\xa6\xf8", [0x079a] = "\xa6\xf9",
++ [0x079b] = "\xa6\xfa", [0x079c] = "\xa6\xfb", [0x079d] = "\xa6\xfc",
++ [0x079e] = "\xa6\xfd", [0x079f] = "\xa6\xfe", [0x07a0] = "\xa7\xc2",
++ [0x07a1] = "\xa7\xc3", [0x07a2] = "\xa7\xc4", [0x07a3] = "\xa7\xc5",
++ [0x07a4] = "\xa7\xc6", [0x07a5] = "\xa7\xc7", [0x07a6] = "\xa7\xc8",
++ [0x07a7] = "\xa7\xc9", [0x07a8] = "\xa7\xca", [0x07a9] = "\xa7\xcb",
++ [0x07aa] = "\xa7\xcc", [0x07ab] = "\xa7\xcd", [0x07ac] = "\xa7\xce",
++ [0x07ad] = "\xa7\xcf", [0x07ae] = "\xa7\xd0", [0x07af] = "\xa7\xf2",
++ [0x07b0] = "\xa7\xf3", [0x07b1] = "\xa7\xf4", [0x07b2] = "\xa7\xf5",
++ [0x07b3] = "\xa7\xf6", [0x07b4] = "\xa7\xf7", [0x07b5] = "\xa7\xf8",
++ [0x07b6] = "\xa7\xf9", [0x07b7] = "\xa7\xfa", [0x07b8] = "\xa7\xfb",
++ [0x07b9] = "\xa7\xfc", [0x07ba] = "\xa7\xfd", [0x07bb] = "\xa7\xfe",
++ [0x07bc] = "\xa8\x96", [0x07bd] = "\xa8\x97", [0x07be] = "\xa8\x98",
++ [0x07bf] = "\xa8\x99", [0x07c0] = "\xa8\x9a", [0x07c1] = "\xa8\x9b",
++ [0x07c2] = "\xa8\x9c", [0x07c3] = "\xa8\x9d", [0x07c4] = "\xa8\x9e",
++ [0x07c5] = "\xa8\x9f", [0x07c6] = "\xa8\xa0", [0x07c7] = "\x00\x01",
++ [0x07c8] = "\x65\x9e", [0x07c9] = "\xa8\xc1", [0x07ca] = "\xa8\xc2",
++ [0x07cb] = "\xa8\xc3", [0x07cc] = "\xa8\xc4", [0x07cd] = "\xa8\xea",
++ [0x07ce] = "\xa8\xeb", [0x07cf] = "\xa8\xec", [0x07d0] = "\xa8\xed",
++ [0x07d1] = "\xa8\xee", [0x07d2] = "\xa8\xef", [0x07d3] = "\xa8\xf0",
++ [0x07d4] = "\xa8\xf1", [0x07d5] = "\xa8\xf2", [0x07d6] = "\xa8\xf3",
++ [0x07d7] = "\xa8\xf4", [0x07d8] = "\xa8\xf5", [0x07d9] = "\xa8\xf6",
++ [0x07da] = "\xa8\xf7", [0x07db] = "\xa8\xf8", [0x07dc] = "\xa8\xf9",
++ [0x07dd] = "\xa8\xfa", [0x07de] = "\xa8\xfb", [0x07df] = "\xa8\xfc",
++ [0x07e0] = "\xa8\xfd", [0x07e1] = "\xa8\xfe", [0x07e2] = "\xa9\x58",
++ [0x07e3] = "\xa9\x5b", [0x07e4] = "\xa9\x5d", [0x07e5] = "\xa9\x5e",
++ [0x07e6] = "\xa9\x5f", [0x07e7] = "\x65\x9f", [0x07e8] = "\x65\xa0",
++ [0x07e9] = "\x65\xa1", [0x07ea] = "\x65\xa2", [0x07eb] = "\x65\xa3",
++ [0x07ec] = "\x65\xa4", [0x07ed] = "\x65\xa5", [0x07ee] = "\x65\xa6",
++ [0x07ef] = "\x65\xa7", [0x07f0] = "\x65\xa8", [0x07f1] = "\x65\xa9",
++ [0x07f2] = "\x65\xaa", [0x07f3] = "\x65\xab", [0x07f4] = "\xa9\x97",
++ [0x07f5] = "\xa9\x98", [0x07f6] = "\xa9\x99", [0x07f7] = "\xa9\x9a",
++ [0x07f8] = "\xa9\x9b", [0x07f9] = "\xa9\x9c", [0x07fa] = "\xa9\x9d",
++ [0x07fb] = "\xa9\x9e", [0x07fc] = "\xa9\x9f", [0x07fd] = "\xa9\xa0",
++ [0x07fe] = "\xa9\xa1", [0x07ff] = "\xa9\xa2", [0x0800] = "\xa9\xa3",
++ [0x0801] = "\xa9\xf0", [0x0802] = "\xa9\xf1", [0x0803] = "\xa9\xf2",
++ [0x0804] = "\xa9\xf3", [0x0805] = "\xa9\xf4", [0x0806] = "\xa9\xf5",
++ [0x0807] = "\xa9\xf6", [0x0808] = "\xa9\xf7", [0x0809] = "\xa9\xf8",
++ [0x080a] = "\xa9\xf9", [0x080b] = "\xa9\xfa", [0x080c] = "\xa9\xfb",
++ [0x080d] = "\xa9\xfc", [0x080e] = "\xa9\xfd", [0x080f] = "\xa9\xfe",
++ [0x0810] = "\xd7\xfa", [0x0811] = "\xd7\xfb", [0x0812] = "\xd7\xfc",
++ [0x0813] = "\xd7\xfd", [0x0814] = "\xd7\xfe", [0x0815] = "\x65\xac",
++ [0x0816] = "\xfe\x51", [0x0817] = "\xfe\x52", [0x0818] = "\xfe\x53",
++ [0x0819] = "\x65\xad", [0x081a] = "\x65\xae", [0x081b] = "\x65\xaf",
++ [0x081c] = "\x65\xb0", [0x081d] = "\x65\xb1", [0x081e] = "\x2d\x51",
++ [0x081f] = "\x65\xb2", [0x0820] = "\x65\xb3", [0x0821] = "\x65\xb4",
++ [0x0822] = "\x65\xb5", [0x0823] = "\x65\xb6", [0x0824] = "\x65\xb7",
++ [0x0825] = "\x65\xb8", [0x0826] = "\x2d\x52", [0x0827] = "\x65\xb9",
+ [0x0828] = "\x65\xba", [0x0829] = "\x65\xbb", [0x082a] = "\x65\xbc",
+- [0x082d] = "\x65\xbd", [0x082e] = "\x65\xbe", [0x082f] = "\x65\xbf",
+- [0x0830] = "\x65\xc0", [0x0833] = "\x65\xc1", [0x0834] = "\x65\xc2",
+- [0x0835] = "\x65\xc3", [0x0836] = "\x65\xc4", [0x0837] = "\x65\xc5",
+- [0x0838] = "\x65\xc6", [0x0839] = "\x65\xc7", [0x083a] = "\x65\xc8",
+- [0x083c] = "\x65\xc9", [0x083d] = "\x65\xca", [0x083e] = "\x65\xcb",
+- [0x083f] = "\x65\xcc", [0x0840] = "\x65\xcd", [0x0841] = "\x65\xce",
+- [0x0842] = "\x65\xcf", [0x0844] = "\x65\xd0", [0x0845] = "\x65\xd1",
++ [0x082b] = "\x2d\x53", [0x082c] = "\x2d\x54", [0x082d] = "\x65\xbd",
++ [0x082e] = "\x65\xbe", [0x082f] = "\x65\xbf", [0x0830] = "\x65\xc0",
++ [0x0831] = "\xfe\x6c", [0x0832] = "\x2d\x55", [0x0833] = "\x65\xc1",
++ [0x0834] = "\x65\xc2", [0x0835] = "\x65\xc3", [0x0836] = "\x65\xc4",
++ [0x0837] = "\x65\xc5", [0x0838] = "\x65\xc6", [0x0839] = "\x65\xc7",
++ [0x083a] = "\x65\xc8", [0x083b] = "\xfe\x76", [0x083c] = "\x65\xc9",
++ [0x083d] = "\x65\xca", [0x083e] = "\x65\xcb", [0x083f] = "\x65\xcc",
++ [0x0840] = "\x65\xcd", [0x0841] = "\x65\xce", [0x0842] = "\x65\xcf",
++ [0x0843] = "\x2d\x56", [0x0844] = "\x65\xd0", [0x0845] = "\x65\xd1",
+ [0x0846] = "\x65\xd2", [0x0847] = "\x65\xd3", [0x0848] = "\x65\xd4",
+ [0x0849] = "\x65\xd5", [0x084a] = "\x65\xd6", [0x084b] = "\x65\xd7",
+ [0x084c] = "\x65\xd8", [0x084d] = "\x65\xd9", [0x084e] = "\x65\xda",
+ [0x084f] = "\x65\xdb", [0x0850] = "\x65\xdc", [0x0851] = "\x65\xdd",
+- [0x0852] = "\x65\xde", [0x0853] = "\x65\xdf", [0x0856] = "\x65\xe0",
+- [0x0857] = "\x65\xe1", [0x0858] = "\x65\xe2", [0x0859] = "\x65\xe3",
+- [0x085a] = "\x65\xe4", [0x085b] = "\x65\xe5", [0x085c] = "\x65\xe6",
+- [0x085d] = "\x65\xe7", [0x085e] = "\x65\xe8", [0x085f] = "\x65\xe9",
+- [0x0860] = "\x65\xea", [0x0861] = "\x65\xeb", [0x0862] = "\x65\xec",
+- [0x0863] = "\x65\xed", [0x0865] = "\xfd\x9c", [0x0866] = "\x76\xb5",
++ [0x0852] = "\x65\xde", [0x0853] = "\x65\xdf", [0x0854] = "\x2d\x57",
++ [0x0855] = "\xfe\x91", [0x0856] = "\x65\xe0", [0x0857] = "\x65\xe1",
++ [0x0858] = "\x65\xe2", [0x0859] = "\x65\xe3", [0x085a] = "\x65\xe4",
++ [0x085b] = "\x65\xe5", [0x085c] = "\x65\xe6", [0x085d] = "\x65\xe7",
++ [0x085e] = "\x65\xe8", [0x085f] = "\x65\xe9", [0x0860] = "\x65\xea",
++ [0x0861] = "\x65\xeb", [0x0862] = "\x65\xec", [0x0863] = "\x65\xed",
++ [0x0864] = "\x2d\x58", [0x0865] = "\xfd\x9c", [0x0866] = "\x76\xb5",
+ [0x0867] = "\x76\xb6", [0x0868] = "\x76\xb7", [0x0869] = "\x76\xb8",
+ [0x086a] = "\x76\xb9", [0x086b] = "\x76\xba", [0x086c] = "\x76\xbb",
+ [0x086d] = "\x76\xbc", [0x086e] = "\x76\xbd", [0x086f] = "\x76\xbe",
+@@ -24222,24 +24235,8 @@ static const unsigned char __ucs_to_gb18030_tab2[][2] =
+ || (ch = __twobyte_to_ucs[idx], \
+ ch == 0 && *inptr != '\0')) \
+ { \
+- /* Handle a few special cases. */ \
+- if (idx == 0x5dd1) \
+- ch = 0x20087; \
+- else if (idx == 0x5dd2) \
+- ch = 0x20089; \
+- else if (idx == 0x5dd3) \
+- ch = 0x200cc; \
+- else if (idx == 0x5dec) \
+- ch = 0x215D7; \
+- else if (idx == 0x5df6) \
+- ch = 0x2298F; \
+- else if (idx == 0x5e11) \
+- ch = 0x241FE; \
+- else \
+- { \
+- /* This is an illegal character. */ \
+- STANDARD_FROM_LOOP_ERR_HANDLER (2); \
+- } \
++ /* This is an illegal character. */ \
++ STANDARD_FROM_LOOP_ERR_HANDLER (2); \
+ } \
+ \
+ inptr += 2; \
+@@ -24331,17 +24328,35 @@ static const unsigned char __ucs_to_gb18030_tab2[][2] =
+ len = 4; \
+ } \
+ else if (ch == 0x20087) \
+- cp = (const unsigned char *) "\xfe\x51"; \
++ { \
++ idx = 0x3E2CF; \
++ len = 4; \
++ } \
+ else if (ch == 0x20089) \
+- cp = (const unsigned char *) "\xfe\x52"; \
++ { \
++ idx = 0x3E2D1; \
++ len = 4; \
++ } \
+ else if (ch == 0x200CC) \
+- cp = (const unsigned char *) "\xfe\x53"; \
++ { \
++ idx = 0x3E314; \
++ len = 4; \
++ } \
+ else if (ch == 0x215d7) \
+- cp = (const unsigned char *) "\xfe\x6c"; \
++ { \
++ idx = 0x3F81F; \
++ len = 4; \
++ } \
+ else if (ch == 0x2298F) \
+- cp = (const unsigned char *) "\xfe\x76"; \
++ { \
++ idx = 0x40BD7; \
++ len = 4; \
++ } \
+ else if (ch == 0x241FE) \
+- cp = (const unsigned char *) "\xfe\x91"; \
++ { \
++ idx = 0x42446; \
++ len = 4; \
++ } \
+ else if (ch >= 0x10000 && ch <= 0x10FFFF) \
+ { \
+ idx = ch + 0x1E248; \
+diff --git a/iconvdata/tst-table-from.c b/iconvdata/tst-table-from.c
+index 9ad1f44e..c881c86b 100644
+--- a/iconvdata/tst-table-from.c
++++ b/iconvdata/tst-table-from.c
+@@ -195,10 +195,9 @@ main (int argc, char *argv[])
+ exit (1);
+ }
+
+- /* When testing UTF-8 or GB18030, stop at 0x10000, otherwise the output
++ /* When testing UTF-8, stop at 0x10000, otherwise the output
+ file gets too big. */
+- bmp_only = (strcmp (charset, "UTF-8") == 0
+- || strcmp (charset, "GB18030") == 0);
++ bmp_only = (strcmp (charset, "UTF-8") == 0);
+ search_depth = (strcmp (charset, "UTF-8") == 0 ? 3 : 4);
+
+ {
+diff --git a/iconvdata/tst-table-to.c b/iconvdata/tst-table-to.c
+index 6f0aa29c..8d097527 100644
+--- a/iconvdata/tst-table-to.c
++++ b/iconvdata/tst-table-to.c
+@@ -33,6 +33,7 @@ main (int argc, char *argv[])
+ const char *charset;
+ iconv_t cd;
+ int bmp_only;
++ int no_tags;
+
+ if (argc != 2)
+ {
+@@ -48,16 +49,19 @@ main (int argc, char *argv[])
+ return 1;
+ }
+
+- /* When testing UTF-8 or GB18030, stop at 0x10000, otherwise the output
++ /* When testing UTF-8, stop at 0x10000, otherwise the output
+ file gets too big. */
+- bmp_only = (strcmp (charset, "UTF-8") == 0
++ bmp_only = (strcmp (charset, "UTF-8") == 0);
++ /* When testing any encoding other than UTF-8 or GB18030, stop at 0xE0000,
++ because the conversion drops Unicode tag characters (range
++ U+E0000..U+E007F). */
++ no_tags = !(strcmp (charset, "UTF-8") == 0
+ || strcmp (charset, "GB18030") == 0);
+
+ {
+ unsigned int i;
+ unsigned char buf[10];
+-
+- for (i = 0; i < (bmp_only ? 0x10000 : 0x30000); i++)
++ for (i = 0; i < (bmp_only ? 0x10000 : no_tags ? 0xE0000 : 0x110000); i++)
+ {
+ unsigned char in[6];
+ unsigned int incount =
+diff --git a/iconvdata/tst-table.sh b/iconvdata/tst-table.sh
+index 04c06136..3c6927ee 100755
+--- a/iconvdata/tst-table.sh
++++ b/iconvdata/tst-table.sh
+@@ -38,7 +38,8 @@ set -e
+ < ../localedata/charmaps/${charmap:-$charset} \
+ > ${objpfx}tst-${charset}.charmap.table
+ # When the charset is GB18030, truncate this table because for this encoding,
+-# the tst-table-from and tst-table-to programs scan the Unicode BMP only.
++# the charmap contains ranges (<Unnnn>..<Ummmm> notation), which the
++# tst-table-charmap.sh script does not grok.
+ if test ${charset} = GB18030; then
+ grep '0x....$' < ${objpfx}tst-${charset}.charmap.table \
+ > ${objpfx}tst-${charset}.truncated.table
+@@ -74,25 +75,42 @@ diff ${objpfx}tst-${charset}.charmap.table ${objpfx}tst-${charset}.inverse.table
+
+ # Check 1: charmap and iconv forward should be identical, except for
+ # precomposed characters.
+-if test -f ${precomposed}; then
+- cat ${objpfx}tst-${charset}.table ${precomposed} | sort | uniq -u \
+- > ${objpfx}tst-${charset}.tmp.table
+- cmp -s ${objpfx}tst-${charset}.charmap.table ${objpfx}tst-${charset}.tmp.table ||
++{ if test -f ${precomposed}; then
++ cat ${objpfx}tst-${charset}.table ${precomposed} | sort | uniq -u
++ else
++ cat ${objpfx}tst-${charset}.table
++ fi
++} | { if test ${charset} = GB18030; then grep '0x....$'; else cat; fi; } \
++ > ${objpfx}tst-${charset}.tmp1.table
++cmp -s ${objpfx}tst-${charset}.charmap.table ${objpfx}tst-${charset}.tmp1.table ||
+ exit 1
+-else
+- cmp -s ${objpfx}tst-${charset}.charmap.table ${objpfx}tst-${charset}.table ||
+- exit 1
+-fi
+
+ # Check 2: the difference between the charmap and iconv backward.
+-if test -f ${irreversible}; then
+- cat ${objpfx}tst-${charset}.charmap.table ${irreversible} | sort | uniq -u \
+- > ${objpfx}tst-${charset}.tmp.table
+- cmp -s ${objpfx}tst-${charset}.tmp.table ${objpfx}tst-${charset}.inverse.table ||
+- exit 1
+-else
+- cmp -s ${objpfx}tst-${charset}.charmap.table ${objpfx}tst-${charset}.inverse.table ||
++{ if test -f ${irreversible}; then
++ cat ${objpfx}tst-${charset}.charmap.table ${irreversible} | sort | uniq -u
++ else
++ cat ${objpfx}tst-${charset}.charmap.table
++ fi
++} | { if test ${charset} = GB18030; then grep '0x....$'; else cat; fi; } \
++ > ${objpfx}tst-${charset}.tmp2c.table
++cat ${objpfx}tst-${charset}.inverse.table \
++ | { if test ${charset} = GB18030; then grep '0x....$'; else cat; fi; } \
++ > ${objpfx}tst-${charset}.tmp2i.table
++cmp -s ${objpfx}tst-${charset}.tmp2c.table ${objpfx}tst-${charset}.tmp2i.table ||
+ exit 1
++
++# Check 3: the difference between iconv forward and iconv backward. This is
++# necessary only for GB18030, because ${objpfx}tst-${charset}.charmap.table
++# is truncated for this encoding (see above).
++if test ${charset} = GB18030; then
++ { if test -f ${irreversible}; then
++ cat ${objpfx}tst-${charset}.table ${irreversible} | sort | uniq -u
++ else
++ cat ${objpfx}tst-${charset}.table
++ fi
++ } > ${objpfx}tst-${charset}.tmp3.table
++ cmp -s ${objpfx}tst-${charset}.tmp3.table ${objpfx}tst-${charset}.inverse.table ||
++ exit 1
+ fi
+
+ exit 0
+diff --git a/localedata/charmaps/GB18030 b/localedata/charmaps/GB18030
+index ad6728c5..fc3b1d2d 100644
+--- a/localedata/charmaps/GB18030
++++ b/localedata/charmaps/GB18030
+@@ -57234,32 +57234,16 @@ CHARMAP
+ <UE78A> /xa6/xbe <Private Use>
+ <UE78B> /xa6/xbf <Private Use>
+ <UE78C> /xa6/xc0 <Private Use>
+-% The newest GB 18030-2005 standard still uses some private use area
+-% code points. Any implementation which has Unicode 4.1 or newer
+-% support should not use these PUA code points, and instead should
+-% map these entries to their equivalent non-PUA code points. There
+-% are 24 idiograms in GB 18030-2005 which have non-PUA equivalents.
+-% In glibc we only support roundtrip code points, and so must choose
+-% between supporting the old PUA code points, or using the newer
+-% non-PUA code points. We choose to use the non-PUA code points to
+-% be compatible with ICU's similar choice. In choosing the non-PUA
+-% code points we can no longer convert the old PUA code points back
+-% to GB-18030-2005 (technically only fixable if we added support
+-% for non-roundtrip code points e.g. ICU's "fallback mapping").
+-% The recommendation to use the non-PUA code points, where available,
+-% is based on "CJKV Information Processing" 2nd Ed. by Dr. Ken Lunde.
+-%
+-% These 10 PUA mappings use equivalents from <UFE10> to <UFE19>.
+-% <UE78D> /xa6/xd9 <Private Use>
+-% <UE78E> /xa6/xda <Private Use>
+-% <UE78F> /xa6/xdb <Private Use>
+-% <UE790> /xa6/xdc <Private Use>
+-% <UE791> /xa6/xdd <Private Use>
+-% <UE792> /xa6/xde <Private Use>
+-% <UE793> /xa6/xdf <Private Use>
+-% <UE794> /xa6/xec <Private Use>
+-% <UE795> /xa6/xed <Private Use>
+-% <UE796> /xa6/xf3 <Private Use>
++<UE78D> /x84/x31/x82/x36 <Private Use>
++<UE78E> /x84/x31/x82/x38 <Private Use>
++<UE78F> /x84/x31/x82/x37 <Private Use>
++<UE790> /x84/x31/x82/x39 <Private Use>
++<UE791> /x84/x31/x83/x30 <Private Use>
++<UE792> /x84/x31/x83/x31 <Private Use>
++<UE793> /x84/x31/x83/x32 <Private Use>
++<UE794> /x84/x31/x83/x33 <Private Use>
++<UE795> /x84/x31/x83/x34 <Private Use>
++<UE796> /x84/x31/x83/x35 <Private Use>
+ <UE797> /xa6/xf6 <Private Use>
+ <UE798> /xa6/xf7 <Private Use>
+ <UE799> /xa6/xf8 <Private Use>
+@@ -57387,17 +57371,15 @@ CHARMAP
+ <UE813> /xd7/xfd <Private Use>
+ <UE814> /xd7/xfe <Private Use>
+ <UE815> /x83/x36/xc9/x34 <Private Use>
+-% These 3 PUA mappings use equivalents <U20087>, <U20089> and <U200CC>.
+-% <UE816> /xfe/x51 <Private Use>
+-% <UE817> /xfe/x52 <Private Use>
+-% <UE818> /xfe/x53 <Private Use>
++<UE816> /xfe/x51 <Private Use>
++<UE817> /xfe/x52 <Private Use>
++<UE818> /xfe/x53 <Private Use>
+ <UE819> /x83/x36/xc9/x35 <Private Use>
+ <UE81A> /x83/x36/xc9/x36 <Private Use>
+ <UE81B> /x83/x36/xc9/x37 <Private Use>
+ <UE81C> /x83/x36/xc9/x38 <Private Use>
+ <UE81D> /x83/x36/xc9/x39 <Private Use>
+-% This 1 PUA mapping uses the equivalent <U9FB4>.
+-% <UE81E> /xfe/x59 <Private Use>
++<UE81E> /x82/x35/x90/x37 <Private Use>
+ <UE81F> /x83/x36/xca/x30 <Private Use>
+ <UE820> /x83/x36/xca/x31 <Private Use>
+ <UE821> /x83/x36/xca/x32 <Private Use>
+@@ -57405,22 +57387,19 @@ CHARMAP
+ <UE823> /x83/x36/xca/x34 <Private Use>
+ <UE824> /x83/x36/xca/x35 <Private Use>
+ <UE825> /x83/x36/xca/x36 <Private Use>
+-% This 1 PUA mapping uses the equivalent <U9FB5>.
+-% <UE826> /xfe/x61 <Private Use>
++<UE826> /x82/x35/x90/x38 <Private Use>
+ <UE827> /x83/x36/xca/x37 <Private Use>
+ <UE828> /x83/x36/xca/x38 <Private Use>
+ <UE829> /x83/x36/xca/x39 <Private Use>
+ <UE82A> /x83/x36/xcb/x30 <Private Use>
+-% These 2 PUA mappings use the equivalents <U9FB6> and <U9FB7>.
+-% <UE82B> /xfe/x66 <Private Use>
+-% <UE82C> /xfe/x67 <Private Use>
++<UE82B> /x82/x35/x90/x39 <Private Use>
++<UE82C> /x82/x35/x91/x30 <Private Use>
+ <UE82D> /x83/x36/xcb/x31 <Private Use>
+ <UE82E> /x83/x36/xcb/x32 <Private Use>
+ <UE82F> /x83/x36/xcb/x33 <Private Use>
+ <UE830> /x83/x36/xcb/x34 <Private Use>
+-% These 2 PUA mappings use the equivalents <U215D7> and <U9FB8>.
+-% <UE831> /xfe/x6c <Private Use>
+-% <UE832> /xfe/x6d <Private Use>
++<UE831> /xfe/x6c <Private Use>
++<UE832> /x82/x35/x91/x31 <Private Use>
+ <UE833> /x83/x36/xcb/x35 <Private Use>
+ <UE834> /x83/x36/xcb/x36 <Private Use>
+ <UE835> /x83/x36/xcb/x37 <Private Use>
+@@ -57429,8 +57408,7 @@ CHARMAP
+ <UE838> /x83/x36/xcc/x30 <Private Use>
+ <UE839> /x83/x36/xcc/x31 <Private Use>
+ <UE83A> /x83/x36/xcc/x32 <Private Use>
+-% This 1 PUA mapping uses the equivalent <U2298F>.
+-% <UE83B> /xfe/x76 <Private Use>
++<UE83B> /xfe/x76 <Private Use>
+ <UE83C> /x83/x36/xcc/x33 <Private Use>
+ <UE83D> /x83/x36/xcc/x34 <Private Use>
+ <UE83E> /x83/x36/xcc/x35 <Private Use>
+@@ -57438,8 +57416,7 @@ CHARMAP
+ <UE840> /x83/x36/xcc/x37 <Private Use>
+ <UE841> /x83/x36/xcc/x38 <Private Use>
+ <UE842> /x83/x36/xcc/x39 <Private Use>
+-% This 1 PUA mapping uses the equivalent <U9FB9>.
+-% <UE843> /xfe/x7e <Private Use>
++<UE843> /x82/x35/x91/x32 <Private Use>
+ <UE844> /x83/x36/xcd/x30 <Private Use>
+ <UE845> /x83/x36/xcd/x31 <Private Use>
+ <UE846> /x83/x36/xcd/x32 <Private Use>
+@@ -57456,9 +57433,8 @@ CHARMAP
+ <UE851> /x83/x36/xce/x33 <Private Use>
+ <UE852> /x83/x36/xce/x34 <Private Use>
+ <UE853> /x83/x36/xce/x35 <Private Use>
+-% These 2 PUA mappings use the equivalents <U9FBA> and <U241FE>.
+-% <UE854> /xfe/x90 <Private Use>
+-% <UE855> /xfe/x91 <Private Use>
++<UE854> /x82/x35/x91/x33 <Private Use>
++<UE855> /xfe/x91 <Private Use>
+ <UE856> /x83/x36/xce/x36 <Private Use>
+ <UE857> /x83/x36/xce/x37 <Private Use>
+ <UE858> /x83/x36/xce/x38 <Private Use>
+@@ -57473,8 +57449,7 @@ CHARMAP
+ <UE861> /x83/x36/xcf/x37 <Private Use>
+ <UE862> /x83/x36/xcf/x38 <Private Use>
+ <UE863> /x83/x36/xcf/x39 <Private Use>
+-% This 1 PUA mapping uses the equivalent <U9FBB>.
+-% <UE864> /xfe/xa0 <Private Use>
++<UE864> /x82/x35/x91/x34 <Private Use>
+ <UE865> /x83/x36/xd0/x30 <Private Use>
+ <UE866> /x83/x36/xd0/x31 <Private Use>
+ <UE867> /x83/x36/xd0/x32 <Private Use>
+@@ -70447,19 +70422,14 @@ CHARMAP
+ <U00020068>..<U00020071> /x95/x32/x8d/x30 <CJK>
+ <U00020072>..<U0002007B> /x95/x32/x8e/x30 <CJK>
+ <U0002007C>..<U00020085> /x95/x32/x8f/x30 <CJK>
+-<U00020086> /x95/x32/x90/x30 <CJK>
+-<U00020087> /xfe/x51 <CJK>
+-<U00020088> /x95/x32/x90/x32 <CJK>
+-<U00020089> /xfe/x52 <CJK>
+-<U0002008A>..<U0002008F> /x95/x32/x90/x34 <CJK>
++<U00020086>..<U0002008F> /x95/x32/x90/x30 <CJK>
+ <U00020090>..<U00020099> /x95/x32/x91/x30 <CJK>
+ <U0002009A>..<U000200A3> /x95/x32/x92/x30 <CJK>
+ <U000200A4>..<U000200AD> /x95/x32/x93/x30 <CJK>
+ <U000200AE>..<U000200B7> /x95/x32/x94/x30 <CJK>
+ <U000200B8>..<U000200C1> /x95/x32/x95/x30 <CJK>
+ <U000200C2>..<U000200CB> /x95/x32/x96/x30 <CJK>
+-<U000200CC> /xfe/x53 <CJK>
+-<U000200CD>..<U000200D5> /x95/x32/x97/x31 <CJK>
++<U000200CC>..<U000200D5> /x95/x32/x97/x30 <CJK>
+ <U000200D6>..<U000200DF> /x95/x32/x98/x30 <CJK>
+ <U000200E0>..<U000200E9> /x95/x32/x99/x30 <CJK>
+ <U000200EA>..<U000200F3> /x95/x32/x9a/x30 <CJK>
+@@ -70998,8 +70968,7 @@ CHARMAP
+ <U000215BC>..<U000215C5> /x95/x36/xb7/x30 <CJK>
+ <U000215C6>..<U000215CF> /x95/x36/xb8/x30 <CJK>
+ <U000215D0>..<U000215D6> /x95/x36/xb9/x30 <CJK>
+-<U000215D7> /xfe/x6c <CJK>
+-<U000215D8>..<U000215D9> /x95/x36/xb9/x38 <CJK>
++<U000215D7>..<U000215D9> /x95/x36/xb9/x37 <CJK>
+ <U000215DA>..<U000215E3> /x95/x36/xba/x30 <CJK>
+ <U000215E4>..<U000215ED> /x95/x36/xbb/x30 <CJK>
+ <U000215EE>..<U000215F7> /x95/x36/xbc/x30 <CJK>
+@@ -71505,8 +71474,7 @@ CHARMAP
+ <U00022976>..<U0002297F> /x96/x30/xb8/x30 <CJK>
+ <U00022980>..<U00022989> /x96/x30/xb9/x30 <CJK>
+ <U0002298A>..<U0002298E> /x96/x30/xba/x30 <CJK>
+-<U0002298F> /xfe/x76 <CJK>
+-<U00022990>..<U00022993> /x96/x30/xba/x36 <CJK>
++<U0002298F>..<U00022993> /x96/x30/xba/x35 <CJK>
+ <U00022994>..<U0002299D> /x96/x30/xbb/x30 <CJK>
+ <U0002299E>..<U000229A7> /x96/x30/xbc/x30 <CJK>
+ <U000229A8>..<U000229B1> /x96/x30/xbd/x30 <CJK>
+@@ -72132,8 +72100,7 @@ CHARMAP
+ <U000241E0>..<U000241E9> /x96/x35/xb3/x30 <CJK>
+ <U000241EA>..<U000241F3> /x96/x35/xb4/x30 <CJK>
+ <U000241F4>..<U000241FD> /x96/x35/xb5/x30 <CJK>
+-<U000241FE> /xfe/x91 <CJK>
+-<U000241FF>..<U00024207> /x96/x35/xb6/x31 <CJK>
++<U000241FE>..<U00024207> /x96/x35/xb6/x30 <CJK>
+ <U00024208>..<U00024211> /x96/x35/xb7/x30 <CJK>
+ <U00024212>..<U0002421B> /x96/x35/xb8/x30 <CJK>
+ <U0002421C>..<U00024225> /x96/x35/xb9/x30 <CJK>
+--
+2.33.0
+
diff --git a/add-pthread_cond_clockwait-GLIBC_2_28.patch b/add-pthread_cond_clockwait-GLIBC_2_28.patch
new file mode 100644
index 0000000..7d04082
--- /dev/null
+++ b/add-pthread_cond_clockwait-GLIBC_2_28.patch
@@ -0,0 +1,66 @@
+From e6569a3c53c25916f5c04ccc3d6a467c57d4eab8 Mon Sep 17 00:00:00 2001
+From: Yang Yanchao <yangyanchao6@huawei.com>
+Date: Thu, 19 Jan 2023 21:40:08 +0800
+Subject: [PATCH] add pthread_cond_clockwait@GLIBC_2_28
+
+Since the pthread_cond_clockwait@GLIBC_2_28 is introduced in earlier
+versions, this symbol is required to keep the previous items compatible.
+
+---
+ nptl/Versions | 1 +
+ nptl/pthread_cond_wait.c | 4 ++++
+ sysdeps/unix/sysv/linux/aarch64/libc.abilist | 1 +
+ sysdeps/unix/sysv/linux/x86_64/64/libc.abilist | 1 +
+ 5 files changed, 9 insertions(+)
+
+diff --git a/nptl/Versions b/nptl/Versions
+index 3221de89..dc341f9d 100644
+--- a/nptl/Versions
++++ b/nptl/Versions
+@@ -231,6 +231,7 @@ libc {
+ tss_delete;
+ tss_get;
+ tss_set;
++ pthread_cond_clockwait;
+ }
+ GLIBC_2.30 {
+ pthread_cond_clockwait;
+diff --git a/nptl/pthread_cond_wait.c b/nptl/pthread_cond_wait.c
+index dc8c511f..04eeff34 100644
+--- a/nptl/pthread_cond_wait.c
++++ b/nptl/pthread_cond_wait.c
+@@ -709,3 +709,7 @@ versioned_symbol (libc, ___pthread_cond_clockwait,
+ compat_symbol (libpthread, ___pthread_cond_clockwait,
+ pthread_cond_clockwait, GLIBC_2_30);
+ #endif
++#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_28, GLIBC_2_34)
++compat_symbol (libpthread, ___pthread_cond_clockwait,
++ pthread_cond_clockwait, GLIBC_2_28);
++#endif
+diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
+index a4262419..a0795a80 100644
+--- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist
++++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
+@@ -383,6 +383,7 @@ GLIBC_2.28 mtx_lock F
+ GLIBC_2.28 mtx_timedlock F
+ GLIBC_2.28 mtx_trylock F
+ GLIBC_2.28 mtx_unlock F
++GLIBC_2.28 pthread_cond_clockwait F
+ GLIBC_2.28 renameat2 F
+ GLIBC_2.28 statx F
+ GLIBC_2.28 thrd_create F
+diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
+index 095e914b..0eaab342 100644
+--- a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
++++ b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
+@@ -2413,6 +2413,7 @@ GLIBC_2.28 mtx_lock F
+ GLIBC_2.28 mtx_timedlock F
+ GLIBC_2.28 mtx_trylock F
+ GLIBC_2.28 mtx_unlock F
++GLIBC_2.28 pthread_cond_clockwait F
+ GLIBC_2.28 renameat2 F
+ GLIBC_2.28 statx F
+ GLIBC_2.28 thrd_create F
+--
+2.33.0
+
diff --git a/bench.mk b/bench.mk
new file mode 100644
index 0000000..dfe46bd
--- /dev/null
+++ b/bench.mk
@@ -0,0 +1,77 @@
+objpfx = $(prefix)/$(ver)/usr/libexec/glibc-benchtests/
+
+bench-math := acos acosh asin asinh atan atanh cos cosh exp exp2 ffs ffsll \
+ log log2 modf pow rint sin sincos sinh sqrt tan tanh
+
+bench-pthread := pthread_once
+
+bench := $(bench-math) $(bench-pthread)
+
+run-bench := $(prefix)/$(ver)/lib64/ld-linux-x86-64.so.2 --library-path $(prefix)/$(ver)/lib64 $${run}
+
+# String function benchmarks.
+string-bench := bcopy bzero memccpy memchr memcmp memcpy memmem memmove \
+ mempcpy memset rawmemchr stpcpy stpncpy strcasecmp strcasestr \
+ strcat strchr strchrnul strcmp strcpy strcspn strlen \
+ strncasecmp strncat strncmp strncpy strnlen strpbrk strrchr \
+ strspn strstr strcpy_chk stpcpy_chk memrchr strsep strtok
+string-bench-all := $(string-bench)
+
+stdlib-bench := strtod
+
+benchset := $(string-bench-all) $(stdlib-bench)
+
+bench-malloc := malloc-thread
+
+binaries-bench := $(addprefix $(objpfx)bench-,$(bench))
+binaries-benchset := $(addprefix $(objpfx)bench-,$(benchset))
+binaries-bench-malloc := $(addprefix $(objpfx)bench-,$(bench-malloc))
+
+DETAILED_OPT :=
+
+ifdef DETAILED
+ DETAILED_OPT := -d
+endif
+
+bench: bench-set bench-func bench-malloc
+
+bench-set: $(binaries-benchset)
+ for run in $^; do \
+ outfile=$(prefix)/$$(basename $${run}.$(ver).out); \
+ echo "Running $${run}"; \
+ $(run-bench) > $${outfile}.tmp; \
+ mv $${outfile}{.tmp,}; \
+ done
+
+bench-malloc: $(binaries-bench-malloc)
+ run=$(objpfx)bench-malloc-thread; \
+ outfile=$(prefix)/$$(basename $${run}.$(ver).out); \
+ for thr in 1 8 16 32; do \
+ echo "Running $${run} $${thr}"; \
+ $(run-bench) $${thr} > $${outfile}.tmp; \
+ mv $${outfile}{.tmp,}; \
+ done
+
+# Build and execute the benchmark functions. This target generates JSON
+# formatted bench.out. Each of the programs produce independent JSON output,
+# so one could even execute them individually and process it using any JSON
+# capable language or tool.
+bench-func: $(binaries-bench)
+ { echo "{\"timing_type\": \"hp-timing\","; \
+ echo " \"functions\": {"; \
+ for run in $^; do \
+ if ! [ "x$${run}" = "x$<" ]; then \
+ echo ","; \
+ fi; \
+ echo "Running $${run}" >&2; \
+ $(run-bench) $(DETAILED_OPT); \
+ done; \
+ echo; \
+ echo " }"; \
+ echo "}"; } > $(prefix)/bench.$(ver).out-tmp; \
+ if [ -f $(prefix)/bench.$(ver).out ]; then \
+ mv -f $(prefix)/bench.$(ver).out{,.old}; \
+ fi; \
+ mv -f $(prefix)/bench.$(ver).out{-tmp,}
+# scripts/validate_benchout.py bench.out \
+# scripts/benchout.schema.json
diff --git a/glibc-1070416.patch b/glibc-1070416.patch
new file mode 100644
index 0000000..0975e0f
--- /dev/null
+++ b/glibc-1070416.patch
@@ -0,0 +1,38 @@
+Short description: Add syslog.target dependency.
+Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
+Origin: PATCH
+Bug-Fedora: #1070416
+Upstream status: not-needed
+
+Fedora-specific changes to the nscd.service file.
+See also: glibc-nscd-sysconfig.patch.
+
+--- a/nscd/nscd.service
++++ b/nscd/nscd.service
+@@ -2,6 +2,7 @@
+
+ [Unit]
+ Description=Name Service Cache Daemon
++After=syslog.target
+
+ [Service]
+ Type=forking
+@@ -17,3 +18,4 @@
+
+ [Install]
+ WantedBy=multi-user.target
++Also=nscd.socket
+diff --git a/nscd/nscd.socket b/nscd/nscd.socket
+new file mode 100644
+index 0000000..7e512d5
+--- /dev/null
++++ b/nscd/nscd.socket
+@@ -0,0 +1,8 @@
++[Unit]
++Description=Name Service Cache Daemon Socket
++
++[Socket]
++ListenDatagram=/var/run/nscd/socket
++
++[Install]
++WantedBy=sockets.target
diff --git a/glibc-bench-compare b/glibc-bench-compare
new file mode 100644
index 0000000..84e3aba
--- /dev/null
+++ b/glibc-bench-compare
@@ -0,0 +1,153 @@
+#!/usr/bin/bash
+# This script can be invoked as follows:
+#
+# glibc-bench-compare [options] <BUILD> [BUILD]
+#
+# Options may be one of the following:
+#
+# -t The BUILD arguments are task ids and not a version-release string
+# -a ARCH Do comparison for ARCH architecture
+#
+# If any of the above options are given, both BUILD arguments must be given.
+# Otherwise, if only one BUILD is specified, then it is compared against the
+# installed glibc.
+
+# Silence the pushd/popd messages
+pushd() {
+ command pushd "$@" > /dev/null 2>&1
+}
+
+popd() {
+ command popd "$@" > /dev/null 2>&1
+}
+
+# Clean up any downloaded files before we exit
+trap "rm -rf /tmp/glibc-bench-compare.$BASHPID.*" EXIT
+
+task=0
+arch=$(uname -i)
+options=0
+path=0
+installed=
+
+# Look for any commandline options
+while getopts ":tpa:" opt; do
+ case $opt in
+ p)
+ path=1
+ ;;
+ t)
+ task=1
+ options=1
+ echo "Not implemented."
+ exit 1
+ ;;
+ a)
+ arch=$OPTARG
+ options=1
+ ;;
+ *)
+ ;;
+ esac
+done
+
+# Done, now shift all option arguments out.
+shift $((OPTIND-1))
+
+if [ $# -gt 2 ] || [ $# -eq 0 ] || [ $# -lt 2 -a $options -eq 1 ]; then
+ echo "Usage: $0 [OPTIONS] <old> [new]"
+ echo
+ echo "OPTIONS:"
+ echo -e "\t-t\tCompare two brew tasks"
+ echo -e "\t-a ARCH\tGet rpms for the ARCH architecture"
+ echo -e "\t-p\tCompare built rpms in two paths."
+ echo -e "\t\tThis minimally needs glibc, glibc-common and glibc-benchtests"
+ exit 1
+fi
+
+if [ -z $2 ]; then
+ new="$1"
+ old=$(rpm --queryformat "%{VERSION}-%{RELEASE}\n" -q glibc | head -1)
+ installed=$old
+else
+ new="$2"
+ old="$1"
+fi
+
+decompress_rpms() {
+ # We were given a path to the rpms. Figure out the version-release and
+ # decompress the rpms.
+ if [ -n $1 ]; then
+ vr=$(rpm --queryformat="%{VERSION}-%{RELEASE}" -qp $1/glibc-2*.rpm | head -1)
+ mkdir $vr && pushd $vr
+ fi
+
+ for r in $1*.rpm; do
+ ( rpm2cpio $r | cpio -di ) > /dev/null
+ done
+
+ if [ -n $1 ]; then
+ popd
+ echo $vr
+ fi
+}
+
+# Get rpms for a build and decompress them
+get_build() {
+ echo "Processing build $1"
+ mkdir $1 && pushd $1
+ brew buildinfo "glibc-$1" |
+ sed -n -e "s|/mnt/koji\(.\+$arch.\+\)|http://kojipkgs.fedoraproject.org\1|p" |
+ while read url; do
+ echo "Downloading $url"
+ wget -q $url
+ done
+ decompress_rpms
+
+ echo "Removing rpms"
+ rm -f $1/*.rpm
+
+ popd
+}
+
+# Run benchmarks for a build
+run_bench() {
+ if [ -z $1 ]; then
+ make DETAILED=1 ver=$installed prefix= -f /usr/libexec/glibc-benchtests/bench.mk bench
+ else
+ make DETAILED=1 ver=$1 prefix=$PWD -f $1/usr/libexec/glibc-benchtests/bench.mk bench
+ fi
+}
+
+# Get absolute paths if needed, since we will change into the working directory
+# next.
+if [ $path -eq 1 ]; then
+ old_path=$(realpath $old)/
+ new_path=$(realpath $new)/
+fi
+
+tmpdir=$(mktemp -p /tmp -d glibc-bench-compare.$$.XXXX)
+pushd $tmpdir
+
+# Get both builds.
+if [ $path -eq 0 ]; then
+ if [ -z $installed ]; then
+ get_build $old
+ fi
+ get_build $new
+else
+ old=$(decompress_rpms $old_path)
+ new=$(decompress_rpms $new_path)
+fi
+
+# make bench for each of those.
+if [ -z $installed ]; then
+ run_bench $old
+else
+ run_bench
+fi
+run_bench $new
+
+# Now run the comparison script.
+$old/usr/libexec/glibc-benchtests/compare_bench.py $old/usr/libexec/glibc-benchtests/benchout.schema.json \
+ bench.$old.out bench.$new.out
diff --git a/glibc.spec b/glibc.spec
new file mode 100644
index 0000000..9723459
--- /dev/null
+++ b/glibc.spec
@@ -0,0 +1,1732 @@
+%global __filter_GLIBC_PRIVATE 1
+
+%define rpm_ver_major %(eval "echo `rpm -q rpm |cut -d '-' -f2 |cut -d. -f1`")
+%define rpm_ver_minor %(eval "echo `rpm -q rpm |cut -d '-' -f2 |cut -d. -f2`")
+%define rpm_version_ge_412 %(eval "if [ %{rpm_ver_major} -gt 4 -o %{rpm_ver_major} -eq 4 -a %{rpm_ver_minor} -ge 12 ]; then echo 1; else echo 0; fi")
+%define gcc_version %(eval "echo `gcc --version |head -1 |awk '{print $3}' |awk -F '.' '{print $1}'`")
+##############################################################################
+# We support the following options:
+# --with/--without,
+# * testsuite
+# - Running the testsuite. It must run for production builds.
+# - Default: Always run the testsuite.
+# * benchtests
+# - Running and building benchmark subpackage.
+# - Default: Always build the benchtests.
+# * bootstrap
+# - Bootstrapping the package.
+# - Default: Not bootstrapping.
+# * werror
+# - Build with -Werror
+# - Default: Enable using -Werror
+# * docs
+# - Build with documentation and the required dependencies.
+# - Default: Always build documentation.
+# * valgrind
+# - Run smoke tests with valgrind to verify dynamic loader.
+# - Default: Always run valgrind tests if there is architecture support.
+##############################################################################
+%bcond_without testsuite
+%bcond_with benchtests
+%bcond_with bootstrap
+%bcond_without werror
+%bcond_without docs
+%ifarch x86_64 aarch64
+%bcond_with compat_2_17
+%endif
+
+%ifarch %{valgrind_arches}
+%bcond_without valgrind
+%else
+%bcond_with valgrind
+%endif
+
+%if %{with bootstrap}
+%undefine with_benchtests
+%undefine with_werror
+%undefine with_docs
+%undefine with_valgrind
+%endif
+
+%global ENABLE_RELOC 0
+
+# Only some architectures have static PIE support
+%define pie_arches %{ix86} x86_64 aarch64
+
+%define enablekernel 3.2
+%define target %{_target_cpu}-%{_vendor}-linux
+%ifarch %{arm}
+%define target %{_target_cpu}-%{_vendor}-linuxeabi
+%endif
+%define x86_arches %{ix86} x86_64
+%define all_license LGPLv2+ and LGPLv2+ with exceptions and GPLv2+ and GPLv2+ with exceptions and BSD and Inner-Net and ISC and Public Domain and GFDL
+%define GCC gcc
+%define GXX g++
+##############################################################################
+# glibc - The GNU C Library (glibc) core package.
+##############################################################################
+Name: glibc
+Version: 2.38
+Release: 8
+Summary: The GNU libc libraries
+License: %{all_license}
+URL: http://www.gnu.org/software/glibc/
+
+Source0: https://ftp.gnu.org/gnu/glibc/%{name}-%{version}.tar.xz
+Source1: nscd.conf
+Source2: nsswitch.conf
+Source3: bench.mk
+Source4: glibc-bench-compare
+Source5: LanguageList
+Source6: LicenseList
+Source7: replace_same_file_to_hard_link.py
+
+%if %{with testsuite}
+Source8: testsuite_whitelist
+%endif
+
+Patch0: glibc-1070416.patch
+
+Patch9000: turn-default-value-of-x86_rep_stosb_threshold_form_2K_to_1M.patch
+Patch9001: locale-delete-no-hard-link-to-avoid-all_language-pac.patch
+#Patch9002: 0001-add-base-files-for-libphtread-condition-family.patch
+#Patch9003: 0002-add-header-files-for-libphtread_2_17_so.patch
+#Patch9004: 0003-add-build-script-and-files-of-libpthread_2_17_so.patch
+#Patch9005: 0004-add-two-header-files-with-some-deleted-macros.patch
+#Patch9006: 0005-add-pthread-functions_h.patch
+#Patch9007: 0006-add-elsion-function-which-moved-to-libc-in-glibc-2.34.patch
+#Patch9008: 0007-add-lowlevellock_2_17_c.patch
+#Patch9009: 0008-add-pause_nocancel_2_17.patch
+#Patch9010: 0009-add-unwind-with-longjmp.patch
+Patch9011: use-region-to-instead-of-country-for-extract-timezon.patch
+Patch9012: malloc-use-__get_nprocs-replace-__get_nprocs_sched.patch
+Patch9013: x86-use-total-l3cache-for-non_temporal_threshold.patch
+Patch9014: strcmp-delete-align-for-loop_aligned.patch
+Patch9015: add-pthread_cond_clockwait-GLIBC_2_28.patch
+Patch9016: add-GB18030-2022-charmap-BZ-30243.patch
+Patch9017: 0001-Optimizing-__random-for-single-threaded-scenarios.patch
+
+%if %{ENABLE_RELOC}
+Patch9018: reserve-relocation-information-for-sysboost.patch
+%endif
+Patch9019: 0001-fix-glibc-build-error-on-x86.patch
+
+Provides: ldconfig rtld(GNU_HASH) bundled(gnulib)
+
+BuildRequires: audit-libs-devel >= 1.1.3, sed >= 3.95, libcap-devel, gettext
+BuildRequires: procps-ng, util-linux, gawk, systemtap-sdt-devel, systemd, python3
+BuildRequires: make >= 4.0, bison >= 2.7, binutils >= 2.30-17, gcc >= 7.2.1-6
+BuildRequires: m4, chrpath
+
+%if %{without bootstrap}
+BuildRequires: gd-devel libpng-devel zlib-devel
+%endif
+
+%if %{with docs}
+BuildRequires: texinfo >= 5.0
+%endif
+
+%if %{without bootstrap}
+BuildRequires: libselinux-devel >= 1.33.4-3
+%endif
+
+%if %{with valgrind}
+BuildRequires: valgrind
+%endif
+
+%if 0%{?_enable_debug_packages}
+BuildRequires: elfutils >= 0.72 rpm >= 4.2-0.56
+%endif
+
+%if %{without bootstrap}
+%if %{with testsuite}
+BuildRequires: gcc-c++ libstdc++-static glibc-devel libidn2
+%endif
+%endif
+
+Requires: glibc-common = %{version}-%{release}
+Requires: glibc-langpack = %{version}-%{release}
+Requires: basesystem
+
+%description
+The GNU C Library project provides the core libraries for the GNU system and
+GNU/Linux systems, as well as many other systems that use Linux as the kernel.
+These libraries provide critical APIs including ISO C11, POSIX.1-2008, BSD,
+OS-specific APIs and more. These APIs include such foundational facilities as
+open, read, write, malloc, printf, getaddrinfo, dlopen, pthread_create, crypt,
+ login, exit and more.
+
+##############################################################################
+# glibc "common" sub-package
+##############################################################################
+%package common
+Summary: Common binaries and locale data for glibc
+Provides: glibc-langpack = %{version}-%{release}
+
+Provides: glibc-langpack-en = %{version}-%{release}
+Provides: glibc-langpack-en%{?_isa} = %{version}-%{release}
+Provides: glibc-langpack-zh = %{version}-%{release}
+Provides: glibc-langpack-zh%{?_isa} = %{version}-%{release}
+
+Requires: %{name} = %{version}-%{release}
+Requires: tzdata >= 2003a
+
+%description common
+The glibc-common package includes common binaries for the GNU libc
+libraries and national language (locale) support. Besides, zh_CN and
+en_US are included.
+
+%transfiletriggerin common -P 2000000 -- /lib /usr/lib /lib64 /usr/lib64
+/sbin/ldconfig
+%end
+
+%transfiletriggerpostun common -P 2000000 -- /lib /usr/lib /lib64 /usr/lib64
+/sbin/ldconfig
+%end
+
+%undefine __brp_ldconfig
+
+##############################################################################
+# glibc "all-langpacks" sub-package
+##############################################################################
+%package all-langpacks
+Summary: All language packs for %{name}.
+Requires: %{name} = %{version}-%{release}
+Requires: %{name}-common = %{version}-%{release}
+Provides: %{name}-langpack = %{version}-%{release}
+Obsoletes: %{name}-minimal-langpack <= 2.28
+
+%{lua:
+-- List the Symbol provided by all-langpacks
+lang_provides = {}
+for line in io.lines(rpm.expand("%{SOURCE5}")) do
+ print(rpm.expand([[
+Provides:]]..line..[[ = %{version}-%{release}
+Obsoletes:]]..line..[[ <= 2.28
+]]))
+end
+}
+
+%description all-langpacks
+The glibc-all-langpacks provides all the glibc-langpacks. Every entry
+includes the basic information required to support the corresponding
+language in your applications.
+
+##############################################################################
+# glibc "locale-source" sub-package
+##############################################################################
+%package locale-source
+Summary: The sources package of locales
+Requires: %{name} = %{version}-%{release}
+Requires: %{name}-common = %{version}-%{release}
+
+%description locale-source
+The locale-source package contains all language packs which are built custom
+locales
+
+##############################################################################
+# glibc "locale-archive" sub-package
+##############################################################################
+%package locale-archive
+Summary: The locale-archive of glibc
+Requires: %{name} = %{version}-%{release}
+Requires: %{name}-common = %{version}-%{release}
+
+%description locale-archive
+The locale-archive sub package contains the locale-archive. In the past,
+this file is provided in "glibc-common".Now, we provide basic language support
+in "glibc-common", but if you need a customized language, you can extract
+it from the "local-archive".
+
+##############################################################################
+# glibc "devel" sub-package
+##############################################################################
+%package devel
+Summary: The devel for %{name}
+Requires: %{name} = %{version}-%{release}
+Requires: libgcc%{_isa}
+Requires(pre): kernel-headers
+Requires(pre): coreutils
+Requires: kernel-headers >= 3.2
+%if 0%{rpm_version_ge_412}
+Requires: libxcrypt-devel%{_isa} >= 4.0.0
+Requires: libxcrypt-static%{?_isa} >= 4.0.0
+%endif
+BuildRequires: kernel-headers >= 3.2
+
+Provides: %{name}-static = %{version}-%{release}
+Provides: %{name}-static%{_isa} = %{version}-%{release}
+Provides: %{name}-headers = %{version}-%{release}
+Provides: %{name}-headers(%{_target_cpu})
+Provides: %{name}-headers%{_isa} = %{version}-%{release}
+
+Obsoletes: %{name}-static <= 2.28
+Obsoletes: %{name}-headers <= 2.28
+
+%description devel
+The glibc-devel package contains the object files necessary for developing
+programs which use the standard C libraries. Besides, it contains the
+headers. Thus, it is necessory to install glibc-devel if you ned develop programs.
+
+##############################################################################
+# glibc "nscd" sub-package
+##############################################################################
+%package -n nscd
+Summary: Name caching service daemon.
+Requires: %{name} = %{version}-%{release}
+%if %{without bootstrap}
+Requires: libselinux >= 1.17.10-1
+%endif
+Requires: audit-libs >= 1.1.3
+Requires(pre): shadow-utils, coreutils
+Requires: systemd
+Requires(postun): shadow-utils
+
+%description -n nscd
+The nscd package is able to daemon caches name service lookups and improve
+the performance with LDAP.
+
+##############################################################################
+# nss modules sub-package
+##############################################################################
+%package -n nss_modules
+Summary: Name Service Switch module using hash-indexed files and Hesiod
+Requires: %{name}%{_isa} = %{version}-%{release}
+Provides: nss_db = %{version}-%{release}
+Provides: nss_db%{_isa} = %{version}-%{release}
+Provides: nss_hesiod = %{version}-%{release}
+Provides: nss_hesiod%{_isa} = %{version}-%{release}
+Obsoletes: nss_db <= 2.28, nss_hesiod <= 2.28
+
+%description -n nss_modules
+This package contains nss_db and nss_hesiod. The former uses hash-indexed files
+to speed up user, group, service, host name, and other NSS-based lookups.The
+latter uses the Domain Name System (DNS) as a source for user, group, and service
+information to follow the Hesiod convention of Project Athena.
+
+##############################################################################
+# nss-devel sub-package
+##############################################################################
+%package nss-devel
+Summary: The devel for directly linking NSS service modules
+Requires: nss_db%{_isa} = %{version}-%{release}
+Requires: nss_hesiod%{_isa} = %{version}-%{release}
+
+%description nss-devel
+This package contains the necessary devel files to compile applications and
+libraries which directly link against NSS modules supplied by glibc. This
+package is rarely used, and in most cases use the glibc-devel package instead.
+
+##############################################################################
+# libnsl subpackage
+##############################################################################
+%package -n libnsl
+Summary: Public client interface for NIS(YP) and NIS+
+Requires: %{name}%{_isa} = %{version}-%{release}
+
+%description -n libnsl
+The libnsl package contains the public client interface for NIS(YP) and NIS+.
+It replaces the NIS library that used to be in glibc.
+
+##############################################################################
+# glibc benchtests sub-package
+##############################################################################
+%if %{with benchtests}
+
+%package benchtests
+Summary: Build benchmarking binaries and scripts for %{name}
+
+%description benchtests
+This package provides built benchmark binaries and scripts which will be used
+to run microbenchmark tests on the system.
+%endif
+
+##############################################################################
+# glibc debugutils sub-package
+##############################################################################
+%package debugutils
+Summary: debug files for %{name}
+Requires: %{name} = %{version}-%{release}
+Provides: %{name}-utils = %{version}-%{release}
+Provides: %{name}-utils%{_isa} = %{version}-%{release}
+
+Obsoletes: %{name}-utils <= 2.28
+
+%description debugutils
+This package provides memusage, a memory usage profiler, mtrace, a memory leak
+tracer and xtrace, a function call tracer, all of which is not necessory for you.
+
+##############################################################################
+# glibc help sub-package
+##############################################################################
+%package help
+Summary: The doc and man for %{name}
+Buildarch: noarch
+Requires: man info
+Requires: %{name} = %{version}-%{release}
+
+%description help
+This package provides all doc, man and info files of %{name}
+
+##############################################################################
+# glibc compat-2.17 sub-package
+##############################################################################
+%if %{with compat_2_17}
+%package compat-2.17
+Summary: provides pthread library with glibc-2.17
+
+%description compat-2.17
+This subpackage to provide the function of the glibc-2.17 pthread library.
+Currently, provide pthread_condition function.
+To keep older applications compatible, glibc-compat-2.17 provides libpthread_nonshared.a
+%endif
+
+%if %{ENABLE_RELOC}
+##############################################################################
+# glibc reloc sub-package
+##############################################################################
+%package relocation
+Summary: Relocations for %{name}
+Requires: %{name} = %{version}-%{release}
+BuildRequires: native-turbo-tools
+
+%description relocation
+This package contains relocations for %{name}.
+%endif
+
+##############################################################################
+# Prepare for the build.
+##############################################################################
+%prep
+%autosetup -n %{name}-%{version} -p1
+
+chmod +x benchtests/scripts/*.py scripts/pylint
+
+find . -type f -size 0 -o -name "*.orig" -exec rm -f {} \;
+
+touch `find . -name configure`
+
+touch locale/programs/*-kw.h
+
+##############################################################################
+# Build glibc...
+##############################################################################
+%build
+
+BuildFlags="-O2 -g -DNDEBUG -fPIC -fPIE -fstack-protector-strong"
+LinkFlags="-pie -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack"
+
+%ifarch aarch64
+BuildFlags="$BuildFlags -mno-outline-atomics"
+%endif
+
+reference=" \
+ "-Wp,-D_GLIBCXX_ASSERTIONS" \
+ "-fasynchronous-unwind-tables" \
+ "-fstack-clash-protection" \
+ "-funwind-tables" \
+ "-m31" \
+ "-m32" \
+ "-m64" \
+ "-march=haswell" \
+ "-march=i686" \
+ "-march=x86-64" \
+ "-march=z13" \
+ "-march=z14" \
+ "-march=zEC12" \
+ "-mfpmath=sse" \
+ "-msse2" \
+ "-mstackrealign" \
+ "-mtune=generic" \
+ "-mtune=z13" \
+ "-mtune=z14" \
+ "-mtune=zEC12" \
+ "-specs=/usr/lib/rpm/%{_vendor}/%{_vendor}-annobin-cc1" "
+
+for flag in $RPM_OPT_FLAGS $RPM_LD_FLAGS ; do
+ if echo "$reference" | grep -q -F " $flag " ; then
+ BuildFlags="$BuildFlags $flag"
+ fi
+done
+
+%define glibc_make_flags_as ASFLAGS="-g -Wa,--generate-missing-build-notes=yes"
+%define glibc_make_flags %{glibc_make_flags_as}
+
+EnableKernel="--enable-kernel=%{enablekernel}"
+
+builddir=build-%{target}
+rm -rf $builddir
+mkdir $builddir
+pushd $builddir
+../configure CC="%GCC" CXX="%GXX" CFLAGS="$BuildFlags" LDFLAGS="$LinkFlags" \
+ --prefix=%{_prefix} \
+ --with-headers=%{_prefix}/include $EnableKernel \
+ --with-nonshared-cflags=-Wp,-D_FORTIFY_SOURCE=2 \
+ --enable-bind-now \
+ --enable-shared \
+ --build=%{target} \
+ --enable-stack-protector=strong \
+%ifarch %{pie_arches}
+%if 0%{?gcc_version} >= 8
+ --enable-static-pie \
+%endif
+%endif
+%ifarch %{x86_arches}
+%if 0%{?gcc_version} >= 8
+ --enable-cet \
+%endif
+%endif
+ --enable-tunables \
+ --enable-systemtap \
+%ifarch %{ix86}
+ --disable-multi-arch \
+%endif
+%if %{without werror}
+ --disable-werror \
+%endif
+ --disable-profile \
+%if %{with bootstrap}
+ --without-selinux \
+%endif
+%if 0%{rpm_version_ge_412}
+ --disable-crypt \
+%endif
+ ||
+ { cat config.log; false; }
+
+make %{?_smp_mflags} -O -r %{glibc_make_flags}
+popd
+
+##############################################################################
+# Build libpthread-2.17.so
+##############################################################################
+%if %{with compat_2_17}
+ cd nptl_2_17
+ sh build_libpthread-2.17.so.sh %{_target_cpu} $builddir
+ cd ..
+%endif
+
+##############################################################################
+# Install glibc...
+##############################################################################
+%install
+%ifarch riscv64
+for d in $RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT/%{_lib}; do
+ mkdir -p $d
+ (cd $d && ln -sf . lp64d)
+done
+%endif
+
+make %{?_smp_mflags} install_root=$RPM_BUILD_ROOT install -C build-%{target}
+
+pushd build-%{target}
+
+make %{?_smp_mflags} install_root=$RPM_BUILD_ROOT \
+ install-locale-files -C ../localedata objdir=`pwd`
+popd
+
+python3 %{SOURCE7} $RPM_BUILD_ROOT/usr/lib/locale
+
+rm -f $RPM_BUILD_ROOT/%{_libdir}/libNoVersion*
+rm -f $RPM_BUILD_ROOT/%{_lib}/libNoVersion*
+rm -f $RPM_BUILD_ROOT/%{_lib}/libnss1-*
+rm -f $RPM_BUILD_ROOT/%{_lib}/libnss-*.so.1
+rm -f $RPM_BUILD_ROOT/{usr/,}sbin/sln
+
+mkdir -p $RPM_BUILD_ROOT/var/cache/ldconfig
+truncate -s 0 $RPM_BUILD_ROOT/var/cache/ldconfig/aux-cache
+
+$RPM_BUILD_ROOT/sbin/ldconfig -N -r $RPM_BUILD_ROOT
+
+# Install info files
+%if %{with docs}
+# Move the info files if glibc installed them into the wrong location.
+if [ -d $RPM_BUILD_ROOT%{_prefix}/info -a "%{_infodir}" != "%{_prefix}/info" ]; then
+ mkdir -p $RPM_BUILD_ROOT%{_infodir}
+ mv -f $RPM_BUILD_ROOT%{_prefix}/info/* $RPM_BUILD_ROOT%{_infodir}
+ rm -rf $RPM_BUILD_ROOT%{_prefix}/info
+fi
+
+# Compress all of the info files.
+gzip -9nvf $RPM_BUILD_ROOT%{_infodir}/libc*
+
+%else
+rm -f $RPM_BUILD_ROOT%{_infodir}/dir
+rm -f $RPM_BUILD_ROOT%{_infodir}/libc.info*
+%endif
+
+# Create all-packages libc.lang
+olddir=`pwd`
+pushd $RPM_BUILD_ROOT%{_prefix}/lib/locale
+rm -f locale-archive
+$olddir/build-%{target}/elf/ld.so \
+ --library-path $olddir/build-%{target}/ \
+ $olddir/build-%{target}/locale/localedef \
+ --alias-file=$olddir/intl/locale.alias \
+ --prefix $RPM_BUILD_ROOT --add-to-archive \
+ eo *_*
+%{find_lang} libc
+# In the past, locale-archive is provided by common.
+# In the current version, locale-archive is provided by locale-archive.
+# Due to the change of the packing mode, the locale-archive fails to be
+# replaced during the upgrade. Therefore, a backup file is required to
+# replace the locale-archive.
+mv locale-archive locale-archive.update
+
+$olddir/build-%{target}/elf/ld.so \
+ --library-path $olddir/build-%{target}/ \
+ $olddir/build-%{target}/locale/localedef \
+ --alias-file=$olddir/intl/locale.alias \
+ --prefix $RPM_BUILD_ROOT --add-to-archive \
+ zh_* en_*
+mv locale-archive locale-archive.default
+popd
+mv $RPM_BUILD_ROOT%{_prefix}/lib/locale/libc.lang .
+
+# Install configuration files for services
+install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT/etc/nsswitch.conf
+
+# This is for compat-2.17
+%if %{with compat_2_17}
+install -p -m 755 build-%{target}/nptl/libpthread-2.17.so $RPM_BUILD_ROOT%{_libdir}
+# Build an empty libpthread_nonshared.a for compatiliby with applications
+# that have old linker scripts that reference this file.
+ar cr %{glibc_sysroot}%{_prefix}/%{_lib}/libpthread_nonshared.a
+
+%endif
+
+# This is for ncsd - in glibc 2.2
+install -m 644 nscd/nscd.conf $RPM_BUILD_ROOT/etc
+mkdir -p $RPM_BUILD_ROOT%{_tmpfilesdir}
+install -m 644 %{SOURCE1} %{buildroot}%{_tmpfilesdir}
+mkdir -p $RPM_BUILD_ROOT/lib/systemd/system
+install -m 644 nscd/nscd.service nscd/nscd.socket $RPM_BUILD_ROOT/lib/systemd/system
+
+# Include ld.so.conf
+echo 'include ld.so.conf.d/*.conf' > $RPM_BUILD_ROOT/etc/ld.so.conf
+truncate -s 0 $RPM_BUILD_ROOT/etc/ld.so.cache
+chmod 644 $RPM_BUILD_ROOT/etc/ld.so.conf
+mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
+mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
+truncate -s 0 $RPM_BUILD_ROOT/etc/sysconfig/nscd
+truncate -s 0 $RPM_BUILD_ROOT/etc/gai.conf
+
+# Include %{_libdir}/gconv/gconv-modules.cache
+truncate -s 0 $RPM_BUILD_ROOT%{_libdir}/gconv/gconv-modules.cache
+chmod 644 $RPM_BUILD_ROOT%{_libdir}/gconv/gconv-modules.cache
+
+# Remove any zoneinfo files; they are maintained by tzdata.
+rm -rf $RPM_BUILD_ROOT%{_prefix}/share/zoneinfo
+
+touch -r %{SOURCE0} $RPM_BUILD_ROOT/etc/ld.so.conf
+touch -r inet/etc.rpc $RPM_BUILD_ROOT/etc/rpc
+
+# Lastly copy some additional documentation for the packages.
+rm -rf documentation
+mkdir documentation
+cp timezone/README documentation/README.timezone
+cp posix/gai.conf documentation/
+
+%if %{with benchtests}
+# Build benchmark binaries. Ignore the output of the benchmark runs.
+pushd build-%{target}
+make BENCH_DURATION=1 bench-build
+popd
+
+# Copy over benchmark binaries.
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests
+cp $(find build-%{target}/benchtests -type f -executable) $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests/
+
+#makefile.
+for b in %{SOURCE3} %{SOURCE4}; do
+ cp $b $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests/
+done
+
+#comparison scripts.
+for i in benchout.schema.json compare_bench.py import_bench.py validate_benchout.py; do
+ cp benchtests/scripts/$i $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests/
+done
+%endif
+
+pushd locale
+ln -s programs/*.gperf .
+popd
+
+pushd iconv
+ln -s ../locale/programs/charmap-kw.gperf .
+popd
+
+%if %{with docs}
+rm -f $RPM_BUILD_ROOT%{_infodir}/dir
+%endif
+
+mkdir -p $RPM_BUILD_ROOT/var/{db,run}/nscd
+touch $RPM_BUILD_ROOT/var/{db,run}/nscd/{passwd,group,hosts,services}
+touch $RPM_BUILD_ROOT/var/run/nscd/{socket,nscd.pid}
+
+mkdir -p $RPM_BUILD_ROOT%{_libdir}
+mv -f $RPM_BUILD_ROOT/%{_lib}/lib{pcprofile,memusage}.so \
+ $RPM_BUILD_ROOT%{_libdir}
+
+# Strip all of the installed object files.
+strip -g $RPM_BUILD_ROOT%{_libdir}/*.o
+
+# create a null libpthread static link for compatibility.
+pushd $RPM_BUILD_ROOT%{_prefix}/%{_lib}/
+rm libpthread.a
+ar rc libpthread.a
+popd
+
+for i in $RPM_BUILD_ROOT%{_prefix}/bin/{xtrace,memusage}; do
+%if %{with bootstrap}
+ test -w $i || continue
+%endif
+ sed -e 's~=/%{_lib}/libpcprofile.so~=%{_libdir}/libpcprofile.so~' \
+ -e 's~=/%{_lib}/libmemusage.so~=%{_libdir}/libmemusage.so~' \
+ -e 's~='\''/\\\$LIB/libpcprofile.so~='\''%{_prefix}/\\$LIB/libpcprofile.so~' \
+ -e 's~='\''/\\\$LIB/libmemusage.so~='\''%{_prefix}/\\$LIB/libmemusage.so~' \
+ -i $i
+done
+
+touch master.filelist
+touch glibc.filelist
+touch common.filelist
+touch devel.filelist
+touch nscd.filelist
+touch nss_modules.filelist
+touch nss-devel.filelist
+touch libnsl.filelist
+touch debugutils.filelist
+touch benchtests.filelist
+touch help.filelist
+%if %{with compat_2_17}
+touch compat-2.17.filelist
+%endif
+
+{
+ find $RPM_BUILD_ROOT \( -type f -o -type l \) \
+ \( \
+ -name etc -printf "%%%%config " -o \
+ -name gconv-modules \
+ -printf "%%%%verify(not md5 size mtime) %%%%config(noreplace) " -o \
+ -name gconv-modules.cache \
+ -printf "%%%%verify(not md5 size mtime) " \
+ , \
+ ! -path "*/lib/debug/*" -printf "/%%P\n" \)
+
+ find $RPM_BUILD_ROOT -type d \
+ \( -path '*%{_prefix}/share/locale' -prune -o \
+ \( -path '*%{_prefix}/share/*' \
+%if %{with docs}
+ ! -path '*%{_infodir}' -o \
+%endif
+ -path "*%{_prefix}/include/*" \
+ \) -printf "%%%%dir /%%P\n" \)
+} | {
+ sed -e '\,.*/share/locale/\([^/_]\+\).*/LC_MESSAGES/.*\.mo,d' \
+ -e '\,.*/share/i18n/locales/.*,d' \
+ -e '\,.*/share/i18n/charmaps/.*,d' \
+ -e '\,.*/etc/\(localtime\|nsswitch.conf\|ld\.so\.conf\|ld\.so\.cache\|default\|rpc\|gai\.conf\),d' \
+ -e '\,.*%{_libdir}/lib\(pcprofile\|memusage\)\.so,d' \
+%if %{with compat_2_17}
+ -e '\,.*%{_libdir}/libpthread-2.17.so,d' \
+%endif
+ -e '\,.*/bin/\(memusage\|mtrace\|xtrace\|pcprofiledump\),d'
+} | sort > master.filelist
+
+chmod 0444 master.filelist
+
+##############################################################################
+# glibc - The GNU C Library (glibc) core package.
+##############################################################################
+cat master.filelist \
+ | grep -v \
+ -e '%{_infodir}' \
+ -e '%{_libdir}/lib.*_p.a' \
+ -e '%{_prefix}/include' \
+ -e '%{_libdir}/lib.*\.a' \
+ -e '%{_libdir}/.*\.o' \
+ -e '%{_libdir}/lib.*\.so' \
+ -e 'nscd' \
+ -e '%{_prefix}/bin' \
+ -e '%{_prefix}/lib/locale' \
+ -e '%{_prefix}/sbin/[^i]' \
+ -e '%{_prefix}/share' \
+ -e '/var/db/Makefile' \
+ -e '/libnss_.*\.so[0-9.]*$' \
+ -e '/libnsl' \
+ -e 'glibc-benchtests' \
+ -e 'aux-cache' \
+ > glibc.filelist
+
+for module in compat files dns; do
+ cat master.filelist \
+ | grep -E \
+ -e "/libnss_$module(\.so\.[0-9.]+|-[0-9.]+\.so)$" \
+ >> glibc.filelist
+done
+
+echo '%{_libdir}/libmemusage.so' >> glibc.filelist
+echo '%{_libdir}/libpcprofile.so' >> glibc.filelist
+
+##############################################################################
+# glibc "common" sub-package
+##############################################################################
+grep '%{_prefix}/bin' master.filelist > common.filelist
+grep '%{_prefix}/sbin' master.filelist \
+ | grep -v '%{_prefix}/sbin/iconvconfig' \
+ | grep -v 'nscd' >> common.filelist
+
+grep '%{_prefix}/share' master.filelist \
+ | grep -v \
+ -e '%{_prefix}/share/info/libc.info.*' \
+ -e '%%dir %{prefix}/share/info' \
+ -e '%%dir %{prefix}/share' \
+ >> common.filelist
+
+###############################################################################
+# glibc "devel" sub-package
+###############################################################################
+%if %{with docs}
+grep '%{_infodir}' master.filelist | grep -v '%{_infodir}/dir' > help.filelist
+%endif
+
+grep '%{_libdir}/lib.*\.a' master.filelist \
+ | grep '/lib\(\(c\|pthread\|nldbl\|mvec\)_nonshared\|g\|ieee\|mcheck\)\.a$' \
+ >> devel.filelist
+
+grep '%{_libdir}/.*\.o' < master.filelist >> devel.filelist
+grep '%{_libdir}/lib.*\.so' < master.filelist >> devel.filelist
+
+sed -i -e '\,/libnss_[a-z]*\.so$,d' devel.filelist
+
+grep '%{_prefix}/include' < master.filelist >> devel.filelist
+
+grep '%{_libdir}/lib.*\.a' < master.filelist \
+ | grep -v '/lib\(\(c\|pthread\|nldbl\|mvec\)_nonshared\|g\|ieee\|mcheck\)\.a$' \
+ >> devel.filelist
+
+
+##############################################################################
+# glibc "nscd" sub-package
+##############################################################################
+echo '%{_prefix}/sbin/nscd' > nscd.filelist
+
+##############################################################################
+# nss modules sub-package
+##############################################################################
+grep -E "/libnss_(db|hesiod)(\.so\.[0-9.]+|-[0-9.]+\.so)$" \
+master.filelist > nss_modules.filelist
+
+##############################################################################
+# nss-devel sub-package
+##############################################################################
+grep '/libnss_[a-z]*\.so$' master.filelist > nss-devel.filelist
+
+##############################################################################
+# libnsl subpackage
+##############################################################################
+grep -E '/libnsl\.so\.[0-9]+$' master.filelist > libnsl.filelist
+test $(wc -l < libnsl.filelist) -eq 1
+
+##############################################################################
+# glibc debugutils sub-package
+##############################################################################
+cat > debugutils.filelist <<EOF
+%if %{without bootstrap}
+%{_prefix}/bin/memusage
+%{_prefix}/bin/memusagestat
+%endif
+%{_prefix}/bin/mtrace
+%{_prefix}/bin/pcprofiledump
+%{_prefix}/bin/xtrace
+EOF
+
+%if %{with benchtests}
+##############################################################################
+# glibc benchtests sub-package
+##############################################################################
+find build-%{target}/benchtests -type f -executable | while read b; do
+ echo "%{_prefix}/libexec/glibc-benchtests/$(basename $b)"
+done > benchtests.filelist
+# ... and the makefile.
+for b in %{SOURCE3} %{SOURCE4}; do
+ echo "%{_prefix}/libexec/glibc-benchtests/$(basename $b)" >> benchtests.filelist
+done
+# ... and finally, the comparison scripts.
+echo "%{_prefix}/libexec/glibc-benchtests/benchout.schema.json" >> benchtests.filelist
+echo "%{_prefix}/libexec/glibc-benchtests/compare_bench.py*" >> benchtests.filelist
+echo "%{_prefix}/libexec/glibc-benchtests/import_bench.py*" >> benchtests.filelist
+echo "%{_prefix}/libexec/glibc-benchtests/validate_benchout.py*" >> benchtests.filelist
+%endif
+
+%if %{with compat_2_17}
+##############################################################################
+# glibc compat-2.17 sub-package
+##############################################################################
+ echo "%{_libdir}/libpthread-2.17.so" >> compat-2.17.filelist
+ echo "%{_libdir}/libpthread_nonshared.a" >> compat-2.17.filelist
+%endif
+
+%if %{ENABLE_RELOC}
+pushd build-%{target}
+objreloc libc.so.6
+mkdir -p ${RPM_BUILD_ROOT}/usr/lib/relocation/%{_libdir}
+install -p ${RPM_BUILD_DIR}/%{name}-%{version}/build-%{target}/libc.so.6.relocation ${RPM_BUILD_ROOT}/usr/lib/relocation/%{_libdir}
+popd
+%endif
+
+reliantlib=""
+
+function findReliantLib()
+{
+ local library=$1
+ reliantlib=$(readelf -d $library | grep "(NEEDED)" | awk -F "Shared library" '{print $2}')$reliantlib
+}
+
+# remove gconv rpath/runpath
+function removeLoadPath()
+{
+ local file=$1
+ local rpathInfo=$(chrpath -l $file | grep "RPATH=")
+ local runpathInfo=$(chrpath -l $file | grep "RUNPATH=")
+
+ local currPath=""
+ if [ x"$rpathInfo" != x"" ]; then
+ currPath=$(echo $rpathInfo | awk -F "RPATH=" '{print $2}')
+ fi
+
+ if [ x"$runpathInfo" != x"" ]; then
+ currPath=$(echo $runpathInfo | awk -F "RUNPATH=" '{print $2}')
+ fi
+
+ if [ x"$currPath" == x"\$ORIGIN" ]; then
+ chrpath -d $file
+
+ findReliantLib $file
+ fi
+}
+
+set +e
+
+# find and remove RPATH/RUNPATH
+for file in $(find $RPM_BUILD_ROOT%{_libdir}/gconv/ -name "*.so" -exec file {} ';' | grep "\<ELF\>" | awk -F ':' '{print $1}')
+do
+ removeLoadPath $file
+done
+
+function createSoftLink()
+{
+ # pick up the dynamic libraries and create softlink for them
+ local tmplib=$(echo $reliantlib | sed 's/://g' | sed 's/ //g' | sed 's/\[//g' | sed 's/]/\n/g' | sort | uniq)
+
+ for temp in $tmplib
+ do
+ if [ -f "$RPM_BUILD_ROOT%{_libdir}/gconv/$temp" ]; then
+ ln -sf %{_libdir}/gconv/$temp $RPM_BUILD_ROOT%{_libdir}/$temp
+ echo %{_libdir}/$temp >> glibc.filelist
+ fi
+ done
+}
+
+# create soft link for the reliant libraries
+createSoftLink
+set -e
+
+##############################################################################
+# Run the glibc testsuite
+##############################################################################
+%check
+%if %{with testsuite}
+
+omit_testsuite() {
+ while read testsuite; do
+ testsuite_escape=$(echo "$testsuite" | \
+ sed 's/\([.+?^$\/\\|()\[]\|\]\)/\\\0/g')
+ sed -i "/${testsuite_escape}/d" rpmbuild.tests.sum.not-passing
+ done
+}
+
+# Increase timeouts
+export TIMEOUTFACTOR=16
+parent=$$
+echo ====================TESTING=========================
+
+# Default libraries.
+pushd build-%{target}
+make %{?_smp_mflags} -O check |& tee rpmbuild.check.log >&2
+test -s tests.sum
+
+# This hides a test suite build failure, which should be fatal. We
+# check "Summary of test results:" below to verify that all tests
+# were built and run.
+if ! grep -q '^Summary of test results:$' rpmbuild.check.log ; then
+ echo "FAIL: test suite build of target: $(basename "$(pwd)")" >& 2
+ exit 1
+fi
+grep -v ^PASS: tests.sum | grep -v ^UNSUPPORTED > rpmbuild.tests.sum.not-passing || true
+
+# Delete the testsuite from the whitelist
+cat %{SOURCE8} | \
+ grep -v "^$\|^#" | \
+ awk -F':' '{if($2 == "" || $2 ~ /'%{_target_cpu}'/ ) {print $1}}' |\
+ omit_testsuite
+
+set +x
+if test -s rpmbuild.tests.sum.not-passing ; then
+ echo ===================FAILED TESTS===================== >&2
+ echo "Target: $(basename "$(pwd)")" >& 2
+ cat rpmbuild.tests.sum.not-passing >&2
+ while read failed_code failed_test ; do
+ for suffix in out test-result ; do
+ if test -e "$failed_test.$suffix"; then
+ echo >&2
+ echo "=====$failed_code $failed_test.$suffix=====" >&2
+ cat -- "$failed_test.$suffix" >&2
+ echo >&2
+ fi
+ done
+ done <rpmbuild.tests.sum.not-passing
+%if 0%{?glibc_abort_after_test_fail}
+ #exit 1
+%endif
+fi
+
+# Unconditonally dump differences in the system call list.
+echo "* System call consistency checks:" >&2
+cat misc/tst-syscall-list.out >&2
+set -x
+popd
+
+echo ====================TESTING END=====================
+PLTCMD='/^Relocation section .*\(\.rela\?\.plt\|\.rela\.IA_64\.pltoff\)/,/^$/p'
+echo ====================PLT RELOCS LD.SO================
+readelf -Wr $RPM_BUILD_ROOT/%{_lib}/ld-*.so | sed -n -e "$PLTCMD"
+echo ====================PLT RELOCS LIBC.SO==============
+readelf -Wr $RPM_BUILD_ROOT/%{_lib}/libc-*.so | sed -n -e "$PLTCMD"
+echo ====================PLT RELOCS END==================
+
+pushd build-%{target}
+LD_SHOW_AUXV=1 elf/ld.so --library-path .:elf:nptl:dlfcn /bin/true
+
+%if %{with valgrind}
+elf/ld.so --library-path .:elf:nptl:dlfcn \
+ /usr/bin/valgrind --error-exitcode=1 \
+ elf/ld.so --library-path .:elf:nptl:dlfcn /usr/bin/true
+%endif
+popd
+
+%endif # %{run_glibc_tests}
+
+##############################################################################
+# Install and uninstall scripts
+##############################################################################
+%pre -p <lua>
+-- Check that the running kernel is new enough
+required = '%{enablekernel}'
+rel = posix.uname("%r")
+if rpm.vercmp(rel, required) < 0 then
+ error("FATAL: kernel too old", 0)
+end
+
+%post -p <lua>
+-- We use lua's posix.exec because there may be no shell that we can
+-- run during glibc upgrade.
+function post_exec (program, ...)
+ local pid = posix.fork ()
+ if pid == 0 then
+ assert (posix.exec (program, ...))
+ elseif pid > 0 then
+ posix.wait (pid)
+ end
+end
+
+-- (1) Remove multilib libraries from previous installs.
+-- In order to support in-place upgrades, we must immediately remove
+-- obsolete platform directories after installing a new glibc
+-- version. RPM only deletes files removed by updates near the end
+-- of the transaction. If we did not remove the obsolete platform
+-- directories here, they may be preferred by the dynamic linker
+-- during the execution of subsequent RPM scriptlets, likely
+-- resulting in process startup failures.
+
+-- Full set of libraries glibc may install.
+install_libs = { "anl", "BrokenLocale", "c", "dl", "m", "mvec",
+ "nss_compat", "nss_db", "nss_dns", "nss_files",
+ "nss_hesiod", "pthread", "resolv", "rt", "SegFault",
+ "thread_db", "util" }
+
+-- We are going to remove these libraries. Generally speaking we remove
+-- all core libraries in the multilib directory.
+-- We employ a tight match where X.Y is in [2.0,9.9*], so we would
+-- match "libc-2.0.so" and so on up to "libc-9.9*".
+remove_regexps = {}
+for i = 1, #install_libs do
+ remove_regexps[i] = ("lib" .. install_libs[i]
+ .. "%%-[2-9]%%.[0-9]+%%.so$")
+end
+
+-- Two exceptions:
+remove_regexps[#install_libs + 1] = "libthread_db%%-1%%.0%%.so"
+remove_regexps[#install_libs + 2] = "libSegFault%%.so"
+
+-- We are going to search these directories.
+local remove_dirs = { "%{_libdir}/i686",
+ "%{_libdir}/i686/nosegneg" }
+
+-- Walk all the directories with files we need to remove...
+for _, rdir in ipairs (remove_dirs) do
+ if posix.access (rdir) then
+ -- If the directory exists we look at all the files...
+ local remove_files = posix.files (rdir)
+ for rfile in remove_files do
+ for _, rregexp in ipairs (remove_regexps) do
+ -- Does it match the regexp?
+ local dso = string.match (rfile, rregexp)
+ if (dso ~= nil) then
+ -- Removing file...
+ os.remove (rdir .. '/' .. rfile)
+ end
+ end
+ end
+ end
+end
+
+-- (2) Update /etc/ld.so.conf
+-- Next we update /etc/ld.so.conf to ensure that it starts with
+-- a literal "include ld.so.conf.d/*.conf".
+
+local ldsoconf = "/etc/ld.so.conf"
+local ldsoconf_tmp = "/etc/glibc_post_upgrade.ld.so.conf"
+
+if posix.access (ldsoconf) then
+
+ -- We must have a "include ld.so.conf.d/*.conf" line.
+ local have_include = false
+ for line in io.lines (ldsoconf) do
+ -- This must match, and we don't ignore whitespace.
+ if string.match (line, "^include ld.so.conf.d/%%*%%.conf$") ~= nil then
+ have_include = true
+ end
+ end
+
+ if not have_include then
+ -- Insert "include ld.so.conf.d/*.conf" line at the start of the
+ -- file. We only support one of these post upgrades running at
+ -- a time (temporary file name is fixed).
+ local tmp_fd = io.open (ldsoconf_tmp, "w")
+ if tmp_fd ~= nil then
+ tmp_fd:write ("include ld.so.conf.d/*.conf\n")
+ for line in io.lines (ldsoconf) do
+ tmp_fd:write (line .. "\n")
+ end
+ tmp_fd:close ()
+ local res = os.rename (ldsoconf_tmp, ldsoconf)
+ if res == nil then
+ io.stdout:write ("Error: Unable to update configuration file (rename).\n")
+ end
+ else
+ io.stdout:write ("Error: Unable to update configuration file (open).\n")
+ end
+ end
+end
+
+-- (3) Rebuild ld.so.cache early.
+-- If the format of the cache changes then we need to rebuild
+-- the cache early to avoid any problems running binaries with
+-- the new glibc.
+
+-- Note: We use _prefix because Fedora's UsrMove says so.
+post_exec ("%{_prefix}/sbin/ldconfig")
+
+-- (4) Update gconv modules cache.
+-- If the /usr/lib/gconv/gconv-modules.cache exists, then update it
+-- with the latest set of modules that were just installed.
+-- We assume that the cache is in _libdir/gconv and called
+-- "gconv-modules.cache".
+local iconv_dir = "%{_libdir}/gconv"
+local iconv_cache = iconv_dir .. "/gconv-modules.cache"
+if (posix.utime (iconv_cache) == 0) then
+ post_exec ("%{_prefix}/sbin/iconvconfig",
+ "-o", iconv_cache,
+ "--nostdlib",
+ iconv_dir)
+else
+ io.stdout:write ("Error: Missing " .. iconv_cache .. " file.\n")
+end
+
+%postun -p <lua> common
+archive_path = "%{_prefix}/lib/locale/locale-archive"
+os.remove (archive_path)
+
+%posttrans -p <lua> common
+archive_path = "%{_prefix}/lib/locale/locale-archive"
+default_path = "%{_prefix}/lib/locale/locale-archive.default"
+os.remove (archive_path)
+posix.link(default_path, archive_path)
+
+%postun -p <lua> locale-archive
+archive_path = "%{_prefix}/lib/locale/locale-archive"
+default_path = "%{_prefix}/lib/locale/locale-archive.default"
+os.remove (archive_path)
+posix.link(default_path, archive_path)
+
+%posttrans -p <lua> locale-archive
+archive_path = "%{_prefix}/lib/locale/locale-archive"
+update_path = "%{_prefix}/lib/locale/locale-archive.update"
+os.remove (archive_path)
+posix.link(update_path, archive_path)
+
+%pre devel
+# this used to be a link and it is causing nightmares now
+if [ -L %{_prefix}/include/scsi ] ; then
+ rm -f %{_prefix}/include/scsi
+fi
+
+%pre -n nscd
+getent group nscd >/dev/null || /usr/sbin/groupadd -g 28 -r nscd
+getent passwd nscd >/dev/null ||
+ /usr/sbin/useradd -M -o -r -d / -s /sbin/nologin \
+ -c "NSCD Daemon" -u 28 -g nscd nscd
+
+%post -n nscd
+%systemd_post nscd.service
+
+%preun -n nscd
+%systemd_preun nscd.service
+
+%postun -n nscd
+if test $1 = 0; then
+ /usr/sbin/userdel nscd > /dev/null 2>&1 || :
+fi
+%systemd_postun_with_restart nscd.service
+
+##############################################################################
+# Files list
+##############################################################################
+%files -f glibc.filelist
+%dir %{_prefix}/%{_lib}/audit
+%verify(not md5 size mtime) %config(noreplace) /etc/nsswitch.conf
+%verify(not md5 size mtime) %config(noreplace) /etc/ld.so.conf
+%verify(not md5 size mtime) %config(noreplace) /etc/rpc
+%dir /etc/ld.so.conf.d
+%dir %{_prefix}/libexec/getconf
+%dir %{_libdir}/gconv
+%dir %attr(0700,root,root) /var/cache/ldconfig
+%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/cache/ldconfig/aux-cache
+%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/ld.so.cache
+%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/gai.conf
+%{!?_licensedir:%global license %%doc}
+%license COPYING COPYING.LIB LICENSES
+
+%files -f common.filelist common
+%dir %{_prefix}/lib/locale
+%dir %{_prefix}/lib/locale/C.utf8
+%{_prefix}/lib/locale/C.utf8/*
+%attr(0644,root,root) %config(noreplace) %{_prefix}/lib/locale/locale-archive.default
+
+%files -f libc.lang all-langpacks
+%{_prefix}/lib/locale
+%exclude %{_prefix}/lib/locale/locale-archive
+%exclude %{_prefix}/lib/locale/locale-archive.update
+%exclude %{_prefix}/lib/locale/locale-archive.default
+%exclude %{_prefix}/lib/locale/C.utf8
+
+%files locale-source
+%dir %{_prefix}/share/i18n/locales
+%{_prefix}/share/i18n/locales/*
+%dir %{_prefix}/share/i18n/charmaps
+%{_prefix}/share/i18n/charmaps/*
+
+%files locale-archive
+%attr(0644,root,root) %{_prefix}/lib/locale/locale-archive.update
+
+%files -f devel.filelist devel
+
+%files -f nscd.filelist -n nscd
+%config(noreplace) /etc/nscd.conf
+%dir %attr(0755,root,root) /var/run/nscd
+%dir %attr(0755,root,root) /var/db/nscd
+/lib/systemd/system/nscd.service
+/lib/systemd/system/nscd.socket
+%{_tmpfilesdir}/nscd.conf
+%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/nscd.pid
+%attr(0666,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/socket
+%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/passwd
+%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/group
+%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/hosts
+%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/services
+%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/nscd/passwd
+%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/nscd/group
+%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/nscd/hosts
+%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/nscd/services
+%ghost %config(missingok,noreplace) /etc/sysconfig/nscd
+
+%files -f nss_modules.filelist -n nss_modules
+/var/db/Makefile
+
+%files -f nss-devel.filelist nss-devel
+
+%files -f libnsl.filelist -n libnsl
+/%{_lib}/libnsl.so.1
+
+%files -f debugutils.filelist debugutils
+
+%if %{with benchtests}
+%files -f benchtests.filelist benchtests
+%endif
+
+%files -f help.filelist help
+#Doc of glibc package
+%doc README NEWS INSTALL elf/rtld-debugger-interface.txt
+#Doc of common sub-package
+%doc documentation/README.timezone
+%doc documentation/gai.conf
+#Doc of nss_modules sub-package
+%doc hesiod/README.hesiod
+
+%if %{with compat_2_17}
+%files -f compat-2.17.filelist compat-2.17
+%endif
+
+%if %{ENABLE_RELOC}
+%files relocation
+%attr(400, root, root) /usr/lib/relocation/%{_libdir}/libc.so.6.relocation
+%endif
+
+%changelog
+* Thu Sep 14 2023 yangpan<yangpan51@huawei.com> - 2.38-8
+- disable sysboost
+
+* Tue Sep 12 2023 yangpan<yangpan51@huawei.com> - 2.38-7
+- revert fix issues about not stripped
+
+* Mon Sep 11 2023 yangpan<yangpan51@huawei.com> - 2.38-6
+- fix issues about not stripped
+
+* Mon Aug 28 2023 liutie<liutie4@huawei.com> - 2.38-5
+- fix issues about glibc-devel have libc.so.6.relocation
+
+* Wed Aug 16 2023 chenhaixiang<chenhaixiang3@huawei.com> - 2.38-4
+- skipping test case building to fix glibc build error on x86
+
+* Fri Aug 4 2023 longwei<longwei27@huawei.com> - 2.38-3
+- add libc.so relocation file for sysboost
+
+* Wed Aug 2 2023 chenhaixiang<chenhaixiang3@huawei.com> - 2.38-2
+- use the released glibc 2.38 version
+
+* Tue Jul 25 2023 chenhaixiang<chenhaixiang3@huawei.com> - 2.38-1
+- Pre Update to glibc-2.38
+
+* Tue Jul 11 2023 jiangyingxin<jiangyingxin1@huawei.com> - 2.36-18
+- Optimizing __random for single-threaded scenarios
+
+* Tue Jul 11 2023 lijianglin<lijianglin2@huawei.com> - 2.36-17
+- add the test of the entire GB18030 charmap
+
+* Mon Jun 5 2023 li-miaomiao_zhr <mmlidc@isoftstone.com> - 2.36-16
+- processing of annotated patch files in spec files
+
+* Wed May 10 2023 lijianglin<lijianglin2@huawei.com> - 2.36-15
+- add GB18030-2022 charmap
+
+* Mon May 08 2023 laokz <zhangkai@iscas.ac.cn> - 2.36-14
+- Backport RISC-V patches:
+ - stdlib/strfrom: Add copysign to fix NAN issue (from v2.37)
+ - Assume only FLAG_ELF_LIBC6 suport (from v2.37)
+ - Restore libc6 implicit soname logic (from v2.38)
+
+* Thu Feb 23 2023 Qingqing Li <liqingqing3@huawei.com> - 2.36-13
+- gmon: Fix allocated buffer overflow (bug 29444)
+
+* Wed Feb 1 2023 Yang Yanchao <yangyanchao6@huawei.com> - 2.36-12
+- Since the pthread_cond_clockwait@GLIBC_2_28 is introduced in earlier
+ versions, this symbol is required to keep the previous items compatible.
+
+* Thu Jan 12 2023 Qingqing Li <liqingqing3@huawei.com> - 2.36-11
+- Makerules: fix MAKEFLAGS assignment for upcoming make-4.4
+
+* Sat Sep 24 2022 Xu Wu<wuxu.wu@huawei.com> - 2.36-10
+- syslog: Fix large messages (BZ#29536)
+
+* Fri Sep 23 2022 Xu Wu<wuxu.wu@huawei.com> - 2.36-9
+- gconv: Use 64-bit interfaces in gconv_parseconfdir (bug 29583)
+
+* Tue Sep 20 2022 SuperHugePan <zhangpan26@huawei.com> - 2.36-8
+- linux: Do not skip d_ino==0 entries in readdir, readdir64(bug 12165)
+
+* Thu Sep 8 2022 Qingqing Li <liqingqing3@huawei.com> - 2.36-7
+- add requires between glibc-info and glibc
+
+* Thu Sep 1 2022 Qingqing Li <liqingqing3@huawei.com> - 2.36-6
+- syslog:Fix large messages (BZ#29536/CVE-2022-39046)
+
+* Tue Aug 16 2022 Qingqing Li <liqingqing3@huawei.com> - 2.36-5
+- linux: Fix enum fsconfig_command detection in <sys/mount.h>
+
+* Mon Aug 15 2022 Qingqing Li <liqingqing3@huawei.com> - 2.36-4
+- linux: Fix sys/mount.h usage with kernel headers
+
+* Mon Aug 15 2022 Qingqing Li <liqingqing3@huawei.com> - 2.36-3
+- refactoring testsuite whitelist
+
+* Wed Aug 10 2022 Qingqing Li <liqingqing3@huawei.com> - 2.36-2
+- aarch64: strcmp delete align for better unixbench performance
+
+* Tue Aug 2 2022 Qingqing Li <liqingqing3@huawei.com> - 2.36-1
+- upgrade to 2.36
+
+* Thu Jul 28 2022 Qingqing Li <liqingqing3@huawei.com> - 2.35-16
+- optimize Obsoletes version
+
+* Thu Jul 7 2022 Qingqing Li <liqingqing3@huawei.com> - 2.35-15
+- enable -werror by default
+
+* Tue Jul 5 2022 Yang Yanchao <yangyanchao6@huawei.com> - 2.35-14
+- add libpthread_nonshared.a in glibc-compat-2.17 for old applications
+
+* Tue Jun 28 2022 Qingqing Li <liqingqing3@huawei.com> - 2.35-13
+- aarch64: add -mno-outline-atomics to prevent mallocT2_xx performance regression
+
+* Mon Jun 27 2022 Qingqing Li <liqingqing3@huawei.com> - 2.35-12
+- x86: use total l3cache size for non_temporal_threshold
+
+* Tue Jun 14 2022 Yang Yanchao <yangyanchao6@huawei.com> - 2.35-11
+- Use Lua to compile the installation scripts of glibc-common and glibc-locale-archive.
+
+* Wed Jun 1 2022 Qingqing Li <liqingqing3@huawei.com> - 2.35-10
+- use locale-archive to prevent basic command performance regression
+
+* Thu May 12 2022 jiangheng <jiangheng14@huawei.com> - 2.35-9
+- restore nscd
+
+* Wed Mar 30 2022 Yang Yanchao <yangyanchao@huawei.com> - 2.35-8
+- delete the BuildRequires:gcc_secure.
+
+* Tue Mar 29 2022 Yang Yanchao <yangyanchao@huawei.com> - 2.35-7
+- mv libc.info.gz* to the package glibc-help
+
+* Sat Mar 12 2022 Qingqing Li <liqingqing3@huawei.com> - 2.35-6
+- malloc: use __get_nprocs replace __get_nprocs_sched.
+
+* Wed Mar 2 2022 Qingqing Li <liqingqing3@huawei.com> - 2.35-5
+- add chrpath to build requires for removing RPATH/RUNPATH
+
+* Tue Mar 1 2022 Qingqing Li <liqingqing3@huawei.com> - 2.35-4
+- remove shared library's RPATH/RUNPATH for security
+
+* Tue Feb 22 2022 Qingqing Li <liqingqing3@huawei.com> - 2.35-3
+- tzselect: use region to select timezone
+
+* Thu Feb 10 2022 jiangheng12 <jiangheng12@huawei.com> - 2.35-2
+- remove nscd; The functionality nscd currently provides can be
+ achieved by using systemd-resolved for DNS caching and the sssd
+ daemon for everything else
+
+* Tue Feb 8 2022 Qingqing Li <liqingqing3@huawei.com> - 2.35-1
+- upgrade to 2.35
+
+* Fri Jan 28 2022 Yang Yanchao <yangyanchao6@huawei.com> - 2.34-39
+- refactor the generation mode of the debug package and
+ add correct files to the glibc-debugsource sync form 22.03-LTS
+
+* Tue Jan 4 2022 Yang Yanchao <yangyanchao6@huawei.com> - 2.34-38
+- testsuit: delete check-installed-headers-c and check-installed-headers-cxx
+ which are checked in CI to improves the compilation speed.
+- testsuit: delete glibc-benchtest
+
+* Sat Dec 25 2021 liusirui <liusirui@huawei.com> - 2.34-37
+- ld.so: Don't fill the DT_DEBUG entry in ld.so [BZ #28129]
+
+* Fri Dec 24 2021 Qingqing Li <liqingqing3@huawei.com> - 2.34-36
+- do not define tgmath.h fmaxmag, fminmag macros for C2X (BZ #28397)
+
+* Fri Dec 24 2021 Qingqing Li <liqingqing3@huawei.com> - 2.34-35
+- io: Fix ftw internal realloc buffer (BZ #28126)
+
+* Tue Dec 21 2021 Qingqing Li <liqingqing3@huawei.com> - 2.34-34
+- tst: fix failing nss/tst-nss-files-hosts-long with local resolver
+ use support_open_dev_null_range io/tst-closefrom, mise/tst-close_range, and posix/tst-spawn5(BZ#28260)
+ nptl: add one more barrier to nptl/tst-create1
+
+* Wed Dec 15 2021 Qingqing Li <liqingqing3@huawei.com> - 2.34-33
+- pthread/tst-cancel28: Fix barrier re-init race condition
+
+* Thu Dec 9 2021 Yang Yanchao <yangyanchao6@huawei.com> - 2.34-32
+- Deleted some unnecessary command when make master.filelist
+
+* Thu Dec 9 2021 Yang Yanchao <yangyanchao6@huawei.com> - 2.34-31
+- support all Chinese and English by default
+ add zh_* and en_* to glibc-common
+ the size of glibc-common is increased from 1.8MB to 3.5MB
+
+* Fri Dec 3 2021 Yang Yanchao <yangyanchao6@huawei.com> - 2.34-30
+- turn the default value of x86_rep_stosb_threshold from 2k to 1M
+
+* Thu Dec 2 2021 Qingqing Li <liqingqing3@huawei.com> - 2.34-29
+- revert the use of sched_getaffinity [BZ #28310]
+
+* Tue Nov 30 2021 Bin Wang <wangbin224@huawei.com> - 2.34-28
+- Linux: Simplify __opensock and fix race condition [BZ #28353]
+
+* Wed Nov 24 2021 Yang Yanchao <yangyanchao6@huawei.com> - 2.34-27
+- Refactor the libpthread-2.17.so code and pass all test cases.
+ delete libpthread-2.17.so from glibc-devel
+
+* Fri Nov 19 2021 Qingqing Li <liqingqing3@huawei.com> - 2.34-26
+- revert supress -Wcast-qual warnings in bsearch
+
+* Mon Nov 15 2021 Qingqing Li <liqingqing3@huawei.com> - 2.34-25
+- fix attribute access mode on getcwd [BZ #27476]
+- supress -Wcast-qual warnings in bsearch
+
+* Mon Nov 15 2021 Qingqing Li <liqingqing3@huawei.com> - 2.34-24
+- elf: fix ld.so crash while loading a DSO with a read-only dynamic section
+ https://sourceware.org/bugzilla/show_bug.cgi?id=28340
+
+* Wed Nov 10 2021 Qingqing Li <liqingqing3@huawei.com> - 2.34-23
+- gconv: Do not emit spurious NUL character in ISO-2022-JP-3,
+ this also fix CVE-2021-43396.
+ uplink: https://sourceware.org/bugzilla/show_bug.cgi?id=28524
+
+* Tue Nov 9 2021 Qingqing Li<liqingqing3@huawei.com> - 2.34-22
+- iconvconfig: Fix behaviour with --prefix
+ uplink: https://sourceware.org/bugzilla/show_bug.cgi?id=28199
+
+* Mon Nov 8 2021 Qingqing Li<liqingqing3@huawei.com> - 2.34-21
+- nptl: pthread_kill race condition issues fixed.
+ uplink: https://sourceware.org/bugzilla/show_bug.cgi?id=19193
+ https://sourceware.org/bugzilla/show_bug.cgi?id=12889
+ https://sourceware.org/bugzilla/show_bug.cgi?id=28036
+ https://sourceware.org/bugzilla/show_bug.cgi?id=28363
+ https://sourceware.org/bugzilla/show_bug.cgi?id=28407
+
+* Thu Nov 4 2021 Qingqing Li<liqingqing3@huawei.com> - 2.34-20
+- nptl: pthread_kill and pthread_cancel return success
+ for satisfy posix standard.
+ uplink: https://sourceware.org/bugzilla/show_bug.cgi?id=19193
+
+* Fri Oct 29 2021 Qingqing Li<liqingqing3@huawei.com> - 2.34-19
+- aarch64: update a64fx memset not to degrade at 16KB
+
+* Thu Oct 28 2021 Qingqing Li<liqingqing3@huawei.com> - 2.34-18
+- use testl instead of andl to check __x86_string_control to
+ avoid updating __x86_string_control
+
+* Tue Oct 26 2021 Yang Yanchao<yangyanchao6@huawei.com> - 2.34-17
+- Show more debugging information during testsuite
+
+* Tue Oct 26 2021 Chuangchuang Fang<fangchuangchuang@huawei.com> - 2.34-16
+- Use __executable_start as the lowest address for profiling
+
+* Tue Oct 26 2021 Yang Yanchao<yangyanchao6@huawei.com> - 2.34-15
+- add glibc-compat-2.17 subpackage to provide the function of
+ the glibc-2.17 pthread library.
+ Currently, provide pthread_condition function.
+
+* Mon Oct 25 2021 Qingqing Li<liqingqing3@huawei.com> - 2.34-14
+- mtrace fix output with PIE and ASLR.
+- elf: rtld copy terminating null in tunables strdup.
+
+* Mon Oct 25 2021 Qingqing Li<liqingqing3@huawei.com> - 2.34-13
+- fpu: x86-64 optimize load of all bits set into ZMM register.
+
+* Tue Oct 19 2021 Yang Yanchao <yangyanchao6@huawei.com> - 2.34-12
+- Add locale-archive sub packages to support more languages
+ and reduce memory usage.
+
+* Tue Oct 12 2021 Yang Yanchao<yangyanchao6@huawei.com> - 2.34-11
+- Add the testsuite whitelist.
+ If a test case out of the trustlist fails, the compilation is interrupted.
+
+* Mon Oct 11 2021 Qingqing Li<liqingqing3@huawei.com> - 2.34-10
+- update test memmove.c to cover 16KB.
+
+* Wed Sep 29 2021 Qingqing Li<liqingqing3@huawei.com> - 2.34-9
+- elf: drop elf/tls-macros.h in favor of thread tls_mode attribute.
+- use __ehdr_start for __GLOBAL_OFFSET_TABLE[0]
+
+* Wed Sep 29 2021 Qingqing Li<liqingqing3@huawei.com> - 2.34-8
+- fix overflow ittimer tests on 32 bit system
+
+* Mon Sep 27 2021 Qingqing Li<liqingqing3@huawei.com> - 2.34-7
+- mtrace: use a static buffer for printing, fix memory leak.
+ upstream link: https://sourceware.org/bugzilla/show_bug.cgi?id=25947
+
+* Sun Sep 26 2021 Qingqing Li<liqingqing3@huawei.com> - 2.34-6
+- elf: Unconditionally use __ehdr_start.
+- aarch64: Make elf_machine_{load_addr,dynamic} robust [BZ #28203].
+ upstream link: https://sourceware.org/bugzilla/show_bug.cgi?id=28203
+
+* Fri Sep 17 2021 Qingqing Li<liqingqing3@huawei.com> - 2.34-5
+- aarch64: optimize memset performance.
+
+* Fri Sep 17 2021 Qingqing Li<liqingqing3@huawei.com> - 2.34-4
+- backport upstream patches to fix some memory leak and double free bugs
+
+* Tue Sep 14 2021 Yang Yanchao<yangyanchao6@huawei.com> - 2.34-3
+- add --enable-static-pie in aarch64
+
+* Wed Aug 25 2021 Qingqing Li<liqingqing3@huawei.com> - 2.34-2
+- fix CVE-2021-38604
+ https://sourceware.org/bugzilla/show_bug.cgi?id=28213
+
+* Thu Aug 5 2021 Qingqing Li<liqingqing3@huawei.com> - 2.34-1
+- upgrade to 2.34.
+
+* Fri Jul 23 2021 zhouwenpei<zhouwenpei1@huawei.com> - 2.33-7
+- remove unnecessary build require.
+
+* Sat Jul 3 2021 Qingqing Li<liqingqing3@huawei.com> - 2.33-6
+- malloc: tcache shutdown sequence does not work if the thread never allocated anything. (bug 28028)
+ https://sourceware.org/bugzilla/show_bug.cgi?id=28028
+
+* Thu Jul 1 2021 Qingqing Li<liqingqing3@huawei.com> - 2.33-5
+- wordexp: Use strtoul instead of atoi so that overflow can be detected. (bug 28011)
+ https://sourceware.org/bugzilla/show_bug.cgi?id=28011
+
+* Fri Jun 18 2021 Qingqing Li<liqingqing3@huawei.com> - 2.33-4
+- fix CVE-2021-33574(bug 27896)
+ https://sourceware.org/bugzilla/show_bug.cgi?id=27896
+
+* Tue Apr 27 2021 xuhuijie<xuhujie@huawei.com> - 2.33-3
+- Fix locales BEP inconsistence, use python to replace same file
+ to hard link
+
+* Wed Apr 7 2021 xieliuhua<xieliuhua@huawei.com> - 2.33-2
+- Fix-the-inaccuracy-of-j0f-j1f-y0f-y1f-BZ.patch
+
+* Fri Mar 5 2021 Wang Shuo<wangshuo_1994@foxmail.com> - 2.33-1
+- upgrade glibc to 2.33-1
+
+* Tue Jan 26 2021 shanzhikun <shanzhikun@huawei.com> - 2.31-9
+- elf: Allow dlopen of filter object to work [BZ #16272]
+ https://sourceware.org/bugzilla/show_bug.cgi?id=16272
+
+* Fri Jan 8 2021 Wang Shuo<wangshuo_1994@foxmail.com> - 2.31-8
+- Replace "openEuler" by %{_vendor} for versatility
+
+* Tue Nov 10 2020 liusirui <liusirui@huawei.com> - 2.31-7
+- Fix CVE-2020-27618, iconv accept redundant shift sequences in IBM1364 [BZ #26224]
+ https://sourceware.org/bugzilla/show_bug.cgi?id=26224
+
+* Tue Sep 15 2020 shanzhikun<shanzhikun@huawei.com> - 2.31-6
+- rtld: Avoid using up static TLS surplus for optimizations [BZ #25051].
+ https://sourceware.org/git/?p=glibc.git;a=commit;h=ffb17e7ba3a5ba9632cee97330b325072fbe41dd
+
+* Fri Sep 4 2020 MarsChan<chenmingmin@huawei.com> - 2.31-5
+- For political reasons, remove country selection from tzselect.ksh
+
+* Fri Aug 14 2020 Xu Huijie<546391727@qq.com> - 2.31-4
+- since the new version of the pthread_cond_wait()
+ function has performance degradation in multi-core
+ scenarios, here is an extra libpthreadcond.so using
+ old version of the function. you can use it by adding
+ LD_PRELOAD=./libpthreadcond.so in front of your program
+ (eg: LD_PRELOAD=./libpthreadcond.so ./test).
+ use with-libpthreadcond to compile it.
+ warning:2.17 version pthread_cond_wait() does not meet
+ the posix standard, you should pay attention when using
+ it.
+
+* Fri Jul 24 2020 Wang Shuo<wangshuo_1994@foxmail.com> - 2.31-3
+- backport patch to disable warnings due to deprecated libselinux
+- symbols used by nss and nscd
+
+* Fri Jul 24 2020 Wang Shuo<wangshuo_1994@foxmail.com> - 2.31-2
+- fix CVE-2020-6096
+- fix bugzilla 26137, 26214 and 26215
+
+* Thu Jul 9 2020 wuxu<wuxu.wu@hotmail.com> - 2.31-1
+- upgrade glibc to 2.31-1
+- delete build-locale-archive command
+- delete nsswitch.conf file
+- replace glibc_post_upgrade function with lua
+- remove sys/sysctl.h header file
+- delete stime, ftime function
+
+* Tue Jul 7 2020 Wang Shuo<wangshuo47@huawei.com> - 2.28-45
+- disable rpc, it has been splited to libnss and libtirpc
+- disable parallel compilation
+
+* Tue Jul 7 2020 Wang Shuo<wangshuo47@huawei.com> - 2.28-44
+- backup to version 40
+
+* Mon Jul 6 2020 Wang Shuo<wangshuo47@huawei.com> - 2.28-43
+- disable rpc, it has been splited to libnss and libtirpc
+- disable parallel compilation
+
+* Mon Jul 6 2020 Wang Shuo<wangshuo47@huawei.com> - 2.28-42
+- add zh and en to LanguageList
+
+* Thu Jul 2 2020 Wang Shuo<wangshuo47@huawei.com> - 2.28-41
+- add filelist to improve the scalability
+- backport many patch for bugfix
+
+* Sat May 30 2020 liqingqing<liqignqing3@huawei.com> - 2.28-40
+- Fix array overflow in backtrace on PowerPC (bug 25423)
+
+* Thu May 28 2020 jdkboy<guoge1@huawei.com> - 2.28-39
+- Disable compilation warnings temporarily
+
+* Tue Apr 28 2020 liqingqing<liqignqing3@huawei.com> - 2.28-38
+- Avoid ldbl-96 stack corruption from range reduction of pseudo-zero (bug 25487)
+
+* Thu Apr 16 2020 wangbin<wangbin224@huawei.com> - 2.28-37
+- backport Kunpeng patches
+
+* Thu Mar 19 2020 yuxiangyang<yuxiangyang4@huawei.com> - 2.28-36
+- fix build src.rpm error
+
+* Fri Mar 13 2020 Wang Shuo<wangshuo47@huawei.com> - 2.28-35
+- exclude conflict files about rpc
+
+* Fri Mar 13 2020 Wang Shuo<wangshuo47@huawei.com> - 2.28-34
+- enable obsolete rpc
+
+* Tue Mar 10 2020 liqingqing<liqingqing3@huawei.com> - 2.28-33
+- fix use after free in glob when expanding user bug
+
+* Wed Feb 26 2020 Wang Shuo<wangshuo47@huawei.com> - 2.28-32
+- remove aditional require for debugutils package
+
+* Tue Jan 7 2020 Wang Shuo <wangshuo47@huawei.com> - 2.28-31
+- Fix compile macro
+
+* Mon Jan 6 2020 Wang Shuo <wangshuo47@huawei.com> - 2.28-30
+- add obsoletes symbol for language
+
+* Fri Dec 20 2019 liqingqing <liqingqing3@huawei.com> - 2.28-29
+- remove country selection from tzselect
+- fix some bugs https://sourceware.org/git/?p=glibc.git;a=commit;h=1df872fd74f730bcae3df201a229195445d2e18a
+ https://sourceware.org/git/?p=glibc.git;a=commit;h=823624bdc47f1f80109c9c52dee7939b9386d708
+ https://sourceware.org/git/?p=glibc.git;a=commit;h=bc10e22c90e42613bd5dafb77b80a9ea1759dd1b
+ https://sourceware.org/git/?p=glibc.git;a=commit;h=6c29942cbf059aca47fd4bbd852ea42c9d46b71f
+ https://sourceware.org/git/?p=glibc.git;a=commit;h=31effacee2fc1b327bedc9a5fcb4b83f227c6539
+ https://sourceware.org/git/?p=glibc.git;a=commit;h=5b06f538c5aee0389ed034f60d90a8884d6d54de
+ https://sourceware.org/git/?p=glibc.git;a=commit;h=57ada43c905eec7ba28fe60a08b93a52d88e26c1
+ https://sourceware.org/git/?p=glibc.git;a=commit;h=e0e4c321c3145b6ac0e8f6e894f87790cf9437ce
+ https://sourceware.org/git/?p=glibc.git;a=commit;h=182a3746b8cc28784718c8ea27346e97d1423945
+ https://sourceware.org/git/?p=glibc.git;a=commit;h=02d8b5ab1c89bcef2627d2b621bfb35b573852c2
+ https://sourceware.org/git/?p=glibc.git;a=commit;h=f59a54ab0c2dcaf9ee946df2bfee9d4be81f09b8
+ https://sourceware.org/git/?p=glibc.git;a=commit;h=fefa21790b5081e5d04662a240e2efd18603ef86
+ https://sourceware.org/git/?p=glibc.git;a=commit;h=2bd81b60d6ffdf7e0d22006d69f4b812b1c80513
+ https://sourceware.org/git/?p=glibc.git;a=commit;h=a55541fd1c4774d483c2d2b4bd17bcb9faac62e7
+ https://sourceware.org/git/?p=glibc.git;a=commit;h=b6d2c4475d5abc05dd009575b90556bdd3c78ad0
+ https://sourceware.org/git/?p=glibc.git;a=commit;h=8a80ee5e2bab17a1f8e1e78fab5c33ac7efa8b29
+ https://sourceware.org/git/?p=glibc.git;a=commit;h=c0fd3244e71db39cef1e2d1d8ba12bb8b7375ce4
+- fix CVE-2016-10739 CVE-2019-19126 CVE-2019-6488
+- add pie compile option for debug/Makefile and remove -static for build-locale-archive
+
+* Fri Dec 20 2019 liusirui <liusirui@huawei.com> - 2.28-28
+- Fix null pointer in mtrace
+
+* Thu Nov 21 2019 mengxian <mengxian@huawei.com> - 2.28-27
+- In x86, configure static pie and cet only with gcc 8 or above
+
+* Wed Nov 13 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.28-26
+- Optimized instructions for Kunpeng processor
+
+* Fri Jan 18 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.28-25
+- Package init
diff --git a/locale-delete-no-hard-link-to-avoid-all_language-pac.patch b/locale-delete-no-hard-link-to-avoid-all_language-pac.patch
new file mode 100644
index 0000000..5f1a8fa
--- /dev/null
+++ b/locale-delete-no-hard-link-to-avoid-all_language-pac.patch
@@ -0,0 +1,26 @@
+From 6b462949b0cb8265c44c2f9ddbc0758af2279345 Mon Sep 17 00:00:00 2001
+From: liqingqing_1229 <liqingqing3@huawei.com>
+Date: Tue, 2 Aug 2022 15:10:32 +0800
+Subject: [PATCH] locale: delete --no-hard-link to avoid all_language packages
+ too large
+
+---
+ localedata/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/localedata/Makefile b/localedata/Makefile
+index da92b67..eb4c3d8 100644
+--- a/localedata/Makefile
++++ b/localedata/Makefile
+@@ -476,7 +476,7 @@ $(INSTALL-SUPPORTED-LOCALE-ARCHIVE): install-locales-dir
+ $(build-one-locale)
+
+ $(INSTALL-SUPPORTED-LOCALE-FILES): install-locales-dir
+- @flags="--no-archive --no-hard-links"; \
++ @flags="--no-archive"; \
+ $(build-one-locale)
+
+ tst-setlocale-ENV = LC_ALL=ja_JP.EUC-JP
+--
+1.8.3.1
+
diff --git a/malloc-use-__get_nprocs-replace-__get_nprocs_sched.patch b/malloc-use-__get_nprocs-replace-__get_nprocs_sched.patch
new file mode 100644
index 0000000..d5aa111
--- /dev/null
+++ b/malloc-use-__get_nprocs-replace-__get_nprocs_sched.patch
@@ -0,0 +1,25 @@
+From f5545d74d6dc4d5036bee6a91cda14a51e2a0676 Mon Sep 17 00:00:00 2001
+From: Yang Yanchao <yangyanchao6@huawei.com>
+Date: Sat, 12 Mar 2022 15:30:17 +0800
+Subject: [PATCH] malloc: use __get_nprocs replace __get_nprocs_sched.
+
+---
+ malloc/arena.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/malloc/arena.c b/malloc/arena.c
+index f1f0af86..66748463 100644
+--- a/malloc/arena.c
++++ b/malloc/arena.c
+@@ -879,7 +879,7 @@ arena_get2 (size_t size, mstate avoid_arena)
+ narenas_limit = mp_.arena_max;
+ else if (narenas > mp_.arena_test)
+ {
+- int n = __get_nprocs_sched ();
++ int n = __get_nprocs ();
+
+ if (n >= 1)
+ narenas_limit = NARENAS_FROM_NCORES (n);
+--
+2.33.0
+
diff --git a/nscd.conf b/nscd.conf
new file mode 100644
index 0000000..8a24a78
--- /dev/null
+++ b/nscd.conf
@@ -0,0 +1 @@
+d /run/nscd 0755 root root
diff --git a/nsswitch.conf b/nsswitch.conf
new file mode 100644
index 0000000..b49a3b2
--- /dev/null
+++ b/nsswitch.conf
@@ -0,0 +1,56 @@
+#
+# /etc/nsswitch.conf
+#
+# An example Name Service Switch config file. This file should be
+# sorted with the most-used services at the beginning.
+#
+# The entry '[NOTFOUND=return]' means that the search for an
+# entry should stop if the search in the previous entry turned
+# up nothing. Note that if the search failed due to some other reason
+# (like no NIS server responding) then the search continues with the
+# next entry.
+#
+# Valid entries include:
+#
+# nisplus Use NIS+ (NIS version 3)
+# nis Use NIS (NIS version 2), also called YP
+# dns Use DNS (Domain Name Service)
+# files Use the local files in /etc
+# db Use the pre-processed /var/db files
+# compat Use /etc files plus *_compat pseudo-databases
+# hesiod Use Hesiod (DNS) for user lookups
+# sss Use sssd (System Security Services Daemon)
+# [NOTFOUND=return] Stop searching if not found so far
+#
+# 'sssd' performs its own 'files'-based caching, so it should
+# generally come before 'files'.
+
+# To use 'db', install the nss_db package, and put the 'db' in front
+# of 'files' for entries you want to be looked up first in the
+# databases, like this:
+#
+# passwd: db files
+# shadow: db files
+# group: db files
+
+passwd: sss files
+shadow: files sss
+group: sss files
+
+hosts: files dns myhostname
+
+bootparams: files
+
+ethers: files
+netmasks: files
+networks: files
+protocols: files
+rpc: files
+services: files sss
+
+netgroup: sss
+
+publickey: files
+
+automount: files sss
+aliases: files
diff --git a/replace_same_file_to_hard_link.py b/replace_same_file_to_hard_link.py
new file mode 100644
index 0000000..12829f0
--- /dev/null
+++ b/replace_same_file_to_hard_link.py
@@ -0,0 +1,98 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+"""
+function: This script resolves locales's BEP inconsistence,
+ it scans a specific path and replaces the same file
+ in that path with a hard link.Avoid different language
+ packs each time due to concurrent compilation.
+"""
+import os
+import sys
+import time
+
+all_file = {}
+
+def cmp_file(f1, f2):
+ """compare two files in bytes"""
+ st1 = os.stat(f1)
+ st2 = os.stat(f2)
+
+ bufsize = 8 * 1024
+ with open(f1, 'rb') as fp1, open(f2, 'rb') as fp2:
+ while True:
+ b1 = fp1.read(bufsize)
+ b2 = fp2.read(bufsize)
+ if b1 != b2:
+ return False
+ if not b1:
+ return True
+
+
+def search_all_inode(dir_path):
+ """recursively traverse the directory to group all"""
+ files = os.listdir(dir_path)
+
+ for fi in files:
+ fi_d = os.path.join(dir_path, fi)
+ if os.path.isdir(fi_d):
+ search_all_inode(fi_d)
+ else:
+ size = os.stat(fi_d).st_size
+ if size in all_file:
+ all_file[size].append(fi_d)
+ else:
+ all_file[size] = [fi_d]
+
+
+def deal_one(file_paths):
+ """traverse the file array, delete the same file and create a hard link"""
+ file_count = len(file_paths)
+ inode_files = {}
+
+ for i in range(0, file_count):
+ for j in range(i + 1, file_count):
+ file1 = file_paths[i]
+ file2 = file_paths[j]
+
+ file1_inode = os.stat(file1).st_ino
+ file2_inode = os.stat(file2).st_ino
+
+ if file1_inode not in inode_files:
+ inode_files[file1_inode] = file1
+
+ if file1_inode == file2_inode:
+ continue
+
+ if cmp_file(file1, file2):
+ print('deal same file:', file1, '==', file2)
+ os.remove(file2)
+ os.link(file1, file2)
+ else:
+ if file2_inode not in inode_files:
+ inode_files[file2_inode] = file2
+
+
+def deal_files():
+ """get file array and processed one by one"""
+ for size in all_file:
+ file_paths = all_file[size]
+ if len(file_paths) > 1:
+ deal_one(file_paths)
+
+
+def usage():
+ """print usage"""
+ print("""
+rm_same_file: Replace the same file with a hard link.
+
+rm_same_file.py [target path]
+
+ """)
+
+if __name__ == "__main__":
+ if len(sys.argv) == 2:
+ search_all_inode(sys.argv[1])
+ deal_files()
+ else:
+ usage()
+ sys.exit()
diff --git a/sources b/sources
new file mode 100644
index 0000000..8702858
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+778cce0ea6bf7f84ca8caacf4a01f45b glibc-2.38.tar.xz
diff --git a/strcmp-delete-align-for-loop_aligned.patch b/strcmp-delete-align-for-loop_aligned.patch
new file mode 100644
index 0000000..cf5b15a
--- /dev/null
+++ b/strcmp-delete-align-for-loop_aligned.patch
@@ -0,0 +1,32 @@
+From 9bbffed83b93f633b272368fc536a4f24e9942e6 Mon Sep 17 00:00:00 2001
+From: Yang Yanchao <yangyanchao6@huawei.com>
+Date: Mon, 21 Feb 2022 14:25:25 +0800
+Subject: [PATCH] strcmp: delete align for loop_aligned
+
+In Kunpeng-920, the performance of strcmp deteriorates only
+when the 16 to 23 characters are different.Or the string is
+only 16-23 characters.That shows 2 misses per iteration which
+means this is a branch predictor issue indeed.
+In the preceding scenario, strcmp performance is 300% worse than expected.
+
+Fortunately, this problem can be solved by modifying the alignment of the functions.
+---
+ sysdeps/aarch64/strcmp.S | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/sysdeps/aarch64/strcmp.S b/sysdeps/aarch64/strcmp.S
+index f225d718..7a048b66 100644
+--- a/sysdeps/aarch64/strcmp.S
++++ b/sysdeps/aarch64/strcmp.S
+@@ -71,8 +71,6 @@ ENTRY(strcmp)
+ b.ne L(misaligned8)
+ cbnz tmp, L(mutual_align)
+
+- .p2align 4
+-
+ L(loop_aligned):
+ ldr data2, [src1, off2]
+ ldr data1, [src1], 8
+--
+2.33.0
+
diff --git a/testsuite_whitelist b/testsuite_whitelist
new file mode 100644
index 0000000..b99f3d5
--- /dev/null
+++ b/testsuite_whitelist
@@ -0,0 +1,129 @@
+# USAGE:
+# If it's a generic error:
+# testsuite
+# If the test case fails on part of the architecture:
+# testsuite:arch1,arch2
+
+# These test cases failed due to gcc_secure
+conform/ISO/setjmp.h/conform
+conform/ISO/stdlib.h/conform
+conform/ISO/stdlib.h/linknamespace
+conform/ISO/string.h/conform
+conform/ISO11/setjmp.h/conform
+conform/ISO11/stdio.h/conform
+conform/ISO11/stdlib.h/conform
+conform/ISO11/stdlib.h/linknamespace
+conform/ISO11/string.h/conform
+conform/ISO11/wchar.h/conform
+conform/ISO99/setjmp.h/conform
+conform/ISO99/stdio.h/conform
+conform/ISO99/stdlib.h/conform
+conform/ISO99/stdlib.h/linknamespace
+conform/ISO99/string.h/conform
+conform/ISO99/wchar.h/conform
+conform/POSIX/stdlib.h/conform
+conform/POSIX/stdlib.h/linknamespace
+conform/POSIX/string.h/conform
+conform/POSIX2008/fcntl.h/conform
+conform/POSIX2008/mqueue.h/conform
+conform/POSIX2008/stdio.h/conform
+conform/POSIX2008/stdlib.h/conform
+conform/POSIX2008/stdlib.h/linknamespace
+conform/POSIX2008/wchar.h/conform
+conform/UNIX98/stdlib.h/conform
+conform/UNIX98/string.h/conform
+conform/UNIX98/unistd.h/conform
+conform/UNIX98/unistd.h/linknamespace
+conform/UNIX98/wchar.h/conform
+conform/XOPEN2K/fcntl.h/conform
+conform/XOPEN2K/mqueue.h/conform
+conform/XOPEN2K/stdio.h/conform
+conform/XOPEN2K/stdlib.h/conform
+conform/XOPEN2K/string.h/conform
+conform/XOPEN2K/syslog.h/conform
+conform/XOPEN2K/unistd.h/conform
+conform/XOPEN2K/unistd.h/linknamespace
+conform/XOPEN2K/wchar.h/conform
+conform/XOPEN2K8/fcntl.h/conform
+conform/XOPEN2K8/mqueue.h/conform
+conform/XOPEN2K8/stdio.h/conform
+conform/XOPEN2K8/stdlib.h/conform
+conform/XOPEN2K8/syslog.h/conform
+conform/XOPEN2K8/unistd.h/conform
+conform/XOPEN2K8/unistd.h/linknamespace
+conform/XOPEN2K8/wchar.h/conform
+conform/XPG4/stdlib.h/conform
+conform/XPG4/stdlib.h/linknamespace
+conform/XPG4/string.h/conform
+conform/XPG4/unistd.h/conform
+conform/XPG42/stdlib.h/conform
+conform/XPG42/string.h/conform
+conform/XPG42/unistd.h/conform
+elf/circleload1
+elf/constload1
+elf/dblload
+elf/dblunload
+elf/ifuncmain6pie:x86_64
+elf/lateglobal
+elf/reldep6
+elf/resolvfail
+elf/tst-global1
+elf/tst-tls20
+nptl/tst-execstack
+
+# GCC no longer implements <varargs.h>
+conform/UNIX98/varargs.h/conform
+conform/UNIX98/varargs.h/linknamespace
+conform/XPG4/varargs.h/conform
+conform/XPG4/varargs.h/linknamespace
+conform/XPG42/varargs.h/conform
+conform/XPG42/varargs.h/linknamespace
+
+# These cases depend on gdbm-devel
+conform/UNIX98/ndbm.h/conform
+conform/UNIX98/ndbm.h/linknamespace
+conform/XOPEN2K/ndbm.h/conform
+conform/XOPEN2K/ndbm.h/linknamespace
+conform/XOPEN2K8/ndbm.h/conform
+conform/XOPEN2K8/ndbm.h/linknamespace
+conform/XPG42/ndbm.h/conform
+conform/XPG42/ndbm.h/linknamespace
+
+# Test whether the date/time is correct under different
+# language libraries, use case problems, and see that
+# the compiled language library itself has no errors
+# https://sourceware.org/bugzilla/show_bug.cgi?id=23164
+localedata/tst-langinfo-newlocale-static
+
+# The use case itself passed but because
+# test-xfail-tst-protected1a/test-xfail-tst-protected1b was added
+elf/tst-protected1a
+elf/tst-protected1b
+
+# the test case is due to check whether a macro is defined
+# in the header files. As GLIBC evolves, the position of the
+# macro changes, causing the use case to fail
+posix/annexc
+
+# Check whether sys/mman.h is consistent with linux/mman.h.
+# kernel has a self-developed macro that does not require glibc adaptation
+# https://gitee.com/src-openeuler/kernel/issues/I4BZ9T?from=project-issue
+misc/tst-mman-consts
+
+# It need to build GliBC on a platform that supports CET
+elf/check-cet:x86_64
+
+# Add the tst-nss-files-hosts-long.root/etc/hosts of glibc to
+# the /etc/hosts directory of the system, and then run sucess
+nss/tst-nss-files-hosts-long
+
+# The test case fails due to OBS machine restrictions which can be passed locally.
+elf/tst-debug1:aarch64
+
+# This test case often fails in CI which is the high-pressure environment.
+# No better solution is available. This test case is shielded.
+rt/tst-cpuclock2
+
+# These testcase fails because rseq is disabled by default
+misc/tst-rseq-nptl
+misc/tst-rseq
diff --git a/turn-default-value-of-x86_rep_stosb_threshold_form_2K_to_1M.patch b/turn-default-value-of-x86_rep_stosb_threshold_form_2K_to_1M.patch
new file mode 100644
index 0000000..e9e053d
--- /dev/null
+++ b/turn-default-value-of-x86_rep_stosb_threshold_form_2K_to_1M.patch
@@ -0,0 +1,29 @@
+From 4dee2794b8c78ccd540e3f72bc07585828e0143b Mon Sep 17 00:00:00 2001
+From: Yang Yanchao <yangyanchao6@huawei.com>
+Date: Thu, 2 Dec 2021 19:56:20 +0800
+Subject: [PATCH] turn the default value of x86_rep_stosb_threshold from 2k to 1M
+
+x86_rep_stosb_threshold is designed to choose vec mov or stosb.
+For the libMicro, after set this x86_rep_stosb_threshold to 1 MB.
+The performance of memset_256_u, memset_4k_uc, and memset_1m is improved.
+The performance deteriorates in the memset_4k and memset_10k scenarios.
+---
+ sysdeps/x86/dl-tunables.list | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sysdeps/x86/dl-tunables.list b/sysdeps/x86/dl-tunables.list
+index dd6e1d65..a4c3af69 100644
+--- a/sysdeps/x86/dl-tunables.list
++++ b/sysdeps/x86/dl-tunables.list
+@@ -54,7 +54,7 @@ glibc {
+ # stored value is fixed, larger register size has minimal impact
+ # on threshold.
+ minval: 1
+- default: 2048
++ default: 1048576
+ }
+ x86_data_cache_size {
+ type: SIZE_T
+--
+2.30.0
+
diff --git a/use-region-to-instead-of-country-for-extract-timezon.patch b/use-region-to-instead-of-country-for-extract-timezon.patch
new file mode 100644
index 0000000..7e8eb07
--- /dev/null
+++ b/use-region-to-instead-of-country-for-extract-timezon.patch
@@ -0,0 +1,152 @@
+From 1c20cf491471a4a70f103a9d052fcca993eaa341 Mon Sep 17 00:00:00 2001
+From: Qingqing Li <liqingqing3@huawei.com>
+Date: Tue, 22 Feb 2022 15:00:55 +0800
+Subject: [PATCH] use region to instead of country for extract timezone
+ selection.
+Co-authored-by: liusirui <liusirui@huawei.com>
+---
+ timezone/tzselect.ksh | 97 +++++++++----------------------------------
+ 1 file changed, 20 insertions(+), 77 deletions(-)
+
+diff --git a/timezone/tzselect.ksh b/timezone/tzselect.ksh
+index 18fce27e..414bfa2a 100755
+--- a/timezone/tzselect.ksh
++++ b/timezone/tzselect.ksh
+@@ -51,7 +51,7 @@ say() {
+
+ coord=
+ location_limit=10
+-zonetabtype=zone1970
++zonetabtype=zone
+
+ usage="Usage: tzselect [--version] [--help] [-c COORD] [-n LIMIT]
+ Select a timezone interactively.
+@@ -398,94 +398,38 @@ while
+ '`
+ ;;
+ *)
+- # Get list of names of countries in the continent or ocean.
+- countries=`$AWK \
++ # Get list of regions in the continent or ocean.
++ timezones=`$AWK \
+ -v continent="$continent" \
+ -v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \
+ '
+ BEGIN { FS = "\t" }
+ /^#/ { next }
+ $3 ~ ("^" continent "/") {
+- ncc = split($1, cc, /,/)
++ ncc = split($3, cc, /,/)
+ for (i = 1; i <= ncc; i++)
+ if (!cc_seen[cc[i]]++) cc_list[++ccs] = cc[i]
+ }
+ END {
+- while (getline <TZ_COUNTRY_TABLE) {
+- if ($0 !~ /^#/) cc_name[$1] = $2
+- }
+ for (i = 1; i <= ccs; i++) {
+- country = cc_list[i]
+- if (cc_name[country]) {
+- country = cc_name[country]
+- }
+- print country
++ print cc_list[i]
+ }
+ }
+ ' <"$TZ_ZONE_TABLE" | sort -f`
+
+-
+- # If there's more than one country, ask the user which one.
+- case $countries in
+- *"$newline"*)
+- echo >&2 'Please select a country' \
+- 'whose clocks agree with yours.'
+- doselect $countries
+- country=$select_result;;
+- *)
+- country=$countries
+- esac
+-
+-
+- # Get list of timezones in the country.
+- regions=`$AWK \
+- -v country="$country" \
+- -v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \
+- '
+- BEGIN {
+- FS = "\t"
+- cc = country
+- while (getline <TZ_COUNTRY_TABLE) {
+- if ($0 !~ /^#/ && country == $2) {
+- cc = $1
+- break
+- }
+- }
+- }
+- /^#/ { next }
+- $1 ~ cc { print $4 }
+- ' <"$TZ_ZONE_TABLE"`
+-
+-
+- # If there's more than one region, ask the user which one.
+- case $regions in
+- *"$newline"*)
+- echo >&2 'Please select one of the following timezones.'
+- doselect $regions
+- region=$select_result;;
+- *)
+- region=$regions
+- esac
++ regions=[]
++ index=0
++ for item in $timezones; do
++ regions[$index]=`echo $item | awk -F '/' '{print $2}'`
++ index=$(($index+1))
++ done
++ echo >&2 'Please select a timezone' \
++ 'whose clocks agree with yours.'
++ doselect ${regions[@]}
++ region=$select_result
+
+ # Determine TZ from country and region.
+- TZ=`$AWK \
+- -v country="$country" \
+- -v region="$region" \
+- -v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \
+- '
+- BEGIN {
+- FS = "\t"
+- cc = country
+- while (getline <TZ_COUNTRY_TABLE) {
+- if ($0 !~ /^#/ && country == $2) {
+- cc = $1
+- break
+- }
+- }
+- }
+- /^#/ { next }
+- $1 ~ cc && $4 == region { print $3 }
+- ' <"$TZ_ZONE_TABLE"`
++ TZ=$continent/$region
+ esac
+
+ # Make sure the corresponding zoneinfo file exists.
+@@ -523,11 +467,10 @@ Universal Time is now: $UTdate."
+ echo >&2 ""
+ echo >&2 "The following information has been given:"
+ echo >&2 ""
+- case $country%$region%$coord in
+- ?*%?*%) say >&2 " $country$newline $region";;
+- ?*%%) say >&2 " $country";;
+- %?*%?*) say >&2 " coord $coord$newline $region";;
+- %%?*) say >&2 " coord $coord";;
++ case $region%$coord in
++ ?*%) say >&2 " $region";;
++ ?*%?*) say >&2 " coord $coord$newline $region";;
++ %?*) say >&2 " coord $coord";;
+ *) say >&2 " TZ='$TZ'"
+ esac
+ say >&2 ""
+--
+2.27.0
+
diff --git a/x86-use-total-l3cache-for-non_temporal_threshold.patch b/x86-use-total-l3cache-for-non_temporal_threshold.patch
new file mode 100644
index 0000000..739f3b1
--- /dev/null
+++ b/x86-use-total-l3cache-for-non_temporal_threshold.patch
@@ -0,0 +1,74 @@
+From af0606f5d626b92d6e59da3a797548e9daab5580 Mon Sep 17 00:00:00 2001
+From: Qingqing Li <liqingqing3@huawei.com>
+Date: Sat, 25 Jun 2022 15:36:44 +0800
+Subject: [PATCH] x86: use total l3cache for non_temporal_threshold
+
+Below glibc upstream patch modified the default behavoir for large size of memcpy,
+such as 1M~10M. revert it and use GLIBC_TUNABLES="glibc.cpu.x86_non_temporal_threshold=xxx"
+to tune the application when needed.
+
+d3c57027470b78dba79c6d931e4e409b1fecfc80
+Author: Patrick McGehearty <patrick.mcgehearty@oracle.com>
+Date: Mon Sep 28 20:11:28 2020 +0000
+
+ Reversing calculation of __x86_shared_non_temporal_threshold
+
+ The __x86_shared_non_temporal_threshold determines when memcpy on x86
+ uses non_temporal stores to avoid pushing other data out of the last
+ level cache.
+ uses non_temporal stores to avoid pushing other data out of the last
+ level cache.
+
+ This patch proposes to revert the calculation change made by H.J. Lu's
+ patch of June 2, 2017.
+
+ H.J. Lu's patch selected a threshold suitable for a single thread
+ getting maximum performance. It was tuned using the single threaded
+ large memcpy micro benchmark on an 8 core processor. The last change
+ changes the threshold from using 3/4 of one thread's share of the
+ cache to using 3/4 of the entire cache of a multi-threaded system
+ before switching to non-temporal stores. Multi-threaded systems with
+ more than a few threads are server-class and typically have many
+ active threads. If one thread consumes 3/4 of the available cache for
+ all threads, it will cause other active threads to have data removed
+ from the cache. Two examples show the range of the effect. John
+ McCalpin's widely parallel Stream benchmark, which runs in parallel
+ and fetches data sequentially, saw a 20% slowdown with this patch on
+ an internal system test of 128 threads. This regression was discovered
+ when comparing OL8 performance to OL7. An example that compares
+ normal stores to non-temporal stores may be found at
+ https://vgatherps.github.io/2018-09-02-nontemporal/. A simple test
+ shows performance loss of 400 to 500% due to a failure to use
+ nontemporal stores. These performance losses are most likely to occur
+ when the system load is heaviest and good performance is critical.
+
+ The tunable x86_non_temporal_threshold can be used to override the
+ default for the knowledgable user who really wants maximum cache
+ allocation to a single thread in a multi-threaded system.
+ The manual entry for the tunable has been expanded to provide
+ more information about its purpose.
+
+ modified: sysdeps/x86/cacheinfo.c
+ modified: manual/tunables.texi
+---
+ sysdeps/x86/dl-cacheinfo.h | 4 ++++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/sysdeps/x86/dl-cacheinfo.h b/sysdeps/x86/dl-cacheinfo.h
+index e6c94dfd..c5e8deb3 100644
+--- a/sysdeps/x86/dl-cacheinfo.h
++++ b/sysdeps/x86/dl-cacheinfo.h
+@@ -926,6 +926,10 @@ dl_init_cacheinfo (struct cpu_features *cpu_features)
+ if (tunable_size != 0)
+ shared = tunable_size;
+
++ /* keep x86 to use the same non_temporal_threshold like glibc2.28 */
++ if (threads != 0)
++ non_temporal_threshold *= threads;
++
+ tunable_size = TUNABLE_GET (x86_non_temporal_threshold, long int, NULL);
+ if (tunable_size > minimum_non_temporal_threshold
+ && tunable_size <= maximum_non_temporal_threshold)
+--
+2.30.0
+