From 5a58883258206893d15990953c8691b05473eecb Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 14 Apr 2017 18:23:20 -0700 Subject: glibc: Upgrade to 2.25.90 Eventually it will be released as 2.26 final Signed-off-by: Khem Raj --- .../glibc/cross-localedef-native_2.25.90.bb | 52 ++ .../glibc/cross-localedef-native_2.25.bb | 52 -- meta/recipes-core/glibc/glibc-initial_2.25.90.bb | 9 + meta/recipes-core/glibc/glibc-initial_2.25.bb | 9 - meta/recipes-core/glibc/glibc-locale_2.25.90.bb | 1 + meta/recipes-core/glibc/glibc-locale_2.25.bb | 1 - meta/recipes-core/glibc/glibc-mtrace_2.25.90.bb | 1 + meta/recipes-core/glibc/glibc-mtrace_2.25.bb | 1 - meta/recipes-core/glibc/glibc-scripts_2.25.90.bb | 1 + meta/recipes-core/glibc/glibc-scripts_2.25.bb | 1 - ...libc-Look-for-host-system-ld.so.cache-as-.patch | 8 +- ...libc-Fix-buffer-overrun-with-a-relocated-.patch | 8 +- ...libc-Raise-the-size-of-arrays-containing-.patch | 36 +- ...ivesdk-glibc-Allow-64-bit-atomics-for-x86.patch | 13 +- ...500-e5500-e6500-603e-fsqrt-implementation.patch | 44 +- ...-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch | 8 +- ...-Fix-undefined-reference-to-__sqrt_finite.patch | 30 +- ...qrt-f-are-now-inline-functions-and-call-o.patch | 30 +- ...bug-1443-which-explains-what-the-patch-do.patch | 10 +- ...n-libm-err-tab.pl-with-specific-dirs-in-S.patch | 8 +- ...qrt-f-are-now-inline-functions-and-call-o.patch | 10 +- ...ersion-output-matching-grok-gold-s-output.patch | 44 -- ...-configure.ac-handle-correctly-libc_cv_ro.patch | 42 ++ .../glibc/glibc/0013-Add-unused-attribute.patch | 34 ++ ...-configure.ac-handle-correctly-libc_cv_ro.patch | 42 -- .../glibc/glibc/0014-Add-unused-attribute.patch | 34 -- ...thin-the-path-sets-wrong-config-variables.patch | 263 +++++++++ ...-timezone-re-written-tzselect-as-posix-sh.patch | 45 ++ ...thin-the-path-sets-wrong-config-variables.patch | 263 --------- ...move-bash-dependency-for-nscd-init-script.patch | 75 +++ ...-timezone-re-written-tzselect-as-posix-sh.patch | 45 -- ...move-bash-dependency-for-nscd-init-script.patch | 74 --- ...c-Cross-building-and-testing-instructions.patch | 619 +++++++++++++++++++++ ...c-Cross-building-and-testing-instructions.patch | 619 --------------------- ...018-eglibc-Help-bootstrap-cross-toolchain.patch | 100 ++++ .../0019-eglibc-Clear-cache-lines-on-ppc8xx.patch | 83 +++ ...019-eglibc-Help-bootstrap-cross-toolchain.patch | 100 ---- ...0020-eglibc-Resolve-__fpscr_values-on-SH4.patch | 56 ++ .../glibc/0020-eglibc-cherry-picked-from.patch | 64 --- .../0021-eglibc-Clear-cache-lines-on-ppc8xx.patch | 83 --- .../glibc/0021-eglibc-Install-PIC-archives.patch | 123 ++++ ...ward-port-cross-locale-generation-support.patch | 566 +++++++++++++++++++ ...0022-eglibc-Resolve-__fpscr_values-on-SH4.patch | 56 -- ...0023-Define-DUMMY_LOCALE_T-if-not-defined.patch | 32 ++ .../glibc/0023-eglibc-Install-PIC-archives.patch | 123 ---- ...ward-port-cross-locale-generation-support.patch | 566 ------------------- ....c-Make-_dl_build_local_scope-breadth-fir.patch | 56 ++ ...0025-Define-DUMMY_LOCALE_T-if-not-defined.patch | 32 -- ...-locale-fix-hard-coded-reference-to-gcc-E.patch | 38 ++ ....c-Make-_dl_build_local_scope-breadth-fir.patch | 56 -- ...-locale-fix-hard-coded-reference-to-gcc-E.patch | 38 -- meta/recipes-core/glibc/glibc_2.25.90.bb | 142 +++++ meta/recipes-core/glibc/glibc_2.25.bb | 143 ----- 53 files changed, 2441 insertions(+), 2548 deletions(-) create mode 100644 meta/recipes-core/glibc/cross-localedef-native_2.25.90.bb delete mode 100644 meta/recipes-core/glibc/cross-localedef-native_2.25.bb create mode 100644 meta/recipes-core/glibc/glibc-initial_2.25.90.bb delete mode 100644 meta/recipes-core/glibc/glibc-initial_2.25.bb create mode 100644 meta/recipes-core/glibc/glibc-locale_2.25.90.bb delete mode 100644 meta/recipes-core/glibc/glibc-locale_2.25.bb create mode 100644 meta/recipes-core/glibc/glibc-mtrace_2.25.90.bb delete mode 100644 meta/recipes-core/glibc/glibc-mtrace_2.25.bb create mode 100644 meta/recipes-core/glibc/glibc-scripts_2.25.90.bb delete mode 100644 meta/recipes-core/glibc/glibc-scripts_2.25.bb delete mode 100644 meta/recipes-core/glibc/glibc/0012-Make-ld-version-output-matching-grok-gold-s-output.patch create mode 100644 meta/recipes-core/glibc/glibc/0012-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch create mode 100644 meta/recipes-core/glibc/glibc/0013-Add-unused-attribute.patch delete mode 100644 meta/recipes-core/glibc/glibc/0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch delete mode 100644 meta/recipes-core/glibc/glibc/0014-Add-unused-attribute.patch create mode 100644 meta/recipes-core/glibc/glibc/0014-yes-within-the-path-sets-wrong-config-variables.patch create mode 100644 meta/recipes-core/glibc/glibc/0015-timezone-re-written-tzselect-as-posix-sh.patch delete mode 100644 meta/recipes-core/glibc/glibc/0015-yes-within-the-path-sets-wrong-config-variables.patch create mode 100644 meta/recipes-core/glibc/glibc/0016-Remove-bash-dependency-for-nscd-init-script.patch delete mode 100644 meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch delete mode 100644 meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch create mode 100644 meta/recipes-core/glibc/glibc/0017-eglibc-Cross-building-and-testing-instructions.patch delete mode 100644 meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch create mode 100644 meta/recipes-core/glibc/glibc/0018-eglibc-Help-bootstrap-cross-toolchain.patch create mode 100644 meta/recipes-core/glibc/glibc/0019-eglibc-Clear-cache-lines-on-ppc8xx.patch delete mode 100644 meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch create mode 100644 meta/recipes-core/glibc/glibc/0020-eglibc-Resolve-__fpscr_values-on-SH4.patch delete mode 100644 meta/recipes-core/glibc/glibc/0020-eglibc-cherry-picked-from.patch delete mode 100644 meta/recipes-core/glibc/glibc/0021-eglibc-Clear-cache-lines-on-ppc8xx.patch create mode 100644 meta/recipes-core/glibc/glibc/0021-eglibc-Install-PIC-archives.patch create mode 100644 meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch delete mode 100644 meta/recipes-core/glibc/glibc/0022-eglibc-Resolve-__fpscr_values-on-SH4.patch create mode 100644 meta/recipes-core/glibc/glibc/0023-Define-DUMMY_LOCALE_T-if-not-defined.patch delete mode 100644 meta/recipes-core/glibc/glibc/0023-eglibc-Install-PIC-archives.patch delete mode 100644 meta/recipes-core/glibc/glibc/0024-eglibc-Forward-port-cross-locale-generation-support.patch create mode 100644 meta/recipes-core/glibc/glibc/0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch delete mode 100644 meta/recipes-core/glibc/glibc/0025-Define-DUMMY_LOCALE_T-if-not-defined.patch create mode 100644 meta/recipes-core/glibc/glibc/0025-locale-fix-hard-coded-reference-to-gcc-E.patch delete mode 100644 meta/recipes-core/glibc/glibc/0026-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch delete mode 100644 meta/recipes-core/glibc/glibc/0027-locale-fix-hard-coded-reference-to-gcc-E.patch create mode 100644 meta/recipes-core/glibc/glibc_2.25.90.bb delete mode 100644 meta/recipes-core/glibc/glibc_2.25.bb (limited to 'meta/recipes-core/glibc') diff --git a/meta/recipes-core/glibc/cross-localedef-native_2.25.90.bb b/meta/recipes-core/glibc/cross-localedef-native_2.25.90.bb new file mode 100644 index 0000000000..5dd0c70400 --- /dev/null +++ b/meta/recipes-core/glibc/cross-localedef-native_2.25.90.bb @@ -0,0 +1,52 @@ +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" + +# Tell autotools that we're working in the localedef directory +# +AUTOTOOLS_SCRIPT_PATH = "${S}/localedef" + +inherit native +inherit autotools + +FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/glibc:" + +#SRCBRANCH ?= "release/${PV}/master" +SRCBRANCH ?= "master" +GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git" +UPSTREAM_CHECK_GITTAGREGEX = "(?P\d+\.\d+(\.\d+)*)" + +SRCREV_glibc ?= "43a9f537fc121a867981ca31ea9d79f33ce0fd24" +SRCREV_localedef ?= "dfb4afe551c6c6e94f9cc85417bd1f582168c843" + +SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ + git://github.com/kraj/localedef;branch=master;name=localedef;destsuffix=git/localedef \ + file://0015-timezone-re-written-tzselect-as-posix-sh.patch \ + file://0016-Remove-bash-dependency-for-nscd-init-script.patch \ + file://0017-eglibc-Cross-building-and-testing-instructions.patch \ + file://0018-eglibc-Help-bootstrap-cross-toolchain.patch \ + file://0019-eglibc-Clear-cache-lines-on-ppc8xx.patch \ + file://0020-eglibc-Resolve-__fpscr_values-on-SH4.patch \ + file://0021-eglibc-Install-PIC-archives.patch \ + file://0022-eglibc-Forward-port-cross-locale-generation-support.patch \ + file://0023-Define-DUMMY_LOCALE_T-if-not-defined.patch \ +" +# 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_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.25.bb b/meta/recipes-core/glibc/cross-localedef-native_2.25.bb deleted file mode 100644 index cbd16f7263..0000000000 --- a/meta/recipes-core/glibc/cross-localedef-native_2.25.bb +++ /dev/null @@ -1,52 +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" - -# Tell autotools that we're working in the localedef directory -# -AUTOTOOLS_SCRIPT_PATH = "${S}/localedef" - -inherit native -inherit autotools - -FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/glibc:" - -SRCBRANCH ?= "release/${PV}/master" -GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git" -UPSTREAM_CHECK_GITTAGREGEX = "(?P\d+\.\d+(\.\d+)*)" - -SRCREV_glibc ?= "db0242e3023436757bbc7c488a779e6e3343db04" -SRCREV_localedef ?= "29869b6dc11427c5bab839bdb155c85a7c644c71" - -SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ - git://github.com/kraj/localedef;branch=master;name=localedef;destsuffix=git/localedef \ - file://0016-timezone-re-written-tzselect-as-posix-sh.patch \ - file://0017-Remove-bash-dependency-for-nscd-init-script.patch \ - file://0018-eglibc-Cross-building-and-testing-instructions.patch \ - file://0019-eglibc-Help-bootstrap-cross-toolchain.patch \ - file://0020-eglibc-cherry-picked-from.patch \ - file://0021-eglibc-Clear-cache-lines-on-ppc8xx.patch \ - file://0022-eglibc-Resolve-__fpscr_values-on-SH4.patch \ - file://0023-eglibc-Install-PIC-archives.patch \ - file://0024-eglibc-Forward-port-cross-locale-generation-support.patch \ - file://0025-Define-DUMMY_LOCALE_T-if-not-defined.patch \ -" -# 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_install() { - install -d ${D}${bindir} - install -m 0755 ${B}/localedef ${D}${bindir}/cross-localedef -} diff --git a/meta/recipes-core/glibc/glibc-initial_2.25.90.bb b/meta/recipes-core/glibc/glibc-initial_2.25.90.bb new file mode 100644 index 0000000000..e86770e12d --- /dev/null +++ b/meta/recipes-core/glibc/glibc-initial_2.25.90.bb @@ -0,0 +1,9 @@ +require glibc_${PV}.bb +require glibc-initial.inc + +# main glibc recipes muck with TARGET_CPPFLAGS to point into +# final target sysroot but we +# are not there when building glibc-initial +# so reset it here + +TARGET_CPPFLAGS = "" diff --git a/meta/recipes-core/glibc/glibc-initial_2.25.bb b/meta/recipes-core/glibc/glibc-initial_2.25.bb deleted file mode 100644 index e86770e12d..0000000000 --- a/meta/recipes-core/glibc/glibc-initial_2.25.bb +++ /dev/null @@ -1,9 +0,0 @@ -require glibc_${PV}.bb -require glibc-initial.inc - -# main glibc recipes muck with TARGET_CPPFLAGS to point into -# final target sysroot but we -# are not there when building glibc-initial -# so reset it here - -TARGET_CPPFLAGS = "" diff --git a/meta/recipes-core/glibc/glibc-locale_2.25.90.bb b/meta/recipes-core/glibc/glibc-locale_2.25.90.bb new file mode 100644 index 0000000000..f7702e0358 --- /dev/null +++ b/meta/recipes-core/glibc/glibc-locale_2.25.90.bb @@ -0,0 +1 @@ +require glibc-locale.inc diff --git a/meta/recipes-core/glibc/glibc-locale_2.25.bb b/meta/recipes-core/glibc/glibc-locale_2.25.bb deleted file mode 100644 index f7702e0358..0000000000 --- a/meta/recipes-core/glibc/glibc-locale_2.25.bb +++ /dev/null @@ -1 +0,0 @@ -require glibc-locale.inc diff --git a/meta/recipes-core/glibc/glibc-mtrace_2.25.90.bb b/meta/recipes-core/glibc/glibc-mtrace_2.25.90.bb new file mode 100644 index 0000000000..0b69bad46a --- /dev/null +++ b/meta/recipes-core/glibc/glibc-mtrace_2.25.90.bb @@ -0,0 +1 @@ +require glibc-mtrace.inc diff --git a/meta/recipes-core/glibc/glibc-mtrace_2.25.bb b/meta/recipes-core/glibc/glibc-mtrace_2.25.bb deleted file mode 100644 index 0b69bad46a..0000000000 --- a/meta/recipes-core/glibc/glibc-mtrace_2.25.bb +++ /dev/null @@ -1 +0,0 @@ -require glibc-mtrace.inc diff --git a/meta/recipes-core/glibc/glibc-scripts_2.25.90.bb b/meta/recipes-core/glibc/glibc-scripts_2.25.90.bb new file mode 100644 index 0000000000..5a89bd8022 --- /dev/null +++ b/meta/recipes-core/glibc/glibc-scripts_2.25.90.bb @@ -0,0 +1 @@ +require glibc-scripts.inc diff --git a/meta/recipes-core/glibc/glibc-scripts_2.25.bb b/meta/recipes-core/glibc/glibc-scripts_2.25.bb deleted file mode 100644 index 5a89bd8022..0000000000 --- a/meta/recipes-core/glibc/glibc-scripts_2.25.bb +++ /dev/null @@ -1 +0,0 @@ -require glibc-scripts.inc 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 0553f8a472..19c1d9bf14 100644 --- a/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch +++ b/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch @@ -1,7 +1,7 @@ -From 2727e58d1d269994de17cadb12195001b14585e7 Mon Sep 17 00:00:00 2001 +From 81346b2f7735698078d5bf919a78b6c0269d6fee Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 18 Mar 2015 01:48:24 +0000 -Subject: [PATCH 01/26] nativesdk-glibc: Look for host system ld.so.cache as +Subject: [PATCH 01/25] nativesdk-glibc: Look for host system ld.so.cache as well Upstream-Status: Inappropriate [embedded specific] @@ -31,7 +31,7 @@ Signed-off-by: Khem Raj 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/elf/dl-load.c b/elf/dl-load.c -index 51fb0d0..f503dbc 100644 +index c1b6d4ba0f..d7af9ebcbc 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -2054,6 +2054,14 @@ _dl_map_object (struct link_map *loader, const char *name, @@ -65,5 +65,5 @@ index 51fb0d0..f503dbc 100644 if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS)) _dl_debug_printf ("\n"); -- -2.10.2 +2.13.2 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 e5ef3410e9..2ce240be6f 100644 --- a/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch +++ b/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch @@ -1,7 +1,7 @@ -From 1578f52647ec8804186d1944d4cd2095132efc39 Mon Sep 17 00:00:00 2001 +From 82f2e910ec0e2de6a9e2b007825bddfc5850575d Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 18 Mar 2015 01:50:00 +0000 -Subject: [PATCH 02/26] nativesdk-glibc: Fix buffer overrun with a relocated +Subject: [PATCH 02/25] nativesdk-glibc: Fix buffer overrun with a relocated SDK When ld-linux-*.so.2 is relocated to a path that is longer than the @@ -22,7 +22,7 @@ Signed-off-by: Khem Raj 1 file changed, 12 insertions(+) diff --git a/elf/dl-load.c b/elf/dl-load.c -index f503dbc..3a3d112 100644 +index d7af9ebcbc..19c1db9948 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -1753,7 +1753,19 @@ open_path (const char *name, size_t namelen, int mode, @@ -46,5 +46,5 @@ index f503dbc..3a3d112 100644 { struct r_search_path_elem *this_dir = *dirs; -- -2.10.2 +2.13.2 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 9e207e44d9..397e8b3169 100644 --- a/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch +++ b/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch @@ -1,7 +1,7 @@ -From e53968d61804b6bab32ec6e13cc0b3cd57214796 Mon Sep 17 00:00:00 2001 +From 490a0eb4da1af726ea5d68e3efc0d18ba94c4054 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 18 Mar 2015 01:51:38 +0000 -Subject: [PATCH 03/26] nativesdk-glibc: Raise the size of arrays containing dl +Subject: [PATCH 03/25] nativesdk-glibc: Raise the size of arrays containing dl paths This patch puts the dynamic loader path in the binaries, SYSTEM_DIRS strings @@ -26,10 +26,10 @@ Signed-off-by: Khem Raj 7 files changed, 14 insertions(+), 10 deletions(-) diff --git a/elf/dl-cache.c b/elf/dl-cache.c -index cfa335e..daa12ec 100644 +index e9632da0b3..4de529d2cf 100644 --- a/elf/dl-cache.c +++ b/elf/dl-cache.c -@@ -132,6 +132,10 @@ do \ +@@ -133,6 +133,10 @@ do \ while (0) @@ -41,7 +41,7 @@ index cfa335e..daa12ec 100644 internal_function _dl_cache_libcmp (const char *p1, const char *p2) diff --git a/elf/dl-load.c b/elf/dl-load.c -index 3a3d112..a1410e4 100644 +index 19c1db9948..70c259b400 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -106,8 +106,8 @@ static size_t max_capstrlen attribute_relro; @@ -56,7 +56,7 @@ index 3a3d112..a1410e4 100644 SYSTEM_DIRS_LEN }; diff --git a/elf/interp.c b/elf/interp.c -index 9448802..e7e8c70 100644 +index b6e8f04444..47c20415bc 100644 --- a/elf/interp.c +++ b/elf/interp.c @@ -18,5 +18,5 @@ @@ -67,7 +67,7 @@ index 9448802..e7e8c70 100644 +const char __invoke_dynamic_linker__[4096] __attribute__ ((section (".interp"))) = RUNTIME_LINKER; diff --git a/elf/ldconfig.c b/elf/ldconfig.c -index 467ca82..631a2a9 100644 +index 99caf9e9bb..36ea5df5f1 100644 --- a/elf/ldconfig.c +++ b/elf/ldconfig.c @@ -168,6 +168,9 @@ static struct argp argp = @@ -81,18 +81,18 @@ index 467ca82..631a2a9 100644 a platform. */ static int diff --git a/elf/rtld.c b/elf/rtld.c -index 4ec25d7..e159c12 100644 +index 65647fb1c8..cd8381cb33 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 - +@@ -128,6 +128,7 @@ dso_name_valid_for_suid (const char *p) + } + return *p != '\0'; + } +extern const char LD_SO_CACHE[4096] __attribute__ ((section (".ldsocache"))); - /* List of auditing DSOs. */ - static struct audit_list -@@ -854,12 +855,12 @@ of this helper program; chances are you did not intend to run this program.\n\ + /* LD_AUDIT variable contents. Must be processed before the + audit_list below. */ +@@ -999,12 +1000,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\ @@ -108,7 +108,7 @@ index 4ec25d7..e159c12 100644 ++_dl_skip_args; --_dl_argc; diff --git a/iconv/gconv_conf.c b/iconv/gconv_conf.c -index e235188..569f72e 100644 +index 5aa055de6e..b9a14b9bd3 100644 --- a/iconv/gconv_conf.c +++ b/iconv/gconv_conf.c @@ -36,7 +36,7 @@ @@ -121,7 +121,7 @@ index e235188..569f72e 100644 /* The path elements, as determined by the __gconv_get_path function. All path elements end in a slash. */ diff --git a/sysdeps/generic/dl-cache.h b/sysdeps/generic/dl-cache.h -index eb2f900..505804e 100644 +index 1f0b8f629d..acbe68399d 100644 --- a/sysdeps/generic/dl-cache.h +++ b/sysdeps/generic/dl-cache.h @@ -27,10 +27,6 @@ @@ -136,5 +136,5 @@ index eb2f900..505804e 100644 # define add_system_dir(dir) add_dir (dir) #endif -- -2.10.2 +2.13.2 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 0926a110e0..8db47bca78 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,22 +1,23 @@ -From 0b95f34207ffed3aa53fa949662bfbccc7c864a4 Mon Sep 17 00:00:00 2001 +From 8fe1b56180c30d237cc2ab9a5a9c97a0311f41da Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 31 Dec 2015 14:35:35 -0800 -Subject: [PATCH 04/26] nativesdk-glibc: Allow 64 bit atomics for x86 +Subject: [PATCH 04/25] nativesdk-glibc: Allow 64 bit atomics for x86 The fix consist of allowing 64bit atomic ops for x86. This should be safe for i586 and newer CPUs. It also makes the synchronization more efficient. +Upstream-Status: Inappropriate [OE-Specific] + Signed-off-by: Juro Bystricky Signed-off-by: Richard Purdie Signed-off-by: Khem Raj -Upstream-Status: Pending --- sysdeps/i386/atomic-machine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/i386/atomic-machine.h b/sysdeps/i386/atomic-machine.h -index ce62b33..4fe44ea 100644 +index 0e24200617..1532f52dec 100644 --- a/sysdeps/i386/atomic-machine.h +++ b/sysdeps/i386/atomic-machine.h @@ -54,7 +54,7 @@ typedef uintmax_t uatomic_max_t; @@ -26,8 +27,8 @@ index ce62b33..4fe44ea 100644 -#define __HAVE_64B_ATOMICS 0 +#define __HAVE_64B_ATOMICS 1 #define USE_ATOMIC_COMPILER_BUILTINS 0 - + #define ATOMIC_EXCHANGE_USES_CAS 0 -- -2.10.2 +2.13.2 diff --git a/meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch b/meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch index ee50000319..956b2aae7a 100644 --- a/meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch +++ b/meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch @@ -1,7 +1,7 @@ -From 77a7495376c7d0c5507c0ec99bf1568150339ef4 Mon Sep 17 00:00:00 2001 +From b9edcc845641956b7286c60c833f05a9f70cfab9 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 18 Mar 2015 00:01:50 +0000 -Subject: [PATCH 05/26] fsl e500/e5500/e6500/603e fsqrt implementation +Subject: [PATCH 05/25] fsl e500/e5500/e6500/603e fsqrt implementation Upstream-Status: Pending Signed-off-by: Edmar Wienskoski @@ -49,7 +49,7 @@ Signed-off-by: Khem Raj diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c new file mode 100644 -index 0000000..71e516d +index 0000000000..71e516d1c8 --- /dev/null +++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c @@ -0,0 +1,134 @@ @@ -189,7 +189,7 @@ index 0000000..71e516d +} diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c new file mode 100644 -index 0000000..26fa067 +index 0000000000..26fa067abf --- /dev/null +++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c @@ -0,0 +1,101 @@ @@ -296,7 +296,7 @@ index 0000000..26fa067 +} diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c new file mode 100644 -index 0000000..71e516d +index 0000000000..71e516d1c8 --- /dev/null +++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c @@ -0,0 +1,134 @@ @@ -436,7 +436,7 @@ index 0000000..71e516d +} diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c new file mode 100644 -index 0000000..26fa067 +index 0000000000..26fa067abf --- /dev/null +++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c @@ -0,0 +1,101 @@ @@ -543,7 +543,7 @@ index 0000000..26fa067 +} diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c new file mode 100644 -index 0000000..71e516d +index 0000000000..71e516d1c8 --- /dev/null +++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c @@ -0,0 +1,134 @@ @@ -683,7 +683,7 @@ index 0000000..71e516d +} diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c new file mode 100644 -index 0000000..26fa067 +index 0000000000..26fa067abf --- /dev/null +++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c @@ -0,0 +1,101 @@ @@ -790,7 +790,7 @@ index 0000000..26fa067 +} diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c new file mode 100644 -index 0000000..71e516d +index 0000000000..71e516d1c8 --- /dev/null +++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c @@ -0,0 +1,134 @@ @@ -930,7 +930,7 @@ index 0000000..71e516d +} diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c new file mode 100644 -index 0000000..26fa067 +index 0000000000..26fa067abf --- /dev/null +++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c @@ -0,0 +1,101 @@ @@ -1037,7 +1037,7 @@ index 0000000..26fa067 +} diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c new file mode 100644 -index 0000000..71e516d +index 0000000000..71e516d1c8 --- /dev/null +++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c @@ -0,0 +1,134 @@ @@ -1177,7 +1177,7 @@ index 0000000..71e516d +} diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c new file mode 100644 -index 0000000..26fa067 +index 0000000000..26fa067abf --- /dev/null +++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c @@ -0,0 +1,101 @@ @@ -1284,7 +1284,7 @@ index 0000000..26fa067 +} diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c new file mode 100644 -index 0000000..71e516d +index 0000000000..71e516d1c8 --- /dev/null +++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c @@ -0,0 +1,134 @@ @@ -1424,7 +1424,7 @@ index 0000000..71e516d +} diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c new file mode 100644 -index 0000000..26fa067 +index 0000000000..26fa067abf --- /dev/null +++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c @@ -0,0 +1,101 @@ @@ -1531,14 +1531,14 @@ index 0000000..26fa067 +} diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies new file mode 100644 -index 0000000..b103b4d +index 0000000000..b103b4dea5 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies @@ -0,0 +1 @@ +powerpc/powerpc32/603e/fpu diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies new file mode 100644 -index 0000000..64db17f +index 0000000000..64db17fada --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies @@ -0,0 +1,2 @@ @@ -1546,39 +1546,39 @@ index 0000000..64db17f +powerpc/powerpc32/603e/fpu diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies new file mode 100644 -index 0000000..7eac5fc +index 0000000000..7eac5fcf02 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies @@ -0,0 +1 @@ +powerpc/powerpc32/e500mc/fpu diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies new file mode 100644 -index 0000000..264b2a7 +index 0000000000..264b2a7700 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies @@ -0,0 +1 @@ +powerpc/powerpc32/e5500/fpu diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies new file mode 100644 -index 0000000..a259344 +index 0000000000..a25934467b --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies @@ -0,0 +1 @@ +powerpc/powerpc32/e6500/fpu diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies new file mode 100644 -index 0000000..a7bc854 +index 0000000000..a7bc854be8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies @@ -0,0 +1 @@ +powerpc/powerpc64/e5500/fpu diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies new file mode 100644 -index 0000000..04ff8cc +index 0000000000..04ff8cc181 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies @@ -0,0 +1 @@ +powerpc/powerpc64/e6500/fpu -- -2.10.2 +2.13.2 diff --git a/meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch b/meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch index 9088d29c4a..c74fead625 100644 --- a/meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch +++ b/meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch @@ -1,7 +1,7 @@ -From 520cb9e746af637cf01fea385b7f4ee4aadbdfdd Mon Sep 17 00:00:00 2001 +From 324202488a1c2439be345745722f5cb04c0e0847 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 18 Mar 2015 00:11:22 +0000 -Subject: [PATCH 06/26] readlib: Add OECORE_KNOWN_INTERPRETER_NAMES to known +Subject: [PATCH 06/25] readlib: Add OECORE_KNOWN_INTERPRETER_NAMES to known names This bolts in a hook for OE to pass its own version of interpreter @@ -17,7 +17,7 @@ Signed-off-by: Khem Raj 1 file changed, 1 insertion(+) diff --git a/elf/readlib.c b/elf/readlib.c -index 8a66ffe..08d56fc 100644 +index d278a189b2..a84cb85158 100644 --- a/elf/readlib.c +++ b/elf/readlib.c @@ -51,6 +51,7 @@ static struct known_names interpreters[] = @@ -29,5 +29,5 @@ index 8a66ffe..08d56fc 100644 static struct known_names known_libs[] = -- -2.10.2 +2.13.2 diff --git a/meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch b/meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch index f33defe075..b64327667c 100644 --- a/meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch +++ b/meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch @@ -1,7 +1,7 @@ -From 64130262787d54e2e6695ae4ed8783bfec14ffef Mon Sep 17 00:00:00 2001 +From cf00bf9de8128171e79a019de809e35f3aeed281 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 18 Mar 2015 00:15:07 +0000 -Subject: [PATCH 07/26] ppc/sqrt: Fix undefined reference to `__sqrt_finite' +Subject: [PATCH 07/25] ppc/sqrt: Fix undefined reference to `__sqrt_finite' on ppc fixes the errors like below | ./.libs/libpulsecore-1.1.so: undefined reference to `__sqrt_finite' @@ -36,7 +36,7 @@ Signed-off-by: Khem Raj 12 files changed, 12 insertions(+), 24 deletions(-) diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c -index 71e516d..1795fd6 100644 +index 71e516d1c8..1795fd6c3e 100644 --- a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c +++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c @@ -39,14 +39,8 @@ static const float half = 0.5; @@ -60,7 +60,7 @@ index 71e516d..1795fd6 100644 } +strong_alias (__ieee754_sqrt, __sqrt_finite) diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c -index 26fa067..a917f31 100644 +index 26fa067abf..a917f313ab 100644 --- a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c +++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c @@ -37,14 +37,8 @@ static const float threehalf = 1.5; @@ -84,7 +84,7 @@ index 26fa067..a917f31 100644 } +strong_alias (__ieee754_sqrtf, __sqrtf_finite) diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c -index 71e516d..fc4a749 100644 +index 71e516d1c8..fc4a74990e 100644 --- a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c +++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c @@ -132,3 +132,4 @@ __ieee754_sqrt (b) @@ -93,7 +93,7 @@ index 71e516d..fc4a749 100644 } +strong_alias (__ieee754_sqrt, __sqrt_finite) diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c -index 26fa067..9d17512 100644 +index 26fa067abf..9d175122a8 100644 --- a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c +++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c @@ -99,3 +99,4 @@ __ieee754_sqrtf (b) @@ -102,7 +102,7 @@ index 26fa067..9d17512 100644 } +strong_alias (__ieee754_sqrtf, __sqrtf_finite) diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c -index 71e516d..fc4a749 100644 +index 71e516d1c8..fc4a74990e 100644 --- a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c +++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c @@ -132,3 +132,4 @@ __ieee754_sqrt (b) @@ -111,7 +111,7 @@ index 71e516d..fc4a749 100644 } +strong_alias (__ieee754_sqrt, __sqrt_finite) diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c -index 26fa067..9d17512 100644 +index 26fa067abf..9d175122a8 100644 --- a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c +++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c @@ -99,3 +99,4 @@ __ieee754_sqrtf (b) @@ -120,7 +120,7 @@ index 26fa067..9d17512 100644 } +strong_alias (__ieee754_sqrtf, __sqrtf_finite) diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c -index 71e516d..fc4a749 100644 +index 71e516d1c8..fc4a74990e 100644 --- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c +++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c @@ -132,3 +132,4 @@ __ieee754_sqrt (b) @@ -129,7 +129,7 @@ index 71e516d..fc4a749 100644 } +strong_alias (__ieee754_sqrt, __sqrt_finite) diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c -index 26fa067..9d17512 100644 +index 26fa067abf..9d175122a8 100644 --- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c +++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c @@ -99,3 +99,4 @@ __ieee754_sqrtf (b) @@ -138,7 +138,7 @@ index 26fa067..9d17512 100644 } +strong_alias (__ieee754_sqrtf, __sqrtf_finite) diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c -index 71e516d..1795fd6 100644 +index 71e516d1c8..1795fd6c3e 100644 --- a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c +++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c @@ -39,14 +39,8 @@ static const float half = 0.5; @@ -162,7 +162,7 @@ index 71e516d..1795fd6 100644 } +strong_alias (__ieee754_sqrt, __sqrt_finite) diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c -index 26fa067..a917f31 100644 +index 26fa067abf..a917f313ab 100644 --- a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c +++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c @@ -37,14 +37,8 @@ static const float threehalf = 1.5; @@ -186,7 +186,7 @@ index 26fa067..a917f31 100644 } +strong_alias (__ieee754_sqrtf, __sqrtf_finite) diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c -index 71e516d..fc4a749 100644 +index 71e516d1c8..fc4a74990e 100644 --- a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c +++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c @@ -132,3 +132,4 @@ __ieee754_sqrt (b) @@ -195,7 +195,7 @@ index 71e516d..fc4a749 100644 } +strong_alias (__ieee754_sqrt, __sqrt_finite) diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c -index 26fa067..9d17512 100644 +index 26fa067abf..9d175122a8 100644 --- a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c +++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c @@ -99,3 +99,4 @@ __ieee754_sqrtf (b) @@ -204,5 +204,5 @@ index 26fa067..9d17512 100644 } +strong_alias (__ieee754_sqrtf, __sqrtf_finite) -- -2.10.2 +2.13.2 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/0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch index 26f65c5b17..3aeec5288b 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/0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch @@ -1,7 +1,7 @@ -From 5afb0147e3e49c3b474404524014efe51b2bca5a Mon Sep 17 00:00:00 2001 +From babe311deca9ee2730278f13b061b914b5286dc3 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 18 Mar 2015 00:16:38 +0000 -Subject: [PATCH 08/26] __ieee754_sqrt{,f} are now inline functions and call +Subject: [PATCH 08/25] __ieee754_sqrt{,f} are now inline functions and call out __slow versions Upstream-Status: Pending @@ -23,7 +23,7 @@ Signed-off-by: Khem Raj 12 files changed, 114 insertions(+), 21 deletions(-) diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c -index 1795fd6..daa83f3 100644 +index 1795fd6c3e..daa83f3fe8 100644 --- a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c +++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c @@ -40,7 +40,7 @@ static const float half = 0.5; @@ -58,7 +58,7 @@ index 1795fd6..daa83f3 100644 + strong_alias (__ieee754_sqrt, __sqrt_finite) diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c -index a917f31..b812cf1 100644 +index a917f313ab..b812cf1705 100644 --- a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c +++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c @@ -38,7 +38,7 @@ static const float threehalf = 1.5; @@ -82,7 +82,7 @@ index a917f31..b812cf1 100644 +} strong_alias (__ieee754_sqrtf, __sqrtf_finite) diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c -index fc4a749..7038a70 100644 +index fc4a74990e..7038a70b47 100644 --- a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c +++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c @@ -41,10 +41,10 @@ static const float half = 0.5; @@ -121,7 +121,7 @@ index fc4a749..7038a70 100644 + strong_alias (__ieee754_sqrt, __sqrt_finite) diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c -index 9d17512..10de1f0 100644 +index 9d175122a8..10de1f0cc3 100644 --- a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c +++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c @@ -39,10 +39,10 @@ static const float threehalf = 1.5; @@ -151,7 +151,7 @@ index 9d17512..10de1f0 100644 + strong_alias (__ieee754_sqrtf, __sqrtf_finite) diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c -index fc4a749..7038a70 100644 +index fc4a74990e..7038a70b47 100644 --- a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c +++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c @@ -41,10 +41,10 @@ static const float half = 0.5; @@ -190,7 +190,7 @@ index fc4a749..7038a70 100644 + strong_alias (__ieee754_sqrt, __sqrt_finite) diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c -index 9d17512..10de1f0 100644 +index 9d175122a8..10de1f0cc3 100644 --- a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c +++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c @@ -39,10 +39,10 @@ static const float threehalf = 1.5; @@ -220,7 +220,7 @@ index 9d17512..10de1f0 100644 + strong_alias (__ieee754_sqrtf, __sqrtf_finite) diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c -index fc4a749..1c34244 100644 +index fc4a74990e..1c34244bd8 100644 --- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c +++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c @@ -132,4 +132,12 @@ __ieee754_sqrt (b) @@ -237,7 +237,7 @@ index fc4a749..1c34244 100644 + strong_alias (__ieee754_sqrt, __sqrt_finite) diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c -index 9d17512..8126535 100644 +index 9d175122a8..812653558f 100644 --- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c +++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c @@ -99,4 +99,12 @@ __ieee754_sqrtf (b) @@ -254,7 +254,7 @@ index 9d17512..8126535 100644 + strong_alias (__ieee754_sqrtf, __sqrtf_finite) diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c -index 1795fd6..13a8197 100644 +index 1795fd6c3e..13a81973e3 100644 --- a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c +++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c @@ -40,7 +40,7 @@ static const float half = 0.5; @@ -289,7 +289,7 @@ index 1795fd6..13a8197 100644 + strong_alias (__ieee754_sqrt, __sqrt_finite) diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c -index a917f31..fae2d81 100644 +index a917f313ab..fae2d81210 100644 --- a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c +++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c @@ -38,7 +38,7 @@ static const float threehalf = 1.5; @@ -314,7 +314,7 @@ index a917f31..fae2d81 100644 + strong_alias (__ieee754_sqrtf, __sqrtf_finite) diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c -index fc4a749..7038a70 100644 +index fc4a74990e..7038a70b47 100644 --- a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c +++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c @@ -41,10 +41,10 @@ static const float half = 0.5; @@ -353,7 +353,7 @@ index fc4a749..7038a70 100644 + strong_alias (__ieee754_sqrt, __sqrt_finite) diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c -index 9d17512..10de1f0 100644 +index 9d175122a8..10de1f0cc3 100644 --- a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c +++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c @@ -39,10 +39,10 @@ static const float threehalf = 1.5; @@ -383,5 +383,5 @@ index 9d17512..10de1f0 100644 + strong_alias (__ieee754_sqrtf, __sqrtf_finite) -- -2.10.2 +2.13.2 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/0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch index d416acde3e..7d5c2e31f5 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/0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch @@ -1,7 +1,7 @@ -From ddd51bb4e005432cb3c0f8f33822954408a9fee1 Mon Sep 17 00:00:00 2001 +From 93b5d6bed19939039031c45b777d29619db06184 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 18 Mar 2015 00:20:09 +0000 -Subject: [PATCH 09/26] Quote from bug 1443 which explains what the patch does +Subject: [PATCH 09/25] Quote from bug 1443 which explains what the patch does : We build some random program and link it with -lust. When we run it, @@ -45,10 +45,10 @@ Signed-off-by: Khem Raj 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h -index 60eee00..7d54d5e 100644 +index 7053ead16e..0b1e1716b0 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h -@@ -499,7 +499,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, +@@ -500,7 +500,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, case R_ARM_TLS_DTPOFF32: if (sym != NULL) @@ -58,5 +58,5 @@ index 60eee00..7d54d5e 100644 case R_ARM_TLS_TPOFF32: -- -2.10.2 +2.13.2 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/0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch index 276f1fa4c2..7275c3e96d 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/0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch @@ -1,7 +1,7 @@ -From d7e74670825330f5421a55f5aa2a1ce6fda7d7fb Mon Sep 17 00:00:00 2001 +From 1a6e0f4ee8584b04226156df1a3de3e467f0ef6f Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Wed, 19 Dec 2012 04:39:57 -0600 -Subject: [PATCH 10/26] eglibc: run libm-err-tab.pl with specific dirs in ${S} +Subject: [PATCH 10/25] eglibc: run libm-err-tab.pl with specific dirs in ${S} libm-err-tab.pl will parse all the files named "libm-test-ulps" in the given dir recursively. To avoid parsing the one in @@ -18,7 +18,7 @@ Signed-off-by: Ting Liu 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manual/Makefile b/manual/Makefile -index f2f694f..e062833 100644 +index 4ed63a8ef3..e89919eb19 100644 --- a/manual/Makefile +++ b/manual/Makefile @@ -105,7 +105,8 @@ $(objpfx)libm-err.texi: $(objpfx)stamp-libm-err @@ -32,5 +32,5 @@ index f2f694f..e062833 100644 touch $@ -- -2.10.2 +2.13.2 diff --git a/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch b/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch index 096dab5474..84f2ca5234 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/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch @@ -1,7 +1,7 @@ -From d6e2076571263e45c48889896d3d94ff576df2be Mon Sep 17 00:00:00 2001 +From 9b2af6cbf68d3353d72519e7f6c46becb7bd1d0f Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 18 Mar 2015 00:24:46 +0000 -Subject: [PATCH 11/26] __ieee754_sqrt{,f} are now inline functions and call +Subject: [PATCH 11/25] __ieee754_sqrt{,f} are now inline functions and call out __slow versions Upstream-Status: Pending @@ -14,7 +14,7 @@ Signed-off-by: Khem Raj 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c -index 1c34244..7038a70 100644 +index 1c34244bd8..7038a70b47 100644 --- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c +++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c @@ -41,10 +41,10 @@ static const float half = 0.5; @@ -40,7 +40,7 @@ index 1c34244..7038a70 100644 #define FMADD(a_, c_, b_) \ ({ double __r; \ diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c -index 8126535..10de1f0 100644 +index 812653558f..10de1f0cc3 100644 --- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c +++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c @@ -39,10 +39,10 @@ static const float threehalf = 1.5; @@ -57,5 +57,5 @@ index 8126535..10de1f0 100644 #endif { -- -2.10.2 +2.13.2 diff --git a/meta/recipes-core/glibc/glibc/0012-Make-ld-version-output-matching-grok-gold-s-output.patch b/meta/recipes-core/glibc/glibc/0012-Make-ld-version-output-matching-grok-gold-s-output.patch deleted file mode 100644 index 7728c61a9d..0000000000 --- a/meta/recipes-core/glibc/glibc/0012-Make-ld-version-output-matching-grok-gold-s-output.patch +++ /dev/null @@ -1,44 +0,0 @@ -From c0974c746e026650bef5d1940eb3f519765c77af Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 18 Mar 2015 00:25:45 +0000 -Subject: [PATCH 12/26] Make ld --version output matching grok gold's output - -adapted from from upstream branch roland/gold-vs-libc - -Upstream-Status: Backport - -Signed-off-by: Khem Raj ---- - configure | 2 +- - configure.ac | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/configure b/configure -index 5cf3230..391f29d 100755 ---- a/configure -+++ b/configure -@@ -4555,7 +4555,7 @@ else - # Found it, now check the version. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $LD" >&5 - $as_echo_n "checking version of $LD... " >&6; } -- ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU ld.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'` -+ ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU [Bbinutilsd][^.]* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*) -diff --git a/configure.ac b/configure.ac -index d719fad..5b5877c 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -990,7 +990,7 @@ AC_CHECK_PROG_VER(AS, $AS, --version, - [2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*], - AS=: critic_missing="$critic_missing as") - AC_CHECK_PROG_VER(LD, $LD, --version, -- [GNU ld.* \([0-9][0-9]*\.[0-9.]*\)], -+ [GNU [Bbinutilsd][^.]* \([0-9][0-9]*\.[0-9.]*\)], - [2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*], - LD=: critic_missing="$critic_missing ld") - --- -2.10.2 - 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/0012-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch new file mode 100644 index 0000000000..2bf6b23ad1 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0012-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch @@ -0,0 +1,42 @@ +From ffd3c5a04d8f2f26fea71fed4ce41e88b6f51086 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 18 Mar 2015 00:27:10 +0000 +Subject: [PATCH 12/25] sysdeps/gnu/configure.ac: handle correctly + $libc_cv_rootsbindir + +Upstream-Status:Pending + +Signed-off-by: Matthieu Crapet +Signed-off-by: Khem Raj +--- + sysdeps/gnu/configure | 2 +- + sysdeps/gnu/configure.ac | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/sysdeps/gnu/configure b/sysdeps/gnu/configure +index 71243ad0c6..f578187576 100644 +--- a/sysdeps/gnu/configure ++++ b/sysdeps/gnu/configure +@@ -32,6 +32,6 @@ case "$prefix" in + else + libc_cv_localstatedir=$localstatedir + fi +- libc_cv_rootsbindir=/sbin ++ test -n "$libc_cv_rootsbindir" || libc_cv_rootsbindir=/sbin + ;; + esac +diff --git a/sysdeps/gnu/configure.ac b/sysdeps/gnu/configure.ac +index 634fe4de2a..3db1697f4f 100644 +--- a/sysdeps/gnu/configure.ac ++++ b/sysdeps/gnu/configure.ac +@@ -21,6 +21,6 @@ case "$prefix" in + else + libc_cv_localstatedir=$localstatedir + fi +- libc_cv_rootsbindir=/sbin ++ test -n "$libc_cv_rootsbindir" || libc_cv_rootsbindir=/sbin + ;; + esac +-- +2.13.2 + diff --git a/meta/recipes-core/glibc/glibc/0013-Add-unused-attribute.patch b/meta/recipes-core/glibc/glibc/0013-Add-unused-attribute.patch new file mode 100644 index 0000000000..099fe50ee2 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0013-Add-unused-attribute.patch @@ -0,0 +1,34 @@ +From 049cce82f35e0d864d98075b83888dbba4d68afd Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 18 Mar 2015 00:28:41 +0000 +Subject: [PATCH 13/25] Add unused attribute + +Helps in avoiding gcc warning when header is is included in +a source file which does not use both functions + + * iconv/gconv_charset.h (strip): + Add unused attribute. + +Signed-off-by: Khem Raj + +Upstream-Status: Pending +--- + iconv/gconv_charset.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/iconv/gconv_charset.h b/iconv/gconv_charset.h +index 18d8bd6ae7..eb729da5d3 100644 +--- a/iconv/gconv_charset.h ++++ b/iconv/gconv_charset.h +@@ -21,7 +21,7 @@ + #include + + +-static void ++static void __attribute__ ((unused)) + strip (char *wp, const char *s) + { + int slash_count = 0; +-- +2.13.2 + diff --git a/meta/recipes-core/glibc/glibc/0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch b/meta/recipes-core/glibc/glibc/0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch deleted file mode 100644 index 1c81c729db..0000000000 --- a/meta/recipes-core/glibc/glibc/0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 2a12eadfd7940b6b0913de8e95d851254cce7953 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 18 Mar 2015 00:27:10 +0000 -Subject: [PATCH 13/26] sysdeps/gnu/configure.ac: handle correctly - $libc_cv_rootsbindir - -Upstream-Status:Pending - -Signed-off-by: Matthieu Crapet -Signed-off-by: Khem Raj ---- - sysdeps/gnu/configure | 2 +- - sysdeps/gnu/configure.ac | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/sysdeps/gnu/configure b/sysdeps/gnu/configure -index 71243ad..f578187 100644 ---- a/sysdeps/gnu/configure -+++ b/sysdeps/gnu/configure -@@ -32,6 +32,6 @@ case "$prefix" in - else - libc_cv_localstatedir=$localstatedir - fi -- libc_cv_rootsbindir=/sbin -+ test -n "$libc_cv_rootsbindir" || libc_cv_rootsbindir=/sbin - ;; - esac -diff --git a/sysdeps/gnu/configure.ac b/sysdeps/gnu/configure.ac -index 634fe4d..3db1697 100644 ---- a/sysdeps/gnu/configure.ac -+++ b/sysdeps/gnu/configure.ac -@@ -21,6 +21,6 @@ case "$prefix" in - else - libc_cv_localstatedir=$localstatedir - fi -- libc_cv_rootsbindir=/sbin -+ test -n "$libc_cv_rootsbindir" || libc_cv_rootsbindir=/sbin - ;; - esac --- -2.10.2 - diff --git a/meta/recipes-core/glibc/glibc/0014-Add-unused-attribute.patch b/meta/recipes-core/glibc/glibc/0014-Add-unused-attribute.patch deleted file mode 100644 index b23e104ff8..0000000000 --- a/meta/recipes-core/glibc/glibc/0014-Add-unused-attribute.patch +++ /dev/null @@ -1,34 +0,0 @@ -From ec4f7763b30603b7ba0b70bd7750e34d442821b3 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 18 Mar 2015 00:28:41 +0000 -Subject: [PATCH 14/26] Add unused attribute - -Helps in avoiding gcc warning when header is is included in -a source file which does not use both functions - - * iconv/gconv_charset.h (strip): - Add unused attribute. - -Signed-off-by: Khem Raj - -Upstream-Status: Pending ---- - iconv/gconv_charset.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/iconv/gconv_charset.h b/iconv/gconv_charset.h -index 95cbce7..191a0dd 100644 ---- a/iconv/gconv_charset.h -+++ b/iconv/gconv_charset.h -@@ -21,7 +21,7 @@ - #include - - --static void -+static void __attribute__ ((unused)) - strip (char *wp, const char *s) - { - int slash_count = 0; --- -2.10.2 - diff --git a/meta/recipes-core/glibc/glibc/0014-yes-within-the-path-sets-wrong-config-variables.patch b/meta/recipes-core/glibc/glibc/0014-yes-within-the-path-sets-wrong-config-variables.patch new file mode 100644 index 0000000000..ddc70e0e60 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0014-yes-within-the-path-sets-wrong-config-variables.patch @@ -0,0 +1,263 @@ +From 3b904bee81a1cfe81e3f437b5f3296efd54a51ac Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 18 Mar 2015 00:31:06 +0000 +Subject: [PATCH 14/25] 'yes' within the path sets wrong config variables + +It seems that the 'AC_EGREP_CPP(yes...' example is quite popular +but being such a short word to grep it is likely to produce +false-positive matches with the path it is configured into. + +The change is to use a more elaborated string to grep for. + +Upstream-Status: Submitted [libc-alpha@sourceware.org] + +Signed-off-by: Benjamin Esquivel +Signed-off-by: Khem Raj +--- + sysdeps/aarch64/configure | 4 ++-- + sysdeps/aarch64/configure.ac | 4 ++-- + sysdeps/arm/configure | 4 ++-- + sysdeps/arm/configure.ac | 4 ++-- + sysdeps/mips/configure | 4 ++-- + sysdeps/mips/configure.ac | 4 ++-- + sysdeps/nios2/configure | 4 ++-- + sysdeps/nios2/configure.ac | 4 ++-- + sysdeps/unix/sysv/linux/mips/configure | 4 ++-- + sysdeps/unix/sysv/linux/mips/configure.ac | 4 ++-- + sysdeps/unix/sysv/linux/powerpc/powerpc64/configure | 8 ++++---- + sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac | 8 ++++---- + 12 files changed, 28 insertions(+), 28 deletions(-) + +diff --git a/sysdeps/aarch64/configure b/sysdeps/aarch64/configure +index 5bd355a691..3bc5537bc0 100644 +--- a/sysdeps/aarch64/configure ++++ b/sysdeps/aarch64/configure +@@ -148,12 +148,12 @@ else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #ifdef __AARCH64EB__ +- yes ++ is_aarch64_be + #endif + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "yes" >/dev/null 2>&1; then : ++ $EGREP "is_aarch64_be" >/dev/null 2>&1; then : + libc_cv_aarch64_be=yes + else + libc_cv_aarch64_be=no +diff --git a/sysdeps/aarch64/configure.ac b/sysdeps/aarch64/configure.ac +index 7851dd4dac..6e9238171f 100644 +--- a/sysdeps/aarch64/configure.ac ++++ b/sysdeps/aarch64/configure.ac +@@ -10,8 +10,8 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. + # the dynamic linker via %ifdef. + AC_CACHE_CHECK([for big endian], + [libc_cv_aarch64_be], +- [AC_EGREP_CPP(yes,[#ifdef __AARCH64EB__ +- yes ++ [AC_EGREP_CPP(is_aarch64_be,[#ifdef __AARCH64EB__ ++ is_aarch64_be + #endif + ], libc_cv_aarch64_be=yes, libc_cv_aarch64_be=no)]) + if test $libc_cv_aarch64_be = yes; then +diff --git a/sysdeps/arm/configure b/sysdeps/arm/configure +index 431e843b2b..e152461138 100644 +--- a/sysdeps/arm/configure ++++ b/sysdeps/arm/configure +@@ -151,12 +151,12 @@ else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #ifdef __ARM_PCS_VFP +- yes ++ use_arm_pcs_vfp + #endif + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "yes" >/dev/null 2>&1; then : ++ $EGREP "use_arm_pcs_vfp" >/dev/null 2>&1; then : + libc_cv_arm_pcs_vfp=yes + else + libc_cv_arm_pcs_vfp=no +diff --git a/sysdeps/arm/configure.ac b/sysdeps/arm/configure.ac +index 90cdd69c75..05a262ba00 100644 +--- a/sysdeps/arm/configure.ac ++++ b/sysdeps/arm/configure.ac +@@ -15,8 +15,8 @@ AC_DEFINE(PI_STATIC_AND_HIDDEN) + # the dynamic linker via %ifdef. + AC_CACHE_CHECK([whether the compiler is using the ARM hard-float ABI], + [libc_cv_arm_pcs_vfp], +- [AC_EGREP_CPP(yes,[#ifdef __ARM_PCS_VFP +- yes ++ [AC_EGREP_CPP(use_arm_pcs_vfp,[#ifdef __ARM_PCS_VFP ++ use_arm_pcs_vfp + #endif + ], libc_cv_arm_pcs_vfp=yes, libc_cv_arm_pcs_vfp=no)]) + if test $libc_cv_arm_pcs_vfp = yes; then +diff --git a/sysdeps/mips/configure b/sysdeps/mips/configure +index 4e13248c03..f14af952d0 100644 +--- a/sysdeps/mips/configure ++++ b/sysdeps/mips/configure +@@ -143,11 +143,11 @@ else + /* end confdefs.h. */ + dnl + #ifdef __mips_nan2008 +-yes ++use_mips_nan2008 + #endif + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "yes" >/dev/null 2>&1; then : ++ $EGREP "use_mips_nan2008" >/dev/null 2>&1; then : + libc_cv_mips_nan2008=yes + else + libc_cv_mips_nan2008=no +diff --git a/sysdeps/mips/configure.ac b/sysdeps/mips/configure.ac +index bcbdaffd9f..ad3057f4cc 100644 +--- a/sysdeps/mips/configure.ac ++++ b/sysdeps/mips/configure.ac +@@ -6,9 +6,9 @@ dnl position independent way. + dnl AC_DEFINE(PI_STATIC_AND_HIDDEN) + + AC_CACHE_CHECK([whether the compiler is using the 2008 NaN encoding], +- libc_cv_mips_nan2008, [AC_EGREP_CPP(yes, [dnl ++ libc_cv_mips_nan2008, [AC_EGREP_CPP(use_mips_nan2008, [dnl + #ifdef __mips_nan2008 +-yes ++use_mips_nan2008 + #endif], libc_cv_mips_nan2008=yes, libc_cv_mips_nan2008=no)]) + if test x$libc_cv_mips_nan2008 = xyes; then + AC_DEFINE(HAVE_MIPS_NAN2008) +diff --git a/sysdeps/nios2/configure b/sysdeps/nios2/configure +index 14c8a3a014..dde3814ef2 100644 +--- a/sysdeps/nios2/configure ++++ b/sysdeps/nios2/configure +@@ -142,12 +142,12 @@ else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #ifdef __nios2_big_endian__ +- yes ++ is_nios2_be + #endif + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "yes" >/dev/null 2>&1; then : ++ $EGREP "is_nios2_be" >/dev/null 2>&1; then : + libc_cv_nios2_be=yes + else + libc_cv_nios2_be=no +diff --git a/sysdeps/nios2/configure.ac b/sysdeps/nios2/configure.ac +index f05f43802b..dc8639902d 100644 +--- a/sysdeps/nios2/configure.ac ++++ b/sysdeps/nios2/configure.ac +@@ -4,8 +4,8 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. + # Nios II big endian is not yet supported. + AC_CACHE_CHECK([for big endian], + [libc_cv_nios2_be], +- [AC_EGREP_CPP(yes,[#ifdef __nios2_big_endian__ +- yes ++ [AC_EGREP_CPP(is_nios2_be,[#ifdef __nios2_big_endian__ ++ is_nios2_be + #endif + ], libc_cv_nios2_be=yes, libc_cv_nios2_be=no)]) + if test $libc_cv_nios2_be = yes; then +diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure +index a5513fad48..283b293ff3 100644 +--- a/sysdeps/unix/sysv/linux/mips/configure ++++ b/sysdeps/unix/sysv/linux/mips/configure +@@ -414,11 +414,11 @@ else + /* end confdefs.h. */ + dnl + #ifdef __mips_nan2008 +-yes ++use_mips_nan2008 + #endif + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "yes" >/dev/null 2>&1; then : ++ $EGREP "use_mips_nan2008" >/dev/null 2>&1; then : + libc_cv_mips_nan2008=yes + else + libc_cv_mips_nan2008=no +diff --git a/sysdeps/unix/sysv/linux/mips/configure.ac b/sysdeps/unix/sysv/linux/mips/configure.ac +index 9147aa4582..7898e24738 100644 +--- a/sysdeps/unix/sysv/linux/mips/configure.ac ++++ b/sysdeps/unix/sysv/linux/mips/configure.ac +@@ -105,9 +105,9 @@ AC_COMPILE_IFELSE( + LIBC_CONFIG_VAR([mips-mode-switch],[${libc_mips_mode_switch}]) + + AC_CACHE_CHECK([whether the compiler is using the 2008 NaN encoding], +- libc_cv_mips_nan2008, [AC_EGREP_CPP(yes, [dnl ++ libc_cv_mips_nan2008, [AC_EGREP_CPP(use_mips_nan2008, [dnl + #ifdef __mips_nan2008 +-yes ++use_mips_nan2008 + #endif], libc_cv_mips_nan2008=yes, libc_cv_mips_nan2008=no)]) + + libc_mips_nan= +diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure +index 4e7fcf1d97..44a9cb3791 100644 +--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure ++++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure +@@ -155,12 +155,12 @@ else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #if _CALL_ELF == 2 +- yes ++ use_ppc_elfv2_abi + #endif + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "yes" >/dev/null 2>&1; then : ++ $EGREP "use_ppc_elfv2_abi" >/dev/null 2>&1; then : + libc_cv_ppc64_elfv2_abi=yes + else + libc_cv_ppc64_elfv2_abi=no +@@ -188,12 +188,12 @@ else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #ifdef _CALL_ELF +- yes ++ is_def_call_elf + #endif + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "yes" >/dev/null 2>&1; then : ++ $EGREP "is_def_call_elf" >/dev/null 2>&1; then : + libc_cv_ppc64_def_call_elf=yes + else + libc_cv_ppc64_def_call_elf=no +diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac +index f9cba6e15d..b21f72f1e4 100644 +--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac ++++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac +@@ -6,8 +6,8 @@ LIBC_SLIBDIR_RTLDDIR([lib64], [lib64]) + # Define default-abi according to compiler flags. + AC_CACHE_CHECK([whether the compiler is using the PowerPC64 ELFv2 ABI], + [libc_cv_ppc64_elfv2_abi], +- [AC_EGREP_CPP(yes,[#if _CALL_ELF == 2 +- yes ++ [AC_EGREP_CPP(use_ppc_elfv2_abi,[#if _CALL_ELF == 2 ++ use_ppc_elfv2_abi + #endif + ], libc_cv_ppc64_elfv2_abi=yes, libc_cv_ppc64_elfv2_abi=no)]) + if test $libc_cv_ppc64_elfv2_abi = yes; then +@@ -19,8 +19,8 @@ else + # Compiler that do not support ELFv2 ABI does not define _CALL_ELF + AC_CACHE_CHECK([whether the compiler defines _CALL_ELF], + [libc_cv_ppc64_def_call_elf], +- [AC_EGREP_CPP(yes,[#ifdef _CALL_ELF +- yes ++ [AC_EGREP_CPP(is_def_call_elf,[#ifdef _CALL_ELF ++ is_def_call_elf + #endif + ], libc_cv_ppc64_def_call_elf=yes, libc_cv_ppc64_def_call_elf=no)]) + if test $libc_cv_ppc64_def_call_elf = no; then +-- +2.13.2 + diff --git a/meta/recipes-core/glibc/glibc/0015-timezone-re-written-tzselect-as-posix-sh.patch b/meta/recipes-core/glibc/glibc/0015-timezone-re-written-tzselect-as-posix-sh.patch new file mode 100644 index 0000000000..b5feffa06a --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0015-timezone-re-written-tzselect-as-posix-sh.patch @@ -0,0 +1,45 @@ +From b8cb8cb242cb751d888feb1ada5c4d0f05cbc1d7 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 18 Mar 2015 00:33:03 +0000 +Subject: [PATCH 15/25] timezone: re-written tzselect as posix sh + +To avoid the bash dependency. + +Upstream-Status: Pending + +Signed-off-by: Hongxu Jia +Signed-off-by: Khem Raj +--- + timezone/Makefile | 2 +- + timezone/tzselect.ksh | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/timezone/Makefile b/timezone/Makefile +index d6cc7ba357..e4ead6e1a7 100644 +--- a/timezone/Makefile ++++ b/timezone/Makefile +@@ -122,7 +122,7 @@ $(testdata)/XT%: testdata/XT% + cp $< $@ + + $(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make +- sed -e 's|/bin/bash|$(BASH)|' \ ++ sed -e 's|/bin/bash|/bin/sh|' \ + -e 's|TZDIR=[^}]*|TZDIR=$(zonedir)|' \ + -e '/TZVERSION=/s|see_Makefile|"$(version)"|' \ + -e '/PKGVERSION=/s|=.*|="$(PKGVERSION)"|' \ +diff --git a/timezone/tzselect.ksh b/timezone/tzselect.ksh +index d2c3a6d1dd..089679f306 100755 +--- a/timezone/tzselect.ksh ++++ b/timezone/tzselect.ksh +@@ -35,7 +35,7 @@ REPORT_BUGS_TO=tz@iana.org + + # Specify default values for environment variables if they are unset. + : ${AWK=awk} +-: ${TZDIR=`pwd`} ++: ${TZDIR=$(pwd)} + + # Output one argument as-is to standard output. + # Safer than 'echo', which can mishandle '\' or leading '-'. +-- +2.13.2 + diff --git a/meta/recipes-core/glibc/glibc/0015-yes-within-the-path-sets-wrong-config-variables.patch b/meta/recipes-core/glibc/glibc/0015-yes-within-the-path-sets-wrong-config-variables.patch deleted file mode 100644 index 98d425a7bd..0000000000 --- a/meta/recipes-core/glibc/glibc/0015-yes-within-the-path-sets-wrong-config-variables.patch +++ /dev/null @@ -1,263 +0,0 @@ -From 18d64951cbb68d8d75e8ef347cbd0e0a5c14604b Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 18 Mar 2015 00:31:06 +0000 -Subject: [PATCH 15/26] 'yes' within the path sets wrong config variables - -It seems that the 'AC_EGREP_CPP(yes...' example is quite popular -but being such a short word to grep it is likely to produce -false-positive matches with the path it is configured into. - -The change is to use a more elaborated string to grep for. - -Upstream-Status: Submitted [libc-alpha@sourceware.org] - -Signed-off-by: Benjamin Esquivel -Signed-off-by: Khem Raj ---- - sysdeps/aarch64/configure | 4 ++-- - sysdeps/aarch64/configure.ac | 4 ++-- - sysdeps/arm/configure | 4 ++-- - sysdeps/arm/configure.ac | 4 ++-- - sysdeps/mips/configure | 4 ++-- - sysdeps/mips/configure.ac | 4 ++-- - sysdeps/nios2/configure | 4 ++-- - sysdeps/nios2/configure.ac | 4 ++-- - sysdeps/unix/sysv/linux/mips/configure | 4 ++-- - sysdeps/unix/sysv/linux/mips/configure.ac | 4 ++-- - sysdeps/unix/sysv/linux/powerpc/powerpc64/configure | 8 ++++---- - sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac | 8 ++++---- - 12 files changed, 28 insertions(+), 28 deletions(-) - -diff --git a/sysdeps/aarch64/configure b/sysdeps/aarch64/configure -index 5bd355a..3bc5537 100644 ---- a/sysdeps/aarch64/configure -+++ b/sysdeps/aarch64/configure -@@ -148,12 +148,12 @@ else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #ifdef __AARCH64EB__ -- yes -+ is_aarch64_be - #endif - - _ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "yes" >/dev/null 2>&1; then : -+ $EGREP "is_aarch64_be" >/dev/null 2>&1; then : - libc_cv_aarch64_be=yes - else - libc_cv_aarch64_be=no -diff --git a/sysdeps/aarch64/configure.ac b/sysdeps/aarch64/configure.ac -index 7851dd4..6e92381 100644 ---- a/sysdeps/aarch64/configure.ac -+++ b/sysdeps/aarch64/configure.ac -@@ -10,8 +10,8 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. - # the dynamic linker via %ifdef. - AC_CACHE_CHECK([for big endian], - [libc_cv_aarch64_be], -- [AC_EGREP_CPP(yes,[#ifdef __AARCH64EB__ -- yes -+ [AC_EGREP_CPP(is_aarch64_be,[#ifdef __AARCH64EB__ -+ is_aarch64_be - #endif - ], libc_cv_aarch64_be=yes, libc_cv_aarch64_be=no)]) - if test $libc_cv_aarch64_be = yes; then -diff --git a/sysdeps/arm/configure b/sysdeps/arm/configure -index 431e843..e152461 100644 ---- a/sysdeps/arm/configure -+++ b/sysdeps/arm/configure -@@ -151,12 +151,12 @@ else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #ifdef __ARM_PCS_VFP -- yes -+ use_arm_pcs_vfp - #endif - - _ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "yes" >/dev/null 2>&1; then : -+ $EGREP "use_arm_pcs_vfp" >/dev/null 2>&1; then : - libc_cv_arm_pcs_vfp=yes - else - libc_cv_arm_pcs_vfp=no -diff --git a/sysdeps/arm/configure.ac b/sysdeps/arm/configure.ac -index 90cdd69..05a262b 100644 ---- a/sysdeps/arm/configure.ac -+++ b/sysdeps/arm/configure.ac -@@ -15,8 +15,8 @@ AC_DEFINE(PI_STATIC_AND_HIDDEN) - # the dynamic linker via %ifdef. - AC_CACHE_CHECK([whether the compiler is using the ARM hard-float ABI], - [libc_cv_arm_pcs_vfp], -- [AC_EGREP_CPP(yes,[#ifdef __ARM_PCS_VFP -- yes -+ [AC_EGREP_CPP(use_arm_pcs_vfp,[#ifdef __ARM_PCS_VFP -+ use_arm_pcs_vfp - #endif - ], libc_cv_arm_pcs_vfp=yes, libc_cv_arm_pcs_vfp=no)]) - if test $libc_cv_arm_pcs_vfp = yes; then -diff --git a/sysdeps/mips/configure b/sysdeps/mips/configure -index 4e13248..f14af95 100644 ---- a/sysdeps/mips/configure -+++ b/sysdeps/mips/configure -@@ -143,11 +143,11 @@ else - /* end confdefs.h. */ - dnl - #ifdef __mips_nan2008 --yes -+use_mips_nan2008 - #endif - _ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "yes" >/dev/null 2>&1; then : -+ $EGREP "use_mips_nan2008" >/dev/null 2>&1; then : - libc_cv_mips_nan2008=yes - else - libc_cv_mips_nan2008=no -diff --git a/sysdeps/mips/configure.ac b/sysdeps/mips/configure.ac -index bcbdaff..ad3057f 100644 ---- a/sysdeps/mips/configure.ac -+++ b/sysdeps/mips/configure.ac -@@ -6,9 +6,9 @@ dnl position independent way. - dnl AC_DEFINE(PI_STATIC_AND_HIDDEN) - - AC_CACHE_CHECK([whether the compiler is using the 2008 NaN encoding], -- libc_cv_mips_nan2008, [AC_EGREP_CPP(yes, [dnl -+ libc_cv_mips_nan2008, [AC_EGREP_CPP(use_mips_nan2008, [dnl - #ifdef __mips_nan2008 --yes -+use_mips_nan2008 - #endif], libc_cv_mips_nan2008=yes, libc_cv_mips_nan2008=no)]) - if test x$libc_cv_mips_nan2008 = xyes; then - AC_DEFINE(HAVE_MIPS_NAN2008) -diff --git a/sysdeps/nios2/configure b/sysdeps/nios2/configure -index 14c8a3a..dde3814 100644 ---- a/sysdeps/nios2/configure -+++ b/sysdeps/nios2/configure -@@ -142,12 +142,12 @@ else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #ifdef __nios2_big_endian__ -- yes -+ is_nios2_be - #endif - - _ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "yes" >/dev/null 2>&1; then : -+ $EGREP "is_nios2_be" >/dev/null 2>&1; then : - libc_cv_nios2_be=yes - else - libc_cv_nios2_be=no -diff --git a/sysdeps/nios2/configure.ac b/sysdeps/nios2/configure.ac -index f05f438..dc86399 100644 ---- a/sysdeps/nios2/configure.ac -+++ b/sysdeps/nios2/configure.ac -@@ -4,8 +4,8 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. - # Nios II big endian is not yet supported. - AC_CACHE_CHECK([for big endian], - [libc_cv_nios2_be], -- [AC_EGREP_CPP(yes,[#ifdef __nios2_big_endian__ -- yes -+ [AC_EGREP_CPP(is_nios2_be,[#ifdef __nios2_big_endian__ -+ is_nios2_be - #endif - ], libc_cv_nios2_be=yes, libc_cv_nios2_be=no)]) - if test $libc_cv_nios2_be = yes; then -diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure -index a5513fa..283b293 100644 ---- a/sysdeps/unix/sysv/linux/mips/configure -+++ b/sysdeps/unix/sysv/linux/mips/configure -@@ -414,11 +414,11 @@ else - /* end confdefs.h. */ - dnl - #ifdef __mips_nan2008 --yes -+use_mips_nan2008 - #endif - _ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "yes" >/dev/null 2>&1; then : -+ $EGREP "use_mips_nan2008" >/dev/null 2>&1; then : - libc_cv_mips_nan2008=yes - else - libc_cv_mips_nan2008=no -diff --git a/sysdeps/unix/sysv/linux/mips/configure.ac b/sysdeps/unix/sysv/linux/mips/configure.ac -index 9147aa4..7898e24 100644 ---- a/sysdeps/unix/sysv/linux/mips/configure.ac -+++ b/sysdeps/unix/sysv/linux/mips/configure.ac -@@ -105,9 +105,9 @@ AC_COMPILE_IFELSE( - LIBC_CONFIG_VAR([mips-mode-switch],[${libc_mips_mode_switch}]) - - AC_CACHE_CHECK([whether the compiler is using the 2008 NaN encoding], -- libc_cv_mips_nan2008, [AC_EGREP_CPP(yes, [dnl -+ libc_cv_mips_nan2008, [AC_EGREP_CPP(use_mips_nan2008, [dnl - #ifdef __mips_nan2008 --yes -+use_mips_nan2008 - #endif], libc_cv_mips_nan2008=yes, libc_cv_mips_nan2008=no)]) - - libc_mips_nan= -diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure -index af06970..27b8c1b 100644 ---- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure -+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure -@@ -155,12 +155,12 @@ else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #if _CALL_ELF == 2 -- yes -+ use_ppc_elfv2_abi - #endif - - _ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "yes" >/dev/null 2>&1; then : -+ $EGREP "use_ppc_elfv2_abi" >/dev/null 2>&1; then : - libc_cv_ppc64_elfv2_abi=yes - else - libc_cv_ppc64_elfv2_abi=no -@@ -188,12 +188,12 @@ else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #ifdef _CALL_ELF -- yes -+ is_def_call_elf - #endif - - _ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "yes" >/dev/null 2>&1; then : -+ $EGREP "is_def_call_elf" >/dev/null 2>&1; then : - libc_cv_ppc64_def_call_elf=yes - else - libc_cv_ppc64_def_call_elf=no -diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac -index 0822915..9a32fdd 100644 ---- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac -+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac -@@ -6,8 +6,8 @@ LIBC_SLIBDIR_RTLDDIR([lib64], [lib64]) - # Define default-abi according to compiler flags. - AC_CACHE_CHECK([whether the compiler is using the PowerPC64 ELFv2 ABI], - [libc_cv_ppc64_elfv2_abi], -- [AC_EGREP_CPP(yes,[#if _CALL_ELF == 2 -- yes -+ [AC_EGREP_CPP(use_ppc_elfv2_abi,[#if _CALL_ELF == 2 -+ use_ppc_elfv2_abi - #endif - ], libc_cv_ppc64_elfv2_abi=yes, libc_cv_ppc64_elfv2_abi=no)]) - if test $libc_cv_ppc64_elfv2_abi = yes; then -@@ -19,8 +19,8 @@ else - # Compiler that do not support ELFv2 ABI does not define _CALL_ELF - AC_CACHE_CHECK([whether the compiler defines _CALL_ELF], - [libc_cv_ppc64_def_call_elf], -- [AC_EGREP_CPP(yes,[#ifdef _CALL_ELF -- yes -+ [AC_EGREP_CPP(is_def_call_elf,[#ifdef _CALL_ELF -+ is_def_call_elf - #endif - ], libc_cv_ppc64_def_call_elf=yes, libc_cv_ppc64_def_call_elf=no)]) - if test $libc_cv_ppc64_def_call_elf = no; then --- -2.10.2 - diff --git a/meta/recipes-core/glibc/glibc/0016-Remove-bash-dependency-for-nscd-init-script.patch b/meta/recipes-core/glibc/glibc/0016-Remove-bash-dependency-for-nscd-init-script.patch new file mode 100644 index 0000000000..1d9983b8e5 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0016-Remove-bash-dependency-for-nscd-init-script.patch @@ -0,0 +1,75 @@ +From 69d378001adfe9a359d2f4b069c1ed2d36de4480 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 31 Dec 2015 14:33:02 -0800 +Subject: [PATCH 16/25] Remove bash dependency for nscd init script + +The nscd init script uses #! /bin/bash but only really uses one bashism +(translated strings), so remove them and switch the shell to #!/bin/sh. + +Upstream-Status: Pending + +Signed-off-by: Ross Burton +Signed-off-by: Khem Raj +--- + nscd/nscd.init | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/nscd/nscd.init b/nscd/nscd.init +index a882da7d8b..b02986ec15 100644 +--- a/nscd/nscd.init ++++ b/nscd/nscd.init +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + # + # nscd: Starts the Name Switch Cache Daemon + # +@@ -49,7 +49,7 @@ prog=nscd + start () { + [ -d /var/run/nscd ] || mkdir /var/run/nscd + [ -d /var/db/nscd ] || mkdir /var/db/nscd +- echo -n $"Starting $prog: " ++ echo -n "Starting $prog: " + daemon /usr/sbin/nscd + RETVAL=$? + echo +@@ -58,7 +58,7 @@ start () { + } + + stop () { +- echo -n $"Stopping $prog: " ++ echo -n "Stopping $prog: " + /usr/sbin/nscd -K + RETVAL=$? + if [ $RETVAL -eq 0 ]; then +@@ -67,9 +67,9 @@ stop () { + # a non-privileged user + rm -f /var/run/nscd/nscd.pid + rm -f /var/run/nscd/socket +- success $"$prog shutdown" ++ success "$prog shutdown" + else +- failure $"$prog shutdown" ++ failure "$prog shutdown" + fi + echo + return $RETVAL +@@ -103,13 +103,13 @@ case "$1" in + RETVAL=$? + ;; + force-reload | reload) +- echo -n $"Reloading $prog: " ++ echo -n "Reloading $prog: " + killproc /usr/sbin/nscd -HUP + RETVAL=$? + echo + ;; + *) +- echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}" ++ echo "Usage: $0 {start|stop|status|restart|reload|condrestart}" + RETVAL=1 + ;; + esac +-- +2.13.2 + diff --git a/meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch b/meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch deleted file mode 100644 index 426a2c0c2d..0000000000 --- a/meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 2bed515b9f9f613ae0db9b9607d8fa60a4afca5b Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 18 Mar 2015 00:33:03 +0000 -Subject: [PATCH 16/26] timezone: re-written tzselect as posix sh - -To avoid the bash dependency. - -Upstream-Status: Pending - -Signed-off-by: Hongxu Jia -Signed-off-by: Khem Raj ---- - timezone/Makefile | 2 +- - timezone/tzselect.ksh | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/timezone/Makefile b/timezone/Makefile -index dee7568..66a50be 100644 ---- a/timezone/Makefile -+++ b/timezone/Makefile -@@ -120,7 +120,7 @@ $(testdata)/XT%: testdata/XT% - cp $< $@ - - $(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make -- sed -e 's|/bin/bash|$(BASH)|' \ -+ sed -e 's|/bin/bash|/bin/sh|' \ - -e 's|TZDIR=[^}]*|TZDIR=$(zonedir)|' \ - -e '/TZVERSION=/s|see_Makefile|"$(version)"|' \ - -e '/PKGVERSION=/s|=.*|="$(PKGVERSION)"|' \ -diff --git a/timezone/tzselect.ksh b/timezone/tzselect.ksh -index 2c3b2f4..0c04a61 100755 ---- a/timezone/tzselect.ksh -+++ b/timezone/tzselect.ksh -@@ -35,7 +35,7 @@ REPORT_BUGS_TO=tz@iana.org - - # Specify default values for environment variables if they are unset. - : ${AWK=awk} --: ${TZDIR=`pwd`} -+: ${TZDIR=$(pwd)} - - # Output one argument as-is to standard output. - # Safer than 'echo', which can mishandle '\' or leading '-'. --- -2.10.2 - diff --git a/meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch b/meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch deleted file mode 100644 index e44be894f6..0000000000 --- a/meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch +++ /dev/null @@ -1,74 +0,0 @@ -From c8814875b362efbfd778345d0d2777478bf11a30 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Thu, 31 Dec 2015 14:33:02 -0800 -Subject: [PATCH 17/26] Remove bash dependency for nscd init script - -The nscd init script uses #! /bin/bash but only really uses one bashism -(translated strings), so remove them and switch the shell to #!/bin/sh. - -Signed-off-by: Ross Burton -Signed-off-by: Khem Raj -Upstream-Status: Inappropriate ---- - nscd/nscd.init | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - -diff --git a/nscd/nscd.init b/nscd/nscd.init -index a882da7..b02986e 100644 ---- a/nscd/nscd.init -+++ b/nscd/nscd.init -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - # - # nscd: Starts the Name Switch Cache Daemon - # -@@ -49,7 +49,7 @@ prog=nscd - start () { - [ -d /var/run/nscd ] || mkdir /var/run/nscd - [ -d /var/db/nscd ] || mkdir /var/db/nscd -- echo -n $"Starting $prog: " -+ echo -n "Starting $prog: " - daemon /usr/sbin/nscd - RETVAL=$? - echo -@@ -58,7 +58,7 @@ start () { - } - - stop () { -- echo -n $"Stopping $prog: " -+ echo -n "Stopping $prog: " - /usr/sbin/nscd -K - RETVAL=$? - if [ $RETVAL -eq 0 ]; then -@@ -67,9 +67,9 @@ stop () { - # a non-privileged user - rm -f /var/run/nscd/nscd.pid - rm -f /var/run/nscd/socket -- success $"$prog shutdown" -+ success "$prog shutdown" - else -- failure $"$prog shutdown" -+ failure "$prog shutdown" - fi - echo - return $RETVAL -@@ -103,13 +103,13 @@ case "$1" in - RETVAL=$? - ;; - force-reload | reload) -- echo -n $"Reloading $prog: " -+ echo -n "Reloading $prog: " - killproc /usr/sbin/nscd -HUP - RETVAL=$? - echo - ;; - *) -- echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}" -+ echo "Usage: $0 {start|stop|status|restart|reload|condrestart}" - RETVAL=1 - ;; - esac --- -2.10.2 - diff --git a/meta/recipes-core/glibc/glibc/0017-eglibc-Cross-building-and-testing-instructions.patch b/meta/recipes-core/glibc/glibc/0017-eglibc-Cross-building-and-testing-instructions.patch new file mode 100644 index 0000000000..3e39d7458c --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0017-eglibc-Cross-building-and-testing-instructions.patch @@ -0,0 +1,619 @@ +From cdc88dffa226815e3a218604655459e33dc86483 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 18 Mar 2015 00:42:58 +0000 +Subject: [PATCH 17/25] eglibc: Cross building and testing instructions + +Ported from eglibc +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + GLIBC.cross-building | 383 +++++++++++++++++++++++++++++++++++++++++++++++++++ + GLIBC.cross-testing | 205 +++++++++++++++++++++++++++ + 2 files changed, 588 insertions(+) + create mode 100644 GLIBC.cross-building + create mode 100644 GLIBC.cross-testing + +diff --git a/GLIBC.cross-building b/GLIBC.cross-building +new file mode 100644 +index 0000000000..e6e0da1aaf +--- /dev/null ++++ b/GLIBC.cross-building +@@ -0,0 +1,383 @@ ++ -*- mode: text -*- ++ ++ Cross-Compiling GLIBC ++ Jim Blandy ++ ++ ++Introduction ++ ++Most GNU tools have a simple build procedure: you run their ++'configure' script, and then you run 'make'. Unfortunately, the ++process of cross-compiling the GNU C library is quite a bit more ++involved: ++ ++1) Build a cross-compiler, with certain facilities disabled. ++ ++2) Configure the C library using the compiler you built in step 1). ++ Build a few of the C run-time object files, but not the rest of the ++ library. Install the library's header files and the run-time ++ object files, and create a dummy libc.so. ++ ++3) Build a second cross-compiler, using the header files and object ++ files you installed in step 2. ++ ++4) Configure, build, and install a fresh C library, using the compiler ++ built in step 3. ++ ++5) Build a third cross-compiler, based on the C library built in step 4. ++ ++The reason for this complexity is that, although GCC and the GNU C ++library are distributed separately, they are not actually independent ++of each other: GCC requires the C library's headers and some object ++files to compile its own libraries, while the C library depends on ++GCC's libraries. GLIBC includes features and bug fixes to the stock ++GNU C library that simplify this process, but the fundamental ++interdependency stands. ++ ++In this document, we explain how to cross-compile an GLIBC/GCC pair ++from source. Our intended audience is developers who are already ++familiar with the GNU toolchain and comfortable working with ++cross-development tools. While we do present a worked example to ++accompany the explanation, for clarity's sake we do not cover many of ++the options available to cross-toolchain users. ++ ++ ++Preparation ++ ++GLIBC requires recent versions of the GNU binutils, GCC, and the ++Linux kernel. The web page ++documents the current requirements, and lists patches needed for ++certain target architectures. As of this writing, these build ++instructions have been tested with binutils 2.22.51, GCC 4.6.2, ++and Linux 3.1. ++ ++First, let's set some variables, to simplify later commands. We'll ++build GLIBC and GCC for an ARM target, known to the Linux kernel ++as 'arm', and we'll do the build on an Intel x86_64 Linux box: ++ ++ $ build=x86_64-pc-linux-gnu ++ $ host=$build ++ $ target=arm-none-linux-gnueabi ++ $ linux_arch=arm ++ ++We're using the aforementioned versions of Binutils, GCC, and Linux: ++ ++ $ binutilsv=binutils-2.22.51 ++ $ gccv=gcc-4.6.2 ++ $ linuxv=linux-3.1 ++ ++We're carrying out the entire process under '~/cross-build', which ++contains unpacked source trees for binutils, gcc, and linux kernel, ++along with GLIBC svn trunk (which can be checked-out with ++'svn co http://www.eglibc.org/svn/trunk eglibc'): ++ ++ $ top=$HOME/cross-build/$target ++ $ src=$HOME/cross-build/src ++ $ ls $src ++ binutils-2.22.51 glibc gcc-4.6.2 linux-3.1 ++ ++We're going to place our build directories in a subdirectory 'obj', ++we'll install the cross-development toolchain in 'tools', and we'll ++place our sysroot (containing files to be installed on the target ++system) in 'sysroot': ++ ++ $ obj=$top/obj ++ $ tools=$top/tools ++ $ sysroot=$top/sysroot ++ ++ ++Binutils ++ ++Configuring and building binutils for the target is straightforward: ++ ++ $ mkdir -p $obj/binutils ++ $ cd $obj/binutils ++ $ $src/$binutilsv/configure \ ++ > --target=$target \ ++ > --prefix=$tools \ ++ > --with-sysroot=$sysroot ++ $ make ++ $ make install ++ ++ ++The First GCC ++ ++For our work, we need a cross-compiler targeting an ARM Linux ++system. However, that configuration includes the shared library ++'libgcc_s.so', which is compiled against the GLIBC headers (which we ++haven't installed yet) and linked against 'libc.so' (which we haven't ++built yet). ++ ++Fortunately, there are configuration options for GCC which tell it not ++to build 'libgcc_s.so'. The '--without-headers' option is supposed to ++take care of this, but its implementation is incomplete, so you must ++also configure with the '--with-newlib' option. While '--with-newlib' ++appears to mean "Use the Newlib C library", its effect is to tell the ++GCC build machinery, "Don't assume there is a C library available." ++ ++We also need to disable some of the libraries that would normally be ++built along with GCC, and specify that only the compiler for the C ++language is needed. ++ ++So, we create a build directory, configure, make, and install. ++ ++ $ mkdir -p $obj/gcc1 ++ $ cd $obj/gcc1 ++ $ $src/$gccv/configure \ ++ > --target=$target \ ++ > --prefix=$tools \ ++ > --without-headers --with-newlib \ ++ > --disable-shared --disable-threads --disable-libssp \ ++ > --disable-libgomp --disable-libmudflap --disable-libquadmath \ ++ > --disable-decimal-float --disable-libffi \ ++ > --enable-languages=c ++ $ PATH=$tools/bin:$PATH make ++ $ PATH=$tools/bin:$PATH make install ++ ++ ++Linux Kernel Headers ++ ++To configure GLIBC, we also need Linux kernel headers in place. ++Fortunately, the Linux makefiles have a target that installs them for ++us. Since the process does modify the source tree a bit, we make a ++copy first: ++ ++ $ cp -r $src/$linuxv $obj/linux ++ $ cd $obj/linux ++ ++Now we're ready to install the headers into the sysroot: ++ ++ $ PATH=$tools/bin:$PATH \ ++ > make headers_install \ ++ > ARCH=$linux_arch CROSS_COMPILE=$target- \ ++ > INSTALL_HDR_PATH=$sysroot/usr ++ ++ ++GLIBC Headers and Preliminary Objects ++ ++Using the cross-compiler we've just built, we can now configure GLIBC ++well enough to install the headers and build the object files that the ++full cross-compiler will need: ++ ++ $ mkdir -p $obj/glibc-headers ++ $ cd $obj/glibc-headers ++ $ BUILD_CC=gcc \ ++ > CC=$tools/bin/$target-gcc \ ++ > CXX=$tools/bin/$target-g++ \ ++ > AR=$tools/bin/$target-ar \ ++ > RANLIB=$tools/bin/$target-ranlib \ ++ > $src/glibc/libc/configure \ ++ > --prefix=/usr \ ++ > --with-headers=$sysroot/usr/include \ ++ > --build=$build \ ++ > --host=$target \ ++ > --disable-profile --without-gd --without-cvs \ ++ > --enable-add-ons=nptl,libidn,../ports ++ ++The option '--prefix=/usr' may look strange, but you should never ++configure GLIBC with a prefix other than '/usr': in various places, ++GLIBC's build system checks whether the prefix is '/usr', and does ++special handling only if that is the case. Unless you use this ++prefix, you will get a sysroot that does not use the standard Linux ++directory layouts and cannot be used as a basis for the root ++filesystem on your target system compatibly with normal GLIBC ++installations. ++ ++The '--with-headers' option tells GLIBC where the Linux headers have ++been installed. ++ ++The '--enable-add-ons=nptl,libidn,../ports' option tells GLIBC to look ++for the listed glibc add-ons. Most notably the ports add-on (located ++just above the libc sources in the GLIBC svn tree) is required to ++support ARM targets. ++ ++We can now use the 'install-headers' makefile target to install the ++headers: ++ ++ $ make install-headers install_root=$sysroot \ ++ > install-bootstrap-headers=yes ++ ++The 'install_root' variable indicates where the files should actually ++be installed; its value is treated as the parent of the '--prefix' ++directory we passed to the configure script, so the headers will go in ++'$sysroot/usr/include'. The 'install-bootstrap-headers' variable ++requests special handling for certain tricky header files. ++ ++Next, there are a few object files needed to link shared libraries, ++which we build and install by hand: ++ ++ $ mkdir -p $sysroot/usr/lib ++ $ make csu/subdir_lib ++ $ cp csu/crt1.o csu/crti.o csu/crtn.o $sysroot/usr/lib ++ ++Finally, 'libgcc_s.so' requires a 'libc.so' to link against. However, ++since we will never actually execute its code, it doesn't matter what ++it contains. So, treating '/dev/null' as a C source file, we produce ++a dummy 'libc.so' in one step: ++ ++ $ $tools/bin/$target-gcc -nostdlib -nostartfiles -shared -x c /dev/null \ ++ > -o $sysroot/usr/lib/libc.so ++ ++ ++The Second GCC ++ ++With the GLIBC headers and selected object files installed, we can ++now build a GCC that is capable of compiling GLIBC. We configure, ++build, and install the second GCC, again building only the C compiler, ++and avoiding libraries we won't use: ++ ++ $ mkdir -p $obj/gcc2 ++ $ cd $obj/gcc2 ++ $ $src/$gccv/configure \ ++ > --target=$target \ ++ > --prefix=$tools \ ++ > --with-sysroot=$sysroot \ ++ > --disable-libssp --disable-libgomp --disable-libmudflap \ ++ > --disable-libffi --disable-libquadmath \ ++ > --enable-languages=c ++ $ PATH=$tools/bin:$PATH make ++ $ PATH=$tools/bin:$PATH make install ++ ++ ++GLIBC, Complete ++ ++With the second compiler built and installed, we're now ready for the ++full GLIBC build: ++ ++ $ mkdir -p $obj/glibc ++ $ cd $obj/glibc ++ $ BUILD_CC=gcc \ ++ > CC=$tools/bin/$target-gcc \ ++ > CXX=$tools/bin/$target-g++ \ ++ > AR=$tools/bin/$target-ar \ ++ > RANLIB=$tools/bin/$target-ranlib \ ++ > $src/glibc/libc/configure \ ++ > --prefix=/usr \ ++ > --with-headers=$sysroot/usr/include \ ++ > --with-kconfig=$obj/linux/scripts/kconfig \ ++ > --build=$build \ ++ > --host=$target \ ++ > --disable-profile --without-gd --without-cvs \ ++ > --enable-add-ons=nptl,libidn,../ports ++ ++Note the additional '--with-kconfig' option. This tells GLIBC where to ++find the host config tools used by the kernel 'make config' and 'make ++menuconfig'. These tools can be re-used by GLIBC for its own 'make ++*config' support, which will create 'option-groups.config' for you. ++But first make sure those tools have been built by running some ++dummy 'make *config' calls in the kernel directory: ++ ++ $ cd $obj/linux ++ $ PATH=$tools/bin:$PATH make config \ ++ > ARCH=$linux_arch CROSS_COMPILE=$target- \ ++ $ PATH=$tools/bin:$PATH make menuconfig \ ++ > ARCH=$linux_arch CROSS_COMPILE=$target- \ ++ ++Now we can configure and build the full GLIBC: ++ ++ $ cd $obj/glibc ++ $ PATH=$tools/bin:$PATH make defconfig ++ $ PATH=$tools/bin:$PATH make menuconfig ++ $ PATH=$tools/bin:$PATH make ++ $ PATH=$tools/bin:$PATH make install install_root=$sysroot ++ ++At this point, we have a complete GLIBC installation in '$sysroot', ++with header files, library files, and most of the C runtime startup ++files in place. ++ ++ ++The Third GCC ++ ++Finally, we recompile GCC against this full installation, enabling ++whatever languages and libraries we would like to use: ++ ++ $ mkdir -p $obj/gcc3 ++ $ cd $obj/gcc3 ++ $ $src/$gccv/configure \ ++ > --target=$target \ ++ > --prefix=$tools \ ++ > --with-sysroot=$sysroot \ ++ > --enable-__cxa_atexit \ ++ > --disable-libssp --disable-libgomp --disable-libmudflap \ ++ > --enable-languages=c,c++ ++ $ PATH=$tools/bin:$PATH make ++ $ PATH=$tools/bin:$PATH make install ++ ++The '--enable-__cxa_atexit' option tells GCC what sort of C++ ++destructor support to expect from the C library; it's required with ++GLIBC. ++ ++And since GCC's installation process isn't designed to help construct ++sysroot trees, we must manually copy certain libraries into place in ++the sysroot. ++ ++ $ cp -d $tools/$target/lib/libgcc_s.so* $sysroot/lib ++ $ cp -d $tools/$target/lib/libstdc++.so* $sysroot/usr/lib ++ ++ ++Trying Things Out ++ ++At this point, '$tools' contains a cross toolchain ready to use ++the GLIBC installation in '$sysroot': ++ ++ $ cat > hello.c < #include ++ > int ++ > main (int argc, char **argv) ++ > { ++ > puts ("Hello, world!"); ++ > return 0; ++ > } ++ > EOF ++ $ $tools/bin/$target-gcc -Wall hello.c -o hello ++ $ cat > c++-hello.cc < #include ++ > int ++ > main (int argc, char **argv) ++ > { ++ > std::cout << "Hello, C++ world!" << std::endl; ++ > return 0; ++ > } ++ > EOF ++ $ $tools/bin/$target-g++ -Wall c++-hello.cc -o c++-hello ++ ++ ++We can use 'readelf' to verify that these are indeed executables for ++our target, using our dynamic linker: ++ ++ $ $tools/bin/$target-readelf -hl hello ++ ELF Header: ++ ... ++ Type: EXEC (Executable file) ++ Machine: ARM ++ ++ ... ++ Program Headers: ++ Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align ++ PHDR 0x000034 0x10000034 0x10000034 0x00100 0x00100 R E 0x4 ++ INTERP 0x000134 0x00008134 0x00008134 0x00013 0x00013 R 0x1 ++ [Requesting program interpreter: /lib/ld-linux.so.3] ++ LOAD 0x000000 0x00008000 0x00008000 0x0042c 0x0042c R E 0x8000 ++ ... ++ ++Looking at the dynamic section of the installed 'libgcc_s.so', we see ++that the 'NEEDED' entry for the C library does include the '.6' ++suffix, indicating that was linked against our fully build GLIBC, and ++not our dummy 'libc.so': ++ ++ $ $tools/bin/$target-readelf -d $sysroot/lib/libgcc_s.so.1 ++ Dynamic section at offset 0x1083c contains 24 entries: ++ Tag Type Name/Value ++ 0x00000001 (NEEDED) Shared library: [libc.so.6] ++ 0x0000000e (SONAME) Library soname: [libgcc_s.so.1] ++ ... ++ ++ ++And on the target machine, we can run our programs: ++ ++ $ $sysroot/lib/ld.so.1 --library-path $sysroot/lib:$sysroot/usr/lib \ ++ > ./hello ++ Hello, world! ++ $ $sysroot/lib/ld.so.1 --library-path $sysroot/lib:$sysroot/usr/lib \ ++ > ./c++-hello ++ Hello, C++ world! +diff --git a/GLIBC.cross-testing b/GLIBC.cross-testing +new file mode 100644 +index 0000000000..b67b468466 +--- /dev/null ++++ b/GLIBC.cross-testing +@@ -0,0 +1,205 @@ ++ -*- mode: text -*- ++ ++ Cross-Testing With GLIBC ++ Jim Blandy ++ ++ ++Introduction ++ ++Developers writing software for embedded systems often use a desktop ++or other similarly capable computer for development, but need to run ++tests on the embedded system, or perhaps on a simulator. When ++configured for cross-compilation, the stock GNU C library simply ++disables running tests altogether: the command 'make tests' builds ++test programs, but does not run them. GLIBC, however, provides ++facilities for compiling tests and generating data files on the build ++system, but running the test programs themselves on a remote system or ++simulator. ++ ++ ++Test environment requirements ++ ++The test environment must meet certain conditions for GLIBC's ++cross-testing facilities to work: ++ ++- Shared filesystems. The 'build' system, on which you configure and ++ compile GLIBC, and the 'host' system, on which you intend to run ++ GLIBC, must share a filesystem containing the GLIBC build and ++ source trees. Files must appear at the same paths on both systems. ++ ++- Remote-shell like invocation. There must be a way to run a program ++ on the host system from the build system, passing it properly quoted ++ command-line arguments, setting environment variables, and ++ inheriting the caller's standard input and output. ++ ++ ++Usage ++ ++To use GLIBC's cross-testing support, provide values for the ++following Make variables when you invoke 'make': ++ ++- cross-test-wrapper ++ ++ This should be the name of the cross-testing wrapper command, along ++ with any arguments. ++ ++- cross-localedef ++ ++ This should be the name of a cross-capable localedef program, like ++ that included in the GLIBC 'localedef' module, along with any ++ arguments needed. ++ ++These are each explained in detail below. ++ ++ ++The Cross-Testing Wrapper ++ ++To run test programs reliably, the stock GNU C library takes care to ++ensure that test programs use the newly compiled dynamic linker and ++shared libraries, and never the host system's installed libraries. To ++accomplish this, it runs the tests by explicitly invoking the dynamic ++linker from the build tree, passing it a list of build tree ++directories to search for shared libraries, followed by the name of ++the executable to run and its arguments. ++ ++For example, where one might normally run a test program like this: ++ ++ $ ./tst-foo arg1 arg2 ++ ++the GNU C library might run that program like this: ++ ++ $ $objdir/elf/ld-linux.so.3 --library-path $objdir \ ++ ./tst-foo arg1 arg2 ++ ++(where $objdir is the path to the top of the build tree, and the ++trailing backslash indicates a continuation of the command). In other ++words, each test program invocation is 'wrapped up' inside an explicit ++invocation of the dynamic linker, which must itself execute the test ++program, having loaded shared libraries from the appropriate ++directories. ++ ++To support cross-testing, GLIBC allows the developer to optionally ++set the 'cross-test-wrapper' Make variable to another wrapper command, ++to which it passes the entire dynamic linker invocation shown above as ++arguments. For example, if the developer supplies a wrapper of ++'my-wrapper hostname', then GLIBC would run the test above as ++follows: ++ ++ $ my-wrapper hostname \ ++ $objdir/elf/ld-linux.so.3 --library-path $objdir \ ++ ./tst-foo arg1 arg2 ++ ++The 'my-wrapper' command is responsible for executing the command ++given on the host system. ++ ++Since tests are run in varying directories, the wrapper should either ++be in your command search path, or 'cross-test-wrapper' should give an ++absolute path for the wrapper. ++ ++The wrapper must meet several requirements: ++ ++- It must preserve the current directory. As explained above, the ++ build directory tree must be visible on both the build and host ++ systems, at the same path. The test wrapper must ensure that the ++ current directory it inherits is also inherited by the dynamic ++ linker (and thus the test program itself). ++ ++- It must preserve environment variables' values. Many GLIBC tests ++ set environment variables for test runs; in native testing, it ++ invokes programs like this: ++ ++ $ GCONV_PATH=$objdir/iconvdata \ ++ $objdir/elf/ld-linux.so.3 --library-path $objdir \ ++ ./tst-foo arg1 arg2 ++ ++ With the cross-testing wrapper, that invocation becomes: ++ ++ $ GCONV_PATH=$objdir/iconvdata \ ++ my-wrapper hostname \ ++ $objdir/elf/ld-linux.so.3 --library-path $objdir \ ++ ./tst-foo arg1 arg2 ++ ++ Here, 'my-wrapper' must ensure that the value it sees for ++ 'GCONV_PATH' will be seen by the dynamic linker, and thus 'tst-foo' ++ itself. (The wrapper supplied with GLIBC simply preserves the ++ values of *all* enviroment variables, with a fixed set of ++ exceptions.) ++ ++ If your wrapper is a shell script, take care to correctly propagate ++ environment variables whose values contain spaces and shell ++ metacharacters. ++ ++- It must pass the command's arguments, unmodified. The arguments ++ seen by the test program should be exactly those seen by the wrapper ++ (after whatever arguments are given to the wrapper itself). The ++ GLIBC test framework performs all needed shell word splitting and ++ expansion (wildcard expansion, parameter substitution, and so on) ++ before invoking the wrapper; further expansion may break the tests. ++ ++ ++The 'cross-test-ssh.sh' script ++ ++If you want to use 'ssh' (or something sufficiently similar) to run ++test programs on your host system, GLIBC includes a shell script, ++'scripts/cross-test-ssh.sh', which you can use as your wrapper ++command. This script takes care of setting the test command's current ++directory, propagating environment variable values, and carrying ++command-line arguments, all across an 'ssh' connection. You may even ++supply an alternative to 'ssh' on the command line, if needed. ++ ++For more details, pass 'cross-test-ssh.sh' the '--help' option. ++ ++ ++The Cross-Compiling Locale Definition Command ++ ++Some GLIBC tests rely on locales generated especially for the test ++process. In a native configuration, these tests simply run the ++'localedef' command built by the normal GLIBC build process, ++'locale/localedef', to process and install their locales. However, in ++a cross-compiling configuration, this 'localedef' is built for the ++host system, not the build system, and since it requires quite a bit ++of memory to run (we have seen it fail on systems with 64MiB of ++memory), it may not be practical to run it on the host system. ++ ++If set, GLIBC uses the 'cross-localedef' Make variable as the command ++to run on the build system to process and install locales. The ++localedef program built from the GLIBC 'localedef' module is ++suitable. ++ ++The value of 'cross-localedef' may also include command-line arguments ++to be passed to the program; if you are using GLIBC's 'localedef', ++you may include endianness and 'uint32_t' alignment arguments here. ++ ++ ++Example ++ ++In developing GLIBC's cross-testing facility, we invoked 'make' with ++the following script: ++ ++ #!/bin/sh ++ ++ srcdir=... ++ test_hostname=... ++ localedefdir=... ++ cross_gxx=...-g++ ++ ++ wrapper="$srcdir/scripts/cross-test-ssh.sh $test_hostname" ++ localedef="$localedefdir/localedef --little-endian --uint32-align=4" ++ ++ make cross-test-wrapper="$wrapper" \ ++ cross-localedef="$localedef" \ ++ CXX="$cross_gxx" \ ++ "$@" ++ ++ ++Other Cross-Testing Concerns ++ ++Here are notes on some other issues which you may encounter in running ++the GLIBC tests in a cross-compiling environment: ++ ++- Some tests require a C++ cross-compiler; you should set the 'CXX' ++ Make variable to the name of an appropriate cross-compiler. ++ ++- Some tests require access to libstdc++.so.6 and libgcc_s.so.1; we ++ simply place copies of these libraries in the top GLIBC build ++ directory. +-- +2.13.2 + diff --git a/meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch b/meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch deleted file mode 100644 index 2ec01f05c7..0000000000 --- a/meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch +++ /dev/null @@ -1,619 +0,0 @@ -From df96d6b61bb60f13cd3d4989d1afc56d705f4a33 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 18 Mar 2015 00:42:58 +0000 -Subject: [PATCH 18/26] eglibc: Cross building and testing instructions - -Ported from eglibc -Upstream-Status: Pending - -Signed-off-by: Khem Raj ---- - GLIBC.cross-building | 383 +++++++++++++++++++++++++++++++++++++++++++++++++++ - GLIBC.cross-testing | 205 +++++++++++++++++++++++++++ - 2 files changed, 588 insertions(+) - create mode 100644 GLIBC.cross-building - create mode 100644 GLIBC.cross-testing - -diff --git a/GLIBC.cross-building b/GLIBC.cross-building -new file mode 100644 -index 0000000..e6e0da1 ---- /dev/null -+++ b/GLIBC.cross-building -@@ -0,0 +1,383 @@ -+ -*- mode: text -*- -+ -+ Cross-Compiling GLIBC -+ Jim Blandy -+ -+ -+Introduction -+ -+Most GNU tools have a simple build procedure: you run their -+'configure' script, and then you run 'make'. Unfortunately, the -+process of cross-compiling the GNU C library is quite a bit more -+involved: -+ -+1) Build a cross-compiler, with certain facilities disabled. -+ -+2) Configure the C library using the compiler you built in step 1). -+ Build a few of the C run-time object files, but not the rest of the -+ library. Install the library's header files and the run-time -+ object files, and create a dummy libc.so. -+ -+3) Build a second cross-compiler, using the header files and object -+ files you installed in step 2. -+ -+4) Configure, build, and install a fresh C library, using the compiler -+ built in step 3. -+ -+5) Build a third cross-compiler, based on the C library built in step 4. -+ -+The reason for this complexity is that, although GCC and the GNU C -+library are distributed separately, they are not actually independent -+of each other: GCC requires the C library's headers and some object -+files to compile its own libraries, while the C library depends on -+GCC's libraries. GLIBC includes features and bug fixes to the stock -+GNU C library that simplify this process, but the fundamental -+interdependency stands. -+ -+In this document, we explain how to cross-compile an GLIBC/GCC pair -+from source. Our intended audience is developers who are already -+familiar with the GNU toolchain and comfortable working with -+cross-development tools. While we do present a worked example to -+accompany the explanation, for clarity's sake we do not cover many of -+the options available to cross-toolchain users. -+ -+ -+Preparation -+ -+GLIBC requires recent versions of the GNU binutils, GCC, and the -+Linux kernel. The web page -+documents the current requirements, and lists patches needed for -+certain target architectures. As of this writing, these build -+instructions have been tested with binutils 2.22.51, GCC 4.6.2, -+and Linux 3.1. -+ -+First, let's set some variables, to simplify later commands. We'll -+build GLIBC and GCC for an ARM target, known to the Linux kernel -+as 'arm', and we'll do the build on an Intel x86_64 Linux box: -+ -+ $ build=x86_64-pc-linux-gnu -+ $ host=$build -+ $ target=arm-none-linux-gnueabi -+ $ linux_arch=arm -+ -+We're using the aforementioned versions of Binutils, GCC, and Linux: -+ -+ $ binutilsv=binutils-2.22.51 -+ $ gccv=gcc-4.6.2 -+ $ linuxv=linux-3.1 -+ -+We're carrying out the entire process under '~/cross-build', which -+contains unpacked source trees for binutils, gcc, and linux kernel, -+along with GLIBC svn trunk (which can be checked-out with -+'svn co http://www.eglibc.org/svn/trunk eglibc'): -+ -+ $ top=$HOME/cross-build/$target -+ $ src=$HOME/cross-build/src -+ $ ls $src -+ binutils-2.22.51 glibc gcc-4.6.2 linux-3.1 -+ -+We're going to place our build directories in a subdirectory 'obj', -+we'll install the cross-development toolchain in 'tools', and we'll -+place our sysroot (containing files to be installed on the target -+system) in 'sysroot': -+ -+ $ obj=$top/obj -+ $ tools=$top/tools -+ $ sysroot=$top/sysroot -+ -+ -+Binutils -+ -+Configuring and building binutils for the target is straightforward: -+ -+ $ mkdir -p $obj/binutils -+ $ cd $obj/binutils -+ $ $src/$binutilsv/configure \ -+ > --target=$target \ -+ > --prefix=$tools \ -+ > --with-sysroot=$sysroot -+ $ make -+ $ make install -+ -+ -+The First GCC -+ -+For our work, we need a cross-compiler targeting an ARM Linux -+system. However, that configuration includes the shared library -+'libgcc_s.so', which is compiled against the GLIBC headers (which we -+haven't installed yet) and linked against 'libc.so' (which we haven't -+built yet). -+ -+Fortunately, there are configuration options for GCC which tell it not -+to build 'libgcc_s.so'. The '--without-headers' option is supposed to -+take care of this, but its implementation is incomplete, so you must -+also configure with the '--with-newlib' option. While '--with-newlib' -+appears to mean "Use the Newlib C library", its effect is to tell the -+GCC build machinery, "Don't assume there is a C library available." -+ -+We also need to disable some of the libraries that would normally be -+built along with GCC, and specify that only the compiler for the C -+language is needed. -+ -+So, we create a build directory, configure, make, and install. -+ -+ $ mkdir -p $obj/gcc1 -+ $ cd $obj/gcc1 -+ $ $src/$gccv/configure \ -+ > --target=$target \ -+ > --prefix=$tools \ -+ > --without-headers --with-newlib \ -+ > --disable-shared --disable-threads --disable-libssp \ -+ > --disable-libgomp --disable-libmudflap --disable-libquadmath \ -+ > --disable-decimal-float --disable-libffi \ -+ > --enable-languages=c -+ $ PATH=$tools/bin:$PATH make -+ $ PATH=$tools/bin:$PATH make install -+ -+ -+Linux Kernel Headers -+ -+To configure GLIBC, we also need Linux kernel headers in place. -+Fortunately, the Linux makefiles have a target that installs them for -+us. Since the process does modify the source tree a bit, we make a -+copy first: -+ -+ $ cp -r $src/$linuxv $obj/linux -+ $ cd $obj/linux -+ -+Now we're ready to install the headers into the sysroot: -+ -+ $ PATH=$tools/bin:$PATH \ -+ > make headers_install \ -+ > ARCH=$linux_arch CROSS_COMPILE=$target- \ -+ > INSTALL_HDR_PATH=$sysroot/usr -+ -+ -+GLIBC Headers and Preliminary Objects -+ -+Using the cross-compiler we've just built, we can now configure GLIBC -+well enough to install the headers and build the object files that the -+full cross-compiler will need: -+ -+ $ mkdir -p $obj/glibc-headers -+ $ cd $obj/glibc-headers -+ $ BUILD_CC=gcc \ -+ > CC=$tools/bin/$target-gcc \ -+ > CXX=$tools/bin/$target-g++ \ -+ > AR=$tools/bin/$target-ar \ -+ > RANLIB=$tools/bin/$target-ranlib \ -+ > $src/glibc/libc/configure \ -+ > --prefix=/usr \ -+ > --with-headers=$sysroot/usr/include \ -+ > --build=$build \ -+ > --host=$target \ -+ > --disable-profile --without-gd --without-cvs \ -+ > --enable-add-ons=nptl,libidn,../ports -+ -+The option '--prefix=/usr' may look strange, but you should never -+configure GLIBC with a prefix other than '/usr': in various places, -+GLIBC's build system checks whether the prefix is '/usr', and does -+special handling only if that is the case. Unless you use this -+prefix, you will get a sysroot that does not use the standard Linux -+directory layouts and cannot be used as a basis for the root -+filesystem on your target system compatibly with normal GLIBC -+installations. -+ -+The '--with-headers' option tells GLIBC where the Linux headers have -+been installed. -+ -+The '--enable-add-ons=nptl,libidn,../ports' option tells GLIBC to look -+for the listed glibc add-ons. Most notably the ports add-on (located -+just above the libc sources in the GLIBC svn tree) is required to -+support ARM targets. -+ -+We can now use the 'install-headers' makefile target to install the -+headers: -+ -+ $ make install-headers install_root=$sysroot \ -+ > install-bootstrap-headers=yes -+ -+The 'install_root' variable indicates where the files should actually -+be installed; its value is treated as the parent of the '--prefix' -+directory we passed to the configure script, so the headers will go in -+'$sysroot/usr/include'. The 'install-bootstrap-headers' variable -+requests special handling for certain tricky header files. -+ -+Next, there are a few object files needed to link shared libraries, -+which we build and install by hand: -+ -+ $ mkdir -p $sysroot/usr/lib -+ $ make csu/subdir_lib -+ $ cp csu/crt1.o csu/crti.o csu/crtn.o $sysroot/usr/lib -+ -+Finally, 'libgcc_s.so' requires a 'libc.so' to link against. However, -+since we will never actually execute its code, it doesn't matter what -+it contains. So, treating '/dev/null' as a C source file, we produce -+a dummy 'libc.so' in one step: -+ -+ $ $tools/bin/$target-gcc -nostdlib -nostartfiles -shared -x c /dev/null \ -+ > -o $sysroot/usr/lib/libc.so -+ -+ -+The Second GCC -+ -+With the GLIBC headers and selected object files installed, we can -+now build a GCC that is capable of compiling GLIBC. We configure, -+build, and install the second GCC, again building only the C compiler, -+and avoiding libraries we won't use: -+ -+ $ mkdir -p $obj/gcc2 -+ $ cd $obj/gcc2 -+ $ $src/$gccv/configure \ -+ > --target=$target \ -+ > --prefix=$tools \ -+ > --with-sysroot=$sysroot \ -+ > --disable-libssp --disable-libgomp --disable-libmudflap \ -+ > --disable-libffi --disable-libquadmath \ -+ > --enable-languages=c -+ $ PATH=$tools/bin:$PATH make -+ $ PATH=$tools/bin:$PATH make install -+ -+ -+GLIBC, Complete -+ -+With the second compiler built and installed, we're now ready for the -+full GLIBC build: -+ -+ $ mkdir -p $obj/glibc -+ $ cd $obj/glibc -+ $ BUILD_CC=gcc \ -+ > CC=$tools/bin/$target-gcc \ -+ > CXX=$tools/bin/$target-g++ \ -+ > AR=$tools/bin/$target-ar \ -+ > RANLIB=$tools/bin/$target-ranlib \ -+ > $src/glibc/libc/configure \ -+ > --prefix=/usr \ -+ > --with-headers=$sysroot/usr/include \ -+ > --with-kconfig=$obj/linux/scripts/kconfig \ -+ > --build=$build \ -+ > --host=$target \ -+ > --disable-profile --without-gd --without-cvs \ -+ > --enable-add-ons=nptl,libidn,../ports -+ -+Note the additional '--with-kconfig' option. This tells GLIBC where to -+find the host config tools used by the kernel 'make config' and 'make -+menuconfig'. These tools can be re-used by GLIBC for its own 'make -+*config' support, which will create 'option-groups.config' for you. -+But first make sure those tools have been built by running some -+dummy 'make *config' calls in the kernel directory: -+ -+ $ cd $obj/linux -+ $ PATH=$tools/bin:$PATH make config \ -+ > ARCH=$linux_arch CROSS_COMPILE=$target- \ -+ $ PATH=$tools/bin:$PATH make menuconfig \ -+ > ARCH=$linux_arch CROSS_COMPILE=$target- \ -+ -+Now we can configure and build the full GLIBC: -+ -+ $ cd $obj/glibc -+ $ PATH=$tools/bin:$PATH make defconfig -+ $ PATH=$tools/bin:$PATH make menuconfig -+ $ PATH=$tools/bin:$PATH make -+ $ PATH=$tools/bin:$PATH make install install_root=$sysroot -+ -+At this point, we have a complete GLIBC installation in '$sysroot', -+with header files, library files, and most of the C runtime startup -+files in place. -+ -+ -+The Third GCC -+ -+Finally, we recompile GCC against this full installation, enabling -+whatever languages and libraries we would like to use: -+ -+ $ mkdir -p $obj/gcc3 -+ $ cd $obj/gcc3 -+ $ $src/$gccv/configure \ -+ > --target=$target \ -+ > --prefix=$tools \ -+ > --with-sysroot=$sysroot \ -+ > --enable-__cxa_atexit \ -+ > --disable-libssp --disable-libgomp --disable-libmudflap \ -+ > --enable-languages=c,c++ -+ $ PATH=$tools/bin:$PATH make -+ $ PATH=$tools/bin:$PATH make install -+ -+The '--enable-__cxa_atexit' option tells GCC what sort of C++ -+destructor support to expect from the C library; it's required with -+GLIBC. -+ -+And since GCC's installation process isn't designed to help construct -+sysroot trees, we must manually copy certain libraries into place in -+the sysroot. -+ -+ $ cp -d $tools/$target/lib/libgcc_s.so* $sysroot/lib -+ $ cp -d $tools/$target/lib/libstdc++.so* $sysroot/usr/lib -+ -+ -+Trying Things Out -+ -+At this point, '$tools' contains a cross toolchain ready to use -+the GLIBC installation in '$sysroot': -+ -+ $ cat > hello.c < #include -+ > int -+ > main (int argc, char **argv) -+ > { -+ > puts ("Hello, world!"); -+ > return 0; -+ > } -+ > EOF -+ $ $tools/bin/$target-gcc -Wall hello.c -o hello -+ $ cat > c++-hello.cc < #include -+ > int -+ > main (int argc, char **argv) -+ > { -+ > std::cout << "Hello, C++ world!" << std::endl; -+ > return 0; -+ > } -+ > EOF -+ $ $tools/bin/$target-g++ -Wall c++-hello.cc -o c++-hello -+ -+ -+We can use 'readelf' to verify that these are indeed executables for -+our target, using our dynamic linker: -+ -+ $ $tools/bin/$target-readelf -hl hello -+ ELF Header: -+ ... -+ Type: EXEC (Executable file) -+ Machine: ARM -+ -+ ... -+ Program Headers: -+ Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align -+ PHDR 0x000034 0x10000034 0x10000034 0x00100 0x00100 R E 0x4 -+ INTERP 0x000134 0x00008134 0x00008134 0x00013 0x00013 R 0x1 -+ [Requesting program interpreter: /lib/ld-linux.so.3] -+ LOAD 0x000000 0x00008000 0x00008000 0x0042c 0x0042c R E 0x8000 -+ ... -+ -+Looking at the dynamic section of the installed 'libgcc_s.so', we see -+that the 'NEEDED' entry for the C library does include the '.6' -+suffix, indicating that was linked against our fully build GLIBC, and -+not our dummy 'libc.so': -+ -+ $ $tools/bin/$target-readelf -d $sysroot/lib/libgcc_s.so.1 -+ Dynamic section at offset 0x1083c contains 24 entries: -+ Tag Type Name/Value -+ 0x00000001 (NEEDED) Shared library: [libc.so.6] -+ 0x0000000e (SONAME) Library soname: [libgcc_s.so.1] -+ ... -+ -+ -+And on the target machine, we can run our programs: -+ -+ $ $sysroot/lib/ld.so.1 --library-path $sysroot/lib:$sysroot/usr/lib \ -+ > ./hello -+ Hello, world! -+ $ $sysroot/lib/ld.so.1 --library-path $sysroot/lib:$sysroot/usr/lib \ -+ > ./c++-hello -+ Hello, C++ world! -diff --git a/GLIBC.cross-testing b/GLIBC.cross-testing -new file mode 100644 -index 0000000..b67b468 ---- /dev/null -+++ b/GLIBC.cross-testing -@@ -0,0 +1,205 @@ -+ -*- mode: text -*- -+ -+ Cross-Testing With GLIBC -+ Jim Blandy -+ -+ -+Introduction -+ -+Developers writing software for embedded systems often use a desktop -+or other similarly capable computer for development, but need to run -+tests on the embedded system, or perhaps on a simulator. When -+configured for cross-compilation, the stock GNU C library simply -+disables running tests altogether: the command 'make tests' builds -+test programs, but does not run them. GLIBC, however, provides -+facilities for compiling tests and generating data files on the build -+system, but running the test programs themselves on a remote system or -+simulator. -+ -+ -+Test environment requirements -+ -+The test environment must meet certain conditions for GLIBC's -+cross-testing facilities to work: -+ -+- Shared filesystems. The 'build' system, on which you configure and -+ compile GLIBC, and the 'host' system, on which you intend to run -+ GLIBC, must share a filesystem containing the GLIBC build and -+ source trees. Files must appear at the same paths on both systems. -+ -+- Remote-shell like invocation. There must be a way to run a program -+ on the host system from the build system, passing it properly quoted -+ command-line arguments, setting environment variables, and -+ inheriting the caller's standard input and output. -+ -+ -+Usage -+ -+To use GLIBC's cross-testing support, provide values for the -+following Make variables when you invoke 'make': -+ -+- cross-test-wrapper -+ -+ This should be the name of the cross-testing wrapper command, along -+ with any arguments. -+ -+- cross-localedef -+ -+ This should be the name of a cross-capable localedef program, like -+ that included in the GLIBC 'localedef' module, along with any -+ arguments needed. -+ -+These are each explained in detail below. -+ -+ -+The Cross-Testing Wrapper -+ -+To run test programs reliably, the stock GNU C library takes care to -+ensure that test programs use the newly compiled dynamic linker and -+shared libraries, and never the host system's installed libraries. To -+accomplish this, it runs the tests by explicitly invoking the dynamic -+linker from the build tree, passing it a list of build tree -+directories to search for shared libraries, followed by the name of -+the executable to run and its arguments. -+ -+For example, where one might normally run a test program like this: -+ -+ $ ./tst-foo arg1 arg2 -+ -+the GNU C library might run that program like this: -+ -+ $ $objdir/elf/ld-linux.so.3 --library-path $objdir \ -+ ./tst-foo arg1 arg2 -+ -+(where $objdir is the path to the top of the build tree, and the -+trailing backslash indicates a continuation of the command). In other -+words, each test program invocation is 'wrapped up' inside an explicit -+invocation of the dynamic linker, which must itself execute the test -+program, having loaded shared libraries from the appropriate -+directories. -+ -+To support cross-testing, GLIBC allows the developer to optionally -+set the 'cross-test-wrapper' Make variable to another wrapper command, -+to which it passes the entire dynamic linker invocation shown above as -+arguments. For example, if the developer supplies a wrapper of -+'my-wrapper hostname', then GLIBC would run the test above as -+follows: -+ -+ $ my-wrapper hostname \ -+ $objdir/elf/ld-linux.so.3 --library-path $objdir \ -+ ./tst-foo arg1 arg2 -+ -+The 'my-wrapper' command is responsible for executing the command -+given on the host system. -+ -+Since tests are run in varying directories, the wrapper should either -+be in your command search path, or 'cross-test-wrapper' should give an -+absolute path for the wrapper. -+ -+The wrapper must meet several requirements: -+ -+- It must preserve the current directory. As explained above, the -+ build directory tree must be visible on both the build and host -+ systems, at the same path. The test wrapper must ensure that the -+ current directory it inherits is also inherited by the dynamic -+ linker (and thus the test program itself). -+ -+- It must preserve environment variables' values. Many GLIBC tests -+ set environment variables for test runs; in native testing, it -+ invokes programs like this: -+ -+ $ GCONV_PATH=$objdir/iconvdata \ -+ $objdir/elf/ld-linux.so.3 --library-path $objdir \ -+ ./tst-foo arg1 arg2 -+ -+ With the cross-testing wrapper, that invocation becomes: -+ -+ $ GCONV_PATH=$objdir/iconvdata \ -+ my-wrapper hostname \ -+ $objdir/elf/ld-linux.so.3 --library-path $objdir \ -+ ./tst-foo arg1 arg2 -+ -+ Here, 'my-wrapper' must ensure that the value it sees for -+ 'GCONV_PATH' will be seen by the dynamic linker, and thus 'tst-foo' -+ itself. (The wrapper supplied with GLIBC simply preserves the -+ values of *all* enviroment variables, with a fixed set of -+ exceptions.) -+ -+ If your wrapper is a shell script, take care to correctly propagate -+ environment variables whose values contain spaces and shell -+ metacharacters. -+ -+- It must pass the command's arguments, unmodified. The arguments -+ seen by the test program should be exactly those seen by the wrapper -+ (after whatever arguments are given to the wrapper itself). The -+ GLIBC test framework performs all needed shell word splitting and -+ expansion (wildcard expansion, parameter substitution, and so on) -+ before invoking the wrapper; further expansion may break the tests. -+ -+ -+The 'cross-test-ssh.sh' script -+ -+If you want to use 'ssh' (or something sufficiently similar) to run -+test programs on your host system, GLIBC includes a shell script, -+'scripts/cross-test-ssh.sh', which you can use as your wrapper -+command. This script takes care of setting the test command's current -+directory, propagating environment variable values, and carrying -+command-line arguments, all across an 'ssh' connection. You may even -+supply an alternative to 'ssh' on the command line, if needed. -+ -+For more details, pass 'cross-test-ssh.sh' the '--help' option. -+ -+ -+The Cross-Compiling Locale Definition Command -+ -+Some GLIBC tests rely on locales generated especially for the test -+process. In a native configuration, these tests simply run the -+'localedef' command built by the normal GLIBC build process, -+'locale/localedef', to process and install their locales. However, in -+a cross-compiling configuration, this 'localedef' is built for the -+host system, not the build system, and since it requires quite a bit -+of memory to run (we have seen it fail on systems with 64MiB of -+memory), it may not be practical to run it on the host system. -+ -+If set, GLIBC uses the 'cross-localedef' Make variable as the command -+to run on the build system to process and install locales. The -+localedef program built from the GLIBC 'localedef' module is -+suitable. -+ -+The value of 'cross-localedef' may also include command-line arguments -+to be passed to the program; if you are using GLIBC's 'localedef', -+you may include endianness and 'uint32_t' alignment arguments here. -+ -+ -+Example -+ -+In developing GLIBC's cross-testing facility, we invoked 'make' with -+the following script: -+ -+ #!/bin/sh -+ -+ srcdir=... -+ test_hostname=... -+ localedefdir=... -+ cross_gxx=...-g++ -+ -+ wrapper="$srcdir/scripts/cross-test-ssh.sh $test_hostname" -+ localedef="$localedefdir/localedef --little-endian --uint32-align=4" -+ -+ make cross-test-wrapper="$wrapper" \ -+ cross-localedef="$localedef" \ -+ CXX="$cross_gxx" \ -+ "$@" -+ -+ -+Other Cross-Testing Concerns -+ -+Here are notes on some other issues which you may encounter in running -+the GLIBC tests in a cross-compiling environment: -+ -+- Some tests require a C++ cross-compiler; you should set the 'CXX' -+ Make variable to the name of an appropriate cross-compiler. -+ -+- Some tests require access to libstdc++.so.6 and libgcc_s.so.1; we -+ simply place copies of these libraries in the top GLIBC build -+ directory. --- -2.10.2 - diff --git a/meta/recipes-core/glibc/glibc/0018-eglibc-Help-bootstrap-cross-toolchain.patch b/meta/recipes-core/glibc/glibc/0018-eglibc-Help-bootstrap-cross-toolchain.patch new file mode 100644 index 0000000000..02f35f4e7b --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0018-eglibc-Help-bootstrap-cross-toolchain.patch @@ -0,0 +1,100 @@ +From 1161cd1c683547d29a03626d9d7de7f9cc03b74a Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 18 Mar 2015 00:49:28 +0000 +Subject: [PATCH 18/25] eglibc: Help bootstrap cross toolchain + +Taken from EGLIBC, r1484 + r1525 + + 2007-02-20 Jim Blandy + + * Makefile (install-headers): Preserve old behavior: depend on + $(inst_includedir)/gnu/stubs.h only if install-bootstrap-headers + is set; otherwise, place gnu/stubs.h on the 'install-others' list. + + 2007-02-16 Jim Blandy + + * Makefile: Amend make install-headers to install everything + necessary for building a cross-compiler. Install gnu/stubs.h as + part of 'install-headers', not 'install-others'. + If install-bootstrap-headers is 'yes', install a dummy copy of + gnu/stubs.h, instead of computing the real thing. + * include/stubs-bootstrap.h: New file. + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + Makefile | 22 +++++++++++++++++++++- + include/stubs-bootstrap.h | 12 ++++++++++++ + 2 files changed, 33 insertions(+), 1 deletion(-) + create mode 100644 include/stubs-bootstrap.h + +diff --git a/Makefile b/Makefile +index 3e0ae6f43b..24dc66d17c 100644 +--- a/Makefile ++++ b/Makefile +@@ -70,9 +70,18 @@ subdir-dirs = include + vpath %.h $(subdir-dirs) + + # What to install. +-install-others = $(inst_includedir)/gnu/stubs.h + install-bin-script = + ++# If we're bootstrapping, install a dummy gnu/stubs.h along with the ++# other headers, so 'make install-headers' produces a useable include ++# tree. Otherwise, install gnu/stubs.h later, after the rest of the ++# build is done. ++ifeq ($(install-bootstrap-headers),yes) ++install-headers: $(inst_includedir)/gnu/stubs.h ++else ++install-others = $(inst_includedir)/gnu/stubs.h ++endif ++ + ifeq (yes,$(build-shared)) + headers += gnu/lib-names.h + endif +@@ -152,6 +161,16 @@ others: $(common-objpfx)testrun.sh + + subdir-stubs := $(foreach dir,$(subdirs),$(common-objpfx)$(dir)/stubs) + ++# gnu/stubs.h depends (via the subdir 'stubs' targets) on all the .o ++# files in EGLIBC. For bootstrapping a GCC/EGLIBC pair, an empty ++# gnu/stubs.h is good enough. ++ifeq ($(install-bootstrap-headers),yes) ++$(inst_includedir)/gnu/stubs.h: include/stubs-bootstrap.h $(+force) ++ $(make-target-directory) ++ $(INSTALL_DATA) $< $@ ++ ++installed-stubs = ++else + ifndef abi-variants + installed-stubs = $(inst_includedir)/gnu/stubs.h + else +@@ -178,6 +197,7 @@ $(inst_includedir)/gnu/stubs.h: $(+force) + + install-others-nosubdir: $(installed-stubs) + endif ++endif + + + # Since stubs.h is never needed when building the library, we simplify the +diff --git a/include/stubs-bootstrap.h b/include/stubs-bootstrap.h +new file mode 100644 +index 0000000000..1d2b669aff +--- /dev/null ++++ b/include/stubs-bootstrap.h +@@ -0,0 +1,12 @@ ++/* Placeholder stubs.h file for bootstrapping. ++ ++ When bootstrapping a GCC/EGLIBC pair, GCC requires that the EGLIBC ++ headers be installed, but we can't fully build EGLIBC without that ++ GCC. So we run the command: ++ ++ make install-headers install-bootstrap-headers=yes ++ ++ to install the headers GCC needs, but avoid building certain ++ difficult headers. The header depends, via the ++ EGLIBC subdir 'stubs' make targets, on every .o file in EGLIBC, but ++ an empty stubs.h like this will do fine for GCC. */ +-- +2.13.2 + diff --git a/meta/recipes-core/glibc/glibc/0019-eglibc-Clear-cache-lines-on-ppc8xx.patch b/meta/recipes-core/glibc/glibc/0019-eglibc-Clear-cache-lines-on-ppc8xx.patch new file mode 100644 index 0000000000..adb28cfd34 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0019-eglibc-Clear-cache-lines-on-ppc8xx.patch @@ -0,0 +1,83 @@ +From 1732c7f25453c879c17701839ef34876a7357008 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 31 Dec 2015 15:15:09 -0800 +Subject: [PATCH 19/25] eglibc: Clear cache lines on ppc8xx + +2007-06-13 Nathan Sidwell + Mark Shinwell + + * sysdeps/unix/sysv/linux/powerpc/libc-start.c + (__libc_start_main): Detect 8xx parts and clear + __cache_line_size if detected. + * sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c + (DL_PLATFORM_AUXV): Likewise. + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c | 14 +++++++++++++- + sysdeps/unix/sysv/linux/powerpc/libc-start.c | 16 +++++++++++++++- + 2 files changed, 28 insertions(+), 2 deletions(-) + +diff --git a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c +index 23f5d5d388..7e45288db7 100644 +--- a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c ++++ b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c +@@ -24,9 +24,21 @@ int __cache_line_size attribute_hidden; + /* Scan the Aux Vector for the "Data Cache Block Size" entry. If found + verify that the static extern __cache_line_size is defined by checking + for not NULL. If it is defined then assign the cache block size +- value to __cache_line_size. */ ++ value to __cache_line_size. This is used by memset to ++ optimize setting to zero. We have to detect 8xx processors, which ++ have buggy dcbz implementations that cannot report page faults ++ correctly. That requires reading SPR, which is a privileged ++ operation. Fortunately 2.2.18 and later emulates PowerPC mfspr ++ reads from the PVR register. */ + #define DL_PLATFORM_AUXV \ + case AT_DCACHEBSIZE: \ ++ if (__LINUX_KERNEL_VERSION >= 0x020218) \ ++ { \ ++ unsigned pvr = 0; \ ++ asm ("mfspr %0, 287" : "=r" (pvr)); \ ++ if ((pvr & 0xffff0000) == 0x00500000) \ ++ break; \ ++ } \ + __cache_line_size = av->a_un.a_val; \ + break; + +diff --git a/sysdeps/unix/sysv/linux/powerpc/libc-start.c b/sysdeps/unix/sysv/linux/powerpc/libc-start.c +index ad036c1e4b..afee56a3da 100644 +--- a/sysdeps/unix/sysv/linux/powerpc/libc-start.c ++++ b/sysdeps/unix/sysv/linux/powerpc/libc-start.c +@@ -73,11 +73,25 @@ __libc_start_main (int argc, char **argv, + + /* Initialize the __cache_line_size variable from the aux vector. For the + static case, we also need _dl_hwcap, _dl_hwcap2 and _dl_platform, so we +- can call __tcb_parse_hwcap_and_convert_at_platform (). */ ++ can call __tcb_parse_hwcap_and_convert_at_platform (). ++ ++ This is used by memset to optimize setting to zero. We have to ++ detect 8xx processors, which have buggy dcbz implementations that ++ cannot report page faults correctly. That requires reading SPR, ++ which is a privileged operation. Fortunately 2.2.18 and later ++ emulates PowerPC mfspr reads from the PVR register. */ + for (ElfW (auxv_t) * av = auxvec; av->a_type != AT_NULL; ++av) + switch (av->a_type) + { + case AT_DCACHEBSIZE: ++ if (__LINUX_KERNEL_VERSION >= 0x020218) ++ { ++ unsigned pvr = 0; ++ ++ asm ("mfspr %0, 287" : "=r" (pvr) :); ++ if ((pvr & 0xffff0000) == 0x00500000) ++ break; ++ } + __cache_line_size = av->a_un.a_val; + break; + #ifndef SHARED +-- +2.13.2 + diff --git a/meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch b/meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch deleted file mode 100644 index f5921bb7be..0000000000 --- a/meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch +++ /dev/null @@ -1,100 +0,0 @@ -From 2cb7e3cae4020f431d426ad1740bb25506cde899 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 18 Mar 2015 00:49:28 +0000 -Subject: [PATCH 19/26] eglibc: Help bootstrap cross toolchain - -Taken from EGLIBC, r1484 + r1525 - - 2007-02-20 Jim Blandy - - * Makefile (install-headers): Preserve old behavior: depend on - $(inst_includedir)/gnu/stubs.h only if install-bootstrap-headers - is set; otherwise, place gnu/stubs.h on the 'install-others' list. - - 2007-02-16 Jim Blandy - - * Makefile: Amend make install-headers to install everything - necessary for building a cross-compiler. Install gnu/stubs.h as - part of 'install-headers', not 'install-others'. - If install-bootstrap-headers is 'yes', install a dummy copy of - gnu/stubs.h, instead of computing the real thing. - * include/stubs-bootstrap.h: New file. - -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- - Makefile | 22 +++++++++++++++++++++- - include/stubs-bootstrap.h | 12 ++++++++++++ - 2 files changed, 33 insertions(+), 1 deletion(-) - create mode 100644 include/stubs-bootstrap.h - -diff --git a/Makefile b/Makefile -index 1ae3281..26ab7bf 100644 ---- a/Makefile -+++ b/Makefile -@@ -70,9 +70,18 @@ subdir-dirs = include - vpath %.h $(subdir-dirs) - - # What to install. --install-others = $(inst_includedir)/gnu/stubs.h - install-bin-script = - -+# If we're bootstrapping, install a dummy gnu/stubs.h along with the -+# other headers, so 'make install-headers' produces a useable include -+# tree. Otherwise, install gnu/stubs.h later, after the rest of the -+# build is done. -+ifeq ($(install-bootstrap-headers),yes) -+install-headers: $(inst_includedir)/gnu/stubs.h -+else -+install-others = $(inst_includedir)/gnu/stubs.h -+endif -+ - ifeq (yes,$(build-shared)) - headers += gnu/lib-names.h - endif -@@ -152,6 +161,16 @@ others: $(common-objpfx)testrun.sh - - subdir-stubs := $(foreach dir,$(subdirs),$(common-objpfx)$(dir)/stubs) - -+# gnu/stubs.h depends (via the subdir 'stubs' targets) on all the .o -+# files in EGLIBC. For bootstrapping a GCC/EGLIBC pair, an empty -+# gnu/stubs.h is good enough. -+ifeq ($(install-bootstrap-headers),yes) -+$(inst_includedir)/gnu/stubs.h: include/stubs-bootstrap.h $(+force) -+ $(make-target-directory) -+ $(INSTALL_DATA) $< $@ -+ -+installed-stubs = -+else - ifndef abi-variants - installed-stubs = $(inst_includedir)/gnu/stubs.h - else -@@ -178,6 +197,7 @@ $(inst_includedir)/gnu/stubs.h: $(+force) - - install-others-nosubdir: $(installed-stubs) - endif -+endif - - - # Since stubs.h is never needed when building the library, we simplify the -diff --git a/include/stubs-bootstrap.h b/include/stubs-bootstrap.h -new file mode 100644 -index 0000000..1d2b669 ---- /dev/null -+++ b/include/stubs-bootstrap.h -@@ -0,0 +1,12 @@ -+/* Placeholder stubs.h file for bootstrapping. -+ -+ When bootstrapping a GCC/EGLIBC pair, GCC requires that the EGLIBC -+ headers be installed, but we can't fully build EGLIBC without that -+ GCC. So we run the command: -+ -+ make install-headers install-bootstrap-headers=yes -+ -+ to install the headers GCC needs, but avoid building certain -+ difficult headers. The header depends, via the -+ EGLIBC subdir 'stubs' make targets, on every .o file in EGLIBC, but -+ an empty stubs.h like this will do fine for GCC. */ --- -2.10.2 - diff --git a/meta/recipes-core/glibc/glibc/0020-eglibc-Resolve-__fpscr_values-on-SH4.patch b/meta/recipes-core/glibc/glibc/0020-eglibc-Resolve-__fpscr_values-on-SH4.patch new file mode 100644 index 0000000000..f835d871ab --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0020-eglibc-Resolve-__fpscr_values-on-SH4.patch @@ -0,0 +1,56 @@ +From 108b3a1df96a85522c52a0dec032fc2c106f5f2d Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 18 Mar 2015 00:55:53 +0000 +Subject: [PATCH 20/25] eglibc: Resolve __fpscr_values on SH4 + +2010-09-29 Nobuhiro Iwamatsu + Andrew Stubbs + + Resolve SH's __fpscr_values to symbol in libc.so. + + * sysdeps/sh/sh4/fpu/fpu_control.h: Add C++ __set_fpscr prototype. + * sysdeps/unix/sysv/linux/sh/Versions (GLIBC_2.2): Add __fpscr_values. + * sysdeps/unix/sysv/linux/sh/sysdep.S (___fpscr_values): New constant. + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + sysdeps/unix/sysv/linux/sh/Versions | 1 + + sysdeps/unix/sysv/linux/sh/sysdep.S | 11 +++++++++++ + 2 files changed, 12 insertions(+) + +diff --git a/sysdeps/unix/sysv/linux/sh/Versions b/sysdeps/unix/sysv/linux/sh/Versions +index e0938c4165..ca1d7da339 100644 +--- a/sysdeps/unix/sysv/linux/sh/Versions ++++ b/sysdeps/unix/sysv/linux/sh/Versions +@@ -2,6 +2,7 @@ libc { + GLIBC_2.2 { + # functions used in other libraries + __xstat64; __fxstat64; __lxstat64; ++ __fpscr_values; + + # a* + alphasort64; +diff --git a/sysdeps/unix/sysv/linux/sh/sysdep.S b/sysdeps/unix/sysv/linux/sh/sysdep.S +index 5f11bc737b..2fd217b00b 100644 +--- a/sysdeps/unix/sysv/linux/sh/sysdep.S ++++ b/sysdeps/unix/sysv/linux/sh/sysdep.S +@@ -30,3 +30,14 @@ ENTRY (__syscall_error) + + #define __syscall_error __syscall_error_1 + #include ++ ++ .data ++ .align 3 ++ .globl ___fpscr_values ++ .type ___fpscr_values, @object ++ .size ___fpscr_values, 8 ++___fpscr_values: ++ .long 0 ++ .long 0x80000 ++weak_alias (___fpscr_values, __fpscr_values) ++ +-- +2.13.2 + diff --git a/meta/recipes-core/glibc/glibc/0020-eglibc-cherry-picked-from.patch b/meta/recipes-core/glibc/glibc/0020-eglibc-cherry-picked-from.patch deleted file mode 100644 index 43445739b1..0000000000 --- a/meta/recipes-core/glibc/glibc/0020-eglibc-cherry-picked-from.patch +++ /dev/null @@ -1,64 +0,0 @@ -From b2ed906ec864583b43379ef9ad2b5630c1232565 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Thu, 31 Dec 2015 15:10:33 -0800 -Subject: [PATCH 20/26] eglibc: cherry-picked from - -http://www.eglibc.org/archives/patches/msg00772.html - -Not yet merged into glibc - -Upstream-Status: Pending - -Signed-off-by: Khem Raj ---- - resolv/res_libc.c | 14 +++++++++++++- - 1 file changed, 13 insertions(+), 1 deletion(-) - -diff --git a/resolv/res_libc.c b/resolv/res_libc.c -index a4b376f..3256e12 100644 ---- a/resolv/res_libc.c -+++ b/resolv/res_libc.c -@@ -21,11 +21,13 @@ - #include - #include - #include -+#include - #include - #include - #include - #include - -+__libc_lock_define_initialized (static, lock); - extern unsigned long long int __res_initstamp attribute_hidden; - /* We have atomic increment operations on 64-bit platforms. */ - #if __WORDSIZE == 64 -@@ -33,7 +35,6 @@ extern unsigned long long int __res_initstamp attribute_hidden; - # define atomicincunlock(lock) (void) 0 - # define atomicinc(var) catomic_increment (&(var)) - #else --__libc_lock_define_initialized (static, lock); - # define atomicinclock(lock) __libc_lock_lock (lock) - # define atomicincunlock(lock) __libc_lock_unlock (lock) - # define atomicinc(var) ++var -@@ -92,7 +93,18 @@ res_init(void) { - int - __res_maybe_init (res_state resp, int preinit) - { -+ static time_t last_mtime; -+ struct stat statbuf; -+ int ret; -+ - if (resp->options & RES_INIT) { -+ ret = stat (_PATH_RESCONF, &statbuf); -+ __libc_lock_lock (lock); -+ if ((ret == 0) && (last_mtime != statbuf.st_mtime)) { -+ last_mtime = statbuf.st_mtime; -+ atomicinc (__res_initstamp); -+ } -+ __libc_lock_unlock (lock); - if (__res_initstamp != resp->_u._ext.initstamp) { - if (resp->nscount > 0) - __res_iclose (resp, true); --- -2.10.2 - diff --git a/meta/recipes-core/glibc/glibc/0021-eglibc-Clear-cache-lines-on-ppc8xx.patch b/meta/recipes-core/glibc/glibc/0021-eglibc-Clear-cache-lines-on-ppc8xx.patch deleted file mode 100644 index a9a73916f3..0000000000 --- a/meta/recipes-core/glibc/glibc/0021-eglibc-Clear-cache-lines-on-ppc8xx.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 000ab518aa1269714bc0a9a4633b0a538fae91d9 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Thu, 31 Dec 2015 15:15:09 -0800 -Subject: [PATCH 21/26] eglibc: Clear cache lines on ppc8xx - -2007-06-13 Nathan Sidwell - Mark Shinwell - - * sysdeps/unix/sysv/linux/powerpc/libc-start.c - (__libc_start_main): Detect 8xx parts and clear - __cache_line_size if detected. - * sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c - (DL_PLATFORM_AUXV): Likewise. - -Upstream-Status: Pending - -Signed-off-by: Khem Raj ---- - sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c | 14 +++++++++++++- - sysdeps/unix/sysv/linux/powerpc/libc-start.c | 16 +++++++++++++++- - 2 files changed, 28 insertions(+), 2 deletions(-) - -diff --git a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c -index 98ec2b3..b384ae0 100644 ---- a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c -+++ b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c -@@ -24,9 +24,21 @@ int __cache_line_size attribute_hidden; - /* Scan the Aux Vector for the "Data Cache Block Size" entry. If found - verify that the static extern __cache_line_size is defined by checking - for not NULL. If it is defined then assign the cache block size -- value to __cache_line_size. */ -+ value to __cache_line_size. This is used by memset to -+ optimize setting to zero. We have to detect 8xx processors, which -+ have buggy dcbz implementations that cannot report page faults -+ correctly. That requires reading SPR, which is a privileged -+ operation. Fortunately 2.2.18 and later emulates PowerPC mfspr -+ reads from the PVR register. */ - #define DL_PLATFORM_AUXV \ - case AT_DCACHEBSIZE: \ -+ if (__LINUX_KERNEL_VERSION >= 0x020218) \ -+ { \ -+ unsigned pvr = 0; \ -+ asm ("mfspr %0, 287" : "=r" (pvr)); \ -+ if ((pvr & 0xffff0000) == 0x00500000) \ -+ break; \ -+ } \ - __cache_line_size = av->a_un.a_val; \ - break; - -diff --git a/sysdeps/unix/sysv/linux/powerpc/libc-start.c b/sysdeps/unix/sysv/linux/powerpc/libc-start.c -index 0efd297..8cc0ef8 100644 ---- a/sysdeps/unix/sysv/linux/powerpc/libc-start.c -+++ b/sysdeps/unix/sysv/linux/powerpc/libc-start.c -@@ -73,11 +73,25 @@ __libc_start_main (int argc, char **argv, - - /* Initialize the __cache_line_size variable from the aux vector. For the - static case, we also need _dl_hwcap, _dl_hwcap2 and _dl_platform, so we -- can call __tcb_parse_hwcap_and_convert_at_platform (). */ -+ can call __tcb_parse_hwcap_and_convert_at_platform (). -+ -+ This is used by memset to optimize setting to zero. We have to -+ detect 8xx processors, which have buggy dcbz implementations that -+ cannot report page faults correctly. That requires reading SPR, -+ which is a privileged operation. Fortunately 2.2.18 and later -+ emulates PowerPC mfspr reads from the PVR register. */ - for (ElfW (auxv_t) * av = auxvec; av->a_type != AT_NULL; ++av) - switch (av->a_type) - { - case AT_DCACHEBSIZE: -+ if (__LINUX_KERNEL_VERSION >= 0x020218) -+ { -+ unsigned pvr = 0; -+ -+ asm ("mfspr %0, 287" : "=r" (pvr) :); -+ if ((pvr & 0xffff0000) == 0x00500000) -+ break; -+ } - __cache_line_size = av->a_un.a_val; - break; - #ifndef SHARED --- -2.10.2 - diff --git a/meta/recipes-core/glibc/glibc/0021-eglibc-Install-PIC-archives.patch b/meta/recipes-core/glibc/glibc/0021-eglibc-Install-PIC-archives.patch new file mode 100644 index 0000000000..6ee397bf75 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0021-eglibc-Install-PIC-archives.patch @@ -0,0 +1,123 @@ +From 3392ee83b0132c089dffb1e9892b4b252ce1ec0e Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 18 Mar 2015 01:57:01 +0000 +Subject: [PATCH 21/25] eglibc: Install PIC archives + +Forward port from eglibc + +2008-02-07 Joseph Myers + + * Makerules (install-extras, install-map): New variables. + (installed-libcs): Add libc_pic.a. + (install-lib): Include _pic.a files for versioned shared + libraries. + (install-map-nosubdir, install-extras-nosubdir): Add rules for + installing extra files. + (install-no-libc.a-nosubdir): Depend on install-map-nosubdir and + install-extras-nosubdir. + +2008-04-01 Maxim Kuvyrkov + + * Makerules (install-lib): Don't install libpthread_pic.a. + (install-map): Don't install libpthread_pic.map. + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + Makerules | 42 ++++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 40 insertions(+), 2 deletions(-) + +diff --git a/Makerules b/Makerules +index 9bb707c168..74cbefb9ba 100644 +--- a/Makerules ++++ b/Makerules +@@ -775,6 +775,9 @@ ifeq ($(build-shared),yes) + $(common-objpfx)libc.so: $(common-objpfx)libc.map + endif + common-generated += libc.so libc_pic.os ++ifndef subdir ++install-extras := soinit.o sofini.o ++endif + ifdef libc.so-version + $(common-objpfx)libc.so$(libc.so-version): $(common-objpfx)libc.so + $(make-link) +@@ -1026,6 +1029,7 @@ endif + + install: check-install-supported + ++installed-libcs := $(installed-libcs) $(inst_libdir)/libc_pic.a + install: $(installed-libcs) + $(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force) + $(make-target-directory) +@@ -1054,6 +1058,22 @@ versioned := $(strip $(foreach so,$(install-lib.so),\ + install-lib.so-versioned := $(filter $(versioned), $(install-lib.so)) + install-lib.so-unversioned := $(filter-out $(versioned), $(install-lib.so)) + ++# Install the _pic.a files for versioned libraries, and corresponding ++# .map files. ++# libpthread_pic.a breaks mklibs, so don't install it and its map. ++install-lib := $(install-lib) $(install-lib.so-versioned:%.so=%_pic.a) ++install-lib := $(filter-out libpthread_pic.a,$(install-lib)) ++# Despite having a soname libhurduser and libmachuser do not use symbol ++# versioning, so don't install the corresponding .map files. ++ifeq ($(build-shared),yes) ++install-map := $(patsubst %.so,%.map,\ ++ $(foreach L,$(install-lib.so-versioned),$(notdir $L))) ++install-map := $(filter-out libhurduser.map libmachuser.map libpthread.map,$(install-map)) ++ifndef subdir ++install-map := $(install-map) libc.map ++endif ++endif ++ + # For versioned libraries, we install three files: + # $(inst_libdir)/libfoo.so -- for linking, symlink or ld script + # $(inst_slibdir)/libfoo.so.NN -- for loading by SONAME, symlink +@@ -1298,9 +1318,22 @@ $(addprefix $(inst_includedir)/,$(headers-nonh)): $(inst_includedir)/%: \ + endif # headers-nonh + endif # headers + ++ifdef install-map ++$(addprefix $(inst_libdir)/,$(patsubst lib%.map,lib%_pic.map,$(install-map))): \ ++ $(inst_libdir)/lib%_pic.map: $(common-objpfx)lib%.map $(+force) ++ $(do-install) ++endif ++ ++ifdef install-extras ++$(addprefix $(inst_libdir)/libc_pic/,$(install-extras)): \ ++ $(inst_libdir)/libc_pic/%.o: $(elf-objpfx)%.os $(+force) ++ $(do-install) ++endif ++ + .PHONY: install-bin-nosubdir install-bin-script-nosubdir \ + install-rootsbin-nosubdir install-sbin-nosubdir install-lib-nosubdir \ +- install-data-nosubdir install-headers-nosubdir ++ install-data-nosubdir install-headers-nosubdir install-map-nosubdir \ ++ install-extras-nosubdir + install-bin-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin)) + install-bin-script-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin-script)) + install-rootsbin-nosubdir: \ +@@ -1313,6 +1346,10 @@ install-data-nosubdir: $(addprefix $(inst_datadir)/,$(install-data)) + install-headers-nosubdir: $(addprefix $(inst_includedir)/,$(headers)) + install-others-nosubdir: $(install-others) + install-others-programs-nosubdir: $(install-others-programs) ++install-map-nosubdir: $(addprefix $(inst_libdir)/,\ ++ $(patsubst lib%.map,lib%_pic.map,$(install-map))) ++install-extras-nosubdir: $(addprefix $(inst_libdir)/libc_pic/,\ ++ $(install-extras)) + + # We need all the `-nosubdir' targets so that `install' in the parent + # doesn't depend on several things which each iterate over the subdirs. +@@ -1322,7 +1359,8 @@ install-%:: install-%-nosubdir ; + + .PHONY: install install-no-libc.a-nosubdir + install-no-libc.a-nosubdir: install-headers-nosubdir install-data-nosubdir \ +- install-lib-nosubdir install-others-nosubdir ++ install-lib-nosubdir install-others-nosubdir \ ++ install-map-nosubdir install-extras-nosubdir + ifeq ($(build-programs),yes) + install-no-libc.a-nosubdir: install-bin-nosubdir install-bin-script-nosubdir \ + install-rootsbin-nosubdir install-sbin-nosubdir \ +-- +2.13.2 + 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 new file mode 100644 index 0000000000..2a8a20ac8d --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch @@ -0,0 +1,566 @@ +From d97533dc201cfd863765b1a67a27fde3e2622da7 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 18 Mar 2015 01:33:49 +0000 +Subject: [PATCH 22/25] eglibc: Forward port cross locale generation support + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + locale/Makefile | 3 ++- + locale/catnames.c | 48 +++++++++++++++++++++++++++++++++++ + locale/localeinfo.h | 2 +- + locale/programs/charmap-dir.c | 6 +++++ + locale/programs/ld-collate.c | 17 ++++++------- + locale/programs/ld-ctype.c | 27 ++++++++++---------- + locale/programs/ld-time.c | 31 +++++++++++++++-------- + locale/programs/linereader.c | 2 +- + locale/programs/localedef.c | 8 ++++++ + locale/programs/locfile.c | 5 +++- + locale/programs/locfile.h | 59 +++++++++++++++++++++++++++++++++++++++++-- + locale/setlocale.c | 30 ---------------------- + 12 files changed, 169 insertions(+), 69 deletions(-) + create mode 100644 locale/catnames.c + +diff --git a/locale/Makefile b/locale/Makefile +index 98ee76272d..bc3afb2248 100644 +--- a/locale/Makefile ++++ b/locale/Makefile +@@ -26,7 +26,8 @@ headers = langinfo.h locale.h bits/locale.h \ + bits/types/locale_t.h bits/types/__locale_t.h + routines = setlocale findlocale loadlocale loadarchive \ + localeconv nl_langinfo nl_langinfo_l mb_cur_max \ +- newlocale duplocale freelocale uselocale ++ newlocale duplocale freelocale uselocale \ ++ catnames + tests = tst-C-locale tst-locname tst-duplocale + categories = ctype messages monetary numeric time paper name \ + address telephone measurement identification collate +diff --git a/locale/catnames.c b/locale/catnames.c +new file mode 100644 +index 0000000000..9fad357db1 +--- /dev/null ++++ b/locale/catnames.c +@@ -0,0 +1,48 @@ ++/* Copyright (C) 2006 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include "localeinfo.h" ++ ++/* Define an array of category names (also the environment variable names). */ ++const union catnamestr_t _nl_category_names attribute_hidden = ++ { ++ { ++#define DEFINE_CATEGORY(category, category_name, items, a) \ ++ category_name, ++#include "categories.def" ++#undef DEFINE_CATEGORY ++ } ++ }; ++ ++const uint8_t _nl_category_name_idxs[__LC_LAST] attribute_hidden = ++ { ++#define DEFINE_CATEGORY(category, category_name, items, a) \ ++ [category] = offsetof (union catnamestr_t, CATNAMEMF (__LINE__)), ++#include "categories.def" ++#undef DEFINE_CATEGORY ++ }; ++ ++/* An array of their lengths, for convenience. */ ++const uint8_t _nl_category_name_sizes[] attribute_hidden = ++ { ++#define DEFINE_CATEGORY(category, category_name, items, a) \ ++ [category] = sizeof (category_name) - 1, ++#include "categories.def" ++#undef DEFINE_CATEGORY ++ [LC_ALL] = sizeof ("LC_ALL") - 1 ++ }; +diff --git a/locale/localeinfo.h b/locale/localeinfo.h +index 4e1c8c568a..f7ed946f1c 100644 +--- a/locale/localeinfo.h ++++ b/locale/localeinfo.h +@@ -224,7 +224,7 @@ __libc_tsd_define (extern, locale_t, LOCALE) + unused. We can manage this playing some tricks with weak references. + But with thread-local locale settings, it becomes quite ungainly unless + we can use __thread variables. So only in that case do we attempt this. */ +-#ifndef SHARED ++#if !defined SHARED && !defined IN_GLIBC_LOCALEDEF + # include + # define NL_CURRENT_INDIRECT 1 + #endif +diff --git a/locale/programs/charmap-dir.c b/locale/programs/charmap-dir.c +index e55ab86e28..0f87e6dd28 100644 +--- a/locale/programs/charmap-dir.c ++++ b/locale/programs/charmap-dir.c +@@ -19,7 +19,9 @@ + #include + #include + #include ++#ifndef NO_UNCOMPRESS + #include ++#endif + #include + #include + #include +@@ -156,6 +158,7 @@ charmap_closedir (CHARMAP_DIR *cdir) + return closedir (dir); + } + ++#ifndef NO_UNCOMPRESS + /* Creates a subprocess decompressing the given pathname, and returns + a stream reading its output (the decompressed data). */ + static +@@ -204,6 +207,7 @@ fopen_uncompressed (const char *pathname, const char *compressor) + } + return NULL; + } ++#endif + + /* Opens a charmap for reading, given its name (not an alias name). */ + FILE * +@@ -226,6 +230,7 @@ charmap_open (const char *directory, const char *name) + if (stream != NULL) + return stream; + ++#ifndef NO_UNCOMPRESS + memcpy (p, ".gz", 4); + stream = fopen_uncompressed (pathname, "gzip"); + if (stream != NULL) +@@ -235,6 +240,7 @@ charmap_open (const char *directory, const char *name) + stream = fopen_uncompressed (pathname, "bzip2"); + if (stream != NULL) + return stream; ++#endif + + return NULL; + } +diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c +index cec848cb7c..fcd768eb7d 100644 +--- a/locale/programs/ld-collate.c ++++ b/locale/programs/ld-collate.c +@@ -350,7 +350,7 @@ new_element (struct locale_collate_t *collate, const char *mbs, size_t mbslen, + } + if (wcs != NULL) + { +- size_t nwcs = wcslen ((wchar_t *) wcs); ++ size_t nwcs = wcslen_uint32 (wcs); + uint32_t zero = 0; + /* Handle as a single character. */ + if (nwcs == 0) +@@ -1776,8 +1776,7 @@ symbol `%s' has the same encoding as"), (*eptr)->name); + + if ((*eptr)->nwcs == runp->nwcs) + { +- int c = wmemcmp ((wchar_t *) (*eptr)->wcs, +- (wchar_t *) runp->wcs, runp->nwcs); ++ int c = wmemcmp_uint32 ((*eptr)->wcs, runp->wcs, runp->nwcs); + + if (c == 0) + { +@@ -2010,9 +2009,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp) + one consecutive entry. */ + if (runp->wcnext != NULL + && runp->nwcs == runp->wcnext->nwcs +- && wmemcmp ((wchar_t *) runp->wcs, +- (wchar_t *)runp->wcnext->wcs, +- runp->nwcs - 1) == 0 ++ && wmemcmp_uint32 (runp->wcs, ++ runp->wcnext->wcs, ++ runp->nwcs - 1) == 0 + && (runp->wcs[runp->nwcs - 1] + == runp->wcnext->wcs[runp->nwcs - 1] + 1)) + { +@@ -2036,9 +2035,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp) + runp = runp->wcnext; + while (runp->wcnext != NULL + && runp->nwcs == runp->wcnext->nwcs +- && wmemcmp ((wchar_t *) runp->wcs, +- (wchar_t *)runp->wcnext->wcs, +- runp->nwcs - 1) == 0 ++ && wmemcmp_uint32 (runp->wcs, ++ runp->wcnext->wcs, ++ runp->nwcs - 1) == 0 + && (runp->wcs[runp->nwcs - 1] + == runp->wcnext->wcs[runp->nwcs - 1] + 1)); + +diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c +index df266c20d6..05c0152ec9 100644 +--- a/locale/programs/ld-ctype.c ++++ b/locale/programs/ld-ctype.c +@@ -926,7 +926,7 @@ ctype_output (struct localedef_t *locale, const struct charmap_t *charmap, + allocate_arrays (ctype, charmap, ctype->repertoire); + + default_missing_len = (ctype->default_missing +- ? wcslen ((wchar_t *) ctype->default_missing) ++ ? wcslen_uint32 (ctype->default_missing) + : 0); + + init_locale_data (&file, nelems); +@@ -1937,7 +1937,7 @@ read_translit_entry (struct linereader *ldfile, struct locale_ctype_t *ctype, + ignore = 1; + else + /* This value is usable. */ +- obstack_grow (ob, to_wstr, wcslen ((wchar_t *) to_wstr) * 4); ++ obstack_grow (ob, to_wstr, wcslen_uint32 (to_wstr) * 4); + + first = 0; + } +@@ -2471,8 +2471,8 @@ with character code range values one must use the absolute ellipsis `...'")); + } + + handle_tok_digit: +- class_bit = _ISwdigit; +- class256_bit = _ISdigit; ++ class_bit = BITw (tok_digit); ++ class256_bit = BIT (tok_digit); + handle_digits = 1; + goto read_charclass; + +@@ -3929,8 +3929,7 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap, + + while (idx < number) + { +- int res = wcscmp ((const wchar_t *) sorted[idx]->from, +- (const wchar_t *) runp->from); ++ int res = wcscmp_uint32 (sorted[idx]->from, runp->from); + if (res == 0) + { + replace = 1; +@@ -3967,11 +3966,11 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap, + for (size_t cnt = 0; cnt < number; ++cnt) + { + struct translit_to_t *srunp; +- from_len += wcslen ((const wchar_t *) sorted[cnt]->from) + 1; ++ from_len += wcslen_uint32 (sorted[cnt]->from) + 1; + srunp = sorted[cnt]->to; + while (srunp != NULL) + { +- to_len += wcslen ((const wchar_t *) srunp->str) + 1; ++ to_len += wcslen_uint32 (srunp->str) + 1; + srunp = srunp->next; + } + /* Plus one for the extra NUL character marking the end of +@@ -3995,18 +3994,18 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap, + ctype->translit_from_idx[cnt] = from_len; + ctype->translit_to_idx[cnt] = to_len; + +- len = wcslen ((const wchar_t *) sorted[cnt]->from) + 1; +- wmemcpy ((wchar_t *) &ctype->translit_from_tbl[from_len], +- (const wchar_t *) sorted[cnt]->from, len); ++ len = wcslen_uint32 (sorted[cnt]->from) + 1; ++ wmemcpy_uint32 (&ctype->translit_from_tbl[from_len], ++ sorted[cnt]->from, len); + from_len += len; + + ctype->translit_to_idx[cnt] = to_len; + srunp = sorted[cnt]->to; + while (srunp != NULL) + { +- len = wcslen ((const wchar_t *) srunp->str) + 1; +- wmemcpy ((wchar_t *) &ctype->translit_to_tbl[to_len], +- (const wchar_t *) srunp->str, len); ++ len = wcslen_uint32 (srunp->str) + 1; ++ wmemcpy_uint32 (&ctype->translit_to_tbl[to_len], ++ srunp->str, len); + to_len += len; + srunp = srunp->next; + } +diff --git a/locale/programs/ld-time.c b/locale/programs/ld-time.c +index 32e9c41e35..6a61fcedeb 100644 +--- a/locale/programs/ld-time.c ++++ b/locale/programs/ld-time.c +@@ -215,8 +215,10 @@ No definition for %s category found"), "LC_TIME")); + } + else + { ++ static const uint32_t wt_fmt_ampm[] ++ = { '%','I',':','%','M',':','%','S',' ','%','p',0 }; + time->t_fmt_ampm = "%I:%M:%S %p"; +- time->wt_fmt_ampm = (const uint32_t *) L"%I:%M:%S %p"; ++ time->wt_fmt_ampm = wt_fmt_ampm; + } + } + +@@ -226,7 +228,7 @@ No definition for %s category found"), "LC_TIME")); + const int days_per_month[12] = { 31, 29, 31, 30, 31, 30, + 31, 31, 30, 31 ,30, 31 }; + size_t idx; +- wchar_t *wstr; ++ uint32_t *wstr; + + time->era_entries = + (struct era_data *) xmalloc (time->num_era +@@ -464,18 +466,18 @@ No definition for %s category found"), "LC_TIME")); + } + + /* Now generate the wide character name and format. */ +- wstr = wcschr ((wchar_t *) time->wera[idx], L':');/* end direction */ +- wstr = wstr ? wcschr (wstr + 1, L':') : NULL; /* end offset */ +- wstr = wstr ? wcschr (wstr + 1, L':') : NULL; /* end start */ +- wstr = wstr ? wcschr (wstr + 1, L':') : NULL; /* end end */ ++ wstr = wcschr_uint32 (time->wera[idx], L':'); /* end direction */ ++ wstr = wstr ? wcschr_uint32 (wstr + 1, L':') : NULL; /* end offset */ ++ wstr = wstr ? wcschr_uint32 (wstr + 1, L':') : NULL; /* end start */ ++ wstr = wstr ? wcschr_uint32 (wstr + 1, L':') : NULL; /* end end */ + if (wstr != NULL) + { +- time->era_entries[idx].wname = (uint32_t *) wstr + 1; +- wstr = wcschr (wstr + 1, L':'); /* end name */ ++ time->era_entries[idx].wname = wstr + 1; ++ wstr = wcschr_uint32 (wstr + 1, L':'); /* end name */ + if (wstr != NULL) + { + *wstr = L'\0'; +- time->era_entries[idx].wformat = (uint32_t *) wstr + 1; ++ time->era_entries[idx].wformat = wstr + 1; + } + else + time->era_entries[idx].wname = +@@ -534,7 +536,16 @@ No definition for %s category found"), "LC_TIME")); + if (time->date_fmt == NULL) + time->date_fmt = "%a %b %e %H:%M:%S %Z %Y"; + if (time->wdate_fmt == NULL) +- time->wdate_fmt = (const uint32_t *) L"%a %b %e %H:%M:%S %Z %Y"; ++ { ++ static const uint32_t wdate_fmt[] = ++ { '%','a',' ', ++ '%','b',' ', ++ '%','e',' ', ++ '%','H',':','%','M',':','%','S',' ', ++ '%','Z',' ', ++ '%','Y',0 }; ++ time->wdate_fmt = wdate_fmt; ++ } + } + + +diff --git a/locale/programs/linereader.c b/locale/programs/linereader.c +index 52b340963a..1a8bce17b4 100644 +--- a/locale/programs/linereader.c ++++ b/locale/programs/linereader.c +@@ -595,7 +595,7 @@ get_string (struct linereader *lr, const struct charmap_t *charmap, + { + int return_widestr = lr->return_widestr; + char *buf; +- wchar_t *buf2 = NULL; ++ uint32_t *buf2 = NULL; + size_t bufact; + size_t bufmax = 56; + +diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c +index 6acc1342c7..df87740f8b 100644 +--- a/locale/programs/localedef.c ++++ b/locale/programs/localedef.c +@@ -108,6 +108,7 @@ void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version; + #define OPT_LIST_ARCHIVE 309 + #define OPT_LITTLE_ENDIAN 400 + #define OPT_BIG_ENDIAN 401 ++#define OPT_UINT32_ALIGN 402 + + /* Definitions of arguments for argp functions. */ + static const struct argp_option options[] = +@@ -143,6 +144,8 @@ static const struct argp_option options[] = + N_("Generate little-endian output") }, + { "big-endian", OPT_BIG_ENDIAN, NULL, 0, + N_("Generate big-endian output") }, ++ { "uint32-align", OPT_UINT32_ALIGN, "ALIGNMENT", 0, ++ N_("Set the target's uint32_t alignment in bytes (default 4)") }, + { NULL, 0, NULL, 0, NULL } + }; + +@@ -232,12 +235,14 @@ main (int argc, char *argv[]) + ctype locale. (P1003.2 4.35.5.2) */ + setlocale (LC_CTYPE, "POSIX"); + ++#ifndef NO_SYSCONF + /* Look whether the system really allows locale definitions. POSIX + defines error code 3 for this situation so I think it must be + a fatal error (see P1003.2 4.35.8). */ + if (sysconf (_SC_2_LOCALEDEF) < 0) + WITH_CUR_LOCALE (error (3, 0, _("\ + FATAL: system does not define `_POSIX2_LOCALEDEF'"))); ++#endif + + /* Process charmap file. */ + charmap = charmap_read (charmap_file, verbose, 1, be_quiet, 1); +@@ -328,6 +333,9 @@ parse_opt (int key, char *arg, struct argp_state *state) + case OPT_BIG_ENDIAN: + set_big_endian (true); + break; ++ case OPT_UINT32_ALIGN: ++ uint32_align_mask = strtol (arg, NULL, 0) - 1; ++ break; + case 'c': + force_output = 1; + break; +diff --git a/locale/programs/locfile.c b/locale/programs/locfile.c +index 0990ef11be..683422c908 100644 +--- a/locale/programs/locfile.c ++++ b/locale/programs/locfile.c +@@ -544,6 +544,9 @@ compare_files (const char *filename1, const char *filename2, size_t size, + machine running localedef. */ + bool swap_endianness_p; + ++/* The target's value of __align__(uint32_t) - 1. */ ++unsigned int uint32_align_mask = 3; ++ + /* When called outside a start_locale_structure/end_locale_structure + or start_locale_prelude/end_locale_prelude block, record that the + next byte in FILE's obstack will be the first byte of a new element. +@@ -621,7 +624,7 @@ add_locale_string (struct locale_file *file, const char *string) + void + add_locale_wstring (struct locale_file *file, const uint32_t *string) + { +- add_locale_uint32_array (file, string, wcslen ((const wchar_t *) string) + 1); ++ add_locale_uint32_array (file, string, wcslen_uint32 (string) + 1); + } + + /* Record that FILE's next element is the 32-bit integer VALUE. */ +diff --git a/locale/programs/locfile.h b/locale/programs/locfile.h +index 3407e13c13..0bb556caf8 100644 +--- a/locale/programs/locfile.h ++++ b/locale/programs/locfile.h +@@ -71,6 +71,8 @@ extern void write_all_categories (struct localedef_t *definitions, + + extern bool swap_endianness_p; + ++extern unsigned int uint32_align_mask; ++ + /* Change the output to be big-endian if BIG_ENDIAN is true and + little-endian otherwise. */ + static inline void +@@ -89,7 +91,8 @@ maybe_swap_uint32 (uint32_t value) + } + + /* Likewise, but munge an array of N uint32_ts starting at ARRAY. */ +-static inline void ++static void ++__attribute__ ((unused)) + maybe_swap_uint32_array (uint32_t *array, size_t n) + { + if (swap_endianness_p) +@@ -99,7 +102,8 @@ maybe_swap_uint32_array (uint32_t *array, size_t n) + + /* Like maybe_swap_uint32_array, but the array of N elements is at + the end of OBSTACK's current object. */ +-static inline void ++static void ++__attribute__ ((unused)) + maybe_swap_uint32_obstack (struct obstack *obstack, size_t n) + { + maybe_swap_uint32_array ((uint32_t *) obstack_next_free (obstack) - n, n); +@@ -276,4 +280,55 @@ extern void identification_output (struct localedef_t *locale, + const struct charmap_t *charmap, + const char *output_path); + ++static size_t wcslen_uint32 (const uint32_t *str) __attribute__ ((unused)); ++static uint32_t * wmemcpy_uint32 (uint32_t *s1, const uint32_t *s2, size_t n) __attribute__ ((unused)); ++static uint32_t * wcschr_uint32 (const uint32_t *s, uint32_t ch) __attribute__ ((unused)); ++static int wcscmp_uint32 (const uint32_t *s1, const uint32_t *s2) __attribute__ ((unused)); ++static int wmemcmp_uint32 (const uint32_t *s1, const uint32_t *s2, size_t n) __attribute__ ((unused)); ++ ++static size_t ++wcslen_uint32 (const uint32_t *str) ++{ ++ size_t len = 0; ++ while (str[len] != 0) ++ len++; ++ return len; ++} ++ ++static int ++wmemcmp_uint32 (const uint32_t *s1, const uint32_t *s2, size_t n) ++{ ++ while (n-- != 0) ++ { ++ int diff = *s1++ - *s2++; ++ if (diff != 0) ++ return diff; ++ } ++ return 0; ++} ++ ++static int ++wcscmp_uint32 (const uint32_t *s1, const uint32_t *s2) ++{ ++ while (*s1 != 0 && *s1 == *s2) ++ s1++, s2++; ++ return *s1 - *s2; ++} ++ ++static uint32_t * ++wmemcpy_uint32 (uint32_t *s1, const uint32_t *s2, size_t n) ++{ ++ return memcpy (s1, s2, n * sizeof (uint32_t)); ++} ++ ++static uint32_t * ++wcschr_uint32 (const uint32_t *s, uint32_t ch) ++{ ++ do ++ if (*s == ch) ++ return (uint32_t *) s; ++ while (*s++ != 0); ++ return 0; ++} ++ + #endif /* locfile.h */ +diff --git a/locale/setlocale.c b/locale/setlocale.c +index 19acc4b2c7..c89d3b87ad 100644 +--- a/locale/setlocale.c ++++ b/locale/setlocale.c +@@ -64,36 +64,6 @@ static char *const _nl_current_used[] = + #endif + + +-/* Define an array of category names (also the environment variable names). */ +-const union catnamestr_t _nl_category_names attribute_hidden = +- { +- { +-#define DEFINE_CATEGORY(category, category_name, items, a) \ +- category_name, +-#include "categories.def" +-#undef DEFINE_CATEGORY +- } +- }; +- +-const uint8_t _nl_category_name_idxs[__LC_LAST] attribute_hidden = +- { +-#define DEFINE_CATEGORY(category, category_name, items, a) \ +- [category] = offsetof (union catnamestr_t, CATNAMEMF (__LINE__)), +-#include "categories.def" +-#undef DEFINE_CATEGORY +- }; +- +-/* An array of their lengths, for convenience. */ +-const uint8_t _nl_category_name_sizes[] attribute_hidden = +- { +-#define DEFINE_CATEGORY(category, category_name, items, a) \ +- [category] = sizeof (category_name) - 1, +-#include "categories.def" +-#undef DEFINE_CATEGORY +- [LC_ALL] = sizeof ("LC_ALL") - 1 +- }; +- +- + #ifdef NL_CURRENT_INDIRECT + # define WEAK_POSTLOAD(postload) weak_extern (postload) + #else +-- +2.13.2 + diff --git a/meta/recipes-core/glibc/glibc/0022-eglibc-Resolve-__fpscr_values-on-SH4.patch b/meta/recipes-core/glibc/glibc/0022-eglibc-Resolve-__fpscr_values-on-SH4.patch deleted file mode 100644 index c0cd5b0d12..0000000000 --- a/meta/recipes-core/glibc/glibc/0022-eglibc-Resolve-__fpscr_values-on-SH4.patch +++ /dev/null @@ -1,56 +0,0 @@ -From a50c6e80543fb4cbc589978c11fe846bf4a94492 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 18 Mar 2015 00:55:53 +0000 -Subject: [PATCH 22/26] eglibc: Resolve __fpscr_values on SH4 - -2010-09-29 Nobuhiro Iwamatsu - Andrew Stubbs - - Resolve SH's __fpscr_values to symbol in libc.so. - - * sysdeps/sh/sh4/fpu/fpu_control.h: Add C++ __set_fpscr prototype. - * sysdeps/unix/sysv/linux/sh/Versions (GLIBC_2.2): Add __fpscr_values. - * sysdeps/unix/sysv/linux/sh/sysdep.S (___fpscr_values): New constant. - -Upstream-Status: Pending - -Signed-off-by: Khem Raj ---- - sysdeps/unix/sysv/linux/sh/Versions | 1 + - sysdeps/unix/sysv/linux/sh/sysdep.S | 11 +++++++++++ - 2 files changed, 12 insertions(+) - -diff --git a/sysdeps/unix/sysv/linux/sh/Versions b/sysdeps/unix/sysv/linux/sh/Versions -index e0938c4..ca1d7da 100644 ---- a/sysdeps/unix/sysv/linux/sh/Versions -+++ b/sysdeps/unix/sysv/linux/sh/Versions -@@ -2,6 +2,7 @@ libc { - GLIBC_2.2 { - # functions used in other libraries - __xstat64; __fxstat64; __lxstat64; -+ __fpscr_values; - - # a* - alphasort64; -diff --git a/sysdeps/unix/sysv/linux/sh/sysdep.S b/sysdeps/unix/sysv/linux/sh/sysdep.S -index 0024d79..d1db7e4 100644 ---- a/sysdeps/unix/sysv/linux/sh/sysdep.S -+++ b/sysdeps/unix/sysv/linux/sh/sysdep.S -@@ -30,3 +30,14 @@ ENTRY (__syscall_error) - - #define __syscall_error __syscall_error_1 - #include -+ -+ .data -+ .align 3 -+ .globl ___fpscr_values -+ .type ___fpscr_values, @object -+ .size ___fpscr_values, 8 -+___fpscr_values: -+ .long 0 -+ .long 0x80000 -+weak_alias (___fpscr_values, __fpscr_values) -+ --- -2.10.2 - 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 new file mode 100644 index 0000000000..9e580d44b1 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0023-Define-DUMMY_LOCALE_T-if-not-defined.patch @@ -0,0 +1,32 @@ +From cb4d00eac7f84092314de593626eea40f9529038 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 20 Apr 2016 21:11:00 -0700 +Subject: [PATCH 23/25] Define DUMMY_LOCALE_T if not defined + +This is a hack to fix building the locale bits on an older +CentOs 5.X machine + +Upstream-Status: Inappropriate [other] + +Signed-off-by: Khem Raj +--- + locale/programs/config.h | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/locale/programs/config.h b/locale/programs/config.h +index 5b416be0d8..79e66eed5e 100644 +--- a/locale/programs/config.h ++++ b/locale/programs/config.h +@@ -19,6 +19,9 @@ + #ifndef _LD_CONFIG_H + #define _LD_CONFIG_H 1 + ++#ifndef DUMMY_LOCALE_T ++#define DUMMY_LOCALE_T ++#endif + /* Use the internal textdomain used for libc messages. */ + #define PACKAGE _libc_intl_domainname + #ifndef VERSION +-- +2.13.2 + diff --git a/meta/recipes-core/glibc/glibc/0023-eglibc-Install-PIC-archives.patch b/meta/recipes-core/glibc/glibc/0023-eglibc-Install-PIC-archives.patch deleted file mode 100644 index c3e571f8a9..0000000000 --- a/meta/recipes-core/glibc/glibc/0023-eglibc-Install-PIC-archives.patch +++ /dev/null @@ -1,123 +0,0 @@ -From 101568daf48d99e71b280a2fdd85460fe740d583 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 18 Mar 2015 01:57:01 +0000 -Subject: [PATCH 23/26] eglibc: Install PIC archives - -Forward port from eglibc - -2008-02-07 Joseph Myers - - * Makerules (install-extras, install-map): New variables. - (installed-libcs): Add libc_pic.a. - (install-lib): Include _pic.a files for versioned shared - libraries. - (install-map-nosubdir, install-extras-nosubdir): Add rules for - installing extra files. - (install-no-libc.a-nosubdir): Depend on install-map-nosubdir and - install-extras-nosubdir. - -2008-04-01 Maxim Kuvyrkov - - * Makerules (install-lib): Don't install libpthread_pic.a. - (install-map): Don't install libpthread_pic.map. - -Upstream-Status: Pending - -Signed-off-by: Khem Raj ---- - Makerules | 42 ++++++++++++++++++++++++++++++++++++++++-- - 1 file changed, 40 insertions(+), 2 deletions(-) - -diff --git a/Makerules b/Makerules -index 61a0240..373e628 100644 ---- a/Makerules -+++ b/Makerules -@@ -762,6 +762,9 @@ ifeq ($(build-shared),yes) - $(common-objpfx)libc.so: $(common-objpfx)libc.map - endif - common-generated += libc.so libc_pic.os -+ifndef subdir -+install-extras := soinit.o sofini.o -+endif - ifdef libc.so-version - $(common-objpfx)libc.so$(libc.so-version): $(common-objpfx)libc.so - $(make-link) -@@ -1004,6 +1007,7 @@ endif - - install: check-install-supported - -+installed-libcs := $(installed-libcs) $(inst_libdir)/libc_pic.a - install: $(installed-libcs) - $(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force) - $(make-target-directory) -@@ -1032,6 +1036,22 @@ versioned := $(strip $(foreach so,$(install-lib.so),\ - install-lib.so-versioned := $(filter $(versioned), $(install-lib.so)) - install-lib.so-unversioned := $(filter-out $(versioned), $(install-lib.so)) - -+# Install the _pic.a files for versioned libraries, and corresponding -+# .map files. -+# libpthread_pic.a breaks mklibs, so don't install it and its map. -+install-lib := $(install-lib) $(install-lib.so-versioned:%.so=%_pic.a) -+install-lib := $(filter-out libpthread_pic.a,$(install-lib)) -+# Despite having a soname libhurduser and libmachuser do not use symbol -+# versioning, so don't install the corresponding .map files. -+ifeq ($(build-shared),yes) -+install-map := $(patsubst %.so,%.map,\ -+ $(foreach L,$(install-lib.so-versioned),$(notdir $L))) -+install-map := $(filter-out libhurduser.map libmachuser.map libpthread.map,$(install-map)) -+ifndef subdir -+install-map := $(install-map) libc.map -+endif -+endif -+ - # For versioned libraries, we install three files: - # $(inst_libdir)/libfoo.so -- for linking, symlink or ld script - # $(inst_slibdir)/libfoo.so.NN -- for loading by SONAME, symlink -@@ -1275,9 +1295,22 @@ $(addprefix $(inst_includedir)/,$(headers-nonh)): $(inst_includedir)/%: \ - endif # headers-nonh - endif # headers - -+ifdef install-map -+$(addprefix $(inst_libdir)/,$(patsubst lib%.map,lib%_pic.map,$(install-map))): \ -+ $(inst_libdir)/lib%_pic.map: $(common-objpfx)lib%.map $(+force) -+ $(do-install) -+endif -+ -+ifdef install-extras -+$(addprefix $(inst_libdir)/libc_pic/,$(install-extras)): \ -+ $(inst_libdir)/libc_pic/%.o: $(elf-objpfx)%.os $(+force) -+ $(do-install) -+endif -+ - .PHONY: install-bin-nosubdir install-bin-script-nosubdir \ - install-rootsbin-nosubdir install-sbin-nosubdir install-lib-nosubdir \ -- install-data-nosubdir install-headers-nosubdir -+ install-data-nosubdir install-headers-nosubdir install-map-nosubdir \ -+ install-extras-nosubdir - install-bin-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin)) - install-bin-script-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin-script)) - install-rootsbin-nosubdir: \ -@@ -1290,6 +1323,10 @@ install-data-nosubdir: $(addprefix $(inst_datadir)/,$(install-data)) - install-headers-nosubdir: $(addprefix $(inst_includedir)/,$(headers)) - install-others-nosubdir: $(install-others) - install-others-programs-nosubdir: $(install-others-programs) -+install-map-nosubdir: $(addprefix $(inst_libdir)/,\ -+ $(patsubst lib%.map,lib%_pic.map,$(install-map))) -+install-extras-nosubdir: $(addprefix $(inst_libdir)/libc_pic/,\ -+ $(install-extras)) - - # We need all the `-nosubdir' targets so that `install' in the parent - # doesn't depend on several things which each iterate over the subdirs. -@@ -1299,7 +1336,8 @@ install-%:: install-%-nosubdir ; - - .PHONY: install install-no-libc.a-nosubdir - install-no-libc.a-nosubdir: install-headers-nosubdir install-data-nosubdir \ -- install-lib-nosubdir install-others-nosubdir -+ install-lib-nosubdir install-others-nosubdir \ -+ install-map-nosubdir install-extras-nosubdir - ifeq ($(build-programs),yes) - install-no-libc.a-nosubdir: install-bin-nosubdir install-bin-script-nosubdir \ - install-rootsbin-nosubdir install-sbin-nosubdir \ --- -2.10.2 - diff --git a/meta/recipes-core/glibc/glibc/0024-eglibc-Forward-port-cross-locale-generation-support.patch b/meta/recipes-core/glibc/glibc/0024-eglibc-Forward-port-cross-locale-generation-support.patch deleted file mode 100644 index 3399890de1..0000000000 --- a/meta/recipes-core/glibc/glibc/0024-eglibc-Forward-port-cross-locale-generation-support.patch +++ /dev/null @@ -1,566 +0,0 @@ -From 82516e3ed372f618c886a2de4f9498f597aa8a8b Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 18 Mar 2015 01:33:49 +0000 -Subject: [PATCH 24/26] eglibc: Forward port cross locale generation support - -Upstream-Status: Pending - -Signed-off-by: Khem Raj ---- - locale/Makefile | 3 ++- - locale/catnames.c | 48 +++++++++++++++++++++++++++++++++++ - locale/localeinfo.h | 2 +- - locale/programs/charmap-dir.c | 6 +++++ - locale/programs/ld-collate.c | 17 ++++++------- - locale/programs/ld-ctype.c | 27 ++++++++++---------- - locale/programs/ld-time.c | 31 +++++++++++++++-------- - locale/programs/linereader.c | 2 +- - locale/programs/localedef.c | 8 ++++++ - locale/programs/locfile.c | 5 +++- - locale/programs/locfile.h | 59 +++++++++++++++++++++++++++++++++++++++++-- - locale/setlocale.c | 30 ---------------------- - 12 files changed, 169 insertions(+), 69 deletions(-) - create mode 100644 locale/catnames.c - -diff --git a/locale/Makefile b/locale/Makefile -index c5379e6..c98c675 100644 ---- a/locale/Makefile -+++ b/locale/Makefile -@@ -25,7 +25,8 @@ include ../Makeconfig - headers = locale.h bits/locale.h langinfo.h xlocale.h - routines = setlocale findlocale loadlocale loadarchive \ - localeconv nl_langinfo nl_langinfo_l mb_cur_max \ -- newlocale duplocale freelocale uselocale -+ newlocale duplocale freelocale uselocale \ -+ catnames - tests = tst-C-locale tst-locname tst-duplocale - categories = ctype messages monetary numeric time paper name \ - address telephone measurement identification collate -diff --git a/locale/catnames.c b/locale/catnames.c -new file mode 100644 -index 0000000..9fad357 ---- /dev/null -+++ b/locale/catnames.c -@@ -0,0 +1,48 @@ -+/* Copyright (C) 2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "localeinfo.h" -+ -+/* Define an array of category names (also the environment variable names). */ -+const union catnamestr_t _nl_category_names attribute_hidden = -+ { -+ { -+#define DEFINE_CATEGORY(category, category_name, items, a) \ -+ category_name, -+#include "categories.def" -+#undef DEFINE_CATEGORY -+ } -+ }; -+ -+const uint8_t _nl_category_name_idxs[__LC_LAST] attribute_hidden = -+ { -+#define DEFINE_CATEGORY(category, category_name, items, a) \ -+ [category] = offsetof (union catnamestr_t, CATNAMEMF (__LINE__)), -+#include "categories.def" -+#undef DEFINE_CATEGORY -+ }; -+ -+/* An array of their lengths, for convenience. */ -+const uint8_t _nl_category_name_sizes[] attribute_hidden = -+ { -+#define DEFINE_CATEGORY(category, category_name, items, a) \ -+ [category] = sizeof (category_name) - 1, -+#include "categories.def" -+#undef DEFINE_CATEGORY -+ [LC_ALL] = sizeof ("LC_ALL") - 1 -+ }; -diff --git a/locale/localeinfo.h b/locale/localeinfo.h -index 1f4da92..7f68935 100644 ---- a/locale/localeinfo.h -+++ b/locale/localeinfo.h -@@ -224,7 +224,7 @@ __libc_tsd_define (extern, __locale_t, LOCALE) - unused. We can manage this playing some tricks with weak references. - But with thread-local locale settings, it becomes quite ungainly unless - we can use __thread variables. So only in that case do we attempt this. */ --#ifndef SHARED -+#if !defined SHARED && !defined IN_GLIBC_LOCALEDEF - # include - # define NL_CURRENT_INDIRECT 1 - #endif -diff --git a/locale/programs/charmap-dir.c b/locale/programs/charmap-dir.c -index 99fcd35..5e528dc 100644 ---- a/locale/programs/charmap-dir.c -+++ b/locale/programs/charmap-dir.c -@@ -19,7 +19,9 @@ - #include - #include - #include -+#ifndef NO_UNCOMPRESS - #include -+#endif - #include - #include - #include -@@ -156,6 +158,7 @@ charmap_closedir (CHARMAP_DIR *cdir) - return closedir (dir); - } - -+#ifndef NO_UNCOMPRESS - /* Creates a subprocess decompressing the given pathname, and returns - a stream reading its output (the decompressed data). */ - static -@@ -204,6 +207,7 @@ fopen_uncompressed (const char *pathname, const char *compressor) - } - return NULL; - } -+#endif - - /* Opens a charmap for reading, given its name (not an alias name). */ - FILE * -@@ -226,6 +230,7 @@ charmap_open (const char *directory, const char *name) - if (stream != NULL) - return stream; - -+#ifndef NO_UNCOMPRESS - memcpy (p, ".gz", 4); - stream = fopen_uncompressed (pathname, "gzip"); - if (stream != NULL) -@@ -235,6 +240,7 @@ charmap_open (const char *directory, const char *name) - stream = fopen_uncompressed (pathname, "bzip2"); - if (stream != NULL) - return stream; -+#endif - - return NULL; - } -diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c -index 1e125f6..3b2867f 100644 ---- a/locale/programs/ld-collate.c -+++ b/locale/programs/ld-collate.c -@@ -350,7 +350,7 @@ new_element (struct locale_collate_t *collate, const char *mbs, size_t mbslen, - } - if (wcs != NULL) - { -- size_t nwcs = wcslen ((wchar_t *) wcs); -+ size_t nwcs = wcslen_uint32 (wcs); - uint32_t zero = 0; - /* Handle as a single character. */ - if (nwcs == 0) -@@ -1776,8 +1776,7 @@ symbol `%s' has the same encoding as"), (*eptr)->name); - - if ((*eptr)->nwcs == runp->nwcs) - { -- int c = wmemcmp ((wchar_t *) (*eptr)->wcs, -- (wchar_t *) runp->wcs, runp->nwcs); -+ int c = wmemcmp_uint32 ((*eptr)->wcs, runp->wcs, runp->nwcs); - - if (c == 0) - { -@@ -2010,9 +2009,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp) - one consecutive entry. */ - if (runp->wcnext != NULL - && runp->nwcs == runp->wcnext->nwcs -- && wmemcmp ((wchar_t *) runp->wcs, -- (wchar_t *)runp->wcnext->wcs, -- runp->nwcs - 1) == 0 -+ && wmemcmp_uint32 (runp->wcs, -+ runp->wcnext->wcs, -+ runp->nwcs - 1) == 0 - && (runp->wcs[runp->nwcs - 1] - == runp->wcnext->wcs[runp->nwcs - 1] + 1)) - { -@@ -2036,9 +2035,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp) - runp = runp->wcnext; - while (runp->wcnext != NULL - && runp->nwcs == runp->wcnext->nwcs -- && wmemcmp ((wchar_t *) runp->wcs, -- (wchar_t *)runp->wcnext->wcs, -- runp->nwcs - 1) == 0 -+ && wmemcmp_uint32 (runp->wcs, -+ runp->wcnext->wcs, -+ runp->nwcs - 1) == 0 - && (runp->wcs[runp->nwcs - 1] - == runp->wcnext->wcs[runp->nwcs - 1] + 1)); - -diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c -index 0fd141c..68136e6 100644 ---- a/locale/programs/ld-ctype.c -+++ b/locale/programs/ld-ctype.c -@@ -926,7 +926,7 @@ ctype_output (struct localedef_t *locale, const struct charmap_t *charmap, - allocate_arrays (ctype, charmap, ctype->repertoire); - - default_missing_len = (ctype->default_missing -- ? wcslen ((wchar_t *) ctype->default_missing) -+ ? wcslen_uint32 (ctype->default_missing) - : 0); - - init_locale_data (&file, nelems); -@@ -1937,7 +1937,7 @@ read_translit_entry (struct linereader *ldfile, struct locale_ctype_t *ctype, - ignore = 1; - else - /* This value is usable. */ -- obstack_grow (ob, to_wstr, wcslen ((wchar_t *) to_wstr) * 4); -+ obstack_grow (ob, to_wstr, wcslen_uint32 (to_wstr) * 4); - - first = 0; - } -@@ -2471,8 +2471,8 @@ with character code range values one must use the absolute ellipsis `...'")); - } - - handle_tok_digit: -- class_bit = _ISwdigit; -- class256_bit = _ISdigit; -+ class_bit = BITw (tok_digit); -+ class256_bit = BIT (tok_digit); - handle_digits = 1; - goto read_charclass; - -@@ -3929,8 +3929,7 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap, - - while (idx < number) - { -- int res = wcscmp ((const wchar_t *) sorted[idx]->from, -- (const wchar_t *) runp->from); -+ int res = wcscmp_uint32 (sorted[idx]->from, runp->from); - if (res == 0) - { - replace = 1; -@@ -3967,11 +3966,11 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap, - for (size_t cnt = 0; cnt < number; ++cnt) - { - struct translit_to_t *srunp; -- from_len += wcslen ((const wchar_t *) sorted[cnt]->from) + 1; -+ from_len += wcslen_uint32 (sorted[cnt]->from) + 1; - srunp = sorted[cnt]->to; - while (srunp != NULL) - { -- to_len += wcslen ((const wchar_t *) srunp->str) + 1; -+ to_len += wcslen_uint32 (srunp->str) + 1; - srunp = srunp->next; - } - /* Plus one for the extra NUL character marking the end of -@@ -3995,18 +3994,18 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap, - ctype->translit_from_idx[cnt] = from_len; - ctype->translit_to_idx[cnt] = to_len; - -- len = wcslen ((const wchar_t *) sorted[cnt]->from) + 1; -- wmemcpy ((wchar_t *) &ctype->translit_from_tbl[from_len], -- (const wchar_t *) sorted[cnt]->from, len); -+ len = wcslen_uint32 (sorted[cnt]->from) + 1; -+ wmemcpy_uint32 (&ctype->translit_from_tbl[from_len], -+ sorted[cnt]->from, len); - from_len += len; - - ctype->translit_to_idx[cnt] = to_len; - srunp = sorted[cnt]->to; - while (srunp != NULL) - { -- len = wcslen ((const wchar_t *) srunp->str) + 1; -- wmemcpy ((wchar_t *) &ctype->translit_to_tbl[to_len], -- (const wchar_t *) srunp->str, len); -+ len = wcslen_uint32 (srunp->str) + 1; -+ wmemcpy_uint32 (&ctype->translit_to_tbl[to_len], -+ srunp->str, len); - to_len += len; - srunp = srunp->next; - } -diff --git a/locale/programs/ld-time.c b/locale/programs/ld-time.c -index 87531bc..5f2c266 100644 ---- a/locale/programs/ld-time.c -+++ b/locale/programs/ld-time.c -@@ -215,8 +215,10 @@ No definition for %s category found"), "LC_TIME")); - } - else - { -+ static const uint32_t wt_fmt_ampm[] -+ = { '%','I',':','%','M',':','%','S',' ','%','p',0 }; - time->t_fmt_ampm = "%I:%M:%S %p"; -- time->wt_fmt_ampm = (const uint32_t *) L"%I:%M:%S %p"; -+ time->wt_fmt_ampm = wt_fmt_ampm; - } - } - -@@ -226,7 +228,7 @@ No definition for %s category found"), "LC_TIME")); - const int days_per_month[12] = { 31, 29, 31, 30, 31, 30, - 31, 31, 30, 31 ,30, 31 }; - size_t idx; -- wchar_t *wstr; -+ uint32_t *wstr; - - time->era_entries = - (struct era_data *) xmalloc (time->num_era -@@ -464,18 +466,18 @@ No definition for %s category found"), "LC_TIME")); - } - - /* Now generate the wide character name and format. */ -- wstr = wcschr ((wchar_t *) time->wera[idx], L':');/* end direction */ -- wstr = wstr ? wcschr (wstr + 1, L':') : NULL; /* end offset */ -- wstr = wstr ? wcschr (wstr + 1, L':') : NULL; /* end start */ -- wstr = wstr ? wcschr (wstr + 1, L':') : NULL; /* end end */ -+ wstr = wcschr_uint32 (time->wera[idx], L':'); /* end direction */ -+ wstr = wstr ? wcschr_uint32 (wstr + 1, L':') : NULL; /* end offset */ -+ wstr = wstr ? wcschr_uint32 (wstr + 1, L':') : NULL; /* end start */ -+ wstr = wstr ? wcschr_uint32 (wstr + 1, L':') : NULL; /* end end */ - if (wstr != NULL) - { -- time->era_entries[idx].wname = (uint32_t *) wstr + 1; -- wstr = wcschr (wstr + 1, L':'); /* end name */ -+ time->era_entries[idx].wname = wstr + 1; -+ wstr = wcschr_uint32 (wstr + 1, L':'); /* end name */ - if (wstr != NULL) - { - *wstr = L'\0'; -- time->era_entries[idx].wformat = (uint32_t *) wstr + 1; -+ time->era_entries[idx].wformat = wstr + 1; - } - else - time->era_entries[idx].wname = -@@ -534,7 +536,16 @@ No definition for %s category found"), "LC_TIME")); - if (time->date_fmt == NULL) - time->date_fmt = "%a %b %e %H:%M:%S %Z %Y"; - if (time->wdate_fmt == NULL) -- time->wdate_fmt = (const uint32_t *) L"%a %b %e %H:%M:%S %Z %Y"; -+ { -+ static const uint32_t wdate_fmt[] = -+ { '%','a',' ', -+ '%','b',' ', -+ '%','e',' ', -+ '%','H',':','%','M',':','%','S',' ', -+ '%','Z',' ', -+ '%','Y',0 }; -+ time->wdate_fmt = wdate_fmt; -+ } - } - - -diff --git a/locale/programs/linereader.c b/locale/programs/linereader.c -index b885f65..0afb631 100644 ---- a/locale/programs/linereader.c -+++ b/locale/programs/linereader.c -@@ -595,7 +595,7 @@ get_string (struct linereader *lr, const struct charmap_t *charmap, - { - int return_widestr = lr->return_widestr; - char *buf; -- wchar_t *buf2 = NULL; -+ uint32_t *buf2 = NULL; - size_t bufact; - size_t bufmax = 56; - -diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c -index b4c48f1..ed08d48 100644 ---- a/locale/programs/localedef.c -+++ b/locale/programs/localedef.c -@@ -108,6 +108,7 @@ void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version; - #define OPT_LIST_ARCHIVE 309 - #define OPT_LITTLE_ENDIAN 400 - #define OPT_BIG_ENDIAN 401 -+#define OPT_UINT32_ALIGN 402 - - /* Definitions of arguments for argp functions. */ - static const struct argp_option options[] = -@@ -143,6 +144,8 @@ static const struct argp_option options[] = - N_("Generate little-endian output") }, - { "big-endian", OPT_BIG_ENDIAN, NULL, 0, - N_("Generate big-endian output") }, -+ { "uint32-align", OPT_UINT32_ALIGN, "ALIGNMENT", 0, -+ N_("Set the target's uint32_t alignment in bytes (default 4)") }, - { NULL, 0, NULL, 0, NULL } - }; - -@@ -232,12 +235,14 @@ main (int argc, char *argv[]) - ctype locale. (P1003.2 4.35.5.2) */ - setlocale (LC_CTYPE, "POSIX"); - -+#ifndef NO_SYSCONF - /* Look whether the system really allows locale definitions. POSIX - defines error code 3 for this situation so I think it must be - a fatal error (see P1003.2 4.35.8). */ - if (sysconf (_SC_2_LOCALEDEF) < 0) - WITH_CUR_LOCALE (error (3, 0, _("\ - FATAL: system does not define `_POSIX2_LOCALEDEF'"))); -+#endif - - /* Process charmap file. */ - charmap = charmap_read (charmap_file, verbose, 1, be_quiet, 1); -@@ -328,6 +333,9 @@ parse_opt (int key, char *arg, struct argp_state *state) - case OPT_BIG_ENDIAN: - set_big_endian (true); - break; -+ case OPT_UINT32_ALIGN: -+ uint32_align_mask = strtol (arg, NULL, 0) - 1; -+ break; - case 'c': - force_output = 1; - break; -diff --git a/locale/programs/locfile.c b/locale/programs/locfile.c -index 32f5cd2..02967b0 100644 ---- a/locale/programs/locfile.c -+++ b/locale/programs/locfile.c -@@ -544,6 +544,9 @@ compare_files (const char *filename1, const char *filename2, size_t size, - machine running localedef. */ - bool swap_endianness_p; - -+/* The target's value of __align__(uint32_t) - 1. */ -+unsigned int uint32_align_mask = 3; -+ - /* When called outside a start_locale_structure/end_locale_structure - or start_locale_prelude/end_locale_prelude block, record that the - next byte in FILE's obstack will be the first byte of a new element. -@@ -621,7 +624,7 @@ add_locale_string (struct locale_file *file, const char *string) - void - add_locale_wstring (struct locale_file *file, const uint32_t *string) - { -- add_locale_uint32_array (file, string, wcslen ((const wchar_t *) string) + 1); -+ add_locale_uint32_array (file, string, wcslen_uint32 (string) + 1); - } - - /* Record that FILE's next element is the 32-bit integer VALUE. */ -diff --git a/locale/programs/locfile.h b/locale/programs/locfile.h -index a3dd904..2c7763a 100644 ---- a/locale/programs/locfile.h -+++ b/locale/programs/locfile.h -@@ -71,6 +71,8 @@ extern void write_all_categories (struct localedef_t *definitions, - - extern bool swap_endianness_p; - -+extern unsigned int uint32_align_mask; -+ - /* Change the output to be big-endian if BIG_ENDIAN is true and - little-endian otherwise. */ - static inline void -@@ -89,7 +91,8 @@ maybe_swap_uint32 (uint32_t value) - } - - /* Likewise, but munge an array of N uint32_ts starting at ARRAY. */ --static inline void -+static void -+__attribute__ ((unused)) - maybe_swap_uint32_array (uint32_t *array, size_t n) - { - if (swap_endianness_p) -@@ -99,7 +102,8 @@ maybe_swap_uint32_array (uint32_t *array, size_t n) - - /* Like maybe_swap_uint32_array, but the array of N elements is at - the end of OBSTACK's current object. */ --static inline void -+static void -+__attribute__ ((unused)) - maybe_swap_uint32_obstack (struct obstack *obstack, size_t n) - { - maybe_swap_uint32_array ((uint32_t *) obstack_next_free (obstack) - n, n); -@@ -276,4 +280,55 @@ extern void identification_output (struct localedef_t *locale, - const struct charmap_t *charmap, - const char *output_path); - -+static size_t wcslen_uint32 (const uint32_t *str) __attribute__ ((unused)); -+static uint32_t * wmemcpy_uint32 (uint32_t *s1, const uint32_t *s2, size_t n) __attribute__ ((unused)); -+static uint32_t * wcschr_uint32 (const uint32_t *s, uint32_t ch) __attribute__ ((unused)); -+static int wcscmp_uint32 (const uint32_t *s1, const uint32_t *s2) __attribute__ ((unused)); -+static int wmemcmp_uint32 (const uint32_t *s1, const uint32_t *s2, size_t n) __attribute__ ((unused)); -+ -+static size_t -+wcslen_uint32 (const uint32_t *str) -+{ -+ size_t len = 0; -+ while (str[len] != 0) -+ len++; -+ return len; -+} -+ -+static int -+wmemcmp_uint32 (const uint32_t *s1, const uint32_t *s2, size_t n) -+{ -+ while (n-- != 0) -+ { -+ int diff = *s1++ - *s2++; -+ if (diff != 0) -+ return diff; -+ } -+ return 0; -+} -+ -+static int -+wcscmp_uint32 (const uint32_t *s1, const uint32_t *s2) -+{ -+ while (*s1 != 0 && *s1 == *s2) -+ s1++, s2++; -+ return *s1 - *s2; -+} -+ -+static uint32_t * -+wmemcpy_uint32 (uint32_t *s1, const uint32_t *s2, size_t n) -+{ -+ return memcpy (s1, s2, n * sizeof (uint32_t)); -+} -+ -+static uint32_t * -+wcschr_uint32 (const uint32_t *s, uint32_t ch) -+{ -+ do -+ if (*s == ch) -+ return (uint32_t *) s; -+ while (*s++ != 0); -+ return 0; -+} -+ - #endif /* locfile.h */ -diff --git a/locale/setlocale.c b/locale/setlocale.c -index 69b3141..1cef0be 100644 ---- a/locale/setlocale.c -+++ b/locale/setlocale.c -@@ -64,36 +64,6 @@ static char *const _nl_current_used[] = - #endif - - --/* Define an array of category names (also the environment variable names). */ --const union catnamestr_t _nl_category_names attribute_hidden = -- { -- { --#define DEFINE_CATEGORY(category, category_name, items, a) \ -- category_name, --#include "categories.def" --#undef DEFINE_CATEGORY -- } -- }; -- --const uint8_t _nl_category_name_idxs[__LC_LAST] attribute_hidden = -- { --#define DEFINE_CATEGORY(category, category_name, items, a) \ -- [category] = offsetof (union catnamestr_t, CATNAMEMF (__LINE__)), --#include "categories.def" --#undef DEFINE_CATEGORY -- }; -- --/* An array of their lengths, for convenience. */ --const uint8_t _nl_category_name_sizes[] attribute_hidden = -- { --#define DEFINE_CATEGORY(category, category_name, items, a) \ -- [category] = sizeof (category_name) - 1, --#include "categories.def" --#undef DEFINE_CATEGORY -- [LC_ALL] = sizeof ("LC_ALL") - 1 -- }; -- -- - #ifdef NL_CURRENT_INDIRECT - # define WEAK_POSTLOAD(postload) weak_extern (postload) - #else --- -2.10.2 - 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 new file mode 100644 index 0000000000..0b59352536 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch @@ -0,0 +1,56 @@ +From a784742739c90eea0d4ccbbd073a067d55ca95e8 Mon Sep 17 00:00:00 2001 +From: Mark Hatle +Date: Thu, 18 Aug 2016 14:07:58 -0500 +Subject: [PATCH 24/25] elf/dl-deps.c: Make _dl_build_local_scope breadth first + +According to the ELF specification: + +When resolving symbolic references, the dynamic linker examines the symbol +tables with a breadth-first search. + +This function was using a depth first search. By doing so the conflict +resolution reported to the prelinker (when LD_TRACE_PRELINKING=1 is set) +was incorrect. This caused problems when their were various circular +dependencies between libraries. The problem usually manifested itself by +the wrong IFUNC being executed. + +[BZ# 20488] + +Upstream-Status: Submitted [libc-alpha] + +Signed-off-by: Mark Hatle +--- + elf/dl-deps.c | 14 ++++++++++---- + 1 file changed, 10 insertions(+), 4 deletions(-) + +diff --git a/elf/dl-deps.c b/elf/dl-deps.c +index 1b8bac6593..c616808f31 100644 +--- a/elf/dl-deps.c ++++ b/elf/dl-deps.c +@@ -73,13 +73,19 @@ _dl_build_local_scope (struct link_map **list, struct link_map *map) + { + struct link_map **p = list; + struct link_map **q; ++ struct link_map **r; + + *p++ = map; + map->l_reserved = 1; +- if (map->l_initfini) +- for (q = map->l_initfini + 1; *q; ++q) +- if (! (*q)->l_reserved) +- p += _dl_build_local_scope (p, *q); ++ ++ for (r = list; r < p; ++r) ++ if ((*r)->l_initfini) ++ for (q = (*r)->l_initfini + 1; *q; ++q) ++ if (! (*q)->l_reserved) ++ { ++ *p++ = *q; ++ (*q)->l_reserved = 1; ++ } + return p - list; + } + +-- +2.13.2 + diff --git a/meta/recipes-core/glibc/glibc/0025-Define-DUMMY_LOCALE_T-if-not-defined.patch b/meta/recipes-core/glibc/glibc/0025-Define-DUMMY_LOCALE_T-if-not-defined.patch deleted file mode 100644 index 1f0f5d4da2..0000000000 --- a/meta/recipes-core/glibc/glibc/0025-Define-DUMMY_LOCALE_T-if-not-defined.patch +++ /dev/null @@ -1,32 +0,0 @@ -From c2d8cdeab116caacdfedb35eeb3e743b44807bec Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 20 Apr 2016 21:11:00 -0700 -Subject: [PATCH 25/26] Define DUMMY_LOCALE_T if not defined - -This is a hack to fix building the locale bits on an older -CentOs 5.X machine - -Upstream-Status: Inappropriate [other] - -Signed-off-by: Khem Raj ---- - locale/programs/config.h | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/locale/programs/config.h b/locale/programs/config.h -index f606365..0e5f8c3 100644 ---- a/locale/programs/config.h -+++ b/locale/programs/config.h -@@ -19,6 +19,9 @@ - #ifndef _LD_CONFIG_H - #define _LD_CONFIG_H 1 - -+#ifndef DUMMY_LOCALE_T -+#define DUMMY_LOCALE_T -+#endif - /* Use the internal textdomain used for libc messages. */ - #define PACKAGE _libc_intl_domainname - #ifndef VERSION --- -2.10.2 - 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 new file mode 100644 index 0000000000..f653077405 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0025-locale-fix-hard-coded-reference-to-gcc-E.patch @@ -0,0 +1,38 @@ +From f3a670496c8fe6d4acf045f5b167a19cf41b044e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rosen?= +Date: Mon, 22 Aug 2016 16:09:25 +0200 +Subject: [PATCH 25/25] locale: fix hard-coded reference to gcc -E + +When new version of compilers are published, they may not be compatible with +older versions of software. This is particularly common when software is built +with -Werror. + +Autotools provides a way for a user to specify the name of his compiler using a +set of variables ($CC $CXX $CPP etc.). Those variables are used correctly when +compiling glibc but the script used to generate transliterations in the locale/ +subdirectory directly calls the gcc binary to get the output of the +preprocessor instead of using the $CPP variable provided by the build +environment. + +This patch replaces the hard-coded reference to the gcc binary with the proper +environment variable, thus allowing a user to override it. + +Upstream-Status : Submitted [https://sourceware.org/ml/libc-alpha/2016-08/msg00746.html] +--- + locale/gen-translit.pl | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/locale/gen-translit.pl b/locale/gen-translit.pl +index 30d3f2f195..e97653017c 100644 +--- a/locale/gen-translit.pl ++++ b/locale/gen-translit.pl +@@ -1,5 +1,5 @@ + #!/usr/bin/perl -w +-open F, "cat C-translit.h.in | gcc -E - |" || die "Cannot preprocess input file"; ++open F, 'cat C-translit.h.in | ${CPP:-gcc -E} - |' || die "Cannot preprocess input file"; + + + sub cstrlen { +-- +2.13.2 + diff --git a/meta/recipes-core/glibc/glibc/0026-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch b/meta/recipes-core/glibc/glibc/0026-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch deleted file mode 100644 index 852f5304ce..0000000000 --- a/meta/recipes-core/glibc/glibc/0026-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch +++ /dev/null @@ -1,56 +0,0 @@ -From fb315c197cca61299a6f6588ea3460145c255d06 Mon Sep 17 00:00:00 2001 -From: Mark Hatle -Date: Thu, 18 Aug 2016 14:07:58 -0500 -Subject: [PATCH 26/26] elf/dl-deps.c: Make _dl_build_local_scope breadth first - -According to the ELF specification: - -When resolving symbolic references, the dynamic linker examines the symbol -tables with a breadth-first search. - -This function was using a depth first search. By doing so the conflict -resolution reported to the prelinker (when LD_TRACE_PRELINKING=1 is set) -was incorrect. This caused problems when their were various circular -dependencies between libraries. The problem usually manifested itself by -the wrong IFUNC being executed. - -[BZ# 20488] - -Upstream-Status: Submitted [libc-alpha] - -Signed-off-by: Mark Hatle ---- - elf/dl-deps.c | 14 ++++++++++---- - 1 file changed, 10 insertions(+), 4 deletions(-) - -diff --git a/elf/dl-deps.c b/elf/dl-deps.c -index 6a82987..53be824 100644 ---- a/elf/dl-deps.c -+++ b/elf/dl-deps.c -@@ -73,13 +73,19 @@ _dl_build_local_scope (struct link_map **list, struct link_map *map) - { - struct link_map **p = list; - struct link_map **q; -+ struct link_map **r; - - *p++ = map; - map->l_reserved = 1; -- if (map->l_initfini) -- for (q = map->l_initfini + 1; *q; ++q) -- if (! (*q)->l_reserved) -- p += _dl_build_local_scope (p, *q); -+ -+ for (r = list; r < p; ++r) -+ if ((*r)->l_initfini) -+ for (q = (*r)->l_initfini + 1; *q; ++q) -+ if (! (*q)->l_reserved) -+ { -+ *p++ = *q; -+ (*q)->l_reserved = 1; -+ } - return p - list; - } - --- -2.10.2 - diff --git a/meta/recipes-core/glibc/glibc/0027-locale-fix-hard-coded-reference-to-gcc-E.patch b/meta/recipes-core/glibc/glibc/0027-locale-fix-hard-coded-reference-to-gcc-E.patch deleted file mode 100644 index bce90557cf..0000000000 --- a/meta/recipes-core/glibc/glibc/0027-locale-fix-hard-coded-reference-to-gcc-E.patch +++ /dev/null @@ -1,38 +0,0 @@ -From a2fc86cb8d0366171f100ebd033aeb9609fa40de Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rosen?= -Date: Mon, 22 Aug 2016 16:09:25 +0200 -Subject: [PATCH 27/27] locale: fix hard-coded reference to gcc -E - -When new version of compilers are published, they may not be compatible with -older versions of software. This is particularly common when software is built -with -Werror. - -Autotools provides a way for a user to specify the name of his compiler using a -set of variables ($CC $CXX $CPP etc.). Those variables are used correctly when -compiling glibc but the script used to generate transliterations in the locale/ -subdirectory directly calls the gcc binary to get the output of the -preprocessor instead of using the $CPP variable provided by the build -environment. - -This patch replaces the hard-coded reference to the gcc binary with the proper -environment variable, thus allowing a user to override it. - -Upstream-Status: Submitted [https://sourceware.org/ml/libc-alpha/2016-08/msg00746.html] ---- - locale/gen-translit.pl | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/locale/gen-translit.pl b/locale/gen-translit.pl -index 30d3f2f..e976530 100644 ---- a/locale/gen-translit.pl -+++ b/locale/gen-translit.pl -@@ -1,5 +1,5 @@ - #!/usr/bin/perl -w --open F, "cat C-translit.h.in | gcc -E - |" || die "Cannot preprocess input file"; -+open F, 'cat C-translit.h.in | ${CPP:-gcc -E} - |' || die "Cannot preprocess input file"; - - - sub cstrlen { --- -2.10.2 - diff --git a/meta/recipes-core/glibc/glibc_2.25.90.bb b/meta/recipes-core/glibc/glibc_2.25.90.bb new file mode 100644 index 0000000000..24f5a3809c --- /dev/null +++ b/meta/recipes-core/glibc/glibc_2.25.90.bb @@ -0,0 +1,142 @@ +require glibc.inc + +LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \ + file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \ + file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c" + +DEPENDS += "gperf-native" + +SRCREV ?= "43a9f537fc121a867981ca31ea9d79f33ce0fd24" + +#SRCBRANCH ?= "release/${PV}/master" +SRCBRANCH ?= "master" + +GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git" +UPSTREAM_CHECK_GITTAGREGEX = "(?P\d+\.\d+(\.\d+)*)" + +SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ + file://etc/ld.so.conf \ + file://generate-supported.mk \ + \ + ${NATIVESDKFIXES} \ + file://0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch \ + file://0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch \ + file://0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch \ + file://0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \ + file://0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch \ + file://0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \ + file://0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \ + file://0012-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch \ + file://0013-Add-unused-attribute.patch \ + file://0014-yes-within-the-path-sets-wrong-config-variables.patch \ + file://0015-timezone-re-written-tzselect-as-posix-sh.patch \ + file://0016-Remove-bash-dependency-for-nscd-init-script.patch \ + file://0017-eglibc-Cross-building-and-testing-instructions.patch \ + file://0018-eglibc-Help-bootstrap-cross-toolchain.patch \ + file://0019-eglibc-Clear-cache-lines-on-ppc8xx.patch \ + file://0020-eglibc-Resolve-__fpscr_values-on-SH4.patch \ + file://0021-eglibc-Install-PIC-archives.patch \ + file://0022-eglibc-Forward-port-cross-locale-generation-support.patch \ + file://0023-Define-DUMMY_LOCALE_T-if-not-defined.patch \ + file://0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch \ + file://0025-locale-fix-hard-coded-reference-to-gcc-E.patch \ +" + +NATIVESDKFIXES ?= "" +NATIVESDKFIXES_class-nativesdk = "\ + file://0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch \ + file://0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch \ + file://0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch \ + file://0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch \ +" + +S = "${WORKDIR}/git" +B = "${WORKDIR}/build-${TARGET_SYS}" + +PACKAGES_DYNAMIC = "" + +# the -isystem in bitbake.conf screws up glibc do_stage +BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}" +TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir}" + +GLIBC_BROKEN_LOCALES = "" +# +# We will skip parsing glibc when target system C library selection is not glibc +# this helps in easing out parsing for non-glibc system libraries +# +COMPATIBLE_HOST_libc-musl_class-target = "null" + +EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \ + --without-cvs --disable-profile \ + --disable-debug --without-gd \ + --enable-clocale=gnu \ + --enable-add-ons=libidn \ + --with-headers=${STAGING_INCDIR} \ + --without-selinux \ + --enable-obsolete-rpc \ + --enable-tunables \ + --enable-bind-now \ + --enable-stack-protector=strong \ + --enable-stackguard-randomization \ + ${GLIBC_EXTRA_OECONF}" + +EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}" +EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'libc-inet-anl', '--enable-nscd', '--disable-nscd', d)}" + + +do_patch_append() { + bb.build.exec_func('do_fix_readlib_c', d) +} + +do_fix_readlib_c () { + sed -i -e 's#OECORE_KNOWN_INTERPRETER_NAMES#${EGLIBC_KNOWN_INTERPRETER_NAMES}#' ${S}/elf/readlib.c +} + +do_configure () { +# override this function to avoid the autoconf/automake/aclocal/autoheader +# calls for now +# don't pass CPPFLAGS into configure, since it upsets the kernel-headers +# version check and doesn't really help with anything + (cd ${S} && gnu-configize) || die "failure in running gnu-configize" + find ${S} -name "configure" | xargs touch + CPPFLAGS="" oe_runconf +} + +rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \ + yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \ + rusers.x spray.x nfs_prot.x rquota.x key_prot.x" + +do_compile () { + # -Wl,-rpath-link /lib in LDFLAGS can cause breakage if another glibc is in staging + unset LDFLAGS + base_do_compile + ( + cd ${S}/sunrpc/rpcsvc + for r in ${rpcsvc}; do + h=`echo $r|sed -e's,\.x$,.h,'` + rm -f $h + ${B}/sunrpc/cross-rpcgen -h $r -o $h || bbwarn "${PN}: unable to generate header for $r" + done + ) + echo "Adjust ldd script" + if [ -n "${RTLDLIST}" ] + then + prevrtld=`cat ${B}/elf/ldd | grep "^RTLDLIST=" | sed 's#^RTLDLIST="\?\([^"]*\)"\?$#\1#'` + if [ "${prevrtld}" != "${RTLDLIST}" ] + then + sed -i ${B}/elf/ldd -e "s#^RTLDLIST=.*\$#RTLDLIST=\"${prevrtld} ${RTLDLIST}\"#" + fi + fi + +} + +# Use the host locale archive when built for nativesdk so that we don't need to +# ship a complete (100MB) locale set. +do_compile_prepend_class-nativesdk() { + echo "complocaledir=/usr/lib/locale" >> ${S}/configparms +} + +require glibc-package.inc + +BBCLASSEXTEND = "nativesdk" diff --git a/meta/recipes-core/glibc/glibc_2.25.bb b/meta/recipes-core/glibc/glibc_2.25.bb deleted file mode 100644 index c37438a2d1..0000000000 --- a/meta/recipes-core/glibc/glibc_2.25.bb +++ /dev/null @@ -1,143 +0,0 @@ -require glibc.inc - -LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \ - file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \ - file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c" - -DEPENDS += "gperf-native" - -SRCREV ?= "db0242e3023436757bbc7c488a779e6e3343db04" - -SRCBRANCH ?= "release/${PV}/master" - -GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git" -UPSTREAM_CHECK_GITTAGREGEX = "(?P\d+\.\d+(\.\d+)*)" - -SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ - file://etc/ld.so.conf \ - file://generate-supported.mk \ - \ - ${NATIVESDKFIXES} \ - file://0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch \ - file://0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch \ - file://0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch \ - file://0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \ - file://0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch \ - file://0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \ - file://0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \ - file://0012-Make-ld-version-output-matching-grok-gold-s-output.patch \ - file://0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch \ - file://0014-Add-unused-attribute.patch \ - file://0015-yes-within-the-path-sets-wrong-config-variables.patch \ - file://0016-timezone-re-written-tzselect-as-posix-sh.patch \ - file://0017-Remove-bash-dependency-for-nscd-init-script.patch \ - file://0018-eglibc-Cross-building-and-testing-instructions.patch \ - file://0019-eglibc-Help-bootstrap-cross-toolchain.patch \ - file://0020-eglibc-cherry-picked-from.patch \ - file://0021-eglibc-Clear-cache-lines-on-ppc8xx.patch \ - file://0022-eglibc-Resolve-__fpscr_values-on-SH4.patch \ - file://0023-eglibc-Install-PIC-archives.patch \ - file://0024-eglibc-Forward-port-cross-locale-generation-support.patch \ - file://0025-Define-DUMMY_LOCALE_T-if-not-defined.patch \ - file://0026-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch \ - file://0027-locale-fix-hard-coded-reference-to-gcc-E.patch \ -" - -NATIVESDKFIXES ?= "" -NATIVESDKFIXES_class-nativesdk = "\ - file://0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch \ - file://0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch \ - file://0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch \ - file://0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch \ -" - -S = "${WORKDIR}/git" -B = "${WORKDIR}/build-${TARGET_SYS}" - -PACKAGES_DYNAMIC = "" - -# the -isystem in bitbake.conf screws up glibc do_stage -BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}" -TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir}" - -GLIBC_BROKEN_LOCALES = "" -# -# We will skip parsing glibc when target system C library selection is not glibc -# this helps in easing out parsing for non-glibc system libraries -# -COMPATIBLE_HOST_libc-musl_class-target = "null" - -EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \ - --without-cvs --disable-profile \ - --disable-debug --without-gd \ - --enable-clocale=gnu \ - --enable-add-ons=libidn \ - --with-headers=${STAGING_INCDIR} \ - --without-selinux \ - --enable-obsolete-rpc \ - --enable-tunables \ - --enable-bind-now \ - --enable-stack-protector=strong \ - --enable-stackguard-randomization \ - ${GLIBC_EXTRA_OECONF}" - -EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}" -EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'libc-inet-anl', '--enable-nscd', '--disable-nscd', d)}" - - -do_patch_append() { - bb.build.exec_func('do_fix_readlib_c', d) -} - -do_fix_readlib_c () { - sed -i -e 's#OECORE_KNOWN_INTERPRETER_NAMES#${EGLIBC_KNOWN_INTERPRETER_NAMES}#' ${S}/elf/readlib.c -} - -do_configure () { -# override this function to avoid the autoconf/automake/aclocal/autoheader -# calls for now -# don't pass CPPFLAGS into configure, since it upsets the kernel-headers -# version check and doesn't really help with anything - (cd ${S} && gnu-configize) || die "failure in running gnu-configize" - find ${S} -name "configure" | xargs touch - CPPFLAGS="" oe_runconf -} - -rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \ - yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \ - rusers.x spray.x nfs_prot.x rquota.x key_prot.x" - -do_compile () { - # -Wl,-rpath-link /lib in LDFLAGS can cause breakage if another glibc is in staging - unset LDFLAGS - base_do_compile - ( - cd ${S}/sunrpc/rpcsvc - for r in ${rpcsvc}; do - h=`echo $r|sed -e's,\.x$,.h,'` - rm -f $h - ${B}/sunrpc/cross-rpcgen -h $r -o $h || bbwarn "${PN}: unable to generate header for $r" - done - ) - echo "Adjust ldd script" - if [ -n "${RTLDLIST}" ] - then - prevrtld=`cat ${B}/elf/ldd | grep "^RTLDLIST=" | sed 's#^RTLDLIST="\?\([^"]*\)"\?$#\1#'` - if [ "${prevrtld}" != "${RTLDLIST}" ] - then - sed -i ${B}/elf/ldd -e "s#^RTLDLIST=.*\$#RTLDLIST=\"${prevrtld} ${RTLDLIST}\"#" - fi - fi - -} - -# Use the host locale archive when built for nativesdk so that we don't need to -# ship a complete (100MB) locale set. -do_compile_prepend_class-nativesdk() { - echo "complocaledir=/usr/lib/locale" >> ${S}/configparms -} - -require glibc-package.inc - -BBCLASSEXTEND = "nativesdk" -- cgit 1.2.3-korg