summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2015-03-18 02:05:06 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-16 17:28:09 +0100
commit6ea08396dbb628140fd3289fc9fb19df97914326 (patch)
treef79a957f71a70d8aef2f70da3fdd6d5b7c3efb30
parentb971bdb52ab709b60b42be56b5175f43c96304b1 (diff)
downloadopenembedded-core-6ea08396dbb628140fd3289fc9fb19df97914326.tar.gz
openembedded-core-6ea08396dbb628140fd3289fc9fb19df97914326.tar.bz2
openembedded-core-6ea08396dbb628140fd3289fc9fb19df97914326.zip
glibc: Upgrade 2.21 -> 2.22
- git'ify the OE patches - add_resource_h_to_wait_h.patch - dropped, we do not support that old perf anymore - mips-rld-map-check.patch - Dropped because binutils is fixed for it see https://sourceware.org/ml/binutils/2011-12/msg00112.html - initgroups_keys.patch - Folded into 0026-eglibc-Forward-port-eglibc-options-groups-support.patch Change-Id: Ib8e731b212f52b8ff12e2180babbc19970fb1ef1 Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--meta/conf/distro/include/tcmode-default.inc2
-rw-r--r--meta/recipes-core/glibc/cross-localedef-native_2.21.bb56
-rw-r--r--meta/recipes-core/glibc/cross-localedef-native_2.22.bb59
-rw-r--r--meta/recipes-core/glibc/glibc-initial_2.22.bb (renamed from meta/recipes-core/glibc/glibc-initial_2.21.bb)0
-rw-r--r--meta/recipes-core/glibc/glibc-locale_2.22.bb (renamed from meta/recipes-core/glibc/glibc-locale_2.21.bb)0
-rw-r--r--meta/recipes-core/glibc/glibc-mtrace_2.22.bb (renamed from meta/recipes-core/glibc/glibc-mtrace_2.21.bb)0
-rw-r--r--meta/recipes-core/glibc/glibc-scripts_2.22.bb (renamed from meta/recipes-core/glibc/glibc-scripts_2.21.bb)0
-rw-r--r--meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch (renamed from meta/recipes-core/glibc/glibc/ld-search-order.patch)36
-rw-r--r--meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch (renamed from meta/recipes-core/glibc/glibc/relocatable_sdk_fix_openpath.patch)21
-rw-r--r--meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch (renamed from meta/recipes-core/glibc/glibc/relocatable_sdk.patch)126
-rw-r--r--meta/recipes-core/glibc/glibc/0004-Backport-https-sourceware.org-ml-libc-ports-2007-12-.patch34
-rw-r--r--meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch (renamed from meta/recipes-core/glibc/glibc/glibc.fix_sqrt2.patch)222
-rw-r--r--meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch33
-rw-r--r--meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch208
-rw-r--r--meta/recipes-core/glibc/glibc/0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch (renamed from meta/recipes-core/glibc/glibc/ppc_slow_ieee754_sqrt.patch)270
-rw-r--r--meta/recipes-core/glibc/glibc/0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch (renamed from meta/recipes-core/glibc/glibc/0001-R_ARM_TLS_DTPOFF32.patch)34
-rw-r--r--meta/recipes-core/glibc/glibc/0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch (renamed from meta/recipes-core/glibc/glibc/0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch)19
-rw-r--r--meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch61
-rw-r--r--meta/recipes-core/glibc/glibc/0012-Make-ld-version-output-matching-grok-gold-s-output.patch (renamed from meta/recipes-core/glibc/glibc/grok_gold.patch)34
-rw-r--r--meta/recipes-core/glibc/glibc/0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch42
-rw-r--r--meta/recipes-core/glibc/glibc/0014-Add-unused-attribute.patch (renamed from meta/recipes-core/glibc/glibc/0001-Add-unused-attribute.patch)14
-rw-r--r--meta/recipes-core/glibc/glibc/0015-When-disabling-SSE-also-make-sure-that-fpmath-is-not.patch (renamed from meta/recipes-core/glibc/glibc/0001-When-disabling-SSE-also-make-sure-that-fpmath-is-not.patch)6
-rw-r--r--meta/recipes-core/glibc/glibc/0016-yes-within-the-path-sets-wrong-config-variables.patch (renamed from meta/recipes-core/glibc/glibc/0001-yes-within-the-path-sets-wrong-config-variables.patch)30
-rw-r--r--meta/recipes-core/glibc/glibc/0017-timezone-re-written-tzselect-as-posix-sh.patch (renamed from meta/recipes-core/glibc/glibc/timezone-re-written-tzselect-as-posix-sh.patch)31
-rw-r--r--meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch (renamed from meta/recipes-core/glibc/glibc/eglibc.patch)143
-rw-r--r--meta/recipes-core/glibc/glibc/0019-eglibc-Bring-Eglibc-option-group-infrastructure-to-g.patch (renamed from meta/recipes-core/glibc/glibc/option-groups.patch)607
-rw-r--r--meta/recipes-core/glibc/glibc/0020-eglibc-Help-bootstrap-cross-toolchain.patch (renamed from meta/recipes-core/glibc/glibc/eglibc-header-bootstrap.patch)67
-rw-r--r--meta/recipes-core/glibc/glibc/0021-eglibc-cherry-picked-from-http-www.eglibc.org-archiv.patch (renamed from meta/recipes-core/glibc/glibc/eglibc-resolv-dynamic.patch)30
-rw-r--r--meta/recipes-core/glibc/glibc/0022-eglibc-Clear-cache-lines-on-ppc8xx.patch (renamed from meta/recipes-core/glibc/glibc/eglibc-ppc8xx-cache-line-workaround.patch)33
-rw-r--r--meta/recipes-core/glibc/glibc/0023-eglibc-Resolve-__fpscr_values-on-SH4.patch (renamed from meta/recipes-core/glibc/glibc/eglibc-sh4-fpscr_values.patch)48
-rw-r--r--meta/recipes-core/glibc/glibc/0024-eglibc-Forward-port-eglibc-options-groups-support.patch (renamed from meta/recipes-core/glibc/glibc/eglibc-use-option-groups.patch)4811
-rw-r--r--meta/recipes-core/glibc/glibc/0025-eglibc-Install-PIC-archives.patch (renamed from meta/recipes-core/glibc/glibc/eglibc-install-pic-archives.patch)44
-rw-r--r--meta/recipes-core/glibc/glibc/0026-eglibc-dl_debug_mask-is-controlled-by-__OPTION_EGLIB.patch (renamed from meta/recipes-core/glibc/glibc/GLRO_dl_debug_mask.patch)647
-rw-r--r--meta/recipes-core/glibc/glibc/0027-eglibc-use-option-groups-Conditionally-exclude-c-tes.patch145
-rw-r--r--meta/recipes-core/glibc/glibc/CVE-2015-1781-resolv-nss_dns-dns-host.c-buffer-overf.patch43
-rw-r--r--meta/recipes-core/glibc/glibc/Fix-__memcpy_chk-on-non-SSE2-CPUs.patch36
-rw-r--r--meta/recipes-core/glibc/glibc/IO-acquire-lock-fix.patch17
-rw-r--r--meta/recipes-core/glibc/glibc/add_resource_h_to_wait_h.patch20
-rw-r--r--meta/recipes-core/glibc/glibc/elf-Makefile-fix-a-typo.patch36
-rw-r--r--meta/recipes-core/glibc/glibc/fix-tibetian-locales.patch38
-rw-r--r--meta/recipes-core/glibc/glibc/fix_am_rootsbindir.patch29
-rw-r--r--meta/recipes-core/glibc/glibc/initgroups_keys.patch20
-rw-r--r--meta/recipes-core/glibc/glibc/makesyscall.patch51
-rw-r--r--meta/recipes-core/glibc/glibc/mips-rld-map-check.patch27
-rw-r--r--meta/recipes-core/glibc/glibc/multilib_readlib.patch19
-rw-r--r--meta/recipes-core/glibc/glibc/ppc-sqrt_finite.patch184
-rw-r--r--meta/recipes-core/glibc/glibc/ppce6500-32b_slow_ieee754_sqrt.patch47
-rw-r--r--meta/recipes-core/glibc/glibc_2.22.bb (renamed from meta/recipes-core/glibc/glibc_2.21.bb)93
48 files changed, 4482 insertions, 4091 deletions
diff --git a/meta/conf/distro/include/tcmode-default.inc b/meta/conf/distro/include/tcmode-default.inc
index c08fe24f9a..fabd347a16 100644
--- a/meta/conf/distro/include/tcmode-default.inc
+++ b/meta/conf/distro/include/tcmode-default.inc
@@ -26,7 +26,7 @@ GCCVERSION ?= "4.9%"
SDKGCCVERSION ?= "${GCCVERSION}"
BINUVERSION ?= "2.25%"
GDBVERSION ?= "7.9%"
-GLIBCVERSION ?= "2.21"
+GLIBCVERSION ?= "2.22"
UCLIBCVERSION ?= "0.9.33+git%"
LINUXLIBCVERSION ?= "4.1"
diff --git a/meta/recipes-core/glibc/cross-localedef-native_2.21.bb b/meta/recipes-core/glibc/cross-localedef-native_2.21.bb
deleted file mode 100644
index 4e15f02140..0000000000
--- a/meta/recipes-core/glibc/cross-localedef-native_2.21.bb
+++ /dev/null
@@ -1,56 +0,0 @@
-SUMMARY = "Cross locale generation tool for glibc"
-HOMEPAGE = "http://www.gnu.org/software/libc/libc.html"
-SECTION = "libs"
-LICENSE = "LGPL-2.1"
-
-LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
- file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
- file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
-
-
-inherit native
-inherit autotools
-
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/glibc:"
-
-BRANCH = "release/${PV}/master"
-
-SRC_URI = "git://sourceware.org/git/glibc.git;branch=${BRANCH};name=glibc \
- git://github.com/kraj/localedef;branch=master;name=localedef;destsuffix=git/localedef \
- file://fix_for_centos_5.8.patch \
- ${EGLIBCPATCHES} \
- "
-EGLIBCPATCHES = "\
- file://timezone-re-written-tzselect-as-posix-sh.patch \
- file://eglibc.patch \
- file://option-groups.patch \
- file://GLRO_dl_debug_mask.patch \
- file://eglibc-header-bootstrap.patch \
- file://eglibc-resolv-dynamic.patch \
- file://eglibc-ppc8xx-cache-line-workaround.patch \
- file://eglibc-sh4-fpscr_values.patch \
- file://eglibc-use-option-groups.patch \
- "
-
-SRCREV_glibc = "4e42b5b8f89f0e288e68be7ad70f9525aebc2cff"
-SRCREV_localedef = "c833367348d39dad7ba018990bfdaffaec8e9ed3"
-
-# Makes for a rather long rev (22 characters), but...
-#
-SRCREV_FORMAT = "glibc_localedef"
-
-S = "${WORKDIR}/git"
-
-EXTRA_OECONF = "--with-glibc=${S}"
-CFLAGS += "-fgnu89-inline -std=gnu99 -DIS_IN\(x\)='0'"
-
-do_configure () {
- ${S}/localedef/configure ${EXTRA_OECONF}
-}
-
-
-do_install() {
- install -d ${D}${bindir}
- install -m 0755 ${B}/localedef ${D}${bindir}/cross-localedef
-}
diff --git a/meta/recipes-core/glibc/cross-localedef-native_2.22.bb b/meta/recipes-core/glibc/cross-localedef-native_2.22.bb
new file mode 100644
index 0000000000..2153ece0e2
--- /dev/null
+++ b/meta/recipes-core/glibc/cross-localedef-native_2.22.bb
@@ -0,0 +1,59 @@
+SUMMARY = "Cross locale generation tool for glibc"
+HOMEPAGE = "http://www.gnu.org/software/libc/libc.html"
+SECTION = "libs"
+LICENSE = "LGPL-2.1"
+
+LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
+ file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
+ file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
+
+
+inherit native
+inherit autotools
+
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/glibc:"
+
+BRANCH ?= "release/${PV}/master"
+GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
+
+SRC_URI = "${GLIBC_GIT_URI};branch=${BRANCH};name=glibc \
+ git://github.com/kraj/localedef;branch=master;name=localedef;destsuffix=git/localedef \
+ file://fix_for_centos_5.8.patch \
+ ${EGLIBCPATCHES} \
+"
+EGLIBCPATCHES = "\
+ file://0017-timezone-re-written-tzselect-as-posix-sh.patch \
+ file://0018-eglibc-Cross-building-and-testing-instructions.patch \
+ file://0019-eglibc-Bring-Eglibc-option-group-infrastructure-to-g.patch \
+ file://0020-eglibc-Help-bootstrap-cross-toolchain.patch \
+ file://0021-eglibc-cherry-picked-from-http-www.eglibc.org-archiv.patch \
+ file://0022-eglibc-Clear-cache-lines-on-ppc8xx.patch \
+ file://0023-eglibc-Resolve-__fpscr_values-on-SH4.patch \
+ file://0024-eglibc-Forward-port-eglibc-options-groups-support.patch \
+ file://0025-eglibc-Install-PIC-archives.patch \
+ file://0026-eglibc-dl_debug_mask-is-controlled-by-__OPTION_EGLIB.patch \
+ file://0027-eglibc-use-option-groups-Conditionally-exclude-c-tes.patch \
+"
+
+SRCREV_glibc ?= "a34d1c6afc86521d6ad17662a3b5362d8481514c"
+SRCREV_localedef ?= "c833367348d39dad7ba018990bfdaffaec8e9ed3"
+
+# Makes for a rather long rev (22 characters), but...
+#
+SRCREV_FORMAT = "glibc_localedef"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OECONF = "--with-glibc=${S}"
+CFLAGS += "-fgnu89-inline -std=gnu99 -DIS_IN\(x\)='0'"
+
+do_configure () {
+ ${S}/localedef/configure ${EXTRA_OECONF}
+}
+
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 ${B}/localedef ${D}${bindir}/cross-localedef
+}
diff --git a/meta/recipes-core/glibc/glibc-initial_2.21.bb b/meta/recipes-core/glibc/glibc-initial_2.22.bb
index 8ab01dc79d..8ab01dc79d 100644
--- a/meta/recipes-core/glibc/glibc-initial_2.21.bb
+++ b/meta/recipes-core/glibc/glibc-initial_2.22.bb
diff --git a/meta/recipes-core/glibc/glibc-locale_2.21.bb b/meta/recipes-core/glibc/glibc-locale_2.22.bb
index f7702e0358..f7702e0358 100644
--- a/meta/recipes-core/glibc/glibc-locale_2.21.bb
+++ b/meta/recipes-core/glibc/glibc-locale_2.22.bb
diff --git a/meta/recipes-core/glibc/glibc-mtrace_2.21.bb b/meta/recipes-core/glibc/glibc-mtrace_2.22.bb
index 0b69bad46a..0b69bad46a 100644
--- a/meta/recipes-core/glibc/glibc-mtrace_2.21.bb
+++ b/meta/recipes-core/glibc/glibc-mtrace_2.22.bb
diff --git a/meta/recipes-core/glibc/glibc-scripts_2.21.bb b/meta/recipes-core/glibc/glibc-scripts_2.22.bb
index 5a89bd8022..5a89bd8022 100644
--- a/meta/recipes-core/glibc/glibc-scripts_2.21.bb
+++ b/meta/recipes-core/glibc/glibc-scripts_2.22.bb
diff --git a/meta/recipes-core/glibc/glibc/ld-search-order.patch b/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch
index f518bc7642..3d66348133 100644
--- a/meta/recipes-core/glibc/glibc/ld-search-order.patch
+++ b/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch
@@ -1,3 +1,9 @@
+From 0876fea1b5b26da84f298714a2e23ba696607dba Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 18 Mar 2015 01:48:24 +0000
+Subject: [PATCH 01/27] nativesdk-glibc: Look for host system ld.so.cache as
+ well
+
Upstream-Status: Inappropriate [embedded specific]
The default lib search path order is:
@@ -7,23 +13,28 @@ The default lib search path order is:
3) ld.so.cache
4) default search paths embedded in the linker
-For nativesdk binaries which are being used alongside binaries on a host system, we
+For nativesdk binaries which are being used alongside binaries on a host system, we
need the search paths to firstly search the shipped nativesdk libs but then also
cover the host system. For example we want the host system's libGL and this may be
-in a non-standard location like /usr/lib/mesa. The only place the location is know
+in a non-standard location like /usr/lib/mesa. The only place the location is know
about is in the ld.so.cache of the host system.
-Since nativesdk has a simple structure and doesn't need to use a cache itself, we
-repurpose the cache for use as a last resort in finding host system binaries. This
+Since nativesdk has a simple structure and doesn't need to use a cache itself, we
+repurpose the cache for use as a last resort in finding host system binaries. This
means we need to switch the order of 3 and 4 above to make this work effectively.
RP 14/10/2010
-Index: git/elf/dl-load.c
-===================================================================
---- git.orig/elf/dl-load.c 2014-08-28 17:32:46.292070587 -0700
-+++ git/elf/dl-load.c 2014-08-28 17:33:56.048070587 -0700
-@@ -2050,7 +2050,14 @@
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ elf/dl-load.c | 17 ++++++++---------
+ 1 file changed, 8 insertions(+), 9 deletions(-)
+
+diff --git a/elf/dl-load.c b/elf/dl-load.c
+index 0c052e4..f45085a 100644
+--- a/elf/dl-load.c
++++ b/elf/dl-load.c
+@@ -2040,7 +2040,14 @@ _dl_map_object (struct link_map *loader, const char *name,
fd = open_path (name, namelen, mode,
&loader->l_runpath_dirs, &realname, &fb, loader,
LA_SER_RUNPATH, &found_other_class);
@@ -39,7 +50,7 @@ Index: git/elf/dl-load.c
#ifdef USE_LDCONFIG
if (fd == -1
&& (__glibc_likely ((mode & __RTLD_SECURE) == 0)
-@@ -2113,14 +2120,6 @@
+@@ -2099,14 +2106,6 @@ _dl_map_object (struct link_map *loader, const char *name,
}
#endif
@@ -52,5 +63,8 @@ Index: git/elf/dl-load.c
- &realname, &fb, l, LA_SER_DEFAULT, &found_other_class);
-
/* Add another newline when we are tracing the library loading. */
- if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS))
+ if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
_dl_debug_printf ("\n");
+--
+2.1.4
+
diff --git a/meta/recipes-core/glibc/glibc/relocatable_sdk_fix_openpath.patch b/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch
index f164f8f9ae..b568fc6bdc 100644
--- a/meta/recipes-core/glibc/glibc/relocatable_sdk_fix_openpath.patch
+++ b/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch
@@ -1,6 +1,8 @@
-Upstream-Status: Inappropriate [SDK specific]
-
-eglibc-nativesdk: Fix buffer overrun with a relocated SDK
+From 086b65d9aacffc47fcd8df68818a476a5ae76fa1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 18 Mar 2015 01:50:00 +0000
+Subject: [PATCH 02/27] nativesdk-glibc: Fix buffer overrun with a relocated
+ SDK
When ld-linux-*.so.2 is relocated to a path that is longer than the
original fixed location, the dynamic loader will crash in open_path
@@ -11,15 +13,19 @@ The allocated buffer will not be large enough to contain the directory
path string which is larger than the fixed location provided at build
time.
-Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
+Upstream-Status: Inappropriate [OE SDK specific]
+Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
- elf/dl-load.c | 12 ++++++++++++
+ elf/dl-load.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
+diff --git a/elf/dl-load.c b/elf/dl-load.c
+index f45085a..f1eb5ed 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
-@@ -1919,7 +1919,19 @@ open_path (const char *name, size_t name
+@@ -1765,7 +1765,19 @@ open_path (const char *name, size_t namelen, int mode,
given on the command line when rtld is run directly. */
return -1;
@@ -39,3 +45,6 @@ Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
do
{
struct r_search_path_elem *this_dir = *dirs;
+--
+2.1.4
+
diff --git a/meta/recipes-core/glibc/glibc/relocatable_sdk.patch b/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch
index ca5f17ba58..a681a64e85 100644
--- a/meta/recipes-core/glibc/glibc/relocatable_sdk.patch
+++ b/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch
@@ -1,4 +1,8 @@
-Upstream-Status: Inappropriate [SDK specific]
+From fd595a5ec885bcb4c14417daa21c2e61c5b72e42 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 18 Mar 2015 01:51:38 +0000
+Subject: [PATCH 03/27] nativesdk-glibc: Raise the size of arrays containing dl
+ paths
This patch puts the dynamic loader path in the binaries, SYSTEM_DIRS strings
and lengths as well as ld.so.cache path in the dynamic loader to specific
@@ -7,24 +11,39 @@ byte section, which is the maximum path length in linux. This will allow the
relocating script to parse the ELF binary, detect the section and easily replace
the strings in a certain path.
+Upstream-Status: Inappropriate [SDK specific]
+
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ elf/dl-cache.c | 4 ++++
+ elf/dl-load.c | 4 ++--
+ elf/interp.c | 2 +-
+ elf/ldconfig.c | 3 +++
+ elf/rtld.c | 5 +++--
+ sysdeps/generic/dl-cache.h | 4 ----
+ 6 files changed, 13 insertions(+), 9 deletions(-)
-Index: libc/elf/interp.c
-===================================================================
---- libc.orig/elf/interp.c
-+++ libc/elf/interp.c
-@@ -16,5 +16,5 @@
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
+diff --git a/elf/dl-cache.c b/elf/dl-cache.c
+index dec49bc..862f1d8 100644
+--- a/elf/dl-cache.c
++++ b/elf/dl-cache.c
+@@ -132,6 +132,10 @@ do \
+ while (0)
--const char __invoke_dynamic_linker__[] __attribute__ ((section (".interp")))
-+const char __invoke_dynamic_linker__[4096] __attribute__ ((section (".interp")))
- = RUNTIME_LINKER;
-Index: libc/elf/dl-load.c
-===================================================================
---- libc.orig/elf/dl-load.c
-+++ libc/elf/dl-load.c
-@@ -144,8 +144,8 @@ static size_t max_capstrlen attribute_re
+
++const char LD_SO_CACHE[4096] __attribute__ ((section (".ldsocache"))) =
++ SYSCONFDIR "/ld.so.cache";
++
++
+ int
+ internal_function
+ _dl_cache_libcmp (const char *p1, const char *p2)
+diff --git a/elf/dl-load.c b/elf/dl-load.c
+index f1eb5ed..f664f50 100644
+--- a/elf/dl-load.c
++++ b/elf/dl-load.c
+@@ -104,8 +104,8 @@ static size_t max_capstrlen attribute_relro;
/* Get the generated information about the trusted directories. */
#include "trusted-dirs.h"
@@ -35,26 +54,22 @@ Index: libc/elf/dl-load.c
{
SYSTEM_DIRS_LEN
};
-Index: libc/elf/dl-cache.c
-===================================================================
---- libc.orig/elf/dl-cache.c
-+++ libc/elf/dl-cache.c
-@@ -133,6 +133,10 @@ do \
- while (0)
+diff --git a/elf/interp.c b/elf/interp.c
+index 422ea95e..6d61a36 100644
+--- a/elf/interp.c
++++ b/elf/interp.c
+@@ -18,5 +18,5 @@
+ #include <runtime-linker.h>
-+const char LD_SO_CACHE[4096] __attribute__ ((section (".ldsocache"))) =
-+ SYSCONFDIR "/ld.so.cache";
-+
-+
- int
- internal_function
- _dl_cache_libcmp (const char *p1, const char *p2)
-Index: libc/elf/ldconfig.c
-===================================================================
---- libc.orig/elf/ldconfig.c
-+++ libc/elf/ldconfig.c
-@@ -166,6 +166,9 @@ static struct argp argp =
+-const char __invoke_dynamic_linker__[] __attribute__ ((section (".interp")))
++const char __invoke_dynamic_linker__[4096] __attribute__ ((section (".interp")))
+ = RUNTIME_LINKER;
+diff --git a/elf/ldconfig.c b/elf/ldconfig.c
+index f54ec22..0e78a83 100644
+--- a/elf/ldconfig.c
++++ b/elf/ldconfig.c
+@@ -167,6 +167,9 @@ static struct argp argp =
options, parse_opt, NULL, doc, NULL, more_help, NULL
};
@@ -64,25 +79,10 @@ Index: libc/elf/ldconfig.c
/* Check if string corresponds to an important hardware capability or
a platform. */
static int
-Index: libc/sysdeps/generic/dl-cache.h
-===================================================================
---- libc.orig/sysdeps/generic/dl-cache.h
-+++ libc/sysdeps/generic/dl-cache.h
-@@ -27,10 +27,6 @@
- ((flags) == 1 || (flags) == _DL_CACHE_DEFAULT_ID)
- #endif
-
--#ifndef LD_SO_CACHE
--# define LD_SO_CACHE SYSCONFDIR "/ld.so.cache"
--#endif
--
- #ifndef add_system_dir
- # define add_system_dir(dir) add_dir (dir)
- #endif
-Index: libc/elf/rtld.c
-===================================================================
---- libc.orig/elf/rtld.c
-+++ libc/elf/rtld.c
+diff --git a/elf/rtld.c b/elf/rtld.c
+index 69873c2..6d3add7 100644
+--- a/elf/rtld.c
++++ b/elf/rtld.c
@@ -99,6 +99,7 @@ uintptr_t __pointer_chk_guard_local
strong_alias (__pointer_chk_guard_local, __pointer_chk_guard)
#endif
@@ -91,7 +91,7 @@ Index: libc/elf/rtld.c
/* List of auditing DSOs. */
static struct audit_list
-@@ -1031,12 +1032,12 @@ of this helper program; chances are you
+@@ -877,12 +878,12 @@ of this helper program; chances are you did not intend to run this program.\n\
--list list all dependencies and how they are resolved\n\
--verify verify that given object really is a dynamically linked\n\
object we can handle\n\
@@ -106,3 +106,21 @@ Index: libc/elf/rtld.c
++_dl_skip_args;
--_dl_argc;
+diff --git a/sysdeps/generic/dl-cache.h b/sysdeps/generic/dl-cache.h
+index 4b49869..1800d03 100644
+--- a/sysdeps/generic/dl-cache.h
++++ b/sysdeps/generic/dl-cache.h
+@@ -27,10 +27,6 @@
+ ((flags) == 1 || (flags) == _DL_CACHE_DEFAULT_ID)
+ #endif
+
+-#ifndef LD_SO_CACHE
+-# define LD_SO_CACHE SYSCONFDIR "/ld.so.cache"
+-#endif
+-
+ #ifndef add_system_dir
+ # define add_system_dir(dir) add_dir (dir)
+ #endif
+--
+2.1.4
+
diff --git a/meta/recipes-core/glibc/glibc/0004-Backport-https-sourceware.org-ml-libc-ports-2007-12-.patch b/meta/recipes-core/glibc/glibc/0004-Backport-https-sourceware.org-ml-libc-ports-2007-12-.patch
new file mode 100644
index 0000000000..748750304f
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0004-Backport-https-sourceware.org-ml-libc-ports-2007-12-.patch
@@ -0,0 +1,34 @@
+From 2560b564b5674bf2990e5607f6342c1647a5dc4f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 8 Mar 2015 04:01:01 +0000
+Subject: [PATCH 04/27] Backport
+ https://sourceware.org/ml/libc-ports/2007-12/msg00000.html
+
+Upstream-Status: Pending
+
+2007-12-03 Kristian Van Der Vliet <vanders@liqwyd.com>
+
+ * bits/stdio-lock.h (_IO_acquire_lock_clear_flags2): Define
+
+Signed-off-by: Kristian Van Der Vliet <vanders@liqwyd.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ bits/stdio-lock.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/bits/stdio-lock.h b/bits/stdio-lock.h
+index 0c5bb65..66304a6 100644
+--- a/bits/stdio-lock.h
++++ b/bits/stdio-lock.h
+@@ -49,6 +49,8 @@ __libc_lock_define_recursive (typedef, _IO_lock_t)
+ _IO_cleanup_region_start ((void (*) (void *)) _IO_funlockfile, (_fp)); \
+ _IO_flockfile (_fp)
+