summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-08-08 10:04:18 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-15 09:44:33 +0100
commitfb535ac046697db5923575bb23ee419fe7cfbab2 (patch)
tree8f842469be51c8e27647d28f4f2e8d955354dd83
parent19ee0f26cbaaacebacf552878ce98149957d0ac3 (diff)
downloadpoky-fb535ac046697db5923575bb23ee419fe7cfbab2.tar.gz
glibc: Upgrade to 2.28
License-Update: libidn is dropped from glibc and a testcase that was a particular contributor copyrighted see https://sourceware.org/git/?p=glibc.git;a=blobdiff;f=LICENSES;h=0e3a9fe39b26e97038d92f904508a4c3aa1bb43b;hp=b29efe01084af28cc40953d7317f22927c0ee3b7;hb=5a357506659f9a00fcf5bc9c5d8fc676175c89a7;hpb=7279af007c420a9d5f88a6909d11e7cb712c16a4 https://sourceware.org/git/?p=glibc.git;a=blobdiff;f=LICENSES;h=b29efe01084af28cc40953d7317f22927c0ee3b7;hp=80f7f1487947f57815b9fe076fadc8c7f94eeb8e;hb=7f9f1ecb710eac4d65bb02785ddf288cac098323;hpb=5f7b841d3aebdccc2baed27cb4b22ddb08cd7c0c Drop upstreamed and backported patches (From OE-Core rev: da8bf414922ce7af865fadc4a86fd96ab6262506) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/conf/distro/include/tcmode-default.inc2
-rw-r--r--meta/recipes-core/glibc/cross-localedef-native_2.28.bb (renamed from meta/recipes-core/glibc/cross-localedef-native_2.27.bb)18
-rw-r--r--meta/recipes-core/glibc/glibc-initial_2.28.bb (renamed from meta/recipes-core/glibc/glibc-initial_2.27.bb)0
-rw-r--r--meta/recipes-core/glibc/glibc-locale_2.28.bb (renamed from meta/recipes-core/glibc/glibc-locale_2.27.bb)0
-rw-r--r--meta/recipes-core/glibc/glibc-mtrace_2.28.bb (renamed from meta/recipes-core/glibc/glibc-mtrace_2.27.bb)0
-rw-r--r--meta/recipes-core/glibc/glibc-scripts_2.28.bb (renamed from meta/recipes-core/glibc/glibc-scripts_2.27.bb)0
-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-.patch18
-rw-r--r--meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch6
-rw-r--r--meta/recipes-core/glibc/glibc/0005-nativesdk-glibc-Make-relocatable-install-for-locales.patch (renamed from meta/recipes-core/glibc/glibc/relocate-locales.patch)45
-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)44
-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)6
-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)6
-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)6
-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)8
-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)6
-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)6
-rw-r--r--meta/recipes-core/glibc/glibc/0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch (renamed from meta/recipes-core/glibc/glibc/0012-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch)6
-rw-r--r--meta/recipes-core/glibc/glibc/0014-Add-unused-attribute.patch (renamed from meta/recipes-core/glibc/glibc/0013-Add-unused-attribute.patch)6
-rw-r--r--meta/recipes-core/glibc/glibc/0015-yes-within-the-path-sets-wrong-config-variables.patch (renamed from meta/recipes-core/glibc/glibc/0014-yes-within-the-path-sets-wrong-config-variables.patch)6
-rw-r--r--meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch (renamed from meta/recipes-core/glibc/glibc/0015-timezone-re-written-tzselect-as-posix-sh.patch)6
-rw-r--r--meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch (renamed from meta/recipes-core/glibc/glibc/0016-Remove-bash-dependency-for-nscd-init-script.patch)6
-rw-r--r--meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch (renamed from meta/recipes-core/glibc/glibc/0017-eglibc-Cross-building-and-testing-instructions.patch)10
-rw-r--r--meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch (renamed from meta/recipes-core/glibc/glibc/0018-eglibc-Help-bootstrap-cross-toolchain.patch)12
-rw-r--r--meta/recipes-core/glibc/glibc/0020-eglibc-Clear-cache-lines-on-ppc8xx.patch (renamed from meta/recipes-core/glibc/glibc/0019-eglibc-Clear-cache-lines-on-ppc8xx.patch)6
-rw-r--r--meta/recipes-core/glibc/glibc/0021-eglibc-Resolve-__fpscr_values-on-SH4.patch (renamed from meta/recipes-core/glibc/glibc/0020-eglibc-Resolve-__fpscr_values-on-SH4.patch)6
-rw-r--r--meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch28
-rw-r--r--meta/recipes-core/glibc/glibc/0023-Define-DUMMY_LOCALE_T-if-not-defined.patch6
-rw-r--r--meta/recipes-core/glibc/glibc/0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch10
-rw-r--r--meta/recipes-core/glibc/glibc/0025-locale-fix-hard-coded-reference-to-gcc-E.patch6
-rw-r--r--meta/recipes-core/glibc/glibc/0026-reset-dl_load_write_lock-after-forking.patch14
-rw-r--r--meta/recipes-core/glibc/glibc/0027-Acquire-ld.so-lock-before-switching-to-malloc_atfork.patch30
-rw-r--r--meta/recipes-core/glibc/glibc/0028-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch14
-rw-r--r--meta/recipes-core/glibc/glibc/0029-Replace-strncpy-with-memccpy-to-fix-Wstringop-trunca.patch40
-rw-r--r--meta/recipes-core/glibc/glibc/0029-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch (renamed from meta/recipes-core/glibc/glibc/archive-path.patch)23
-rw-r--r--meta/recipes-core/glibc/glibc/0030-intl-Emit-no-lines-in-bison-generated-files.patch (renamed from meta/recipes-core/glibc/glibc/0030-plural_c_no_preprocessor_lines.patch)17
-rw-r--r--meta/recipes-core/glibc/glibc/0031-nativesdk-deprecate-libcrypt.patch419
-rw-r--r--meta/recipes-core/glibc/glibc/CVE-2017-18269.patch178
-rw-r--r--meta/recipes-core/glibc/glibc/CVE-2018-11236.patch164
-rw-r--r--meta/recipes-core/glibc/glibc/CVE-2018-11237.patch82
-rw-r--r--meta/recipes-core/glibc/glibc_2.28.bb (renamed from meta/recipes-core/glibc/glibc_2.27.bb)46
42 files changed, 244 insertions, 1090 deletions
diff --git a/meta/conf/distro/include/tcmode-default.inc b/meta/conf/distro/include/tcmode-default.inc
index 24a21b5837..bed1594b7a 100644
--- a/meta/conf/distro/include/tcmode-default.inc
+++ b/meta/conf/distro/include/tcmode-default.inc
@@ -26,7 +26,7 @@ GCCVERSION ?= "8.%"
26SDKGCCVERSION ?= "${GCCVERSION}" 26SDKGCCVERSION ?= "${GCCVERSION}"
27BINUVERSION ?= "2.31%" 27BINUVERSION ?= "2.31%"
28GDBVERSION ?= "8.1%" 28GDBVERSION ?= "8.1%"
29GLIBCVERSION ?= "2.27%" 29GLIBCVERSION ?= "2.28%"
30LINUXLIBCVERSION ?= "4.15%" 30LINUXLIBCVERSION ?= "4.15%"
31QEMUVERSION ?= "2.12%" 31QEMUVERSION ?= "2.12%"
32 32
diff --git a/meta/recipes-core/glibc/cross-localedef-native_2.27.bb b/meta/recipes-core/glibc/cross-localedef-native_2.28.bb
index 6a26376ac2..0992e0285d 100644
--- a/meta/recipes-core/glibc/cross-localedef-native_2.27.bb
+++ b/meta/recipes-core/glibc/cross-localedef-native_2.28.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.gnu.org/software/libc/libc.html"
3SECTION = "libs" 3SECTION = "libs"
4LICENSE = "LGPL-2.1" 4LICENSE = "LGPL-2.1"
5 5
6LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \ 6LIC_FILES_CHKSUM = "file://LICENSES;md5=cfc0ed77a9f62fa62eded042ebe31d72 \
7 file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ 7 file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
8 file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \ 8 file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
9 file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c" 9 file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
@@ -21,20 +21,20 @@ SRCBRANCH ?= "release/${PV}/master"
21GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git" 21GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
22UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.(?!90)\d+)*)" 22UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.(?!90)\d+)*)"
23 23
24SRCREV_glibc ?= "df3ff4e49d4ee3cbbdaeb0b1cb5dc2344c08be98" 24SRCREV_glibc ?= "3c03baca37fdcb52c3881e653ca392bba7a99c2b"
25SRCREV_localedef ?= "de5bdbd5e76b5403a4151b9b9f958b6cca36b3e7" 25SRCREV_localedef ?= "de5bdbd5e76b5403a4151b9b9f958b6cca36b3e7"
26 26
27SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ 27SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
28 git://github.com/kraj/localedef;branch=master;name=localedef;destsuffix=git/localedef \ 28 git://github.com/kraj/localedef;branch=master;name=localedef;destsuffix=git/localedef \
29 file://0015-timezone-re-written-tzselect-as-posix-sh.patch \ 29 file://0016-timezone-re-written-tzselect-as-posix-sh.patch \
30 file://0016-Remove-bash-dependency-for-nscd-init-script.patch \ 30 file://0017-Remove-bash-dependency-for-nscd-init-script.patch \
31 file://0017-eglibc-Cross-building-and-testing-instructions.patch \ 31 file://0018-eglibc-Cross-building-and-testing-instructions.patch \
32 file://0018-eglibc-Help-bootstrap-cross-toolchain.patch \ 32 file://0019-eglibc-Help-bootstrap-cross-toolchain.patch \
33 file://0019-eglibc-Clear-cache-lines-on-ppc8xx.patch \ 33 file://0020-eglibc-Clear-cache-lines-on-ppc8xx.patch \
34 file://0020-eglibc-Resolve-__fpscr_values-on-SH4.patch \ 34 file://0021-eglibc-Resolve-__fpscr_values-on-SH4.patch \
35 file://0022-eglibc-Forward-port-cross-locale-generation-support.patch \ 35 file://0022-eglibc-Forward-port-cross-locale-generation-support.patch \
36 file://0023-Define-DUMMY_LOCALE_T-if-not-defined.patch \ 36 file://0023-Define-DUMMY_LOCALE_T-if-not-defined.patch \
37 file://archive-path.patch \ 37 file://0029-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch \
38" 38"
39# Makes for a rather long rev (22 characters), but... 39# Makes for a rather long rev (22 characters), but...
40# 40#
diff --git a/meta/recipes-core/glibc/glibc-initial_2.27.bb b/meta/recipes-core/glibc/glibc-initial_2.28.bb
index e86770e12d..e86770e12d 100644
--- a/meta/recipes-core/glibc/glibc-initial_2.27.bb
+++ b/meta/recipes-core/glibc/glibc-initial_2.28.bb
diff --git a/meta/recipes-core/glibc/glibc-locale_2.27.bb b/meta/recipes-core/glibc/glibc-locale_2.28.bb
index f7702e0358..f7702e0358 100644
--- a/meta/recipes-core/glibc/glibc-locale_2.27.bb
+++ b/meta/recipes-core/glibc/glibc-locale_2.28.bb
diff --git a/meta/recipes-core/glibc/glibc-mtrace_2.27.bb b/meta/recipes-core/glibc/glibc-mtrace_2.28.bb
index 0b69bad46a..0b69bad46a 100644
--- a/meta/recipes-core/glibc/glibc-mtrace_2.27.bb
+++ b/meta/recipes-core/glibc/glibc-mtrace_2.28.bb
diff --git a/meta/recipes-core/glibc/glibc-scripts_2.27.bb b/meta/recipes-core/glibc/glibc-scripts_2.28.bb
index 5a89bd8022..5a89bd8022 100644
--- a/meta/recipes-core/glibc/glibc-scripts_2.27.bb
+++ b/meta/recipes-core/glibc/glibc-scripts_2.28.bb
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 86234c9d2e..14089350d9 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 @@
1From bd91b60ce6ff01f49b173b6b45e23ce94911b2a6 Mon Sep 17 00:00:00 2001 1From 70fd60e2a8f40a160736cb9b268dfa6508aa55a7 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 18 Mar 2015 01:48:24 +0000 3Date: Wed, 18 Mar 2015 01:48:24 +0000
4Subject: [PATCH 01/27] nativesdk-glibc: Look for host system ld.so.cache as 4Subject: [PATCH 01/30] nativesdk-glibc: Look for host system ld.so.cache as
5 well 5 well
6 6
7Upstream-Status: Inappropriate [embedded specific] 7Upstream-Status: Inappropriate [embedded specific]
@@ -31,10 +31,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
31 1 file changed, 8 insertions(+), 8 deletions(-) 31 1 file changed, 8 insertions(+), 8 deletions(-)
32 32
33diff --git a/elf/dl-load.c b/elf/dl-load.c 33diff --git a/elf/dl-load.c b/elf/dl-load.c
34index 7554a99b5a..a73d11a62f 100644 34index c51e4b3718..44bbb69dc4 100644
35--- a/elf/dl-load.c 35--- a/elf/dl-load.c
36+++ b/elf/dl-load.c 36+++ b/elf/dl-load.c
37@@ -2007,6 +2007,14 @@ _dl_map_object (struct link_map *loader, const char *name, 37@@ -2085,6 +2085,14 @@ _dl_map_object (struct link_map *loader, const char *name,
38 } 38 }
39 } 39 }
40 40
@@ -49,7 +49,7 @@ index 7554a99b5a..a73d11a62f 100644
49 #ifdef USE_LDCONFIG 49 #ifdef USE_LDCONFIG
50 if (fd == -1 50 if (fd == -1
51 && (__glibc_likely ((mode & __RTLD_SECURE) == 0) 51 && (__glibc_likely ((mode & __RTLD_SECURE) == 0)
52@@ -2065,14 +2073,6 @@ _dl_map_object (struct link_map *loader, const char *name, 52@@ -2143,14 +2151,6 @@ _dl_map_object (struct link_map *loader, const char *name,
53 } 53 }
54 #endif 54 #endif
55 55
@@ -65,5 +65,5 @@ index 7554a99b5a..a73d11a62f 100644
65 if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS)) 65 if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
66 _dl_debug_printf ("\n"); 66 _dl_debug_printf ("\n");
67-- 67--
682.16.1 682.18.0
69 69
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 899481f057..382915e840 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 @@
1From 50736f7fc1fdc9e1f7c05f1fec75c977d9be9228 Mon Sep 17 00:00:00 2001 1From f0dd22dfdbf822afc674724c35cc462cfafbc186 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 18 Mar 2015 01:50:00 +0000 3Date: Wed, 18 Mar 2015 01:50:00 +0000
4Subject: [PATCH 02/27] nativesdk-glibc: Fix buffer overrun with a relocated 4Subject: [PATCH 02/30] nativesdk-glibc: Fix buffer overrun with a relocated
5 SDK 5 SDK
6 6
7When ld-linux-*.so.2 is relocated to a path that is longer than the 7When 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>
22 1 file changed, 12 insertions(+) 22 1 file changed, 12 insertions(+)
23 23
24diff --git a/elf/dl-load.c b/elf/dl-load.c 24diff --git a/elf/dl-load.c b/elf/dl-load.c
25index a73d11a62f..62e3eee478 100644 25index 44bbb69dc4..74e2e5e962 100644
26--- a/elf/dl-load.c 26--- a/elf/dl-load.c
27+++ b/elf/dl-load.c 27+++ b/elf/dl-load.c
28@@ -1707,7 +1707,19 @@ open_path (const char *name, size_t namelen, int mode, 28@@ -1785,7 +1785,19 @@ open_path (const char *name, size_t namelen, int mode,
29 given on the command line when rtld is run directly. */ 29 given on the command line when rtld is run directly. */
30 return -1; 30 return -1;
31 31
@@ -46,5 +46,5 @@ index a73d11a62f..62e3eee478 100644
46 { 46 {
47 struct r_search_path_elem *this_dir = *dirs; 47 struct r_search_path_elem *this_dir = *dirs;
48-- 48--
492.16.1 492.18.0
50 50
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 03f99916fa..f83e8192e2 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 @@
1From 695e1cbff6ee6db3435c33e55311c67adf44476d Mon Sep 17 00:00:00 2001 1From 5962ca897efe965745e193c12041693c9e07dd24 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 18 Mar 2015 01:51:38 +0000 3Date: Wed, 18 Mar 2015 01:51:38 +0000
4Subject: [PATCH 03/27] nativesdk-glibc: Raise the size of arrays containing dl 4Subject: [PATCH 03/30] nativesdk-glibc: Raise the size of arrays containing dl
5 paths 5 paths
6 6
7This patch puts the dynamic loader path in the binaries, SYSTEM_DIRS strings 7This patch puts the dynamic loader path in the binaries, SYSTEM_DIRS strings
@@ -41,10 +41,10 @@ index 6ee5153ff9..37a5f701fa 100644
41 _dl_cache_libcmp (const char *p1, const char *p2) 41 _dl_cache_libcmp (const char *p1, const char *p2)
42 { 42 {
43diff --git a/elf/dl-load.c b/elf/dl-load.c 43diff --git a/elf/dl-load.c b/elf/dl-load.c
44index 62e3eee478..6ddba73650 100644 44index 74e2e5e962..8f19186e1c 100644
45--- a/elf/dl-load.c 45--- a/elf/dl-load.c
46+++ b/elf/dl-load.c 46+++ b/elf/dl-load.c
47@@ -109,8 +109,8 @@ static size_t max_capstrlen attribute_relro; 47@@ -110,8 +110,8 @@ static size_t max_capstrlen attribute_relro;
48 gen-trusted-dirs.awk. */ 48 gen-trusted-dirs.awk. */
49 #include "trusted-dirs.h" 49 #include "trusted-dirs.h"
50 50
@@ -81,10 +81,10 @@ index fbdd814edf..9f4d8d69b1 100644
81 a platform. */ 81 a platform. */
82 static int 82 static int
83diff --git a/elf/rtld.c b/elf/rtld.c 83diff --git a/elf/rtld.c b/elf/rtld.c
84index 453f56eb15..08e0c4c94b 100644 84index 1b0c74739f..a70a62d31e 100644
85--- a/elf/rtld.c 85--- a/elf/rtld.c
86+++ b/elf/rtld.c 86+++ b/elf/rtld.c
87@@ -128,6 +128,7 @@ dso_name_valid_for_suid (const char *p) 87@@ -130,6 +130,7 @@ dso_name_valid_for_suid (const char *p)
88 } 88 }
89 return *p != '\0'; 89 return *p != '\0';
90 } 90 }
@@ -92,7 +92,7 @@ index 453f56eb15..08e0c4c94b 100644
92 92
93 /* LD_AUDIT variable contents. Must be processed before the 93 /* LD_AUDIT variable contents. Must be processed before the
94 audit_list below. */ 94 audit_list below. */
95@@ -1000,12 +1001,12 @@ of this helper program; chances are you did not intend to run this program.\n\ 95@@ -1001,12 +1002,12 @@ of this helper program; chances are you did not intend to run this program.\n\
96 --list list all dependencies and how they are resolved\n\ 96 --list list all dependencies and how they are resolved\n\
97 --verify verify that given object really is a dynamically linked\n\ 97 --verify verify that given object really is a dynamically linked\n\
98 object we can handle\n\ 98 object we can handle\n\
@@ -108,7 +108,7 @@ index 453f56eb15..08e0c4c94b 100644
108 ++_dl_skip_args; 108 ++_dl_skip_args;
109 --_dl_argc; 109 --_dl_argc;
110diff --git a/iconv/gconv_conf.c b/iconv/gconv_conf.c 110diff --git a/iconv/gconv_conf.c b/iconv/gconv_conf.c
111index d6cf9d2a3e..9fcf970144 100644 111index f173cde71b..5c3205026f 100644
112--- a/iconv/gconv_conf.c 112--- a/iconv/gconv_conf.c
113+++ b/iconv/gconv_conf.c 113+++ b/iconv/gconv_conf.c
114@@ -36,7 +36,7 @@ 114@@ -36,7 +36,7 @@
@@ -136,5 +136,5 @@ index cf43f1cf3b..7f07adde53 100644
136 # define add_system_dir(dir) add_dir (dir) 136 # define add_system_dir(dir) add_dir (dir)
137 #endif 137 #endif
138-- 138--
1392.16.1 1392.18.0
140 140
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 f9d70c2a09..a0957e6a7b 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,7 +1,7 @@
1From 2bafdbd7067794c6a24e5e85608c0ec4638c5667 Mon Sep 17 00:00:00 2001 1From ee17ca0a6b122466c484301ea9fe029dc7e5498f Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 31 Dec 2015 14:35:35 -0800 3Date: Thu, 31 Dec 2015 14:35:35 -0800
4Subject: [PATCH 04/27] nativesdk-glibc: Allow 64 bit atomics for x86 4Subject: [PATCH 04/30] nativesdk-glibc: Allow 64 bit atomics for x86
5 5
6The fix consist of allowing 64bit atomic ops for x86. 6The fix consist of allowing 64bit atomic ops for x86.
7This should be safe for i586 and newer CPUs. 7This should be safe for i586 and newer CPUs.
@@ -30,5 +30,5 @@ index 272da5dd8f..409c759f14 100644
30 #define ATOMIC_EXCHANGE_USES_CAS 0 30 #define ATOMIC_EXCHANGE_USES_CAS 0
31 31
32-- 32--
332.16.1 332.18.0
34 34
diff --git a/meta/recipes-core/glibc/glibc/relocate-locales.patch b/meta/recipes-core/glibc/glibc/0005-nativesdk-glibc-Make-relocatable-install-for-locales.patch
index 2aea37f5ca..56ff398753 100644
--- a/meta/recipes-core/glibc/glibc/relocate-locales.patch
+++ b/meta/recipes-core/glibc/glibc/0005-nativesdk-glibc-Make-relocatable-install-for-locales.patch
@@ -1,12 +1,24 @@
1From 7195d203c6986ccdb39053933b703391ccc6854a Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 3 Aug 2018 09:55:12 -0700
4Subject: [PATCH 05/30] nativesdk-glibc: Make relocatable install for locales
5
1The glibc locale path is hard-coded to the install prefix, but in SDKs we need 6The glibc locale path is hard-coded to the install prefix, but in SDKs we need
2to be able to relocate the binaries. Expand the strings to 4K and put them in a 7to be able to relocate the binaries. Expand the strings to 4K and put them in a
3magic segment that we can relocate at install time. 8magic segment that we can relocate at install time.
4 9
5Upstream-Status: Inappropriate (OE-specific) 10Upstream-Status: Inappropriate (OE-specific)
11
6Signed-off-by: Ross Burton <ross.burton@intel.com> 12Signed-off-by: Ross Burton <ross.burton@intel.com>
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 locale/findlocale.c | 4 ++--
16 locale/loadarchive.c | 2 +-
17 locale/localeinfo.h | 2 +-
18 3 files changed, 4 insertions(+), 4 deletions(-)
7 19
8diff --git a/locale/findlocale.c b/locale/findlocale.c 20diff --git a/locale/findlocale.c b/locale/findlocale.c
9index 872cadb5..da14fa39 100644 21index 872cadb5b9..dd651e07f5 100644
10--- a/locale/findlocale.c 22--- a/locale/findlocale.c
11+++ b/locale/findlocale.c 23+++ b/locale/findlocale.c
12@@ -56,7 +56,7 @@ struct __locale_data *const _nl_C[] attribute_hidden = 24@@ -56,7 +56,7 @@ struct __locale_data *const _nl_C[] attribute_hidden =
@@ -27,8 +39,21 @@ index 872cadb5..da14fa39 100644
27 } 39 }
28 else 40 else
29 /* We really have to load some data. First see whether the name is 41 /* We really have to load some data. First see whether the name is
42diff --git a/locale/loadarchive.c b/locale/loadarchive.c
43index 516d30d8d1..9bfbe1a5dd 100644
44--- a/locale/loadarchive.c
45+++ b/locale/loadarchive.c
46@@ -42,7 +42,7 @@
47
48
49 /* Name of the locale archive file. */
50-static const char archfname[] = COMPLOCALEDIR "/locale-archive";
51+static const char archfname[4096] __attribute__ ((section (".gccrelocprefix"))) = COMPLOCALEDIR "/locale-archive";
52
53 /* Size of initial mapping window, optimal if large enough to
54 cover the header plus the initial locale. */
30diff --git a/locale/localeinfo.h b/locale/localeinfo.h 55diff --git a/locale/localeinfo.h b/locale/localeinfo.h
31index 68822a63..537bc351 100644 56index 68822a6319..537bc35149 100644
32--- a/locale/localeinfo.h 57--- a/locale/localeinfo.h
33+++ b/locale/localeinfo.h 58+++ b/locale/localeinfo.h
34@@ -325,7 +325,7 @@ _nl_lookup_word (locale_t l, int category, int item) 59@@ -325,7 +325,7 @@ _nl_lookup_word (locale_t l, int category, int item)
@@ -40,16 +65,6 @@ index 68822a63..537bc351 100644
40 65
41 /* Load the locale data for CATEGORY from the file specified by *NAME. 66 /* Load the locale data for CATEGORY from the file specified by *NAME.
42 If *NAME is "", use environment variables as specified by POSIX, and 67 If *NAME is "", use environment variables as specified by POSIX, and
43diff --git a/locale/loadarchive.c b/locale/loadarchive.c 68--
44index 516d30d8..792b37fb 100644 692.18.0
45--- a/locale/loadarchive.c 70
46+++ b/locale/loadarchive.c
47@@ -42,7 +43,7 @@
48
49
50 /* Name of the locale archive file. */
51-static const char archfname[] = COMPLOCALEDIR "/locale-archive";
52+static const char archfname[4096] __attribute__ ((section (".gccrelocprefix"))) = COMPLOCALEDIR "/locale-archive";
53
54 /* Size of initial mapping window, optimal if large enough to
55 cover the header plus the initial locale. */
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 ad9106eefa..1e712d5eba 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 @@
1From 661adfe9c220d10617bf6bb283827471c3956b01 Mon Sep 17 00:00:00 2001 1From b28e06d87a43e6aacff5624aaec75106599edec8 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 18 Mar 2015 00:01:50 +0000 3Date: Wed, 18 Mar 2015 00:01:50 +0000
4Subject: [PATCH 05/27] fsl e500/e5500/e6500/603e fsqrt implementation 4Subject: [PATCH 06/30] fsl e500/e5500/e6500/603e fsqrt implementation
5 5
6Upstream-Status: Pending 6Upstream-Status: Pending
7Signed-off-by: Edmar Wienskoski <edmar@freescale.com> 7Signed-off-by: Edmar Wienskoski <edmar@freescale.com>
8Signed-off-by: Khem Raj <raj.khem@gmail.com> 8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9--- 9---
10 sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | 134 +++++++++++++++++++++ 10 sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | 134 ++++++++++++++++++
11 sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | 101 ++++++++++++++++ 11 sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | 101 +++++++++++++
12 sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | 134 +++++++++++++++++++++ 12 sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | 134 ++++++++++++++++++
13 sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | 101 ++++++++++++++++ 13 .../powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | 101 +++++++++++++
14 sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | 134 +++++++++++++++++++++ 14 sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | 134 ++++++++++++++++++
15 sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | 101 ++++++++++++++++ 15 sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | 101 +++++++++++++
16 sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | 134 +++++++++++++++++++++ 16 sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | 134 ++++++++++++++++++
17 sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | 101 ++++++++++++++++ 17 sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | 101 +++++++++++++
18 sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | 134 +++++++++++++++++++++ 18 sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | 134 ++++++++++++++++++
19 sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | 101 ++++++++++++++++ 19 sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | 101 +++++++++++++
20 sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | 134 +++++++++++++++++++++ 20 sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | 134 ++++++++++++++++++
21 sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | 101 ++++++++++++++++ 21 sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | 101 +++++++++++++
22 .../sysv/linux/powerpc/powerpc32/603e/fpu/Implies | 1 + 22 .../linux/powerpc/powerpc32/603e/fpu/Implies | 1 +
23 .../linux/powerpc/powerpc32/e300c3/fpu/Implies | 2 + 23 .../powerpc/powerpc32/e300c3/fpu/Implies | 2 +
24 .../linux/powerpc/powerpc32/e500mc/fpu/Implies | 1 + 24 .../powerpc/powerpc32/e500mc/fpu/Implies | 1 +
25 .../sysv/linux/powerpc/powerpc32/e5500/fpu/Implies | 1 + 25 .../linux/powerpc/powerpc32/e5500/fpu/Implies | 1 +
26 .../sysv/linux/powerpc/powerpc32/e6500/fpu/Implies | 1 + 26 .../linux/powerpc/powerpc32/e6500/fpu/Implies | 1 +
27 .../sysv/linux/powerpc/powerpc64/e5500/fpu/Implies | 1 + 27 .../linux/powerpc/powerpc64/e5500/fpu/Implies | 1 +
28 .../sysv/linux/powerpc/powerpc64/e6500/fpu/Implies | 1 + 28 .../linux/powerpc/powerpc64/e6500/fpu/Implies | 1 +
29 19 files changed, 1418 insertions(+) 29 19 files changed, 1418 insertions(+)
30 create mode 100644 sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c 30 create mode 100644 sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
31 create mode 100644 sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c 31 create mode 100644 sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
@@ -1580,5 +1580,5 @@ index 0000000000..04ff8cc181
1580@@ -0,0 +1 @@ 1580@@ -0,0 +1 @@
1581+powerpc/powerpc64/e6500/fpu 1581+powerpc/powerpc64/e6500/fpu
1582-- 1582--
15832.16.1 15832.18.0
1584 1584
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 a3d50fd054..251e9dd4b1 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 @@
1From 615598fcca64461a71d84f756d75374f02d914ad Mon Sep 17 00:00:00 2001 1From fd2bd3037ef49f67f12659b6aaba02f76e131a24 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 18 Mar 2015 00:11:22 +0000 3Date: Wed, 18 Mar 2015 00:11:22 +0000
4Subject: [PATCH 06/27] readlib: Add OECORE_KNOWN_INTERPRETER_NAMES to known 4Subject: [PATCH 07/30] readlib: Add OECORE_KNOWN_INTERPRETER_NAMES to known
5 names 5 names
6 6
7This bolts in a hook for OE to pass its own version of interpreter 7This bolts in a hook for OE to pass its own version of interpreter
@@ -29,5 +29,5 @@ index 573c01476c..d8c7412287 100644
29 29
30 static struct known_names known_libs[] = 30 static struct known_names known_libs[] =
31-- 31--
322.16.1 322.18.0
33 33
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 1234df0a09..67439c4b87 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 @@
1From 804b73ae295bdfda29341e89f2d0c1b99492dc9a Mon Sep 17 00:00:00 2001 1From b696fe0c6147afc375ae573063a92a53857248eb Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 18 Mar 2015 00:15:07 +0000 3Date: Wed, 18 Mar 2015 00:15:07 +0000
4Subject: [PATCH 07/27] ppc/sqrt: Fix undefined reference to `__sqrt_finite' 4Subject: [PATCH 08/30] ppc/sqrt: Fix undefined reference to `__sqrt_finite'
5 5
6on ppc fixes the errors like below 6on ppc fixes the errors like below
7| ./.libs/libpulsecore-1.1.so: undefined reference to `__sqrt_finite' 7| ./.libs/libpulsecore-1.1.so: undefined reference to `__sqrt_finite'
@@ -204,5 +204,5 @@ index 26fa067abf..9d175122a8 100644
204 } 204 }
205+strong_alias (__ieee754_sqrtf, __sqrtf_finite) 205+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
206-- 206--
2072.16.1 2072.18.0
208 208
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 1b43647514..1d27a56c79 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 @@
1From 1a53084249d9dae1ef4281246efc899c8f9d63ed Mon Sep 17 00:00:00 2001 1From 324aa1ffbf85ebd06b54f228604d6651895c1eea Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 18 Mar 2015 00:16:38 +0000 3Date: Wed, 18 Mar 2015 00:16:38 +0000
4Subject: [PATCH 08/27] __ieee754_sqrt{,f} are now inline functions and call 4Subject: [PATCH 09/30] __ieee754_sqrt{,f} are now inline functions and call
5 out __slow versions 5 out __slow versions
6 6
7Upstream-Status: Pending 7Upstream-Status: Pending
@@ -383,5 +383,5 @@ index 9d175122a8..10de1f0cc3 100644
383+ 383+
384 strong_alias (__ieee754_sqrtf, __sqrtf_finite) 384 strong_alias (__ieee754_sqrtf, __sqrtf_finite)
385-- 385--
3862.16.1 3862.18.0
387 387
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 ea498569b3..6b2bf65cac 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 @@
1From 48262b6dda935278a40374ddf0080ab6cc999582 Mon Sep 17 00:00:00 2001 1From f6581da98bef982c888061fa06092c03f3c6c708 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 18 Mar 2015 00:20:09 +0000 3Date: Wed, 18 Mar 2015 00:20:09 +0000
4Subject: [PATCH 09/27] Quote from bug 1443 which explains what the patch does 4Subject: [PATCH 10/30] Quote from bug 1443 which explains what the patch does
5 : 5 :
6 6
7 We build some random program and link it with -lust. When we run it, 7 We build some random program and link it with -lust. When we run it,
@@ -45,7 +45,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
45 1 file changed, 1 insertion(+), 1 deletion(-) 45 1 file changed, 1 insertion(+), 1 deletion(-)
46 46
47diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h 47diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
48index 8a00eab5e3..623edcb1bd 100644 48index 1a4fd3f17b..a02c47571a 100644
49--- a/sysdeps/arm/dl-machine.h 49--- a/sysdeps/arm/dl-machine.h
50+++ b/sysdeps/arm/dl-machine.h 50+++ b/sysdeps/arm/dl-machine.h
51@@ -510,7 +510,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, 51@@ -510,7 +510,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
@@ -58,5 +58,5 @@ index 8a00eab5e3..623edcb1bd 100644
58 58
59 case R_ARM_TLS_TPOFF32: 59 case R_ARM_TLS_TPOFF32:
60-- 60--
612.16.1 612.18.0
62 62
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 17513185da..dfe2fe4b83 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 @@
1From 72ea5410909aef6b6aee70e7f9a88d534583aa00 Mon Sep 17 00:00:00 2001 1From 635d4a48c331b5ccc9165a6f622091845a5245b0 Mon Sep 17 00:00:00 2001
2From: Ting Liu <b28495@freescale.com> 2From: Ting Liu <b28495@freescale.com>
3Date: Wed, 19 Dec 2012 04:39:57 -0600 3Date: Wed, 19 Dec 2012 04:39:57 -0600
4Subject: [PATCH 10/27] eglibc: run libm-err-tab.pl with specific dirs in ${S} 4Subject: [PATCH 11/30] eglibc: run libm-err-tab.pl with specific dirs in ${S}
5 5
6libm-err-tab.pl will parse all the files named "libm-test-ulps" 6libm-err-tab.pl will parse all the files named "libm-test-ulps"
7in the given dir recursively. To avoid parsing the one in 7in the given dir recursively. To avoid parsing the one in
@@ -32,5 +32,5 @@ index c2756640a7..1b5bb16a96 100644
32 touch $@ 32 touch $@
33 33
34-- 34--
352.16.1 352.18.0
36 36
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 1e70b2a30e..3fcaedd8ef 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 @@
1From 8ae998a10b24545e0c12f1f3d8be97b191178204 Mon Sep 17 00:00:00 2001 1From 11991e14957063b0e5fa366d836f42dd6d3e10cd Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 18 Mar 2015 00:24:46 +0000 3Date: Wed, 18 Mar 2015 00:24:46 +0000
4Subject: [PATCH 11/27] __ieee754_sqrt{,f} are now inline functions and call 4Subject: [PATCH 12/30] __ieee754_sqrt{,f} are now inline functions and call
5 out __slow versions 5 out __slow versions
6 6
7Upstream-Status: Pending 7Upstream-Status: Pending
@@ -57,5 +57,5 @@ index 812653558f..10de1f0cc3 100644
57 #endif 57 #endif
58 { 58 {
59-- 59--
602.16.1 602.18.0
61 61
diff --git a/meta/recipes-core/glibc/glibc/0012-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 c35b759a28..32796354a0 100644
--- a/meta/recipes-core/glibc/glibc/0012-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 @@
1From 4f9f39761909e67bd6d29b970b7165863e33e565 Mon Sep 17 00:00:00 2001 1From 36b0c04436f6ec7dc270d387cb036b5361544618 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 18 Mar 2015 00:27:10 +0000 3Date: Wed, 18 Mar 2015 00:27:10 +0000
4Subject: [PATCH 12/27] sysdeps/gnu/configure.ac: handle correctly 4Subject: [PATCH 13/30] sysdeps/gnu/configure.ac: handle correctly
5 $libc_cv_rootsbindir 5 $libc_cv_rootsbindir
6 6
7Upstream-Status:Pending 7Upstream-Status:Pending
@@ -38,5 +38,5 @@ index 634fe4de2a..3db1697f4f 100644
38 ;; 38 ;;
39 esac 39 esac
40-- 40--
412.16.1 412.18.0
42 42
diff --git a/meta/recipes-core/glibc/glibc/0013-Add-unused-attribute.patch b/meta/recipes-core/glibc/glibc/0014-Add-unused-attribute.patch
index 62c65253dd..cfc044506b 100644
--- a/meta/recipes-core/glibc/glibc/0013-Add-unused-attribute.patch
+++ b/meta/recipes-core/glibc/glibc/0014-Add-unused-attribute.patch
@@ -1,7 +1,7 @@
1From bba7a647b636618d5fd083e904f995f7736b9168 Mon Sep 17 00:00:00 2001 1From f1969e4c95e810280edf5e11c8a6f32b3a56e2fb Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 18 Mar 2015 00:28:41 +0000 3Date: Wed, 18 Mar 2015 00:28:41 +0000
4Subject: [PATCH 13/27] Add unused attribute 4Subject: [PATCH 14/30] Add unused attribute
5 5
6Helps in avoiding gcc warning when header is is included in 6Helps in avoiding gcc warning when header is is included in
7a source file which does not use both functions 7a source file which does not use both functions
@@ -30,5 +30,5 @@ index 123e2a62ce..63cc83ec84 100644
30 { 30 {
31 int slash_count = 0; 31 int slash_count = 0;
32-- 32--
332.16.1 332.18.0
34 34
diff --git a/meta/recipes-core/glibc/glibc/0014-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 66911285a9..217a3f6088 100644
--- a/meta/recipes-core/glibc/glibc/0014-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 @@
1From 62f44ce3dd01a257cf67116e355492cb1659a917 Mon Sep 17 00:00:00 2001 1From be9965d0e53db1d7fe9419710a84c75526a18cc0 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 18 Mar 2015 00:31:06 +0000 3Date: Wed, 18 Mar 2015 00:31:06 +0000
4Subject: [PATCH 14/27] 'yes' within the path sets wrong config variables 4Subject: [PATCH 15/30] 'yes' within the path sets wrong config variables
5 5
6It seems that the 'AC_EGREP_CPP(yes...' example is quite popular 6It seems that the 'AC_EGREP_CPP(yes...' example is quite popular
7but being such a short word to grep it is likely to produce 7but being such a short word to grep it is likely to produce
@@ -259,5 +259,5 @@ index f9cba6e15d..b21f72f1e4 100644
259 ], libc_cv_ppc64_def_call_elf=yes, libc_cv_ppc64_def_call_elf=no)]) 259 ], libc_cv_ppc64_def_call_elf=yes, libc_cv_ppc64_def_call_elf=no)])
260 if test $libc_cv_ppc64_def_call_elf = no; then 260 if test $libc_cv_ppc64_def_call_elf = no; then
261-- 261--
2622.16.1 2622.18.0
263 263
diff --git a/meta/recipes-core/glibc/glibc/0015-timezone-re-written-tzselect-as-posix-sh.patch b/meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch
index 66bf4fdabd..719193cbf9 100644
--- a/meta/recipes-core/glibc/glibc/0015-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 @@
1From ac240fb01f6470ac207968adfbe20ccc93b16f8b Mon Sep 17 00:00:00 2001 1From 60694f7ed69c8b711ffe37ce157032e85f60347b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 18 Mar 2015 00:33:03 +0000 3Date: Wed, 18 Mar 2015 00:33:03 +0000
4Subject: [PATCH 15/27] timezone: re-written tzselect as posix sh 4Subject: [PATCH 16/30] timezone: re-written tzselect as posix sh
5 5
6To avoid the bash dependency. 6To avoid the bash dependency.
7 7
@@ -41,5 +41,5 @@ index d2c3a6d1dd..089679f306 100755
41 # Output one argument as-is to standard output. 41 # Output one argument as-is to standard output.
42 # Safer than 'echo', which can mishandle '\' or leading '-'. 42 # Safer than 'echo', which can mishandle '\' or leading '-'.
43-- 43--
442.16.1 442.18.0
45 45
diff --git a/meta/recipes-core/glibc/glibc/0016-Remove-bash-dependency-for-nscd-init-script.patch b/meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch
index 0b1ee96871..e1a0d4918a 100644
--- a/meta/recipes-core/glibc/glibc/0016-Remove-bash-dependency-for-nscd-init-script.patch
+++ b/meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch
@@ -1,7 +1,7 @@
1From 790b133ff2bc5b77ed8533b8999abc65ed0da02b Mon Sep 17 00:00:00 2001 1From 0d6e36d38569ec716331c48a2187b391f5680363 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 31 Dec 2015 14:33:02 -0800 3Date: Thu, 31 Dec 2015 14:33:02 -0800
4Subject: [PATCH 16/27] Remove bash dependency for nscd init script 4Subject: [PATCH 17/30] Remove bash dependency for nscd init script
5 5
6The nscd init script uses #! /bin/bash but only really uses one bashism 6The nscd init script uses #! /bin/bash but only really uses one bashism
7(translated strings), so remove them and switch the shell to #!/bin/sh. 7(translated strings), so remove them and switch the shell to #!/bin/sh.
@@ -71,5 +71,5 @@ index a882da7d8b..b02986ec15 100644
71 ;; 71 ;;
72 esac 72 esac
73-- 73--
742.16.1 742.18.0
75 75
diff --git a/meta/recipes-core/glibc/glibc/0017-eglibc-Cross-building-and-testing-instructions.patch b/meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch
index fd821323d7..fa8d127f7a 100644
--- a/meta/recipes-core/glibc/glibc/0017-eglibc-Cross-building-and-testing-instructions.patch
+++ b/meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch
@@ -1,15 +1,15 @@
1From 897430bbb65a0f22284d7957206b5fd4efd6607f Mon Sep 17 00:00:00 2001 1From 448222134c9a0b147c4598f288ccc9d045b873c4 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 18 Mar 2015 00:42:58 +0000 3Date: Wed, 18 Mar 2015 00:42:58 +0000
4Subject: [PATCH 17/27] eglibc: Cross building and testing instructions 4Subject: [PATCH 18/30] eglibc: Cross building and testing instructions
5 5
6Ported from eglibc 6Ported from eglibc
7Upstream-Status: Pending 7Upstream-Status: Pending
8 8
9Signed-off-by: Khem Raj <raj.khem@gmail.com> 9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10--- 10---
11 GLIBC.cross-building | 383 +++++++++++++++++++++++++++++++++++++++++++++++++++ 11 GLIBC.cross-building | 383 +++++++++++++++++++++++++++++++++++++++++++
12 GLIBC.cross-testing | 205 +++++++++++++++++++++++++++ 12 GLIBC.cross-testing | 205 +++++++++++++++++++++++
13 2 files changed, 588 insertions(+) 13 2 files changed, 588 insertions(+)
14 create mode 100644 GLIBC.cross-building 14 create mode 100644 GLIBC.cross-building
15 create mode 100644 GLIBC.cross-testing 15 create mode 100644 GLIBC.cross-testing
@@ -615,5 +615,5 @@ index 0000000000..b67b468466
615+ simply place copies of these libraries in the top GLIBC build 615+ simply place copies of these libraries in the top GLIBC build
616+ directory. 616+ directory.
617-- 617--
6182.16.1 6182.18.0
619 619
diff --git a/meta/recipes-core/glibc/glibc/0018-eglibc-Help-bootstrap-cross-toolchain.patch b/meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch
index 80d547c80d..c7e8bd2ee9 100644
--- a/meta/recipes-core/glibc/glibc/0018-eglibc-Help-bootstrap-cross-toolchain.patch
+++ b/meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch
@@ -1,7 +1,7 @@
1From fcfa19b69e8749477022161a808a201807ef72ec Mon Sep 17 00:00:00 2001 1From 6b8ee1ae86f8b9a49f751ab211002c83744356a6 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 18 Mar 2015 00:49:28 +0000 3Date: Wed, 18 Mar 2015 00:49:28 +0000
4Subject: [PATCH 18/27] eglibc: Help bootstrap cross toolchain 4Subject: [PATCH 19/30] eglibc: Help bootstrap cross toolchain
5 5
6Taken from EGLIBC, r1484 + r1525 6Taken from EGLIBC, r1484 + r1525
7 7
@@ -29,7 +29,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
29 create mode 100644 include/stubs-bootstrap.h 29 create mode 100644 include/stubs-bootstrap.h
30 30
31diff --git a/Makefile b/Makefile 31diff --git a/Makefile b/Makefile
32index bea4e27f8d..8c83cfadc6 100644 32index d3f25a525a..ab383867e2 100644
33--- a/Makefile 33--- a/Makefile
34+++ b/Makefile 34+++ b/Makefile
35@@ -70,9 +70,18 @@ subdir-dirs = include 35@@ -70,9 +70,18 @@ subdir-dirs = include
@@ -52,7 +52,7 @@ index bea4e27f8d..8c83cfadc6 100644
52 ifeq (yes,$(build-shared)) 52 ifeq (yes,$(build-shared))
53 headers += gnu/lib-names.h 53 headers += gnu/lib-names.h
54 endif 54 endif
55@@ -152,6 +161,16 @@ others: $(common-objpfx)testrun.sh 55@@ -195,6 +204,16 @@ others: $(common-objpfx)testrun.sh
56 56
57 subdir-stubs := $(foreach dir,$(subdirs),$(common-objpfx)$(dir)/stubs) 57 subdir-stubs := $(foreach dir,$(subdirs),$(common-objpfx)$(dir)/stubs)
58 58
@@ -69,7 +69,7 @@ index bea4e27f8d..8c83cfadc6 100644
69 ifndef abi-variants 69 ifndef abi-variants
70 installed-stubs = $(inst_includedir)/gnu/stubs.h 70 installed-stubs = $(inst_includedir)/gnu/stubs.h
71 else 71 else
72@@ -178,6 +197,7 @@ $(inst_includedir)/gnu/stubs.h: $(+force) 72@@ -221,6 +240,7 @@ $(inst_includedir)/gnu/stubs.h: $(+force)
73 73
74 install-others-nosubdir: $(installed-stubs) 74 install-others-nosubdir: $(installed-stubs)
75 endif 75 endif
@@ -96,5 +96,5 @@ index 0000000000..1d2b669aff
96+ EGLIBC subdir 'stubs' make targets, on every .o file in EGLIBC, but 96+ EGLIBC subdir 'stubs' make targets, on every .o file in EGLIBC, but
97+ an empty stubs.h like this will do fine for GCC. */ 97+ an empty stubs.h like this will do fine for GCC. */
98-- 98--
992.16.1 992.18.0
100 100
diff --git a/meta/recipes-core/glibc/glibc/0019-eglibc-Clear-cache-lines-on-ppc8xx.patch b/meta/recipes-core/glibc/glibc/0020-eglibc-Clear-cache-lines-on-ppc8xx.patch
index 17bfe4fe84..d3f4b6a319 100644
--- a/meta/recipes-core/glibc/glibc/0019-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 @@
1From c6f2db0d7c5c65bfa19766a0e1ce8210111f9c7d Mon Sep 17 00:00:00 2001 1From 617ca176291df82c29d8c78e92ba8edcb38a2fe2 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 31 Dec 2015 15:15:09 -0800 3Date: Thu, 31 Dec 2015 15:15:09 -0800
4Subject: [PATCH 19/27] eglibc: Clear cache lines on ppc8xx 4Subject: [PATCH 20/30] eglibc: Clear cache lines on ppc8xx
5 5
62007-06-13 Nathan Sidwell <nathan@codesourcery.com> 62007-06-13 Nathan Sidwell <nathan@codesourcery.com>
7 Mark Shinwell <shinwell@codesourcery.com> 7 Mark Shinwell <shinwell@codesourcery.com>
@@ -79,5 +79,5 @@ index f2ad0c355d..3e6773795e 100644
79 break; 79 break;
80 #ifndef SHARED 80 #ifndef SHARED
81-- 81--
822.16.1 822.18.0
83 83
diff --git a/meta/recipes-core/glibc/glibc/0020-eglibc-Resolve-__fpscr_values-on-SH4.patch b/meta/recipes-core/glibc/glibc/0021-eglibc-Resolve-__fpscr_values-on-SH4.patch
index 09f7670758..881bd911fc 100644
--- a/meta/recipes-core/glibc/glibc/0020-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 @@
1From 577085016bb926a687abec145557fe8cb8f5af0e Mon Sep 17 00:00:00 2001 1From 78e379d65f4fc810fb095a97c4f36f0b79bb5e01 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 18 Mar 2015 00:55:53 +0000 3Date: Wed, 18 Mar 2015 00:55:53 +0000
4Subject: [PATCH 20/27] eglibc: Resolve __fpscr_values on SH4 4Subject: [PATCH 21/30] eglibc: Resolve __fpscr_values on SH4
5 5
62010-09-29 Nobuhiro Iwamatsu <iwamatsu@nigauri.org> 62010-09-29 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 Andrew Stubbs <ams@codesourcery.com> 7 Andrew Stubbs <ams@codesourcery.com>
@@ -52,5 +52,5 @@ index c4e28ffb98..648bae03d5 100644
52+weak_alias (___fpscr_values, __fpscr_values) 52+weak_alias (___fpscr_values, __fpscr_values)
53+ 53+
54-- 54--
552.16.1 552.18.0
56 56
diff --git a/meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch b/meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch
index a629ce141a..04a5be7fcb 100644
--- a/meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch
+++ b/meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch
@@ -1,24 +1,24 @@
1From e019fe6a2b410db6043e21803f497b5cbdd90a83 Mon Sep 17 00:00:00 2001 1From 3e24f9d63aef5561b80fc7c345ce61943910e69b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 18 Mar 2015 01:33:49 +0000 3Date: Wed, 18 Mar 2015 01:33:49 +0000
4Subject: [PATCH 22/27] eglibc: Forward port cross locale generation support 4Subject: [PATCH 22/30] eglibc: Forward port cross locale generation support
5 5
6Upstream-Status: Pending 6Upstream-Status: Pending
7 7
8Signed-off-by: Khem Raj <raj.khem@gmail.com> 8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9--- 9---
10 locale/Makefile | 3 ++- 10 locale/Makefile | 3 +-
11 locale/catnames.c | 48 +++++++++++++++++++++++++++++++++++ 11 locale/catnames.c | 48 ++++++++++++++++++++++++++++
12 locale/localeinfo.h | 2 +- 12 locale/localeinfo.h | 2 +-
13 locale/programs/charmap-dir.c | 6 +++++ 13 locale/programs/charmap-dir.c | 6 ++++
14 locale/programs/ld-collate.c | 17 ++++++------- 14 locale/programs/ld-collate.c | 17 +++++-----
15 locale/programs/ld-ctype.c | 27 ++++++++++---------- 15 locale/programs/ld-ctype.c | 27 ++++++++--------
16 locale/programs/ld-time.c | 31 +++++++++++++++-------- 16 locale/programs/ld-time.c | 31 ++++++++++++------
17 locale/programs/linereader.c | 2 +- 17 locale/programs/linereader.c | 2 +-
18 locale/programs/localedef.c | 8 ++++++ 18 locale/programs/localedef.c | 8 +++++
19 locale/programs/locfile.c | 5 +++- 19 locale/programs/locfile.c | 5 ++-
20 locale/programs/locfile.h | 59 +++++++++++++++++++++++++++++++++++++++++-- 20 locale/programs/locfile.h | 59 +++++++++++++++++++++++++++++++++--
21 locale/setlocale.c | 30 ---------------------- 21 locale/setlocale.c | 30 ------------------
22 12 files changed, 169 insertions(+), 69 deletions(-) 22 12 files changed, 169 insertions(+), 69 deletions(-)
23 create mode 100644 locale/catnames.c 23 create mode 100644 locale/catnames.c
24 24
@@ -91,7 +91,7 @@ index 0000000000..9fad357db1
91+ [LC_ALL] = sizeof ("LC_ALL") - 1 91+ [LC_ALL] = sizeof ("LC_ALL") - 1
92+ }; 92+ };
93diff --git a/locale/localeinfo.h b/locale/localeinfo.h 93diff --git a/locale/localeinfo.h b/locale/localeinfo.h
94index 68822a6319..fa36123776 100644 94index 537bc35149..73ba20d695 100644
95--- a/locale/localeinfo.h 95--- a/locale/localeinfo.h
96+++ b/locale/localeinfo.h 96+++ b/locale/localeinfo.h
97@@ -224,7 +224,7 @@ __libc_tsd_define (extern, locale_t, LOCALE) 97@@ -224,7 +224,7 @@ __libc_tsd_define (extern, locale_t, LOCALE)
@@ -562,5 +562,5 @@ index e4de907e1f..b5d8f5c17d 100644
562 # define WEAK_POSTLOAD(postload) weak_extern (postload) 562 # define WEAK_POSTLOAD(postload) weak_extern (postload)
563 #else 563 #else
564-- 564--
5652.16.1 5652.18.0
566 566
diff --git a/meta/recipes-core/glibc/glibc/0023-Define-DUMMY_LOCALE_T-if-not-defined.patch b/meta/recipes-core/glibc/glibc/0023-Define-DUMMY_LOCALE_T-if-not-defined.patch
index ae708ef83e..092e90e5e3 100644
--- a/meta/recipes-core/glibc/glibc/0023-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 @@
1From 9d71526be21abe68dd8ca3a5a219445851bbc2f4 Mon Sep 17 00:00:00 2001 1From 24f3fbd925b6af96c4369184528028b144b51310 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 20 Apr 2016 21:11:00 -0700 3Date: Wed, 20 Apr 2016 21:11:00 -0700
4Subject: [PATCH 23/27] Define DUMMY_LOCALE_T if not defined 4Subject: [PATCH 23/30] Define DUMMY_LOCALE_T if not defined
5 5
6This is a hack to fix building the locale bits on an older 6This is a hack to fix building the locale bits on an older
7CentOs 5.X machine 7CentOs 5.X machine
@@ -28,5 +28,5 @@ index 9956cd8446..04342f3644 100644
28 #define PACKAGE _libc_intl_domainname 28 #define PACKAGE _libc_intl_domainname
29 #ifndef VERSION 29 #ifndef VERSION
30-- 30--
312.16.1 312.18.0
32 32
diff --git a/meta/recipes-core/glibc/glibc/0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch b/meta/recipes-core/glibc/glibc/0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch
index 42ff667811..c78b4a3325 100644
--- a/meta/recipes-core/glibc/glibc/0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch
+++ b/meta/recipes-core/glibc/glibc/0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch
@@ -1,7 +1,7 @@
1From 03873af286f1dab1062f598d6deb774ce513421d Mon Sep 17 00:00:00 2001 1From 9f02a73c41782688f43e01bc2adbba09fc83b51e Mon Sep 17 00:00:00 2001
2From: Mark Hatle <mark.hatle@windriver.com> 2From: Mark Hatle <mark.hatle@windriver.com>
3Date: Thu, 18 Aug 2016 14:07:58 -0500 3Date: Thu, 18 Aug 2016 14:07:58 -0500
4Subject: [PATCH 24/27] elf/dl-deps.c: Make _dl_build_local_scope breadth first 4Subject: [PATCH 24/30] elf/dl-deps.c: Make _dl_build_local_scope breadth first
5 5
6According to the ELF specification: 6According to the ELF specification:
7 7
@@ -24,10 +24,10 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
24 1 file changed, 10 insertions(+), 4 deletions(-) 24 1 file changed, 10 insertions(+), 4 deletions(-)
25 25
26diff --git a/elf/dl-deps.c b/elf/dl-deps.c 26diff --git a/elf/dl-deps.c b/elf/dl-deps.c
27index c975fcffd7..6ee58c74e0 100644 27index 9d9b1ba7f2..8414028c58 100644
28--- a/elf/dl-deps.c 28--- a/elf/dl-deps.c
29+++ b/elf/dl-deps.c 29+++ b/elf/dl-deps.c
30@@ -72,13 +72,19 @@ _dl_build_local_scope (struct link_map **list, struct link_map *map) 30@@ -73,13 +73,19 @@ _dl_build_local_scope (struct link_map **list, struct link_map *map)
31 { 31 {
32 struct link_map **p = list; 32 struct link_map **p = list;
33 struct link_map **q; 33 struct link_map **q;
@@ -52,5 +52,5 @@ index c975fcffd7..6ee58c74e0 100644
52 } 52 }
53 53
54-- 54--
552.16.1 552.18.0
56 56
diff --git a/meta/recipes-core/glibc/glibc/0025-locale-fix-hard-coded-reference-to-gcc-E.patch b/meta/recipes-core/glibc/glibc/0025-locale-fix-hard-coded-reference-to-gcc-E.patch
index 7f5d1421d3..5eb1a019a4 100644
--- a/meta/recipes-core/glibc/glibc/0025-locale-fix-hard-coded-reference-to-gcc-E.patch
+++ b/meta/recipes-core/glibc/glibc/0025-locale-fix-hard-coded-reference-to-gcc-E.patch
@@ -1,7 +1,7 @@
1From 56dab024751941c07eb479f47ef6682e2168c86a Mon Sep 17 00:00:00 2001 1From 985b3d9e9b3f99f5a23c0c68e8657e311ca6f42d Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rosen?= <jeremy.rosen@smile.fr> 2From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rosen?= <jeremy.rosen@smile.fr>
3Date: Mon, 22 Aug 2016 16:09:25 +0200 3Date: Mon, 22 Aug 2016 16:09:25 +0200
4Subject: [PATCH 25/27] locale: fix hard-coded reference to gcc -E 4Subject: [PATCH 25/30] locale: fix hard-coded reference to gcc -E
5 5
6When new version of compilers are published, they may not be compatible with 6When new version of compilers are published, they may not be compatible with
7older versions of software. This is particularly common when software is built 7older versions of software. This is particularly common when software is built
@@ -34,5 +34,5 @@ index 30d3f2f195..e97653017c 100644
34 34
35 sub cstrlen { 35 sub cstrlen {
36-- 36--
372.16.1 372.18.0
38 38
diff --git a/meta/recipes-core/glibc/glibc/0026-reset-dl_load_write_lock-after-forking.patch b/meta/recipes-core/glibc/glibc/0026-reset-dl_load_write_lock-after-forking.patch
index eca1193dd3..ad10b3c715 100644
--- a/meta/recipes-core/glibc/glibc/0026-reset-dl_load_write_lock-after-forking.patch
+++ b/meta/recipes-core/glibc/glibc/0026-reset-dl_load_write_lock-after-forking.patch
@@ -1,7 +1,7 @@
1From 847d37d5a34e4bf294de4ba98de3668950e28bc7 Mon Sep 17 00:00:00 2001 1From c26abfc71ef461ef4980f57a35870b68826bd619 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 27 Jan 2018 10:05:07 -0800 3Date: Sat, 27 Jan 2018 10:05:07 -0800
4Subject: [PATCH 26/27] reset dl_load_write_lock after forking 4Subject: [PATCH 26/30] reset dl_load_write_lock after forking
5 5
6The patch in this Bugzilla entry was requested by a customer: 6The patch in this Bugzilla entry was requested by a customer:
7 7
@@ -20,10 +20,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
20 1 file changed, 2 insertions(+), 2 deletions(-) 20 1 file changed, 2 insertions(+), 2 deletions(-)
21 21
22diff --git a/sysdeps/nptl/fork.c b/sysdeps/nptl/fork.c 22diff --git a/sysdeps/nptl/fork.c b/sysdeps/nptl/fork.c
23index 846fa49ef2..f87506f398 100644 23index ec56a827eb..0f48933ff1 100644
24--- a/sysdeps/nptl/fork.c 24--- a/sysdeps/nptl/fork.c
25+++ b/sysdeps/nptl/fork.c 25+++ b/sysdeps/nptl/fork.c
26@@ -194,9 +194,9 @@ __libc_fork (void) 26@@ -130,9 +130,9 @@ __libc_fork (void)
27 _IO_list_resetlock (); 27 _IO_list_resetlock ();
28 } 28 }
29 29
@@ -33,8 +33,8 @@ index 846fa49ef2..f87506f398 100644
33- 33-
34+ __rtld_lock_initialize (GL(dl_load_write_lock)); 34+ __rtld_lock_initialize (GL(dl_load_write_lock));
35 /* Run the handlers registered for the child. */ 35 /* Run the handlers registered for the child. */
36 while (allp != NULL) 36 __run_fork_handlers (atfork_run_child);
37 { 37 }
38-- 38--
392.16.1 392.18.0
40 40
diff --git a/meta/recipes-core/glibc/glibc/0027-Acquire-ld.so-lock-before-switching-to-malloc_atfork.patch b/meta/recipes-core/glibc/glibc/0027-Acquire-ld.so-lock-before-switching-to-malloc_atfork.patch
index 9ec234bd51..1ad14b7fc3 100644
--- a/meta/recipes-core/glibc/glibc/0027-Acquire-ld.so-lock-before-switching-to-malloc_atfork.patch
+++ b/meta/recipes-core/glibc/glibc/0027-Acquire-ld.so-lock-before-switching-to-malloc_atfork.patch
@@ -1,7 +1,7 @@
1From 94225ab4bcc1613531558a632270b5edce779bc9 Mon Sep 17 00:00:00 2001 1From c3e04a90dd762cad4ee9bd7564d74e052781be5c Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 27 Jan 2018 10:08:04 -0800 3Date: Sat, 27 Jan 2018 10:08:04 -0800
4Subject: [PATCH 27/27] Acquire ld.so lock before switching to malloc_atfork 4Subject: [PATCH 27/30] Acquire ld.so lock before switching to malloc_atfork
5 5
6The patch is from 6The patch is from
7 https://sourceware.org/bugzilla/show_bug.cgi?id=4578 7 https://sourceware.org/bugzilla/show_bug.cgi?id=4578
@@ -28,11 +28,11 @@ Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
28Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> 28Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
29Signed-off-by: Khem Raj <raj.khem@gmail.com> 29Signed-off-by: Khem Raj <raj.khem@gmail.com>
30--- 30---
31 sysdeps/nptl/fork.c | 9 +++++++++ 31 sysdeps/nptl/fork.c | 7 +++++++
32 1 file changed, 9 insertions(+) 32 1 file changed, 7 insertions(+)
33 33
34diff --git a/sysdeps/nptl/fork.c b/sysdeps/nptl/fork.c 34diff --git a/sysdeps/nptl/fork.c b/sysdeps/nptl/fork.c
35index f87506f398..225e7b51f8 100644 35index 0f48933ff1..eef3f9669b 100644
36--- a/sysdeps/nptl/fork.c 36--- a/sysdeps/nptl/fork.c
37+++ b/sysdeps/nptl/fork.c 37+++ b/sysdeps/nptl/fork.c
38@@ -25,6 +25,7 @@ 38@@ -25,6 +25,7 @@
@@ -43,22 +43,20 @@ index f87506f398..225e7b51f8 100644
43 #include <stdio-lock.h> 43 #include <stdio-lock.h>
44 #include <atomic.h> 44 #include <atomic.h>
45 #include <nptl/pthreadP.h> 45 #include <nptl/pthreadP.h>
46@@ -60,6 +61,10 @@ __libc_fork (void) 46@@ -56,6 +57,9 @@ __libc_fork (void)
47 but our current fork implementation is not. */
48 bool multiple_threads = THREAD_GETMEM (THREAD_SELF, header.multiple_threads); 47 bool multiple_threads = THREAD_GETMEM (THREAD_SELF, header.multiple_threads);
49 48
49 __run_fork_handlers (atfork_run_prepare);
50+ /* grab ld.so lock BEFORE switching to malloc_atfork */ 50+ /* grab ld.so lock BEFORE switching to malloc_atfork */
51+ __rtld_lock_lock_recursive (GL(dl_load_lock)); 51+ __rtld_lock_lock_recursive (GL(dl_load_lock));
52+ __rtld_lock_lock_recursive (GL(dl_load_write_lock)); 52+ __rtld_lock_lock_recursive (GL(dl_load_write_lock));
53+
54 /* Run all the registered preparation handlers. In reverse order.
55 While doing this we build up a list of all the entries. */
56 struct fork_handler *runp;
57@@ -246,6 +251,10 @@ __libc_fork (void)
58 53
59 allp = allp->next; 54 /* If we are not running multiple threads, we do not have to
60 } 55 preserve lock state. If fork runs from a signal handler, only
61+ 56@@ -150,6 +154,9 @@ __libc_fork (void)
57
58 /* Run the handlers registered for the parent. */
59 __run_fork_handlers (atfork_run_parent);
62+ /* unlock ld.so last, because we locked it first */ 60+ /* unlock ld.so last, because we locked it first */
63+ __rtld_lock_unlock_recursive (GL(dl_load_write_lock)); 61+ __rtld_lock_unlock_recursive (GL(dl_load_write_lock));
64+ __rtld_lock_unlock_recursive (GL(dl_load_lock)); 62+ __rtld_lock_unlock_recursive (GL(dl_load_lock));
@@ -66,5 +64,5 @@ index f87506f398..225e7b51f8 100644
66 64
67 return pid; 65 return pid;
68-- 66--
692.16.1 672.18.0
70 68
diff --git a/meta/recipes-core/glibc/glibc/0028-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch b/meta/recipes-core/glibc/glibc/0028-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch
index 436c84778e..8f0b05694f 100644
--- a/meta/recipes-core/glibc/glibc/0028-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch
+++ b/meta/recipes-core/glibc/glibc/0028-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch
@@ -1,8 +1,8 @@
1From af3054b3856379d353a779801678f330e1b58c9a Mon Sep 17 00:00:00 2001 1From 55cc59b7da97b80cd26027656a252082b09aa2bb Mon Sep 17 00:00:00 2001
2Message-Id: <af3054b3856379d353a779801678f330e1b58c9a.1490183611.git.panand@redhat.com>
3From: Pratyush Anand <panand@redhat.com> 2From: Pratyush Anand <panand@redhat.com>
4Date: Wed, 22 Mar 2017 17:02:38 +0530 3Date: Wed, 22 Mar 2017 17:02:38 +0530
5Subject: [PATCH] bits/siginfo-consts.h: enum definition for TRAP_HWBKPT is missing 4Subject: [PATCH 28/30] bits/siginfo-consts.h: enum definition for TRAP_HWBKPT
5 is missing
6MIME-Version: 1.0 6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8 7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit 8Content-Transfer-Encoding: 8bit
@@ -29,7 +29,7 @@ Upstream-Status: Submitted [https://sourceware.org/bugzilla/show_bug.cgi?id=2128
29 2 files changed, 10 insertions(+), 2 deletions(-) 29 2 files changed, 10 insertions(+), 2 deletions(-)
30 30
31diff --git a/bits/siginfo-consts.h b/bits/siginfo-consts.h 31diff --git a/bits/siginfo-consts.h b/bits/siginfo-consts.h
32index a58ac4b..8448fac 100644 32index 7464c1882b..298314527a 100644
33--- a/bits/siginfo-consts.h 33--- a/bits/siginfo-consts.h
34+++ b/bits/siginfo-consts.h 34+++ b/bits/siginfo-consts.h
35@@ -106,8 +106,12 @@ enum 35@@ -106,8 +106,12 @@ enum
@@ -47,10 +47,10 @@ index a58ac4b..8448fac 100644
47 # endif 47 # endif
48 48
49diff --git a/sysdeps/unix/sysv/linux/bits/siginfo-consts.h b/sysdeps/unix/sysv/linux/bits/siginfo-consts.h 49diff --git a/sysdeps/unix/sysv/linux/bits/siginfo-consts.h b/sysdeps/unix/sysv/linux/bits/siginfo-consts.h
50index 525840c..57a9edb 100644 50index 193bd9c471..3fe852bc5f 100644
51--- a/sysdeps/unix/sysv/linux/bits/siginfo-consts.h 51--- a/sysdeps/unix/sysv/linux/bits/siginfo-consts.h
52+++ b/sysdeps/unix/sysv/linux/bits/siginfo-consts.h 52+++ b/sysdeps/unix/sysv/linux/bits/siginfo-consts.h
53@@ -137,8 +137,12 @@ enum 53@@ -141,8 +141,12 @@ enum
54 { 54 {
55 TRAP_BRKPT = 1, /* Process breakpoint. */ 55 TRAP_BRKPT = 1, /* Process breakpoint. */
56 # define TRAP_BRKPT TRAP_BRKPT 56 # define TRAP_BRKPT TRAP_BRKPT
@@ -65,5 +65,5 @@ index 525840c..57a9edb 100644
65 # endif 65 # endif
66 66
67-- 67--
682.7.4 682.18.0
69 69
diff --git a/meta/recipes-core/glibc/glibc/0029-Replace-strncpy-with-memccpy-to-fix-Wstringop-trunca.patch b/meta/recipes-core/glibc/glibc/0029-Replace-strncpy-with-memccpy-to-fix-Wstringop-trunca.patch
deleted file mode 100644
index fa29f4165b..0000000000
--- a/meta/recipes-core/glibc/glibc/0029-Replace-strncpy-with-memccpy-to-fix-Wstringop-trunca.patch
+++ /dev/null
@@ -1,40 +0,0 @@
1From 113e0516fbd3ce18253f0423762416d4c4b38fb0 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 22 Mar 2018 17:57:37 -0700
4Subject: [PATCH 29/29] Replace strncpy with memccpy to fix
5 -Wstringop-truncation.
6
7 * nis/nss_nisplus/nisplus-parser.c: Replace strncpy with memcpy to
8 avoid -Wstringop-truncation.
9---
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11Upstream-Status: Submitted [https://sourceware.org/ml/libc-alpha/2018-03/msg00531.html]
12
13 nis/nss_nisplus/nisplus-parser.c | 4 ++--
14 1 file changed, 2 insertions(+), 2 deletions(-)
15
16diff --git a/nis/nss_nisplus/nisplus-parser.c b/nis/nss_nisplus/nisplus-parser.c
17index 8dc021e73d..b53284f889 100644
18--- a/nis/nss_nisplus/nisplus-parser.c
19+++ b/nis/nss_nisplus/nisplus-parser.c
20@@ -87,7 +87,7 @@ _nss_nisplus_parse_pwent (nis_result *result, struct passwd *pw,
21 if (len >= room_left)
22 goto no_more_room;
23
24- strncpy (first_unused, numstr, len);
25+ memcpy (first_unused, numstr, len);
26 first_unused[len] = '\0';
27 numstr = first_unused;
28 }
29@@ -103,7 +103,7 @@ _nss_nisplus_parse_pwent (nis_result *result, struct passwd *pw,
30 if (len >= room_left)
31 goto no_more_room;
32
33- strncpy (first_unused, numstr, len);
34+ memcpy (first_unused, numstr, len);
35 first_unused[len] = '\0';
36 numstr = first_unused;
37 }
38--
392.16.2
40
diff --git a/meta/recipes-core/glibc/glibc/archive-path.patch b/meta/recipes-core/glibc/glibc/0029-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch
index b0d3158cfe..aa3a9e2654 100644
--- a/meta/recipes-core/glibc/glibc/archive-path.patch
+++ b/meta/recipes-core/glibc/glibc/0029-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch
@@ -1,13 +1,25 @@
1localedef --add-to-archive uses a hard-coded locale path which doesn't exist in 1From 5a6f019ded549faaf42478f6f96428dc7c20606e Mon Sep 17 00:00:00 2001
2normal use, and there's no way to pass an alternative filename. 2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 3 Aug 2018 09:42:06 -0700
4Subject: [PATCH 29/30] localedef --add-to-archive uses a hard-coded locale
5 path
3 6
4Add a fallback of $LOCALEARCHIVE from the environment, and allow creation of new locale archives that are not the system archive. 7it doesn't exist in normal use, and there's no way to pass an
8alternative filename.
9
10Add a fallback of $LOCALEARCHIVE from the environment, and allow
11creation of new locale archives that are not the system archive.
5 12
6Upstream-Status: Inappropriate (OE-specific) 13Upstream-Status: Inappropriate (OE-specific)
14
7Signed-off-by: Ross Burton <ross.burton@intel.com> 15Signed-off-by: Ross Burton <ross.burton@intel.com>
16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17---
18 locale/programs/locarchive.c | 13 ++++++++-----
19 1 file changed, 8 insertions(+), 5 deletions(-)
8 20
9diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c 21diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c
10index ca332a34..6b7ba9b2 100644 22index ca332a345f..6b7ba9b2e3 100644
11--- a/locale/programs/locarchive.c 23--- a/locale/programs/locarchive.c
12+++ b/locale/programs/locarchive.c 24+++ b/locale/programs/locarchive.c
13@@ -569,10 +569,13 @@ open_archive (struct locarhandle *ah, bool readonly) 25@@ -569,10 +569,13 @@ open_archive (struct locarhandle *ah, bool readonly)
@@ -37,3 +49,6 @@ index ca332a34..6b7ba9b2 100644
37 { 49 {
38 if (readonly) 50 if (readonly)
39 { 51 {
52--
532.18.0
54
diff --git a/meta/recipes-core/glibc/glibc/0030-plural_c_no_preprocessor_lines.patch b/meta/recipes-core/glibc/glibc/0030-intl-Emit-no-lines-in-bison-generated-files.patch
index 6f03e1c62d..f0a950aca9 100644
--- a/meta/recipes-core/glibc/glibc/0030-plural_c_no_preprocessor_lines.patch
+++ b/meta/recipes-core/glibc/glibc/0030-intl-Emit-no-lines-in-bison-generated-files.patch
@@ -1,16 +1,26 @@
1From 959f3fc8743cbb3b13c3be11ee359f139f5be8c7 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 3 Aug 2018 09:44:00 -0700
4Subject: [PATCH 30/30] intl: Emit no lines in bison generated files
5
1Improve reproducibility: 6Improve reproducibility:
2Do not put any #line preprocessor commands in bison generated files. 7Do not put any #line preprocessor commands in bison generated files.
3These lines contain absolute paths containing file locations on 8These lines contain absolute paths containing file locations on
4the host build machine. 9the host build machine.
5 10
6Upstream-Status: Pending 11Upstream-Status: Pending
12
7Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> 13Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
14Signed-off-by: Khem Raj <raj.khem@gmail.com>
15---
16 intl/Makefile | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
8 18
9diff --git a/intl/Makefile b/intl/Makefile 19diff --git a/intl/Makefile b/intl/Makefile
10index 2219717..a203780 100644 20index 672edf1b38..d31888d013 100644
11--- a/intl/Makefile 21--- a/intl/Makefile
12+++ b/intl/Makefile 22+++ b/intl/Makefile
13@@ -151,7 +151,7 @@ $(objpfx)tst-gettext6.out: $(objpfx)tst-gettext.out 23@@ -155,7 +155,7 @@ $(objpfx)tst-gettext6.out: $(objpfx)tst-gettext.out
14 24
15 CPPFLAGS += -D'LOCALEDIR="$(localedir)"' \ 25 CPPFLAGS += -D'LOCALEDIR="$(localedir)"' \
16 -D'LOCALE_ALIAS_PATH="$(localedir)"' 26 -D'LOCALE_ALIAS_PATH="$(localedir)"'
@@ -19,3 +29,6 @@ index 2219717..a203780 100644
19 29
20 $(inst_localedir)/locale.alias: locale.alias $(+force) 30 $(inst_localedir)/locale.alias: locale.alias $(+force)
21 $(do-install) 31 $(do-install)
32--
332.18.0
34
diff --git a/meta/recipes-core/glibc/glibc/0031-nativesdk-deprecate-libcrypt.patch b/meta/recipes-core/glibc/glibc/0031-nativesdk-deprecate-libcrypt.patch
deleted file mode 100644
index a9132ed3d2..0000000000
--- a/meta/recipes-core/glibc/glibc/0031-nativesdk-deprecate-libcrypt.patch
+++ /dev/null
@@ -1,419 +0,0 @@
1Background information:
2
3https://sourceware.org/ml/libc-alpha/2017-08/msg01257.html
4https://fedoraproject.org/wiki/Changes/Replace_glibc_libcrypt_with_libxcrypt
5
6Upstream-Status: Submitted [libc-alpha@sourceware.org]
7Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8
9From: Zack Weinberg <zackw@panix.com>
10Subject: [PATCH] Deprecate libcrypt and don't build it by default
11
12Back in June, Björn Esser proposed to add OpenBSD-compatible bcrypt
13support to our implementation of crypt(3), and Zack Weinberg replied
14that it might actually make more sense to _remove_ libcrypt from
15glibc, freeing up libcrypt.so.1 and crypt.h to be provided by a
16separate project that could move faster. (For instance, libxcrypt:
17https://github.com/besser82/libxcrypt)
18
19This patch disables build and installation of libcrypt by default. It
20can be re-enabled with --enable-obsolete-crypt to configure. Unlike
21libnsl, we do *not* install a runtime shared library; that's left to
22the replacement. (Unlike the SunRPC situation, I think we can
23probably drop this code altogether in a release or two.)
24
25The function prototypes for crypt and encrypt are removed from
26unistd.h, and the function prototype for setkey is removed from
27stdlib.h; they do *not* come back with --enable-obsolete-crypt. This
28means glibc no longer provides the POSIX CRYPT option, and the macro
29_XOPEN_CRYPT is also removed from unistd.h to indicate that.
30(_SC_XOPEN_CRYPT is still defined, but sysconf(_SC_XOPEN_CRYPT) will
31return -1 at runtime.) These functions are also unconditionally
32removed from conform/data/{stdlib,unistd}.h-data.
33
34 * posix/unistd.h (_XOPEN_CRYPT, crypt, encrypt): Don't declare.
35 * stdlib/stdlib.h (setkey): Don't declare.
36
37 * configure.ac (--enable-obsolete-crypt): New configure option.
38 * configure: Regenerate.
39 * config.make.in (build-obsolete-crypt): New makefile variable.
40 * crypt/Banner: Delete file.
41 * crypt/Makefile: Don't build anything unless
42 $(build-obsolete-crypt) is 'yes'.
43 * sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile: Only add things
44 to libcrypt-sysdep_routines when $(build-obsolete-crypt) is 'yes'.
45 * sysdeps/sparc/sparc64/multiarch/Makefile: Likewise.
46 * sysdeps/unix/sysv/linux/arm/Makefile: Likewise.
47
48 * conform/Makefile: Only include libcrypt.a in linknamespace tests
49 when $(build-obsolete-crypt) is 'yes'.
50 * conform/data/stdlib.h-data (setkey): Don't expect.
51 * conform/data/unistd.h-data (crypt, encrypt): Don't expect.
52 * elf/Makefile: Only perform various tests of libcrypt.so/libcrypt.a
53 when $(build-obsolete-crypt) is 'yes'.
54 * elf/tst-linkall-static.c: Don't include crypt.h when USE_CRYPT
55 is false.
56---
57 NEWS | 18 ++++++++++++++++++
58 config.make.in | 1 +
59 configure | 13 +++++++++++++
60 configure.ac | 8 ++++++++
61 conform/Makefile | 14 ++++++++++----
62 conform/data/stdlib.h-data | 3 ---
63 conform/data/unistd.h-data | 6 ------
64 crypt/Makefile | 5 +++++
65 elf/Makefile | 16 ++++++++++++----
66 elf/tst-linkall-static.c | 2 ++
67 posix/unistd.h | 16 ----------------
68 stdlib/stdlib.h | 6 ------
69 sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile | 2 ++
70 sysdeps/sparc/sparc64/multiarch/Makefile | 2 ++
71 sysdeps/unix/sysv/linux/arm/Makefile | 2 ++
72 15 files changed, 75 insertions(+), 39 deletions(-)
73
74diff --git a/config.make.in b/config.make.in
75index 9e5e24b2c6..8fe610d04d 100644
76--- a/config.make.in
77+++ b/config.make.in
78@@ -82,6 +82,7 @@ mach-interface-list = @mach_interface_list@
79
80 experimental-malloc = @experimental_malloc@
81
82+build-obsolete-crypt = @build_obsolete_crypt@
83 nss-crypt = @libc_cv_nss_crypt@
84 static-nss-crypt = @libc_cv_static_nss_crypt@
85
86diff --git a/configure b/configure
87index 7a8bd3f817..46f6bd7f86 100755
88--- a/configure
89+++ b/configure
90@@ -672,6 +672,7 @@ base_machine
91 have_tunables
92 build_pt_chown
93 build_nscd
94+build_obsolete_crypt
95 build_obsolete_nsl
96 link_obsolete_rpc
97 libc_cv_static_nss_crypt
98@@ -782,6 +783,7 @@ enable_experimental_malloc
99 enable_nss_crypt
100 enable_obsolete_rpc
101 enable_obsolete_nsl
102+enable_obsolete_crypt
103 enable_systemtap
104 enable_build_nscd
105 enable_nscd
106@@ -1453,6 +1455,7 @@ Optional Features:
107 link-time usage
108 --enable-obsolete-nsl build and install the obsolete libnsl library and
109 depending NSS modules
110+ --enable-obsolete-crypt build and install the obsolete libcrypt library
111 --enable-systemtap enable systemtap static probe points [default=no]
112 --disable-build-nscd disable building and installing the nscd daemon
113 --disable-nscd library functions will not contact the nscd daemon
114@@ -3632,6 +3635,16 @@ if test "$build_obsolete_nsl" = yes; then
115
116 fi
117
118+# Check whether --enable-obsolete-crypt was given.
119+if test "${enable_obsolete_crypt+set}" = set; then :
120+ enableval=$enable_obsolete_crypt; build_obsolete_crypt=$enableval
121+else
122+ build_obsolete_crypt=no
123+fi
124+
125+
126+
127+
128 # Check whether --enable-systemtap was given.
129 if test "${enable_systemtap+set}" = set; then :
130 enableval=$enable_systemtap; systemtap=$enableval
131diff --git a/configure.ac b/configure.ac
132index ca1282a6b3..0142353740 100644
133--- a/configure.ac
134+++ b/configure.ac
135@@ -378,6 +378,14 @@ if test "$build_obsolete_nsl" = yes; then
136 AC_DEFINE(LINK_OBSOLETE_NSL)
137 fi
138
139+AC_ARG_ENABLE([obsolete-crypt],
140+ AC_HELP_STRING([--enable-obsolete-crypt],
141+ [build and install the obsolete libcrypt library]),
142+ [build_obsolete_crypt=$enableval],
143+ [build_obsolete_crypt=no])
144+AC_SUBST(build_obsolete_crypt)
145+
146+
147 AC_ARG_ENABLE([systemtap],
148 [AS_HELP_STRING([--enable-systemtap],
149 [enable systemtap static probe points @<:@default=no@:>@])],
150diff --git a/conform/Makefile b/conform/Makefile
151index 864fdeca21..5ef474fb24 100644
152--- a/conform/Makefile
153+++ b/conform/Makefile
154@@ -193,22 +193,28 @@ linknamespace-libs-thr = $(linknamespace-libs-isoc) \
155 $(common-objpfx)rt/librt.a $(static-thread-library)
156 linknamespace-libs-posix = $(linknamespace-libs-thr) \
157 $(common-objpfx)dlfcn/libdl.a
158-linknamespace-libs-xsi = $(linknamespace-libs-posix) \
159- $(common-objpfx)crypt/libcrypt.a
160+linknamespace-libs-xsi = $(linknamespace-libs-posix)
161 linknamespace-libs-ISO = $(linknamespace-libs-isoc)
162 linknamespace-libs-ISO99 = $(linknamespace-libs-isoc)
163 linknamespace-libs-ISO11 = $(linknamespace-libs-isoc)
164-linknamespace-libs-XPG4 = $(linknamespace-libs-isoc) \
165- $(common-objpfx)crypt/libcrypt.a
166+linknamespace-libs-XPG4 = $(linknamespace-libs-isoc)
167 linknamespace-libs-XPG42 = $(linknamespace-libs-XPG4)
168 linknamespace-libs-POSIX = $(linknamespace-libs-thr)
169 linknamespace-libs-UNIX98 = $(linknamespace-libs-xsi)
170 linknamespace-libs-XOPEN2K = $(linknamespace-libs-xsi)
171 linknamespace-libs-POSIX2008 = $(linknamespace-libs-posix)
172 linknamespace-libs-XOPEN2K8 = $(linknamespace-libs-xsi)
173+
174+ifeq ($(build-obsolete-crypt),yes)
175+linknamespace-libs-xsi += $(common-objpfx)crypt/libcrypt.a
176+linknamespace-libs-XPG4 += $(common-objpfx)crypt/libcrypt.a
177+endif
178+
179 linknamespace-libs = $(foreach std,$(conformtest-standards),\
180 $(linknamespace-libs-$(std)))
181
182+
183+
184 $(linknamespace-symlist-stdlibs-tests): $(objpfx)symlist-stdlibs-%: \
185 $(linknamespace-libs)
186 LC_ALL=C $(READELF) -W -s $(linknamespace-libs-$*) > $@; \
187diff --git a/conform/data/stdlib.h-data b/conform/data/stdlib.h-data
188index d8fcccc2fb..6913828196 100644
189--- a/conform/data/stdlib.h-data
190+++ b/conform/data/stdlib.h-data
191@@ -149,9 +149,6 @@ function {unsigned short int*} seed48 (unsigned short int[3])
192 #if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
193 function int setenv (const char*, const char*, int)
194 #endif
195-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008
196-function void setkey (const char*)
197-#endif
198 #if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008
199 function {char*} setstate (char*)
200 #endif
201diff --git a/conform/data/unistd.h-data b/conform/data/unistd.h-data
202index ddf4f25132..aa070528e8 100644
203--- a/conform/data/unistd.h-data
204+++ b/conform/data/unistd.h-data
205@@ -437,9 +437,6 @@ function int chroot (const char*)
206 function int chown (const char*, uid_t, gid_t)
207 function int close (int)
208 function size_t confstr (int, char*, size_t)
209-#if !defined POSIX && !defined POSIX2008
210-function {char*} crypt (const char*, const char*)
211-#endif
212 #if defined XPG4 || defined XPG42 || defined UNIX98
213 function {char*} ctermid (char*)
214 function {char*} cuserid (char*)
215@@ -449,9 +446,6 @@ allow cuserid
216 #endif
217 function int dup (int)
218 function int dup2 (int, int)
219-#if !defined POSIX && !defined POSIX2008
220-function void encrypt (char[64], int)
221-#endif
222 function int execl (const char*, const char*, ...)
223 function int execle (const char*, const char*, ...)
224 function int execlp (const char*, const char*, ...)
225diff --git a/crypt/Makefile b/crypt/Makefile
226index 303800df73..024ec2c6ab 100644
227--- a/crypt/Makefile
228+++ b/crypt/Makefile
229@@ -22,6 +22,8 @@ subdir := crypt
230
231 include ../Makeconfig
232
233+ifeq ($(build-obsolete-crypt),yes)
234+
235 headers := crypt.h
236
237 extra-libs := libcrypt
238@@ -52,9 +54,11 @@ tests += md5test sha256test sha512test
239 # machine over a minute.
240 xtests = md5test-giant
241 endif
242+endif
243
244 include ../Rules
245
246+ifeq ($(build-obsolete-crypt),yes)
247 ifneq ($(nss-crypt),yes)
248 md5-routines := md5 $(filter md5%,$(libcrypt-sysdep_routines))
249 sha256-routines := sha256 $(filter sha256%,$(libcrypt-sysdep_routines))
250@@ -71,3 +75,4 @@ $(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.so
251 else
252 $(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.a
253 endif
254+endif
255diff --git a/elf/Makefile b/elf/Makefile
256index 2a432d8bee..366f7b80ec 100644
257--- a/elf/Makefile
258+++ b/elf/Makefile
259@@ -385,15 +385,19 @@ $(objpfx)tst-_dl_addr_inside_object: $(objpfx)dl-addr-obj.os
260 CFLAGS-tst-_dl_addr_inside_object.c += $(PIE-ccflag)
261 endif
262
263-# By default tst-linkall-static should try to use crypt routines to test
264-# static libcrypt use.
265-CFLAGS-tst-linkall-static.c += -DUSE_CRYPT=1
266+ifeq ($(build-obsolete-crypt),yes)
267+# If the libcrypt library is being built, tst-linkall-static should
268+# try to use crypt routines to test static libcrypt use.
269+CFLAGS-tst-linkall-static.c = -DUSE_CRYPT=1
270 # However, if we are using NSS crypto and we don't have a static
271 # library, then we exclude the use of crypt functions in the test.
272 # We similarly exclude libcrypt.a from the static link (see below).
273 ifeq (yesno,$(nss-crypt)$(static-nss-crypt))
274 CFLAGS-tst-linkall-static.c += -UUSE_CRYPT -DUSE_CRYPT=0
275 endif
276+else
277+CFLAGS-tst-linkall-static.c = -DUSE_CRYPT=0
278+endif
279
280 include ../Rules
281
282@@ -1113,8 +1117,10 @@ localplt-built-dso := $(addprefix $(common-objpfx),\
283 rt/librt.so \
284 dlfcn/libdl.so \
285 resolv/libresolv.so \
286- crypt/libcrypt.so \
287 )
288+ifeq ($(build-obsolete-crypt),yes)
289+localplt-built-dso += $(addprefix $(common-objpfx), crypt/libcrypt.so)
290+endif
291 ifeq ($(build-mathvec),yes)
292 localplt-built-dso += $(addprefix $(common-objpfx), mathvec/libmvec.so)
293 endif
294@@ -1395,6 +1401,7 @@ $(objpfx)tst-linkall-static: \
295 $(common-objpfx)resolv/libanl.a \
296 $(static-thread-library)
297
298+ifeq ($(build-obsolete-crypt),yes)
299 # If we are using NSS crypto and we have the ability to link statically
300 # then we include libcrypt.a, otherwise we leave out libcrypt.a and
301 # link as much as we can into the tst-linkall-static test. This assumes
302@@ -1410,6 +1417,7 @@ ifeq (no,$(nss-crypt))
303 $(objpfx)tst-linkall-static: \
304 $(common-objpfx)crypt/libcrypt.a
305 endif
306+endif
307
308 # The application depends on the DSO, and the DSO loads the plugin.
309 # The plugin also depends on the DSO. This creates the circular
310diff --git a/elf/tst-linkall-static.c b/elf/tst-linkall-static.c
311index e8df38f74e..0ffae7c723 100644
312--- a/elf/tst-linkall-static.c
313+++ b/elf/tst-linkall-static.c
314@@ -18,7 +18,9 @@
315
316 #include <math.h>
317 #include <pthread.h>
318+#if USE_CRYPT
319 #include <crypt.h>
320+#endif
321 #include <resolv.h>
322 #include <dlfcn.h>
323 #include <utmp.h>
324diff --git a/posix/unistd.h b/posix/unistd.h
325index 4d149f9945..e75ce4d4ec 100644
326--- a/posix/unistd.h
327+++ b/posix/unistd.h
328@@ -107,9 +107,6 @@ __BEGIN_DECLS
329 /* The X/Open Unix extensions are available. */
330 #define _XOPEN_UNIX 1
331
332-/* Encryption is present. */
333-#define _XOPEN_CRYPT 1
334-
335 /* The enhanced internationalization capabilities according to XPG4.2
336 are present. */
337 #define _XOPEN_ENH_I18N 1
338@@ -1118,20 +1115,7 @@ ssize_t copy_file_range (int __infd, __off64_t *__pinoff,
339 extern int fdatasync (int __fildes);
340 #endif /* Use POSIX199309 */
341
342-
343-/* XPG4.2 specifies that prototypes for the encryption functions must
344- be defined here. */
345 #ifdef __USE_XOPEN
346-/* Encrypt at most 8 characters from KEY using salt to perturb DES. */
347-extern char *crypt (const char *__key, const char *__salt)
348- __THROW __nonnull ((1, 2));
349-
350-/* Encrypt data in BLOCK in place if EDFLAG is zero; otherwise decrypt
351- block in place. */
352-extern void encrypt (char *__glibc_block, int __edflag)
353- __THROW __nonnull ((1));
354-
355-
356 /* Swab pairs bytes in the first N bytes of the area pointed to by
357 FROM and copy the result to TO. The value of TO must not be in the
358 range [FROM - N + 1, FROM - 1]. If N is odd the first byte in FROM
359diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
360index 6b1ead31e0..8e23e93557 100644
361--- a/stdlib/stdlib.h
362+++ b/stdlib/stdlib.h
363@@ -958,12 +958,6 @@ extern int getsubopt (char **__restrict __optionp,
364 #endif
365
366
367-#ifdef __USE_XOPEN
368-/* Setup DES tables according KEY. */
369-extern void setkey (const char *__key) __THROW __nonnull ((1));
370-#endif
371-
372-
373 /* X/Open pseudo terminal handling. */
374
375 #ifdef __USE_XOPEN2KXSI
376diff --git a/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile b/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile
377index a6d08f3a00..d8b8297fb0 100644
378--- a/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile
379+++ b/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile
380@@ -1,6 +1,8 @@
381 ifeq ($(subdir),crypt)
382+ifeq ($(build-obsolete-crypt),yes)
383 libcrypt-sysdep_routines += md5-crop sha256-crop sha512-crop
384 endif
385+endif
386
387 ifeq ($(subdir),locale)
388 localedef-aux += md5-crop
389diff --git a/sysdeps/sparc/sparc64/multiarch/Makefile b/sysdeps/sparc/sparc64/multiarch/Makefile
390index eaf758e7aa..0198f9886f 100644
391--- a/sysdeps/sparc/sparc64/multiarch/Makefile
392+++ b/sysdeps/sparc/sparc64/multiarch/Makefile
393@@ -1,6 +1,8 @@
394 ifeq ($(subdir),crypt)
395+ifeq ($(build-obsolete-crypt),yes)
396 libcrypt-sysdep_routines += md5-crop sha256-crop sha512-crop
397 endif
398+endif
399
400 ifeq ($(subdir),locale)
401 localedef-aux += md5-crop
402diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile
403index 4adc35de04..6cab4f3a31 100644
404--- a/sysdeps/unix/sysv/linux/arm/Makefile
405+++ b/sysdeps/unix/sysv/linux/arm/Makefile
406@@ -19,8 +19,10 @@ endif
407 # Add a syscall function to each library that needs one.
408
409 ifeq ($(subdir),crypt)
410+ifeq ($(build-obsolete-crypt),yes)
411 libcrypt-sysdep_routines += libc-do-syscall
412 endif
413+endif
414
415 ifeq ($(subdir),rt)
416 librt-sysdep_routines += libc-do-syscall
417--
4182.16.0
419
diff --git a/meta/recipes-core/glibc/glibc/CVE-2017-18269.patch b/meta/recipes-core/glibc/glibc/CVE-2017-18269.patch
deleted file mode 100644
index d873c51e60..0000000000
--- a/meta/recipes-core/glibc/glibc/CVE-2017-18269.patch
+++ /dev/null
@@ -1,178 +0,0 @@
1From cd66c0e584c6d692bc8347b5e72723d02b8a8ada Mon Sep 17 00:00:00 2001
2From: Andrew Senkevich <andrew.n.senkevich@gmail.com>
3Date: Fri, 23 Mar 2018 16:19:45 +0100
4Subject: [PATCH] Fix i386 memmove issue (bug 22644).
5
6 [BZ #22644]
7 * sysdeps/i386/i686/multiarch/memcpy-sse2-unaligned.S: Fixed
8 branch conditions.
9 * string/test-memmove.c (do_test2): New testcase.
10
11Upstream-Status: Backport
12CVE: CVE-2017-18269
13Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
14---
15 ChangeLog | 8 +++
16 string/test-memmove.c | 58 ++++++++++++++++++++++
17 .../i386/i686/multiarch/memcpy-sse2-unaligned.S | 12 ++---
18 3 files changed, 72 insertions(+), 6 deletions(-)
19
20diff --git a/ChangeLog b/ChangeLog
21index 18ed09e..afdb766 100644
22--- a/ChangeLog
23+++ b/ChangeLog
24@@ -1,3 +1,11 @@
25+2018-03-23 Andrew Senkevich <andrew.senkevich@intel.com>
26+ Max Horn <max@quendi.de>
27+
28+ [BZ #22644]
29+ * sysdeps/i386/i686/multiarch/memcpy-sse2-unaligned.S: Fixed
30+ branch conditions.
31+ * string/test-memmove.c (do_test2): New testcase.
32+
33 2018-02-22 Andrew Waterman <andrew@sifive.com>
34
35 [BZ # 22884]
36diff --git a/string/test-memmove.c b/string/test-memmove.c
37index edc7a4c..64e3651 100644
38--- a/string/test-memmove.c
39+++ b/string/test-memmove.c
40@@ -24,6 +24,7 @@
41 # define TEST_NAME "memmove"
42 #endif
43 #include "test-string.h"
44+#include <support/test-driver.h>
45
46 char *simple_memmove (char *, const char *, size_t);
47
48@@ -245,6 +246,60 @@ do_random_tests (void)
49 }
50 }
51
52+static void
53+do_test2 (void)
54+{
55+ size_t size = 0x20000000;
56+ uint32_t * large_buf;
57+
58+ large_buf = mmap ((void*) 0x70000000, size, PROT_READ | PROT_WRITE,
59+ MAP_PRIVATE | MAP_ANON, -1, 0);
60+
61+ if (large_buf == MAP_FAILED)
62+ error (EXIT_UNSUPPORTED, errno, "Large mmap failed");
63+
64+ if ((uintptr_t) large_buf > 0x80000000 - 128
65+ || 0x80000000 - (uintptr_t) large_buf > 0x20000000)
66+ {
67+ error (0, 0, "Large mmap allocated improperly");
68+ ret = EXIT_UNSUPPORTED;
69+ munmap ((void *) large_buf, size);
70+ return;
71+ }
72+
73+ size_t bytes_move = 0x80000000 - (uintptr_t) large_buf;
74+ size_t arr_size = bytes_move / sizeof (uint32_t);
75+ size_t i;
76+
77+ FOR_EACH_IMPL (impl, 0)
78+ {
79+ for (i = 0; i < arr_size; i++)
80+ large_buf[i] = (uint32_t) i;
81+
82+ uint32_t * dst = &large_buf[33];
83+
84+#ifdef TEST_BCOPY
85+ CALL (impl, (char *) large_buf, (char *) dst, bytes_move);
86+#else
87+ CALL (impl, (char *) dst, (char *) large_buf, bytes_move);
88+#endif
89+
90+ for (i = 0; i < arr_size; i++)
91+ {
92+ if (dst[i] != (uint32_t) i)
93+ {
94+ error (0, 0,
95+ "Wrong result in function %s dst \"%p\" src \"%p\" offset \"%zd\"",
96+ impl->name, dst, large_buf, i);
97+ ret = 1;
98+ break;
99+ }
100+ }
101+ }
102+
103+ munmap ((void *) large_buf, size);
104+}
105+
106 int
107 test_main (void)
108 {
109@@ -284,6 +339,9 @@ test_main (void)
110 }
111
112 do_random_tests ();
113+
114+ do_test2 ();
115+
116 return ret;
117 }
118
119diff --git a/sysdeps/i386/i686/multiarch/memcpy-sse2-unaligned.S b/sysdeps/i386/i686/multiarch/memcpy-sse2-unaligned.S
120index 9c3bbe7..9aa17de 100644
121--- a/sysdeps/i386/i686/multiarch/memcpy-sse2-unaligned.S
122+++ b/sysdeps/i386/i686/multiarch/memcpy-sse2-unaligned.S
123@@ -72,7 +72,7 @@ ENTRY (MEMCPY)
124 cmp %edx, %eax
125
126 # ifdef USE_AS_MEMMOVE
127- jg L(check_forward)
128+ ja L(check_forward)
129
130 L(mm_len_0_or_more_backward):
131 /* Now do checks for lengths. We do [0..16], [16..32], [32..64], [64..128]
132@@ -81,7 +81,7 @@ L(mm_len_0_or_more_backward):
133 jbe L(mm_len_0_16_bytes_backward)
134
135 cmpl $32, %ecx
136- jg L(mm_len_32_or_more_backward)
137+ ja L(mm_len_32_or_more_backward)
138
139 /* Copy [0..32] and return. */
140 movdqu (%eax), %xmm0
141@@ -92,7 +92,7 @@ L(mm_len_0_or_more_backward):
142
143 L(mm_len_32_or_more_backward):
144 cmpl $64, %ecx
145- jg L(mm_len_64_or_more_backward)
146+ ja L(mm_len_64_or_more_backward)
147
148 /* Copy [0..64] and return. */
149 movdqu (%eax), %xmm0
150@@ -107,7 +107,7 @@ L(mm_len_32_or_more_backward):
151
152 L(mm_len_64_or_more_backward):
153 cmpl $128, %ecx
154- jg L(mm_len_128_or_more_backward)
155+ ja L(mm_len_128_or_more_backward)
156
157 /* Copy [0..128] and return. */
158 movdqu (%eax), %xmm0
159@@ -132,7 +132,7 @@ L(mm_len_128_or_more_backward):
160 add %ecx, %eax
161 cmp %edx, %eax
162 movl SRC(%esp), %eax
163- jle L(forward)
164+ jbe L(forward)
165 PUSH (%esi)
166 PUSH (%edi)
167 PUSH (%ebx)
168@@ -269,7 +269,7 @@ L(check_forward):
169 add %edx, %ecx
170 cmp %eax, %ecx
171 movl LEN(%esp), %ecx
172- jle L(forward)
173+ jbe L(forward)
174
175 /* Now do checks for lengths. We do [0..16], [0..32], [0..64], [0..128]
176 separately. */
177--
1782.9.3
diff --git a/meta/recipes-core/glibc/glibc/CVE-2018-11236.patch b/meta/recipes-core/glibc/glibc/CVE-2018-11236.patch
deleted file mode 100644
index e2bb40b0de..0000000000
--- a/meta/recipes-core/glibc/glibc/CVE-2018-11236.patch
+++ /dev/null
@@ -1,164 +0,0 @@
1From 5460617d1567657621107d895ee2dd83bc1f88f2 Mon Sep 17 00:00:00 2001
2From: Paul Pluzhnikov <ppluzhnikov@google.com>
3Date: Tue, 8 May 2018 18:12:41 -0700
4Subject: [PATCH] Fix BZ 22786: integer addition overflow may cause stack
5 buffer overflow when realpath() input length is close to SSIZE_MAX.
6
72018-05-09 Paul Pluzhnikov <ppluzhnikov@google.com>
8
9 [BZ #22786]
10 * stdlib/canonicalize.c (__realpath): Fix overflow in path length
11 computation.
12 * stdlib/Makefile (test-bz22786): New test.
13 * stdlib/test-bz22786.c: New test.
14
15CVE: CVE-2018-11236
16Upstream-Status: Backport
17Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
18---
19 ChangeLog | 8 +++++
20 stdlib/Makefile | 2 +-
21 stdlib/canonicalize.c | 2 +-
22 stdlib/test-bz22786.c | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++
23 4 files changed, 100 insertions(+), 2 deletions(-)
24 create mode 100644 stdlib/test-bz22786.c
25
26diff --git a/ChangeLog b/ChangeLog
27--- a/ChangeLog
28+++ b/ChangeLog
29@@ -1,3 +1,11 @@
30+2018-05-09 Paul Pluzhnikov <ppluzhnikov@google.com>
31+
32+ [BZ #22786]
33+ * stdlib/canonicalize.c (__realpath): Fix overflow in path length
34+ computation.
35+ * stdlib/Makefile (test-bz22786): New test.
36+ * stdlib/test-bz22786.c: New test.
37+
38 2018-03-23 Andrew Senkevich <andrew.senkevich@intel.com>
39 Max Horn <max@quendi.de>
40
41diff --git a/stdlib/Makefile b/stdlib/Makefile
42index af1643c..1ddb1f9 100644
43--- a/stdlib/Makefile
44+++ b/stdlib/Makefile
45@@ -84,7 +84,7 @@ tests := tst-strtol tst-strtod testmb testrand testsort testdiv \
46 tst-cxa_atexit tst-on_exit test-atexit-race \
47 test-at_quick_exit-race test-cxa_atexit-race \
48 test-on_exit-race test-dlclose-exit-race \
49- tst-makecontext-align
50+ tst-makecontext-align test-bz22786
51
52 tests-internal := tst-strtod1i tst-strtod3 tst-strtod4 tst-strtod5i \
53 tst-tls-atexit tst-tls-atexit-nodelete
54diff --git a/stdlib/canonicalize.c b/stdlib/canonicalize.c
55index 4135f3f..390fb43 100644
56--- a/stdlib/canonicalize.c
57+++ b/stdlib/canonicalize.c
58@@ -181,7 +181,7 @@ __realpath (const char *name, char *resolved)
59 extra_buf = __alloca (path_max);
60
61 len = strlen (end);
62- if ((long int) (n + len) >= path_max)
63+ if (path_max - n <= len)
64 {
65 __set_errno (ENAMETOOLONG);
66 goto error;
67diff --git a/stdlib/test-bz22786.c b/stdlib/test-bz22786.c
68new file mode 100644
69index 0000000..e7837f9
70--- /dev/null
71+++ b/stdlib/test-bz22786.c
72@@ -0,0 +1,90 @@
73+/* Bug 22786: test for buffer overflow in realpath.
74+ Copyright (C) 2018 Free Software Foundation, Inc.
75+ This file is part of the GNU C Library.
76+
77+ The GNU C Library is free software; you can redistribute it and/or
78+ modify it under the terms of the GNU Lesser General Public
79+ License as published by the Free Software Foundation; either
80+ version 2.1 of the License, or (at your option) any later version.
81+
82+ The GNU C Library is distributed in the hope that it will be useful,
83+ but WITHOUT ANY WARRANTY; without even the implied warranty of
84+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
85+ Lesser General Public License for more details.
86+
87+ You should have received a copy of the GNU Lesser General Public
88+ License along with the GNU C Library; if not, see
89+ <http://www.gnu.org/licenses/>. */
90+
91+/* This file must be run from within a directory called "stdlib". */
92+
93+#include <errno.h>
94+#include <limits.h>
95+#include <stdio.h>
96+#include <stdlib.h>
97+#include <string.h>
98+#include <unistd.h>
99+#include <sys/stat.h>
100+#include <sys/types.h>
101+#include <support/test-driver.h>
102+#include <libc-diag.h>
103+
104+static int
105+do_test (void)
106+{
107+ const char dir[] = "bz22786";
108+ const char lnk[] = "bz22786/symlink";
109+
110+ rmdir (dir);
111+ if (mkdir (dir, 0755) != 0 && errno != EEXIST)
112+ {
113+ printf ("mkdir %s: %m\n", dir);
114+ return EXIT_FAILURE;
115+ }
116+ if (symlink (".", lnk) != 0 && errno != EEXIST)
117+ {
118+ printf ("symlink (%s, %s): %m\n", dir, lnk);
119+ return EXIT_FAILURE;
120+ }
121+
122+ const size_t path_len = (size_t) INT_MAX + 1;
123+
124+ DIAG_PUSH_NEEDS_COMMENT;
125+#if __GNUC_PREREQ (7, 0)
126+ /* GCC 7 warns about too-large allocations; here we need such
127+ allocation to succeed for the test to work. */
128+ DIAG_IGNORE_NEEDS_COMMENT (7, "-Walloc-size-larger-than=");
129+#endif
130+ char *path = malloc (path_len);
131+ DIAG_POP_NEEDS_COMMENT;
132+
133+ if (path == NULL)
134+ {
135+ printf ("malloc (%zu): %m\n", path_len);
136+ return EXIT_UNSUPPORTED;
137+ }
138+
139+ /* Construct very long path = "bz22786/symlink/aaaa....." */
140+ char *p = mempcpy (path, lnk, sizeof (lnk) - 1);
141+ *(p++) = '/';
142+ memset (p, 'a', path_len - (path - p) - 2);
143+ p[path_len - (path - p) - 1] = '\0';
144+
145+ /* This call crashes before the fix for bz22786 on 32-bit platforms. */
146+ p = realpath (path, NULL);
147+
148+ if (p != NULL || errno != ENAMETOOLONG)
149+ {
150+ printf ("realpath: %s (%m)", p);
151+ return EXIT_FAILURE;
152+ }
153+
154+ /* Cleanup. */
155+ unlink (lnk);
156+ rmdir (dir);
157+
158+ return 0;
159+}
160+
161+#define TEST_FUNCTION do_test
162+#include <support/test-driver.c>
163--
1642.9.3
diff --git a/meta/recipes-core/glibc/glibc/CVE-2018-11237.patch b/meta/recipes-core/glibc/glibc/CVE-2018-11237.patch
deleted file mode 100644
index 632aa565e4..0000000000
--- a/meta/recipes-core/glibc/glibc/CVE-2018-11237.patch
+++ /dev/null
@@ -1,82 +0,0 @@
1From 9aaaab7c6e4176e61c59b0a63c6ba906d875dc0e Mon Sep 17 00:00:00 2001
2From: Andreas Schwab <schwab@suse.de>
3Date: Tue, 22 May 2018 10:37:59 +0200
4Subject: [PATCH] Don't write beyond destination in
5 __mempcpy_avx512_no_vzeroupper (bug 23196)
6
7When compiled as mempcpy, the return value is the end of the destination
8buffer, thus it cannot be used to refer to the start of it.
9
102018-05-23 Andreas Schwab <schwab@suse.de>
11
12 [BZ #23196]
13 CVE-2018-11237
14 * sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S
15 (L(preloop_large)): Save initial destination pointer in %r11 and
16 use it instead of %rax after the loop.
17 * string/test-mempcpy.c (MIN_PAGE_SIZE): Define.
18
19CVE: CVE-2018-11237
20Upstream-Status: Backport
21Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
22---
23 ChangeLog | 9 +++++++++
24 string/test-mempcpy.c | 1 +
25 sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S | 5 +++--
26 3 files changed, 13 insertions(+), 2 deletions(-)
27
28diff --git a/ChangeLog b/ChangeLog
29index fa0a07c..bc09dec 100644
30--- a/ChangeLog
31+++ b/ChangeLog
32@@ -1,3 +1,12 @@
33+2018-05-23 Andreas Schwab <schwab@suse.de>
34+
35+ [BZ #23196]
36+ CVE-2018-11237
37+ * sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S
38+ (L(preloop_large)): Save initial destination pointer in %r11 and
39+ use it instead of %rax after the loop.
40+ * string/test-mempcpy.c (MIN_PAGE_SIZE): Define.
41+
42 2018-05-09 Paul Pluzhnikov <ppluzhnikov@google.com>
43
44 [BZ #22786]
45diff --git a/string/test-mempcpy.c b/string/test-mempcpy.c
46index c08fba8..d98ecdd 100644
47--- a/string/test-mempcpy.c
48+++ b/string/test-mempcpy.c
49@@ -18,6 +18,7 @@
50 <http://www.gnu.org/licenses/>. */
51
52 #define MEMCPY_RESULT(dst, len) (dst) + (len)
53+#define MIN_PAGE_SIZE 131072
54 #define TEST_MAIN
55 #define TEST_NAME "mempcpy"
56 #include "test-string.h"
57diff --git a/sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S b/sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S
58index 23c0f7a..a55cf6f 100644
59--- a/sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S
60+++ b/sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S
61@@ -335,6 +335,7 @@ L(preloop_large):
62 ja L(preloop_large_bkw)
63 vmovups (%rsi), %zmm4
64 vmovups 0x40(%rsi), %zmm5
65+ mov %rdi, %r11
66
67 /* Align destination for access with non-temporal stores in the loop. */
68 mov %rdi, %r8
69@@ -366,8 +367,8 @@ L(gobble_256bytes_nt_loop):
70 cmp $256, %rdx
71 ja L(gobble_256bytes_nt_loop)
72 sfence
73- vmovups %zmm4, (%rax)
74- vmovups %zmm5, 0x40(%rax)
75+ vmovups %zmm4, (%r11)
76+ vmovups %zmm5, 0x40(%r11)
77 jmp L(check)
78
79 L(preloop_large_bkw):
80--
812.7.4
82
diff --git a/meta/recipes-core/glibc/glibc_2.27.bb b/meta/recipes-core/glibc/glibc_2.28.bb
index b14c02cf2a..086daed04c 100644
--- a/meta/recipes-core/glibc/glibc_2.27.bb
+++ b/meta/recipes-core/glibc/glibc_2.28.bb
@@ -1,13 +1,13 @@
1require glibc.inc 1require glibc.inc
2 2
3LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \ 3LIC_FILES_CHKSUM = "file://LICENSES;md5=cfc0ed77a9f62fa62eded042ebe31d72 \
4 file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ 4 file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
5 file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \ 5 file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
6 file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c" 6 file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
7 7
8DEPENDS += "gperf-native bison-native" 8DEPENDS += "gperf-native bison-native"
9 9
10SRCREV ?= "df3ff4e49d4ee3cbbdaeb0b1cb5dc2344c08be98" 10SRCREV ?= "3c03baca37fdcb52c3881e653ca392bba7a99c2b"
11 11
12SRCBRANCH ?= "release/${PV}/master" 12SRCBRANCH ?= "release/${PV}/master"
13 13
@@ -19,22 +19,22 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
19 file://generate-supported.mk \ 19 file://generate-supported.mk \
20 \ 20 \
21 ${NATIVESDKFIXES} \ 21 ${NATIVESDKFIXES} \
22 file://0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch \ 22 file://0006-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch \
23 file://0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch \ 23 file://0007-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch \
24 file://0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch \ 24 file://0008-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch \
25 file://0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \ 25 file://0009-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
26 file://0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch \ 26 file://0010-Quote-from-bug-1443-which-explains-what-the-patch-do.patch \
27 file://0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \ 27 file://0011-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
28 file://0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \ 28 file://0012-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
29 file://0012-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch \ 29 file://0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch \
30 file://0013-Add-unused-attribute.patch \ 30 file://0014-Add-unused-attribute.patch \
31 file://0014-yes-within-the-path-sets-wrong-config-variables.patch \ 31 file://0015-yes-within-the-path-sets-wrong-config-variables.patch \
32 file://0015-timezone-re-written-tzselect-as-posix-sh.patch \ 32 file://0016-timezone-re-written-tzselect-as-posix-sh.patch \
33 file://0016-Remove-bash-dependency-for-nscd-init-script.patch \ 33 file://0017-Remove-bash-dependency-for-nscd-init-script.patch \
34 file://0017-eglibc-Cross-building-and-testing-instructions.patch \ 34 file://0018-eglibc-Cross-building-and-testing-instructions.patch \
35 file://0018-eglibc-Help-bootstrap-cross-toolchain.patch \ 35 file://0019-eglibc-Help-bootstrap-cross-toolchain.patch \
36 file://0019-eglibc-Clear-cache-lines-on-ppc8xx.patch \ 36 file://0020-eglibc-Clear-cache-lines-on-ppc8xx.patch \
37 file://0020-eglibc-Resolve-__fpscr_values-on-SH4.patch \ 37 file://0021-eglibc-Resolve-__fpscr_values-on-SH4.patch \
38 file://0022-eglibc-Forward-port-cross-locale-generation-support.patch \ 38 file://0022-eglibc-Forward-port-cross-locale-generation-support.patch \
39 file://0023-Define-DUMMY_LOCALE_T-if-not-defined.patch \ 39 file://0023-Define-DUMMY_LOCALE_T-if-not-defined.patch \
40 file://0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch \ 40 file://0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch \
@@ -42,11 +42,8 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
42 file://0026-reset-dl_load_write_lock-after-forking.patch \ 42 file://0026-reset-dl_load_write_lock-after-forking.patch \
43 file://0027-Acquire-ld.so-lock-before-switching-to-malloc_atfork.patch \ 43 file://0027-Acquire-ld.so-lock-before-switching-to-malloc_atfork.patch \
44 file://0028-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch \ 44 file://0028-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch \
45 file://0029-Replace-strncpy-with-memccpy-to-fix-Wstringop-trunca.patch \ 45 file://0029-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch \
46 file://0030-plural_c_no_preprocessor_lines.patch \ 46 file://0030-intl-Emit-no-lines-in-bison-generated-files.patch \
47 file://CVE-2017-18269.patch \
48 file://CVE-2018-11236.patch \
49 file://CVE-2018-11237.patch \
50" 47"
51 48
52NATIVESDKFIXES ?= "" 49NATIVESDKFIXES ?= ""
@@ -55,8 +52,7 @@ NATIVESDKFIXES_class-nativesdk = "\
55 file://0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch \ 52 file://0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch \
56 file://0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch \ 53 file://0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch \
57 file://0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch \ 54 file://0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch \
58 file://relocate-locales.patch \ 55 file://0005-nativesdk-glibc-Make-relocatable-install-for-locales.patch \
59 file://0031-nativesdk-deprecate-libcrypt.patch \
60" 56"
61 57
62S = "${WORKDIR}/git" 58S = "${WORKDIR}/git"