diff options
Diffstat (limited to 'meta/recipes-core/glibc')
62 files changed, 1243 insertions, 3242 deletions
diff --git a/meta/recipes-core/glibc/cross-localedef-native_2.33.bb b/meta/recipes-core/glibc/cross-localedef-native_2.39.bb index ec59c6ba10..fed6e4ea97 100644 --- a/meta/recipes-core/glibc/cross-localedef-native_2.33.bb +++ b/meta/recipes-core/glibc/cross-localedef-native_2.39.bb | |||
@@ -1,9 +1,9 @@ | |||
1 | SUMMARY = "Cross locale generation tool for glibc" | 1 | SUMMARY = "Cross locale generation tool for glibc" |
2 | HOMEPAGE = "http://www.gnu.org/software/libc/libc.html" | 2 | HOMEPAGE = "http://www.gnu.org/software/libc/libc.html" |
3 | SECTION = "libs" | 3 | SECTION = "libs" |
4 | LICENSE = "LGPL-2.1" | 4 | LICENSE = "LGPL-2.1-only" |
5 | 5 | ||
6 | LIC_FILES_CHKSUM = "file://LICENSES;md5=1541fd8f5e8f1579512bf05f533371ba \ | 6 | LIC_FILES_CHKSUM = "file://LICENSES;md5=f77e878d320e99e94ae9a4aea7f491d1 \ |
7 | file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | 7 | file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ |
8 | file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \ | 8 | file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \ |
9 | file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c" | 9 | file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c" |
@@ -20,20 +20,19 @@ inherit native | |||
20 | FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/glibc:" | 20 | FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/glibc:" |
21 | 21 | ||
22 | SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ | 22 | SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ |
23 | git://github.com/kraj/localedef;branch=master;name=localedef;destsuffix=git/localedef \ | 23 | git://github.com/kraj/localedef;branch=master;name=localedef;destsuffix=git/localedef;protocol=https \ |
24 | \ | 24 | \ |
25 | file://0001-localedef-Add-hardlink-resolver-from-util-linux.patch \ | 25 | file://0001-localedef-Add-hardlink-resolver-from-util-linux.patch \ |
26 | file://0002-localedef-fix-ups-hardlink-to-make-it-compile.patch \ | 26 | file://0002-localedef-fix-ups-hardlink-to-make-it-compile.patch \ |
27 | \ | 27 | \ |
28 | file://0016-timezone-re-written-tzselect-as-posix-sh.patch \ | 28 | file://0010-eglibc-Cross-building-and-testing-instructions.patch \ |
29 | file://0017-Remove-bash-dependency-for-nscd-init-script.patch \ | 29 | file://0011-eglibc-Help-bootstrap-cross-toolchain.patch \ |
30 | file://0018-eglibc-Cross-building-and-testing-instructions.patch \ | 30 | file://0012-eglibc-Resolve-__fpscr_values-on-SH4.patch \ |
31 | file://0019-eglibc-Help-bootstrap-cross-toolchain.patch \ | 31 | file://0013-eglibc-Forward-port-cross-locale-generation-support.patch \ |
32 | file://0020-eglibc-Resolve-__fpscr_values-on-SH4.patch \ | 32 | file://0014-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch \ |
33 | file://0021-eglibc-Forward-port-cross-locale-generation-support.patch \ | 33 | file://0017-Replace-echo-with-printf-builtin-in-nscd-init-script.patch \ |
34 | file://0022-Define-DUMMY_LOCALE_T-if-not-defined.patch \ | 34 | file://0019-timezone-Make-shell-interpreter-overridable-in-tzsel.patch \ |
35 | file://0023-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch \ | 35 | " |
36 | " | ||
37 | # Makes for a rather long rev (22 characters), but... | 36 | # Makes for a rather long rev (22 characters), but... |
38 | # | 37 | # |
39 | SRCREV_FORMAT = "glibc_localedef" | 38 | SRCREV_FORMAT = "glibc_localedef" |
@@ -41,6 +40,11 @@ SRCREV_FORMAT = "glibc_localedef" | |||
41 | S = "${WORKDIR}/git" | 40 | S = "${WORKDIR}/git" |
42 | 41 | ||
43 | EXTRA_OECONF = "--with-glibc=${S}" | 42 | EXTRA_OECONF = "--with-glibc=${S}" |
43 | |||
44 | # We do not need bash to run tzselect script, the default is to use | ||
45 | # bash but it can be configured by setting KSHELL Makefile variable | ||
46 | EXTRA_OEMAKE += "KSHELL=/bin/sh" | ||
47 | |||
44 | CFLAGS += "-fgnu89-inline -std=gnu99 -DIS_IN\(x\)='0'" | 48 | CFLAGS += "-fgnu89-inline -std=gnu99 -DIS_IN\(x\)='0'" |
45 | 49 | ||
46 | do_install() { | 50 | do_install() { |
diff --git a/meta/recipes-core/glibc/glibc-common.inc b/meta/recipes-core/glibc/glibc-common.inc index 41ff7e9a19..b9516e77f0 100644 --- a/meta/recipes-core/glibc/glibc-common.inc +++ b/meta/recipes-core/glibc/glibc-common.inc | |||
@@ -2,9 +2,9 @@ SUMMARY = "GLIBC (GNU C Library)" | |||
2 | DESCRIPTION = "The GNU C Library is used as the system C library in most systems with the Linux kernel." | 2 | DESCRIPTION = "The GNU C Library is used as the system C library in most systems with the Linux kernel." |
3 | HOMEPAGE = "http://www.gnu.org/software/libc/libc.html" | 3 | HOMEPAGE = "http://www.gnu.org/software/libc/libc.html" |
4 | SECTION = "libs" | 4 | SECTION = "libs" |
5 | LICENSE = "GPLv2 & LGPLv2.1" | 5 | LICENSE = "GPL-2.0-only & LGPL-2.1-only" |
6 | 6 | ||
7 | LIC_FILES_CHKSUM ?= "file://LICENSES;md5=1541fd8f5e8f1579512bf05f533371ba \ | 7 | LIC_FILES_CHKSUM ?= "file://LICENSES;md5=f77e878d320e99e94ae9a4aea7f491d1 \ |
8 | file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | 8 | file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ |
9 | file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \ | 9 | file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \ |
10 | file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c" | 10 | file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c" |
@@ -13,13 +13,13 @@ CVE_PRODUCT = "glibc" | |||
13 | 13 | ||
14 | INHIBIT_DEFAULT_DEPS = "1" | 14 | INHIBIT_DEFAULT_DEPS = "1" |
15 | 15 | ||
16 | ARM_INSTRUCTION_SET_armv4 = "arm" | 16 | ARM_INSTRUCTION_SET:armv4 = "arm" |
17 | ARM_INSTRUCTION_SET_armv5 = "arm" | 17 | ARM_INSTRUCTION_SET:armv5 = "arm" |
18 | ARM_INSTRUCTION_SET_armv6 = "arm" | 18 | ARM_INSTRUCTION_SET:armv6 = "arm" |
19 | # | 19 | # |
20 | # We will skip parsing glibc when target system C library selection is not glibc | 20 | # We will skip parsing glibc when target system C library selection is not glibc |
21 | # this helps in easing out parsing for non-glibc system libraries | 21 | # this helps in easing out parsing for non-glibc system libraries |
22 | # | 22 | # |
23 | COMPATIBLE_HOST_libc-musl_class-target = "null" | 23 | COMPATIBLE_HOST:libc-musl:class-target = "null" |
24 | 24 | ||
25 | PV = "2.33" | 25 | PV = "2.39+git" |
diff --git a/meta/recipes-core/glibc/glibc-ld.inc b/meta/recipes-core/glibc/glibc-ld.inc index 041ffbb9cb..da8fcc430b 100644 --- a/meta/recipes-core/glibc/glibc-ld.inc +++ b/meta/recipes-core/glibc/glibc-ld.inc | |||
@@ -16,5 +16,5 @@ def glibc_dl_info(d): | |||
16 | 16 | ||
17 | EGLIBC_KNOWN_INTERPRETER_NAMES = "${@glibc_dl_info(d)['ldconfig']}" | 17 | EGLIBC_KNOWN_INTERPRETER_NAMES = "${@glibc_dl_info(d)['ldconfig']}" |
18 | RTLDLIST = "${@glibc_dl_info(d)['lddrewrite']}" | 18 | RTLDLIST = "${@glibc_dl_info(d)['lddrewrite']}" |
19 | RTLDLIST_class-nativesdk = "${base_libdir}/${@bb.utils.contains('SDK_ARCH', 'x86_64', 'ld-linux-x86-64.so.2', 'ld-linux.so.2', d)}" | 19 | RTLDLIST:class-nativesdk = "${base_libdir}/${@bb.utils.contains('SDK_ARCH', 'x86_64', 'ld-linux-x86-64.so.2', 'ld-linux.so.2', d)}" |
20 | glibc_dl_info[vardepsexclude] = "OVERRIDES" | 20 | glibc_dl_info[vardepsexclude] = "OVERRIDES" |
diff --git a/meta/recipes-core/glibc/glibc-locale.inc b/meta/recipes-core/glibc/glibc-locale.inc index ef06389ff9..c63c9edd76 100644 --- a/meta/recipes-core/glibc/glibc-locale.inc +++ b/meta/recipes-core/glibc/glibc-locale.inc | |||
@@ -5,14 +5,9 @@ SUMMARY = "Locale data from glibc" | |||
5 | BPN = "glibc" | 5 | BPN = "glibc" |
6 | LOCALEBASEPN = "${MLPREFIX}glibc" | 6 | LOCALEBASEPN = "${MLPREFIX}glibc" |
7 | 7 | ||
8 | # glibc-collateral.inc inhibits all default deps, but do_package needs objcopy | 8 | # Do not inhibit default deps, do_package requires binutils/gcc for |
9 | # ERROR: objcopy failed with exit code 127 (cmd was 'i586-webos-linux-objcopy' --only-keep-debug 'glibc-locale/2.17-r0/package/usr/lib/gconv/IBM1166.so' 'glibc-locale/2.17-r0/package/usr/lib/gconv/.debug/IBM1166.so') | 9 | # objcopy/gcc-nm and glibc-locale depends on virtual/libc directly. |
10 | # ERROR: Function failed: split_and_strip_files | 10 | INHIBIT_DEFAULT_DEPS = "" |
11 | BINUTILSDEP = "virtual/${MLPREFIX}${TARGET_PREFIX}binutils:do_populate_sysroot" | ||
12 | BINUTILSDEP_class-nativesdk = "virtual/${TARGET_PREFIX}binutils-crosssdk:do_populate_sysroot" | ||
13 | do_package[depends] += "${BINUTILSDEP}" | ||
14 | |||
15 | DEPENDS += "virtual/libc" | ||
16 | 11 | ||
17 | # Binary locales are generated at build time if ENABLE_BINARY_LOCALE_GENERATION | 12 | # Binary locales are generated at build time if ENABLE_BINARY_LOCALE_GENERATION |
18 | # is set. The idea is to avoid running localedef on the target (at first boot) | 13 | # is set. The idea is to avoid running localedef on the target (at first boot) |
@@ -21,11 +16,11 @@ DEPENDS += "virtual/libc" | |||
21 | 16 | ||
22 | # default to disabled | 17 | # default to disabled |
23 | ENABLE_BINARY_LOCALE_GENERATION ?= "0" | 18 | ENABLE_BINARY_LOCALE_GENERATION ?= "0" |
24 | ENABLE_BINARY_LOCALE_GENERATION_pn-nativesdk-glibc-locale = "1" | 19 | ENABLE_BINARY_LOCALE_GENERATION:pn-nativesdk-glibc-locale = "1" |
25 | 20 | ||
26 | #enable locale generation on these arches | 21 | #enable locale generation on these arches |
27 | # BINARY_LOCALE_ARCHES is a space separated list of regular expressions | 22 | # BINARY_LOCALE_ARCHES is a space separated list of regular expressions |
28 | BINARY_LOCALE_ARCHES ?= "arc arm.* aarch64 i[3-6]86 x86_64 powerpc mips mips64 riscv32 riscv64" | 23 | BINARY_LOCALE_ARCHES ?= "arc arm.* aarch64 i[3-6]86 x86_64 powerpc mips mips64 riscv32 riscv64 loongarch64" |
29 | 24 | ||
30 | # set "1" to use cross-localedef for locale generation | 25 | # set "1" to use cross-localedef for locale generation |
31 | # set "0" for qemu emulation of native localedef for locale generation | 26 | # set "0" for qemu emulation of native localedef for locale generation |
@@ -33,39 +28,40 @@ LOCALE_GENERATION_WITH_CROSS-LOCALEDEF = "1" | |||
33 | 28 | ||
34 | PROVIDES = "virtual/libc-locale" | 29 | PROVIDES = "virtual/libc-locale" |
35 | 30 | ||
36 | PACKAGES = "localedef ${PN}-dbg" | 31 | PACKAGES = "localedef ${PN}-dbg ${LOCALEBASEPN}-locale-alias" |
37 | 32 | ||
38 | PACKAGES_DYNAMIC = "^locale-base-.* \ | 33 | PACKAGES_DYNAMIC = "^locale-base-.* \ |
39 | ^glibc-gconv-.* ^glibc-charmap-.* ^glibc-localedata-.* ^glibc-binary-localedata-.* \ | 34 | ^glibc-gconv-.* ^glibc-charmap-.* ^glibc-localedata-.* ^glibc-binary-localedata-.* \ |
40 | ^${MLPREFIX}glibc-gconv$" | 35 | ^${MLPREFIX}glibc-gconv$" |
41 | 36 | ||
42 | # Create a glibc-binaries package | 37 | # Create a glibc-binaries package |
43 | ALLOW_EMPTY_${BPN}-binaries = "1" | 38 | ALLOW_EMPTY:${BPN}-binaries = "1" |
44 | PACKAGES += "${BPN}-binaries" | 39 | PACKAGES += "${BPN}-binaries" |
45 | RRECOMMENDS_${BPN}-binaries = "${@" ".join([p for p in d.getVar('PACKAGES').split() if p.find("glibc-binary") != -1])}" | 40 | RRECOMMENDS:${BPN}-binaries = "${@" ".join([p for p in d.getVar('PACKAGES').split() if p.find("glibc-binary-") != -1])}" |
46 | 41 | ||
47 | # Create a glibc-charmaps package | 42 | # Create a glibc-charmaps package |
48 | ALLOW_EMPTY_${BPN}-charmaps = "1" | 43 | ALLOW_EMPTY:${BPN}-charmaps = "1" |
49 | PACKAGES += "${BPN}-charmaps" | 44 | PACKAGES += "${BPN}-charmaps" |
50 | RRECOMMENDS_${BPN}-charmaps = "${@" ".join([p for p in d.getVar('PACKAGES').split() if p.find("glibc-charmap") != -1])}" | 45 | RRECOMMENDS:${BPN}-charmaps = "${@" ".join([p for p in d.getVar('PACKAGES').split() if p.find("glibc-charmap-") != -1])}" |
51 | 46 | ||
52 | # Create a glibc-gconvs package | 47 | # Create a glibc-gconvs package |
53 | ALLOW_EMPTY_${BPN}-gconvs = "1" | 48 | ALLOW_EMPTY:${BPN}-gconvs = "1" |
54 | PACKAGES += "${BPN}-gconvs" | 49 | PACKAGES += "${BPN}-gconvs" |
55 | RRECOMMENDS_${BPN}-gconvs = "${@" ".join([p for p in d.getVar('PACKAGES').split() if p.find("glibc-gconv") != -1])}" | 50 | RRECOMMENDS:${BPN}-gconvs = "${@" ".join([p for p in d.getVar('PACKAGES').split() if p.find("glibc-gconv-") != -1])}" |
56 | 51 | ||
57 | # Create a glibc-localedatas package | 52 | # Create a glibc-localedatas package |
58 | ALLOW_EMPTY_${BPN}-localedatas = "1" | 53 | ALLOW_EMPTY:${BPN}-localedatas = "1" |
59 | PACKAGES += "${BPN}-localedatas" | 54 | PACKAGES += "${BPN}-localedatas" |
60 | RRECOMMENDS_${BPN}-localedatas = "${@" ".join([p for p in d.getVar('PACKAGES').split() if p.find("glibc-localedata") != -1])}" | 55 | RRECOMMENDS:${BPN}-localedatas = "${@" ".join([p for p in d.getVar('PACKAGES').split() if p.find("glibc-localedata-") != -1])}" |
61 | 56 | ||
62 | DESCRIPTION_localedef = "glibc: compile locale definition files" | 57 | DESCRIPTION:localedef = "glibc: compile locale definition files" |
63 | 58 | ||
64 | # glibc-gconv is dynamically added into PACKAGES, thus | 59 | # glibc-gconv is dynamically added into PACKAGES, thus |
65 | # FILES_glibc-gconv will not be automatically extended in multilib. | 60 | # FILES:glibc-gconv will not be automatically extended in multilib. |
66 | # Explicitly add ${MLPREFIX} for FILES_glibc-gconv. | 61 | # Explicitly add ${MLPREFIX} for FILES:glibc-gconv. |
67 | FILES_${MLPREFIX}glibc-gconv = "${libdir}/gconv/*" | 62 | FILES:${MLPREFIX}glibc-gconv = "${libdir}/gconv/*" |
68 | FILES_localedef = "${bindir}/localedef" | 63 | FILES:localedef = "${bindir}/localedef" |
64 | FILES:${LOCALEBASEPN}-locale-alias = "${datadir}/locale/locale.alias" | ||
69 | 65 | ||
70 | LOCALETREESRC = "${COMPONENTS_DIR}/${PACKAGE_ARCH}/glibc-stash-locale" | 66 | LOCALETREESRC = "${COMPONENTS_DIR}/${PACKAGE_ARCH}/glibc-stash-locale" |
71 | 67 | ||
@@ -87,10 +83,9 @@ do_install() { | |||
87 | if [ ${PACKAGE_NO_GCONV} -eq 0 ]; then | 83 | if [ ${PACKAGE_NO_GCONV} -eq 0 ]; then |
88 | copy_locale_files ${libdir}/gconv 0755 | 84 | copy_locale_files ${libdir}/gconv 0755 |
89 | copy_locale_files ${datadir}/i18n 0644 | 85 | copy_locale_files ${datadir}/i18n 0644 |
90 | else | ||
91 | # Remove the libdir if it is empty when gconv is not copied | ||
92 | find ${D}${libdir} -type d -empty -delete | ||
93 | fi | 86 | fi |
87 | # Remove empty dirs in libdir when gconv or locales are not copied | ||
88 | find ${D}${libdir} -type d -empty -delete | ||
94 | copy_locale_files ${datadir}/locale 0644 | 89 | copy_locale_files ${datadir}/locale 0644 |
95 | install -m 0644 ${LOCALETREESRC}/SUPPORTED ${WORKDIR}/SUPPORTED | 90 | install -m 0644 ${LOCALETREESRC}/SUPPORTED ${WORKDIR}/SUPPORTED |
96 | } | 91 | } |
diff --git a/meta/recipes-core/glibc/glibc-locale_2.33.bb b/meta/recipes-core/glibc/glibc-locale_2.39.bb index f7702e0358..f7702e0358 100644 --- a/meta/recipes-core/glibc/glibc-locale_2.33.bb +++ b/meta/recipes-core/glibc/glibc-locale_2.39.bb | |||
diff --git a/meta/recipes-core/glibc/glibc-mtrace.inc b/meta/recipes-core/glibc/glibc-mtrace.inc index ef9d60ec23..734a566562 100644 --- a/meta/recipes-core/glibc/glibc-mtrace.inc +++ b/meta/recipes-core/glibc/glibc-mtrace.inc | |||
@@ -2,8 +2,8 @@ require glibc-collateral.inc | |||
2 | 2 | ||
3 | SUMMARY = "mtrace utility provided by glibc" | 3 | SUMMARY = "mtrace utility provided by glibc" |
4 | DESCRIPTION = "mtrace utility provided by glibc" | 4 | DESCRIPTION = "mtrace utility provided by glibc" |
5 | RDEPENDS_${PN} = "perl" | 5 | RDEPENDS:${PN} = "perl" |
6 | RPROVIDES_${PN} = "libc-mtrace" | 6 | RPROVIDES:${PN} = "libc-mtrace" |
7 | 7 | ||
8 | SRC = "${COMPONENTS_DIR}/${PACKAGE_ARCH}/glibc-stash-locale/scripts" | 8 | SRC = "${COMPONENTS_DIR}/${PACKAGE_ARCH}/glibc-stash-locale/scripts" |
9 | 9 | ||
diff --git a/meta/recipes-core/glibc/glibc-mtrace_2.33.bb b/meta/recipes-core/glibc/glibc-mtrace_2.39.bb index 0b69bad46a..0b69bad46a 100644 --- a/meta/recipes-core/glibc/glibc-mtrace_2.33.bb +++ b/meta/recipes-core/glibc/glibc-mtrace_2.39.bb | |||
diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc index 8d0cc8047f..1ef987be0a 100644 --- a/meta/recipes-core/glibc/glibc-package.inc +++ b/meta/recipes-core/glibc/glibc-package.inc | |||
@@ -1,69 +1,69 @@ | |||
1 | INHIBIT_SYSROOT_STRIP = "1" | 1 | INHIBIT_SYSROOT_STRIP = "1" |
2 | 2 | ||
3 | 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" | 3 | PACKAGES = "${PN}-dbg sln nscd ldconfig ldd ldso tzcode glibc-thread-db ${PN}-pic libmemusage malloc-debug libnss-db ${PN}-pcprofile libsotruss ${PN} ${PN}-utils glibc-extra-nss ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}-src" |
4 | 4 | ||
5 | # The ld.so in this glibc supports the GNU_HASH | 5 | # The ld.so in this glibc supports the GNU_HASH |
6 | RPROVIDES_${PN} = "eglibc rtld(GNU_HASH)" | 6 | RPROVIDES:${PN} = "eglibc rtld(GNU_HASH)" |
7 | RPROVIDES_${PN}-utils = "eglibc-utils" | 7 | RPROVIDES:${PN}-utils = "eglibc-utils" |
8 | RPROVIDES_${PN}-mtrace = "eglibc-mtrace libc-mtrace" | 8 | RPROVIDES:${PN}-mtrace = "eglibc-mtrace libc-mtrace" |
9 | RPROVIDES_${PN}-pic = "eglibc-pic" | 9 | RPROVIDES:${PN}-pic = "eglibc-pic" |
10 | RPROVIDES_${PN}-dev = "eglibc-dev libc6-dev virtual-libc-dev" | 10 | RPROVIDES:${PN}-dev = "eglibc-dev libc6-dev virtual-libc-dev" |
11 | RPROVIDES_${PN}-staticdev = "eglibc-staticdev" | 11 | RPROVIDES:${PN}-staticdev = "eglibc-staticdev" |
12 | RPROVIDES_${PN}-doc = "eglibc-doc" | 12 | RPROVIDES:${PN}-doc = "eglibc-doc" |
13 | RPROVIDES_glibc-extra-nss = "eglibc-extra-nss" | 13 | RPROVIDES:glibc-extra-nss = "eglibc-extra-nss" |
14 | RPROVIDES_glibc-thread-db = "eglibc-thread-db" | 14 | RPROVIDES:glibc-thread-db = "eglibc-thread-db" |
15 | RPROVIDES_${PN}-pcprofile = "eglibc-pcprofile" | 15 | RPROVIDES:${PN}-pcprofile = "eglibc-pcprofile" |
16 | RPROVIDES_${PN}-dbg = "eglibc-dbg" | 16 | RPROVIDES:${PN}-dbg = "eglibc-dbg" |
17 | libc_baselibs = "${base_libdir}/libc.so.* ${base_libdir}/libc-*.so ${base_libdir}/libm*.so.* ${base_libdir}/libm-*.so ${base_libdir}/libmvec-*.so ${base_libdir}/ld*.so.* ${base_libdir}/ld-*.so ${base_libdir}/libpthread*.so.* ${base_libdir}/libpthread-*.so ${base_libdir}/libresolv*.so.* ${base_libdir}/libresolv-*.so ${base_libdir}/librt*.so.* ${base_libdir}/librt-*.so ${base_libdir}/libutil*.so.* ${base_libdir}/libutil-*.so ${base_libdir}/libnsl*.so.* ${base_libdir}/libnsl-*.so ${base_libdir}/libnss_files*.so.* ${base_libdir}/libnss_files-*.so ${base_libdir}/libnss_compat*.so.* ${base_libdir}/libnss_compat-*.so ${base_libdir}/libnss_dns*.so.* ${base_libdir}/libnss_dns-*.so ${base_libdir}/libdl*.so.* ${base_libdir}/libdl-*.so ${base_libdir}/libanl*.so.* ${base_libdir}/libanl-*.so ${base_libdir}/libBrokenLocale*.so.* ${base_libdir}/libBrokenLocale-*.so" | 17 | libc_baselibs = "${base_libdir}/libc.so.* ${base_libdir}/libc-*.so ${base_libdir}/libm*.so.* ${base_libdir}/libm-*.so ${base_libdir}/libmvec-*.so ${base_libdir}/ld*.so.* ${base_libdir}/ld-*.so ${base_libdir}/libpthread*.so.* ${base_libdir}/libpthread-*.so ${base_libdir}/libresolv*.so.* ${base_libdir}/libresolv-*.so ${base_libdir}/librt*.so.* ${base_libdir}/librt-*.so ${base_libdir}/libutil*.so.* ${base_libdir}/libutil-*.so ${base_libdir}/libnsl*.so.* ${base_libdir}/libnsl-*.so ${base_libdir}/libnss_files*.so.* ${base_libdir}/libnss_files-*.so ${base_libdir}/libnss_compat*.so.* ${base_libdir}/libnss_compat-*.so ${base_libdir}/libnss_dns*.so.* ${base_libdir}/libnss_dns-*.so ${base_libdir}/libdl*.so.* ${base_libdir}/libdl-*.so ${base_libdir}/libanl*.so.* ${base_libdir}/libanl-*.so ${base_libdir}/libBrokenLocale*.so.* ${base_libdir}/libBrokenLocale-*.so" |
18 | ARCH_DYNAMIC_LOADER = "" | 18 | ARCH_DYNAMIC_LOADER = "" |
19 | # The aarch64 ABI says the dynamic linker -must- be | 19 | # The aarch64 ABI says the dynamic linker -must- be |
20 | # /lib/ld-linux-aarch64{,_be}.so.1. With usrmerge, that may mean that | 20 | # /lib/ld-linux-aarch64{,_be}.so.1. With usrmerge, that may mean that |
21 | # we need to install it in /usr/lib. | 21 | # we need to install it in /usr/lib. |
22 | ARCH_DYNAMIC_LOADER_aarch64 = "ld-linux-${TARGET_ARCH}.so.1" | 22 | ARCH_DYNAMIC_LOADER:aarch64 = "ld-linux-${TARGET_ARCH}.so.1" |
23 | libc_baselibs_append = " ${@oe.utils.conditional('ARCH_DYNAMIC_LOADER', '', '', '${root_prefix}/lib/${ARCH_DYNAMIC_LOADER}', d)}" | 23 | libc_baselibs:append = " ${@oe.utils.conditional('ARCH_DYNAMIC_LOADER', '', '', '${root_prefix}/lib/${ARCH_DYNAMIC_LOADER}', d)}" |
24 | INSANE_SKIP_${PN}_append_aarch64 = " libdir" | 24 | INSANE_SKIP:${PN}:append:aarch64 = " libdir" |
25 | 25 | INSANE_SKIP:${PN}-dev += "staticdev" | |
26 | FILES_${PN} = "${libc_baselibs} ${libexecdir}/* ${sysconfdir}/ld.so.conf" | 26 | INSANE_SKIP:${MLPREFIX}ldso:append = " dev-so libdir" |
27 | RRECOMMENDS_${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'ldconfig', '${MLPREFIX}ldconfig', '', d)}" | 27 | |
28 | FILES_ldconfig = "${base_sbindir}/ldconfig" | 28 | FILES:${PN} = "${libc_baselibs} ${libexecdir}/* ${sysconfdir}/ld.so.conf" |
29 | FILES_ldd = "${bindir}/ldd" | 29 | RRECOMMENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'ldconfig', '${MLPREFIX}ldconfig', '', d)}" |
30 | FILES_libsegfault = "${base_libdir}/libSegFault*" | 30 | FILES:ldconfig = "${base_sbindir}/ldconfig" |
31 | FILES_libcidn = "${base_libdir}/libcidn-*.so ${base_libdir}/libcidn.so.*" | 31 | FILES:ldd = "${bindir}/ldd" |
32 | FILES_libmemusage = "${base_libdir}/libmemusage.so" | 32 | FILES:ldso = "${bindir}/${MLPREFIX}ld.so" |
33 | FILES_libnss-db = "${base_libdir}/libnss_db.so.* ${base_libdir}/libnss_db-*.so ${localstatedir}/db/Makefile ${localstatedir}/db/makedbs.sh" | 33 | FILES:libmemusage = "${base_libdir}/libmemusage.so" |
34 | RDEPENDS_libnss-db = "${PN}-utils" | 34 | FILES:malloc-debug = "${base_libdir}/libc_malloc_debug.so.0" |
35 | FILES_glibc-extra-nss = "${base_libdir}/libnss_*-*.so ${base_libdir}/libnss_*.so.*" | 35 | FILES:libnss-db = "${base_libdir}/libnss_db.so.* ${base_libdir}/libnss_db-*.so ${localstatedir}/db/Makefile ${localstatedir}/db/makedbs.sh" |
36 | FILES_sln = "${base_sbindir}/sln" | 36 | RDEPENDS:libnss-db = "${PN}-utils" |
37 | FILES_${PN}-pic = "${libdir}/*_pic.a ${libdir}/*_pic.map ${libdir}/libc_pic/*.o" | 37 | FILES:glibc-extra-nss = "${base_libdir}/libnss_*-*.so ${base_libdir}/libnss_*.so.*" |
38 | FILES_libsotruss = "${libdir}/audit/sotruss-lib.so" | 38 | FILES:sln = "${base_sbindir}/sln" |
39 | FILES:${PN}-pic = "${libdir}/*_pic.a ${libdir}/*_pic.map ${libdir}/libc_pic/*.o" | ||
40 | FILES:libsotruss = "${libdir}/audit/sotruss-lib.so" | ||
39 | FILES_SOLIBSDEV = "${libdir}/lib*${SOLIBSDEV}" | 41 | FILES_SOLIBSDEV = "${libdir}/lib*${SOLIBSDEV}" |
40 | FILES_${PN}-dev += "${libdir}/*_nonshared.a ${base_libdir}/*_nonshared.a ${base_libdir}/*.o ${datadir}/aclocal" | 42 | FILES:${PN}-dev += "${libdir}/libpthread.a ${libdir}/libdl.a ${libdir}/libutil.a ${libdir}/libanl.a ${libdir}/*_nonshared.a ${base_libdir}/*_nonshared.a ${base_libdir}/*.o ${datadir}/aclocal" |
41 | RDEPENDS_${PN}-dev = "linux-libc-headers-dev" | 43 | RDEPENDS:${PN}-dev = "linux-libc-headers-dev" |
42 | FILES_${PN}-staticdev += "${libdir}/*.a ${base_libdir}/*.a" | 44 | FILES:${PN}-staticdev += "${libdir}/*.a ${base_libdir}/*.a" |
43 | FILES_nscd = "${sbindir}/nscd* ${sysconfdir}/init.d/nscd ${systemd_unitdir}/system/nscd* ${sysconfdir}/tmpfiles.d/nscd.conf \ | 45 | FILES:nscd = "${sbindir}/nscd* ${sysconfdir}/init.d/nscd ${systemd_system_unitdir}/nscd* ${nonarch_libdir}/tmpfiles.d/nscd.conf \ |
44 | ${sysconfdir}/nscd.conf ${sysconfdir}/default/volatiles/98_nscd ${localstatedir}/db/nscd" | 46 | ${sysconfdir}/nscd.conf ${sysconfdir}/default/volatiles/98_nscd ${localstatedir}/db/nscd" |
45 | FILES_${PN}-mtrace = "${bindir}/mtrace" | 47 | FILES:${PN}-mtrace = "${bindir}/mtrace" |
46 | FILES_tzcode = "${bindir}/tzselect ${sbindir}/zic ${sbindir}/zdump" | 48 | FILES:tzcode = "${bindir}/tzselect ${sbindir}/zic ${bindir}/zdump" |
47 | FILES_${PN}-utils = "${bindir}/* ${sbindir}/*" | 49 | FILES:${PN}-utils = "${bindir}/* ${sbindir}/*" |
48 | FILES_catchsegv = "${bindir}/catchsegv" | 50 | FILES:${PN}-pcprofile = "${base_libdir}/libpcprofile.so" |
49 | RDEPENDS_catchsegv = "libsegfault" | 51 | FILES:glibc-thread-db = "${base_libdir}/libthread_db.so.* ${base_libdir}/libthread_db-*.so" |
50 | FILES_${PN}-pcprofile = "${base_libdir}/libpcprofile.so" | 52 | RPROVIDES:${PN}-dev += "libc-dev" |
51 | FILES_glibc-thread-db = "${base_libdir}/libthread_db.so.* ${base_libdir}/libthread_db-*.so" | 53 | RPROVIDES:${PN}-staticdev += "libc-staticdev" |
52 | RPROVIDES_${PN}-dev += "libc-dev" | 54 | |
53 | RPROVIDES_${PN}-staticdev += "libc-staticdev" | 55 | SUMMARY:sln = "The static ln" |
54 | 56 | DESCRIPTION:sln = "Similar to the 'ln' utility, but statically linked. sln is useful to make symbolic links to dynamic libraries if the dynamic linking system, for some reason, is not functional." | |
55 | SUMMARY_sln = "The static ln" | 57 | SUMMARY:nscd = "Name service cache daemon" |
56 | DESCRIPTION_sln = "Similar to the 'ln' utility, but statically linked. sln is useful to make symbolic links to dynamic libraries if the dynamic linking system, for some reason, is not functional." | 58 | DESCRIPTION:nscd = "nscd, name service cache daemon, caches name service lookups for the passwd, group and hosts information. It can damatically improvide performance with remote, such as NIS or NIS+, name services." |
57 | SUMMARY_nscd = "Name service cache daemon" | 59 | SUMMARY:glibc-extra-nss = "hesiod, NIS and NIS+ nss libraries" |
58 | DESCRIPTION_nscd = "nscd, name service cache daemon, caches name service lookups for the passwd, group and hosts information. It can damatically improvide performance with remote, such as NIS or NIS+, name services." | 60 | DESCRIPTION:glibc-extra-nss = "glibc: nis, nisplus and hesiod search services." |
59 | SUMMARY_glibc-extra-nss = "hesiod, NIS and NIS+ nss libraries" | 61 | SUMMARY:ldd = "print shared library dependencies" |
60 | DESCRIPTION_glibc-extra-nss = "glibc: nis, nisplus and hesiod search services." | 62 | DESCRIPTION:ldd = "${bindir}/ldd prints shared library dependencies for each program or shared library specified on the command line." |
61 | SUMMARY_ldd = "print shared library dependencies" | 63 | SUMMARY:${PN}-utils = "Miscellaneous utilities provided by glibc" |
62 | DESCRIPTION_ldd = "${bindir}/ldd prints shared library dependencies for each program or shared library specified on the command line." | 64 | DESCRIPTION:${PN}-utils = "Miscellaneous utilities including getconf, iconv, locale, gencat, ..." |
63 | SUMMARY_${PN}-utils = "Miscellaneous utilities provided by glibc" | 65 | DESCRIPTION:libsotruss = "Library to support sotruss which traces calls through PLTs" |
64 | DESCRIPTION_${PN}-utils = "Miscellaneous utilities including getconf, iconv, locale, gencat, ..." | 66 | DESCRIPTION:tzcode = "tzcode, timezone zoneinfo utils -- zic, zdump, tzselect" |
65 | DESCRIPTION_libsotruss = "Library to support sotruss which traces calls through PLTs" | ||
66 | DESCRIPTION_tzcode = "tzcode, timezone zoneinfo utils -- zic, zdump, tzselect" | ||
67 | 67 | ||
68 | inherit multilib_header | 68 | inherit multilib_header |
69 | 69 | ||
@@ -87,7 +87,7 @@ do_install() { | |||
87 | rmdir --ignore-fail-on-non-empty ${D}${libexecdir} | 87 | rmdir --ignore-fail-on-non-empty ${D}${libexecdir} |
88 | fi | 88 | fi |
89 | 89 | ||
90 | oe_multilib_header bits/syscall.h bits/long-double.h bits/floatn.h bits/endianness.h bits/struct_rwlock.h | 90 | oe_multilib_header bits/syscall.h bits/long-double.h bits/floatn.h bits/endianness.h bits/struct_rwlock.h bits/math-vector.h |
91 | 91 | ||
92 | if [ -f ${D}${bindir}/mtrace ]; then | 92 | if [ -f ${D}${bindir}/mtrace ]; then |
93 | sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' -e '2s,exec.*perl,exec ${USRBINPATH}/env perl,' ${D}${bindir}/mtrace | 93 | sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' -e '2s,exec.*perl,exec ${USRBINPATH}/env perl,' ${D}${bindir}/mtrace |
@@ -105,8 +105,8 @@ do_install() { | |||
105 | sed -i "s%daemon%start-stop-daemon --start --exec%g" ${D}${sysconfdir}/init.d/nscd | 105 | sed -i "s%daemon%start-stop-daemon --start --exec%g" ${D}${sysconfdir}/init.d/nscd |
106 | sed -i "s|\(enable-cache\t\+netgroup\t\+\)yes|\1no|" ${D}${sysconfdir}/nscd.conf | 106 | sed -i "s|\(enable-cache\t\+netgroup\t\+\)yes|\1no|" ${D}${sysconfdir}/nscd.conf |
107 | 107 | ||
108 | install -d ${D}${systemd_unitdir}/system | 108 | install -d ${D}${systemd_system_unitdir} |
109 | install -m 0644 ${S}/nscd/nscd.service ${D}${systemd_unitdir}/system/ | 109 | install -m 0644 ${S}/nscd/nscd.service ${D}${systemd_system_unitdir}/ |
110 | 110 | ||
111 | # The dynamic loader will have been installed into | 111 | # The dynamic loader will have been installed into |
112 | # ${base_libdir}. However, if that isn't going to end up being | 112 | # ${base_libdir}. However, if that isn't going to end up being |
@@ -118,6 +118,11 @@ do_install() { | |||
118 | ln -s ${@oe.path.relative('${root_prefix}/lib', '${base_libdir}')}/${ARCH_DYNAMIC_LOADER} \ | 118 | ln -s ${@oe.path.relative('${root_prefix}/lib', '${base_libdir}')}/${ARCH_DYNAMIC_LOADER} \ |
119 | ${D}${root_prefix}/lib/${ARCH_DYNAMIC_LOADER} | 119 | ${D}${root_prefix}/lib/${ARCH_DYNAMIC_LOADER} |
120 | fi | 120 | fi |
121 | ln -rs ${D}${base_libdir}/libpthread.so.0 ${D}${libdir}/libpthread.so | ||
122 | ln -rs ${D}${base_libdir}/librt.so.1 ${D}${libdir}/librt.so | ||
123 | if [ -n "${MLPREFIX}" ]; then | ||
124 | mv ${D}${bindir}/ld.so ${D}${bindir}/${MLPREFIX}ld.so | ||
125 | fi | ||
121 | } | 126 | } |
122 | 127 | ||
123 | def get_libc_fpu_setting(bb, d): | 128 | def get_libc_fpu_setting(bb, d): |
@@ -125,11 +130,11 @@ def get_libc_fpu_setting(bb, d): | |||
125 | return "--without-fp" | 130 | return "--without-fp" |
126 | return "" | 131 | return "" |
127 | 132 | ||
128 | do_install_append_class-target() { | 133 | do_install:append:class-target() { |
129 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | 134 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then |
130 | install -d ${D}${sysconfdir}/tmpfiles.d | 135 | install -d ${D}${nonarch_libdir}/tmpfiles.d |
131 | echo "d /run/nscd 755 root root -" \ | 136 | echo "d /run/nscd 755 root root -" \ |
132 | > ${D}${sysconfdir}/tmpfiles.d/nscd.conf | 137 | > ${D}${nonarch_libdir}/tmpfiles.d/nscd.conf |
133 | fi | 138 | fi |
134 | 139 | ||
135 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | 140 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then |
@@ -139,15 +144,15 @@ do_install_append_class-target() { | |||
139 | fi | 144 | fi |
140 | 145 | ||
141 | } | 146 | } |
142 | do_install_append_aarch64 () { | 147 | do_install:append:aarch64 () { |
143 | do_install_armmultilib | 148 | do_install_armmultilib |
144 | } | 149 | } |
145 | 150 | ||
146 | do_install_append_arm () { | 151 | do_install:append:arm () { |
147 | do_install_armmultilib | 152 | do_install_armmultilib |
148 | } | 153 | } |
149 | 154 | ||
150 | do_install_append_armeb () { | 155 | do_install:append:armeb () { |
151 | do_install_armmultilib | 156 | do_install_armmultilib |
152 | } | 157 | } |
153 | 158 | ||
@@ -156,7 +161,8 @@ do_install_armmultilib () { | |||
156 | oe_multilib_header bits/local_lim.h bits/mman.h bits/msq.h bits/pthreadtypes.h bits/pthreadtypes-arch.h bits/sem.h bits/semaphore.h bits/setjmp.h | 161 | oe_multilib_header bits/local_lim.h bits/mman.h bits/msq.h bits/pthreadtypes.h bits/pthreadtypes-arch.h bits/sem.h bits/semaphore.h bits/setjmp.h |
157 | oe_multilib_header bits/shm.h bits/sigstack.h bits/stat.h bits/statfs.h bits/typesizes.h | 162 | oe_multilib_header bits/shm.h bits/sigstack.h bits/stat.h bits/statfs.h bits/typesizes.h |
158 | oe_multilib_header bits/procfs-id.h bits/procfs.h bits/shmlba.h | 163 | oe_multilib_header bits/procfs-id.h bits/procfs.h bits/shmlba.h |
159 | oe_multilib_header bits/struct_stat.h | 164 | oe_multilib_header bits/struct_stat.h bits/pthread_stack_min.h |
165 | oe_multilib_header bits/dl_find_object.h bits/rseq.h bits/timesize.h | ||
160 | 166 | ||
161 | oe_multilib_header fpu_control.h gnu/lib-names.h gnu/stubs.h ieee754.h | 167 | oe_multilib_header fpu_control.h gnu/lib-names.h gnu/stubs.h ieee754.h |
162 | 168 | ||
@@ -252,35 +258,35 @@ stash_locale_package_cleanup() { | |||
252 | stash_locale_cleanup ${PKGD} | 258 | stash_locale_cleanup ${PKGD} |
253 | } | 259 | } |
254 | 260 | ||
255 | python populate_packages_prepend () { | 261 | python populate_packages:prepend () { |
256 | if d.getVar('DEBIAN_NAMES'): | 262 | if d.getVar('DEBIAN_NAMES'): |
257 | pkgs = d.getVar('PACKAGES').split() | 263 | pkgs = d.getVar('PACKAGES').split() |
258 | bpn = d.getVar('BPN') | 264 | bpn = d.getVar('BPN') |
259 | prefix = d.getVar('MLPREFIX') or "" | 265 | prefix = d.getVar('MLPREFIX') or "" |
260 | # Set the base package... | 266 | # Set the base package... |
261 | d.setVar('PKG_' + prefix + bpn, prefix + 'libc6') | 267 | d.setVar('PKG:' + prefix + bpn, prefix + 'libc6') |
262 | libcprefix = prefix + bpn + '-' | 268 | libcprefix = prefix + bpn + '-' |
263 | for p in pkgs: | 269 | for p in pkgs: |
264 | # And all the subpackages. | 270 | # And all the subpackages. |
265 | if p.startswith(libcprefix): | 271 | if p.startswith(libcprefix): |
266 | renamed = p.replace(bpn, 'libc6', 1) | 272 | renamed = p.replace(bpn, 'libc6', 1) |
267 | d.setVar('PKG_' + p, renamed) | 273 | d.setVar('PKG:' + p, renamed) |
268 | # For backward compatibility with old -dbg package | 274 | # For backward compatibility with old -dbg package |
269 | d.appendVar('RPROVIDES_' + libcprefix + 'dbg', ' ' + prefix + 'libc-dbg') | 275 | d.appendVar('RPROVIDES:' + libcprefix + 'dbg', ' ' + prefix + 'libc-dbg') |
270 | d.appendVar('RCONFLICTS_' + libcprefix + 'dbg', ' ' + prefix + 'libc-dbg') | 276 | d.appendVar('RCONFLICTS:' + libcprefix + 'dbg', ' ' + prefix + 'libc-dbg') |
271 | d.appendVar('RREPLACES_' + libcprefix + 'dbg', ' ' + prefix + 'libc-dbg') | 277 | d.appendVar('RREPLACES:' + libcprefix + 'dbg', ' ' + prefix + 'libc-dbg') |
272 | } | 278 | } |
273 | 279 | ||
274 | pkg_postinst_nscd () { | 280 | pkg_postinst:nscd () { |
275 | if [ -z "$D" ]; then | 281 | if [ -z "$D" ]; then |
276 | if command -v systemd-tmpfiles >/dev/null; then | 282 | if command -v systemd-tmpfiles >/dev/null; then |
277 | systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/nscd.conf | 283 | systemd-tmpfiles --create ${nonarch_libdir}/tmpfiles.d/nscd.conf |
278 | elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then | 284 | elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then |
279 | ${sysconfdir}/init.d/populate-volatile.sh update | 285 | ${sysconfdir}/init.d/populate-volatile.sh update |
280 | fi | 286 | fi |
281 | fi | 287 | fi |
282 | } | 288 | } |
283 | CONFFILES_nscd="${sysconfdir}/nscd.conf" | 289 | CONFFILES:nscd="${sysconfdir}/nscd.conf" |
284 | 290 | ||
285 | SYSTEMD_PACKAGES = "nscd" | 291 | SYSTEMD_PACKAGES = "nscd" |
286 | SYSTEMD_SERVICE_nscd = "nscd.service" | 292 | SYSTEMD_SERVICE:nscd = "nscd.service" |
diff --git a/meta/recipes-core/glibc/glibc-scripts.inc b/meta/recipes-core/glibc/glibc-scripts.inc index 14a14e4512..47216ae7d7 100644 --- a/meta/recipes-core/glibc/glibc-scripts.inc +++ b/meta/recipes-core/glibc/glibc-scripts.inc | |||
@@ -2,7 +2,7 @@ require glibc-collateral.inc | |||
2 | 2 | ||
3 | SUMMARY = "utility scripts provided by glibc" | 3 | SUMMARY = "utility scripts provided by glibc" |
4 | DESCRIPTION = "utility scripts provided by glibc" | 4 | DESCRIPTION = "utility scripts provided by glibc" |
5 | RDEPENDS_${PN} = "bash glibc-mtrace" | 5 | RDEPENDS:${PN} = "bash glibc-mtrace" |
6 | 6 | ||
7 | SRC = "${COMPONENTS_DIR}/${PACKAGE_ARCH}/glibc-stash-locale/scripts" | 7 | SRC = "${COMPONENTS_DIR}/${PACKAGE_ARCH}/glibc-stash-locale/scripts" |
8 | 8 | ||
@@ -17,7 +17,7 @@ do_install() { | |||
17 | 17 | ||
18 | # sotruss script requires sotruss-lib.so (given by libsotruss package), | 18 | # sotruss script requires sotruss-lib.so (given by libsotruss package), |
19 | # to produce trace of the library calls. | 19 | # to produce trace of the library calls. |
20 | RDEPENDS_${PN} += "libsotruss" | 20 | RDEPENDS:${PN} += "libsotruss" |
21 | 21 | ||
22 | # Don't scan for CVEs as glibc will be scanned | 22 | # Don't scan for CVEs as glibc will be scanned |
23 | CVE_PRODUCT = "" | 23 | CVE_PRODUCT = "" |
diff --git a/meta/recipes-core/glibc/glibc-scripts_2.33.bb b/meta/recipes-core/glibc/glibc-scripts_2.39.bb index 5a89bd8022..5a89bd8022 100644 --- a/meta/recipes-core/glibc/glibc-scripts_2.33.bb +++ b/meta/recipes-core/glibc/glibc-scripts_2.39.bb | |||
diff --git a/meta/recipes-core/glibc/glibc-testsuite_2.33.bb b/meta/recipes-core/glibc/glibc-tests.inc index d887aeff79..a8fe160a54 100644 --- a/meta/recipes-core/glibc/glibc-testsuite_2.33.bb +++ b/meta/recipes-core/glibc/glibc-tests.inc | |||
@@ -1,12 +1,8 @@ | |||
1 | require glibc_${PV}.bb | ||
2 | |||
3 | EXCLUDE_FROM_WORLD = "1" | 1 | EXCLUDE_FROM_WORLD = "1" |
4 | 2 | ||
5 | # handle PN differences | 3 | # handle PN differences |
6 | FILESEXTRAPATHS_prepend := "${THISDIR}/glibc:" | 4 | FILESEXTRAPATHS:prepend := "${THISDIR}/glibc:" |
7 | 5 | ||
8 | # strip provides | ||
9 | PROVIDES = "" | ||
10 | # setup depends | 6 | # setup depends |
11 | INHIBIT_DEFAULT_DEPS = "" | 7 | INHIBIT_DEFAULT_DEPS = "" |
12 | 8 | ||
@@ -20,24 +16,10 @@ python () { | |||
20 | DEPENDS += "glibc-locale libgcc gcc-runtime" | 16 | DEPENDS += "glibc-locale libgcc gcc-runtime" |
21 | 17 | ||
22 | # remove the initial depends | 18 | # remove the initial depends |
23 | DEPENDS_remove = "libgcc-initial" | 19 | DEPENDS:remove = "libgcc-initial" |
24 | |||
25 | inherit qemu | ||
26 | |||
27 | SRC_URI += "file://check-test-wrapper" | ||
28 | |||
29 | DEPENDS += "${@'qemu-native' if d.getVar('TOOLCHAIN_TEST_TARGET') == 'user' else ''}" | ||
30 | |||
31 | TOOLCHAIN_TEST_TARGET ??= "user" | ||
32 | TOOLCHAIN_TEST_HOST ??= "localhost" | ||
33 | TOOLCHAIN_TEST_HOST_USER ??= "root" | ||
34 | TOOLCHAIN_TEST_HOST_PORT ??= "2222" | ||
35 | 20 | ||
36 | do_check[dirs] += "${B}" | 21 | do_check[dirs] += "${B}" |
37 | do_check[nostamp] = "1" | ||
38 | do_check () { | 22 | do_check () { |
39 | chmod 0755 ${WORKDIR}/check-test-wrapper | ||
40 | |||
41 | # clean out previous test results | 23 | # clean out previous test results |
42 | oe_runmake tests-clean | 24 | oe_runmake tests-clean |
43 | # makefiles don't clean entirely (and also sometimes fails due to too many args) | 25 | # makefiles don't clean entirely (and also sometimes fails due to too many args) |
@@ -46,18 +28,5 @@ do_check () { | |||
46 | find ${B}/catgets -name "*.cat" -delete | 28 | find ${B}/catgets -name "*.cat" -delete |
47 | find ${B}/conform -name "symlist-*" -delete | 29 | find ${B}/conform -name "symlist-*" -delete |
48 | [ ! -e ${B}/timezone/testdata ] || rm -rf ${B}/timezone/testdata | 30 | [ ! -e ${B}/timezone/testdata ] || rm -rf ${B}/timezone/testdata |
49 | |||
50 | oe_runmake -i \ | ||
51 | QEMU_SYSROOT="${RECIPE_SYSROOT}" \ | ||
52 | QEMU_OPTIONS="${@qemu_target_binary(d)} ${QEMU_OPTIONS}" \ | ||
53 | SSH_HOST="${TOOLCHAIN_TEST_HOST}" \ | ||
54 | SSH_HOST_USER="${TOOLCHAIN_TEST_HOST_USER}" \ | ||
55 | SSH_HOST_PORT="${TOOLCHAIN_TEST_HOST_PORT}" \ | ||
56 | test-wrapper="${WORKDIR}/check-test-wrapper ${TOOLCHAIN_TEST_TARGET}" \ | ||
57 | check | ||
58 | } | 31 | } |
59 | addtask do_check after do_compile | 32 | addtask do_check after do_compile |
60 | |||
61 | inherit nopackages | ||
62 | deltask do_stash_locale | ||
63 | deltask do_install | ||
diff --git a/meta/recipes-core/glibc/glibc-testsuite_2.39.bb b/meta/recipes-core/glibc/glibc-testsuite_2.39.bb new file mode 100644 index 0000000000..2e076f4b0f --- /dev/null +++ b/meta/recipes-core/glibc/glibc-testsuite_2.39.bb | |||
@@ -0,0 +1,36 @@ | |||
1 | require glibc_${PV}.bb | ||
2 | require glibc-tests.inc | ||
3 | |||
4 | inherit qemu | ||
5 | |||
6 | SRC_URI += "file://check-test-wrapper" | ||
7 | |||
8 | # strip provides | ||
9 | PROVIDES = "" | ||
10 | |||
11 | DEPENDS += "${@'qemu-native' if d.getVar('TOOLCHAIN_TEST_TARGET') == 'user' else ''}" | ||
12 | |||
13 | TOOLCHAIN_TEST_TARGET ??= "user" | ||
14 | TOOLCHAIN_TEST_HOST ??= "localhost" | ||
15 | TOOLCHAIN_TEST_HOST_USER ??= "root" | ||
16 | TOOLCHAIN_TEST_HOST_PORT ??= "2222" | ||
17 | |||
18 | do_check[nostamp] = "1" | ||
19 | do_check[network] = "1" | ||
20 | do_check:append () { | ||
21 | chmod 0755 ${WORKDIR}/check-test-wrapper | ||
22 | |||
23 | oe_runmake -i \ | ||
24 | QEMU_SYSROOT="${RECIPE_SYSROOT}" \ | ||
25 | QEMU_OPTIONS="${@qemu_target_binary(d)} ${QEMU_OPTIONS}" \ | ||
26 | SSH_HOST="${TOOLCHAIN_TEST_HOST}" \ | ||
27 | SSH_HOST_USER="${TOOLCHAIN_TEST_HOST_USER}" \ | ||
28 | SSH_HOST_PORT="${TOOLCHAIN_TEST_HOST_PORT}" \ | ||
29 | test-wrapper="${WORKDIR}/check-test-wrapper ${TOOLCHAIN_TEST_TARGET}" \ | ||
30 | check | ||
31 | } | ||
32 | |||
33 | inherit nopackages | ||
34 | deltask do_stash_locale | ||
35 | deltask do_install | ||
36 | deltask do_populate_sysroot | ||
diff --git a/meta/recipes-core/glibc/glibc-version.inc b/meta/recipes-core/glibc/glibc-version.inc index 3a95173175..618a574566 100644 --- a/meta/recipes-core/glibc/glibc-version.inc +++ b/meta/recipes-core/glibc/glibc-version.inc | |||
@@ -1,8 +1,10 @@ | |||
1 | SRCBRANCH ?= "release/2.33/master" | 1 | SRCBRANCH ?= "release/2.39/master" |
2 | PV = "2.33" | 2 | PV = "2.39+git" |
3 | SRCREV_glibc ?= "9826b03b747b841f5fc6de2054bf1ef3f5c4bdf3" | 3 | SRCREV_glibc ?= "1b9c1a0047fb26a65a9b2a7b8cd977243f7d353c" |
4 | SRCREV_localedef ?= "bd644c9e6f3e20c5504da1488448173c69c56c28" | 4 | SRCREV_localedef ?= "fab74f31b3811df543e24b6de47efdf45b538abc" |
5 | 5 | ||
6 | GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git" | 6 | GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git;protocol=https" |
7 | 7 | ||
8 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.(?!90)\d+)*)" | 8 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.(?!90)\d+)*)" |
9 | |||
10 | CVE_STATUS[CVE-2023-4911] = "fixed-version: Fixed in stable branch updates" | ||
diff --git a/meta/recipes-core/glibc/glibc-y2038-tests_2.39.bb b/meta/recipes-core/glibc/glibc-y2038-tests_2.39.bb new file mode 100644 index 0000000000..be49ca4cb7 --- /dev/null +++ b/meta/recipes-core/glibc/glibc-y2038-tests_2.39.bb | |||
@@ -0,0 +1,119 @@ | |||
1 | require glibc_${PV}.bb | ||
2 | require glibc-tests.inc | ||
3 | |||
4 | inherit ptest features_check | ||
5 | REQUIRED_DISTRO_FEATURES = "ptest" | ||
6 | |||
7 | SRC_URI += "\ | ||
8 | file://run-ptest \ | ||
9 | " | ||
10 | |||
11 | SUMMARY = "glibc tests using time32/time64 interfaces to be run with ptest for the purpose of checking y2038 compatiblity" | ||
12 | |||
13 | # Erase some variables already set by glibc_${PV} | ||
14 | python __anonymous() { | ||
15 | # Remove packages provided by glibc build, we only need a subset of them | ||
16 | d.setVar("PACKAGES", "${PN} ${PN}-ptest") | ||
17 | |||
18 | d.setVar("PROVIDES", "${PN} ${PN}-ptest") | ||
19 | |||
20 | bbclassextend = d.getVar("BBCLASSEXTEND").replace("nativesdk", "").strip() | ||
21 | d.setVar("BBCLASSEXTEND", bbclassextend) | ||
22 | d.setVar("RRECOMMENDS", "") | ||
23 | d.setVar("SYSTEMD_SERVICE:nscd", "") | ||
24 | d.setVar("SYSTEMD_PACKAGES", "") | ||
25 | } | ||
26 | |||
27 | # Remove any leftovers from original glibc recipe | ||
28 | RPROVIDES:${PN} = "${PN}" | ||
29 | RRECOMMENDS:${PN} = "" | ||
30 | RDEPENDS:${PN} = "glibc libgcc sed bash" | ||
31 | RDEPENDS:${PN}-ptest = "${PN}" | ||
32 | DEPENDS += "sed" | ||
33 | |||
34 | export oe_srcdir="${exec_prefix}/src/debug/glibc/${PV}/" | ||
35 | |||
36 | # Just build tests for target - do not run them | ||
37 | do_check:append () { | ||
38 | oe_runmake -i check run-built-tests=no | ||
39 | } | ||
40 | addtask do_check after do_compile before do_install_ptest_base | ||
41 | |||
42 | glibc_strip_build_directory () { | ||
43 | # Delete all non executable files from build directory | ||
44 | find ${B} ! -executable -type f -delete | ||
45 | |||
46 | # Remove build dynamic libraries and links to them as | ||
47 | # those are already installed in the target device | ||
48 | find ${B} -type f -name "*.so" -delete | ||
49 | find ${B} -type l -name "*.so*" -delete | ||
50 | |||
51 | # Remove headers (installed with glibc) | ||
52 | find ${B} -type f -name "*.h" -delete | ||
53 | |||
54 | find ${B} -type f -name "isomac" -delete | ||
55 | find ${B} -type f -name "annexc" -delete | ||
56 | } | ||
57 | |||
58 | do_install_ptest_base () { | ||
59 | glibc_strip_build_directory | ||
60 | |||
61 | ls -r ${B}/*/*-time64 > ${B}/tst_time64 | ||
62 | |||
63 | # Remove '-time64' suffix - those tests are also time related | ||
64 | sed -e "s/-time64$//" ${B}/tst_time64 > ${B}/tst_time_tmp | ||
65 | tst_time=$(cat ${B}/tst_time_tmp ${B}/tst_time64) | ||
66 | |||
67 | rm ${B}/tst_time_tmp ${B}/tst_time64 | ||
68 | echo "${tst_time}" | ||
69 | |||
70 | # Install build test programs to the image | ||
71 | install -d ${D}${PTEST_PATH}/tests/glibc-ptest/ | ||
72 | |||
73 | for f in "${tst_time}" | ||
74 | do | ||
75 | cp -r ${f} ${D}${PTEST_PATH}/tests/glibc-ptest/ | ||
76 | done | ||
77 | |||
78 | install -d ${D}${PTEST_PATH} | ||
79 | cp ${WORKDIR}/run-ptest ${D}${PTEST_PATH}/ | ||
80 | |||
81 | } | ||
82 | |||
83 | # The datadir directory is required to allow core (and reused) | ||
84 | # glibc cleanup function to finish correctly, as this directory | ||
85 | # is not created for ptests | ||
86 | stash_locale_package_cleanup:prepend () { | ||
87 | mkdir -p ${PKGD}${datadir} | ||
88 | } | ||
89 | |||
90 | stash_locale_sysroot_cleanup:prepend () { | ||
91 | mkdir -p ${SYSROOT_DESTDIR}${datadir} | ||
92 | } | ||
93 | |||
94 | # Prevent the do_package() task to set 'libc6' prefix | ||
95 | # for glibc tests related packages | ||
96 | python populate_packages:prepend () { | ||
97 | if d.getVar('DEBIAN_NAMES'): | ||
98 | d.setVar('DEBIAN_NAMES', '') | ||
99 | } | ||
100 | |||
101 | FILES:${PN} = "${PTEST_PATH}/* /usr/src/debug/${PN}/*" | ||
102 | |||
103 | EXCLUDE_FROM_SHLIBS = "1" | ||
104 | |||
105 | # Install debug data in .debug and sources in /usr/src/debug | ||
106 | # It is more handy to have _all_ the sources and symbols in one | ||
107 | # place (package) as this recipe will be used for validation and | ||
108 | # debugging. | ||
109 | PACKAGE_DEBUG_SPLIT_STYLE = ".debug" | ||
110 | |||
111 | # glibc test cases violate by default some Yocto/OE checks (staticdev, | ||
112 | # textrel) | ||
113 | # 'debug-files' - add everything (including debug) into one package | ||
114 | # (no need to install/build *-src package) | ||
115 | INSANE_SKIP:${PN} += "staticdev textrel debug-files rpaths" | ||
116 | |||
117 | deltask do_stash_locale | ||
118 | do_install[noexec] = "1" | ||
119 | do_populate_sysroot[noexec] = "1" | ||
diff --git a/meta/recipes-core/glibc/glibc.inc b/meta/recipes-core/glibc/glibc.inc index 7d14306377..b08a70aa46 100644 --- a/meta/recipes-core/glibc/glibc.inc +++ b/meta/recipes-core/glibc/glibc.inc | |||
@@ -1,7 +1,7 @@ | |||
1 | require glibc-common.inc | 1 | require glibc-common.inc |
2 | require glibc-ld.inc | 2 | require glibc-ld.inc |
3 | 3 | ||
4 | DEPENDS = "virtual/${TARGET_PREFIX}gcc libgcc-initial linux-libc-headers" | 4 | DEPENDS = "virtual/${HOST_PREFIX}gcc virtual/${HOST_PREFIX}binutils libgcc-initial linux-libc-headers" |
5 | 5 | ||
6 | PROVIDES = "virtual/libc" | 6 | PROVIDES = "virtual/libc" |
7 | PROVIDES += "virtual/libintl virtual/libiconv" | 7 | PROVIDES += "virtual/libintl virtual/libiconv" |
@@ -24,10 +24,10 @@ CACHED_CONFIGUREVARS += " \ | |||
24 | " | 24 | " |
25 | 25 | ||
26 | # ifunc doesn't appear to work on mips, casuses libbfd assertion failures | 26 | # ifunc doesn't appear to work on mips, casuses libbfd assertion failures |
27 | CACHED_CONFIGUREVARS_append_mipsarch = " libc_cv_ld_gnu_indirect_function=no" | 27 | CACHED_CONFIGUREVARS:append:mipsarch = " libc_cv_ld_gnu_indirect_function=no" |
28 | 28 | ||
29 | GLIBC_EXTRA_OECONF ?= "" | 29 | GLIBC_EXTRA_OECONF ?= "" |
30 | GLIBC_EXTRA_OECONF_class-nativesdk = "" | 30 | GLIBC_EXTRA_OECONF:class-nativesdk = "" |
31 | 31 | ||
32 | # glibc uses PARALLELMFLAGS variable to pass parallel build info so transfer | 32 | # glibc uses PARALLELMFLAGS variable to pass parallel build info so transfer |
33 | # PARALLEL_MAKE into PARALLELMFLAGS and empty out PARALLEL_MAKE | 33 | # PARALLEL_MAKE into PARALLELMFLAGS and empty out PARALLEL_MAKE |
@@ -41,12 +41,16 @@ PARALLEL_MAKE = "" | |||
41 | # ensure make uses /bin/bash | 41 | # ensure make uses /bin/bash |
42 | EXTRA_OEMAKE += "SHELL=/bin/bash" | 42 | EXTRA_OEMAKE += "SHELL=/bin/bash" |
43 | 43 | ||
44 | do_configure_prepend() { | 44 | # We do not need bash to run tzselect script, the default is to use |
45 | sed -e "s#@BASH@#/bin/sh#" -i ${S}/elf/ldd.bash.in | 45 | # bash but it can be configured by setting KSHELL Makefile variable |
46 | EXTRA_OEMAKE += "KSHELL=/bin/sh" | ||
47 | |||
48 | do_configure:prepend() { | ||
49 | sed -e "s#/bin/bash#/bin/sh#" -i ${S}/elf/ldd.bash.in | ||
46 | } | 50 | } |
47 | 51 | ||
48 | # Enable backtrace from abort() | 52 | # Enable backtrace from abort() |
49 | do_configure_append_arm () { | 53 | do_configure:append:arm () { |
50 | echo "CFLAGS-abort.c = -fasynchronous-unwind-tables" >> ${B}/configparms | 54 | echo "CFLAGS-abort.c = -fasynchronous-unwind-tables" >> ${B}/configparms |
51 | echo "CFLAGS-raise.c = -fasynchronous-unwind-tables" >> ${B}/configparms | 55 | echo "CFLAGS-raise.c = -fasynchronous-unwind-tables" >> ${B}/configparms |
52 | } | 56 | } |
diff --git a/meta/recipes-core/glibc/glibc/0001-localedef-Add-hardlink-resolver-from-util-linux.patch b/meta/recipes-core/glibc/glibc/0001-localedef-Add-hardlink-resolver-from-util-linux.patch index f96da83a9b..4f919078dd 100644 --- a/meta/recipes-core/glibc/glibc/0001-localedef-Add-hardlink-resolver-from-util-linux.patch +++ b/meta/recipes-core/glibc/glibc/0001-localedef-Add-hardlink-resolver-from-util-linux.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From d1f1671034a222417f9a829dcaa4f0c3d4f8954d Mon Sep 17 00:00:00 2001 | 1 | From 544d23dea91b2be793c805b9e4bce8cd1d28121f Mon Sep 17 00:00:00 2001 |
2 | From: Jason Wessel <jason.wessel@windriver.com> | 2 | From: Jason Wessel <jason.wessel@windriver.com> |
3 | Date: Sat, 7 Dec 2019 09:59:22 -0800 | 3 | Date: Sat, 7 Dec 2019 09:59:22 -0800 |
4 | Subject: [PATCH] localedef: Add hardlink resolver from util-linux | 4 | Subject: [PATCH] localedef: Add hardlink resolver from util-linux |
diff --git a/meta/recipes-core/glibc/glibc/0002-localedef-fix-ups-hardlink-to-make-it-compile.patch b/meta/recipes-core/glibc/glibc/0002-localedef-fix-ups-hardlink-to-make-it-compile.patch index 3dc4582f47..7c8fa973ec 100644 --- a/meta/recipes-core/glibc/glibc/0002-localedef-fix-ups-hardlink-to-make-it-compile.patch +++ b/meta/recipes-core/glibc/glibc/0002-localedef-fix-ups-hardlink-to-make-it-compile.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 14d256e2db009f8bac9a265e8393d7ed25050df9 Mon Sep 17 00:00:00 2001 | 1 | From ebb1e37285ab541135005cfe945b7a58e4b95040 Mon Sep 17 00:00:00 2001 |
2 | From: Jason Wessel <jason.wessel@windriver.com> | 2 | From: Jason Wessel <jason.wessel@windriver.com> |
3 | Date: Sat, 7 Dec 2019 10:01:37 -0800 | 3 | Date: Sat, 7 Dec 2019 10:01:37 -0800 |
4 | Subject: [PATCH] localedef: fix-ups hardlink to make it compile | 4 | Subject: [PATCH] localedef: fix-ups hardlink to make it compile |
diff --git a/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch b/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch index c4718a106f..bd4b5aa98b 100644 --- a/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch +++ b/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 32a4b8ae046fe4bb1b19f61378d079d44deaede7 Mon Sep 17 00:00:00 2001 | 1 | From 9770abfda8e85fe027f95871bc03450d05b1e2c8 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Wed, 18 Mar 2015 01:48:24 +0000 | 3 | Date: Wed, 18 Mar 2015 01:48:24 +0000 |
4 | Subject: [PATCH] nativesdk-glibc: Look for host system ld.so.cache as well | 4 | Subject: [PATCH] nativesdk-glibc: Look for host system ld.so.cache as well |
@@ -30,10 +30,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
30 | 1 file changed, 8 insertions(+), 8 deletions(-) | 30 | 1 file changed, 8 insertions(+), 8 deletions(-) |
31 | 31 | ||
32 | diff --git a/elf/dl-load.c b/elf/dl-load.c | 32 | diff --git a/elf/dl-load.c b/elf/dl-load.c |
33 | index 9e2089cfaa..ad01674027 100644 | 33 | index ce8fdea302..1f502eb026 100644 |
34 | --- a/elf/dl-load.c | 34 | --- a/elf/dl-load.c |
35 | +++ b/elf/dl-load.c | 35 | +++ b/elf/dl-load.c |
36 | @@ -2175,6 +2175,14 @@ _dl_map_object (struct link_map *loader, const char *name, | 36 | @@ -2105,6 +2105,14 @@ _dl_map_object (struct link_map *loader, const char *name, |
37 | } | 37 | } |
38 | } | 38 | } |
39 | 39 | ||
@@ -48,7 +48,7 @@ index 9e2089cfaa..ad01674027 100644 | |||
48 | #ifdef USE_LDCONFIG | 48 | #ifdef USE_LDCONFIG |
49 | if (fd == -1 | 49 | if (fd == -1 |
50 | && (__glibc_likely ((mode & __RTLD_SECURE) == 0) | 50 | && (__glibc_likely ((mode & __RTLD_SECURE) == 0) |
51 | @@ -2233,14 +2241,6 @@ _dl_map_object (struct link_map *loader, const char *name, | 51 | @@ -2163,14 +2171,6 @@ _dl_map_object (struct link_map *loader, const char *name, |
52 | } | 52 | } |
53 | #endif | 53 | #endif |
54 | 54 | ||
diff --git a/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch b/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch index a8e625d24c..19fc561a06 100644 --- a/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch +++ b/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From aa8393bff257e4badfd208b88473ead175c69362 Mon Sep 17 00:00:00 2001 | 1 | From 587b92ff99e6d8f59c461ee8beecae39d8818f7e Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Wed, 18 Mar 2015 01:50:00 +0000 | 3 | Date: Wed, 18 Mar 2015 01:50:00 +0000 |
4 | Subject: [PATCH] nativesdk-glibc: Fix buffer overrun with a relocated SDK | 4 | Subject: [PATCH] nativesdk-glibc: Fix buffer overrun with a relocated SDK |
@@ -21,10 +21,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
21 | 1 file changed, 12 insertions(+) | 21 | 1 file changed, 12 insertions(+) |
22 | 22 | ||
23 | diff --git a/elf/dl-load.c b/elf/dl-load.c | 23 | diff --git a/elf/dl-load.c b/elf/dl-load.c |
24 | index ad01674027..f455207e79 100644 | 24 | index 1f502eb026..c4a543fb00 100644 |
25 | --- a/elf/dl-load.c | 25 | --- a/elf/dl-load.c |
26 | +++ b/elf/dl-load.c | 26 | +++ b/elf/dl-load.c |
27 | @@ -1871,7 +1871,19 @@ open_path (const char *name, size_t namelen, int mode, | 27 | @@ -1802,7 +1802,19 @@ open_path (const char *name, size_t namelen, int mode, |
28 | given on the command line when rtld is run directly. */ | 28 | given on the command line when rtld is run directly. */ |
29 | return -1; | 29 | return -1; |
30 | 30 | ||
diff --git a/meta/recipes-core/glibc/glibc/0005-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch b/meta/recipes-core/glibc/glibc/0005-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch index 197caae921..55892417f4 100644 --- a/meta/recipes-core/glibc/glibc/0005-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch +++ b/meta/recipes-core/glibc/glibc/0005-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 3ea08e491a8494ff03e598b5e0fc2d8131e75da9 Mon Sep 17 00:00:00 2001 | 1 | From 49caf586b80ba030a0ee4af9f6128ff2979ea636 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Wed, 18 Mar 2015 01:51:38 +0000 | 3 | Date: Wed, 18 Mar 2015 01:51:38 +0000 |
4 | Subject: [PATCH] nativesdk-glibc: Raise the size of arrays containing dl paths | 4 | Subject: [PATCH] nativesdk-glibc: Raise the size of arrays containing dl paths |
@@ -19,17 +19,17 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
19 | elf/dl-load.c | 4 ++-- | 19 | elf/dl-load.c | 4 ++-- |
20 | elf/dl-usage.c | 6 ++++-- | 20 | elf/dl-usage.c | 6 ++++-- |
21 | elf/interp.c | 2 +- | 21 | elf/interp.c | 2 +- |
22 | elf/ldconfig.c | 3 +++ | 22 | elf/ldconfig.c | 2 ++ |
23 | elf/rtld.c | 1 + | 23 | elf/rtld.c | 1 + |
24 | iconv/gconv_conf.c | 2 +- | 24 | iconv/gconv_conf.c | 2 +- |
25 | sysdeps/generic/dl-cache.h | 4 ---- | 25 | sysdeps/generic/dl-cache.h | 4 ---- |
26 | 8 files changed, 16 insertions(+), 10 deletions(-) | 26 | 8 files changed, 15 insertions(+), 10 deletions(-) |
27 | 27 | ||
28 | diff --git a/elf/dl-cache.c b/elf/dl-cache.c | 28 | diff --git a/elf/dl-cache.c b/elf/dl-cache.c |
29 | index 32f3bef5ea..71f3a82dc0 100644 | 29 | index 85f3f179ed..cc55887c56 100644 |
30 | --- a/elf/dl-cache.c | 30 | --- a/elf/dl-cache.c |
31 | +++ b/elf/dl-cache.c | 31 | +++ b/elf/dl-cache.c |
32 | @@ -359,6 +359,10 @@ search_cache (const char *string_table, uint32_t string_table_size, | 32 | @@ -352,6 +352,10 @@ search_cache (const char *string_table, uint32_t string_table_size, |
33 | return best; | 33 | return best; |
34 | } | 34 | } |
35 | 35 | ||
@@ -41,10 +41,10 @@ index 32f3bef5ea..71f3a82dc0 100644 | |||
41 | _dl_cache_libcmp (const char *p1, const char *p2) | 41 | _dl_cache_libcmp (const char *p1, const char *p2) |
42 | { | 42 | { |
43 | diff --git a/elf/dl-load.c b/elf/dl-load.c | 43 | diff --git a/elf/dl-load.c b/elf/dl-load.c |
44 | index f455207e79..a144e24fcf 100644 | 44 | index c4a543fb00..27fb70f09b 100644 |
45 | --- a/elf/dl-load.c | 45 | --- a/elf/dl-load.c |
46 | +++ b/elf/dl-load.c | 46 | +++ b/elf/dl-load.c |
47 | @@ -115,8 +115,8 @@ enum { ncapstr = 1, max_capstrlen = 0 }; | 47 | @@ -117,8 +117,8 @@ enum { ncapstr = 1, max_capstrlen = 0 }; |
48 | gen-trusted-dirs.awk. */ | 48 | gen-trusted-dirs.awk. */ |
49 | #include "trusted-dirs.h" | 49 | #include "trusted-dirs.h" |
50 | 50 | ||
@@ -56,7 +56,7 @@ index f455207e79..a144e24fcf 100644 | |||
56 | SYSTEM_DIRS_LEN | 56 | SYSTEM_DIRS_LEN |
57 | }; | 57 | }; |
58 | diff --git a/elf/dl-usage.c b/elf/dl-usage.c | 58 | diff --git a/elf/dl-usage.c b/elf/dl-usage.c |
59 | index 6e26818bd7..f09e8b93e5 100644 | 59 | index 5baac4ba8e..60097ad0e2 100644 |
60 | --- a/elf/dl-usage.c | 60 | --- a/elf/dl-usage.c |
61 | +++ b/elf/dl-usage.c | 61 | +++ b/elf/dl-usage.c |
62 | @@ -25,6 +25,8 @@ | 62 | @@ -25,6 +25,8 @@ |
@@ -68,7 +68,7 @@ index 6e26818bd7..f09e8b93e5 100644 | |||
68 | void | 68 | void |
69 | _dl_usage (const char *argv0, const char *wrong_option) | 69 | _dl_usage (const char *argv0, const char *wrong_option) |
70 | { | 70 | { |
71 | @@ -244,7 +246,7 @@ setting environment variables (which would be inherited by subprocesses).\n\ | 71 | @@ -185,7 +187,7 @@ setting environment variables (which would be inherited by subprocesses).\n\ |
72 | --list list all dependencies and how they are resolved\n\ | 72 | --list list all dependencies and how they are resolved\n\ |
73 | --verify verify that given object really is a dynamically linked\n\ | 73 | --verify verify that given object really is a dynamically linked\n\ |
74 | object we can handle\n\ | 74 | object we can handle\n\ |
@@ -77,7 +77,7 @@ index 6e26818bd7..f09e8b93e5 100644 | |||
77 | --library-path PATH use given PATH instead of content of the environment\n\ | 77 | --library-path PATH use given PATH instead of content of the environment\n\ |
78 | variable LD_LIBRARY_PATH\n\ | 78 | variable LD_LIBRARY_PATH\n\ |
79 | --glibc-hwcaps-prepend LIST\n\ | 79 | --glibc-hwcaps-prepend LIST\n\ |
80 | @@ -266,7 +268,7 @@ setting environment variables (which would be inherited by subprocesses).\n\ | 80 | @@ -204,7 +206,7 @@ setting environment variables (which would be inherited by subprocesses).\n\ |
81 | \n\ | 81 | \n\ |
82 | This program interpreter self-identifies as: " RTLD "\n\ | 82 | This program interpreter self-identifies as: " RTLD "\n\ |
83 | ", | 83 | ", |
@@ -85,9 +85,9 @@ index 6e26818bd7..f09e8b93e5 100644 | |||
85 | + argv0, LD_SO_CACHE); | 85 | + argv0, LD_SO_CACHE); |
86 | print_search_path_for_help (state); | 86 | print_search_path_for_help (state); |
87 | print_hwcaps_subdirectories (state); | 87 | print_hwcaps_subdirectories (state); |
88 | print_legacy_hwcap_directories (); | 88 | _exit (EXIT_SUCCESS); |
89 | diff --git a/elf/interp.c b/elf/interp.c | 89 | diff --git a/elf/interp.c b/elf/interp.c |
90 | index 91966702ca..dc86c20e83 100644 | 90 | index 8b705824bf..7d094829f3 100644 |
91 | --- a/elf/interp.c | 91 | --- a/elf/interp.c |
92 | +++ b/elf/interp.c | 92 | +++ b/elf/interp.c |
93 | @@ -18,5 +18,5 @@ | 93 | @@ -18,5 +18,5 @@ |
@@ -98,24 +98,23 @@ index 91966702ca..dc86c20e83 100644 | |||
98 | +const char __invoke_dynamic_linker__[4096] __attribute__ ((section (".interp"))) | 98 | +const char __invoke_dynamic_linker__[4096] __attribute__ ((section (".interp"))) |
99 | = RUNTIME_LINKER; | 99 | = RUNTIME_LINKER; |
100 | diff --git a/elf/ldconfig.c b/elf/ldconfig.c | 100 | diff --git a/elf/ldconfig.c b/elf/ldconfig.c |
101 | index 28ed637a29..5d38a60c5d 100644 | 101 | index b64c54b53e..caf7001745 100644 |
102 | --- a/elf/ldconfig.c | 102 | --- a/elf/ldconfig.c |
103 | +++ b/elf/ldconfig.c | 103 | +++ b/elf/ldconfig.c |
104 | @@ -176,6 +176,9 @@ static struct argp argp = | 104 | @@ -150,6 +150,8 @@ static struct argp argp = |
105 | options, parse_opt, NULL, doc, NULL, more_help, NULL | 105 | options, parse_opt, NULL, doc, NULL, more_help, NULL |
106 | }; | 106 | }; |
107 | 107 | ||
108 | + | ||
109 | +extern const char LD_SO_CACHE[4096] __attribute__ ((section (".ldsocache"))); | 108 | +extern const char LD_SO_CACHE[4096] __attribute__ ((section (".ldsocache"))); |
110 | + | 109 | + |
111 | /* Check if string corresponds to an important hardware capability or | 110 | /* Handle program arguments. */ |
112 | a platform. */ | 111 | static error_t |
113 | static int | 112 | parse_opt (int key, char *arg, struct argp_state *state) |
114 | diff --git a/elf/rtld.c b/elf/rtld.c | 113 | diff --git a/elf/rtld.c b/elf/rtld.c |
115 | index 596b6ac3d9..1ccd33f668 100644 | 114 | index 4f494b792e..d1c1252188 100644 |
116 | --- a/elf/rtld.c | 115 | --- a/elf/rtld.c |
117 | +++ b/elf/rtld.c | 116 | +++ b/elf/rtld.c |
118 | @@ -185,6 +185,7 @@ dso_name_valid_for_suid (const char *p) | 117 | @@ -190,6 +190,7 @@ dso_name_valid_for_suid (const char *p) |
119 | } | 118 | } |
120 | return *p != '\0'; | 119 | return *p != '\0'; |
121 | } | 120 | } |
@@ -124,11 +123,11 @@ index 596b6ac3d9..1ccd33f668 100644 | |||
124 | static void | 123 | static void |
125 | audit_list_init (struct audit_list *list) | 124 | audit_list_init (struct audit_list *list) |
126 | diff --git a/iconv/gconv_conf.c b/iconv/gconv_conf.c | 125 | diff --git a/iconv/gconv_conf.c b/iconv/gconv_conf.c |
127 | index 682f949834..7eed87bc9d 100644 | 126 | index 1063c31a2b..57fa832e52 100644 |
128 | --- a/iconv/gconv_conf.c | 127 | --- a/iconv/gconv_conf.c |
129 | +++ b/iconv/gconv_conf.c | 128 | +++ b/iconv/gconv_conf.c |
130 | @@ -36,7 +36,7 @@ | 129 | @@ -35,7 +35,7 @@ |
131 | 130 | #include <gconv_parseconfdir.h> | |
132 | 131 | ||
133 | /* This is the default path where we look for module lists. */ | 132 | /* This is the default path where we look for module lists. */ |
134 | -static const char default_gconv_path[] = GCONV_PATH; | 133 | -static const char default_gconv_path[] = GCONV_PATH; |
@@ -137,7 +136,7 @@ index 682f949834..7eed87bc9d 100644 | |||
137 | /* Type to represent search path. */ | 136 | /* Type to represent search path. */ |
138 | struct path_elem | 137 | struct path_elem |
139 | diff --git a/sysdeps/generic/dl-cache.h b/sysdeps/generic/dl-cache.h | 138 | diff --git a/sysdeps/generic/dl-cache.h b/sysdeps/generic/dl-cache.h |
140 | index 964d50a486..94bf68ca9d 100644 | 139 | index 919e49ffc8..cd3f8ba94b 100644 |
141 | --- a/sysdeps/generic/dl-cache.h | 140 | --- a/sysdeps/generic/dl-cache.h |
142 | +++ b/sysdeps/generic/dl-cache.h | 141 | +++ b/sysdeps/generic/dl-cache.h |
143 | @@ -34,10 +34,6 @@ | 142 | @@ -34,10 +34,6 @@ |
diff --git a/meta/recipes-core/glibc/glibc/0006-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch b/meta/recipes-core/glibc/glibc/0006-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch index 172ade8d97..56eaaed4b7 100644 --- a/meta/recipes-core/glibc/glibc/0006-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch +++ b/meta/recipes-core/glibc/glibc/0006-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 19e3e45eb1838ee80af13c3d27fcff446773211e Mon Sep 17 00:00:00 2001 | 1 | From 3a94365c730d174a3c30c6d9282e6ca12d9ad091 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Thu, 31 Dec 2015 14:35:35 -0800 | 3 | Date: Thu, 31 Dec 2015 14:35:35 -0800 |
4 | Subject: [PATCH] nativesdk-glibc: Allow 64 bit atomics for x86 | 4 | Subject: [PATCH] nativesdk-glibc: Allow 64 bit atomics for x86 |
@@ -13,14 +13,14 @@ Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> | |||
13 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | 13 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> |
14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
15 | --- | 15 | --- |
16 | sysdeps/x86/atomic-machine.h | 3 +-- | 16 | sysdeps/x86/atomic-machine.h | 7 +------ |
17 | 1 file changed, 1 insertion(+), 2 deletions(-) | 17 | 1 file changed, 1 insertion(+), 6 deletions(-) |
18 | 18 | ||
19 | diff --git a/sysdeps/x86/atomic-machine.h b/sysdeps/x86/atomic-machine.h | 19 | diff --git a/sysdeps/x86/atomic-machine.h b/sysdeps/x86/atomic-machine.h |
20 | index 695222e4fa..9d39bfdbd5 100644 | 20 | index cfd395087b..28a937c468 100644 |
21 | --- a/sysdeps/x86/atomic-machine.h | 21 | --- a/sysdeps/x86/atomic-machine.h |
22 | +++ b/sysdeps/x86/atomic-machine.h | 22 | +++ b/sysdeps/x86/atomic-machine.h |
23 | @@ -52,15 +52,14 @@ typedef uintmax_t uatomic_max_t; | 23 | @@ -26,19 +26,14 @@ |
24 | #define LOCK_PREFIX "lock;" | 24 | #define LOCK_PREFIX "lock;" |
25 | 25 | ||
26 | #define USE_ATOMIC_COMPILER_BUILTINS 1 | 26 | #define USE_ATOMIC_COMPILER_BUILTINS 1 |
@@ -33,6 +33,10 @@ index 695222e4fa..9d39bfdbd5 100644 | |||
33 | # define BR_CONSTRAINT "q" | 33 | # define BR_CONSTRAINT "q" |
34 | # define IBR_CONSTRAINT "iq" | 34 | # define IBR_CONSTRAINT "iq" |
35 | #else | 35 | #else |
36 | -/* Since the Pentium, i386 CPUs have supported 64-bit atomics, but the | ||
37 | - i386 psABI supplement provides only 4-byte alignment for uint64_t | ||
38 | - inside structs, so it is currently not possible to use 64-bit | ||
39 | - atomics on this platform. */ | ||
36 | -# define __HAVE_64B_ATOMICS 0 | 40 | -# define __HAVE_64B_ATOMICS 0 |
37 | # define SP_REG "esp" | 41 | # define SP_REG "esp" |
38 | # define SEG_REG "gs" | 42 | # define SEG_REG "gs" |
diff --git a/meta/recipes-core/glibc/glibc/0007-nativesdk-glibc-Make-relocatable-install-for-locales.patch b/meta/recipes-core/glibc/glibc/0007-nativesdk-glibc-Make-relocatable-install-for-locales.patch index 14697567c2..54c085a714 100644 --- a/meta/recipes-core/glibc/glibc/0007-nativesdk-glibc-Make-relocatable-install-for-locales.patch +++ b/meta/recipes-core/glibc/glibc/0007-nativesdk-glibc-Make-relocatable-install-for-locales.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 732d4f4954fe60718870048d0583a20a7a8a8540 Mon Sep 17 00:00:00 2001 | 1 | From 296bdde0683aa55cdea0fd0cab05ff8fbc462b17 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Fri, 3 Aug 2018 09:55:12 -0700 | 3 | Date: Fri, 3 Aug 2018 09:55:12 -0700 |
4 | Subject: [PATCH] nativesdk-glibc: Make relocatable install for locales | 4 | Subject: [PATCH] nativesdk-glibc: Make relocatable install for locales |
@@ -19,10 +19,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
19 | 4 files changed, 8 insertions(+), 7 deletions(-) | 19 | 4 files changed, 8 insertions(+), 7 deletions(-) |
20 | 20 | ||
21 | diff --git a/locale/findlocale.c b/locale/findlocale.c | 21 | diff --git a/locale/findlocale.c b/locale/findlocale.c |
22 | index ab09122b0c..f42cc75780 100644 | 22 | index 8d6e4e33e3..bfe74f241d 100644 |
23 | --- a/locale/findlocale.c | 23 | --- a/locale/findlocale.c |
24 | +++ b/locale/findlocale.c | 24 | +++ b/locale/findlocale.c |
25 | @@ -56,7 +56,7 @@ struct __locale_data *const _nl_C[] attribute_hidden = | 25 | @@ -55,7 +55,7 @@ struct __locale_data *const _nl_C[] attribute_hidden = |
26 | which are somehow addressed. */ | 26 | which are somehow addressed. */ |
27 | struct loaded_l10nfile *_nl_locale_file_list[__LC_LAST]; | 27 | struct loaded_l10nfile *_nl_locale_file_list[__LC_LAST]; |
28 | 28 | ||
@@ -31,7 +31,7 @@ index ab09122b0c..f42cc75780 100644 | |||
31 | 31 | ||
32 | /* Checks if the name is actually present, that is, not NULL and not | 32 | /* Checks if the name is actually present, that is, not NULL and not |
33 | empty. */ | 33 | empty. */ |
34 | @@ -166,7 +166,7 @@ _nl_find_locale (const char *locale_path, size_t locale_path_len, | 34 | @@ -165,7 +165,7 @@ _nl_find_locale (const char *locale_path, size_t locale_path_len, |
35 | 35 | ||
36 | /* Nothing in the archive. Set the default path to search below. */ | 36 | /* Nothing in the archive. Set the default path to search below. */ |
37 | locale_path = _nl_default_locale_path; | 37 | locale_path = _nl_default_locale_path; |
@@ -41,7 +41,7 @@ index ab09122b0c..f42cc75780 100644 | |||
41 | else | 41 | else |
42 | /* We really have to load some data. First see whether the name is | 42 | /* We really have to load some data. First see whether the name is |
43 | diff --git a/locale/loadarchive.c b/locale/loadarchive.c | 43 | diff --git a/locale/loadarchive.c b/locale/loadarchive.c |
44 | index 4177fc8972..40247b1e68 100644 | 44 | index 452e3eb6e3..c7467aec42 100644 |
45 | --- a/locale/loadarchive.c | 45 | --- a/locale/loadarchive.c |
46 | +++ b/locale/loadarchive.c | 46 | +++ b/locale/loadarchive.c |
47 | @@ -42,7 +42,7 @@ | 47 | @@ -42,7 +42,7 @@ |
@@ -54,10 +54,10 @@ index 4177fc8972..40247b1e68 100644 | |||
54 | /* Size of initial mapping window, optimal if large enough to | 54 | /* Size of initial mapping window, optimal if large enough to |
55 | cover the header plus the initial locale. */ | 55 | cover the header plus the initial locale. */ |
56 | diff --git a/locale/localeinfo.h b/locale/localeinfo.h | 56 | diff --git a/locale/localeinfo.h b/locale/localeinfo.h |
57 | index b3d4da0185..22f9dc1140 100644 | 57 | index ed698faef1..f7efc288a5 100644 |
58 | --- a/locale/localeinfo.h | 58 | --- a/locale/localeinfo.h |
59 | +++ b/locale/localeinfo.h | 59 | +++ b/locale/localeinfo.h |
60 | @@ -331,7 +331,7 @@ _nl_lookup_word (locale_t l, int category, int item) | 60 | @@ -347,7 +347,7 @@ _nl_lookup_word (locale_t l, int category, int item) |
61 | } | 61 | } |
62 | 62 | ||
63 | /* Default search path if no LOCPATH environment variable. */ | 63 | /* Default search path if no LOCPATH environment variable. */ |
@@ -67,10 +67,10 @@ index b3d4da0185..22f9dc1140 100644 | |||
67 | /* Load the locale data for CATEGORY from the file specified by *NAME. | 67 | /* Load the locale data for CATEGORY from the file specified by *NAME. |
68 | If *NAME is "", use environment variables as specified by POSIX, and | 68 | If *NAME is "", use environment variables as specified by POSIX, and |
69 | diff --git a/locale/programs/locale.c b/locale/programs/locale.c | 69 | diff --git a/locale/programs/locale.c b/locale/programs/locale.c |
70 | index 575b208e82..5ec630c3a4 100644 | 70 | index c7ee1874e8..8281e32236 100644 |
71 | --- a/locale/programs/locale.c | 71 | --- a/locale/programs/locale.c |
72 | +++ b/locale/programs/locale.c | 72 | +++ b/locale/programs/locale.c |
73 | @@ -632,6 +632,7 @@ nameentcmp (const void *a, const void *b) | 73 | @@ -631,6 +631,7 @@ nameentcmp (const void *a, const void *b) |
74 | ((const struct nameent *) b)->name); | 74 | ((const struct nameent *) b)->name); |
75 | } | 75 | } |
76 | 76 | ||
@@ -78,7 +78,7 @@ index 575b208e82..5ec630c3a4 100644 | |||
78 | 78 | ||
79 | static int | 79 | static int |
80 | write_archive_locales (void **all_datap, char *linebuf) | 80 | write_archive_locales (void **all_datap, char *linebuf) |
81 | @@ -645,7 +646,7 @@ write_archive_locales (void **all_datap, char *linebuf) | 81 | @@ -644,7 +645,7 @@ write_archive_locales (void **all_datap, char *linebuf) |
82 | int fd, ret = 0; | 82 | int fd, ret = 0; |
83 | uint32_t cnt; | 83 | uint32_t cnt; |
84 | 84 | ||
@@ -87,7 +87,7 @@ index 575b208e82..5ec630c3a4 100644 | |||
87 | if (fd < 0) | 87 | if (fd < 0) |
88 | return 0; | 88 | return 0; |
89 | 89 | ||
90 | @@ -700,8 +701,8 @@ write_archive_locales (void **all_datap, char *linebuf) | 90 | @@ -699,8 +700,8 @@ write_archive_locales (void **all_datap, char *linebuf) |
91 | if (cnt) | 91 | if (cnt) |
92 | putchar_unlocked ('\n'); | 92 | putchar_unlocked ('\n'); |
93 | 93 | ||
diff --git a/meta/recipes-core/glibc/glibc/0008-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch b/meta/recipes-core/glibc/glibc/0008-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch deleted file mode 100644 index 2162bf38c2..0000000000 --- a/meta/recipes-core/glibc/glibc/0008-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch +++ /dev/null | |||
@@ -1,1581 +0,0 @@ | |||
1 | From 3d58330390a7d4f4ed32f4a9c25628af3e0dd5c1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 18 Mar 2015 00:01:50 +0000 | ||
4 | Subject: [PATCH] fsl e500/e5500/e6500/603e fsqrt implementation | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | Signed-off-by: Edmar Wienskoski <edmar@freescale.com> | ||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | --- | ||
10 | sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | 134 ++++++++++++++++++ | ||
11 | sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | 101 +++++++++++++ | ||
12 | sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | 134 ++++++++++++++++++ | ||
13 | .../powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | 101 +++++++++++++ | ||
14 | sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | 134 ++++++++++++++++++ | ||
15 | sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | 101 +++++++++++++ | ||
16 | sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | 134 ++++++++++++++++++ | ||
17 | sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | 101 +++++++++++++ | ||
18 | sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | 134 ++++++++++++++++++ | ||
19 | sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | 101 +++++++++++++ | ||
20 | sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | 134 ++++++++++++++++++ | ||
21 | sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | 101 +++++++++++++ | ||
22 | .../linux/powerpc/powerpc32/603e/fpu/Implies | 1 + | ||
23 | .../powerpc/powerpc32/e300c3/fpu/Implies | 2 + | ||
24 | .../powerpc/powerpc32/e500mc/fpu/Implies | 1 + | ||
25 | .../linux/powerpc/powerpc32/e5500/fpu/Implies | 1 + | ||
26 | .../linux/powerpc/powerpc32/e6500/fpu/Implies | 1 + | ||
27 | .../linux/powerpc/powerpc64/e5500/fpu/Implies | 1 + | ||
28 | .../linux/powerpc/powerpc64/e6500/fpu/Implies | 1 + | ||
29 | 19 files changed, 1418 insertions(+) | ||
30 | create mode 100644 sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | ||
31 | create mode 100644 sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | ||
32 | create mode 100644 sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | ||
33 | create mode 100644 sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | ||
34 | create mode 100644 sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | ||
35 | create mode 100644 sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | ||
36 | create mode 100644 sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | ||
37 | create mode 100644 sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | ||
38 | create mode 100644 sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | ||
39 | create mode 100644 sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | ||
40 | create mode 100644 sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | ||
41 | create mode 100644 sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | ||
42 | create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies | ||
43 | create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies | ||
44 | create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies | ||
45 | create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies | ||
46 | create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies | ||
47 | create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies | ||
48 | create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies | ||
49 | |||
50 | diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | ||
51 | new file mode 100644 | ||
52 | index 0000000000..71e516d1c8 | ||
53 | --- /dev/null | ||
54 | +++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | ||
55 | @@ -0,0 +1,134 @@ | ||
56 | +/* Double-precision floating point square root. | ||
57 | + Copyright (C) 2010 Free Software Foundation, Inc. | ||
58 | + This file is part of the GNU C Library. | ||
59 | + | ||
60 | + The GNU C Library is free software; you can redistribute it and/or | ||
61 | + modify it under the terms of the GNU Lesser General Public | ||
62 | + License as published by the Free Software Foundation; either | ||
63 | + version 2.1 of the License, or (at your option) any later version. | ||
64 | + | ||
65 | + The GNU C Library is distributed in the hope that it will be useful, | ||
66 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
67 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
68 | + Lesser General Public License for more details. | ||
69 | + | ||
70 | + You should have received a copy of the GNU Lesser General Public | ||
71 | + License along with the GNU C Library; if not, write to the Free | ||
72 | + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
73 | + 02111-1307 USA. */ | ||
74 | + | ||
75 | +#include <math.h> | ||
76 | +#include <math_private.h> | ||
77 | +#include <fenv_libc.h> | ||
78 | +#include <inttypes.h> | ||
79 | + | ||
80 | +#include <sysdep.h> | ||
81 | +#include <ldsodefs.h> | ||
82 | + | ||
83 | +static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; | ||
84 | +static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; | ||
85 | +static const float two108 = 3.245185536584267269e+32; | ||
86 | +static const float twom54 = 5.551115123125782702e-17; | ||
87 | +static const float half = 0.5; | ||
88 | + | ||
89 | +/* The method is based on the descriptions in: | ||
90 | + | ||
91 | + _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; | ||
92 | + _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 | ||
93 | + | ||
94 | + We find the actual square root and half of its reciprocal | ||
95 | + simultaneously. */ | ||
96 | + | ||
97 | +#ifdef __STDC__ | ||
98 | +double | ||
99 | +__ieee754_sqrt (double b) | ||
100 | +#else | ||
101 | +double | ||
102 | +__ieee754_sqrt (b) | ||
103 | + double b; | ||
104 | +#endif | ||
105 | +{ | ||
106 | + if (__builtin_expect (b > 0, 1)) | ||
107 | + { | ||
108 | + double y, g, h, d, r; | ||
109 | + ieee_double_shape_type u; | ||
110 | + | ||
111 | + if (__builtin_expect (b != a_inf.value, 1)) | ||
112 | + { | ||
113 | + fenv_t fe; | ||
114 | + | ||
115 | + fe = fegetenv_register (); | ||
116 | + | ||
117 | + u.value = b; | ||
118 | + | ||
119 | + relax_fenv_state (); | ||
120 | + | ||
121 | + __asm__ ("frsqrte %[estimate], %[x]\n" | ||
122 | + : [estimate] "=f" (y) : [x] "f" (b)); | ||
123 | + | ||
124 | + /* Following Muller et al, page 168, equation 5.20. | ||
125 | + | ||
126 | + h goes to 1/(2*sqrt(b)) | ||
127 | + g goes to sqrt(b). | ||
128 | + | ||
129 | + We need three iterations to get within 1ulp. */ | ||
130 | + | ||
131 | + /* Indicate that these can be performed prior to the branch. GCC | ||
132 | + insists on sinking them below the branch, however; it seems like | ||
133 | + they'd be better before the branch so that we can cover any latency | ||
134 | + from storing the argument and loading its high word. Oh well. */ | ||
135 | + | ||
136 | + g = b * y; | ||
137 | + h = 0.5 * y; | ||
138 | + | ||
139 | + /* Handle small numbers by scaling. */ | ||
140 | + if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) | ||
141 | + return __ieee754_sqrt (b * two108) * twom54; | ||
142 | + | ||
143 | +#define FMADD(a_, c_, b_) \ | ||
144 | + ({ double __r; \ | ||
145 | + __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \ | ||
146 | + : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ | ||
147 | + __r;}) | ||
148 | +#define FNMSUB(a_, c_, b_) \ | ||
149 | + ({ double __r; \ | ||
150 | + __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ | ||
151 | + : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ | ||
152 | + __r;}) | ||
153 | + | ||
154 | + r = FNMSUB (g, h, half); | ||
155 | + g = FMADD (g, r, g); | ||
156 | + h = FMADD (h, r, h); | ||
157 | + | ||
158 | + r = FNMSUB (g, h, half); | ||
159 | + g = FMADD (g, r, g); | ||
160 | + h = FMADD (h, r, h); | ||
161 | + | ||
162 | + r = FNMSUB (g, h, half); | ||
163 | + g = FMADD (g, r, g); | ||
164 | + h = FMADD (h, r, h); | ||
165 | + | ||
166 | + /* g is now +/- 1ulp, or exactly equal to, the square root of b. */ | ||
167 | + | ||
168 | + /* Final refinement. */ | ||
169 | + d = FNMSUB (g, g, b); | ||
170 | + | ||
171 | + fesetenv_register (fe); | ||
172 | + return FMADD (d, h, g); | ||
173 | + } | ||
174 | + } | ||
175 | + else if (b < 0) | ||
176 | + { | ||
177 | + /* For some reason, some PowerPC32 processors don't implement | ||
178 | + FE_INVALID_SQRT. */ | ||
179 | +#ifdef FE_INVALID_SQRT | ||
180 | + feraiseexcept (FE_INVALID_SQRT); | ||
181 | + | ||
182 | + fenv_union_t u = { .fenv = fegetenv_register () }; | ||
183 | + if ((u.l & FE_INVALID) == 0) | ||
184 | +#endif | ||
185 | + feraiseexcept (FE_INVALID); | ||
186 | + b = a_nan.value; | ||
187 | + } | ||
188 | + return f_wash (b); | ||
189 | +} | ||
190 | diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | ||
191 | new file mode 100644 | ||
192 | index 0000000000..26fa067abf | ||
193 | --- /dev/null | ||
194 | +++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | ||
195 | @@ -0,0 +1,101 @@ | ||
196 | +/* Single-precision floating point square root. | ||
197 | + Copyright (C) 2010 Free Software Foundation, Inc. | ||
198 | + This file is part of the GNU C Library. | ||
199 | + | ||
200 | + The GNU C Library is free software; you can redistribute it and/or | ||
201 | + modify it under the terms of the GNU Lesser General Public | ||
202 | + License as published by the Free Software Foundation; either | ||
203 | + version 2.1 of the License, or (at your option) any later version. | ||
204 | + | ||
205 | + The GNU C Library is distributed in the hope that it will be useful, | ||
206 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
207 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
208 | + Lesser General Public License for more details. | ||
209 | + | ||
210 | + You should have received a copy of the GNU Lesser General Public | ||
211 | + License along with the GNU C Library; if not, write to the Free | ||
212 | + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
213 | + 02111-1307 USA. */ | ||
214 | + | ||
215 | +#include <math.h> | ||
216 | +#include <math_private.h> | ||
217 | +#include <fenv_libc.h> | ||
218 | +#include <inttypes.h> | ||
219 | + | ||
220 | +#include <sysdep.h> | ||
221 | +#include <ldsodefs.h> | ||
222 | + | ||
223 | +static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; | ||
224 | +static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; | ||
225 | +static const float threehalf = 1.5; | ||
226 | + | ||
227 | +/* The method is based on the descriptions in: | ||
228 | + | ||
229 | + _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; | ||
230 | + _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 | ||
231 | + | ||
232 | + We find the reciprocal square root and use that to compute the actual | ||
233 | + square root. */ | ||
234 | + | ||
235 | +#ifdef __STDC__ | ||
236 | +float | ||
237 | +__ieee754_sqrtf (float b) | ||
238 | +#else | ||
239 | +float | ||
240 | +__ieee754_sqrtf (b) | ||
241 | + float b; | ||
242 | +#endif | ||
243 | +{ | ||
244 | + if (__builtin_expect (b > 0, 1)) | ||
245 | + { | ||
246 | +#define FMSUB(a_, c_, b_) \ | ||
247 | + ({ double __r; \ | ||
248 | + __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \ | ||
249 | + : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ | ||
250 | + __r;}) | ||
251 | +#define FNMSUB(a_, c_, b_) \ | ||
252 | + ({ double __r; \ | ||
253 | + __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ | ||
254 | + : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ | ||
255 | + __r;}) | ||
256 | + | ||
257 | + if (__builtin_expect (b != a_inf.value, 1)) | ||
258 | + { | ||
259 | + double y, x; | ||
260 | + fenv_t fe; | ||
261 | + | ||
262 | + fe = fegetenv_register (); | ||
263 | + | ||
264 | + relax_fenv_state (); | ||
265 | + | ||
266 | + /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */ | ||
267 | + y = FMSUB (threehalf, b, b); | ||
268 | + | ||
269 | + /* Initial estimate. */ | ||
270 | + __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b)); | ||
271 | + | ||
272 | + /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */ | ||
273 | + x = x * FNMSUB (y, x * x, threehalf); | ||
274 | + x = x * FNMSUB (y, x * x, threehalf); | ||
275 | + x = x * FNMSUB (y, x * x, threehalf); | ||
276 | + | ||
277 | + /* All done. */ | ||
278 | + fesetenv_register (fe); | ||
279 | + return x * b; | ||
280 | + } | ||
281 | + } | ||
282 | + else if (b < 0) | ||
283 | + { | ||
284 | + /* For some reason, some PowerPC32 processors don't implement | ||
285 | + FE_INVALID_SQRT. */ | ||
286 | +#ifdef FE_INVALID_SQRT | ||
287 | + feraiseexcept (FE_INVALID_SQRT); | ||
288 | + | ||
289 | + fenv_union_t u = { .fenv = fegetenv_register () }; | ||
290 | + if ((u.l & FE_INVALID) == 0) | ||
291 | +#endif | ||
292 | + feraiseexcept (FE_INVALID); | ||
293 | + b = a_nan.value; | ||
294 | + } | ||
295 | + return f_washf (b); | ||
296 | +} | ||
297 | diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | ||
298 | new file mode 100644 | ||
299 | index 0000000000..71e516d1c8 | ||
300 | --- /dev/null | ||
301 | +++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | ||
302 | @@ -0,0 +1,134 @@ | ||
303 | +/* Double-precision floating point square root. | ||
304 | + Copyright (C) 2010 Free Software Foundation, Inc. | ||
305 | + This file is part of the GNU C Library. | ||
306 | + | ||
307 | + The GNU C Library is free software; you can redistribute it and/or | ||
308 | + modify it under the terms of the GNU Lesser General Public | ||
309 | + License as published by the Free Software Foundation; either | ||
310 | + version 2.1 of the License, or (at your option) any later version. | ||
311 | + | ||
312 | + The GNU C Library is distributed in the hope that it will be useful, | ||
313 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
314 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
315 | + Lesser General Public License for more details. | ||
316 | + | ||
317 | + You should have received a copy of the GNU Lesser General Public | ||
318 | + License along with the GNU C Library; if not, write to the Free | ||
319 | + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
320 | + 02111-1307 USA. */ | ||
321 | + | ||
322 | +#include <math.h> | ||
323 | +#include <math_private.h> | ||
324 | +#include <fenv_libc.h> | ||
325 | +#include <inttypes.h> | ||
326 | + | ||
327 | +#include <sysdep.h> | ||
328 | +#include <ldsodefs.h> | ||
329 | + | ||
330 | +static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; | ||
331 | +static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; | ||
332 | +static const float two108 = 3.245185536584267269e+32; | ||
333 | +static const float twom54 = 5.551115123125782702e-17; | ||
334 | +static const float half = 0.5; | ||
335 | + | ||
336 | +/* The method is based on the descriptions in: | ||
337 | + | ||
338 | + _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; | ||
339 | + _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 | ||
340 | + | ||
341 | + We find the actual square root and half of its reciprocal | ||
342 | + simultaneously. */ | ||
343 | + | ||
344 | +#ifdef __STDC__ | ||
345 | +double | ||
346 | +__ieee754_sqrt (double b) | ||
347 | +#else | ||
348 | +double | ||
349 | +__ieee754_sqrt (b) | ||
350 | + double b; | ||
351 | +#endif | ||
352 | +{ | ||
353 | + if (__builtin_expect (b > 0, 1)) | ||
354 | + { | ||
355 | + double y, g, h, d, r; | ||
356 | + ieee_double_shape_type u; | ||
357 | + | ||
358 | + if (__builtin_expect (b != a_inf.value, 1)) | ||
359 | + { | ||
360 | + fenv_t fe; | ||
361 | + | ||
362 | + fe = fegetenv_register (); | ||
363 | + | ||
364 | + u.value = b; | ||
365 | + | ||
366 | + relax_fenv_state (); | ||
367 | + | ||
368 | + __asm__ ("frsqrte %[estimate], %[x]\n" | ||
369 | + : [estimate] "=f" (y) : [x] "f" (b)); | ||
370 | + | ||
371 | + /* Following Muller et al, page 168, equation 5.20. | ||
372 | + | ||
373 | + h goes to 1/(2*sqrt(b)) | ||
374 | + g goes to sqrt(b). | ||
375 | + | ||
376 | + We need three iterations to get within 1ulp. */ | ||
377 | + | ||
378 | + /* Indicate that these can be performed prior to the branch. GCC | ||
379 | + insists on sinking them below the branch, however; it seems like | ||
380 | + they'd be better before the branch so that we can cover any latency | ||
381 | + from storing the argument and loading its high word. Oh well. */ | ||
382 | + | ||
383 | + g = b * y; | ||
384 | + h = 0.5 * y; | ||
385 | + | ||
386 | + /* Handle small numbers by scaling. */ | ||
387 | + if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) | ||
388 | + return __ieee754_sqrt (b * two108) * twom54; | ||
389 | + | ||
390 | +#define FMADD(a_, c_, b_) \ | ||
391 | + ({ double __r; \ | ||
392 | + __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \ | ||
393 | + : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ | ||
394 | + __r;}) | ||
395 | +#define FNMSUB(a_, c_, b_) \ | ||
396 | + ({ double __r; \ | ||
397 | + __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ | ||
398 | + : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ | ||
399 | + __r;}) | ||
400 | + | ||
401 | + r = FNMSUB (g, h, half); | ||
402 | + g = FMADD (g, r, g); | ||
403 | + h = FMADD (h, r, h); | ||
404 | + | ||
405 | + r = FNMSUB (g, h, half); | ||
406 | + g = FMADD (g, r, g); | ||
407 | + h = FMADD (h, r, h); | ||
408 | + | ||
409 | + r = FNMSUB (g, h, half); | ||
410 | + g = FMADD (g, r, g); | ||
411 | + h = FMADD (h, r, h); | ||
412 | + | ||
413 | + /* g is now +/- 1ulp, or exactly equal to, the square root of b. */ | ||
414 | + | ||
415 | + /* Final refinement. */ | ||
416 | + d = FNMSUB (g, g, b); | ||
417 | + | ||
418 | + fesetenv_register (fe); | ||
419 | + return FMADD (d, h, g); | ||
420 | + } | ||
421 | + } | ||
422 | + else if (b < 0) | ||
423 | + { | ||
424 | + /* For some reason, some PowerPC32 processors don't implement | ||
425 | + FE_INVALID_SQRT. */ | ||
426 | +#ifdef FE_INVALID_SQRT | ||
427 | + feraiseexcept (FE_INVALID_SQRT); | ||
428 | + | ||
429 | + fenv_union_t u = { .fenv = fegetenv_register () }; | ||
430 | + if ((u.l & FE_INVALID) == 0) | ||
431 | +#endif | ||
432 | + feraiseexcept (FE_INVALID); | ||
433 | + b = a_nan.value; | ||
434 | + } | ||
435 | + return f_wash (b); | ||
436 | +} | ||
437 | diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | ||
438 | new file mode 100644 | ||
439 | index 0000000000..26fa067abf | ||
440 | --- /dev/null | ||
441 | +++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | ||
442 | @@ -0,0 +1,101 @@ | ||
443 | +/* Single-precision floating point square root. | ||
444 | + Copyright (C) 2010 Free Software Foundation, Inc. | ||
445 | + This file is part of the GNU C Library. | ||
446 | + | ||
447 | + The GNU C Library is free software; you can redistribute it and/or | ||
448 | + modify it under the terms of the GNU Lesser General Public | ||
449 | + License as published by the Free Software Foundation; either | ||
450 | + version 2.1 of the License, or (at your option) any later version. | ||
451 | + | ||
452 | + The GNU C Library is distributed in the hope that it will be useful, | ||
453 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
454 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
455 | + Lesser General Public License for more details. | ||
456 | + | ||
457 | + You should have received a copy of the GNU Lesser General Public | ||
458 | + License along with the GNU C Library; if not, write to the Free | ||
459 | + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
460 | + 02111-1307 USA. */ | ||
461 | + | ||
462 | +#include <math.h> | ||
463 | +#include <math_private.h> | ||
464 | +#include <fenv_libc.h> | ||
465 | +#include <inttypes.h> | ||
466 | + | ||
467 | +#include <sysdep.h> | ||
468 | +#include <ldsodefs.h> | ||
469 | + | ||
470 | +static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; | ||
471 | +static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; | ||
472 | +static const float threehalf = 1.5; | ||
473 | + | ||
474 | +/* The method is based on the descriptions in: | ||
475 | + | ||
476 | + _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; | ||
477 | + _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 | ||
478 | + | ||
479 | + We find the reciprocal square root and use that to compute the actual | ||
480 | + square root. */ | ||
481 | + | ||
482 | +#ifdef __STDC__ | ||
483 | +float | ||
484 | +__ieee754_sqrtf (float b) | ||
485 | +#else | ||
486 | +float | ||
487 | +__ieee754_sqrtf (b) | ||
488 | + float b; | ||
489 | +#endif | ||
490 | +{ | ||
491 | + if (__builtin_expect (b > 0, 1)) | ||
492 | + { | ||
493 | +#define FMSUB(a_, c_, b_) \ | ||
494 | + ({ double __r; \ | ||
495 | + __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \ | ||
496 | + : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ | ||
497 | + __r;}) | ||
498 | +#define FNMSUB(a_, c_, b_) \ | ||
499 | + ({ double __r; \ | ||
500 | + __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ | ||
501 | + : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ | ||
502 | + __r;}) | ||
503 | + | ||
504 | + if (__builtin_expect (b != a_inf.value, 1)) | ||
505 | + { | ||
506 | + double y, x; | ||
507 | + fenv_t fe; | ||
508 | + | ||
509 | + fe = fegetenv_register (); | ||
510 | + | ||
511 | + relax_fenv_state (); | ||
512 | + | ||
513 | + /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */ | ||
514 | + y = FMSUB (threehalf, b, b); | ||
515 | + | ||
516 | + /* Initial estimate. */ | ||
517 | + __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b)); | ||
518 | + | ||
519 | + /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */ | ||
520 | + x = x * FNMSUB (y, x * x, threehalf); | ||
521 | + x = x * FNMSUB (y, x * x, threehalf); | ||
522 | + x = x * FNMSUB (y, x * x, threehalf); | ||
523 | + | ||
524 | + /* All done. */ | ||
525 | + fesetenv_register (fe); | ||
526 | + return x * b; | ||
527 | + } | ||
528 | + } | ||
529 | + else if (b < 0) | ||
530 | + { | ||
531 | + /* For some reason, some PowerPC32 processors don't implement | ||
532 | + FE_INVALID_SQRT. */ | ||
533 | +#ifdef FE_INVALID_SQRT | ||
534 | + feraiseexcept (FE_INVALID_SQRT); | ||
535 | + | ||
536 | + fenv_union_t u = { .fenv = fegetenv_register () }; | ||
537 | + if ((u.l & FE_INVALID) == 0) | ||
538 | +#endif | ||
539 | + feraiseexcept (FE_INVALID); | ||
540 | + b = a_nan.value; | ||
541 | + } | ||
542 | + return f_washf (b); | ||
543 | +} | ||
544 | diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | ||
545 | new file mode 100644 | ||
546 | index 0000000000..71e516d1c8 | ||
547 | --- /dev/null | ||
548 | +++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | ||
549 | @@ -0,0 +1,134 @@ | ||
550 | +/* Double-precision floating point square root. | ||
551 | + Copyright (C) 2010 Free Software Foundation, Inc. | ||
552 | + This file is part of the GNU C Library. | ||
553 | + | ||
554 | + The GNU C Library is free software; you can redistribute it and/or | ||
555 | + modify it under the terms of the GNU Lesser General Public | ||
556 | + License as published by the Free Software Foundation; either | ||
557 | + version 2.1 of the License, or (at your option) any later version. | ||
558 | + | ||
559 | + The GNU C Library is distributed in the hope that it will be useful, | ||
560 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
561 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
562 | + Lesser General Public License for more details. | ||
563 | + | ||
564 | + You should have received a copy of the GNU Lesser General Public | ||
565 | + License along with the GNU C Library; if not, write to the Free | ||
566 | + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
567 | + 02111-1307 USA. */ | ||
568 | + | ||
569 | +#include <math.h> | ||
570 | +#include <math_private.h> | ||
571 | +#include <fenv_libc.h> | ||
572 | +#include <inttypes.h> | ||
573 | + | ||
574 | +#include <sysdep.h> | ||
575 | +#include <ldsodefs.h> | ||
576 | + | ||
577 | +static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; | ||
578 | +static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; | ||
579 | +static const float two108 = 3.245185536584267269e+32; | ||
580 | +static const float twom54 = 5.551115123125782702e-17; | ||
581 | +static const float half = 0.5; | ||
582 | + | ||
583 | +/* The method is based on the descriptions in: | ||
584 | + | ||
585 | + _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; | ||
586 | + _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 | ||
587 | + | ||
588 | + We find the actual square root and half of its reciprocal | ||
589 | + simultaneously. */ | ||
590 | + | ||
591 | +#ifdef __STDC__ | ||
592 | +double | ||
593 | +__ieee754_sqrt (double b) | ||
594 | +#else | ||
595 | +double | ||
596 | +__ieee754_sqrt (b) | ||
597 | + double b; | ||
598 | +#endif | ||
599 | +{ | ||
600 | + if (__builtin_expect (b > 0, 1)) | ||
601 | + { | ||
602 | + double y, g, h, d, r; | ||
603 | + ieee_double_shape_type u; | ||
604 | + | ||
605 | + if (__builtin_expect (b != a_inf.value, 1)) | ||
606 | + { | ||
607 | + fenv_t fe; | ||
608 | + | ||
609 | + fe = fegetenv_register (); | ||
610 | + | ||
611 | + u.value = b; | ||
612 | + | ||
613 | + relax_fenv_state (); | ||
614 | + | ||
615 | + __asm__ ("frsqrte %[estimate], %[x]\n" | ||
616 | + : [estimate] "=f" (y) : [x] "f" (b)); | ||
617 | + | ||
618 | + /* Following Muller et al, page 168, equation 5.20. | ||
619 | + | ||
620 | + h goes to 1/(2*sqrt(b)) | ||
621 | + g goes to sqrt(b). | ||
622 | + | ||
623 | + We need three iterations to get within 1ulp. */ | ||
624 | + | ||
625 | + /* Indicate that these can be performed prior to the branch. GCC | ||
626 | + insists on sinking them below the branch, however; it seems like | ||
627 | + they'd be better before the branch so that we can cover any latency | ||
628 | + from storing the argument and loading its high word. Oh well. */ | ||
629 | + | ||
630 | + g = b * y; | ||
631 | + h = 0.5 * y; | ||
632 | + | ||
633 | + /* Handle small numbers by scaling. */ | ||
634 | + if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) | ||
635 | + return __ieee754_sqrt (b * two108) * twom54; | ||
636 | + | ||
637 | +#define FMADD(a_, c_, b_) \ | ||
638 | + ({ double __r; \ | ||
639 | + __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \ | ||
640 | + : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ | ||
641 | + __r;}) | ||
642 | +#define FNMSUB(a_, c_, b_) \ | ||
643 | + ({ double __r; \ | ||
644 | + __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ | ||
645 | + : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ | ||
646 | + __r;}) | ||
647 | + | ||
648 | + r = FNMSUB (g, h, half); | ||
649 | + g = FMADD (g, r, g); | ||
650 | + h = FMADD (h, r, h); | ||
651 | + | ||
652 | + r = FNMSUB (g, h, half); | ||
653 | + g = FMADD (g, r, g); | ||
654 | + h = FMADD (h, r, h); | ||
655 | + | ||
656 | + r = FNMSUB (g, h, half); | ||
657 | + g = FMADD (g, r, g); | ||
658 | + h = FMADD (h, r, h); | ||
659 | + | ||
660 | + /* g is now +/- 1ulp, or exactly equal to, the square root of b. */ | ||
661 | + | ||
662 | + /* Final refinement. */ | ||
663 | + d = FNMSUB (g, g, b); | ||
664 | + | ||
665 | + fesetenv_register (fe); | ||
666 | + return FMADD (d, h, g); | ||
667 | + } | ||
668 | + } | ||
669 | + else if (b < 0) | ||
670 | + { | ||
671 | + /* For some reason, some PowerPC32 processors don't implement | ||
672 | + FE_INVALID_SQRT. */ | ||
673 | +#ifdef FE_INVALID_SQRT | ||
674 | + feraiseexcept (FE_INVALID_SQRT); | ||
675 | + | ||
676 | + fenv_union_t u = { .fenv = fegetenv_register () }; | ||
677 | + if ((u.l & FE_INVALID) == 0) | ||
678 | +#endif | ||
679 | + feraiseexcept (FE_INVALID); | ||
680 | + b = a_nan.value; | ||
681 | + } | ||
682 | + return f_wash (b); | ||
683 | +} | ||
684 | diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | ||
685 | new file mode 100644 | ||
686 | index 0000000000..26fa067abf | ||
687 | --- /dev/null | ||
688 | +++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | ||
689 | @@ -0,0 +1,101 @@ | ||
690 | +/* Single-precision floating point square root. | ||
691 | + Copyright (C) 2010 Free Software Foundation, Inc. | ||
692 | + This file is part of the GNU C Library. | ||
693 | + | ||
694 | + The GNU C Library is free software; you can redistribute it and/or | ||
695 | + modify it under the terms of the GNU Lesser General Public | ||
696 | + License as published by the Free Software Foundation; either | ||
697 | + version 2.1 of the License, or (at your option) any later version. | ||
698 | + | ||
699 | + The GNU C Library is distributed in the hope that it will be useful, | ||
700 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
701 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
702 | + Lesser General Public License for more details. | ||
703 | + | ||
704 | + You should have received a copy of the GNU Lesser General Public | ||
705 | + License along with the GNU C Library; if not, write to the Free | ||
706 | + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
707 | + 02111-1307 USA. */ | ||
708 | + | ||
709 | +#include <math.h> | ||
710 | +#include <math_private.h> | ||
711 | +#include <fenv_libc.h> | ||
712 | +#include <inttypes.h> | ||
713 | + | ||
714 | +#include <sysdep.h> | ||
715 | +#include <ldsodefs.h> | ||
716 | + | ||
717 | +static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; | ||
718 | +static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; | ||
719 | +static const float threehalf = 1.5; | ||
720 | + | ||
721 | +/* The method is based on the descriptions in: | ||
722 | + | ||
723 | + _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; | ||
724 | + _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 | ||
725 | + | ||
726 | + We find the reciprocal square root and use that to compute the actual | ||
727 | + square root. */ | ||
728 | + | ||
729 | +#ifdef __STDC__ | ||
730 | +float | ||
731 | +__ieee754_sqrtf (float b) | ||
732 | +#else | ||
733 | +float | ||
734 | +__ieee754_sqrtf (b) | ||
735 | + float b; | ||
736 | +#endif | ||
737 | +{ | ||
738 | + if (__builtin_expect (b > 0, 1)) | ||
739 | + { | ||
740 | +#define FMSUB(a_, c_, b_) \ | ||
741 | + ({ double __r; \ | ||
742 | + __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \ | ||
743 | + : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ | ||
744 | + __r;}) | ||
745 | +#define FNMSUB(a_, c_, b_) \ | ||
746 | + ({ double __r; \ | ||
747 | + __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ | ||
748 | + : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ | ||
749 | + __r;}) | ||
750 | + | ||
751 | + if (__builtin_expect (b != a_inf.value, 1)) | ||
752 | + { | ||
753 | + double y, x; | ||
754 | + fenv_t fe; | ||
755 | + | ||
756 | + fe = fegetenv_register (); | ||
757 | + | ||
758 | + relax_fenv_state (); | ||
759 | + | ||
760 | + /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */ | ||
761 | + y = FMSUB (threehalf, b, b); | ||
762 | + | ||
763 | + /* Initial estimate. */ | ||
764 | + __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b)); | ||
765 | + | ||
766 | + /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */ | ||
767 | + x = x * FNMSUB (y, x * x, threehalf); | ||
768 | + x = x * FNMSUB (y, x * x, threehalf); | ||
769 | + x = x * FNMSUB (y, x * x, threehalf); | ||
770 | + | ||
771 | + /* All done. */ | ||
772 | + fesetenv_register (fe); | ||
773 | + return x * b; | ||
774 | + } | ||
775 | + } | ||
776 | + else if (b < 0) | ||
777 | + { | ||
778 | + /* For some reason, some PowerPC32 processors don't implement | ||
779 | + FE_INVALID_SQRT. */ | ||
780 | +#ifdef FE_INVALID_SQRT | ||
781 | + feraiseexcept (FE_INVALID_SQRT); | ||
782 | + | ||
783 | + fenv_union_t u = { .fenv = fegetenv_register () }; | ||
784 | + if ((u.l & FE_INVALID) == 0) | ||
785 | +#endif | ||
786 | + feraiseexcept (FE_INVALID); | ||
787 | + b = a_nan.value; | ||
788 | + } | ||
789 | + return f_washf (b); | ||
790 | +} | ||
791 | diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | ||
792 | new file mode 100644 | ||
793 | index 0000000000..71e516d1c8 | ||
794 | --- /dev/null | ||
795 | +++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | ||
796 | @@ -0,0 +1,134 @@ | ||
797 | +/* Double-precision floating point square root. | ||
798 | + Copyright (C) 2010 Free Software Foundation, Inc. | ||
799 | + This file is part of the GNU C Library. | ||
800 | + | ||
801 | + The GNU C Library is free software; you can redistribute it and/or | ||
802 | + modify it under the terms of the GNU Lesser General Public | ||
803 | + License as published by the Free Software Foundation; either | ||
804 | + version 2.1 of the License, or (at your option) any later version. | ||
805 | + | ||
806 | + The GNU C Library is distributed in the hope that it will be useful, | ||
807 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
808 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
809 | + Lesser General Public License for more details. | ||
810 | + | ||
811 | + You should have received a copy of the GNU Lesser General Public | ||
812 | + License along with the GNU C Library; if not, write to the Free | ||
813 | + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
814 | + 02111-1307 USA. */ | ||
815 | + | ||
816 | +#include <math.h> | ||
817 | +#include <math_private.h> | ||
818 | +#include <fenv_libc.h> | ||
819 | +#include <inttypes.h> | ||
820 | + | ||
821 | +#include <sysdep.h> | ||
822 | +#include <ldsodefs.h> | ||
823 | + | ||
824 | +static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; | ||
825 | +static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; | ||
826 | +static const float two108 = 3.245185536584267269e+32; | ||
827 | +static const float twom54 = 5.551115123125782702e-17; | ||
828 | +static const float half = 0.5; | ||
829 | + | ||
830 | +/* The method is based on the descriptions in: | ||
831 | + | ||
832 | + _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; | ||
833 | + _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 | ||
834 | + | ||
835 | + We find the actual square root and half of its reciprocal | ||
836 | + simultaneously. */ | ||
837 | + | ||
838 | +#ifdef __STDC__ | ||
839 | +double | ||
840 | +__ieee754_sqrt (double b) | ||
841 | +#else | ||
842 | +double | ||
843 | +__ieee754_sqrt (b) | ||
844 | + double b; | ||
845 | +#endif | ||
846 | +{ | ||
847 | + if (__builtin_expect (b > 0, 1)) | ||
848 | + { | ||
849 | + double y, g, h, d, r; | ||
850 | + ieee_double_shape_type u; | ||
851 | + | ||
852 | + if (__builtin_expect (b != a_inf.value, 1)) | ||
853 | + { | ||
854 | + fenv_t fe; | ||
855 | + | ||
856 | + fe = fegetenv_register (); | ||
857 | + | ||
858 | + u.value = b; | ||
859 | + | ||
860 | + relax_fenv_state (); | ||
861 | + | ||
862 | + __asm__ ("frsqrte %[estimate], %[x]\n" | ||
863 | + : [estimate] "=f" (y) : [x] "f" (b)); | ||
864 | + | ||
865 | + /* Following Muller et al, page 168, equation 5.20. | ||
866 | + | ||
867 | + h goes to 1/(2*sqrt(b)) | ||
868 | + g goes to sqrt(b). | ||
869 | + | ||
870 | + We need three iterations to get within 1ulp. */ | ||
871 | + | ||
872 | + /* Indicate that these can be performed prior to the branch. GCC | ||
873 | + insists on sinking them below the branch, however; it seems like | ||
874 | + they'd be better before the branch so that we can cover any latency | ||
875 | + from storing the argument and loading its high word. Oh well. */ | ||
876 | + | ||
877 | + g = b * y; | ||
878 | + h = 0.5 * y; | ||
879 | + | ||
880 | + /* Handle small numbers by scaling. */ | ||
881 | + if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) | ||
882 | + return __ieee754_sqrt (b * two108) * twom54; | ||
883 | + | ||
884 | +#define FMADD(a_, c_, b_) \ | ||
885 | + ({ double __r; \ | ||
886 | + __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \ | ||
887 | + : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ | ||
888 | + __r;}) | ||
889 | +#define FNMSUB(a_, c_, b_) \ | ||
890 | + ({ double __r; \ | ||
891 | + __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ | ||
892 | + : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ | ||
893 | + __r;}) | ||
894 | + | ||
895 | + r = FNMSUB (g, h, half); | ||
896 | + g = FMADD (g, r, g); | ||
897 | + h = FMADD (h, r, h); | ||
898 | + | ||
899 | + r = FNMSUB (g, h, half); | ||
900 | + g = FMADD (g, r, g); | ||
901 | + h = FMADD (h, r, h); | ||
902 | + | ||
903 | + r = FNMSUB (g, h, half); | ||
904 | + g = FMADD (g, r, g); | ||
905 | + h = FMADD (h, r, h); | ||
906 | + | ||
907 | + /* g is now +/- 1ulp, or exactly equal to, the square root of b. */ | ||
908 | + | ||
909 | + /* Final refinement. */ | ||
910 | + d = FNMSUB (g, g, b); | ||
911 | + | ||
912 | + fesetenv_register (fe); | ||
913 | + return FMADD (d, h, g); | ||
914 | + } | ||
915 | + } | ||
916 | + else if (b < 0) | ||
917 | + { | ||
918 | + /* For some reason, some PowerPC32 processors don't implement | ||
919 | + FE_INVALID_SQRT. */ | ||
920 | +#ifdef FE_INVALID_SQRT | ||
921 | + feraiseexcept (FE_INVALID_SQRT); | ||
922 | + | ||
923 | + fenv_union_t u = { .fenv = fegetenv_register () }; | ||
924 | + if ((u.l & FE_INVALID) == 0) | ||
925 | +#endif | ||
926 | + feraiseexcept (FE_INVALID); | ||
927 | + b = a_nan.value; | ||
928 | + } | ||
929 | + return f_wash (b); | ||
930 | +} | ||
931 | diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | ||
932 | new file mode 100644 | ||
933 | index 0000000000..26fa067abf | ||
934 | --- /dev/null | ||
935 | +++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | ||
936 | @@ -0,0 +1,101 @@ | ||
937 | +/* Single-precision floating point square root. | ||
938 | + Copyright (C) 2010 Free Software Foundation, Inc. | ||
939 | + This file is part of the GNU C Library. | ||
940 | + | ||
941 | + The GNU C Library is free software; you can redistribute it and/or | ||
942 | + modify it under the terms of the GNU Lesser General Public | ||
943 | + License as published by the Free Software Foundation; either | ||
944 | + version 2.1 of the License, or (at your option) any later version. | ||
945 | + | ||
946 | + The GNU C Library is distributed in the hope that it will be useful, | ||
947 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
948 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
949 | + Lesser General Public License for more details. | ||
950 | + | ||
951 | + You should have received a copy of the GNU Lesser General Public | ||
952 | + License along with the GNU C Library; if not, write to the Free | ||
953 | + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
954 | + 02111-1307 USA. */ | ||
955 | + | ||
956 | +#include <math.h> | ||
957 | +#include <math_private.h> | ||
958 | +#include <fenv_libc.h> | ||
959 | +#include <inttypes.h> | ||
960 | + | ||
961 | +#include <sysdep.h> | ||
962 | +#include <ldsodefs.h> | ||
963 | + | ||
964 | +static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; | ||
965 | +static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; | ||
966 | +static const float threehalf = 1.5; | ||
967 | + | ||
968 | +/* The method is based on the descriptions in: | ||
969 | + | ||
970 | + _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; | ||
971 | + _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 | ||
972 | + | ||
973 | + We find the reciprocal square root and use that to compute the actual | ||
974 | + square root. */ | ||
975 | + | ||
976 | +#ifdef __STDC__ | ||
977 | +float | ||
978 | +__ieee754_sqrtf (float b) | ||
979 | +#else | ||
980 | +float | ||
981 | +__ieee754_sqrtf (b) | ||
982 | + float b; | ||
983 | +#endif | ||
984 | +{ | ||
985 | + if (__builtin_expect (b > 0, 1)) | ||
986 | + { | ||
987 | +#define FMSUB(a_, c_, b_) \ | ||
988 | + ({ double __r; \ | ||
989 | + __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \ | ||
990 | + : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ | ||
991 | + __r;}) | ||
992 | +#define FNMSUB(a_, c_, b_) \ | ||
993 | + ({ double __r; \ | ||
994 | + __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ | ||
995 | + : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ | ||
996 | + __r;}) | ||
997 | + | ||
998 | + if (__builtin_expect (b != a_inf.value, 1)) | ||
999 | + { | ||
1000 | + double y, x; | ||
1001 | + fenv_t fe; | ||
1002 | + | ||
1003 | + fe = fegetenv_register (); | ||
1004 | + | ||
1005 | + relax_fenv_state (); | ||
1006 | + | ||
1007 | + /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */ | ||
1008 | + y = FMSUB (threehalf, b, b); | ||
1009 | + | ||
1010 | + /* Initial estimate. */ | ||
1011 | + __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b)); | ||
1012 | + | ||
1013 | + /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */ | ||
1014 | + x = x * FNMSUB (y, x * x, threehalf); | ||
1015 | + x = x * FNMSUB (y, x * x, threehalf); | ||
1016 | + x = x * FNMSUB (y, x * x, threehalf); | ||
1017 | + | ||
1018 | + /* All done. */ | ||
1019 | + fesetenv_register (fe); | ||
1020 | + return x * b; | ||
1021 | + } | ||
1022 | + } | ||
1023 | + else if (b < 0) | ||
1024 | + { | ||
1025 | + /* For some reason, some PowerPC32 processors don't implement | ||
1026 | + FE_INVALID_SQRT. */ | ||
1027 | +#ifdef FE_INVALID_SQRT | ||
1028 | + feraiseexcept (FE_INVALID_SQRT); | ||
1029 | + | ||
1030 | + fenv_union_t u = { .fenv = fegetenv_register () }; | ||
1031 | + if ((u.l & FE_INVALID) == 0) | ||
1032 | +#endif | ||
1033 | + feraiseexcept (FE_INVALID); | ||
1034 | + b = a_nan.value; | ||
1035 | + } | ||
1036 | + return f_washf (b); | ||
1037 | +} | ||
1038 | diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | ||
1039 | new file mode 100644 | ||
1040 | index 0000000000..71e516d1c8 | ||
1041 | --- /dev/null | ||
1042 | +++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | ||
1043 | @@ -0,0 +1,134 @@ | ||
1044 | +/* Double-precision floating point square root. | ||
1045 | + Copyright (C) 2010 Free Software Foundation, Inc. | ||
1046 | + This file is part of the GNU C Library. | ||
1047 | + | ||
1048 | + The GNU C Library is free software; you can redistribute it and/or | ||
1049 | + modify it under the terms of the GNU Lesser General Public | ||
1050 | + License as published by the Free Software Foundation; either | ||
1051 | + version 2.1 of the License, or (at your option) any later version. | ||
1052 | + | ||
1053 | + The GNU C Library is distributed in the hope that it will be useful, | ||
1054 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1055 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
1056 | + Lesser General Public License for more details. | ||
1057 | + | ||
1058 | + You should have received a copy of the GNU Lesser General Public | ||
1059 | + License along with the GNU C Library; if not, write to the Free | ||
1060 | + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
1061 | + 02111-1307 USA. */ | ||
1062 | + | ||
1063 | +#include <math.h> | ||
1064 | +#include <math_private.h> | ||
1065 | +#include <fenv_libc.h> | ||
1066 | +#include <inttypes.h> | ||
1067 | + | ||
1068 | +#include <sysdep.h> | ||
1069 | +#include <ldsodefs.h> | ||
1070 | + | ||
1071 | +static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; | ||
1072 | +static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; | ||
1073 | +static const float two108 = 3.245185536584267269e+32; | ||
1074 | +static const float twom54 = 5.551115123125782702e-17; | ||
1075 | +static const float half = 0.5; | ||
1076 | + | ||
1077 | +/* The method is based on the descriptions in: | ||
1078 | + | ||
1079 | + _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; | ||
1080 | + _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 | ||
1081 | + | ||
1082 | + We find the actual square root and half of its reciprocal | ||
1083 | + simultaneously. */ | ||
1084 | + | ||
1085 | +#ifdef __STDC__ | ||
1086 | +double | ||
1087 | +__ieee754_sqrt (double b) | ||
1088 | +#else | ||
1089 | +double | ||
1090 | +__ieee754_sqrt (b) | ||
1091 | + double b; | ||
1092 | +#endif | ||
1093 | +{ | ||
1094 | + if (__builtin_expect (b > 0, 1)) | ||
1095 | + { | ||
1096 | + double y, g, h, d, r; | ||
1097 | + ieee_double_shape_type u; | ||
1098 | + | ||
1099 | + if (__builtin_expect (b != a_inf.value, 1)) | ||
1100 | + { | ||
1101 | + fenv_t fe; | ||
1102 | + | ||
1103 | + fe = fegetenv_register (); | ||
1104 | + | ||
1105 | + u.value = b; | ||
1106 | + | ||
1107 | + relax_fenv_state (); | ||
1108 | + | ||
1109 | + __asm__ ("frsqrte %[estimate], %[x]\n" | ||
1110 | + : [estimate] "=f" (y) : [x] "f" (b)); | ||
1111 | + | ||
1112 | + /* Following Muller et al, page 168, equation 5.20. | ||
1113 | + | ||
1114 | + h goes to 1/(2*sqrt(b)) | ||
1115 | + g goes to sqrt(b). | ||
1116 | + | ||
1117 | + We need three iterations to get within 1ulp. */ | ||
1118 | + | ||
1119 | + /* Indicate that these can be performed prior to the branch. GCC | ||
1120 | + insists on sinking them below the branch, however; it seems like | ||
1121 | + they'd be better before the branch so that we can cover any latency | ||
1122 | + from storing the argument and loading its high word. Oh well. */ | ||
1123 | + | ||
1124 | + g = b * y; | ||
1125 | + h = 0.5 * y; | ||
1126 | + | ||
1127 | + /* Handle small numbers by scaling. */ | ||
1128 | + if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) | ||
1129 | + return __ieee754_sqrt (b * two108) * twom54; | ||
1130 | + | ||
1131 | +#define FMADD(a_, c_, b_) \ | ||
1132 | + ({ double __r; \ | ||
1133 | + __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \ | ||
1134 | + : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ | ||
1135 | + __r;}) | ||
1136 | +#define FNMSUB(a_, c_, b_) \ | ||
1137 | + ({ double __r; \ | ||
1138 | + __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ | ||
1139 | + : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ | ||
1140 | + __r;}) | ||
1141 | + | ||
1142 | + r = FNMSUB (g, h, half); | ||
1143 | + g = FMADD (g, r, g); | ||
1144 | + h = FMADD (h, r, h); | ||
1145 | + | ||
1146 | + r = FNMSUB (g, h, half); | ||
1147 | + g = FMADD (g, r, g); | ||
1148 | + h = FMADD (h, r, h); | ||
1149 | + | ||
1150 | + r = FNMSUB (g, h, half); | ||
1151 | + g = FMADD (g, r, g); | ||
1152 | + h = FMADD (h, r, h); | ||
1153 | + | ||
1154 | + /* g is now +/- 1ulp, or exactly equal to, the square root of b. */ | ||
1155 | + | ||
1156 | + /* Final refinement. */ | ||
1157 | + d = FNMSUB (g, g, b); | ||
1158 | + | ||
1159 | + fesetenv_register (fe); | ||
1160 | + return FMADD (d, h, g); | ||
1161 | + } | ||
1162 | + } | ||
1163 | + else if (b < 0) | ||
1164 | + { | ||
1165 | + /* For some reason, some PowerPC32 processors don't implement | ||
1166 | + FE_INVALID_SQRT. */ | ||
1167 | +#ifdef FE_INVALID_SQRT | ||
1168 | + feraiseexcept (FE_INVALID_SQRT); | ||
1169 | + | ||
1170 | + fenv_union_t u = { .fenv = fegetenv_register () }; | ||
1171 | + if ((u.l & FE_INVALID) == 0) | ||
1172 | +#endif | ||
1173 | + feraiseexcept (FE_INVALID); | ||
1174 | + b = a_nan.value; | ||
1175 | + } | ||
1176 | + return f_wash (b); | ||
1177 | +} | ||
1178 | diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | ||
1179 | new file mode 100644 | ||
1180 | index 0000000000..26fa067abf | ||
1181 | --- /dev/null | ||
1182 | +++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | ||
1183 | @@ -0,0 +1,101 @@ | ||
1184 | +/* Single-precision floating point square root. | ||
1185 | + Copyright (C) 2010 Free Software Foundation, Inc. | ||
1186 | + This file is part of the GNU C Library. | ||
1187 | + | ||
1188 | + The GNU C Library is free software; you can redistribute it and/or | ||
1189 | + modify it under the terms of the GNU Lesser General Public | ||
1190 | + License as published by the Free Software Foundation; either | ||
1191 | + version 2.1 of the License, or (at your option) any later version. | ||
1192 | + | ||
1193 | + The GNU C Library is distributed in the hope that it will be useful, | ||
1194 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1195 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
1196 | + Lesser General Public License for more details. | ||
1197 | + | ||
1198 | + You should have received a copy of the GNU Lesser General Public | ||
1199 | + License along with the GNU C Library; if not, write to the Free | ||
1200 | + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
1201 | + 02111-1307 USA. */ | ||
1202 | + | ||
1203 | +#include <math.h> | ||
1204 | +#include <math_private.h> | ||
1205 | +#include <fenv_libc.h> | ||
1206 | +#include <inttypes.h> | ||
1207 | + | ||
1208 | +#include <sysdep.h> | ||
1209 | +#include <ldsodefs.h> | ||
1210 | + | ||
1211 | +static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; | ||
1212 | +static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; | ||
1213 | +static const float threehalf = 1.5; | ||
1214 | + | ||
1215 | +/* The method is based on the descriptions in: | ||
1216 | + | ||
1217 | + _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; | ||
1218 | + _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 | ||
1219 | + | ||
1220 | + We find the reciprocal square root and use that to compute the actual | ||
1221 | + square root. */ | ||
1222 | + | ||
1223 | +#ifdef __STDC__ | ||
1224 | +float | ||
1225 | +__ieee754_sqrtf (float b) | ||
1226 | +#else | ||
1227 | +float | ||
1228 | +__ieee754_sqrtf (b) | ||
1229 | + float b; | ||
1230 | +#endif | ||
1231 | +{ | ||
1232 | + if (__builtin_expect (b > 0, 1)) | ||
1233 | + { | ||
1234 | +#define FMSUB(a_, c_, b_) \ | ||
1235 | + ({ double __r; \ | ||
1236 | + __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \ | ||
1237 | + : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ | ||
1238 | + __r;}) | ||
1239 | +#define FNMSUB(a_, c_, b_) \ | ||
1240 | + ({ double __r; \ | ||
1241 | + __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ | ||
1242 | + : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ | ||
1243 | + __r;}) | ||
1244 | + | ||
1245 | + if (__builtin_expect (b != a_inf.value, 1)) | ||
1246 | + { | ||
1247 | + double y, x; | ||
1248 | + fenv_t fe; | ||
1249 | + | ||
1250 | + fe = fegetenv_register (); | ||
1251 | + | ||
1252 | + relax_fenv_state (); | ||
1253 | + | ||
1254 | + /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */ | ||
1255 | + y = FMSUB (threehalf, b, b); | ||
1256 | + | ||
1257 | + /* Initial estimate. */ | ||
1258 | + __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b)); | ||
1259 | + | ||
1260 | + /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */ | ||
1261 | + x = x * FNMSUB (y, x * x, threehalf); | ||
1262 | + x = x * FNMSUB (y, x * x, threehalf); | ||
1263 | + x = x * FNMSUB (y, x * x, threehalf); | ||
1264 | + | ||
1265 | + /* All done. */ | ||
1266 | + fesetenv_register (fe); | ||
1267 | + return x * b; | ||
1268 | + } | ||
1269 | + } | ||
1270 | + else if (b < 0) | ||
1271 | + { | ||
1272 | + /* For some reason, some PowerPC32 processors don't implement | ||
1273 | + FE_INVALID_SQRT. */ | ||
1274 | +#ifdef FE_INVALID_SQRT | ||
1275 | + feraiseexcept (FE_INVALID_SQRT); | ||
1276 | + | ||
1277 | + fenv_union_t u = { .fenv = fegetenv_register () }; | ||
1278 | + if ((u.l & FE_INVALID) == 0) | ||
1279 | +#endif | ||
1280 | + feraiseexcept (FE_INVALID); | ||
1281 | + b = a_nan.value; | ||
1282 | + } | ||
1283 | + return f_washf (b); | ||
1284 | +} | ||
1285 | diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | ||
1286 | new file mode 100644 | ||
1287 | index 0000000000..71e516d1c8 | ||
1288 | --- /dev/null | ||
1289 | +++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | ||
1290 | @@ -0,0 +1,134 @@ | ||
1291 | +/* Double-precision floating point square root. | ||
1292 | + Copyright (C) 2010 Free Software Foundation, Inc. | ||
1293 | + This file is part of the GNU C Library. | ||
1294 | + | ||
1295 | + The GNU C Library is free software; you can redistribute it and/or | ||
1296 | + modify it under the terms of the GNU Lesser General Public | ||
1297 | + License as published by the Free Software Foundation; either | ||
1298 | + version 2.1 of the License, or (at your option) any later version. | ||
1299 | + | ||
1300 | + The GNU C Library is distributed in the hope that it will be useful, | ||
1301 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1302 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
1303 | + Lesser General Public License for more details. | ||
1304 | + | ||
1305 | + You should have received a copy of the GNU Lesser General Public | ||
1306 | + License along with the GNU C Library; if not, write to the Free | ||
1307 | + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
1308 | + 02111-1307 USA. */ | ||
1309 | + | ||
1310 | +#include <math.h> | ||
1311 | +#include <math_private.h> | ||
1312 | +#include <fenv_libc.h> | ||
1313 | +#include <inttypes.h> | ||
1314 | + | ||
1315 | +#include <sysdep.h> | ||
1316 | +#include <ldsodefs.h> | ||
1317 | + | ||
1318 | +static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; | ||
1319 | +static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; | ||
1320 | +static const float two108 = 3.245185536584267269e+32; | ||
1321 | +static const float twom54 = 5.551115123125782702e-17; | ||
1322 | +static const float half = 0.5; | ||
1323 | + | ||
1324 | +/* The method is based on the descriptions in: | ||
1325 | + | ||
1326 | + _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; | ||
1327 | + _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 | ||
1328 | + | ||
1329 | + We find the actual square root and half of its reciprocal | ||
1330 | + simultaneously. */ | ||
1331 | + | ||
1332 | +#ifdef __STDC__ | ||
1333 | +double | ||
1334 | +__ieee754_sqrt (double b) | ||
1335 | +#else | ||
1336 | +double | ||
1337 | +__ieee754_sqrt (b) | ||
1338 | + double b; | ||
1339 | +#endif | ||
1340 | +{ | ||
1341 | + if (__builtin_expect (b > 0, 1)) | ||
1342 | + { | ||
1343 | + double y, g, h, d, r; | ||
1344 | + ieee_double_shape_type u; | ||
1345 | + | ||
1346 | + if (__builtin_expect (b != a_inf.value, 1)) | ||
1347 | + { | ||
1348 | + fenv_t fe; | ||
1349 | + | ||
1350 | + fe = fegetenv_register (); | ||
1351 | + | ||
1352 | + u.value = b; | ||
1353 | + | ||
1354 | + relax_fenv_state (); | ||
1355 | + | ||
1356 | + __asm__ ("frsqrte %[estimate], %[x]\n" | ||
1357 | + : [estimate] "=f" (y) : [x] "f" (b)); | ||
1358 | + | ||
1359 | + /* Following Muller et al, page 168, equation 5.20. | ||
1360 | + | ||
1361 | + h goes to 1/(2*sqrt(b)) | ||
1362 | + g goes to sqrt(b). | ||
1363 | + | ||
1364 | + We need three iterations to get within 1ulp. */ | ||
1365 | + | ||
1366 | + /* Indicate that these can be performed prior to the branch. GCC | ||
1367 | + insists on sinking them below the branch, however; it seems like | ||
1368 | + they'd be better before the branch so that we can cover any latency | ||
1369 | + from storing the argument and loading its high word. Oh well. */ | ||
1370 | + | ||
1371 | + g = b * y; | ||
1372 | + h = 0.5 * y; | ||
1373 | + | ||
1374 | + /* Handle small numbers by scaling. */ | ||
1375 | + if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) | ||
1376 | + return __ieee754_sqrt (b * two108) * twom54; | ||
1377 | + | ||
1378 | +#define FMADD(a_, c_, b_) \ | ||
1379 | + ({ double __r; \ | ||
1380 | + __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \ | ||
1381 | + : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ | ||
1382 | + __r;}) | ||
1383 | +#define FNMSUB(a_, c_, b_) \ | ||
1384 | + ({ double __r; \ | ||
1385 | + __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ | ||
1386 | + : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ | ||
1387 | + __r;}) | ||
1388 | + | ||
1389 | + r = FNMSUB (g, h, half); | ||
1390 | + g = FMADD (g, r, g); | ||
1391 | + h = FMADD (h, r, h); | ||
1392 | + | ||
1393 | + r = FNMSUB (g, h, half); | ||
1394 | + g = FMADD (g, r, g); | ||
1395 | + h = FMADD (h, r, h); | ||
1396 | + | ||
1397 | + r = FNMSUB (g, h, half); | ||
1398 | + g = FMADD (g, r, g); | ||
1399 | + h = FMADD (h, r, h); | ||
1400 | + | ||
1401 | + /* g is now +/- 1ulp, or exactly equal to, the square root of b. */ | ||
1402 | + | ||
1403 | + /* Final refinement. */ | ||
1404 | + d = FNMSUB (g, g, b); | ||
1405 | + | ||
1406 | + fesetenv_register (fe); | ||
1407 | + return FMADD (d, h, g); | ||
1408 | + } | ||
1409 | + } | ||
1410 | + else if (b < 0) | ||
1411 | + { | ||
1412 | + /* For some reason, some PowerPC32 processors don't implement | ||
1413 | + FE_INVALID_SQRT. */ | ||
1414 | +#ifdef FE_INVALID_SQRT | ||
1415 | + feraiseexcept (FE_INVALID_SQRT); | ||
1416 | + | ||
1417 | + fenv_union_t u = { .fenv = fegetenv_register () }; | ||
1418 | + if ((u.l & FE_INVALID) == 0) | ||
1419 | +#endif | ||
1420 | + feraiseexcept (FE_INVALID); | ||
1421 | + b = a_nan.value; | ||
1422 | + } | ||
1423 | + return f_wash (b); | ||
1424 | +} | ||
1425 | diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | ||
1426 | new file mode 100644 | ||
1427 | index 0000000000..26fa067abf | ||
1428 | --- /dev/null | ||
1429 | +++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | ||
1430 | @@ -0,0 +1,101 @@ | ||
1431 | +/* Single-precision floating point square root. | ||
1432 | + Copyright (C) 2010 Free Software Foundation, Inc. | ||
1433 | + This file is part of the GNU C Library. | ||
1434 | + | ||
1435 | + The GNU C Library is free software; you can redistribute it and/or | ||
1436 | + modify it under the terms of the GNU Lesser General Public | ||
1437 | + License as published by the Free Software Foundation; either | ||
1438 | + version 2.1 of the License, or (at your option) any later version. | ||
1439 | + | ||
1440 | + The GNU C Library is distributed in the hope that it will be useful, | ||
1441 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1442 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
1443 | + Lesser General Public License for more details. | ||
1444 | + | ||
1445 | + You should have received a copy of the GNU Lesser General Public | ||
1446 | + License along with the GNU C Library; if not, write to the Free | ||
1447 | + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
1448 | + 02111-1307 USA. */ | ||
1449 | + | ||
1450 | +#include <math.h> | ||
1451 | +#include <math_private.h> | ||
1452 | +#include <fenv_libc.h> | ||
1453 | +#include <inttypes.h> | ||
1454 | + | ||
1455 | +#include <sysdep.h> | ||
1456 | +#include <ldsodefs.h> | ||
1457 | + | ||
1458 | +static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; | ||
1459 | +static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; | ||
1460 | +static const float threehalf = 1.5; | ||
1461 | + | ||
1462 | +/* The method is based on the descriptions in: | ||
1463 | + | ||
1464 | + _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; | ||
1465 | + _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 | ||
1466 | + | ||
1467 | + We find the reciprocal square root and use that to compute the actual | ||
1468 | + square root. */ | ||
1469 | + | ||
1470 | +#ifdef __STDC__ | ||
1471 | +float | ||
1472 | +__ieee754_sqrtf (float b) | ||
1473 | +#else | ||
1474 | +float | ||
1475 | +__ieee754_sqrtf (b) | ||
1476 | + float b; | ||
1477 | +#endif | ||
1478 | +{ | ||
1479 | + if (__builtin_expect (b > 0, 1)) | ||
1480 | + { | ||
1481 | +#define FMSUB(a_, c_, b_) \ | ||
1482 | + ({ double __r; \ | ||
1483 | + __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \ | ||
1484 | + : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ | ||
1485 | + __r;}) | ||
1486 | +#define FNMSUB(a_, c_, b_) \ | ||
1487 | + ({ double __r; \ | ||
1488 | + __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ | ||
1489 | + : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ | ||
1490 | + __r;}) | ||
1491 | + | ||
1492 | + if (__builtin_expect (b != a_inf.value, 1)) | ||
1493 | + { | ||
1494 | + double y, x; | ||
1495 | + fenv_t fe; | ||
1496 | + | ||
1497 | + fe = fegetenv_register (); | ||
1498 | + | ||
1499 | + relax_fenv_state (); | ||
1500 | + | ||
1501 | + /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */ | ||
1502 | + y = FMSUB (threehalf, b, b); | ||
1503 | + | ||
1504 | + /* Initial estimate. */ | ||
1505 | + __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b)); | ||
1506 | + | ||
1507 | + /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */ | ||
1508 | + x = x * FNMSUB (y, x * x, threehalf); | ||
1509 | + x = x * FNMSUB (y, x * x, threehalf); | ||
1510 | + x = x * FNMSUB (y, x * x, threehalf); | ||
1511 | + | ||
1512 | + /* All done. */ | ||
1513 | + fesetenv_register (fe); | ||
1514 | + return x * b; | ||
1515 | + } | ||
1516 | + } | ||
1517 | + else if (b < 0) | ||
1518 | + { | ||
1519 | + /* For some reason, some PowerPC32 processors don't implement | ||
1520 | + FE_INVALID_SQRT. */ | ||
1521 | +#ifdef FE_INVALID_SQRT | ||
1522 | + feraiseexcept (FE_INVALID_SQRT); | ||
1523 | + | ||
1524 | + fenv_union_t u = { .fenv = fegetenv_register () }; | ||
1525 | + if ((u.l & FE_INVALID) == 0) | ||
1526 | +#endif | ||
1527 | + feraiseexcept (FE_INVALID); | ||
1528 | + b = a_nan.value; | ||
1529 | + } | ||
1530 | + return f_washf (b); | ||
1531 | +} | ||
1532 | diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies | ||
1533 | new file mode 100644 | ||
1534 | index 0000000000..b103b4dea5 | ||
1535 | --- /dev/null | ||
1536 | +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies | ||
1537 | @@ -0,0 +1 @@ | ||
1538 | +powerpc/powerpc32/603e/fpu | ||
1539 | diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies | ||
1540 | new file mode 100644 | ||
1541 | index 0000000000..64db17fada | ||
1542 | --- /dev/null | ||
1543 | +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies | ||
1544 | @@ -0,0 +1,2 @@ | ||
1545 | +# e300c3 is a variant of 603e so use the same optimizations for sqrt | ||
1546 | +powerpc/powerpc32/603e/fpu | ||
1547 | diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies | ||
1548 | new file mode 100644 | ||
1549 | index 0000000000..7eac5fcf02 | ||
1550 | --- /dev/null | ||
1551 | +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies | ||
1552 | @@ -0,0 +1 @@ | ||
1553 | +powerpc/powerpc32/e500mc/fpu | ||
1554 | diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies | ||
1555 | new file mode 100644 | ||
1556 | index 0000000000..264b2a7700 | ||
1557 | --- /dev/null | ||
1558 | +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies | ||
1559 | @@ -0,0 +1 @@ | ||
1560 | +powerpc/powerpc32/e5500/fpu | ||
1561 | diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies | ||
1562 | new file mode 100644 | ||
1563 | index 0000000000..a25934467b | ||
1564 | --- /dev/null | ||
1565 | +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies | ||
1566 | @@ -0,0 +1 @@ | ||
1567 | +powerpc/powerpc32/e6500/fpu | ||
1568 | diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies | ||
1569 | new file mode 100644 | ||
1570 | index 0000000000..a7bc854be8 | ||
1571 | --- /dev/null | ||
1572 | +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies | ||
1573 | @@ -0,0 +1 @@ | ||
1574 | +powerpc/powerpc64/e5500/fpu | ||
1575 | diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies | ||
1576 | new file mode 100644 | ||
1577 | index 0000000000..04ff8cc181 | ||
1578 | --- /dev/null | ||
1579 | +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies | ||
1580 | @@ -0,0 +1 @@ | ||
1581 | +powerpc/powerpc64/e6500/fpu | ||
diff --git a/meta/recipes-core/glibc/glibc/0008-nativesdk-glibc-Fall-back-to-faccessat-on-faccess2-r.patch b/meta/recipes-core/glibc/glibc/0008-nativesdk-glibc-Fall-back-to-faccessat-on-faccess2-r.patch new file mode 100644 index 0000000000..096764009a --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0008-nativesdk-glibc-Fall-back-to-faccessat-on-faccess2-r.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From 70da806febac8b2eead6ddc32451bbc1787a1d7d Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 6 Mar 2021 14:48:56 -0800 | ||
4 | Subject: [PATCH] nativesdk-glibc: Fall back to faccessat on faccess2 returns | ||
5 | EPERM | ||
6 | |||
7 | Fedora-specific workaround for systemd-nspawn | ||
8 | |||
9 | Upstream-Status: Inappropriate [Distro Specific] | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | sysdeps/unix/sysv/linux/faccessat.c | 6 +++++- | ||
14 | 1 file changed, 5 insertions(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/sysdeps/unix/sysv/linux/faccessat.c b/sysdeps/unix/sysv/linux/faccessat.c | ||
17 | index 2fa57fd63d..4d0d5ff0c4 100644 | ||
18 | --- a/sysdeps/unix/sysv/linux/faccessat.c | ||
19 | +++ b/sysdeps/unix/sysv/linux/faccessat.c | ||
20 | @@ -30,7 +30,11 @@ __faccessat (int fd, const char *file, int mode, int flag) | ||
21 | #if __ASSUME_FACCESSAT2 | ||
22 | return ret; | ||
23 | #else | ||
24 | - if (ret == 0 || errno != ENOSYS) | ||
25 | + /* Fedora-specific workaround: | ||
26 | + As a workround for a broken systemd-nspawn that returns | ||
27 | + EPERM when a syscall is not allowed instead of ENOSYS | ||
28 | + we must check for EPERM here and fall back to faccessat. */ | ||
29 | + if (ret == 0 || !(errno == ENOSYS || errno == EPERM)) | ||
30 | return ret; | ||
31 | |||
32 | if (flag & ~(AT_SYMLINK_NOFOLLOW | AT_EACCESS)) | ||
diff --git a/meta/recipes-core/glibc/glibc/0009-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch b/meta/recipes-core/glibc/glibc/0009-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch deleted file mode 100644 index 0c8bf94a75..0000000000 --- a/meta/recipes-core/glibc/glibc/0009-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch +++ /dev/null | |||
@@ -1,205 +0,0 @@ | |||
1 | From 3b5fe5b1a7390cde0f07351415e3891f62d1f7e0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 18 Mar 2015 00:15:07 +0000 | ||
4 | Subject: [PATCH] ppc/sqrt: Fix undefined reference to `__sqrt_finite' | ||
5 | |||
6 | on ppc fixes the errors like below | ||
7 | | ./.libs/libpulsecore-1.1.so: undefined reference to `__sqrt_finite' | ||
8 | | collect2: ld returned 1 exit status | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | ChangeLog | ||
13 | |||
14 | 2012-01-06 Khem Raj <raj.khem@gmail.com> | ||
15 | |||
16 | * sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c: Add __*_finite alias. | ||
17 | Remove cruft. | ||
18 | * sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c: Ditto. | ||
19 | * sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c: Ditto. | ||
20 | * sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c: Ditto. | ||
21 | |||
22 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
23 | --- | ||
24 | sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | 7 +------ | ||
25 | sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | 7 +------ | ||
26 | sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | 1 + | ||
27 | sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | 1 + | ||
28 | sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | 1 + | ||
29 | sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | 1 + | ||
30 | sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | 1 + | ||
31 | sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | 1 + | ||
32 | sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | 7 +------ | ||
33 | sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | 7 +------ | ||
34 | sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | 1 + | ||
35 | sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | 1 + | ||
36 | 12 files changed, 12 insertions(+), 24 deletions(-) | ||
37 | |||
38 | diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | ||
39 | index 71e516d1c8..1795fd6c3e 100644 | ||
40 | --- a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | ||
41 | +++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | ||
42 | @@ -39,14 +39,8 @@ static const float half = 0.5; | ||
43 | We find the actual square root and half of its reciprocal | ||
44 | simultaneously. */ | ||
45 | |||
46 | -#ifdef __STDC__ | ||
47 | double | ||
48 | __ieee754_sqrt (double b) | ||
49 | -#else | ||
50 | -double | ||
51 | -__ieee754_sqrt (b) | ||
52 | - double b; | ||
53 | -#endif | ||
54 | { | ||
55 | if (__builtin_expect (b > 0, 1)) | ||
56 | { | ||
57 | @@ -132,3 +126,4 @@ __ieee754_sqrt (b) | ||
58 | } | ||
59 | return f_wash (b); | ||
60 | } | ||
61 | +strong_alias (__ieee754_sqrt, __sqrt_finite) | ||
62 | diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | ||
63 | index 26fa067abf..a917f313ab 100644 | ||
64 | --- a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | ||
65 | +++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | ||
66 | @@ -37,14 +37,8 @@ static const float threehalf = 1.5; | ||
67 | We find the reciprocal square root and use that to compute the actual | ||
68 | square root. */ | ||
69 | |||
70 | -#ifdef __STDC__ | ||
71 | float | ||
72 | __ieee754_sqrtf (float b) | ||
73 | -#else | ||
74 | -float | ||
75 | -__ieee754_sqrtf (b) | ||
76 | - float b; | ||
77 | -#endif | ||
78 | { | ||
79 | if (__builtin_expect (b > 0, 1)) | ||
80 | { | ||
81 | @@ -99,3 +93,4 @@ __ieee754_sqrtf (b) | ||
82 | } | ||
83 | return f_washf (b); | ||
84 | } | ||
85 | +strong_alias (__ieee754_sqrtf, __sqrtf_finite) | ||
86 | diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | ||
87 | index 71e516d1c8..fc4a74990e 100644 | ||
88 | --- a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | ||
89 | +++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | ||
90 | @@ -132,3 +132,4 @@ __ieee754_sqrt (b) | ||
91 | } | ||
92 | return f_wash (b); | ||
93 | } | ||
94 | +strong_alias (__ieee754_sqrt, __sqrt_finite) | ||
95 | diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | ||
96 | index 26fa067abf..9d175122a8 100644 | ||
97 | --- a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | ||
98 | +++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | ||
99 | @@ -99,3 +99,4 @@ __ieee754_sqrtf (b) | ||
100 | } | ||
101 | return f_washf (b); | ||
102 | } | ||
103 | +strong_alias (__ieee754_sqrtf, __sqrtf_finite) | ||
104 | diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | ||
105 | index 71e516d1c8..fc4a74990e 100644 | ||
106 | --- a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | ||
107 | +++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | ||
108 | @@ -132,3 +132,4 @@ __ieee754_sqrt (b) | ||
109 | } | ||
110 | return f_wash (b); | ||
111 | } | ||
112 | +strong_alias (__ieee754_sqrt, __sqrt_finite) | ||
113 | diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | ||
114 | index 26fa067abf..9d175122a8 100644 | ||
115 | --- a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | ||
116 | +++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | ||
117 | @@ -99,3 +99,4 @@ __ieee754_sqrtf (b) | ||
118 | } | ||
119 | return f_washf (b); | ||
120 | } | ||
121 | +strong_alias (__ieee754_sqrtf, __sqrtf_finite) | ||
122 | diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | ||
123 | index 71e516d1c8..fc4a74990e 100644 | ||
124 | --- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | ||
125 | +++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | ||
126 | @@ -132,3 +132,4 @@ __ieee754_sqrt (b) | ||
127 | } | ||
128 | return f_wash (b); | ||
129 | } | ||
130 | +strong_alias (__ieee754_sqrt, __sqrt_finite) | ||
131 | diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | ||
132 | index 26fa067abf..9d175122a8 100644 | ||
133 | --- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | ||
134 | +++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | ||
135 | @@ -99,3 +99,4 @@ __ieee754_sqrtf (b) | ||
136 | } | ||
137 | return f_washf (b); | ||
138 | } | ||
139 | +strong_alias (__ieee754_sqrtf, __sqrtf_finite) | ||
140 | diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | ||
141 | index 71e516d1c8..1795fd6c3e 100644 | ||
142 | --- a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | ||
143 | +++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | ||
144 | @@ -39,14 +39,8 @@ static const float half = 0.5; | ||
145 | We find the actual square root and half of its reciprocal | ||
146 | simultaneously. */ | ||
147 | |||
148 | -#ifdef __STDC__ | ||
149 | double | ||
150 | __ieee754_sqrt (double b) | ||
151 | -#else | ||
152 | -double | ||
153 | -__ieee754_sqrt (b) | ||
154 | - double b; | ||
155 | -#endif | ||
156 | { | ||
157 | if (__builtin_expect (b > 0, 1)) | ||
158 | { | ||
159 | @@ -132,3 +126,4 @@ __ieee754_sqrt (b) | ||
160 | } | ||
161 | return f_wash (b); | ||
162 | } | ||
163 | +strong_alias (__ieee754_sqrt, __sqrt_finite) | ||
164 | diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | ||
165 | index 26fa067abf..a917f313ab 100644 | ||
166 | --- a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | ||
167 | +++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | ||
168 | @@ -37,14 +37,8 @@ static const float threehalf = 1.5; | ||
169 | We find the reciprocal square root and use that to compute the actual | ||
170 | square root. */ | ||
171 | |||
172 | -#ifdef __STDC__ | ||
173 | float | ||
174 | __ieee754_sqrtf (float b) | ||
175 | -#else | ||
176 | -float | ||
177 | -__ieee754_sqrtf (b) | ||
178 | - float b; | ||
179 | -#endif | ||
180 | { | ||
181 | if (__builtin_expect (b > 0, 1)) | ||
182 | { | ||
183 | @@ -99,3 +93,4 @@ __ieee754_sqrtf (b) | ||
184 | } | ||
185 | return f_washf (b); | ||
186 | } | ||
187 | +strong_alias (__ieee754_sqrtf, __sqrtf_finite) | ||
188 | diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | ||
189 | index 71e516d1c8..fc4a74990e 100644 | ||
190 | --- a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | ||
191 | +++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | ||
192 | @@ -132,3 +132,4 @@ __ieee754_sqrt (b) | ||
193 | } | ||
194 | return f_wash (b); | ||
195 | } | ||
196 | +strong_alias (__ieee754_sqrt, __sqrt_finite) | ||
197 | diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | ||
198 | index 26fa067abf..9d175122a8 100644 | ||
199 | --- a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | ||
200 | +++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | ||
201 | @@ -99,3 +99,4 @@ __ieee754_sqrtf (b) | ||
202 | } | ||
203 | return f_washf (b); | ||
204 | } | ||
205 | +strong_alias (__ieee754_sqrtf, __sqrtf_finite) | ||
diff --git a/meta/recipes-core/glibc/glibc/0015-yes-within-the-path-sets-wrong-config-variables.patch b/meta/recipes-core/glibc/glibc/0009-yes-within-the-path-sets-wrong-config-variables.patch index 15e83f8917..364e5cfde8 100644 --- a/meta/recipes-core/glibc/glibc/0015-yes-within-the-path-sets-wrong-config-variables.patch +++ b/meta/recipes-core/glibc/glibc/0009-yes-within-the-path-sets-wrong-config-variables.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 0bd39d8907953f18e01742f42b24647ac7689d0a Mon Sep 17 00:00:00 2001 | 1 | From 2192588942c5bc3b5fa10fc6d7433923f42e9ba0 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Wed, 18 Mar 2015 00:31:06 +0000 | 3 | Date: Wed, 18 Mar 2015 00:31:06 +0000 |
4 | Subject: [PATCH] 'yes' within the path sets wrong config variables | 4 | Subject: [PATCH] 'yes' within the path sets wrong config variables |
@@ -29,10 +29,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
29 | 12 files changed, 28 insertions(+), 28 deletions(-) | 29 | 12 files changed, 28 insertions(+), 28 deletions(-) |
30 | 30 | ||
31 | diff --git a/sysdeps/aarch64/configure b/sysdeps/aarch64/configure | 31 | diff --git a/sysdeps/aarch64/configure b/sysdeps/aarch64/configure |
32 | index 83c3a23e44..a68c946277 100644 | 32 | index ca57edce47..5e91fab023 100644 |
33 | --- a/sysdeps/aarch64/configure | 33 | --- a/sysdeps/aarch64/configure |
34 | +++ b/sysdeps/aarch64/configure | 34 | +++ b/sysdeps/aarch64/configure |
35 | @@ -157,12 +157,12 @@ else | 35 | @@ -165,12 +165,12 @@ else $as_nop |
36 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | 36 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
37 | /* end confdefs.h. */ | 37 | /* end confdefs.h. */ |
38 | #ifdef __AARCH64EB__ | 38 | #ifdef __AARCH64EB__ |
@@ -42,16 +42,16 @@ index 83c3a23e44..a68c946277 100644 | |||
42 | 42 | ||
43 | _ACEOF | 43 | _ACEOF |
44 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | 44 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
45 | - $EGREP "yes" >/dev/null 2>&1; then : | 45 | - $EGREP "yes" >/dev/null 2>&1 |
46 | + $EGREP "is_aarch64_be" >/dev/null 2>&1; then : | 46 | + $EGREP "is_aarch64_be" >/dev/null 2>&1 |
47 | then : | ||
47 | libc_cv_aarch64_be=yes | 48 | libc_cv_aarch64_be=yes |
48 | else | 49 | else $as_nop |
49 | libc_cv_aarch64_be=no | ||
50 | diff --git a/sysdeps/aarch64/configure.ac b/sysdeps/aarch64/configure.ac | 50 | diff --git a/sysdeps/aarch64/configure.ac b/sysdeps/aarch64/configure.ac |
51 | index 66f755078a..a32b265bbe 100644 | 51 | index 27874eceb4..8a708f2ef4 100644 |
52 | --- a/sysdeps/aarch64/configure.ac | 52 | --- a/sysdeps/aarch64/configure.ac |
53 | +++ b/sysdeps/aarch64/configure.ac | 53 | +++ b/sysdeps/aarch64/configure.ac |
54 | @@ -17,8 +17,8 @@ AC_DEFINE(SUPPORT_STATIC_PIE) | 54 | @@ -13,8 +13,8 @@ AC_DEFINE(SUPPORT_STATIC_PIE) |
55 | # the dynamic linker via %ifdef. | 55 | # the dynamic linker via %ifdef. |
56 | AC_CACHE_CHECK([for big endian], | 56 | AC_CACHE_CHECK([for big endian], |
57 | [libc_cv_aarch64_be], | 57 | [libc_cv_aarch64_be], |
@@ -63,10 +63,10 @@ index 66f755078a..a32b265bbe 100644 | |||
63 | ], libc_cv_aarch64_be=yes, libc_cv_aarch64_be=no)]) | 63 | ], libc_cv_aarch64_be=yes, libc_cv_aarch64_be=no)]) |
64 | if test $libc_cv_aarch64_be = yes; then | 64 | if test $libc_cv_aarch64_be = yes; then |
65 | diff --git a/sysdeps/arm/configure b/sysdeps/arm/configure | 65 | diff --git a/sysdeps/arm/configure b/sysdeps/arm/configure |
66 | index 431e843b2b..e152461138 100644 | 66 | index 35e2918922..94d7fbe8bb 100644 |
67 | --- a/sysdeps/arm/configure | 67 | --- a/sysdeps/arm/configure |
68 | +++ b/sysdeps/arm/configure | 68 | +++ b/sysdeps/arm/configure |
69 | @@ -151,12 +151,12 @@ else | 69 | @@ -161,12 +161,12 @@ else $as_nop |
70 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | 70 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
71 | /* end confdefs.h. */ | 71 | /* end confdefs.h. */ |
72 | #ifdef __ARM_PCS_VFP | 72 | #ifdef __ARM_PCS_VFP |
@@ -76,16 +76,16 @@ index 431e843b2b..e152461138 100644 | |||
76 | 76 | ||
77 | _ACEOF | 77 | _ACEOF |
78 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | 78 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
79 | - $EGREP "yes" >/dev/null 2>&1; then : | 79 | - $EGREP "yes" >/dev/null 2>&1 |
80 | + $EGREP "use_arm_pcs_vfp" >/dev/null 2>&1; then : | 80 | + $EGREP "use_arm_pcs_vfp" >/dev/null 2>&1 |
81 | then : | ||
81 | libc_cv_arm_pcs_vfp=yes | 82 | libc_cv_arm_pcs_vfp=yes |
82 | else | 83 | else $as_nop |
83 | libc_cv_arm_pcs_vfp=no | ||
84 | diff --git a/sysdeps/arm/configure.ac b/sysdeps/arm/configure.ac | 84 | diff --git a/sysdeps/arm/configure.ac b/sysdeps/arm/configure.ac |
85 | index 90cdd69c75..05a262ba00 100644 | 85 | index 5172e30bbe..f06dedd7c5 100644 |
86 | --- a/sysdeps/arm/configure.ac | 86 | --- a/sysdeps/arm/configure.ac |
87 | +++ b/sysdeps/arm/configure.ac | 87 | +++ b/sysdeps/arm/configure.ac |
88 | @@ -15,8 +15,8 @@ AC_DEFINE(PI_STATIC_AND_HIDDEN) | 88 | @@ -10,8 +10,8 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. |
89 | # the dynamic linker via %ifdef. | 89 | # the dynamic linker via %ifdef. |
90 | AC_CACHE_CHECK([whether the compiler is using the ARM hard-float ABI], | 90 | AC_CACHE_CHECK([whether the compiler is using the ARM hard-float ABI], |
91 | [libc_cv_arm_pcs_vfp], | 91 | [libc_cv_arm_pcs_vfp], |
@@ -97,10 +97,10 @@ index 90cdd69c75..05a262ba00 100644 | |||
97 | ], libc_cv_arm_pcs_vfp=yes, libc_cv_arm_pcs_vfp=no)]) | 97 | ], libc_cv_arm_pcs_vfp=yes, libc_cv_arm_pcs_vfp=no)]) |
98 | if test $libc_cv_arm_pcs_vfp = yes; then | 98 | if test $libc_cv_arm_pcs_vfp = yes; then |
99 | diff --git a/sysdeps/mips/configure b/sysdeps/mips/configure | 99 | diff --git a/sysdeps/mips/configure b/sysdeps/mips/configure |
100 | index 4e13248c03..f14af952d0 100644 | 100 | index 1e8c6711e6..ae52ccd929 100644 |
101 | --- a/sysdeps/mips/configure | 101 | --- a/sysdeps/mips/configure |
102 | +++ b/sysdeps/mips/configure | 102 | +++ b/sysdeps/mips/configure |
103 | @@ -143,11 +143,11 @@ else | 103 | @@ -158,11 +158,11 @@ else $as_nop |
104 | /* end confdefs.h. */ | 104 | /* end confdefs.h. */ |
105 | dnl | 105 | dnl |
106 | #ifdef __mips_nan2008 | 106 | #ifdef __mips_nan2008 |
@@ -109,17 +109,17 @@ index 4e13248c03..f14af952d0 100644 | |||
109 | #endif | 109 | #endif |
110 | _ACEOF | 110 | _ACEOF |
111 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | 111 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
112 | - $EGREP "yes" >/dev/null 2>&1; then : | 112 | - $EGREP "yes" >/dev/null 2>&1 |
113 | + $EGREP "use_mips_nan2008" >/dev/null 2>&1; then : | 113 | + $EGREP "use_mips_nan2008" >/dev/null 2>&1 |
114 | then : | ||
114 | libc_cv_mips_nan2008=yes | 115 | libc_cv_mips_nan2008=yes |
115 | else | 116 | else $as_nop |
116 | libc_cv_mips_nan2008=no | ||
117 | diff --git a/sysdeps/mips/configure.ac b/sysdeps/mips/configure.ac | 117 | diff --git a/sysdeps/mips/configure.ac b/sysdeps/mips/configure.ac |
118 | index bcbdaffd9f..ad3057f4cc 100644 | 118 | index d3cd780d78..250223d206 100644 |
119 | --- a/sysdeps/mips/configure.ac | 119 | --- a/sysdeps/mips/configure.ac |
120 | +++ b/sysdeps/mips/configure.ac | 120 | +++ b/sysdeps/mips/configure.ac |
121 | @@ -6,9 +6,9 @@ dnl position independent way. | 121 | @@ -6,9 +6,9 @@ dnl position independent way. |
122 | dnl AC_DEFINE(PI_STATIC_AND_HIDDEN) | 122 | AC_DEFINE(HIDDEN_VAR_NEEDS_DYNAMIC_RELOC) |
123 | 123 | ||
124 | AC_CACHE_CHECK([whether the compiler is using the 2008 NaN encoding], | 124 | AC_CACHE_CHECK([whether the compiler is using the 2008 NaN encoding], |
125 | - libc_cv_mips_nan2008, [AC_EGREP_CPP(yes, [dnl | 125 | - libc_cv_mips_nan2008, [AC_EGREP_CPP(yes, [dnl |
@@ -131,10 +131,10 @@ index bcbdaffd9f..ad3057f4cc 100644 | |||
131 | if test x$libc_cv_mips_nan2008 = xyes; then | 131 | if test x$libc_cv_mips_nan2008 = xyes; then |
132 | AC_DEFINE(HAVE_MIPS_NAN2008) | 132 | AC_DEFINE(HAVE_MIPS_NAN2008) |
133 | diff --git a/sysdeps/nios2/configure b/sysdeps/nios2/configure | 133 | diff --git a/sysdeps/nios2/configure b/sysdeps/nios2/configure |
134 | index 14c8a3a014..dde3814ef2 100644 | 134 | index 2fb230cbaa..1959d0a444 100644 |
135 | --- a/sysdeps/nios2/configure | 135 | --- a/sysdeps/nios2/configure |
136 | +++ b/sysdeps/nios2/configure | 136 | +++ b/sysdeps/nios2/configure |
137 | @@ -142,12 +142,12 @@ else | 137 | @@ -155,12 +155,12 @@ else $as_nop |
138 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | 138 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
139 | /* end confdefs.h. */ | 139 | /* end confdefs.h. */ |
140 | #ifdef __nios2_big_endian__ | 140 | #ifdef __nios2_big_endian__ |
@@ -144,13 +144,13 @@ index 14c8a3a014..dde3814ef2 100644 | |||
144 | 144 | ||
145 | _ACEOF | 145 | _ACEOF |
146 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | 146 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
147 | - $EGREP "yes" >/dev/null 2>&1; then : | 147 | - $EGREP "yes" >/dev/null 2>&1 |
148 | + $EGREP "is_nios2_be" >/dev/null 2>&1; then : | 148 | + $EGREP "is_nios2_be" >/dev/null 2>&1 |
149 | then : | ||
149 | libc_cv_nios2_be=yes | 150 | libc_cv_nios2_be=yes |
150 | else | 151 | else $as_nop |
151 | libc_cv_nios2_be=no | ||
152 | diff --git a/sysdeps/nios2/configure.ac b/sysdeps/nios2/configure.ac | 152 | diff --git a/sysdeps/nios2/configure.ac b/sysdeps/nios2/configure.ac |
153 | index f05f43802b..dc8639902d 100644 | 153 | index f738e9a7ed..4085851cbc 100644 |
154 | --- a/sysdeps/nios2/configure.ac | 154 | --- a/sysdeps/nios2/configure.ac |
155 | +++ b/sysdeps/nios2/configure.ac | 155 | +++ b/sysdeps/nios2/configure.ac |
156 | @@ -4,8 +4,8 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. | 156 | @@ -4,8 +4,8 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. |
@@ -165,10 +165,10 @@ index f05f43802b..dc8639902d 100644 | |||
165 | ], libc_cv_nios2_be=yes, libc_cv_nios2_be=no)]) | 165 | ], libc_cv_nios2_be=yes, libc_cv_nios2_be=no)]) |
166 | if test $libc_cv_nios2_be = yes; then | 166 | if test $libc_cv_nios2_be = yes; then |
167 | diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure | 167 | diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure |
168 | index f25f2a3a65..1b7483e6c6 100644 | 168 | index a060901de4..0ac7019438 100644 |
169 | --- a/sysdeps/unix/sysv/linux/mips/configure | 169 | --- a/sysdeps/unix/sysv/linux/mips/configure |
170 | +++ b/sysdeps/unix/sysv/linux/mips/configure | 170 | +++ b/sysdeps/unix/sysv/linux/mips/configure |
171 | @@ -414,11 +414,11 @@ else | 171 | @@ -441,11 +441,11 @@ else $as_nop |
172 | /* end confdefs.h. */ | 172 | /* end confdefs.h. */ |
173 | dnl | 173 | dnl |
174 | #ifdef __mips_nan2008 | 174 | #ifdef __mips_nan2008 |
@@ -177,11 +177,11 @@ index f25f2a3a65..1b7483e6c6 100644 | |||
177 | #endif | 177 | #endif |
178 | _ACEOF | 178 | _ACEOF |
179 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | 179 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
180 | - $EGREP "yes" >/dev/null 2>&1; then : | 180 | - $EGREP "yes" >/dev/null 2>&1 |
181 | + $EGREP "use_mips_nan2008" >/dev/null 2>&1; then : | 181 | + $EGREP "use_mips_nan2008" >/dev/null 2>&1 |
182 | then : | ||
182 | libc_cv_mips_nan2008=yes | 183 | libc_cv_mips_nan2008=yes |
183 | else | 184 | else $as_nop |
184 | libc_cv_mips_nan2008=no | ||
185 | diff --git a/sysdeps/unix/sysv/linux/mips/configure.ac b/sysdeps/unix/sysv/linux/mips/configure.ac | 185 | diff --git a/sysdeps/unix/sysv/linux/mips/configure.ac b/sysdeps/unix/sysv/linux/mips/configure.ac |
186 | index 049a0f4bdf..005526d4e8 100644 | 186 | index 049a0f4bdf..005526d4e8 100644 |
187 | --- a/sysdeps/unix/sysv/linux/mips/configure.ac | 187 | --- a/sysdeps/unix/sysv/linux/mips/configure.ac |
@@ -199,10 +199,10 @@ index 049a0f4bdf..005526d4e8 100644 | |||
199 | 199 | ||
200 | libc_mips_nan= | 200 | libc_mips_nan= |
201 | diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure | 201 | diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure |
202 | index ae7f254da4..874519000b 100644 | 202 | index cf1b70c745..0dccf6cd76 100644 |
203 | --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure | 203 | --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure |
204 | +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure | 204 | +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure |
205 | @@ -155,12 +155,12 @@ else | 205 | @@ -168,12 +168,12 @@ else $as_nop |
206 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | 206 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
207 | /* end confdefs.h. */ | 207 | /* end confdefs.h. */ |
208 | #if _CALL_ELF == 2 | 208 | #if _CALL_ELF == 2 |
@@ -212,12 +212,12 @@ index ae7f254da4..874519000b 100644 | |||
212 | 212 | ||
213 | _ACEOF | 213 | _ACEOF |
214 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | 214 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
215 | - $EGREP "yes" >/dev/null 2>&1; then : | 215 | - $EGREP "yes" >/dev/null 2>&1 |
216 | + $EGREP "use_ppc_elfv2_abi" >/dev/null 2>&1; then : | 216 | + $EGREP "use_ppc_elfv2_abi" >/dev/null 2>&1 |
217 | then : | ||
217 | libc_cv_ppc64_elfv2_abi=yes | 218 | libc_cv_ppc64_elfv2_abi=yes |
218 | else | 219 | else $as_nop |
219 | libc_cv_ppc64_elfv2_abi=no | 220 | @@ -203,12 +203,12 @@ else $as_nop |
220 | @@ -188,12 +188,12 @@ else | ||
221 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | 221 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
222 | /* end confdefs.h. */ | 222 | /* end confdefs.h. */ |
223 | #ifdef _CALL_ELF | 223 | #ifdef _CALL_ELF |
@@ -227,11 +227,11 @@ index ae7f254da4..874519000b 100644 | |||
227 | 227 | ||
228 | _ACEOF | 228 | _ACEOF |
229 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | 229 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
230 | - $EGREP "yes" >/dev/null 2>&1; then : | 230 | - $EGREP "yes" >/dev/null 2>&1 |
231 | + $EGREP "is_def_call_elf" >/dev/null 2>&1; then : | 231 | + $EGREP "is_def_call_elf" >/dev/null 2>&1 |
232 | then : | ||
232 | libc_cv_ppc64_def_call_elf=yes | 233 | libc_cv_ppc64_def_call_elf=yes |
233 | else | 234 | else $as_nop |
234 | libc_cv_ppc64_def_call_elf=no | ||
235 | diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac | 235 | diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac |
236 | index f9cba6e15d..b21f72f1e4 100644 | 236 | index f9cba6e15d..b21f72f1e4 100644 |
237 | --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac | 237 | --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac |
diff --git a/meta/recipes-core/glibc/glibc/0010-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch b/meta/recipes-core/glibc/glibc/0010-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch deleted file mode 100644 index cadaa0b2e2..0000000000 --- a/meta/recipes-core/glibc/glibc/0010-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch +++ /dev/null | |||
@@ -1,384 +0,0 @@ | |||
1 | From 6b6e1dcd707017598ea3bdc2d91a761943b62218 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 18 Mar 2015 00:16:38 +0000 | ||
4 | Subject: [PATCH] __ieee754_sqrt{,f} are now inline functions and call out | ||
5 | __slow versions | ||
6 | |||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | 12 ++++++++++-- | ||
12 | sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | 8 +++++++- | ||
13 | sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | 14 +++++++++++--- | ||
14 | sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | 12 ++++++++++-- | ||
15 | sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | 14 +++++++++++--- | ||
16 | sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | 12 ++++++++++-- | ||
17 | sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | 8 ++++++++ | ||
18 | sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | 8 ++++++++ | ||
19 | sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | 12 ++++++++++-- | ||
20 | sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | 9 ++++++++- | ||
21 | sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | 14 +++++++++++--- | ||
22 | sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | 12 ++++++++++-- | ||
23 | 12 files changed, 114 insertions(+), 21 deletions(-) | ||
24 | |||
25 | diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | ||
26 | index 1795fd6c3e..daa83f3fe8 100644 | ||
27 | --- a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | ||
28 | +++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | ||
29 | @@ -40,7 +40,7 @@ static const float half = 0.5; | ||
30 | simultaneously. */ | ||
31 | |||
32 | double | ||
33 | -__ieee754_sqrt (double b) | ||
34 | +__slow_ieee754_sqrt (double b) | ||
35 | { | ||
36 | if (__builtin_expect (b > 0, 1)) | ||
37 | { | ||
38 | @@ -77,7 +77,7 @@ __ieee754_sqrt (double b) | ||
39 | |||
40 | /* Handle small numbers by scaling. */ | ||
41 | if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) | ||
42 | - return __ieee754_sqrt (b * two108) * twom54; | ||
43 | + return __slow_ieee754_sqrt (b * two108) * twom54; | ||
44 | |||
45 | #define FMADD(a_, c_, b_) \ | ||
46 | ({ double __r; \ | ||
47 | @@ -126,4 +126,12 @@ __ieee754_sqrt (double b) | ||
48 | } | ||
49 | return f_wash (b); | ||
50 | } | ||
51 | + | ||
52 | +#undef __ieee754_sqrt | ||
53 | +double | ||
54 | +__ieee754_sqrt (double x) | ||
55 | +{ | ||
56 | + return __slow_ieee754_sqrt (x); | ||
57 | +} | ||
58 | + | ||
59 | strong_alias (__ieee754_sqrt, __sqrt_finite) | ||
60 | diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | ||
61 | index a917f313ab..b812cf1705 100644 | ||
62 | --- a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | ||
63 | +++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | ||
64 | @@ -38,7 +38,7 @@ static const float threehalf = 1.5; | ||
65 | square root. */ | ||
66 | |||
67 | float | ||
68 | -__ieee754_sqrtf (float b) | ||
69 | +__slow_ieee754_sqrtf (float b) | ||
70 | { | ||
71 | if (__builtin_expect (b > 0, 1)) | ||
72 | { | ||
73 | @@ -93,4 +93,10 @@ __ieee754_sqrtf (float b) | ||
74 | } | ||
75 | return f_washf (b); | ||
76 | } | ||
77 | +#undef __ieee754_sqrtf | ||
78 | +float | ||
79 | +__ieee754_sqrtf (float x) | ||
80 | +{ | ||
81 | + return __slow_ieee754_sqrtf (x); | ||
82 | +} | ||
83 | strong_alias (__ieee754_sqrtf, __sqrtf_finite) | ||
84 | diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | ||
85 | index fc4a74990e..7038a70b47 100644 | ||
86 | --- a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | ||
87 | +++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | ||
88 | @@ -41,10 +41,10 @@ static const float half = 0.5; | ||
89 | |||
90 | #ifdef __STDC__ | ||
91 | double | ||
92 | -__ieee754_sqrt (double b) | ||
93 | +__slow_ieee754_sqrt (double b) | ||
94 | #else | ||
95 | double | ||
96 | -__ieee754_sqrt (b) | ||
97 | +__slow_ieee754_sqrt (b) | ||
98 | double b; | ||
99 | #endif | ||
100 | { | ||
101 | @@ -83,7 +83,7 @@ __ieee754_sqrt (b) | ||
102 | |||
103 | /* Handle small numbers by scaling. */ | ||
104 | if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) | ||
105 | - return __ieee754_sqrt (b * two108) * twom54; | ||
106 | + return __slow_ieee754_sqrt (b * two108) * twom54; | ||
107 | |||
108 | #define FMADD(a_, c_, b_) \ | ||
109 | ({ double __r; \ | ||
110 | @@ -132,4 +132,12 @@ __ieee754_sqrt (b) | ||
111 | } | ||
112 | return f_wash (b); | ||
113 | } | ||
114 | + | ||
115 | +#undef __ieee754_sqrt | ||
116 | +double | ||
117 | +__ieee754_sqrt (double x) | ||
118 | +{ | ||
119 | + return __slow_ieee754_sqrt (x); | ||
120 | +} | ||
121 | + | ||
122 | strong_alias (__ieee754_sqrt, __sqrt_finite) | ||
123 | diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | ||
124 | index 9d175122a8..10de1f0cc3 100644 | ||
125 | --- a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | ||
126 | +++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | ||
127 | @@ -39,10 +39,10 @@ static const float threehalf = 1.5; | ||
128 | |||
129 | #ifdef __STDC__ | ||
130 | float | ||
131 | -__ieee754_sqrtf (float b) | ||
132 | +__slow_ieee754_sqrtf (float b) | ||
133 | #else | ||
134 | float | ||
135 | -__ieee754_sqrtf (b) | ||
136 | +__slow_ieee754_sqrtf (b) | ||
137 | float b; | ||
138 | #endif | ||
139 | { | ||
140 | @@ -99,4 +99,12 @@ __ieee754_sqrtf (b) | ||
141 | } | ||
142 | return f_washf (b); | ||
143 | } | ||
144 | + | ||
145 | +#undef __ieee754_sqrtf | ||
146 | +float | ||
147 | +__ieee754_sqrtf (float x) | ||
148 | +{ | ||
149 | + return __slow_ieee754_sqrtf (x); | ||
150 | +} | ||
151 | + | ||
152 | strong_alias (__ieee754_sqrtf, __sqrtf_finite) | ||
153 | diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | ||
154 | index fc4a74990e..7038a70b47 100644 | ||
155 | --- a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | ||
156 | +++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | ||
157 | @@ -41,10 +41,10 @@ static const float half = 0.5; | ||
158 | |||
159 | #ifdef __STDC__ | ||
160 | double | ||
161 | -__ieee754_sqrt (double b) | ||
162 | +__slow_ieee754_sqrt (double b) | ||
163 | #else | ||
164 | double | ||
165 | -__ieee754_sqrt (b) | ||
166 | +__slow_ieee754_sqrt (b) | ||
167 | double b; | ||
168 | #endif | ||
169 | { | ||
170 | @@ -83,7 +83,7 @@ __ieee754_sqrt (b) | ||
171 | |||
172 | /* Handle small numbers by scaling. */ | ||
173 | if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) | ||
174 | - return __ieee754_sqrt (b * two108) * twom54; | ||
175 | + return __slow_ieee754_sqrt (b * two108) * twom54; | ||
176 | |||
177 | #define FMADD(a_, c_, b_) \ | ||
178 | ({ double __r; \ | ||
179 | @@ -132,4 +132,12 @@ __ieee754_sqrt (b) | ||
180 | } | ||
181 | return f_wash (b); | ||
182 | } | ||
183 | + | ||
184 | +#undef __ieee754_sqrt | ||
185 | +double | ||
186 | +__ieee754_sqrt (double x) | ||
187 | +{ | ||
188 | + return __slow_ieee754_sqrt (x); | ||
189 | +} | ||
190 | + | ||
191 | strong_alias (__ieee754_sqrt, __sqrt_finite) | ||
192 | diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | ||
193 | index 9d175122a8..10de1f0cc3 100644 | ||
194 | --- a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | ||
195 | +++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | ||
196 | @@ -39,10 +39,10 @@ static const float threehalf = 1.5; | ||
197 | |||
198 | #ifdef __STDC__ | ||
199 | float | ||
200 | -__ieee754_sqrtf (float b) | ||
201 | +__slow_ieee754_sqrtf (float b) | ||
202 | #else | ||
203 | float | ||
204 | -__ieee754_sqrtf (b) | ||
205 | +__slow_ieee754_sqrtf (b) | ||
206 | float b; | ||
207 | #endif | ||
208 | { | ||
209 | @@ -99,4 +99,12 @@ __ieee754_sqrtf (b) | ||
210 | } | ||
211 | return f_washf (b); | ||
212 | } | ||
213 | + | ||
214 | +#undef __ieee754_sqrtf | ||
215 | +float | ||
216 | +__ieee754_sqrtf (float x) | ||
217 | +{ | ||
218 | + return __slow_ieee754_sqrtf (x); | ||
219 | +} | ||
220 | + | ||
221 | strong_alias (__ieee754_sqrtf, __sqrtf_finite) | ||
222 | diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | ||
223 | index fc4a74990e..1c34244bd8 100644 | ||
224 | --- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | ||
225 | +++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | ||
226 | @@ -132,4 +132,12 @@ __ieee754_sqrt (b) | ||
227 | } | ||
228 | return f_wash (b); | ||
229 | } | ||
230 | + | ||
231 | +#undef __ieee754_sqrt | ||
232 | +double | ||
233 | +__ieee754_sqrt (double x) | ||
234 | +{ | ||
235 | + return __slow_ieee754_sqrt (x); | ||
236 | +} | ||
237 | + | ||
238 | strong_alias (__ieee754_sqrt, __sqrt_finite) | ||
239 | diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | ||
240 | index 9d175122a8..812653558f 100644 | ||
241 | --- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | ||
242 | +++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | ||
243 | @@ -99,4 +99,12 @@ __ieee754_sqrtf (b) | ||
244 | } | ||
245 | return f_washf (b); | ||
246 | } | ||
247 | + | ||
248 | +#undef __ieee754_sqrtf | ||
249 | +float | ||
250 | +__ieee754_sqrtf (float x) | ||
251 | +{ | ||
252 | + return __slow_ieee754_sqrtf (x); | ||
253 | +} | ||
254 | + | ||
255 | strong_alias (__ieee754_sqrtf, __sqrtf_finite) | ||
256 | diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | ||
257 | index 1795fd6c3e..13a81973e3 100644 | ||
258 | --- a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | ||
259 | +++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | ||
260 | @@ -40,7 +40,7 @@ static const float half = 0.5; | ||
261 | simultaneously. */ | ||
262 | |||
263 | double | ||
264 | -__ieee754_sqrt (double b) | ||
265 | +__slow_ieee754_sqrt (double b) | ||
266 | { | ||
267 | if (__builtin_expect (b > 0, 1)) | ||
268 | { | ||
269 | @@ -77,7 +77,7 @@ __ieee754_sqrt (double b) | ||
270 | |||
271 | /* Handle small numbers by scaling. */ | ||
272 | if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) | ||
273 | - return __ieee754_sqrt (b * two108) * twom54; | ||
274 | + return __slow_ieee754_sqrt (b * two108) * twom54; | ||
275 | |||
276 | #define FMADD(a_, c_, b_) \ | ||
277 | ({ double __r; \ | ||
278 | @@ -126,4 +126,12 @@ __ieee754_sqrt (double b) | ||
279 | } | ||
280 | return f_wash (b); | ||
281 | } | ||
282 | + | ||
283 | +#undef __ieee754_sqrt | ||
284 | +double | ||
285 | +__ieee754_sqrt (double x) | ||
286 | +{ | ||
287 | + return __slow_ieee754_sqrt (x); | ||
288 | +} | ||
289 | + | ||
290 | strong_alias (__ieee754_sqrt, __sqrt_finite) | ||
291 | diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | ||
292 | index a917f313ab..fae2d81210 100644 | ||
293 | --- a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | ||
294 | +++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | ||
295 | @@ -38,7 +38,7 @@ static const float threehalf = 1.5; | ||
296 | square root. */ | ||
297 | |||
298 | float | ||
299 | -__ieee754_sqrtf (float b) | ||
300 | +__slow_ieee754_sqrtf (float b) | ||
301 | { | ||
302 | if (__builtin_expect (b > 0, 1)) | ||
303 | { | ||
304 | @@ -93,4 +93,11 @@ __ieee754_sqrtf (float b) | ||
305 | } | ||
306 | return f_washf (b); | ||
307 | } | ||
308 | +#undef __ieee754_sqrtf | ||
309 | +float | ||
310 | +__ieee754_sqrtf (float x) | ||
311 | +{ | ||
312 | + return __slow_ieee754_sqrtf (x); | ||
313 | +} | ||
314 | + | ||
315 | strong_alias (__ieee754_sqrtf, __sqrtf_finite) | ||
316 | diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | ||
317 | index fc4a74990e..7038a70b47 100644 | ||
318 | --- a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | ||
319 | +++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | ||
320 | @@ -41,10 +41,10 @@ static const float half = 0.5; | ||
321 | |||
322 | #ifdef __STDC__ | ||
323 | double | ||
324 | -__ieee754_sqrt (double b) | ||
325 | +__slow_ieee754_sqrt (double b) | ||
326 | #else | ||
327 | double | ||
328 | -__ieee754_sqrt (b) | ||
329 | +__slow_ieee754_sqrt (b) | ||
330 | double b; | ||
331 | #endif | ||
332 | { | ||
333 | @@ -83,7 +83,7 @@ __ieee754_sqrt (b) | ||
334 | |||
335 | /* Handle small numbers by scaling. */ | ||
336 | if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) | ||
337 | - return __ieee754_sqrt (b * two108) * twom54; | ||
338 | + return __slow_ieee754_sqrt (b * two108) * twom54; | ||
339 | |||
340 | #define FMADD(a_, c_, b_) \ | ||
341 | ({ double __r; \ | ||
342 | @@ -132,4 +132,12 @@ __ieee754_sqrt (b) | ||
343 | } | ||
344 | return f_wash (b); | ||
345 | } | ||
346 | + | ||
347 | +#undef __ieee754_sqrt | ||
348 | +double | ||
349 | +__ieee754_sqrt (double x) | ||
350 | +{ | ||
351 | + return __slow_ieee754_sqrt (x); | ||
352 | +} | ||
353 | + | ||
354 | strong_alias (__ieee754_sqrt, __sqrt_finite) | ||
355 | diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | ||
356 | index 9d175122a8..10de1f0cc3 100644 | ||
357 | --- a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | ||
358 | +++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | ||
359 | @@ -39,10 +39,10 @@ static const float threehalf = 1.5; | ||
360 | |||
361 | #ifdef __STDC__ | ||
362 | float | ||
363 | -__ieee754_sqrtf (float b) | ||
364 | +__slow_ieee754_sqrtf (float b) | ||
365 | #else | ||
366 | float | ||
367 | -__ieee754_sqrtf (b) | ||
368 | +__slow_ieee754_sqrtf (b) | ||
369 | float b; | ||
370 | #endif | ||
371 | { | ||
372 | @@ -99,4 +99,12 @@ __ieee754_sqrtf (b) | ||
373 | } | ||
374 | return f_washf (b); | ||
375 | } | ||
376 | + | ||
377 | +#undef __ieee754_sqrtf | ||
378 | +float | ||
379 | +__ieee754_sqrtf (float x) | ||
380 | +{ | ||
381 | + return __slow_ieee754_sqrtf (x); | ||
382 | +} | ||
383 | + | ||
384 | strong_alias (__ieee754_sqrtf, __sqrtf_finite) | ||
diff --git a/meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch b/meta/recipes-core/glibc/glibc/0010-eglibc-Cross-building-and-testing-instructions.patch index 826e5af465..d7f15c1cfa 100644 --- a/meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch +++ b/meta/recipes-core/glibc/glibc/0010-eglibc-Cross-building-and-testing-instructions.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 060ba13b5ac5e90517d540f009ebdcdcf62f9685 Mon Sep 17 00:00:00 2001 | 1 | From ce8b13bdf488058754fce573754cea0b022c37e2 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Wed, 18 Mar 2015 00:42:58 +0000 | 3 | Date: Wed, 18 Mar 2015 00:42:58 +0000 |
4 | Subject: [PATCH] eglibc: Cross building and testing instructions | 4 | Subject: [PATCH] eglibc: Cross building and testing instructions |
diff --git a/meta/recipes-core/glibc/glibc/0011-Quote-from-bug-1443-which-explains-what-the-patch-do.patch b/meta/recipes-core/glibc/glibc/0011-Quote-from-bug-1443-which-explains-what-the-patch-do.patch deleted file mode 100644 index e4c78b5c79..0000000000 --- a/meta/recipes-core/glibc/glibc/0011-Quote-from-bug-1443-which-explains-what-the-patch-do.patch +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | From 297bac9429260f8df495b81d3fae8ae4c6913f5f Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 18 Mar 2015 00:20:09 +0000 | ||
4 | Subject: [PATCH] Quote from bug 1443 which explains what the patch does : | ||
5 | |||
6 | We build some random program and link it with -lust. When we run it, | ||
7 | it dies with a SIGSEGV before reaching main(). | ||
8 | |||
9 | Libust.so depends on liburcu-bp.so from the usermode-rcu package. | ||
10 | Although libust.so is not prelinked, liburcu-bp.so IS prelinked; this | ||
11 | is critical. | ||
12 | |||
13 | Libust.so uses a TLS / __thread variable that is defined in liburcu- | ||
14 | bp.so. There are special ARM-specific relocation types that allow two | ||
15 | shared libraries to share thread-specific data. This is critical too. | ||
16 | |||
17 | One more critical issue: although liburcu-bp.so is prelinked, we can't | ||
18 | load it at its prelinked address, because we also link against | ||
19 | librt.so, and librt.so uses that address. | ||
20 | |||
21 | The dynamic linker is forced to relink liburcu-bp.so at a different | ||
22 | address. In the course of relinking, it processes the special ARM | ||
23 | relocation record mentioned above. The prelinker has already filled | ||
24 | in the information, which is a short offset into a table of thread- | ||
25 | specific data that is allocated per-thread for each library that uses | ||
26 | TLS. Because the normal behavior of a relocation is to add the symbol | ||
27 | value to an addend stored at the address being relocated, we end up | ||
28 | adding the short offset to itself, doubling it. | ||
29 | |||
30 | Now we have an awkward situation. The libust.so library doesn't know | ||
31 | about the addend, so its TLS data for this element is correct. The | ||
32 | liburcu-bp.so library has a different offset for the element. When we | ||
33 | go to initialize the element for the first time in liburcu-bp.so, we | ||
34 | write the address of the result at the doubled (broken) offset. | ||
35 | Later, when we refer to the address from libust.so, we check the value | ||
36 | at the correct offset, but it's NULL, so we eat hot SIGSEGV. | ||
37 | |||
38 | Upstream-Status: Pending | ||
39 | |||
40 | Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com> | ||
41 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
42 | --- | ||
43 | sysdeps/arm/dl-machine.h | 2 +- | ||
44 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
45 | |||
46 | diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h | ||
47 | index ff5e09e207..d68bfe5cbe 100644 | ||
48 | --- a/sysdeps/arm/dl-machine.h | ||
49 | +++ b/sysdeps/arm/dl-machine.h | ||
50 | @@ -510,7 +510,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, | ||
51 | |||
52 | case R_ARM_TLS_DTPOFF32: | ||
53 | if (sym != NULL) | ||
54 | - *reloc_addr += sym->st_value; | ||
55 | + *reloc_addr = sym->st_value; | ||
56 | break; | ||
57 | |||
58 | case R_ARM_TLS_TPOFF32: | ||
diff --git a/meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch b/meta/recipes-core/glibc/glibc/0011-eglibc-Help-bootstrap-cross-toolchain.patch index afac2e04f6..82a3292655 100644 --- a/meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch +++ b/meta/recipes-core/glibc/glibc/0011-eglibc-Help-bootstrap-cross-toolchain.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From f13c2f525e9bc82ce13e4cf486f7fe0831fc3fac Mon Sep 17 00:00:00 2001 | 1 | From 65b79161b9e2848a174d3519a03348884f182975 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Wed, 18 Mar 2015 00:49:28 +0000 | 3 | Date: Wed, 18 Mar 2015 00:49:28 +0000 |
4 | Subject: [PATCH] eglibc: Help bootstrap cross toolchain | 4 | Subject: [PATCH] eglibc: Help bootstrap cross toolchain |
@@ -29,7 +29,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
29 | create mode 100644 include/stubs-bootstrap.h | 29 | create mode 100644 include/stubs-bootstrap.h |
30 | 30 | ||
31 | diff --git a/Makefile b/Makefile | 31 | diff --git a/Makefile b/Makefile |
32 | index 50f99ca611..31eed15f02 100644 | 32 | index 7052b46df8..46073abaa8 100644 |
33 | --- a/Makefile | 33 | --- a/Makefile |
34 | +++ b/Makefile | 34 | +++ b/Makefile |
35 | @@ -79,9 +79,18 @@ subdir-dirs = include | 35 | @@ -79,9 +79,18 @@ subdir-dirs = include |
@@ -52,7 +52,7 @@ index 50f99ca611..31eed15f02 100644 | |||
52 | ifeq (yes,$(build-shared)) | 52 | ifeq (yes,$(build-shared)) |
53 | headers += gnu/lib-names.h | 53 | headers += gnu/lib-names.h |
54 | endif | 54 | endif |
55 | @@ -416,6 +425,16 @@ others: $(common-objpfx)testrun.sh $(common-objpfx)debugglibc.sh | 55 | @@ -421,6 +430,16 @@ others: $(common-objpfx)testrun.sh $(common-objpfx)debugglibc.sh |
56 | 56 | ||
57 | subdir-stubs := $(foreach dir,$(subdirs),$(common-objpfx)$(dir)/stubs) | 57 | subdir-stubs := $(foreach dir,$(subdirs),$(common-objpfx)$(dir)/stubs) |
58 | 58 | ||
@@ -69,7 +69,7 @@ index 50f99ca611..31eed15f02 100644 | |||
69 | ifndef abi-variants | 69 | ifndef abi-variants |
70 | installed-stubs = $(inst_includedir)/gnu/stubs.h | 70 | installed-stubs = $(inst_includedir)/gnu/stubs.h |
71 | else | 71 | else |
72 | @@ -442,6 +461,7 @@ $(inst_includedir)/gnu/stubs.h: $(+force) | 72 | @@ -447,6 +466,7 @@ $(inst_includedir)/gnu/stubs.h: $(+force) |
73 | 73 | ||
74 | install-others-nosubdir: $(installed-stubs) | 74 | install-others-nosubdir: $(installed-stubs) |
75 | endif | 75 | endif |
diff --git a/meta/recipes-core/glibc/glibc/0020-eglibc-Resolve-__fpscr_values-on-SH4.patch b/meta/recipes-core/glibc/glibc/0012-eglibc-Resolve-__fpscr_values-on-SH4.patch index 9a610c6703..e726a9e76f 100644 --- a/meta/recipes-core/glibc/glibc/0020-eglibc-Resolve-__fpscr_values-on-SH4.patch +++ b/meta/recipes-core/glibc/glibc/0012-eglibc-Resolve-__fpscr_values-on-SH4.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 330c4e50e28e29c31fb8d6ab39cdbb2af4d3def7 Mon Sep 17 00:00:00 2001 | 1 | From 07a5fa22a9a8bbd43982c1b35132f8c2d5276bfe Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Wed, 18 Mar 2015 00:55:53 +0000 | 3 | Date: Wed, 18 Mar 2015 00:55:53 +0000 |
4 | Subject: [PATCH] eglibc: Resolve __fpscr_values on SH4 | 4 | Subject: [PATCH] eglibc: Resolve __fpscr_values on SH4 |
@@ -21,10 +21,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
21 | 2 files changed, 12 insertions(+) | 21 | 2 files changed, 12 insertions(+) |
22 | 22 | ||
23 | diff --git a/sysdeps/unix/sysv/linux/sh/Versions b/sysdeps/unix/sysv/linux/sh/Versions | 23 | diff --git a/sysdeps/unix/sysv/linux/sh/Versions b/sysdeps/unix/sysv/linux/sh/Versions |
24 | index e0938c4165..ca1d7da339 100644 | 24 | index 3ad702e165..931985b5d6 100644 |
25 | --- a/sysdeps/unix/sysv/linux/sh/Versions | 25 | --- a/sysdeps/unix/sysv/linux/sh/Versions |
26 | +++ b/sysdeps/unix/sysv/linux/sh/Versions | 26 | +++ b/sysdeps/unix/sysv/linux/sh/Versions |
27 | @@ -2,6 +2,7 @@ libc { | 27 | @@ -3,6 +3,7 @@ libc { |
28 | GLIBC_2.2 { | 28 | GLIBC_2.2 { |
29 | # functions used in other libraries | 29 | # functions used in other libraries |
30 | __xstat64; __fxstat64; __lxstat64; | 30 | __xstat64; __fxstat64; __lxstat64; |
@@ -33,7 +33,7 @@ index e0938c4165..ca1d7da339 100644 | |||
33 | # a* | 33 | # a* |
34 | alphasort64; | 34 | alphasort64; |
35 | diff --git a/sysdeps/unix/sysv/linux/sh/sysdep.S b/sysdeps/unix/sysv/linux/sh/sysdep.S | 35 | diff --git a/sysdeps/unix/sysv/linux/sh/sysdep.S b/sysdeps/unix/sysv/linux/sh/sysdep.S |
36 | index a18fbb2e8b..59421bfbb0 100644 | 36 | index d5d8c5e033..f356d02077 100644 |
37 | --- a/sysdeps/unix/sysv/linux/sh/sysdep.S | 37 | --- a/sysdeps/unix/sysv/linux/sh/sysdep.S |
38 | +++ b/sysdeps/unix/sysv/linux/sh/sysdep.S | 38 | +++ b/sysdeps/unix/sysv/linux/sh/sysdep.S |
39 | @@ -30,3 +30,14 @@ ENTRY (__syscall_error) | 39 | @@ -30,3 +30,14 @@ ENTRY (__syscall_error) |
diff --git a/meta/recipes-core/glibc/glibc/0012-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch b/meta/recipes-core/glibc/glibc/0012-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch deleted file mode 100644 index c5e8e6473a..0000000000 --- a/meta/recipes-core/glibc/glibc/0012-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | From f389babf3c920e68b7d7391556a78ebf62a21ebe Mon Sep 17 00:00:00 2001 | ||
2 | From: Ting Liu <b28495@freescale.com> | ||
3 | Date: Wed, 19 Dec 2012 04:39:57 -0600 | ||
4 | Subject: [PATCH] eglibc: run libm-err-tab.pl with specific dirs in ${S} | ||
5 | |||
6 | libm-err-tab.pl will parse all the files named "libm-test-ulps" | ||
7 | in the given dir recursively. To avoid parsing the one in | ||
8 | ${S}/.pc/ (it does exist after eglibc adds aarch64 support, | ||
9 | ${S}/.pc/aarch64-0001-glibc-fsf-v1-eaf6f205.patch/ports/sysdeps/ | ||
10 | aarch64/libm-test-ulps), run libm-err-tab.pl with specific dirs | ||
11 | in ${S}. | ||
12 | |||
13 | Upstream-Status: inappropriate [OE specific] | ||
14 | |||
15 | Signed-off-by: Ting Liu <b28495@freescale.com> | ||
16 | --- | ||
17 | manual/Makefile | 3 ++- | ||
18 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/manual/Makefile b/manual/Makefile | ||
21 | index e83444341e..aa2645bc55 100644 | ||
22 | --- a/manual/Makefile | ||
23 | +++ b/manual/Makefile | ||
24 | @@ -103,7 +103,8 @@ $(objpfx)stamp-libm-err: $(..)math/gen-libm-test.py \ | ||
25 | $(wildcard $(foreach dir,$(sysdirs),\ | ||
26 | $(dir)/libm-test-ulps)) | ||
27 | pwd=`pwd`; \ | ||
28 | - $(PYTHON) $< -s $$pwd/.. -m $(objpfx)libm-err-tmp | ||
29 | + $(PYTHON) $< -s $$pwd/../ports -m $(objpfx)libm-err-tmp | ||
30 | + $(PYTHON) $< -s $$pwd/../sysdeps -m $(objpfx)libm-err-tmp | ||
31 | $(move-if-change) $(objpfx)libm-err-tmp $(objpfx)libm-err.texi | ||
32 | touch $@ | ||
33 | |||
diff --git a/meta/recipes-core/glibc/glibc/0013-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch b/meta/recipes-core/glibc/glibc/0013-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch deleted file mode 100644 index 7f362cace0..0000000000 --- a/meta/recipes-core/glibc/glibc/0013-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | From 4b0d41a315e66f688fef7b0c2e2b6ce9fa16ec93 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 18 Mar 2015 00:24:46 +0000 | ||
4 | Subject: [PATCH] __ieee754_sqrt{,f} are now inline functions and call out | ||
5 | __slow versions | ||
6 | |||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: chunrong guo <B40290@freescale.com> | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | 6 +++--- | ||
13 | sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | 4 ++-- | ||
14 | 2 files changed, 5 insertions(+), 5 deletions(-) | ||
15 | |||
16 | diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | ||
17 | index 1c34244bd8..7038a70b47 100644 | ||
18 | --- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | ||
19 | +++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | ||
20 | @@ -41,10 +41,10 @@ static const float half = 0.5; | ||
21 | |||
22 | #ifdef __STDC__ | ||
23 | double | ||
24 | -__ieee754_sqrt (double b) | ||
25 | +__slow_ieee754_sqrt (double b) | ||
26 | #else | ||
27 | double | ||
28 | -__ieee754_sqrt (b) | ||
29 | +__slow_ieee754_sqrt (b) | ||
30 | double b; | ||
31 | #endif | ||
32 | { | ||
33 | @@ -83,7 +83,7 @@ __ieee754_sqrt (b) | ||
34 | |||
35 | /* Handle small numbers by scaling. */ | ||
36 | if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) | ||
37 | - return __ieee754_sqrt (b * two108) * twom54; | ||
38 | + return __slow_ieee754_sqrt (b * two108) * twom54; | ||
39 | |||
40 | #define FMADD(a_, c_, b_) \ | ||
41 | ({ double __r; \ | ||
42 | diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | ||
43 | index 812653558f..10de1f0cc3 100644 | ||
44 | --- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | ||
45 | +++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | ||
46 | @@ -39,10 +39,10 @@ static const float threehalf = 1.5; | ||
47 | |||
48 | #ifdef __STDC__ | ||
49 | float | ||
50 | -__ieee754_sqrtf (float b) | ||
51 | +__slow_ieee754_sqrtf (float b) | ||
52 | #else | ||
53 | float | ||
54 | -__ieee754_sqrtf (b) | ||
55 | +__slow_ieee754_sqrtf (b) | ||
56 | float b; | ||
57 | #endif | ||
58 | { | ||
diff --git a/meta/recipes-core/glibc/glibc/0021-eglibc-Forward-port-cross-locale-generation-support.patch b/meta/recipes-core/glibc/glibc/0013-eglibc-Forward-port-cross-locale-generation-support.patch index 0b2f020fdd..f36b7f6f4c 100644 --- a/meta/recipes-core/glibc/glibc/0021-eglibc-Forward-port-cross-locale-generation-support.patch +++ b/meta/recipes-core/glibc/glibc/0013-eglibc-Forward-port-cross-locale-generation-support.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 557ed640b26bd208ce8d4a6fd725b124893668d7 Mon Sep 17 00:00:00 2001 | 1 | From 33e9867758e830e19d181d5a0aa7f2f3cc4a08b3 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Wed, 18 Mar 2015 01:33:49 +0000 | 3 | Date: Wed, 18 Mar 2015 01:33:49 +0000 |
4 | Subject: [PATCH] eglibc: Forward port cross locale generation support | 4 | Subject: [PATCH] eglibc: Forward port cross locale generation support |
@@ -7,7 +7,7 @@ Upstream-Status: Pending | |||
7 | 7 | ||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
9 | --- | 9 | --- |
10 | locale/Makefile | 3 +- | 10 | locale/Makefile | 1 + |
11 | locale/catnames.c | 46 +++++++++++++++++++++++++++ | 11 | locale/catnames.c | 46 +++++++++++++++++++++++++++ |
12 | locale/localeinfo.h | 2 +- | 12 | locale/localeinfo.h | 2 +- |
13 | locale/programs/charmap-dir.c | 6 ++++ | 13 | locale/programs/charmap-dir.c | 6 ++++ |
@@ -19,23 +19,21 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
19 | locale/programs/locfile.c | 5 ++- | 19 | locale/programs/locfile.c | 5 ++- |
20 | locale/programs/locfile.h | 59 +++++++++++++++++++++++++++++++++-- | 20 | locale/programs/locfile.h | 59 +++++++++++++++++++++++++++++++++-- |
21 | locale/setlocale.c | 29 ----------------- | 21 | locale/setlocale.c | 29 ----------------- |
22 | 12 files changed, 167 insertions(+), 68 deletions(-) | 22 | 12 files changed, 166 insertions(+), 67 deletions(-) |
23 | create mode 100644 locale/catnames.c | 23 | create mode 100644 locale/catnames.c |
24 | 24 | ||
25 | diff --git a/locale/Makefile b/locale/Makefile | 25 | diff --git a/locale/Makefile b/locale/Makefile |
26 | index b7c60681fa..07c606cde3 100644 | 26 | index 2810f28605..05f847f9a6 100644 |
27 | --- a/locale/Makefile | 27 | --- a/locale/Makefile |
28 | +++ b/locale/Makefile | 28 | +++ b/locale/Makefile |
29 | @@ -26,7 +26,8 @@ headers = langinfo.h locale.h bits/locale.h \ | 29 | @@ -30,6 +30,7 @@ headers = \ |
30 | bits/types/locale_t.h bits/types/__locale_t.h | 30 | locale.h \ |
31 | routines = setlocale findlocale loadlocale loadarchive \ | 31 | # headers |
32 | localeconv nl_langinfo nl_langinfo_l mb_cur_max \ | 32 | routines = \ |
33 | - newlocale duplocale freelocale uselocale | 33 | + catnames \ |
34 | + newlocale duplocale freelocale uselocale \ | 34 | duplocale \ |
35 | + catnames | 35 | findlocale \ |
36 | tests = tst-C-locale tst-locname tst-duplocale | 36 | freelocale \ |
37 | tests-container = tst-localedef-path-norm | ||
38 | categories = ctype messages monetary numeric time paper name \ | ||
39 | diff --git a/locale/catnames.c b/locale/catnames.c | 37 | diff --git a/locale/catnames.c b/locale/catnames.c |
40 | new file mode 100644 | 38 | new file mode 100644 |
41 | index 0000000000..538f3f5edb | 39 | index 0000000000..538f3f5edb |
@@ -89,10 +87,10 @@ index 0000000000..538f3f5edb | |||
89 | + [LC_ALL] = sizeof ("LC_ALL") - 1 | 87 | + [LC_ALL] = sizeof ("LC_ALL") - 1 |
90 | + }; | 88 | + }; |
91 | diff --git a/locale/localeinfo.h b/locale/localeinfo.h | 89 | diff --git a/locale/localeinfo.h b/locale/localeinfo.h |
92 | index 22f9dc1140..fa31b3c5ea 100644 | 90 | index f7efc288a5..6ef082eb25 100644 |
93 | --- a/locale/localeinfo.h | 91 | --- a/locale/localeinfo.h |
94 | +++ b/locale/localeinfo.h | 92 | +++ b/locale/localeinfo.h |
95 | @@ -230,7 +230,7 @@ __libc_tsd_define (extern, locale_t, LOCALE) | 93 | @@ -246,7 +246,7 @@ __libc_tsd_define (extern, locale_t, LOCALE) |
96 | unused. We can manage this playing some tricks with weak references. | 94 | unused. We can manage this playing some tricks with weak references. |
97 | But with thread-local locale settings, it becomes quite ungainly unless | 95 | But with thread-local locale settings, it becomes quite ungainly unless |
98 | we can use __thread variables. So only in that case do we attempt this. */ | 96 | we can use __thread variables. So only in that case do we attempt this. */ |
@@ -102,7 +100,7 @@ index 22f9dc1140..fa31b3c5ea 100644 | |||
102 | # define NL_CURRENT_INDIRECT 1 | 100 | # define NL_CURRENT_INDIRECT 1 |
103 | #endif | 101 | #endif |
104 | diff --git a/locale/programs/charmap-dir.c b/locale/programs/charmap-dir.c | 102 | diff --git a/locale/programs/charmap-dir.c b/locale/programs/charmap-dir.c |
105 | index 4841bfd05d..ffcba1fd79 100644 | 103 | index 36504f238d..56ee97e61b 100644 |
106 | --- a/locale/programs/charmap-dir.c | 104 | --- a/locale/programs/charmap-dir.c |
107 | +++ b/locale/programs/charmap-dir.c | 105 | +++ b/locale/programs/charmap-dir.c |
108 | @@ -18,7 +18,9 @@ | 106 | @@ -18,7 +18,9 @@ |
@@ -148,10 +146,10 @@ index 4841bfd05d..ffcba1fd79 100644 | |||
148 | return NULL; | 146 | return NULL; |
149 | } | 147 | } |
150 | diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c | 148 | diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c |
151 | index 0af21e05e2..4980b0c52f 100644 | 149 | index 5048adbd9f..4232834ead 100644 |
152 | --- a/locale/programs/ld-collate.c | 150 | --- a/locale/programs/ld-collate.c |
153 | +++ b/locale/programs/ld-collate.c | 151 | +++ b/locale/programs/ld-collate.c |
154 | @@ -349,7 +349,7 @@ new_element (struct locale_collate_t *collate, const char *mbs, size_t mbslen, | 152 | @@ -352,7 +352,7 @@ new_element (struct locale_collate_t *collate, const char *mbs, size_t mbslen, |
155 | } | 153 | } |
156 | if (wcs != NULL) | 154 | if (wcs != NULL) |
157 | { | 155 | { |
@@ -160,7 +158,7 @@ index 0af21e05e2..4980b0c52f 100644 | |||
160 | uint32_t zero = 0; | 158 | uint32_t zero = 0; |
161 | /* Handle <U0000> as a single character. */ | 159 | /* Handle <U0000> as a single character. */ |
162 | if (nwcs == 0) | 160 | if (nwcs == 0) |
163 | @@ -1772,8 +1772,7 @@ symbol `%s' has the same encoding as"), (*eptr)->name); | 161 | @@ -1776,8 +1776,7 @@ symbol `%s' has the same encoding as"), (*eptr)->name); |
164 | 162 | ||
165 | if ((*eptr)->nwcs == runp->nwcs) | 163 | if ((*eptr)->nwcs == runp->nwcs) |
166 | { | 164 | { |
@@ -170,7 +168,7 @@ index 0af21e05e2..4980b0c52f 100644 | |||
170 | 168 | ||
171 | if (c == 0) | 169 | if (c == 0) |
172 | { | 170 | { |
173 | @@ -2000,9 +1999,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp) | 171 | @@ -2004,9 +2003,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp) |
174 | one consecutive entry. */ | 172 | one consecutive entry. */ |
175 | if (runp->wcnext != NULL | 173 | if (runp->wcnext != NULL |
176 | && runp->nwcs == runp->wcnext->nwcs | 174 | && runp->nwcs == runp->wcnext->nwcs |
@@ -183,7 +181,7 @@ index 0af21e05e2..4980b0c52f 100644 | |||
183 | && (runp->wcs[runp->nwcs - 1] | 181 | && (runp->wcs[runp->nwcs - 1] |
184 | == runp->wcnext->wcs[runp->nwcs - 1] + 1)) | 182 | == runp->wcnext->wcs[runp->nwcs - 1] + 1)) |
185 | { | 183 | { |
186 | @@ -2026,9 +2025,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp) | 184 | @@ -2030,9 +2029,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp) |
187 | runp = runp->wcnext; | 185 | runp = runp->wcnext; |
188 | while (runp->wcnext != NULL | 186 | while (runp->wcnext != NULL |
189 | && runp->nwcs == runp->wcnext->nwcs | 187 | && runp->nwcs == runp->wcnext->nwcs |
@@ -197,10 +195,10 @@ index 0af21e05e2..4980b0c52f 100644 | |||
197 | == runp->wcnext->wcs[runp->nwcs - 1] + 1)); | 195 | == runp->wcnext->wcs[runp->nwcs - 1] + 1)); |
198 | 196 | ||
199 | diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c | 197 | diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c |
200 | index 2fb579bbbf..d0be99581c 100644 | 198 | index eb6e7e145c..14736d1cac 100644 |
201 | --- a/locale/programs/ld-ctype.c | 199 | --- a/locale/programs/ld-ctype.c |
202 | +++ b/locale/programs/ld-ctype.c | 200 | +++ b/locale/programs/ld-ctype.c |
203 | @@ -915,7 +915,7 @@ ctype_output (struct localedef_t *locale, const struct charmap_t *charmap, | 201 | @@ -914,7 +914,7 @@ ctype_output (struct localedef_t *locale, const struct charmap_t *charmap, |
204 | allocate_arrays (ctype, charmap, ctype->repertoire); | 202 | allocate_arrays (ctype, charmap, ctype->repertoire); |
205 | 203 | ||
206 | default_missing_len = (ctype->default_missing | 204 | default_missing_len = (ctype->default_missing |
@@ -209,7 +207,7 @@ index 2fb579bbbf..d0be99581c 100644 | |||
209 | : 0); | 207 | : 0); |
210 | 208 | ||
211 | init_locale_data (&file, nelems); | 209 | init_locale_data (&file, nelems); |
212 | @@ -1927,7 +1927,7 @@ read_translit_entry (struct linereader *ldfile, struct locale_ctype_t *ctype, | 210 | @@ -1926,7 +1926,7 @@ read_translit_entry (struct linereader *ldfile, struct locale_ctype_t *ctype, |
213 | ignore = 1; | 211 | ignore = 1; |
214 | else | 212 | else |
215 | /* This value is usable. */ | 213 | /* This value is usable. */ |
@@ -218,7 +216,7 @@ index 2fb579bbbf..d0be99581c 100644 | |||
218 | 216 | ||
219 | first = 0; | 217 | first = 0; |
220 | } | 218 | } |
221 | @@ -2461,8 +2461,8 @@ with character code range values one must use the absolute ellipsis `...'")); | 219 | @@ -2460,8 +2460,8 @@ with character code range values one must use the absolute ellipsis `...'")); |
222 | } | 220 | } |
223 | 221 | ||
224 | handle_tok_digit: | 222 | handle_tok_digit: |
@@ -229,7 +227,7 @@ index 2fb579bbbf..d0be99581c 100644 | |||
229 | handle_digits = 1; | 227 | handle_digits = 1; |
230 | goto read_charclass; | 228 | goto read_charclass; |
231 | 229 | ||
232 | @@ -3904,8 +3904,7 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap, | 230 | @@ -3876,8 +3876,7 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap, |
233 | 231 | ||
234 | while (idx < number) | 232 | while (idx < number) |
235 | { | 233 | { |
@@ -239,7 +237,7 @@ index 2fb579bbbf..d0be99581c 100644 | |||
239 | if (res == 0) | 237 | if (res == 0) |
240 | { | 238 | { |
241 | replace = 1; | 239 | replace = 1; |
242 | @@ -3942,11 +3941,11 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap, | 240 | @@ -3914,11 +3913,11 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap, |
243 | for (size_t cnt = 0; cnt < number; ++cnt) | 241 | for (size_t cnt = 0; cnt < number; ++cnt) |
244 | { | 242 | { |
245 | struct translit_to_t *srunp; | 243 | struct translit_to_t *srunp; |
@@ -253,7 +251,7 @@ index 2fb579bbbf..d0be99581c 100644 | |||
253 | srunp = srunp->next; | 251 | srunp = srunp->next; |
254 | } | 252 | } |
255 | /* Plus one for the extra NUL character marking the end of | 253 | /* Plus one for the extra NUL character marking the end of |
256 | @@ -3970,18 +3969,18 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap, | 254 | @@ -3942,18 +3941,18 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap, |
257 | ctype->translit_from_idx[cnt] = from_len; | 255 | ctype->translit_from_idx[cnt] = from_len; |
258 | ctype->translit_to_idx[cnt] = to_len; | 256 | ctype->translit_to_idx[cnt] = to_len; |
259 | 257 | ||
@@ -279,10 +277,10 @@ index 2fb579bbbf..d0be99581c 100644 | |||
279 | srunp = srunp->next; | 277 | srunp = srunp->next; |
280 | } | 278 | } |
281 | diff --git a/locale/programs/ld-time.c b/locale/programs/ld-time.c | 279 | diff --git a/locale/programs/ld-time.c b/locale/programs/ld-time.c |
282 | index dcd2a2386d..6814740325 100644 | 280 | index 1abff3cf53..8a2f2b820a 100644 |
283 | --- a/locale/programs/ld-time.c | 281 | --- a/locale/programs/ld-time.c |
284 | +++ b/locale/programs/ld-time.c | 282 | +++ b/locale/programs/ld-time.c |
285 | @@ -220,8 +220,10 @@ No definition for %s category found"), "LC_TIME"); | 283 | @@ -219,8 +219,10 @@ No definition for %s category found"), "LC_TIME"); |
286 | } | 284 | } |
287 | else | 285 | else |
288 | { | 286 | { |
@@ -294,7 +292,7 @@ index dcd2a2386d..6814740325 100644 | |||
294 | } | 292 | } |
295 | } | 293 | } |
296 | 294 | ||
297 | @@ -231,7 +233,7 @@ No definition for %s category found"), "LC_TIME"); | 295 | @@ -230,7 +232,7 @@ No definition for %s category found"), "LC_TIME"); |
298 | const int days_per_month[12] = { 31, 29, 31, 30, 31, 30, | 296 | const int days_per_month[12] = { 31, 29, 31, 30, 31, 30, |
299 | 31, 31, 30, 31 ,30, 31 }; | 297 | 31, 31, 30, 31 ,30, 31 }; |
300 | size_t idx; | 298 | size_t idx; |
@@ -303,7 +301,7 @@ index dcd2a2386d..6814740325 100644 | |||
303 | 301 | ||
304 | time->era_entries = | 302 | time->era_entries = |
305 | (struct era_data *) xmalloc (time->num_era | 303 | (struct era_data *) xmalloc (time->num_era |
306 | @@ -457,18 +459,18 @@ No definition for %s category found"), "LC_TIME"); | 304 | @@ -456,18 +458,18 @@ No definition for %s category found"), "LC_TIME"); |
307 | } | 305 | } |
308 | 306 | ||
309 | /* Now generate the wide character name and format. */ | 307 | /* Now generate the wide character name and format. */ |
@@ -329,7 +327,7 @@ index dcd2a2386d..6814740325 100644 | |||
329 | } | 327 | } |
330 | else | 328 | else |
331 | time->era_entries[idx].wname = | 329 | time->era_entries[idx].wname = |
332 | @@ -527,7 +529,16 @@ No definition for %s category found"), "LC_TIME"); | 330 | @@ -526,7 +528,16 @@ No definition for %s category found"), "LC_TIME"); |
333 | if (time->date_fmt == NULL) | 331 | if (time->date_fmt == NULL) |
334 | time->date_fmt = "%a %b %e %H:%M:%S %Z %Y"; | 332 | time->date_fmt = "%a %b %e %H:%M:%S %Z %Y"; |
335 | if (time->wdate_fmt == NULL) | 333 | if (time->wdate_fmt == NULL) |
@@ -348,23 +346,23 @@ index dcd2a2386d..6814740325 100644 | |||
348 | 346 | ||
349 | 347 | ||
350 | diff --git a/locale/programs/linereader.c b/locale/programs/linereader.c | 348 | diff --git a/locale/programs/linereader.c b/locale/programs/linereader.c |
351 | index 96d3ab66db..3af379d2c3 100644 | 349 | index 61373d2657..7ec5726377 100644 |
352 | --- a/locale/programs/linereader.c | 350 | --- a/locale/programs/linereader.c |
353 | +++ b/locale/programs/linereader.c | 351 | +++ b/locale/programs/linereader.c |
354 | @@ -595,7 +595,7 @@ get_string (struct linereader *lr, const struct charmap_t *charmap, | 352 | @@ -776,7 +776,7 @@ get_string (struct linereader *lr, const struct charmap_t *charmap, |
355 | { | 353 | { |
356 | int return_widestr = lr->return_widestr; | 354 | int return_widestr = lr->return_widestr; |
357 | char *buf; | 355 | struct lr_buffer lrb; |
358 | - wchar_t *buf2 = NULL; | 356 | - wchar_t *buf2 = NULL; |
359 | + uint32_t *buf2 = NULL; | 357 | + uint32_t *buf2 = NULL; |
360 | size_t bufact; | 358 | |
361 | size_t bufmax = 56; | 359 | lr_buffer_init (&lrb); |
362 | 360 | ||
363 | diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c | 361 | diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c |
364 | index 832c8fd1fc..fe689b3ae1 100644 | 362 | index 907bb5fb25..3106529043 100644 |
365 | --- a/locale/programs/localedef.c | 363 | --- a/locale/programs/localedef.c |
366 | +++ b/locale/programs/localedef.c | 364 | +++ b/locale/programs/localedef.c |
367 | @@ -109,6 +109,7 @@ void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version; | 365 | @@ -108,6 +108,7 @@ void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version; |
368 | #define OPT_NO_WARN 402 | 366 | #define OPT_NO_WARN 402 |
369 | #define OPT_WARN 403 | 367 | #define OPT_WARN 403 |
370 | #define OPT_NO_HARD_LINKS 404 | 368 | #define OPT_NO_HARD_LINKS 404 |
@@ -372,7 +370,7 @@ index 832c8fd1fc..fe689b3ae1 100644 | |||
372 | 370 | ||
373 | /* Definitions of arguments for argp functions. */ | 371 | /* Definitions of arguments for argp functions. */ |
374 | static const struct argp_option options[] = | 372 | static const struct argp_option options[] = |
375 | @@ -153,6 +154,8 @@ static const struct argp_option options[] = | 373 | @@ -152,6 +153,8 @@ static const struct argp_option options[] = |
376 | N_("Generate little-endian output") }, | 374 | N_("Generate little-endian output") }, |
377 | { "big-endian", OPT_BIG_ENDIAN, NULL, 0, | 375 | { "big-endian", OPT_BIG_ENDIAN, NULL, 0, |
378 | N_("Generate big-endian output") }, | 376 | N_("Generate big-endian output") }, |
@@ -381,7 +379,7 @@ index 832c8fd1fc..fe689b3ae1 100644 | |||
381 | { NULL, 0, NULL, 0, NULL } | 379 | { NULL, 0, NULL, 0, NULL } |
382 | }; | 380 | }; |
383 | 381 | ||
384 | @@ -243,12 +246,14 @@ main (int argc, char *argv[]) | 382 | @@ -242,12 +245,14 @@ main (int argc, char *argv[]) |
385 | ctype locale. (P1003.2 4.35.5.2) */ | 383 | ctype locale. (P1003.2 4.35.5.2) */ |
386 | setlocale (LC_CTYPE, "POSIX"); | 384 | setlocale (LC_CTYPE, "POSIX"); |
387 | 385 | ||
@@ -396,7 +394,7 @@ index 832c8fd1fc..fe689b3ae1 100644 | |||
396 | 394 | ||
397 | /* Process charmap file. */ | 395 | /* Process charmap file. */ |
398 | charmap = charmap_read (charmap_file, verbose, 1, be_quiet, 1); | 396 | charmap = charmap_read (charmap_file, verbose, 1, be_quiet, 1); |
399 | @@ -400,6 +405,9 @@ parse_opt (int key, char *arg, struct argp_state *state) | 397 | @@ -399,6 +404,9 @@ parse_opt (int key, char *arg, struct argp_state *state) |
400 | /* Do not hard link to other locales. */ | 398 | /* Do not hard link to other locales. */ |
401 | hard_links = false; | 399 | hard_links = false; |
402 | break; | 400 | break; |
@@ -407,10 +405,10 @@ index 832c8fd1fc..fe689b3ae1 100644 | |||
407 | force_output = 1; | 405 | force_output = 1; |
408 | break; | 406 | break; |
409 | diff --git a/locale/programs/locfile.c b/locale/programs/locfile.c | 407 | diff --git a/locale/programs/locfile.c b/locale/programs/locfile.c |
410 | index 0f1affa1d4..7d86fae801 100644 | 408 | index 6c6ebf2dd6..cc02ab82bf 100644 |
411 | --- a/locale/programs/locfile.c | 409 | --- a/locale/programs/locfile.c |
412 | +++ b/locale/programs/locfile.c | 410 | +++ b/locale/programs/locfile.c |
413 | @@ -544,6 +544,9 @@ compare_files (const char *filename1, const char *filename2, size_t size, | 411 | @@ -543,6 +543,9 @@ compare_files (const char *filename1, const char *filename2, size_t size, |
414 | machine running localedef. */ | 412 | machine running localedef. */ |
415 | bool swap_endianness_p; | 413 | bool swap_endianness_p; |
416 | 414 | ||
@@ -420,7 +418,7 @@ index 0f1affa1d4..7d86fae801 100644 | |||
420 | /* When called outside a start_locale_structure/end_locale_structure | 418 | /* When called outside a start_locale_structure/end_locale_structure |
421 | or start_locale_prelude/end_locale_prelude block, record that the | 419 | or start_locale_prelude/end_locale_prelude block, record that the |
422 | next byte in FILE's obstack will be the first byte of a new element. | 420 | next byte in FILE's obstack will be the first byte of a new element. |
423 | @@ -621,7 +624,7 @@ add_locale_string (struct locale_file *file, const char *string) | 421 | @@ -620,7 +623,7 @@ add_locale_string (struct locale_file *file, const char *string) |
424 | void | 422 | void |
425 | add_locale_wstring (struct locale_file *file, const uint32_t *string) | 423 | add_locale_wstring (struct locale_file *file, const uint32_t *string) |
426 | { | 424 | { |
@@ -430,10 +428,10 @@ index 0f1affa1d4..7d86fae801 100644 | |||
430 | 428 | ||
431 | /* Record that FILE's next element is the 32-bit integer VALUE. */ | 429 | /* Record that FILE's next element is the 32-bit integer VALUE. */ |
432 | diff --git a/locale/programs/locfile.h b/locale/programs/locfile.h | 430 | diff --git a/locale/programs/locfile.h b/locale/programs/locfile.h |
433 | index c986d599ec..222a779176 100644 | 431 | index 3afb0a8d29..46785374e8 100644 |
434 | --- a/locale/programs/locfile.h | 432 | --- a/locale/programs/locfile.h |
435 | +++ b/locale/programs/locfile.h | 433 | +++ b/locale/programs/locfile.h |
436 | @@ -71,6 +71,8 @@ extern void write_all_categories (struct localedef_t *definitions, | 434 | @@ -70,6 +70,8 @@ extern void write_all_categories (struct localedef_t *definitions, |
437 | 435 | ||
438 | extern bool swap_endianness_p; | 436 | extern bool swap_endianness_p; |
439 | 437 | ||
@@ -442,7 +440,7 @@ index c986d599ec..222a779176 100644 | |||
442 | /* Change the output to be big-endian if BIG_ENDIAN is true and | 440 | /* Change the output to be big-endian if BIG_ENDIAN is true and |
443 | little-endian otherwise. */ | 441 | little-endian otherwise. */ |
444 | static inline void | 442 | static inline void |
445 | @@ -89,7 +91,8 @@ maybe_swap_uint32 (uint32_t value) | 443 | @@ -88,7 +90,8 @@ maybe_swap_uint32 (uint32_t value) |
446 | } | 444 | } |
447 | 445 | ||
448 | /* Likewise, but munge an array of N uint32_ts starting at ARRAY. */ | 446 | /* Likewise, but munge an array of N uint32_ts starting at ARRAY. */ |
@@ -452,7 +450,7 @@ index c986d599ec..222a779176 100644 | |||
452 | maybe_swap_uint32_array (uint32_t *array, size_t n) | 450 | maybe_swap_uint32_array (uint32_t *array, size_t n) |
453 | { | 451 | { |
454 | if (swap_endianness_p) | 452 | if (swap_endianness_p) |
455 | @@ -99,7 +102,8 @@ maybe_swap_uint32_array (uint32_t *array, size_t n) | 453 | @@ -98,7 +101,8 @@ maybe_swap_uint32_array (uint32_t *array, size_t n) |
456 | 454 | ||
457 | /* Like maybe_swap_uint32_array, but the array of N elements is at | 455 | /* Like maybe_swap_uint32_array, but the array of N elements is at |
458 | the end of OBSTACK's current object. */ | 456 | the end of OBSTACK's current object. */ |
@@ -462,7 +460,7 @@ index c986d599ec..222a779176 100644 | |||
462 | maybe_swap_uint32_obstack (struct obstack *obstack, size_t n) | 460 | maybe_swap_uint32_obstack (struct obstack *obstack, size_t n) |
463 | { | 461 | { |
464 | maybe_swap_uint32_array ((uint32_t *) obstack_next_free (obstack) - n, n); | 462 | maybe_swap_uint32_array ((uint32_t *) obstack_next_free (obstack) - n, n); |
465 | @@ -276,4 +280,55 @@ extern void identification_output (struct localedef_t *locale, | 463 | @@ -275,4 +279,55 @@ extern void identification_output (struct localedef_t *locale, |
466 | const struct charmap_t *charmap, | 464 | const struct charmap_t *charmap, |
467 | const char *output_path); | 465 | const char *output_path); |
468 | 466 | ||
@@ -519,7 +517,7 @@ index c986d599ec..222a779176 100644 | |||
519 | + | 517 | + |
520 | #endif /* locfile.h */ | 518 | #endif /* locfile.h */ |
521 | diff --git a/locale/setlocale.c b/locale/setlocale.c | 519 | diff --git a/locale/setlocale.c b/locale/setlocale.c |
522 | index 19ed85ae8e..f28ca11446 100644 | 520 | index 7bd27e5398..2f194bad7c 100644 |
523 | --- a/locale/setlocale.c | 521 | --- a/locale/setlocale.c |
524 | +++ b/locale/setlocale.c | 522 | +++ b/locale/setlocale.c |
525 | @@ -63,35 +63,6 @@ static char *const _nl_current_used[] = | 523 | @@ -63,35 +63,6 @@ static char *const _nl_current_used[] = |
diff --git a/meta/recipes-core/glibc/glibc/0023-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch b/meta/recipes-core/glibc/glibc/0014-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch index a5a7a0cad7..daeff7b065 100644 --- a/meta/recipes-core/glibc/glibc/0023-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch +++ b/meta/recipes-core/glibc/glibc/0014-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 2ec233ce078b74030de9195096058cd502fdc395 Mon Sep 17 00:00:00 2001 | 1 | From f4b1d6429298c0f8a2aa29ff559eb2093ea0188f Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Fri, 3 Aug 2018 09:42:06 -0700 | 3 | Date: Fri, 3 Aug 2018 09:42:06 -0700 |
4 | Subject: [PATCH] localedef --add-to-archive uses a hard-coded locale path | 4 | Subject: [PATCH] localedef --add-to-archive uses a hard-coded locale path |
@@ -18,10 +18,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
18 | 1 file changed, 25 insertions(+), 10 deletions(-) | 18 | 1 file changed, 25 insertions(+), 10 deletions(-) |
19 | 19 | ||
20 | diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c | 20 | diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c |
21 | index 6bb189ae37..0711c5c44e 100644 | 21 | index 8d79a1b6d1..6dc7ecd4e7 100644 |
22 | --- a/locale/programs/locarchive.c | 22 | --- a/locale/programs/locarchive.c |
23 | +++ b/locale/programs/locarchive.c | 23 | +++ b/locale/programs/locarchive.c |
24 | @@ -340,12 +340,24 @@ enlarge_archive (struct locarhandle *ah, const struct locarhead *head) | 24 | @@ -339,12 +339,24 @@ enlarge_archive (struct locarhandle *ah, const struct locarhead *head) |
25 | struct namehashent *oldnamehashtab; | 25 | struct namehashent *oldnamehashtab; |
26 | struct locarhandle new_ah; | 26 | struct locarhandle new_ah; |
27 | size_t prefix_len = output_prefix ? strlen (output_prefix) : 0; | 27 | size_t prefix_len = output_prefix ? strlen (output_prefix) : 0; |
@@ -51,7 +51,7 @@ index 6bb189ae37..0711c5c44e 100644 | |||
51 | strcpy (stpcpy (fname, archivefname), ".XXXXXX"); | 51 | strcpy (stpcpy (fname, archivefname), ".XXXXXX"); |
52 | 52 | ||
53 | /* Not all of the old file has to be mapped. Change this now this | 53 | /* Not all of the old file has to be mapped. Change this now this |
54 | @@ -569,10 +581,13 @@ open_archive (struct locarhandle *ah, bool readonly) | 54 | @@ -568,10 +580,13 @@ open_archive (struct locarhandle *ah, bool readonly) |
55 | /* If ah has a non-NULL fname open that otherwise open the default. */ | 55 | /* If ah has a non-NULL fname open that otherwise open the default. */ |
56 | if (archivefname == NULL) | 56 | if (archivefname == NULL) |
57 | { | 57 | { |
@@ -69,7 +69,7 @@ index 6bb189ae37..0711c5c44e 100644 | |||
69 | } | 69 | } |
70 | 70 | ||
71 | while (1) | 71 | while (1) |
72 | @@ -585,7 +600,7 @@ open_archive (struct locarhandle *ah, bool readonly) | 72 | @@ -584,7 +599,7 @@ open_archive (struct locarhandle *ah, bool readonly) |
73 | the default locale archive we ignore the failure and | 73 | the default locale archive we ignore the failure and |
74 | list an empty archive, otherwise we print an error | 74 | list an empty archive, otherwise we print an error |
75 | and exit. */ | 75 | and exit. */ |
diff --git a/meta/recipes-core/glibc/glibc/0030-powerpc-Do-not-ask-compiler-for-finding-arch.patch b/meta/recipes-core/glibc/glibc/0015-powerpc-Do-not-ask-compiler-for-finding-arch.patch index 5ef1ac2ed7..8dd1f0a656 100644 --- a/meta/recipes-core/glibc/glibc/0030-powerpc-Do-not-ask-compiler-for-finding-arch.patch +++ b/meta/recipes-core/glibc/glibc/0015-powerpc-Do-not-ask-compiler-for-finding-arch.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 5cc14938f05ae1354c8062f017a21f39d5fc9729 Mon Sep 17 00:00:00 2001 | 1 | From 2d064c0c1243ea0bf405909285d7cddca92cf097 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Fri, 7 Aug 2020 14:31:16 -0700 | 3 | Date: Fri, 7 Aug 2020 14:31:16 -0700 |
4 | Subject: [PATCH] powerpc: Do not ask compiler for finding arch | 4 | Subject: [PATCH] powerpc: Do not ask compiler for finding arch |
@@ -15,7 +15,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
15 | 2 files changed, 2 insertions(+), 8 deletions(-) | 15 | 2 files changed, 2 insertions(+), 8 deletions(-) |
16 | 16 | ||
17 | diff --git a/sysdeps/powerpc/preconfigure b/sysdeps/powerpc/preconfigure | 17 | diff --git a/sysdeps/powerpc/preconfigure b/sysdeps/powerpc/preconfigure |
18 | index dfe8e20399..bbff040f0f 100644 | 18 | index 4de94089a3..428ad7b162 100644 |
19 | --- a/sysdeps/powerpc/preconfigure | 19 | --- a/sysdeps/powerpc/preconfigure |
20 | +++ b/sysdeps/powerpc/preconfigure | 20 | +++ b/sysdeps/powerpc/preconfigure |
21 | @@ -29,10 +29,7 @@ esac | 21 | @@ -29,10 +29,7 @@ esac |
diff --git a/meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch b/meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch deleted file mode 100644 index 79bd704153..0000000000 --- a/meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | From 3feb4213628f1485000ffe1d3fd26e37a7b14336 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 18 Mar 2015 00:33:03 +0000 | ||
4 | Subject: [PATCH] timezone: re-written tzselect as posix sh | ||
5 | |||
6 | To avoid the bash dependency. | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | timezone/Makefile | 2 +- | ||
14 | timezone/tzselect.ksh | 2 +- | ||
15 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/timezone/Makefile b/timezone/Makefile | ||
18 | index 395abfeebd..2d939edf75 100644 | ||
19 | --- a/timezone/Makefile | ||
20 | +++ b/timezone/Makefile | ||
21 | @@ -123,7 +123,7 @@ $(testdata)/XT%: testdata/XT% | ||
22 | cp $< $@ | ||
23 | |||
24 | $(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make | ||
25 | - sed -e 's|/bin/bash|$(BASH)|' \ | ||
26 | + sed -e 's|/bin/bash|/bin/sh|' \ | ||
27 | -e 's|TZDIR=[^}]*|TZDIR=$(zonedir)|' \ | ||
28 | -e '/TZVERSION=/s|see_Makefile|"$(version)"|' \ | ||
29 | -e '/PKGVERSION=/s|=.*|="$(PKGVERSION)"|' \ | ||
30 | diff --git a/timezone/tzselect.ksh b/timezone/tzselect.ksh | ||
31 | index 18fce27e24..70745f9d36 100755 | ||
32 | --- a/timezone/tzselect.ksh | ||
33 | +++ b/timezone/tzselect.ksh | ||
34 | @@ -34,7 +34,7 @@ REPORT_BUGS_TO=tz@iana.org | ||
35 | |||
36 | # Specify default values for environment variables if they are unset. | ||
37 | : ${AWK=awk} | ||
38 | -: ${TZDIR=`pwd`} | ||
39 | +: ${TZDIR=$(pwd)} | ||
40 | |||
41 | # Output one argument as-is to standard output. | ||
42 | # Safer than 'echo', which can mishandle '\' or leading '-'. | ||
diff --git a/meta/recipes-core/glibc/glibc/0016-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch b/meta/recipes-core/glibc/glibc/0016-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch new file mode 100644 index 0000000000..066c3b1ea2 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0016-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch | |||
@@ -0,0 +1,49 @@ | |||
1 | From b1c374f7ede81a98f2d02def2c7ca17f1001f7cb Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 15 May 2020 17:05:45 -0700 | ||
4 | Subject: [PATCH] wordsize.h: Unify the header between arm and aarch64 | ||
5 | |||
6 | This helps OE multilibs to not sythesize this header which causes all | ||
7 | kind of recursions and other issues since wordsize is fundamental header | ||
8 | and ends up including itself in many case e.g. clang tidy, bpf etc. | ||
9 | |||
10 | Upstream-Status: Inappropriate [ OE-Specific ] | ||
11 | |||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | --- | ||
14 | sysdeps/aarch64/bits/wordsize.h | 8 ++++++-- | ||
15 | sysdeps/arm/bits/wordsize.h | 1 + | ||
16 | 2 files changed, 7 insertions(+), 2 deletions(-) | ||
17 | create mode 120000 sysdeps/arm/bits/wordsize.h | ||
18 | |||
19 | diff --git a/sysdeps/aarch64/bits/wordsize.h b/sysdeps/aarch64/bits/wordsize.h | ||
20 | index 118e59172d..b4b0692eb5 100644 | ||
21 | --- a/sysdeps/aarch64/bits/wordsize.h | ||
22 | +++ b/sysdeps/aarch64/bits/wordsize.h | ||
23 | @@ -17,12 +17,16 @@ | ||
24 | License along with the GNU C Library; if not, see | ||
25 | <https://www.gnu.org/licenses/>. */ | ||
26 | |||
27 | -#ifdef __LP64__ | ||
28 | +#if defined (__aarch64__) && defined (__LP64__) | ||
29 | # define __WORDSIZE 64 | ||
30 | -#else | ||
31 | +#elif defined (__aarch64__) | ||
32 | # define __WORDSIZE 32 | ||
33 | # define __WORDSIZE32_SIZE_ULONG 1 | ||
34 | # define __WORDSIZE32_PTRDIFF_LONG 1 | ||
35 | +#else | ||
36 | +# define __WORDSIZE 32 | ||
37 | +# define __WORDSIZE32_SIZE_ULONG 0 | ||
38 | +# define __WORDSIZE32_PTRDIFF_LONG 0 | ||
39 | #endif | ||
40 | |||
41 | #define __WORDSIZE_TIME64_COMPAT32 0 | ||
42 | diff --git a/sysdeps/arm/bits/wordsize.h b/sysdeps/arm/bits/wordsize.h | ||
43 | new file mode 120000 | ||
44 | index 0000000000..4c4a788ec2 | ||
45 | --- /dev/null | ||
46 | +++ b/sysdeps/arm/bits/wordsize.h | ||
47 | @@ -0,0 +1 @@ | ||
48 | +../../aarch64/bits/wordsize.h | ||
49 | \ No newline at end of file | ||
diff --git a/meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch b/meta/recipes-core/glibc/glibc/0017-Replace-echo-with-printf-builtin-in-nscd-init-script.patch index c32d70b593..d8c0b1b4ad 100644 --- a/meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch +++ b/meta/recipes-core/glibc/glibc/0017-Replace-echo-with-printf-builtin-in-nscd-init-script.patch | |||
@@ -1,21 +1,22 @@ | |||
1 | From f6119b98a9caa80642d69a97edc98f57ecef5c3c Mon Sep 17 00:00:00 2001 | 1 | From 0aac3b8ee5b13e289b6969da51de384443286a5b Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Thu, 31 Dec 2015 14:33:02 -0800 | 3 | Date: Thu, 31 Dec 2015 14:33:02 -0800 |
4 | Subject: [PATCH] Remove bash dependency for nscd init script | 4 | Subject: [PATCH] Replace echo with printf builtin in nscd init script |
5 | 5 | ||
6 | The nscd init script uses #! /bin/bash but only really uses one bashism | 6 | The nscd init script calls for #! /bin/bash interpreter |
7 | (translated strings), so remove them and switch the shell to #!/bin/sh. | 7 | since it uses bash specific extentions namely (translated strings) |
8 | and echo -n command, replace echo with printf and | ||
9 | switch the shell interpreter to #!/bin/sh. | ||
8 | 10 | ||
9 | Upstream-Status: Pending | 11 | Upstream-Status: Pending |
10 | 12 | Signed-off-by: Ross Burton <ross.burton@arm.com> | |
11 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
13 | --- | 14 | --- |
14 | nscd/nscd.init | 14 +++++++------- | 15 | nscd/nscd.init | 20 ++++++++++---------- |
15 | 1 file changed, 7 insertions(+), 7 deletions(-) | 16 | 1 file changed, 10 insertions(+), 10 deletions(-) |
16 | 17 | ||
17 | diff --git a/nscd/nscd.init b/nscd/nscd.init | 18 | diff --git a/nscd/nscd.init b/nscd/nscd.init |
18 | index a882da7d8b..b02986ec15 100644 | 19 | index a882da7d8b..857b541381 100644 |
19 | --- a/nscd/nscd.init | 20 | --- a/nscd/nscd.init |
20 | +++ b/nscd/nscd.init | 21 | +++ b/nscd/nscd.init |
21 | @@ -1,4 +1,4 @@ | 22 | @@ -1,4 +1,4 @@ |
@@ -24,25 +25,27 @@ index a882da7d8b..b02986ec15 100644 | |||
24 | # | 25 | # |
25 | # nscd: Starts the Name Switch Cache Daemon | 26 | # nscd: Starts the Name Switch Cache Daemon |
26 | # | 27 | # |
27 | @@ -49,7 +49,7 @@ prog=nscd | 28 | @@ -49,16 +49,16 @@ prog=nscd |
28 | start () { | 29 | start () { |
29 | [ -d /var/run/nscd ] || mkdir /var/run/nscd | 30 | [ -d /var/run/nscd ] || mkdir /var/run/nscd |
30 | [ -d /var/db/nscd ] || mkdir /var/db/nscd | 31 | [ -d /var/db/nscd ] || mkdir /var/db/nscd |
31 | - echo -n $"Starting $prog: " | 32 | - echo -n $"Starting $prog: " |
32 | + echo -n "Starting $prog: " | 33 | + printf "Starting $prog: " |
33 | daemon /usr/sbin/nscd | 34 | daemon /usr/sbin/nscd |
34 | RETVAL=$? | 35 | RETVAL=$? |
35 | echo | 36 | - echo |
36 | @@ -58,7 +58,7 @@ start () { | 37 | + printf "\n" |
38 | [ $RETVAL -eq 0 ] && touch /var/lock/subsys/nscd | ||
39 | return $RETVAL | ||
37 | } | 40 | } |
38 | 41 | ||
39 | stop () { | 42 | stop () { |
40 | - echo -n $"Stopping $prog: " | 43 | - echo -n $"Stopping $prog: " |
41 | + echo -n "Stopping $prog: " | 44 | + printf "Stopping $prog: " |
42 | /usr/sbin/nscd -K | 45 | /usr/sbin/nscd -K |
43 | RETVAL=$? | 46 | RETVAL=$? |
44 | if [ $RETVAL -eq 0 ]; then | 47 | if [ $RETVAL -eq 0 ]; then |
45 | @@ -67,9 +67,9 @@ stop () { | 48 | @@ -67,11 +67,11 @@ stop () { |
46 | # a non-privileged user | 49 | # a non-privileged user |
47 | rm -f /var/run/nscd/nscd.pid | 50 | rm -f /var/run/nscd/nscd.pid |
48 | rm -f /var/run/nscd/socket | 51 | rm -f /var/run/nscd/socket |
@@ -52,21 +55,25 @@ index a882da7d8b..b02986ec15 100644 | |||
52 | - failure $"$prog shutdown" | 55 | - failure $"$prog shutdown" |
53 | + failure "$prog shutdown" | 56 | + failure "$prog shutdown" |
54 | fi | 57 | fi |
55 | echo | 58 | - echo |
59 | + printf "\n" | ||
56 | return $RETVAL | 60 | return $RETVAL |
61 | } | ||
62 | |||
57 | @@ -103,13 +103,13 @@ case "$1" in | 63 | @@ -103,13 +103,13 @@ case "$1" in |
58 | RETVAL=$? | 64 | RETVAL=$? |
59 | ;; | 65 | ;; |
60 | force-reload | reload) | 66 | force-reload | reload) |
61 | - echo -n $"Reloading $prog: " | 67 | - echo -n $"Reloading $prog: " |
62 | + echo -n "Reloading $prog: " | 68 | + printf "Reloading $prog: " |
63 | killproc /usr/sbin/nscd -HUP | 69 | killproc /usr/sbin/nscd -HUP |
64 | RETVAL=$? | 70 | RETVAL=$? |
65 | echo | 71 | - echo |
72 | + printf "\n" | ||
66 | ;; | 73 | ;; |
67 | *) | 74 | *) |
68 | - echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}" | 75 | - echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}" |
69 | + echo "Usage: $0 {start|stop|status|restart|reload|condrestart}" | 76 | + printf "Usage: $0 {start|stop|status|restart|reload|condrestart}\n" |
70 | RETVAL=1 | 77 | RETVAL=1 |
71 | ;; | 78 | ;; |
72 | esac | 79 | esac |
diff --git a/meta/recipes-core/glibc/glibc/0014-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch b/meta/recipes-core/glibc/glibc/0018-sysdeps-gnu-configure.ac-Set-libc_cv_rootsbindir-onl.patch index 4da0e003c0..c81f82f433 100644 --- a/meta/recipes-core/glibc/glibc/0014-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch +++ b/meta/recipes-core/glibc/glibc/0018-sysdeps-gnu-configure.ac-Set-libc_cv_rootsbindir-onl.patch | |||
@@ -1,11 +1,12 @@ | |||
1 | From c062a462fee53a30a85d693c8288b5bd8fe4ec6e Mon Sep 17 00:00:00 2001 | 1 | From 7a25d4796411f22f824742092a4c2a08df99752d Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Wed, 18 Mar 2015 00:27:10 +0000 | 3 | Date: Wed, 18 Mar 2015 00:27:10 +0000 |
4 | Subject: [PATCH] sysdeps/gnu/configure.ac: handle correctly | 4 | Subject: [PATCH] sysdeps/gnu/configure.ac: Set libc_cv_rootsbindir only if its |
5 | $libc_cv_rootsbindir | 5 | empty |
6 | 6 | ||
7 | Upstream-Status:Pending | 7 | This ensures that it can be set in build environment |
8 | 8 | ||
9 | Upstream-Status: Pending | ||
9 | Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com> | 10 | Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com> |
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
11 | --- | 12 | --- |
@@ -14,19 +15,20 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
14 | 2 files changed, 2 insertions(+), 2 deletions(-) | 15 | 2 files changed, 2 insertions(+), 2 deletions(-) |
15 | 16 | ||
16 | diff --git a/sysdeps/gnu/configure b/sysdeps/gnu/configure | 17 | diff --git a/sysdeps/gnu/configure b/sysdeps/gnu/configure |
17 | index c15d1087e8..37cc983f2a 100644 | 18 | index 18c9d7945a..ef22cc845d 100644 |
18 | --- a/sysdeps/gnu/configure | 19 | --- a/sysdeps/gnu/configure |
19 | +++ b/sysdeps/gnu/configure | 20 | +++ b/sysdeps/gnu/configure |
20 | @@ -32,6 +32,6 @@ case "$prefix" in | 21 | @@ -32,7 +32,7 @@ case "$prefix" in |
21 | else | 22 | else |
22 | libc_cv_localstatedir=$localstatedir | 23 | libc_cv_localstatedir=$localstatedir |
23 | fi | 24 | fi |
24 | - libc_cv_rootsbindir=/sbin | 25 | - libc_cv_rootsbindir=/sbin |
25 | + test -n "$libc_cv_rootsbindir" || libc_cv_rootsbindir=/sbin | 26 | + libc_cv_rootsbindir=${libc_cv_rootsbindir:=/sbin} |
26 | ;; | 27 | ;; |
27 | esac | 28 | esac |
29 | |||
28 | diff --git a/sysdeps/gnu/configure.ac b/sysdeps/gnu/configure.ac | 30 | diff --git a/sysdeps/gnu/configure.ac b/sysdeps/gnu/configure.ac |
29 | index 634fe4de2a..3db1697f4f 100644 | 31 | index 634fe4de2a..492112e0fd 100644 |
30 | --- a/sysdeps/gnu/configure.ac | 32 | --- a/sysdeps/gnu/configure.ac |
31 | +++ b/sysdeps/gnu/configure.ac | 33 | +++ b/sysdeps/gnu/configure.ac |
32 | @@ -21,6 +21,6 @@ case "$prefix" in | 34 | @@ -21,6 +21,6 @@ case "$prefix" in |
@@ -34,6 +36,6 @@ index 634fe4de2a..3db1697f4f 100644 | |||
34 | libc_cv_localstatedir=$localstatedir | 36 | libc_cv_localstatedir=$localstatedir |
35 | fi | 37 | fi |
36 | - libc_cv_rootsbindir=/sbin | 38 | - libc_cv_rootsbindir=/sbin |
37 | + test -n "$libc_cv_rootsbindir" || libc_cv_rootsbindir=/sbin | 39 | + libc_cv_rootsbindir=${libc_cv_rootsbindir:=/sbin} |
38 | ;; | 40 | ;; |
39 | esac | 41 | esac |
diff --git a/meta/recipes-core/glibc/glibc/0019-timezone-Make-shell-interpreter-overridable-in-tzsel.patch b/meta/recipes-core/glibc/glibc/0019-timezone-Make-shell-interpreter-overridable-in-tzsel.patch new file mode 100644 index 0000000000..d724c3e968 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0019-timezone-Make-shell-interpreter-overridable-in-tzsel.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | From 6aa1b835d95482287851e02abd3a406cbd0ef8c7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 9 Dec 2021 15:14:42 -0800 | ||
4 | Subject: [PATCH] timezone: Make shell interpreter overridable in tzselect.ksh | ||
5 | |||
6 | define new macro called KSHELL which can be used to define default shell | ||
7 | use Bash by default | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | Makeconfig | 9 +++++++++ | ||
13 | timezone/Makefile | 1 + | ||
14 | 2 files changed, 10 insertions(+) | ||
15 | |||
16 | diff --git a/Makeconfig b/Makeconfig | ||
17 | index 85e00cef94..643724108a 100644 | ||
18 | --- a/Makeconfig | ||
19 | +++ b/Makeconfig | ||
20 | @@ -309,6 +309,15 @@ ifndef sysincludedir | ||
21 | sysincludedir = /usr/include | ||
22 | endif | ||
23 | |||
24 | +# The full path name of a Posix-compliant shell, preferably one that supports | ||
25 | +# the Korn shell's 'select' statement as an extension. | ||
26 | +# These days, Bash is the most popular. | ||
27 | +# It should be OK to set this to /bin/sh, on platforms where /bin/sh | ||
28 | +# lacks 'select' or doesn't completely conform to Posix, but /bin/bash | ||
29 | +# is typically nicer if it works. | ||
30 | +ifndef KSHELL | ||
31 | +KSHELL = /bin/bash | ||
32 | +endif | ||
33 | |||
34 | # Commands to install files. | ||
35 | ifndef INSTALL_DATA | ||
36 | diff --git a/timezone/Makefile b/timezone/Makefile | ||
37 | index d7acb387ba..ec79326f66 100644 | ||
38 | --- a/timezone/Makefile | ||
39 | +++ b/timezone/Makefile | ||
40 | @@ -136,6 +136,7 @@ $(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make | ||
41 | -e '/TZVERSION=/s|see_Makefile|"$(version)"|' \ | ||
42 | -e '/PKGVERSION=/s|=.*|="$(PKGVERSION)"|' \ | ||
43 | -e '/REPORT_BUGS_TO=/s|=.*|="$(REPORT_BUGS_TO)"|' \ | ||
44 | + -e 's|#!/bin/bash|#!$(KSHELL)|g' \ | ||
45 | < $< > $@.new | ||
46 | chmod 555 $@.new | ||
47 | mv -f $@.new $@ | ||
diff --git a/meta/recipes-core/glibc/glibc/0020-tzselect.ksh-Use-bin-sh-default-shell-interpreter.patch b/meta/recipes-core/glibc/glibc/0020-tzselect.ksh-Use-bin-sh-default-shell-interpreter.patch new file mode 100644 index 0000000000..08c60a271b --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0020-tzselect.ksh-Use-bin-sh-default-shell-interpreter.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | From ef47e6199986c4951e681ed74f064042db1ae2e1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 15 Dec 2021 21:47:53 -0800 | ||
4 | Subject: [PATCH] tzselect.ksh: Use /bin/sh default shell interpreter | ||
5 | |||
6 | checkbashism reports no issues with tzselect.ksh, therefore using | ||
7 | /bin/sh instead of /bin/bash should be safe and portable across systems | ||
8 | which don't ship bash ( embedded systems ) | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | Cc: Adhemerval Zanella <adhemerval.zanella@linaro.org> | ||
13 | Cc: Paul Eggert <eggert@cs.ucla.edu> | ||
14 | --- | ||
15 | timezone/tzselect.ksh | 2 +- | ||
16 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/timezone/tzselect.ksh b/timezone/tzselect.ksh | ||
19 | index 18fce27e24..cc08efb0fb 100755 | ||
20 | --- a/timezone/tzselect.ksh | ||
21 | +++ b/timezone/tzselect.ksh | ||
22 | @@ -1,4 +1,4 @@ | ||
23 | -#!/bin/bash | ||
24 | +#!/bin/sh | ||
25 | # Ask the user about the time zone, and output the resulting TZ value to stdout. | ||
26 | # Interact with the user via stderr and stdin. | ||
27 | |||
diff --git a/meta/recipes-core/glibc/glibc/0021-fix-create-thread-failed-in-unprivileged-process-BZ-.patch b/meta/recipes-core/glibc/glibc/0021-fix-create-thread-failed-in-unprivileged-process-BZ-.patch new file mode 100644 index 0000000000..d57dce125c --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0021-fix-create-thread-failed-in-unprivileged-process-BZ-.patch | |||
@@ -0,0 +1,86 @@ | |||
1 | From 7254706544be5100843fc0a332e836fccffc9ef1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Sun, 29 Aug 2021 20:49:16 +0800 | ||
4 | Subject: [PATCH] fix create thread failed in unprivileged process [BZ #28287] | ||
5 | |||
6 | Since commit [d8ea0d0168 Add an internal wrapper for clone, clone2 and clone3] | ||
7 | applied, start a unprivileged container (docker run without --privileged), | ||
8 | it creates a thread failed in container. | ||
9 | |||
10 | In commit d8ea0d0168, it calls __clone3 if HAVE_CLONE3_WAPPER is defined. If | ||
11 | __clone3 returns -1 with ENOSYS, fall back to clone or clone2. | ||
12 | |||
13 | As known from [1], cloneXXX fails with EPERM if CLONE_NEWCGROUP, | ||
14 | CLONE_NEWIPC, CLONE_NEWNET, CLONE_NEWNS, CLONE_NEWPID, or CLONE_NEWUTS | ||
15 | was specified by an unprivileged process (process without CAP_SYS_ADMIN) | ||
16 | |||
17 | [1] https://man7.org/linux/man-pages/man2/clone3.2.html | ||
18 | |||
19 | So if __clone3 returns -1 with EPERM, fall back to clone or clone2 could | ||
20 | fix the issue. Here are the test steps: | ||
21 | |||
22 | 1) Prepare test code | ||
23 | cat > conftest.c <<ENDOF | ||
24 | #include <pthread.h> | ||
25 | #include <stdio.h> | ||
26 | |||
27 | int check_me = 0; | ||
28 | void* func(void* data) {check_me = 42; printf("start thread: check_me %d\n", check_me); return &check_me;} | ||
29 | int main() | ||
30 | { | ||
31 | pthread_t t; | ||
32 | void *ret; | ||
33 | pthread_create (&t, 0, func, 0); | ||
34 | pthread_join (t, &ret); | ||
35 | printf("check_me %d, p %p\n", check_me, &ret); | ||
36 | return (check_me != 42 || ret != &check_me); | ||
37 | } | ||
38 | |||
39 | ENDOF | ||
40 | |||
41 | 2) Compile | ||
42 | gcc -o conftest -pthread conftest.c | ||
43 | |||
44 | 3) Start a container with glibc 2.34 installed | ||
45 | [skip details] | ||
46 | docker run -it <container-image-name> bash | ||
47 | |||
48 | 4) Run conftest without this patch | ||
49 | $ ./conftest | ||
50 | check_me 0, p 0x7ffd91ccd400 | ||
51 | |||
52 | 5) Run conftest with this patch | ||
53 | $ ./conftest | ||
54 | start thread: check_me 42 | ||
55 | check_me 42, p 0x7ffe253c6f20 | ||
56 | |||
57 | Upstream-Status: Inappropriate [Rejected by upstream] | ||
58 | |||
59 | Upstream glibc rejected it because the latest docker has resolved the issue [1], | ||
60 | and upstream glibc does not backward compatibility with old docker[2] | ||
61 | |||
62 | In order to build Yocto with uninative in old docker, we need this local | ||
63 | patch | ||
64 | |||
65 | [1] https://github.com/moby/moby/commit/9f6b562dd12ef7b1f9e2f8e6f2ab6477790a6594 | ||
66 | [2] https://sourceware.org/pipermail/libc-alpha/2021-August/130590.html | ||
67 | |||
68 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
69 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
70 | --- | ||
71 | sysdeps/unix/sysv/linux/clone-internal.c | 2 +- | ||
72 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
73 | |||
74 | diff --git a/sysdeps/unix/sysv/linux/clone-internal.c b/sysdeps/unix/sysv/linux/clone-internal.c | ||
75 | index 40ef30303f..f97b1f6900 100644 | ||
76 | --- a/sysdeps/unix/sysv/linux/clone-internal.c | ||
77 | +++ b/sysdeps/unix/sysv/linux/clone-internal.c | ||
78 | @@ -98,7 +98,7 @@ __clone_internal (struct clone_args *cl_args, | ||
79 | #ifdef HAVE_CLONE3_WRAPPER | ||
80 | int saved_errno = errno; | ||
81 | int ret = __clone3_internal (cl_args, func, arg); | ||
82 | - if (ret != -1 || errno != ENOSYS) | ||
83 | + if (ret != -1 || (errno != ENOSYS && errno != EPERM)) | ||
84 | return ret; | ||
85 | |||
86 | /* NB: Restore errno since errno may be checked against non-zero | ||
diff --git a/meta/recipes-core/glibc/glibc/0022-Avoid-hardcoded-build-time-paths-in-the-output-binar.patch b/meta/recipes-core/glibc/glibc/0022-Avoid-hardcoded-build-time-paths-in-the-output-binar.patch new file mode 100644 index 0000000000..b527ddffc8 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0022-Avoid-hardcoded-build-time-paths-in-the-output-binar.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From d39779afc72d34f87f052097592008cc38e20615 Mon Sep 17 00:00:00 2001 | ||
2 | From: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
3 | Date: Sun, 24 Jul 2022 07:07:29 -0700 | ||
4 | Subject: [PATCH] Avoid hardcoded build time paths in the output binaries | ||
5 | |||
6 | replace the compile definitions with the output locations. | ||
7 | |||
8 | Upstream-Status: Inappropriate [would need reworking somehow to be acceptable upstream] | ||
9 | |||
10 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | support/Makefile | 6 +++--- | ||
14 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
15 | |||
16 | diff --git a/support/Makefile b/support/Makefile | ||
17 | index 362a51f882..56d2b37058 100644 | ||
18 | --- a/support/Makefile | ||
19 | +++ b/support/Makefile | ||
20 | @@ -228,9 +228,9 @@ libsupport-inhibit-o += .o | ||
21 | endif | ||
22 | |||
23 | CFLAGS-support_paths.c = \ | ||
24 | - -DSRCDIR_PATH=\"`cd .. ; pwd`\" \ | ||
25 | - -DOBJDIR_PATH=\"`cd $(objpfx)/..; pwd`\" \ | ||
26 | - -DOBJDIR_ELF_LDSO_PATH=\"`cd $(objpfx)/..; pwd`/elf/$(rtld-installed-name)\" \ | ||
27 | + -DSRCDIR_PATH=\"$(oe_srcdir)\" \ | ||
28 | + -DOBJDIR_PATH=\"$(libdir)/glibc-tests/ptest/tests/glibc-ptest\" \ | ||
29 | + -DOBJDIR_ELF_LDSO_PATH=\"$(slibdir)/$(rtld-installed-name)\" \ | ||
30 | -DINSTDIR_PATH=\"$(prefix)\" \ | ||
31 | -DLIBDIR_PATH=\"$(libdir)\" \ | ||
32 | -DBINDIR_PATH=\"$(bindir)\" \ | ||
diff --git a/meta/recipes-core/glibc/glibc/0022-Define-DUMMY_LOCALE_T-if-not-defined.patch b/meta/recipes-core/glibc/glibc/0022-Define-DUMMY_LOCALE_T-if-not-defined.patch deleted file mode 100644 index 33d912d356..0000000000 --- a/meta/recipes-core/glibc/glibc/0022-Define-DUMMY_LOCALE_T-if-not-defined.patch +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | From c8df3cf4556d8d78a98675865395ce42f3b67109 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 20 Apr 2016 21:11:00 -0700 | ||
4 | Subject: [PATCH] Define DUMMY_LOCALE_T if not defined | ||
5 | |||
6 | This is a hack to fix building the locale bits on an older | ||
7 | CentOs 5.X machine | ||
8 | |||
9 | Upstream-Status: Inappropriate [other] | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | locale/programs/config.h | 3 +++ | ||
14 | 1 file changed, 3 insertions(+) | ||
15 | |||
16 | diff --git a/locale/programs/config.h b/locale/programs/config.h | ||
17 | index 2edcf3696c..5350101e38 100644 | ||
18 | --- a/locale/programs/config.h | ||
19 | +++ b/locale/programs/config.h | ||
20 | @@ -19,6 +19,9 @@ | ||
21 | #ifndef _LD_CONFIG_H | ||
22 | #define _LD_CONFIG_H 1 | ||
23 | |||
24 | +#ifndef DUMMY_LOCALE_T | ||
25 | +#define DUMMY_LOCALE_T | ||
26 | +#endif | ||
27 | /* Use the internal textdomain used for libc messages. */ | ||
28 | #define PACKAGE _libc_intl_domainname | ||
29 | #ifndef VERSION | ||
diff --git a/meta/recipes-core/glibc/glibc/0023-aarch64-configure-Pass-mcpu-along-with-march-to-dete.patch b/meta/recipes-core/glibc/glibc/0023-aarch64-configure-Pass-mcpu-along-with-march-to-dete.patch new file mode 100644 index 0000000000..f6523c5498 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0023-aarch64-configure-Pass-mcpu-along-with-march-to-dete.patch | |||
@@ -0,0 +1,62 @@ | |||
1 | From 73c26018ed0ecd9c807bb363cc2c2ab4aca66a82 Mon Sep 17 00:00:00 2001 | ||
2 | From: Szabolcs Nagy <szabolcs.nagy@arm.com> | ||
3 | Date: Wed, 13 Mar 2024 14:34:14 +0000 | ||
4 | Subject: [PATCH] aarch64: fix check for SVE support in assembler | ||
5 | |||
6 | Due to GCC bug 110901 -mcpu can override -march setting when compiling | ||
7 | asm code and thus a compiler targetting a specific cpu can fail the | ||
8 | configure check even when binutils gas supports SVE. | ||
9 | |||
10 | The workaround is that explicit .arch directive overrides both -mcpu | ||
11 | and -march, and since that's what the actual SVE memcpy uses the | ||
12 | configure check should use that too even if the GCC issue is fixed | ||
13 | independently. | ||
14 | |||
15 | Upstream-Status: Backport [https://sourceware.org/git/?p=glibc.git;a=commit;h=73c26018ed0ecd9c807bb363cc2c2ab4aca66a82] | ||
16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
17 | Reviewed-by: Florian Weimer <fweimer@redhat.com> | ||
18 | --- | ||
19 | sysdeps/aarch64/configure | 5 +++-- | ||
20 | sysdeps/aarch64/configure.ac | 5 +++-- | ||
21 | 2 files changed, 6 insertions(+), 4 deletions(-) | ||
22 | mode change 100644 => 100755 sysdeps/aarch64/configure | ||
23 | |||
24 | diff --git a/sysdeps/aarch64/configure b/sysdeps/aarch64/configure | ||
25 | old mode 100644 | ||
26 | new mode 100755 | ||
27 | index ca57edce47..9606137e8d | ||
28 | --- a/sysdeps/aarch64/configure | ||
29 | +++ b/sysdeps/aarch64/configure | ||
30 | @@ -325,9 +325,10 @@ then : | ||
31 | printf %s "(cached) " >&6 | ||
32 | else $as_nop | ||
33 | cat > conftest.s <<\EOF | ||
34 | - ptrue p0.b | ||
35 | + .arch armv8.2-a+sve | ||
36 | + ptrue p0.b | ||
37 | EOF | ||
38 | -if { ac_try='${CC-cc} -c -march=armv8.2-a+sve conftest.s 1>&5' | ||
39 | +if { ac_try='${CC-cc} -c conftest.s 1>&5' | ||
40 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 | ||
41 | (eval $ac_try) 2>&5 | ||
42 | ac_status=$? | ||
43 | diff --git a/sysdeps/aarch64/configure.ac b/sysdeps/aarch64/configure.ac | ||
44 | index 27874eceb4..56d12d661d 100644 | ||
45 | --- a/sysdeps/aarch64/configure.ac | ||
46 | +++ b/sysdeps/aarch64/configure.ac | ||
47 | @@ -90,9 +90,10 @@ LIBC_CONFIG_VAR([aarch64-variant-pcs], [$libc_cv_aarch64_variant_pcs]) | ||
48 | # Check if asm support armv8.2-a+sve | ||
49 | AC_CACHE_CHECK([for SVE support in assembler], [libc_cv_aarch64_sve_asm], [dnl | ||
50 | cat > conftest.s <<\EOF | ||
51 | - ptrue p0.b | ||
52 | + .arch armv8.2-a+sve | ||
53 | + ptrue p0.b | ||
54 | EOF | ||
55 | -if AC_TRY_COMMAND(${CC-cc} -c -march=armv8.2-a+sve conftest.s 1>&AS_MESSAGE_LOG_FD); then | ||
56 | +if AC_TRY_COMMAND(${CC-cc} -c conftest.s 1>&AS_MESSAGE_LOG_FD); then | ||
57 | libc_cv_aarch64_sve_asm=yes | ||
58 | else | ||
59 | libc_cv_aarch64_sve_asm=no | ||
60 | -- | ||
61 | 2.44.0 | ||
62 | |||
diff --git a/meta/recipes-core/glibc/glibc/0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch b/meta/recipes-core/glibc/glibc/0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch deleted file mode 100644 index d2691e1ee7..0000000000 --- a/meta/recipes-core/glibc/glibc/0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | From f8289aa320b00f6db43213979cceab2325a7a611 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Hatle <mark.hatle@windriver.com> | ||
3 | Date: Thu, 18 Aug 2016 14:07:58 -0500 | ||
4 | Subject: [PATCH] elf/dl-deps.c: Make _dl_build_local_scope breadth first | ||
5 | |||
6 | According to the ELF specification: | ||
7 | |||
8 | When resolving symbolic references, the dynamic linker examines the symbol | ||
9 | tables with a breadth-first search. | ||
10 | |||
11 | This function was using a depth first search. By doing so the conflict | ||
12 | resolution reported to the prelinker (when LD_TRACE_PRELINKING=1 is set) | ||
13 | was incorrect. This caused problems when their were various circular | ||
14 | dependencies between libraries. The problem usually manifested itself by | ||
15 | the wrong IFUNC being executed. | ||
16 | |||
17 | [BZ# 20488] | ||
18 | |||
19 | Upstream-Status: Submitted [libc-alpha] | ||
20 | |||
21 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
22 | --- | ||
23 | elf/dl-deps.c | 14 ++++++++++---- | ||
24 | 1 file changed, 10 insertions(+), 4 deletions(-) | ||
25 | |||
26 | diff --git a/elf/dl-deps.c b/elf/dl-deps.c | ||
27 | index 087a49b212..c09f9334f2 100644 | ||
28 | --- a/elf/dl-deps.c | ||
29 | +++ b/elf/dl-deps.c | ||
30 | @@ -73,13 +73,19 @@ _dl_build_local_scope (struct link_map **list, struct link_map *map) | ||
31 | { | ||
32 | struct link_map **p = list; | ||
33 | struct link_map **q; | ||
34 | + struct link_map **r; | ||
35 | |||
36 | *p++ = map; | ||
37 | map->l_reserved = 1; | ||
38 | - if (map->l_initfini) | ||
39 | - for (q = map->l_initfini + 1; *q; ++q) | ||
40 | - if (! (*q)->l_reserved) | ||
41 | - p += _dl_build_local_scope (p, *q); | ||
42 | + | ||
43 | + for (r = list; r < p; ++r) | ||
44 | + if ((*r)->l_initfini) | ||
45 | + for (q = (*r)->l_initfini + 1; *q; ++q) | ||
46 | + if (! (*q)->l_reserved) | ||
47 | + { | ||
48 | + *p++ = *q; | ||
49 | + (*q)->l_reserved = 1; | ||
50 | + } | ||
51 | return p - list; | ||
52 | } | ||
53 | |||
diff --git a/meta/recipes-core/glibc/glibc/0024-qemu-stale-process.patch b/meta/recipes-core/glibc/glibc/0024-qemu-stale-process.patch new file mode 100644 index 0000000000..c0a467fcec --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0024-qemu-stale-process.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | glibc: Skip 2 qemu tests that can hang in oe-selftest | ||
2 | |||
3 | qemumips and qemuppc were leaving stale processes behind after | ||
4 | running glibc oe-selftest. During analysis, it was found that | ||
5 | it was due to "tst-scm_rights" and "tst-scm_rights-time64" tests. | ||
6 | Disable them so that there are no stale processes left behind. | ||
7 | |||
8 | [YOCTO #15423] | ||
9 | https://bugzilla.yoctoproject.org/show_bug.cgi?id=15423 | ||
10 | |||
11 | Upstream-Status: Inappropriate [oe-core specific] | ||
12 | Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> | ||
13 | --- | ||
14 | diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile | ||
15 | --- a/sysdeps/unix/sysv/linux/Makefile 2024-03-18 01:15:49.019202881 -0700 | ||
16 | +++ b/sysdeps/unix/sysv/linux/Makefile 2024-03-14 06:26:18.581404107 -0700 | ||
17 | @@ -222,7 +222,6 @@ | ||
18 | tst-process_mrelease \ | ||
19 | tst-quota \ | ||
20 | tst-rlimit-infinity \ | ||
21 | - tst-scm_rights \ | ||
22 | tst-sigtimedwait \ | ||
23 | tst-sync_file_range \ | ||
24 | tst-sysconf-iov_max \ | ||
25 | @@ -233,6 +232,8 @@ | ||
26 | tst-timerfd \ | ||
27 | tst-ttyname-direct \ | ||
28 | tst-ttyname-namespace \ | ||
29 | + # Skip this test to avoid stale qemu process | ||
30 | + # tst-scm_rights \ | ||
31 | # tests | ||
32 | |||
33 | # process_madvise requires CAP_SYS_ADMIN. | ||
34 | @@ -270,9 +271,10 @@ | ||
35 | tst-ntp_gettimex-time64 \ | ||
36 | tst-ppoll-time64 \ | ||
37 | tst-prctl-time64 \ | ||
38 | - tst-scm_rights-time64 \ | ||
39 | tst-sigtimedwait-time64 \ | ||
40 | tst-timerfd-time64 \ | ||
41 | + # Skip this test to avoid stale qemu process | ||
42 | + # tst-scm_rights-time64 \ | ||
43 | # tests-time64 | ||
44 | |||
45 | tests-clone-internal = \ | ||
diff --git a/meta/recipes-core/glibc/glibc/0025-intl-Emit-no-lines-in-bison-generated-files.patch b/meta/recipes-core/glibc/glibc/0025-intl-Emit-no-lines-in-bison-generated-files.patch deleted file mode 100644 index 32f8fd22b8..0000000000 --- a/meta/recipes-core/glibc/glibc/0025-intl-Emit-no-lines-in-bison-generated-files.patch +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | From 3156464f9a95bf1dafd2e22d19d7bf89c520acc1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 3 Aug 2018 09:44:00 -0700 | ||
4 | Subject: [PATCH] intl: Emit no lines in bison generated files | ||
5 | |||
6 | Improve reproducibility: | ||
7 | Do not put any #line preprocessor commands in bison generated files. | ||
8 | These lines contain absolute paths containing file locations on | ||
9 | the host build machine. | ||
10 | |||
11 | Upstream-Status: Pending | ||
12 | |||
13 | Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> | ||
14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
15 | --- | ||
16 | intl/Makefile | 2 +- | ||
17 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/intl/Makefile b/intl/Makefile | ||
20 | index 93478d87e8..b27a7935eb 100644 | ||
21 | --- a/intl/Makefile | ||
22 | +++ b/intl/Makefile | ||
23 | @@ -155,7 +155,7 @@ $(objpfx)tst-gettext6.out: $(objpfx)tst-gettext.out | ||
24 | |||
25 | CPPFLAGS += -D'LOCALEDIR="$(localedir)"' \ | ||
26 | -D'LOCALE_ALIAS_PATH="$(localedir)"' | ||
27 | -BISONFLAGS = --yacc --name-prefix=__gettext --output | ||
28 | +BISONFLAGS = --yacc --no-lines --name-prefix=__gettext --output | ||
29 | |||
30 | $(inst_localedir)/locale.alias: locale.alias $(+force) | ||
31 | $(do-install) | ||
diff --git a/meta/recipes-core/glibc/glibc/0027-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch b/meta/recipes-core/glibc/glibc/0027-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch deleted file mode 100644 index 782d931f22..0000000000 --- a/meta/recipes-core/glibc/glibc/0027-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | From 881f5b8134afd9a30049b93fc79dda7a44947a5f Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <martin.jansa@gmail.com> | ||
3 | Date: Mon, 17 Dec 2018 21:36:18 +0000 | ||
4 | Subject: [PATCH] locale: prevent maybe-uninitialized errors with -Os [BZ | ||
5 | #19444] | ||
6 | |||
7 | Fixes following error when building for aarch64 with -Os: | ||
8 | | In file included from strcoll_l.c:43: | ||
9 | | strcoll_l.c: In function '__strcoll_l': | ||
10 | | ../locale/weight.h:31:26: error: 'seq2.back_us' may be used uninitialized in this function [-Werror=maybe-uninitialized] | ||
11 | | int_fast32_t i = table[*(*cpp)++]; | ||
12 | | ^~~~~~~~~ | ||
13 | | strcoll_l.c:304:18: note: 'seq2.back_us' was declared here | ||
14 | | coll_seq seq1, seq2; | ||
15 | | ^~~~ | ||
16 | | In file included from strcoll_l.c:43: | ||
17 | | ../locale/weight.h:31:26: error: 'seq1.back_us' may be used uninitialized in this function [-Werror=maybe-uninitialized] | ||
18 | | int_fast32_t i = table[*(*cpp)++]; | ||
19 | | ^~~~~~~~~ | ||
20 | | strcoll_l.c:304:12: note: 'seq1.back_us' was declared here | ||
21 | | coll_seq seq1, seq2; | ||
22 | | ^~~~ | ||
23 | |||
24 | Partial fix for [BZ #19444] | ||
25 | * locale/weight.h: Fix build with -Os. | ||
26 | |||
27 | Upstream-Status: Submitted [https://patchwork.ozlabs.org/patch/1014766] | ||
28 | |||
29 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
30 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
31 | --- | ||
32 | locale/weight.h | 7 +++++++ | ||
33 | 1 file changed, 7 insertions(+) | ||
34 | |||
35 | diff --git a/locale/weight.h b/locale/weight.h | ||
36 | index 723e1fefda..f5798d379a 100644 | ||
37 | --- a/locale/weight.h | ||
38 | +++ b/locale/weight.h | ||
39 | @@ -28,7 +28,14 @@ findidx (const int32_t *table, | ||
40 | const unsigned char *extra, | ||
41 | const unsigned char **cpp, size_t len) | ||
42 | { | ||
43 | + /* With GCC 8 when compiling with -Os the compiler warns that | ||
44 | + seq1.back_us and seq2.back_us might be used uninitialized. | ||
45 | + This uninitialized use is impossible for the same reason | ||
46 | + as described in comments in locale/weightwc.h. */ | ||
47 | + DIAG_PUSH_NEEDS_COMMENT; | ||
48 | + DIAG_IGNORE_Os_NEEDS_COMMENT (8, "-Wmaybe-uninitialized"); | ||
49 | int_fast32_t i = table[*(*cpp)++]; | ||
50 | + DIAG_POP_NEEDS_COMMENT; | ||
51 | const unsigned char *cp; | ||
52 | const unsigned char *usrc; | ||
53 | |||
diff --git a/meta/recipes-core/glibc/glibc/0028-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch b/meta/recipes-core/glibc/glibc/0028-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch deleted file mode 100644 index d273cab4a3..0000000000 --- a/meta/recipes-core/glibc/glibc/0028-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | From b4e0a034b12b313dcb82d22341bef6a66b3e9ef9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 18 Mar 2015 00:11:22 +0000 | ||
4 | Subject: [PATCH] readlib: Add OECORE_KNOWN_INTERPRETER_NAMES to known names | ||
5 | |||
6 | This bolts in a hook for OE to pass its own version of interpreter | ||
7 | names into glibc especially for multilib case, where it differs from any | ||
8 | other distros | ||
9 | |||
10 | Upstream-Status: Inappropriate [OE specific] | ||
11 | |||
12 | Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> | ||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | --- | ||
15 | elf/readlib.c | 1 + | ||
16 | 1 file changed, 1 insertion(+) | ||
17 | |||
18 | diff --git a/elf/readlib.c b/elf/readlib.c | ||
19 | index 7383c23249..e97ea9449d 100644 | ||
20 | --- a/elf/readlib.c | ||
21 | +++ b/elf/readlib.c | ||
22 | @@ -51,6 +51,7 @@ static struct known_names interpreters[] = | ||
23 | #ifdef SYSDEP_KNOWN_INTERPRETER_NAMES | ||
24 | SYSDEP_KNOWN_INTERPRETER_NAMES | ||
25 | #endif | ||
26 | + OECORE_KNOWN_INTERPRETER_NAMES | ||
27 | }; | ||
28 | |||
29 | static struct known_names known_libs[] = | ||
diff --git a/meta/recipes-core/glibc/glibc/0029-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch b/meta/recipes-core/glibc/glibc/0029-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch deleted file mode 100644 index 11a77cdf93..0000000000 --- a/meta/recipes-core/glibc/glibc/0029-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch +++ /dev/null | |||
@@ -1,75 +0,0 @@ | |||
1 | From 2ae3ff3ae28abb1d0d100b4722da7ff188de9a30 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 15 May 2020 17:05:45 -0700 | ||
4 | Subject: [PATCH] wordsize.h: Unify the header between arm and aarch64 | ||
5 | |||
6 | This helps OE multilibs to not sythesize this header which causes all | ||
7 | kind of recursions and other issues since wordsize is fundamental header | ||
8 | and ends up including itself in many case e.g. clang tidy, bpf etc. | ||
9 | |||
10 | Upstream-Status: Inappropriate [ OE-Specific ] | ||
11 | |||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | --- | ||
14 | sysdeps/aarch64/bits/wordsize.h | 8 ++++++-- | ||
15 | sysdeps/{aarch64 => arm}/bits/wordsize.h | 10 +++++++--- | ||
16 | 2 files changed, 13 insertions(+), 5 deletions(-) | ||
17 | copy sysdeps/{aarch64 => arm}/bits/wordsize.h (80%) | ||
18 | |||
19 | diff --git a/sysdeps/aarch64/bits/wordsize.h b/sysdeps/aarch64/bits/wordsize.h | ||
20 | index 91da566b74..9a754514b3 100644 | ||
21 | --- a/sysdeps/aarch64/bits/wordsize.h | ||
22 | +++ b/sysdeps/aarch64/bits/wordsize.h | ||
23 | @@ -17,12 +17,16 @@ | ||
24 | License along with the GNU C Library; if not, see | ||
25 | <https://www.gnu.org/licenses/>. */ | ||
26 | |||
27 | -#ifdef __LP64__ | ||
28 | +#if defined (__aarch64__) && defined (__LP64__) | ||
29 | # define __WORDSIZE 64 | ||
30 | -#else | ||
31 | +#elif defined (__aarch64__) | ||
32 | # define __WORDSIZE 32 | ||
33 | # define __WORDSIZE32_SIZE_ULONG 1 | ||
34 | # define __WORDSIZE32_PTRDIFF_LONG 1 | ||
35 | +#else | ||
36 | +# define __WORDSIZE 32 | ||
37 | +# define __WORDSIZE32_SIZE_ULONG 0 | ||
38 | +# define __WORDSIZE32_PTRDIFF_LONG 0 | ||
39 | #endif | ||
40 | |||
41 | #define __WORDSIZE_TIME64_COMPAT32 0 | ||
42 | diff --git a/sysdeps/aarch64/bits/wordsize.h b/sysdeps/arm/bits/wordsize.h | ||
43 | similarity index 80% | ||
44 | copy from sysdeps/aarch64/bits/wordsize.h | ||
45 | copy to sysdeps/arm/bits/wordsize.h | ||
46 | index 91da566b74..34fcdef1f1 100644 | ||
47 | --- a/sysdeps/aarch64/bits/wordsize.h | ||
48 | +++ b/sysdeps/arm/bits/wordsize.h | ||
49 | @@ -1,6 +1,6 @@ | ||
50 | /* Determine the wordsize from the preprocessor defines. | ||
51 | |||
52 | - Copyright (C) 2016-2021 Free Software Foundation, Inc. | ||
53 | + Copyright (C) 2016-2021 Free Software Foundation, Inc. | ||
54 | This file is part of the GNU C Library. | ||
55 | |||
56 | The GNU C Library is free software; you can redistribute it and/or | ||
57 | @@ -17,12 +17,16 @@ | ||
58 | License along with the GNU C Library; if not, see | ||
59 | <https://www.gnu.org/licenses/>. */ | ||
60 | |||
61 | -#ifdef __LP64__ | ||
62 | +#if defined (__aarch64__) && defined (__LP64__) | ||
63 | # define __WORDSIZE 64 | ||
64 | -#else | ||
65 | +#elif defined (__aarch64__) | ||
66 | # define __WORDSIZE 32 | ||
67 | # define __WORDSIZE32_SIZE_ULONG 1 | ||
68 | # define __WORDSIZE32_PTRDIFF_LONG 1 | ||
69 | +#else | ||
70 | +# define __WORDSIZE 32 | ||
71 | +# define __WORDSIZE32_SIZE_ULONG 0 | ||
72 | +# define __WORDSIZE32_PTRDIFF_LONG 0 | ||
73 | #endif | ||
74 | |||
75 | #define __WORDSIZE_TIME64_COMPAT32 0 | ||
diff --git a/meta/recipes-core/glibc/glibc/0031-x86-Require-full-ISA-support-for-x86-64-level-marker.patch b/meta/recipes-core/glibc/glibc/0031-x86-Require-full-ISA-support-for-x86-64-level-marker.patch deleted file mode 100644 index 3cb60b2e55..0000000000 --- a/meta/recipes-core/glibc/glibc/0031-x86-Require-full-ISA-support-for-x86-64-level-marker.patch +++ /dev/null | |||
@@ -1,116 +0,0 @@ | |||
1 | From b1971f6f1331d738d1d6b376b4741668a7546125 Mon Sep 17 00:00:00 2001 | ||
2 | From: "H.J. Lu" <hjl.tools@gmail.com> | ||
3 | Date: Tue, 2 Feb 2021 13:45:58 -0800 | ||
4 | Subject: [PATCH] x86: Require full ISA support for x86-64 level marker [BZ #27318] | ||
5 | |||
6 | Since -march=sandybridge enables ISAs in x86-64 ISA level v3, the v3 | ||
7 | marker is set on libc.so. We couldn't set the needed ISA marker to v2 | ||
8 | since this libc won't run on all v2 machines. Technically, the v3 marker | ||
9 | is correct. But the resulting libc.so won't run on Sandy Brigde, which | ||
10 | is a v2 machine, even when libc is compiled with -march=sandybridge: | ||
11 | |||
12 | $ ./elf/ld.so ./libc.so | ||
13 | ./libc.so: (p) CPU ISA level is lower than required: needed: 7; got: 3 | ||
14 | |||
15 | Instead, we require full ISA support for x86-64 level marker and disable | ||
16 | x86-64 level marker for -march=sandybridge which enables ISAs between v2 | ||
17 | and v3. | ||
18 | |||
19 | Upstream-Status: Submitted [https://sourceware.org/pipermail/libc-alpha/2021-February/122297.html] | ||
20 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
21 | --- | ||
22 | |||
23 | sysdeps/x86/configure | 7 ++++++- | ||
24 | sysdeps/x86/configure.ac | 2 +- | ||
25 | sysdeps/x86/isa-level.c | 21 ++++++++++++++++++++- | ||
26 | 3 files changed, 27 insertions(+), 3 deletions(-) | ||
27 | |||
28 | diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure | ||
29 | index 5e32dc62b3..5b20646843 100644 | ||
30 | --- a/sysdeps/x86/configure | ||
31 | +++ b/sysdeps/x86/configure | ||
32 | @@ -133,7 +133,12 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -nostartfiles -nostdlib -r -o conftest c | ||
33 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | ||
34 | test $ac_status = 0; }; }; then | ||
35 | count=`LC_ALL=C $READELF -n conftest | grep NT_GNU_PROPERTY_TYPE_0 | wc -l` | ||
36 | - if test "$count" = 1; then | ||
37 | + if test "$count" = 1 && { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -DINCLUDE_X86_ISA_LEVEL -S -o conftest.s $srcdir/sysdeps/x86/isa-level.c' | ||
38 | + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 | ||
39 | + (eval $ac_try) 2>&5 | ||
40 | + ac_status=$? | ||
41 | + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | ||
42 | + test $ac_status = 0; }; }; then | ||
43 | libc_cv_include_x86_isa_level=yes | ||
44 | fi | ||
45 | fi | ||
46 | diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac | ||
47 | index f94088f377..54ecd33d2c 100644 | ||
48 | --- a/sysdeps/x86/configure.ac | ||
49 | +++ b/sysdeps/x86/configure.ac | ||
50 | @@ -100,7 +100,7 @@ EOF | ||
51 | libc_cv_include_x86_isa_level=no | ||
52 | if AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS -nostartfiles -nostdlib -r -o conftest conftest1.S conftest2.S); then | ||
53 | count=`LC_ALL=C $READELF -n conftest | grep NT_GNU_PROPERTY_TYPE_0 | wc -l` | ||
54 | - if test "$count" = 1; then | ||
55 | + if test "$count" = 1 && AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS -DINCLUDE_X86_ISA_LEVEL -S -o conftest.s $srcdir/sysdeps/x86/isa-level.c); then | ||
56 | libc_cv_include_x86_isa_level=yes | ||
57 | fi | ||
58 | fi | ||
59 | diff --git a/sysdeps/x86/isa-level.c b/sysdeps/x86/isa-level.c | ||
60 | index aaf524cb56..7f83449061 100644 | ||
61 | --- a/sysdeps/x86/isa-level.c | ||
62 | +++ b/sysdeps/x86/isa-level.c | ||
63 | @@ -25,12 +25,17 @@ | ||
64 | License along with the GNU C Library; if not, see | ||
65 | <https://www.gnu.org/licenses/>. */ | ||
66 | |||
67 | -#include <elf.h> | ||
68 | +#ifdef _LIBC | ||
69 | +# include <elf.h> | ||
70 | +#endif | ||
71 | |||
72 | /* ELF program property for x86 ISA level. */ | ||
73 | #ifdef INCLUDE_X86_ISA_LEVEL | ||
74 | # if defined __x86_64__ || defined __FXSR__ || !defined _SOFT_FLOAT \ | ||
75 | || defined __MMX__ || defined __SSE__ || defined __SSE2__ | ||
76 | +# if !defined __SSE__ || !defined __SSE2__ | ||
77 | +# error "Missing ISAs for x86-64 ISA level baseline" | ||
78 | +# endif | ||
79 | # define ISA_BASELINE GNU_PROPERTY_X86_ISA_1_BASELINE | ||
80 | # else | ||
81 | # define ISA_BASELINE 0 | ||
82 | @@ -40,6 +45,11 @@ | ||
83 | || (defined __x86_64__ && defined __LAHF_SAHF__) \ | ||
84 | || defined __POPCNT__ || defined __SSE3__ \ | ||
85 | || defined __SSSE3__ || defined __SSE4_1__ || defined __SSE4_2__ | ||
86 | +# if !defined __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 \ | ||
87 | + || !defined __POPCNT__ || !defined __SSE3__ \ | ||
88 | + || !defined __SSSE3__ || !defined __SSE4_1__ || !defined __SSE4_2__ | ||
89 | +# error "Missing ISAs for x86-64 ISA level v2" | ||
90 | +# endif | ||
91 | # define ISA_V2 GNU_PROPERTY_X86_ISA_1_V2 | ||
92 | # else | ||
93 | # define ISA_V2 0 | ||
94 | @@ -48,6 +58,10 @@ | ||
95 | # if defined __AVX__ || defined __AVX2__ || defined __F16C__ \ | ||
96 | || defined __FMA__ || defined __LZCNT__ || defined __MOVBE__ \ | ||
97 | || defined __XSAVE__ | ||
98 | +# if !defined __AVX__ || !defined __AVX2__ || !defined __F16C__ \ | ||
99 | + || !defined __FMA__ || !defined __LZCNT__ | ||
100 | +# error "Missing ISAs for x86-64 ISA level v3" | ||
101 | +# endif | ||
102 | # define ISA_V3 GNU_PROPERTY_X86_ISA_1_V3 | ||
103 | # else | ||
104 | # define ISA_V3 0 | ||
105 | @@ -55,6 +69,11 @@ | ||
106 | |||
107 | # if defined __AVX512F__ || defined __AVX512BW__ || defined __AVX512CD__ \ | ||
108 | || defined __AVX512DQ__ || defined __AVX512VL__ | ||
109 | +# if !defined __AVX512F__ || !defined __AVX512BW__ \ | ||
110 | + || !defined __AVX512CD__ || !defined __AVX512DQ__ \ | ||
111 | + || !defined __AVX512VL__ | ||
112 | +# error "Missing ISAs for x86-64 ISA level v4" | ||
113 | +# endif | ||
114 | # define ISA_V4 GNU_PROPERTY_X86_ISA_1_V4 | ||
115 | # else | ||
116 | # define ISA_V4 0 | ||
diff --git a/meta/recipes-core/glibc/glibc/0032-string-Work-around-GCC-PR-98512-in-rawmemchr.patch b/meta/recipes-core/glibc/glibc/0032-string-Work-around-GCC-PR-98512-in-rawmemchr.patch deleted file mode 100644 index e904b28a05..0000000000 --- a/meta/recipes-core/glibc/glibc/0032-string-Work-around-GCC-PR-98512-in-rawmemchr.patch +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | From 044e603b698093cf48f6e6229e0b66acf05227e4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Florian Weimer <fweimer@redhat.com> | ||
3 | Date: Fri, 19 Feb 2021 13:29:00 +0100 | ||
4 | Subject: [PATCH] string: Work around GCC PR 98512 in rawmemchr | ||
5 | |||
6 | Upstream-Status: Backport [https://sourceware.org/git/?p=glibc.git;a=commit;h=044e603b698093cf48f6e6229e0b66acf05227e4] | ||
7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
8 | --- | ||
9 | string/rawmemchr.c | 26 +++++++++++++++----------- | ||
10 | 1 file changed, 15 insertions(+), 11 deletions(-) | ||
11 | |||
12 | diff --git a/string/rawmemchr.c b/string/rawmemchr.c | ||
13 | index 59bbeeaa42..b8523118e5 100644 | ||
14 | --- a/string/rawmemchr.c | ||
15 | +++ b/string/rawmemchr.c | ||
16 | @@ -22,24 +22,28 @@ | ||
17 | # define RAWMEMCHR __rawmemchr | ||
18 | #endif | ||
19 | |||
20 | -/* Find the first occurrence of C in S. */ | ||
21 | -void * | ||
22 | -RAWMEMCHR (const void *s, int c) | ||
23 | -{ | ||
24 | - DIAG_PUSH_NEEDS_COMMENT; | ||
25 | +/* The pragmata should be nested inside RAWMEMCHR below, but that | ||
26 | + triggers GCC PR 98512. */ | ||
27 | +DIAG_PUSH_NEEDS_COMMENT; | ||
28 | #if __GNUC_PREREQ (7, 0) | ||
29 | - /* GCC 8 warns about the size passed to memchr being larger than | ||
30 | - PTRDIFF_MAX; the use of SIZE_MAX is deliberate here. */ | ||
31 | - DIAG_IGNORE_NEEDS_COMMENT (8, "-Wstringop-overflow="); | ||
32 | +/* GCC 8 warns about the size passed to memchr being larger than | ||
33 | + PTRDIFF_MAX; the use of SIZE_MAX is deliberate here. */ | ||
34 | +DIAG_IGNORE_NEEDS_COMMENT (8, "-Wstringop-overflow="); | ||
35 | #endif | ||
36 | #if __GNUC_PREREQ (11, 0) | ||
37 | - /* Likewise GCC 11, with a different warning option. */ | ||
38 | - DIAG_IGNORE_NEEDS_COMMENT (11, "-Wstringop-overread"); | ||
39 | +/* Likewise GCC 11, with a different warning option. */ | ||
40 | +DIAG_IGNORE_NEEDS_COMMENT (11, "-Wstringop-overread"); | ||
41 | #endif | ||
42 | + | ||
43 | +/* Find the first occurrence of C in S. */ | ||
44 | +void * | ||
45 | +RAWMEMCHR (const void *s, int c) | ||
46 | +{ | ||
47 | if (c != '\0') | ||
48 | return memchr (s, c, (size_t)-1); | ||
49 | - DIAG_POP_NEEDS_COMMENT; | ||
50 | return (char *)s + strlen (s); | ||
51 | } | ||
52 | libc_hidden_def (__rawmemchr) | ||
53 | weak_alias (__rawmemchr, rawmemchr) | ||
54 | + | ||
55 | +DIAG_POP_NEEDS_COMMENT; | ||
56 | -- | ||
57 | 2.30.1 | ||
58 | |||
diff --git a/meta/recipes-core/glibc/glibc/check-test-wrapper b/meta/recipes-core/glibc/glibc/check-test-wrapper index f8e04e02d2..5cc993f718 100644 --- a/meta/recipes-core/glibc/glibc/check-test-wrapper +++ b/meta/recipes-core/glibc/glibc/check-test-wrapper | |||
@@ -2,6 +2,7 @@ | |||
2 | import sys | 2 | import sys |
3 | import os | 3 | import os |
4 | import subprocess | 4 | import subprocess |
5 | import resource | ||
5 | 6 | ||
6 | env = os.environ.copy() | 7 | env = os.environ.copy() |
7 | args = sys.argv[1:] | 8 | args = sys.argv[1:] |
@@ -44,12 +45,20 @@ if targettype == "user": | |||
44 | qemuargs += ["-L", sysroot] | 45 | qemuargs += ["-L", sysroot] |
45 | qemuargs += ["-E", "LD_LIBRARY_PATH={}".format(":".join(libpaths))] | 46 | qemuargs += ["-E", "LD_LIBRARY_PATH={}".format(":".join(libpaths))] |
46 | command = qemuargs + args | 47 | command = qemuargs + args |
48 | |||
49 | # We've seen qemu-arm using up all system memory for some glibc | ||
50 | # tests e.g. nptl/tst-pthread-timedlock-lockloop | ||
51 | # Cap at 8GB since no test should need more than that | ||
52 | # (5GB adds 7 failures for qemuarm glibc test run) | ||
53 | limit = 8*1024*1024*1024 | ||
54 | resource.setrlimit(resource.RLIMIT_AS, (limit, limit)) | ||
55 | |||
47 | elif targettype == "ssh": | 56 | elif targettype == "ssh": |
48 | host = os.environ.get("SSH_HOST", None) | 57 | host = os.environ.get("SSH_HOST", None) |
49 | user = os.environ.get("SSH_HOST_USER", None) | 58 | user = os.environ.get("SSH_HOST_USER", None) |
50 | port = os.environ.get("SSH_HOST_PORT", None) | 59 | port = os.environ.get("SSH_HOST_PORT", None) |
51 | 60 | ||
52 | command = ["ssh", "-o", "UserKnownHostsFile=/dev/null", "-o", "StrictHostKeyChecking=no"] | 61 | command = ["ssh", "-o", "UserKnownHostsFile=/dev/null", "-o", "StrictHostKeyChecking=no", "-o", "LogLevel=quiet"] |
53 | if port: | 62 | if port: |
54 | command += ["-p", str(port)] | 63 | command += ["-p", str(port)] |
55 | if not host: | 64 | if not host: |
diff --git a/meta/recipes-core/glibc/glibc/faccessat2-perm.patch b/meta/recipes-core/glibc/glibc/faccessat2-perm.patch deleted file mode 100644 index 2ee7110ca1..0000000000 --- a/meta/recipes-core/glibc/glibc/faccessat2-perm.patch +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | Older seccomp-based filters used in container frameworks will block faccessat2 | ||
2 | calls as it's a relatively new syscall. This isn't a big problem with | ||
3 | glibc <2.33 but 2.33 will call faccessat2 itself, get EPERM, and thenn be confused | ||
4 | about what to do as EPERM isn't an expected error code. | ||
5 | |||
6 | This manifests itself as mysterious errors, for example a kernel failing to link. | ||
7 | |||
8 | The root cause of bad seccomp filters is mostly fixed (systemd 247, Docker 20.10.0) | ||
9 | but we can't expect everyone to upgrade, so add a workaound (originally from | ||
10 | Red Hat) to handle EPERM like ENOSYS and fallback to faccessat(). | ||
11 | |||
12 | Upstream-Status: Inappropriate | ||
13 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
14 | |||
15 | diff --git a/sysdeps/unix/sysv/linux/faccessat.c b/sysdeps/unix/sysv/linux/faccessat.c | ||
16 | index 56cb6dcc8b4d58d3..5de75032bbc93a2c 100644 | ||
17 | --- a/sysdeps/unix/sysv/linux/faccessat.c | ||
18 | +++ b/sysdeps/unix/sysv/linux/faccessat.c | ||
19 | @@ -34,7 +34,11 @@ faccessat (int fd, const char *file, int mode, int flag) | ||
20 | #if __ASSUME_FACCESSAT2 | ||
21 | return ret; | ||
22 | #else | ||
23 | - if (ret == 0 || errno != ENOSYS) | ||
24 | + /* Fedora-specific workaround: | ||
25 | + As a workround for a broken systemd-nspawn that returns | ||
26 | + EPERM when a syscall is not allowed instead of ENOSYS | ||
27 | + we must check for EPERM here and fall back to faccessat. */ | ||
28 | + if (ret == 0 || !(errno == ENOSYS || errno == EPERM)) | ||
29 | return ret; | ||
30 | |||
31 | if (flag & ~(AT_SYMLINK_NOFOLLOW | AT_EACCESS)) | ||
diff --git a/meta/recipes-core/glibc/glibc/run-ptest b/meta/recipes-core/glibc/glibc/run-ptest new file mode 100755 index 0000000000..cb71c75682 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/run-ptest | |||
@@ -0,0 +1,37 @@ | |||
1 | #!/bin/bash | ||
2 | # ptest script for glibc - to run time related tests to | ||
3 | # facilitate Y2038 validation | ||
4 | # Run with 'ptest-runner glibc-tests' | ||
5 | |||
6 | output() { | ||
7 | retcode=$? | ||
8 | if [ $retcode -eq 0 ] | ||
9 | then echo "PASS: $i" | ||
10 | elif [ $retcode -eq 77 ] | ||
11 | then echo "SKIP: $i" | ||
12 | else echo "FAIL: $i" | ||
13 | fi | ||
14 | } | ||
15 | |||
16 | # Allow altering time on the target | ||
17 | export GLIBC_TEST_ALLOW_TIME_SETTING="1" | ||
18 | |||
19 | tst_time64=$(ls -r ${PWD}/tests/glibc-ptest/*-time64) | ||
20 | |||
21 | # Remove '-time64' suffix - those tests are also time | ||
22 | # related | ||
23 | tst_time_tmp=$(sed -e "s/-time64$//" <<< ${tst_time64}) | ||
24 | |||
25 | # Do not run tests supporting only 32 bit time | ||
26 | #for i in ${tst_time_tmp} | ||
27 | #do | ||
28 | # $i >/dev/null 2>&1 | ||
29 | # output | ||
30 | #done | ||
31 | |||
32 | # Run tests supporting only 64 bit time | ||
33 | for i in ${tst_time64} | ||
34 | do | ||
35 | $i >/dev/null 2>&1 | ||
36 | output | ||
37 | done | ||
diff --git a/meta/recipes-core/glibc/glibc_2.33.bb b/meta/recipes-core/glibc/glibc_2.39.bb index c47826a51e..9122472689 100644 --- a/meta/recipes-core/glibc/glibc_2.33.bb +++ b/meta/recipes-core/glibc/glibc_2.39.bb | |||
@@ -1,18 +1,31 @@ | |||
1 | require glibc.inc | 1 | require glibc.inc |
2 | require glibc-version.inc | 2 | require glibc-version.inc |
3 | 3 | ||
4 | CVE_CHECK_WHITELIST += "CVE-2020-10029" | 4 | # glibc https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2019-1010022 |
5 | 5 | # glibc https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2019-1010023 | |
6 | DEPENDS += "gperf-native bison-native make-native" | 6 | # glibc https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2019-1010024 |
7 | CVE_STATUS_GROUPS = "CVE_STATUS_RECIPE" | ||
8 | CVE_STATUS_RECIPE = "CVE-2019-1010022 CVE-2019-1010023 CVE-2019-1010024" | ||
9 | CVE_STATUS_RECIPE[status] = "disputed: \ | ||
10 | Upstream glibc maintainers dispute there is any issue and have no plans to address it further. \ | ||
11 | this is being treated as a non-security bug and no real threat." | ||
12 | |||
13 | # glibc https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2019-1010025 | ||
14 | # Potential patch at https://sourceware.org/bugzilla/show_bug.cgi?id=22853 | ||
15 | CVE_STATUS[CVE-2019-1010025] = "disputed: \ | ||
16 | Allows for ASLR bypass so can bypass some hardening, not an exploit in itself, may allow \ | ||
17 | easier access for another. 'ASLR bypass itself is not a vulnerability.'" | ||
18 | |||
19 | DEPENDS += "gperf-native bison-native" | ||
7 | 20 | ||
8 | NATIVESDKFIXES ?= "" | 21 | NATIVESDKFIXES ?= "" |
9 | NATIVESDKFIXES_class-nativesdk = "\ | 22 | NATIVESDKFIXES:class-nativesdk = "\ |
10 | file://0003-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch \ | 23 | file://0003-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch \ |
11 | file://0004-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch \ | 24 | file://0004-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch \ |
12 | file://0005-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch \ | 25 | file://0005-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch \ |
13 | file://0006-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch \ | 26 | file://0006-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch \ |
14 | file://0007-nativesdk-glibc-Make-relocatable-install-for-locales.patch \ | 27 | file://0007-nativesdk-glibc-Make-relocatable-install-for-locales.patch \ |
15 | file://faccessat2-perm.patch \ | 28 | file://0008-nativesdk-glibc-Fall-back-to-faccessat-on-faccess2-r.patch \ |
16 | " | 29 | " |
17 | 30 | ||
18 | SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ | 31 | SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ |
@@ -21,31 +34,23 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ | |||
21 | file://makedbs.sh \ | 34 | file://makedbs.sh \ |
22 | \ | 35 | \ |
23 | ${NATIVESDKFIXES} \ | 36 | ${NATIVESDKFIXES} \ |
24 | file://0008-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch \ | 37 | file://0009-yes-within-the-path-sets-wrong-config-variables.patch \ |
25 | file://0009-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch \ | 38 | file://0010-eglibc-Cross-building-and-testing-instructions.patch \ |
26 | file://0010-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \ | 39 | file://0011-eglibc-Help-bootstrap-cross-toolchain.patch \ |
27 | file://0011-Quote-from-bug-1443-which-explains-what-the-patch-do.patch \ | 40 | file://0012-eglibc-Resolve-__fpscr_values-on-SH4.patch \ |
28 | file://0012-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \ | 41 | file://0013-eglibc-Forward-port-cross-locale-generation-support.patch \ |
29 | file://0013-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \ | 42 | file://0014-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch \ |
30 | file://0014-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch \ | 43 | file://0015-powerpc-Do-not-ask-compiler-for-finding-arch.patch \ |
31 | file://0015-yes-within-the-path-sets-wrong-config-variables.patch \ | 44 | file://0016-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch \ |
32 | file://0016-timezone-re-written-tzselect-as-posix-sh.patch \ | 45 | file://0017-Replace-echo-with-printf-builtin-in-nscd-init-script.patch \ |
33 | file://0017-Remove-bash-dependency-for-nscd-init-script.patch \ | 46 | file://0018-sysdeps-gnu-configure.ac-Set-libc_cv_rootsbindir-onl.patch \ |
34 | file://0018-eglibc-Cross-building-and-testing-instructions.patch \ | 47 | file://0019-timezone-Make-shell-interpreter-overridable-in-tzsel.patch \ |
35 | file://0019-eglibc-Help-bootstrap-cross-toolchain.patch \ | 48 | file://0020-tzselect.ksh-Use-bin-sh-default-shell-interpreter.patch \ |
36 | file://0020-eglibc-Resolve-__fpscr_values-on-SH4.patch \ | 49 | file://0021-fix-create-thread-failed-in-unprivileged-process-BZ-.patch \ |
37 | file://0021-eglibc-Forward-port-cross-locale-generation-support.patch \ | 50 | file://0022-Avoid-hardcoded-build-time-paths-in-the-output-binar.patch \ |
38 | file://0022-Define-DUMMY_LOCALE_T-if-not-defined.patch \ | 51 | file://0023-aarch64-configure-Pass-mcpu-along-with-march-to-dete.patch \ |
39 | file://0023-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch \ | 52 | file://0024-qemu-stale-process.patch \ |
40 | file://0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch \ | 53 | " |
41 | file://0025-intl-Emit-no-lines-in-bison-generated-files.patch \ | ||
42 | file://0027-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch \ | ||
43 | file://0028-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch \ | ||
44 | file://0029-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch \ | ||
45 | file://0030-powerpc-Do-not-ask-compiler-for-finding-arch.patch \ | ||
46 | file://0031-x86-Require-full-ISA-support-for-x86-64-level-marker.patch \ | ||
47 | file://0032-string-Work-around-GCC-PR-98512-in-rawmemchr.patch \ | ||
48 | " | ||
49 | S = "${WORKDIR}/git" | 54 | S = "${WORKDIR}/git" |
50 | B = "${WORKDIR}/build-${TARGET_SYS}" | 55 | B = "${WORKDIR}/build-${TARGET_SYS}" |
51 | 56 | ||
@@ -65,25 +70,26 @@ EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \ | |||
65 | --enable-clocale=gnu \ | 70 | --enable-clocale=gnu \ |
66 | --with-headers=${STAGING_INCDIR} \ | 71 | --with-headers=${STAGING_INCDIR} \ |
67 | --without-selinux \ | 72 | --without-selinux \ |
68 | --enable-tunables \ | ||
69 | --enable-bind-now \ | 73 | --enable-bind-now \ |
70 | --enable-stack-protector=strong \ | 74 | --enable-stack-protector=strong \ |
71 | --enable-stackguard-randomization \ | ||
72 | --disable-crypt \ | 75 | --disable-crypt \ |
73 | --with-default-link \ | 76 | --with-default-link \ |
77 | --disable-werror \ | ||
78 | --enable-fortify-source \ | ||
74 | ${@bb.utils.contains_any('SELECTED_OPTIMIZATION', '-O0 -Og', '--disable-werror', '', d)} \ | 79 | ${@bb.utils.contains_any('SELECTED_OPTIMIZATION', '-O0 -Og', '--disable-werror', '', d)} \ |
75 | ${GLIBCPIE} \ | 80 | ${GLIBCPIE} \ |
76 | ${GLIBC_EXTRA_OECONF}" | 81 | ${GLIBC_EXTRA_OECONF}" |
77 | 82 | ||
78 | EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}" | 83 | EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}" |
79 | 84 | ||
80 | EXTRA_OECONF_append_x86 = " --enable-cet" | 85 | EXTRA_OECONF:append:x86-64 = " --enable-cet" |
81 | EXTRA_OECONF_append_x86-64 = " --enable-cet" | 86 | |
87 | PACKAGECONFIG ??= "nscd memory-tagging" | ||
82 | 88 | ||
83 | PACKAGECONFIG ??= "nscd" | ||
84 | PACKAGECONFIG[nscd] = "--enable-nscd,--disable-nscd" | 89 | PACKAGECONFIG[nscd] = "--enable-nscd,--disable-nscd" |
90 | PACKAGECONFIG[memory-tagging] = "--enable-memory-tagging,--disable-memory-tagging" | ||
85 | 91 | ||
86 | do_patch_append() { | 92 | do_patch:append() { |
87 | bb.build.exec_func('do_fix_readlib_c', d) | 93 | bb.build.exec_func('do_fix_readlib_c', d) |
88 | } | 94 | } |
89 | 95 | ||
@@ -98,10 +104,12 @@ do_configure () { | |||
98 | # version check and doesn't really help with anything | 104 | # version check and doesn't really help with anything |
99 | (cd ${S} && gnu-configize) || die "failure in running gnu-configize" | 105 | (cd ${S} && gnu-configize) || die "failure in running gnu-configize" |
100 | find ${S} -name "configure" | xargs touch | 106 | find ${S} -name "configure" | xargs touch |
101 | CPPFLAGS="" oe_runconf | 107 | CPPFLAGS="" LD="${HOST_PREFIX}ld.bfd ${TOOLCHAIN_OPTIONS}" oe_runconf |
102 | } | 108 | } |
103 | 109 | ||
104 | LDFLAGS += "-fuse-ld=bfd" | 110 | LDFLAGS += "-fuse-ld=bfd" |
111 | CC += "-fuse-ld=bfd" | ||
112 | |||
105 | do_compile () { | 113 | do_compile () { |
106 | base_do_compile | 114 | base_do_compile |
107 | echo "Adjust ldd script" | 115 | echo "Adjust ldd script" |
diff --git a/meta/recipes-core/glibc/ldconfig-native-2.12.1/add-riscv-support.patch b/meta/recipes-core/glibc/ldconfig-native-2.12.1/add-riscv-support.patch new file mode 100644 index 0000000000..fc41aee264 --- /dev/null +++ b/meta/recipes-core/glibc/ldconfig-native-2.12.1/add-riscv-support.patch | |||
@@ -0,0 +1,79 @@ | |||
1 | From fd50228cc213d2d87f5e3cf1f123acb3fda9b04e Mon Sep 17 00:00:00 2001 | ||
2 | From: Christoph Muellner <cmuellner@linux.com> | ||
3 | Date: Mon, 28 Jun 2021 00:34:12 +0200 | ||
4 | Subject: [PATCH] ldconfig: Add RISC-V support | ||
5 | |||
6 | ldconfig-native does not support RISC-V at the moment. | ||
7 | Let's pull the reqired constants from upstream and add | ||
8 | the required parsing code. | ||
9 | |||
10 | Upstream-Status: Backport | ||
11 | |||
12 | Signed-off-by: Christoph Muellner <cmuellner@linux.com> | ||
13 | --- | ||
14 | cache.c | 6 ++++++ | ||
15 | ldconfig.h | 2 ++ | ||
16 | readelflib.c | 10 ++++++++++ | ||
17 | 3 files changed, 18 insertions(+) | ||
18 | |||
19 | diff --git a/cache.c b/cache.c | ||
20 | index c4f5411..a3b9e70 100644 | ||
21 | --- a/cache.c | ||
22 | +++ b/cache.c | ||
23 | @@ -125,6 +125,12 @@ print_entry (const char *lib, int flag, unsigned int osversion, | ||
24 | case FLAG_AARCH64_LIB64: | ||
25 | fputs (",AArch64", stdout); | ||
26 | break; | ||
27 | + case FLAG_RISCV_FLOAT_ABI_SOFT: | ||
28 | + fputs (",soft-float", stdout); | ||
29 | + break; | ||
30 | + case FLAG_RISCV_FLOAT_ABI_DOUBLE: | ||
31 | + fputs (",double-float", stdout); | ||
32 | + break; | ||
33 | case 0: | ||
34 | break; | ||
35 | default: | ||
36 | diff --git a/ldconfig.h b/ldconfig.h | ||
37 | index 6a8a750..2e5e379 100644 | ||
38 | --- a/ldconfig.h | ||
39 | +++ b/ldconfig.h | ||
40 | @@ -38,6 +38,8 @@ | ||
41 | #define FLAG_ARM_LIBHF 0x0900 | ||
42 | #define FLAG_AARCH64_LIB64 0x0a00 | ||
43 | #define FLAG_ARM_LIBSF 0x0b00 | ||
44 | +#define FLAG_RISCV_FLOAT_ABI_SOFT 0x0f00 | ||
45 | +#define FLAG_RISCV_FLOAT_ABI_DOUBLE 0x1000 | ||
46 | |||
47 | /* Name of auxiliary cache. */ | ||
48 | #define _PATH_LDCONFIG_AUX_CACHE "/var/cache/ldconfig/aux-cache" | ||
49 | diff --git a/readelflib.c b/readelflib.c | ||
50 | index 9ec0a54..a01e1ce 100644 | ||
51 | --- a/readelflib.c | ||
52 | +++ b/readelflib.c | ||
53 | @@ -33,6 +33,10 @@ | ||
54 | #define EM_AARCH64 183 /* ARM AARCH64 */ | ||
55 | #endif | ||
56 | |||
57 | +#ifndef EM_RISCV | ||
58 | +#define EM_RISCV 243 /* RISC-V */ | ||
59 | +#endif | ||
60 | + | ||
61 | #undef check_ptr | ||
62 | #define check_ptr(ptr) \ | ||
63 | do \ | ||
64 | @@ -331,6 +335,12 @@ process_elf_file64 (const char *file_name, const char *lib, int *flag, | ||
65 | /* see sysdeps/unix/sysv/linux/arm/readelflib.c */ | ||
66 | *flag |= FLAG_AARCH64_LIB64|FLAG_ELF_LIBC6; | ||
67 | break; | ||
68 | + case EM_RISCV: | ||
69 | + /* RISC-V libraries are always libc.so.6+. */ | ||
70 | + /* NOTE: This does not correctly handle soft-float binaries */ | ||
71 | + /* see sysdeps/unix/sysv/linux/riscv/readelflib.c */ | ||
72 | + *flag |= FLAG_RISCV_FLOAT_ABI_DOUBLE|FLAG_ELF_LIBC6; | ||
73 | + break; | ||
74 | default: | ||
75 | error(0, 0, "%s is a 64-bit ELF for unknown machine %lx\n", | ||
76 | file_name, (long)elf_header->e_machine); | ||
77 | -- | ||
78 | 2.25.1 | ||
79 | |||
diff --git a/meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig-handle-.dynstr-located-in-separate-segment.patch b/meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig-handle-.dynstr-located-in-separate-segment.patch new file mode 100644 index 0000000000..36f04adfde --- /dev/null +++ b/meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig-handle-.dynstr-located-in-separate-segment.patch | |||
@@ -0,0 +1,178 @@ | |||
1 | From 864054a6cb971688a181316b8227ae0361b4d69e Mon Sep 17 00:00:00 2001 | ||
2 | From: Andreas Schwab <schwab@suse.de> | ||
3 | Date: Wed, 9 Oct 2019 17:46:47 +0200 | ||
4 | Subject: [PATCH] ldconfig: handle .dynstr located in separate segment (bug | ||
5 | 25087) | ||
6 | |||
7 | To determine the load offset of the DT_STRTAB section search for the | ||
8 | segment containing it, instead of using the load offset of the first | ||
9 | segment. | ||
10 | |||
11 | Upstream-Status: Backport [https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=58e8f5fd2ba47b6dc47fd4d0a35e4175c7c87aaa] | ||
12 | |||
13 | Backported: ported to support endianness and 32/64 bits. | ||
14 | Signed-off-by: Fabien Mahot <fabien.mahot@external.desouttertools.com> | ||
15 | --- | ||
16 | readelflib.c | 86 +++++++++++++++++++++++++++++++--------------------- | ||
17 | 1 file changed, 52 insertions(+), 34 deletions(-) | ||
18 | |||
19 | diff --git a/readelflib.c b/readelflib.c | ||
20 | index a01e1cede3..380aed563d 100644 | ||
21 | --- a/readelflib.c | ||
22 | +++ b/readelflib.c | ||
23 | @@ -80,7 +80,6 @@ process_elf_file32 (const char *file_name, const char *lib, int *flag, | ||
24 | { | ||
25 | int i; | ||
26 | unsigned int j; | ||
27 | - Elf32_Addr loadaddr; | ||
28 | unsigned int dynamic_addr; | ||
29 | size_t dynamic_size; | ||
30 | char *program_interpreter; | ||
31 | @@ -110,7 +109,6 @@ process_elf_file32 (const char *file_name, const char *lib, int *flag, | ||
32 | libc5/libc6. */ | ||
33 | *flag = FLAG_ELF; | ||
34 | |||
35 | - loadaddr = -1; | ||
36 | dynamic_addr = 0; | ||
37 | dynamic_size = 0; | ||
38 | program_interpreter = NULL; | ||
39 | @@ -121,11 +119,6 @@ process_elf_file32 (const char *file_name, const char *lib, int *flag, | ||
40 | |||
41 | switch (read32(segment->p_type, be)) | ||
42 | { | ||
43 | - case PT_LOAD: | ||
44 | - if (loadaddr == (Elf32_Addr) -1) | ||
45 | - loadaddr = read32(segment->p_vaddr, be) - read32(segment->p_offset, be); | ||
46 | - break; | ||
47 | - | ||
48 | case PT_DYNAMIC: | ||
49 | if (dynamic_addr) | ||
50 | error (0, 0, _("more than one dynamic segment\n")); | ||
51 | @@ -188,11 +181,6 @@ process_elf_file32 (const char *file_name, const char *lib, int *flag, | ||
52 | } | ||
53 | |||
54 | } | ||
55 | - if (loadaddr == (Elf32_Addr) -1) | ||
56 | - { | ||
57 | - /* Very strange. */ | ||
58 | - loadaddr = 0; | ||
59 | - } | ||
60 | |||
61 | /* Now we can read the dynamic sections. */ | ||
62 | if (dynamic_size == 0) | ||
63 | @@ -208,11 +196,32 @@ process_elf_file32 (const char *file_name, const char *lib, int *flag, | ||
64 | { | ||
65 | check_ptr (dyn_entry); | ||
66 | if (read32(dyn_entry->d_tag, be) == DT_STRTAB) | ||
67 | - { | ||
68 | - dynamic_strings = (char *) (file_contents + read32(dyn_entry->d_un.d_val, be) - loadaddr); | ||
69 | - check_ptr (dynamic_strings); | ||
70 | - break; | ||
71 | - } | ||
72 | + { | ||
73 | + /* Find the file offset of the segment containing the dynamic | ||
74 | + string table. */ | ||
75 | + Elf32_Off loadoff = -1; | ||
76 | + for (i = 0, segment = elf_pheader; | ||
77 | + i < read16(elf_header->e_phnum, be); i++, segment++) | ||
78 | + { | ||
79 | + if (read32(segment->p_type, be) == PT_LOAD | ||
80 | + && read32(dyn_entry->d_un.d_val, be) >= read32(segment->p_vaddr, be) | ||
81 | + && (read32(dyn_entry->d_un.d_val, be) - read32(segment->p_vaddr, be) | ||
82 | + < read32(segment->p_filesz, be))) | ||
83 | + { | ||
84 | + loadoff = read32(segment->p_vaddr, be) - read32(segment->p_offset, be); | ||
85 | + break; | ||
86 | + } | ||
87 | + } | ||
88 | + if (loadoff == (Elf32_Off) -1) | ||
89 | + { | ||
90 | + /* Very strange. */ | ||
91 | + loadoff = 0; | ||
92 | + } | ||
93 | + | ||
94 | + dynamic_strings = (char *) (file_contents + read32(dyn_entry->d_un.d_val, be) - loadoff); | ||
95 | + check_ptr (dynamic_strings); | ||
96 | + break; | ||
97 | + } | ||
98 | } | ||
99 | |||
100 | if (dynamic_strings == NULL) | ||
101 | @@ -269,7 +278,6 @@ process_elf_file64 (const char *file_name, const char *lib, int *flag, | ||
102 | { | ||
103 | int i; | ||
104 | unsigned int j; | ||
105 | - Elf64_Addr loadaddr; | ||
106 | Elf64_Addr dynamic_addr; | ||
107 | Elf64_Xword dynamic_size; | ||
108 | char *program_interpreter; | ||
109 | @@ -347,7 +355,6 @@ process_elf_file64 (const char *file_name, const char *lib, int *flag, | ||
110 | break; | ||
111 | } | ||
112 | |||
113 | - loadaddr = -1; | ||
114 | dynamic_addr = 0; | ||
115 | dynamic_size = 0; | ||
116 | program_interpreter = NULL; | ||
117 | @@ -358,11 +365,6 @@ process_elf_file64 (const char *file_name, const char *lib, int *flag, | ||
118 | |||
119 | switch (read32(segment->p_type, be)) | ||
120 | { | ||
121 | - case PT_LOAD: | ||
122 | - if (loadaddr == (Elf64_Addr) -1) | ||
123 | - loadaddr = read64(segment->p_vaddr, be) - read64(segment->p_offset, be); | ||
124 | - break; | ||
125 | - | ||
126 | case PT_DYNAMIC: | ||
127 | if (dynamic_addr) | ||
128 | error (0, 0, _("more than one dynamic segment\n")); | ||
129 | @@ -426,11 +428,6 @@ process_elf_file64 (const char *file_name, const char *lib, int *flag, | ||
130 | } | ||
131 | |||
132 | } | ||
133 | - if (loadaddr == (Elf64_Addr) -1) | ||
134 | - { | ||
135 | - /* Very strange. */ | ||
136 | - loadaddr = 0; | ||
137 | - } | ||
138 | |||
139 | /* Now we can read the dynamic sections. */ | ||
140 | if (dynamic_size == 0) | ||
141 | @@ -446,11 +443,32 @@ process_elf_file64 (const char *file_name, const char *lib, int *flag, | ||
142 | { | ||
143 | check_ptr (dyn_entry); | ||
144 | if (read64(dyn_entry->d_tag, be) == DT_STRTAB) | ||
145 | - { | ||
146 | - dynamic_strings = (char *) (file_contents + read64(dyn_entry->d_un.d_val, be) - loadaddr); | ||
147 | - check_ptr (dynamic_strings); | ||
148 | - break; | ||
149 | - } | ||
150 | + { | ||
151 | + /* Find the file offset of the segment containing the dynamic | ||
152 | + string table. */ | ||
153 | + Elf64_Off loadoff = -1; | ||
154 | + for (i = 0, segment = elf_pheader; | ||
155 | + i < read16(elf_header->e_phnum, be); i++, segment++) | ||
156 | + { | ||
157 | + if (read64(segment->p_type, be) == PT_LOAD | ||
158 | + && read64(dyn_entry->d_un.d_val, be) >= read64(segment->p_vaddr, be) | ||
159 | + && (read64(dyn_entry->d_un.d_val, be) - read64(segment->p_vaddr, be) | ||
160 | + < read64(segment->p_filesz, be))) | ||
161 | + { | ||
162 | + loadoff = read64(segment->p_vaddr, be) - read64(segment->p_offset, be); | ||
163 | + break; | ||
164 | + } | ||
165 | + } | ||
166 | + if (loadoff == (Elf32_Off) -1) | ||
167 | + { | ||
168 | + /* Very strange. */ | ||
169 | + loadoff = 0; | ||
170 | + } | ||
171 | + | ||
172 | + dynamic_strings = (char *) (file_contents + read64(dyn_entry->d_un.d_val, be) - loadoff); | ||
173 | + check_ptr (dynamic_strings); | ||
174 | + break; | ||
175 | + } | ||
176 | } | ||
177 | |||
178 | if (dynamic_strings == NULL) | ||
diff --git a/meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig.patch b/meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig.patch index 52986e61c7..d1835c7a10 100644 --- a/meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig.patch +++ b/meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig.patch | |||
@@ -400,7 +400,7 @@ Index: ldconfig-native-2.12.1/ldconfig.c | |||
400 | return 0; | 400 | return 0; |
401 | } | 401 | } |
402 | 402 | ||
403 | +#define REPORT_BUGS_TO "mailing list : poky@yoctoproject.org" | 403 | +#define REPORT_BUGS_TO "mailing list : poky@lists.yoctoproject.org" |
404 | /* Print bug-reporting information in the help message. */ | 404 | /* Print bug-reporting information in the help message. */ |
405 | static char * | 405 | static char * |
406 | more_help (int key, const char *text, void *input) | 406 | more_help (int key, const char *text, void *input) |
diff --git a/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb b/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb index 919d11417d..9ca95d1e52 100644 --- a/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb +++ b/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb | |||
@@ -1,6 +1,6 @@ | |||
1 | SUMMARY = "A standalone native ldconfig build" | 1 | SUMMARY = "A standalone native ldconfig build" |
2 | 2 | ||
3 | LICENSE = "GPLv2+" | 3 | LICENSE = "GPL-2.0-or-later" |
4 | 4 | ||
5 | LIC_FILES_CHKSUM = "file://${S}/ldconfig.c;endline=17;md5=1d15f20937c055cb5de2329a4c054399" | 5 | LIC_FILES_CHKSUM = "file://${S}/ldconfig.c;endline=17;md5=1d15f20937c055cb5de2329a4c054399" |
6 | 6 | ||
@@ -15,9 +15,10 @@ SRC_URI = "file://ldconfig-native-2.12.1.tar.bz2 \ | |||
15 | file://endian-ness_handling_fix.patch \ | 15 | file://endian-ness_handling_fix.patch \ |
16 | file://add-64-bit-flag-for-ELF64-entries.patch \ | 16 | file://add-64-bit-flag-for-ELF64-entries.patch \ |
17 | file://no-aux-cache.patch \ | 17 | file://no-aux-cache.patch \ |
18 | file://add-riscv-support.patch \ | ||
19 | file://ldconfig-handle-.dynstr-located-in-separate-segment.patch \ | ||
18 | " | 20 | " |
19 | 21 | ||
20 | PR = "r2" | ||
21 | 22 | ||
22 | FILESEXTRAPATHS =. "${FILE_DIRNAME}/${P}:" | 23 | FILESEXTRAPATHS =. "${FILE_DIRNAME}/${P}:" |
23 | 24 | ||