diff options
author | Andrew Geissler <geissonator@yahoo.com> | 2020-04-13 21:39:40 +0300 |
---|---|---|
committer | Andrew Geissler <geissonator@yahoo.com> | 2020-05-05 16:30:44 +0300 |
commit | 82c905dc58a36aeae40b1b273a12f63fb1973cf4 (patch) | |
tree | 38caf00263451b5036435cdc36e035b25d32e623 /poky/meta/recipes-core/glibc | |
parent | 83ecb75644b3d677c274188f9ac0b2374d6f6925 (diff) | |
download | openbmc-82c905dc58a36aeae40b1b273a12f63fb1973cf4.tar.xz |
meta-openembedded and poky: subtree updates
Squash of the following due to dependencies among them
and OpenBMC changes:
meta-openembedded: subtree update:d0748372d2..9201611135
meta-openembedded: subtree update:9201611135..17fd382f34
poky: subtree update:9052e5b32a..2e11d97b6c
poky: subtree update:2e11d97b6c..a8544811d7
The change log was too large for the jenkins plugin
to handle therefore it has been removed. Here is
the first and last commit of each subtree:
meta-openembedded:d0748372d2
cppzmq: bump to version 4.6.0
meta-openembedded:17fd382f34
mpv: Remove X11 dependency
poky:9052e5b32a
package_ipk: Remove pointless comment to trigger rebuild
poky:a8544811d7
pbzip2: Fix license warning
Change-Id: If0fc6c37629642ee207a4ca2f7aa501a2c673cd6
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'poky/meta/recipes-core/glibc')
-rw-r--r-- | poky/meta/recipes-core/glibc/cross-localedef-native_2.31.bb (renamed from poky/meta/recipes-core/glibc/cross-localedef-native_2.30.bb) | 27 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc-common.inc | 4 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc-locale_2.31.bb (renamed from poky/meta/recipes-core/glibc/glibc-locale_2.30.bb) | 0 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc-mtrace_2.31.bb (renamed from poky/meta/recipes-core/glibc/glibc-mtrace_2.30.bb) | 0 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc-package.inc | 46 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc-scripts_2.31.bb (renamed from poky/meta/recipes-core/glibc/glibc-scripts_2.30.bb) | 0 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc-testing.inc | 95 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc-testsuite_2.31.bb (renamed from poky/meta/recipes-core/glibc/glibc-testsuite_2.30.bb) | 3 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc-version.inc | 6 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc.inc | 4 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc/0001-localedef-Add-hardlink-resolver-from-util-linux.patch (renamed from poky/meta/recipes-core/glibc/glibc/add-cross-localedef-hardlink.patch) | 915 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc/0001-localedef-Add-hardlink-resolver-to-build.patch | 52 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc/0002-localedef-fix-ups-hardlink-to-make-it-compile.patch (renamed from poky/meta/recipes-core/glibc/glibc/allow-compile-separate-from-util-linux-hardlink.patch) | 50 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch (renamed from poky/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch) | 14 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch (renamed from poky/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch) | 12 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc/0005-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch (renamed from poky/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch) | 26 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc/0006-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch (renamed from poky/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch) | 9 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc/0007-nativesdk-glibc-Make-relocatable-install-for-locales.patch (renamed from poky/meta/recipes-core/glibc/glibc/0005-nativesdk-glibc-Make-relocatable-install-for-locales.patch) | 69 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc/0008-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch (renamed from poky/meta/recipes-core/glibc/glibc/0006-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch) | 7 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc/0009-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch (renamed from poky/meta/recipes-core/glibc/glibc/0007-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch) | 10 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc/0010-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch (renamed from poky/meta/recipes-core/glibc/glibc/0008-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch) | 7 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch (renamed from poky/meta/recipes-core/glibc/glibc/0009-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch) | 9 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc/0012-Quote-from-bug-1443-which-explains-what-the-patch-do.patch (renamed from poky/meta/recipes-core/glibc/glibc/0010-Quote-from-bug-1443-which-explains-what-the-patch-do.patch) | 10 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc/0013-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch (renamed from poky/meta/recipes-core/glibc/glibc/0011-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch) | 9 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc/0014-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch (renamed from poky/meta/recipes-core/glibc/glibc/0012-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch) | 9 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc/0015-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch (renamed from poky/meta/recipes-core/glibc/glibc/0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch) | 7 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc/0016-Add-unused-attribute.patch (renamed from poky/meta/recipes-core/glibc/glibc/0014-Add-unused-attribute.patch) | 9 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc/0017-yes-within-the-path-sets-wrong-config-variables.patch (renamed from poky/meta/recipes-core/glibc/glibc/0015-yes-within-the-path-sets-wrong-config-variables.patch) | 11 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc/0018-timezone-re-written-tzselect-as-posix-sh.patch (renamed from poky/meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch) | 9 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc/0019-Remove-bash-dependency-for-nscd-init-script.patch (renamed from poky/meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch) | 7 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc/0020-eglibc-Clear-cache-lines-on-ppc8xx.patch | 83 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc/0020-eglibc-Cross-building-and-testing-instructions.patch (renamed from poky/meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch) | 7 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc/0021-eglibc-Help-bootstrap-cross-toolchain.patch (renamed from poky/meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch) | 15 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc/0022-eglibc-Resolve-__fpscr_values-on-SH4.patch (renamed from poky/meta/recipes-core/glibc/glibc/0021-eglibc-Resolve-__fpscr_values-on-SH4.patch) | 9 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc/0023-eglibc-Forward-port-cross-locale-generation-support.patch (renamed from poky/meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch) | 62 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc/0024-Define-DUMMY_LOCALE_T-if-not-defined.patch (renamed from poky/meta/recipes-core/glibc/glibc/0023-Define-DUMMY_LOCALE_T-if-not-defined.patch) | 9 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc/0025-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch (renamed from poky/meta/recipes-core/glibc/glibc/0024-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch) | 10 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc/0026-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch (renamed from poky/meta/recipes-core/glibc/glibc/0025-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch) | 9 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc/0027-intl-Emit-no-lines-in-bison-generated-files.patch (renamed from poky/meta/recipes-core/glibc/glibc/0026-intl-Emit-no-lines-in-bison-generated-files.patch) | 9 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc/0028-inject-file-assembly-directives.patch (renamed from poky/meta/recipes-core/glibc/glibc/0027-inject-file-assembly-directives.patch) | 43 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc/0029-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch (renamed from poky/meta/recipes-core/glibc/glibc/0028-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch) | 9 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc/0030-Improve-IFUNC-check-BZ-25506.patch | 47 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc/0031-Fix-build-with-GCC-10-when-long-double-double.patch | 170 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc/CVE-2020-10029.patch | 128 | ||||
-rw-r--r-- | poky/meta/recipes-core/glibc/glibc_2.31.bb (renamed from poky/meta/recipes-core/glibc/glibc_2.30.bb) | 61 |
45 files changed, 1171 insertions, 936 deletions
diff --git a/poky/meta/recipes-core/glibc/cross-localedef-native_2.30.bb b/poky/meta/recipes-core/glibc/cross-localedef-native_2.31.bb index 29cd43e89a..24de55d929 100644 --- a/poky/meta/recipes-core/glibc/cross-localedef-native_2.30.bb +++ b/poky/meta/recipes-core/glibc/cross-localedef-native_2.31.bb @@ -3,7 +3,7 @@ HOMEPAGE = "http://www.gnu.org/software/libc/libc.html" SECTION = "libs" LICENSE = "LGPL-2.1" -LIC_FILES_CHKSUM = "file://LICENSES;md5=cfc0ed77a9f62fa62eded042ebe31d72 \ +LIC_FILES_CHKSUM = "file://LICENSES;md5=1541fd8f5e8f1579512bf05f533371ba \ file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \ file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c" @@ -21,17 +21,20 @@ FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/glibc:" 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-Clear-cache-lines-on-ppc8xx.patch \ - file://0021-eglibc-Resolve-__fpscr_values-on-SH4.patch \ - file://0022-eglibc-Forward-port-cross-locale-generation-support.patch \ - file://0023-Define-DUMMY_LOCALE_T-if-not-defined.patch \ - file://0024-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch \ - file://add-cross-localedef-hardlink.patch \ - file://allow-compile-separate-from-util-linux-hardlink.patch \ + \ + file://0001-localedef-Add-hardlink-resolver-to-build.patch;patchdir=localedef \ + \ + file://0001-localedef-Add-hardlink-resolver-from-util-linux.patch \ + file://0002-localedef-fix-ups-hardlink-to-make-it-compile.patch \ + \ + file://0018-timezone-re-written-tzselect-as-posix-sh.patch \ + file://0019-Remove-bash-dependency-for-nscd-init-script.patch \ + file://0020-eglibc-Cross-building-and-testing-instructions.patch \ + file://0021-eglibc-Help-bootstrap-cross-toolchain.patch \ + file://0022-eglibc-Resolve-__fpscr_values-on-SH4.patch \ + file://0023-eglibc-Forward-port-cross-locale-generation-support.patch \ + file://0024-Define-DUMMY_LOCALE_T-if-not-defined.patch \ + file://0025-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch \ " # Makes for a rather long rev (22 characters), but... # diff --git a/poky/meta/recipes-core/glibc/glibc-common.inc b/poky/meta/recipes-core/glibc/glibc-common.inc index fa46fd89f1..8d412cc857 100644 --- a/poky/meta/recipes-core/glibc/glibc-common.inc +++ b/poky/meta/recipes-core/glibc/glibc-common.inc @@ -4,7 +4,7 @@ HOMEPAGE = "http://www.gnu.org/software/libc/libc.html" SECTION = "libs" LICENSE = "GPLv2 & LGPLv2.1" -LIC_FILES_CHKSUM ?= "file://LICENSES;md5=cfc0ed77a9f62fa62eded042ebe31d72 \ +LIC_FILES_CHKSUM ?= "file://LICENSES;md5=1541fd8f5e8f1579512bf05f533371ba \ file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \ file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c" @@ -22,4 +22,4 @@ ARM_INSTRUCTION_SET_armv6 = "arm" # COMPATIBLE_HOST_libc-musl_class-target = "null" -PV = "2.30" +PV = "2.31" diff --git a/poky/meta/recipes-core/glibc/glibc-locale_2.30.bb b/poky/meta/recipes-core/glibc/glibc-locale_2.31.bb index f7702e0358..f7702e0358 100644 --- a/poky/meta/recipes-core/glibc/glibc-locale_2.30.bb +++ b/poky/meta/recipes-core/glibc/glibc-locale_2.31.bb diff --git a/poky/meta/recipes-core/glibc/glibc-mtrace_2.30.bb b/poky/meta/recipes-core/glibc/glibc-mtrace_2.31.bb index 0b69bad46a..0b69bad46a 100644 --- a/poky/meta/recipes-core/glibc/glibc-mtrace_2.30.bb +++ b/poky/meta/recipes-core/glibc/glibc-mtrace_2.31.bb diff --git a/poky/meta/recipes-core/glibc/glibc-package.inc b/poky/meta/recipes-core/glibc/glibc-package.inc index 9dd5a0d403..285a9aa2f5 100644 --- a/poky/meta/recipes-core/glibc/glibc-package.inc +++ b/poky/meta/recipes-core/glibc/glibc-package.inc @@ -1,6 +1,6 @@ INHIBIT_SYSROOT_STRIP = "1" -PACKAGES = "${PN}-dbg catchsegv sln nscd ldd tzcode glibc-thread-db ${PN}-pic libcidn libmemusage libnss-db libsegfault ${PN}-pcprofile libsotruss ${PN} ${PN}-utils glibc-extra-nss ${PN}-dev ${PN}-staticdev ${PN}-doc ldconfig" +PACKAGES = "${PN}-dbg catchsegv sln nscd ldconfig ldd tzcode glibc-thread-db ${PN}-pic libcidn libmemusage libnss-db libsegfault ${PN}-pcprofile libsotruss ${PN} ${PN}-utils glibc-extra-nss ${PN}-dev ${PN}-staticdev ${PN}-doc" # The ld.so in this glibc supports the GNU_HASH RPROVIDES_${PN} = "eglibc rtld(GNU_HASH)" @@ -65,9 +65,21 @@ DESCRIPTION_${PN}-utils = "Miscellaneous utilities including getconf, iconv, loc DESCRIPTION_libsotruss = "Library to support sotruss which traces calls through PLTs" DESCRIPTION_tzcode = "tzcode, timezone zoneinfo utils -- zic, zdump, tzselect" -inherit libc-common multilib_header +inherit multilib_header + +do_install() { + oe_runmake install_root=${D} install + install -Dm 0644 ${WORKDIR}/etc/ld.so.conf ${D}/${sysconfdir}/ld.so.conf + install -d ${D}${localedir} + make -f ${WORKDIR}/generate-supported.mk IN="${S}/localedata/SUPPORTED" OUT="${WORKDIR}/SUPPORTED" + # get rid of some broken files... + for i in ${GLIBC_BROKEN_LOCALES}; do + sed -i "/$i/d" ${WORKDIR}/SUPPORTED + done + rm -f ${D}${sysconfdir}/rpc + rm -rf ${D}${datadir}/zoneinfo + rm -rf ${D}${libexecdir}/getconf -do_install_append () { rm -f ${D}${sysconfdir}/localtime # remove empty glibc dir @@ -75,7 +87,7 @@ do_install_append () { rmdir --ignore-fail-on-non-empty ${D}${libexecdir} fi - oe_multilib_header bits/syscall.h bits/long-double.h bits/floatn.h + oe_multilib_header bits/syscall.h bits/long-double.h bits/floatn.h bits/endianness.h bits/struct_rwlock.h if [ -f ${D}${bindir}/mtrace ]; then sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' -e '2s,exec.*perl,exec ${USRBINPATH}/env perl,' ${D}${bindir}/mtrace @@ -108,6 +120,11 @@ do_install_append () { fi } +def get_libc_fpu_setting(bb, d): + if d.getVar('TARGET_FPU') in [ 'soft', 'ppc-efd' ]: + return "--without-fp" + return "" + do_install_append_class-target() { if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then install -d ${D}${sysconfdir}/tmpfiles.d @@ -213,6 +230,8 @@ stash_locale_cleanup () { rm -rf $cleanupdir${libdir}/gconv rm -rf $cleanupdir${localedir} rm -rf $cleanupdir${datadir}/locale + rmdir --ignore-fail-on-non-empty $cleanupdir${datadir} + if [ "${libdir}" != "${exec_prefix}/lib" ] && [ "${root_prefix}/lib" != "${exec_prefix}/lib" ]; then if [ -d "$cleanupdir${exec_prefix}/lib" ]; then if [ -z "${ARCH_DYNAMIC_LOADER}" -o \ @@ -233,6 +252,25 @@ stash_locale_package_cleanup() { stash_locale_cleanup ${PKGD} } +python populate_packages_prepend () { + if d.getVar('DEBIAN_NAMES'): + pkgs = d.getVar('PACKAGES').split() + bpn = d.getVar('BPN') + prefix = d.getVar('MLPREFIX') or "" + # Set the base package... + d.setVar('PKG_' + prefix + bpn, prefix + 'libc6') + libcprefix = prefix + bpn + '-' + for p in pkgs: + # And all the subpackages. + if p.startswith(libcprefix): + renamed = p.replace(bpn, 'libc6', 1) + d.setVar('PKG_' + p, renamed) + # For backward compatibility with old -dbg package + d.appendVar('RPROVIDES_' + libcprefix + 'dbg', ' ' + prefix + 'libc-dbg') + d.appendVar('RCONFLICTS_' + libcprefix + 'dbg', ' ' + prefix + 'libc-dbg') + d.appendVar('RREPLACES_' + libcprefix + 'dbg', ' ' + prefix + 'libc-dbg') +} + pkg_postinst_nscd () { if [ -z "$D" ]; then if command -v systemd-tmpfiles >/dev/null; then diff --git a/poky/meta/recipes-core/glibc/glibc-scripts_2.30.bb b/poky/meta/recipes-core/glibc/glibc-scripts_2.31.bb index 5a89bd8022..5a89bd8022 100644 --- a/poky/meta/recipes-core/glibc/glibc-scripts_2.30.bb +++ b/poky/meta/recipes-core/glibc/glibc-scripts_2.31.bb diff --git a/poky/meta/recipes-core/glibc/glibc-testing.inc b/poky/meta/recipes-core/glibc/glibc-testing.inc deleted file mode 100644 index 0a42ae7f7c..0000000000 --- a/poky/meta/recipes-core/glibc/glibc-testing.inc +++ /dev/null @@ -1,95 +0,0 @@ -do_compile_append () { - # now generate script to drive testing - echo "#!/usr/bin/env sh" >${B}/${HOST_PREFIX}testglibc - set >> ${B}/${HOST_PREFIX}testglibc - # prune out the unneeded vars - sed -i -e "/^BASH/d" ${B}/${HOST_PREFIX}testglibc - sed -i -e "/^USER/d" ${B}/${HOST_PREFIX}testglibc - sed -i -e "/^OPT/d" ${B}/${HOST_PREFIX}testglibc - sed -i -e "/^DIRSTACK/d" ${B}/${HOST_PREFIX}testglibc - sed -i -e "/^EUID/d" ${B}/${HOST_PREFIX}testglibc - sed -i -e "/^FUNCNAME/d" ${B}/${HOST_PREFIX}testglibc - sed -i -e "/^GROUPS/d" ${B}/${HOST_PREFIX}testglibc - sed -i -e "/^HOST/d" ${B}/${HOST_PREFIX}testglibc - sed -i -e "/^HOME/d" ${B}/${HOST_PREFIX}testglibc - sed -i -e "/^IFS/d" ${B}/${HOST_PREFIX}testglibc - sed -i -e "/^LC_ALL/d" ${B}/${HOST_PREFIX}testglibc - sed -i -e "/^LOGNAME/d" ${B}/${HOST_PREFIX}testglibc - sed -i -e "/^MACHTYPE/d" ${B}/${HOST_PREFIX}testglibc - sed -i -e "/^OSTYPE/d" ${B}/${HOST_PREFIX}testglibc - sed -i -e "/^PIPE/d" ${B}/${HOST_PREFIX}testglibc - sed -i -e "/^SHELL/d" ${B}/${HOST_PREFIX}testglibc - sed -i -e "/^'/d" ${B}/${HOST_PREFIX}testglibc - sed -i -e "/^UID/d" ${B}/${HOST_PREFIX}testglibc - sed -i -e "/^TERM/d" ${B}/${HOST_PREFIX}testglibc - sed -i -e "/^PKG_/d" ${B}/${HOST_PREFIX}testglibc - sed -i -e "/^POSIXLY_/d" ${B}/${HOST_PREFIX}testglibc - sed -i -e "/^PPID/d" ${B}/${HOST_PREFIX}testglibc - sed -i -e "/^PS4/d" ${B}/${HOST_PREFIX}testglibc - sed -i -e "/^Q/d" ${B}/${HOST_PREFIX}testglibc - sed -i -e "/^SHLVL/d" ${B}/${HOST_PREFIX}testglibc - sed -i -e "/^STAGING/d" ${B}/${HOST_PREFIX}testglibc - sed -i -e "/^LD_LIBRARY_PATH/d" ${B}/${HOST_PREFIX}testglibc - sed -i -e "/^PSEUDO/d" ${B}/${HOST_PREFIX}testglibc - - # point to real sysroot not the toolchain bootstrap sysroot - sed -i -e "s/\-tcbootstrap//g" ${B}/${HOST_PREFIX}testglibc - - # use the final cross-gcc to test since some tests need libstdc++ - sed -i -e "s/^PATH=.*\.gcc-cross-initial\:/PATH=/g" ${B}/${HOST_PREFIX}testglibc - - # append execution part script -cat >> ${B}/${HOST_PREFIX}testglibc << STOP -target="\$1" -if [ "x\$target" = "x" ] -then - echo "Please specify the target machine and remote user in form of user@target" - exit 1; -fi -ssh \$target ls \$PWD\ 2>&1 > /dev/null -if [ "x\$?" != "x0" ] -then - echo "Failed connecting to \$target it could be because of:" - echo "1. You dont have passwordless ssh setup to access \$target" - echo "2. NFS share on \$target is not mounted or if mounted then not matching the build tree layout." - echo " The tree should be accessible at same location on build host and target" - echo " You can add nfs-client to IMAGE_FEATURES to get the nfs client on target" - echo "3. nfs server on build host is not running." - echo " Please make sure that you have 'no_root_squash' added in /etc/exports if you want" - echo " to test as root user on target (usually its recommended to create a non" - echo " root user." - echo " As a sanity check make sure that target can read/write to the glibc build tree" - echo " Please refer to ${S}/EGLIBC.cross-testing for further instructions on setup" - exit 1 -fi - echo "# we test using cross compiler from real sysroot therefore override the" > ${B}/configparms - echo "# definitions that come from ${B}/config.make" >> ${B}/configparms - fgrep tcbootstrap ${B}/config.make > ${B}/configparms - sed -i -e "s/\-tcbootstrap//g" ${B}/configparms - -# g++ uses flag -nostdinc, so the locations of system include headers must be explicitly specified -# If the locations are not already specified in config.make, then we provide the following locations: -# <sysroot>/usr/include/c++/<g++ version> -# <sysroot>/usr/include/c++/<g++ version>/<machine> - -cxxincludes=\`cat ${B}/config.make | gawk '\$1 == "c++-sysincludes"' | gawk -F"=" '{print \$2}' | sed "s/[ \t]\?//g"\` - -if [ -z "\$cxxincludes" ]; then - sysroot=\`cat ${B}/configparms | sed -n "/CXX/p" | sed -e "s/^.*--sysroot=//"\` - cxx=\`cat ${B}/configparms | gawk '\$1 ~ /^CXX/' | gawk -F"=" '{print \$2}' | gawk '{print \$1}'\` - cxxmachine=\`\$cxx -dumpmachine\` - cxxversion=\`\$cxx -dumpversion\` - # pass the new value of c++-sysincludes via configparms - echo "# c++-sysincludes added:" >> ${B}/configparms - echo "c++-sysincludes = -isystem \$sysroot/usr/include/c++/\$cxxversion -isystem \$sysroot/usr/include/c++/\$cxxversion/\$cxxmachine" >> ${B}/configparms -fi - -wrapper="${S}/scripts/cross-test-ssh.sh \$target" -localedef="${STAGING_BINDIR_NATIVE}/cross-localedef --little-endian --uint32-align=4" -make tests-clean -make cross-localedef="\$localedef" cross-test-wrapper="\$wrapper" -k check -rm -rf ${B}/configparms -STOP - - chmod +x ${B}/${HOST_PREFIX}testglibc -} diff --git a/poky/meta/recipes-core/glibc/glibc-testsuite_2.30.bb b/poky/meta/recipes-core/glibc/glibc-testsuite_2.31.bb index 657fd4dbc1..d887aeff79 100644 --- a/poky/meta/recipes-core/glibc/glibc-testsuite_2.30.bb +++ b/poky/meta/recipes-core/glibc/glibc-testsuite_2.31.bb @@ -1,5 +1,7 @@ require glibc_${PV}.bb +EXCLUDE_FROM_WORLD = "1" + # handle PN differences FILESEXTRAPATHS_prepend := "${THISDIR}/glibc:" @@ -58,3 +60,4 @@ addtask do_check after do_compile inherit nopackages deltask do_stash_locale +deltask do_install diff --git a/poky/meta/recipes-core/glibc/glibc-version.inc b/poky/meta/recipes-core/glibc/glibc-version.inc index c18c583399..4c72eedf41 100644 --- a/poky/meta/recipes-core/glibc/glibc-version.inc +++ b/poky/meta/recipes-core/glibc/glibc-version.inc @@ -1,6 +1,6 @@ -SRCBRANCH ?= "release/2.30/master" -PV = "2.30" -SRCREV_glibc ?= "be9a328c93834648e0bec106a1f86357d1a8c7e1" +SRCBRANCH ?= "release/2.31/master" +PV = "2.31+git${SRCPV}" +SRCREV_glibc ?= "71f2b249a28e17eac0e47c53af44d5c5b65101aa" SRCREV_localedef ?= "cd9f958c4c94a638fa7b2b4e21627364f1a1a655" GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git" diff --git a/poky/meta/recipes-core/glibc/glibc.inc b/poky/meta/recipes-core/glibc/glibc.inc index ea9a04ac73..23a6ca99ae 100644 --- a/poky/meta/recipes-core/glibc/glibc.inc +++ b/poky/meta/recipes-core/glibc/glibc.inc @@ -1,6 +1,5 @@ require glibc-common.inc require glibc-ld.inc -require glibc-testing.inc DEPENDS = "virtual/${TARGET_PREFIX}gcc libgcc-initial linux-libc-headers" @@ -10,8 +9,11 @@ inherit autotools texinfo features_check systemd LEAD_SONAME = "libc.so" +# msgfmt could come from gettext-native but we don't depend on that and +# disable for reproducibility CACHED_CONFIGUREVARS += " \ ac_cv_path_BASH_SHELL=${base_bindir}/bash \ + ac_cv_prog_MSGFMT= \ libc_cv_slibdir=${base_libdir} \ libc_cv_rootsbindir=${base_sbindir} \ libc_cv_localedir=${localedir} \ diff --git a/poky/meta/recipes-core/glibc/glibc/add-cross-localedef-hardlink.patch b/poky/meta/recipes-core/glibc/glibc/0001-localedef-Add-hardlink-resolver-from-util-linux.patch index 8471121949..d0786be8b8 100644 --- a/poky/meta/recipes-core/glibc/glibc/add-cross-localedef-hardlink.patch +++ b/poky/meta/recipes-core/glibc/glibc/0001-localedef-Add-hardlink-resolver-from-util-linux.patch @@ -1,10 +1,467 @@ +From 3dcf144e998aed17b3fb957a255b1e923ba07d71 Mon Sep 17 00:00:00 2001 +From: Jason Wessel <jason.wessel@windriver.com> +Date: Sat, 7 Dec 2019 09:59:22 -0800 +Subject: [PATCH] localedef: Add hardlink resolver from util-linux + +The hard link resolver that is built into localedef cannot be run in +parallel. It will search sibling directories (which are be processed +in parallel) and perform a creation of a .tmp file and remove the +original and move the .tmp file in. The problem is that if a probe +occurs a hard link can be requested to the file that is being removed. +This will lead to a stray copy or potentially, on a loaded system +cause race condition which pseudo cannot deal with, where it is left +with a hard link request to a file that no longer exists. In this +situation psuedo will inherit the permissions of what ever the target +inode had to offer. + +In short, there are two problems: + +1) You will be left with stray copies when using the hard link +resolution that is built in while running in parallel with +localedef. + +2) When running under pseudo the possibility exists for uid/gid +leakage when the source file is removed before the hard link can +be completed. + +The solution is to call localedef with --no-hard-links and separately +process the hardlinks at a later point. To do this requires the +inclusion of the hardlink utility found in modern versions of +util-linux. Most host systems do not have this, so it will be +included with the cross-localedef binary. + +[YOCTO #11299] +[YOCTO #12434] + +Upstream-Status: Pending + +Signed-off-by: Jason Wessel <jason.wessel@windriver.com> +Signed-off-by: Khem Raj <raj.khem@gmail.com> --- - locale/programs/c.h | 407 ++++++++++++++++++++++ - locale/programs/cross-localedef-hardlink.c | 528 +++++++++++++++++++++++++++++ - locale/programs/xalloc.h | 129 +++++++ - localedef/Makefile.in | 8 - 4 files changed, 1071 insertions(+), 1 deletion(-) + locale/programs/c.h | 407 ++++++++++++++++ + locale/programs/cross-localedef-hardlink.c | 528 +++++++++++++++++++++ + locale/programs/xalloc.h | 129 +++++ + 3 files changed, 1064 insertions(+) + create mode 100644 locale/programs/c.h + create mode 100644 locale/programs/cross-localedef-hardlink.c + create mode 100644 locale/programs/xalloc.h +diff --git a/locale/programs/c.h b/locale/programs/c.h +new file mode 100644 +index 0000000000..d0a402e90e +--- /dev/null ++++ b/locale/programs/c.h +@@ -0,0 +1,407 @@ ++/* ++ * Fundamental C definitions. ++ */ ++ ++#ifndef UTIL_LINUX_C_H ++#define UTIL_LINUX_C_H ++ ++#include <limits.h> ++#include <stddef.h> ++#include <stdint.h> ++#include <stdio.h> ++#include <unistd.h> ++#include <stdarg.h> ++#include <stdlib.h> ++#include <string.h> ++#include <errno.h> ++ ++#include <assert.h> ++ ++#ifdef HAVE_ERR_H ++# include <err.h> ++#endif ++ ++#ifdef HAVE_SYS_SYSMACROS_H ++# include <sys/sysmacros.h> /* for major, minor */ ++#endif ++ ++#ifndef LOGIN_NAME_MAX ++# define LOGIN_NAME_MAX 256 ++#endif ++ ++#ifndef NAME_MAX ++# define NAME_MAX PATH_MAX ++#endif ++ ++/* ++ * __GNUC_PREREQ is deprecated in favour of __has_attribute() and ++ * __has_feature(). The __has macros are supported by clang and gcc>=5. ++ */ ++#ifndef __GNUC_PREREQ ++# if defined __GNUC__ && defined __GNUC_MINOR__ ++# define __GNUC_PREREQ(maj, min) \ ++ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) ++# else ++# define __GNUC_PREREQ(maj, min) 0 ++# endif ++#endif ++ ++#ifdef __GNUC__ ++ ++/* &a[0] degrades to a pointer: a different type from an array */ ++# define __must_be_array(a) \ ++ UL_BUILD_BUG_ON_ZERO(__builtin_types_compatible_p(__typeof__(a), __typeof__(&a[0]))) ++ ++# define ignore_result(x) __extension__ ({ \ ++ __typeof__(x) __dummy __attribute__((__unused__)) = (x); (void) __dummy; \ ++}) ++ ++#else /* !__GNUC__ */ ++# define __must_be_array(a) 0 ++# define __attribute__(_arg_) ++# define ignore_result(x) ((void) (x)) ++#endif /* !__GNUC__ */ ++ ++/* ++ * It evaluates to 1 if the attribute/feature is supported by the current ++ * compilation targed. Fallback for old compilers. ++ */ ++#ifndef __has_attribute ++ #define __has_attribute(x) 0 ++#endif ++ ++#ifndef __has_feature ++ #define __has_feature(x) 0 ++#endif ++ ++/* ++ * Function attributes ++ */ ++#ifndef __ul_alloc_size ++# if (__has_attribute(alloc_size) && __has_attribute(warn_unused_result)) || __GNUC_PREREQ (4, 3) ++# define __ul_alloc_size(s) __attribute__((alloc_size(s), warn_unused_result)) ++# else ++# define __ul_alloc_size(s) ++# endif ++#endif ++ ++#ifndef __ul_calloc_size ++# if (__has_attribute(alloc_size) && __has_attribute(warn_unused_result)) || __GNUC_PREREQ (4, 3) ++# define __ul_calloc_size(n, s) __attribute__((alloc_size(n, s), warn_unused_result)) ++# else ++# define __ul_calloc_size(n, s) ++# endif ++#endif ++ ++#if __has_attribute(returns_nonnull) || __GNUC_PREREQ (4, 9) ++# define __ul_returns_nonnull __attribute__((returns_nonnull)) ++#else ++# define __ul_returns_nonnull ++#endif ++ ++/* ++ * Force a compilation error if condition is true, but also produce a ++ * result (of value 0 and type size_t), so the expression can be used ++ * e.g. in a structure initializer (or wherever else comma expressions ++ * aren't permitted). ++ */ ++#define UL_BUILD_BUG_ON_ZERO(e) __extension__ (sizeof(struct { int:-!!(e); })) ++#define BUILD_BUG_ON_NULL(e) ((void *)sizeof(struct { int:-!!(e); })) ++ ++#ifndef ARRAY_SIZE ++# define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) ++#endif ++ ++#ifndef PATH_MAX ++# define PATH_MAX 4096 ++#endif ++ ++#ifndef TRUE ++# define TRUE 1 ++#endif ++ ++#ifndef FALSE ++# define FALSE 0 ++#endif ++ ++#ifndef min ++# define min(x, y) __extension__ ({ \ ++ __typeof__(x) _min1 = (x); \ ++ __typeof__(y) _min2 = (y); \ ++ (void) (&_min1 == &_min2); \ ++ _min1 < _min2 ? _min1 : _min2; }) ++#endif ++ ++#ifndef max ++# define max(x, y) __extension__ ({ \ ++ __typeof__(x) _max1 = (x); \ ++ __typeof__(y) _max2 = (y); \ ++ (void) (&_max1 == &_max2); \ ++ _max1 > _max2 ? _max1 : _max2; }) ++#endif ++ ++#ifndef cmp_numbers ++# define cmp_numbers(x, y) __extension__ ({ \ ++ __typeof__(x) _a = (x); \ ++ __typeof__(y) _b = (y); \ ++ (void) (&_a == &_b); \ ++ _a == _b ? 0 : _a > _b ? 1 : -1; }) ++#endif ++ ++#ifndef offsetof ++#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) ++#endif ++ ++/* ++ * container_of - cast a member of a structure out to the containing structure ++ * @ptr: the pointer to the member. ++ * @type: the type of the container struct this is embedded in. ++ * @member: the name of the member within the struct. ++ */ ++#ifndef container_of ++#define container_of(ptr, type, member) __extension__ ({ \ ++ const __typeof__( ((type *)0)->member ) *__mptr = (ptr); \ ++ (type *)( (char *)__mptr - offsetof(type,member) );}) ++#endif ++ ++#ifndef HAVE_PROGRAM_INVOCATION_SHORT_NAME ++# ifdef HAVE___PROGNAME ++extern char *__progname; ++# define program_invocation_short_name __progname ++# else ++# ifdef HAVE_GETEXECNAME ++# define program_invocation_short_name \ ++ prog_inv_sh_nm_from_file(getexecname(), 0) ++# else ++# define program_invocation_short_name \ ++ prog_inv_sh_nm_from_file(__FILE__, 1) ++# endif ++static char prog_inv_sh_nm_buf[256]; ++static inline char * ++prog_inv_sh_nm_from_file(char *f, char stripext) ++{ ++ char *t; ++ ++ if ((t = strrchr(f, '/')) != NULL) ++ t++; ++ else ++ t = f; ++ ++ strncpy(prog_inv_sh_nm_buf, t, sizeof(prog_inv_sh_nm_buf) - 1); ++ prog_inv_sh_nm_buf[sizeof(prog_inv_sh_nm_buf) - 1] = '\0'; ++ ++ if (stripext && (t = strrchr(prog_inv_sh_nm_buf, '.')) != NULL) ++ *t = '\0'; ++ ++ return prog_inv_sh_nm_buf; ++} ++# endif ++#endif ++ ++ ++#ifndef HAVE_ERR_H ++static inline void ++errmsg(char doexit, int excode, char adderr, const char *fmt, ...) ++{ ++ fprintf(stderr, "%s: ", program_invocation_short_name); ++ if (fmt != NULL) { ++ va_list argp; ++ va_start(argp, fmt); ++ vfprintf(stderr, fmt, argp); ++ va_end(argp); ++ if (adderr) ++ fprintf(stderr, ": "); ++ } ++ if (adderr) ++ fprintf(stderr, "%m"); ++ fprintf(stderr, "\n"); ++ if (doexit) ++ exit(excode); ++} ++ ++#ifndef HAVE_ERR ++# define err(E, FMT...) errmsg(1, E, 1, FMT) ++#endif ++ ++#ifndef HAVE_ERRX ++# define errx(E, FMT...) errmsg(1, E, 0, FMT) ++#endif ++ ++#ifndef HAVE_WARN ++# define warn(FMT...) errmsg(0, 0, 1, FMT) ++#endif ++ ++#ifndef HAVE_WARNX ++# define warnx(FMT...) errmsg(0, 0, 0, FMT) ++#endif ++#endif /* !HAVE_ERR_H */ ++ ++ ++/* Don't use inline function to avoid '#include "nls.h"' in c.h ++ */ ++#define errtryhelp(eval) __extension__ ({ \ ++ fprintf(stderr, _("Try '%s --help' for more information.\n"), \ ++ program_invocation_short_name); \ ++ exit(eval); \ ++}) ++ ++/* After failed execvp() */ ++#define EX_EXEC_FAILED 126 /* Program located, but not usable. */ ++#define EX_EXEC_ENOENT 127 /* Could not find program to exec. */ ++#define errexec(name) err(errno == ENOENT ? EX_EXEC_ENOENT : EX_EXEC_FAILED, \ ++ _("failed to execute %s"), name) ++ ++ ++static inline __attribute__((const)) int is_power_of_2(unsigned long num) ++{ ++ return (num != 0 && ((num & (num - 1)) == 0)); ++} ++ ++#ifndef HAVE_LOFF_T ++typedef int64_t loff_t; ++#endif ++ ++#if !defined(HAVE_DIRFD) && (!defined(HAVE_DECL_DIRFD) || HAVE_DECL_DIRFD == 0) && defined(HAVE_DIR_DD_FD) ++#include <sys/types.h> ++#include <dirent.h> ++static inline int dirfd(DIR *d) ++{ ++ return d->dd_fd; ++} ++#endif ++ ++/* ++ * Fallback defines for old versions of glibc ++ */ ++#include <fcntl.h> ++ ++#ifdef O_CLOEXEC ++#define UL_CLOEXECSTR "e" ++#else ++#define UL_CLOEXECSTR "" ++#endif ++ ++#ifndef O_CLOEXEC ++#define O_CLOEXEC 0 ++#endif ++ ++#ifdef __FreeBSD_kernel__ ++#ifndef F_DUPFD_CLOEXEC ++#define F_DUPFD_CLOEXEC 17 /* Like F_DUPFD, but FD_CLOEXEC is set */ ++#endif ++#endif ++ ++ ++#ifndef AI_ADDRCONFIG ++#define AI_ADDRCONFIG 0x0020 ++#endif ++ ++#ifndef IUTF8 ++#define IUTF8 0040000 ++#endif ++ ++/* ++ * MAXHOSTNAMELEN replacement ++ */ ++static inline size_t get_hostname_max(void) ++{ ++ long len = sysconf(_SC_HOST_NAME_MAX); ++ ++ if (0 < len) ++ return len; ++ ++#ifdef MAXHOSTNAMELEN ++ return MAXHOSTNAMELEN; ++#elif HOST_NAME_MAX ++ return HOST_NAME_MAX; ++#endif ++ return 64; ++} ++ ++ ++/* ++ * Constant strings for usage() functions. For more info see ++ * Documentation/{howto-usage-function.txt,boilerplate.c} ++ */ ++#define USAGE_HEADER ("\nUsage:\n") ++#define USAGE_OPTIONS ("\nOptions:\n") ++#define USAGE_FUNCTIONS ("\nFunctions:\n") ++#define USAGE_COMMANDS ("\nCommands:\n") ++#define USAGE_COLUMNS ("\nAvailable output columns:\n") ++#define USAGE_SEPARATOR "\n" ++ ++#define USAGE_OPTSTR_HELP ("display this help") ++#define USAGE_OPTSTR_VERSION ("display version") ++ ++#define USAGE_HELP_OPTIONS(marg_dsc) \ ++ "%-" #marg_dsc "s%s\n" \ ++ "%-" #marg_dsc "s%s\n" \ ++ , " -h, --help", USAGE_OPTSTR_HELP \ ++ , " -V, --version", USAGE_OPTSTR_VERSION ++ ++#define USAGE_MAN_TAIL(_man) ("\nFor more details see %s.\n"), _man ++ ++#define UTIL_LINUX_VERSION ("%s from %s\n"), program_invocation_short_name, PACKAGE_STRING ++ ++#define print_version(eval) __extension__ ({ \ ++ printf(UTIL_LINUX_VERSION); \ ++ exit(eval); \ ++}) ++ ++/* ++ * scanf modifiers for "strings allocation" ++ */ ++#ifdef HAVE_SCANF_MS_MODIFIER ++#define UL_SCNsA "%ms" ++#elif defined(HAVE_SCANF_AS_MODIFIER) ++#define UL_SCNsA "%as" ++#endif ++ ++/* ++ * seek stuff ++ */ ++#ifndef SEEK_DATA ++# define SEEK_DATA 3 ++#endif ++#ifndef SEEK_HOLE ++# define SEEK_HOLE 4 ++#endif ++ ++ ++/* ++ * Macros to convert #define'itions to strings, for example ++ * #define XYXXY 42 ++ * printf ("%s=%s\n", stringify(XYXXY), stringify_value(XYXXY)); ++ */ ++#define stringify_value(s) stringify(s) ++#define stringify(s) #s ++ ++/* ++ * UL_ASAN_BLACKLIST is a macro to tell AddressSanitizer (a compile-time ++ * instrumentation shipped with Clang and GCC) to not instrument the ++ * annotated function. Furthermore, it will prevent the compiler from ++ * inlining the function because inlining currently breaks the blacklisting ++ * mechanism of AddressSanitizer. ++ */ ++#if __has_feature(address_sanitizer) && __has_attribute(no_sanitize_memory) && __has_attribute(no_sanitize_address) ++# define UL_ASAN_BLACKLIST __attribute__((noinline)) __attribute__((no_sanitize_memory)) __attribute__((no_sanitize_address)) ++#else ++# define UL_ASAN_BLACKLIST /* nothing */ ++#endif ++ ++/* ++ * Note that sysconf(_SC_GETPW_R_SIZE_MAX) returns *initial* suggested size for ++ * pwd buffer and in some cases it is not large enough. See POSIX and ++ * getpwnam_r man page for more details. ++ */ ++#define UL_GETPW_BUFSIZ (16 * 1024) ++ ++/* ++ * Darwin or other BSDs may only have MAP_ANON. To get it on Darwin we must ++ * define _DARWIN_C_SOURCE before including sys/mman.h. We do this in config.h. ++ */ ++#if !defined MAP_ANONYMOUS && defined MAP_ANON ++# define MAP_ANONYMOUS (MAP_ANON) ++#endif ++ ++#endif /* UTIL_LINUX_C_H */ +diff --git a/locale/programs/cross-localedef-hardlink.c b/locale/programs/cross-localedef-hardlink.c +new file mode 100644 +index 0000000000..63615896b0 --- /dev/null +++ b/locale/programs/cross-localedef-hardlink.c @@ -0,0 +1,528 @@ @@ -536,451 +993,9 @@ + + return 0; +} ---- a/localedef/Makefile.in -+++ b/localedef/Makefile.in -@@ -40,6 +40,8 @@ WARNFLAGS = -Wall -Wno-format - FULLCC = $(CC) $(CPPFLAGS) $(CFLAGS) \ - $(DEFINES) $(INCLUDES) $(WARNFLAGS) - -+CROSS_LOCALEDEF_HARDLINK_OBJS = cross-localedef-hardlink.o -+ - LOCALEDEF_OBJS = charmap.o charmap-dir.o ld-address.o ld-collate.o \ - ld-ctype.o ld-identification.o ld-measurement.o \ - ld-messages.o ld-monetary.o ld-name.o ld-numeric.o \ -@@ -54,11 +56,14 @@ LOCALEDEF_OBJS = charmap.o charmap-dir.o - asprintf.o getdelim.o localedef_extra.o \ - obstack_printf.o vasprintf.o - --all: localedef$(EXEEXT) -+all: localedef$(EXEEXT) cross-localedef-hardlink$(EXEEXT) - - localedef$(EXEEXT): $(LOCALEDEF_OBJS) - $(CC) -o $@ $(LOCALEDEF_OBJS) $(LIBS) - -+cross-localedef-hardlink$(EXEEXT): $(CROSS_LOCALEDEF_HARDLINK_OBJS) -+ $(CC) -o $@ $(CROSS_LOCALEDEF_HARDLINK_OBJS) $(LIBS) -+ - clean: - rm -f locale$(EXEEXT) $(LOCALEDEF_OBJS) - -@@ -77,6 +82,7 @@ clean: - %.o: $(srcdir)/%.c - $(FULLCC) -c -o $@ $< - -+cross-localedef-hardlink.o: glibc/locale/programs/cross-localedef-hardlink.c - charmap.o: glibc/locale/programs/charmap.c - charmap-dir.o: glibc/locale/programs/charmap-dir.c - ld-address.o: glibc/locale/programs/ld-address.c ---- /dev/null -+++ b/locale/programs/c.h -@@ -0,0 +1,407 @@ -+/* -+ * Fundamental C definitions. -+ */ -+ -+#ifndef UTIL_LINUX_C_H -+#define UTIL_LINUX_C_H -+ -+#include <limits.h> -+#include <stddef.h> -+#include <stdint.h> -+#include <stdio.h> -+#include <unistd.h> -+#include <stdarg.h> -+#include <stdlib.h> -+#include <string.h> -+#include <errno.h> -+ -+#include <assert.h> -+ -+#ifdef HAVE_ERR_H -+# include <err.h> -+#endif -+ -+#ifdef HAVE_SYS_SYSMACROS_H -+# include <sys/sysmacros.h> /* for major, minor */ -+#endif -+ -+#ifndef LOGIN_NAME_MAX -+# define LOGIN_NAME_MAX 256 -+#endif -+ -+#ifndef NAME_MAX -+# define NAME_MAX PATH_MAX -+#endif -+ -+/* -+ * __GNUC_PREREQ is deprecated in favour of __has_attribute() and -+ * __has_feature(). The __has macros are supported by clang and gcc>=5. -+ */ -+#ifndef __GNUC_PREREQ -+# if defined __GNUC__ && defined __GNUC_MINOR__ -+# define __GNUC_PREREQ(maj, min) \ -+ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -+# else -+# define __GNUC_PREREQ(maj, min) 0 -+# endif -+#endif -+ -+#ifdef __GNUC__ -+ -+/* &a[0] degrades to a pointer: a different type from an array */ -+# define __must_be_array(a) \ -+ UL_BUILD_BUG_ON_ZERO(__builtin_types_compatible_p(__typeof__(a), __typeof__(&a[0]))) -+ -+# define ignore_result(x) __extension__ ({ \ -+ __typeof__(x) __dummy __attribute__((__unused__)) = (x); (void) __dummy; \ -+}) -+ -+#else /* !__GNUC__ */ -+# define __must_be_array(a) 0 -+# define __attribute__(_arg_) -+# define ignore_result(x) ((void) (x)) -+#endif /* !__GNUC__ */ -+ -+/* -+ * It evaluates to 1 if the attribute/feature is supported by the current -+ * compilation targed. Fallback for old compilers. -+ */ -+#ifndef __has_attribute -+ #define __has_attribute(x) 0 -+#endif -+ -+#ifndef __has_feature -+ #define __has_feature(x) 0 -+#endif -+ -+/* -+ * Function attributes -+ */ -+#ifndef __ul_alloc_size -+# if (__has_attribute(alloc_size) && __has_attribute(warn_unused_result)) || __GNUC_PREREQ (4, 3) -+# define __ul_alloc_size(s) __attribute__((alloc_size(s), warn_unused_result)) -+# else -+# define __ul_alloc_size(s) -+# endif -+#endif -+ -+#ifndef __ul_calloc_size -+# if (__has_attribute(alloc_size) && __has_attribute(warn_unused_result)) || __GNUC_PREREQ (4, 3) -+# define __ul_calloc_size(n, s) __attribute__((alloc_size(n, s), warn_unused_result)) -+# else -+# define __ul_calloc_size(n, s) -+# endif -+#endif -+ -+#if __has_attribute(returns_nonnull) || __GNUC_PREREQ (4, 9) -+# define __ul_returns_nonnull __attribute__((returns_nonnull)) -+#else -+# define __ul_returns_nonnull -+#endif -+ -+/* -+ * Force a compilation error if condition is true, but also produce a -+ * result (of value 0 and type size_t), so the expression can be used -+ * e.g. in a structure initializer (or wherever else comma expressions -+ * aren't permitted). -+ */ -+#define UL_BUILD_BUG_ON_ZERO(e) __extension__ (sizeof(struct { int:-!!(e); })) -+#define BUILD_BUG_ON_NULL(e) ((void *)sizeof(struct { int:-!!(e); })) -+ -+#ifndef ARRAY_SIZE -+# define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) -+#endif -+ -+#ifndef PATH_MAX -+# define PATH_MAX 4096 -+#endif -+ -+#ifndef TRUE -+# define TRUE 1 -+#endif -+ -+#ifndef FALSE -+# define FALSE 0 -+#endif -+ -+#ifndef min -+# define min(x, y) __extension__ ({ \ -+ __typeof__(x) _min1 = (x); \ -+ __typeof__(y) _min2 = (y); \ -+ (void) (&_min1 == &_min2); \ -+ _min1 < _min2 ? _min1 : _min2; }) -+#endif -+ -+#ifndef max -+# define max(x, y) __extension__ ({ \ -+ __typeof__(x) _max1 = (x); \ -+ __typeof__(y) _max2 = (y); \ -+ (void) (&_max1 == &_max2); \ -+ _max1 > _max2 ? _max1 : _max2; }) -+#endif -+ -+#ifndef cmp_numbers -+# define cmp_numbers(x, y) __extension__ ({ \ -+ __typeof__(x) _a = (x); \ -+ __typeof__(y) _b = (y); \ -+ (void) (&_a == &_b); \ -+ _a == _b ? 0 : _a > _b ? 1 : -1; }) -+#endif -+ -+#ifndef offsetof -+#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) -+#endif -+ -+/* -+ * container_of - cast a member of a structure out to the containing structure -+ * @ptr: the pointer to the member. -+ * @type: the type of the container struct this is embedded in. -+ * @member: the name of the member within the struct. -+ */ -+#ifndef container_of -+#define container_of(ptr, type, member) __extension__ ({ \ -+ const __typeof__( ((type *)0)->member ) *__mptr = (ptr); \ -+ (type *)( (char *)__mptr - offsetof(type,member) );}) -+#endif -+ -+#ifndef HAVE_PROGRAM_INVOCATION_SHORT_NAME -+# ifdef HAVE___PROGNAME -+extern char *__progname; -+# define program_invocation_short_name __progname -+# else -+# ifdef HAVE_GETEXECNAME -+# define program_invocation_short_name \ -+ prog_inv_sh_nm_from_file(getexecname(), 0) -+# else -+# define program_invocation_short_name \ -+ prog_inv_sh_nm_from_file(__FILE__, 1) -+# endif -+static char prog_inv_sh_nm_buf[256]; -+static inline char * -+prog_inv_sh_nm_from_file(char *f, char stripext) -+{ -+ char *t; -+ -+ if ((t = strrchr(f, '/')) != NULL) -+ t++; -+ else -+ t = f; -+ -+ strncpy(prog_inv_sh_nm_buf, t, sizeof(prog_inv_sh_nm_buf) - 1); -+ prog_inv_sh_nm_buf[sizeof(prog_inv_sh_nm_buf) - 1] = '\0'; -+ -+ if (stripext && (t = strrchr(prog_inv_sh_nm_buf, '.')) != NULL) -+ *t = '\0'; -+ -+ return prog_inv_sh_nm_buf; -+} -+# endif -+#endif -+ -+ -+#ifndef HAVE_ERR_H -+static inline void -+errmsg(char doexit, int excode, char adderr, const char *fmt, ...) -+{ -+ fprintf(stderr, "%s: ", program_invocation_short_name); -+ if (fmt != NULL) { -+ va_list argp; -+ va_start(argp, fmt); -+ vfprintf(stderr, fmt, argp); -+ va_end(argp); -+ if (adderr) -+ fprintf(stderr, ": "); -+ } -+ if (adderr) -+ fprintf(stderr, "%m"); -+ fprintf(stderr, "\n"); -+ if (doexit) -+ exit(excode); -+} -+ -+#ifndef HAVE_ERR -+# define err(E, FMT...) errmsg(1, E, 1, FMT) -+#endif -+ -+#ifndef HAVE_ERRX -+# define errx(E, FMT...) errmsg(1, E, 0, FMT) -+#endif -+ -+#ifndef HAVE_WARN -+# define warn(FMT...) errmsg(0, 0, 1, FMT) -+#endif -+ -+#ifndef HAVE_WARNX -+# define warnx(FMT...) errmsg(0, 0, 0, FMT) -+#endif -+#endif /* !HAVE_ERR_H */ -+ -+ -+/* Don't use inline function to avoid '#include "nls.h"' in c.h -+ */ -+#define errtryhelp(eval) __extension__ ({ \ -+ fprintf(stderr, _("Try '%s --help' for more information.\n"), \ -+ program_invocation_short_name); \ -+ exit(eval); \ -+}) -+ -+/* After failed execvp() */ -+#define EX_EXEC_FAILED 126 /* Program located, but not usable. */ -+#define EX_EXEC_ENOENT 127 /* Could not find program to exec. */ -+#define errexec(name) err(errno == ENOENT ? EX_EXEC_ENOENT : EX_EXEC_FAILED, \ -+ _("failed to execute %s"), name) -+ -+ -+static inline __attribute__((const)) int is_power_of_2(unsigned long num) -+{ -+ return (num != 0 && ((num & (num - 1)) == 0)); -+} -+ -+#ifndef HAVE_LOFF_T -+typedef int64_t loff_t; -+#endif -+ -+#if !defined(HAVE_DIRFD) && (!defined(HAVE_DECL_DIRFD) || HAVE_DECL_DIRFD == 0) && defined(HAVE_DIR_DD_FD) -+#include <sys/types.h> -+#include <dirent.h> -+static inline int dirfd(DIR *d) -+{ -+ return d->dd_fd; -+} -+#endif -+ -+/* -+ * Fallback defines for old versions of glibc -+ */ -+#include <fcntl.h> -+ -+#ifdef O_CLOEXEC -+#define UL_CLOEXECSTR "e" -+#else -+#define UL_CLOEXECSTR "" -+#endif -+ -+#ifndef O_CLOEXEC -+#define O_CLOEXEC 0 -+#endif -+ -+#ifdef __FreeBSD_kernel__ -+#ifndef F_DUPFD_CLOEXEC -+#define F_DUPFD_CLOEXEC 17 /* Like F_DUPFD, but FD_CLOEXEC is set */ -+#endif -+#endif -+ -+ -+#ifndef AI_ADDRCONFIG -+#define AI_ADDRCONFIG 0x0020 -+#endif -+ -+#ifndef IUTF8 -+#define IUTF8 0040000 -+#endif -+ -+/* -+ * MAXHOSTNAMELEN replacement -+ */ -+static inline size_t get_hostname_max(void) -+{ -+ long len = sysconf(_SC_HOST_NAME_MAX); -+ -+ if (0 < len) -+ return len; -+ -+#ifdef MAXHOSTNAMELEN -+ return MAXHOSTNAMELEN; -+#elif HOST_NAME_MAX -+ return HOST_NAME_MAX; -+#endif -+ return 64; -+} -+ -+ -+/* -+ * Constant strings for usage() functions. For more info see -+ * Documentation/{howto-usage-function.txt,boilerplate.c} -+ */ -+#define USAGE_HEADER ("\nUsage:\n") -+#define USAGE_OPTIONS ("\nOptions:\n") -+#define USAGE_FUNCTIONS ("\nFunctions:\n") -+#define USAGE_COMMANDS ("\nCommands:\n") -+#define USAGE_COLUMNS ("\nAvailable output columns:\n") -+#define USAGE_SEPARATOR "\n" -+ -+#define USAGE_OPTSTR_HELP ("display this help") -+#define USAGE_OPTSTR_VERSION ("display version") -+ -+#define USAGE_HELP_OPTIONS(marg_dsc) \ -+ "%-" #marg_dsc "s%s\n" \ -+ "%-" #marg_dsc "s%s\n" \ -+ , " -h, --help", USAGE_OPTSTR_HELP \ -+ , " -V, --version", USAGE_OPTSTR_VERSION -+ -+#define USAGE_MAN_TAIL(_man) ("\nFor more details see %s.\n"), _man -+ -+#define UTIL_LINUX_VERSION ("%s from %s\n"), program_invocation_short_name, PACKAGE_STRING -+ -+#define print_version(eval) __extension__ ({ \ -+ printf(UTIL_LINUX_VERSION); \ -+ exit(eval); \ -+}) -+ -+/* -+ * scanf modifiers for "strings allocation" -+ */ -+#ifdef HAVE_SCANF_MS_MODIFIER -+#define UL_SCNsA "%ms" -+#elif defined(HAVE_SCANF_AS_MODIFIER) -+#define UL_SCNsA "%as" -+#endif -+ -+/* -+ * seek stuff -+ */ -+#ifndef SEEK_DATA -+# define SEEK_DATA 3 -+#endif -+#ifndef SEEK_HOLE -+# define SEEK_HOLE 4 -+#endif -+ -+ -+/* -+ * Macros to convert #define'itions to strings, for example -+ * #define XYXXY 42 -+ * printf ("%s=%s\n", stringify(XYXXY), stringify_value(XYXXY)); -+ */ -+#define stringify_value(s) stringify(s) -+#define stringify(s) #s -+ -+/* -+ * UL_ASAN_BLACKLIST is a macro to tell AddressSanitizer (a compile-time -+ * instrumentation shipped with Clang and GCC) to not instrument the -+ * annotated function. Furthermore, it will prevent the compiler from -+ * inlining the function because inlining currently breaks the blacklisting -+ * mechanism of AddressSanitizer. -+ */ -+#if __has_feature(address_sanitizer) && __has_attribute(no_sanitize_memory) && __has_attribute(no_sanitize_address) -+# define UL_ASAN_BLACKLIST __attribute__((noinline)) __attribute__((no_sanitize_memory)) __attribute__((no_sanitize_address)) -+#else -+# define UL_ASAN_BLACKLIST /* nothing */ -+#endif -+ -+/* -+ * Note that sysconf(_SC_GETPW_R_SIZE_MAX) returns *initial* suggested size for -+ * pwd buffer and in some cases it is not large enough. See POSIX and -+ * getpwnam_r man page for more details. -+ */ -+#define UL_GETPW_BUFSIZ (16 * 1024) -+ -+/* -+ * Darwin or other BSDs may only have MAP_ANON. To get it on Darwin we must -+ * define _DARWIN_C_SOURCE before including sys/mman.h. We do this in config.h. -+ */ -+#if !defined MAP_ANONYMOUS && defined MAP_ANON -+# define MAP_ANONYMOUS (MAP_ANON) -+#endif -+ -+#endif /* UTIL_LINUX_C_H */ +diff --git a/locale/programs/xalloc.h b/locale/programs/xalloc.h +new file mode 100644 +index 0000000000..0129a85e2e --- /dev/null +++ b/locale/programs/xalloc.h @@ -0,0 +1,129 @@ diff --git a/poky/meta/recipes-core/glibc/glibc/0001-localedef-Add-hardlink-resolver-to-build.patch b/poky/meta/recipes-core/glibc/glibc/0001-localedef-Add-hardlink-resolver-to-build.patch new file mode 100644 index 0000000000..d6652981a8 --- /dev/null +++ b/poky/meta/recipes-core/glibc/glibc/0001-localedef-Add-hardlink-resolver-to-build.patch @@ -0,0 +1,52 @@ +From 56ae260ac24ade94e2e0e77c81751312372d253f Mon Sep 17 00:00:00 2001 +From: Jason Wessel <jason.wessel@windriver.com> +Date: Sat, 7 Dec 2019 09:56:23 -0800 +Subject: [PATCH] localedef: Add hardlink resolver to build + +The sourcecode for this is imported from util-linux and is kept with +glibc sources + +Upstream-Status: Pending +Signed-off-by: Jason Wessel <jason.wessel@windriver.com> +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + Makefile.in | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/Makefile.in b/Makefile.in +index 77fbded..a87e5b2 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -40,6 +40,8 @@ WARNFLAGS = -Wall -Wno-format + FULLCC = $(CC) $(CPPFLAGS) $(CFLAGS) \ + $(DEFINES) $(INCLUDES) $(WARNFLAGS) + ++CROSS_LOCALEDEF_HARDLINK_OBJS = cross-localedef-hardlink.o ++ + LOCALEDEF_OBJS = charmap.o charmap-dir.o ld-address.o ld-collate.o \ + ld-ctype.o ld-identification.o ld-measurement.o \ + ld-messages.o ld-monetary.o ld-name.o ld-numeric.o \ +@@ -54,11 +56,14 @@ LOCALEDEF_OBJS = charmap.o charmap-dir.o ld-address.o ld-collate.o \ + asprintf.o getdelim.o localedef_extra.o \ + obstack_printf.o vasprintf.o + +-all: localedef$(EXEEXT) ++all: localedef$(EXEEXT) cross-localedef-hardlink$(EXEEXT) + + localedef$(EXEEXT): $(LOCALEDEF_OBJS) + $(CC) -o $@ $(LOCALEDEF_OBJS) $(LIBS) + ++cross-localedef-hardlink$(EXEEXT): $(CROSS_LOCALEDEF_HARDLINK_OBJS) ++ $(CC) -o $@ $(CROSS_LOCALEDEF_HARDLINK_OBJS) $(LIBS) ++ + clean: + rm -f locale$(EXEEXT) $(LOCALEDEF_OBJS) + +@@ -77,6 +82,7 @@ clean: + %.o: $(srcdir)/%.c + $(FULLCC) -c -o $@ $< + ++cross-localedef-hardlink.o: glibc/locale/programs/cross-localedef-hardlink.c + charmap.o: glibc/locale/programs/charmap.c + charmap-dir.o: glibc/locale/programs/charmap-dir.c + ld-address.o: glibc/locale/programs/ld-address.c diff --git a/poky/meta/recipes-core/glibc/glibc/allow-compile-separate-from-util-linux-hardlink.patch b/poky/meta/recipes-core/glibc/glibc/0002-localedef-fix-ups-hardlink-to-make-it-compile.patch index 1148ebfcc7..5222e37d1a 100644 --- a/poky/meta/recipes-core/glibc/glibc/allow-compile-separate-from-util-linux-hardlink.patch +++ b/poky/meta/recipes-core/glibc/glibc/0002-localedef-fix-ups-hardlink-to-make-it-compile.patch @@ -1,8 +1,31 @@ +From b52dba15527380cc18635e3696e0ef87efee9a84 Mon Sep 17 00:00:00 2001 +From: Jason Wessel <jason.wessel@windriver.com> +Date: Sat, 7 Dec 2019 10:01:37 -0800 +Subject: [PATCH] localedef: fix-ups hardlink to make it compile + +Upstream-Status: Pending +Signed-off-by: Jason Wessel <jason.wessel@windriver.com> +Signed-off-by: Khem Raj <raj.khem@gmail.com> --- - locale/programs/c.h | 2 - locale/programs/cross-localedef-hardlink.c | 79 +++++++++++++---------------- + locale/programs/c.h | 2 +- + locale/programs/cross-localedef-hardlink.c | 79 +++++++++++----------- 2 files changed, 39 insertions(+), 42 deletions(-) +diff --git a/locale/programs/c.h b/locale/programs/c.h +index d0a402e90e..1804d31c73 100644 +--- a/locale/programs/c.h ++++ b/locale/programs/c.h +@@ -240,7 +240,7 @@ errmsg(char doexit, int excode, char adderr, const char *fmt, ...) + /* Don't use inline function to avoid '#include "nls.h"' in c.h + */ + #define errtryhelp(eval) __extension__ ({ \ +- fprintf(stderr, _("Try '%s --help' for more information.\n"), \ ++ fprintf(stderr, ("Try '%s --help' for more information.\n"), \ + program_invocation_short_name); \ + exit(eval); \ + }) +diff --git a/locale/programs/cross-localedef-hardlink.c b/locale/programs/cross-localedef-hardlink.c +index 63615896b0..726e6dd948 100644 --- a/locale/programs/cross-localedef-hardlink.c +++ b/locale/programs/cross-localedef-hardlink.c @@ -20,6 +20,8 @@ @@ -75,7 +98,7 @@ fputs(USAGE_SEPARATOR, stdout); printf(USAGE_HELP_OPTIONS(16)); /* char offset to align option descriptions */ -@@ -164,7 +166,7 @@ static inline size_t add2(size_t a, size +@@ -164,7 +166,7 @@ static inline size_t add2(size_t a, size_t b) size_t sum = a + b; if (sum < a) @@ -84,7 +107,7 @@ return sum; } -@@ -193,7 +195,7 @@ static void process_path(struct hardlink +@@ -193,7 +195,7 @@ static void process_path(struct hardlink_ctl *ctl, const char *name) if (st.st_dev != ctl->dev && !ctl->force) { if (ctl->dev) errx(EXIT_FAILURE, @@ -93,7 +116,7 @@ "(use -f option to override)."), name); ctl->dev = st.st_dev; } -@@ -287,9 +289,9 @@ static void process_path(struct hardlink +@@ -287,9 +289,9 @@ static void process_path(struct hardlink_ctl *ctl, const char *name) (ssize_t) sizeof(ctl->iobuf1) : fsize; if ((xsz = read(fd, ctl->iobuf1, rsize)) != rsize) @@ -105,7 +128,7 @@ if (xsz != rsize) { close(fd); -@@ -303,13 +305,13 @@ static void process_path(struct hardlink +@@ -303,13 +305,13 @@ static void process_path(struct hardlink_ctl *ctl, const char *name) if (fsize > 0) continue; if (lstat(name, &st3)) { @@ -121,7 +144,7 @@ close(fd); return; } -@@ -329,18 +331,18 @@ static void process_path(struct hardlink +@@ -329,18 +331,18 @@ static void process_path(struct hardlink_ctl *ctl, const char *name) suffixlen + 1); /* First create a temporary link to n1 under a new name */ if (link(n1, nam2.buf)) { @@ -143,7 +166,7 @@ free(nam2.buf); continue; } -@@ -351,16 +353,16 @@ static void process_path(struct hardlink +@@ -351,16 +353,16 @@ static void process_path(struct hardlink_ctl *ctl, const char *name) /* We actually did not save anything this time, since the link second argument had some other links as well. */ if (ctl->verbose > 1) @@ -213,14 +236,3 @@ } continue; } ---- a/locale/programs/c.h -+++ b/locale/programs/c.h -@@ -240,7 +240,7 @@ errmsg(char doexit, int excode, char add - /* Don't use inline function to avoid '#include "nls.h"' in c.h - */ - #define errtryhelp(eval) __extension__ ({ \ -- fprintf(stderr, _("Try '%s --help' for more information.\n"), \ -+ fprintf(stderr, ("Try '%s --help' for more information.\n"), \ - program_invocation_short_name); \ - exit(eval); \ - }) diff --git a/poky/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch b/poky/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch index d86d1d8dc7..4cdc8354b6 100644 --- a/poky/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch +++ b/poky/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch @@ -1,8 +1,7 @@ -From f6984c923b41155979764bfa3f44609572be5414 Mon Sep 17 00:00:00 2001 +From 6987ad183770cb56680ccc4f6ea065a04f31ccb6 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Wed, 18 Mar 2015 01:48:24 +0000 -Subject: [PATCH 01/28] nativesdk-glibc: Look for host system ld.so.cache as - well +Subject: [PATCH] nativesdk-glibc: Look for host system ld.so.cache as well Upstream-Status: Inappropriate [embedded specific] @@ -31,10 +30,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/elf/dl-load.c b/elf/dl-load.c -index 5abeb867f1..981bd5b4af 100644 +index a6b80f9395..3226f2e531 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c -@@ -2080,6 +2080,14 @@ _dl_map_object (struct link_map *loader, const char *name, +@@ -2073,6 +2073,14 @@ _dl_map_object (struct link_map *loader, const char *name, } } @@ -49,7 +48,7 @@ index 5abeb867f1..981bd5b4af 100644 #ifdef USE_LDCONFIG if (fd == -1 && (__glibc_likely ((mode & __RTLD_SECURE) == 0) -@@ -2138,14 +2146,6 @@ _dl_map_object (struct link_map *loader, const char *name, +@@ -2131,14 +2139,6 @@ _dl_map_object (struct link_map *loader, const char *name, } #endif @@ -64,6 +63,3 @@ index 5abeb867f1..981bd5b4af 100644 /* Add another newline when we are tracing the library loading. */ if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS)) _dl_debug_printf ("\n"); --- -2.22.0 - diff --git a/poky/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch b/poky/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch index 63531082a4..62e12897f5 100644 --- a/poky/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch +++ b/poky/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch @@ -1,8 +1,7 @@ -From b91c323d809039bf9b8c445418579a8b5fe61aea Mon Sep 17 00:00:00 2001 +From 7806340c2accc2c51e7e861b618c29fb5609a007 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Wed, 18 Mar 2015 01:50:00 +0000 -Subject: [PATCH 02/28] nativesdk-glibc: Fix buffer overrun with a relocated - SDK +Subject: [PATCH] nativesdk-glibc: Fix buffer overrun with a relocated SDK When ld-linux-*.so.2 is relocated to a path that is longer than the original fixed location, the dynamic loader will crash in open_path @@ -22,10 +21,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> 1 file changed, 12 insertions(+) diff --git a/elf/dl-load.c b/elf/dl-load.c -index 981bd5b4af..c7a0fa58cb 100644 +index 3226f2e531..7cb8a86fab 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c -@@ -1780,7 +1780,19 @@ open_path (const char *name, size_t namelen, int mode, +@@ -1773,7 +1773,19 @@ open_path (const char *name, size_t namelen, int mode, given on the command line when rtld is run directly. */ return -1; @@ -45,6 +44,3 @@ index 981bd5b4af..c7a0fa58cb 100644 do { struct r_search_path_elem *this_dir = *dirs; --- -2.22.0 - diff --git a/poky/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch b/poky/meta/recipes-core/glibc/glibc/0005-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch index 48f5a78716..294c2b975e 100644 --- a/poky/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch +++ b/poky/meta/recipes-core/glibc/glibc/0005-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch @@ -1,8 +1,7 @@ -From 3aceb84e2bc0f796204fe059beede91179b1bc6e Mon Sep 17 00:00:00 2001 +From 1b97befbe693eb93a77b6098f6ae1394a53462f4 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Wed, 18 Mar 2015 01:51:38 +0000 -Subject: [PATCH 03/28] nativesdk-glibc: Raise the size of arrays containing dl - paths +Subject: [PATCH] nativesdk-glibc: Raise the size of arrays containing dl paths This patch puts the dynamic loader path in the binaries, SYSTEM_DIRS strings and lengths as well as ld.so.cache path in the dynamic loader to specific @@ -26,7 +25,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> 7 files changed, 14 insertions(+), 10 deletions(-) diff --git a/elf/dl-cache.c b/elf/dl-cache.c -index d8d1e2344e..d2247bfc4f 100644 +index 3eedd9afcf..efdfe5cae7 100644 --- a/elf/dl-cache.c +++ b/elf/dl-cache.c @@ -133,6 +133,10 @@ do \ @@ -41,7 +40,7 @@ index d8d1e2344e..d2247bfc4f 100644 _dl_cache_libcmp (const char *p1, const char *p2) { diff --git a/elf/dl-load.c b/elf/dl-load.c -index c7a0fa58cb..4b87505d45 100644 +index 7cb8a86fab..e32d4aa936 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -110,8 +110,8 @@ static size_t max_capstrlen attribute_relro; @@ -56,7 +55,7 @@ index c7a0fa58cb..4b87505d45 100644 SYSTEM_DIRS_LEN }; diff --git a/elf/interp.c b/elf/interp.c -index 243829f5f7..0e74241703 100644 +index 331cc1df48..885b2d9476 100644 --- a/elf/interp.c +++ b/elf/interp.c @@ -18,5 +18,5 @@ @@ -67,7 +66,7 @@ index 243829f5f7..0e74241703 100644 +const char __invoke_dynamic_linker__[4096] __attribute__ ((section (".interp"))) = RUNTIME_LINKER; diff --git a/elf/ldconfig.c b/elf/ldconfig.c -index 3bc9e61891..6a23096435 100644 +index 681ed78496..8833ed0a6b 100644 --- a/elf/ldconfig.c +++ b/elf/ldconfig.c @@ -168,6 +168,9 @@ static struct argp argp = @@ -81,10 +80,10 @@ index 3bc9e61891..6a23096435 100644 a platform. */ static int diff --git a/elf/rtld.c b/elf/rtld.c -index c9490ff694..3962373ebb 100644 +index 553cfbd1b7..39347c2c03 100644 --- a/elf/rtld.c +++ b/elf/rtld.c -@@ -173,6 +173,7 @@ dso_name_valid_for_suid (const char *p) +@@ -175,6 +175,7 @@ dso_name_valid_for_suid (const char *p) } return *p != '\0'; } @@ -92,7 +91,7 @@ index c9490ff694..3962373ebb 100644 /* LD_AUDIT variable contents. Must be processed before the audit_list below. */ -@@ -1220,13 +1221,13 @@ of this helper program; chances are you did not intend to run this program.\n\ +@@ -1222,13 +1223,13 @@ of this helper program; chances are you did not intend to run this program.\n\ --list list all dependencies and how they are resolved\n\ --verify verify that given object really is a dynamically linked\n\ object we can handle\n\ @@ -109,7 +108,7 @@ index c9490ff694..3962373ebb 100644 ++_dl_skip_args; --_dl_argc; diff --git a/iconv/gconv_conf.c b/iconv/gconv_conf.c -index ae8937cba0..f321ee419e 100644 +index 735bd1f2d5..25100ba666 100644 --- a/iconv/gconv_conf.c +++ b/iconv/gconv_conf.c @@ -36,7 +36,7 @@ @@ -122,7 +121,7 @@ index ae8937cba0..f321ee419e 100644 /* Type to represent search path. */ struct path_elem diff --git a/sysdeps/generic/dl-cache.h b/sysdeps/generic/dl-cache.h -index bc8b40331d..b0fdd2144b 100644 +index 6b310e9e15..3877311df4 100644 --- a/sysdeps/generic/dl-cache.h +++ b/sysdeps/generic/dl-cache.h @@ -27,10 +27,6 @@ @@ -136,6 +135,3 @@ index bc8b40331d..b0fdd2144b 100644 #ifndef add_system_dir # define add_system_dir(dir) add_dir (dir) #endif --- -2.22.0 - diff --git a/poky/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch b/poky/meta/recipes-core/glibc/glibc/0006-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch index a43f294345..db8b6c0f1c 100644 --- a/poky/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch +++ b/poky/meta/recipes-core/glibc/glibc/0006-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch @@ -1,7 +1,7 @@ -From e41e042149eac349e09fa629fcac4c64e574322c Mon Sep 17 00:00:00 2001 +From a752857cc342ee5136c9a593037b6ee6ff8af8ee Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Thu, 31 Dec 2015 14:35:35 -0800 -Subject: [PATCH 04/28] nativesdk-glibc: Allow 64 bit atomics for x86 +Subject: [PATCH] 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. @@ -17,7 +17,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sysdeps/x86/atomic-machine.h b/sysdeps/x86/atomic-machine.h -index aa60ca4cd6..3e42e00183 100644 +index bb49648374..aa08d3c0a7 100644 --- a/sysdeps/x86/atomic-machine.h +++ b/sysdeps/x86/atomic-machine.h @@ -58,15 +58,14 @@ typedef uintmax_t uatomic_max_t; @@ -37,6 +37,3 @@ index aa60ca4cd6..3e42e00183 100644 # define SP_REG "esp" # define SEG_REG "gs" # define BR_CONSTRAINT "r" --- -2.22.0 - diff --git a/poky/meta/recipes-core/glibc/glibc/0005-nativesdk-glibc-Make-relocatable-install-for-locales.patch b/poky/meta/recipes-core/glibc/glibc/0007-nativesdk-glibc-Make-relocatable-install-for-locales.patch index 3aad603ada..27cd17cdcd 100644 --- a/poky/meta/recipes-core/glibc/glibc/0005-nativesdk-glibc-Make-relocatable-install-for-locales.patch +++ b/poky/meta/recipes-core/glibc/glibc/0007-nativesdk-glibc-Make-relocatable-install-for-locales.patch @@ -1,7 +1,7 @@ -From 50ab0b0c116f4ae3d975ec1b15ed4595fd9147f6 Mon Sep 17 00:00:00 2001 +From 3df91d1d8b9c7a01b3ef8133c4f9b9764227d583 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Fri, 3 Aug 2018 09:55:12 -0700 -Subject: [PATCH 05/28] nativesdk-glibc: Make relocatable install for locales +Subject: [PATCH] nativesdk-glibc: Make relocatable install for locales The glibc locale path is hard-coded to the install prefix, but in SDKs we need to be able to relocate the binaries. Expand the strings to 4K and put them in a @@ -17,11 +17,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> locale/localeinfo.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) -diff --git a/locale/findlocale.c b/locale/findlocale.c -index 9af605bd64..b2b0a3f93b 100644 ---- a/locale/findlocale.c -+++ b/locale/findlocale.c -@@ -56,7 +56,7 @@ struct __locale_data *const _nl_C[] attribute_hidden = +Index: git/locale/findlocale.c +=================================================================== +--- git.orig/locale/findlocale.c ++++ git/locale/findlocale.c +@@ -56,7 +56,7 @@ struct __locale_data *const _nl_C[] attr which are somehow addressed. */ struct loaded_l10nfile *_nl_locale_file_list[__LC_LAST]; @@ -30,7 +30,7 @@ index 9af605bd64..b2b0a3f93b 100644 /* Checks if the name is actually present, that is, not NULL and not empty. */ -@@ -167,7 +167,7 @@ _nl_find_locale (const char *locale_path, size_t locale_path_len, +@@ -166,7 +166,7 @@ _nl_find_locale (const char *locale_path /* Nothing in the archive. Set the default path to search below. */ locale_path = _nl_default_locale_path; @@ -39,10 +39,10 @@ index 9af605bd64..b2b0a3f93b 100644 } else /* We really have to load some data. First see whether the name is -diff --git a/locale/loadarchive.c b/locale/loadarchive.c -index 803c1cf2a4..9023f475b8 100644 ---- a/locale/loadarchive.c -+++ b/locale/loadarchive.c +Index: git/locale/loadarchive.c +=================================================================== +--- git.orig/locale/loadarchive.c ++++ git/locale/loadarchive.c @@ -42,7 +42,7 @@ @@ -52,11 +52,11 @@ index 803c1cf2a4..9023f475b8 100644 /* Size of initial mapping window, optimal if large enough to cover the header plus the initial locale. */ -diff --git a/locale/localeinfo.h b/locale/localeinfo.h -index 7c1cc3eecb..53cb8bfc59 100644 ---- a/locale/localeinfo.h -+++ b/locale/localeinfo.h -@@ -325,7 +325,7 @@ _nl_lookup_word (locale_t l, int category, int item) +Index: git/locale/localeinfo.h +=================================================================== +--- git.orig/locale/localeinfo.h ++++ git/locale/localeinfo.h +@@ -331,7 +331,7 @@ _nl_lookup_word (locale_t l, int categor } /* Default search path if no LOCPATH environment variable. */ @@ -65,6 +65,35 @@ index 7c1cc3eecb..53cb8bfc59 100644 /* Load the locale data for CATEGORY from the file specified by *NAME. If *NAME is "", use environment variables as specified by POSIX, and --- -2.22.0 - +Index: git/locale/programs/locale.c +=================================================================== +--- git.orig/locale/programs/locale.c ++++ git/locale/programs/locale.c +@@ -632,6 +632,7 @@ nameentcmp (const void *a, const void *b + ((const struct nameent *) b)->name); + } + ++static char _write_archive_locales_path[4096] attribute_hidden __attribute__ ((section (".gccrelocprefix"))) = ARCHIVE_NAME; + + static int + write_archive_locales (void **all_datap, char *linebuf) +@@ -645,7 +646,7 @@ write_archive_locales (void **all_datap, + int fd, ret = 0; + uint32_t cnt; + +- fd = open64 (ARCHIVE_NAME, O_RDONLY); ++ fd = open64 (_write_archive_locales_path, O_RDONLY); + if (fd < 0) + return 0; + +@@ -700,8 +701,8 @@ write_archive_locales (void **all_datap, + if (cnt) + putchar_unlocked ('\n'); + +- printf ("locale: %-15.15s archive: " ARCHIVE_NAME "\n%s\n", +- names[cnt].name, linebuf); ++ printf ("locale: %-15.15s archive: %s\n%s\n", ++ names[cnt].name, _write_archive_locales_path, linebuf); + + locrec = (struct locrecent *) (addr + names[cnt].locrec_offset); + diff --git a/poky/meta/recipes-core/glibc/glibc/0006-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch b/poky/meta/recipes-core/glibc/glibc/0008-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch index 5e1c591432..3dac325380 100644 --- a/poky/meta/recipes-core/glibc/glibc/0006-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch +++ b/poky/meta/recipes-core/glibc/glibc/0008-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch @@ -1,7 +1,7 @@ -From 7cccf5cec09f2a42cc3fe5d82ce21b7309330b33 Mon Sep 17 00:00:00 2001 +From 61b6c9737897c5828ef4b40699ee0a74c570034a Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Wed, 18 Mar 2015 00:01:50 +0000 -Subject: [PATCH 06/28] fsl e500/e5500/e6500/603e fsqrt implementation +Subject: [PATCH] fsl e500/e5500/e6500/603e fsqrt implementation Upstream-Status: Pending Signed-off-by: Edmar Wienskoski <edmar@freescale.com> @@ -1579,6 +1579,3 @@ index 0000000000..04ff8cc181 +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies @@ -0,0 +1 @@ +powerpc/powerpc64/e6500/fpu --- -2.22.0 - diff --git a/poky/meta/recipes-core/glibc/glibc/0007-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch b/poky/meta/recipes-core/glibc/glibc/0009-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch index ae6fb268a5..456f91fb8e 100644 --- a/poky/meta/recipes-core/glibc/glibc/0007-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch +++ b/poky/meta/recipes-core/glibc/glibc/0009-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch @@ -1,8 +1,7 @@ -From dc715f6c70d01e9c3b31c1825fa5bc447967c847 Mon Sep 17 00:00:00 2001 +From 13beb1f428ec06778590bf526d6e641f73d5cf62 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Wed, 18 Mar 2015 00:11:22 +0000 -Subject: [PATCH 07/28] readlib: Add OECORE_KNOWN_INTERPRETER_NAMES to known - names +Subject: [PATCH] readlib: Add OECORE_KNOWN_INTERPRETER_NAMES to known names This bolts in a hook for OE to pass its own version of interpreter names into glibc especially for multilib case, where it differs from any @@ -17,7 +16,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> 1 file changed, 1 insertion(+) diff --git a/elf/readlib.c b/elf/readlib.c -index c9743e6692..6307f918fc 100644 +index 994a4426a1..baabf099b1 100644 --- a/elf/readlib.c +++ b/elf/readlib.c @@ -51,6 +51,7 @@ static struct known_names interpreters[] = @@ -28,6 +27,3 @@ index c9743e6692..6307f918fc 100644 }; static struct known_names known_libs[] = --- -2.22.0 - diff --git a/poky/meta/recipes-core/glibc/glibc/0008-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch b/poky/meta/recipes-core/glibc/glibc/0010-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch index 8bed20306e..01446abc43 100644 --- a/poky/meta/recipes-core/glibc/glibc/0008-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch +++ b/poky/meta/recipes-core/glibc/glibc/0010-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch @@ -1,7 +1,7 @@ -From 42a01c55786a9472934e12e0bf0c40983579b607 Mon Sep 17 00:00:00 2001 +From 4483a83074a340a921e319b88d72166f18e0df0b Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Wed, 18 Mar 2015 00:15:07 +0000 -Subject: [PATCH 08/28] ppc/sqrt: Fix undefined reference to `__sqrt_finite' +Subject: [PATCH] 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' @@ -203,6 +203,3 @@ index 26fa067abf..9d175122a8 100644 return f_washf (b); } +strong_alias (__ieee754_sqrtf, __sqrtf_finite) --- -2.22.0 - diff --git a/poky/meta/recipes-core/glibc/glibc/0009-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch b/poky/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch index 8a5d6d8b7f..451f372650 100644 --- a/poky/meta/recipes-core/glibc/glibc/0009-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch +++ b/poky/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch @@ -1,8 +1,8 @@ -From a0fcb9135bc8c2b9d8a161d166b6f9d56d7af245 Mon Sep 17 00:00:00 2001 +From 347b2e31d010b04c42e78157a028aa1d58fe0f5e Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Wed, 18 Mar 2015 00:16:38 +0000 -Subject: [PATCH 09/28] __ieee754_sqrt{,f} are now inline functions and call - out __slow versions +Subject: [PATCH] __ieee754_sqrt{,f} are now inline functions and call out + __slow versions Upstream-Status: Pending @@ -382,6 +382,3 @@ index 9d175122a8..10de1f0cc3 100644 +} + strong_alias (__ieee754_sqrtf, __sqrtf_finite) --- -2.22.0 - diff --git a/poky/meta/recipes-core/glibc/glibc/0010-Quote-from-bug-1443-which-explains-what-the-patch-do.patch b/poky/meta/recipes-core/glibc/glibc/0012-Quote-from-bug-1443-which-explains-what-the-patch-do.patch index a140a15479..a0b46c0479 100644 --- a/poky/meta/recipes-core/glibc/glibc/0010-Quote-from-bug-1443-which-explains-what-the-patch-do.patch +++ b/poky/meta/recipes-core/glibc/glibc/0012-Quote-from-bug-1443-which-explains-what-the-patch-do.patch @@ -1,8 +1,7 @@ -From 9c1f2229c48c37b38628c485ef16e01f6780160c Mon Sep 17 00:00:00 2001 +From 8ca8e5cd78cbd37a713e1181f8f6641b57352aa8 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Wed, 18 Mar 2015 00:20:09 +0000 -Subject: [PATCH 10/28] Quote from bug 1443 which explains what the patch does - : +Subject: [PATCH] Quote from bug 1443 which explains what the patch does : We build some random program and link it with -lust. When we run it, it dies with a SIGSEGV before reaching main(). @@ -45,7 +44,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h -index 7a2f9d9b78..36a1dd1888 100644 +index 90856779b1..a29bb86c56 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -510,7 +510,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, @@ -57,6 +56,3 @@ index 7a2f9d9b78..36a1dd1888 100644 break; case R_ARM_TLS_TPOFF32: --- -2.22.0 - diff --git a/poky/meta/recipes-core/glibc/glibc/0011-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch b/poky/meta/recipes-core/glibc/glibc/0013-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch index cb99092eef..736de8cf04 100644 --- a/poky/meta/recipes-core/glibc/glibc/0011-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch +++ b/poky/meta/recipes-core/glibc/glibc/0013-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch @@ -1,7 +1,7 @@ -From 171d2afb930917b0cfbe9df770774da1c92dd185 Mon Sep 17 00:00:00 2001 +From 21509735678990760d5ebf9d0c65efa4b52b838d Mon Sep 17 00:00:00 2001 From: Ting Liu <b28495@freescale.com> Date: Wed, 19 Dec 2012 04:39:57 -0600 -Subject: [PATCH 11/28] eglibc: run libm-err-tab.pl with specific dirs in ${S} +Subject: [PATCH] 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 <b28495@freescale.com> 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manual/Makefile b/manual/Makefile -index 4f76ee85d2..04b8c8c320 100644 +index c61e11dcd7..5d859e6f84 100644 --- a/manual/Makefile +++ b/manual/Makefile @@ -103,7 +103,8 @@ $(objpfx)stamp-libm-err: $(..)math/gen-libm-test.py \ @@ -31,6 +31,3 @@ index 4f76ee85d2..04b8c8c320 100644 $(move-if-change) $(objpfx)libm-err-tmp $(objpfx)libm-err.texi touch $@ --- -2.22.0 - diff --git a/poky/meta/recipes-core/glibc/glibc/0012-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch b/poky/meta/recipes-core/glibc/glibc/0014-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch index e233fbe542..e73b640c16 100644 --- a/poky/meta/recipes-core/glibc/glibc/0012-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch +++ b/poky/meta/recipes-core/glibc/glibc/0014-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch @@ -1,8 +1,8 @@ -From 376be7b96152ef501c8cf95ed6dc52c0318bd26a Mon Sep 17 00:00:00 2001 +From e33deb119734ef443ef44c42a00a569f90e1e149 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Wed, 18 Mar 2015 00:24:46 +0000 -Subject: [PATCH 12/28] __ieee754_sqrt{,f} are now inline functions and call - out __slow versions +Subject: [PATCH] __ieee754_sqrt{,f} are now inline functions and call out + __slow versions Upstream-Status: Pending @@ -56,6 +56,3 @@ index 812653558f..10de1f0cc3 100644 float b; #endif { --- -2.22.0 - diff --git a/poky/meta/recipes-core/glibc/glibc/0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch b/poky/meta/recipes-core/glibc/glibc/0015-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch index 9ba52e6e10..0cdd0567df 100644 --- a/poky/meta/recipes-core/glibc/glibc/0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch +++ b/poky/meta/recipes-core/glibc/glibc/0015-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch @@ -1,7 +1,7 @@ -From 1ba4e9577437632856d719cbd5d63b5a76cbb4c4 Mon Sep 17 00:00:00 2001 +From c50cae36e90c41849301a9a668adf31e81e43a07 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Wed, 18 Mar 2015 00:27:10 +0000 -Subject: [PATCH 13/28] sysdeps/gnu/configure.ac: handle correctly +Subject: [PATCH] sysdeps/gnu/configure.ac: handle correctly $libc_cv_rootsbindir Upstream-Status:Pending @@ -37,6 +37,3 @@ index 634fe4de2a..3db1697f4f 100644 + test -n "$libc_cv_rootsbindir" || libc_cv_rootsbindir=/sbin ;; esac --- -2.22.0 - diff --git a/poky/meta/recipes-core/glibc/glibc/0014-Add-unused-attribute.patch b/poky/meta/recipes-core/glibc/glibc/0016-Add-unused-attribute.patch index 0a602bb38c..574e7c3503 100644 --- a/poky/meta/recipes-core/glibc/glibc/0014-Add-unused-attribute.patch +++ b/poky/meta/recipes-core/glibc/glibc/0016-Add-unused-attribute.patch @@ -1,7 +1,7 @@ -From b84999dcf642b07e6c14e6ff507be14743349949 Mon Sep 17 00:00:00 2001 +From c323125744020a29f79e50dc4d024b55c482eafc Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Wed, 18 Mar 2015 00:28:41 +0000 -Subject: [PATCH 14/28] Add unused attribute +Subject: [PATCH] Add unused attribute Helps in avoiding gcc warning when header is is included in a source file which does not use both functions @@ -17,7 +17,7 @@ Upstream-Status: Pending 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iconv/gconv_charset.h b/iconv/gconv_charset.h -index 91e0ad3141..2e9549fe49 100644 +index 348acc089b..fa92465d89 100644 --- a/iconv/gconv_charset.h +++ b/iconv/gconv_charset.h @@ -21,7 +21,7 @@ @@ -29,6 +29,3 @@ index 91e0ad3141..2e9549fe49 100644 strip (char *wp, const char *s) { int slash_count = 0; --- -2.22.0 - diff --git a/poky/meta/recipes-core/glibc/glibc/0015-yes-within-the-path-sets-wrong-config-variables.patch b/poky/meta/recipes-core/glibc/glibc/0017-yes-within-the-path-sets-wrong-config-variables.patch index dd6562a631..49089af41e 100644 --- a/poky/meta/recipes-core/glibc/glibc/0015-yes-within-the-path-sets-wrong-config-variables.patch +++ b/poky/meta/recipes-core/glibc/glibc/0017-yes-within-the-path-sets-wrong-config-variables.patch @@ -1,7 +1,7 @@ -From 7c57f84bef4aaffe4204a7a354411ab3ea7e5273 Mon Sep 17 00:00:00 2001 +From c421cd7e885497a99179b982dc4a27e8405f8857 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Wed, 18 Mar 2015 00:31:06 +0000 -Subject: [PATCH 15/28] 'yes' within the path sets wrong config variables +Subject: [PATCH] '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 @@ -165,7 +165,7 @@ index f05f43802b..dc8639902d 100644 ], libc_cv_nios2_be=yes, libc_cv_nios2_be=no)]) if test $libc_cv_nios2_be = yes; then diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure -index 1ee7f41a36..77e38bebde 100644 +index 25f98e0c7b..e95bfae359 100644 --- a/sysdeps/unix/sysv/linux/mips/configure +++ b/sysdeps/unix/sysv/linux/mips/configure @@ -414,11 +414,11 @@ else @@ -183,7 +183,7 @@ index 1ee7f41a36..77e38bebde 100644 else libc_cv_mips_nan2008=no diff --git a/sysdeps/unix/sysv/linux/mips/configure.ac b/sysdeps/unix/sysv/linux/mips/configure.ac -index 9147aa4582..7898e24738 100644 +index 3db1b32b08..f8cd375ebc 100644 --- a/sysdeps/unix/sysv/linux/mips/configure.ac +++ b/sysdeps/unix/sysv/linux/mips/configure.ac @@ -105,9 +105,9 @@ AC_COMPILE_IFELSE( @@ -258,6 +258,3 @@ index f9cba6e15d..b21f72f1e4 100644 #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.22.0 - diff --git a/poky/meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch b/poky/meta/recipes-core/glibc/glibc/0018-timezone-re-written-tzselect-as-posix-sh.patch index 4d1cf31973..20b0ee98ea 100644 --- a/poky/meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch +++ b/poky/meta/recipes-core/glibc/glibc/0018-timezone-re-written-tzselect-as-posix-sh.patch @@ -1,7 +1,7 @@ -From a74f31ea9edf105f1a6dc26497aa2a12ae736660 Mon Sep 17 00:00:00 2001 +From 2023d88c355b8af6458c8e39ce38b75c1ca4ea2a Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Wed, 18 Mar 2015 00:33:03 +0000 -Subject: [PATCH 16/28] timezone: re-written tzselect as posix sh +Subject: [PATCH] timezone: re-written tzselect as posix sh To avoid the bash dependency. @@ -15,7 +15,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/timezone/Makefile b/timezone/Makefile -index 493deca790..36e559e16c 100644 +index 75f38df527..74e1ab7ff7 100644 --- a/timezone/Makefile +++ b/timezone/Makefile @@ -122,7 +122,7 @@ $(testdata)/XT%: testdata/XT% @@ -40,6 +40,3 @@ index 18fce27e24..70745f9d36 100755 # Output one argument as-is to standard output. # Safer than 'echo', which can mishandle '\' or leading '-'. --- -2.22.0 - diff --git a/poky/meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch b/poky/meta/recipes-core/glibc/glibc/0019-Remove-bash-dependency-for-nscd-init-script.patch index e4f8a135d3..1c15a51308 100644 --- a/poky/meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch +++ b/poky/meta/recipes-core/glibc/glibc/0019-Remove-bash-dependency-for-nscd-init-script.patch @@ -1,7 +1,7 @@ -From 95882b9864ff20e476d15c6825c83728eb99597f Mon Sep 17 00:00:00 2001 +From 06da20d9f89907e5f2777537244e6589ca3c9703 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Thu, 31 Dec 2015 14:33:02 -0800 -Subject: [PATCH 17/28] Remove bash dependency for nscd init script +Subject: [PATCH] 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. @@ -70,6 +70,3 @@ index a882da7d8b..b02986ec15 100644 RETVAL=1 ;; esac --- -2.22.0 - diff --git a/poky/meta/recipes-core/glibc/glibc/0020-eglibc-Clear-cache-lines-on-ppc8xx.patch b/poky/meta/recipes-core/glibc/glibc/0020-eglibc-Clear-cache-lines-on-ppc8xx.patch deleted file mode 100644 index 965ad6578e..0000000000 --- a/poky/meta/recipes-core/glibc/glibc/0020-eglibc-Clear-cache-lines-on-ppc8xx.patch +++ /dev/null @@ -1,83 +0,0 @@ -From e2667086bf984de4d3f1226b9467761cd5a4c39f Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Thu, 31 Dec 2015 15:15:09 -0800 -Subject: [PATCH 20/28] eglibc: Clear cache lines on ppc8xx - -2007-06-13 Nathan Sidwell <nathan@codesourcery.com> - Mark Shinwell <shinwell@codesourcery.com> - - * 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 <raj.khem@gmail.com> ---- - 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 b04ecc4a4c..75bda97241 100644 ---- a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c -+++ b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c -@@ -24,9 +24,21 @@ int __cache_line_size attribute_hidden; - /* 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 4fd5f70700..1a21e4675c 100644 ---- a/sysdeps/unix/sysv/linux/powerpc/libc-start.c -+++ b/sysdeps/unix/sysv/linux/powerpc/libc-start.c -@@ -73,11 +73,25 @@ __libc_start_main (int argc, char **argv, - - /* 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.22.0 - diff --git a/poky/meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch b/poky/meta/recipes-core/glibc/glibc/0020-eglibc-Cross-building-and-testing-instructions.patch index b5efc43042..eda5565371 100644 --- a/poky/meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch +++ b/poky/meta/recipes-core/glibc/glibc/0020-eglibc-Cross-building-and-testing-instructions.patch @@ -1,7 +1,7 @@ -From 6b603d25cc5723ba631dfc60b544774db1147d81 Mon Sep 17 00:00:00 2001 +From 5641452a24f76c5dafa3749a542fcac93f77390f Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Wed, 18 Mar 2015 00:42:58 +0000 -Subject: [PATCH 18/28] eglibc: Cross building and testing instructions +Subject: [PATCH] eglibc: Cross building and testing instructions Ported from eglibc Upstream-Status: Pending @@ -614,6 +614,3 @@ index 0000000000..b67b468466 +- 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.22.0 - diff --git a/poky/meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch b/poky/meta/recipes-core/glibc/glibc/0021-eglibc-Help-bootstrap-cross-toolchain.patch index 0333db2814..6374ea4086 100644 --- a/poky/meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch +++ b/poky/meta/recipes-core/glibc/glibc/0021-eglibc-Help-bootstrap-cross-toolchain.patch @@ -1,7 +1,7 @@ -From 2864aaae984d945445f3f79869c703e0b791df88 Mon Sep 17 00:00:00 2001 +From 6a32d5bf40deee5d12d24c06f3ea9b5479c16802 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Wed, 18 Mar 2015 00:49:28 +0000 -Subject: [PATCH 19/28] eglibc: Help bootstrap cross toolchain +Subject: [PATCH] eglibc: Help bootstrap cross toolchain Taken from EGLIBC, r1484 + r1525 @@ -29,10 +29,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> create mode 100644 include/stubs-bootstrap.h diff --git a/Makefile b/Makefile -index 9fbf705200..64bfd455bc 100644 +index 8f0a93aceb..8eba23a868 100644 --- a/Makefile +++ b/Makefile -@@ -70,9 +70,18 @@ subdir-dirs = include +@@ -79,9 +79,18 @@ subdir-dirs = include vpath %.h $(subdir-dirs) # What to install. @@ -52,7 +52,7 @@ index 9fbf705200..64bfd455bc 100644 ifeq (yes,$(build-shared)) headers += gnu/lib-names.h endif -@@ -196,6 +205,16 @@ others: $(common-objpfx)testrun.sh +@@ -407,6 +416,16 @@ others: $(common-objpfx)testrun.sh $(common-objpfx)debugglibc.sh subdir-stubs := $(foreach dir,$(subdirs),$(common-objpfx)$(dir)/stubs) @@ -69,7 +69,7 @@ index 9fbf705200..64bfd455bc 100644 ifndef abi-variants installed-stubs = $(inst_includedir)/gnu/stubs.h else -@@ -222,6 +241,7 @@ $(inst_includedir)/gnu/stubs.h: $(+force) +@@ -433,6 +452,7 @@ $(inst_includedir)/gnu/stubs.h: $(+force) install-others-nosubdir: $(installed-stubs) endif @@ -95,6 +95,3 @@ index 0000000000..1d2b669aff + difficult headers. The <gnu/stubs.h> 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.22.0 - diff --git a/poky/meta/recipes-core/glibc/glibc/0021-eglibc-Resolve-__fpscr_values-on-SH4.patch b/poky/meta/recipes-core/glibc/glibc/0022-eglibc-Resolve-__fpscr_values-on-SH4.patch index 76551cf559..2a503c811e 100644 --- a/poky/meta/recipes-core/glibc/glibc/0021-eglibc-Resolve-__fpscr_values-on-SH4.patch +++ b/poky/meta/recipes-core/glibc/glibc/0022-eglibc-Resolve-__fpscr_values-on-SH4.patch @@ -1,7 +1,7 @@ -From b7290e54a1bda7a0212131655bc27926fc22de22 Mon Sep 17 00:00:00 2001 +From 25c21857a3fc0eb26831616ba88a696dd31ecba1 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Wed, 18 Mar 2015 00:55:53 +0000 -Subject: [PATCH 21/28] eglibc: Resolve __fpscr_values on SH4 +Subject: [PATCH] eglibc: Resolve __fpscr_values on SH4 2010-09-29 Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Andrew Stubbs <ams@codesourcery.com> @@ -33,7 +33,7 @@ index e0938c4165..ca1d7da339 100644 # a* alphasort64; diff --git a/sysdeps/unix/sysv/linux/sh/sysdep.S b/sysdeps/unix/sysv/linux/sh/sysdep.S -index 6ce36d6dd5..425811cc77 100644 +index 85ff3f900e..7743b8d57a 100644 --- a/sysdeps/unix/sysv/linux/sh/sysdep.S +++ b/sysdeps/unix/sysv/linux/sh/sysdep.S @@ -30,3 +30,14 @@ ENTRY (__syscall_error) @@ -51,6 +51,3 @@ index 6ce36d6dd5..425811cc77 100644 + .long 0x80000 +weak_alias (___fpscr_values, __fpscr_values) + --- -2.22.0 - diff --git a/poky/meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch b/poky/meta/recipes-core/glibc/glibc/0023-eglibc-Forward-port-cross-locale-generation-support.patch index c46021a478..1a90f22db6 100644 --- a/poky/meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch +++ b/poky/meta/recipes-core/glibc/glibc/0023-eglibc-Forward-port-cross-locale-generation-support.patch @@ -1,14 +1,14 @@ -From be382b4e0c6de52573f7e037f2d4ff9b1b5bbb6b Mon Sep 17 00:00:00 2001 +From 30008327aadf0c775e644bb387d7c25952ed05b5 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Wed, 18 Mar 2015 01:33:49 +0000 -Subject: [PATCH 22/28] eglibc: Forward port cross locale generation support +Subject: [PATCH] eglibc: Forward port cross locale generation support Upstream-Status: Pending Signed-off-by: Khem Raj <raj.khem@gmail.com> --- locale/Makefile | 3 +- - locale/catnames.c | 48 ++++++++++++++++++++++++++++ + locale/catnames.c | 46 +++++++++++++++++++++++++++ locale/localeinfo.h | 2 +- locale/programs/charmap-dir.c | 6 ++++ locale/programs/ld-collate.c | 17 +++++----- @@ -18,12 +18,12 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> 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(-) + locale/setlocale.c | 29 ----------------- + 12 files changed, 167 insertions(+), 68 deletions(-) create mode 100644 locale/catnames.c diff --git a/locale/Makefile b/locale/Makefile -index d78cf9b83a..e166f5252e 100644 +index c9694e236e..ba7105fad6 100644 --- a/locale/Makefile +++ b/locale/Makefile @@ -26,7 +26,8 @@ headers = langinfo.h locale.h bits/locale.h \ @@ -38,10 +38,10 @@ index d78cf9b83a..e166f5252e 100644 address telephone measurement identification collate diff --git a/locale/catnames.c b/locale/catnames.c new file mode 100644 -index 0000000000..9fad357db1 +index 0000000000..538f3f5edb --- /dev/null +++ b/locale/catnames.c -@@ -0,0 +1,48 @@ +@@ -0,0 +1,46 @@ +/* Copyright (C) 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + @@ -63,20 +63,18 @@ index 0000000000..9fad357db1 +#include "localeinfo.h" + +/* Define an array of category names (also the environment variable names). */ -+const union catnamestr_t _nl_category_names attribute_hidden = ++const struct catnamestr_t _nl_category_names attribute_hidden = + { -+ { +#define DEFINE_CATEGORY(category, category_name, items, a) \ -+ category_name, ++ 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__)), ++ [category] = offsetof (struct catnamestr_t, CATNAMEMF (__LINE__)), +#include "categories.def" +#undef DEFINE_CATEGORY + }; @@ -91,10 +89,10 @@ index 0000000000..9fad357db1 + [LC_ALL] = sizeof ("LC_ALL") - 1 + }; diff --git a/locale/localeinfo.h b/locale/localeinfo.h -index 53cb8bfc59..92c466200c 100644 +index fdc283c69a..4eeed35f90 100644 --- a/locale/localeinfo.h +++ b/locale/localeinfo.h -@@ -224,7 +224,7 @@ __libc_tsd_define (extern, locale_t, LOCALE) +@@ -230,7 +230,7 @@ __libc_tsd_define (extern, locale_t, LOCALE) unused. We can manage this playing some tricks with weak references. But with thread-local locale settings, it becomes quite ungainly unless we can use __thread variables. So only in that case do we attempt this. */ @@ -104,7 +102,7 @@ index 53cb8bfc59..92c466200c 100644 # define NL_CURRENT_INDIRECT 1 #endif diff --git a/locale/programs/charmap-dir.c b/locale/programs/charmap-dir.c -index 94c122df68..80e53e12c8 100644 +index 1a526a240d..0fb2daf936 100644 --- a/locale/programs/charmap-dir.c +++ b/locale/programs/charmap-dir.c @@ -18,7 +18,9 @@ @@ -150,7 +148,7 @@ index 94c122df68..80e53e12c8 100644 return NULL; } diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c -index 6baab6cfb0..b12a2fceab 100644 +index feb1a11258..5a8e522470 100644 --- a/locale/programs/ld-collate.c +++ b/locale/programs/ld-collate.c @@ -349,7 +349,7 @@ new_element (struct locale_collate_t *collate, const char *mbs, size_t mbslen, @@ -199,7 +197,7 @@ index 6baab6cfb0..b12a2fceab 100644 == runp->wcnext->wcs[runp->nwcs - 1] + 1)); diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c -index cfc9c43fd5..6572cc199c 100644 +index 3328093d0e..d58fb0f4b7 100644 --- a/locale/programs/ld-ctype.c +++ b/locale/programs/ld-ctype.c @@ -915,7 +915,7 @@ ctype_output (struct localedef_t *locale, const struct charmap_t *charmap, @@ -281,7 +279,7 @@ index cfc9c43fd5..6572cc199c 100644 srunp = srunp->next; } diff --git a/locale/programs/ld-time.c b/locale/programs/ld-time.c -index 8e9849fdba..028d3efa9f 100644 +index f7db873adb..fec3773c9d 100644 --- a/locale/programs/ld-time.c +++ b/locale/programs/ld-time.c @@ -220,8 +220,10 @@ No definition for %s category found"), "LC_TIME"); @@ -350,7 +348,7 @@ index 8e9849fdba..028d3efa9f 100644 diff --git a/locale/programs/linereader.c b/locale/programs/linereader.c -index ed3a9731d0..3178ea057a 100644 +index 7ebd933801..5753750756 100644 --- a/locale/programs/linereader.c +++ b/locale/programs/linereader.c @@ -595,7 +595,7 @@ get_string (struct linereader *lr, const struct charmap_t *charmap, @@ -363,7 +361,7 @@ index ed3a9731d0..3178ea057a 100644 size_t bufmax = 56; diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c -index b7bcef8248..efeced1e0f 100644 +index dbbb0145c0..097a8b6193 100644 --- a/locale/programs/localedef.c +++ b/locale/programs/localedef.c @@ -109,6 +109,7 @@ void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version; @@ -409,7 +407,7 @@ index b7bcef8248..efeced1e0f 100644 force_output = 1; break; diff --git a/locale/programs/locfile.c b/locale/programs/locfile.c -index e4ba48e968..e7b0efe887 100644 +index eb2f4634da..d387147323 100644 --- a/locale/programs/locfile.c +++ b/locale/programs/locfile.c @@ -544,6 +544,9 @@ compare_files (const char *filename1, const char *filename2, size_t size, @@ -432,7 +430,7 @@ index e4ba48e968..e7b0efe887 100644 /* Record that FILE's next element is the 32-bit integer VALUE. */ diff --git a/locale/programs/locfile.h b/locale/programs/locfile.h -index c063fc097d..4e7465e55a 100644 +index 7ea10038b4..0888c09762 100644 --- a/locale/programs/locfile.h +++ b/locale/programs/locfile.h @@ -71,6 +71,8 @@ extern void write_all_categories (struct localedef_t *definitions, @@ -521,28 +519,27 @@ index c063fc097d..4e7465e55a 100644 + #endif /* locfile.h */ diff --git a/locale/setlocale.c b/locale/setlocale.c -index 9bd35454b9..2a67dc6589 100644 +index 030f1727bd..096d8ed895 100644 --- a/locale/setlocale.c +++ b/locale/setlocale.c -@@ -64,36 +64,6 @@ static char *const _nl_current_used[] = - #endif +@@ -63,35 +63,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 = +-const struct catnamestr_t _nl_category_names attribute_hidden = - { -- { -#define DEFINE_CATEGORY(category, category_name, items, a) \ -- category_name, +- 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__)), +- [category] = offsetof (struct catnamestr_t, CATNAMEMF (__LINE__)), -#include "categories.def" -#undef DEFINE_CATEGORY - }; @@ -561,6 +558,3 @@ index 9bd35454b9..2a67dc6589 100644 #ifdef NL_CURRENT_INDIRECT # define WEAK_POSTLOAD(postload) weak_extern (postload) #else --- -2.22.0 - diff --git a/poky/meta/recipes-core/glibc/glibc/0023-Define-DUMMY_LOCALE_T-if-not-defined.patch b/poky/meta/recipes-core/glibc/glibc/0024-Define-DUMMY_LOCALE_T-if-not-defined.patch index 17667da99f..15e460eb08 100644 --- a/poky/meta/recipes-core/glibc/glibc/0023-Define-DUMMY_LOCALE_T-if-not-defined.patch +++ b/poky/meta/recipes-core/glibc/glibc/0024-Define-DUMMY_LOCALE_T-if-not-defined.patch @@ -1,7 +1,7 @@ -From afa8d6faeddeb80aca318b33edf49d9f8ce65761 Mon Sep 17 00:00:00 2001 +From 067f71a381ce6626ef1179be3dd90c4ed2aa52fb Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Wed, 20 Apr 2016 21:11:00 -0700 -Subject: [PATCH 23/28] Define DUMMY_LOCALE_T if not defined +Subject: [PATCH] Define DUMMY_LOCALE_T if not defined This is a hack to fix building the locale bits on an older CentOs 5.X machine @@ -14,7 +14,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> 1 file changed, 3 insertions(+) diff --git a/locale/programs/config.h b/locale/programs/config.h -index a1e6e0ec3c..7f75528eae 100644 +index d76d9f7e8b..92b56d7df3 100644 --- a/locale/programs/config.h +++ b/locale/programs/config.h @@ -19,6 +19,9 @@ @@ -27,6 +27,3 @@ index a1e6e0ec3c..7f75528eae 100644 /* Use the internal textdomain used for libc messages. */ #define PACKAGE _libc_intl_domainname #ifndef VERSION --- -2.22.0 - diff --git a/poky/meta/recipes-core/glibc/glibc/0024-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch b/poky/meta/recipes-core/glibc/glibc/0025-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch index f68e4f4fa6..543f65d6ea 100644 --- a/poky/meta/recipes-core/glibc/glibc/0024-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch +++ b/poky/meta/recipes-core/glibc/glibc/0025-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch @@ -1,8 +1,7 @@ -From c13e18adb634a6fd59129150ab7f9468f64dc931 Mon Sep 17 00:00:00 2001 +From 8f4b0bac85d14b184e08848b02de3f30775f05b1 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Fri, 3 Aug 2018 09:42:06 -0700 -Subject: [PATCH 24/28] localedef --add-to-archive uses a hard-coded locale - path +Subject: [PATCH] localedef --add-to-archive uses a hard-coded locale path it doesn't exist in normal use, and there's no way to pass an alternative filename. @@ -19,7 +18,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c -index e6310b18be..f54a76eade 100644 +index dccaf04e3b..ae0b7fe155 100644 --- a/locale/programs/locarchive.c +++ b/locale/programs/locarchive.c @@ -340,12 +340,24 @@ enlarge_archive (struct locarhandle *ah, const struct locarhead *head) @@ -79,6 +78,3 @@ index e6310b18be..f54a76eade 100644 { if (readonly) { --- -2.22.0 - diff --git a/poky/meta/recipes-core/glibc/glibc/0025-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch b/poky/meta/recipes-core/glibc/glibc/0026-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch index 76a9eb2563..5f6ee40f22 100644 --- a/poky/meta/recipes-core/glibc/glibc/0025-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch +++ b/poky/meta/recipes-core/glibc/glibc/0026-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch @@ -1,7 +1,7 @@ -From 7c9ebe966bb97dd14de5719905b61311211ae3c8 Mon Sep 17 00:00:00 2001 +From 1dad746ce93928a57b2fe618c74722f710751826 Mon Sep 17 00:00:00 2001 From: Mark Hatle <mark.hatle@windriver.com> Date: Thu, 18 Aug 2016 14:07:58 -0500 -Subject: [PATCH 25/28] elf/dl-deps.c: Make _dl_build_local_scope breadth first +Subject: [PATCH] elf/dl-deps.c: Make _dl_build_local_scope breadth first According to the ELF specification: @@ -24,7 +24,7 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com> 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/elf/dl-deps.c b/elf/dl-deps.c -index e12c353158..9234daac05 100644 +index 5103a8a111..54cd80aaff 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) @@ -51,6 +51,3 @@ index e12c353158..9234daac05 100644 return p - list; } --- -2.22.0 - diff --git a/poky/meta/recipes-core/glibc/glibc/0026-intl-Emit-no-lines-in-bison-generated-files.patch b/poky/meta/recipes-core/glibc/glibc/0027-intl-Emit-no-lines-in-bison-generated-files.patch index 7589e11d57..2c317d58aa 100644 --- a/poky/meta/recipes-core/glibc/glibc/0026-intl-Emit-no-lines-in-bison-generated-files.patch +++ b/poky/meta/recipes-core/glibc/glibc/0027-intl-Emit-no-lines-in-bison-generated-files.patch @@ -1,7 +1,7 @@ -From aa5c758fbb7dbb026df33fc6bdc05548547bdb17 Mon Sep 17 00:00:00 2001 +From 3c8d9eae83ab4f1677afc9b379f97114e8503363 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Fri, 3 Aug 2018 09:44:00 -0700 -Subject: [PATCH 26/28] intl: Emit no lines in bison generated files +Subject: [PATCH] intl: Emit no lines in bison generated files Improve reproducibility: Do not put any #line preprocessor commands in bison generated files. @@ -17,7 +17,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intl/Makefile b/intl/Makefile -index 9eea8d57e3..627dce4cf1 100644 +index ce3072420f..58457840d9 100644 --- a/intl/Makefile +++ b/intl/Makefile @@ -155,7 +155,7 @@ $(objpfx)tst-gettext6.out: $(objpfx)tst-gettext.out @@ -29,6 +29,3 @@ index 9eea8d57e3..627dce4cf1 100644 $(inst_localedir)/locale.alias: locale.alias $(+force) $(do-install) --- -2.22.0 - diff --git a/poky/meta/recipes-core/glibc/glibc/0027-inject-file-assembly-directives.patch b/poky/meta/recipes-core/glibc/glibc/0028-inject-file-assembly-directives.patch index dc205a833f..e1a030d10c 100644 --- a/poky/meta/recipes-core/glibc/glibc/0027-inject-file-assembly-directives.patch +++ b/poky/meta/recipes-core/glibc/glibc/0028-inject-file-assembly-directives.patch @@ -1,7 +1,7 @@ -From fecd98040a2ae1bc5943a40a1623d76a696e0785 Mon Sep 17 00:00:00 2001 +From 420454f7098b5445730caa855c37b8143bfccc1b Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Thu, 29 Nov 2018 17:29:35 -0800 -Subject: [PATCH 27/28] inject file assembly directives +Subject: [PATCH] inject file assembly directives Currently, non-IA builds are not reproducibile since build paths are being injected into the debug symbols. These are coming from the use of @@ -48,7 +48,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> 20 files changed, 40 insertions(+) diff --git a/csu/abi-note.S b/csu/abi-note.S -index fa1f014a88..098731362a 100644 +index 2b4b5f8824..964843016c 100644 --- a/csu/abi-note.S +++ b/csu/abi-note.S @@ -56,6 +56,8 @@ offset length contents @@ -61,7 +61,7 @@ index fa1f014a88..098731362a 100644 name begins with `.note' and creates a PT_NOTE program header entry pointing at it. */ diff --git a/sysdeps/aarch64/crti.S b/sysdeps/aarch64/crti.S -index d4e7dfcf5c..e0218df30c 100644 +index 1728eac37a..76a8ab590b 100644 --- a/sysdeps/aarch64/crti.S +++ b/sysdeps/aarch64/crti.S @@ -50,6 +50,8 @@ @@ -74,7 +74,7 @@ index d4e7dfcf5c..e0218df30c 100644 weak_extern (PREINIT_FUNCTION) #else diff --git a/sysdeps/aarch64/crtn.S b/sysdeps/aarch64/crtn.S -index 363f752460..2fb06fba62 100644 +index c3e97cc449..fc2e5c2df8 100644 --- a/sysdeps/aarch64/crtn.S +++ b/sysdeps/aarch64/crtn.S @@ -37,6 +37,8 @@ @@ -87,7 +87,7 @@ index 363f752460..2fb06fba62 100644 ldp x29, x30, [sp], 16 RET diff --git a/sysdeps/aarch64/dl-tlsdesc.S b/sysdeps/aarch64/dl-tlsdesc.S -index 4abe6b82a3..8c44b2ff8a 100644 +index 557ad1d505..194a8531da 100644 --- a/sysdeps/aarch64/dl-tlsdesc.S +++ b/sysdeps/aarch64/dl-tlsdesc.S @@ -22,6 +22,8 @@ @@ -100,7 +100,7 @@ index 4abe6b82a3..8c44b2ff8a 100644 #define SAVE_Q_REGISTERS \ stp q0, q1, [sp, #-32*NSAVEDQREGPAIRS]!; \ diff --git a/sysdeps/aarch64/dl-trampoline.S b/sysdeps/aarch64/dl-trampoline.S -index 19b117e8f9..38c78b5409 100644 +index 94e965c096..ba18742f3e 100644 --- a/sysdeps/aarch64/dl-trampoline.S +++ b/sysdeps/aarch64/dl-trampoline.S @@ -21,6 +21,8 @@ @@ -113,7 +113,7 @@ index 19b117e8f9..38c78b5409 100644 #define ip0l PTR_REG (16) #define ip1 x17 diff --git a/sysdeps/aarch64/start.S b/sysdeps/aarch64/start.S -index f5e9b9c223..ae3e22a6a5 100644 +index d96cf57e2d..07a523978a 100644 --- a/sysdeps/aarch64/start.S +++ b/sysdeps/aarch64/start.S @@ -18,6 +18,8 @@ @@ -136,7 +136,7 @@ index 07bd4c4619..7213b16f27 100644 alignment in any callee. */ .eabi_attribute 25, 1 diff --git a/sysdeps/arm/crti.S b/sysdeps/arm/crti.S -index 26dbba66a3..dd84ecd566 100644 +index 8169783267..f56e0c85a6 100644 --- a/sysdeps/arm/crti.S +++ b/sysdeps/arm/crti.S @@ -57,6 +57,8 @@ @@ -149,7 +149,7 @@ index 26dbba66a3..dd84ecd566 100644 .p2align 2 .type call_weak_fn, %function diff --git a/sysdeps/arm/crtn.S b/sysdeps/arm/crtn.S -index 8f91c8d88b..a87fe49e07 100644 +index d60f9f05de..1e10ec439f 100644 --- a/sysdeps/arm/crtn.S +++ b/sysdeps/arm/crtn.S @@ -37,6 +37,8 @@ @@ -162,7 +162,7 @@ index 8f91c8d88b..a87fe49e07 100644 corresponding to the prologues in crti.S. */ diff --git a/sysdeps/arm/dl-tlsdesc.S b/sysdeps/arm/dl-tlsdesc.S -index a929340b42..b724c9776d 100644 +index 8415e47607..29c2cb8128 100644 --- a/sysdeps/arm/dl-tlsdesc.S +++ b/sysdeps/arm/dl-tlsdesc.S @@ -21,6 +21,8 @@ @@ -175,7 +175,7 @@ index a929340b42..b724c9776d 100644 @ emit debug information with cfi @ use arm-specific pseudos for unwinding itself diff --git a/sysdeps/arm/dl-trampoline.S b/sysdeps/arm/dl-trampoline.S -index 325cfcd2ce..4bfdcbce51 100644 +index a20baf555e..2dd3bef04e 100644 --- a/sysdeps/arm/dl-trampoline.S +++ b/sysdeps/arm/dl-trampoline.S @@ -21,6 +21,8 @@ @@ -188,7 +188,7 @@ index 325cfcd2ce..4bfdcbce51 100644 .globl _dl_runtime_resolve .type _dl_runtime_resolve, #function diff --git a/sysdeps/arm/start.S b/sysdeps/arm/start.S -index a05f8a4651..2f4374fcaa 100644 +index 2ff56179d2..c118046ec6 100644 --- a/sysdeps/arm/start.S +++ b/sysdeps/arm/start.S @@ -57,6 +57,8 @@ @@ -201,7 +201,7 @@ index a05f8a4651..2f4374fcaa 100644 alignment in any callee. */ .eabi_attribute 25, 1 diff --git a/sysdeps/mips/start.S b/sysdeps/mips/start.S -index 8638e5b545..93f6564aec 100644 +index fabc8080df..83c6b91d7d 100644 --- a/sysdeps/mips/start.S +++ b/sysdeps/mips/start.S @@ -38,6 +38,8 @@ @@ -214,7 +214,7 @@ index 8638e5b545..93f6564aec 100644 #error ENTRY_POINT needs to be defined for start.S on MIPS/ELF. #endif diff --git a/sysdeps/powerpc/powerpc32/dl-start.S b/sysdeps/powerpc/powerpc32/dl-start.S -index 99a10d643a..e47fc0d245 100644 +index c15242d3bc..6ca27715a4 100644 --- a/sysdeps/powerpc/powerpc32/dl-start.S +++ b/sysdeps/powerpc/powerpc32/dl-start.S @@ -18,6 +18,8 @@ @@ -227,7 +227,7 @@ index 99a10d643a..e47fc0d245 100644 The C function `_dl_start' is the real entry point; its return value is the user program's entry point. */ diff --git a/sysdeps/powerpc/powerpc32/start.S b/sysdeps/powerpc/powerpc32/start.S -index 172fb5a56b..ef1471b861 100644 +index b7b9a133a2..8df714f81a 100644 --- a/sysdeps/powerpc/powerpc32/start.S +++ b/sysdeps/powerpc/powerpc32/start.S @@ -35,6 +35,8 @@ @@ -240,7 +240,7 @@ index 172fb5a56b..ef1471b861 100644 before crtbegin.o, the file defining __EH_FRAME_BEGIN__. */ #undef cfi_startproc diff --git a/sysdeps/powerpc/powerpc64/start.S b/sysdeps/powerpc/powerpc64/start.S -index 55fae68ad6..0cb608fe0f 100644 +index 94bf771e83..cffb99500a 100644 --- a/sysdeps/powerpc/powerpc64/start.S +++ b/sysdeps/powerpc/powerpc64/start.S @@ -35,6 +35,8 @@ @@ -253,7 +253,7 @@ index 55fae68ad6..0cb608fe0f 100644 before crtbegin.o, the file defining __EH_FRAME_BEGIN__. */ #undef cfi_startproc diff --git a/sysdeps/unix/sysv/linux/aarch64/__read_tp.S b/sysdeps/unix/sysv/linux/aarch64/__read_tp.S -index 30a29b9fb0..07892b383f 100644 +index 12e1131fe7..767e0d043b 100644 --- a/sysdeps/unix/sysv/linux/aarch64/__read_tp.S +++ b/sysdeps/unix/sysv/linux/aarch64/__read_tp.S @@ -18,6 +18,8 @@ @@ -266,7 +266,7 @@ index 30a29b9fb0..07892b383f 100644 ENTRY (__read_tp) mrs x0, tpidr_el0 diff --git a/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S b/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S -index f64c4ffe8a..2da315ab08 100644 +index 3b0d611039..4a7e476c37 100644 --- a/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S +++ b/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S @@ -39,6 +39,8 @@ @@ -279,7 +279,7 @@ index f64c4ffe8a..2da315ab08 100644 ENTRY (__aeabi_read_tp) #ifdef ARCH_HAS_HARD_TP diff --git a/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S b/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S -index 0b6237ac55..8cda491c28 100644 +index fb5e0c7d97..bd07bdb38b 100644 --- a/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S +++ b/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S @@ -27,6 +27,8 @@ @@ -299,6 +299,3 @@ index eeb96544e3..da182b28f8 100644 + .file "dl-brk.S" + #include <brk.S> --- -2.22.0 - diff --git a/poky/meta/recipes-core/glibc/glibc/0028-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch b/poky/meta/recipes-core/glibc/glibc/0029-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch index 6c49066fd1..c8c359f2b8 100644 --- a/poky/meta/recipes-core/glibc/glibc/0028-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch +++ b/poky/meta/recipes-core/glibc/glibc/0029-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch @@ -1,7 +1,7 @@ -From d934788e3221c28c9a1892235cbe4cfd1b28ced0 Mon Sep 17 00:00:00 2001 +From 66963ad83bdd3b075006ddca9dfe357aed181d6a Mon Sep 17 00:00:00 2001 From: Martin Jansa <martin.jansa@gmail.com> Date: Mon, 17 Dec 2018 21:36:18 +0000 -Subject: [PATCH 28/28] locale: prevent maybe-uninitialized errors with -Os [BZ +Subject: [PATCH] locale: prevent maybe-uninitialized errors with -Os [BZ #19444] Fixes following error when building for aarch64 with -Os: @@ -33,7 +33,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> 1 file changed, 7 insertions(+) diff --git a/locale/weight.h b/locale/weight.h -index 7ca81498b2..d608ca70bb 100644 +index e071253f85..2889c395f1 100644 --- a/locale/weight.h +++ b/locale/weight.h @@ -28,7 +28,14 @@ findidx (const int32_t *table, @@ -51,6 +51,3 @@ index 7ca81498b2..d608ca70bb 100644 const unsigned char *cp; const unsigned char *usrc; --- -2.22.0 - diff --git a/poky/meta/recipes-core/glibc/glibc/0030-Improve-IFUNC-check-BZ-25506.patch b/poky/meta/recipes-core/glibc/glibc/0030-Improve-IFUNC-check-BZ-25506.patch new file mode 100644 index 0000000000..1cb398d2bc --- /dev/null +++ b/poky/meta/recipes-core/glibc/glibc/0030-Improve-IFUNC-check-BZ-25506.patch @@ -0,0 +1,47 @@ +From 87a698a21646b7ee620923ef5ffa9735471a8ddd Mon Sep 17 00:00:00 2001 +From: Fangrui Song <maskray@google.com> +Date: Tue, 4 Feb 2020 21:55:44 -0800 +Subject: [PATCH] Improve IFUNC check [BZ #25506] + +GNU ld's RISCV port does not support IFUNC. ld -no-pie produces no +relocation and the test passed incorrectly. Be more rigid by testing +IRELATIVE explicitly. + +Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=87a698a21646b7ee620923ef5ffa9735471a8ddd] +Tested-by: Aurelien Jarno <aurelien@aurel32.net> +Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + configure | 2 +- + configure.ac | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index b959d2d988..3b98ec312f 100755 +--- a/configure ++++ b/configure +@@ -4035,7 +4035,7 @@ if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS \ + -o conftest conftest.S 1>&5 2>&5; then + # Do a link to see if the backend supports IFUNC relocs. + $READELF -r conftest 1>&5 +- LC_ALL=C $READELF -r conftest | grep 'no relocations' >/dev/null || { ++ LC_ALL=C $READELF -Wr conftest | grep -q 'IRELATIVE\|R_SPARC_JMP_IREL' && { + libc_cv_ld_gnu_indirect_function=yes + } + fi +diff --git a/configure.ac b/configure.ac +index 49b900c1ed..e20034f301 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -649,7 +649,7 @@ if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS \ + -o conftest conftest.S 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then + # Do a link to see if the backend supports IFUNC relocs. + $READELF -r conftest 1>&AS_MESSAGE_LOG_FD +- LC_ALL=C $READELF -r conftest | grep 'no relocations' >/dev/null || { ++ LC_ALL=C $READELF -Wr conftest | grep -q 'IRELATIVE\|R_SPARC_JMP_IREL' && { + libc_cv_ld_gnu_indirect_function=yes + } + fi +-- +2.25.1 + diff --git a/poky/meta/recipes-core/glibc/glibc/0031-Fix-build-with-GCC-10-when-long-double-double.patch b/poky/meta/recipes-core/glibc/glibc/0031-Fix-build-with-GCC-10-when-long-double-double.patch new file mode 100644 index 0000000000..72622961ad --- /dev/null +++ b/poky/meta/recipes-core/glibc/glibc/0031-Fix-build-with-GCC-10-when-long-double-double.patch @@ -0,0 +1,170 @@ +From 49348beafe9ba150c9bd48595b3f372299bddbb0 Mon Sep 17 00:00:00 2001 +From: Joseph Myers <joseph@codesourcery.com> +Date: Tue, 17 Mar 2020 22:57:42 +0000 +Subject: [PATCH] Fix build with GCC 10 when long double = double. + +On platforms where long double has the same ABI as double, glibc +defines long double functions as aliases for the corresponding double +functions. The declarations of those functions in <math.h> are +disabled to avoid problems with aliases having incompatible types, but +GCC 10 now gives errors for incompatible types when the long double +function is known to GCC as a built-in function, not just when there +is an incompatible header declaration. + +This patch fixes those errors by using appropriate +-fno-builtin-<function> options to compile the double functions. The +list of CFLAGS-* settings is an appropriately adapted version of that +in sysdeps/ieee754/ldbl-opt/Makefile used there for building nldbl-*.c +files; in particular, the options are used even if GCC does not +currently have a built-in function of a given function, so that adding +such a built-in function in future will not break the glibc build. +Thus, various of the CFLAGS-* settings are only for future-proofing +and may not currently be needed (and it's possible some could be +irrelevant for other reasons). + +Tested with build-many-glibcs.py for arm-linux-gnueabi (compilers and +glibcs builds), where it fixes the build that previously failed. + +Upstream-Status: Backport [https://sourceware.org/git/?p=glibc.git;a=commit;h=49348beafe9ba150c9bd48595b3f372299bddbb0] +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- + math/Makefile | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 122 insertions(+) + +diff --git a/math/Makefile b/math/Makefile +index 84a8b94c74..0a5a40430e 100644 +--- a/math/Makefile ++++ b/math/Makefile +@@ -650,6 +650,128 @@ ifneq ($(long-double-fcts),yes) + # We won't compile the `long double' code at all. Tell the `double' code + # to define aliases for the `FUNCl' names. + math-CPPFLAGS += -DNO_LONG_DOUBLE ++# GCC 10 diagnoses aliases with types conflicting with built-in ++# functions. ++CFLAGS-w_acos.c += -fno-builtin-acosl ++CFLAGS-w_acosh.c += -fno-builtin-acoshl ++CFLAGS-w_asin.c += -fno-builtin-asinl ++CFLAGS-s_asinh.c += -fno-builtin-asinhl ++CFLAGS-s_atan.c += -fno-builtin-atanl ++CFLAGS-w_atan2.c += -fno-builtin-atan2l ++CFLAGS-w_atanh.c += -fno-builtin-atanhl ++CFLAGS-s_cabs.c += -fno-builtin-cabsl ++CFLAGS-s_cacos.c += -fno-builtin-cacosl ++CFLAGS-s_cacosh.c += -fno-builtin-cacoshl ++CFLAGS-s_canonicalize.c += -fno-builtin-canonicalizel ++CFLAGS-s_carg.c += -fno-builtin-cargl ++CFLAGS-s_casin.c += -fno-builtin-casinl ++CFLAGS-s_casinh.c += -fno-builtin-casinhl ++CFLAGS-s_catan.c += -fno-builtin-catanl ++CFLAGS-s_catanh.c += -fno-builtin-catanhl ++CFLAGS-s_cbrt.c += -fno-builtin-cbrtl ++CFLAGS-s_ccos.c += -fno-builtin-ccosl ++CFLAGS-s_ccosh.c += -fno-builtin-ccoshl ++CFLAGS-s_ceil.c += -fno-builtin-ceill ++CFLAGS-s_cexp.c += -fno-builtin-cexpl ++CFLAGS-s_cimag.c += -fno-builtin-cimagl ++CFLAGS-s_clog.c += -fno-builtin-clogl ++CFLAGS-s_clog10.c += -fno-builtin-clog10l ++CFLAGS-s_conj.c += -fno-builtin-conjl ++CFLAGS-s_copysign.c += -fno-builtin-copysignl ++CFLAGS-s_cos.c += -fno-builtin-cosl ++CFLAGS-w_cosh.c += -fno-builtin-coshl ++CFLAGS-s_cpow.c += -fno-builtin-cpowl ++CFLAGS-s_cproj.c += -fno-builtin-cprojl ++CFLAGS-s_creal.c += -fno-builtin-creall ++CFLAGS-s_csin.c += -fno-builtin-csinl ++CFLAGS-s_csinh.c += -fno-builtin-csinhl ++CFLAGS-s_csqrt.c += -fno-builtin-csqrtl ++CFLAGS-s_ctan.c += -fno-builtin-ctanl ++CFLAGS-s_ctanh.c += -fno-builtin-ctanhl ++CFLAGS-s_dadd.c += -fno-builtin-daddl ++CFLAGS-s_ddiv.c += -fno-builtin-ddivl ++CFLAGS-s_dmul.c += -fno-builtin-dmull ++CFLAGS-s_dsub.c += -fno-builtin-dsubl ++CFLAGS-s_erf.c += -fno-builtin-erfl ++CFLAGS-s_erfc.c += -fno-builtin-erfcl ++CFLAGS-e_exp.c += -fno-builtin-expl ++CFLAGS-w_exp10.c += -fno-builtin-exp10l ++CFLAGS-e_exp2.c += -fno-builtin-exp2l ++CFLAGS-s_expm1.c += -fno-builtin-expm1l ++CFLAGS-s_fabs.c += -fno-builtin-fabsl ++CFLAGS-s_fadd.c += -fno-builtin-faddl ++CFLAGS-s_fdim.c += -fno-builtin-fdiml ++CFLAGS-s_fdiv.c += -fno-builtin-fdivl ++CFLAGS-s_finite.c += -fno-builtin-finitel ++CFLAGS-s_floor.c += -fno-builtin-floorl ++CFLAGS-s_fma.c += -fno-builtin-fmal ++CFLAGS-s_fmax.c += -fno-builtin-fmaxl ++CFLAGS-s_fmaxmag.c += -fno-builtin-fmaxmagl ++CFLAGS-s_fmin.c += -fno-builtin-fminl ++CFLAGS-s_fminmag.c += -fno-builtin-fminmagl ++CFLAGS-w_fmod.c += -fno-builtin-fmodl ++CFLAGS-s_fmul.c += -fno-builtin-fmull ++CFLAGS-s_frexp.c += -fno-builtin-frexpl ++CFLAGS-s_fromfp.c += -fno-builtin-fromfpl ++CFLAGS-s_fromfpx.c += -fno-builtin-fromfpxl ++CFLAGS-s_fsub.c += -fno-builtin-fsubl ++CFLAGS-s_gamma.c += -fno-builtin-gammal ++CFLAGS-s_getpayload.c += -fno-builtin-getpayloadl ++CFLAGS-w_hypot.c += -fno-builtin-hypotl ++CFLAGS-w_ilogb.c += -fno-builtin-ilogbl ++CFLAGS-s_isinf.c += -fno-builtin-isinfl ++CFLAGS-s_isnan.c += -fno-builtin-isnanl ++CFLAGS-w_j0.c += -fno-builtin-j0l ++CFLAGS-w_j1.c += -fno-builtin-j1l ++CFLAGS-w_jn.c += -fno-builtin-jnl ++CFLAGS-s_ldexp.c += -fno-builtin-ldexpl ++CFLAGS-w_lgamma.c += -fno-builtin-lgammal ++CFLAGS-w_lgamma_r.c += -fno-builtin-lgammal_r ++CFLAGS-w_llogb.c += -fno-builtin-llogbl ++CFLAGS-s_llrint.c += -fno-builtin-llrintl ++CFLAGS-s_llround.c += -fno-builtin-llroundl ++CFLAGS-e_log.c += -fno-builtin-logl ++CFLAGS-w_log10.c += -fno-builtin-log10l ++CFLAGS-w_log1p.c += -fno-builtin-log1pl ++CFLAGS-e_log2.c += -fno-builtin-log2l ++CFLAGS-s_logb.c += -fno-builtin-logbl ++CFLAGS-s_lrint.c += -fno-builtin-lrintl ++CFLAGS-s_lround.c += -fno-builtin-lroundl ++CFLAGS-s_modf.c += -fno-builtin-modfl ++CFLAGS-s_nan.c += -fno-builtin-nanl ++CFLAGS-s_nearbyint.c += -fno-builtin-nearbyintl ++CFLAGS-s_nextafter.c += -fno-builtin-nextafterl ++CFLAGS-s_nextdown.c += -fno-builtin-nextdownl ++CFLAGS-s_nexttoward.c += -fno-builtin-nexttoward -fno-builtin-nexttowardl ++CFLAGS-s_nexttowardf.c += -fno-builtin-nexttowardf ++CFLAGS-s_nextup.c += -fno-builtin-nextupl ++CFLAGS-e_pow.c += -fno-builtin-powl ++CFLAGS-w_remainder.c += -fno-builtin-remainderl -fno-builtin-dreml ++CFLAGS-s_remquo.c += -fno-builtin-remquol ++CFLAGS-s_rint.c += -fno-builtin-rintl ++CFLAGS-s_round.c += -fno-builtin-roundl ++CFLAGS-s_roundeven.c += -fno-builtin-roundevenl ++CFLAGS-w_scalb.c += -fno-builtin-scalbl ++CFLAGS-w_scalbln.c += -fno-builtin-scalblnl ++CFLAGS-s_scalbn.c += -fno-builtin-scalbnl ++CFLAGS-s_setpayload.c += -fno-builtin-setpayloadl ++CFLAGS-s_setpayloadsig.c += -fno-builtin-setpayloadsigl ++CFLAGS-s_significand.c += -fno-builtin-significandl ++CFLAGS-s_sin.c += -fno-builtin-sinl ++CFLAGS-s_sincos.c += -fno-builtin-sincosl ++CFLAGS-w_sinh.c += -fno-builtin-sinhl ++CFLAGS-w_sqrt.c += -fno-builtin-sqrtl ++CFLAGS-s_tan.c += -fno-builtin-tanl ++CFLAGS-s_tanh.c += -fno-builtin-tanhl ++CFLAGS-w_tgamma.c += -fno-builtin-tgammal ++CFLAGS-s_totalorder.c += -fno-builtin-totalorderl ++CFLAGS-s_totalordermag.c += -fno-builtin-totalordermagl ++CFLAGS-s_trunc.c += -fno-builtin-truncl ++CFLAGS-s_ufromfp.c += -fno-builtin-ufromfpl ++CFLAGS-s_ufromfpx.c += -fno-builtin-ufromfpxl ++CFLAGS-s_y0.c += -fno-builtin-y0l ++CFLAGS-s_y1.c += -fno-builtin-y1l ++CFLAGS-s_yn.c += -fno-builtin-ynl + endif + + # These files quiet sNaNs in a way that is optimized away without +-- +2.26.0 + diff --git a/poky/meta/recipes-core/glibc/glibc/CVE-2020-10029.patch b/poky/meta/recipes-core/glibc/glibc/CVE-2020-10029.patch new file mode 100644 index 0000000000..22a15f5fdc --- /dev/null +++ b/poky/meta/recipes-core/glibc/glibc/CVE-2020-10029.patch @@ -0,0 +1,128 @@ +From ce265ec5bc25ec35fba53807abac1b0c8469895e Mon Sep 17 00:00:00 2001 +From: Joseph Myers <joseph@codesourcery.com> +Date: Wed, 12 Feb 2020 23:31:56 +0000 +Subject: [PATCH] Avoid ldbl-96 stack corruption from range reduction of + + pseudo-zero (bug 25487). + +Bug 25487 reports stack corruption in ldbl-96 sinl on a pseudo-zero +argument (an representation where all the significand bits, including +the explicit high bit, are zero, but the exponent is not zero, which +is not a valid representation for the long double type). + +Although this is not a valid long double representation, existing +practice in this area (see bug 4586, originally marked invalid but +subsequently fixed) is that we still seek to avoid invalid memory +accesses as a result, in case of programs that treat arbitrary binary +data as long double representations, although the invalid +representations of the ldbl-96 format do not need to be consistently +handled the same as any particular valid representation. + +This patch makes the range reduction detect pseudo-zero and unnormal +representations that would otherwise go to __kernel_rem_pio2, and +returns a NaN for them instead of continuing with the range reduction +process. (Pseudo-zero and unnormal representations whose unbiased +exponent is less than -1 have already been safely returned from the +function before this point without going through the rest of range +reduction.) Pseudo-zero representations would previously result in +the value passed to __kernel_rem_pio2 being all-zero, which is +definitely unsafe; unnormal representations would previously result in +a value passed whose high bit is zero, which might well be unsafe +since that is not a form of input expected by __kernel_rem_pio2. + +Tested for x86_64. + +CVE: CVE-2020-10029 +Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=glibc.git; +a=patch;h=9333498794cde1d5cca518badf79533a24114b6f] +Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> + +--- + sysdeps/ieee754/ldbl-96/Makefile | 3 ++- + sysdeps/ieee754/ldbl-96/e_rem_pio2l.c | 12 +++++++++ + sysdeps/ieee754/ldbl-96/test-sinl-pseudo.c | 41 ++++++++++++++++++++++++++++++ + 3 files changed, 55 insertions(+), 1 deletion(-) + create mode 100644 sysdeps/ieee754/ldbl-96/test-sinl-pseudo.c + +diff --git a/sysdeps/ieee754/ldbl-96/Makefile b/sysdeps/ieee754/ldbl-96/Makefile +index b103254..052c1c7 100644 +--- a/sysdeps/ieee754/ldbl-96/Makefile ++++ b/sysdeps/ieee754/ldbl-96/Makefile +@@ -17,5 +17,6 @@ + # <https://www.gnu.org/licenses/>. + + ifeq ($(subdir),math) +-tests += test-canonical-ldbl-96 test-totalorderl-ldbl-96 ++tests += test-canonical-ldbl-96 test-totalorderl-ldbl-96 test-sinl-pseudo ++CFLAGS-test-sinl-pseudo.c += -fstack-protector-all + endif +diff --git a/sysdeps/ieee754/ldbl-96/e_rem_pio2l.c b/sysdeps/ieee754/ldbl-96/e_rem_pio2l.c +index 805de22..1aeccb4 100644 +--- a/sysdeps/ieee754/ldbl-96/e_rem_pio2l.c ++++ b/sysdeps/ieee754/ldbl-96/e_rem_pio2l.c +@@ -210,6 +210,18 @@ __ieee754_rem_pio2l (long double x, long double *y) + return 0; + } + ++ if ((i0 & 0x80000000) == 0) ++ { ++ /* Pseudo-zero and unnormal representations are not valid ++ representations of long double. We need to avoid stack ++ corruption in __kernel_rem_pio2, which expects input in a ++ particular normal form, but those representations do not need ++ to be consistently handled like any particular floating-point ++ value. */ ++ y[1] = y[0] = __builtin_nanl (""); ++ return 0; ++ } ++ + /* Split the 64 bits of the mantissa into three 24-bit integers + stored in a double array. */ + exp = j0 - 23; +diff --git a/sysdeps/ieee754/ldbl-96/test-sinl-pseudo.c b/sysdeps/ieee754/ldbl-96/test-sinl-pseudo.c +new file mode 100644 +index 0000000..f59b977 +--- /dev/null ++++ b/sysdeps/ieee754/ldbl-96/test-sinl-pseudo.c +@@ -0,0 +1,41 @@ ++/* Test sinl for pseudo-zeros and unnormals for ldbl-96 (bug 25487). ++ Copyright (C) 2020 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, see ++ <https://www.gnu.org/licenses/>. */ ++ ++#include <math.h> ++#include <math_ldbl.h> ++#include <stdint.h> ++ ++static int ++do_test (void) ++{ ++ for (int i = 0; i < 64; i++) ++ { ++ uint64_t sig = i == 63 ? 0 : 1ULL << i; ++ long double ld; ++ SET_LDOUBLE_WORDS (ld, 0x4141, ++ sig >> 32, sig & 0xffffffffULL); ++ /* The requirement is that no stack overflow occurs when the ++ pseudo-zero or unnormal goes through range reduction. */ ++ volatile long double ldr; ++ ldr = sinl (ld); ++ (void) ldr; ++ } ++ return 0; ++} ++ ++#include <support/test-driver.c> diff --git a/poky/meta/recipes-core/glibc/glibc_2.30.bb b/poky/meta/recipes-core/glibc/glibc_2.31.bb index 03add3363c..6605fd3967 100644 --- a/poky/meta/recipes-core/glibc/glibc_2.30.bb +++ b/poky/meta/recipes-core/glibc/glibc_2.31.bb @@ -5,11 +5,11 @@ DEPENDS += "gperf-native bison-native make-native" 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 \ - file://0005-nativesdk-glibc-Make-relocatable-install-for-locales.patch \ + file://0003-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch \ + file://0004-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch \ + file://0005-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch \ + file://0006-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch \ + file://0007-nativesdk-glibc-Make-relocatable-install-for-locales.patch \ " SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ @@ -18,29 +18,31 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ file://makedbs.sh \ \ ${NATIVESDKFIXES} \ - file://0006-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch \ - file://0007-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch \ - file://0008-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch \ - file://0009-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \ - file://0010-Quote-from-bug-1443-which-explains-what-the-patch-do.patch \ - file://0011-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \ - file://0012-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.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-Clear-cache-lines-on-ppc8xx.patch \ - file://0021-eglibc-Resolve-__fpscr_values-on-SH4.patch \ - file://0022-eglibc-Forward-port-cross-locale-generation-support.patch \ - file://0023-Define-DUMMY_LOCALE_T-if-not-defined.patch \ - file://0024-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch \ - file://0025-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch \ - file://0026-intl-Emit-no-lines-in-bison-generated-files.patch \ - file://0027-inject-file-assembly-directives.patch \ - file://0028-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch \ + file://0008-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch \ + file://0009-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch \ + file://0010-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch \ + file://0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \ + file://0012-Quote-from-bug-1443-which-explains-what-the-patch-do.patch \ + file://0013-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \ + file://0014-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \ + file://0015-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch \ + file://0016-Add-unused-attribute.patch \ + file://0017-yes-within-the-path-sets-wrong-config-variables.patch \ + file://0018-timezone-re-written-tzselect-as-posix-sh.patch \ + file://0019-Remove-bash-dependency-for-nscd-init-script.patch \ + file://0020-eglibc-Cross-building-and-testing-instructions.patch \ + file://0021-eglibc-Help-bootstrap-cross-toolchain.patch \ + file://0022-eglibc-Resolve-__fpscr_values-on-SH4.patch \ + file://0023-eglibc-Forward-port-cross-locale-generation-support.patch \ + file://0024-Define-DUMMY_LOCALE_T-if-not-defined.patch \ + file://0025-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch \ + file://0026-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch \ + file://0027-intl-Emit-no-lines-in-bison-generated-files.patch \ + file://0028-inject-file-assembly-directives.patch \ + file://0029-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch \ + file://CVE-2020-10029.patch \ + file://0030-Improve-IFUNC-check-BZ-25506.patch \ + file://0031-Fix-build-with-GCC-10-when-long-double-double.patch \ " S = "${WORKDIR}/git" B = "${WORKDIR}/build-${TARGET_SYS}" @@ -92,9 +94,8 @@ do_configure () { CPPFLAGS="" oe_runconf } +LDFLAGS += "-fuse-ld=bfd" do_compile () { - # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging - LDFLAGS="-fuse-ld=bfd" base_do_compile echo "Adjust ldd script" if [ -n "${RTLDLIST}" ] |