From 875df27e56b82fcf970410b6d78e3672471c336a Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 8 Feb 2014 03:44:32 -0800 Subject: eglibc: Upgrade from 2.18 -> 2.19 License formatting and address for FSF in the COPYING and COPYING.LIB has changed. Dropped patched already upstream and patches that were workarounds for older glibc and busybox for e500 we have should pass --without-fp to eglibc/glibc 2.19 onwards the code is merged from eglibc into glibc upstream under nofpu/ pretext Signed-off-by: Khem Raj --- meta/classes/libc-common.bbclass | 2 +- meta/conf/distro/include/tcmode-default.inc | 2 +- .../eglibc/cross-localedef-native_2.18.bb | 49 - .../eglibc/cross-localedef-native_2.19.bb | 49 + .../0001-ARM-Pass-dl_hwcap-to-IFUNC-resolver.patch | 43 - .../eglibc-2.18/0001-R_ARM_TLS_DTPOFF32.patch | 56 - .../0001-eglibc-menuconfig-support.patch | 912 ------------ ...n-libm-err-tab.pl-with-specific-dirs-in-S.patch | 36 - ...0002-eglibc-menuconfig-hex-string-options.patch | 169 --- ...0003-eglibc-menuconfig-build-instructions.patch | 176 --- .../eglibc/eglibc-2.18/GLRO_dl_debug_mask.patch | 143 -- .../eglibc/eglibc-2.18/IO-acquire-lock-fix.patch | 17 - .../eglibc-2.18/add_resource_h_to_wait_h.patch | 20 - .../eglibc-svn-arm-lowlevellock-include-tls.patch | 21 - .../eglibc_fix_findidx_parameters.patch | 38 - .../recipes-core/eglibc/eglibc-2.18/etc/ld.so.conf | 0 .../eglibc-2.18/fileops-without-wchar-io.patch | 22 - .../eglibc/eglibc-2.18/fix-tibetian-locales.patch | 38 - .../eglibc/eglibc-2.18/fix_for_centos_5.8.patch | 18 - .../eglibc/eglibc-2.18/fsl-ppc-no-fsqrt.patch | 100 -- .../eglibc/eglibc-2.18/generate-supported.mk | 11 - .../eglibc/eglibc-2.18/glibc.fix_sqrt2.patch | 1491 -------------------- .../eglibc/eglibc-2.18/initgroups_keys.patch | 20 - .../eglibc/eglibc-2.18/ld-search-order.patch | 56 - meta/recipes-core/eglibc/eglibc-2.18/make-4.patch | 31 - .../eglibc/eglibc-2.18/mips-rld-map-check.patch | 26 - .../eglibc/eglibc-2.18/multilib_readlib.patch | 17 - .../eglibc/eglibc-2.18/ppc-sqrt_finite.patch | 184 --- .../eglibc/eglibc-2.18/ppc_slow_ieee754_sqrt.patch | 365 ----- .../eglibc/eglibc-2.18/relocatable_sdk.patch | 108 -- .../eglibc-2.18/relocatable_sdk_fix_openpath.patch | 41 - .../eglibc/eglibc-2.18/tzselect-awk.patch | 42 - .../eglibc/eglibc-2.18/tzselect-sh.patch | 156 -- .../eglibc-2.19/0001-R_ARM_TLS_DTPOFF32.patch | 56 + .../0001-eglibc-menuconfig-support.patch | 912 ++++++++++++ ...n-libm-err-tab.pl-with-specific-dirs-in-S.patch | 36 + ...0002-eglibc-menuconfig-hex-string-options.patch | 169 +++ ...0003-eglibc-menuconfig-build-instructions.patch | 176 +++ .../eglibc/eglibc-2.19/GLRO_dl_debug_mask.patch | 143 ++ .../eglibc/eglibc-2.19/IO-acquire-lock-fix.patch | 17 + .../eglibc-2.19/add_resource_h_to_wait_h.patch | 20 + .../eglibc-svn-arm-lowlevellock-include-tls.patch | 21 + .../eglibc_fix_findidx_parameters.patch | 38 + .../recipes-core/eglibc/eglibc-2.19/etc/ld.so.conf | 0 .../eglibc-2.19/fileops-without-wchar-io.patch | 22 + .../eglibc/eglibc-2.19/fix-tibetian-locales.patch | 38 + .../eglibc/eglibc-2.19/fix_for_centos_5.8.patch | 18 + .../eglibc/eglibc-2.19/fsl-ppc-no-fsqrt.patch | 100 ++ .../eglibc/eglibc-2.19/generate-supported.mk | 11 + .../eglibc/eglibc-2.19/glibc.fix_sqrt2.patch | 1491 ++++++++++++++++++++ .../eglibc/eglibc-2.19/initgroups_keys.patch | 20 + .../eglibc/eglibc-2.19/ld-search-order.patch | 56 + .../eglibc/eglibc-2.19/mips-rld-map-check.patch | 26 + .../eglibc/eglibc-2.19/multilib_readlib.patch | 17 + .../eglibc/eglibc-2.19/ppc-sqrt_finite.patch | 184 +++ .../eglibc/eglibc-2.19/ppc_slow_ieee754_sqrt.patch | 365 +++++ .../eglibc/eglibc-2.19/relocatable_sdk.patch | 108 ++ .../eglibc-2.19/relocatable_sdk_fix_openpath.patch | 41 + meta/recipes-core/eglibc/eglibc-initial_2.18.bb | 11 - meta/recipes-core/eglibc/eglibc-initial_2.19.bb | 11 + meta/recipes-core/eglibc/eglibc-locale_2.18.bb | 1 - meta/recipes-core/eglibc/eglibc-locale_2.19.bb | 1 + meta/recipes-core/eglibc/eglibc-mtrace_2.18.bb | 1 - meta/recipes-core/eglibc/eglibc-mtrace_2.19.bb | 1 + meta/recipes-core/eglibc/eglibc-scripts_2.18.bb | 1 - meta/recipes-core/eglibc/eglibc-scripts_2.19.bb | 1 + meta/recipes-core/eglibc/eglibc_2.18.bb | 149 -- meta/recipes-core/eglibc/eglibc_2.19.bb | 145 ++ 68 files changed, 4295 insertions(+), 4571 deletions(-) delete mode 100644 meta/recipes-core/eglibc/cross-localedef-native_2.18.bb create mode 100644 meta/recipes-core/eglibc/cross-localedef-native_2.19.bb delete mode 100644 meta/recipes-core/eglibc/eglibc-2.18/0001-ARM-Pass-dl_hwcap-to-IFUNC-resolver.patch delete mode 100644 meta/recipes-core/eglibc/eglibc-2.18/0001-R_ARM_TLS_DTPOFF32.patch delete mode 100644 meta/recipes-core/eglibc/eglibc-2.18/0001-eglibc-menuconfig-support.patch delete mode 100644 meta/recipes-core/eglibc/eglibc-2.18/0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch delete mode 100644 meta/recipes-core/eglibc/eglibc-2.18/0002-eglibc-menuconfig-hex-string-options.patch delete mode 100644 meta/recipes-core/eglibc/eglibc-2.18/0003-eglibc-menuconfig-build-instructions.patch delete mode 100644 meta/recipes-core/eglibc/eglibc-2.18/GLRO_dl_debug_mask.patch delete mode 100644 meta/recipes-core/eglibc/eglibc-2.18/IO-acquire-lock-fix.patch delete mode 100644 meta/recipes-core/eglibc/eglibc-2.18/add_resource_h_to_wait_h.patch delete mode 100644 meta/recipes-core/eglibc/eglibc-2.18/eglibc-svn-arm-lowlevellock-include-tls.patch delete mode 100644 meta/recipes-core/eglibc/eglibc-2.18/eglibc_fix_findidx_parameters.patch delete mode 100644 meta/recipes-core/eglibc/eglibc-2.18/etc/ld.so.conf delete mode 100644 meta/recipes-core/eglibc/eglibc-2.18/fileops-without-wchar-io.patch delete mode 100644 meta/recipes-core/eglibc/eglibc-2.18/fix-tibetian-locales.patch delete mode 100644 meta/recipes-core/eglibc/eglibc-2.18/fix_for_centos_5.8.patch delete mode 100644 meta/recipes-core/eglibc/eglibc-2.18/fsl-ppc-no-fsqrt.patch delete mode 100644 meta/recipes-core/eglibc/eglibc-2.18/generate-supported.mk delete mode 100644 meta/recipes-core/eglibc/eglibc-2.18/glibc.fix_sqrt2.patch delete mode 100644 meta/recipes-core/eglibc/eglibc-2.18/initgroups_keys.patch delete mode 100644 meta/recipes-core/eglibc/eglibc-2.18/ld-search-order.patch delete mode 100644 meta/recipes-core/eglibc/eglibc-2.18/make-4.patch delete mode 100644 meta/recipes-core/eglibc/eglibc-2.18/mips-rld-map-check.patch delete mode 100644 meta/recipes-core/eglibc/eglibc-2.18/multilib_readlib.patch delete mode 100644 meta/recipes-core/eglibc/eglibc-2.18/ppc-sqrt_finite.patch delete mode 100644 meta/recipes-core/eglibc/eglibc-2.18/ppc_slow_ieee754_sqrt.patch delete mode 100644 meta/recipes-core/eglibc/eglibc-2.18/relocatable_sdk.patch delete mode 100644 meta/recipes-core/eglibc/eglibc-2.18/relocatable_sdk_fix_openpath.patch delete mode 100644 meta/recipes-core/eglibc/eglibc-2.18/tzselect-awk.patch delete mode 100644 meta/recipes-core/eglibc/eglibc-2.18/tzselect-sh.patch create mode 100644 meta/recipes-core/eglibc/eglibc-2.19/0001-R_ARM_TLS_DTPOFF32.patch create mode 100644 meta/recipes-core/eglibc/eglibc-2.19/0001-eglibc-menuconfig-support.patch create mode 100644 meta/recipes-core/eglibc/eglibc-2.19/0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch create mode 100644 meta/recipes-core/eglibc/eglibc-2.19/0002-eglibc-menuconfig-hex-string-options.patch create mode 100644 meta/recipes-core/eglibc/eglibc-2.19/0003-eglibc-menuconfig-build-instructions.patch create mode 100644 meta/recipes-core/eglibc/eglibc-2.19/GLRO_dl_debug_mask.patch create mode 100644 meta/recipes-core/eglibc/eglibc-2.19/IO-acquire-lock-fix.patch create mode 100644 meta/recipes-core/eglibc/eglibc-2.19/add_resource_h_to_wait_h.patch create mode 100644 meta/recipes-core/eglibc/eglibc-2.19/eglibc-svn-arm-lowlevellock-include-tls.patch create mode 100644 meta/recipes-core/eglibc/eglibc-2.19/eglibc_fix_findidx_parameters.patch create mode 100644 meta/recipes-core/eglibc/eglibc-2.19/etc/ld.so.conf create mode 100644 meta/recipes-core/eglibc/eglibc-2.19/fileops-without-wchar-io.patch create mode 100644 meta/recipes-core/eglibc/eglibc-2.19/fix-tibetian-locales.patch create mode 100644 meta/recipes-core/eglibc/eglibc-2.19/fix_for_centos_5.8.patch create mode 100644 meta/recipes-core/eglibc/eglibc-2.19/fsl-ppc-no-fsqrt.patch create mode 100644 meta/recipes-core/eglibc/eglibc-2.19/generate-supported.mk create mode 100644 meta/recipes-core/eglibc/eglibc-2.19/glibc.fix_sqrt2.patch create mode 100644 meta/recipes-core/eglibc/eglibc-2.19/initgroups_keys.patch create mode 100644 meta/recipes-core/eglibc/eglibc-2.19/ld-search-order.patch create mode 100644 meta/recipes-core/eglibc/eglibc-2.19/mips-rld-map-check.patch create mode 100644 meta/recipes-core/eglibc/eglibc-2.19/multilib_readlib.patch create mode 100644 meta/recipes-core/eglibc/eglibc-2.19/ppc-sqrt_finite.patch create mode 100644 meta/recipes-core/eglibc/eglibc-2.19/ppc_slow_ieee754_sqrt.patch create mode 100644 meta/recipes-core/eglibc/eglibc-2.19/relocatable_sdk.patch create mode 100644 meta/recipes-core/eglibc/eglibc-2.19/relocatable_sdk_fix_openpath.patch delete mode 100644 meta/recipes-core/eglibc/eglibc-initial_2.18.bb create mode 100644 meta/recipes-core/eglibc/eglibc-initial_2.19.bb delete mode 100644 meta/recipes-core/eglibc/eglibc-locale_2.18.bb create mode 100644 meta/recipes-core/eglibc/eglibc-locale_2.19.bb delete mode 100644 meta/recipes-core/eglibc/eglibc-mtrace_2.18.bb create mode 100644 meta/recipes-core/eglibc/eglibc-mtrace_2.19.bb delete mode 100644 meta/recipes-core/eglibc/eglibc-scripts_2.18.bb create mode 100644 meta/recipes-core/eglibc/eglibc-scripts_2.19.bb delete mode 100644 meta/recipes-core/eglibc/eglibc_2.18.bb create mode 100644 meta/recipes-core/eglibc/eglibc_2.19.bb diff --git a/meta/classes/libc-common.bbclass b/meta/classes/libc-common.bbclass index 67b018b753..daf499d3eb 100644 --- a/meta/classes/libc-common.bbclass +++ b/meta/classes/libc-common.bbclass @@ -19,7 +19,7 @@ do_install() { } def get_libc_fpu_setting(bb, d): - if d.getVar('TARGET_FPU', True) in [ 'soft' ]: + if d.getVar('TARGET_FPU', True) in [ 'soft', 'ppc-efd' ]: return "--without-fp" return "" diff --git a/meta/conf/distro/include/tcmode-default.inc b/meta/conf/distro/include/tcmode-default.inc index 1805da7b42..d6a626cfab 100644 --- a/meta/conf/distro/include/tcmode-default.inc +++ b/meta/conf/distro/include/tcmode-default.inc @@ -20,7 +20,7 @@ PREFERRED_PROVIDER_virtual/gettext ??= "gettext" GCCVERSION ?= "4.8%" SDKGCCVERSION ?= "${GCCVERSION}" BINUVERSION ?= "2.24" -EGLIBCVERSION ?= "2.18" +EGLIBCVERSION ?= "2.19" UCLIBCVERSION ?= "0.9.33+git%" LINUXLIBCVERSION ?= "3.10" diff --git a/meta/recipes-core/eglibc/cross-localedef-native_2.18.bb b/meta/recipes-core/eglibc/cross-localedef-native_2.18.bb deleted file mode 100644 index 4e7e947512..0000000000 --- a/meta/recipes-core/eglibc/cross-localedef-native_2.18.bb +++ /dev/null @@ -1,49 +0,0 @@ -SUMMARY = "Cross locale generation tool for eglibc" -HOMEPAGE = "http://www.eglibc.org/home" -SECTION = "libs" -LICENSE = "LGPL-2.1" - -LIC_DIR = "${WORKDIR}/eglibc-${PV}/libc" -LIC_FILES_CHKSUM = "file://${LIC_DIR}/LICENSES;md5=e9a558e243b36d3209f380deb394b213 \ - file://${LIC_DIR}/COPYING;md5=393a5ca445f6965873eca0259a17f833 \ - file://${LIC_DIR}/posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \ - file://${LIC_DIR}/COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff " - - -inherit native -inherit autotools - -# pick up an eglibc patch -FILESPATH = "${FILE_DIRNAME}/eglibc-${PV}" - -SRC_URI = "http://downloads.yoctoproject.org/releases/eglibc/eglibc-${PV}-svnr23787.tar.bz2 \ - file://fix_for_centos_5.8.patch;patchdir=.. \ - " -SRC_URI[md5sum] = "b395b021422a027d89884992e91734fc" -SRC_URI[sha256sum] = "15f564b45dc5dd65faf0875579e3447961ae61e876933384ae05d19328539ad4" - -S = "${WORKDIR}/eglibc-${PV}/localedef" - -do_unpack_append() { - bb.build.exec_func('do_move_ports', d) -} - -do_move_ports() { - if test -d ${WORKDIR}/eglibc-${PV}/ports ; then - rm -rf ${WORKDIR}/libc/ports - mv ${WORKDIR}/eglibc-${PV}/ports ${WORKDIR}/libc/ - fi -} - -EXTRA_OECONF = "--with-glibc=${WORKDIR}/eglibc-${PV}/libc" -CFLAGS += "-DNOT_IN_libc=1" - -do_configure () { - ${S}/configure ${EXTRA_OECONF} -} - - -do_install() { - install -d ${D}${bindir} - install -m 0755 ${B}/localedef ${D}${bindir}/cross-localedef -} diff --git a/meta/recipes-core/eglibc/cross-localedef-native_2.19.bb b/meta/recipes-core/eglibc/cross-localedef-native_2.19.bb new file mode 100644 index 0000000000..d3f43bd4d4 --- /dev/null +++ b/meta/recipes-core/eglibc/cross-localedef-native_2.19.bb @@ -0,0 +1,49 @@ +SUMMARY = "Cross locale generation tool for eglibc" +HOMEPAGE = "http://www.eglibc.org/home" +SECTION = "libs" +LICENSE = "LGPL-2.1" + +LIC_DIR = "${WORKDIR}/eglibc-${PV}/libc" +LIC_FILES_CHKSUM = "file://${LIC_DIR}/LICENSES;md5=e9a558e243b36d3209f380deb394b213 \ + file://${LIC_DIR}/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://${LIC_DIR}/posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \ + file://${LIC_DIR}/COPYING.LIB;md5=4fbd65380cdd255951079008b364516c" + + +inherit native +inherit autotools + +# pick up an eglibc patch +FILESPATH = "${FILE_DIRNAME}/eglibc-${PV}" + +SRC_URI = "http://sakrah.homelinux.org/files/eglibc-${PV}-svnr25243.tar.bz2 \ + file://fix_for_centos_5.8.patch;patchdir=.. \ + " +SRC_URI[md5sum] = "197836c2ba42fb146e971222647198dd" +SRC_URI[sha256sum] = "baaa030531fc308f7820c46acdf8e1b2f8e3c1f40bcd28b6e440d1c95d170d4c" + +S = "${WORKDIR}/eglibc-${PV}/localedef" + +do_unpack_append() { + bb.build.exec_func('do_move_ports', d) +} + +do_move_ports() { + if test -d ${WORKDIR}/eglibc-${PV}/ports ; then + rm -rf ${WORKDIR}/libc/ports + mv ${WORKDIR}/eglibc-${PV}/ports ${WORKDIR}/libc/ + fi +} + +EXTRA_OECONF = "--with-glibc=${WORKDIR}/eglibc-${PV}/libc" +CFLAGS += "-DNOT_IN_libc=1" + +do_configure () { + ${S}/configure ${EXTRA_OECONF} +} + + +do_install() { + install -d ${D}${bindir} + install -m 0755 ${B}/localedef ${D}${bindir}/cross-localedef +} diff --git a/meta/recipes-core/eglibc/eglibc-2.18/0001-ARM-Pass-dl_hwcap-to-IFUNC-resolver.patch b/meta/recipes-core/eglibc/eglibc-2.18/0001-ARM-Pass-dl_hwcap-to-IFUNC-resolver.patch deleted file mode 100644 index 24d4772728..0000000000 --- a/meta/recipes-core/eglibc/eglibc-2.18/0001-ARM-Pass-dl_hwcap-to-IFUNC-resolver.patch +++ /dev/null @@ -1,43 +0,0 @@ -Upstream-Status: Backport - -From d0721e703d222c01a9e8c329311c4fb01dac6972 Mon Sep 17 00:00:00 2001 -From: Carlos O'Donell -Date: Thu, 29 Aug 2013 00:17:33 -0400 -Subject: [PATCH] ARM: Pass dl_hwcap to IFUNC resolver. - -For REL relocs pass dl_hwcap to the IFUNC resolver -as is required by the IFUNC API (bug 15905). ---- - NEWS | 2 +- - ports/ChangeLog.arm | 7 +++++++ - ports/sysdeps/arm/dl-machine.h | 2 +- - 3 files changed, 9 insertions(+), 2 deletions(-) - -Index: libc/ports/ChangeLog.arm -=================================================================== ---- libc.orig/ports/ChangeLog.arm 2013-07-14 16:08:52.000000000 -0700 -+++ libc/ports/ChangeLog.arm 2013-09-12 17:17:24.174387150 -0700 -@@ -1,3 +1,10 @@ -+2013-08-28 Kyle McMartin -+ Carlos O'Donell -+ -+ [BZ #15905] -+ * sysdeps/arm/dl-machine [!RTLD_BOOTSTRAP] (elf_machine_rel): -+ Pass GLRO(dl_hwcap) to the IFUNC resolver. -+ - 2013-07-03 Joseph Myers - - * sysdeps/arm/include/bits/setjmp.h [_ISOMAC] (JMP_BUF_REGLIST): -Index: libc/ports/sysdeps/arm/dl-machine.h -=================================================================== ---- libc.orig/ports/sysdeps/arm/dl-machine.h 2013-09-12 08:56:03.641743520 -0700 -+++ libc/ports/sysdeps/arm/dl-machine.h 2013-09-12 17:17:24.174387150 -0700 -@@ -503,7 +503,7 @@ - break; - case R_ARM_IRELATIVE: - value = map->l_addr + *reloc_addr; -- value = ((Elf32_Addr (*) (void)) value) (); -+ value = ((Elf32_Addr (*) (int)) value) (GLRO(dl_hwcap)); - *reloc_addr = value; - break; - #endif diff --git a/meta/recipes-core/eglibc/eglibc-2.18/0001-R_ARM_TLS_DTPOFF32.patch b/meta/recipes-core/eglibc/eglibc-2.18/0001-R_ARM_TLS_DTPOFF32.patch deleted file mode 100644 index b4489e9ae9..0000000000 --- a/meta/recipes-core/eglibc/eglibc-2.18/0001-R_ARM_TLS_DTPOFF32.patch +++ /dev/null @@ -1,56 +0,0 @@ - -Quote from bug 1443 which explains what the patch does : - - We build some random program and link it with -lust. When we run it, - it dies with a SIGSEGV before reaching main(). - - Libust.so depends on liburcu-bp.so from the usermode-rcu package. - Although libust.so is not prelinked, liburcu-bp.so IS prelinked; this - is critical. - - Libust.so uses a TLS / __thread variable that is defined in liburcu- - bp.so. There are special ARM-specific relocation types that allow two - shared libraries to share thread-specific data. This is critical too. - - One more critical issue: although liburcu-bp.so is prelinked, we can't - load it at its prelinked address, because we also link against - librt.so, and librt.so uses that address. - - The dynamic linker is forced to relink liburcu-bp.so at a different - address. In the course of relinking, it processes the special ARM - relocation record mentioned above. The prelinker has already filled - in the information, which is a short offset into a table of thread- - specific data that is allocated per-thread for each library that uses - TLS. Because the normal behavior of a relocation is to add the symbol - value to an addend stored at the address being relocated, we end up - adding the short offset to itself, doubling it. - - Now we have an awkward situation. The libust.so library doesn't know - about the addend, so its TLS data for this element is correct. The - liburcu-bp.so library has a different offset for the element. When we - go to initialize the element for the first time in liburcu-bp.so, we - write the address of the result at the doubled (broken) offset. - Later, when we refer to the address from libust.so, we check the value - at the correct offset, but it's NULL, so we eat hot SIGSEGV. - -Upstream-Status: Pending - -Signed-off-by: Andrei Dinu ---- - .../libc/ports/sysdeps/arm/dl-machine.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -ndex 8d905e8..dcfa71e 100644 ---- libc.orig/ports/sysdeps/arm/dl-machine.h -+++ libc/ports/sysdeps/arm/dl-machine.h -@@ -503,7 +503,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, - - case R_ARM_TLS_DTPOFF32: - if (sym != NULL) -- *reloc_addr += sym->st_value; -+ *reloc_addr = sym->st_value; - break; - - case R_ARM_TLS_TPOFF32: --- - diff --git a/meta/recipes-core/eglibc/eglibc-2.18/0001-eglibc-menuconfig-support.patch b/meta/recipes-core/eglibc/eglibc-2.18/0001-eglibc-menuconfig-support.patch deleted file mode 100644 index 9e23e7cda2..0000000000 --- a/meta/recipes-core/eglibc/eglibc-2.18/0001-eglibc-menuconfig-support.patch +++ /dev/null @@ -1,912 +0,0 @@ -Pulled from -http://www.eglibc.org/archives/patches/msg01042.html - -Upstream-Status: Pending -Signed-off-by: Khem - -Hi, - -This patch adds 'make menuconfig' support to EGLIBC. - - -EGLIBC can re-use the Linux kernel kconfig host tools ('conf' and 'mconf') unmodified, by passing appropriate environment variables and with some pre- and post-processing on the input/output config files. - -There are three new make targets supported, which all are defined in the new libc/options-config/Makefile, which is included by the top-level libc/Makefile: - -- 'make defconfig'. This passes 'libc/option-groups.defaults' to 'conf' as a default config, and outputs 'option-groups.config' to the top-level build directory, which will be the same as the default config. - -- 'make config'. This is the same line-oriented interface as in the Linux kernel. Input and output is 'option-groups.config' in the top-level build directory. - -- 'make menuconfig'. This is the same menu-based interface as in the Linux kernel. Input and output is 'option-groups.config' in the top-level build directory. - - -Pre-Processing: - - -The Linux kernel kconfig tools expect a prefix of "CONFIG_" on all config option names, but EGLIBC expects a prefix of "OPTION_". The pre-processing script, libc/options-config/config-preproc.pl, simply replaces "CONFIG_ with "OPTION_" in the given config file. The libc/options-config/Makefile passes the script output to a temporary config file, which is then passed to 'conf' or 'mconf'. - -Post-Processing (libc/options-config/config-postproc.pl): - - -- Disabled options are output as a comment line of the form "# CONFIG_FOO is not set". This needs to be changed to an explicit "CONFIG_FOO=n" in order to be compatible with 'option-groups.awk' which generates the option-groups.h header. - -- "CONFIG_" prefix is changed back to "OPTION_". - - -- The kconfig tools will not output anything for options that depend on a parent option, when the parent option is disabled. This implicit disable must be converted to an explicit "CONFIG_FOO=n" in order to be compatible with the way EGLIBC overrides the default option settings in 'libc/option-groups.defaults' with those in 'option-groups.config'. - - -A new configure option, '--with-kconfig=', tells EGLIBC where to find the pre-built 'conf' and 'mconf' host tools from Linux kernel builds. - -libc/EGLIBC.cross-building is updated to include instructions for using '--with-kconfig' for the final EGLIBC build, and shows how and when to run 'make *config'. - -libc/EGLIBC.option-groups is updated to include new information on the menuconfig support. - -Thanks, - -attached is the updated patch to address above issues. - -Steve - --- -Steve Longerbeam | Senior Embedded Engineer, ESD Services -Mentor Embedded(tm) | 46871 Bayside Parkway, Fremont, CA 94538 -P 510.354.5838 | M 408.410.2735 -Nucleus(r) | Linux(r) | Android(tm) | Services | UI | Multi-OS - - -Index: libc/EGLIBC.cross-building -=================================================================== ---- libc.orig/EGLIBC.cross-building 2007-04-20 16:15:03.000000000 -0700 -+++ libc/EGLIBC.cross-building 2013-06-26 00:45:15.788885570 -0700 -@@ -243,9 +243,29 @@ - > $src/libc/configure \ - > --prefix=/usr \ - > --with-headers=$sysroot/usr/include \ -+ > --with-kconfig=$obj/linux/scripts/kconfig \ - > --build=$build \ - > --host=$target \ - > --disable-profile --without-gd --without-cvs --enable-add-ons -+ -+Note the additional '--with-kconfig' option. This tells EGLIBC where to -+find the host config tools used by the kernel 'make config' and 'make -+menuconfig'. These tools can be re-used by EGLIBC for its own 'make -+*config' support, which will create 'option-groups.config' for you. -+But first make sure those tools have been built by running some -+dummy 'make *config' calls in the kernel directory: -+ -+ $ cd $obj/linux -+ $ PATH=$tools/bin:$PATH make config \ -+ > ARCH=$linux_arch CROSS_COMPILE=$target- \ -+ $ PATH=$tools/bin:$PATH make menuconfig \ -+ > ARCH=$linux_arch CROSS_COMPILE=$target- \ -+ -+Now we can configure and build the full EGLIBC: -+ -+ $ cd $obj/eglibc -+ $ PATH=$tools/bin:$PATH make defconfig -+ $ PATH=$tools/bin:$PATH make menuconfig - $ PATH=$tools/bin:$PATH make - $ PATH=$tools/bin:$PATH make install install_root=$sysroot - -Index: libc/configure.in -=================================================================== ---- libc.orig/configure.in 2013-06-24 15:42:26.000000000 -0700 -+++ libc/configure.in 2013-06-26 00:45:15.792885570 -0700 -@@ -127,6 +127,16 @@ - [sysheaders='']) - AC_SUBST(sysheaders) - -+AC_ARG_WITH([kconfig], -+ AC_HELP_STRING([--with-kconfig=PATH], -+ [location of kconfig tools to use (from Linux -+ kernel builds) to re-use for configuring EGLIBC -+ option groups]), -+ [KCONFIG_TOOLS=$withval], -+ [KCONFIG_TOOLS='']) -+AC_SUBST(KCONFIG_TOOLS) -+ -+ - AC_SUBST(use_default_link) - AC_ARG_WITH([default-link], - AC_HELP_STRING([--with-default-link], -Index: libc/config.make.in -=================================================================== ---- libc.orig/config.make.in 2013-04-28 08:21:50.000000000 -0700 -+++ libc/config.make.in 2013-06-26 00:45:15.792885570 -0700 -@@ -45,6 +45,8 @@ - c++-sysincludes = @CXX_SYSINCLUDES@ - all-warnings = @all_warnings@ - -+kconfig_tools = @KCONFIG_TOOLS@ -+ - have-z-combreloc = @libc_cv_z_combreloc@ - have-z-execstack = @libc_cv_z_execstack@ - have-Bgroup = @libc_cv_Bgroup@ -Index: libc/options-config/config-postproc.pl -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ libc/options-config/config-postproc.pl 2013-06-26 00:45:15.792885570 -0700 -@@ -0,0 +1,54 @@ -+#!/usr/bin/perl -+ -+$usage = "usage: $0 \n"; -+ -+die "$usage" unless @ARGV; -+$defaults = shift @ARGV; -+die "$usage" unless @ARGV; -+die "Could not open $ARGV[0]" unless -T $ARGV[0]; -+ -+sub yank { -+ @option = grep($_ ne $_[0], @option); -+} -+ -+open(DEFAULTS, $defaults) || die "Could not open $defaults\n"; -+ -+# get the full list of available options using the default config file -+$i = 0; -+while () { -+ if (/^\s*OPTION_(\w+)\s*=/) { -+ $option[$i++] = $1; -+ } -+} -+ -+# now go through the config file, making the necessary changes -+while (<>) { -+ if (/Linux Kernel Configuration/) { -+ # change title -+ s/Linux Kernel/Option Groups/; -+ print; -+ } elsif (/^\s*CONFIG_(\w+)\s*=/) { -+ # this is an explicit option set line, change CONFIG_ to OPTION_ -+ # before printing and remove this option from option list -+ $opt = $1; -+ yank($opt); -+ s/CONFIG_/OPTION_/g; -+ print; -+ } elsif (/^\s*#\s+CONFIG_(\w+) is not set/) { -+ # this is a comment line, change CONFIG_ to OPTION_, remove this -+ # option from option list, and convert to explicit OPTION_FOO=n -+ $opt = $1; -+ yank($opt); -+ s/CONFIG_/OPTION_/g; -+ print "OPTION_$opt=n\n"; -+ } else { -+ print; -+ } -+} -+ -+# any options left in @options, are options that were not mentioned in -+# the config file, and implicitly that means the option must be set =n, -+# so do that here. -+foreach $opt (@option) { -+ print "OPTION_$opt=n\n"; -+} -Index: libc/options-config/config-preproc.pl -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ libc/options-config/config-preproc.pl 2013-06-26 00:45:15.792885570 -0700 -@@ -0,0 +1,8 @@ -+#!/usr/bin/perl -+ -+if (@ARGV) { -+ while (<>) { -+ s/OPTION_/CONFIG_/g; -+ print; -+ } -+} -Index: libc/options-config/Makefile -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ libc/options-config/Makefile 2013-06-26 00:45:15.792885570 -0700 -@@ -0,0 +1,55 @@ -+# =========================================================================== -+# EGLIBC option-groups configuration targets -+# These targets are included from top-level makefile -+ -+ifneq ($(kconfig_tools),) -+ifneq (no,$(PERL)) -+ -+ocdir := options-config -+ -+OconfigDefaults := option-groups.defaults -+OconfigDefaults_tmp := $(common-objpfx).tmp.defconfig -+OconfigDef := option-groups.def -+Oconfig := $(common-objpfx)option-groups.config -+Oconfig_tmp := $(common-objpfx).tmp.config -+ -+conf := $(kconfig_tools)/conf -+mconf := $(kconfig_tools)/mconf -+ -+preproc := $(PERL) $(ocdir)/config-preproc.pl -+postproc := $(PERL) $(ocdir)/config-postproc.pl -+ -+PHONY += defconfig config menuconfig -+ -+defconfig: $(conf) $(OconfigDefaults) $(OconfigDef) -+ rm -f $(OconfigDefaults_tmp) -+ rm -f $(Oconfig_tmp) -+ $(preproc) $(OconfigDefaults) > $(OconfigDefaults_tmp) -+ KCONFIG_CONFIG=$(Oconfig_tmp) $< --defconfig=$(OconfigDefaults_tmp) \ -+ $(OconfigDef) -+ $(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig) -+ rm $(Oconfig_tmp) -+ rm $(OconfigDefaults_tmp) -+ -+config: $(conf) $(OconfigDefaults) $(OconfigDef) -+ rm -f $(Oconfig_tmp) -+ $(preproc) $(wildcard $(Oconfig)) > $(Oconfig_tmp) -+ KCONFIG_CONFIG=$(Oconfig_tmp) $< --oldaskconfig $(OconfigDef) -+ $(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig) -+ rm $(Oconfig_tmp) -+ -+menuconfig: $(mconf) $(OconfigDefaults) $(OconfigDef) -+ rm -f $(Oconfig_tmp) -+ $(preproc) $(wildcard $(Oconfig)) > $(Oconfig_tmp) -+ KCONFIG_CONFIG=$(Oconfig_tmp) $< $(OconfigDef) -+ $(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig) -+ rm $(Oconfig_tmp) -+ -+# Help text used by make help -+help: -+ @echo ' defconfig - New config with default from default config' -+ @echo ' config - Update current config utilising a line-oriented program' -+ @echo ' menuconfig - Update current config utilising a menu based program' -+ -+endif -+endif -Index: libc/option-groups.def -=================================================================== ---- libc.orig/option-groups.def 2013-05-17 17:12:09.000000000 -0700 -+++ libc/option-groups.def 2013-06-26 00:45:15.796885570 -0700 -@@ -4,19 +4,19 @@ - # - # An entry of the form: - # --# config OPTION_GROUP_NAME -+# config GROUP_NAME - # bool "one-line explanation of what this option group controls" - # help - # Multi-line help explaining the option group's meaning in - # some detail, terminated by indentation level. - # --# defines an option group whose variable is OPTION_GROUP_NAME, with -+# defines an option group whose variable is GROUP_NAME, with - # meaningful values 'y' (enabled) and 'n' (disabled). The - # documentation is formatted to be consumed by some sort of - # interactive configuration interface, but EGLIBC doesn't have such an - # interface yet. - # --# An option may have a 'depends' line, indicating which other options -+# An option may have a 'depends on' line, indicating which other options - # must also be enabled if this option is. At present, EGLIBC doesn't - # check that these dependencies are satisfied. - # -@@ -41,9 +41,9 @@ - # although this simply reestablishes the value already set by - # 'option-groups.defaults'. - --config OPTION_EGLIBC_ADVANCED_INET6 -+config EGLIBC_ADVANCED_INET6 - bool "IPv6 Advanced Sockets API support (RFC3542)" -- depends OPTION_EGLIBC_INET -+ depends on EGLIBC_INET - help - This option group includes the functions specified by RFC 3542, - "Advanced Sockets Application Program Interface (API) for -@@ -71,7 +71,7 @@ - inet6_rth_segments - inet6_rth_space - --config OPTION_EGLIBC_BACKTRACE -+config EGLIBC_BACKTRACE - bool "Functions for producing backtraces" - help - This option group includes functions for producing a list of -@@ -85,7 +85,7 @@ - backtrace_symbols - backtrace_symbols_fd - --config OPTION_EGLIBC_BIG_MACROS -+config EGLIBC_BIG_MACROS - bool "Use extensive inline code" - help - This option group specifies whether certain pieces of code -@@ -93,7 +93,7 @@ - group is not selected, function calls will be used instead, - hence reducing the library footprint. - --config OPTION_EGLIBC_BSD -+config EGLIBC_BSD - bool "BSD-specific functions, and their compatibility stubs" - help - This option group includes functions specific to BSD kernels. -@@ -109,10 +109,9 @@ - revoke - setlogin - --config OPTION_EGLIBC_CXX_TESTS -+config EGLIBC_CXX_TESTS - bool "Tests that link against the standard C++ library." -- depends OPTION_POSIX_WIDE_CHAR_DEVICE_IO -- depends OPTION_EGLIBC_LIBM -+ depends on POSIX_WIDE_CHAR_DEVICE_IO && EGLIBC_LIBM - help - This option group does not include any C library functions; - instead, it controls which EGLIBC tests an ordinary 'make -@@ -121,23 +120,22 @@ - run. - - The standard C++ library depends on the math library 'libm' and -- the wide character I/O functions included in EGLIBC. If those -- option groups are disabled, this test must also be disabled. -+ the wide character I/O functions included in EGLIBC. So those -+ option groups must be enabled if this test is enabled. - --config OPTION_EGLIBC_CATGETS -+config EGLIBC_CATGETS - bool "Functions for accessing message catalogs" -- depends OPTION_EGLIBC_LOCALE_CODE -+ depends on EGLIBC_LOCALE_CODE - help - This option group includes functions for accessing message - catalogs: catopen, catclose, and catgets. - -- This option group depends on the OPTION_EGLIBC_LOCALE_CODE -- option group; if you disable that, you must also disable this. -+ This option group depends on the EGLIBC_LOCALE_CODE -+ option group. - --config OPTION_EGLIBC_CHARSETS -+config EGLIBC_CHARSETS - bool "iconv/gconv character set conversion libraries" - help -- - This option group includes support for character sets other - than ASCII (ANSI_X3.4-1968) and Unicode and ISO-10646 in their - various encodings. This affects both the character sets -@@ -198,16 +196,16 @@ - WCHAR_T - EGLIBC's internal form (target-endian, - 32-bit ISO 10646) - --config OPTION_EGLIBC_CRYPT -+config EGLIBC_CRYPT - bool "Encryption library" - help - This option group includes the `libcrypt' library which - provides functions for one-way encryption. Supported - encryption algorithms include MD5, SHA-256, SHA-512 and DES. - --config OPTION_EGLIBC_CRYPT_UFC -+config EGLIBC_CRYPT_UFC - bool "Ultra fast `crypt' implementation" -- depends OPTION_EGLIBC_CRYPT -+ depends on EGLIBC_CRYPT - help - This option group provides ultra fast DES-based implementation of - the `crypt' function. When this option group is disabled, -@@ -216,7 +214,7 @@ - errno to ENOSYS if /salt/ passed does not correspond to either MD5, - SHA-256 or SHA-512 algorithm. - --config OPTION_EGLIBC_DB_ALIASES -+config EGLIBC_DB_ALIASES - bool "Functions for accessing the mail aliases database" - help - This option group includues functions for looking up mail -@@ -233,7 +231,7 @@ - When this option group is disabled, the NSS service libraries - also lack support for querying their mail alias tables. - --config OPTION_EGLIBC_ENVZ -+config EGLIBC_ENVZ - bool "Functions for handling envz-style environment vectors." - help - This option group contains functions for creating and operating -@@ -248,7 +246,7 @@ - envz_entry envz_remove - envz_get envz_strip - --config OPTION_EGLIBC_FCVT -+config EGLIBC_FCVT - bool "Functions for converting floating-point numbers to strings" - help - This option group includes functions for converting -@@ -262,14 +260,14 @@ - fcvt_r qfcvt_r - gcvt qgcvt - --config OPTION_EGLIBC_FMTMSG -+config EGLIBC_FMTMSG - bool "Functions for formatting messages" - help - This option group includes the following functions: - - addseverity fmtmsg - --config OPTION_EGLIBC_FSTAB -+config EGLIBC_FSTAB - bool "Access functions for 'fstab'" - help - This option group includes functions for reading the mount -@@ -283,7 +281,7 @@ - getfsent setfsent - getfsfile - --config OPTION_EGLIBC_FTRAVERSE -+config EGLIBC_FTRAVERSE - bool "Functions for traversing file hierarchies" - help - This option group includes functions for traversing file -@@ -297,9 +295,9 @@ - fts_set nftw64 - fts_close - --config OPTION_EGLIBC_GETLOGIN -+config EGLIBC_GETLOGIN - bool "The getlogin function" -- depends OPTION_EGLIBC_UTMP -+ depends on EGLIBC_UTMP - help - This function group includes the 'getlogin' and 'getlogin_r' - functions, which return the user name associated by the login -@@ -309,17 +307,17 @@ - fall back on 'getlogin' to find the user's login name for tilde - expansion when the 'HOME' environment variable is not set. - --config OPTION_EGLIBC_IDN -+config EGLIBC_IDN - bool "International domain names support" - help - This option group includes the `libcidn' library which - provides support for international domain names. - --config OPTION_EGLIBC_INET -+config EGLIBC_INET - bool "Networking support" - help - This option group includes networking-specific functions and -- data. With OPTION_EGLIBC_INET disabled, the EGLIBC -+ data. With EGLIBC_INET disabled, the EGLIBC - installation and API changes as follows: - - - The following libraries are not installed: -@@ -439,14 +437,14 @@ - use Unix-domain sockets to communicate with the syslog daemon; - syslog is valuable in non-networked contexts. - --config OPTION_EGLIBC_INET_ANL -+config EGLIBC_INET_ANL - bool "Asynchronous name lookup" -- depends OPTION_EGLIBC_INET -+ depends on EGLIBC_INET - help - This option group includes the `libanl' library which - provides support for asynchronous name lookup. - --config OPTION_EGLIBC_LIBM -+config EGLIBC_LIBM - bool "libm (math library)" - help - This option group includes the 'libm' library, containing -@@ -464,7 +462,7 @@ - group, you will not be able to build 'libstdc++' against the - resulting EGLIBC installation. - --config OPTION_EGLIBC_LOCALES -+config EGLIBC_LOCALES - bool "Locale definitions" - help - This option group includes all locale definitions other than -@@ -472,17 +470,17 @@ - only the "C" locale is supported. - - --config OPTION_EGLIBC_LOCALE_CODE -+config EGLIBC_LOCALE_CODE - bool "Locale functions" -- depends OPTION_POSIX_C_LANG_WIDE_CHAR -+ depends on POSIX_C_LANG_WIDE_CHAR - help - This option group includes locale support functions, programs, -- and libraries. With OPTION_EGLIBC_LOCALE_FUNCTIONS disabled, -+ and libraries. With EGLIBC_LOCALE_CODE disabled, - EGLIBC supports only the 'C' locale (also known as 'POSIX'), - and ignores the settings of the 'LANG' and 'LC_*' environment - variables. - -- With OPTION_EGLIBC_LOCALE_CODE disabled, the following -+ With EGLIBC_LOCALE_CODE disabled, the following - functions are omitted from libc: - - duplocale localeconv nl_langinfo rpmatch strfmon_l -@@ -491,46 +489,43 @@ - Furthermore, only the LC_CTYPE and LC_TIME categories of the - standard "C" locale are available. - -- The OPTION_EGLIBC_CATGETS option group depends on this option -- group; if you disable OPTION_EGLIBC_LOCALE_CODE, you must also -- disable OPTION_EGLIBC_CATGETS. -+ The EGLIBC_CATGETS option group depends on this option group. -+ - --config OPTION_EGLIBC_MEMUSAGE -+config EGLIBC_MEMUSAGE - bool "Memory profiling library" - help - This option group includes the `libmemusage' library and - the `memusage' and `memusagestat' utilities. - These components provide memory profiling functions. - -- OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE -+ EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE - - Libmemusage library buffers the profiling data in memory - before writing it out to disk. By default, the library - allocates 1.5M buffer, which can be substantial for some -- systems. OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE option -+ systems. EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE option - allows to change the default buffer size. It specifies - the number of entries the buffer should have. - On most architectures one buffer entry amounts to 48 bytes, - so setting this option to the value of 512 will reduce the size of - the memory buffer to 24K. - --config OPTION_EGLIBC_NIS -+config EGLIBC_NIS - bool "Support for NIS, NIS+, and the special 'compat' services." -- depends OPTION_EGLIBC_INET -- depends OPTION_EGLIBC_SUNRPC -+ depends on EGLIBC_INET && EGLIBC_SUNRPC - help - This option group includes the NIS, NIS+, and 'compat' Name - Service Switch service libraries. When it is disabled, those - services libraries are not installed; you should remove any - references to them from your 'nsswitch.conf' file. - -- This option group depends on the OPTION_EGLIBC_INET option -+ This option group depends on the EGLIBC_INET option - group; you must enable that to enable this option group. - --config OPTION_EGLIBC_NSSWITCH -+config EGLIBC_NSSWITCH - bool "Name service switch (nsswitch) support" - help -- - This option group includes support for the 'nsswitch' facility. - With this option group enabled, all EGLIBC functions for - accessing various system databases (passwords and groups; -@@ -544,12 +539,12 @@ - 'option-groups.config' file must set the following two - variables: - -- OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG -+ EGLIBC_NSSWITCH_FIXED_CONFIG - - Set this to the name of a file whose contents observe the - same syntax as an ordinary '/etc/nsswitch.conf' file. The - EGLIBC build process parses this file just as EGLIBC would -- at run time if OPTION_EGLIBC_NSSWITCH were enabled, and -+ at run time if EGLIBC_NSSWITCH were enabled, and - produces a C library that uses the nsswitch service - libraries to search for database entries as this file - specifies, instead of consulting '/etc/nsswitch.conf' at run -@@ -567,7 +562,7 @@ - you will probably want to delete references to databases not - needed on your system. - -- OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS -+ EGLIBC_NSSWITCH_FIXED_FUNCTIONS - - The EGLIBC build process uses this file to decide which - functions to make available from which service libraries. -@@ -585,28 +580,28 @@ - Be sure to mention each function in each service you wish to - use. If you do not mention a service's function here, the - EGLIBC database access functions will not find it, even if -- it is listed in the OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG -+ it is listed in the EGLIBC_NSSWITCH_FIXED_CONFIG - file. - -- In this arrangement, EGLIBC will not use the 'dlopen' and -- 'dlsym' functions to find database access functions. Instead, -- libc hard-codes references to the service libraries' database -- access functions. You must explicitly link your program -- against the name service libraries (those whose names start -- with 'libnss_', in the sysroot's '/lib' directory) whose -- functions you intend to use. This arrangement helps -- system-wide static analysis tools decide which functions a -- system actually uses. -- -- Note that some nsswitch service libraries require other option -- groups to be enabled; for example, the OPTION_EGLIBC_INET -- option group must be enabled to use the 'libnss_dns.so.2' -- service library, which uses the Domain Name System network -- protocol to answer queries. -+ In this arrangement, EGLIBC will not use the 'dlopen' and -+ 'dlsym' functions to find database access functions. Instead, -+ libc hard-codes references to the service libraries' database -+ access functions. You must explicitly link your program -+ against the name service libraries (those whose names start -+ with 'libnss_', in the sysroot's '/lib' directory) whose -+ functions you intend to use. This arrangement helps -+ system-wide static analysis tools decide which functions a -+ system actually uses. -+ -+ Note that some nsswitch service libraries require other option -+ groups to be enabled; for example, the EGLIBC_INET -+ option group must be enabled to use the 'libnss_dns.so.2' -+ service library, which uses the Domain Name System network -+ protocol to answer queries. - --config OPTION_EGLIBC_RCMD -+config EGLIBC_RCMD - bool "Support for 'rcmd' and related library functions" -- depends OPTION_EGLIBC_INET -+ depends on EGLIBC_INET - help - This option group includes functions for running commands on - remote machines via the 'rsh' protocol, and doing authentication -@@ -622,7 +617,7 @@ - rresvport ruserpass - rresvport_af - --config OPTION_EGLIBC_RTLD_DEBUG -+config EGLIBC_RTLD_DEBUG - bool "Runtime linker debug print outs" - help - This option group enables debug output of the runtime linker -@@ -633,7 +628,7 @@ - the `ldd' utility which may also be used by the prelinker. - In particular, the `--unused' ldd option will not work correctly. - --config OPTION_EGLIBC_SPAWN -+config EGLIBC_SPAWN - bool "Support for POSIX posix_spawn functions" - help - This option group includes the POSIX functions for executing -@@ -669,7 +664,7 @@ - disabled, those programs will only operate on uncompressed - charmap files. - --config OPTION_EGLIBC_STREAMS -+config EGLIBC_STREAMS - bool "Support for accessing STREAMS." - help - This option group includes functions for reading and writing -@@ -685,14 +680,14 @@ - isastream fdetach - putmsg - --config OPTION_EGLIBC_SUNRPC -+config EGLIBC_SUNRPC - bool "Support for the Sun 'RPC' protocol." -- depends OPTION_EGLIBC_INET -+ depends on EGLIBC_INET - help - This option group includes support for the Sun RPC protocols, - including the 'rpcgen' and 'rpcinfo' programs. - --config OPTION_EGLIBC_UTMP -+config EGLIBC_UTMP - bool "Older access functions for 'utmp' login records" - help - This option group includes the older 'utent' family of -@@ -719,9 +714,9 @@ - - libutil.so (and libutil.a) - --config OPTION_EGLIBC_UTMPX -+config EGLIBC_UTMPX - bool "POSIX access functions for 'utmp' login records" -- depends OPTION_EGLIBC_UTMP -+ depends on EGLIBC_UTMP - help - This option group includes the POSIX functions for reading and - writing user login records in the 'utmp' file (usually -@@ -742,21 +737,21 @@ - updwtmpx - utmpxname - --config OPTION_EGLIBC_WORDEXP -+config EGLIBC_WORDEXP - bool "Shell-style word expansion" - help - This option group includes the 'wordexp' function for - performing word expansion in the manner of the shell, and the - accompanying 'wordfree' function. - --config OPTION_POSIX_C_LANG_WIDE_CHAR -+config POSIX_C_LANG_WIDE_CHAR - bool "ISO C library wide character functions, excluding I/O" - help - This option group includes the functions defined by the ISO C - standard for working with wide and multibyte characters in - memory. Functions for reading and writing wide and multibyte - characters from and to files call in the -- OPTION_POSIX_WIDE_CHAR_DEVICE_IO option group. -+ POSIX_WIDE_CHAR_DEVICE_IO option group. - - This option group includes the following functions: - -@@ -778,14 +773,14 @@ - mbrlen wcscoll wcstol - mbrtowc wcscpy wcstold - --config OPTION_POSIX_REGEXP -+config POSIX_REGEXP - bool "Regular expressions" - help - This option group includes the POSIX regular expression - functions, and the associated non-POSIX extensions and - compatibility functions. - -- With OPTION_POSIX_REGEXP disabled, the following functions are -+ With POSIX_REGEXP disabled, the following functions are - omitted from libc: - - re_comp re_max_failures regcomp -@@ -799,9 +794,9 @@ - header file, 'compile', 'step', and 'advance', is - omitted. - --config OPTION_POSIX_REGEXP_GLIBC -+config POSIX_REGEXP_GLIBC - bool "Regular expressions from GLIBC" -- depends OPTION_POSIX_REGEXP -+ depends on POSIX_REGEXP - help - This option group specifies which regular expression - library to use. The choice is between regex -@@ -810,9 +805,9 @@ - optimized for speed; regex from libiberty is more than twice - as small while still is enough for most practical purposes. - --config OPTION_POSIX_WIDE_CHAR_DEVICE_IO -+config POSIX_WIDE_CHAR_DEVICE_IO - bool "Input and output functions for wide characters" -- depends OPTION_POSIX_C_LANG_WIDE_CHAR -+ depends on POSIX_C_LANG_WIDE_CHAR - help - This option group includes functions for reading and writing - wide characters to and from streams. -Index: libc/Makefile -=================================================================== ---- libc.orig/Makefile 2013-06-04 08:48:26.000000000 -0700 -+++ libc/Makefile 2013-06-26 00:45:15.796885570 -0700 -@@ -24,6 +24,7 @@ - - include Makeconfig - -+include options-config/Makefile - - # This is the default target; it makes everything except the tests. - .PHONY: all -Index: libc/configure -=================================================================== ---- libc.orig/configure 2013-06-24 15:42:26.000000000 -0700 -+++ libc/configure 2013-06-26 00:45:15.800885570 -0700 -@@ -622,6 +622,7 @@ - libc_cv_have_bash2 - BASH_SHELL - libc_cv_gcc_static_libgcc -+KCONFIG_TOOLS - CXX_SYSINCLUDES - SYSINCLUDES - AUTOCONF -@@ -734,6 +735,7 @@ - with_binutils - with_selinux - with_headers -+with_kconfig - with_default_link - enable_sanity_checks - enable_shared -@@ -1432,6 +1434,9 @@ - --with-selinux if building with SELinux support - --with-headers=PATH location of system headers to use (for example - /usr/src/linux/include) [default=compiler default] -+ --with-kconfig=PATH location of kconfig tools to use (from Linux kernel -+ builds) to re-use for configuring EGLIBC option -+ groups - --with-default-link do not use explicit linker scripts - --with-cpu=CPU select code for CPU variant - -@@ -3395,6 +3400,14 @@ - - - -+# Check whether --with-kconfig was given. -+if test "${with_kconfig+set}" = set; then -+ withval=$with_kconfig; KCONFIG_TOOLS=$withval -+else -+ KCONFIG_TOOLS='' -+fi -+ -+ - - # Check whether --with-default-link was given. - if test "${with_default_link+set}" = set; then : -Index: libc/EGLIBC.option-groups -=================================================================== ---- libc.orig/EGLIBC.option-groups 2007-04-13 17:50:17.000000000 -0700 -+++ libc/EGLIBC.option-groups 2013-06-26 00:45:15.800885570 -0700 -@@ -56,33 +56,9 @@ - - The Option Groups - --EGLIBC currently implements the following option groups, also --documented in the file 'option-groups.def': -- --OPTION_EGLIBC_CATGETS -- This option group includes functions for accessing message -- catalogs: catopen, catclose, and catgets. -- --OPTION_EGLIBC_LOCALES -- This option group includes all locale definitions other than -- those for the "C" locale. If this option group is omitted, then -- only the "C" locale is supported. -- --OPTION_EGLIBC_LIBM -- This option group includes the 'libm' library, containing -- mathematical functions. If this option group is omitted, then -- an EGLIBC installation does not include shared or unshared versions -- of the math library. -- -- Note that this does not remove all floating-point related -- functionality from EGLIBC; for example, 'printf' and 'scanf' -- can still print and read floating-point values with this option -- group disabled. -- -- Note that the ISO Standard C++ library 'libstdc++' depends on -- EGLIBC's math library 'libm'. If you disable this option -- group, you will not be able to build 'libstdc++' against the -- resulting EGLIBC installation. -+To see the current full list of implemented option groups, refer to the -+file 'option-groups.def' at the top of the source tree, or run -+'make menuconfig' from the top-level build directory. - - The POSIX.1-2001 specification includes a suggested partition of all - the functions in the POSIX C API into option groups: math functions -@@ -110,6 +86,18 @@ - OPTION_EGLIBC_LOCALES = n - OPTION_EGLIBC_LIBM = y - -+Like the Linux kernel, EGLIBC supports a similar set of '*config' make -+targets to make it easier to create 'option-groups.config', with all -+dependencies between option groups automatically satisfied. Run -+'make help' to see the list of supported make config targets. For -+example, 'make menuconfig' will update the current config utilising a -+menu based program. -+ -+The option group names and their type (boolean, int, hex, string), help -+description, and dependencies with other option groups, are described by -+'option-groups.def' at the top of the source tree, analogous to the -+'Kconfig' files in the Linux kernel. -+ - In general, each option group variable controls whether a given set of - object files in EGLIBC is compiled and included in the final - libraries, or omitted from the build. -@@ -132,22 +120,3 @@ - - We have used the system to subset some portions of EGLIBC's - functionality. It needs to be extended to cover more of the library. -- --At the moment, EGLIBC performs no sanity checks on the contents of --'option-groups.config'; if an option group's name is mistyped, the --option group is silently included in the build. EGLIBC should check --that all variables set in 'option-groups.config' are proper option --group names, and that their values are appropriate. -- --Some portions of EGLIBC depend on others; for example, the Sun Remote --Procedure Call functions in 'sunrpc' depend on the networking --functions in 'inet'. The sanity checking described above should check --that the selection configuration satisfies dependencies within EGLIBC, --and produce a legible error message if it does not. At the moment, --inconsistent configurations produce link errors late in the build --process. -- --The Linux kernel's configuration system provides interactive --interfaces for creating and modifying configuration files (which also --perform the sanity checking and dependency tracking described above). --EGLIBC should provide similar interfaces. diff --git a/meta/recipes-core/eglibc/eglibc-2.18/0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch b/meta/recipes-core/eglibc/eglibc-2.18/0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch deleted file mode 100644 index a8463ea915..0000000000 --- a/meta/recipes-core/eglibc/eglibc-2.18/0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 713d822908d1b2ae8403af7f9375c7054ed3dd49 Mon Sep 17 00:00:00 2001 -From: Ting Liu -Date: Wed, 19 Dec 2012 04:39:57 -0600 -Subject: [PATCH] eglibc: run libm-err-tab.pl with specific dirs in ${S} - -libm-err-tab.pl will parse all the files named "libm-test-ulps" -in the given dir recursively. To avoid parsing the one in -${S}/.pc/ (it does exist after eglibc adds aarch64 support, -${S}/.pc/aarch64-0001-glibc-fsf-v1-eaf6f205.patch/ports/sysdeps/ -aarch64/libm-test-ulps), run libm-err-tab.pl with specific dirs -in ${S}. - -Upstream-Status: inappropriate [OE specific] - -Signed-off-by: Ting Liu ---- - manual/Makefile | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/manual/Makefile b/manual/Makefile -index 6fddff0..7af242e 100644 ---- a/manual/Makefile -+++ b/manual/Makefile -@@ -109,7 +109,8 @@ $(objpfx)libm-err.texi: $(objpfx)stamp-libm-err - $(objpfx)stamp-libm-err: libm-err-tab.pl $(wildcard $(foreach dir,$(sysdirs),\ - $(dir)/libm-test-ulps)) - pwd=`pwd`; \ -- $(PERL) $< $$pwd/.. > $(objpfx)libm-err-tmp -+ $(PERL) $< $$pwd/../ports > $(objpfx)libm-err-tmp -+ $(PERL) $< $$pwd/../sysdeps >> $(objpfx)libm-err-tmp - $(move-if-change) $(objpfx)libm-err-tmp $(objpfx)libm-err.texi - touch $@ - --- -1.7.9.7 - diff --git a/meta/recipes-core/eglibc/eglibc-2.18/0002-eglibc-menuconfig-hex-string-options.patch b/meta/recipes-core/eglibc/eglibc-2.18/0002-eglibc-menuconfig-hex-string-options.patch deleted file mode 100644 index 7caba48112..0000000000 --- a/meta/recipes-core/eglibc/eglibc-2.18/0002-eglibc-menuconfig-hex-string-options.patch +++ /dev/null @@ -1,169 +0,0 @@ -pulled from - -http://www.eglibc.org/archives/patches/msg01043.html - - -Upstream-Status: Pending -Signed-off-by: Khem - - -This patch builds on the menuconfig patch for EGLIBC. - - -There are a few options that have non-boolean types, that would benefit from the new 'make *config' support: - -EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE (int) -EGLIBC_NSSWITCH_FIXED_CONFIG (string) -EGLIBC_NSSWITCH_FIXED_FUNCTIONS (string) - - -The patch converts these to real options in libc/option-groups.def. Also, libc/scripts/option-groups.awk is modified to output a '#define' line for int, hex, or string options encountered in the config file. - -In the post-processing script config-postproc.pl, a small change is needed: for any boolean option FOO that is implicitly disabled in the kconfig output, make sure that option is indeed a boolean before printing the explicit OPTION_FOO=n. - -Finally, libc/malloc/Makefile passes __OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE as a CPPFLAGS, which is not necessary anymore because this macro will now be present in the generated header. - -attached is the updated patch to address above issues. - -Steve - --- -Steve Longerbeam | Senior Embedded Engineer, ESD Services -Mentor Embedded(tm) | 46871 Bayside Parkway, Fremont, CA 94538 -P 510.354.5838 | M 408.410.2735 -Nucleus(r) | Linux(r) | Android(tm) | Services | UI | Multi-OS - - -Index: libc/malloc/Makefile -=================================================================== ---- libc.orig/malloc/Makefile 2012-01-04 22:06:18.000000000 -0800 -+++ libc/malloc/Makefile 2012-05-09 19:35:28.598682105 -0700 -@@ -48,10 +48,6 @@ - ifeq ($(OPTION_EGLIBC_MEMUSAGE),y) - extra-libs = libmemusage - extra-libs-others = $(extra-libs) -- --ifdef OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE --CPPFLAGS-memusage += -D__OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE=$(OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE) --endif - endif - - libmemusage-routines = memusage -Index: libc/option-groups.def -=================================================================== ---- libc.orig/option-groups.def 2012-05-09 19:33:48.398677256 -0700 -+++ libc/option-groups.def 2012-05-09 19:35:28.610682107 -0700 -@@ -513,8 +513,11 @@ - the `memusage' and `memusagestat' utilities. - These components provide memory profiling functions. - -- EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE -- -+config EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE -+ int "Memory profiling library buffer size" -+ depends on EGLIBC_MEMUSAGE -+ default "32768" -+ help - Libmemusage library buffers the profiling data in memory - before writing it out to disk. By default, the library - allocates 1.5M buffer, which can be substantial for some -@@ -553,8 +556,11 @@ - 'option-groups.config' file must set the following two - variables: - -- EGLIBC_NSSWITCH_FIXED_CONFIG -- -+config EGLIBC_NSSWITCH_FIXED_CONFIG -+ string "Nsswitch fixed config filename" -+ depends on !EGLIBC_NSSWITCH -+ default "" -+ help - Set this to the name of a file whose contents observe the - same syntax as an ordinary '/etc/nsswitch.conf' file. The - EGLIBC build process parses this file just as EGLIBC would -@@ -576,8 +582,11 @@ - you will probably want to delete references to databases not - needed on your system. - -- EGLIBC_NSSWITCH_FIXED_FUNCTIONS -- -+config EGLIBC_NSSWITCH_FIXED_FUNCTIONS -+ string "Nsswitch fixed functions filename" -+ depends on !EGLIBC_NSSWITCH -+ default "" -+ help - The EGLIBC build process uses this file to decide which - functions to make available from which service libraries. - The file 'nss/fixed-nsswitch.functions' serves as a sample -Index: libc/options-config/config-postproc.pl -=================================================================== ---- libc.orig/options-config/config-postproc.pl 2012-05-09 19:33:36.530676681 -0700 -+++ libc/options-config/config-postproc.pl 2012-05-09 19:35:28.610682107 -0700 -@@ -8,7 +8,7 @@ - die "Could not open $ARGV[0]" unless -T $ARGV[0]; - - sub yank { -- @option = grep($_ ne $_[0], @option); -+ @option = grep(!($_ =~ /$_[0]\s*=/), @option); - } - - open(DEFAULTS, $defaults) || die "Could not open $defaults\n"; -@@ -16,7 +16,7 @@ - # get the full list of available options using the default config file - $i = 0; - while () { -- if (/^\s*OPTION_(\w+)\s*=/) { -+ if (/^\s*OPTION_(\w+\s*=.*$)/) { - $option[$i++] = $1; - } - } -@@ -35,8 +35,9 @@ - s/CONFIG_/OPTION_/g; - print; - } elsif (/^\s*#\s+CONFIG_(\w+) is not set/) { -- # this is a comment line, change CONFIG_ to OPTION_, remove this -- # option from option list, and convert to explicit OPTION_FOO=n -+ # this is a comment line for an unset boolean option, change CONFIG_ -+ # to OPTION_, remove this option from option list, and convert to -+ # explicit OPTION_FOO=n - $opt = $1; - yank($opt); - s/CONFIG_/OPTION_/g; -@@ -46,9 +47,12 @@ - } - } - --# any options left in @options, are options that were not mentioned in -+# any boolean options left in @options, are options that were not mentioned in - # the config file, and implicitly that means the option must be set =n, - # so do that here. - foreach $opt (@option) { -- print "OPTION_$opt=n\n"; -+ if ($opt =~ /=\s*[yn]/) { -+ $opt =~ s/=\s*[yn]/=n/; -+ print "OPTION_$opt\n"; -+ } - } -Index: libc/scripts/option-groups.awk -=================================================================== ---- libc.orig/scripts/option-groups.awk 2012-01-04 22:06:00.000000000 -0800 -+++ libc/scripts/option-groups.awk 2012-05-09 19:35:28.610682107 -0700 -@@ -46,9 +46,15 @@ - print "#define __" var " 1" - else if (vars[var] == "n") - print "/* #undef __" var " */" -- # Ignore variables that don't have boolean values. -- # Ideally, this would be driven by the types given in -- # option-groups.def. -+ else if (vars[var] ~ /^[0-9]+/ || -+ vars[var] ~ /^0x[0-9aAbBcCdDeEfF]+/ || -+ vars[var] ~ /^\"/) -+ print "#define __" var " " vars[var] -+ else -+ print "/* #undef __" var " */" -+ # Ignore variables that don't have boolean, int, hex, or -+ # string values. Ideally, this would be driven by the types -+ # given in option-groups.def. - } - } - diff --git a/meta/recipes-core/eglibc/eglibc-2.18/0003-eglibc-menuconfig-build-instructions.patch b/meta/recipes-core/eglibc/eglibc-2.18/0003-eglibc-menuconfig-build-instructions.patch deleted file mode 100644 index d137f5b318..0000000000 --- a/meta/recipes-core/eglibc/eglibc-2.18/0003-eglibc-menuconfig-build-instructions.patch +++ /dev/null @@ -1,176 +0,0 @@ -Pulled from - -http://www.eglibc.org/archives/patches/msg01035.html - -Upstream-Status: Pending -Signed-off-by: Khem - -As part of the menuconfig development, I encountered some outdated information in the cross-build instructions, libc/EGLIBC.cross-building. This patch updates the file with new (and tested) instructions. It is unrelated to the menuconfig support, but applies after. - -My testing was done with an ARM target, and an x86_64 Linux host, so I converted the instructions to use those host/target types from the original i686/powerpc. Hope that's ok. - - -Thanks, - --- -Steve Longerbeam | Senior Embedded Engineer, ESD Services -Mentor Embedded(tm) | 46871 Bayside Parkway, Fremont, CA 94538 -P 510.354.5838 | M 408.410.2735 -Nucleus(r) | Linux(r) | Android(tm) | Services | UI | Multi-OS - - - EGLIBC.cross-building | 59 +++++++++++++++++++++++++++++--------------------- - 1 file changed, 35 insertions(+), 24 deletions(-) - -Index: libc/EGLIBC.cross-building -=================================================================== ---- libc.orig/EGLIBC.cross-building 2012-05-09 19:33:36.522676681 -0700 -+++ libc/EGLIBC.cross-building 2012-05-09 19:36:13.918684298 -0700 -@@ -47,31 +47,34 @@ - EGLIBC requires recent versions of the GNU binutils, GCC, and the - Linux kernel. The web page - documents the current requirements, and lists patches needed for --certain target architectures. As of this writing, EGLIBC required --binutils 2.17, GCC 4.1, and Linux 2.6.19.1. -+certain target architectures. As of this writing, these build -+instructions have been tested with binutils 2.22.51, GCC 4.6.2, -+and Linux 3.1. - - First, let's set some variables, to simplify later commands. We'll --build EGLIBC and GCC for a PowerPC target, known to the Linux kernel --as 'powerpc', and we'll do the build on an Intel Linux box: -+build EGLIBC and GCC for an ARM target, known to the Linux kernel -+as 'arm', and we'll do the build on an Intel x86_64 Linux box: - -- $ build=i686-pc-linux-gnu -+ $ build=x86_64-pc-linux-gnu - $ host=$build -- $ target=powerpc-none-linux-gnu -- $ linux_arch=powerpc -+ $ target=arm-none-linux-gnueabi -+ $ linux_arch=arm - - We're using the aforementioned versions of Binutils, GCC, and Linux: - -- $ binutilsv=binutils-2.17 -- $ gccv=gcc-4.1.1 -- $ linuxv=linux-2.6.20 -+ $ binutilsv=binutils-2.22.51 -+ $ gccv=gcc-4.6.2 -+ $ linuxv=linux-3.1 - - We're carrying out the entire process under '~/cross-build', which --contains unpacked source trees: -+contains unpacked source trees for binutils, gcc, and linux kernel, -+along with EGLIBC svn trunk (which can be checked-out with -+'svn co http://www.eglibc.org/svn/trunk eglibc'): - -- $ top=$HOME/cross-build/ppc -+ $ top=$HOME/cross-build/$target - $ src=$HOME/cross-build/src - $ ls $src -- binutils-2.17 gcc-4.1.1 libc linux-2.6.20 -+ binutils-2.22.51 eglibc gcc-4.6.2 linux-3.1 - - We're going to place our build directories in a subdirectory 'obj', - we'll install the cross-development toolchain in 'tools', and we'll -@@ -99,7 +102,7 @@ - - The First GCC - --For our work, we need a cross-compiler targeting a PowerPC Linux -+For our work, we need a cross-compiler targeting an ARM Linux - system. However, that configuration includes the shared library - 'libgcc_s.so', which is compiled against the EGLIBC headers (which we - haven't installed yet) and linked against 'libc.so' (which we haven't -@@ -125,7 +128,8 @@ - > --prefix=$tools \ - > --without-headers --with-newlib \ - > --disable-shared --disable-threads --disable-libssp \ -- > --disable-libgomp --disable-libmudflap \ -+ > --disable-libgomp --disable-libmudflap --disable-libquadmath \ -+ > --disable-decimal-float --disable-libffi \ - > --enable-languages=c - $ PATH=$tools/bin:$PATH make - $ PATH=$tools/bin:$PATH make install -@@ -162,12 +166,13 @@ - > CXX=$tools/bin/$target-g++ \ - > AR=$tools/bin/$target-ar \ - > RANLIB=$tools/bin/$target-ranlib \ -- > $src/libc/configure \ -+ > $src/eglibc/libc/configure \ - > --prefix=/usr \ - > --with-headers=$sysroot/usr/include \ - > --build=$build \ - > --host=$target \ -- > --disable-profile --without-gd --without-cvs --enable-add-ons -+ > --disable-profile --without-gd --without-cvs \ -+ > --enable-add-ons=nptl,libidn,../ports - - The option '--prefix=/usr' may look strange, but you should never - configure EGLIBC with a prefix other than '/usr': in various places, -@@ -181,6 +186,11 @@ - The '--with-headers' option tells EGLIBC where the Linux headers have - been installed. - -+The '--enable-add-ons=nptl,libidn,../ports' option tells EGLIBC to look -+for the listed glibc add-ons. Most notably the ports add-on (located -+just above the libc sources in the EGLIBC svn tree) is required to -+support ARM targets. -+ - We can now use the 'install-headers' makefile target to install the - headers: - -@@ -223,6 +233,7 @@ - > --prefix=$tools \ - > --with-sysroot=$sysroot \ - > --disable-libssp --disable-libgomp --disable-libmudflap \ -+ > --disable-libffi --disable-libquadmath \ - > --enable-languages=c - $ PATH=$tools/bin:$PATH make - $ PATH=$tools/bin:$PATH make install -@@ -240,13 +251,14 @@ - > CXX=$tools/bin/$target-g++ \ - > AR=$tools/bin/$target-ar \ - > RANLIB=$tools/bin/$target-ranlib \ -- > $src/libc/configure \ -+ > $src/eglibc/libc/configure \ - > --prefix=/usr \ - > --with-headers=$sysroot/usr/include \ - > --with-kconfig=$obj/linux/scripts/kconfig \ - > --build=$build \ - > --host=$target \ -- > --disable-profile --without-gd --without-cvs --enable-add-ons -+ > --disable-profile --without-gd --without-cvs \ -+ > --enable-add-ons=nptl,libidn,../ports - - Note the additional '--with-kconfig' option. This tells EGLIBC where to - find the host config tools used by the kernel 'make config' and 'make -@@ -337,15 +349,15 @@ - ELF Header: - ... - Type: EXEC (Executable file) -- Machine: PowerPC -+ Machine: ARM - - ... - Program Headers: - Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align - PHDR 0x000034 0x10000034 0x10000034 0x00100 0x00100 R E 0x4 -- INTERP 0x000134 0x10000134 0x10000134 0x0000d 0x0000d R 0x1 -- [Requesting program interpreter: /lib/ld.so.1] -- LOAD 0x000000 0x10000000 0x10000000 0x008f0 0x008f0 R E 0x10000 -+ INTERP 0x000134 0x00008134 0x00008134 0x00013 0x00013 R 0x1 -+ [Requesting program interpreter: /lib/ld-linux.so.3] -+ LOAD 0x000000 0x00008000 0x00008000 0x0042c 0x0042c R E 0x8000 - ... - - Looking at the dynamic section of the installed 'libgcc_s.so', we see -@@ -357,7 +369,6 @@ - Dynamic section at offset 0x1083c contains 24 entries: - Tag Type Name/Value - 0x00000001 (NEEDED) Shared library: [libc.so.6] -- 0x00000001 (NEEDED) Shared library: [ld.so.1] - 0x0000000e (SONAME) Library soname: [libgcc_s.so.1] - ... - diff --git a/meta/recipes-core/eglibc/eglibc-2.18/GLRO_dl_debug_mask.patch b/meta/recipes-core/eglibc/eglibc-2.18/GLRO_dl_debug_mask.patch deleted file mode 100644 index 7258c82418..0000000000 --- a/meta/recipes-core/eglibc/eglibc-2.18/GLRO_dl_debug_mask.patch +++ /dev/null @@ -1,143 +0,0 @@ -Its controlled by __OPTION_EGLIBC_RTLD_DEBUG -so we should use GLRO_dl_debug_mask - -Singed-off-by: Khem Raj - -Upstream-Status: Pending -Index: libc/elf/dl-open.c -=================================================================== ---- libc.orig/elf/dl-open.c 2012-10-25 10:18:12.000000000 -0700 -+++ libc/elf/dl-open.c 2013-01-09 11:49:02.635577870 -0800 -@@ -155,7 +155,7 @@ - ns->_ns_main_searchlist->r_list[new_nlist++] = map; - - /* We modify the global scope. Report this. */ -- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0)) -+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SCOPES, 0)) - _dl_debug_printf ("\nadd %s [%lu] to global scope\n", - map->l_name, map->l_ns); - } -@@ -298,7 +298,7 @@ - LIBC_PROBE (map_complete, 3, args->nsid, r, new); - - /* Print scope information. */ -- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0)) -+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SCOPES, 0)) - _dl_show_scope (new, 0); - - /* Only do lazy relocation if `LD_BIND_NOW' is not set. */ -@@ -515,7 +515,7 @@ - } - - /* Print scope information. */ -- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0)) -+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SCOPES, 0)) - _dl_show_scope (imap, from_scope); - } - -Index: libc/ports/sysdeps/mips/dl-lookup.c -=================================================================== ---- libc.orig/ports/sysdeps/mips/dl-lookup.c 2012-08-17 12:39:53.000000000 -0700 -+++ libc/ports/sysdeps/mips/dl-lookup.c 2013-01-09 11:49:02.635577870 -0800 -@@ -111,7 +111,7 @@ - continue; - - /* Print some debugging info if wanted. */ -- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SYMBOLS, 0)) -+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SYMBOLS, 0)) - _dl_debug_printf ("symbol=%s; lookup in file=%s [%lu]\n", - undef_name, - map->l_name[0] ? map->l_name : rtld_progname, -@@ -432,7 +432,7 @@ - hash table. */ - if (__builtin_expect (tab->size, 0)) - { -- assert (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK); -+ assert (GLRO_dl_debug_mask & DL_DEBUG_PRELINK); - __rtld_lock_unlock_recursive (tab->lock); - goto success; - } -@@ -681,7 +681,7 @@ - } - - /* Display information if we are debugging. */ -- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0)) -+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_FILES, 0)) - _dl_debug_printf ("\ - \nfile=%s [%lu]; needed by %s [%lu] (relocation dependency)\n\n", - map->l_name[0] ? map->l_name : rtld_progname, -@@ -788,7 +788,7 @@ - { - if ((*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK) - && skip_map == NULL -- && !(GLRO(dl_debug_mask) & DL_DEBUG_UNUSED)) -+ && !(GLRO_dl_debug_mask & DL_DEBUG_UNUSED)) - { - /* We could find no value for a strong reference. */ - const char *reference_name = undef_map ? undef_map->l_name : ""; -@@ -861,7 +861,7 @@ - if (__builtin_expect (current_value.m->l_used == 0, 0)) - current_value.m->l_used = 1; - -- if (__builtin_expect (GLRO(dl_debug_mask) -+ if (__builtin_expect (GLRO_dl_debug_mask - & (DL_DEBUG_BINDINGS|DL_DEBUG_PRELINK), 0)) - _dl_debug_bindings (undef_name, undef_map, ref, - ¤t_value, version, type_class, protected); -@@ -926,7 +926,7 @@ - { - const char *reference_name = undef_map->l_name; - -- if (GLRO(dl_debug_mask) & DL_DEBUG_BINDINGS) -+ if (GLRO_dl_debug_mask & DL_DEBUG_BINDINGS) - { - _dl_debug_printf ("binding file %s [%lu] to %s [%lu]: %s symbol `%s'", - (reference_name[0] -@@ -942,7 +942,7 @@ - _dl_debug_printf_c ("\n"); - } - #ifdef SHARED -- if (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK) -+ if (GLRO_dl_debug_mask & DL_DEBUG_PRELINK) - { - int conflict = 0; - struct sym_val val = { NULL, NULL }; -Index: libc/elf/rtld.c -=================================================================== ---- libc.orig/elf/rtld.c 2012-10-10 08:35:46.000000000 -0700 -+++ libc/elf/rtld.c 2013-01-09 11:49:02.635577870 -0800 -@@ -2118,7 +2118,7 @@ - GLRO(dl_init_all_dirs) = GL(dl_all_dirs); - - /* Print scope information. */ -- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0)) -+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SCOPES, 0)) - { - _dl_debug_printf ("\nInitial object scopes\n"); - -Index: libc/elf/dl-lookup.c -=================================================================== ---- libc.orig/elf/dl-lookup.c 2012-08-17 12:39:53.000000000 -0700 -+++ libc/elf/dl-lookup.c 2013-01-09 11:49:02.635577870 -0800 -@@ -771,7 +771,7 @@ - { - if ((*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK) - && skip_map == NULL -- && !(GLRO(dl_debug_mask) & DL_DEBUG_UNUSED)) -+ && !(GLRO_dl_debug_mask & DL_DEBUG_UNUSED)) - { - /* We could find no value for a strong reference. */ - const char *reference_name = undef_map ? undef_map->l_name : ""; -Index: libc/elf/get-dynamic-info.h -=================================================================== ---- libc.orig/elf/get-dynamic-info.h 2012-12-02 13:11:45.000000000 -0800 -+++ libc/elf/get-dynamic-info.h 2013-01-09 12:53:51.015657653 -0800 -@@ -157,7 +157,7 @@ - them. Therefore to avoid breaking existing applications the - best we can do is add a warning during debugging with the - intent of notifying the user of the problem. */ -- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0) -+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_FILES, 0) - && l->l_flags_1 & ~DT_1_SUPPORTED_MASK) - _dl_debug_printf ("\nWARNING: Unsupported flag value(s) of 0x%x in DT_FLAGS_1.\n", - l->l_flags_1 & ~DT_1_SUPPORTED_MASK); diff --git a/meta/recipes-core/eglibc/eglibc-2.18/IO-acquire-lock-fix.patch b/meta/recipes-core/eglibc/eglibc-2.18/IO-acquire-lock-fix.patch deleted file mode 100644 index cf5803585c..0000000000 --- a/meta/recipes-core/eglibc/eglibc-2.18/IO-acquire-lock-fix.patch +++ /dev/null @@ -1,17 +0,0 @@ -import http://sourceware.org/ml/libc-ports/2007-12/msg00000.html - -Upstream-Status: Pending - -Index: libc/bits/stdio-lock.h -=================================================================== ---- libc.orig/bits/stdio-lock.h 2009-10-28 14:34:19.000000000 -0700 -+++ libc/bits/stdio-lock.h 2009-10-28 14:34:54.000000000 -0700 -@@ -50,6 +50,8 @@ __libc_lock_define_recursive (typedef, _ - _IO_cleanup_region_start ((void (*) (void *)) _IO_funlockfile, (_fp)); \ - _IO_flockfile (_fp) - -+# define _IO_acquire_lock_clear_flags2(_fp) _IO_acquire_lock (_fp) -+ - # define _IO_release_lock(_fp) \ - _IO_funlockfile (_fp); \ - _IO_cleanup_region_end (0) diff --git a/meta/recipes-core/eglibc/eglibc-2.18/add_resource_h_to_wait_h.patch b/meta/recipes-core/eglibc/eglibc-2.18/add_resource_h_to_wait_h.patch deleted file mode 100644 index f5023c08d4..0000000000 --- a/meta/recipes-core/eglibc/eglibc-2.18/add_resource_h_to_wait_h.patch +++ /dev/null @@ -1,20 +0,0 @@ -The older versions of perf still require sys/resource.h to be -present in this header, the newer version of perf in 3.2 and -beyond directly include sys/resource.h - -Upstream-Status: Inapproriate [older kernel/perf specific] - -Signed-off-by: Saul Wold - -Index: libc/posix/sys/wait.h -=================================================================== ---- libc.orig/posix/sys/wait.h -+++ libc/posix/sys/wait.h -@@ -28,6 +28,7 @@ - __BEGIN_DECLS - - #include -+#include - - /* These macros could also be defined in . */ - #if !defined _STDLIB_H || (!defined __USE_XOPEN && !defined __USE_XOPEN2K8) diff --git a/meta/recipes-core/eglibc/eglibc-2.18/eglibc-svn-arm-lowlevellock-include-tls.patch b/meta/recipes-core/eglibc/eglibc-2.18/eglibc-svn-arm-lowlevellock-include-tls.patch deleted file mode 100644 index 4313aa5197..0000000000 --- a/meta/recipes-core/eglibc/eglibc-2.18/eglibc-svn-arm-lowlevellock-include-tls.patch +++ /dev/null @@ -1,21 +0,0 @@ -In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21: -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c: In function '__lll_lock_wait_private': -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: warning: implicit declaration of function 'THREAD_GETMEM' -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: 'THREAD_SELF' undeclared (first use in this function) -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: (Each undeclared identifier is reported only once -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: for each function it appears in.) -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: 'header' undeclared (first use in this function) -make[4]: *** [/var/tmp/portage/sys-libs/glibc-2.7-r1/work/build-default-armv4l-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os] Error 1 - -Upstream-Status: Pending - ---- libc/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h.orig -+++ libc/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h -@@ -25,6 +25,7 @@ - #include - #include - #include -+#include - - #define FUTEX_WAIT 0 - #define FUTEX_WAKE 1 diff --git a/meta/recipes-core/eglibc/eglibc-2.18/eglibc_fix_findidx_parameters.patch b/meta/recipes-core/eglibc/eglibc-2.18/eglibc_fix_findidx_parameters.patch deleted file mode 100644 index bbf4605505..0000000000 --- a/meta/recipes-core/eglibc/eglibc-2.18/eglibc_fix_findidx_parameters.patch +++ /dev/null @@ -1,38 +0,0 @@ -Upstream-Status: backport - -Imported patch from: http://www.eglibc.org/archives/patches/msg01124.html - -Signed-Off-By: Nitin A Kamble -2012/05/09 - -Index: libc/posix/xregex.c -=================================================================== ---- libc.orig/posix/xregex.c -+++ libc/posix/xregex.c -@@ -2943,7 +2943,7 @@ PREFIX(regex_compile) (const char *ARG_P - _NL_CURRENT (LC_COLLATE, - _NL_COLLATE_INDIRECTWC); - -- idx = findidx ((const wint_t**)&cp); -+ idx = findidx ((const wint_t**)&cp, -1); - if (idx == 0 || cp < (wint_t*) str + c1) - /* This is no valid character. */ - FREE_STACK_RETURN (REG_ECOLLATE); -@@ -3392,7 +3392,7 @@ PREFIX(regex_compile) (const char *ARG_P - indirect = (const int32_t *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); - -- idx = findidx (&cp); -+ idx = findidx (&cp, -1); - if (idx == 0 || cp < str + c1) - /* This is no valid character. */ - FREE_STACK_RETURN (REG_ECOLLATE); -@@ -6363,7 +6363,7 @@ byte_re_match_2_internal (struct re_patt - } - str_buf[i] = TRANSLATE(*(d+i)); - str_buf[i+1] = '\0'; /* sentinel */ -- idx2 = findidx ((const wint_t**)&cp); -+ idx2 = findidx ((const wint_t**)&cp, -1); - } - - /* Update d, however d will be incremented at diff --git a/meta/recipes-core/eglibc/eglibc-2.18/etc/ld.so.conf b/meta/recipes-core/eglibc/eglibc-2.18/etc/ld.so.conf deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/meta/recipes-core/eglibc/eglibc-2.18/fileops-without-wchar-io.patch b/meta/recipes-core/eglibc/eglibc-2.18/fileops-without-wchar-io.patch deleted file mode 100644 index 2ca0bca248..0000000000 --- a/meta/recipes-core/eglibc/eglibc-2.18/fileops-without-wchar-io.patch +++ /dev/null @@ -1,22 +0,0 @@ -Fix error like - -/home/kraj/work/angstrom/sources/openembedded-core/build/tmp-eglibc/work/mips64-oe-linux/eglibc-2.16-r2+svnr19383/build-mips64-oe-linux/libc_pic.os: In function `_IO_new_file_fopen': -/home/kraj/work/angstrom/sources/openembedded-core/build/tmp-eglibc/work/mips64-oe-linux/eglibc-2.16-r2+svnr19383/eglibc-2_16/libc/libio/fileops.c:431: undefined reference to `_IO_file_close_it_internal' -collect2: error: ld returned 1 exit status - - -Signed-off-by: Khem Raj -Upstream-Status: Pending -Index: libc/libio/fileops.c -=================================================================== ---- libc.orig/libio/fileops.c 2012-07-04 18:25:47.000000000 -0700 -+++ libc/libio/fileops.c 2012-07-24 00:21:17.220322557 -0700 -@@ -428,7 +428,7 @@ - result->_mode = 1; - #else - /* Treat this as if we couldn't find the given character set. */ -- (void) INTUSE(_IO_file_close_it) (fp); -+ (void) _IO_file_close_it (fp); - __set_errno (EINVAL); - return NULL; - #endif diff --git a/meta/recipes-core/eglibc/eglibc-2.18/fix-tibetian-locales.patch b/meta/recipes-core/eglibc/eglibc-2.18/fix-tibetian-locales.patch deleted file mode 100644 index 25c43a9fe6..0000000000 --- a/meta/recipes-core/eglibc/eglibc-2.18/fix-tibetian-locales.patch +++ /dev/null @@ -1,38 +0,0 @@ -cross localedef fails to compile these locales because name_fmt field is empty -It is not acceptable for cross localedef and it errors out - -LC_NAME: field `name_fmt' not defined - -We therefore give a dummy string to the format, the real fix needs some native -tibetian person to define proper name_fmt - -Upstream-Status: Pending - -Signed-off-by: Khem Raj - -Index: libc/localedata/locales/bo_CN -=================================================================== ---- libc.orig/localedata/locales/bo_CN 2012-11-17 09:50:14.000000000 -0800 -+++ libc/localedata/locales/bo_CN 2013-01-04 08:55:15.593612288 -0800 -@@ -145,7 +145,7 @@ - LC_NAME - % FIXME - --name_fmt "" -+name_fmt "FIXME" - % name_gen "FIXME" - % name_miss "FIXME" - % name_mr "FIXME" -Index: libc/localedata/locales/bo_IN -=================================================================== ---- libc.orig/localedata/locales/bo_IN 2012-11-17 09:50:14.000000000 -0800 -+++ libc/localedata/locales/bo_IN 2013-01-04 08:54:12.345609028 -0800 -@@ -70,7 +70,7 @@ - - LC_NAME - % FIXME --name_fmt "" -+name_fmt "FIXME" - % name_gen "FIXME" - % name_miss "FIXME" - % name_mr "FIXME" diff --git a/meta/recipes-core/eglibc/eglibc-2.18/fix_for_centos_5.8.patch b/meta/recipes-core/eglibc/eglibc-2.18/fix_for_centos_5.8.patch deleted file mode 100644 index 7618c99534..0000000000 --- a/meta/recipes-core/eglibc/eglibc-2.18/fix_for_centos_5.8.patch +++ /dev/null @@ -1,18 +0,0 @@ -Upstream-Status: Inappropriate [other] - -This is a hack to fix building the locale bits on an older -CentOs 5.X machine - -Index: eglibc-2_16/libc/locale/programs/config.h -=================================================================== ---- eglibc-2_16.orig/libc/locale/programs/config.h -+++ eglibc-2_16/libc/locale/programs/config.h -@@ -19,6 +19,8 @@ - #ifndef _LD_CONFIG_H - #define _LD_CONFIG_H 1 - -+#define DUMMY_LOCALE_T -+ - /* Use the internal textdomain used for libc messages. */ - #define PACKAGE _libc_intl_domainname - #ifndef VERSION diff --git a/meta/recipes-core/eglibc/eglibc-2.18/fsl-ppc-no-fsqrt.patch b/meta/recipes-core/eglibc/eglibc-2.18/fsl-ppc-no-fsqrt.patch deleted file mode 100644 index 511ee9d19e..0000000000 --- a/meta/recipes-core/eglibc/eglibc-2.18/fsl-ppc-no-fsqrt.patch +++ /dev/null @@ -1,100 +0,0 @@ -Create e5500 specific math_private.h and let it include when compiling for e5500/64bit core -We prefefine __CPU_HAS_FSQRT to 0 and then in general ppc64 math_private.h we check if its -already defined before redefining it. This way we can ensure that on e5500 builds it wont -emit fsqrt intructions - --Khem - -Upstream-Status: Pending - -Index: libc/sysdeps/powerpc/fpu/math_private.h -=================================================================== ---- libc.orig/sysdeps/powerpc/fpu/math_private.h -+++ libc/sysdeps/powerpc/fpu/math_private.h -@@ -25,10 +25,12 @@ - #include - #include_next - --# if __WORDSIZE == 64 || defined _ARCH_PWR4 --# define __CPU_HAS_FSQRT 1 --# else --# define __CPU_HAS_FSQRT ((GLRO(dl_hwcap) & PPC_FEATURE_64) != 0) -+# ifndef __CPU_HAS_FSQRT -+# if __WORDSIZE == 64 || defined _ARCH_PWR4 -+# define __CPU_HAS_FSQRT 1 -+# else -+# define __CPU_HAS_FSQRT ((GLRO(dl_hwcap) & PPC_FEATURE_64) != 0) -+# endif - # endif - - extern double __slow_ieee754_sqrt (double); -Index: libc/ports/sysdeps/powerpc/powerpc64/e5500/fpu/math_private.h -=================================================================== ---- /dev/null -+++ libc/ports/sysdeps/powerpc/powerpc64/e5500/fpu/math_private.h -@@ -0,0 +1,9 @@ -+#ifndef _E5500_MATH_PRIVATE_H_ -+#define _E5500_MATH_PRIVATE_H_ 1 -+/* E5500 core FPU does not implement -+ fsqrt */ -+ -+#define __CPU_HAS_FSQRT 0 -+#include_next -+ -+#endif /* _E5500_MATH_PRIVATE_H_ */ -Index: libc/ports/sysdeps/powerpc/powerpc64/e6500/fpu/math_private.h -=================================================================== ---- /dev/null -+++ libc/ports/sysdeps/powerpc/powerpc64/e6500/fpu/math_private.h -@@ -0,0 +1,9 @@ -+#ifndef _E6500_MATH_PRIVATE_H_ -+#define _E6500_MATH_PRIVATE_H_ 1 -+/* E6500 core FPU does not implement -+ fsqrt */ -+ -+#define __CPU_HAS_FSQRT 0 -+#include_next -+ -+#endif /* _E6500_MATH_PRIVATE_H_ */ -Index: libc/ports/sysdeps/powerpc/powerpc32/e500mc/fpu/math_private.h -=================================================================== ---- /dev/null -+++ libc/ports/sysdeps/powerpc/powerpc32/e500mc/fpu/math_private.h -@@ -0,0 +1,9 @@ -+#ifndef _E500MC_MATH_PRIVATE_H_ -+#define _E500MC_MATH_PRIVATE_H_ 1 -+/* E500MC core FPU does not implement -+ fsqrt */ -+ -+#define __CPU_HAS_FSQRT 0 -+#include_next -+ -+#endif /* _E500MC_MATH_PRIVATE_H_ */ -Index: libc/ports/sysdeps/powerpc/powerpc32/e5500/fpu/math_private.h -=================================================================== ---- /dev/null -+++ libc/ports/sysdeps/powerpc/powerpc32/e5500/fpu/math_private.h -@@ -0,0 +1,9 @@ -+#ifndef _E5500_MATH_PRIVATE_H_ -+#define _E5500_MATH_PRIVATE_H_ 1 -+/* E5500 core FPU does not implement -+ fsqrt */ -+ -+#define __CPU_HAS_FSQRT 0 -+#include_next -+ -+#endif /* _E5500_MATH_PRIVATE_H_ */ -Index: libc/ports/sysdeps/powerpc/powerpc32/e6500/fpu/math_private.h -=================================================================== ---- /dev/null -+++ libc/ports/sysdeps/powerpc/powerpc32/e6500/fpu/math_private.h -@@ -0,0 +1,9 @@ -+#ifndef _E6500_MATH_PRIVATE_H_ -+#define _E6500_MATH_PRIVATE_H_ 1 -+/* E6500 core FPU does not implement -+ fsqrt */ -+ -+#define __CPU_HAS_FSQRT 0 -+#include_next -+ -+#endif /* _E6500_MATH_PRIVATE_H_ */ diff --git a/meta/recipes-core/eglibc/eglibc-2.18/generate-supported.mk b/meta/recipes-core/eglibc/eglibc-2.18/generate-supported.mk deleted file mode 100644 index d2a28c2dc6..0000000000 --- a/meta/recipes-core/eglibc/eglibc-2.18/generate-supported.mk +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/make - -include $(IN) - -all: - rm -f $(OUT) - touch $(OUT) - for locale in $(SUPPORTED-LOCALES); do \ - [ $$locale = true ] && continue; \ - echo $$locale | sed 's,/, ,' >> $(OUT); \ - done diff --git a/meta/recipes-core/eglibc/eglibc-2.18/glibc.fix_sqrt2.patch b/meta/recipes-core/eglibc/eglibc-2.18/glibc.fix_sqrt2.patch deleted file mode 100644 index a66972998c..0000000000 --- a/meta/recipes-core/eglibc/eglibc-2.18/glibc.fix_sqrt2.patch +++ /dev/null @@ -1,1491 +0,0 @@ -Signed-of-by: Edmar Wienskoski -Upstream-Status: Pending - -diff -ruN libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c ---- libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600 -+++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c 2012-06-14 14:51:50.452001745 -0500 -@@ -0,0 +1,134 @@ -+/* Double-precision floating point square root. -+ Copyright (C) 2010 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; -+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; -+static const float two108 = 3.245185536584267269e+32; -+static const float twom54 = 5.551115123125782702e-17; -+static const float half = 0.5; -+ -+/* The method is based on the descriptions in: -+ -+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; -+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 -+ -+ We find the actual square root and half of its reciprocal -+ simultaneously. */ -+ -+#ifdef __STDC__ -+double -+__ieee754_sqrt (double b) -+#else -+double -+__ieee754_sqrt (b) -+ double b; -+#endif -+{ -+ if (__builtin_expect (b > 0, 1)) -+ { -+ double y, g, h, d, r; -+ ieee_double_shape_type u; -+ -+ if (__builtin_expect (b != a_inf.value, 1)) -+ { -+ fenv_t fe; -+ -+ fe = fegetenv_register (); -+ -+ u.value = b; -+ -+ relax_fenv_state (); -+ -+ __asm__ ("frsqrte %[estimate], %[x]\n" -+ : [estimate] "=f" (y) : [x] "f" (b)); -+ -+ /* Following Muller et al, page 168, equation 5.20. -+ -+ h goes to 1/(2*sqrt(b)) -+ g goes to sqrt(b). -+ -+ We need three iterations to get within 1ulp. */ -+ -+ /* Indicate that these can be performed prior to the branch. GCC -+ insists on sinking them below the branch, however; it seems like -+ they'd be better before the branch so that we can cover any latency -+ from storing the argument and loading its high word. Oh well. */ -+ -+ g = b * y; -+ h = 0.5 * y; -+ -+ /* Handle small numbers by scaling. */ -+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) -+ return __ieee754_sqrt (b * two108) * twom54; -+ -+#define FMADD(a_, c_, b_) \ -+ ({ double __r; \ -+ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \ -+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ -+ __r;}) -+#define FNMSUB(a_, c_, b_) \ -+ ({ double __r; \ -+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ -+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ -+ __r;}) -+ -+ r = FNMSUB (g, h, half); -+ g = FMADD (g, r, g); -+ h = FMADD (h, r, h); -+ -+ r = FNMSUB (g, h, half); -+ g = FMADD (g, r, g); -+ h = FMADD (h, r, h); -+ -+ r = FNMSUB (g, h, half); -+ g = FMADD (g, r, g); -+ h = FMADD (h, r, h); -+ -+ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */ -+ -+ /* Final refinement. */ -+ d = FNMSUB (g, g, b); -+ -+ fesetenv_register (fe); -+ return FMADD (d, h, g); -+ } -+ } -+ else if (b < 0) -+ { -+ /* For some reason, some PowerPC32 processors don't implement -+ FE_INVALID_SQRT. */ -+#ifdef FE_INVALID_SQRT -+ feraiseexcept (FE_INVALID_SQRT); -+ -+ fenv_union_t u = { .fenv = fegetenv_register () }; -+ if ((u.l[1] & FE_INVALID) == 0) -+#endif -+ feraiseexcept (FE_INVALID); -+ b = a_nan.value; -+ } -+ return f_wash (b); -+} -diff -ruN libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c ---- libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600 -+++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c 2012-06-14 14:51:50.452001745 -0500 -@@ -0,0 +1,101 @@ -+/* Single-precision floating point square root. -+ Copyright (C) 2010 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; -+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; -+static const float threehalf = 1.5; -+ -+/* The method is based on the descriptions in: -+ -+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; -+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 -+ -+ We find the reciprocal square root and use that to compute the actual -+ square root. */ -+ -+#ifdef __STDC__ -+float -+__ieee754_sqrtf (float b) -+#else -+float -+__ieee754_sqrtf (b) -+ float b; -+#endif -+{ -+ if (__builtin_expect (b > 0, 1)) -+ { -+#define FMSUB(a_, c_, b_) \ -+ ({ double __r; \ -+ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \ -+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ -+ __r;}) -+#define FNMSUB(a_, c_, b_) \ -+ ({ double __r; \ -+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ -+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ -+ __r;}) -+ -+ if (__builtin_expect (b != a_inf.value, 1)) -+ { -+ double y, x; -+ fenv_t fe; -+ -+ fe = fegetenv_register (); -+ -+ relax_fenv_state (); -+ -+ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */ -+ y = FMSUB (threehalf, b, b); -+ -+ /* Initial estimate. */ -+ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b)); -+ -+ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */ -+ x = x * FNMSUB (y, x * x, threehalf); -+ x = x * FNMSUB (y, x * x, threehalf); -+ x = x * FNMSUB (y, x * x, threehalf); -+ -+ /* All done. */ -+ fesetenv_register (fe); -+ return x * b; -+ } -+ } -+ else if (b < 0) -+ { -+ /* For some reason, some PowerPC32 processors don't implement -+ FE_INVALID_SQRT. */ -+#ifdef FE_INVALID_SQRT -+ feraiseexcept (FE_INVALID_SQRT); -+ -+ fenv_union_t u = { .fenv = fegetenv_register () }; -+ if ((u.l[1] & FE_INVALID) == 0) -+#endif -+ feraiseexcept (FE_INVALID); -+ b = a_nan.value; -+ } -+ return f_washf (b); -+} -diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c ---- libc-orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600 -+++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c 2012-06-14 14:55:14.749001061 -0500 -@@ -0,0 +1,134 @@ -+/* Double-precision floating point square root. -+ Copyright (C) 2010 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; -+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; -+static const float two108 = 3.245185536584267269e+32; -+static const float twom54 = 5.551115123125782702e-17; -+static const float half = 0.5; -+ -+/* The method is based on the descriptions in: -+ -+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; -+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 -+ -+ We find the actual square root and half of its reciprocal -+ simultaneously. */ -+ -+#ifdef __STDC__ -+double -+__ieee754_sqrt (double b) -+#else -+double -+__ieee754_sqrt (b) -+ double b; -+#endif -+{ -+ if (__builtin_expect (b > 0, 1)) -+ { -+ double y, g, h, d, r; -+ ieee_double_shape_type u; -+ -+ if (__builtin_expect (b != a_inf.value, 1)) -+ { -+ fenv_t fe; -+ -+ fe = fegetenv_register (); -+ -+ u.value = b; -+ -+ relax_fenv_state (); -+ -+ __asm__ ("frsqrte %[estimate], %[x]\n" -+ : [estimate] "=f" (y) : [x] "f" (b)); -+ -+ /* Following Muller et al, page 168, equation 5.20. -+ -+ h goes to 1/(2*sqrt(b)) -+ g goes to sqrt(b). -+ -+ We need three iterations to get within 1ulp. */ -+ -+ /* Indicate that these can be performed prior to the branch. GCC -+ insists on sinking them below the branch, however; it seems like -+ they'd be better before the branch so that we can cover any latency -+ from storing the argument and loading its high word. Oh well. */ -+ -+ g = b * y; -+ h = 0.5 * y; -+ -+ /* Handle small numbers by scaling. */ -+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) -+ return __ieee754_sqrt (b * two108) * twom54; -+ -+#define FMADD(a_, c_, b_) \ -+ ({ double __r; \ -+ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \ -+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ -+ __r;}) -+#define FNMSUB(a_, c_, b_) \ -+ ({ double __r; \ -+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ -+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ -+ __r;}) -+ -+ r = FNMSUB (g, h, half); -+ g = FMADD (g, r, g); -+ h = FMADD (h, r, h); -+ -+ r = FNMSUB (g, h, half); -+ g = FMADD (g, r, g); -+ h = FMADD (h, r, h); -+ -+ r = FNMSUB (g, h, half); -+ g = FMADD (g, r, g); -+ h = FMADD (h, r, h); -+ -+ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */ -+ -+ /* Final refinement. */ -+ d = FNMSUB (g, g, b); -+ -+ fesetenv_register (fe); -+ return FMADD (d, h, g); -+ } -+ } -+ else if (b < 0) -+ { -+ /* For some reason, some PowerPC32 processors don't implement -+ FE_INVALID_SQRT. */ -+#ifdef FE_INVALID_SQRT -+ feraiseexcept (FE_INVALID_SQRT); -+ -+ fenv_union_t u = { .fenv = fegetenv_register () }; -+ if ((u.l[1] & FE_INVALID) == 0) -+#endif -+ feraiseexcept (FE_INVALID); -+ b = a_nan.value; -+ } -+ return f_wash (b); -+} -diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c ---- libc-orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600 -+++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c 2012-06-14 14:55:14.749001061 -0500 -@@ -0,0 +1,101 @@ -+/* Single-precision floating point square root. -+ Copyright (C) 2010 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; -+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; -+static const float threehalf = 1.5; -+ -+/* The method is based on the descriptions in: -+ -+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; -+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 -+ -+ We find the reciprocal square root and use that to compute the actual -+ square root. */ -+ -+#ifdef __STDC__ -+float -+__ieee754_sqrtf (float b) -+#else -+float -+__ieee754_sqrtf (b) -+ float b; -+#endif -+{ -+ if (__builtin_expect (b > 0, 1)) -+ { -+#define FMSUB(a_, c_, b_) \ -+ ({ double __r; \ -+ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \ -+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ -+ __r;}) -+#define FNMSUB(a_, c_, b_) \ -+ ({ double __r; \ -+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ -+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ -+ __r;}) -+ -+ if (__builtin_expect (b != a_inf.value, 1)) -+ { -+ double y, x; -+ fenv_t fe; -+ -+ fe = fegetenv_register (); -+ -+ relax_fenv_state (); -+ -+ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */ -+ y = FMSUB (threehalf, b, b); -+ -+ /* Initial estimate. */ -+ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b)); -+ -+ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */ -+ x = x * FNMSUB (y, x * x, threehalf); -+ x = x * FNMSUB (y, x * x, threehalf); -+ x = x * FNMSUB (y, x * x, threehalf); -+ -+ /* All done. */ -+ fesetenv_register (fe); -+ return x * b; -+ } -+ } -+ else if (b < 0) -+ { -+ /* For some reason, some PowerPC32 processors don't implement -+ FE_INVALID_SQRT. */ -+#ifdef FE_INVALID_SQRT -+ feraiseexcept (FE_INVALID_SQRT); -+ -+ fenv_union_t u = { .fenv = fegetenv_register () }; -+ if ((u.l[1] & FE_INVALID) == 0) -+#endif -+ feraiseexcept (FE_INVALID); -+ b = a_nan.value; -+ } -+ return f_washf (b); -+} -diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c ---- libc-orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600 -+++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c 2012-06-14 14:55:21.812002270 -0500 -@@ -0,0 +1,134 @@ -+/* Double-precision floating point square root. -+ Copyright (C) 2010 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; -+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; -+static const float two108 = 3.245185536584267269e+32; -+static const float twom54 = 5.551115123125782702e-17; -+static const float half = 0.5; -+ -+/* The method is based on the descriptions in: -+ -+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; -+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 -+ -+ We find the actual square root and half of its reciprocal -+ simultaneously. */ -+ -+#ifdef __STDC__ -+double -+__ieee754_sqrt (double b) -+#else -+double -+__ieee754_sqrt (b) -+ double b; -+#endif -+{ -+ if (__builtin_expect (b > 0, 1)) -+ { -+ double y, g, h, d, r; -+ ieee_double_shape_type u; -+ -+ if (__builtin_expect (b != a_inf.value, 1)) -+ { -+ fenv_t fe; -+ -+ fe = fegetenv_register (); -+ -+ u.value = b; -+ -+ relax_fenv_state (); -+ -+ __asm__ ("frsqrte %[estimate], %[x]\n" -+ : [estimate] "=f" (y) : [x] "f" (b)); -+ -+ /* Following Muller et al, page 168, equation 5.20. -+ -+ h goes to 1/(2*sqrt(b)) -+ g goes to sqrt(b). -+ -+ We need three iterations to get within 1ulp. */ -+ -+ /* Indicate that these can be performed prior to the branch. GCC -+ insists on sinking them below the branch, however; it seems like -+ they'd be better before the branch so that we can cover any latency -+ from storing the argument and loading its high word. Oh well. */ -+ -+ g = b * y; -+ h = 0.5 * y; -+ -+ /* Handle small numbers by scaling. */ -+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) -+ return __ieee754_sqrt (b * two108) * twom54; -+ -+#define FMADD(a_, c_, b_) \ -+ ({ double __r; \ -+ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \ -+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ -+ __r;}) -+#define FNMSUB(a_, c_, b_) \ -+ ({ double __r; \ -+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ -+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ -+ __r;}) -+ -+ r = FNMSUB (g, h, half); -+ g = FMADD (g, r, g); -+ h = FMADD (h, r, h); -+ -+ r = FNMSUB (g, h, half); -+ g = FMADD (g, r, g); -+ h = FMADD (h, r, h); -+ -+ r = FNMSUB (g, h, half); -+ g = FMADD (g, r, g); -+ h = FMADD (h, r, h); -+ -+ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */ -+ -+ /* Final refinement. */ -+ d = FNMSUB (g, g, b); -+ -+ fesetenv_register (fe); -+ return FMADD (d, h, g); -+ } -+ } -+ else if (b < 0) -+ { -+ /* For some reason, some PowerPC32 processors don't implement -+ FE_INVALID_SQRT. */ -+#ifdef FE_INVALID_SQRT -+ feraiseexcept (FE_INVALID_SQRT); -+ -+ fenv_union_t u = { .fenv = fegetenv_register () }; -+ if ((u.l[1] & FE_INVALID) == 0) -+#endif -+ feraiseexcept (FE_INVALID); -+ b = a_nan.value; -+ } -+ return f_wash (b); -+} -diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c ---- libc-orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600 -+++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c 2012-06-14 14:55:21.812002270 -0500 -@@ -0,0 +1,101 @@ -+/* Single-precision floating point square root. -+ Copyright (C) 2010 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; -+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; -+static const float threehalf = 1.5; -+ -+/* The method is based on the descriptions in: -+ -+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; -+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 -+ -+ We find the reciprocal square root and use that to compute the actual -+ square root. */ -+ -+#ifdef __STDC__ -+float -+__ieee754_sqrtf (float b) -+#else -+float -+__ieee754_sqrtf (b) -+ float b; -+#endif -+{ -+ if (__builtin_expect (b > 0, 1)) -+ { -+#define FMSUB(a_, c_, b_) \ -+ ({ double __r; \ -+ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \ -+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ -+ __r;}) -+#define FNMSUB(a_, c_, b_) \ -+ ({ double __r; \ -+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ -+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ -+ __r;}) -+ -+ if (__builtin_expect (b != a_inf.value, 1)) -+ { -+ double y, x; -+ fenv_t fe; -+ -+ fe = fegetenv_register (); -+ -+ relax_fenv_state (); -+ -+ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */ -+ y = FMSUB (threehalf, b, b); -+ -+ /* Initial estimate. */ -+ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b)); -+ -+ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */ -+ x = x * FNMSUB (y, x * x, threehalf); -+ x = x * FNMSUB (y, x * x, threehalf); -+ x = x * FNMSUB (y, x * x, threehalf); -+ -+ /* All done. */ -+ fesetenv_register (fe); -+ return x * b; -+ } -+ } -+ else if (b < 0) -+ { -+ /* For some reason, some PowerPC32 processors don't implement -+ FE_INVALID_SQRT. */ -+#ifdef FE_INVALID_SQRT -+ feraiseexcept (FE_INVALID_SQRT); -+ -+ fenv_union_t u = { .fenv = fegetenv_register () }; -+ if ((u.l[1] & FE_INVALID) == 0) -+#endif -+ feraiseexcept (FE_INVALID); -+ b = a_nan.value; -+ } -+ return f_washf (b); -+} -diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c ---- libc-orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600 -+++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c 2012-06-14 14:55:24.620001266 -0500 -@@ -0,0 +1,134 @@ -+/* Double-precision floating point square root. -+ Copyright (C) 2010 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; -+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; -+static const float two108 = 3.245185536584267269e+32; -+static const float twom54 = 5.551115123125782702e-17; -+static const float half = 0.5; -+ -+/* The method is based on the descriptions in: -+ -+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; -+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 -+ -+ We find the actual square root and half of its reciprocal -+ simultaneously. */ -+ -+#ifdef __STDC__ -+double -+__ieee754_sqrt (double b) -+#else -+double -+__ieee754_sqrt (b) -+ double b; -+#endif -+{ -+ if (__builtin_expect (b > 0, 1)) -+ { -+ double y, g, h, d, r; -+ ieee_double_shape_type u; -+ -+ if (__builtin_expect (b != a_inf.value, 1)) -+ { -+ fenv_t fe; -+ -+ fe = fegetenv_register (); -+ -+ u.value = b; -+ -+ relax_fenv_state (); -+ -+ __asm__ ("frsqrte %[estimate], %[x]\n" -+ : [estimate] "=f" (y) : [x] "f" (b)); -+ -+ /* Following Muller et al, page 168, equation 5.20. -+ -+ h goes to 1/(2*sqrt(b)) -+ g goes to sqrt(b). -+ -+ We need three iterations to get within 1ulp. */ -+ -+ /* Indicate that these can be performed prior to the branch. GCC -+ insists on sinking them below the branch, however; it seems like -+ they'd be better before the branch so that we can cover any latency -+ from storing the argument and loading its high word. Oh well. */ -+ -+ g = b * y; -+ h = 0.5 * y; -+ -+ /* Handle small numbers by scaling. */ -+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) -+ return __ieee754_sqrt (b * two108) * twom54; -+ -+#define FMADD(a_, c_, b_) \ -+ ({ double __r; \ -+ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \ -+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ -+ __r;}) -+#define FNMSUB(a_, c_, b_) \ -+ ({ double __r; \ -+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ -+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ -+ __r;}) -+ -+ r = FNMSUB (g, h, half); -+ g = FMADD (g, r, g); -+ h = FMADD (h, r, h); -+ -+ r = FNMSUB (g, h, half); -+ g = FMADD (g, r, g); -+ h = FMADD (h, r, h); -+ -+ r = FNMSUB (g, h, half); -+ g = FMADD (g, r, g); -+ h = FMADD (h, r, h); -+ -+ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */ -+ -+ /* Final refinement. */ -+ d = FNMSUB (g, g, b); -+ -+ fesetenv_register (fe); -+ return FMADD (d, h, g); -+ } -+ } -+ else if (b < 0) -+ { -+ /* For some reason, some PowerPC32 processors don't implement -+ FE_INVALID_SQRT. */ -+#ifdef FE_INVALID_SQRT -+ feraiseexcept (FE_INVALID_SQRT); -+ -+ fenv_union_t u = { .fenv = fegetenv_register () }; -+ if ((u.l[1] & FE_INVALID) == 0) -+#endif -+ feraiseexcept (FE_INVALID); -+ b = a_nan.value; -+ } -+ return f_wash (b); -+} -diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c ---- libc-orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600 -+++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c 2012-06-14 14:55:24.620001266 -0500 -@@ -0,0 +1,101 @@ -+/* Single-precision floating point square root. -+ Copyright (C) 2010 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; -+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; -+static const float threehalf = 1.5; -+ -+/* The method is based on the descriptions in: -+ -+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; -+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 -+ -+ We find the reciprocal square root and use that to compute the actual -+ square root. */ -+ -+#ifdef __STDC__ -+float -+__ieee754_sqrtf (float b) -+#else -+float -+__ieee754_sqrtf (b) -+ float b; -+#endif -+{ -+ if (__builtin_expect (b > 0, 1)) -+ { -+#define FMSUB(a_, c_, b_) \ -+ ({ double __r; \ -+ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \ -+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ -+ __r;}) -+#define FNMSUB(a_, c_, b_) \ -+ ({ double __r; \ -+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ -+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ -+ __r;}) -+ -+ if (__builtin_expect (b != a_inf.value, 1)) -+ { -+ double y, x; -+ fenv_t fe; -+ -+ fe = fegetenv_register (); -+ -+ relax_fenv_state (); -+ -+ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */ -+ y = FMSUB (threehalf, b, b); -+ -+ /* Initial estimate. */ -+ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b)); -+ -+ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */ -+ x = x * FNMSUB (y, x * x, threehalf); -+ x = x * FNMSUB (y, x * x, threehalf); -+ x = x * FNMSUB (y, x * x, threehalf); -+ -+ /* All done. */ -+ fesetenv_register (fe); -+ return x * b; -+ } -+ } -+ else if (b < 0) -+ { -+ /* For some reason, some PowerPC32 processors don't implement -+ FE_INVALID_SQRT. */ -+#ifdef FE_INVALID_SQRT -+ feraiseexcept (FE_INVALID_SQRT); -+ -+ fenv_union_t u = { .fenv = fegetenv_register () }; -+ if ((u.l[1] & FE_INVALID) == 0) -+#endif -+ feraiseexcept (FE_INVALID); -+ b = a_nan.value; -+ } -+ return f_washf (b); -+} -diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c ---- libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600 -+++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c 2012-06-14 14:51:50.452001745 -0500 -@@ -0,0 +1,134 @@ -+/* Double-precision floating point square root. -+ Copyright (C) 2010 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; -+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; -+static const float two108 = 3.245185536584267269e+32; -+static const float twom54 = 5.551115123125782702e-17; -+static const float half = 0.5; -+ -+/* The method is based on the descriptions in: -+ -+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; -+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 -+ -+ We find the actual square root and half of its reciprocal -+ simultaneously. */ -+ -+#ifdef __STDC__ -+double -+__ieee754_sqrt (double b) -+#else -+double -+__ieee754_sqrt (b) -+ double b; -+#endif -+{ -+ if (__builtin_expect (b > 0, 1)) -+ { -+ double y, g, h, d, r; -+ ieee_double_shape_type u; -+ -+ if (__builtin_expect (b != a_inf.value, 1)) -+ { -+ fenv_t fe; -+ -+ fe = fegetenv_register (); -+ -+ u.value = b; -+ -+ relax_fenv_state (); -+ -+ __asm__ ("frsqrte %[estimate], %[x]\n" -+ : [estimate] "=f" (y) : [x] "f" (b)); -+ -+ /* Following Muller et al, page 168, equation 5.20. -+ -+ h goes to 1/(2*sqrt(b)) -+ g goes to sqrt(b). -+ -+ We need three iterations to get within 1ulp. */ -+ -+ /* Indicate that these can be performed prior to the branch. GCC -+ insists on sinking them below the branch, however; it seems like -+ they'd be better before the branch so that we can cover any latency -+ from storing the argument and loading its high word. Oh well. */ -+ -+ g = b * y; -+ h = 0.5 * y; -+ -+ /* Handle small numbers by scaling. */ -+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) -+ return __ieee754_sqrt (b * two108) * twom54; -+ -+#define FMADD(a_, c_, b_) \ -+ ({ double __r; \ -+ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \ -+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ -+ __r;}) -+#define FNMSUB(a_, c_, b_) \ -+ ({ double __r; \ -+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ -+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ -+ __r;}) -+ -+ r = FNMSUB (g, h, half); -+ g = FMADD (g, r, g); -+ h = FMADD (h, r, h); -+ -+ r = FNMSUB (g, h, half); -+ g = FMADD (g, r, g); -+ h = FMADD (h, r, h); -+ -+ r = FNMSUB (g, h, half); -+ g = FMADD (g, r, g); -+ h = FMADD (h, r, h); -+ -+ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */ -+ -+ /* Final refinement. */ -+ d = FNMSUB (g, g, b); -+ -+ fesetenv_register (fe); -+ return FMADD (d, h, g); -+ } -+ } -+ else if (b < 0) -+ { -+ /* For some reason, some PowerPC32 processors don't implement -+ FE_INVALID_SQRT. */ -+#ifdef FE_INVALID_SQRT -+ feraiseexcept (FE_INVALID_SQRT); -+ -+ fenv_union_t u = { .fenv = fegetenv_register () }; -+ if ((u.l[1] & FE_INVALID) == 0) -+#endif -+ feraiseexcept (FE_INVALID); -+ b = a_nan.value; -+ } -+ return f_wash (b); -+} -diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c ---- libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600 -+++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c 2012-06-14 14:51:50.452001745 -0500 -@@ -0,0 +1,101 @@ -+/* Single-precision floating point square root. -+ Copyright (C) 2010 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; -+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; -+static const float threehalf = 1.5; -+ -+/* The method is based on the descriptions in: -+ -+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; -+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 -+ -+ We find the reciprocal square root and use that to compute the actual -+ square root. */ -+ -+#ifdef __STDC__ -+float -+__ieee754_sqrtf (float b) -+#else -+float -+__ieee754_sqrtf (b) -+ float b; -+#endif -+{ -+ if (__builtin_expect (b > 0, 1)) -+ { -+#define FMSUB(a_, c_, b_) \ -+ ({ double __r; \ -+ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \ -+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ -+ __r;}) -+#define FNMSUB(a_, c_, b_) \ -+ ({ double __r; \ -+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ -+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ -+ __r;}) -+ -+ if (__builtin_expect (b != a_inf.value, 1)) -+ { -+ double y, x; -+ fenv_t fe; -+ -+ fe = fegetenv_register (); -+ -+ relax_fenv_state (); -+ -+ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */ -+ y = FMSUB (threehalf, b, b); -+ -+ /* Initial estimate. */ -+ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b)); -+ -+ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */ -+ x = x * FNMSUB (y, x * x, threehalf); -+ x = x * FNMSUB (y, x * x, threehalf); -+ x = x * FNMSUB (y, x * x, threehalf); -+ -+ /* All done. */ -+ fesetenv_register (fe); -+ return x * b; -+ } -+ } -+ else if (b < 0) -+ { -+ /* For some reason, some PowerPC32 processors don't implement -+ FE_INVALID_SQRT. */ -+#ifdef FE_INVALID_SQRT -+ feraiseexcept (FE_INVALID_SQRT); -+ -+ fenv_union_t u = { .fenv = fegetenv_register () }; -+ if ((u.l[1] & FE_INVALID) == 0) -+#endif -+ feraiseexcept (FE_INVALID); -+ b = a_nan.value; -+ } -+ return f_washf (b); -+} -diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c ---- libc-orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600 -+++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c 2012-06-14 14:56:02.080000985 -0500 -@@ -0,0 +1,134 @@ -+/* Double-precision floating point square root. -+ Copyright (C) 2010 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; -+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; -+static const float two108 = 3.245185536584267269e+32; -+static const float twom54 = 5.551115123125782702e-17; -+static const float half = 0.5; -+ -+/* The method is based on the descriptions in: -+ -+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; -+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 -+ -+ We find the actual square root and half of its reciprocal -+ simultaneously. */ -+ -+#ifdef __STDC__ -+double -+__ieee754_sqrt (double b) -+#else -+double -+__ieee754_sqrt (b) -+ double b; -+#endif -+{ -+ if (__builtin_expect (b > 0, 1)) -+ { -+ double y, g, h, d, r; -+ ieee_double_shape_type u; -+ -+ if (__builtin_expect (b != a_inf.value, 1)) -+ { -+ fenv_t fe; -+ -+ fe = fegetenv_register (); -+ -+ u.value = b; -+ -+ relax_fenv_state (); -+ -+ __asm__ ("frsqrte %[estimate], %[x]\n" -+ : [estimate] "=f" (y) : [x] "f" (b)); -+ -+ /* Following Muller et al, page 168, equation 5.20. -+ -+ h goes to 1/(2*sqrt(b)) -+ g goes to sqrt(b). -+ -+ We need three iterations to get within 1ulp. */ -+ -+ /* Indicate that these can be performed prior to the branch. GCC -+ insists on sinking them below the branch, however; it seems like -+ they'd be better before the branch so that we can cover any latency -+ from storing the argument and loading its high word. Oh well. */ -+ -+ g = b * y; -+ h = 0.5 * y; -+ -+ /* Handle small numbers by scaling. */ -+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) -+ return __ieee754_sqrt (b * two108) * twom54; -+ -+#define FMADD(a_, c_, b_) \ -+ ({ double __r; \ -+ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \ -+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ -+ __r;}) -+#define FNMSUB(a_, c_, b_) \ -+ ({ double __r; \ -+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ -+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ -+ __r;}) -+ -+ r = FNMSUB (g, h, half); -+ g = FMADD (g, r, g); -+ h = FMADD (h, r, h); -+ -+ r = FNMSUB (g, h, half); -+ g = FMADD (g, r, g); -+ h = FMADD (h, r, h); -+ -+ r = FNMSUB (g, h, half); -+ g = FMADD (g, r, g); -+ h = FMADD (h, r, h); -+ -+ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */ -+ -+ /* Final refinement. */ -+ d = FNMSUB (g, g, b); -+ -+ fesetenv_register (fe); -+ return FMADD (d, h, g); -+ } -+ } -+ else if (b < 0) -+ { -+ /* For some reason, some PowerPC32 processors don't implement -+ FE_INVALID_SQRT. */ -+#ifdef FE_INVALID_SQRT -+ feraiseexcept (FE_INVALID_SQRT); -+ -+ fenv_union_t u = { .fenv = fegetenv_register () }; -+ if ((u.l[1] & FE_INVALID) == 0) -+#endif -+ feraiseexcept (FE_INVALID); -+ b = a_nan.value; -+ } -+ return f_wash (b); -+} -diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c ---- libc-orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600 -+++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c 2012-06-14 14:56:02.080000985 -0500 -@@ -0,0 +1,101 @@ -+/* Single-precision floating point square root. -+ Copyright (C) 2010 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; -+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; -+static const float threehalf = 1.5; -+ -+/* The method is based on the descriptions in: -+ -+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; -+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 -+ -+ We find the reciprocal square root and use that to compute the actual -+ square root. */ -+ -+#ifdef __STDC__ -+float -+__ieee754_sqrtf (float b) -+#else -+float -+__ieee754_sqrtf (b) -+ float b; -+#endif -+{ -+ if (__builtin_expect (b > 0, 1)) -+ { -+#define FMSUB(a_, c_, b_) \ -+ ({ double __r; \ -+ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \ -+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ -+ __r;}) -+#define FNMSUB(a_, c_, b_) \ -+ ({ double __r; \ -+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ -+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ -+ __r;}) -+ -+ if (__builtin_expect (b != a_inf.value, 1)) -+ { -+ double y, x; -+ fenv_t fe; -+ -+ fe = fegetenv_register (); -+ -+ relax_fenv_state (); -+ -+ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */ -+ y = FMSUB (threehalf, b, b); -+ -+ /* Initial estimate. */ -+ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b)); -+ -+ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */ -+ x = x * FNMSUB (y, x * x, threehalf); -+ x = x * FNMSUB (y, x * x, threehalf); -+ x = x * FNMSUB (y, x * x, threehalf); -+ -+ /* All done. */ -+ fesetenv_register (fe); -+ return x * b; -+ } -+ } -+ else if (b < 0) -+ { -+ /* For some reason, some PowerPC32 processors don't implement -+ FE_INVALID_SQRT. */ -+#ifdef FE_INVALID_SQRT -+ feraiseexcept (FE_INVALID_SQRT); -+ -+ fenv_union_t u = { .fenv = fegetenv_register () }; -+ if ((u.l[1] & FE_INVALID) == 0) -+#endif -+ feraiseexcept (FE_INVALID); -+ b = a_nan.value; -+ } -+ return f_washf (b); -+} -diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies ---- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies 1969-12-31 18:00:00.000000000 -0600 -+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies 2012-06-14 14:51:50.452001745 -0500 -@@ -0,0 +1 @@ -+powerpc/powerpc32/603e/fpu -diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies ---- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies 1969-12-31 18:00:00.000000000 -0600 -+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies 2012-06-14 14:54:00.481000876 -0500 -@@ -0,0 +1 @@ -+powerpc/powerpc32/e500mc/fpu -diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies ---- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies 1969-12-31 18:00:00.000000000 -0600 -+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies 2012-06-14 14:54:17.000001007 -0500 -@@ -0,0 +1 @@ -+powerpc/powerpc32/e5500/fpu -diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies ---- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies 1969-12-31 18:00:00.000000000 -0600 -+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies 2012-06-14 14:54:31.054001299 -0500 -@@ -0,0 +1 @@ -+powerpc/powerpc32/e6500/fpu -diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies ---- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies 1969-12-31 18:00:00.000000000 -0600 -+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies 2012-06-14 14:51:50.453001709 -0500 -@@ -0,0 +1 @@ -+powerpc/powerpc64/e5500/fpu -diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies ---- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies 1969-12-31 18:00:00.000000000 -0600 -+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies 2012-06-14 14:58:14.298001288 -0500 -@@ -0,0 +1 @@ -+powerpc/powerpc64/e6500/fpu diff --git a/meta/recipes-core/eglibc/eglibc-2.18/initgroups_keys.patch b/meta/recipes-core/eglibc/eglibc-2.18/initgroups_keys.patch deleted file mode 100644 index be29856b03..0000000000 --- a/meta/recipes-core/eglibc/eglibc-2.18/initgroups_keys.patch +++ /dev/null @@ -1,20 +0,0 @@ -This is needed since initgroups belongs to NET group -so when NET is disabled in eglibc build then it reports -as undefined symbol - -Signed-off-by: Khem Raj -Upstream-Status: Pending - -Index: libc/nss/getent.c -=================================================================== ---- libc.orig/nss/getent.c 2012-03-09 09:41:57.099581559 -0800 -+++ libc/nss/getent.c 2012-03-09 09:42:13.095582334 -0800 -@@ -898,7 +898,7 @@ - D(group) - D(gshadow) - DN(hosts) --D(initgroups) -+DN(initgroups) - DN(netgroup) - DN(networks) - D(passwd) diff --git a/meta/recipes-core/eglibc/eglibc-2.18/ld-search-order.patch b/meta/recipes-core/eglibc/eglibc-2.18/ld-search-order.patch deleted file mode 100644 index e83a0ad6d2..0000000000 --- a/meta/recipes-core/eglibc/eglibc-2.18/ld-search-order.patch +++ /dev/null @@ -1,56 +0,0 @@ -Upstream-Status: Inappropriate [embedded specific] - -The default lib search path order is: - - 1) LD_LIBRARY_PATH - 2) RPATH from the binary - 3) ld.so.cache - 4) default search paths embedded in the linker - -For nativesdk binaries which are being used alongside binaries on a host system, we -need the search paths to firstly search the shipped nativesdk libs but then also -cover the host system. For example we want the host system's libGL and this may be -in a non-standard location like /usr/lib/mesa. The only place the location is know -about is in the ld.so.cache of the host system. - -Since nativesdk has a simple structure and doesn't need to use a cache itself, we -repurpose the cache for use as a last resort in finding host system binaries. This -means we need to switch the order of 3 and 4 above to make this work effectively. - -RP 14/10/2010 - -Index: libc/elf/dl-load.c -=================================================================== ---- libc.orig/elf/dl-load.c 2012-12-02 13:11:45.000000000 -0800 -+++ libc/elf/dl-load.c 2013-01-09 07:00:59.135223084 -0800 -@@ -2215,7 +2215,14 @@ - fd = open_path (name, namelen, mode & __RTLD_SECURE, - &loader->l_runpath_dirs, &realname, &fb, loader, - LA_SER_RUNPATH, &found_other_class); -- -+ /* try the default path. */ -+ if (fd == -1 -+ && ((l = loader ?: GL(dl_ns)[nsid]._ns_loaded) == NULL -+ || __builtin_expect (!(l->l_flags_1 & DF_1_NODEFLIB), 1)) -+ && rtld_search_dirs.dirs != (void *) -1) -+ fd = open_path (name, namelen, mode & __RTLD_SECURE, &rtld_search_dirs, -+ &realname, &fb, l, LA_SER_DEFAULT, &found_other_class); -+ /* Finally try ld.so.cache */ - #ifdef USE_LDCONFIG - if (fd == -1 - && (__builtin_expect (! (mode & __RTLD_SECURE), 1) -@@ -2283,14 +2290,6 @@ - } - #endif - -- /* Finally, try the default path. */ -- if (fd == -1 -- && ((l = loader ?: GL(dl_ns)[nsid]._ns_loaded) == NULL -- || __builtin_expect (!(l->l_flags_1 & DF_1_NODEFLIB), 1)) -- && rtld_search_dirs.dirs != (void *) -1) -- fd = open_path (name, namelen, mode & __RTLD_SECURE, &rtld_search_dirs, -- &realname, &fb, l, LA_SER_DEFAULT, &found_other_class); -- - /* Add another newline when we are tracing the library loading. */ - if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_LIBS, 0)) - _dl_debug_printf ("\n"); diff --git a/meta/recipes-core/eglibc/eglibc-2.18/make-4.patch b/meta/recipes-core/eglibc/eglibc-2.18/make-4.patch deleted file mode 100644 index ec105b4ae2..0000000000 --- a/meta/recipes-core/eglibc/eglibc-2.18/make-4.patch +++ /dev/null @@ -1,31 +0,0 @@ -Accept make versions 4.0 and greater - -Backport of glibc 28d708c44bc47b56f6551ff285f78edcf61c208a. - -Upstream-Status: Backport -Signed-off-by: Jonathan Liu - -diff -Nur libc.orig/configure libc/configure ---- libc.orig/configure 2013-08-21 02:23:48.000000000 +1000 -+++ libc/configure 2013-11-04 17:04:17.778333748 +1100 -@@ -4772,7 +4772,7 @@ - ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 3.79* | 3.[89]*) -+ 3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - -diff -Nur libc.orig/configure.in libc/configure.in ---- libc.orig/configure.in 2013-08-21 02:23:48.000000000 +1000 -+++ libc/configure.in 2013-11-04 16:54:17.955014870 +1100 -@@ -989,7 +989,7 @@ - critic_missing="$critic_missing gcc") - AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version, - [GNU Make[^0-9]*\([0-9][0-9.]*\)], -- [3.79* | 3.[89]*], critic_missing="$critic_missing make") -+ [3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*], critic_missing="$critic_missing make") - - AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version, - [GNU gettext.* \([0-9]*\.[0-9.]*\)], diff --git a/meta/recipes-core/eglibc/eglibc-2.18/mips-rld-map-check.patch b/meta/recipes-core/eglibc/eglibc-2.18/mips-rld-map-check.patch deleted file mode 100644 index 9b646fea95..0000000000 --- a/meta/recipes-core/eglibc/eglibc-2.18/mips-rld-map-check.patch +++ /dev/null @@ -1,26 +0,0 @@ - -On mips target, binutils currently sets DT_MIPS_RLD_MAP to 0 in dynamic -section if a --version-script sets _RLD_MAP to local. This is apparently -a binutils bug, but libc shouldn't segfault in this case. - -see also: http://sourceware.org/bugilla/show_bug.cgi?id=11615 - -Upstream-Status: Pending - -9/19/2010 - added by Qing He - - ---- -diff -ru glibc-2.10.1.orig/ports/sysdeps/mips/dl-machine.h glibc-2.10.1/ports/sysdeps/mips/dl-machine.h ---- glibc-2.10.1.orig/ports/sysdeps/mips/dl-machine.h 2009-05-16 16:36:20.000000000 +0800 -+++ glibc-2.10.1/ports/sysdeps/mips/dl-machine.h 2010-09-19 09:11:53.000000000 +0800 -@@ -70,7 +70,8 @@ - /* If there is a DT_MIPS_RLD_MAP entry in the dynamic section, fill it in - with the run-time address of the r_debug structure */ - #define ELF_MACHINE_DEBUG_SETUP(l,r) \ --do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \ -+do { if ((l)->l_info[DT_MIPS (RLD_MAP)] && \ -+ (l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) \ - *(ElfW(Addr) *)((l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) = \ - (ElfW(Addr)) (r); \ - } while (0) diff --git a/meta/recipes-core/eglibc/eglibc-2.18/multilib_readlib.patch b/meta/recipes-core/eglibc/eglibc-2.18/multilib_readlib.patch deleted file mode 100644 index 1542b1b519..0000000000 --- a/meta/recipes-core/eglibc/eglibc-2.18/multilib_readlib.patch +++ /dev/null @@ -1,17 +0,0 @@ -Upstream-Status: Inappropriate [embedded specific] - -Replace the OECORE_KNOWN_INTERPRETER_NAMES with the value of -variable EGLIBC_KNOWN_INTERPRETER_NAMES. - -Lianhao Lu, 08/01/2011 - ---- libc/elf/readlib.c.orig 2011-08-12 17:05:51.864470837 +0800 -+++ libc/elf/readlib.c 2011-08-12 17:06:39.346942074 +0800 -@@ -52,6 +52,7 @@ - #ifdef SYSDEP_KNOWN_INTERPRETER_NAMES - SYSDEP_KNOWN_INTERPRETER_NAMES - #endif -+ OECORE_KNOWN_INTERPRETER_NAMES - }; - - static struct known_names known_libs[] = diff --git a/meta/recipes-core/eglibc/eglibc-2.18/ppc-sqrt_finite.patch b/meta/recipes-core/eglibc/eglibc-2.18/ppc-sqrt_finite.patch deleted file mode 100644 index 6ea666b1d6..0000000000 --- a/meta/recipes-core/eglibc/eglibc-2.18/ppc-sqrt_finite.patch +++ /dev/null @@ -1,184 +0,0 @@ -on ppc fixes the errors like below -| ./.libs/libpulsecore-1.1.so: undefined reference to `__sqrt_finite' -| collect2: ld returned 1 exit status - -Upstream-Status: Pending - -ChangeLog - -2012-01-06 Khem Raj - - * sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c: Add __*_finite alias. - Remove cruft. - * sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c: Ditto. - * sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c: Ditto. - * sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c: Ditto. - -Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c -=================================================================== ---- libc.orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c -+++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c -@@ -39,14 +39,8 @@ static const float half = 0.5; - We find the actual square root and half of its reciprocal - simultaneously. */ - --#ifdef __STDC__ - double - __ieee754_sqrt (double b) --#else --double --__ieee754_sqrt (b) -- double b; --#endif - { - if (__builtin_expect (b > 0, 1)) - { -@@ -132,3 +126,4 @@ __ieee754_sqrt (b) - } - return f_wash (b); - } -+strong_alias (__ieee754_sqrt, __sqrt_finite) -Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c -=================================================================== ---- libc.orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c -+++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c -@@ -37,14 +37,8 @@ static const float threehalf = 1.5; - We find the reciprocal square root and use that to compute the actual - square root. */ - --#ifdef __STDC__ - float - __ieee754_sqrtf (float b) --#else --float --__ieee754_sqrtf (b) -- float b; --#endif - { - if (__builtin_expect (b > 0, 1)) - { -@@ -99,3 +93,4 @@ __ieee754_sqrtf (b) - } - return f_washf (b); - } -+strong_alias (__ieee754_sqrtf, __sqrtf_finite) -Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c -=================================================================== ---- libc.orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c -+++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c -@@ -39,14 +39,8 @@ static const float half = 0.5; - We find the actual square root and half of its reciprocal - simultaneously. */ - --#ifdef __STDC__ - double - __ieee754_sqrt (double b) --#else --double --__ieee754_sqrt (b) -- double b; --#endif - { - if (__builtin_expect (b > 0, 1)) - { -@@ -132,3 +126,4 @@ __ieee754_sqrt (b) - } - return f_wash (b); - } -+strong_alias (__ieee754_sqrt, __sqrt_finite) -Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c -=================================================================== ---- libc.orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c -+++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c -@@ -37,14 +37,8 @@ static const float threehalf = 1.5; - We find the reciprocal square root and use that to compute the actual - square root. */ - --#ifdef __STDC__ - float - __ieee754_sqrtf (float b) --#else --float --__ieee754_sqrtf (b) -- float b; --#endif - { - if (__builtin_expect (b > 0, 1)) - { -@@ -99,3 +93,4 @@ __ieee754_sqrtf (b) - } - return f_washf (b); - } -+strong_alias (__ieee754_sqrtf, __sqrtf_finite) -Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c -=================================================================== ---- libc.orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c -+++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c -@@ -132,3 +132,4 @@ __ieee754_sqrt (b) - } - return f_wash (b); - } -+strong_alias (__ieee754_sqrt, __sqrt_finite) -Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c -=================================================================== ---- libc.orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c -+++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c -@@ -99,3 +99,4 @@ __ieee754_sqrtf (b) - } - return f_washf (b); - } -+strong_alias (__ieee754_sqrtf, __sqrtf_finite) -Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c -=================================================================== ---- libc.orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c -+++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c -@@ -132,3 +132,4 @@ __ieee754_sqrt (b) - } - return f_wash (b); - } -+strong_alias (__ieee754_sqrt, __sqrt_finite) -Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c -=================================================================== ---- libc.orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c -+++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c -@@ -99,3 +99,4 @@ __ieee754_sqrtf (b) - } - return f_washf (b); - } -+strong_alias (__ieee754_sqrtf, __sqrtf_finite) -Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c -=================================================================== ---- libc.orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c -+++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c -@@ -132,3 +132,4 @@ __ieee754_sqrt (b) - } - return f_wash (b); - } -+strong_alias (__ieee754_sqrt, __sqrt_finite) -Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c -=================================================================== ---- libc.orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c -+++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c -@@ -99,3 +99,4 @@ __ieee754_sqrtf (b) - } - return f_washf (b); - } -+strong_alias (__ieee754_sqrtf, __sqrtf_finite) -Index: libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c -=================================================================== ---- libc.orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c -+++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c -@@ -132,3 +132,4 @@ __ieee754_sqrt (b) - } - return f_wash (b); - } -+strong_alias (__ieee754_sqrt, __sqrt_finite) -Index: libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c -=================================================================== ---- libc.orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c -+++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c -@@ -99,3 +99,4 @@ __ieee754_sqrtf (b) - } - return f_washf (b); - } -+strong_alias (__ieee754_sqrtf, __sqrtf_finite) diff --git a/meta/recipes-core/eglibc/eglibc-2.18/ppc_slow_ieee754_sqrt.patch b/meta/recipes-core/eglibc/eglibc-2.18/ppc_slow_ieee754_sqrt.patch deleted file mode 100644 index 60532cbd03..0000000000 --- a/meta/recipes-core/eglibc/eglibc-2.18/ppc_slow_ieee754_sqrt.patch +++ /dev/null @@ -1,365 +0,0 @@ - __ieee754_sqrt{,f} are now inline functions and call out __slow versions - - -Signed-off-by: Khem Raj -Upstream-Status: Pending -Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c -=================================================================== ---- libc.orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c -+++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c -@@ -40,7 +40,7 @@ static const float half = 0.5; - simultaneously. */ - - double --__ieee754_sqrt (double b) -+__slow_ieee754_sqrt (double b) - { - if (__builtin_expect (b > 0, 1)) - { -@@ -77,7 +77,7 @@ __ieee754_sqrt (double b) - - /* Handle small numbers by scaling. */ - if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) -- return __ieee754_sqrt (b * two108) * twom54; -+ return __slow_ieee754_sqrt (b * two108) * twom54; - - #define FMADD(a_, c_, b_) \ - ({ double __r; \ -@@ -126,4 +126,12 @@ __ieee754_sqrt (double b) - } - return f_wash (b); - } -+ -+#undef __ieee754_sqrt -+double -+__ieee754_sqrt (double x) -+{ -+ return __slow_ieee754_sqrt (x); -+} -+ - strong_alias (__ieee754_sqrt, __sqrt_finite) -Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c -=================================================================== ---- libc.orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c -+++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c -@@ -38,7 +38,7 @@ static const float threehalf = 1.5; - square root. */ - - float --__ieee754_sqrtf (float b) -+__slow_ieee754_sqrtf (float b) - { - if (__builtin_expect (b > 0, 1)) - { -@@ -93,4 +93,10 @@ __ieee754_sqrtf (float b) - } - return f_washf (b); - } -+#undef __ieee754_sqrtf -+float -+__ieee754_sqrtf (float x) -+{ -+ return __slow_ieee754_sqrtf (x); -+} - strong_alias (__ieee754_sqrtf, __sqrtf_finite) -Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c -=================================================================== ---- libc.orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c -+++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c -@@ -40,7 +40,7 @@ static const float half = 0.5; - simultaneously. */ - - double --__ieee754_sqrt (double b) -+__slow_ieee754_sqrt (double b) - { - if (__builtin_expect (b > 0, 1)) - { -@@ -77,7 +77,7 @@ __ieee754_sqrt (double b) - - /* Handle small numbers by scaling. */ - if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) -- return __ieee754_sqrt (b * two108) * twom54; -+ return __slow_ieee754_sqrt (b * two108) * twom54; - - #define FMADD(a_, c_, b_) \ - ({ double __r; \ -@@ -126,4 +126,12 @@ __ieee754_sqrt (double b) - } - return f_wash (b); - } -+ -+#undef __ieee754_sqrt -+double -+__ieee754_sqrt (double x) -+{ -+ return __slow_ieee754_sqrt (x); -+} -+ - strong_alias (__ieee754_sqrt, __sqrt_finite) -Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c -=================================================================== ---- libc.orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c -+++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c -@@ -38,7 +38,7 @@ static const float threehalf = 1.5; - square root. */ - - float --__ieee754_sqrtf (float b) -+__slow_ieee754_sqrtf (float b) - { - if (__builtin_expect (b > 0, 1)) - { -@@ -93,4 +93,11 @@ __ieee754_sqrtf (float b) - } - return f_washf (b); - } -+#undef __ieee754_sqrtf -+float -+__ieee754_sqrtf (float x) -+{ -+ return __slow_ieee754_sqrtf (x); -+} -+ - strong_alias (__ieee754_sqrtf, __sqrtf_finite) -Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c -=================================================================== ---- libc.orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c -+++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c -@@ -41,10 +41,10 @@ static const float half = 0.5; - - #ifdef __STDC__ - double --__ieee754_sqrt (double b) -+__slow_ieee754_sqrt (double b) - #else - double --__ieee754_sqrt (b) -+__slow_ieee754_sqrt (b) - double b; - #endif - { -@@ -83,7 +83,7 @@ __ieee754_sqrt (b) - - /* Handle small numbers by scaling. */ - if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) -- return __ieee754_sqrt (b * two108) * twom54; -+ return __slow_ieee754_sqrt (b * two108) * twom54; - - #define FMADD(a_, c_, b_) \ - ({ double __r; \ -@@ -132,4 +132,12 @@ __ieee754_sqrt (b) - } - return f_wash (b); - } -+ -+#undef __ieee754_sqrt -+double -+__ieee754_sqrt (double x) -+{ -+ return __slow_ieee754_sqrt (x); -+} -+ - strong_alias (__ieee754_sqrt, __sqrt_finite) -Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c -=================================================================== ---- libc.orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c -+++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c -@@ -39,10 +39,10 @@ static const float threehalf = 1.5; - - #ifdef __STDC__ - float --__ieee754_sqrtf (float b) -+__slow_ieee754_sqrtf (float b) - #else - float --__ieee754_sqrtf (b) -+__slow_ieee754_sqrtf (b) - float b; - #endif - { -@@ -99,4 +99,12 @@ __ieee754_sqrtf (b) - } - return f_washf (b); - } -+ -+#undef __ieee754_sqrtf -+float -+__ieee754_sqrtf (float x) -+{ -+ return __slow_ieee754_sqrtf (x); -+} -+ - strong_alias (__ieee754_sqrtf, __sqrtf_finite) -Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c -=================================================================== ---- libc.orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c -+++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c -@@ -41,10 +41,10 @@ static const float half = 0.5; - - #ifdef __STDC__ - double --__ieee754_sqrt (double b) -+__slow_ieee754_sqrt (double b) - #else - double --__ieee754_sqrt (b) -+__slow_ieee754_sqrt (b) - double b; - #endif - { -@@ -83,7 +83,7 @@ __ieee754_sqrt (b) - - /* Handle small numbers by scaling. */ - if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) -- return __ieee754_sqrt (b * two108) * twom54; -+ return __slow_ieee754_sqrt (b * two108) * twom54; - - #define FMADD(a_, c_, b_) \ - ({ double __r; \ -@@ -132,4 +132,12 @@ __ieee754_sqrt (b) - } - return f_wash (b); - } -+ -+#undef __ieee754_sqrt -+double -+__ieee754_sqrt (double x) -+{ -+ return __slow_ieee754_sqrt (x); -+} -+ - strong_alias (__ieee754_sqrt, __sqrt_finite) -Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c -=================================================================== ---- libc.orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c -+++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c -@@ -39,10 +39,10 @@ static const float threehalf = 1.5; - - #ifdef __STDC__ - float --__ieee754_sqrtf (float b) -+__slow_ieee754_sqrtf (float b) - #else - float --__ieee754_sqrtf (b) -+__slow_ieee754_sqrtf (b) - float b; - #endif - { -@@ -99,4 +99,12 @@ __ieee754_sqrtf (b) - } - return f_washf (b); - } -+ -+#undef __ieee754_sqrtf -+float -+__ieee754_sqrtf (float x) -+{ -+ return __slow_ieee754_sqrtf (x); -+} -+ - strong_alias (__ieee754_sqrtf, __sqrtf_finite) -Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c -=================================================================== ---- libc.orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c -+++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c -@@ -41,10 +41,10 @@ static const float half = 0.5; - - #ifdef __STDC__ - double --__ieee754_sqrt (double b) -+__slow_ieee754_sqrt (double b) - #else - double --__ieee754_sqrt (b) -+__slow_ieee754_sqrt (b) - double b; - #endif - { -@@ -83,7 +83,7 @@ __ieee754_sqrt (b) - - /* Handle small numbers by scaling. */ - if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) -- return __ieee754_sqrt (b * two108) * twom54; -+ return __slow_ieee754_sqrt (b * two108) * twom54; - - #define FMADD(a_, c_, b_) \ - ({ double __r; \ -@@ -132,4 +132,12 @@ __ieee754_sqrt (b) - } - return f_wash (b); - } -+ -+#undef __ieee754_sqrt -+double -+__ieee754_sqrt (double x) -+{ -+ return __slow_ieee754_sqrt (x); -+} -+ - strong_alias (__ieee754_sqrt, __sqrt_finite) -Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c -=================================================================== ---- libc.orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c -+++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c -@@ -39,10 +39,10 @@ static const float threehalf = 1.5; - - #ifdef __STDC__ - float --__ieee754_sqrtf (float b) -+__slow_ieee754_sqrtf (float b) - #else - float --__ieee754_sqrtf (b) -+__slow_ieee754_sqrtf (b) - float b; - #endif - { -@@ -99,4 +99,12 @@ __ieee754_sqrtf (b) - } - return f_washf (b); - } -+ -+#undef __ieee754_sqrtf -+float -+__ieee754_sqrtf (float x) -+{ -+ return __slow_ieee754_sqrtf (x); -+} -+ - strong_alias (__ieee754_sqrtf, __sqrtf_finite) -Index: libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c -=================================================================== ---- libc.orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c -+++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c -@@ -132,4 +132,12 @@ __ieee754_sqrt (b) - } - return f_wash (b); - } -+ -+#undef __ieee754_sqrt -+double -+__ieee754_sqrt (double x) -+{ -+ return __slow_ieee754_sqrt (x); -+} -+ - strong_alias (__ieee754_sqrt, __sqrt_finite) -Index: libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c -=================================================================== ---- libc.orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c -+++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c -@@ -99,4 +99,12 @@ __ieee754_sqrtf (b) - } - return f_washf (b); - } -+ -+#undef __ieee754_sqrtf -+float -+__ieee754_sqrtf (float x) -+{ -+ return __slow_ieee754_sqrtf (x); -+} -+ - strong_alias (__ieee754_sqrtf, __sqrtf_finite) diff --git a/meta/recipes-core/eglibc/eglibc-2.18/relocatable_sdk.patch b/meta/recipes-core/eglibc/eglibc-2.18/relocatable_sdk.patch deleted file mode 100644 index ca5f17ba58..0000000000 --- a/meta/recipes-core/eglibc/eglibc-2.18/relocatable_sdk.patch +++ /dev/null @@ -1,108 +0,0 @@ -Upstream-Status: Inappropriate [SDK specific] - -This patch puts the dynamic loader path in the binaries, SYSTEM_DIRS strings -and lengths as well as ld.so.cache path in the dynamic loader to specific -sections in memory. The sections that contain paths have been allocated a 4096 -byte section, which is the maximum path length in linux. This will allow the -relocating script to parse the ELF binary, detect the section and easily replace -the strings in a certain path. - -Signed-off-by: Laurentiu Palcu - -Index: libc/elf/interp.c -=================================================================== ---- libc.orig/elf/interp.c -+++ libc/elf/interp.c -@@ -16,5 +16,5 @@ - License along with the GNU C Library; if not, see - . */ - --const char __invoke_dynamic_linker__[] __attribute__ ((section (".interp"))) -+const char __invoke_dynamic_linker__[4096] __attribute__ ((section (".interp"))) - = RUNTIME_LINKER; -Index: libc/elf/dl-load.c -=================================================================== ---- libc.orig/elf/dl-load.c -+++ libc/elf/dl-load.c -@@ -144,8 +144,8 @@ static size_t max_capstrlen attribute_re - /* Get the generated information about the trusted directories. */ - #include "trusted-dirs.h" - --static const char system_dirs[] = SYSTEM_DIRS; --static const size_t system_dirs_len[] = -+static const char system_dirs[4096] __attribute__ ((section (".sysdirs"))) = SYSTEM_DIRS; -+volatile static const size_t system_dirs_len[] __attribute__ ((section (".sysdirslen"))) = - { - SYSTEM_DIRS_LEN - }; -Index: libc/elf/dl-cache.c -=================================================================== ---- libc.orig/elf/dl-cache.c -+++ libc/elf/dl-cache.c -@@ -133,6 +133,10 @@ do \ - while (0) - - -+const char LD_SO_CACHE[4096] __attribute__ ((section (".ldsocache"))) = -+ SYSCONFDIR "/ld.so.cache"; -+ -+ - int - internal_function - _dl_cache_libcmp (const char *p1, const char *p2) -Index: libc/elf/ldconfig.c -=================================================================== ---- libc.orig/elf/ldconfig.c -+++ libc/elf/ldconfig.c -@@ -166,6 +166,9 @@ static struct argp argp = - options, parse_opt, NULL, doc, NULL, more_help, NULL - }; - -+ -+extern const char LD_SO_CACHE[4096] __attribute__ ((section (".ldsocache"))); -+ - /* Check if string corresponds to an important hardware capability or - a platform. */ - static int -Index: libc/sysdeps/generic/dl-cache.h -=================================================================== ---- libc.orig/sysdeps/generic/dl-cache.h -+++ libc/sysdeps/generic/dl-cache.h -@@ -27,10 +27,6 @@ - ((flags) == 1 || (flags) == _DL_CACHE_DEFAULT_ID) - #endif - --#ifndef LD_SO_CACHE --# define LD_SO_CACHE SYSCONFDIR "/ld.so.cache" --#endif -- - #ifndef add_system_dir - # define add_system_dir(dir) add_dir (dir) - #endif -Index: libc/elf/rtld.c -=================================================================== ---- libc.orig/elf/rtld.c -+++ libc/elf/rtld.c -@@ -99,6 +99,7 @@ uintptr_t __pointer_chk_guard_local - strong_alias (__pointer_chk_guard_local, __pointer_chk_guard) - #endif - -+extern const char LD_SO_CACHE[4096] __attribute__ ((section (".ldsocache"))); - - /* List of auditing DSOs. */ - static struct audit_list -@@ -1031,12 +1032,12 @@ of this helper program; chances are you - --list list all dependencies and how they are resolved\n\ - --verify verify that given object really is a dynamically linked\n\ - object we can handle\n\ -- --inhibit-cache Do not use " LD_SO_CACHE "\n\ -+ --inhibit-cache Do not use %s\n\ - --library-path PATH use given PATH instead of content of the environment\n\ - variable LD_LIBRARY_PATH\n\ - --inhibit-rpath LIST ignore RUNPATH and RPATH information in object names\n\ - in LIST\n\ -- --audit LIST use objects named in LIST as auditors\n"); -+ --audit LIST use objects named in LIST as auditors\n", LD_SO_CACHE); - - ++_dl_skip_args; - --_dl_argc; diff --git a/meta/recipes-core/eglibc/eglibc-2.18/relocatable_sdk_fix_openpath.patch b/meta/recipes-core/eglibc/eglibc-2.18/relocatable_sdk_fix_openpath.patch deleted file mode 100644 index f164f8f9ae..0000000000 --- a/meta/recipes-core/eglibc/eglibc-2.18/relocatable_sdk_fix_openpath.patch +++ /dev/null @@ -1,41 +0,0 @@ -Upstream-Status: Inappropriate [SDK specific] - -eglibc-nativesdk: Fix buffer overrun with a relocated SDK - -When ld-linux-*.so.2 is relocated to a path that is longer than the -original fixed location, the dynamic loader will crash in open_path -because it implicitly assumes that max_dirnamelen is a fixed size that -never changes. - -The allocated buffer will not be large enough to contain the directory -path string which is larger than the fixed location provided at build -time. - -Signed-off-by: Jason Wessel - ---- - elf/dl-load.c | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - ---- a/elf/dl-load.c -+++ b/elf/dl-load.c -@@ -1919,7 +1919,19 @@ open_path (const char *name, size_t name - given on the command line when rtld is run directly. */ - return -1; - -+ do -+ { -+ struct r_search_path_elem *this_dir = *dirs; -+ if (this_dir->dirnamelen > max_dirnamelen) -+ { -+ max_dirnamelen = this_dir->dirnamelen; -+ } -+ } -+ while (*++dirs != NULL); -+ - buf = alloca (max_dirnamelen + max_capstrlen + namelen); -+ -+ dirs = sps->dirs; - do - { - struct r_search_path_elem *this_dir = *dirs; diff --git a/meta/recipes-core/eglibc/eglibc-2.18/tzselect-awk.patch b/meta/recipes-core/eglibc/eglibc-2.18/tzselect-awk.patch deleted file mode 100644 index dc9949bec9..0000000000 --- a/meta/recipes-core/eglibc/eglibc-2.18/tzselect-awk.patch +++ /dev/null @@ -1,42 +0,0 @@ -tzselect: workaround bug in busybox awk - -busybox's version of awk in version 1.20.2 and lower doesn't support -escape sequences in conjunction with the -F option. Use -v FS= instead -as a workaround until the bug is fixed. - -Reference: -https://bugs.busybox.net/show_bug.cgi?id=5126 - -Upstream-Status: Inappropriate [other] - -Signed-off-by: Paul Eggleton - ---- libc/timezone/tzselect.ksh -+++ libc/timezone/tzselect.ksh -@@ -208,7 +208,7 @@ while - TZ_for_date=$TZ;; - *) - # Get list of names of countries in the continent or ocean. -- countries=$($AWK -F'\t' \ -+ countries=$($AWK -v FS="\t" \ - -v continent="$continent" \ - -v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \ - ' -@@ -252,7 +252,7 @@ while - - - # Get list of names of time zone rule regions in the country. -- regions=$($AWK -F'\t' \ -+ regions=$($AWK -v FS="\t" \ - -v country="$country" \ - -v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \ - ' -@@ -289,7 +289,7 @@ while - esac - - # Determine TZ from country and region. -- TZ=$($AWK -F'\t' \ -+ TZ=$($AWK -v FS="\t" \ - -v country="$country" \ - -v region="$region" \ - -v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \ diff --git a/meta/recipes-core/eglibc/eglibc-2.18/tzselect-sh.patch b/meta/recipes-core/eglibc/eglibc-2.18/tzselect-sh.patch deleted file mode 100644 index e9a3691bbb..0000000000 --- a/meta/recipes-core/eglibc/eglibc-2.18/tzselect-sh.patch +++ /dev/null @@ -1,156 +0,0 @@ -tzselect: eliminate ksh-dependency - -This is an adapted version of a patch originally -by Peter Seebach found here: -http://www.eglibc.org/archives/patches/msg00671.html - -Upstream-Status: Pending - -Signed-off-by: Paul Eggleton - -Index: libc/timezone/tzselect.ksh -=================================================================== ---- libc.orig/timezone/tzselect.ksh 2012-11-17 09:50:14.000000000 -0800 -+++ libc/timezone/tzselect.ksh 2013-01-03 22:46:26.423844259 -0800 -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - - PKGVERSION='(tzcode) ' - TZVERSION=see_Makefile -@@ -11,23 +11,80 @@ - - # Porting notes: - # --# This script requires a Posix-like shell with the extension of a --# 'select' statement. The 'select' statement was introduced in the --# Korn shell and is available in Bash and other shell implementations. --# If your host lacks both Bash and the Korn shell, you can get their --# source from one of these locations: -+# func_select allows this script to run on shells (such as busybox ash) -+# which lack the ksh "select" builtin. - # --# Bash --# Korn Shell --# Public Domain Korn Shell --# --# This script also uses several features of modern awk programs. -+# This script uses several features of modern awk programs. - # If your host lacks awk, or has an old awk that does not conform to Posix, - # you can use either of the following free programs instead: - # - # Gawk (GNU awk) - # mawk - -+# Implement ksh-style select in POSIX shell -+ -+# We need a mostly-portable echo-n. -+case `echo -n "foo\c"` in -+*n*c*) func_echo_n() { echo "$*"; } ;; -+*n*) func_echo_n() { echo "$*\c"; } ;; -+*) func_echo_n() { echo -n "$*"; } ;; -+esac -+ -+# Synopsis: Replace "select foo in list" with "while func_select foo in list" -+# and this works just like ksh, so far as I know. -+func_select () { -+ func_select_args=0 -+ if expr "$1" : "[_a-zA-Z][_a-zA-Z0-9]*$" > /dev/null; then -+ func_select_var=$1 -+ else -+ echo >&2 "func_select: '$1' is not a valid variable name." -+ return 1 -+ fi -+ shift 1 -+ case $1 in -+ in) shift 1;; -+ *) echo >&2 "func_select: usage: func_select var in ... (you must provide -+arguments)"; return 1;; -+ esac -+ case $# in -+ 0) echo >&2 "func_select: usage: func_select var in ..."; return 1;; -+ esac -+ for func_select_arg -+ do -+ func_select_args=`expr $func_select_args + 1` -+ eval func_select_a_$func_select_args=\$func_select_arg -+ done -+ REPLY="" -+ while : -+ do -+ if test -z "$REPLY"; then -+ func_select_i=1 -+ while test $func_select_i -le $func_select_args -+ do -+ eval echo "\"\$func_select_i) \$func_select_a_$func_select_i\"" -+ func_select_i=`expr $func_select_i + 1` -+ done -+ fi -+ func_echo_n "${PS3-#? }" >&2 -+ if read REPLY; then -+ if test -n "${REPLY}"; then -+ if expr "$REPLY" : '[1-9][0-9]*$' > /dev/null; then -+ if test "$REPLY" -ge 1 && test "$REPLY" -le $func_select_args; then -+ eval $func_select_var=\$func_select_a_$REPLY -+ else -+ eval $func_select_var= -+ fi -+ else -+ eval $func_select_var= -+ fi -+ return 0 -+ fi -+ else -+ eval $func_select_var= -+ return 1 -+ fi -+ done -+} - - # Specify default values for environment variables if they are unset. - : ${AWK=awk} -@@ -72,7 +129,7 @@ - - - # Work around a bug in bash 1.14.7 and earlier, where $PS3 is sent to stdout. --case $(echo 1 | (select x in x; do break; done) 2>/dev/null) in -+case $(echo 1 | (while func_select x in x; do break; done) 2>/dev/null) in - ?*) PS3= - esac - -@@ -92,7 +149,7 @@ - - echo >&2 'Please select a continent or ocean.' - -- select continent in \ -+ while func_select continent in \ - Africa \ - Americas \ - Antarctica \ -@@ -172,7 +229,7 @@ - case $countries in - *"$newline"*) - echo >&2 'Please select a country.' -- select country in $countries -+ while func_select country in $countries - do - case $country in - '') echo >&2 'Please enter a number in range.';; -@@ -211,7 +268,7 @@ - *"$newline"*) - echo >&2 'Please select one of the following' \ - 'time zone regions.' -- select region in $regions -+ while func_select region in $regions - do - case $region in - '') echo >&2 'Please enter a number in range.';; -@@ -288,7 +345,7 @@ - echo >&2 "Is the above information OK?" - - ok= -- select ok in Yes No -+ while func_select ok in Yes No - do - case $ok in - '') echo >&2 'Please enter 1 for Yes, or 2 for No.';; diff --git a/meta/recipes-core/eglibc/eglibc-2.19/0001-R_ARM_TLS_DTPOFF32.patch b/meta/recipes-core/eglibc/eglibc-2.19/0001-R_ARM_TLS_DTPOFF32.patch new file mode 100644 index 0000000000..b4489e9ae9 --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-2.19/0001-R_ARM_TLS_DTPOFF32.patch @@ -0,0 +1,56 @@ + +Quote from bug 1443 which explains what the patch does : + + We build some random program and link it with -lust. When we run it, + it dies with a SIGSEGV before reaching main(). + + Libust.so depends on liburcu-bp.so from the usermode-rcu package. + Although libust.so is not prelinked, liburcu-bp.so IS prelinked; this + is critical. + + Libust.so uses a TLS / __thread variable that is defined in liburcu- + bp.so. There are special ARM-specific relocation types that allow two + shared libraries to share thread-specific data. This is critical too. + + One more critical issue: although liburcu-bp.so is prelinked, we can't + load it at its prelinked address, because we also link against + librt.so, and librt.so uses that address. + + The dynamic linker is forced to relink liburcu-bp.so at a different + address. In the course of relinking, it processes the special ARM + relocation record mentioned above. The prelinker has already filled + in the information, which is a short offset into a table of thread- + specific data that is allocated per-thread for each library that uses + TLS. Because the normal behavior of a relocation is to add the symbol + value to an addend stored at the address being relocated, we end up + adding the short offset to itself, doubling it. + + Now we have an awkward situation. The libust.so library doesn't know + about the addend, so its TLS data for this element is correct. The + liburcu-bp.so library has a different offset for the element. When we + go to initialize the element for the first time in liburcu-bp.so, we + write the address of the result at the doubled (broken) offset. + Later, when we refer to the address from libust.so, we check the value + at the correct offset, but it's NULL, so we eat hot SIGSEGV. + +Upstream-Status: Pending + +Signed-off-by: Andrei Dinu +--- + .../libc/ports/sysdeps/arm/dl-machine.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +ndex 8d905e8..dcfa71e 100644 +--- libc.orig/ports/sysdeps/arm/dl-machine.h ++++ libc/ports/sysdeps/arm/dl-machine.h +@@ -503,7 +503,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, + + case R_ARM_TLS_DTPOFF32: + if (sym != NULL) +- *reloc_addr += sym->st_value; ++ *reloc_addr = sym->st_value; + break; + + case R_ARM_TLS_TPOFF32: +-- + diff --git a/meta/recipes-core/eglibc/eglibc-2.19/0001-eglibc-menuconfig-support.patch b/meta/recipes-core/eglibc/eglibc-2.19/0001-eglibc-menuconfig-support.patch new file mode 100644 index 0000000000..4559a110fb --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-2.19/0001-eglibc-menuconfig-support.patch @@ -0,0 +1,912 @@ +Pulled from +http://www.eglibc.org/archives/patches/msg01042.html + +Upstream-Status: Pending +Signed-off-by: Khem + +Hi, + +This patch adds 'make menuconfig' support to EGLIBC. + + +EGLIBC can re-use the Linux kernel kconfig host tools ('conf' and 'mconf') unmodified, by passing appropriate environment variables and with some pre- and post-processing on the input/output config files. + +There are three new make targets supported, which all are defined in the new libc/options-config/Makefile, which is included by the top-level libc/Makefile: + +- 'make defconfig'. This passes 'libc/option-groups.defaults' to 'conf' as a default config, and outputs 'option-groups.config' to the top-level build directory, which will be the same as the default config. + +- 'make config'. This is the same line-oriented interface as in the Linux kernel. Input and output is 'option-groups.config' in the top-level build directory. + +- 'make menuconfig'. This is the same menu-based interface as in the Linux kernel. Input and output is 'option-groups.config' in the top-level build directory. + + +Pre-Processing: + + +The Linux kernel kconfig tools expect a prefix of "CONFIG_" on all config option names, but EGLIBC expects a prefix of "OPTION_". The pre-processing script, libc/options-config/config-preproc.pl, simply replaces "CONFIG_ with "OPTION_" in the given config file. The libc/options-config/Makefile passes the script output to a temporary config file, which is then passed to 'conf' or 'mconf'. + +Post-Processing (libc/options-config/config-postproc.pl): + + +- Disabled options are output as a comment line of the form "# CONFIG_FOO is not set". This needs to be changed to an explicit "CONFIG_FOO=n" in order to be compatible with 'option-groups.awk' which generates the option-groups.h header. + +- "CONFIG_" prefix is changed back to "OPTION_". + + +- The kconfig tools will not output anything for options that depend on a parent option, when the parent option is disabled. This implicit disable must be converted to an explicit "CONFIG_FOO=n" in order to be compatible with the way EGLIBC overrides the default option settings in 'libc/option-groups.defaults' with those in 'option-groups.config'. + + +A new configure option, '--with-kconfig=', tells EGLIBC where to find the pre-built 'conf' and 'mconf' host tools from Linux kernel builds. + +libc/EGLIBC.cross-building is updated to include instructions for using '--with-kconfig' for the final EGLIBC build, and shows how and when to run 'make *config'. + +libc/EGLIBC.option-groups is updated to include new information on the menuconfig support. + +Thanks, + +attached is the updated patch to address above issues. + +Steve + +-- +Steve Longerbeam | Senior Embedded Engineer, ESD Services +Mentor Embedded(tm) | 46871 Bayside Parkway, Fremont, CA 94538 +P 510.354.5838 | M 408.410.2735 +Nucleus(r) | Linux(r) | Android(tm) | Services | UI | Multi-OS + + +Index: libc/EGLIBC.cross-building +=================================================================== +--- libc.orig/EGLIBC.cross-building ++++ libc/EGLIBC.cross-building +@@ -243,9 +243,29 @@ full EGLIBC build: + > $src/libc/configure \ + > --prefix=/usr \ + > --with-headers=$sysroot/usr/include \ ++ > --with-kconfig=$obj/linux/scripts/kconfig \ + > --build=$build \ + > --host=$target \ + > --disable-profile --without-gd --without-cvs --enable-add-ons ++ ++Note the additional '--with-kconfig' option. This tells EGLIBC where to ++find the host config tools used by the kernel 'make config' and 'make ++menuconfig'. These tools can be re-used by EGLIBC for its own 'make ++*config' support, which will create 'option-groups.config' for you. ++But first make sure those tools have been built by running some ++dummy 'make *config' calls in the kernel directory: ++ ++ $ cd $obj/linux ++ $ PATH=$tools/bin:$PATH make config \ ++ > ARCH=$linux_arch CROSS_COMPILE=$target- \ ++ $ PATH=$tools/bin:$PATH make menuconfig \ ++ > ARCH=$linux_arch CROSS_COMPILE=$target- \ ++ ++Now we can configure and build the full EGLIBC: ++ ++ $ cd $obj/eglibc ++ $ PATH=$tools/bin:$PATH make defconfig ++ $ PATH=$tools/bin:$PATH make menuconfig + $ PATH=$tools/bin:$PATH make + $ PATH=$tools/bin:$PATH make install install_root=$sysroot + +Index: libc/configure.ac +=================================================================== +--- libc.orig/configure.ac ++++ libc/configure.ac +@@ -127,6 +127,16 @@ AC_ARG_WITH([headers], + [sysheaders='']) + AC_SUBST(sysheaders) + ++AC_ARG_WITH([kconfig], ++ AC_HELP_STRING([--with-kconfig=PATH], ++ [location of kconfig tools to use (from Linux ++ kernel builds) to re-use for configuring EGLIBC ++ option groups]), ++ [KCONFIG_TOOLS=$withval], ++ [KCONFIG_TOOLS='']) ++AC_SUBST(KCONFIG_TOOLS) ++ ++ + AC_SUBST(use_default_link) + AC_ARG_WITH([default-link], + AC_HELP_STRING([--with-default-link], +Index: libc/config.make.in +=================================================================== +--- libc.orig/config.make.in ++++ libc/config.make.in +@@ -45,6 +45,8 @@ sysincludes = @SYSINCLUDES@ + c++-sysincludes = @CXX_SYSINCLUDES@ + all-warnings = @all_warnings@ + ++kconfig_tools = @KCONFIG_TOOLS@ ++ + have-z-combreloc = @libc_cv_z_combreloc@ + have-z-execstack = @libc_cv_z_execstack@ + have-Bgroup = @libc_cv_Bgroup@ +Index: libc/options-config/config-postproc.pl +=================================================================== +--- /dev/null ++++ libc/options-config/config-postproc.pl +@@ -0,0 +1,54 @@ ++#!/usr/bin/perl ++ ++$usage = "usage: $0 \n"; ++ ++die "$usage" unless @ARGV; ++$defaults = shift @ARGV; ++die "$usage" unless @ARGV; ++die "Could not open $ARGV[0]" unless -T $ARGV[0]; ++ ++sub yank { ++ @option = grep($_ ne $_[0], @option); ++} ++ ++open(DEFAULTS, $defaults) || die "Could not open $defaults\n"; ++ ++# get the full list of available options using the default config file ++$i = 0; ++while () { ++ if (/^\s*OPTION_(\w+)\s*=/) { ++ $option[$i++] = $1; ++ } ++} ++ ++# now go through the config file, making the necessary changes ++while (<>) { ++ if (/Linux Kernel Configuration/) { ++ # change title ++ s/Linux Kernel/Option Groups/; ++ print; ++ } elsif (/^\s*CONFIG_(\w+)\s*=/) { ++ # this is an explicit option set line, change CONFIG_ to OPTION_ ++ # before printing and remove this option from option list ++ $opt = $1; ++ yank($opt); ++ s/CONFIG_/OPTION_/g; ++ print; ++ } elsif (/^\s*#\s+CONFIG_(\w+) is not set/) { ++ # this is a comment line, change CONFIG_ to OPTION_, remove this ++ # option from option list, and convert to explicit OPTION_FOO=n ++ $opt = $1; ++ yank($opt); ++ s/CONFIG_/OPTION_/g; ++ print "OPTION_$opt=n\n"; ++ } else { ++ print; ++ } ++} ++ ++# any options left in @options, are options that were not mentioned in ++# the config file, and implicitly that means the option must be set =n, ++# so do that here. ++foreach $opt (@option) { ++ print "OPTION_$opt=n\n"; ++} +Index: libc/options-config/config-preproc.pl +=================================================================== +--- /dev/null ++++ libc/options-config/config-preproc.pl +@@ -0,0 +1,8 @@ ++#!/usr/bin/perl ++ ++if (@ARGV) { ++ while (<>) { ++ s/OPTION_/CONFIG_/g; ++ print; ++ } ++} +Index: libc/options-config/Makefile +=================================================================== +--- /dev/null ++++ libc/options-config/Makefile +@@ -0,0 +1,55 @@ ++# =========================================================================== ++# EGLIBC option-groups configuration targets ++# These targets are included from top-level makefile ++ ++ifneq ($(kconfig_tools),) ++ifneq (no,$(PERL)) ++ ++ocdir := options-config ++ ++OconfigDefaults := option-groups.defaults ++OconfigDefaults_tmp := $(common-objpfx).tmp.defconfig ++OconfigDef := option-groups.def ++Oconfig := $(common-objpfx)option-groups.config ++Oconfig_tmp := $(common-objpfx).tmp.config ++ ++conf := $(kconfig_tools)/conf ++mconf := $(kconfig_tools)/mconf ++ ++preproc := $(PERL) $(ocdir)/config-preproc.pl ++postproc := $(PERL) $(ocdir)/config-postproc.pl ++ ++PHONY += defconfig config menuconfig ++ ++defconfig: $(conf) $(OconfigDefaults) $(OconfigDef) ++ rm -f $(OconfigDefaults_tmp) ++ rm -f $(Oconfig_tmp) ++ $(preproc) $(OconfigDefaults) > $(OconfigDefaults_tmp) ++ KCONFIG_CONFIG=$(Oconfig_tmp) $< --defconfig=$(OconfigDefaults_tmp) \ ++ $(OconfigDef) ++ $(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig) ++ rm $(Oconfig_tmp) ++ rm $(OconfigDefaults_tmp) ++ ++config: $(conf) $(OconfigDefaults) $(OconfigDef) ++ rm -f $(Oconfig_tmp) ++ $(preproc) $(wildcard $(Oconfig)) > $(Oconfig_tmp) ++ KCONFIG_CONFIG=$(Oconfig_tmp) $< --oldaskconfig $(OconfigDef) ++ $(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig) ++ rm $(Oconfig_tmp) ++ ++menuconfig: $(mconf) $(OconfigDefaults) $(OconfigDef) ++ rm -f $(Oconfig_tmp) ++ $(preproc) $(wildcard $(Oconfig)) > $(Oconfig_tmp) ++ KCONFIG_CONFIG=$(Oconfig_tmp) $< $(OconfigDef) ++ $(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig) ++ rm $(Oconfig_tmp) ++ ++# Help text used by make help ++help: ++ @echo ' defconfig - New config with default from default config' ++ @echo ' config - Update current config utilising a line-oriented program' ++ @echo ' menuconfig - Update current config utilising a menu based program' ++ ++endif ++endif +Index: libc/option-groups.def +=================================================================== +--- libc.orig/option-groups.def ++++ libc/option-groups.def +@@ -4,19 +4,19 @@ + # + # An entry of the form: + # +-# config OPTION_GROUP_NAME ++# config GROUP_NAME + # bool "one-line explanation of what this option group controls" + # help + # Multi-line help explaining the option group's meaning in + # some detail, terminated by indentation level. + # +-# defines an option group whose variable is OPTION_GROUP_NAME, with ++# defines an option group whose variable is GROUP_NAME, with + # meaningful values 'y' (enabled) and 'n' (disabled). The + # documentation is formatted to be consumed by some sort of + # interactive configuration interface, but EGLIBC doesn't have such an + # interface yet. + # +-# An option may have a 'depends' line, indicating which other options ++# An option may have a 'depends on' line, indicating which other options + # must also be enabled if this option is. At present, EGLIBC doesn't + # check that these dependencies are satisfied. + # +@@ -41,9 +41,9 @@ + # although this simply reestablishes the value already set by + # 'option-groups.defaults'. + +-config OPTION_EGLIBC_ADVANCED_INET6 ++config EGLIBC_ADVANCED_INET6 + bool "IPv6 Advanced Sockets API support (RFC3542)" +- depends OPTION_EGLIBC_INET ++ depends on EGLIBC_INET + help + This option group includes the functions specified by RFC 3542, + "Advanced Sockets Application Program Interface (API) for +@@ -71,7 +71,7 @@ config OPTION_EGLIBC_ADVANCED_INET6 + inet6_rth_segments + inet6_rth_space + +-config OPTION_EGLIBC_BACKTRACE ++config EGLIBC_BACKTRACE + bool "Functions for producing backtraces" + help + This option group includes functions for producing a list of +@@ -85,7 +85,7 @@ config OPTION_EGLIBC_BACKTRACE + backtrace_symbols + backtrace_symbols_fd + +-config OPTION_EGLIBC_BIG_MACROS ++config EGLIBC_BIG_MACROS + bool "Use extensive inline code" + help + This option group specifies whether certain pieces of code +@@ -93,7 +93,7 @@ config OPTION_EGLIBC_BIG_MACROS + group is not selected, function calls will be used instead, + hence reducing the library footprint. + +-config OPTION_EGLIBC_BSD ++config EGLIBC_BSD + bool "BSD-specific functions, and their compatibility stubs" + help + This option group includes functions specific to BSD kernels. +@@ -109,10 +109,9 @@ config OPTION_EGLIBC_BSD + revoke + setlogin + +-config OPTION_EGLIBC_CXX_TESTS ++config EGLIBC_CXX_TESTS + bool "Tests that link against the standard C++ library." +- depends OPTION_POSIX_WIDE_CHAR_DEVICE_IO +- depends OPTION_EGLIBC_LIBM ++ depends on POSIX_WIDE_CHAR_DEVICE_IO && EGLIBC_LIBM + help + This option group does not include any C library functions; + instead, it controls which EGLIBC tests an ordinary 'make +@@ -121,23 +120,22 @@ config OPTION_EGLIBC_CXX_TESTS + run. + + The standard C++ library depends on the math library 'libm' and +- the wide character I/O functions included in EGLIBC. If those +- option groups are disabled, this test must also be disabled. ++ the wide character I/O functions included in EGLIBC. So those ++ option groups must be enabled if this test is enabled. + +-config OPTION_EGLIBC_CATGETS ++config EGLIBC_CATGETS + bool "Functions for accessing message catalogs" +- depends OPTION_EGLIBC_LOCALE_CODE ++ depends on EGLIBC_LOCALE_CODE + help + This option group includes functions for accessing message + catalogs: catopen, catclose, and catgets. + +- This option group depends on the OPTION_EGLIBC_LOCALE_CODE +- option group; if you disable that, you must also disable this. ++ This option group depends on the EGLIBC_LOCALE_CODE ++ option group. + +-config OPTION_EGLIBC_CHARSETS ++config EGLIBC_CHARSETS + bool "iconv/gconv character set conversion libraries" + help +- + This option group includes support for character sets other + than ASCII (ANSI_X3.4-1968) and Unicode and ISO-10646 in their + various encodings. This affects both the character sets +@@ -198,16 +196,16 @@ config OPTION_EGLIBC_CHARSETS + WCHAR_T - EGLIBC's internal form (target-endian, + 32-bit ISO 10646) + +-config OPTION_EGLIBC_CRYPT ++config EGLIBC_CRYPT + bool "Encryption library" + help + This option group includes the `libcrypt' library which + provides functions for one-way encryption. Supported + encryption algorithms include MD5, SHA-256, SHA-512 and DES. + +-config OPTION_EGLIBC_CRYPT_UFC ++config EGLIBC_CRYPT_UFC + bool "Ultra fast `crypt' implementation" +- depends OPTION_EGLIBC_CRYPT ++ depends on EGLIBC_CRYPT + help + This option group provides ultra fast DES-based implementation of + the `crypt' function. When this option group is disabled, +@@ -216,7 +214,7 @@ config OPTION_EGLIBC_CRYPT_UFC + errno to ENOSYS if /salt/ passed does not correspond to either MD5, + SHA-256 or SHA-512 algorithm. + +-config OPTION_EGLIBC_DB_ALIASES ++config EGLIBC_DB_ALIASES + bool "Functions for accessing the mail aliases database" + help + This option group includues functions for looking up mail +@@ -233,7 +231,7 @@ config OPTION_EGLIBC_DB_ALIASES + When this option group is disabled, the NSS service libraries + also lack support for querying their mail alias tables. + +-config OPTION_EGLIBC_ENVZ ++config EGLIBC_ENVZ + bool "Functions for handling envz-style environment vectors." + help + This option group contains functions for creating and operating +@@ -248,7 +246,7 @@ config OPTION_EGLIBC_ENVZ + envz_entry envz_remove + envz_get envz_strip + +-config OPTION_EGLIBC_FCVT ++config EGLIBC_FCVT + bool "Functions for converting floating-point numbers to strings" + help + This option group includes functions for converting +@@ -262,14 +260,14 @@ config OPTION_EGLIBC_FCVT + fcvt_r qfcvt_r + gcvt qgcvt + +-config OPTION_EGLIBC_FMTMSG ++config EGLIBC_FMTMSG + bool "Functions for formatting messages" + help + This option group includes the following functions: + + addseverity fmtmsg + +-config OPTION_EGLIBC_FSTAB ++config EGLIBC_FSTAB + bool "Access functions for 'fstab'" + help + This option group includes functions for reading the mount +@@ -283,7 +281,7 @@ config OPTION_EGLIBC_FSTAB + getfsent setfsent + getfsfile + +-config OPTION_EGLIBC_FTRAVERSE ++config EGLIBC_FTRAVERSE + bool "Functions for traversing file hierarchies" + help + This option group includes functions for traversing file +@@ -297,9 +295,9 @@ config OPTION_EGLIBC_FTRAVERSE + fts_set nftw64 + fts_close + +-config OPTION_EGLIBC_GETLOGIN ++config EGLIBC_GETLOGIN + bool "The getlogin function" +- depends OPTION_EGLIBC_UTMP ++ depends on EGLIBC_UTMP + help + This function group includes the 'getlogin' and 'getlogin_r' + functions, which return the user name associated by the login +@@ -309,17 +307,17 @@ config OPTION_EGLIBC_GETLOGIN + fall back on 'getlogin' to find the user's login name for tilde + expansion when the 'HOME' environment variable is not set. + +-config OPTION_EGLIBC_IDN ++config EGLIBC_IDN + bool "International domain names support" + help + This option group includes the `libcidn' library which + provides support for international domain names. + +-config OPTION_EGLIBC_INET ++config EGLIBC_INET + bool "Networking support" + help + This option group includes networking-specific functions and +- data. With OPTION_EGLIBC_INET disabled, the EGLIBC ++ data. With EGLIBC_INET disabled, the EGLIBC + installation and API changes as follows: + + - The following libraries are not installed: +@@ -439,14 +437,14 @@ config OPTION_EGLIBC_INET + use Unix-domain sockets to communicate with the syslog daemon; + syslog is valuable in non-networked contexts. + +-config OPTION_EGLIBC_INET_ANL ++config EGLIBC_INET_ANL + bool "Asynchronous name lookup" +- depends OPTION_EGLIBC_INET ++ depends on EGLIBC_INET + help + This option group includes the `libanl' library which + provides support for asynchronous name lookup. + +-config OPTION_EGLIBC_LIBM ++config EGLIBC_LIBM + bool "libm (math library)" + help + This option group includes the 'libm' library, containing +@@ -464,7 +462,7 @@ config OPTION_EGLIBC_LIBM + group, you will not be able to build 'libstdc++' against the + resulting EGLIBC installation. + +-config OPTION_EGLIBC_LOCALES ++config EGLIBC_LOCALES + bool "Locale definitions" + help + This option group includes all locale definitions other than +@@ -472,17 +470,17 @@ config OPTION_EGLIBC_LOCALES + only the "C" locale is supported. + + +-config OPTION_EGLIBC_LOCALE_CODE ++config EGLIBC_LOCALE_CODE + bool "Locale functions" +- depends OPTION_POSIX_C_LANG_WIDE_CHAR ++ depends on POSIX_C_LANG_WIDE_CHAR + help + This option group includes locale support functions, programs, +- and libraries. With OPTION_EGLIBC_LOCALE_FUNCTIONS disabled, ++ and libraries. With EGLIBC_LOCALE_CODE disabled, + EGLIBC supports only the 'C' locale (also known as 'POSIX'), + and ignores the settings of the 'LANG' and 'LC_*' environment + variables. + +- With OPTION_EGLIBC_LOCALE_CODE disabled, the following ++ With EGLIBC_LOCALE_CODE disabled, the following + functions are omitted from libc: + + duplocale localeconv nl_langinfo rpmatch strfmon_l +@@ -491,46 +489,43 @@ config OPTION_EGLIBC_LOCALE_CODE + Furthermore, only the LC_CTYPE and LC_TIME categories of the + standard "C" locale are available. + +- The OPTION_EGLIBC_CATGETS option group depends on this option +- group; if you disable OPTION_EGLIBC_LOCALE_CODE, you must also +- disable OPTION_EGLIBC_CATGETS. ++ The EGLIBC_CATGETS option group depends on this option group. ++ + +-config OPTION_EGLIBC_MEMUSAGE ++config EGLIBC_MEMUSAGE + bool "Memory profiling library" + help + This option group includes the `libmemusage' library and + the `memusage' and `memusagestat' utilities. + These components provide memory profiling functions. + +- OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE ++ EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE + + Libmemusage library buffers the profiling data in memory + before writing it out to disk. By default, the library + allocates 1.5M buffer, which can be substantial for some +- systems. OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE option ++ systems. EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE option + allows to change the default buffer size. It specifies + the number of entries the buffer should have. + On most architectures one buffer entry amounts to 48 bytes, + so setting this option to the value of 512 will reduce the size of + the memory buffer to 24K. + +-config OPTION_EGLIBC_NIS ++config EGLIBC_NIS + bool "Support for NIS, NIS+, and the special 'compat' services." +- depends OPTION_EGLIBC_INET +- depends OPTION_EGLIBC_SUNRPC ++ depends on EGLIBC_INET && EGLIBC_SUNRPC + help + This option group includes the NIS, NIS+, and 'compat' Name + Service Switch service libraries. When it is disabled, those + services libraries are not installed; you should remove any + references to them from your 'nsswitch.conf' file. + +- This option group depends on the OPTION_EGLIBC_INET option ++ This option group depends on the EGLIBC_INET option + group; you must enable that to enable this option group. + +-config OPTION_EGLIBC_NSSWITCH ++config EGLIBC_NSSWITCH + bool "Name service switch (nsswitch) support" + help +- + This option group includes support for the 'nsswitch' facility. + With this option group enabled, all EGLIBC functions for + accessing various system databases (passwords and groups; +@@ -544,12 +539,12 @@ config OPTION_EGLIBC_NSSWITCH + 'option-groups.config' file must set the following two + variables: + +- OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG ++ EGLIBC_NSSWITCH_FIXED_CONFIG + + Set this to the name of a file whose contents observe the + same syntax as an ordinary '/etc/nsswitch.conf' file. The + EGLIBC build process parses this file just as EGLIBC would +- at run time if OPTION_EGLIBC_NSSWITCH were enabled, and ++ at run time if EGLIBC_NSSWITCH were enabled, and + produces a C library that uses the nsswitch service + libraries to search for database entries as this file + specifies, instead of consulting '/etc/nsswitch.conf' at run +@@ -567,7 +562,7 @@ config OPTION_EGLIBC_NSSWITCH + you will probably want to delete references to databases not + needed on your system. + +- OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS ++ EGLIBC_NSSWITCH_FIXED_FUNCTIONS + + The EGLIBC build process uses this file to decide which + functions to make available from which service libraries. +@@ -585,28 +580,28 @@ config OPTION_EGLIBC_NSSWITCH + Be sure to mention each function in each service you wish to + use. If you do not mention a service's function here, the + EGLIBC database access functions will not find it, even if +- it is listed in the OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG ++ it is listed in the EGLIBC_NSSWITCH_FIXED_CONFIG + file. + +- In this arrangement, EGLIBC will not use the 'dlopen' and +- 'dlsym' functions to find database access functions. Instead, +- libc hard-codes references to the service libraries' database +- access functions. You must explicitly link your program +- against the name service libraries (those whose names start +- with 'libnss_', in the sysroot's '/lib' directory) whose +- functions you intend to use. This arrangement helps +- system-wide static analysis tools decide which functions a +- system actually uses. +- +- Note that some nsswitch service libraries require other option +- groups to be enabled; for example, the OPTION_EGLIBC_INET +- option group must be enabled to use the 'libnss_dns.so.2' +- service library, which uses the Domain Name System network +- protocol to answer queries. ++ In this arrangement, EGLIBC will not use the 'dlopen' and ++ 'dlsym' functions to find database access functions. Instead, ++ libc hard-codes references to the service libraries' database ++ access functions. You must explicitly link your program ++ against the name service libraries (those whose names start ++ with 'libnss_', in the sysroot's '/lib' directory) whose ++ functions you intend to use. This arrangement helps ++ system-wide static analysis tools decide which functions a ++ system actually uses. ++ ++ Note that some nsswitch service libraries require other option ++ groups to be enabled; for example, the EGLIBC_INET ++ option group must be enabled to use the 'libnss_dns.so.2' ++ service library, which uses the Domain Name System network ++ protocol to answer queries. + +-config OPTION_EGLIBC_RCMD ++config EGLIBC_RCMD + bool "Support for 'rcmd' and related library functions" +- depends OPTION_EGLIBC_INET ++ depends on EGLIBC_INET + help + This option group includes functions for running commands on + remote machines via the 'rsh' protocol, and doing authentication +@@ -622,7 +617,7 @@ config OPTION_EGLIBC_RCMD + rresvport ruserpass + rresvport_af + +-config OPTION_EGLIBC_RTLD_DEBUG ++config EGLIBC_RTLD_DEBUG + bool "Runtime linker debug print outs" + help + This option group enables debug output of the runtime linker +@@ -633,7 +628,7 @@ config OPTION_EGLIBC_RTLD_DEBUG + the `ldd' utility which may also be used by the prelinker. + In particular, the `--unused' ldd option will not work correctly. + +-config OPTION_EGLIBC_SPAWN ++config EGLIBC_SPAWN + bool "Support for POSIX posix_spawn functions" + help + This option group includes the POSIX functions for executing +@@ -669,7 +664,7 @@ config OPTION_EGLIBC_SPAWN + disabled, those programs will only operate on uncompressed + charmap files. + +-config OPTION_EGLIBC_STREAMS ++config EGLIBC_STREAMS + bool "Support for accessing STREAMS." + help + This option group includes functions for reading and writing +@@ -685,14 +680,14 @@ config OPTION_EGLIBC_STREAMS + isastream fdetach + putmsg + +-config OPTION_EGLIBC_SUNRPC ++config EGLIBC_SUNRPC + bool "Support for the Sun 'RPC' protocol." +- depends OPTION_EGLIBC_INET ++ depends on EGLIBC_INET + help + This option group includes support for the Sun RPC protocols, + including the 'rpcgen' and 'rpcinfo' programs. + +-config OPTION_EGLIBC_UTMP ++config EGLIBC_UTMP + bool "Older access functions for 'utmp' login records" + help + This option group includes the older 'utent' family of +@@ -719,9 +714,9 @@ config OPTION_EGLIBC_UTMP + + libutil.so (and libutil.a) + +-config OPTION_EGLIBC_UTMPX ++config EGLIBC_UTMPX + bool "POSIX access functions for 'utmp' login records" +- depends OPTION_EGLIBC_UTMP ++ depends on EGLIBC_UTMP + help + This option group includes the POSIX functions for reading and + writing user login records in the 'utmp' file (usually +@@ -742,21 +737,21 @@ config OPTION_EGLIBC_UTMPX + updwtmpx + utmpxname + +-config OPTION_EGLIBC_WORDEXP ++config EGLIBC_WORDEXP + bool "Shell-style word expansion" + help + This option group includes the 'wordexp' function for + performing word expansion in the manner of the shell, and the + accompanying 'wordfree' function. + +-config OPTION_POSIX_C_LANG_WIDE_CHAR ++config POSIX_C_LANG_WIDE_CHAR + bool "ISO C library wide character functions, excluding I/O" + help + This option group includes the functions defined by the ISO C + standard for working with wide and multibyte characters in + memory. Functions for reading and writing wide and multibyte + characters from and to files call in the +- OPTION_POSIX_WIDE_CHAR_DEVICE_IO option group. ++ POSIX_WIDE_CHAR_DEVICE_IO option group. + + This option group includes the following functions: + +@@ -778,14 +773,14 @@ config OPTION_POSIX_C_LANG_WIDE_CHAR + mbrlen wcscoll wcstol + mbrtowc wcscpy wcstold + +-config OPTION_POSIX_REGEXP ++config POSIX_REGEXP + bool "Regular expressions" + help + This option group includes the POSIX regular expression + functions, and the associated non-POSIX extensions and + compatibility functions. + +- With OPTION_POSIX_REGEXP disabled, the following functions are ++ With POSIX_REGEXP disabled, the following functions are + omitted from libc: + + re_comp re_max_failures regcomp +@@ -799,9 +794,9 @@ config OPTION_POSIX_REGEXP + header file, 'compile', 'step', and 'advance', is + omitted. + +-config OPTION_POSIX_REGEXP_GLIBC ++config POSIX_REGEXP_GLIBC + bool "Regular expressions from GLIBC" +- depends OPTION_POSIX_REGEXP ++ depends on POSIX_REGEXP + help + This option group specifies which regular expression + library to use. The choice is between regex +@@ -810,9 +805,9 @@ config OPTION_POSIX_REGEXP_GLIBC + optimized for speed; regex from libiberty is more than twice + as small while still is enough for most practical purposes. + +-config OPTION_POSIX_WIDE_CHAR_DEVICE_IO ++config POSIX_WIDE_CHAR_DEVICE_IO + bool "Input and output functions for wide characters" +- depends OPTION_POSIX_C_LANG_WIDE_CHAR ++ depends on POSIX_C_LANG_WIDE_CHAR + help + This option group includes functions for reading and writing + wide characters to and from streams. +Index: libc/Makefile +=================================================================== +--- libc.orig/Makefile ++++ libc/Makefile +@@ -24,6 +24,7 @@ endif + + include Makeconfig + ++include options-config/Makefile + + # This is the default target; it makes everything except the tests. + .PHONY: all +Index: libc/configure +=================================================================== +--- libc.orig/configure ++++ libc/configure +@@ -621,6 +621,7 @@ KSH + libc_cv_have_bash2 + BASH_SHELL + libc_cv_gcc_static_libgcc ++KCONFIG_TOOLS + CXX_SYSINCLUDES + SYSINCLUDES + AUTOCONF +@@ -734,6 +735,7 @@ with_fp + with_binutils + with_selinux + with_headers ++with_kconfig + with_default_link + enable_sanity_checks + enable_shared +@@ -1438,6 +1440,9 @@ Optional Packages: + --with-selinux if building with SELinux support + --with-headers=PATH location of system headers to use (for example + /usr/src/linux/include) [default=compiler default] ++ --with-kconfig=PATH location of kconfig tools to use (from Linux kernel ++ builds) to re-use for configuring EGLIBC option ++ groups + --with-default-link do not use explicit linker scripts + --with-cpu=CPU select code for CPU variant + +@@ -3401,6 +3406,14 @@ fi + + + ++# Check whether --with-kconfig was given. ++if test "${with_kconfig+set}" = set; then ++ withval=$with_kconfig; KCONFIG_TOOLS=$withval ++else ++ KCONFIG_TOOLS='' ++fi ++ ++ + + # Check whether --with-default-link was given. + if test "${with_default_link+set}" = set; then : +Index: libc/EGLIBC.option-groups +=================================================================== +--- libc.orig/EGLIBC.option-groups ++++ libc/EGLIBC.option-groups +@@ -56,33 +56,9 @@ disable option groups one by one, until + + The Option Groups + +-EGLIBC currently implements the following option groups, also +-documented in the file 'option-groups.def': +- +-OPTION_EGLIBC_CATGETS +- This option group includes functions for accessing message +- catalogs: catopen, catclose, and catgets. +- +-OPTION_EGLIBC_LOCALES +- This option group includes all locale definitions other than +- those for the "C" locale. If this option group is omitted, then +- only the "C" locale is supported. +- +-OPTION_EGLIBC_LIBM +- This option group includes the 'libm' library, containing +- mathematical functions. If this option group is omitted, then +- an EGLIBC installation does not include shared or unshared versions +- of the math library. +- +- Note that this does not remove all floating-point related +- functionality from EGLIBC; for example, 'printf' and 'scanf' +- can still print and read floating-point values with this option +- group disabled. +- +- Note that the ISO Standard C++ library 'libstdc++' depends on +- EGLIBC's math library 'libm'. If you disable this option +- group, you will not be able to build 'libstdc++' against the +- resulting EGLIBC installation. ++To see the current full list of implemented option groups, refer to the ++file 'option-groups.def' at the top of the source tree, or run ++'make menuconfig' from the top-level build directory. + + The POSIX.1-2001 specification includes a suggested partition of all + the functions in the POSIX C API into option groups: math functions +@@ -110,6 +86,18 @@ data, but include mathematical functions + OPTION_EGLIBC_LOCALES = n + OPTION_EGLIBC_LIBM = y + ++Like the Linux kernel, EGLIBC supports a similar set of '*config' make ++targets to make it easier to create 'option-groups.config', with all ++dependencies between option groups automatically satisfied. Run ++'make help' to see the list of supported make config targets. For ++example, 'make menuconfig' will update the current config utilising a ++menu based program. ++ ++The option group names and their type (boolean, int, hex, string), help ++description, and dependencies with other option groups, are described by ++'option-groups.def' at the top of the source tree, analogous to the ++'Kconfig' files in the Linux kernel. ++ + In general, each option group variable controls whether a given set of + object files in EGLIBC is compiled and included in the final + libraries, or omitted from the build. +@@ -132,22 +120,3 @@ under development. + + We have used the system to subset some portions of EGLIBC's + functionality. It needs to be extended to cover more of the library. +- +-At the moment, EGLIBC performs no sanity checks on the contents of +-'option-groups.config'; if an option group's name is mistyped, the +-option group is silently included in the build. EGLIBC should check +-that all variables set in 'option-groups.config' are proper option +-group names, and that their values are appropriate. +- +-Some portions of EGLIBC depend on others; for example, the Sun Remote +-Procedure Call functions in 'sunrpc' depend on the networking +-functions in 'inet'. The sanity checking described above should check +-that the selection configuration satisfies dependencies within EGLIBC, +-and produce a legible error message if it does not. At the moment, +-inconsistent configurations produce link errors late in the build +-process. +- +-The Linux kernel's configuration system provides interactive +-interfaces for creating and modifying configuration files (which also +-perform the sanity checking and dependency tracking described above). +-EGLIBC should provide similar interfaces. diff --git a/meta/recipes-core/eglibc/eglibc-2.19/0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch b/meta/recipes-core/eglibc/eglibc-2.19/0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch new file mode 100644 index 0000000000..a8463ea915 --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-2.19/0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch @@ -0,0 +1,36 @@ +From 713d822908d1b2ae8403af7f9375c7054ed3dd49 Mon Sep 17 00:00:00 2001 +From: Ting Liu +Date: Wed, 19 Dec 2012 04:39:57 -0600 +Subject: [PATCH] eglibc: run libm-err-tab.pl with specific dirs in ${S} + +libm-err-tab.pl will parse all the files named "libm-test-ulps" +in the given dir recursively. To avoid parsing the one in +${S}/.pc/ (it does exist after eglibc adds aarch64 support, +${S}/.pc/aarch64-0001-glibc-fsf-v1-eaf6f205.patch/ports/sysdeps/ +aarch64/libm-test-ulps), run libm-err-tab.pl with specific dirs +in ${S}. + +Upstream-Status: inappropriate [OE specific] + +Signed-off-by: Ting Liu +--- + manual/Makefile | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/manual/Makefile b/manual/Makefile +index 6fddff0..7af242e 100644 +--- a/manual/Makefile ++++ b/manual/Makefile +@@ -109,7 +109,8 @@ $(objpfx)libm-err.texi: $(objpfx)stamp-libm-err + $(objpfx)stamp-libm-err: libm-err-tab.pl $(wildcard $(foreach dir,$(sysdirs),\ + $(dir)/libm-test-ulps)) + pwd=`pwd`; \ +- $(PERL) $< $$pwd/.. > $(objpfx)libm-err-tmp ++ $(PERL) $< $$pwd/../ports > $(objpfx)libm-err-tmp ++ $(PERL) $< $$pwd/../sysdeps >> $(objpfx)libm-err-tmp + $(move-if-change) $(objpfx)libm-err-tmp $(objpfx)libm-err.texi + touch $@ + +-- +1.7.9.7 + diff --git a/meta/recipes-core/eglibc/eglibc-2.19/0002-eglibc-menuconfig-hex-string-options.patch b/meta/recipes-core/eglibc/eglibc-2.19/0002-eglibc-menuconfig-hex-string-options.patch new file mode 100644 index 0000000000..7caba48112 --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-2.19/0002-eglibc-menuconfig-hex-string-options.patch @@ -0,0 +1,169 @@ +pulled from + +http://www.eglibc.org/archives/patches/msg01043.html + + +Upstream-Status: Pending +Signed-off-by: Khem + + +This patch builds on the menuconfig patch for EGLIBC. + + +There are a few options that have non-boolean types, that would benefit from the new 'make *config' support: + +EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE (int) +EGLIBC_NSSWITCH_FIXED_CONFIG (string) +EGLIBC_NSSWITCH_FIXED_FUNCTIONS (string) + + +The patch converts these to real options in libc/option-groups.def. Also, libc/scripts/option-groups.awk is modified to output a '#define' line for int, hex, or string options encountered in the config file. + +In the post-processing script config-postproc.pl, a small change is needed: for any boolean option FOO that is implicitly disabled in the kconfig output, make sure that option is indeed a boolean before printing the explicit OPTION_FOO=n. + +Finally, libc/malloc/Makefile passes __OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE as a CPPFLAGS, which is not necessary anymore because this macro will now be present in the generated header. + +attached is the updated patch to address above issues. + +Steve + +-- +Steve Longerbeam | Senior Embedded Engineer, ESD Services +Mentor Embedded(tm) | 46871 Bayside Parkway, Fremont, CA 94538 +P 510.354.5838 | M 408.410.2735 +Nucleus(r) | Linux(r) | Android(tm) | Services | UI | Multi-OS + + +Index: libc/malloc/Makefile +=================================================================== +--- libc.orig/malloc/Makefile 2012-01-04 22:06:18.000000000 -0800 ++++ libc/malloc/Makefile 2012-05-09 19:35:28.598682105 -0700 +@@ -48,10 +48,6 @@ + ifeq ($(OPTION_EGLIBC_MEMUSAGE),y) + extra-libs = libmemusage + extra-libs-others = $(extra-libs) +- +-ifdef OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE +-CPPFLAGS-memusage += -D__OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE=$(OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE) +-endif + endif + + libmemusage-routines = memusage +Index: libc/option-groups.def +=================================================================== +--- libc.orig/option-groups.def 2012-05-09 19:33:48.398677256 -0700 ++++ libc/option-groups.def 2012-05-09 19:35:28.610682107 -0700 +@@ -513,8 +513,11 @@ + the `memusage' and `memusagestat' utilities. + These components provide memory profiling functions. + +- EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE +- ++config EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE ++ int "Memory profiling library buffer size" ++ depends on EGLIBC_MEMUSAGE ++ default "32768" ++ help + Libmemusage library buffers the profiling data in memory + before writing it out to disk. By default, the library + allocates 1.5M buffer, which can be substantial for some +@@ -553,8 +556,11 @@ + 'option-groups.config' file must set the following two + variables: + +- EGLIBC_NSSWITCH_FIXED_CONFIG +- ++config EGLIBC_NSSWITCH_FIXED_CONFIG ++ string "Nsswitch fixed config filename" ++ depends on !EGLIBC_NSSWITCH ++ default "" ++ help + Set this to the name of a file whose contents observe the + same syntax as an ordinary '/etc/nsswitch.conf' file. The + EGLIBC build process parses this file just as EGLIBC would +@@ -576,8 +582,11 @@ + you will probably want to delete references to databases not + needed on your system. + +- EGLIBC_NSSWITCH_FIXED_FUNCTIONS +- ++config EGLIBC_NSSWITCH_FIXED_FUNCTIONS ++ string "Nsswitch fixed functions filename" ++ depends on !EGLIBC_NSSWITCH ++ default "" ++ help + The EGLIBC build process uses this file to decide which + functions to make available from which service libraries. + The file 'nss/fixed-nsswitch.functions' serves as a sample +Index: libc/options-config/config-postproc.pl +=================================================================== +--- libc.orig/options-config/config-postproc.pl 2012-05-09 19:33:36.530676681 -0700 ++++ libc/options-config/config-postproc.pl 2012-05-09 19:35:28.610682107 -0700 +@@ -8,7 +8,7 @@ + die "Could not open $ARGV[0]" unless -T $ARGV[0]; + + sub yank { +- @option = grep($_ ne $_[0], @option); ++ @option = grep(!($_ =~ /$_[0]\s*=/), @option); + } + + open(DEFAULTS, $defaults) || die "Could not open $defaults\n"; +@@ -16,7 +16,7 @@ + # get the full list of available options using the default config file + $i = 0; + while () { +- if (/^\s*OPTION_(\w+)\s*=/) { ++ if (/^\s*OPTION_(\w+\s*=.*$)/) { + $option[$i++] = $1; + } + } +@@ -35,8 +35,9 @@ + s/CONFIG_/OPTION_/g; + print; + } elsif (/^\s*#\s+CONFIG_(\w+) is not set/) { +- # this is a comment line, change CONFIG_ to OPTION_, remove this +- # option from option list, and convert to explicit OPTION_FOO=n ++ # this is a comment line for an unset boolean option, change CONFIG_ ++ # to OPTION_, remove this option from option list, and convert to ++ # explicit OPTION_FOO=n + $opt = $1; + yank($opt); + s/CONFIG_/OPTION_/g; +@@ -46,9 +47,12 @@ + } + } + +-# any options left in @options, are options that were not mentioned in ++# any boolean options left in @options, are options that were not mentioned in + # the config file, and implicitly that means the option must be set =n, + # so do that here. + foreach $opt (@option) { +- print "OPTION_$opt=n\n"; ++ if ($opt =~ /=\s*[yn]/) { ++ $opt =~ s/=\s*[yn]/=n/; ++ print "OPTION_$opt\n"; ++ } + } +Index: libc/scripts/option-groups.awk +=================================================================== +--- libc.orig/scripts/option-groups.awk 2012-01-04 22:06:00.000000000 -0800 ++++ libc/scripts/option-groups.awk 2012-05-09 19:35:28.610682107 -0700 +@@ -46,9 +46,15 @@ + print "#define __" var " 1" + else if (vars[var] == "n") + print "/* #undef __" var " */" +- # Ignore variables that don't have boolean values. +- # Ideally, this would be driven by the types given in +- # option-groups.def. ++ else if (vars[var] ~ /^[0-9]+/ || ++ vars[var] ~ /^0x[0-9aAbBcCdDeEfF]+/ || ++ vars[var] ~ /^\"/) ++ print "#define __" var " " vars[var] ++ else ++ print "/* #undef __" var " */" ++ # Ignore variables that don't have boolean, int, hex, or ++ # string values. Ideally, this would be driven by the types ++ # given in option-groups.def. + } + } + diff --git a/meta/recipes-core/eglibc/eglibc-2.19/0003-eglibc-menuconfig-build-instructions.patch b/meta/recipes-core/eglibc/eglibc-2.19/0003-eglibc-menuconfig-build-instructions.patch new file mode 100644 index 0000000000..d137f5b318 --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-2.19/0003-eglibc-menuconfig-build-instructions.patch @@ -0,0 +1,176 @@ +Pulled from + +http://www.eglibc.org/archives/patches/msg01035.html + +Upstream-Status: Pending +Signed-off-by: Khem + +As part of the menuconfig development, I encountered some outdated information in the cross-build instructions, libc/EGLIBC.cross-building. This patch updates the file with new (and tested) instructions. It is unrelated to the menuconfig support, but applies after. + +My testing was done with an ARM target, and an x86_64 Linux host, so I converted the instructions to use those host/target types from the original i686/powerpc. Hope that's ok. + + +Thanks, + +-- +Steve Longerbeam | Senior Embedded Engineer, ESD Services +Mentor Embedded(tm) | 46871 Bayside Parkway, Fremont, CA 94538 +P 510.354.5838 | M 408.410.2735 +Nucleus(r) | Linux(r) | Android(tm) | Services | UI | Multi-OS + + + EGLIBC.cross-building | 59 +++++++++++++++++++++++++++++--------------------- + 1 file changed, 35 insertions(+), 24 deletions(-) + +Index: libc/EGLIBC.cross-building +=================================================================== +--- libc.orig/EGLIBC.cross-building 2012-05-09 19:33:36.522676681 -0700 ++++ libc/EGLIBC.cross-building 2012-05-09 19:36:13.918684298 -0700 +@@ -47,31 +47,34 @@ + EGLIBC requires recent versions of the GNU binutils, GCC, and the + Linux kernel. The web page + documents the current requirements, and lists patches needed for +-certain target architectures. As of this writing, EGLIBC required +-binutils 2.17, GCC 4.1, and Linux 2.6.19.1. ++certain target architectures. As of this writing, these build ++instructions have been tested with binutils 2.22.51, GCC 4.6.2, ++and Linux 3.1. + + First, let's set some variables, to simplify later commands. We'll +-build EGLIBC and GCC for a PowerPC target, known to the Linux kernel +-as 'powerpc', and we'll do the build on an Intel Linux box: ++build EGLIBC and GCC for an ARM target, known to the Linux kernel ++as 'arm', and we'll do the build on an Intel x86_64 Linux box: + +- $ build=i686-pc-linux-gnu ++ $ build=x86_64-pc-linux-gnu + $ host=$build +- $ target=powerpc-none-linux-gnu +- $ linux_arch=powerpc ++ $ target=arm-none-linux-gnueabi ++ $ linux_arch=arm + + We're using the aforementioned versions of Binutils, GCC, and Linux: + +- $ binutilsv=binutils-2.17 +- $ gccv=gcc-4.1.1 +- $ linuxv=linux-2.6.20 ++ $ binutilsv=binutils-2.22.51 ++ $ gccv=gcc-4.6.2 ++ $ linuxv=linux-3.1 + + We're carrying out the entire process under '~/cross-build', which +-contains unpacked source trees: ++contains unpacked source trees for binutils, gcc, and linux kernel, ++along with EGLIBC svn trunk (which can be checked-out with ++'svn co http://www.eglibc.org/svn/trunk eglibc'): + +- $ top=$HOME/cross-build/ppc ++ $ top=$HOME/cross-build/$target + $ src=$HOME/cross-build/src + $ ls $src +- binutils-2.17 gcc-4.1.1 libc linux-2.6.20 ++ binutils-2.22.51 eglibc gcc-4.6.2 linux-3.1 + + We're going to place our build directories in a subdirectory 'obj', + we'll install the cross-development toolchain in 'tools', and we'll +@@ -99,7 +102,7 @@ + + The First GCC + +-For our work, we need a cross-compiler targeting a PowerPC Linux ++For our work, we need a cross-compiler targeting an ARM Linux + system. However, that configuration includes the shared library + 'libgcc_s.so', which is compiled against the EGLIBC headers (which we + haven't installed yet) and linked against 'libc.so' (which we haven't +@@ -125,7 +128,8 @@ + > --prefix=$tools \ + > --without-headers --with-newlib \ + > --disable-shared --disable-threads --disable-libssp \ +- > --disable-libgomp --disable-libmudflap \ ++ > --disable-libgomp --disable-libmudflap --disable-libquadmath \ ++ > --disable-decimal-float --disable-libffi \ + > --enable-languages=c + $ PATH=$tools/bin:$PATH make + $ PATH=$tools/bin:$PATH make install +@@ -162,12 +166,13 @@ + > CXX=$tools/bin/$target-g++ \ + > AR=$tools/bin/$target-ar \ + > RANLIB=$tools/bin/$target-ranlib \ +- > $src/libc/configure \ ++ > $src/eglibc/libc/configure \ + > --prefix=/usr \ + > --with-headers=$sysroot/usr/include \ + > --build=$build \ + > --host=$target \ +- > --disable-profile --without-gd --without-cvs --enable-add-ons ++ > --disable-profile --without-gd --without-cvs \ ++ > --enable-add-ons=nptl,libidn,../ports + + The option '--prefix=/usr' may look strange, but you should never + configure EGLIBC with a prefix other than '/usr': in various places, +@@ -181,6 +186,11 @@ + The '--with-headers' option tells EGLIBC where the Linux headers have + been installed. + ++The '--enable-add-ons=nptl,libidn,../ports' option tells EGLIBC to look ++for the listed glibc add-ons. Most notably the ports add-on (located ++just above the libc sources in the EGLIBC svn tree) is required to ++support ARM targets. ++ + We can now use the 'install-headers' makefile target to install the + headers: + +@@ -223,6 +233,7 @@ + > --prefix=$tools \ + > --with-sysroot=$sysroot \ + > --disable-libssp --disable-libgomp --disable-libmudflap \ ++ > --disable-libffi --disable-libquadmath \ + > --enable-languages=c + $ PATH=$tools/bin:$PATH make + $ PATH=$tools/bin:$PATH make install +@@ -240,13 +251,14 @@ + > CXX=$tools/bin/$target-g++ \ + > AR=$tools/bin/$target-ar \ + > RANLIB=$tools/bin/$target-ranlib \ +- > $src/libc/configure \ ++ > $src/eglibc/libc/configure \ + > --prefix=/usr \ + > --with-headers=$sysroot/usr/include \ + > --with-kconfig=$obj/linux/scripts/kconfig \ + > --build=$build \ + > --host=$target \ +- > --disable-profile --without-gd --without-cvs --enable-add-ons ++ > --disable-profile --without-gd --without-cvs \ ++ > --enable-add-ons=nptl,libidn,../ports + + Note the additional '--with-kconfig' option. This tells EGLIBC where to + find the host config tools used by the kernel 'make config' and 'make +@@ -337,15 +349,15 @@ + ELF Header: + ... + Type: EXEC (Executable file) +- Machine: PowerPC ++ Machine: ARM + + ... + Program Headers: + Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align + PHDR 0x000034 0x10000034 0x10000034 0x00100 0x00100 R E 0x4 +- INTERP 0x000134 0x10000134 0x10000134 0x0000d 0x0000d R 0x1 +- [Requesting program interpreter: /lib/ld.so.1] +- LOAD 0x000000 0x10000000 0x10000000 0x008f0 0x008f0 R E 0x10000 ++ INTERP 0x000134 0x00008134 0x00008134 0x00013 0x00013 R 0x1 ++ [Requesting program interpreter: /lib/ld-linux.so.3] ++ LOAD 0x000000 0x00008000 0x00008000 0x0042c 0x0042c R E 0x8000 + ... + + Looking at the dynamic section of the installed 'libgcc_s.so', we see +@@ -357,7 +369,6 @@ + Dynamic section at offset 0x1083c contains 24 entries: + Tag Type Name/Value + 0x00000001 (NEEDED) Shared library: [libc.so.6] +- 0x00000001 (NEEDED) Shared library: [ld.so.1] + 0x0000000e (SONAME) Library soname: [libgcc_s.so.1] + ... + diff --git a/meta/recipes-core/eglibc/eglibc-2.19/GLRO_dl_debug_mask.patch b/meta/recipes-core/eglibc/eglibc-2.19/GLRO_dl_debug_mask.patch new file mode 100644 index 0000000000..7258c82418 --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-2.19/GLRO_dl_debug_mask.patch @@ -0,0 +1,143 @@ +Its controlled by __OPTION_EGLIBC_RTLD_DEBUG +so we should use GLRO_dl_debug_mask + +Singed-off-by: Khem Raj + +Upstream-Status: Pending +Index: libc/elf/dl-open.c +=================================================================== +--- libc.orig/elf/dl-open.c 2012-10-25 10:18:12.000000000 -0700 ++++ libc/elf/dl-open.c 2013-01-09 11:49:02.635577870 -0800 +@@ -155,7 +155,7 @@ + ns->_ns_main_searchlist->r_list[new_nlist++] = map; + + /* We modify the global scope. Report this. */ +- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0)) ++ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SCOPES, 0)) + _dl_debug_printf ("\nadd %s [%lu] to global scope\n", + map->l_name, map->l_ns); + } +@@ -298,7 +298,7 @@ + LIBC_PROBE (map_complete, 3, args->nsid, r, new); + + /* Print scope information. */ +- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0)) ++ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SCOPES, 0)) + _dl_show_scope (new, 0); + + /* Only do lazy relocation if `LD_BIND_NOW' is not set. */ +@@ -515,7 +515,7 @@ + } + + /* Print scope information. */ +- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0)) ++ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SCOPES, 0)) + _dl_show_scope (imap, from_scope); + } + +Index: libc/ports/sysdeps/mips/dl-lookup.c +=================================================================== +--- libc.orig/ports/sysdeps/mips/dl-lookup.c 2012-08-17 12:39:53.000000000 -0700 ++++ libc/ports/sysdeps/mips/dl-lookup.c 2013-01-09 11:49:02.635577870 -0800 +@@ -111,7 +111,7 @@ + continue; + + /* Print some debugging info if wanted. */ +- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SYMBOLS, 0)) ++ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SYMBOLS, 0)) + _dl_debug_printf ("symbol=%s; lookup in file=%s [%lu]\n", + undef_name, + map->l_name[0] ? map->l_name : rtld_progname, +@@ -432,7 +432,7 @@ + hash table. */ + if (__builtin_expect (tab->size, 0)) + { +- assert (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK); ++ assert (GLRO_dl_debug_mask & DL_DEBUG_PRELINK); + __rtld_lock_unlock_recursive (tab->lock); + goto success; + } +@@ -681,7 +681,7 @@ + } + + /* Display information if we are debugging. */ +- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0)) ++ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_FILES, 0)) + _dl_debug_printf ("\ + \nfile=%s [%lu]; needed by %s [%lu] (relocation dependency)\n\n", + map->l_name[0] ? map->l_name : rtld_progname, +@@ -788,7 +788,7 @@ + { + if ((*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK) + && skip_map == NULL +- && !(GLRO(dl_debug_mask) & DL_DEBUG_UNUSED)) ++ && !(GLRO_dl_debug_mask & DL_DEBUG_UNUSED)) + { + /* We could find no value for a strong reference. */ + const char *reference_name = undef_map ? undef_map->l_name : ""; +@@ -861,7 +861,7 @@ + if (__builtin_expect (current_value.m->l_used == 0, 0)) + current_value.m->l_used = 1; + +- if (__builtin_expect (GLRO(dl_debug_mask) ++ if (__builtin_expect (GLRO_dl_debug_mask + & (DL_DEBUG_BINDINGS|DL_DEBUG_PRELINK), 0)) + _dl_debug_bindings (undef_name, undef_map, ref, + ¤t_value, version, type_class, protected); +@@ -926,7 +926,7 @@ + { + const char *reference_name = undef_map->l_name; + +- if (GLRO(dl_debug_mask) & DL_DEBUG_BINDINGS) ++ if (GLRO_dl_debug_mask & DL_DEBUG_BINDINGS) + { + _dl_debug_printf ("binding file %s [%lu] to %s [%lu]: %s symbol `%s'", + (reference_name[0] +@@ -942,7 +942,7 @@ + _dl_debug_printf_c ("\n"); + } + #ifdef SHARED +- if (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK) ++ if (GLRO_dl_debug_mask & DL_DEBUG_PRELINK) + { + int conflict = 0; + struct sym_val val = { NULL, NULL }; +Index: libc/elf/rtld.c +=================================================================== +--- libc.orig/elf/rtld.c 2012-10-10 08:35:46.000000000 -0700 ++++ libc/elf/rtld.c 2013-01-09 11:49:02.635577870 -0800 +@@ -2118,7 +2118,7 @@ + GLRO(dl_init_all_dirs) = GL(dl_all_dirs); + + /* Print scope information. */ +- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0)) ++ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SCOPES, 0)) + { + _dl_debug_printf ("\nInitial object scopes\n"); + +Index: libc/elf/dl-lookup.c +=================================================================== +--- libc.orig/elf/dl-lookup.c 2012-08-17 12:39:53.000000000 -0700 ++++ libc/elf/dl-lookup.c 2013-01-09 11:49:02.635577870 -0800 +@@ -771,7 +771,7 @@ + { + if ((*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK) + && skip_map == NULL +- && !(GLRO(dl_debug_mask) & DL_DEBUG_UNUSED)) ++ && !(GLRO_dl_debug_mask & DL_DEBUG_UNUSED)) + { + /* We could find no value for a strong reference. */ + const char *reference_name = undef_map ? undef_map->l_name : ""; +Index: libc/elf/get-dynamic-info.h +=================================================================== +--- libc.orig/elf/get-dynamic-info.h 2012-12-02 13:11:45.000000000 -0800 ++++ libc/elf/get-dynamic-info.h 2013-01-09 12:53:51.015657653 -0800 +@@ -157,7 +157,7 @@ + them. Therefore to avoid breaking existing applications the + best we can do is add a warning during debugging with the + intent of notifying the user of the problem. */ +- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0) ++ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_FILES, 0) + && l->l_flags_1 & ~DT_1_SUPPORTED_MASK) + _dl_debug_printf ("\nWARNING: Unsupported flag value(s) of 0x%x in DT_FLAGS_1.\n", + l->l_flags_1 & ~DT_1_SUPPORTED_MASK); diff --git a/meta/recipes-core/eglibc/eglibc-2.19/IO-acquire-lock-fix.patch b/meta/recipes-core/eglibc/eglibc-2.19/IO-acquire-lock-fix.patch new file mode 100644 index 0000000000..cf5803585c --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-2.19/IO-acquire-lock-fix.patch @@ -0,0 +1,17 @@ +import http://sourceware.org/ml/libc-ports/2007-12/msg00000.html + +Upstream-Status: Pending + +Index: libc/bits/stdio-lock.h +=================================================================== +--- libc.orig/bits/stdio-lock.h 2009-10-28 14:34:19.000000000 -0700 ++++ libc/bits/stdio-lock.h 2009-10-28 14:34:54.000000000 -0700 +@@ -50,6 +50,8 @@ __libc_lock_define_recursive (typedef, _ + _IO_cleanup_region_start ((void (*) (void *)) _IO_funlockfile, (_fp)); \ + _IO_flockfile (_fp) + ++# define _IO_acquire_lock_clear_flags2(_fp) _IO_acquire_lock (_fp) ++ + # define _IO_release_lock(_fp) \ + _IO_funlockfile (_fp); \ + _IO_cleanup_region_end (0) diff --git a/meta/recipes-core/eglibc/eglibc-2.19/add_resource_h_to_wait_h.patch b/meta/recipes-core/eglibc/eglibc-2.19/add_resource_h_to_wait_h.patch new file mode 100644 index 0000000000..f5023c08d4 --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-2.19/add_resource_h_to_wait_h.patch @@ -0,0 +1,20 @@ +The older versions of perf still require sys/resource.h to be +present in this header, the newer version of perf in 3.2 and +beyond directly include sys/resource.h + +Upstream-Status: Inapproriate [older kernel/perf specific] + +Signed-off-by: Saul Wold + +Index: libc/posix/sys/wait.h +=================================================================== +--- libc.orig/posix/sys/wait.h ++++ libc/posix/sys/wait.h +@@ -28,6 +28,7 @@ + __BEGIN_DECLS + + #include ++#include + + /* These macros could also be defined in . */ + #if !defined _STDLIB_H || (!defined __USE_XOPEN && !defined __USE_XOPEN2K8) diff --git a/meta/recipes-core/eglibc/eglibc-2.19/eglibc-svn-arm-lowlevellock-include-tls.patch b/meta/recipes-core/eglibc/eglibc-2.19/eglibc-svn-arm-lowlevellock-include-tls.patch new file mode 100644 index 0000000000..4313aa5197 --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-2.19/eglibc-svn-arm-lowlevellock-include-tls.patch @@ -0,0 +1,21 @@ +In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21: +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c: In function '__lll_lock_wait_private': +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: warning: implicit declaration of function 'THREAD_GETMEM' +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: 'THREAD_SELF' undeclared (first use in this function) +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: (Each undeclared identifier is reported only once +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: for each function it appears in.) +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: 'header' undeclared (first use in this function) +make[4]: *** [/var/tmp/portage/sys-libs/glibc-2.7-r1/work/build-default-armv4l-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os] Error 1 + +Upstream-Status: Pending + +--- libc/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h.orig ++++ libc/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + #define FUTEX_WAIT 0 + #define FUTEX_WAKE 1 diff --git a/meta/recipes-core/eglibc/eglibc-2.19/eglibc_fix_findidx_parameters.patch b/meta/recipes-core/eglibc/eglibc-2.19/eglibc_fix_findidx_parameters.patch new file mode 100644 index 0000000000..bbf4605505 --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-2.19/eglibc_fix_findidx_parameters.patch @@ -0,0 +1,38 @@ +Upstream-Status: backport + +Imported patch from: http://www.eglibc.org/archives/patches/msg01124.html + +Signed-Off-By: Nitin A Kamble +2012/05/09 + +Index: libc/posix/xregex.c +=================================================================== +--- libc.orig/posix/xregex.c ++++ libc/posix/xregex.c +@@ -2943,7 +2943,7 @@ PREFIX(regex_compile) (const char *ARG_P + _NL_CURRENT (LC_COLLATE, + _NL_COLLATE_INDIRECTWC); + +- idx = findidx ((const wint_t**)&cp); ++ idx = findidx ((const wint_t**)&cp, -1); + if (idx == 0 || cp < (wint_t*) str + c1) + /* This is no valid character. */ + FREE_STACK_RETURN (REG_ECOLLATE); +@@ -3392,7 +3392,7 @@ PREFIX(regex_compile) (const char *ARG_P + indirect = (const int32_t *) + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); + +- idx = findidx (&cp); ++ idx = findidx (&cp, -1); + if (idx == 0 || cp < str + c1) + /* This is no valid character. */ + FREE_STACK_RETURN (REG_ECOLLATE); +@@ -6363,7 +6363,7 @@ byte_re_match_2_internal (struct re_patt + } + str_buf[i] = TRANSLATE(*(d+i)); + str_buf[i+1] = '\0'; /* sentinel */ +- idx2 = findidx ((const wint_t**)&cp); ++ idx2 = findidx ((const wint_t**)&cp, -1); + } + + /* Update d, however d will be incremented at diff --git a/meta/recipes-core/eglibc/eglibc-2.19/etc/ld.so.conf b/meta/recipes-core/eglibc/eglibc-2.19/etc/ld.so.conf new file mode 100644 index 0000000000..e69de29bb2 diff --git a/meta/recipes-core/eglibc/eglibc-2.19/fileops-without-wchar-io.patch b/meta/recipes-core/eglibc/eglibc-2.19/fileops-without-wchar-io.patch new file mode 100644 index 0000000000..2ca0bca248 --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-2.19/fileops-without-wchar-io.patch @@ -0,0 +1,22 @@ +Fix error like + +/home/kraj/work/angstrom/sources/openembedded-core/build/tmp-eglibc/work/mips64-oe-linux/eglibc-2.16-r2+svnr19383/build-mips64-oe-linux/libc_pic.os: In function `_IO_new_file_fopen': +/home/kraj/work/angstrom/sources/openembedded-core/build/tmp-eglibc/work/mips64-oe-linux/eglibc-2.16-r2+svnr19383/eglibc-2_16/libc/libio/fileops.c:431: undefined reference to `_IO_file_close_it_internal' +collect2: error: ld returned 1 exit status + + +Signed-off-by: Khem Raj +Upstream-Status: Pending +Index: libc/libio/fileops.c +=================================================================== +--- libc.orig/libio/fileops.c 2012-07-04 18:25:47.000000000 -0700 ++++ libc/libio/fileops.c 2012-07-24 00:21:17.220322557 -0700 +@@ -428,7 +428,7 @@ + result->_mode = 1; + #else + /* Treat this as if we couldn't find the given character set. */ +- (void) INTUSE(_IO_file_close_it) (fp); ++ (void) _IO_file_close_it (fp); + __set_errno (EINVAL); + return NULL; + #endif diff --git a/meta/recipes-core/eglibc/eglibc-2.19/fix-tibetian-locales.patch b/meta/recipes-core/eglibc/eglibc-2.19/fix-tibetian-locales.patch new file mode 100644 index 0000000000..25c43a9fe6 --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-2.19/fix-tibetian-locales.patch @@ -0,0 +1,38 @@ +cross localedef fails to compile these locales because name_fmt field is empty +It is not acceptable for cross localedef and it errors out + +LC_NAME: field `name_fmt' not defined + +We therefore give a dummy string to the format, the real fix needs some native +tibetian person to define proper name_fmt + +Upstream-Status: Pending + +Signed-off-by: Khem Raj + +Index: libc/localedata/locales/bo_CN +=================================================================== +--- libc.orig/localedata/locales/bo_CN 2012-11-17 09:50:14.000000000 -0800 ++++ libc/localedata/locales/bo_CN 2013-01-04 08:55:15.593612288 -0800 +@@ -145,7 +145,7 @@ + LC_NAME + % FIXME + +-name_fmt "" ++name_fmt "FIXME" + % name_gen "FIXME" + % name_miss "FIXME" + % name_mr "FIXME" +Index: libc/localedata/locales/bo_IN +=================================================================== +--- libc.orig/localedata/locales/bo_IN 2012-11-17 09:50:14.000000000 -0800 ++++ libc/localedata/locales/bo_IN 2013-01-04 08:54:12.345609028 -0800 +@@ -70,7 +70,7 @@ + + LC_NAME + % FIXME +-name_fmt "" ++name_fmt "FIXME" + % name_gen "FIXME" + % name_miss "FIXME" + % name_mr "FIXME" diff --git a/meta/recipes-core/eglibc/eglibc-2.19/fix_for_centos_5.8.patch b/meta/recipes-core/eglibc/eglibc-2.19/fix_for_centos_5.8.patch new file mode 100644 index 0000000000..7618c99534 --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-2.19/fix_for_centos_5.8.patch @@ -0,0 +1,18 @@ +Upstream-Status: Inappropriate [other] + +This is a hack to fix building the locale bits on an older +CentOs 5.X machine + +Index: eglibc-2_16/libc/locale/programs/config.h +=================================================================== +--- eglibc-2_16.orig/libc/locale/programs/config.h ++++ eglibc-2_16/libc/locale/programs/config.h +@@ -19,6 +19,8 @@ + #ifndef _LD_CONFIG_H + #define _LD_CONFIG_H 1 + ++#define DUMMY_LOCALE_T ++ + /* Use the internal textdomain used for libc messages. */ + #define PACKAGE _libc_intl_domainname + #ifndef VERSION diff --git a/meta/recipes-core/eglibc/eglibc-2.19/fsl-ppc-no-fsqrt.patch b/meta/recipes-core/eglibc/eglibc-2.19/fsl-ppc-no-fsqrt.patch new file mode 100644 index 0000000000..511ee9d19e --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-2.19/fsl-ppc-no-fsqrt.patch @@ -0,0 +1,100 @@ +Create e5500 specific math_private.h and let it include when compiling for e5500/64bit core +We prefefine __CPU_HAS_FSQRT to 0 and then in general ppc64 math_private.h we check if its +already defined before redefining it. This way we can ensure that on e5500 builds it wont +emit fsqrt intructions + +-Khem + +Upstream-Status: Pending + +Index: libc/sysdeps/powerpc/fpu/math_private.h +=================================================================== +--- libc.orig/sysdeps/powerpc/fpu/math_private.h ++++ libc/sysdeps/powerpc/fpu/math_private.h +@@ -25,10 +25,12 @@ + #include + #include_next + +-# if __WORDSIZE == 64 || defined _ARCH_PWR4 +-# define __CPU_HAS_FSQRT 1 +-# else +-# define __CPU_HAS_FSQRT ((GLRO(dl_hwcap) & PPC_FEATURE_64) != 0) ++# ifndef __CPU_HAS_FSQRT ++# if __WORDSIZE == 64 || defined _ARCH_PWR4 ++# define __CPU_HAS_FSQRT 1 ++# else ++# define __CPU_HAS_FSQRT ((GLRO(dl_hwcap) & PPC_FEATURE_64) != 0) ++# endif + # endif + + extern double __slow_ieee754_sqrt (double); +Index: libc/ports/sysdeps/powerpc/powerpc64/e5500/fpu/math_private.h +=================================================================== +--- /dev/null ++++ libc/ports/sysdeps/powerpc/powerpc64/e5500/fpu/math_private.h +@@ -0,0 +1,9 @@ ++#ifndef _E5500_MATH_PRIVATE_H_ ++#define _E5500_MATH_PRIVATE_H_ 1 ++/* E5500 core FPU does not implement ++ fsqrt */ ++ ++#define __CPU_HAS_FSQRT 0 ++#include_next ++ ++#endif /* _E5500_MATH_PRIVATE_H_ */ +Index: libc/ports/sysdeps/powerpc/powerpc64/e6500/fpu/math_private.h +=================================================================== +--- /dev/null ++++ libc/ports/sysdeps/powerpc/powerpc64/e6500/fpu/math_private.h +@@ -0,0 +1,9 @@ ++#ifndef _E6500_MATH_PRIVATE_H_ ++#define _E6500_MATH_PRIVATE_H_ 1 ++/* E6500 core FPU does not implement ++ fsqrt */ ++ ++#define __CPU_HAS_FSQRT 0 ++#include_next ++ ++#endif /* _E6500_MATH_PRIVATE_H_ */ +Index: libc/ports/sysdeps/powerpc/powerpc32/e500mc/fpu/math_private.h +=================================================================== +--- /dev/null ++++ libc/ports/sysdeps/powerpc/powerpc32/e500mc/fpu/math_private.h +@@ -0,0 +1,9 @@ ++#ifndef _E500MC_MATH_PRIVATE_H_ ++#define _E500MC_MATH_PRIVATE_H_ 1 ++/* E500MC core FPU does not implement ++ fsqrt */ ++ ++#define __CPU_HAS_FSQRT 0 ++#include_next ++ ++#endif /* _E500MC_MATH_PRIVATE_H_ */ +Index: libc/ports/sysdeps/powerpc/powerpc32/e5500/fpu/math_private.h +=================================================================== +--- /dev/null ++++ libc/ports/sysdeps/powerpc/powerpc32/e5500/fpu/math_private.h +@@ -0,0 +1,9 @@ ++#ifndef _E5500_MATH_PRIVATE_H_ ++#define _E5500_MATH_PRIVATE_H_ 1 ++/* E5500 core FPU does not implement ++ fsqrt */ ++ ++#define __CPU_HAS_FSQRT 0 ++#include_next ++ ++#endif /* _E5500_MATH_PRIVATE_H_ */ +Index: libc/ports/sysdeps/powerpc/powerpc32/e6500/fpu/math_private.h +=================================================================== +--- /dev/null ++++ libc/ports/sysdeps/powerpc/powerpc32/e6500/fpu/math_private.h +@@ -0,0 +1,9 @@ ++#ifndef _E6500_MATH_PRIVATE_H_ ++#define _E6500_MATH_PRIVATE_H_ 1 ++/* E6500 core FPU does not implement ++ fsqrt */ ++ ++#define __CPU_HAS_FSQRT 0 ++#include_next ++ ++#endif /* _E6500_MATH_PRIVATE_H_ */ diff --git a/meta/recipes-core/eglibc/eglibc-2.19/generate-supported.mk b/meta/recipes-core/eglibc/eglibc-2.19/generate-supported.mk new file mode 100644 index 0000000000..d2a28c2dc6 --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-2.19/generate-supported.mk @@ -0,0 +1,11 @@ +#!/usr/bin/make + +include $(IN) + +all: + rm -f $(OUT) + touch $(OUT) + for locale in $(SUPPORTED-LOCALES); do \ + [ $$locale = true ] && continue; \ + echo $$locale | sed 's,/, ,' >> $(OUT); \ + done diff --git a/meta/recipes-core/eglibc/eglibc-2.19/glibc.fix_sqrt2.patch b/meta/recipes-core/eglibc/eglibc-2.19/glibc.fix_sqrt2.patch new file mode 100644 index 0000000000..a66972998c --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-2.19/glibc.fix_sqrt2.patch @@ -0,0 +1,1491 @@ +Signed-of-by: Edmar Wienskoski +Upstream-Status: Pending + +diff -ruN libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c +--- libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600 ++++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c 2012-06-14 14:51:50.452001745 -0500 +@@ -0,0 +1,134 @@ ++/* Double-precision floating point square root. ++ Copyright (C) 2010 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; ++static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; ++static const float two108 = 3.245185536584267269e+32; ++static const float twom54 = 5.551115123125782702e-17; ++static const float half = 0.5; ++ ++/* The method is based on the descriptions in: ++ ++ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; ++ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 ++ ++ We find the actual square root and half of its reciprocal ++ simultaneously. */ ++ ++#ifdef __STDC__ ++double ++__ieee754_sqrt (double b) ++#else ++double ++__ieee754_sqrt (b) ++ double b; ++#endif ++{ ++ if (__builtin_expect (b > 0, 1)) ++ { ++ double y, g, h, d, r; ++ ieee_double_shape_type u; ++ ++ if (__builtin_expect (b != a_inf.value, 1)) ++ { ++ fenv_t fe; ++ ++ fe = fegetenv_register (); ++ ++ u.value = b; ++ ++ relax_fenv_state (); ++ ++ __asm__ ("frsqrte %[estimate], %[x]\n" ++ : [estimate] "=f" (y) : [x] "f" (b)); ++ ++ /* Following Muller et al, page 168, equation 5.20. ++ ++ h goes to 1/(2*sqrt(b)) ++ g goes to sqrt(b). ++ ++ We need three iterations to get within 1ulp. */ ++ ++ /* Indicate that these can be performed prior to the branch. GCC ++ insists on sinking them below the branch, however; it seems like ++ they'd be better before the branch so that we can cover any latency ++ from storing the argument and loading its high word. Oh well. */ ++ ++ g = b * y; ++ h = 0.5 * y; ++ ++ /* Handle small numbers by scaling. */ ++ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) ++ return __ieee754_sqrt (b * two108) * twom54; ++ ++#define FMADD(a_, c_, b_) \ ++ ({ double __r; \ ++ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \ ++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ ++ __r;}) ++#define FNMSUB(a_, c_, b_) \ ++ ({ double __r; \ ++ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ ++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ ++ __r;}) ++ ++ r = FNMSUB (g, h, half); ++ g = FMADD (g, r, g); ++ h = FMADD (h, r, h); ++ ++ r = FNMSUB (g, h, half); ++ g = FMADD (g, r, g); ++ h = FMADD (h, r, h); ++ ++ r = FNMSUB (g, h, half); ++ g = FMADD (g, r, g); ++ h = FMADD (h, r, h); ++ ++ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */ ++ ++ /* Final refinement. */ ++ d = FNMSUB (g, g, b); ++ ++ fesetenv_register (fe); ++ return FMADD (d, h, g); ++ } ++ } ++ else if (b < 0) ++ { ++ /* For some reason, some PowerPC32 processors don't implement ++ FE_INVALID_SQRT. */ ++#ifdef FE_INVALID_SQRT ++ feraiseexcept (FE_INVALID_SQRT); ++ ++ fenv_union_t u = { .fenv = fegetenv_register () }; ++ if ((u.l[1] & FE_INVALID) == 0) ++#endif ++ feraiseexcept (FE_INVALID); ++ b = a_nan.value; ++ } ++ return f_wash (b); ++} +diff -ruN libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c +--- libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600 ++++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c 2012-06-14 14:51:50.452001745 -0500 +@@ -0,0 +1,101 @@ ++/* Single-precision floating point square root. ++ Copyright (C) 2010 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; ++static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; ++static const float threehalf = 1.5; ++ ++/* The method is based on the descriptions in: ++ ++ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; ++ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 ++ ++ We find the reciprocal square root and use that to compute the actual ++ square root. */ ++ ++#ifdef __STDC__ ++float ++__ieee754_sqrtf (float b) ++#else ++float ++__ieee754_sqrtf (b) ++ float b; ++#endif ++{ ++ if (__builtin_expect (b > 0, 1)) ++ { ++#define FMSUB(a_, c_, b_) \ ++ ({ double __r; \ ++ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \ ++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ ++ __r;}) ++#define FNMSUB(a_, c_, b_) \ ++ ({ double __r; \ ++ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ ++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ ++ __r;}) ++ ++ if (__builtin_expect (b != a_inf.value, 1)) ++ { ++ double y, x; ++ fenv_t fe; ++ ++ fe = fegetenv_register (); ++ ++ relax_fenv_state (); ++ ++ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */ ++ y = FMSUB (threehalf, b, b); ++ ++ /* Initial estimate. */ ++ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b)); ++ ++ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */ ++ x = x * FNMSUB (y, x * x, threehalf); ++ x = x * FNMSUB (y, x * x, threehalf); ++ x = x * FNMSUB (y, x * x, threehalf); ++ ++ /* All done. */ ++ fesetenv_register (fe); ++ return x * b; ++ } ++ } ++ else if (b < 0) ++ { ++ /* For some reason, some PowerPC32 processors don't implement ++ FE_INVALID_SQRT. */ ++#ifdef FE_INVALID_SQRT ++ feraiseexcept (FE_INVALID_SQRT); ++ ++ fenv_union_t u = { .fenv = fegetenv_register () }; ++ if ((u.l[1] & FE_INVALID) == 0) ++#endif ++ feraiseexcept (FE_INVALID); ++ b = a_nan.value; ++ } ++ return f_washf (b); ++} +diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c +--- libc-orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600 ++++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c 2012-06-14 14:55:14.749001061 -0500 +@@ -0,0 +1,134 @@ ++/* Double-precision floating point square root. ++ Copyright (C) 2010 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; ++static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; ++static const float two108 = 3.245185536584267269e+32; ++static const float twom54 = 5.551115123125782702e-17; ++static const float half = 0.5; ++ ++/* The method is based on the descriptions in: ++ ++ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; ++ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 ++ ++ We find the actual square root and half of its reciprocal ++ simultaneously. */ ++ ++#ifdef __STDC__ ++double ++__ieee754_sqrt (double b) ++#else ++double ++__ieee754_sqrt (b) ++ double b; ++#endif ++{ ++ if (__builtin_expect (b > 0, 1)) ++ { ++ double y, g, h, d, r; ++ ieee_double_shape_type u; ++ ++ if (__builtin_expect (b != a_inf.value, 1)) ++ { ++ fenv_t fe; ++ ++ fe = fegetenv_register (); ++ ++ u.value = b; ++ ++ relax_fenv_state (); ++ ++ __asm__ ("frsqrte %[estimate], %[x]\n" ++ : [estimate] "=f" (y) : [x] "f" (b)); ++ ++ /* Following Muller et al, page 168, equation 5.20. ++ ++ h goes to 1/(2*sqrt(b)) ++ g goes to sqrt(b). ++ ++ We need three iterations to get within 1ulp. */ ++ ++ /* Indicate that these can be performed prior to the branch. GCC ++ insists on sinking them below the branch, however; it seems like ++ they'd be better before the branch so that we can cover any latency ++ from storing the argument and loading its high word. Oh well. */ ++ ++ g = b * y; ++ h = 0.5 * y; ++ ++ /* Handle small numbers by scaling. */ ++ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) ++ return __ieee754_sqrt (b * two108) * twom54; ++ ++#define FMADD(a_, c_, b_) \ ++ ({ double __r; \ ++ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \ ++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ ++ __r;}) ++#define FNMSUB(a_, c_, b_) \ ++ ({ double __r; \ ++ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ ++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ ++ __r;}) ++ ++ r = FNMSUB (g, h, half); ++ g = FMADD (g, r, g); ++ h = FMADD (h, r, h); ++ ++ r = FNMSUB (g, h, half); ++ g = FMADD (g, r, g); ++ h = FMADD (h, r, h); ++ ++ r = FNMSUB (g, h, half); ++ g = FMADD (g, r, g); ++ h = FMADD (h, r, h); ++ ++ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */ ++ ++ /* Final refinement. */ ++ d = FNMSUB (g, g, b); ++ ++ fesetenv_register (fe); ++ return FMADD (d, h, g); ++ } ++ } ++ else if (b < 0) ++ { ++ /* For some reason, some PowerPC32 processors don't implement ++ FE_INVALID_SQRT. */ ++#ifdef FE_INVALID_SQRT ++ feraiseexcept (FE_INVALID_SQRT); ++ ++ fenv_union_t u = { .fenv = fegetenv_register () }; ++ if ((u.l[1] & FE_INVALID) == 0) ++#endif ++ feraiseexcept (FE_INVALID); ++ b = a_nan.value; ++ } ++ return f_wash (b); ++} +diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c +--- libc-orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600 ++++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c 2012-06-14 14:55:14.749001061 -0500 +@@ -0,0 +1,101 @@ ++/* Single-precision floating point square root. ++ Copyright (C) 2010 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; ++static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; ++static const float threehalf = 1.5; ++ ++/* The method is based on the descriptions in: ++ ++ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; ++ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 ++ ++ We find the reciprocal square root and use that to compute the actual ++ square root. */ ++ ++#ifdef __STDC__ ++float ++__ieee754_sqrtf (float b) ++#else ++float ++__ieee754_sqrtf (b) ++ float b; ++#endif ++{ ++ if (__builtin_expect (b > 0, 1)) ++ { ++#define FMSUB(a_, c_, b_) \ ++ ({ double __r; \ ++ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \ ++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ ++ __r;}) ++#define FNMSUB(a_, c_, b_) \ ++ ({ double __r; \ ++ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ ++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ ++ __r;}) ++ ++ if (__builtin_expect (b != a_inf.value, 1)) ++ { ++ double y, x; ++ fenv_t fe; ++ ++ fe = fegetenv_register (); ++ ++ relax_fenv_state (); ++ ++ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */ ++ y = FMSUB (threehalf, b, b); ++ ++ /* Initial estimate. */ ++ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b)); ++ ++ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */ ++ x = x * FNMSUB (y, x * x, threehalf); ++ x = x * FNMSUB (y, x * x, threehalf); ++ x = x * FNMSUB (y, x * x, threehalf); ++ ++ /* All done. */ ++ fesetenv_register (fe); ++ return x * b; ++ } ++ } ++ else if (b < 0) ++ { ++ /* For some reason, some PowerPC32 processors don't implement ++ FE_INVALID_SQRT. */ ++#ifdef FE_INVALID_SQRT ++ feraiseexcept (FE_INVALID_SQRT); ++ ++ fenv_union_t u = { .fenv = fegetenv_register () }; ++ if ((u.l[1] & FE_INVALID) == 0) ++#endif ++ feraiseexcept (FE_INVALID); ++ b = a_nan.value; ++ } ++ return f_washf (b); ++} +diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c +--- libc-orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600 ++++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c 2012-06-14 14:55:21.812002270 -0500 +@@ -0,0 +1,134 @@ ++/* Double-precision floating point square root. ++ Copyright (C) 2010 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; ++static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; ++static const float two108 = 3.245185536584267269e+32; ++static const float twom54 = 5.551115123125782702e-17; ++static const float half = 0.5; ++ ++/* The method is based on the descriptions in: ++ ++ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; ++ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 ++ ++ We find the actual square root and half of its reciprocal ++ simultaneously. */ ++ ++#ifdef __STDC__ ++double ++__ieee754_sqrt (double b) ++#else ++double ++__ieee754_sqrt (b) ++ double b; ++#endif ++{ ++ if (__builtin_expect (b > 0, 1)) ++ { ++ double y, g, h, d, r; ++ ieee_double_shape_type u; ++ ++ if (__builtin_expect (b != a_inf.value, 1)) ++ { ++ fenv_t fe; ++ ++ fe = fegetenv_register (); ++ ++ u.value = b; ++ ++ relax_fenv_state (); ++ ++ __asm__ ("frsqrte %[estimate], %[x]\n" ++ : [estimate] "=f" (y) : [x] "f" (b)); ++ ++ /* Following Muller et al, page 168, equation 5.20. ++ ++ h goes to 1/(2*sqrt(b)) ++ g goes to sqrt(b). ++ ++ We need three iterations to get within 1ulp. */ ++ ++ /* Indicate that these can be performed prior to the branch. GCC ++ insists on sinking them below the branch, however; it seems like ++ they'd be better before the branch so that we can cover any latency ++ from storing the argument and loading its high word. Oh well. */ ++ ++ g = b * y; ++ h = 0.5 * y; ++ ++ /* Handle small numbers by scaling. */ ++ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) ++ return __ieee754_sqrt (b * two108) * twom54; ++ ++#define FMADD(a_, c_, b_) \ ++ ({ double __r; \ ++ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \ ++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ ++ __r;}) ++#define FNMSUB(a_, c_, b_) \ ++ ({ double __r; \ ++ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ ++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ ++ __r;}) ++ ++ r = FNMSUB (g, h, half); ++ g = FMADD (g, r, g); ++ h = FMADD (h, r, h); ++ ++ r = FNMSUB (g, h, half); ++ g = FMADD (g, r, g); ++ h = FMADD (h, r, h); ++ ++ r = FNMSUB (g, h, half); ++ g = FMADD (g, r, g); ++ h = FMADD (h, r, h); ++ ++ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */ ++ ++ /* Final refinement. */ ++ d = FNMSUB (g, g, b); ++ ++ fesetenv_register (fe); ++ return FMADD (d, h, g); ++ } ++ } ++ else if (b < 0) ++ { ++ /* For some reason, some PowerPC32 processors don't implement ++ FE_INVALID_SQRT. */ ++#ifdef FE_INVALID_SQRT ++ feraiseexcept (FE_INVALID_SQRT); ++ ++ fenv_union_t u = { .fenv = fegetenv_register () }; ++ if ((u.l[1] & FE_INVALID) == 0) ++#endif ++ feraiseexcept (FE_INVALID); ++ b = a_nan.value; ++ } ++ return f_wash (b); ++} +diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c +--- libc-orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600 ++++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c 2012-06-14 14:55:21.812002270 -0500 +@@ -0,0 +1,101 @@ ++/* Single-precision floating point square root. ++ Copyright (C) 2010 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; ++static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; ++static const float threehalf = 1.5; ++ ++/* The method is based on the descriptions in: ++ ++ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; ++ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 ++ ++ We find the reciprocal square root and use that to compute the actual ++ square root. */ ++ ++#ifdef __STDC__ ++float ++__ieee754_sqrtf (float b) ++#else ++float ++__ieee754_sqrtf (b) ++ float b; ++#endif ++{ ++ if (__builtin_expect (b > 0, 1)) ++ { ++#define FMSUB(a_, c_, b_) \ ++ ({ double __r; \ ++ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \ ++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ ++ __r;}) ++#define FNMSUB(a_, c_, b_) \ ++ ({ double __r; \ ++ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ ++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ ++ __r;}) ++ ++ if (__builtin_expect (b != a_inf.value, 1)) ++ { ++ double y, x; ++ fenv_t fe; ++ ++ fe = fegetenv_register (); ++ ++ relax_fenv_state (); ++ ++ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */ ++ y = FMSUB (threehalf, b, b); ++ ++ /* Initial estimate. */ ++ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b)); ++ ++ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */ ++ x = x * FNMSUB (y, x * x, threehalf); ++ x = x * FNMSUB (y, x * x, threehalf); ++ x = x * FNMSUB (y, x * x, threehalf); ++ ++ /* All done. */ ++ fesetenv_register (fe); ++ return x * b; ++ } ++ } ++ else if (b < 0) ++ { ++ /* For some reason, some PowerPC32 processors don't implement ++ FE_INVALID_SQRT. */ ++#ifdef FE_INVALID_SQRT ++ feraiseexcept (FE_INVALID_SQRT); ++ ++ fenv_union_t u = { .fenv = fegetenv_register () }; ++ if ((u.l[1] & FE_INVALID) == 0) ++#endif ++ feraiseexcept (FE_INVALID); ++ b = a_nan.value; ++ } ++ return f_washf (b); ++} +diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c +--- libc-orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600 ++++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c 2012-06-14 14:55:24.620001266 -0500 +@@ -0,0 +1,134 @@ ++/* Double-precision floating point square root. ++ Copyright (C) 2010 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; ++static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; ++static const float two108 = 3.245185536584267269e+32; ++static const float twom54 = 5.551115123125782702e-17; ++static const float half = 0.5; ++ ++/* The method is based on the descriptions in: ++ ++ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; ++ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 ++ ++ We find the actual square root and half of its reciprocal ++ simultaneously. */ ++ ++#ifdef __STDC__ ++double ++__ieee754_sqrt (double b) ++#else ++double ++__ieee754_sqrt (b) ++ double b; ++#endif ++{ ++ if (__builtin_expect (b > 0, 1)) ++ { ++ double y, g, h, d, r; ++ ieee_double_shape_type u; ++ ++ if (__builtin_expect (b != a_inf.value, 1)) ++ { ++ fenv_t fe; ++ ++ fe = fegetenv_register (); ++ ++ u.value = b; ++ ++ relax_fenv_state (); ++ ++ __asm__ ("frsqrte %[estimate], %[x]\n" ++ : [estimate] "=f" (y) : [x] "f" (b)); ++ ++ /* Following Muller et al, page 168, equation 5.20. ++ ++ h goes to 1/(2*sqrt(b)) ++ g goes to sqrt(b). ++ ++ We need three iterations to get within 1ulp. */ ++ ++ /* Indicate that these can be performed prior to the branch. GCC ++ insists on sinking them below the branch, however; it seems like ++ they'd be better before the branch so that we can cover any latency ++ from storing the argument and loading its high word. Oh well. */ ++ ++ g = b * y; ++ h = 0.5 * y; ++ ++ /* Handle small numbers by scaling. */ ++ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) ++ return __ieee754_sqrt (b * two108) * twom54; ++ ++#define FMADD(a_, c_, b_) \ ++ ({ double __r; \ ++ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \ ++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ ++ __r;}) ++#define FNMSUB(a_, c_, b_) \ ++ ({ double __r; \ ++ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ ++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ ++ __r;}) ++ ++ r = FNMSUB (g, h, half); ++ g = FMADD (g, r, g); ++ h = FMADD (h, r, h); ++ ++ r = FNMSUB (g, h, half); ++ g = FMADD (g, r, g); ++ h = FMADD (h, r, h); ++ ++ r = FNMSUB (g, h, half); ++ g = FMADD (g, r, g); ++ h = FMADD (h, r, h); ++ ++ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */ ++ ++ /* Final refinement. */ ++ d = FNMSUB (g, g, b); ++ ++ fesetenv_register (fe); ++ return FMADD (d, h, g); ++ } ++ } ++ else if (b < 0) ++ { ++ /* For some reason, some PowerPC32 processors don't implement ++ FE_INVALID_SQRT. */ ++#ifdef FE_INVALID_SQRT ++ feraiseexcept (FE_INVALID_SQRT); ++ ++ fenv_union_t u = { .fenv = fegetenv_register () }; ++ if ((u.l[1] & FE_INVALID) == 0) ++#endif ++ feraiseexcept (FE_INVALID); ++ b = a_nan.value; ++ } ++ return f_wash (b); ++} +diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c +--- libc-orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600 ++++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c 2012-06-14 14:55:24.620001266 -0500 +@@ -0,0 +1,101 @@ ++/* Single-precision floating point square root. ++ Copyright (C) 2010 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; ++static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; ++static const float threehalf = 1.5; ++ ++/* The method is based on the descriptions in: ++ ++ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; ++ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 ++ ++ We find the reciprocal square root and use that to compute the actual ++ square root. */ ++ ++#ifdef __STDC__ ++float ++__ieee754_sqrtf (float b) ++#else ++float ++__ieee754_sqrtf (b) ++ float b; ++#endif ++{ ++ if (__builtin_expect (b > 0, 1)) ++ { ++#define FMSUB(a_, c_, b_) \ ++ ({ double __r; \ ++ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \ ++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ ++ __r;}) ++#define FNMSUB(a_, c_, b_) \ ++ ({ double __r; \ ++ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ ++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ ++ __r;}) ++ ++ if (__builtin_expect (b != a_inf.value, 1)) ++ { ++ double y, x; ++ fenv_t fe; ++ ++ fe = fegetenv_register (); ++ ++ relax_fenv_state (); ++ ++ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */ ++ y = FMSUB (threehalf, b, b); ++ ++ /* Initial estimate. */ ++ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b)); ++ ++ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */ ++ x = x * FNMSUB (y, x * x, threehalf); ++ x = x * FNMSUB (y, x * x, threehalf); ++ x = x * FNMSUB (y, x * x, threehalf); ++ ++ /* All done. */ ++ fesetenv_register (fe); ++ return x * b; ++ } ++ } ++ else if (b < 0) ++ { ++ /* For some reason, some PowerPC32 processors don't implement ++ FE_INVALID_SQRT. */ ++#ifdef FE_INVALID_SQRT ++ feraiseexcept (FE_INVALID_SQRT); ++ ++ fenv_union_t u = { .fenv = fegetenv_register () }; ++ if ((u.l[1] & FE_INVALID) == 0) ++#endif ++ feraiseexcept (FE_INVALID); ++ b = a_nan.value; ++ } ++ return f_washf (b); ++} +diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c +--- libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600 ++++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c 2012-06-14 14:51:50.452001745 -0500 +@@ -0,0 +1,134 @@ ++/* Double-precision floating point square root. ++ Copyright (C) 2010 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; ++static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; ++static const float two108 = 3.245185536584267269e+32; ++static const float twom54 = 5.551115123125782702e-17; ++static const float half = 0.5; ++ ++/* The method is based on the descriptions in: ++ ++ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; ++ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 ++ ++ We find the actual square root and half of its reciprocal ++ simultaneously. */ ++ ++#ifdef __STDC__ ++double ++__ieee754_sqrt (double b) ++#else ++double ++__ieee754_sqrt (b) ++ double b; ++#endif ++{ ++ if (__builtin_expect (b > 0, 1)) ++ { ++ double y, g, h, d, r; ++ ieee_double_shape_type u; ++ ++ if (__builtin_expect (b != a_inf.value, 1)) ++ { ++ fenv_t fe; ++ ++ fe = fegetenv_register (); ++ ++ u.value = b; ++ ++ relax_fenv_state (); ++ ++ __asm__ ("frsqrte %[estimate], %[x]\n" ++ : [estimate] "=f" (y) : [x] "f" (b)); ++ ++ /* Following Muller et al, page 168, equation 5.20. ++ ++ h goes to 1/(2*sqrt(b)) ++ g goes to sqrt(b). ++ ++ We need three iterations to get within 1ulp. */ ++ ++ /* Indicate that these can be performed prior to the branch. GCC ++ insists on sinking them below the branch, however; it seems like ++ they'd be better before the branch so that we can cover any latency ++ from storing the argument and loading its high word. Oh well. */ ++ ++ g = b * y; ++ h = 0.5 * y; ++ ++ /* Handle small numbers by scaling. */ ++ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) ++ return __ieee754_sqrt (b * two108) * twom54; ++ ++#define FMADD(a_, c_, b_) \ ++ ({ double __r; \ ++ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \ ++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ ++ __r;}) ++#define FNMSUB(a_, c_, b_) \ ++ ({ double __r; \ ++ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ ++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ ++ __r;}) ++ ++ r = FNMSUB (g, h, half); ++ g = FMADD (g, r, g); ++ h = FMADD (h, r, h); ++ ++ r = FNMSUB (g, h, half); ++ g = FMADD (g, r, g); ++ h = FMADD (h, r, h); ++ ++ r = FNMSUB (g, h, half); ++ g = FMADD (g, r, g); ++ h = FMADD (h, r, h); ++ ++ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */ ++ ++ /* Final refinement. */ ++ d = FNMSUB (g, g, b); ++ ++ fesetenv_register (fe); ++ return FMADD (d, h, g); ++ } ++ } ++ else if (b < 0) ++ { ++ /* For some reason, some PowerPC32 processors don't implement ++ FE_INVALID_SQRT. */ ++#ifdef FE_INVALID_SQRT ++ feraiseexcept (FE_INVALID_SQRT); ++ ++ fenv_union_t u = { .fenv = fegetenv_register () }; ++ if ((u.l[1] & FE_INVALID) == 0) ++#endif ++ feraiseexcept (FE_INVALID); ++ b = a_nan.value; ++ } ++ return f_wash (b); ++} +diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c +--- libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600 ++++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c 2012-06-14 14:51:50.452001745 -0500 +@@ -0,0 +1,101 @@ ++/* Single-precision floating point square root. ++ Copyright (C) 2010 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; ++static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; ++static const float threehalf = 1.5; ++ ++/* The method is based on the descriptions in: ++ ++ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; ++ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 ++ ++ We find the reciprocal square root and use that to compute the actual ++ square root. */ ++ ++#ifdef __STDC__ ++float ++__ieee754_sqrtf (float b) ++#else ++float ++__ieee754_sqrtf (b) ++ float b; ++#endif ++{ ++ if (__builtin_expect (b > 0, 1)) ++ { ++#define FMSUB(a_, c_, b_) \ ++ ({ double __r; \ ++ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \ ++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ ++ __r;}) ++#define FNMSUB(a_, c_, b_) \ ++ ({ double __r; \ ++ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ ++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ ++ __r;}) ++ ++ if (__builtin_expect (b != a_inf.value, 1)) ++ { ++ double y, x; ++ fenv_t fe; ++ ++ fe = fegetenv_register (); ++ ++ relax_fenv_state (); ++ ++ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */ ++ y = FMSUB (threehalf, b, b); ++ ++ /* Initial estimate. */ ++ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b)); ++ ++ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */ ++ x = x * FNMSUB (y, x * x, threehalf); ++ x = x * FNMSUB (y, x * x, threehalf); ++ x = x * FNMSUB (y, x * x, threehalf); ++ ++ /* All done. */ ++ fesetenv_register (fe); ++ return x * b; ++ } ++ } ++ else if (b < 0) ++ { ++ /* For some reason, some PowerPC32 processors don't implement ++ FE_INVALID_SQRT. */ ++#ifdef FE_INVALID_SQRT ++ feraiseexcept (FE_INVALID_SQRT); ++ ++ fenv_union_t u = { .fenv = fegetenv_register () }; ++ if ((u.l[1] & FE_INVALID) == 0) ++#endif ++ feraiseexcept (FE_INVALID); ++ b = a_nan.value; ++ } ++ return f_washf (b); ++} +diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c +--- libc-orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600 ++++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c 2012-06-14 14:56:02.080000985 -0500 +@@ -0,0 +1,134 @@ ++/* Double-precision floating point square root. ++ Copyright (C) 2010 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; ++static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; ++static const float two108 = 3.245185536584267269e+32; ++static const float twom54 = 5.551115123125782702e-17; ++static const float half = 0.5; ++ ++/* The method is based on the descriptions in: ++ ++ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; ++ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 ++ ++ We find the actual square root and half of its reciprocal ++ simultaneously. */ ++ ++#ifdef __STDC__ ++double ++__ieee754_sqrt (double b) ++#else ++double ++__ieee754_sqrt (b) ++ double b; ++#endif ++{ ++ if (__builtin_expect (b > 0, 1)) ++ { ++ double y, g, h, d, r; ++ ieee_double_shape_type u; ++ ++ if (__builtin_expect (b != a_inf.value, 1)) ++ { ++ fenv_t fe; ++ ++ fe = fegetenv_register (); ++ ++ u.value = b; ++ ++ relax_fenv_state (); ++ ++ __asm__ ("frsqrte %[estimate], %[x]\n" ++ : [estimate] "=f" (y) : [x] "f" (b)); ++ ++ /* Following Muller et al, page 168, equation 5.20. ++ ++ h goes to 1/(2*sqrt(b)) ++ g goes to sqrt(b). ++ ++ We need three iterations to get within 1ulp. */ ++ ++ /* Indicate that these can be performed prior to the branch. GCC ++ insists on sinking them below the branch, however; it seems like ++ they'd be better before the branch so that we can cover any latency ++ from storing the argument and loading its high word. Oh well. */ ++ ++ g = b * y; ++ h = 0.5 * y; ++ ++ /* Handle small numbers by scaling. */ ++ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) ++ return __ieee754_sqrt (b * two108) * twom54; ++ ++#define FMADD(a_, c_, b_) \ ++ ({ double __r; \ ++ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \ ++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ ++ __r;}) ++#define FNMSUB(a_, c_, b_) \ ++ ({ double __r; \ ++ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ ++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ ++ __r;}) ++ ++ r = FNMSUB (g, h, half); ++ g = FMADD (g, r, g); ++ h = FMADD (h, r, h); ++ ++ r = FNMSUB (g, h, half); ++ g = FMADD (g, r, g); ++ h = FMADD (h, r, h); ++ ++ r = FNMSUB (g, h, half); ++ g = FMADD (g, r, g); ++ h = FMADD (h, r, h); ++ ++ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */ ++ ++ /* Final refinement. */ ++ d = FNMSUB (g, g, b); ++ ++ fesetenv_register (fe); ++ return FMADD (d, h, g); ++ } ++ } ++ else if (b < 0) ++ { ++ /* For some reason, some PowerPC32 processors don't implement ++ FE_INVALID_SQRT. */ ++#ifdef FE_INVALID_SQRT ++ feraiseexcept (FE_INVALID_SQRT); ++ ++ fenv_union_t u = { .fenv = fegetenv_register () }; ++ if ((u.l[1] & FE_INVALID) == 0) ++#endif ++ feraiseexcept (FE_INVALID); ++ b = a_nan.value; ++ } ++ return f_wash (b); ++} +diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c +--- libc-orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600 ++++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c 2012-06-14 14:56:02.080000985 -0500 +@@ -0,0 +1,101 @@ ++/* Single-precision floating point square root. ++ Copyright (C) 2010 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; ++static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; ++static const float threehalf = 1.5; ++ ++/* The method is based on the descriptions in: ++ ++ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5; ++ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9 ++ ++ We find the reciprocal square root and use that to compute the actual ++ square root. */ ++ ++#ifdef __STDC__ ++float ++__ieee754_sqrtf (float b) ++#else ++float ++__ieee754_sqrtf (b) ++ float b; ++#endif ++{ ++ if (__builtin_expect (b > 0, 1)) ++ { ++#define FMSUB(a_, c_, b_) \ ++ ({ double __r; \ ++ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \ ++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ ++ __r;}) ++#define FNMSUB(a_, c_, b_) \ ++ ({ double __r; \ ++ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \ ++ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \ ++ __r;}) ++ ++ if (__builtin_expect (b != a_inf.value, 1)) ++ { ++ double y, x; ++ fenv_t fe; ++ ++ fe = fegetenv_register (); ++ ++ relax_fenv_state (); ++ ++ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */ ++ y = FMSUB (threehalf, b, b); ++ ++ /* Initial estimate. */ ++ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b)); ++ ++ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */ ++ x = x * FNMSUB (y, x * x, threehalf); ++ x = x * FNMSUB (y, x * x, threehalf); ++ x = x * FNMSUB (y, x * x, threehalf); ++ ++ /* All done. */ ++ fesetenv_register (fe); ++ return x * b; ++ } ++ } ++ else if (b < 0) ++ { ++ /* For some reason, some PowerPC32 processors don't implement ++ FE_INVALID_SQRT. */ ++#ifdef FE_INVALID_SQRT ++ feraiseexcept (FE_INVALID_SQRT); ++ ++ fenv_union_t u = { .fenv = fegetenv_register () }; ++ if ((u.l[1] & FE_INVALID) == 0) ++#endif ++ feraiseexcept (FE_INVALID); ++ b = a_nan.value; ++ } ++ return f_washf (b); ++} +diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies +--- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies 1969-12-31 18:00:00.000000000 -0600 ++++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies 2012-06-14 14:51:50.452001745 -0500 +@@ -0,0 +1 @@ ++powerpc/powerpc32/603e/fpu +diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies +--- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies 1969-12-31 18:00:00.000000000 -0600 ++++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies 2012-06-14 14:54:00.481000876 -0500 +@@ -0,0 +1 @@ ++powerpc/powerpc32/e500mc/fpu +diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies +--- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies 1969-12-31 18:00:00.000000000 -0600 ++++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies 2012-06-14 14:54:17.000001007 -0500 +@@ -0,0 +1 @@ ++powerpc/powerpc32/e5500/fpu +diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies +--- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies 1969-12-31 18:00:00.000000000 -0600 ++++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies 2012-06-14 14:54:31.054001299 -0500 +@@ -0,0 +1 @@ ++powerpc/powerpc32/e6500/fpu +diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies +--- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies 1969-12-31 18:00:00.000000000 -0600 ++++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies 2012-06-14 14:51:50.453001709 -0500 +@@ -0,0 +1 @@ ++powerpc/powerpc64/e5500/fpu +diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies +--- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies 1969-12-31 18:00:00.000000000 -0600 ++++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies 2012-06-14 14:58:14.298001288 -0500 +@@ -0,0 +1 @@ ++powerpc/powerpc64/e6500/fpu diff --git a/meta/recipes-core/eglibc/eglibc-2.19/initgroups_keys.patch b/meta/recipes-core/eglibc/eglibc-2.19/initgroups_keys.patch new file mode 100644 index 0000000000..be29856b03 --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-2.19/initgroups_keys.patch @@ -0,0 +1,20 @@ +This is needed since initgroups belongs to NET group +so when NET is disabled in eglibc build then it reports +as undefined symbol + +Signed-off-by: Khem Raj +Upstream-Status: Pending + +Index: libc/nss/getent.c +=================================================================== +--- libc.orig/nss/getent.c 2012-03-09 09:41:57.099581559 -0800 ++++ libc/nss/getent.c 2012-03-09 09:42:13.095582334 -0800 +@@ -898,7 +898,7 @@ + D(group) + D(gshadow) + DN(hosts) +-D(initgroups) ++DN(initgroups) + DN(netgroup) + DN(networks) + D(passwd) diff --git a/meta/recipes-core/eglibc/eglibc-2.19/ld-search-order.patch b/meta/recipes-core/eglibc/eglibc-2.19/ld-search-order.patch new file mode 100644 index 0000000000..e83a0ad6d2 --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-2.19/ld-search-order.patch @@ -0,0 +1,56 @@ +Upstream-Status: Inappropriate [embedded specific] + +The default lib search path order is: + + 1) LD_LIBRARY_PATH + 2) RPATH from the binary + 3) ld.so.cache + 4) default search paths embedded in the linker + +For nativesdk binaries which are being used alongside binaries on a host system, we +need the search paths to firstly search the shipped nativesdk libs but then also +cover the host system. For example we want the host system's libGL and this may be +in a non-standard location like /usr/lib/mesa. The only place the location is know +about is in the ld.so.cache of the host system. + +Since nativesdk has a simple structure and doesn't need to use a cache itself, we +repurpose the cache for use as a last resort in finding host system binaries. This +means we need to switch the order of 3 and 4 above to make this work effectively. + +RP 14/10/2010 + +Index: libc/elf/dl-load.c +=================================================================== +--- libc.orig/elf/dl-load.c 2012-12-02 13:11:45.000000000 -0800 ++++ libc/elf/dl-load.c 2013-01-09 07:00:59.135223084 -0800 +@@ -2215,7 +2215,14 @@ + fd = open_path (name, namelen, mode & __RTLD_SECURE, + &loader->l_runpath_dirs, &realname, &fb, loader, + LA_SER_RUNPATH, &found_other_class); +- ++ /* try the default path. */ ++ if (fd == -1 ++ && ((l = loader ?: GL(dl_ns)[nsid]._ns_loaded) == NULL ++ || __builtin_expect (!(l->l_flags_1 & DF_1_NODEFLIB), 1)) ++ && rtld_search_dirs.dirs != (void *) -1) ++ fd = open_path (name, namelen, mode & __RTLD_SECURE, &rtld_search_dirs, ++ &realname, &fb, l, LA_SER_DEFAULT, &found_other_class); ++ /* Finally try ld.so.cache */ + #ifdef USE_LDCONFIG + if (fd == -1 + && (__builtin_expect (! (mode & __RTLD_SECURE), 1) +@@ -2283,14 +2290,6 @@ + } + #endif + +- /* Finally, try the default path. */ +- if (fd == -1 +- && ((l = loader ?: GL(dl_ns)[nsid]._ns_loaded) == NULL +- || __builtin_expect (!(l->l_flags_1 & DF_1_NODEFLIB), 1)) +- && rtld_search_dirs.dirs != (void *) -1) +- fd = open_path (name, namelen, mode & __RTLD_SECURE, &rtld_search_dirs, +- &realname, &fb, l, LA_SER_DEFAULT, &found_other_class); +- + /* Add another newline when we are tracing the library loading. */ + if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_LIBS, 0)) + _dl_debug_printf ("\n"); diff --git a/meta/recipes-core/eglibc/eglibc-2.19/mips-rld-map-check.patch b/meta/recipes-core/eglibc/eglibc-2.19/mips-rld-map-check.patch new file mode 100644 index 0000000000..9b646fea95 --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-2.19/mips-rld-map-check.patch @@ -0,0 +1,26 @@ + +On mips target, binutils currently sets DT_MIPS_RLD_MAP to 0 in dynamic +section if a --version-script sets _RLD_MAP to local. This is apparently +a binutils bug, but libc shouldn't segfault in this case. + +see also: http://sourceware.org/bugilla/show_bug.cgi?id=11615 + +Upstream-Status: Pending + +9/19/2010 - added by Qing He + + +--- +diff -ru glibc-2.10.1.orig/ports/sysdeps/mips/dl-machine.h glibc-2.10.1/ports/sysdeps/mips/dl-machine.h +--- glibc-2.10.1.orig/ports/sysdeps/mips/dl-machine.h 2009-05-16 16:36:20.000000000 +0800 ++++ glibc-2.10.1/ports/sysdeps/mips/dl-machine.h 2010-09-19 09:11:53.000000000 +0800 +@@ -70,7 +70,8 @@ + /* If there is a DT_MIPS_RLD_MAP entry in the dynamic section, fill it in + with the run-time address of the r_debug structure */ + #define ELF_MACHINE_DEBUG_SETUP(l,r) \ +-do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \ ++do { if ((l)->l_info[DT_MIPS (RLD_MAP)] && \ ++ (l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) \ + *(ElfW(Addr) *)((l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) = \ + (ElfW(Addr)) (r); \ + } while (0) diff --git a/meta/recipes-core/eglibc/eglibc-2.19/multilib_readlib.patch b/meta/recipes-core/eglibc/eglibc-2.19/multilib_readlib.patch new file mode 100644 index 0000000000..1542b1b519 --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-2.19/multilib_readlib.patch @@ -0,0 +1,17 @@ +Upstream-Status: Inappropriate [embedded specific] + +Replace the OECORE_KNOWN_INTERPRETER_NAMES with the value of +variable EGLIBC_KNOWN_INTERPRETER_NAMES. + +Lianhao Lu, 08/01/2011 + +--- libc/elf/readlib.c.orig 2011-08-12 17:05:51.864470837 +0800 ++++ libc/elf/readlib.c 2011-08-12 17:06:39.346942074 +0800 +@@ -52,6 +52,7 @@ + #ifdef SYSDEP_KNOWN_INTERPRETER_NAMES + SYSDEP_KNOWN_INTERPRETER_NAMES + #endif ++ OECORE_KNOWN_INTERPRETER_NAMES + }; + + static struct known_names known_libs[] = diff --git a/meta/recipes-core/eglibc/eglibc-2.19/ppc-sqrt_finite.patch b/meta/recipes-core/eglibc/eglibc-2.19/ppc-sqrt_finite.patch new file mode 100644 index 0000000000..6ea666b1d6 --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-2.19/ppc-sqrt_finite.patch @@ -0,0 +1,184 @@ +on ppc fixes the errors like below +| ./.libs/libpulsecore-1.1.so: undefined reference to `__sqrt_finite' +| collect2: ld returned 1 exit status + +Upstream-Status: Pending + +ChangeLog + +2012-01-06 Khem Raj + + * sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c: Add __*_finite alias. + Remove cruft. + * sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c: Ditto. + * sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c: Ditto. + * sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c: Ditto. + +Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c +=================================================================== +--- libc.orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c ++++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c +@@ -39,14 +39,8 @@ static const float half = 0.5; + We find the actual square root and half of its reciprocal + simultaneously. */ + +-#ifdef __STDC__ + double + __ieee754_sqrt (double b) +-#else +-double +-__ieee754_sqrt (b) +- double b; +-#endif + { + if (__builtin_expect (b > 0, 1)) + { +@@ -132,3 +126,4 @@ __ieee754_sqrt (b) + } + return f_wash (b); + } ++strong_alias (__ieee754_sqrt, __sqrt_finite) +Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c +=================================================================== +--- libc.orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c ++++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c +@@ -37,14 +37,8 @@ static const float threehalf = 1.5; + We find the reciprocal square root and use that to compute the actual + square root. */ + +-#ifdef __STDC__ + float + __ieee754_sqrtf (float b) +-#else +-float +-__ieee754_sqrtf (b) +- float b; +-#endif + { + if (__builtin_expect (b > 0, 1)) + { +@@ -99,3 +93,4 @@ __ieee754_sqrtf (b) + } + return f_washf (b); + } ++strong_alias (__ieee754_sqrtf, __sqrtf_finite) +Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c +=================================================================== +--- libc.orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c ++++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c +@@ -39,14 +39,8 @@ static const float half = 0.5; + We find the actual square root and half of its reciprocal + simultaneously. */ + +-#ifdef __STDC__ + double + __ieee754_sqrt (double b) +-#else +-double +-__ieee754_sqrt (b) +- double b; +-#endif + { + if (__builtin_expect (b > 0, 1)) + { +@@ -132,3 +126,4 @@ __ieee754_sqrt (b) + } + return f_wash (b); + } ++strong_alias (__ieee754_sqrt, __sqrt_finite) +Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c +=================================================================== +--- libc.orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c ++++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c +@@ -37,14 +37,8 @@ static const float threehalf = 1.5; + We find the reciprocal square root and use that to compute the actual + square root. */ + +-#ifdef __STDC__ + float + __ieee754_sqrtf (float b) +-#else +-float +-__ieee754_sqrtf (b) +- float b; +-#endif + { + if (__builtin_expect (b > 0, 1)) + { +@@ -99,3 +93,4 @@ __ieee754_sqrtf (b) + } + return f_washf (b); + } ++strong_alias (__ieee754_sqrtf, __sqrtf_finite) +Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c +=================================================================== +--- libc.orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c ++++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c +@@ -132,3 +132,4 @@ __ieee754_sqrt (b) + } + return f_wash (b); + } ++strong_alias (__ieee754_sqrt, __sqrt_finite) +Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c +=================================================================== +--- libc.orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c ++++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c +@@ -99,3 +99,4 @@ __ieee754_sqrtf (b) + } + return f_washf (b); + } ++strong_alias (__ieee754_sqrtf, __sqrtf_finite) +Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c +=================================================================== +--- libc.orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c ++++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c +@@ -132,3 +132,4 @@ __ieee754_sqrt (b) + } + return f_wash (b); + } ++strong_alias (__ieee754_sqrt, __sqrt_finite) +Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c +=================================================================== +--- libc.orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c ++++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c +@@ -99,3 +99,4 @@ __ieee754_sqrtf (b) + } + return f_washf (b); + } ++strong_alias (__ieee754_sqrtf, __sqrtf_finite) +Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c +=================================================================== +--- libc.orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c ++++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c +@@ -132,3 +132,4 @@ __ieee754_sqrt (b) + } + return f_wash (b); + } ++strong_alias (__ieee754_sqrt, __sqrt_finite) +Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c +=================================================================== +--- libc.orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c ++++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c +@@ -99,3 +99,4 @@ __ieee754_sqrtf (b) + } + return f_washf (b); + } ++strong_alias (__ieee754_sqrtf, __sqrtf_finite) +Index: libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c +=================================================================== +--- libc.orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c ++++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c +@@ -132,3 +132,4 @@ __ieee754_sqrt (b) + } + return f_wash (b); + } ++strong_alias (__ieee754_sqrt, __sqrt_finite) +Index: libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c +=================================================================== +--- libc.orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c ++++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c +@@ -99,3 +99,4 @@ __ieee754_sqrtf (b) + } + return f_washf (b); + } ++strong_alias (__ieee754_sqrtf, __sqrtf_finite) diff --git a/meta/recipes-core/eglibc/eglibc-2.19/ppc_slow_ieee754_sqrt.patch b/meta/recipes-core/eglibc/eglibc-2.19/ppc_slow_ieee754_sqrt.patch new file mode 100644 index 0000000000..60532cbd03 --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-2.19/ppc_slow_ieee754_sqrt.patch @@ -0,0 +1,365 @@ + __ieee754_sqrt{,f} are now inline functions and call out __slow versions + + +Signed-off-by: Khem Raj +Upstream-Status: Pending +Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c +=================================================================== +--- libc.orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c ++++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c +@@ -40,7 +40,7 @@ static const float half = 0.5; + simultaneously. */ + + double +-__ieee754_sqrt (double b) ++__slow_ieee754_sqrt (double b) + { + if (__builtin_expect (b > 0, 1)) + { +@@ -77,7 +77,7 @@ __ieee754_sqrt (double b) + + /* Handle small numbers by scaling. */ + if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) +- return __ieee754_sqrt (b * two108) * twom54; ++ return __slow_ieee754_sqrt (b * two108) * twom54; + + #define FMADD(a_, c_, b_) \ + ({ double __r; \ +@@ -126,4 +126,12 @@ __ieee754_sqrt (double b) + } + return f_wash (b); + } ++ ++#undef __ieee754_sqrt ++double ++__ieee754_sqrt (double x) ++{ ++ return __slow_ieee754_sqrt (x); ++} ++ + strong_alias (__ieee754_sqrt, __sqrt_finite) +Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c +=================================================================== +--- libc.orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c ++++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c +@@ -38,7 +38,7 @@ static const float threehalf = 1.5; + square root. */ + + float +-__ieee754_sqrtf (float b) ++__slow_ieee754_sqrtf (float b) + { + if (__builtin_expect (b > 0, 1)) + { +@@ -93,4 +93,10 @@ __ieee754_sqrtf (float b) + } + return f_washf (b); + } ++#undef __ieee754_sqrtf ++float ++__ieee754_sqrtf (float x) ++{ ++ return __slow_ieee754_sqrtf (x); ++} + strong_alias (__ieee754_sqrtf, __sqrtf_finite) +Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c +=================================================================== +--- libc.orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c ++++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c +@@ -40,7 +40,7 @@ static const float half = 0.5; + simultaneously. */ + + double +-__ieee754_sqrt (double b) ++__slow_ieee754_sqrt (double b) + { + if (__builtin_expect (b > 0, 1)) + { +@@ -77,7 +77,7 @@ __ieee754_sqrt (double b) + + /* Handle small numbers by scaling. */ + if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) +- return __ieee754_sqrt (b * two108) * twom54; ++ return __slow_ieee754_sqrt (b * two108) * twom54; + + #define FMADD(a_, c_, b_) \ + ({ double __r; \ +@@ -126,4 +126,12 @@ __ieee754_sqrt (double b) + } + return f_wash (b); + } ++ ++#undef __ieee754_sqrt ++double ++__ieee754_sqrt (double x) ++{ ++ return __slow_ieee754_sqrt (x); ++} ++ + strong_alias (__ieee754_sqrt, __sqrt_finite) +Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c +=================================================================== +--- libc.orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c ++++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c +@@ -38,7 +38,7 @@ static const float threehalf = 1.5; + square root. */ + + float +-__ieee754_sqrtf (float b) ++__slow_ieee754_sqrtf (float b) + { + if (__builtin_expect (b > 0, 1)) + { +@@ -93,4 +93,11 @@ __ieee754_sqrtf (float b) + } + return f_washf (b); + } ++#undef __ieee754_sqrtf ++float ++__ieee754_sqrtf (float x) ++{ ++ return __slow_ieee754_sqrtf (x); ++} ++ + strong_alias (__ieee754_sqrtf, __sqrtf_finite) +Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c +=================================================================== +--- libc.orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c ++++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c +@@ -41,10 +41,10 @@ static const float half = 0.5; + + #ifdef __STDC__ + double +-__ieee754_sqrt (double b) ++__slow_ieee754_sqrt (double b) + #else + double +-__ieee754_sqrt (b) ++__slow_ieee754_sqrt (b) + double b; + #endif + { +@@ -83,7 +83,7 @@ __ieee754_sqrt (b) + + /* Handle small numbers by scaling. */ + if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) +- return __ieee754_sqrt (b * two108) * twom54; ++ return __slow_ieee754_sqrt (b * two108) * twom54; + + #define FMADD(a_, c_, b_) \ + ({ double __r; \ +@@ -132,4 +132,12 @@ __ieee754_sqrt (b) + } + return f_wash (b); + } ++ ++#undef __ieee754_sqrt ++double ++__ieee754_sqrt (double x) ++{ ++ return __slow_ieee754_sqrt (x); ++} ++ + strong_alias (__ieee754_sqrt, __sqrt_finite) +Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c +=================================================================== +--- libc.orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c ++++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c +@@ -39,10 +39,10 @@ static const float threehalf = 1.5; + + #ifdef __STDC__ + float +-__ieee754_sqrtf (float b) ++__slow_ieee754_sqrtf (float b) + #else + float +-__ieee754_sqrtf (b) ++__slow_ieee754_sqrtf (b) + float b; + #endif + { +@@ -99,4 +99,12 @@ __ieee754_sqrtf (b) + } + return f_washf (b); + } ++ ++#undef __ieee754_sqrtf ++float ++__ieee754_sqrtf (float x) ++{ ++ return __slow_ieee754_sqrtf (x); ++} ++ + strong_alias (__ieee754_sqrtf, __sqrtf_finite) +Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c +=================================================================== +--- libc.orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c ++++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c +@@ -41,10 +41,10 @@ static const float half = 0.5; + + #ifdef __STDC__ + double +-__ieee754_sqrt (double b) ++__slow_ieee754_sqrt (double b) + #else + double +-__ieee754_sqrt (b) ++__slow_ieee754_sqrt (b) + double b; + #endif + { +@@ -83,7 +83,7 @@ __ieee754_sqrt (b) + + /* Handle small numbers by scaling. */ + if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) +- return __ieee754_sqrt (b * two108) * twom54; ++ return __slow_ieee754_sqrt (b * two108) * twom54; + + #define FMADD(a_, c_, b_) \ + ({ double __r; \ +@@ -132,4 +132,12 @@ __ieee754_sqrt (b) + } + return f_wash (b); + } ++ ++#undef __ieee754_sqrt ++double ++__ieee754_sqrt (double x) ++{ ++ return __slow_ieee754_sqrt (x); ++} ++ + strong_alias (__ieee754_sqrt, __sqrt_finite) +Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c +=================================================================== +--- libc.orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c ++++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c +@@ -39,10 +39,10 @@ static const float threehalf = 1.5; + + #ifdef __STDC__ + float +-__ieee754_sqrtf (float b) ++__slow_ieee754_sqrtf (float b) + #else + float +-__ieee754_sqrtf (b) ++__slow_ieee754_sqrtf (b) + float b; + #endif + { +@@ -99,4 +99,12 @@ __ieee754_sqrtf (b) + } + return f_washf (b); + } ++ ++#undef __ieee754_sqrtf ++float ++__ieee754_sqrtf (float x) ++{ ++ return __slow_ieee754_sqrtf (x); ++} ++ + strong_alias (__ieee754_sqrtf, __sqrtf_finite) +Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c +=================================================================== +--- libc.orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c ++++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c +@@ -41,10 +41,10 @@ static const float half = 0.5; + + #ifdef __STDC__ + double +-__ieee754_sqrt (double b) ++__slow_ieee754_sqrt (double b) + #else + double +-__ieee754_sqrt (b) ++__slow_ieee754_sqrt (b) + double b; + #endif + { +@@ -83,7 +83,7 @@ __ieee754_sqrt (b) + + /* Handle small numbers by scaling. */ + if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) +- return __ieee754_sqrt (b * two108) * twom54; ++ return __slow_ieee754_sqrt (b * two108) * twom54; + + #define FMADD(a_, c_, b_) \ + ({ double __r; \ +@@ -132,4 +132,12 @@ __ieee754_sqrt (b) + } + return f_wash (b); + } ++ ++#undef __ieee754_sqrt ++double ++__ieee754_sqrt (double x) ++{ ++ return __slow_ieee754_sqrt (x); ++} ++ + strong_alias (__ieee754_sqrt, __sqrt_finite) +Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c +=================================================================== +--- libc.orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c ++++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c +@@ -39,10 +39,10 @@ static const float threehalf = 1.5; + + #ifdef __STDC__ + float +-__ieee754_sqrtf (float b) ++__slow_ieee754_sqrtf (float b) + #else + float +-__ieee754_sqrtf (b) ++__slow_ieee754_sqrtf (b) + float b; + #endif + { +@@ -99,4 +99,12 @@ __ieee754_sqrtf (b) + } + return f_washf (b); + } ++ ++#undef __ieee754_sqrtf ++float ++__ieee754_sqrtf (float x) ++{ ++ return __slow_ieee754_sqrtf (x); ++} ++ + strong_alias (__ieee754_sqrtf, __sqrtf_finite) +Index: libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c +=================================================================== +--- libc.orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c ++++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c +@@ -132,4 +132,12 @@ __ieee754_sqrt (b) + } + return f_wash (b); + } ++ ++#undef __ieee754_sqrt ++double ++__ieee754_sqrt (double x) ++{ ++ return __slow_ieee754_sqrt (x); ++} ++ + strong_alias (__ieee754_sqrt, __sqrt_finite) +Index: libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c +=================================================================== +--- libc.orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c ++++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c +@@ -99,4 +99,12 @@ __ieee754_sqrtf (b) + } + return f_washf (b); + } ++ ++#undef __ieee754_sqrtf ++float ++__ieee754_sqrtf (float x) ++{ ++ return __slow_ieee754_sqrtf (x); ++} ++ + strong_alias (__ieee754_sqrtf, __sqrtf_finite) diff --git a/meta/recipes-core/eglibc/eglibc-2.19/relocatable_sdk.patch b/meta/recipes-core/eglibc/eglibc-2.19/relocatable_sdk.patch new file mode 100644 index 0000000000..ca5f17ba58 --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-2.19/relocatable_sdk.patch @@ -0,0 +1,108 @@ +Upstream-Status: Inappropriate [SDK specific] + +This patch puts the dynamic loader path in the binaries, SYSTEM_DIRS strings +and lengths as well as ld.so.cache path in the dynamic loader to specific +sections in memory. The sections that contain paths have been allocated a 4096 +byte section, which is the maximum path length in linux. This will allow the +relocating script to parse the ELF binary, detect the section and easily replace +the strings in a certain path. + +Signed-off-by: Laurentiu Palcu + +Index: libc/elf/interp.c +=================================================================== +--- libc.orig/elf/interp.c ++++ libc/elf/interp.c +@@ -16,5 +16,5 @@ + License along with the GNU C Library; if not, see + . */ + +-const char __invoke_dynamic_linker__[] __attribute__ ((section (".interp"))) ++const char __invoke_dynamic_linker__[4096] __attribute__ ((section (".interp"))) + = RUNTIME_LINKER; +Index: libc/elf/dl-load.c +=================================================================== +--- libc.orig/elf/dl-load.c ++++ libc/elf/dl-load.c +@@ -144,8 +144,8 @@ static size_t max_capstrlen attribute_re + /* Get the generated information about the trusted directories. */ + #include "trusted-dirs.h" + +-static const char system_dirs[] = SYSTEM_DIRS; +-static const size_t system_dirs_len[] = ++static const char system_dirs[4096] __attribute__ ((section (".sysdirs"))) = SYSTEM_DIRS; ++volatile static const size_t system_dirs_len[] __attribute__ ((section (".sysdirslen"))) = + { + SYSTEM_DIRS_LEN + }; +Index: libc/elf/dl-cache.c +=================================================================== +--- libc.orig/elf/dl-cache.c ++++ libc/elf/dl-cache.c +@@ -133,6 +133,10 @@ do \ + while (0) + + ++const char LD_SO_CACHE[4096] __attribute__ ((section (".ldsocache"))) = ++ SYSCONFDIR "/ld.so.cache"; ++ ++ + int + internal_function + _dl_cache_libcmp (const char *p1, const char *p2) +Index: libc/elf/ldconfig.c +=================================================================== +--- libc.orig/elf/ldconfig.c ++++ libc/elf/ldconfig.c +@@ -166,6 +166,9 @@ static struct argp argp = + options, parse_opt, NULL, doc, NULL, more_help, NULL + }; + ++ ++extern const char LD_SO_CACHE[4096] __attribute__ ((section (".ldsocache"))); ++ + /* Check if string corresponds to an important hardware capability or + a platform. */ + static int +Index: libc/sysdeps/generic/dl-cache.h +=================================================================== +--- libc.orig/sysdeps/generic/dl-cache.h ++++ libc/sysdeps/generic/dl-cache.h +@@ -27,10 +27,6 @@ + ((flags) == 1 || (flags) == _DL_CACHE_DEFAULT_ID) + #endif + +-#ifndef LD_SO_CACHE +-# define LD_SO_CACHE SYSCONFDIR "/ld.so.cache" +-#endif +- + #ifndef add_system_dir + # define add_system_dir(dir) add_dir (dir) + #endif +Index: libc/elf/rtld.c +=================================================================== +--- libc.orig/elf/rtld.c ++++ libc/elf/rtld.c +@@ -99,6 +99,7 @@ uintptr_t __pointer_chk_guard_local + strong_alias (__pointer_chk_guard_local, __pointer_chk_guard) + #endif + ++extern const char LD_SO_CACHE[4096] __attribute__ ((section (".ldsocache"))); + + /* List of auditing DSOs. */ + static struct audit_list +@@ -1031,12 +1032,12 @@ of this helper program; chances are you + --list list all dependencies and how they are resolved\n\ + --verify verify that given object really is a dynamically linked\n\ + object we can handle\n\ +- --inhibit-cache Do not use " LD_SO_CACHE "\n\ ++ --inhibit-cache Do not use %s\n\ + --library-path PATH use given PATH instead of content of the environment\n\ + variable LD_LIBRARY_PATH\n\ + --inhibit-rpath LIST ignore RUNPATH and RPATH information in object names\n\ + in LIST\n\ +- --audit LIST use objects named in LIST as auditors\n"); ++ --audit LIST use objects named in LIST as auditors\n", LD_SO_CACHE); + + ++_dl_skip_args; + --_dl_argc; diff --git a/meta/recipes-core/eglibc/eglibc-2.19/relocatable_sdk_fix_openpath.patch b/meta/recipes-core/eglibc/eglibc-2.19/relocatable_sdk_fix_openpath.patch new file mode 100644 index 0000000000..f164f8f9ae --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-2.19/relocatable_sdk_fix_openpath.patch @@ -0,0 +1,41 @@ +Upstream-Status: Inappropriate [SDK specific] + +eglibc-nativesdk: Fix buffer overrun with a relocated SDK + +When ld-linux-*.so.2 is relocated to a path that is longer than the +original fixed location, the dynamic loader will crash in open_path +because it implicitly assumes that max_dirnamelen is a fixed size that +never changes. + +The allocated buffer will not be large enough to contain the directory +path string which is larger than the fixed location provided at build +time. + +Signed-off-by: Jason Wessel + +--- + elf/dl-load.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +--- a/elf/dl-load.c ++++ b/elf/dl-load.c +@@ -1919,7 +1919,19 @@ open_path (const char *name, size_t name + given on the command line when rtld is run directly. */ + return -1; + ++ do ++ { ++ struct r_search_path_elem *this_dir = *dirs; ++ if (this_dir->dirnamelen > max_dirnamelen) ++ { ++ max_dirnamelen = this_dir->dirnamelen; ++ } ++ } ++ while (*++dirs != NULL); ++ + buf = alloca (max_dirnamelen + max_capstrlen + namelen); ++ ++ dirs = sps->dirs; + do + { + struct r_search_path_elem *this_dir = *dirs; diff --git a/meta/recipes-core/eglibc/eglibc-initial_2.18.bb b/meta/recipes-core/eglibc/eglibc-initial_2.18.bb deleted file mode 100644 index de45079603..0000000000 --- a/meta/recipes-core/eglibc/eglibc-initial_2.18.bb +++ /dev/null @@ -1,11 +0,0 @@ -require eglibc_${PV}.bb -require eglibc-initial.inc - -DEPENDS += "kconfig-frontends-native" - -# main eglibc recipes muck with TARGET_CPPFLAGS to point into -# final target sysroot but we -# are not there when building eglibc-initial -# so reset it here - -TARGET_CPPFLAGS = "" diff --git a/meta/recipes-core/eglibc/eglibc-initial_2.19.bb b/meta/recipes-core/eglibc/eglibc-initial_2.19.bb new file mode 100644 index 0000000000..de45079603 --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-initial_2.19.bb @@ -0,0 +1,11 @@ +require eglibc_${PV}.bb +require eglibc-initial.inc + +DEPENDS += "kconfig-frontends-native" + +# main eglibc recipes muck with TARGET_CPPFLAGS to point into +# final target sysroot but we +# are not there when building eglibc-initial +# so reset it here + +TARGET_CPPFLAGS = "" diff --git a/meta/recipes-core/eglibc/eglibc-locale_2.18.bb b/meta/recipes-core/eglibc/eglibc-locale_2.18.bb deleted file mode 100644 index ce6c1d2320..0000000000 --- a/meta/recipes-core/eglibc/eglibc-locale_2.18.bb +++ /dev/null @@ -1 +0,0 @@ -require eglibc-locale.inc diff --git a/meta/recipes-core/eglibc/eglibc-locale_2.19.bb b/meta/recipes-core/eglibc/eglibc-locale_2.19.bb new file mode 100644 index 0000000000..ce6c1d2320 --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-locale_2.19.bb @@ -0,0 +1 @@ +require eglibc-locale.inc diff --git a/meta/recipes-core/eglibc/eglibc-mtrace_2.18.bb b/meta/recipes-core/eglibc/eglibc-mtrace_2.18.bb deleted file mode 100644 index 6fa2be9cc9..0000000000 --- a/meta/recipes-core/eglibc/eglibc-mtrace_2.18.bb +++ /dev/null @@ -1 +0,0 @@ -require eglibc-mtrace.inc diff --git a/meta/recipes-core/eglibc/eglibc-mtrace_2.19.bb b/meta/recipes-core/eglibc/eglibc-mtrace_2.19.bb new file mode 100644 index 0000000000..6fa2be9cc9 --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-mtrace_2.19.bb @@ -0,0 +1 @@ +require eglibc-mtrace.inc diff --git a/meta/recipes-core/eglibc/eglibc-scripts_2.18.bb b/meta/recipes-core/eglibc/eglibc-scripts_2.18.bb deleted file mode 100644 index 31133621d1..0000000000 --- a/meta/recipes-core/eglibc/eglibc-scripts_2.18.bb +++ /dev/null @@ -1 +0,0 @@ -require eglibc-scripts.inc diff --git a/meta/recipes-core/eglibc/eglibc-scripts_2.19.bb b/meta/recipes-core/eglibc/eglibc-scripts_2.19.bb new file mode 100644 index 0000000000..31133621d1 --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-scripts_2.19.bb @@ -0,0 +1 @@ +require eglibc-scripts.inc diff --git a/meta/recipes-core/eglibc/eglibc_2.18.bb b/meta/recipes-core/eglibc/eglibc_2.18.bb deleted file mode 100644 index 15e5eed3ff..0000000000 --- a/meta/recipes-core/eglibc/eglibc_2.18.bb +++ /dev/null @@ -1,149 +0,0 @@ -require eglibc.inc - -DEPENDS += "gperf-native kconfig-frontends-native" - -SRC_URI = "http://downloads.yoctoproject.org/releases/eglibc/eglibc-${PV}-svnr23787.tar.bz2 \ - file://eglibc-svn-arm-lowlevellock-include-tls.patch \ - file://IO-acquire-lock-fix.patch \ - file://mips-rld-map-check.patch \ - file://etc/ld.so.conf \ - file://generate-supported.mk \ - file://glibc.fix_sqrt2.patch \ - file://multilib_readlib.patch \ - file://ppc-sqrt_finite.patch \ - file://GLRO_dl_debug_mask.patch \ - file://initgroups_keys.patch \ - file://eglibc_fix_findidx_parameters.patch \ - file://ppc_slow_ieee754_sqrt.patch \ - file://fileops-without-wchar-io.patch \ - file://add_resource_h_to_wait_h.patch \ - file://0001-eglibc-menuconfig-support.patch \ - file://0002-eglibc-menuconfig-hex-string-options.patch \ - file://0003-eglibc-menuconfig-build-instructions.patch \ - file://fsl-ppc-no-fsqrt.patch \ - file://0001-R_ARM_TLS_DTPOFF32.patch \ - file://tzselect-sh.patch \ - file://tzselect-awk.patch \ - file://0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \ - file://fix-tibetian-locales.patch \ - file://0001-ARM-Pass-dl_hwcap-to-IFUNC-resolver.patch \ - file://make-4.patch \ - " -SRC_URI[md5sum] = "b395b021422a027d89884992e91734fc" -SRC_URI[sha256sum] = "15f564b45dc5dd65faf0875579e3447961ae61e876933384ae05d19328539ad4" - -LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \ - file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \ - file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \ - file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff " - -SRC_URI_append_class-nativesdk = " file://ld-search-order.patch \ - file://relocatable_sdk.patch \ - file://relocatable_sdk_fix_openpath.patch \ - " -S = "${WORKDIR}/eglibc-${PV}/libc" -B = "${WORKDIR}/build-${TARGET_SYS}" - -PACKAGES_DYNAMIC = "" - -# the -isystem in bitbake.conf screws up glibc do_stage -BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}" -TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir}" - -GLIBC_BROKEN_LOCALES = " _ER _ET so_ET yn_ER sid_ET tr_TR mn_MN gez_ET gez_ER bn_BD te_IN es_CR.ISO-8859-1" - -FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/eglibc-${PV}', '${FILE_DIRNAME}/eglibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}" - -# -# For now, we will skip building of a gcc package if it is a uclibc one -# and our build is not a uclibc one, and we skip a glibc one if our build -# is a uclibc build. -# -# See the note in gcc/gcc_3.4.0.oe -# - -python __anonymous () { - import re - uc_os = (re.match('.*uclibc$', d.getVar('TARGET_OS', True)) != None) - if uc_os: - raise bb.parse.SkipPackage("incompatible with target %s" % - d.getVar('TARGET_OS', True)) -} - -export libc_cv_slibdir = "${base_libdir}" - -EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \ - --without-cvs --disable-profile \ - --disable-debug --without-gd \ - --enable-clocale=gnu \ - --enable-add-ons \ - --with-headers=${STAGING_INCDIR} \ - --without-selinux \ - --enable-obsolete-rpc \ - --with-kconfig=${STAGING_BINDIR_NATIVE} \ - ${GLIBC_EXTRA_OECONF}" - -EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}" - -do_patch_append() { - bb.build.exec_func('do_fix_readlib_c', d) -} - -# for mips eglibc now builds syscall tables for all abi's -# so we make sure that we choose right march option which is -# compatible with o32,n32 and n64 abi's -# e.g. -march=mips32 is not compatible with n32 and n64 therefore -# we filter it out in such case -march=from-abi which will be -# mips1 when using o32 and mips3 when using n32/n64 - -TUNE_CCARGS_mips := "${@oe_filter_out('-march=mips32', '${TUNE_CCARGS}', d)}" -TUNE_CCARGS_mipsel := "${@oe_filter_out('-march=mips32', '${TUNE_CCARGS}', d)}" - -do_fix_readlib_c () { - sed -i -e 's#OECORE_KNOWN_INTERPRETER_NAMES#${EGLIBC_KNOWN_INTERPRETER_NAMES}#' ${S}/elf/readlib.c -} - -do_configure () { -# override this function to avoid the autoconf/automake/aclocal/autoheader -# calls for now -# don't pass CPPFLAGS into configure, since it upsets the kernel-headers -# version check and doesn't really help with anything - if [ -z "`which rpcgen`" ]; then - echo "rpcgen not found. Install glibc-devel." - exit 1 - fi - (cd ${S} && gnu-configize) || die "failure in running gnu-configize" - find ${S} -name "configure" | xargs touch - CPPFLAGS="" oe_runconf -} - -rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \ - yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \ - rusers.x spray.x nfs_prot.x rquota.x key_prot.x" - -do_compile () { - # -Wl,-rpath-link /lib in LDFLAGS can cause breakage if another glibc is in staging - unset LDFLAGS - base_do_compile - ( - cd ${S}/sunrpc/rpcsvc - for r in ${rpcsvc}; do - h=`echo $r|sed -e's,\.x$,.h,'` - rpcgen -h $r -o $h || bbwarn "unable to generate header for $r" - done - ) - echo "Adjust ldd script" - if [ -n "${RTLDLIST}" ] - then - prevrtld=`cat ${B}/elf/ldd | grep "^RTLDLIST=" | sed 's#^RTLDLIST="\?\([^"]*\)"\?$#\1#'` - if [ "${prevrtld}" != "${RTLDLIST}" ] - then - sed -i ${B}/elf/ldd -e "s#^RTLDLIST=.*\$#RTLDLIST=\"${prevrtld} ${RTLDLIST}\"#" - fi - fi - -} - -require eglibc-package.inc - -BBCLASSEXTEND = "nativesdk" diff --git a/meta/recipes-core/eglibc/eglibc_2.19.bb b/meta/recipes-core/eglibc/eglibc_2.19.bb new file mode 100644 index 0000000000..7e582b6308 --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc_2.19.bb @@ -0,0 +1,145 @@ +require eglibc.inc + +DEPENDS += "gperf-native kconfig-frontends-native" + +SRC_URI = "http://sakrah.homelinux.org/files/eglibc-${PV}-svnr25243.tar.bz2 \ + file://eglibc-svn-arm-lowlevellock-include-tls.patch \ + file://IO-acquire-lock-fix.patch \ + file://mips-rld-map-check.patch \ + file://etc/ld.so.conf \ + file://generate-supported.mk \ + file://glibc.fix_sqrt2.patch \ + file://multilib_readlib.patch \ + file://ppc-sqrt_finite.patch \ + file://GLRO_dl_debug_mask.patch \ + file://initgroups_keys.patch \ + file://eglibc_fix_findidx_parameters.patch \ + file://ppc_slow_ieee754_sqrt.patch \ + file://fileops-without-wchar-io.patch \ + file://add_resource_h_to_wait_h.patch \ + file://0001-eglibc-menuconfig-support.patch \ + file://0002-eglibc-menuconfig-hex-string-options.patch \ + file://0003-eglibc-menuconfig-build-instructions.patch \ + file://fsl-ppc-no-fsqrt.patch \ + file://0001-R_ARM_TLS_DTPOFF32.patch \ + file://0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \ + file://fix-tibetian-locales.patch \ + " +SRC_URI[md5sum] = "197836c2ba42fb146e971222647198dd" +SRC_URI[sha256sum] = "baaa030531fc308f7820c46acdf8e1b2f8e3c1f40bcd28b6e440d1c95d170d4c" + +LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \ + file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \ + file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c" + +SRC_URI_append_class-nativesdk = " file://ld-search-order.patch \ + file://relocatable_sdk.patch \ + file://relocatable_sdk_fix_openpath.patch \ + " +S = "${WORKDIR}/eglibc-${PV}/libc" +B = "${WORKDIR}/build-${TARGET_SYS}" + +PACKAGES_DYNAMIC = "" + +# the -isystem in bitbake.conf screws up glibc do_stage +BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}" +TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir}" + +GLIBC_BROKEN_LOCALES = " _ER _ET so_ET yn_ER sid_ET tr_TR mn_MN gez_ET gez_ER bn_BD te_IN es_CR.ISO-8859-1" + +FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/eglibc-${PV}', '${FILE_DIRNAME}/eglibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}" + +# +# For now, we will skip building of a gcc package if it is a uclibc one +# and our build is not a uclibc one, and we skip a glibc one if our build +# is a uclibc build. +# +# See the note in gcc/gcc_3.4.0.oe +# + +python __anonymous () { + import re + uc_os = (re.match('.*uclibc$', d.getVar('TARGET_OS', True)) != None) + if uc_os: + raise bb.parse.SkipPackage("incompatible with target %s" % + d.getVar('TARGET_OS', True)) +} + +export libc_cv_slibdir = "${base_libdir}" + +EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \ + --without-cvs --disable-profile \ + --disable-debug --without-gd \ + --enable-clocale=gnu \ + --enable-add-ons \ + --with-headers=${STAGING_INCDIR} \ + --without-selinux \ + --enable-obsolete-rpc \ + --with-kconfig=${STAGING_BINDIR_NATIVE} \ + ${GLIBC_EXTRA_OECONF}" + +EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}" + +do_patch_append() { + bb.build.exec_func('do_fix_readlib_c', d) +} + +# for mips eglibc now builds syscall tables for all abi's +# so we make sure that we choose right march option which is +# compatible with o32,n32 and n64 abi's +# e.g. -march=mips32 is not compatible with n32 and n64 therefore +# we filter it out in such case -march=from-abi which will be +# mips1 when using o32 and mips3 when using n32/n64 + +TUNE_CCARGS_mips := "${@oe_filter_out('-march=mips32', '${TUNE_CCARGS}', d)}" +TUNE_CCARGS_mipsel := "${@oe_filter_out('-march=mips32', '${TUNE_CCARGS}', d)}" + +do_fix_readlib_c () { + sed -i -e 's#OECORE_KNOWN_INTERPRETER_NAMES#${EGLIBC_KNOWN_INTERPRETER_NAMES}#' ${S}/elf/readlib.c +} + +do_configure () { +# override this function to avoid the autoconf/automake/aclocal/autoheader +# calls for now +# don't pass CPPFLAGS into configure, since it upsets the kernel-headers +# version check and doesn't really help with anything + if [ -z "`which rpcgen`" ]; then + echo "rpcgen not found. Install glibc-devel." + exit 1 + fi + (cd ${S} && gnu-configize) || die "failure in running gnu-configize" + find ${S} -name "configure" | xargs touch + CPPFLAGS="" oe_runconf +} + +rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \ + yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \ + rusers.x spray.x nfs_prot.x rquota.x key_prot.x" + +do_compile () { + # -Wl,-rpath-link /lib in LDFLAGS can cause breakage if another glibc is in staging + unset LDFLAGS + base_do_compile + ( + cd ${S}/sunrpc/rpcsvc + for r in ${rpcsvc}; do + h=`echo $r|sed -e's,\.x$,.h,'` + rpcgen -h $r -o $h || bbwarn "unable to generate header for $r" + done + ) + echo "Adjust ldd script" + if [ -n "${RTLDLIST}" ] + then + prevrtld=`cat ${B}/elf/ldd | grep "^RTLDLIST=" | sed 's#^RTLDLIST="\?\([^"]*\)"\?$#\1#'` + if [ "${prevrtld}" != "${RTLDLIST}" ] + then + sed -i ${B}/elf/ldd -e "s#^RTLDLIST=.*\$#RTLDLIST=\"${prevrtld} ${RTLDLIST}\"#" + fi + fi + +} + +require eglibc-package.inc + +BBCLASSEXTEND = "nativesdk" -- cgit v1.2.3