summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc/glibc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/glibc/glibc')
-rw-r--r--meta/recipes-core/glibc/glibc/0001-locale-fix-hard-coded-reference-to-gcc-E.patch39
-rw-r--r--meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch12
-rw-r--r--meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch10
-rw-r--r--meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch146
-rw-r--r--meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch42
-rw-r--r--meta/recipes-core/glibc/glibc/0005-nativesdk-glibc-Make-relocatable-install-for-locales.patch70
-rw-r--r--meta/recipes-core/glibc/glibc/0006-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch (renamed from meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch)82
-rw-r--r--meta/recipes-core/glibc/glibc/0007-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch (renamed from meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch)8
-rw-r--r--meta/recipes-core/glibc/glibc/0008-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch (renamed from meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch)30
-rw-r--r--meta/recipes-core/glibc/glibc/0009-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch (renamed from meta/recipes-core/glibc/glibc/0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch)30
-rw-r--r--meta/recipes-core/glibc/glibc/0010-Quote-from-bug-1443-which-explains-what-the-patch-do.patch (renamed from meta/recipes-core/glibc/glibc/0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch)10
-rw-r--r--meta/recipes-core/glibc/glibc/0011-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch (renamed from meta/recipes-core/glibc/glibc/0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch)20
-rw-r--r--meta/recipes-core/glibc/glibc/0012-Make-ld-version-output-matching-grok-gold-s-output.patch44
-rw-r--r--meta/recipes-core/glibc/glibc/0012-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch (renamed from meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch)10
-rw-r--r--meta/recipes-core/glibc/glibc/0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch10
-rw-r--r--meta/recipes-core/glibc/glibc/0014-Add-unused-attribute.patch8
-rw-r--r--meta/recipes-core/glibc/glibc/0015-yes-within-the-path-sets-wrong-config-variables.patch30
-rw-r--r--meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch14
-rw-r--r--meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch12
-rw-r--r--meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch14
-rw-r--r--meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch16
-rw-r--r--meta/recipes-core/glibc/glibc/0020-eglibc-Clear-cache-lines-on-ppc8xx.patch (renamed from meta/recipes-core/glibc/glibc/0021-eglibc-Clear-cache-lines-on-ppc8xx.patch)10
-rw-r--r--meta/recipes-core/glibc/glibc/0020-eglibc-cherry-picked-from.patch64
-rw-r--r--meta/recipes-core/glibc/glibc/0021-eglibc-Resolve-__fpscr_values-on-SH4.patch (renamed from meta/recipes-core/glibc/glibc/0022-eglibc-Resolve-__fpscr_values-on-SH4.patch)10
-rw-r--r--meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch (renamed from meta/recipes-core/glibc/glibc/0024-eglibc-Forward-port-cross-locale-generation-support.patch)120
-rw-r--r--meta/recipes-core/glibc/glibc/0023-Define-DUMMY_LOCALE_T-if-not-defined.patch (renamed from meta/recipes-core/glibc/glibc/0025-Define-DUMMY_LOCALE_T-if-not-defined.patch)8
-rw-r--r--meta/recipes-core/glibc/glibc/0023-eglibc-Install-PIC-archives.patch123
-rw-r--r--meta/recipes-core/glibc/glibc/0024-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch84
-rw-r--r--meta/recipes-core/glibc/glibc/0025-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch (renamed from meta/recipes-core/glibc/glibc/0026-build_local_scope.patch)8
-rw-r--r--meta/recipes-core/glibc/glibc/0026-intl-Emit-no-lines-in-bison-generated-files.patch34
-rw-r--r--meta/recipes-core/glibc/glibc/0027-inject-file-assembly-directives.patch304
-rw-r--r--meta/recipes-core/glibc/glibc/0028-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch56
-rw-r--r--meta/recipes-core/glibc/glibc/CVE-2019-19126.patch32
-rw-r--r--meta/recipes-core/glibc/glibc/add-cross-localedef-hardlink.patch1115
-rw-r--r--meta/recipes-core/glibc/glibc/allow-compile-separate-from-util-linux-hardlink.patch226
-rw-r--r--meta/recipes-core/glibc/glibc/check-test-wrapper71
-rw-r--r--meta/recipes-core/glibc/glibc/etc/ld.so.conf1
-rwxr-xr-xmeta/recipes-core/glibc/glibc/makedbs.sh177
38 files changed, 2489 insertions, 611 deletions
diff --git a/meta/recipes-core/glibc/glibc/0001-locale-fix-hard-coded-reference-to-gcc-E.patch b/meta/recipes-core/glibc/glibc/0001-locale-fix-hard-coded-reference-to-gcc-E.patch
deleted file mode 100644
index d5fce7371b..0000000000
--- a/meta/recipes-core/glibc/glibc/0001-locale-fix-hard-coded-reference-to-gcc-E.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 2c0ab83eb54c0e0fccbf261726dc03803b236079 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rosen?= <jeremy.rosen@smile.fr>
-Date: Mon, 22 Aug 2016 16:09:25 +0200
-Subject: [PATCH] locale: fix hard-coded reference to gcc -E
-
-When new version of compilers are published, they may not be compatible with
-older versions of software. This is particularly common when software is built
-with -Werror.
-
-Autotools provides a way for a user to specify the name of his compiler using a
-set of variables ($CC $CXX $CPP etc.). Those variables are used correctly when
-compiling glibc but the script used to generate transliterations in the locale/
-subdirectory directly calls the gcc binary to get the output of the
-preprocessor instead of using the $CPP variable provided by the build
-environment.
-
-This patch replaces the hard-coded reference to the gcc binary with the proper
-environment variable, thus allowing a user to override it.
-
-Upstream-Status : Submitted [https://sourceware.org/ml/libc-alpha/2016-08/msg00746.html]
-
----
- locale/gen-translit.pl | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/locale/gen-translit.pl b/locale/gen-translit.pl
-index 30d3f2f..7b287fa 100644
---- a/locale/gen-translit.pl
-+++ b/locale/gen-translit.pl
-@@ -1,5 +1,5 @@
- #!/usr/bin/perl -w
--open F, "cat C-translit.h.in | gcc -E - |" || die "Cannot preprocess input file";
-+open F, 'cat C-translit.h.in | ${CPP:-gcc -E} - |' || die "Cannot preprocess input file";
-
-
- sub cstrlen {
---
-2.9.3
-
diff --git a/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch b/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch
index ca3375805d..d86d1d8dc7 100644
--- a/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch
+++ b/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch
@@ -1,7 +1,7 @@
-From 7e11aafc3a7cb873b3f648740c8acd379597e4d1 Mon Sep 17 00:00:00 2001
+From f6984c923b41155979764bfa3f44609572be5414 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 01:48:24 +0000
-Subject: [PATCH 01/25] nativesdk-glibc: Look for host system ld.so.cache as
+Subject: [PATCH 01/28] nativesdk-glibc: Look for host system ld.so.cache as
well
Upstream-Status: Inappropriate [embedded specific]
@@ -31,10 +31,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/elf/dl-load.c b/elf/dl-load.c
-index c0d6249..2c73105 100644
+index 5abeb867f1..981bd5b4af 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
-@@ -2094,6 +2094,14 @@ _dl_map_object (struct link_map *loader, const char *name,
+@@ -2080,6 +2080,14 @@ _dl_map_object (struct link_map *loader, const char *name,
}
}
@@ -49,7 +49,7 @@ index c0d6249..2c73105 100644
#ifdef USE_LDCONFIG
if (fd == -1
&& (__glibc_likely ((mode & __RTLD_SECURE) == 0)
-@@ -2152,14 +2160,6 @@ _dl_map_object (struct link_map *loader, const char *name,
+@@ -2138,14 +2146,6 @@ _dl_map_object (struct link_map *loader, const char *name,
}
#endif
@@ -65,5 +65,5 @@ index c0d6249..2c73105 100644
if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
_dl_debug_printf ("\n");
--
-2.8.2
+2.22.0
diff --git a/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch b/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch
index 5428468c5a..63531082a4 100644
--- a/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch
+++ b/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch
@@ -1,7 +1,7 @@
-From 5fd884dc28d5d84001fae8ffdd8be698bb84143e Mon Sep 17 00:00:00 2001
+From b91c323d809039bf9b8c445418579a8b5fe61aea Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 01:50:00 +0000
-Subject: [PATCH 02/25] nativesdk-glibc: Fix buffer overrun with a relocated
+Subject: [PATCH 02/28] nativesdk-glibc: Fix buffer overrun with a relocated
SDK
When ld-linux-*.so.2 is relocated to a path that is longer than the
@@ -22,10 +22,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 12 insertions(+)
diff --git a/elf/dl-load.c b/elf/dl-load.c
-index 2c73105..c7b8797 100644
+index 981bd5b4af..c7a0fa58cb 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
-@@ -1793,7 +1793,19 @@ open_path (const char *name, size_t namelen, int mode,
+@@ -1780,7 +1780,19 @@ open_path (const char *name, size_t namelen, int mode,
given on the command line when rtld is run directly. */
return -1;
@@ -46,5 +46,5 @@ index 2c73105..c7b8797 100644
{
struct r_search_path_elem *this_dir = *dirs;
--
-2.8.2
+2.22.0
diff --git a/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch b/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch
index 7cba6cc367..48f5a78716 100644
--- a/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch
+++ b/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch
@@ -1,7 +1,7 @@
-From c99892f2018cd7fa0f37b53e6cebec99fa036472 Mon Sep 17 00:00:00 2001
+From 3aceb84e2bc0f796204fe059beede91179b1bc6e Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 01:51:38 +0000
-Subject: [PATCH 03/25] nativesdk-glibc: Raise the size of arrays containing dl
+Subject: [PATCH 03/28] nativesdk-glibc: Raise the size of arrays containing dl
paths
This patch puts the dynamic loader path in the binaries, SYSTEM_DIRS strings
@@ -21,14 +21,15 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
elf/interp.c | 2 +-
elf/ldconfig.c | 3 +++
elf/rtld.c | 5 +++--
+ iconv/gconv_conf.c | 2 +-
sysdeps/generic/dl-cache.h | 4 ----
- 6 files changed, 13 insertions(+), 9 deletions(-)
+ 7 files changed, 14 insertions(+), 10 deletions(-)
-Index: git/elf/dl-cache.c
-===================================================================
---- git.orig/elf/dl-cache.c
-+++ git/elf/dl-cache.c
-@@ -132,6 +132,10 @@ do \
+diff --git a/elf/dl-cache.c b/elf/dl-cache.c
+index d8d1e2344e..d2247bfc4f 100644
+--- a/elf/dl-cache.c
++++ b/elf/dl-cache.c
+@@ -133,6 +133,10 @@ do \
while (0)
@@ -37,14 +38,14 @@ Index: git/elf/dl-cache.c
+
+
int
- internal_function
_dl_cache_libcmp (const char *p1, const char *p2)
-Index: git/elf/dl-load.c
-===================================================================
---- git.orig/elf/dl-load.c
-+++ git/elf/dl-load.c
-@@ -106,8 +106,8 @@ static size_t max_capstrlen attribute_re
- /* Get the generated information about the trusted directories. */
+ {
+diff --git a/elf/dl-load.c b/elf/dl-load.c
+index c7a0fa58cb..4b87505d45 100644
+--- a/elf/dl-load.c
++++ b/elf/dl-load.c
+@@ -110,8 +110,8 @@ static size_t max_capstrlen attribute_relro;
+ gen-trusted-dirs.awk. */
#include "trusted-dirs.h"
-static const char system_dirs[] = SYSTEM_DIRS;
@@ -54,10 +55,10 @@ Index: git/elf/dl-load.c
{
SYSTEM_DIRS_LEN
};
-Index: git/elf/interp.c
-===================================================================
---- git.orig/elf/interp.c
-+++ git/elf/interp.c
+diff --git a/elf/interp.c b/elf/interp.c
+index 243829f5f7..0e74241703 100644
+--- a/elf/interp.c
++++ b/elf/interp.c
@@ -18,5 +18,5 @@
#include <runtime-linker.h>
@@ -65,10 +66,10 @@ Index: git/elf/interp.c
-const char __invoke_dynamic_linker__[] __attribute__ ((section (".interp")))
+const char __invoke_dynamic_linker__[4096] __attribute__ ((section (".interp")))
= RUNTIME_LINKER;
-Index: git/elf/ldconfig.c
-===================================================================
---- git.orig/elf/ldconfig.c
-+++ git/elf/ldconfig.c
+diff --git a/elf/ldconfig.c b/elf/ldconfig.c
+index 3bc9e61891..6a23096435 100644
+--- a/elf/ldconfig.c
++++ b/elf/ldconfig.c
@@ -168,6 +168,9 @@ static struct argp argp =
options, parse_opt, NULL, doc, NULL, more_help, NULL
};
@@ -79,19 +80,19 @@ Index: git/elf/ldconfig.c
/* Check if string corresponds to an important hardware capability or
a platform. */
static int
-Index: git/elf/rtld.c
-===================================================================
---- git.orig/elf/rtld.c
-+++ git/elf/rtld.c
-@@ -99,6 +99,7 @@ uintptr_t __pointer_chk_guard_local
- strong_alias (__pointer_chk_guard_local, __pointer_chk_guard)
- #endif
-
+diff --git a/elf/rtld.c b/elf/rtld.c
+index c9490ff694..3962373ebb 100644
+--- a/elf/rtld.c
++++ b/elf/rtld.c
+@@ -173,6 +173,7 @@ dso_name_valid_for_suid (const char *p)
+ }
+ return *p != '\0';
+ }
+extern const char LD_SO_CACHE[4096] __attribute__ ((section (".ldsocache")));
- /* List of auditing DSOs. */
- static struct audit_list
-@@ -873,12 +874,12 @@ of this helper program; chances are you
+ /* LD_AUDIT variable contents. Must be processed before the
+ audit_list below. */
+@@ -1220,13 +1221,13 @@ of this helper program; chances are you did not intend to run this program.\n\
--list list all dependencies and how they are resolved\n\
--verify verify that given object really is a dynamically linked\n\
object we can handle\n\
@@ -101,15 +102,29 @@ Index: git/elf/rtld.c
variable LD_LIBRARY_PATH\n\
--inhibit-rpath LIST ignore RUNPATH and RPATH information in object names\n\
in LIST\n\
-- --audit LIST use objects named in LIST as auditors\n");
-+ --audit LIST use objects named in LIST as auditors\n", LD_SO_CACHE);
+ --audit LIST use objects named in LIST as auditors\n\
+- --preload LIST preload objects named in LIST\n");
++ --preload LIST preload objects named in LIST\n", LD_SO_CACHE);
++_dl_skip_args;
--_dl_argc;
-Index: git/sysdeps/generic/dl-cache.h
-===================================================================
---- git.orig/sysdeps/generic/dl-cache.h
-+++ git/sysdeps/generic/dl-cache.h
+diff --git a/iconv/gconv_conf.c b/iconv/gconv_conf.c
+index ae8937cba0..f321ee419e 100644
+--- a/iconv/gconv_conf.c
++++ b/iconv/gconv_conf.c
+@@ -36,7 +36,7 @@
+
+
+ /* This is the default path where we look for module lists. */
+-static const char default_gconv_path[] = GCONV_PATH;
++static char default_gconv_path[4096] __attribute__ ((section (".gccrelocprefix"))) = GCONV_PATH;
+
+ /* Type to represent search path. */
+ struct path_elem
+diff --git a/sysdeps/generic/dl-cache.h b/sysdeps/generic/dl-cache.h
+index bc8b40331d..b0fdd2144b 100644
+--- a/sysdeps/generic/dl-cache.h
++++ b/sysdeps/generic/dl-cache.h
@@ -27,10 +27,6 @@
((flags) == 1 || (flags) == _DL_CACHE_DEFAULT_ID)
#endif
@@ -121,51 +136,6 @@ Index: git/sysdeps/generic/dl-cache.h
#ifndef add_system_dir
# define add_system_dir(dir) add_dir (dir)
#endif
-Index: git/iconv/gconv_conf.c
-===================================================================
---- git.orig/iconv/gconv_conf.c
-+++ git/iconv/gconv_conf.c
-@@ -36,7 +36,7 @@
-
-
- /* This is the default path where we look for module lists. */
--static const char default_gconv_path[] = GCONV_PATH;
-+static char default_gconv_path[4096] __attribute__ ((section (".gccrelocprefix"))) = GCONV_PATH;
-
- /* The path elements, as determined by the __gconv_get_path function.
- All path elements end in a slash. */
-Index: git/locale/findlocale.c
-===================================================================
---- git.orig/locale/findlocale.c
-+++ git/locale/findlocale.c
-@@ -56,7 +56,7 @@ struct __locale_data *const _nl_C[] attr
- which are somehow addressed. */
- struct loaded_l10nfile *_nl_locale_file_list[__LC_LAST];
-
--const char _nl_default_locale_path[] attribute_hidden = COMPLOCALEDIR;
-+char _nl_default_locale_path[4096] __attribute__ ((section (".gccrelocprefix"))) attribute_hidden = COMPLOCALEDIR;
-
- /* Checks if the name is actually present, that is, not NULL and not
- empty. */
-@@ -168,7 +168,7 @@ _nl_find_locale (const char *locale_path
-
- /* Nothing in the archive. Set the default path to search below. */
- locale_path = _nl_default_locale_path;
-- locale_path_len = sizeof _nl_default_locale_path;
-+ locale_path_len = strlen(_nl_default_locale_path) + 1;
- }
- else
- /* We really have to load some data. First see whether the name is
-Index: git/locale/localeinfo.h
-===================================================================
---- git.orig/locale/localeinfo.h
-+++ git/locale/localeinfo.h
-@@ -322,7 +322,7 @@ _nl_lookup_word (locale_t l, int categor
- }
-
- /* Default search path if no LOCPATH environment variable. */
--extern const char _nl_default_locale_path[] attribute_hidden;
-+extern char _nl_default_locale_path[] attribute_hidden;
-
- /* Load the locale data for CATEGORY from the file specified by *NAME.
- If *NAME is "", use environment variables as specified by POSIX, and
+--
+2.22.0
+
diff --git a/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch b/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch
index 3127de68ec..a43f294345 100644
--- a/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch
+++ b/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch
@@ -1,34 +1,42 @@
-From a56e7aa2fd10b178b9498f88a7a2ca8aad671a53 Mon Sep 17 00:00:00 2001
+From e41e042149eac349e09fa629fcac4c64e574322c Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 31 Dec 2015 14:35:35 -0800
-Subject: [PATCH 04/25] nativesdk-glibc: Allow 64 bit atomics for x86
+Subject: [PATCH 04/28] nativesdk-glibc: Allow 64 bit atomics for x86
The fix consist of allowing 64bit atomic ops for x86.
This should be safe for i586 and newer CPUs.
It also makes the synchronization more efficient.
+Upstream-Status: Inappropriate [OE-Specific]
+
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
-Upstream-Status: Pending
-
- sysdeps/i386/atomic-machine.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+ sysdeps/x86/atomic-machine.h | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
-diff --git a/sysdeps/i386/atomic-machine.h b/sysdeps/i386/atomic-machine.h
-index ce62b33..4fe44ea 100644
---- a/sysdeps/i386/atomic-machine.h
-+++ b/sysdeps/i386/atomic-machine.h
-@@ -54,7 +54,7 @@ typedef uintmax_t uatomic_max_t;
- # endif
+diff --git a/sysdeps/x86/atomic-machine.h b/sysdeps/x86/atomic-machine.h
+index aa60ca4cd6..3e42e00183 100644
+--- a/sysdeps/x86/atomic-machine.h
++++ b/sysdeps/x86/atomic-machine.h
+@@ -58,15 +58,14 @@ typedef uintmax_t uatomic_max_t;
#endif
--#define __HAVE_64B_ATOMICS 0
-+#define __HAVE_64B_ATOMICS 1
- #define USE_ATOMIC_COMPILER_BUILTINS 0
-
+ #define USE_ATOMIC_COMPILER_BUILTINS 1
++# define __HAVE_64B_ATOMICS 1
+ #ifdef __x86_64__
+-# define __HAVE_64B_ATOMICS 1
+ # define SP_REG "rsp"
+ # define SEG_REG "fs"
+ # define BR_CONSTRAINT "q"
+ # define IBR_CONSTRAINT "iq"
+ #else
+-# define __HAVE_64B_ATOMICS 0
+ # define SP_REG "esp"
+ # define SEG_REG "gs"
+ # define BR_CONSTRAINT "r"
--
-2.8.2
+2.22.0
diff --git a/meta/recipes-core/glibc/glibc/0005-nativesdk-glibc-Make-relocatable-install-for-locales.patch b/meta/recipes-core/glibc/glibc/0005-nativesdk-glibc-Make-relocatable-install-for-locales.patch
new file mode 100644
index 0000000000..3aad603ada
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0005-nativesdk-glibc-Make-relocatable-install-for-locales.patch
@@ -0,0 +1,70 @@
+From 50ab0b0c116f4ae3d975ec1b15ed4595fd9147f6 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 3 Aug 2018 09:55:12 -0700
+Subject: [PATCH 05/28] nativesdk-glibc: Make relocatable install for locales
+
+The glibc locale path is hard-coded to the install prefix, but in SDKs we need
+to be able to relocate the binaries. Expand the strings to 4K and put them in a
+magic segment that we can relocate at install time.
+
+Upstream-Status: Inappropriate (OE-specific)
+
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ locale/findlocale.c | 4 ++--
+ locale/loadarchive.c | 2 +-
+ locale/localeinfo.h | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/locale/findlocale.c b/locale/findlocale.c
+index 9af605bd64..b2b0a3f93b 100644
+--- a/locale/findlocale.c
++++ b/locale/findlocale.c
+@@ -56,7 +56,7 @@ struct __locale_data *const _nl_C[] attribute_hidden =
+ which are somehow addressed. */
+ struct loaded_l10nfile *_nl_locale_file_list[__LC_LAST];
+
+-const char _nl_default_locale_path[] attribute_hidden = COMPLOCALEDIR;
++char _nl_default_locale_path[4096] attribute_hidden __attribute__ ((section (".gccrelocprefix"))) = COMPLOCALEDIR;
+
+ /* Checks if the name is actually present, that is, not NULL and not
+ empty. */
+@@ -167,7 +167,7 @@ _nl_find_locale (const char *locale_path, size_t locale_path_len,
+
+ /* Nothing in the archive. Set the default path to search below. */
+ locale_path = _nl_default_locale_path;
+- locale_path_len = sizeof _nl_default_locale_path;
++ locale_path_len = strlen(locale_path) + 1;
+ }
+ else
+ /* We really have to load some data. First see whether the name is
+diff --git a/locale/loadarchive.c b/locale/loadarchive.c
+index 803c1cf2a4..9023f475b8 100644
+--- a/locale/loadarchive.c
++++ b/locale/loadarchive.c
+@@ -42,7 +42,7 @@
+
+
+ /* Name of the locale archive file. */
+-static const char archfname[] = COMPLOCALEDIR "/locale-archive";
++static const char archfname[4096] __attribute__ ((section (".gccrelocprefix"))) = COMPLOCALEDIR "/locale-archive";
+
+ /* Size of initial mapping window, optimal if large enough to
+ cover the header plus the initial locale. */
+diff --git a/locale/localeinfo.h b/locale/localeinfo.h
+index 7c1cc3eecb..53cb8bfc59 100644
+--- a/locale/localeinfo.h
++++ b/locale/localeinfo.h
+@@ -325,7 +325,7 @@ _nl_lookup_word (locale_t l, int category, int item)
+ }
+
+ /* Default search path if no LOCPATH environment variable. */
+-extern const char _nl_default_locale_path[] attribute_hidden;
++extern char _nl_default_locale_path[4096] attribute_hidden;
+
+ /* Load the locale data for CATEGORY from the file specified by *NAME.
+ If *NAME is "", use environment variables as specified by POSIX, and
+--
+2.22.0
+
diff --git a/meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch b/meta/recipes-core/glibc/glibc/0006-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch
index dc0dfad9a8..5e1c591432 100644
--- a/meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch
+++ b/meta/recipes-core/glibc/glibc/0006-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch
@@ -1,31 +1,31 @@
-From 450473ce27b47cebec2c5c5b611a8c8bed41e6e8 Mon Sep 17 00:00:00 2001
+From 7cccf5cec09f2a42cc3fe5d82ce21b7309330b33 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:01:50 +0000
-Subject: [PATCH 05/25] fsl e500/e5500/e6500/603e fsqrt implementation
+Subject: [PATCH 06/28] fsl e500/e5500/e6500/603e fsqrt implementation
Upstream-Status: Pending
Signed-off-by: Edmar Wienskoski <edmar@freescale.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
- sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | 134 +++++++++++++++++++++
- sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | 101 ++++++++++++++++
- sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | 134 +++++++++++++++++++++
- sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | 101 ++++++++++++++++
- sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | 134 +++++++++++++++++++++
- sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | 101 ++++++++++++++++
- sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | 134 +++++++++++++++++++++
- sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | 101 ++++++++++++++++
- sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | 134 +++++++++++++++++++++
- sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | 101 ++++++++++++++++
- sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | 134 +++++++++++++++++++++
- sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | 101 ++++++++++++++++
- .../sysv/linux/powerpc/powerpc32/603e/fpu/Implies | 1 +
- .../linux/powerpc/powerpc32/e300c3/fpu/Implies | 2 +
- .../linux/powerpc/powerpc32/e500mc/fpu/Implies | 1 +
- .../sysv/linux/powerpc/powerpc32/e5500/fpu/Implies | 1 +
- .../sysv/linux/powerpc/powerpc32/e6500/fpu/Implies | 1 +
- .../sysv/linux/powerpc/powerpc64/e5500/fpu/Implies | 1 +
- .../sysv/linux/powerpc/powerpc64/e6500/fpu/Implies | 1 +
+ sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | 134 ++++++++++++++++++
+ sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | 101 +++++++++++++
+ sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | 134 ++++++++++++++++++
+ .../powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | 101 +++++++++++++
+ sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | 134 ++++++++++++++++++
+ sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | 101 +++++++++++++
+ sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | 134 ++++++++++++++++++
+ sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | 101 +++++++++++++
+ sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | 134 ++++++++++++++++++
+ sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | 101 +++++++++++++
+ sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | 134 ++++++++++++++++++
+ sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | 101 +++++++++++++
+ .../linux/powerpc/powerpc32/603e/fpu/Implies | 1 +
+ .../powerpc/powerpc32/e300c3/fpu/Implies | 2 +
+ .../powerpc/powerpc32/e500mc/fpu/Implies | 1 +
+ .../linux/powerpc/powerpc32/e5500/fpu/Implies | 1 +
+ .../linux/powerpc/powerpc32/e6500/fpu/Implies | 1 +
+ .../linux/powerpc/powerpc64/e5500/fpu/Implies | 1 +
+ .../linux/powerpc/powerpc64/e6500/fpu/Implies | 1 +
19 files changed, 1418 insertions(+)
create mode 100644 sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
create mode 100644 sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
@@ -49,7 +49,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
new file mode 100644
-index 0000000..71e516d
+index 0000000000..71e516d1c8
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
@@ -0,0 +1,134 @@
@@ -189,7 +189,7 @@ index 0000000..71e516d
+}
diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
new file mode 100644
-index 0000000..26fa067
+index 0000000000..26fa067abf
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
@@ -0,0 +1,101 @@
@@ -296,7 +296,7 @@ index 0000000..26fa067
+}
diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
new file mode 100644
-index 0000000..71e516d
+index 0000000000..71e516d1c8
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
@@ -0,0 +1,134 @@
@@ -436,7 +436,7 @@ index 0000000..71e516d
+}
diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
new file mode 100644
-index 0000000..26fa067
+index 0000000000..26fa067abf
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
@@ -0,0 +1,101 @@
@@ -543,7 +543,7 @@ index 0000000..26fa067
+}
diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
new file mode 100644
-index 0000000..71e516d
+index 0000000000..71e516d1c8
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
@@ -0,0 +1,134 @@
@@ -683,7 +683,7 @@ index 0000000..71e516d
+}
diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
new file mode 100644
-index 0000000..26fa067
+index 0000000000..26fa067abf
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
@@ -0,0 +1,101 @@
@@ -790,7 +790,7 @@ index 0000000..26fa067
+}
diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
new file mode 100644
-index 0000000..71e516d
+index 0000000000..71e516d1c8
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
@@ -0,0 +1,134 @@
@@ -930,7 +930,7 @@ index 0000000..71e516d
+}
diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
new file mode 100644
-index 0000000..26fa067
+index 0000000000..26fa067abf
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
@@ -0,0 +1,101 @@
@@ -1037,7 +1037,7 @@ index 0000000..26fa067
+}
diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
new file mode 100644
-index 0000000..71e516d
+index 0000000000..71e516d1c8
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
@@ -0,0 +1,134 @@
@@ -1177,7 +1177,7 @@ index 0000000..71e516d
+}
diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
new file mode 100644
-index 0000000..26fa067
+index 0000000000..26fa067abf
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
@@ -0,0 +1,101 @@
@@ -1284,7 +1284,7 @@ index 0000000..26fa067
+}
diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
new file mode 100644
-index 0000000..71e516d
+index 0000000000..71e516d1c8
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
@@ -0,0 +1,134 @@
@@ -1424,7 +1424,7 @@ index 0000000..71e516d
+}
diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
new file mode 100644
-index 0000000..26fa067
+index 0000000000..26fa067abf
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
@@ -0,0 +1,101 @@
@@ -1531,14 +1531,14 @@ index 0000000..26fa067
+}
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies
new file mode 100644
-index 0000000..b103b4d
+index 0000000000..b103b4dea5
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies
@@ -0,0 +1 @@
+powerpc/powerpc32/603e/fpu
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies
new file mode 100644
-index 0000000..64db17f
+index 0000000000..64db17fada
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies
@@ -0,0 +1,2 @@
@@ -1546,39 +1546,39 @@ index 0000000..64db17f
+powerpc/powerpc32/603e/fpu
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies
new file mode 100644
-index 0000000..7eac5fc
+index 0000000000..7eac5fcf02
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies
@@ -0,0 +1 @@
+powerpc/powerpc32/e500mc/fpu
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies
new file mode 100644
-index 0000000..264b2a7
+index 0000000000..264b2a7700
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies
@@ -0,0 +1 @@
+powerpc/powerpc32/e5500/fpu
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies
new file mode 100644
-index 0000000..a259344
+index 0000000000..a25934467b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies
@@ -0,0 +1 @@
+powerpc/powerpc32/e6500/fpu
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies
new file mode 100644
-index 0000000..a7bc854
+index 0000000000..a7bc854be8
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies
@@ -0,0 +1 @@
+powerpc/powerpc64/e5500/fpu
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies
new file mode 100644
-index 0000000..04ff8cc
+index 0000000000..04ff8cc181
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies
@@ -0,0 +1 @@
+powerpc/powerpc64/e6500/fpu
--
-2.8.2
+2.22.0
diff --git a/meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch b/meta/recipes-core/glibc/glibc/0007-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch
index f267f66cde..ae6fb268a5 100644
--- a/meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch
+++ b/meta/recipes-core/glibc/glibc/0007-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch
@@ -1,7 +1,7 @@
-From bb065b78e9e0d3301e64a26e37550a657c885ebc Mon Sep 17 00:00:00 2001
+From dc715f6c70d01e9c3b31c1825fa5bc447967c847 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:11:22 +0000
-Subject: [PATCH 06/25] readlib: Add OECORE_KNOWN_INTERPRETER_NAMES to known
+Subject: [PATCH 07/28] readlib: Add OECORE_KNOWN_INTERPRETER_NAMES to known
names
This bolts in a hook for OE to pass its own version of interpreter
@@ -17,7 +17,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 1 insertion(+)
diff --git a/elf/readlib.c b/elf/readlib.c
-index 8a66ffe..08d56fc 100644
+index c9743e6692..6307f918fc 100644
--- a/elf/readlib.c
+++ b/elf/readlib.c
@@ -51,6 +51,7 @@ static struct known_names interpreters[] =
@@ -29,5 +29,5 @@ index 8a66ffe..08d56fc 100644
static struct known_names known_libs[] =
--
-2.8.2
+2.22.0
diff --git a/meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch b/meta/recipes-core/glibc/glibc/0008-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch
index 612e892e87..8bed20306e 100644
--- a/meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch
+++ b/meta/recipes-core/glibc/glibc/0008-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch
@@ -1,7 +1,7 @@
-From 4a91bbdb11a15f93094695bba4e0849c421fad48 Mon Sep 17 00:00:00 2001
+From 42a01c55786a9472934e12e0bf0c40983579b607 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:15:07 +0000
-Subject: [PATCH 07/25] ppc/sqrt: Fix undefined reference to `__sqrt_finite'
+Subject: [PATCH 08/28] ppc/sqrt: Fix undefined reference to `__sqrt_finite'
on ppc fixes the errors like below
| ./.libs/libpulsecore-1.1.so: undefined reference to `__sqrt_finite'
@@ -36,7 +36,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
12 files changed, 12 insertions(+), 24 deletions(-)
diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
-index 71e516d..1795fd6 100644
+index 71e516d1c8..1795fd6c3e 100644
--- a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
@@ -39,14 +39,8 @@ static const float half = 0.5;
@@ -60,7 +60,7 @@ index 71e516d..1795fd6 100644
}
+strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
-index 26fa067..a917f31 100644
+index 26fa067abf..a917f313ab 100644
--- a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
@@ -37,14 +37,8 @@ static const float threehalf = 1.5;
@@ -84,7 +84,7 @@ index 26fa067..a917f31 100644
}
+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
-index 71e516d..fc4a749 100644
+index 71e516d1c8..fc4a74990e 100644
--- a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
@@ -132,3 +132,4 @@ __ieee754_sqrt (b)
@@ -93,7 +93,7 @@ index 71e516d..fc4a749 100644
}
+strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
-index 26fa067..9d17512 100644
+index 26fa067abf..9d175122a8 100644
--- a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
@@ -99,3 +99,4 @@ __ieee754_sqrtf (b)
@@ -102,7 +102,7 @@ index 26fa067..9d17512 100644
}
+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
-index 71e516d..fc4a749 100644
+index 71e516d1c8..fc4a74990e 100644
--- a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
@@ -132,3 +132,4 @@ __ieee754_sqrt (b)
@@ -111,7 +111,7 @@ index 71e516d..fc4a749 100644
}
+strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
-index 26fa067..9d17512 100644
+index 26fa067abf..9d175122a8 100644
--- a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
@@ -99,3 +99,4 @@ __ieee754_sqrtf (b)
@@ -120,7 +120,7 @@ index 26fa067..9d17512 100644
}
+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
-index 71e516d..fc4a749 100644
+index 71e516d1c8..fc4a74990e 100644
--- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
@@ -132,3 +132,4 @@ __ieee754_sqrt (b)
@@ -129,7 +129,7 @@ index 71e516d..fc4a749 100644
}
+strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
-index 26fa067..9d17512 100644
+index 26fa067abf..9d175122a8 100644
--- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
@@ -99,3 +99,4 @@ __ieee754_sqrtf (b)
@@ -138,7 +138,7 @@ index 26fa067..9d17512 100644
}
+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
-index 71e516d..1795fd6 100644
+index 71e516d1c8..1795fd6c3e 100644
--- a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
@@ -39,14 +39,8 @@ static const float half = 0.5;
@@ -162,7 +162,7 @@ index 71e516d..1795fd6 100644
}
+strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
-index 26fa067..a917f31 100644
+index 26fa067abf..a917f313ab 100644
--- a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
@@ -37,14 +37,8 @@ static const float threehalf = 1.5;
@@ -186,7 +186,7 @@ index 26fa067..a917f31 100644
}
+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
-index 71e516d..fc4a749 100644
+index 71e516d1c8..fc4a74990e 100644
--- a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
@@ -132,3 +132,4 @@ __ieee754_sqrt (b)
@@ -195,7 +195,7 @@ index 71e516d..fc4a749 100644
}
+strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
-index 26fa067..9d17512 100644
+index 26fa067abf..9d175122a8 100644
--- a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
@@ -99,3 +99,4 @@ __ieee754_sqrtf (b)
@@ -204,5 +204,5 @@ index 26fa067..9d17512 100644
}
+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
--
-2.8.2
+2.22.0
diff --git a/meta/recipes-core/glibc/glibc/0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch b/meta/recipes-core/glibc/glibc/0009-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
index 9e222b7b45..8a5d6d8b7f 100644
--- a/meta/recipes-core/glibc/glibc/0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
+++ b/meta/recipes-core/glibc/glibc/0009-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
@@ -1,7 +1,7 @@
-From ce2746a1560b4430d89d114e1b65c7be225b4c2a Mon Sep 17 00:00:00 2001
+From a0fcb9135bc8c2b9d8a161d166b6f9d56d7af245 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:16:38 +0000
-Subject: [PATCH 08/25] __ieee754_sqrt{,f} are now inline functions and call
+Subject: [PATCH 09/28] __ieee754_sqrt{,f} are now inline functions and call
out __slow versions
Upstream-Status: Pending
@@ -23,7 +23,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
12 files changed, 114 insertions(+), 21 deletions(-)
diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
-index 1795fd6..daa83f3 100644
+index 1795fd6c3e..daa83f3fe8 100644
--- a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
@@ -40,7 +40,7 @@ static const float half = 0.5;
@@ -58,7 +58,7 @@ index 1795fd6..daa83f3 100644
+
strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
-index a917f31..b812cf1 100644
+index a917f313ab..b812cf1705 100644
--- a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
@@ -38,7 +38,7 @@ static const float threehalf = 1.5;
@@ -82,7 +82,7 @@ index a917f31..b812cf1 100644
+}
strong_alias (__ieee754_sqrtf, __sqrtf_finite)
diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
-index fc4a749..7038a70 100644
+index fc4a74990e..7038a70b47 100644
--- a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
@@ -41,10 +41,10 @@ static const float half = 0.5;
@@ -121,7 +121,7 @@ index fc4a749..7038a70 100644
+
strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
-index 9d17512..10de1f0 100644
+index 9d175122a8..10de1f0cc3 100644
--- a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
@@ -39,10 +39,10 @@ static const float threehalf = 1.5;
@@ -151,7 +151,7 @@ index 9d17512..10de1f0 100644
+
strong_alias (__ieee754_sqrtf, __sqrtf_finite)
diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
-index fc4a749..7038a70 100644
+index fc4a74990e..7038a70b47 100644
--- a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
@@ -41,10 +41,10 @@ static const float half = 0.5;
@@ -190,7 +190,7 @@ index fc4a749..7038a70 100644
+
strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
-index 9d17512..10de1f0 100644
+index 9d175122a8..10de1f0cc3 100644
--- a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
@@ -39,10 +39,10 @@ static const float threehalf = 1.5;
@@ -220,7 +220,7 @@ index 9d17512..10de1f0 100644
+
strong_alias (__ieee754_sqrtf, __sqrtf_finite)
diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
-index fc4a749..1c34244 100644
+index fc4a74990e..1c34244bd8 100644
--- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
@@ -132,4 +132,12 @@ __ieee754_sqrt (b)
@@ -237,7 +237,7 @@ index fc4a749..1c34244 100644
+
strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
-index 9d17512..8126535 100644
+index 9d175122a8..812653558f 100644
--- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
@@ -99,4 +99,12 @@ __ieee754_sqrtf (b)
@@ -254,7 +254,7 @@ index 9d17512..8126535 100644
+
strong_alias (__ieee754_sqrtf, __sqrtf_finite)
diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
-index 1795fd6..13a8197 100644
+index 1795fd6c3e..13a81973e3 100644
--- a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
@@ -40,7 +40,7 @@ static const float half = 0.5;
@@ -289,7 +289,7 @@ index 1795fd6..13a8197 100644
+
strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
-index a917f31..fae2d81 100644
+index a917f313ab..fae2d81210 100644
--- a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
@@ -38,7 +38,7 @@ static const float threehalf = 1.5;
@@ -314,7 +314,7 @@ index a917f31..fae2d81 100644
+
strong_alias (__ieee754_sqrtf, __sqrtf_finite)
diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
-index fc4a749..7038a70 100644
+index fc4a74990e..7038a70b47 100644
--- a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
@@ -41,10 +41,10 @@ static const float half = 0.5;
@@ -353,7 +353,7 @@ index fc4a749..7038a70 100644
+
strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
-index 9d17512..10de1f0 100644
+index 9d175122a8..10de1f0cc3 100644
--- a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
@@ -39,10 +39,10 @@ static const float threehalf = 1.5;
@@ -383,5 +383,5 @@ index 9d17512..10de1f0 100644
+
strong_alias (__ieee754_sqrtf, __sqrtf_finite)
--
-2.8.2
+2.22.0
diff --git a/meta/recipes-core/glibc/glibc/0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch b/meta/recipes-core/glibc/glibc/0010-Quote-from-bug-1443-which-explains-what-the-patch-do.patch
index 7aa74df239..a140a15479 100644
--- a/meta/recipes-core/glibc/glibc/0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch
+++ b/meta/recipes-core/glibc/glibc/0010-Quote-from-bug-1443-which-explains-what-the-patch-do.patch
@@ -1,7 +1,7 @@
-From 1b61649e545de76dd79a5e2c39bb16d0c4623160 Mon Sep 17 00:00:00 2001
+From 9c1f2229c48c37b38628c485ef16e01f6780160c Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:20:09 +0000
-Subject: [PATCH 09/25] Quote from bug 1443 which explains what the patch does
+Subject: [PATCH 10/28] Quote from bug 1443 which explains what the patch does
:
We build some random program and link it with -lust. When we run it,
@@ -45,10 +45,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
-index 60eee00..7d54d5e 100644
+index 7a2f9d9b78..36a1dd1888 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
-@@ -499,7 +499,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
+@@ -510,7 +510,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
case R_ARM_TLS_DTPOFF32:
if (sym != NULL)
@@ -58,5 +58,5 @@ index 60eee00..7d54d5e 100644
case R_ARM_TLS_TPOFF32:
--
-2.8.2
+2.22.0
diff --git a/meta/recipes-core/glibc/glibc/0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch b/meta/recipes-core/glibc/glibc/0011-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
index 14963a3577..cb99092eef 100644
--- a/meta/recipes-core/glibc/glibc/0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
+++ b/meta/recipes-core/glibc/glibc/0011-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
@@ -1,7 +1,7 @@
-From 91af416408b8718b004c83d93a6daa1f34cba48d Mon Sep 17 00:00:00 2001
+From 171d2afb930917b0cfbe9df770774da1c92dd185 Mon Sep 17 00:00:00 2001
From: Ting Liu <b28495@freescale.com>
Date: Wed, 19 Dec 2012 04:39:57 -0600
-Subject: [PATCH 10/25] eglibc: run libm-err-tab.pl with specific dirs in ${S}
+Subject: [PATCH 11/28] eglibc: run libm-err-tab.pl with specific dirs in ${S}
libm-err-tab.pl will parse all the files named "libm-test-ulps"
in the given dir recursively. To avoid parsing the one in
@@ -18,19 +18,19 @@ Signed-off-by: Ting Liu <b28495@freescale.com>
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/manual/Makefile b/manual/Makefile
-index f2f694f..e062833 100644
+index 4f76ee85d2..04b8c8c320 100644
--- a/manual/Makefile
+++ b/manual/Makefile
-@@ -105,7 +105,8 @@ $(objpfx)libm-err.texi: $(objpfx)stamp-libm-err
- $(objpfx)stamp-libm-err: libm-err-tab.pl $(wildcard $(foreach dir,$(sysdirs),\
- $(dir)/libm-test-ulps))
+@@ -103,7 +103,8 @@ $(objpfx)stamp-libm-err: $(..)math/gen-libm-test.py \
+ $(wildcard $(foreach dir,$(sysdirs),\
+ $(dir)/libm-test-ulps))
pwd=`pwd`; \
-- $(PERL) $< $$pwd/.. > $(objpfx)libm-err-tmp
-+ $(PERL) $< $$pwd/../ports > $(objpfx)libm-err-tmp
-+ $(PERL) $< $$pwd/../sysdeps >> $(objpfx)libm-err-tmp
+- $(PYTHON) $< -s $$pwd/.. -m $(objpfx)libm-err-tmp
++ $(PYTHON) $< -s $$pwd/../ports -m $(objpfx)libm-err-tmp
++ $(PYTHON) $< -s $$pwd/../sysdeps -m $(objpfx)libm-err-tmp
$(move-if-change) $(objpfx)libm-err-tmp $(objpfx)libm-err.texi
touch $@
--
-2.8.2
+2.22.0
diff --git a/meta/recipes-core/glibc/glibc/0012-Make-ld-version-output-matching-grok-gold-s-output.patch b/meta/recipes-core/glibc/glibc/0012-Make-ld-version-output-matching-grok-gold-s-output.patch
deleted file mode 100644
index 4cba03f238..0000000000
--- a/meta/recipes-core/glibc/glibc/0012-Make-ld-version-output-matching-grok-gold-s-output.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From f9d024edb158659e403b51cc9d93da9bca6e5d7b Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 18 Mar 2015 00:25:45 +0000
-Subject: [PATCH 12/25] Make ld --version output matching grok gold's output
-
-adapted from from upstream branch roland/gold-vs-libc
-
-Upstream-Status: Backport
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- configure | 2 +-
- configure.ac | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure b/configure
-index 8fe5937..7888a3f 100755
---- a/configure
-+++ b/configure
-@@ -4482,7 +4482,7 @@ else
- # Found it, now check the version.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $LD" >&5
- $as_echo_n "checking version of $LD... " >&6; }
-- ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU ld.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'`
-+ ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU [Bbinutilsd][^.]* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'`
- case $ac_prog_version in
- '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
- 2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*)
-diff --git a/configure.ac b/configure.ac
-index 3c766b7..6908a99 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -944,7 +944,7 @@ AC_CHECK_PROG_VER(AS, $AS, --version,
- [2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*],
- AS=: critic_missing="$critic_missing as")
- AC_CHECK_PROG_VER(LD, $LD, --version,
-- [GNU ld.* \([0-9][0-9]*\.[0-9.]*\)],
-+ [GNU [Bbinutilsd][^.]* \([0-9][0-9]*\.[0-9.]*\)],
- [2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*],
- LD=: critic_missing="$critic_missing ld")
-
---
-2.8.2
-
diff --git a/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch b/meta/recipes-core/glibc/glibc/0012-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
index e92d04c62b..e233fbe542 100644
--- a/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
+++ b/meta/recipes-core/glibc/glibc/0012-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
@@ -1,7 +1,7 @@
-From 6a71f688471fe0c85f8ad9afc4ee0723a20aae1d Mon Sep 17 00:00:00 2001
+From 376be7b96152ef501c8cf95ed6dc52c0318bd26a Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:24:46 +0000
-Subject: [PATCH 11/25] __ieee754_sqrt{,f} are now inline functions and call
+Subject: [PATCH 12/28] __ieee754_sqrt{,f} are now inline functions and call
out __slow versions
Upstream-Status: Pending
@@ -14,7 +14,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
-index 1c34244..7038a70 100644
+index 1c34244bd8..7038a70b47 100644
--- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
@@ -41,10 +41,10 @@ static const float half = 0.5;
@@ -40,7 +40,7 @@ index 1c34244..7038a70 100644
#define FMADD(a_, c_, b_) \
({ double __r; \
diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
-index 8126535..10de1f0 100644
+index 812653558f..10de1f0cc3 100644
--- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
@@ -39,10 +39,10 @@ static const float threehalf = 1.5;
@@ -57,5 +57,5 @@ index 8126535..10de1f0 100644
#endif
{
--
-2.8.2
+2.22.0
diff --git a/meta/recipes-core/glibc/glibc/0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch b/meta/recipes-core/glibc/glibc/0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch
index 6a82f8d933..9ba52e6e10 100644
--- a/meta/recipes-core/glibc/glibc/0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch
+++ b/meta/recipes-core/glibc/glibc/0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch
@@ -1,7 +1,7 @@
-From 2ece12093c8ba4cf688d235f35d36f1feb02324c Mon Sep 17 00:00:00 2001
+From 1ba4e9577437632856d719cbd5d63b5a76cbb4c4 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:27:10 +0000
-Subject: [PATCH 13/25] sysdeps/gnu/configure.ac: handle correctly
+Subject: [PATCH 13/28] sysdeps/gnu/configure.ac: handle correctly
$libc_cv_rootsbindir
Upstream-Status:Pending
@@ -14,7 +14,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sysdeps/gnu/configure b/sysdeps/gnu/configure
-index 71243ad..f578187 100644
+index c15d1087e8..37cc983f2a 100644
--- a/sysdeps/gnu/configure
+++ b/sysdeps/gnu/configure
@@ -32,6 +32,6 @@ case "$prefix" in
@@ -26,7 +26,7 @@ index 71243ad..f578187 100644
;;
esac
diff --git a/sysdeps/gnu/configure.ac b/sysdeps/gnu/configure.ac
-index 634fe4d..3db1697 100644
+index 634fe4de2a..3db1697f4f 100644
--- a/sysdeps/gnu/configure.ac
+++ b/sysdeps/gnu/configure.ac
@@ -21,6 +21,6 @@ case "$prefix" in
@@ -38,5 +38,5 @@ index 634fe4d..3db1697 100644
;;
esac
--
-2.8.2
+2.22.0
diff --git a/meta/recipes-core/glibc/glibc/0014-Add-unused-attribute.patch b/meta/recipes-core/glibc/glibc/0014-Add-unused-attribute.patch
index d14a6d4cd5..0a602bb38c 100644
--- a/meta/recipes-core/glibc/glibc/0014-Add-unused-attribute.patch
+++ b/meta/recipes-core/glibc/glibc/0014-Add-unused-attribute.patch
@@ -1,7 +1,7 @@
-From 9fec083dc99d2b524090e1d098e03709eed64a72 Mon Sep 17 00:00:00 2001
+From b84999dcf642b07e6c14e6ff507be14743349949 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:28:41 +0000
-Subject: [PATCH 14/25] Add unused attribute
+Subject: [PATCH 14/28] Add unused attribute
Helps in avoiding gcc warning when header is is included in
a source file which does not use both functions
@@ -17,7 +17,7 @@ Upstream-Status: Pending
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/iconv/gconv_charset.h b/iconv/gconv_charset.h
-index 95cbce7..191a0dd 100644
+index 91e0ad3141..2e9549fe49 100644
--- a/iconv/gconv_charset.h
+++ b/iconv/gconv_charset.h
@@ -21,7 +21,7 @@
@@ -30,5 +30,5 @@ index 95cbce7..191a0dd 100644
{
int slash_count = 0;
--
-2.8.2
+2.22.0
diff --git a/meta/recipes-core/glibc/glibc/0015-yes-within-the-path-sets-wrong-config-variables.patch b/meta/recipes-core/glibc/glibc/0015-yes-within-the-path-sets-wrong-config-variables.patch
index 8ceccec419..dd6562a631 100644
--- a/meta/recipes-core/glibc/glibc/0015-yes-within-the-path-sets-wrong-config-variables.patch
+++ b/meta/recipes-core/glibc/glibc/0015-yes-within-the-path-sets-wrong-config-variables.patch
@@ -1,7 +1,7 @@
-From 1794a97cba0b09b726eebc565c783c7b7c22dfba Mon Sep 17 00:00:00 2001
+From 7c57f84bef4aaffe4204a7a354411ab3ea7e5273 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:31:06 +0000
-Subject: [PATCH 15/25] 'yes' within the path sets wrong config variables
+Subject: [PATCH 15/28] 'yes' within the path sets wrong config variables
It seems that the 'AC_EGREP_CPP(yes...' example is quite popular
but being such a short word to grep it is likely to produce
@@ -29,7 +29,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
12 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/sysdeps/aarch64/configure b/sysdeps/aarch64/configure
-index 5bd355a..3bc5537 100644
+index 5bd355a691..3bc5537bc0 100644
--- a/sysdeps/aarch64/configure
+++ b/sysdeps/aarch64/configure
@@ -148,12 +148,12 @@ else
@@ -48,7 +48,7 @@ index 5bd355a..3bc5537 100644
else
libc_cv_aarch64_be=no
diff --git a/sysdeps/aarch64/configure.ac b/sysdeps/aarch64/configure.ac
-index 7851dd4..6e92381 100644
+index 7851dd4dac..6e9238171f 100644
--- a/sysdeps/aarch64/configure.ac
+++ b/sysdeps/aarch64/configure.ac
@@ -10,8 +10,8 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
@@ -63,7 +63,7 @@ index 7851dd4..6e92381 100644
], libc_cv_aarch64_be=yes, libc_cv_aarch64_be=no)])
if test $libc_cv_aarch64_be = yes; then
diff --git a/sysdeps/arm/configure b/sysdeps/arm/configure
-index 431e843..e152461 100644
+index 431e843b2b..e152461138 100644
--- a/sysdeps/arm/configure
+++ b/sysdeps/arm/configure
@@ -151,12 +151,12 @@ else
@@ -82,7 +82,7 @@ index 431e843..e152461 100644
else
libc_cv_arm_pcs_vfp=no
diff --git a/sysdeps/arm/configure.ac b/sysdeps/arm/configure.ac
-index 90cdd69..05a262b 100644
+index 90cdd69c75..05a262ba00 100644
--- a/sysdeps/arm/configure.ac
+++ b/sysdeps/arm/configure.ac
@@ -15,8 +15,8 @@ AC_DEFINE(PI_STATIC_AND_HIDDEN)
@@ -97,7 +97,7 @@ index 90cdd69..05a262b 100644
], libc_cv_arm_pcs_vfp=yes, libc_cv_arm_pcs_vfp=no)])
if test $libc_cv_arm_pcs_vfp = yes; then
diff --git a/sysdeps/mips/configure b/sysdeps/mips/configure
-index 4e13248..f14af95 100644
+index 4e13248c03..f14af952d0 100644
--- a/sysdeps/mips/configure
+++ b/sysdeps/mips/configure
@@ -143,11 +143,11 @@ else
@@ -115,7 +115,7 @@ index 4e13248..f14af95 100644
else
libc_cv_mips_nan2008=no
diff --git a/sysdeps/mips/configure.ac b/sysdeps/mips/configure.ac
-index bcbdaff..ad3057f 100644
+index bcbdaffd9f..ad3057f4cc 100644
--- a/sysdeps/mips/configure.ac
+++ b/sysdeps/mips/configure.ac
@@ -6,9 +6,9 @@ dnl position independent way.
@@ -131,7 +131,7 @@ index bcbdaff..ad3057f 100644
if test x$libc_cv_mips_nan2008 = xyes; then
AC_DEFINE(HAVE_MIPS_NAN2008)
diff --git a/sysdeps/nios2/configure b/sysdeps/nios2/configure
-index 14c8a3a..dde3814 100644
+index 14c8a3a014..dde3814ef2 100644
--- a/sysdeps/nios2/configure
+++ b/sysdeps/nios2/configure
@@ -142,12 +142,12 @@ else
@@ -150,7 +150,7 @@ index 14c8a3a..dde3814 100644
else
libc_cv_nios2_be=no
diff --git a/sysdeps/nios2/configure.ac b/sysdeps/nios2/configure.ac
-index f05f438..dc86399 100644
+index f05f43802b..dc8639902d 100644
--- a/sysdeps/nios2/configure.ac
+++ b/sysdeps/nios2/configure.ac
@@ -4,8 +4,8 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
@@ -165,7 +165,7 @@ index f05f438..dc86399 100644
], libc_cv_nios2_be=yes, libc_cv_nios2_be=no)])
if test $libc_cv_nios2_be = yes; then
diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure
-index a5513fa..283b293 100644
+index 1ee7f41a36..77e38bebde 100644
--- a/sysdeps/unix/sysv/linux/mips/configure
+++ b/sysdeps/unix/sysv/linux/mips/configure
@@ -414,11 +414,11 @@ else
@@ -183,7 +183,7 @@ index a5513fa..283b293 100644
else
libc_cv_mips_nan2008=no
diff --git a/sysdeps/unix/sysv/linux/mips/configure.ac b/sysdeps/unix/sysv/linux/mips/configure.ac
-index 9147aa4..7898e24 100644
+index 9147aa4582..7898e24738 100644
--- a/sysdeps/unix/sysv/linux/mips/configure.ac
+++ b/sysdeps/unix/sysv/linux/mips/configure.ac
@@ -105,9 +105,9 @@ AC_COMPILE_IFELSE(
@@ -199,7 +199,7 @@ index 9147aa4..7898e24 100644
libc_mips_nan=
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
-index af06970..27b8c1b 100644
+index ae7f254da4..874519000b 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
@@ -155,12 +155,12 @@ else
@@ -233,7 +233,7 @@ index af06970..27b8c1b 100644
else
libc_cv_ppc64_def_call_elf=no
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
-index 0822915..9a32fdd 100644
+index f9cba6e15d..b21f72f1e4 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
@@ -6,8 +6,8 @@ LIBC_SLIBDIR_RTLDDIR([lib64], [lib64])
@@ -259,5 +259,5 @@ index 0822915..9a32fdd 100644
], libc_cv_ppc64_def_call_elf=yes, libc_cv_ppc64_def_call_elf=no)])
if test $libc_cv_ppc64_def_call_elf = no; then
--
-2.8.2
+2.22.0
diff --git a/meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch b/meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch
index e5b508330c..4d1cf31973 100644
--- a/meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch
+++ b/meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch
@@ -1,7 +1,7 @@
-From fdb5c9c88e3d1bc5ae6ef9ebcfcf560d3c42f0a6 Mon Sep 17 00:00:00 2001
+From a74f31ea9edf105f1a6dc26497aa2a12ae736660 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:33:03 +0000
-Subject: [PATCH 16/25] timezone: re-written tzselect as posix sh
+Subject: [PATCH 16/28] timezone: re-written tzselect as posix sh
To avoid the bash dependency.
@@ -15,10 +15,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/timezone/Makefile b/timezone/Makefile
-index dee7568..66a50be 100644
+index 493deca790..36e559e16c 100644
--- a/timezone/Makefile
+++ b/timezone/Makefile
-@@ -120,7 +120,7 @@ $(testdata)/XT%: testdata/XT%
+@@ -122,7 +122,7 @@ $(testdata)/XT%: testdata/XT%
cp $< $@
$(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make
@@ -28,10 +28,10 @@ index dee7568..66a50be 100644
-e '/TZVERSION=/s|see_Makefile|"$(version)"|' \
-e '/PKGVERSION=/s|=.*|="$(PKGVERSION)"|' \
diff --git a/timezone/tzselect.ksh b/timezone/tzselect.ksh
-index 2c3b2f4..0c04a61 100755
+index 18fce27e24..70745f9d36 100755
--- a/timezone/tzselect.ksh
+++ b/timezone/tzselect.ksh
-@@ -35,7 +35,7 @@ REPORT_BUGS_TO=tz@iana.org
+@@ -34,7 +34,7 @@ REPORT_BUGS_TO=tz@iana.org
# Specify default values for environment variables if they are unset.
: ${AWK=awk}
@@ -41,5 +41,5 @@ index 2c3b2f4..0c04a61 100755
# Output one argument as-is to standard output.
# Safer than 'echo', which can mishandle '\' or leading '-'.
--
-2.8.2
+2.22.0
diff --git a/meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch b/meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch
index c8da05dc6e..e4f8a135d3 100644
--- a/meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch
+++ b/meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch
@@ -1,21 +1,21 @@
-From 88ad88d014a5ee68b0e044d2def5ab13743c8ae0 Mon Sep 17 00:00:00 2001
+From 95882b9864ff20e476d15c6825c83728eb99597f Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 31 Dec 2015 14:33:02 -0800
-Subject: [PATCH 17/25] Remove bash dependency for nscd init script
+Subject: [PATCH 17/28] Remove bash dependency for nscd init script
The nscd init script uses #! /bin/bash but only really uses one bashism
(translated strings), so remove them and switch the shell to #!/bin/sh.
+Upstream-Status: Pending
+
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
-Upstream-Status: Pending
-
nscd/nscd.init | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/nscd/nscd.init b/nscd/nscd.init
-index a882da7..b02986e 100644
+index a882da7d8b..b02986ec15 100644
--- a/nscd/nscd.init
+++ b/nscd/nscd.init
@@ -1,4 +1,4 @@
@@ -71,5 +71,5 @@ index a882da7..b02986e 100644
;;
esac
--
-2.8.2
+2.22.0
diff --git a/meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch b/meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch
index 1750765247..b5efc43042 100644
--- a/meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch
+++ b/meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch
@@ -1,22 +1,22 @@
-From 49c0ad7dc2e02e808ed150296a109b586c34115a Mon Sep 17 00:00:00 2001
+From 6b603d25cc5723ba631dfc60b544774db1147d81 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:42:58 +0000
-Subject: [PATCH 18/25] eglibc: Cross building and testing instructions
+Subject: [PATCH 18/28] eglibc: Cross building and testing instructions
Ported from eglibc
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
- GLIBC.cross-building | 383 +++++++++++++++++++++++++++++++++++++++++++++++++++
- GLIBC.cross-testing | 205 +++++++++++++++++++++++++++
+ GLIBC.cross-building | 383 +++++++++++++++++++++++++++++++++++++++++++
+ GLIBC.cross-testing | 205 +++++++++++++++++++++++
2 files changed, 588 insertions(+)
create mode 100644 GLIBC.cross-building
create mode 100644 GLIBC.cross-testing
diff --git a/GLIBC.cross-building b/GLIBC.cross-building
new file mode 100644
-index 0000000..e6e0da1
+index 0000000000..e6e0da1aaf
--- /dev/null
+++ b/GLIBC.cross-building
@@ -0,0 +1,383 @@
@@ -405,7 +405,7 @@ index 0000000..e6e0da1
+ Hello, C++ world!
diff --git a/GLIBC.cross-testing b/GLIBC.cross-testing
new file mode 100644
-index 0000000..b67b468
+index 0000000000..b67b468466
--- /dev/null
+++ b/GLIBC.cross-testing
@@ -0,0 +1,205 @@
@@ -615,5 +615,5 @@ index 0000000..b67b468
+ simply place copies of these libraries in the top GLIBC build
+ directory.
--
-2.8.2
+2.22.0
diff --git a/meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch b/meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch
index f983d86a90..0333db2814 100644
--- a/meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch
+++ b/meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch
@@ -1,7 +1,7 @@
-From e881face7a10354612bf634b44e09e3bc6462c67 Mon Sep 17 00:00:00 2001
+From 2864aaae984d945445f3f79869c703e0b791df88 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:49:28 +0000
-Subject: [PATCH 19/25] eglibc: Help bootstrap cross toolchain
+Subject: [PATCH 19/28] eglibc: Help bootstrap cross toolchain
Taken from EGLIBC, r1484 + r1525
@@ -29,10 +29,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
create mode 100644 include/stubs-bootstrap.h
diff --git a/Makefile b/Makefile
-index 32748b3..6d055ba 100644
+index 9fbf705200..64bfd455bc 100644
--- a/Makefile
+++ b/Makefile
-@@ -69,9 +69,18 @@ subdir-dirs = include
+@@ -70,9 +70,18 @@ subdir-dirs = include
vpath %.h $(subdir-dirs)
# What to install.
@@ -52,7 +52,7 @@ index 32748b3..6d055ba 100644
ifeq (yes,$(build-shared))
headers += gnu/lib-names.h
endif
-@@ -151,6 +160,16 @@ others: $(common-objpfx)testrun.sh
+@@ -196,6 +205,16 @@ others: $(common-objpfx)testrun.sh
subdir-stubs := $(foreach dir,$(subdirs),$(common-objpfx)$(dir)/stubs)
@@ -69,7 +69,7 @@ index 32748b3..6d055ba 100644
ifndef abi-variants
installed-stubs = $(inst_includedir)/gnu/stubs.h
else
-@@ -177,6 +196,7 @@ $(inst_includedir)/gnu/stubs.h: $(+force)
+@@ -222,6 +241,7 @@ $(inst_includedir)/gnu/stubs.h: $(+force)
install-others-nosubdir: $(installed-stubs)
endif
@@ -79,7 +79,7 @@ index 32748b3..6d055ba 100644
# Since stubs.h is never needed when building the library, we simplify the
diff --git a/include/stubs-bootstrap.h b/include/stubs-bootstrap.h
new file mode 100644
-index 0000000..1d2b669
+index 0000000000..1d2b669aff
--- /dev/null
+++ b/include/stubs-bootstrap.h
@@ -0,0 +1,12 @@
@@ -96,5 +96,5 @@ index 0000000..1d2b669
+ EGLIBC subdir 'stubs' make targets, on every .o file in EGLIBC, but
+ an empty stubs.h like this will do fine for GCC. */
--
-2.8.2
+2.22.0
diff --git a/meta/recipes-core/glibc/glibc/0021-eglibc-Clear-cache-lines-on-ppc8xx.patch b/meta/recipes-core/glibc/glibc/0020-eglibc-Clear-cache-lines-on-ppc8xx.patch
index 8931c9e250..965ad6578e 100644
--- a/meta/recipes-core/glibc/glibc/0021-eglibc-Clear-cache-lines-on-ppc8xx.patch
+++ b/meta/recipes-core/glibc/glibc/0020-eglibc-Clear-cache-lines-on-ppc8xx.patch
@@ -1,7 +1,7 @@
-From 9699873820d0347c2f377f0d86bce615d87a5e47 Mon Sep 17 00:00:00 2001
+From e2667086bf984de4d3f1226b9467761cd5a4c39f Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 31 Dec 2015 15:15:09 -0800
-Subject: [PATCH 21/25] eglibc: Clear cache lines on ppc8xx
+Subject: [PATCH 20/28] eglibc: Clear cache lines on ppc8xx
2007-06-13 Nathan Sidwell <nathan@codesourcery.com>
Mark Shinwell <shinwell@codesourcery.com>
@@ -21,7 +21,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
-index 98ec2b3..b384ae0 100644
+index b04ecc4a4c..75bda97241 100644
--- a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
+++ b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
@@ -24,9 +24,21 @@ int __cache_line_size attribute_hidden;
@@ -48,7 +48,7 @@ index 98ec2b3..b384ae0 100644
break;
diff --git a/sysdeps/unix/sysv/linux/powerpc/libc-start.c b/sysdeps/unix/sysv/linux/powerpc/libc-start.c
-index 0efd297..8cc0ef8 100644
+index 4fd5f70700..1a21e4675c 100644
--- a/sysdeps/unix/sysv/linux/powerpc/libc-start.c
+++ b/sysdeps/unix/sysv/linux/powerpc/libc-start.c
@@ -73,11 +73,25 @@ __libc_start_main (int argc, char **argv,
@@ -79,5 +79,5 @@ index 0efd297..8cc0ef8 100644
break;
#ifndef SHARED
--
-2.8.2
+2.22.0
diff --git a/meta/recipes-core/glibc/glibc/0020-eglibc-cherry-picked-from.patch b/meta/recipes-core/glibc/glibc/0020-eglibc-cherry-picked-from.patch
deleted file mode 100644
index 30c4c69877..0000000000
--- a/meta/recipes-core/glibc/glibc/0020-eglibc-cherry-picked-from.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 723a31d3e2627211b39fbcc08f75b3c23c4096c5 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 31 Dec 2015 15:10:33 -0800
-Subject: [PATCH 20/25] eglibc: cherry-picked from
-
-http://www.eglibc.org/archives/patches/msg00772.html
-
-Not yet merged into glibc
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- resolv/res_libc.c | 14 +++++++++++++-
- 1 file changed, 13 insertions(+), 1 deletion(-)
-
-diff --git a/resolv/res_libc.c b/resolv/res_libc.c
-index a4b376f..3256e12 100644
---- a/resolv/res_libc.c
-+++ b/resolv/res_libc.c
-@@ -21,11 +21,13 @@
- #include <atomic.h>
- #include <limits.h>
- #include <sys/types.h>
-+#include <sys/stat.h>
- #include <netinet/in.h>
- #include <arpa/nameser.h>
- #include <resolv.h>
- #include <libc-lock.h>
-
-+__libc_lock_define_initialized (static, lock);
- extern unsigned long long int __res_initstamp attribute_hidden;
- /* We have atomic increment operations on 64-bit platforms. */
- #if __WORDSIZE == 64
-@@ -33,7 +35,6 @@ extern unsigned long long int __res_initstamp attribute_hidden;
- # define atomicincunlock(lock) (void) 0
- # define atomicinc(var) catomic_increment (&(var))
- #else
--__libc_lock_define_initialized (static, lock);
- # define atomicinclock(lock) __libc_lock_lock (lock)
- # define atomicincunlock(lock) __libc_lock_unlock (lock)
- # define atomicinc(var) ++var
-@@ -92,7 +93,18 @@ res_init(void) {
- int
- __res_maybe_init (res_state resp, int preinit)
- {
-+ static time_t last_mtime;
-+ struct stat statbuf;
-+ int ret;
-+
- if (resp->options & RES_INIT) {
-+ ret = stat (_PATH_RESCONF, &statbuf);
-+ __libc_lock_lock (lock);
-+ if ((ret == 0) && (last_mtime != statbuf.st_mtime)) {
-+ last_mtime = statbuf.st_mtime;
-+ atomicinc (__res_initstamp);
-+ }
-+ __libc_lock_unlock (lock);
- if (__res_initstamp != resp->_u._ext.initstamp) {
- if (resp->nscount > 0)
- __res_iclose (resp, true);
---
-2.8.2
-
diff --git a/meta/recipes-core/glibc/glibc/0022-eglibc-Resolve-__fpscr_values-on-SH4.patch b/meta/recipes-core/glibc/glibc/0021-eglibc-Resolve-__fpscr_values-on-SH4.patch
index f53f5ff87c..76551cf559 100644
--- a/meta/recipes-core/glibc/glibc/0022-eglibc-Resolve-__fpscr_values-on-SH4.patch
+++ b/meta/recipes-core/glibc/glibc/0021-eglibc-Resolve-__fpscr_values-on-SH4.patch
@@ -1,7 +1,7 @@
-From 8904f4249c930d187e19c7e9d3e73c835d11e18f Mon Sep 17 00:00:00 2001
+From b7290e54a1bda7a0212131655bc27926fc22de22 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:55:53 +0000
-Subject: [PATCH 22/25] eglibc: Resolve __fpscr_values on SH4
+Subject: [PATCH 21/28] eglibc: Resolve __fpscr_values on SH4
2010-09-29 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Andrew Stubbs <ams@codesourcery.com>
@@ -21,7 +21,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 12 insertions(+)
diff --git a/sysdeps/unix/sysv/linux/sh/Versions b/sysdeps/unix/sysv/linux/sh/Versions
-index e0938c4..ca1d7da 100644
+index e0938c4165..ca1d7da339 100644
--- a/sysdeps/unix/sysv/linux/sh/Versions
+++ b/sysdeps/unix/sysv/linux/sh/Versions
@@ -2,6 +2,7 @@ libc {
@@ -33,7 +33,7 @@ index e0938c4..ca1d7da 100644
# a*
alphasort64;
diff --git a/sysdeps/unix/sysv/linux/sh/sysdep.S b/sysdeps/unix/sysv/linux/sh/sysdep.S
-index 0024d79..d1db7e4 100644
+index 6ce36d6dd5..425811cc77 100644
--- a/sysdeps/unix/sysv/linux/sh/sysdep.S
+++ b/sysdeps/unix/sysv/linux/sh/sysdep.S
@@ -30,3 +30,14 @@ ENTRY (__syscall_error)
@@ -52,5 +52,5 @@ index 0024d79..d1db7e4 100644
+weak_alias (___fpscr_values, __fpscr_values)
+
--
-2.8.2
+2.22.0
diff --git a/meta/recipes-core/glibc/glibc/0024-eglibc-Forward-port-cross-locale-generation-support.patch b/meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch
index c45b557ab7..c46021a478 100644
--- a/meta/recipes-core/glibc/glibc/0024-eglibc-Forward-port-cross-locale-generation-support.patch
+++ b/meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch
@@ -1,33 +1,33 @@
-From 11d7633178301add26a24657e2f1596a2f7dddce Mon Sep 17 00:00:00 2001
+From be382b4e0c6de52573f7e037f2d4ff9b1b5bbb6b Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 01:33:49 +0000
-Subject: [PATCH 24/25] eglibc: Forward port cross locale generation support
+Subject: [PATCH 22/28] eglibc: Forward port cross locale generation support
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
- locale/Makefile | 3 ++-
- locale/catnames.c | 48 +++++++++++++++++++++++++++++++++++
+ locale/Makefile | 3 +-
+ locale/catnames.c | 48 ++++++++++++++++++++++++++++
locale/localeinfo.h | 2 +-
- locale/programs/charmap-dir.c | 6 +++++
- locale/programs/ld-collate.c | 17 ++++++-------
- locale/programs/ld-ctype.c | 27 ++++++++++----------
- locale/programs/ld-time.c | 31 +++++++++++++++--------
+ locale/programs/charmap-dir.c | 6 ++++
+ locale/programs/ld-collate.c | 17 +++++-----
+ locale/programs/ld-ctype.c | 27 ++++++++--------
+ locale/programs/ld-time.c | 31 ++++++++++++------
locale/programs/linereader.c | 2 +-
- locale/programs/localedef.c | 8 ++++++
- locale/programs/locfile.c | 5 +++-
- locale/programs/locfile.h | 59 +++++++++++++++++++++++++++++++++++++++++--
- locale/setlocale.c | 30 ----------------------
+ locale/programs/localedef.c | 8 +++++
+ locale/programs/locfile.c | 5 ++-
+ locale/programs/locfile.h | 59 +++++++++++++++++++++++++++++++++--
+ locale/setlocale.c | 30 ------------------
12 files changed, 169 insertions(+), 69 deletions(-)
create mode 100644 locale/catnames.c
diff --git a/locale/Makefile b/locale/Makefile
-index c5379e6..c98c675 100644
+index d78cf9b83a..e166f5252e 100644
--- a/locale/Makefile
+++ b/locale/Makefile
-@@ -25,7 +25,8 @@ include ../Makeconfig
- headers = locale.h bits/locale.h langinfo.h xlocale.h
+@@ -26,7 +26,8 @@ headers = langinfo.h locale.h bits/locale.h \
+ bits/types/locale_t.h bits/types/__locale_t.h
routines = setlocale findlocale loadlocale loadarchive \
localeconv nl_langinfo nl_langinfo_l mb_cur_max \
- newlocale duplocale freelocale uselocale
@@ -38,7 +38,7 @@ index c5379e6..c98c675 100644
address telephone measurement identification collate
diff --git a/locale/catnames.c b/locale/catnames.c
new file mode 100644
-index 0000000..9fad357
+index 0000000000..9fad357db1
--- /dev/null
+++ b/locale/catnames.c
@@ -0,0 +1,48 @@
@@ -91,10 +91,10 @@ index 0000000..9fad357
+ [LC_ALL] = sizeof ("LC_ALL") - 1
+ };
diff --git a/locale/localeinfo.h b/locale/localeinfo.h
-index 94627f3..d0db77b 100644
+index 53cb8bfc59..92c466200c 100644
--- a/locale/localeinfo.h
+++ b/locale/localeinfo.h
-@@ -224,7 +224,7 @@ __libc_tsd_define (extern, __locale_t, LOCALE)
+@@ -224,7 +224,7 @@ __libc_tsd_define (extern, locale_t, LOCALE)
unused. We can manage this playing some tricks with weak references.
But with thread-local locale settings, it becomes quite ungainly unless
we can use __thread variables. So only in that case do we attempt this. */
@@ -104,11 +104,11 @@ index 94627f3..d0db77b 100644
# define NL_CURRENT_INDIRECT 1
#endif
diff --git a/locale/programs/charmap-dir.c b/locale/programs/charmap-dir.c
-index 99fcd35..5e528dc 100644
+index 94c122df68..80e53e12c8 100644
--- a/locale/programs/charmap-dir.c
+++ b/locale/programs/charmap-dir.c
-@@ -19,7 +19,9 @@
- #include <error.h>
+@@ -18,7 +18,9 @@
+ #include <errno.h>
#include <fcntl.h>
#include <libintl.h>
+#ifndef NO_UNCOMPRESS
@@ -117,7 +117,7 @@ index 99fcd35..5e528dc 100644
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-@@ -156,6 +158,7 @@ charmap_closedir (CHARMAP_DIR *cdir)
+@@ -154,6 +156,7 @@ charmap_closedir (CHARMAP_DIR *cdir)
return closedir (dir);
}
@@ -125,7 +125,7 @@ index 99fcd35..5e528dc 100644
/* Creates a subprocess decompressing the given pathname, and returns
a stream reading its output (the decompressed data). */
static
-@@ -204,6 +207,7 @@ fopen_uncompressed (const char *pathname, const char *compressor)
+@@ -202,6 +205,7 @@ fopen_uncompressed (const char *pathname, const char *compressor)
}
return NULL;
}
@@ -133,7 +133,7 @@ index 99fcd35..5e528dc 100644
/* Opens a charmap for reading, given its name (not an alias name). */
FILE *
-@@ -226,6 +230,7 @@ charmap_open (const char *directory, const char *name)
+@@ -224,6 +228,7 @@ charmap_open (const char *directory, const char *name)
if (stream != NULL)
return stream;
@@ -141,7 +141,7 @@ index 99fcd35..5e528dc 100644
memcpy (p, ".gz", 4);
stream = fopen_uncompressed (pathname, "gzip");
if (stream != NULL)
-@@ -235,6 +240,7 @@ charmap_open (const char *directory, const char *name)
+@@ -233,6 +238,7 @@ charmap_open (const char *directory, const char *name)
stream = fopen_uncompressed (pathname, "bzip2");
if (stream != NULL)
return stream;
@@ -150,10 +150,10 @@ index 99fcd35..5e528dc 100644
return NULL;
}
diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c
-index 1e125f6..3b2867f 100644
+index 6baab6cfb0..b12a2fceab 100644
--- a/locale/programs/ld-collate.c
+++ b/locale/programs/ld-collate.c
-@@ -350,7 +350,7 @@ new_element (struct locale_collate_t *collate, const char *mbs, size_t mbslen,
+@@ -349,7 +349,7 @@ new_element (struct locale_collate_t *collate, const char *mbs, size_t mbslen,
}
if (wcs != NULL)
{
@@ -162,7 +162,7 @@ index 1e125f6..3b2867f 100644
uint32_t zero = 0;
/* Handle <U0000> as a single character. */
if (nwcs == 0)
-@@ -1776,8 +1776,7 @@ symbol `%s' has the same encoding as"), (*eptr)->name);
+@@ -1772,8 +1772,7 @@ symbol `%s' has the same encoding as"), (*eptr)->name);
if ((*eptr)->nwcs == runp->nwcs)
{
@@ -172,7 +172,7 @@ index 1e125f6..3b2867f 100644
if (c == 0)
{
-@@ -2010,9 +2009,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
+@@ -2000,9 +1999,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
one consecutive entry. */
if (runp->wcnext != NULL
&& runp->nwcs == runp->wcnext->nwcs
@@ -185,7 +185,7 @@ index 1e125f6..3b2867f 100644
&& (runp->wcs[runp->nwcs - 1]
== runp->wcnext->wcs[runp->nwcs - 1] + 1))
{
-@@ -2036,9 +2035,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
+@@ -2026,9 +2025,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
runp = runp->wcnext;
while (runp->wcnext != NULL
&& runp->nwcs == runp->wcnext->nwcs
@@ -199,10 +199,10 @@ index 1e125f6..3b2867f 100644
== runp->wcnext->wcs[runp->nwcs - 1] + 1));
diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c
-index 0fd141c..68136e6 100644
+index cfc9c43fd5..6572cc199c 100644
--- a/locale/programs/ld-ctype.c
+++ b/locale/programs/ld-ctype.c
-@@ -926,7 +926,7 @@ ctype_output (struct localedef_t *locale, const struct charmap_t *charmap,
+@@ -915,7 +915,7 @@ ctype_output (struct localedef_t *locale, const struct charmap_t *charmap,
allocate_arrays (ctype, charmap, ctype->repertoire);
default_missing_len = (ctype->default_missing
@@ -211,7 +211,7 @@ index 0fd141c..68136e6 100644
: 0);
init_locale_data (&file, nelems);
-@@ -1937,7 +1937,7 @@ read_translit_entry (struct linereader *ldfile, struct locale_ctype_t *ctype,
+@@ -1927,7 +1927,7 @@ read_translit_entry (struct linereader *ldfile, struct locale_ctype_t *ctype,
ignore = 1;
else
/* This value is usable. */
@@ -220,7 +220,7 @@ index 0fd141c..68136e6 100644
first = 0;
}
-@@ -2471,8 +2471,8 @@ with character code range values one must use the absolute ellipsis `...'"));
+@@ -2461,8 +2461,8 @@ with character code range values one must use the absolute ellipsis `...'"));
}
handle_tok_digit:
@@ -231,7 +231,7 @@ index 0fd141c..68136e6 100644
handle_digits = 1;
goto read_charclass;
-@@ -3929,8 +3929,7 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
+@@ -3904,8 +3904,7 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
while (idx < number)
{
@@ -241,7 +241,7 @@ index 0fd141c..68136e6 100644
if (res == 0)
{
replace = 1;
-@@ -3967,11 +3966,11 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
+@@ -3942,11 +3941,11 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
for (size_t cnt = 0; cnt < number; ++cnt)
{
struct translit_to_t *srunp;
@@ -255,7 +255,7 @@ index 0fd141c..68136e6 100644
srunp = srunp->next;
}
/* Plus one for the extra NUL character marking the end of
-@@ -3995,18 +3994,18 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
+@@ -3970,18 +3969,18 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
ctype->translit_from_idx[cnt] = from_len;
ctype->translit_to_idx[cnt] = to_len;
@@ -281,10 +281,10 @@ index 0fd141c..68136e6 100644
srunp = srunp->next;
}
diff --git a/locale/programs/ld-time.c b/locale/programs/ld-time.c
-index 87531bc..5f2c266 100644
+index 8e9849fdba..028d3efa9f 100644
--- a/locale/programs/ld-time.c
+++ b/locale/programs/ld-time.c
-@@ -215,8 +215,10 @@ No definition for %s category found"), "LC_TIME"));
+@@ -220,8 +220,10 @@ No definition for %s category found"), "LC_TIME");
}
else
{
@@ -296,7 +296,7 @@ index 87531bc..5f2c266 100644
}
}
-@@ -226,7 +228,7 @@ No definition for %s category found"), "LC_TIME"));
+@@ -231,7 +233,7 @@ No definition for %s category found"), "LC_TIME");
const int days_per_month[12] = { 31, 29, 31, 30, 31, 30,
31, 31, 30, 31 ,30, 31 };
size_t idx;
@@ -305,7 +305,7 @@ index 87531bc..5f2c266 100644
time->era_entries =
(struct era_data *) xmalloc (time->num_era
-@@ -464,18 +466,18 @@ No definition for %s category found"), "LC_TIME"));
+@@ -457,18 +459,18 @@ No definition for %s category found"), "LC_TIME");
}
/* Now generate the wide character name and format. */
@@ -331,7 +331,7 @@ index 87531bc..5f2c266 100644
}
else
time->era_entries[idx].wname =
-@@ -534,7 +536,16 @@ No definition for %s category found"), "LC_TIME"));
+@@ -527,7 +529,16 @@ No definition for %s category found"), "LC_TIME");
if (time->date_fmt == NULL)
time->date_fmt = "%a %b %e %H:%M:%S %Z %Y";
if (time->wdate_fmt == NULL)
@@ -350,7 +350,7 @@ index 87531bc..5f2c266 100644
diff --git a/locale/programs/linereader.c b/locale/programs/linereader.c
-index b885f65..0afb631 100644
+index ed3a9731d0..3178ea057a 100644
--- a/locale/programs/linereader.c
+++ b/locale/programs/linereader.c
@@ -595,7 +595,7 @@ get_string (struct linereader *lr, const struct charmap_t *charmap,
@@ -363,18 +363,18 @@ index b885f65..0afb631 100644
size_t bufmax = 56;
diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c
-index 6becd9a..8ddd080 100644
+index b7bcef8248..efeced1e0f 100644
--- a/locale/programs/localedef.c
+++ b/locale/programs/localedef.c
-@@ -114,6 +114,7 @@ void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version;
- #define OPT_LIST_ARCHIVE 309
- #define OPT_LITTLE_ENDIAN 400
- #define OPT_BIG_ENDIAN 401
-+#define OPT_UINT32_ALIGN 402
+@@ -109,6 +109,7 @@ void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version;
+ #define OPT_NO_WARN 402
+ #define OPT_WARN 403
+ #define OPT_NO_HARD_LINKS 404
++#define OPT_UINT32_ALIGN 405
/* Definitions of arguments for argp functions. */
static const struct argp_option options[] =
-@@ -150,6 +151,8 @@ static const struct argp_option options[] =
+@@ -153,6 +154,8 @@ static const struct argp_option options[] =
N_("Generate little-endian output") },
{ "big-endian", OPT_BIG_ENDIAN, NULL, 0,
N_("Generate big-endian output") },
@@ -383,7 +383,7 @@ index 6becd9a..8ddd080 100644
{ NULL, 0, NULL, 0, NULL }
};
-@@ -239,12 +242,14 @@ main (int argc, char *argv[])
+@@ -242,12 +245,14 @@ main (int argc, char *argv[])
ctype locale. (P1003.2 4.35.5.2) */
setlocale (LC_CTYPE, "POSIX");
@@ -392,15 +392,15 @@ index 6becd9a..8ddd080 100644
defines error code 3 for this situation so I think it must be
a fatal error (see P1003.2 4.35.8). */
if (sysconf (_SC_2_LOCALEDEF) < 0)
- WITH_CUR_LOCALE (error (3, 0, _("\
- FATAL: system does not define `_POSIX2_LOCALEDEF'")));
+ record_error (3, 0, _("\
+ FATAL: system does not define `_POSIX2_LOCALEDEF'"));
+#endif
/* Process charmap file. */
charmap = charmap_read (charmap_file, verbose, 1, be_quiet, 1);
-@@ -338,6 +343,9 @@ parse_opt (int key, char *arg, struct argp_state *state)
- case OPT_BIG_ENDIAN:
- set_big_endian (true);
+@@ -399,6 +404,9 @@ parse_opt (int key, char *arg, struct argp_state *state)
+ /* Do not hard link to other locales. */
+ hard_links = false;
break;
+ case OPT_UINT32_ALIGN:
+ uint32_align_mask = strtol (arg, NULL, 0) - 1;
@@ -409,7 +409,7 @@ index 6becd9a..8ddd080 100644
force_output = 1;
break;
diff --git a/locale/programs/locfile.c b/locale/programs/locfile.c
-index 32f5cd2..02967b0 100644
+index e4ba48e968..e7b0efe887 100644
--- a/locale/programs/locfile.c
+++ b/locale/programs/locfile.c
@@ -544,6 +544,9 @@ compare_files (const char *filename1, const char *filename2, size_t size,
@@ -432,7 +432,7 @@ index 32f5cd2..02967b0 100644
/* Record that FILE's next element is the 32-bit integer VALUE. */
diff --git a/locale/programs/locfile.h b/locale/programs/locfile.h
-index a3dd904..2c7763a 100644
+index c063fc097d..4e7465e55a 100644
--- a/locale/programs/locfile.h
+++ b/locale/programs/locfile.h
@@ -71,6 +71,8 @@ extern void write_all_categories (struct localedef_t *definitions,
@@ -521,7 +521,7 @@ index a3dd904..2c7763a 100644
+
#endif /* locfile.h */
diff --git a/locale/setlocale.c b/locale/setlocale.c
-index 69b3141..1cef0be 100644
+index 9bd35454b9..2a67dc6589 100644
--- a/locale/setlocale.c
+++ b/locale/setlocale.c
@@ -64,36 +64,6 @@ static char *const _nl_current_used[] =
@@ -562,5 +562,5 @@ index 69b3141..1cef0be 100644
# define WEAK_POSTLOAD(postload) weak_extern (postload)
#else
--
-2.8.2
+2.22.0
diff --git a/meta/recipes-core/glibc/glibc/0025-Define-DUMMY_LOCALE_T-if-not-defined.patch b/meta/recipes-core/glibc/glibc/0023-Define-DUMMY_LOCALE_T-if-not-defined.patch
index 9d60d02828..17667da99f 100644
--- a/meta/recipes-core/glibc/glibc/0025-Define-DUMMY_LOCALE_T-if-not-defined.patch
+++ b/meta/recipes-core/glibc/glibc/0023-Define-DUMMY_LOCALE_T-if-not-defined.patch
@@ -1,7 +1,7 @@
-From 89ec25290d34413ce5c8ba6c378e31dbae3a37c0 Mon Sep 17 00:00:00 2001
+From afa8d6faeddeb80aca318b33edf49d9f8ce65761 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 20 Apr 2016 21:11:00 -0700
-Subject: [PATCH 25/25] Define DUMMY_LOCALE_T if not defined
+Subject: [PATCH 23/28] Define DUMMY_LOCALE_T if not defined
This is a hack to fix building the locale bits on an older
CentOs 5.X machine
@@ -14,7 +14,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 3 insertions(+)
diff --git a/locale/programs/config.h b/locale/programs/config.h
-index f606365..0e5f8c3 100644
+index a1e6e0ec3c..7f75528eae 100644
--- a/locale/programs/config.h
+++ b/locale/programs/config.h
@@ -19,6 +19,9 @@
@@ -28,5 +28,5 @@ index f606365..0e5f8c3 100644
#define PACKAGE _libc_intl_domainname
#ifndef VERSION
--
-2.8.2
+2.22.0
diff --git a/meta/recipes-core/glibc/glibc/0023-eglibc-Install-PIC-archives.patch b/meta/recipes-core/glibc/glibc/0023-eglibc-Install-PIC-archives.patch
deleted file mode 100644
index f985f3ca14..0000000000
--- a/meta/recipes-core/glibc/glibc/0023-eglibc-Install-PIC-archives.patch
+++ /dev/null
@@ -1,123 +0,0 @@
-From 1947f211fab4001e84bb52868cddbd401e597889 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 18 Mar 2015 01:57:01 +0000
-Subject: [PATCH 23/25] eglibc: Install PIC archives
-
-Forward port from eglibc
-
-2008-02-07 Joseph Myers <joseph@codesourcery.com>
-
- * Makerules (install-extras, install-map): New variables.
- (installed-libcs): Add libc_pic.a.
- (install-lib): Include _pic.a files for versioned shared
- libraries.
- (install-map-nosubdir, install-extras-nosubdir): Add rules for
- installing extra files.
- (install-no-libc.a-nosubdir): Depend on install-map-nosubdir and
- install-extras-nosubdir.
-
-2008-04-01 Maxim Kuvyrkov <maxim@codesourcery.com>
-
- * Makerules (install-lib): Don't install libpthread_pic.a.
- (install-map): Don't install libpthread_pic.map.
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makerules | 42 ++++++++++++++++++++++++++++++++++++++++--
- 1 file changed, 40 insertions(+), 2 deletions(-)
-
-diff --git a/Makerules b/Makerules
-index 53eabfa..1cd2a53 100644
---- a/Makerules
-+++ b/Makerules
-@@ -694,6 +694,9 @@ ifeq ($(build-shared),yes)
- $(common-objpfx)libc.so: $(common-objpfx)libc.map
- endif
- common-generated += libc.so libc_pic.os
-+ifndef subdir
-+install-extras := soinit.o sofini.o
-+endif
- ifdef libc.so-version
- $(common-objpfx)libc.so$(libc.so-version): $(common-objpfx)libc.so
- $(make-link)
-@@ -936,6 +939,7 @@ endif
-
- install: check-install-supported
-
-+installed-libcs := $(installed-libcs) $(inst_libdir)/libc_pic.a
- install: $(installed-libcs)
- $(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
- $(make-target-directory)
-@@ -964,6 +968,22 @@ versioned := $(strip $(foreach so,$(install-lib.so),\
- install-lib.so-versioned := $(filter $(versioned), $(install-lib.so))
- install-lib.so-unversioned := $(filter-out $(versioned), $(install-lib.so))
-
-+# Install the _pic.a files for versioned libraries, and corresponding
-+# .map files.
-+# libpthread_pic.a breaks mklibs, so don't install it and its map.
-+install-lib := $(install-lib) $(install-lib.so-versioned:%.so=%_pic.a)
-+install-lib := $(filter-out libpthread_pic.a,$(install-lib))
-+# Despite having a soname libhurduser and libmachuser do not use symbol
-+# versioning, so don't install the corresponding .map files.
-+ifeq ($(build-shared),yes)
-+install-map := $(patsubst %.so,%.map,\
-+ $(foreach L,$(install-lib.so-versioned),$(notdir $L)))
-+install-map := $(filter-out libhurduser.map libmachuser.map libpthread.map,$(install-map))
-+ifndef subdir
-+install-map := $(install-map) libc.map
-+endif
-+endif
-+
- # For versioned libraries, we install three files:
- # $(inst_libdir)/libfoo.so -- for linking, symlink or ld script
- # $(inst_slibdir)/libfoo.so.NN -- for loading by SONAME, symlink
-@@ -1206,9 +1226,22 @@ $(addprefix $(inst_includedir)/,$(headers-nonh)): $(inst_includedir)/%: \
- endif # headers-nonh
- endif # headers
-
-+ifdef install-map
-+$(addprefix $(inst_libdir)/,$(patsubst lib%.map,lib%_pic.map,$(install-map))): \
-+ $(inst_libdir)/lib%_pic.map: $(common-objpfx)lib%.map $(+force)
-+ $(do-install)
-+endif
-+
-+ifdef install-extras
-+$(addprefix $(inst_libdir)/libc_pic/,$(install-extras)): \
-+ $(inst_libdir)/libc_pic/%.o: $(elf-objpfx)%.os $(+force)
-+ $(do-install)
-+endif
-+
- .PHONY: install-bin-nosubdir install-bin-script-nosubdir \
- install-rootsbin-nosubdir install-sbin-nosubdir install-lib-nosubdir \
-- install-data-nosubdir install-headers-nosubdir
-+ install-data-nosubdir install-headers-nosubdir install-map-nosubdir \
-+ install-extras-nosubdir
- install-bin-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin))
- install-bin-script-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin-script))
- install-rootsbin-nosubdir: \
-@@ -1221,6 +1254,10 @@ install-data-nosubdir: $(addprefix $(inst_datadir)/,$(install-data))
- install-headers-nosubdir: $(addprefix $(inst_includedir)/,$(headers))
- install-others-nosubdir: $(install-others)
- install-others-programs-nosubdir: $(install-others-programs)
-+install-map-nosubdir: $(addprefix $(inst_libdir)/,\
-+ $(patsubst lib%.map,lib%_pic.map,$(install-map)))
-+install-extras-nosubdir: $(addprefix $(inst_libdir)/libc_pic/,\
-+ $(install-extras))
-
- # We need all the `-nosubdir' targets so that `install' in the parent
- # doesn't depend on several things which each iterate over the subdirs.
-@@ -1230,7 +1267,8 @@ install-%:: install-%-nosubdir ;
-
- .PHONY: install install-no-libc.a-nosubdir
- install-no-libc.a-nosubdir: install-headers-nosubdir install-data-nosubdir \
-- install-lib-nosubdir install-others-nosubdir
-+ install-lib-nosubdir install-others-nosubdir \
-+ install-map-nosubdir install-extras-nosubdir
- ifeq ($(build-programs),yes)
- install-no-libc.a-nosubdir: install-bin-nosubdir install-bin-script-nosubdir \
- install-rootsbin-nosubdir install-sbin-nosubdir \
---
-2.8.2
-
diff --git a/meta/recipes-core/glibc/glibc/0024-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch b/meta/recipes-core/glibc/glibc/0024-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch
new file mode 100644
index 0000000000..f68e4f4fa6
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0024-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch
@@ -0,0 +1,84 @@
+From c13e18adb634a6fd59129150ab7f9468f64dc931 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 3 Aug 2018 09:42:06 -0700
+Subject: [PATCH 24/28] localedef --add-to-archive uses a hard-coded locale
+ path
+
+it doesn't exist in normal use, and there's no way to pass an
+alternative filename.
+
+Add a fallback of $LOCALEARCHIVE from the environment, and allow
+creation of new locale archives that are not the system archive.
+
+Upstream-Status: Inappropriate (OE-specific)
+
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ locale/programs/locarchive.c | 35 +++++++++++++++++++++++++----------
+ 1 file changed, 25 insertions(+), 10 deletions(-)
+
+diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c
+index e6310b18be..f54a76eade 100644
+--- a/locale/programs/locarchive.c
++++ b/locale/programs/locarchive.c
+@@ -340,12 +340,24 @@ enlarge_archive (struct locarhandle *ah, const struct locarhead *head)
+ struct namehashent *oldnamehashtab;
+ struct locarhandle new_ah;
+ size_t prefix_len = output_prefix ? strlen (output_prefix) : 0;
+- char archivefname[prefix_len + sizeof (ARCHIVE_NAME)];
+- char fname[prefix_len + sizeof (ARCHIVE_NAME) + sizeof (".XXXXXX") - 1];
++ char *archivefname;
++ char *fname;
++ char *envarchive = getenv("LOCALEARCHIVE");
+
+- if (output_prefix)
+- memcpy (archivefname, output_prefix, prefix_len);
+- strcpy (archivefname + prefix_len, ARCHIVE_NAME);
++ if (envarchive != NULL)
++ {
++ archivefname = xmalloc(strlen(envarchive) + 1);
++ fname = xmalloc(strlen(envarchive) + sizeof (".XXXXXX"));
++ strcpy (archivefname, envarchive);
++ }
++ else
++ {
++ archivefname = xmalloc(prefix_len + sizeof (ARCHIVE_NAME));
++ fname = xmalloc(prefix_len + sizeof (ARCHIVE_NAME) + sizeof (".XXXXXX") - 1);
++ if (output_prefix)
++ memcpy (archivefname, output_prefix, prefix_len);
++ strcpy (archivefname + prefix_len, ARCHIVE_NAME);
++ }
+ strcpy (stpcpy (fname, archivefname), ".XXXXXX");
+
+ /* Not all of the old file has to be mapped. Change this now this
+@@ -569,10 +581,13 @@ open_archive (struct locarhandle *ah, bool readonly)
+ /* If ah has a non-NULL fname open that otherwise open the default. */
+ if (archivefname == NULL)
+ {
+- archivefname = default_fname;
+- if (output_prefix)
+- memcpy (default_fname, output_prefix, prefix_len);
+- strcpy (default_fname + prefix_len, ARCHIVE_NAME);
++ archivefname = getenv("LOCALEARCHIVE");
++ if (archivefname == NULL) {
++ archivefname = default_fname;
++ if (output_prefix)
++ memcpy (default_fname, output_prefix, prefix_len);
++ strcpy (default_fname + prefix_len, ARCHIVE_NAME);
++ }
+ }
+
+ while (1)
+@@ -585,7 +600,7 @@ open_archive (struct locarhandle *ah, bool readonly)
+ the default locale archive we ignore the failure and
+ list an empty archive, otherwise we print an error
+ and exit. */
+- if (errno == ENOENT && archivefname == default_fname)
++ if (errno == ENOENT)
+ {
+ if (readonly)
+ {
+--
+2.22.0
+
diff --git a/meta/recipes-core/glibc/glibc/0026-build_local_scope.patch b/meta/recipes-core/glibc/glibc/0025-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch
index 8e0cb83194..76a9eb2563 100644
--- a/meta/recipes-core/glibc/glibc/0026-build_local_scope.patch
+++ b/meta/recipes-core/glibc/glibc/0025-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch
@@ -1,7 +1,7 @@
-From 6e4ec5a3c5fe63b6458036f18d43124de4a7e724 Mon Sep 17 00:00:00 2001
+From 7c9ebe966bb97dd14de5719905b61311211ae3c8 Mon Sep 17 00:00:00 2001
From: Mark Hatle <mark.hatle@windriver.com>
Date: Thu, 18 Aug 2016 14:07:58 -0500
-Subject: [PATCH] elf/dl-deps.c: Make _dl_build_local_scope breadth first
+Subject: [PATCH 25/28] elf/dl-deps.c: Make _dl_build_local_scope breadth first
According to the ELF specification:
@@ -24,7 +24,7 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/elf/dl-deps.c b/elf/dl-deps.c
-index 6a82987..fc37c87 100644
+index e12c353158..9234daac05 100644
--- a/elf/dl-deps.c
+++ b/elf/dl-deps.c
@@ -73,13 +73,19 @@ _dl_build_local_scope (struct link_map **list, struct link_map *map)
@@ -52,5 +52,5 @@ index 6a82987..fc37c87 100644
}
--
-2.5.5
+2.22.0
diff --git a/meta/recipes-core/glibc/glibc/0026-intl-Emit-no-lines-in-bison-generated-files.patch b/meta/recipes-core/glibc/glibc/0026-intl-Emit-no-lines-in-bison-generated-files.patch
new file mode 100644
index 0000000000..7589e11d57
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0026-intl-Emit-no-lines-in-bison-generated-files.patch
@@ -0,0 +1,34 @@
+From aa5c758fbb7dbb026df33fc6bdc05548547bdb17 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 3 Aug 2018 09:44:00 -0700
+Subject: [PATCH 26/28] intl: Emit no lines in bison generated files
+
+Improve reproducibility:
+Do not put any #line preprocessor commands in bison generated files.
+These lines contain absolute paths containing file locations on
+the host build machine.
+
+Upstream-Status: Pending
+
+Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ intl/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/intl/Makefile b/intl/Makefile
+index 9eea8d57e3..627dce4cf1 100644
+--- a/intl/Makefile
++++ b/intl/Makefile
+@@ -155,7 +155,7 @@ $(objpfx)tst-gettext6.out: $(objpfx)tst-gettext.out
+
+ CPPFLAGS += -D'LOCALEDIR="$(localedir)"' \
+ -D'LOCALE_ALIAS_PATH="$(localedir)"'
+-BISONFLAGS = --yacc --name-prefix=__gettext --output
++BISONFLAGS = --yacc --no-lines --name-prefix=__gettext --output
+
+ $(inst_localedir)/locale.alias: locale.alias $(+force)
+ $(do-install)
+--
+2.22.0
+
diff --git a/meta/recipes-core/glibc/glibc/0027-inject-file-assembly-directives.patch b/meta/recipes-core/glibc/glibc/0027-inject-file-assembly-directives.patch
new file mode 100644
index 0000000000..dc205a833f
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0027-inject-file-assembly-directives.patch
@@ -0,0 +1,304 @@
+From fecd98040a2ae1bc5943a40a1623d76a696e0785 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 29 Nov 2018 17:29:35 -0800
+Subject: [PATCH 27/28] inject file assembly directives
+
+Currently, non-IA builds are not reproducibile since build paths are
+being injected into the debug symbols. These are coming from the use of
+.S assembler files during the glibc build. No STT_FILE section is added
+during the assembly but when linking, ld decides to add one to aid
+debugging and ensure references between the different object files its
+linking remain clear.
+
+We can avoid this by injecting a file header into the assembler files
+ahead of time, choosing a filename which does not contain build system
+paths.
+
+This is a bit of a workaround/hack but does significantly reduce the
+build system references in target binaries for the non-IA architectures
+which use .S files.
+
+RP
+2018/10/3
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ csu/abi-note.S | 2 ++
+ sysdeps/aarch64/crti.S | 2 ++
+ sysdeps/aarch64/crtn.S | 2 ++
+ sysdeps/aarch64/dl-tlsdesc.S | 2 ++
+ sysdeps/aarch64/dl-trampoline.S | 2 ++
+ sysdeps/aarch64/start.S | 2 ++
+ sysdeps/arm/abi-note.S | 2 ++
+ sysdeps/arm/crti.S | 2 ++
+ sysdeps/arm/crtn.S | 2 ++
+ sysdeps/arm/dl-tlsdesc.S | 2 ++
+ sysdeps/arm/dl-trampoline.S | 2 ++
+ sysdeps/arm/start.S | 2 ++
+ sysdeps/mips/start.S | 2 ++
+ sysdeps/powerpc/powerpc32/dl-start.S | 2 ++
+ sysdeps/powerpc/powerpc32/start.S | 2 ++
+ sysdeps/powerpc/powerpc64/start.S | 2 ++
+ sysdeps/unix/sysv/linux/aarch64/__read_tp.S | 2 ++
+ sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S | 2 ++
+ sysdeps/unix/sysv/linux/arm/libc-do-syscall.S | 2 ++
+ sysdeps/unix/sysv/linux/powerpc/dl-brk.S | 2 ++
+ 20 files changed, 40 insertions(+)
+
+diff --git a/csu/abi-note.S b/csu/abi-note.S
+index fa1f014a88..098731362a 100644
+--- a/csu/abi-note.S
++++ b/csu/abi-note.S
+@@ -56,6 +56,8 @@ offset length contents
+ #include <config.h>
+ #include <abi-tag.h> /* OS-specific ABI tag value */
+
++ .file "abi-note.S"
++
+ /* The linker (GNU ld 2.8 and later) recognizes an allocated section whose
+ name begins with `.note' and creates a PT_NOTE program header entry
+ pointing at it. */
+diff --git a/sysdeps/aarch64/crti.S b/sysdeps/aarch64/crti.S
+index d4e7dfcf5c..e0218df30c 100644
+--- a/sysdeps/aarch64/crti.S
++++ b/sysdeps/aarch64/crti.S
+@@ -50,6 +50,8 @@
+ # define PREINIT_FUNCTION_WEAK 1
+ #endif
+
++ .file "crti.S"
++
+ #if PREINIT_FUNCTION_WEAK
+ weak_extern (PREINIT_FUNCTION)
+ #else
+diff --git a/sysdeps/aarch64/crtn.S b/sysdeps/aarch64/crtn.S
+index 363f752460..2fb06fba62 100644
+--- a/sysdeps/aarch64/crtn.S
++++ b/sysdeps/aarch64/crtn.S
+@@ -37,6 +37,8 @@
+ /* crtn.S puts function epilogues in the .init and .fini sections
+ corresponding to the prologues in crti.S. */
+
++ .file "crtn.S"
++
+ .section .init,"ax",%progbits
+ ldp x29, x30, [sp], 16
+ RET
+diff --git a/sysdeps/aarch64/dl-tlsdesc.S b/sysdeps/aarch64/dl-tlsdesc.S
+index 4abe6b82a3..8c44b2ff8a 100644
+--- a/sysdeps/aarch64/dl-tlsdesc.S
++++ b/sysdeps/aarch64/dl-tlsdesc.S
+@@ -22,6 +22,8 @@
+ #include <tls.h>
+ #include "tlsdesc.h"
+
++ .file "dl-tlsdesc.S"
++
+ #define NSAVEDQREGPAIRS 16
+ #define SAVE_Q_REGISTERS \
+ stp q0, q1, [sp, #-32*NSAVEDQREGPAIRS]!; \
+diff --git a/sysdeps/aarch64/dl-trampoline.S b/sysdeps/aarch64/dl-trampoline.S
+index 19b117e8f9..38c78b5409 100644
+--- a/sysdeps/aarch64/dl-trampoline.S
++++ b/sysdeps/aarch64/dl-trampoline.S
+@@ -21,6 +21,8 @@
+
+ #include "dl-link.h"
+
++ .file "dl-trampoline.S"
++
+ #define ip0 x16
+ #define ip0l PTR_REG (16)
+ #define ip1 x17
+diff --git a/sysdeps/aarch64/start.S b/sysdeps/aarch64/start.S
+index f5e9b9c223..ae3e22a6a5 100644
+--- a/sysdeps/aarch64/start.S
++++ b/sysdeps/aarch64/start.S
+@@ -18,6 +18,8 @@
+
+ #include <sysdep.h>
+
++ .file "start.S"
++
+ /* This is the canonical entry point, usually the first thing in the text
+ segment.
+
+diff --git a/sysdeps/arm/abi-note.S b/sysdeps/arm/abi-note.S
+index 07bd4c4619..7213b16f27 100644
+--- a/sysdeps/arm/abi-note.S
++++ b/sysdeps/arm/abi-note.S
+@@ -1,3 +1,5 @@
++ .file "abi-note.S"
++
+ /* Tag_ABI_align8_preserved: This code preserves 8-byte
+ alignment in any callee. */
+ .eabi_attribute 25, 1
+diff --git a/sysdeps/arm/crti.S b/sysdeps/arm/crti.S
+index 26dbba66a3..dd84ecd566 100644
+--- a/sysdeps/arm/crti.S
++++ b/sysdeps/arm/crti.S
+@@ -57,6 +57,8 @@
+ .hidden PREINIT_FUNCTION
+ #endif
+
++ .file "crti.S"
++
+ #if PREINIT_FUNCTION_WEAK
+ .p2align 2
+ .type call_weak_fn, %function
+diff --git a/sysdeps/arm/crtn.S b/sysdeps/arm/crtn.S
+index 8f91c8d88b..a87fe49e07 100644
+--- a/sysdeps/arm/crtn.S
++++ b/sysdeps/arm/crtn.S
+@@ -37,6 +37,8 @@
+ #define NO_THUMB
+ #include <sysdep.h>
+
++ .file "crtn.S"
++
+ /* crtn.S puts function epilogues in the .init and .fini sections
+ corresponding to the prologues in crti.S. */
+
+diff --git a/sysdeps/arm/dl-tlsdesc.S b/sysdeps/arm/dl-tlsdesc.S
+index a929340b42..b724c9776d 100644
+--- a/sysdeps/arm/dl-tlsdesc.S
++++ b/sysdeps/arm/dl-tlsdesc.S
+@@ -21,6 +21,8 @@
+ #include <tls.h>
+ #include "tlsdesc.h"
+
++ .file "dl-tlsdesc.S"
++
+ .text
+ @ emit debug information with cfi
+ @ use arm-specific pseudos for unwinding itself
+diff --git a/sysdeps/arm/dl-trampoline.S b/sysdeps/arm/dl-trampoline.S
+index 325cfcd2ce..4bfdcbce51 100644
+--- a/sysdeps/arm/dl-trampoline.S
++++ b/sysdeps/arm/dl-trampoline.S
+@@ -21,6 +21,8 @@
+ #include <sysdep.h>
+ #include <libc-symbols.h>
+
++ .file "dl-trampoline.S"
++
+ .text
+ .globl _dl_runtime_resolve
+ .type _dl_runtime_resolve, #function
+diff --git a/sysdeps/arm/start.S b/sysdeps/arm/start.S
+index a05f8a4651..2f4374fcaa 100644
+--- a/sysdeps/arm/start.S
++++ b/sysdeps/arm/start.S
+@@ -57,6 +57,8 @@
+ NULL
+ */
+
++ .file "start.S"
++
+ /* Tag_ABI_align8_preserved: This code preserves 8-byte
+ alignment in any callee. */
+ .eabi_attribute 25, 1
+diff --git a/sysdeps/mips/start.S b/sysdeps/mips/start.S
+index 8638e5b545..93f6564aec 100644
+--- a/sysdeps/mips/start.S
++++ b/sysdeps/mips/start.S
+@@ -38,6 +38,8 @@
+ #include <sgidefs.h>
+ #include <sys/asm.h>
+
++ .file "start.S"
++
+ #ifndef ENTRY_POINT
+ #error ENTRY_POINT needs to be defined for start.S on MIPS/ELF.
+ #endif
+diff --git a/sysdeps/powerpc/powerpc32/dl-start.S b/sysdeps/powerpc/powerpc32/dl-start.S
+index 99a10d643a..e47fc0d245 100644
+--- a/sysdeps/powerpc/powerpc32/dl-start.S
++++ b/sysdeps/powerpc/powerpc32/dl-start.S
+@@ -18,6 +18,8 @@
+
+ #include <sysdep.h>
+
++ .file "dl-start.S"
++
+ /* Initial entry point code for the dynamic linker.
+ The C function `_dl_start' is the real entry point;
+ its return value is the user program's entry point. */
+diff --git a/sysdeps/powerpc/powerpc32/start.S b/sysdeps/powerpc/powerpc32/start.S
+index 172fb5a56b..ef1471b861 100644
+--- a/sysdeps/powerpc/powerpc32/start.S
++++ b/sysdeps/powerpc/powerpc32/start.S
+@@ -35,6 +35,8 @@
+
+ #include <sysdep.h>
+
++ .file "start.S"
++
+ /* We do not want .eh_frame info for crt1.o since crt1.o is linked
+ before crtbegin.o, the file defining __EH_FRAME_BEGIN__. */
+ #undef cfi_startproc
+diff --git a/sysdeps/powerpc/powerpc64/start.S b/sysdeps/powerpc/powerpc64/start.S
+index 55fae68ad6..0cb608fe0f 100644
+--- a/sysdeps/powerpc/powerpc64/start.S
++++ b/sysdeps/powerpc/powerpc64/start.S
+@@ -35,6 +35,8 @@
+
+ #include <sysdep.h>
+
++ .file "start.S"
++
+ /* We do not want .eh_frame info for crt1.o since crt1.o is linked
+ before crtbegin.o, the file defining __EH_FRAME_BEGIN__. */
+ #undef cfi_startproc
+diff --git a/sysdeps/unix/sysv/linux/aarch64/__read_tp.S b/sysdeps/unix/sysv/linux/aarch64/__read_tp.S
+index 30a29b9fb0..07892b383f 100644
+--- a/sysdeps/unix/sysv/linux/aarch64/__read_tp.S
++++ b/sysdeps/unix/sysv/linux/aarch64/__read_tp.S
+@@ -18,6 +18,8 @@
+
+ #include <sysdep.h>
+
++ .file "__read_tp.S"
++
+ .hidden __read_tp
+ ENTRY (__read_tp)
+ mrs x0, tpidr_el0
+diff --git a/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S b/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S
+index f64c4ffe8a..2da315ab08 100644
+--- a/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S
++++ b/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S
+@@ -39,6 +39,8 @@
+ a normal function call) in a high page of memory; tail call to the
+ helper. */
+
++ .file "aeabi_read_tp.S"
++
+ .hidden __aeabi_read_tp
+ ENTRY (__aeabi_read_tp)
+ #ifdef ARCH_HAS_HARD_TP
+diff --git a/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S b/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S
+index 0b6237ac55..8cda491c28 100644
+--- a/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S
++++ b/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S
+@@ -27,6 +27,8 @@
+ ARM unwind tables for register to register moves, the actual opcodes
+ are not defined. */
+
++ .file "libc-do-syscall.S"
++
+ #if defined(__thumb__)
+ .thumb
+ .syntax unified
+diff --git a/sysdeps/unix/sysv/linux/powerpc/dl-brk.S b/sysdeps/unix/sysv/linux/powerpc/dl-brk.S
+index eeb96544e3..da182b28f8 100644
+--- a/sysdeps/unix/sysv/linux/powerpc/dl-brk.S
++++ b/sysdeps/unix/sysv/linux/powerpc/dl-brk.S
+@@ -1 +1,3 @@
++ .file "dl-brk.S"
++
+ #include <brk.S>
+--
+2.22.0
+
diff --git a/meta/recipes-core/glibc/glibc/0028-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch b/meta/recipes-core/glibc/glibc/0028-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch
new file mode 100644
index 0000000000..6c49066fd1
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0028-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch
@@ -0,0 +1,56 @@
+From d934788e3221c28c9a1892235cbe4cfd1b28ced0 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <martin.jansa@gmail.com>
+Date: Mon, 17 Dec 2018 21:36:18 +0000
+Subject: [PATCH 28/28] locale: prevent maybe-uninitialized errors with -Os [BZ
+ #19444]
+
+Fixes following error when building for aarch64 with -Os:
+| In file included from strcoll_l.c:43:
+| strcoll_l.c: In function '__strcoll_l':
+| ../locale/weight.h:31:26: error: 'seq2.back_us' may be used uninitialized in this function [-Werror=maybe-uninitialized]
+| int_fast32_t i = table[*(*cpp)++];
+| ^~~~~~~~~
+| strcoll_l.c:304:18: note: 'seq2.back_us' was declared here
+| coll_seq seq1, seq2;
+| ^~~~
+| In file included from strcoll_l.c:43:
+| ../locale/weight.h:31:26: error: 'seq1.back_us' may be used uninitialized in this function [-Werror=maybe-uninitialized]
+| int_fast32_t i = table[*(*cpp)++];
+| ^~~~~~~~~
+| strcoll_l.c:304:12: note: 'seq1.back_us' was declared here
+| coll_seq seq1, seq2;
+| ^~~~
+
+ Partial fix for [BZ #19444]
+ * locale/weight.h: Fix build with -Os.
+
+Upstream-Status: Submitted [https://patchwork.ozlabs.org/patch/1014766]
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ locale/weight.h | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/locale/weight.h b/locale/weight.h
+index 7ca81498b2..d608ca70bb 100644
+--- a/locale/weight.h
++++ b/locale/weight.h
+@@ -28,7 +28,14 @@ findidx (const int32_t *table,
+ const unsigned char *extra,
+ const unsigned char **cpp, size_t len)
+ {
++ /* With GCC 8 when compiling with -Os the compiler warns that
++ seq1.back_us and seq2.back_us might be used uninitialized.
++ This uninitialized use is impossible for the same reason
++ as described in comments in locale/weightwc.h. */
++ DIAG_PUSH_NEEDS_COMMENT;
++ DIAG_IGNORE_Os_NEEDS_COMMENT (8, "-Wmaybe-uninitialized");
+ int_fast32_t i = table[*(*cpp)++];
++ DIAG_POP_NEEDS_COMMENT;
+ const unsigned char *cp;
+ const unsigned char *usrc;
+
+--
+2.22.0
+
diff --git a/meta/recipes-core/glibc/glibc/CVE-2019-19126.patch b/meta/recipes-core/glibc/glibc/CVE-2019-19126.patch
new file mode 100644
index 0000000000..aead04c485
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/CVE-2019-19126.patch
@@ -0,0 +1,32 @@
+From 37c90e117310728a4ad1eb998c0bbe7d79c4a398 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Marcin=20Ko=C5=9Bcielnicki?= <mwk@0x04.net>
+Date: Thu, 21 Nov 2019 00:20:15 +0100
+Subject: [PATCH] rtld: Check __libc_enable_secure before honoring
+ LD_PREFER_MAP_32BIT_EXEC (CVE-2019-19126) [BZ #25204]
+
+The problem was introduced in glibc 2.23, in commit
+b9eb92ab05204df772eb4929eccd018637c9f3e9
+("Add Prefer_MAP_32BIT_EXEC to map executable pages with MAP_32BIT").
+
+(cherry picked from commit d5dfad4326fc683c813df1e37bbf5cf920591c8e)
+
+Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commit;h=37c90e117310728a4ad1eb998c0bbe7d79c4a398]
+CVE: CVE-2019-19126
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+diff --git a/sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h b/sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h
+index 975cbe2..df2cdfd 100644
+--- a/sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h
++++ b/sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h
+@@ -31,7 +31,8 @@
+ environment variable, LD_PREFER_MAP_32BIT_EXEC. */
+ #define EXTRA_LD_ENVVARS \
+ case 21: \
+- if (memcmp (envline, "PREFER_MAP_32BIT_EXEC", 21) == 0) \
++ if (!__libc_enable_secure \
++ && memcmp (envline, "PREFER_MAP_32BIT_EXEC", 21) == 0) \
+ GLRO(dl_x86_cpu_features).feature[index_arch_Prefer_MAP_32BIT_EXEC] \
+ |= bit_arch_Prefer_MAP_32BIT_EXEC; \
+ break;
+--
+2.9.3
diff --git a/meta/recipes-core/glibc/glibc/add-cross-localedef-hardlink.patch b/meta/recipes-core/glibc/glibc/add-cross-localedef-hardlink.patch
new file mode 100644
index 0000000000..8471121949
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/add-cross-localedef-hardlink.patch
@@ -0,0 +1,1115 @@
+---
+ locale/programs/c.h | 407 ++++++++++++++++++++++
+ locale/programs/cross-localedef-hardlink.c | 528 +++++++++++++++++++++++++++++
+ locale/programs/xalloc.h | 129 +++++++
+ localedef/Makefile.in | 8
+ 4 files changed, 1071 insertions(+), 1 deletion(-)
+
+--- /dev/null
++++ b/locale/programs/cross-localedef-hardlink.c
+@@ -0,0 +1,528 @@
++/*
++ * hardlink - consolidate duplicate files via hardlinks
++ *
++ * Copyright (C) 2018 Red Hat, Inc. All rights reserved.
++ * Written by Jakub Jelinek <jakub@redhat.com>
++ *
++ * Copyright (C) 2019 Karel Zak <kzak@redhat.com>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it would be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License along
++ * with this program; if not, write to the Free Software Foundation, Inc.,
++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
++ */
++#include <sys/types.h>
++#include <stdlib.h>
++#include <getopt.h>
++#include <stdio.h>
++#include <unistd.h>
++#include <sys/stat.h>
++#include <sys/mman.h>
++#include <string.h>
++#include <dirent.h>
++#include <fcntl.h>
++#include <errno.h>
++#ifdef HAVE_PCRE
++# define PCRE2_CODE_UNIT_WIDTH 8
++# include <pcre2.h>
++#endif
++
++#include "c.h"
++#include "xalloc.h"
++#include "nls.h"
++#include "closestream.h"
++
++#define NHASH (1<<17) /* Must be a power of 2! */
++#define NBUF 64
++
++struct hardlink_file;
++
++struct hardlink_hash {
++ struct hardlink_hash *next;
++ struct hardlink_file *chain;
++ off_t size;
++ time_t mtime;
++};
++
++struct hardlink_dir {
++ struct hardlink_dir *next;
++ char name[];
++};
++
++struct hardlink_file {
++ struct hardlink_file *next;
++ ino_t ino;
++ dev_t dev;
++ unsigned int cksum;
++ char name[];
++};
++
++struct hardlink_dynstr {
++ char *buf;
++ size_t alloc;
++};
++
++struct hardlink_ctl {
++ struct hardlink_dir *dirs;
++ struct hardlink_hash *hps[NHASH];
++ char iobuf1[BUFSIZ];
++ char iobuf2[BUFSIZ];
++ /* summary counters */
++ unsigned long long ndirs;
++ unsigned long long nobjects;
++ unsigned long long nregfiles;
++ unsigned long long ncomp;
++ unsigned long long nlinks;
++ unsigned long long nsaved;
++ /* current device */
++ dev_t dev;
++ /* flags */
++ unsigned int verbose;
++ unsigned int
++ no_link:1,
++ content_only:1,
++ force:1;
++};
++/* ctl is in global scope due use in atexit() */
++struct hardlink_ctl global_ctl;
++
++__attribute__ ((always_inline))
++static inline unsigned int hash(off_t size, time_t mtime)
++{
++ return (size ^ mtime) & (NHASH - 1);
++}
++
++__attribute__ ((always_inline))
++static inline int stcmp(struct stat *st1, struct stat *st2, int content_scope)
++{
++ if (content_scope)
++ return st1->st_size != st2->st_size;
++
++ return st1->st_mode != st2->st_mode
++ || st1->st_uid != st2->st_uid
++ || st1->st_gid != st2->st_gid
++ || st1->st_size != st2->st_size
++ || st1->st_mtime != st2->st_mtime;
++}
++
++static void print_summary(void)
++{
++ struct hardlink_ctl const *const ctl = &global_ctl;
++
++ if (!ctl->verbose)
++ return;
++
++ if (ctl->verbose > 1 && ctl->nlinks)
++ fputc('\n', stdout);
++
++ printf(_("Directories: %9lld\n"), ctl->ndirs);
++ printf(_("Objects: %9lld\n"), ctl->nobjects);
++ printf(_("Regular files: %9lld\n"), ctl->nregfiles);
++ printf(_("Comparisons: %9lld\n"), ctl->ncomp);
++ printf( "%s%9lld\n", (ctl->no_link ?
++ _("Would link: ") :
++ _("Linked: ")), ctl->nlinks);
++ printf( "%s %9lld\n", (ctl->no_link ?
++ _("Would save: ") :
++ _("Saved: ")), ctl->nsaved);
++}
++
++static void __attribute__((__noreturn__)) usage(void)
++{
++ fputs(USAGE_HEADER, stdout);
++ printf(_(" %s [options] directory...\n"), program_invocation_short_name);
++
++ fputs(USAGE_SEPARATOR, stdout);
++ puts(_("Consolidate duplicate files using hardlinks."));
++
++ fputs(USAGE_OPTIONS, stdout);
++ puts(_(" -c, --content compare only contents, ignore permission, etc."));
++ puts(_(" -n, --dry-run don't actually link anything"));
++ puts(_(" -v, --verbose print summary after hardlinking"));
++ puts(_(" -vv print every hardlinked file and summary"));
++ puts(_(" -f, --force force hardlinking across filesystems"));
++ puts(_(" -x, --exclude <regex> exclude files matching pattern"));
++
++ fputs(USAGE_SEPARATOR, stdout);
++ printf(USAGE_HELP_OPTIONS(16)); /* char offset to align option descriptions */
++ printf(USAGE_MAN_TAIL("hardlink(1)"));
++ exit(EXIT_SUCCESS);
++}
++
++__attribute__ ((always_inline))
++static inline size_t add2(size_t a, size_t b)
++{
++ size_t sum = a + b;
++
++ if (sum < a)
++ errx(EXIT_FAILURE, _("integer overflow"));
++ return sum;
++}
++
++__attribute__ ((always_inline))
++static inline size_t add3(size_t a, size_t b, size_t c)
++{
++ return add2(add2(a, b), c);
++}
++
++static void growstr(struct hardlink_dynstr *str, size_t newlen)
++{
++ if (newlen < str->alloc)
++ return;
++ str->buf = xrealloc(str->buf, str->alloc = add2(newlen, 1));
++}
++
++static void process_path(struct hardlink_ctl *ctl, const char *name)
++{
++ struct stat st, st2, st3;
++ const size_t namelen = strlen(name);
++
++ ctl->nobjects++;
++ if (lstat(name, &st))
++ return;
++
++ if (st.st_dev != ctl->dev && !ctl->force) {
++ if (ctl->dev)
++ errx(EXIT_FAILURE,
++ _("%s is on different filesystem than the rest "
++ "(use -f option to override)."), name);
++ ctl->dev = st.st_dev;
++ }
++ if (S_ISDIR(st.st_mode)) {
++ struct hardlink_dir *dp = xmalloc(add3(sizeof(*dp), namelen, 1));
++ memcpy(dp->name, name, namelen + 1);
++ dp->next = ctl->dirs;
++ ctl->dirs = dp;
++
++ } else if (S_ISREG(st.st_mode)) {
++ int fd, i;
++ struct hardlink_file *fp, *fp2;
++ struct hardlink_hash *hp;
++ const char *n1, *n2;
++ unsigned int buf[NBUF];
++ int cksumsize = sizeof(buf);
++ unsigned int cksum;
++ time_t mtime = ctl->content_only ? 0 : st.st_mtime;
++ unsigned int hsh = hash(st.st_size, mtime);
++ off_t fsize;
++
++ ctl->nregfiles++;
++ if (ctl->verbose > 1)
++ printf("%s\n", name);
++
++ fd = open(name, O_RDONLY);
++ if (fd < 0)
++ return;
++
++ if ((size_t)st.st_size < sizeof(buf)) {
++ cksumsize = st.st_size;
++ memset(((char *)buf) + cksumsize, 0,
++ (sizeof(buf) - cksumsize) % sizeof(buf[0]));
++ }
++ if (read(fd, buf, cksumsize) != cksumsize) {
++ close(fd);
++ return;
++ }
++ cksumsize = (cksumsize + sizeof(buf[0]) - 1) / sizeof(buf[0]);
++ for (i = 0, cksum = 0; i < cksumsize; i++) {
++ if (cksum + buf[i] < cksum)
++ cksum += buf[i] + 1;
++ else
++ cksum += buf[i];
++ }
++ for (hp = ctl->hps[hsh]; hp; hp = hp->next) {
++ if (hp->size == st.st_size && hp->mtime == mtime)
++ break;
++ }
++ if (!hp) {
++ hp = xmalloc(sizeof(*hp));
++ hp->size = st.st_size;
++ hp->mtime = mtime;
++ hp->chain = NULL;
++ hp->next = ctl->hps[hsh];
++ ctl->hps[hsh] = hp;
++ }
++ for (fp = hp->chain; fp; fp = fp->next) {
++ if (fp->cksum == cksum)
++ break;
++ }
++ for (fp2 = fp; fp2 && fp2->cksum == cksum; fp2 = fp2->next) {
++ if (fp2->ino == st.st_ino && fp2->dev == st.st_dev) {
++ close(fd);
++ return;
++ }
++ }
++ for (fp2 = fp; fp2 && fp2->cksum == cksum; fp2 = fp2->next) {
++
++ if (!lstat(fp2->name, &st2) && S_ISREG(st2.st_mode) &&
++ !stcmp(&st, &st2, ctl->content_only) &&
++ st2.st_ino != st.st_ino &&
++ st2.st_dev == st.st_dev) {
++
++ int fd2 = open(fp2->name, O_RDONLY);
++ if (fd2 < 0)
++ continue;
++
++ if (fstat(fd2, &st2) || !S_ISREG(st2.st_mode)
++ || st2.st_size == 0) {
++ close(fd2);
++ continue;
++ }
++ ctl->ncomp++;
++ lseek(fd, 0, SEEK_SET);
++
++ for (fsize = st.st_size; fsize > 0;
++ fsize -= (off_t)sizeof(ctl->iobuf1)) {
++ ssize_t xsz;
++ ssize_t rsize = fsize > (ssize_t) sizeof(ctl->iobuf1) ?
++ (ssize_t) sizeof(ctl->iobuf1) : fsize;
++
++ if ((xsz = read(fd, ctl->iobuf1, rsize)) != rsize)
++ warn(_("cannot read %s"), name);
++ else if ((xsz = read(fd2, ctl->iobuf2, rsize)) != rsize)
++ warn(_("cannot read %s"), fp2->name);
++
++ if (xsz != rsize) {
++ close(fd);
++ close(fd2);
++ return;
++ }
++ if (memcmp(ctl->iobuf1, ctl->iobuf2, rsize))
++ break;
++ }
++ close(fd2);
++ if (fsize > 0)
++ continue;
++ if (lstat(name, &st3)) {
++ warn(_("cannot stat %s"), name);
++ close(fd);
++ return;
++ }
++ st3.st_atime = st.st_atime;
++ if (stcmp(&st, &st3, 0)) {
++ warnx(_("file %s changed underneath us"), name);
++ close(fd);
++ return;
++ }
++ n1 = fp2->name;
++ n2 = name;
++
++ if (!ctl->no_link) {
++ const char *suffix =
++ ".$$$___cleanit___$$$";
++ const size_t suffixlen = strlen(suffix);
++ size_t n2len = strlen(n2);
++ struct hardlink_dynstr nam2 = { NULL, 0 };
++
++ growstr(&nam2, add2(n2len, suffixlen));
++ memcpy(nam2.buf, n2, n2len);
++ memcpy(&nam2.buf[n2len], suffix,
++ suffixlen + 1);
++ /* First create a temporary link to n1 under a new name */
++ if (link(n1, nam2.buf)) {
++ warn(_("failed to hardlink %s to %s (create temporary link as %s failed)"),
++ n1, n2, nam2.buf);
++ free(nam2.buf);
++ continue;
++ }
++ /* Then rename into place over the existing n2 */
++ if (rename(nam2.buf, n2)) {
++ warn(_("failed to hardlink %s to %s (rename temporary link to %s failed)"),
++ n1, n2, n2);
++ /* Something went wrong, try to remove the now redundant temporary link */
++ if (unlink(nam2.buf))
++ warn(_("failed to remove temporary link %s"), nam2.buf);
++ free(nam2.buf);
++ continue;
++ }
++ free(nam2.buf);
++ }
++ ctl->nlinks++;
++ if (st3.st_nlink > 1) {
++ /* We actually did not save anything this time, since the link second argument
++ had some other links as well. */
++ if (ctl->verbose > 1)
++ printf(_(" %s %s to %s\n"),
++ (ctl->no_link ? _("Would link") : _("Linked")),
++ n1, n2);
++ } else {
++ ctl->nsaved += ((st.st_size + 4095) / 4096) * 4096;
++ if (ctl->verbose > 1)
++ printf(_(" %s %s to %s, %s %jd\n"),
++ (ctl->no_link ? _("Would link") : _("Linked")),
++ n1, n2,
++ (ctl->no_link ? _("would save") : _("saved")),
++ (intmax_t)st.st_size);
++ }
++ close(fd);
++ return;
++ }
++ }
++ fp2 = xmalloc(add3(sizeof(*fp2), namelen, 1));
++ close(fd);
++ fp2->ino = st.st_ino;
++ fp2->dev = st.st_dev;
++ fp2->cksum = cksum;
++ memcpy(fp2->name, name, namelen + 1);
++
++ if (fp) {
++ fp2->next = fp->next;
++ fp->next = fp2;
++ } else {
++ fp2->next = hp->chain;
++ hp->chain = fp2;
++ }
++ return;
++ }
++}
++
++int main(int argc, char **argv)
++{
++ int ch;
++ int i;
++#ifdef HAVE_PCRE
++ int errornumber;
++ PCRE2_SIZE erroroffset;
++ pcre2_code *re = NULL;
++ PCRE2_SPTR exclude_pattern = NULL;
++ pcre2_match_data *match_data = NULL;
++#endif
++ struct hardlink_dynstr nam1 = { NULL, 0 };
++ struct hardlink_ctl *ctl = &global_ctl;
++
++ static const struct option longopts[] = {
++ { "content", no_argument, NULL, 'c' },
++ { "dry-run", no_argument, NULL, 'n' },
++ { "exclude", required_argument, NULL, 'x' },
++ { "force", no_argument, NULL, 'f' },
++ { "help", no_argument, NULL, 'h' },
++ { "verbose", no_argument, NULL, 'v' },
++ { "version", no_argument, NULL, 'V' },
++ { NULL, 0, NULL, 0 },
++ };
++
++ setlocale(LC_ALL, "");
++ bindtextdomain(PACKAGE, LOCALEDIR);
++ textdomain(PACKAGE);
++ close_stdout_atexit();
++
++ while ((ch = getopt_long(argc, argv, "cnvfx:Vh", longopts, NULL)) != -1) {
++ switch (ch) {
++ case 'n':
++ ctl->no_link = 1;
++ break;
++ case 'v':
++ ctl->verbose++;
++ break;
++ case 'c':
++ ctl->content_only = 1;
++ break;
++ case 'f':
++ ctl->force = 1;
++ break;
++ case 'x':
++#ifdef HAVE_PCRE
++ exclude_pattern = (PCRE2_SPTR) optarg;
++#else
++ errx(EXIT_FAILURE,
++ _("option --exclude not supported (built without pcre2)"));
++#endif
++ break;
++ case 'V':
++ print_version(EXIT_SUCCESS);
++ case 'h':
++ usage();
++ default:
++ errtryhelp(EXIT_FAILURE);
++ }
++ }
++
++ if (optind == argc) {
++ warnx(_("no directory specified"));
++ errtryhelp(EXIT_FAILURE);
++ }
++
++#ifdef HAVE_PCRE
++ if (exclude_pattern) {
++ re = pcre2_compile(exclude_pattern, /* the pattern */
++ PCRE2_ZERO_TERMINATED, /* indicates pattern is zero-terminate */
++ 0, /* default options */
++ &errornumber, &erroroffset, NULL); /* use default compile context */
++ if (!re) {
++ PCRE2_UCHAR buffer[256];
++ pcre2_get_error_message(errornumber, buffer,
++ sizeof(buffer));
++ errx(EXIT_FAILURE, _("pattern error at offset %d: %s"),
++ (int)erroroffset, buffer);
++ }
++ match_data = pcre2_match_data_create_from_pattern(re, NULL);
++ }
++#endif
++ atexit(print_summary);
++
++ for (i = optind; i < argc; i++)
++ process_path(ctl, argv[i]);
++
++ while (ctl->dirs) {
++ DIR *dh;
++ struct dirent *di;
++ struct hardlink_dir *dp = ctl->dirs;
++ size_t nam1baselen = strlen(dp->name);
++
++ ctl->dirs = dp->next;
++ growstr(&nam1, add2(nam1baselen, 1));
++ memcpy(nam1.buf, dp->name, nam1baselen);
++ free(dp);
++ nam1.buf[nam1baselen++] = '/';
++ nam1.buf[nam1baselen] = 0;
++ dh = opendir(nam1.buf);
++
++ if (dh == NULL)
++ continue;
++ ctl->ndirs++;
++
++ while ((di = readdir(dh)) != NULL) {
++ if (!di->d_name[0])
++ continue;
++ if (di->d_name[0] == '.') {
++ if (!di->d_name[1] || !strcmp(di->d_name, ".."))
++ continue;
++ }
++#ifdef HAVE_PCRE
++ if (re && pcre2_match(re, /* compiled regex */
++ (PCRE2_SPTR) di->d_name, strlen(di->d_name), 0, /* start at offset 0 */
++ 0, /* default options */
++ match_data, /* block for storing the result */
++ NULL) /* use default match context */
++ >=0) {
++ if (ctl->verbose) {
++ nam1.buf[nam1baselen] = 0;
++ printf(_("Skipping %s%s\n"), nam1.buf, di->d_name);
++ }
++ continue;
++ }
++#endif
++ {
++ size_t subdirlen;
++ growstr(&nam1,
++ add2(nam1baselen, subdirlen =
++ strlen(di->d_name)));
++ memcpy(&nam1.buf[nam1baselen], di->d_name,
++ add2(subdirlen, 1));
++ }
++ process_path(ctl, nam1.buf);
++ }
++ closedir(dh);
++ }
++
++ return 0;
++}
+--- a/localedef/Makefile.in
++++ b/localedef/Makefile.in
+@@ -40,6 +40,8 @@ WARNFLAGS = -Wall -Wno-format
+ FULLCC = $(CC) $(CPPFLAGS) $(CFLAGS) \
+ $(DEFINES) $(INCLUDES) $(WARNFLAGS)
+
++CROSS_LOCALEDEF_HARDLINK_OBJS = cross-localedef-hardlink.o
++
+ LOCALEDEF_OBJS = charmap.o charmap-dir.o ld-address.o ld-collate.o \
+ ld-ctype.o ld-identification.o ld-measurement.o \
+ ld-messages.o ld-monetary.o ld-name.o ld-numeric.o \
+@@ -54,11 +56,14 @@ LOCALEDEF_OBJS = charmap.o charmap-dir.o
+ asprintf.o getdelim.o localedef_extra.o \
+ obstack_printf.o vasprintf.o
+
+-all: localedef$(EXEEXT)
++all: localedef$(EXEEXT) cross-localedef-hardlink$(EXEEXT)
+
+ localedef$(EXEEXT): $(LOCALEDEF_OBJS)
+ $(CC) -o $@ $(LOCALEDEF_OBJS) $(LIBS)
+
++cross-localedef-hardlink$(EXEEXT): $(CROSS_LOCALEDEF_HARDLINK_OBJS)
++ $(CC) -o $@ $(CROSS_LOCALEDEF_HARDLINK_OBJS) $(LIBS)
++
+ clean:
+ rm -f locale$(EXEEXT) $(LOCALEDEF_OBJS)
+
+@@ -77,6 +82,7 @@ clean:
+ %.o: $(srcdir)/%.c
+ $(FULLCC) -c -o $@ $<
+
++cross-localedef-hardlink.o: glibc/locale/programs/cross-localedef-hardlink.c
+ charmap.o: glibc/locale/programs/charmap.c
+ charmap-dir.o: glibc/locale/programs/charmap-dir.c
+ ld-address.o: glibc/locale/programs/ld-address.c
+--- /dev/null
++++ b/locale/programs/c.h
+@@ -0,0 +1,407 @@
++/*
++ * Fundamental C definitions.
++ */
++
++#ifndef UTIL_LINUX_C_H
++#define UTIL_LINUX_C_H
++
++#include <limits.h>
++#include <stddef.h>
++#include <stdint.h>
++#include <stdio.h>
++#include <unistd.h>
++#include <stdarg.h>
++#include <stdlib.h>
++#include <string.h>
++#include <errno.h>
++
++#include <assert.h>
++
++#ifdef HAVE_ERR_H
++# include <err.h>
++#endif
++
++#ifdef HAVE_SYS_SYSMACROS_H
++# include <sys/sysmacros.h> /* for major, minor */
++#endif
++
++#ifndef LOGIN_NAME_MAX
++# define LOGIN_NAME_MAX 256
++#endif
++
++#ifndef NAME_MAX
++# define NAME_MAX PATH_MAX
++#endif
++
++/*
++ * __GNUC_PREREQ is deprecated in favour of __has_attribute() and
++ * __has_feature(). The __has macros are supported by clang and gcc>=5.
++ */
++#ifndef __GNUC_PREREQ
++# if defined __GNUC__ && defined __GNUC_MINOR__
++# define __GNUC_PREREQ(maj, min) \
++ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
++# else
++# define __GNUC_PREREQ(maj, min) 0
++# endif
++#endif
++
++#ifdef __GNUC__
++
++/* &a[0] degrades to a pointer: a different type from an array */
++# define __must_be_array(a) \
++ UL_BUILD_BUG_ON_ZERO(__builtin_types_compatible_p(__typeof__(a), __typeof__(&a[0])))
++
++# define ignore_result(x) __extension__ ({ \
++ __typeof__(x) __dummy __attribute__((__unused__)) = (x); (void) __dummy; \
++})
++
++#else /* !__GNUC__ */
++# define __must_be_array(a) 0
++# define __attribute__(_arg_)
++# define ignore_result(x) ((void) (x))
++#endif /* !__GNUC__ */
++
++/*
++ * It evaluates to 1 if the attribute/feature is supported by the current
++ * compilation targed. Fallback for old compilers.
++ */
++#ifndef __has_attribute
++ #define __has_attribute(x) 0
++#endif
++
++#ifndef __has_feature
++ #define __has_feature(x) 0
++#endif
++
++/*
++ * Function attributes
++ */
++#ifndef __ul_alloc_size
++# if (__has_attribute(alloc_size) && __has_attribute(warn_unused_result)) || __GNUC_PREREQ (4, 3)
++# define __ul_alloc_size(s) __attribute__((alloc_size(s), warn_unused_result))
++# else
++# define __ul_alloc_size(s)
++# endif
++#endif
++
++#ifndef __ul_calloc_size
++# if (__has_attribute(alloc_size) && __has_attribute(warn_unused_result)) || __GNUC_PREREQ (4, 3)
++# define __ul_calloc_size(n, s) __attribute__((alloc_size(n, s), warn_unused_result))
++# else
++# define __ul_calloc_size(n, s)
++# endif
++#endif
++
++#if __has_attribute(returns_nonnull) || __GNUC_PREREQ (4, 9)
++# define __ul_returns_nonnull __attribute__((returns_nonnull))
++#else
++# define __ul_returns_nonnull
++#endif
++
++/*
++ * Force a compilation error if condition is true, but also produce a
++ * result (of value 0 and type size_t), so the expression can be used
++ * e.g. in a structure initializer (or wherever else comma expressions
++ * aren't permitted).
++ */
++#define UL_BUILD_BUG_ON_ZERO(e) __extension__ (sizeof(struct { int:-!!(e); }))
++#define BUILD_BUG_ON_NULL(e) ((void *)sizeof(struct { int:-!!(e); }))
++
++#ifndef ARRAY_SIZE
++# define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
++#endif
++
++#ifndef PATH_MAX
++# define PATH_MAX 4096
++#endif
++
++#ifndef TRUE
++# define TRUE 1
++#endif
++
++#ifndef FALSE
++# define FALSE 0
++#endif
++
++#ifndef min
++# define min(x, y) __extension__ ({ \
++ __typeof__(x) _min1 = (x); \
++ __typeof__(y) _min2 = (y); \
++ (void) (&_min1 == &_min2); \
++ _min1 < _min2 ? _min1 : _min2; })
++#endif
++
++#ifndef max
++# define max(x, y) __extension__ ({ \
++ __typeof__(x) _max1 = (x); \
++ __typeof__(y) _max2 = (y); \
++ (void) (&_max1 == &_max2); \
++ _max1 > _max2 ? _max1 : _max2; })
++#endif
++
++#ifndef cmp_numbers
++# define cmp_numbers(x, y) __extension__ ({ \
++ __typeof__(x) _a = (x); \
++ __typeof__(y) _b = (y); \
++ (void) (&_a == &_b); \
++ _a == _b ? 0 : _a > _b ? 1 : -1; })
++#endif
++
++#ifndef offsetof
++#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
++#endif
++
++/*
++ * container_of - cast a member of a structure out to the containing structure
++ * @ptr: the pointer to the member.
++ * @type: the type of the container struct this is embedded in.
++ * @member: the name of the member within the struct.
++ */
++#ifndef container_of
++#define container_of(ptr, type, member) __extension__ ({ \
++ const __typeof__( ((type *)0)->member ) *__mptr = (ptr); \
++ (type *)( (char *)__mptr - offsetof(type,member) );})
++#endif
++
++#ifndef HAVE_PROGRAM_INVOCATION_SHORT_NAME
++# ifdef HAVE___PROGNAME
++extern char *__progname;
++# define program_invocation_short_name __progname
++# else
++# ifdef HAVE_GETEXECNAME
++# define program_invocation_short_name \
++ prog_inv_sh_nm_from_file(getexecname(), 0)
++# else
++# define program_invocation_short_name \
++ prog_inv_sh_nm_from_file(__FILE__, 1)
++# endif
++static char prog_inv_sh_nm_buf[256];
++static inline char *
++prog_inv_sh_nm_from_file(char *f, char stripext)
++{
++ char *t;
++
++ if ((t = strrchr(f, '/')) != NULL)
++ t++;
++ else
++ t = f;
++
++ strncpy(prog_inv_sh_nm_buf, t, sizeof(prog_inv_sh_nm_buf) - 1);
++ prog_inv_sh_nm_buf[sizeof(prog_inv_sh_nm_buf) - 1] = '\0';
++
++ if (stripext && (t = strrchr(prog_inv_sh_nm_buf, '.')) != NULL)
++ *t = '\0';
++
++ return prog_inv_sh_nm_buf;
++}
++# endif
++#endif
++
++
++#ifndef HAVE_ERR_H
++static inline void
++errmsg(char doexit, int excode, char adderr, const char *fmt, ...)
++{
++ fprintf(stderr, "%s: ", program_invocation_short_name);
++ if (fmt != NULL) {
++ va_list argp;
++ va_start(argp, fmt);
++ vfprintf(stderr, fmt, argp);
++ va_end(argp);
++ if (adderr)
++ fprintf(stderr, ": ");
++ }
++ if (adderr)
++ fprintf(stderr, "%m");
++ fprintf(stderr, "\n");
++ if (doexit)
++ exit(excode);
++}
++
++#ifndef HAVE_ERR
++# define err(E, FMT...) errmsg(1, E, 1, FMT)
++#endif
++
++#ifndef HAVE_ERRX
++# define errx(E, FMT...) errmsg(1, E, 0, FMT)
++#endif
++
++#ifndef HAVE_WARN
++# define warn(FMT...) errmsg(0, 0, 1, FMT)
++#endif
++
++#ifndef HAVE_WARNX
++# define warnx(FMT...) errmsg(0, 0, 0, FMT)
++#endif
++#endif /* !HAVE_ERR_H */
++
++
++/* Don't use inline function to avoid '#include "nls.h"' in c.h
++ */
++#define errtryhelp(eval) __extension__ ({ \
++ fprintf(stderr, _("Try '%s --help' for more information.\n"), \
++ program_invocation_short_name); \
++ exit(eval); \
++})
++
++/* After failed execvp() */
++#define EX_EXEC_FAILED 126 /* Program located, but not usable. */
++#define EX_EXEC_ENOENT 127 /* Could not find program to exec. */
++#define errexec(name) err(errno == ENOENT ? EX_EXEC_ENOENT : EX_EXEC_FAILED, \
++ _("failed to execute %s"), name)
++
++
++static inline __attribute__((const)) int is_power_of_2(unsigned long num)
++{
++ return (num != 0 && ((num & (num - 1)) == 0));
++}
++
++#ifndef HAVE_LOFF_T
++typedef int64_t loff_t;
++#endif
++
++#if !defined(HAVE_DIRFD) && (!defined(HAVE_DECL_DIRFD) || HAVE_DECL_DIRFD == 0) && defined(HAVE_DIR_DD_FD)
++#include <sys/types.h>
++#include <dirent.h>
++static inline int dirfd(DIR *d)
++{
++ return d->dd_fd;
++}
++#endif
++
++/*
++ * Fallback defines for old versions of glibc
++ */
++#include <fcntl.h>
++
++#ifdef O_CLOEXEC
++#define UL_CLOEXECSTR "e"
++#else
++#define UL_CLOEXECSTR ""
++#endif
++
++#ifndef O_CLOEXEC
++#define O_CLOEXEC 0
++#endif
++
++#ifdef __FreeBSD_kernel__
++#ifndef F_DUPFD_CLOEXEC
++#define F_DUPFD_CLOEXEC 17 /* Like F_DUPFD, but FD_CLOEXEC is set */
++#endif
++#endif
++
++
++#ifndef AI_ADDRCONFIG
++#define AI_ADDRCONFIG 0x0020
++#endif
++
++#ifndef IUTF8
++#define IUTF8 0040000
++#endif
++
++/*
++ * MAXHOSTNAMELEN replacement
++ */
++static inline size_t get_hostname_max(void)
++{
++ long len = sysconf(_SC_HOST_NAME_MAX);
++
++ if (0 < len)
++ return len;
++
++#ifdef MAXHOSTNAMELEN
++ return MAXHOSTNAMELEN;
++#elif HOST_NAME_MAX
++ return HOST_NAME_MAX;
++#endif
++ return 64;
++}
++
++
++/*
++ * Constant strings for usage() functions. For more info see
++ * Documentation/{howto-usage-function.txt,boilerplate.c}
++ */
++#define USAGE_HEADER ("\nUsage:\n")
++#define USAGE_OPTIONS ("\nOptions:\n")
++#define USAGE_FUNCTIONS ("\nFunctions:\n")
++#define USAGE_COMMANDS ("\nCommands:\n")
++#define USAGE_COLUMNS ("\nAvailable output columns:\n")
++#define USAGE_SEPARATOR "\n"
++
++#define USAGE_OPTSTR_HELP ("display this help")
++#define USAGE_OPTSTR_VERSION ("display version")
++
++#define USAGE_HELP_OPTIONS(marg_dsc) \
++ "%-" #marg_dsc "s%s\n" \
++ "%-" #marg_dsc "s%s\n" \
++ , " -h, --help", USAGE_OPTSTR_HELP \
++ , " -V, --version", USAGE_OPTSTR_VERSION
++
++#define USAGE_MAN_TAIL(_man) ("\nFor more details see %s.\n"), _man
++
++#define UTIL_LINUX_VERSION ("%s from %s\n"), program_invocation_short_name, PACKAGE_STRING
++
++#define print_version(eval) __extension__ ({ \
++ printf(UTIL_LINUX_VERSION); \
++ exit(eval); \
++})
++
++/*
++ * scanf modifiers for "strings allocation"
++ */
++#ifdef HAVE_SCANF_MS_MODIFIER
++#define UL_SCNsA "%ms"
++#elif defined(HAVE_SCANF_AS_MODIFIER)
++#define UL_SCNsA "%as"
++#endif
++
++/*
++ * seek stuff
++ */
++#ifndef SEEK_DATA
++# define SEEK_DATA 3
++#endif
++#ifndef SEEK_HOLE
++# define SEEK_HOLE 4
++#endif
++
++
++/*
++ * Macros to convert #define'itions to strings, for example
++ * #define XYXXY 42
++ * printf ("%s=%s\n", stringify(XYXXY), stringify_value(XYXXY));
++ */
++#define stringify_value(s) stringify(s)
++#define stringify(s) #s
++
++/*
++ * UL_ASAN_BLACKLIST is a macro to tell AddressSanitizer (a compile-time
++ * instrumentation shipped with Clang and GCC) to not instrument the
++ * annotated function. Furthermore, it will prevent the compiler from
++ * inlining the function because inlining currently breaks the blacklisting
++ * mechanism of AddressSanitizer.
++ */
++#if __has_feature(address_sanitizer) && __has_attribute(no_sanitize_memory) && __has_attribute(no_sanitize_address)
++# define UL_ASAN_BLACKLIST __attribute__((noinline)) __attribute__((no_sanitize_memory)) __attribute__((no_sanitize_address))
++#else
++# define UL_ASAN_BLACKLIST /* nothing */
++#endif
++
++/*
++ * Note that sysconf(_SC_GETPW_R_SIZE_MAX) returns *initial* suggested size for
++ * pwd buffer and in some cases it is not large enough. See POSIX and
++ * getpwnam_r man page for more details.
++ */
++#define UL_GETPW_BUFSIZ (16 * 1024)
++
++/*
++ * Darwin or other BSDs may only have MAP_ANON. To get it on Darwin we must
++ * define _DARWIN_C_SOURCE before including sys/mman.h. We do this in config.h.
++ */
++#if !defined MAP_ANONYMOUS && defined MAP_ANON
++# define MAP_ANONYMOUS (MAP_ANON)
++#endif
++
++#endif /* UTIL_LINUX_C_H */
+--- /dev/null
++++ b/locale/programs/xalloc.h
+@@ -0,0 +1,129 @@
++/*
++ * Copyright (C) 2010 Davidlohr Bueso <dave@gnu.org>
++ *
++ * This file may be redistributed under the terms of the
++ * GNU Lesser General Public License.
++ *
++ * General memory allocation wrappers for malloc, realloc, calloc and strdup
++ */
++
++#ifndef UTIL_LINUX_XALLOC_H
++#define UTIL_LINUX_XALLOC_H
++
++#include <stdlib.h>
++#include <string.h>
++
++#include "c.h"
++
++#ifndef XALLOC_EXIT_CODE
++# define XALLOC_EXIT_CODE EXIT_FAILURE
++#endif
++
++static inline void __attribute__((__noreturn__))
++__err_oom(const char *file, unsigned int line)
++{
++ err(XALLOC_EXIT_CODE, "%s: %u: cannot allocate memory", file, line);
++}
++
++#define err_oom() __err_oom(__FILE__, __LINE__)
++
++static inline __ul_alloc_size(1) __ul_returns_nonnull
++void *xmalloc(const size_t size)
++{
++ void *ret = malloc(size);
++
++ if (!ret && size)
++ err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
++ return ret;
++}
++
++static inline __ul_alloc_size(2) __ul_returns_nonnull
++void *xrealloc(void *ptr, const size_t size)
++{
++ void *ret = realloc(ptr, size);
++
++ if (!ret && size)
++ err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
++ return ret;
++}
++
++static inline __ul_calloc_size(1, 2) __ul_returns_nonnull
++void *xcalloc(const size_t nelems, const size_t size)
++{
++ void *ret = calloc(nelems, size);
++
++ if (!ret && size && nelems)
++ err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
++ return ret;
++}
++
++static inline char __attribute__((warn_unused_result)) __ul_returns_nonnull
++*xstrdup(const char *str)
++{
++ char *ret;
++
++ if (!str)
++ return NULL;
++
++ ret = strdup(str);
++
++ if (!ret)
++ err(XALLOC_EXIT_CODE, "cannot duplicate string");
++ return ret;
++}
++
++static inline char * __attribute__((warn_unused_result)) __ul_returns_nonnull
++xstrndup(const char *str, size_t size)
++{
++ char *ret;
++
++ if (!str)
++ return NULL;
++
++ ret = strndup(str, size);
++
++ if (!ret)
++ err(XALLOC_EXIT_CODE, "cannot duplicate string");
++ return ret;
++}
++
++
++static inline int __attribute__ ((__format__(printf, 2, 3)))
++ xasprintf(char **strp, const char *fmt, ...)
++{
++ int ret;
++ va_list args;
++ va_start(args, fmt);
++ ret = vasprintf(&(*strp), fmt, args);
++ va_end(args);
++ if (ret < 0)
++ err(XALLOC_EXIT_CODE, "cannot allocate string");
++ return ret;
++}
++
++static inline int __attribute__ ((__format__(printf, 2, 0)))
++xvasprintf(char **strp, const char *fmt, va_list ap)
++{
++ int ret = vasprintf(&(*strp), fmt, ap);
++ if (ret < 0)
++ err(XALLOC_EXIT_CODE, "cannot allocate string");
++ return ret;
++}
++
++
++static inline char * __attribute__((warn_unused_result)) xgethostname(void)
++{
++ char *name;
++ size_t sz = get_hostname_max() + 1;
++
++ name = xmalloc(sizeof(char) * sz);
++
++ if (gethostname(name, sz) != 0) {
++ free(name);
++ return NULL;
++ }
++ name[sz - 1] = '\0';
++ return name;
++}
++
++#endif
diff --git a/meta/recipes-core/glibc/glibc/allow-compile-separate-from-util-linux-hardlink.patch b/meta/recipes-core/glibc/glibc/allow-compile-separate-from-util-linux-hardlink.patch
new file mode 100644
index 0000000000..1148ebfcc7
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/allow-compile-separate-from-util-linux-hardlink.patch
@@ -0,0 +1,226 @@
+---
+ locale/programs/c.h | 2
+ locale/programs/cross-localedef-hardlink.c | 79 +++++++++++++----------------
+ 2 files changed, 39 insertions(+), 42 deletions(-)
+
+--- a/locale/programs/cross-localedef-hardlink.c
++++ b/locale/programs/cross-localedef-hardlink.c
+@@ -20,6 +20,8 @@
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
++
++#undef HAVE_PCRE
+ #include <sys/types.h>
+ #include <stdlib.h>
+ #include <getopt.h>
+@@ -38,8 +40,8 @@
+
+ #include "c.h"
+ #include "xalloc.h"
+-#include "nls.h"
+-#include "closestream.h"
++//#include "nls.h"
++//#include "closestream.h"
+
+ #define NHASH (1<<17) /* Must be a power of 2! */
+ #define NBUF 64
+@@ -124,33 +126,33 @@ static void print_summary(void)
+ if (ctl->verbose > 1 && ctl->nlinks)
+ fputc('\n', stdout);
+
+- printf(_("Directories: %9lld\n"), ctl->ndirs);
+- printf(_("Objects: %9lld\n"), ctl->nobjects);
+- printf(_("Regular files: %9lld\n"), ctl->nregfiles);
+- printf(_("Comparisons: %9lld\n"), ctl->ncomp);
++ printf(("Directories: %9lld\n"), ctl->ndirs);
++ printf(("Objects: %9lld\n"), ctl->nobjects);
++ printf(("Regular files: %9lld\n"), ctl->nregfiles);
++ printf(("Comparisons: %9lld\n"), ctl->ncomp);
+ printf( "%s%9lld\n", (ctl->no_link ?
+- _("Would link: ") :
+- _("Linked: ")), ctl->nlinks);
++ ("Would link: ") :
++ ("Linked: ")), ctl->nlinks);
+ printf( "%s %9lld\n", (ctl->no_link ?
+- _("Would save: ") :
+- _("Saved: ")), ctl->nsaved);
++ ("Would save: ") :
++ ("Saved: ")), ctl->nsaved);
+ }
+
+ static void __attribute__((__noreturn__)) usage(void)
+ {
+ fputs(USAGE_HEADER, stdout);
+- printf(_(" %s [options] directory...\n"), program_invocation_short_name);
++ printf((" %s [options] directory...\n"), program_invocation_short_name);
+
+ fputs(USAGE_SEPARATOR, stdout);
+- puts(_("Consolidate duplicate files using hardlinks."));
++ puts(("Consolidate duplicate files using hardlinks."));
+
+ fputs(USAGE_OPTIONS, stdout);
+- puts(_(" -c, --content compare only contents, ignore permission, etc."));
+- puts(_(" -n, --dry-run don't actually link anything"));
+- puts(_(" -v, --verbose print summary after hardlinking"));
+- puts(_(" -vv print every hardlinked file and summary"));
+- puts(_(" -f, --force force hardlinking across filesystems"));
+- puts(_(" -x, --exclude <regex> exclude files matching pattern"));
++ puts((" -c, --content compare only contents, ignore permission, etc."));
++ puts((" -n, --dry-run don't actually link anything"));
++ puts((" -v, --verbose print summary after hardlinking"));
++ puts((" -vv print every hardlinked file and summary"));
++ puts((" -f, --force force hardlinking across filesystems"));
++ puts((" -x, --exclude <regex> exclude files matching pattern"));
+
+ fputs(USAGE_SEPARATOR, stdout);
+ printf(USAGE_HELP_OPTIONS(16)); /* char offset to align option descriptions */
+@@ -164,7 +166,7 @@ static inline size_t add2(size_t a, size
+ size_t sum = a + b;
+
+ if (sum < a)
+- errx(EXIT_FAILURE, _("integer overflow"));
++ errx(EXIT_FAILURE, ("integer overflow"));
+ return sum;
+ }
+
+@@ -193,7 +195,7 @@ static void process_path(struct hardlink
+ if (st.st_dev != ctl->dev && !ctl->force) {
+ if (ctl->dev)
+ errx(EXIT_FAILURE,
+- _("%s is on different filesystem than the rest "
++ ("%s is on different filesystem than the rest "
+ "(use -f option to override)."), name);
+ ctl->dev = st.st_dev;
+ }
+@@ -287,9 +289,9 @@ static void process_path(struct hardlink
+ (ssize_t) sizeof(ctl->iobuf1) : fsize;
+
+ if ((xsz = read(fd, ctl->iobuf1, rsize)) != rsize)
+- warn(_("cannot read %s"), name);
++ warn(("cannot read %s"), name);
+ else if ((xsz = read(fd2, ctl->iobuf2, rsize)) != rsize)
+- warn(_("cannot read %s"), fp2->name);
++ warn(("cannot read %s"), fp2->name);
+
+ if (xsz != rsize) {
+ close(fd);
+@@ -303,13 +305,13 @@ static void process_path(struct hardlink
+ if (fsize > 0)
+ continue;
+ if (lstat(name, &st3)) {
+- warn(_("cannot stat %s"), name);
++ warn(("cannot stat %s"), name);
+ close(fd);
+ return;
+ }
+ st3.st_atime = st.st_atime;
+ if (stcmp(&st, &st3, 0)) {
+- warnx(_("file %s changed underneath us"), name);
++ warnx(("file %s changed underneath us"), name);
+ close(fd);
+ return;
+ }
+@@ -329,18 +331,18 @@ static void process_path(struct hardlink
+ suffixlen + 1);
+ /* First create a temporary link to n1 under a new name */
+ if (link(n1, nam2.buf)) {
+- warn(_("failed to hardlink %s to %s (create temporary link as %s failed)"),
++ warn(("failed to hardlink %s to %s (create temporary link as %s failed)"),
+ n1, n2, nam2.buf);
+ free(nam2.buf);
+ continue;
+ }
+ /* Then rename into place over the existing n2 */
+ if (rename(nam2.buf, n2)) {
+- warn(_("failed to hardlink %s to %s (rename temporary link to %s failed)"),
++ warn(("failed to hardlink %s to %s (rename temporary link to %s failed)"),
+ n1, n2, n2);
+ /* Something went wrong, try to remove the now redundant temporary link */
+ if (unlink(nam2.buf))
+- warn(_("failed to remove temporary link %s"), nam2.buf);
++ warn(("failed to remove temporary link %s"), nam2.buf);
+ free(nam2.buf);
+ continue;
+ }
+@@ -351,16 +353,16 @@ static void process_path(struct hardlink
+ /* We actually did not save anything this time, since the link second argument
+ had some other links as well. */
+ if (ctl->verbose > 1)
+- printf(_(" %s %s to %s\n"),
+- (ctl->no_link ? _("Would link") : _("Linked")),
++ printf((" %s %s to %s\n"),
++ (ctl->no_link ? ("Would link") : ("Linked")),
+ n1, n2);
+ } else {
+ ctl->nsaved += ((st.st_size + 4095) / 4096) * 4096;
+ if (ctl->verbose > 1)
+- printf(_(" %s %s to %s, %s %jd\n"),
+- (ctl->no_link ? _("Would link") : _("Linked")),
++ printf((" %s %s to %s, %s %jd\n"),
++ (ctl->no_link ? ("Would link") : ("Linked")),
+ n1, n2,
+- (ctl->no_link ? _("would save") : _("saved")),
++ (ctl->no_link ? ("would save") : ("saved")),
+ (intmax_t)st.st_size);
+ }
+ close(fd);
+@@ -410,11 +412,6 @@ int main(int argc, char **argv)
+ { NULL, 0, NULL, 0 },
+ };
+
+- setlocale(LC_ALL, "");
+- bindtextdomain(PACKAGE, LOCALEDIR);
+- textdomain(PACKAGE);
+- close_stdout_atexit();
+-
+ while ((ch = getopt_long(argc, argv, "cnvfx:Vh", longopts, NULL)) != -1) {
+ switch (ch) {
+ case 'n':
+@@ -434,7 +431,7 @@ int main(int argc, char **argv)
+ exclude_pattern = (PCRE2_SPTR) optarg;
+ #else
+ errx(EXIT_FAILURE,
+- _("option --exclude not supported (built without pcre2)"));
++ ("option --exclude not supported (built without pcre2)"));
+ #endif
+ break;
+ case 'V':
+@@ -447,7 +444,7 @@ int main(int argc, char **argv)
+ }
+
+ if (optind == argc) {
+- warnx(_("no directory specified"));
++ warnx(("no directory specified"));
+ errtryhelp(EXIT_FAILURE);
+ }
+
+@@ -461,7 +458,7 @@ int main(int argc, char **argv)
+ PCRE2_UCHAR buffer[256];
+ pcre2_get_error_message(errornumber, buffer,
+ sizeof(buffer));
+- errx(EXIT_FAILURE, _("pattern error at offset %d: %s"),
++ errx(EXIT_FAILURE, ("pattern error at offset %d: %s"),
+ (int)erroroffset, buffer);
+ }
+ match_data = pcre2_match_data_create_from_pattern(re, NULL);
+@@ -506,7 +503,7 @@ int main(int argc, char **argv)
+ >=0) {
+ if (ctl->verbose) {
+ nam1.buf[nam1baselen] = 0;
+- printf(_("Skipping %s%s\n"), nam1.buf, di->d_name);
++ printf(("Skipping %s%s\n"), nam1.buf, di->d_name);
+ }
+ continue;
+ }
+--- a/locale/programs/c.h
++++ b/locale/programs/c.h
+@@ -240,7 +240,7 @@ errmsg(char doexit, int excode, char add
+ /* Don't use inline function to avoid '#include "nls.h"' in c.h
+ */
+ #define errtryhelp(eval) __extension__ ({ \
+- fprintf(stderr, _("Try '%s --help' for more information.\n"), \
++ fprintf(stderr, ("Try '%s --help' for more information.\n"), \
+ program_invocation_short_name); \
+ exit(eval); \
+ })
diff --git a/meta/recipes-core/glibc/glibc/check-test-wrapper b/meta/recipes-core/glibc/glibc/check-test-wrapper
new file mode 100644
index 0000000000..f8e04e02d2
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/check-test-wrapper
@@ -0,0 +1,71 @@
+#!/usr/bin/env python3
+import sys
+import os
+import subprocess
+
+env = os.environ.copy()
+args = sys.argv[1:]
+targettype = args.pop(0)
+
+if targettype == "user":
+ qemuargs = os.environ.get("QEMU_OPTIONS", "").split()
+ if not os.path.exists(qemuargs[0]):
+ # ensure qemu args has a valid absolute path
+ for i in os.environ.get("PATH", "").split(":"):
+ if os.path.exists(os.path.join(i, qemuargs[0])):
+ qemuargs[0] = os.path.join(i, qemuargs[0])
+ break
+ sysroot = os.environ.get("QEMU_SYSROOT", None)
+ if not sysroot:
+ sys.exit(-1)
+ libpaths = [sysroot + "/usr/lib", sysroot + "/lib"]
+
+ if args[0] == "env":
+ args.pop(0)
+ if len(args) == 0:
+ args = ["env"]
+ else:
+ # process options
+ while args[0].startswith("-"):
+ opt = args.pop(0).lstrip("-")
+ if "i" in opt:
+ env.clear()
+ # process environment vars
+ while "=" in args[0]:
+ key, val = args.pop(0).split("=", 1)
+ if key == "LD_LIBRARY_PATH":
+ libpaths += val.split(":")
+ else:
+ env[key] = val
+ if args[0] == "cp":
+ # ignore copies, the filesystem is the same
+ sys.exit(0)
+
+ qemuargs += ["-L", sysroot]
+ qemuargs += ["-E", "LD_LIBRARY_PATH={}".format(":".join(libpaths))]
+ command = qemuargs + args
+elif targettype == "ssh":
+ host = os.environ.get("SSH_HOST", None)
+ user = os.environ.get("SSH_HOST_USER", None)
+ port = os.environ.get("SSH_HOST_PORT", None)
+
+ command = ["ssh", "-o", "UserKnownHostsFile=/dev/null", "-o", "StrictHostKeyChecking=no"]
+ if port:
+ command += ["-p", str(port)]
+ if not host:
+ sys.exit(-1)
+ command += ["{}@{}".format(user, host) if user else host]
+
+ # wrap and replace quotes for correct transformation on ssh
+ wrapped = " ".join(["'{0}'".format(i.replace("'", r"'\''")) for i in ["cd", os.getcwd()]]) + "; "
+ wrapped += " ".join(["'{0}'".format(i.replace("'", r"'\''")) for i in args])
+ command += ["sh", "-c", "\"{}\"".format(wrapped)]
+else:
+ sys.exit(-1)
+
+try:
+ r = subprocess.run(command, timeout = 1800, env = env)
+ sys.exit(r.returncode)
+except subprocess.TimeoutExpired:
+ sys.exit(-1)
+
diff --git a/meta/recipes-core/glibc/glibc/etc/ld.so.conf b/meta/recipes-core/glibc/glibc/etc/ld.so.conf
index e69de29bb2..83327c01bf 100644
--- a/meta/recipes-core/glibc/glibc/etc/ld.so.conf
+++ b/meta/recipes-core/glibc/glibc/etc/ld.so.conf
@@ -0,0 +1 @@
+include /etc/ld.so.conf.d/*.conf
diff --git a/meta/recipes-core/glibc/glibc/makedbs.sh b/meta/recipes-core/glibc/glibc/makedbs.sh
new file mode 100755
index 0000000000..7d51a67352
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/makedbs.sh
@@ -0,0 +1,177 @@
+#!/bin/sh
+
+#
+# Make passwd.db, group.db, etc.
+#
+
+VAR_DB=/var/db
+
+# Use make if available
+if [ -x /usr/bin/make -o -x /bin/make ]; then
+ make -C $VAR_DB
+ exit 0
+fi
+
+# No make available, do it in hard way
+
+# passwd.db
+if [ -e /etc/passwd ]; then
+target=$VAR_DB/passwd.db
+echo -n "passwd... "
+awk 'BEGIN { FS=":"; OFS=":" } \
+ /^[ \t]*$$/ { next } \
+ /^[ \t]*#/ { next } \
+ /^[^#]/ { printf ".%s ", $$1; print; \
+ printf "=%s ", $$3; print }' /etc/passwd | \
+makedb --quiet -o $target -
+echo "done."
+fi
+
+# group.db
+if [ -e /etc/group ]; then
+target=$VAR_DB/group.db
+echo -n "group... "
+awk 'BEGIN { FS=":"; OFS=":" } \
+ /^[ \t]*$$/ { next } \
+ /^[ \t]*#/ { next } \
+ /^[^#]/ { printf ".%s ", $$1; print; \
+ printf "=%s ", $$3; print; \
+ if ($$4 != "") { \
+ split($$4, grmems, ","); \
+ for (memidx in grmems) { \
+ mem=grmems[memidx]; \
+ if (members[mem] == "") \
+ members[mem]=$$3; \
+ else \
+ members[mem]=members[mem] "," $$3; \
+ } \
+ delete grmems; } } \
+ END { for (mem in members) \
+ printf ":%s %s %s\n", mem, mem, members[mem]; }' /etc/group | \
+makedb --quiet -o $target -
+echo "done."
+fi
+
+# ethers.db
+if [ -e /etc/ethers ]; then
+target=$VAR_DB/ethers.db
+echo -n "ethers... "
+awk '/^[ \t]*$$/ { next } \
+ /^[ \t]*#/ { next } \
+ /^[^#]/ { printf ".%s ", $$1; print; \
+ printf "=%s ", $$2; print }' /etc/ethers | \
+makedb --quiet -o $target -
+echo "done."
+fi
+
+# protocols.db
+if [ -e /etc/protocols ]; then
+target=$VAR_DB/protocols.db
+echo -n "protocols... "
+awk '/^[ \t]*$$/ { next } \
+ /^[ \t]*#/ { next } \
+ /^[^#]/ { printf ".%s ", $$1; print; \
+ printf "=%s ", $$2; print; \
+ for (i = 3; i <= NF && !($$i ~ /^#/); ++i) \
+ { printf ".%s ", $$i; print } }' /etc/protocols | \
+makedb --quiet -o $target -
+echo "done."
+fi
+
+# rpc.db
+if [ -e /etc/rpc ]; then
+target=$VAR_DB/rpc.db
+echo -n "rpc... "
+awk '/^[ \t]*$$/ { next } \
+ /^[ \t]*#/ { next } \
+ /^[^#]/ { printf ".%s ", $$1; print; \
+ printf "=%s ", $$2; print; \
+ for (i = 3; i <= NF && !($$i ~ /^#/); ++i) \
+ { printf ".%s ", $$i; print } }' /etc/rpc | \
+makedb --quiet -o $target -
+echo "done."
+fi
+
+# services.db
+if [ -e /etc/services ]; then
+target=$VAR_DB/services.db
+echo -n "services... "
+awk 'BEGIN { FS="[ \t/]+" } \
+ /^[ \t]*$$/ { next } \
+ /^[ \t]*#/ { next } \
+ /^[^#]/ { sub(/[ \t]*#.*$$/, "");\
+ printf ":%s/%s ", $$1, $$3; print; \
+ printf ":%s/ ", $$1; print; \
+ printf "=%s/%s ", $$2, $$3; print; \
+ printf "=%s/ ", $$2; print; \
+ for (i = 4; i <= NF && !($$i ~ /^#/); ++i) \
+ { printf ":%s/%s ", $$i, $$3; print; \
+ printf ":%s/ ", $$i; print } }' /etc/services | \
+makedb --quiet -o $target -
+echo "done."
+fi
+
+# shadow.db
+if [ -e /etc/shadow ]; then
+target=$VAR_DB/shadow.db
+echo -n "shadow... "
+awk 'BEGIN { FS=":"; OFS=":" } \
+ /^[ \t]*$$/ { next } \
+ /^[ \t]*#/ { next } \
+ /^[^#]/ { printf ".%s ", $$1; print }' /etc/shadow | \
+(umask 077 && makedb --quiet -o $target -)
+echo "done."
+if chgrp shadow $target 2>/dev/null; then
+ chmod g+r $target
+else
+ chown 0 $target; chgrp 0 $target; chmod 600 $target;
+ echo
+ echo "Warning: The shadow password database $target"
+ echo "has been set to be readable only by root. You may want"
+ echo "to make it readable by the \`shadow' group depending"
+ echo "on your configuration."
+ echo
+fi
+fi
+
+# gshadow.db
+if [ -e /etc/gshadow ]; then
+target=$VAR_DB/gshadow.db
+echo -n "gshadow... "
+awk 'BEGIN { FS=":"; OFS=":" } \
+ /^[ \t]*$$/ { next } \
+ /^[ \t]*#/ { next } \
+ /^[^#]/ { printf ".%s ", $$1; print }' /etc/gshadow | \
+(umask 077 && makedb --quiet -o $target -)
+echo "done."
+if chgrp shadow $target 2>/dev/null; then
+ chmod g+r $target
+else
+ chown 0 $target; chgrp 0 $target; chmod 600 $target
+ echo
+ echo "Warning: The shadow group database $target"
+ echo "has been set to be readable only by root. You may want"
+ echo "to make it readable by the \`shadow' group depending"
+ echo "on your configuration."
+ echo
+fi
+fi
+
+# netgroup.db
+if [ -e /etc/netgroup ]; then
+target=$VAR_DB/netgroup.db
+echo -n "netgroup... "
+awk 'BEGIN { ini=1 } \
+ /^[ \t]*$$/ { next } \
+ /^[ \t]*#/ { next } \
+ /^[^#]/ { if (sub(/[ \t]*\\$$/, " ") == 0) end="\n"; \
+ else end=""; \
+ gsub(/[ \t]+/, " "); \
+ sub(/^[ \t]*/, ""); \
+ if (ini == 0) printf "%s%s", $$0, end; \
+ else printf ".%s %s%s", $$1, $$0, end; \
+ ini=end == "" ? 0 : 1; } \
+ END { if (ini==0) printf "\n" }' /etc/netgroup | \
+makedb --quiet -o $target
+echo "done."
+fi