glibc: Upgrade 2.21 -> 2.22

- git'ify the OE patches
- add_resource_h_to_wait_h.patch - dropped, we do not support that old
  perf anymore
- mips-rld-map-check.patch - Dropped because binutils is fixed for it
  see https://sourceware.org/ml/binutils/2011-12/msg00112.html
- initgroups_keys.patch - Folded into
  0026-eglibc-Forward-port-eglibc-options-groups-support.patch

Change-Id: Ib8e731b212f52b8ff12e2180babbc19970fb1ef1
(From OE-Core rev: 6ea08396dbb628140fd3289fc9fb19df97914326)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Khem Raj 2015-03-18 02:05:06 +00:00 committed by Richard Purdie
parent 0183d7c406
commit cb7368c110
48 changed files with 4767 additions and 4376 deletions

View File

@ -26,7 +26,7 @@ GCCVERSION ?= "4.9%"
SDKGCCVERSION ?= "${GCCVERSION}"
BINUVERSION ?= "2.25%"
GDBVERSION ?= "7.9%"
GLIBCVERSION ?= "2.21"
GLIBCVERSION ?= "2.22"
UCLIBCVERSION ?= "0.9.33+git%"
LINUXLIBCVERSION ?= "4.1"

View File

@ -1,56 +0,0 @@
SUMMARY = "Cross locale generation tool for glibc"
HOMEPAGE = "http://www.gnu.org/software/libc/libc.html"
SECTION = "libs"
LICENSE = "LGPL-2.1"
LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
inherit native
inherit autotools
FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/glibc:"
BRANCH = "release/${PV}/master"
SRC_URI = "git://sourceware.org/git/glibc.git;branch=${BRANCH};name=glibc \
git://github.com/kraj/localedef;branch=master;name=localedef;destsuffix=git/localedef \
file://fix_for_centos_5.8.patch \
${EGLIBCPATCHES} \
"
EGLIBCPATCHES = "\
file://timezone-re-written-tzselect-as-posix-sh.patch \
file://eglibc.patch \
file://option-groups.patch \
file://GLRO_dl_debug_mask.patch \
file://eglibc-header-bootstrap.patch \
file://eglibc-resolv-dynamic.patch \
file://eglibc-ppc8xx-cache-line-workaround.patch \
file://eglibc-sh4-fpscr_values.patch \
file://eglibc-use-option-groups.patch \
"
SRCREV_glibc = "4e42b5b8f89f0e288e68be7ad70f9525aebc2cff"
SRCREV_localedef = "c833367348d39dad7ba018990bfdaffaec8e9ed3"
# Makes for a rather long rev (22 characters), but...
#
SRCREV_FORMAT = "glibc_localedef"
S = "${WORKDIR}/git"
EXTRA_OECONF = "--with-glibc=${S}"
CFLAGS += "-fgnu89-inline -std=gnu99 -DIS_IN\(x\)='0'"
do_configure () {
${S}/localedef/configure ${EXTRA_OECONF}
}
do_install() {
install -d ${D}${bindir}
install -m 0755 ${B}/localedef ${D}${bindir}/cross-localedef
}

View File

@ -0,0 +1,59 @@
SUMMARY = "Cross locale generation tool for glibc"
HOMEPAGE = "http://www.gnu.org/software/libc/libc.html"
SECTION = "libs"
LICENSE = "LGPL-2.1"
LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
inherit native
inherit autotools
FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/glibc:"
BRANCH ?= "release/${PV}/master"
GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
SRC_URI = "${GLIBC_GIT_URI};branch=${BRANCH};name=glibc \
git://github.com/kraj/localedef;branch=master;name=localedef;destsuffix=git/localedef \
file://fix_for_centos_5.8.patch \
${EGLIBCPATCHES} \
"
EGLIBCPATCHES = "\
file://0017-timezone-re-written-tzselect-as-posix-sh.patch \
file://0018-eglibc-Cross-building-and-testing-instructions.patch \
file://0019-eglibc-Bring-Eglibc-option-group-infrastructure-to-g.patch \
file://0020-eglibc-Help-bootstrap-cross-toolchain.patch \
file://0021-eglibc-cherry-picked-from-http-www.eglibc.org-archiv.patch \
file://0022-eglibc-Clear-cache-lines-on-ppc8xx.patch \
file://0023-eglibc-Resolve-__fpscr_values-on-SH4.patch \
file://0024-eglibc-Forward-port-eglibc-options-groups-support.patch \
file://0025-eglibc-Install-PIC-archives.patch \
file://0026-eglibc-dl_debug_mask-is-controlled-by-__OPTION_EGLIB.patch \
file://0027-eglibc-use-option-groups-Conditionally-exclude-c-tes.patch \
"
SRCREV_glibc ?= "a34d1c6afc86521d6ad17662a3b5362d8481514c"
SRCREV_localedef ?= "c833367348d39dad7ba018990bfdaffaec8e9ed3"
# Makes for a rather long rev (22 characters), but...
#
SRCREV_FORMAT = "glibc_localedef"
S = "${WORKDIR}/git"
EXTRA_OECONF = "--with-glibc=${S}"
CFLAGS += "-fgnu89-inline -std=gnu99 -DIS_IN\(x\)='0'"
do_configure () {
${S}/localedef/configure ${EXTRA_OECONF}
}
do_install() {
install -d ${D}${bindir}
install -m 0755 ${B}/localedef ${D}${bindir}/cross-localedef
}

View File

@ -1,3 +1,9 @@
From 0876fea1b5b26da84f298714a2e23ba696607dba Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 01:48:24 +0000
Subject: [PATCH 01/27] nativesdk-glibc: Look for host system ld.so.cache as
well
Upstream-Status: Inappropriate [embedded specific]
The default lib search path order is:
@ -7,23 +13,28 @@ The default lib search path order is:
3) ld.so.cache
4) default search paths embedded in the linker
For nativesdk binaries which are being used alongside binaries on a host system, we
For nativesdk binaries which are being used alongside binaries on a host system, we
need the search paths to firstly search the shipped nativesdk libs but then also
cover the host system. For example we want the host system's libGL and this may be
in a non-standard location like /usr/lib/mesa. The only place the location is know
in a non-standard location like /usr/lib/mesa. The only place the location is know
about is in the ld.so.cache of the host system.
Since nativesdk has a simple structure and doesn't need to use a cache itself, we
repurpose the cache for use as a last resort in finding host system binaries. This
Since nativesdk has a simple structure and doesn't need to use a cache itself, we
repurpose the cache for use as a last resort in finding host system binaries. This
means we need to switch the order of 3 and 4 above to make this work effectively.
RP 14/10/2010
Index: git/elf/dl-load.c
===================================================================
--- git.orig/elf/dl-load.c 2014-08-28 17:32:46.292070587 -0700
+++ git/elf/dl-load.c 2014-08-28 17:33:56.048070587 -0700
@@ -2050,7 +2050,14 @@
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
elf/dl-load.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 0c052e4..f45085a 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -2040,7 +2040,14 @@ _dl_map_object (struct link_map *loader, const char *name,
fd = open_path (name, namelen, mode,
&loader->l_runpath_dirs, &realname, &fb, loader,
LA_SER_RUNPATH, &found_other_class);
@ -39,7 +50,7 @@ Index: git/elf/dl-load.c
#ifdef USE_LDCONFIG
if (fd == -1
&& (__glibc_likely ((mode & __RTLD_SECURE) == 0)
@@ -2113,14 +2120,6 @@
@@ -2099,14 +2106,6 @@ _dl_map_object (struct link_map *loader, const char *name,
}
#endif
@ -52,5 +63,8 @@ Index: git/elf/dl-load.c
- &realname, &fb, l, LA_SER_DEFAULT, &found_other_class);
-
/* Add another newline when we are tracing the library loading. */
if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS))
if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
_dl_debug_printf ("\n");
--
2.1.4

View File

@ -1,6 +1,8 @@
Upstream-Status: Inappropriate [SDK specific]
eglibc-nativesdk: Fix buffer overrun with a relocated SDK
From 086b65d9aacffc47fcd8df68818a476a5ae76fa1 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 01:50:00 +0000
Subject: [PATCH 02/27] nativesdk-glibc: Fix buffer overrun with a relocated
SDK
When ld-linux-*.so.2 is relocated to a path that is longer than the
original fixed location, the dynamic loader will crash in open_path
@ -11,15 +13,19 @@ The allocated buffer will not be large enough to contain the directory
path string which is larger than the fixed location provided at build
time.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Upstream-Status: Inappropriate [OE SDK specific]
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
elf/dl-load.c | 12 ++++++++++++
elf/dl-load.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/elf/dl-load.c b/elf/dl-load.c
index f45085a..f1eb5ed 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -1919,7 +1919,19 @@ open_path (const char *name, size_t name
@@ -1765,7 +1765,19 @@ open_path (const char *name, size_t namelen, int mode,
given on the command line when rtld is run directly. */
return -1;
@ -39,3 +45,6 @@ Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
do
{
struct r_search_path_elem *this_dir = *dirs;
--
2.1.4

View File

@ -1,4 +1,8 @@
Upstream-Status: Inappropriate [SDK specific]
From fd595a5ec885bcb4c14417daa21c2e61c5b72e42 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 01:51:38 +0000
Subject: [PATCH 03/27] nativesdk-glibc: Raise the size of arrays containing dl
paths
This patch puts the dynamic loader path in the binaries, SYSTEM_DIRS strings
and lengths as well as ld.so.cache path in the dynamic loader to specific
@ -7,39 +11,24 @@ 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 <laurentiu.palcu@intel.com>
Upstream-Status: Inappropriate [SDK specific]
Index: libc/elf/interp.c
===================================================================
--- libc.orig/elf/interp.c
+++ libc/elf/interp.c
@@ -16,5 +16,5 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-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 \
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
elf/dl-cache.c | 4 ++++
elf/dl-load.c | 4 ++--
elf/interp.c | 2 +-
elf/ldconfig.c | 3 +++
elf/rtld.c | 5 +++--
sysdeps/generic/dl-cache.h | 4 ----
6 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/elf/dl-cache.c b/elf/dl-cache.c
index dec49bc..862f1d8 100644
--- a/elf/dl-cache.c
+++ b/elf/dl-cache.c
@@ -132,6 +132,10 @@ do \
while (0)
@ -50,11 +39,37 @@ Index: libc/elf/dl-cache.c
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 =
diff --git a/elf/dl-load.c b/elf/dl-load.c
index f1eb5ed..f664f50 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -104,8 +104,8 @@ static size_t max_capstrlen attribute_relro;
/* Get the generated information about the trusted directories. */
#include "trusted-dirs.h"
-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
};
diff --git a/elf/interp.c b/elf/interp.c
index 422ea95e..6d61a36 100644
--- a/elf/interp.c
+++ b/elf/interp.c
@@ -18,5 +18,5 @@
#include <runtime-linker.h>
-const char __invoke_dynamic_linker__[] __attribute__ ((section (".interp")))
+const char __invoke_dynamic_linker__[4096] __attribute__ ((section (".interp")))
= RUNTIME_LINKER;
diff --git a/elf/ldconfig.c b/elf/ldconfig.c
index f54ec22..0e78a83 100644
--- a/elf/ldconfig.c
+++ b/elf/ldconfig.c
@@ -167,6 +167,9 @@ static struct argp argp =
options, parse_opt, NULL, doc, NULL, more_help, NULL
};
@ -64,25 +79,10 @@ Index: libc/elf/ldconfig.c
/* Check if string corresponds to an important hardware capability or
a platform. */
static int
Index: libc/sysdeps/generic/dl-cache.h
===================================================================
--- libc.orig/sysdeps/generic/dl-cache.h
+++ libc/sysdeps/generic/dl-cache.h
@@ -27,10 +27,6 @@
((flags) == 1 || (flags) == _DL_CACHE_DEFAULT_ID)
#endif
-#ifndef LD_SO_CACHE
-# define LD_SO_CACHE SYSCONFDIR "/ld.so.cache"
-#endif
-
#ifndef add_system_dir
# define add_system_dir(dir) add_dir (dir)
#endif
Index: libc/elf/rtld.c
===================================================================
--- libc.orig/elf/rtld.c
+++ libc/elf/rtld.c
diff --git a/elf/rtld.c b/elf/rtld.c
index 69873c2..6d3add7 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -99,6 +99,7 @@ uintptr_t __pointer_chk_guard_local
strong_alias (__pointer_chk_guard_local, __pointer_chk_guard)
#endif
@ -91,7 +91,7 @@ Index: libc/elf/rtld.c
/* List of auditing DSOs. */
static struct audit_list
@@ -1031,12 +1032,12 @@ of this helper program; chances are you
@@ -877,12 +878,12 @@ of this helper program; chances are you did not intend to run this program.\n\
--list list all dependencies and how they are resolved\n\
--verify verify that given object really is a dynamically linked\n\
object we can handle\n\
@ -106,3 +106,21 @@ Index: libc/elf/rtld.c
++_dl_skip_args;
--_dl_argc;
diff --git a/sysdeps/generic/dl-cache.h b/sysdeps/generic/dl-cache.h
index 4b49869..1800d03 100644
--- a/sysdeps/generic/dl-cache.h
+++ b/sysdeps/generic/dl-cache.h
@@ -27,10 +27,6 @@
((flags) == 1 || (flags) == _DL_CACHE_DEFAULT_ID)
#endif
-#ifndef LD_SO_CACHE
-# define LD_SO_CACHE SYSCONFDIR "/ld.so.cache"
-#endif
-
#ifndef add_system_dir
# define add_system_dir(dir) add_dir (dir)
#endif
--
2.1.4

View File

@ -0,0 +1,34 @@
From 2560b564b5674bf2990e5607f6342c1647a5dc4f Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 8 Mar 2015 04:01:01 +0000
Subject: [PATCH 04/27] Backport
https://sourceware.org/ml/libc-ports/2007-12/msg00000.html
Upstream-Status: Pending
2007-12-03 Kristian Van Der Vliet <vanders@liqwyd.com>
* bits/stdio-lock.h (_IO_acquire_lock_clear_flags2): Define
Signed-off-by: Kristian Van Der Vliet <vanders@liqwyd.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
bits/stdio-lock.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/bits/stdio-lock.h b/bits/stdio-lock.h
index 0c5bb65..66304a6 100644
--- a/bits/stdio-lock.h
+++ b/bits/stdio-lock.h
@@ -49,6 +49,8 @@ __libc_lock_define_recursive (typedef, _IO_lock_t)
_IO_cleanup_region_start ((void (*) (void *)) _IO_funlockfile, (_fp)); \
_IO_flockfile (_fp)
+# define _IO_acquire_lock_clear_flags2(_fp) _IO_acquire_lock (_fp)
+
# define _IO_release_lock(_fp) \
_IO_funlockfile (_fp); \
_IO_cleanup_region_end (0)
--
2.1.4

View File

@ -1,10 +1,57 @@
Signed-of-by: Edmar Wienskoski <edmar@freescale.com>
Upstream-Status: Pending
From aa0cd82892f32e58602143c697ef0524696a6428 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:01:50 +0000
Subject: [PATCH 05/27] fsl e500/e5500/e6500/603e fsqrt implementation
Index: git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c 2014-08-29 10:34:07.768070587 -0700
Upstream-Status: Pending
Signed-off-by: Edmar Wienskoski <edmar@freescale.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | 134 +++++++++++++++++++++
sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | 101 ++++++++++++++++
sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | 134 +++++++++++++++++++++
sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | 101 ++++++++++++++++
sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | 134 +++++++++++++++++++++
sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | 101 ++++++++++++++++
sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | 134 +++++++++++++++++++++
sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | 101 ++++++++++++++++
sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | 134 +++++++++++++++++++++
sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | 101 ++++++++++++++++
sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | 134 +++++++++++++++++++++
sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | 101 ++++++++++++++++
.../sysv/linux/powerpc/powerpc32/603e/fpu/Implies | 1 +
.../linux/powerpc/powerpc32/e300c3/fpu/Implies | 2 +
.../linux/powerpc/powerpc32/e500mc/fpu/Implies | 1 +
.../sysv/linux/powerpc/powerpc32/e5500/fpu/Implies | 1 +
.../sysv/linux/powerpc/powerpc32/e6500/fpu/Implies | 1 +
.../sysv/linux/powerpc/powerpc64/e5500/fpu/Implies | 1 +
.../sysv/linux/powerpc/powerpc64/e6500/fpu/Implies | 1 +
19 files changed, 1418 insertions(+)
create mode 100644 sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
create mode 100644 sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
create mode 100644 sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
create mode 100644 sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
create mode 100644 sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
create mode 100644 sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
create mode 100644 sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
create mode 100644 sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
create mode 100644 sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
create mode 100644 sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
create mode 100644 sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
create mode 100644 sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies
create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies
create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies
create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies
create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies
create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies
create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies
diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
new file mode 100644
index 0000000..71e516d
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
@@ -0,0 +1,134 @@
+/* Double-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@ -140,10 +187,11 @@ Index: git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
+ }
+ return f_wash (b);
+}
Index: git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c 2014-08-29 10:34:07.768070587 -0700
diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
new file mode 100644
index 0000000..26fa067
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
@@ -0,0 +1,101 @@
+/* Single-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@ -246,10 +294,11 @@ Index: git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
+ }
+ return f_washf (b);
+}
Index: git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c 2014-08-29 10:34:07.768070587 -0700
diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
new file mode 100644
index 0000000..71e516d
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
@@ -0,0 +1,134 @@
+/* Double-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@ -385,10 +434,11 @@ Index: git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
+ }
+ return f_wash (b);
+}
Index: git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c 2014-08-29 10:34:07.772070587 -0700
diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
new file mode 100644
index 0000000..26fa067
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
@@ -0,0 +1,101 @@
+/* Single-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@ -491,10 +541,11 @@ Index: git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
+ }
+ return f_washf (b);
+}
Index: git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c 2014-08-29 10:34:07.772070587 -0700
diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
new file mode 100644
index 0000000..71e516d
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
@@ -0,0 +1,134 @@
+/* Double-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@ -630,10 +681,11 @@ Index: git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
+ }
+ return f_wash (b);
+}
Index: git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c 2014-08-29 10:34:07.772070587 -0700
diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
new file mode 100644
index 0000000..26fa067
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
@@ -0,0 +1,101 @@
+/* Single-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@ -736,10 +788,11 @@ Index: git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
+ }
+ return f_washf (b);
+}
Index: git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c 2014-08-29 10:34:07.772070587 -0700
diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
new file mode 100644
index 0000000..71e516d
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
@@ -0,0 +1,134 @@
+/* Double-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@ -875,10 +928,11 @@ Index: git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
+ }
+ return f_wash (b);
+}
Index: git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c 2014-08-29 10:34:07.772070587 -0700
diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
new file mode 100644
index 0000000..26fa067
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
@@ -0,0 +1,101 @@
+/* Single-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@ -981,10 +1035,11 @@ Index: git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
+ }
+ return f_washf (b);
+}
Index: git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c 2014-08-29 10:34:07.772070587 -0700
diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
new file mode 100644
index 0000000..71e516d
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
@@ -0,0 +1,134 @@
+/* Double-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@ -1120,10 +1175,11 @@ Index: git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
+ }
+ return f_wash (b);
+}
Index: git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c 2014-08-29 10:34:07.772070587 -0700
diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
new file mode 100644
index 0000000..26fa067
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
@@ -0,0 +1,101 @@
+/* Single-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@ -1226,10 +1282,11 @@ Index: git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
+ }
+ return f_washf (b);
+}
Index: git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c 2014-08-29 10:34:07.772070587 -0700
diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
new file mode 100644
index 0000000..71e516d
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
@@ -0,0 +1,134 @@
+/* Double-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@ -1365,10 +1422,11 @@ Index: git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
+ }
+ return f_wash (b);
+}
Index: git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c 2014-08-29 10:34:07.776070587 -0700
diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
new file mode 100644
index 0000000..26fa067
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
@@ -0,0 +1,101 @@
+/* Single-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@ -1471,46 +1529,56 @@ Index: git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
+ }
+ return f_washf (b);
+}
Index: git/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ git/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies 2014-08-29 10:34:07.776070587 -0700
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies
new file mode 100644
index 0000000..b103b4d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies
@@ -0,0 +1 @@
+powerpc/powerpc32/603e/fpu
Index: git/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ git/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies 2014-08-29 10:34:07.776070587 -0700
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies
new file mode 100644
index 0000000..64db17f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies
@@ -0,0 +1,2 @@
+# e300c3 is a variant of 603e so use the same optimizations for sqrt
+powerpc/powerpc32/603e/fpu
Index: git/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ git/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies 2014-08-29 10:34:07.776070587 -0700
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies
new file mode 100644
index 0000000..7eac5fc
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies
@@ -0,0 +1 @@
+powerpc/powerpc32/e500mc/fpu
Index: git/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ git/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies 2014-08-29 10:34:07.776070587 -0700
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies
new file mode 100644
index 0000000..264b2a7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies
@@ -0,0 +1 @@
+powerpc/powerpc32/e5500/fpu
Index: git/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ git/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies 2014-08-29 10:34:07.776070587 -0700
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies
new file mode 100644
index 0000000..a259344
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies
@@ -0,0 +1 @@
+powerpc/powerpc32/e6500/fpu
Index: git/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ git/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies 2014-08-29 10:34:07.780070587 -0700
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies
new file mode 100644
index 0000000..a7bc854
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies
@@ -0,0 +1 @@
+powerpc/powerpc64/e5500/fpu
Index: git/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ git/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies 2014-08-29 10:34:07.780070587 -0700
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies
new file mode 100644
index 0000000..04ff8cc
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies
@@ -0,0 +1 @@
+powerpc/powerpc64/e6500/fpu
--
2.1.4

View File

@ -0,0 +1,33 @@
From 5ec1bc5172851278231ce940b68b35ce9cbf8500 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:11:22 +0000
Subject: [PATCH 06/27] readlib: Add OECORE_KNOWN_INTERPRETER_NAMES to known
names
This bolts in a hook for OE to pass its own version of interpreter
names into glibc especially for multilib case, where it differs from any
other distros
Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
elf/readlib.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/elf/readlib.c b/elf/readlib.c
index 7fd5b8a..2f5da9f 100644
--- a/elf/readlib.c
+++ b/elf/readlib.c
@@ -51,6 +51,7 @@ static struct known_names interpreters[] =
#ifdef SYSDEP_KNOWN_INTERPRETER_NAMES
SYSDEP_KNOWN_INTERPRETER_NAMES
#endif
+ OECORE_KNOWN_INTERPRETER_NAMES
};
static struct known_names known_libs[] =
--
2.1.4

View File

@ -0,0 +1,208 @@
From ea98b1a12b5f779fd79478ff930a79ef60387851 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:15:07 +0000
Subject: [PATCH 07/27] ppc/sqrt: Fix undefined reference to `__sqrt_finite'
on ppc fixes the errors like below
| ./.libs/libpulsecore-1.1.so: undefined reference to `__sqrt_finite'
| collect2: ld returned 1 exit status
Upstream-Status: Pending
ChangeLog
2012-01-06 Khem Raj <raj.khem@gmail.com>
* 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.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | 7 +------
sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | 7 +------
sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | 1 +
sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | 1 +
sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | 1 +
sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | 1 +
sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | 1 +
sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | 1 +
sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | 7 +------
sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | 7 +------
sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | 1 +
sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | 1 +
12 files changed, 12 insertions(+), 24 deletions(-)
diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
index 71e516d..1795fd6 100644
--- a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
@@ -39,14 +39,8 @@ static const float half = 0.5;
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)
diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
index 26fa067..a917f31 100644
--- a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
@@ -37,14 +37,8 @@ static const float threehalf = 1.5;
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)
diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
index 71e516d..fc4a749 100644
--- a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
@@ -132,3 +132,4 @@ __ieee754_sqrt (b)
}
return f_wash (b);
}
+strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
index 26fa067..9d17512 100644
--- a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
@@ -99,3 +99,4 @@ __ieee754_sqrtf (b)
}
return f_washf (b);
}
+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
index 71e516d..fc4a749 100644
--- a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
@@ -132,3 +132,4 @@ __ieee754_sqrt (b)
}
return f_wash (b);
}
+strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
index 26fa067..9d17512 100644
--- a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
@@ -99,3 +99,4 @@ __ieee754_sqrtf (b)
}
return f_washf (b);
}
+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
index 71e516d..fc4a749 100644
--- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
@@ -132,3 +132,4 @@ __ieee754_sqrt (b)
}
return f_wash (b);
}
+strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
index 26fa067..9d17512 100644
--- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
@@ -99,3 +99,4 @@ __ieee754_sqrtf (b)
}
return f_washf (b);
}
+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
index 71e516d..1795fd6 100644
--- a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
@@ -39,14 +39,8 @@ static const float half = 0.5;
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)
diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
index 26fa067..a917f31 100644
--- a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
@@ -37,14 +37,8 @@ static const float threehalf = 1.5;
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)
diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
index 71e516d..fc4a749 100644
--- a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
@@ -132,3 +132,4 @@ __ieee754_sqrt (b)
}
return f_wash (b);
}
+strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
index 26fa067..9d17512 100644
--- a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
@@ -99,3 +99,4 @@ __ieee754_sqrtf (b)
}
return f_washf (b);
}
+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
--
2.1.4

View File

@ -1,13 +1,32 @@
__ieee754_sqrt{,f} are now inline functions and call out __slow versions
From 2456ea44aeeedae87edb522f77a7969d636399b0 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:16:38 +0000
Subject: [PATCH 08/27] __ieee754_sqrt{,f} are now inline functions and call
out __slow versions
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Pending
Index: git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
===================================================================
--- git.orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c 2014-08-29 10:35:02.616070587 -0700
+++ git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c 2014-08-29 10:35:02.604070587 -0700
@@ -40,7 +40,7 @@
---
sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | 12 ++++++++++--
sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | 8 +++++++-
sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | 14 +++++++++++---
sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | 12 ++++++++++--
sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | 14 +++++++++++---
sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | 12 ++++++++++--
sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | 8 ++++++++
sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | 8 ++++++++
sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | 12 ++++++++++--
sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | 9 ++++++++-
sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | 14 +++++++++++---
sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | 12 ++++++++++--
12 files changed, 114 insertions(+), 21 deletions(-)
diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
index 1795fd6..daa83f3 100644
--- a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
@@ -40,7 +40,7 @@ static const float half = 0.5;
simultaneously. */
double
@ -16,7 +35,7 @@ Index: git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
{
if (__builtin_expect (b > 0, 1))
{
@@ -77,7 +77,7 @@
@@ -77,7 +77,7 @@ __ieee754_sqrt (double b)
/* Handle small numbers by scaling. */
if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
@ -25,7 +44,7 @@ Index: git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
#define FMADD(a_, c_, b_) \
({ double __r; \
@@ -126,4 +126,12 @@
@@ -126,4 +126,12 @@ __ieee754_sqrt (double b)
}
return f_wash (b);
}
@ -38,11 +57,11 @@ Index: git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
+}
+
strong_alias (__ieee754_sqrt, __sqrt_finite)
Index: git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
===================================================================
--- git.orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c 2014-08-29 10:35:02.616070587 -0700
+++ git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c 2014-08-29 10:35:02.604070587 -0700
@@ -38,7 +38,7 @@
diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
index a917f31..b812cf1 100644
--- a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
@@ -38,7 +38,7 @@ static const float threehalf = 1.5;
square root. */
float
@ -51,7 +70,7 @@ Index: git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
{
if (__builtin_expect (b > 0, 1))
{
@@ -93,4 +93,10 @@
@@ -93,4 +93,10 @@ __ieee754_sqrtf (float b)
}
return f_washf (b);
}
@ -62,20 +81,24 @@ Index: git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
+ return __slow_ieee754_sqrtf (x);
+}
strong_alias (__ieee754_sqrtf, __sqrtf_finite)
Index: git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
===================================================================
--- git.orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c 2014-08-29 10:35:02.616070587 -0700
+++ git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c 2014-08-29 10:35:02.604070587 -0700
@@ -40,7 +40,7 @@
simultaneously. */
diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
index fc4a749..7038a70 100644
--- a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
@@ -41,10 +41,10 @@ static const float half = 0.5;
#ifdef __STDC__
double
-__ieee754_sqrt (double b)
+__slow_ieee754_sqrt (double b)
#else
double
-__ieee754_sqrt (b)
+__slow_ieee754_sqrt (b)
double b;
#endif
{
if (__builtin_expect (b > 0, 1))
{
@@ -77,7 +77,7 @@
@@ -83,7 +83,7 @@ __ieee754_sqrt (b)
/* Handle small numbers by scaling. */
if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
@ -84,7 +107,175 @@ Index: git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
#define FMADD(a_, c_, b_) \
({ double __r; \
@@ -126,4 +126,12 @@
@@ -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)
diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
index 9d17512..10de1f0 100644
--- a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
@@ -39,10 +39,10 @@ static const float threehalf = 1.5;
#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)
diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
index fc4a749..7038a70 100644
--- a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
@@ -41,10 +41,10 @@ static const float half = 0.5;
#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)
diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
index 9d17512..10de1f0 100644
--- a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
@@ -39,10 +39,10 @@ static const float threehalf = 1.5;
#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)
diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
index fc4a749..1c34244 100644
--- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
@@ -132,4 +132,12 @@ __ieee754_sqrt (b)
}
return f_wash (b);
}
+
+#undef __ieee754_sqrt
+double
+__ieee754_sqrt (double x)
+{
+ return __slow_ieee754_sqrt (x);
+}
+
strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
index 9d17512..8126535 100644
--- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
@@ -99,4 +99,12 @@ __ieee754_sqrtf (b)
}
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/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
index 1795fd6..13a8197 100644
--- a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
@@ -40,7 +40,7 @@ static const float half = 0.5;
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);
}
@ -97,11 +288,11 @@ Index: git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
+}
+
strong_alias (__ieee754_sqrt, __sqrt_finite)
Index: git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
===================================================================
--- git.orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c 2014-08-29 10:35:02.616070587 -0700
+++ git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c 2014-08-29 10:35:02.604070587 -0700
@@ -38,7 +38,7 @@
diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
index a917f31..fae2d81 100644
--- a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
@@ -38,7 +38,7 @@ static const float threehalf = 1.5;
square root. */
float
@ -110,7 +301,7 @@ Index: git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
{
if (__builtin_expect (b > 0, 1))
{
@@ -93,4 +93,11 @@
@@ -93,4 +93,11 @@ __ieee754_sqrtf (float b)
}
return f_washf (b);
}
@ -122,11 +313,11 @@ Index: git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
+}
+
strong_alias (__ieee754_sqrtf, __sqrtf_finite)
Index: git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
===================================================================
--- git.orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c 2014-08-29 10:35:02.616070587 -0700
+++ git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c 2014-08-29 10:35:02.604070587 -0700
@@ -41,10 +41,10 @@
diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
index fc4a749..7038a70 100644
--- a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
@@ -41,10 +41,10 @@ static const float half = 0.5;
#ifdef __STDC__
double
@ -139,7 +330,7 @@ Index: git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
double b;
#endif
{
@@ -83,7 +83,7 @@
@@ -83,7 +83,7 @@ __ieee754_sqrt (b)
/* Handle small numbers by scaling. */
if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
@ -148,7 +339,7 @@ Index: git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
#define FMADD(a_, c_, b_) \
({ double __r; \
@@ -132,4 +132,12 @@
@@ -132,4 +132,12 @@ __ieee754_sqrt (b)
}
return f_wash (b);
}
@ -161,11 +352,11 @@ Index: git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
+}
+
strong_alias (__ieee754_sqrt, __sqrt_finite)
Index: git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
===================================================================
--- git.orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c 2014-08-29 10:35:02.616070587 -0700
+++ git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c 2014-08-29 10:35:02.604070587 -0700
@@ -39,10 +39,10 @@
diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
index 9d17512..10de1f0 100644
--- a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
@@ -39,10 +39,10 @@ static const float threehalf = 1.5;
#ifdef __STDC__
float
@ -178,179 +369,7 @@ Index: git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
float b;
#endif
{
@@ -99,4 +99,12 @@
}
return f_washf (b);
}
+
+#undef __ieee754_sqrtf
+float
+__ieee754_sqrtf (float x)
+{
+ return __slow_ieee754_sqrtf (x);
+}
+
strong_alias (__ieee754_sqrtf, __sqrtf_finite)
Index: git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
===================================================================
--- git.orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c 2014-08-29 10:35:02.616070587 -0700
+++ git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c 2014-08-29 10:35:02.608070587 -0700
@@ -41,10 +41,10 @@
#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 @@
/* 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 @@
}
return f_wash (b);
}
+
+#undef __ieee754_sqrt
+double
+__ieee754_sqrt (double x)
+{
+ return __slow_ieee754_sqrt (x);
+}
+
strong_alias (__ieee754_sqrt, __sqrt_finite)
Index: git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
===================================================================
--- git.orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c 2014-08-29 10:35:02.616070587 -0700
+++ git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c 2014-08-29 10:35:02.608070587 -0700
@@ -39,10 +39,10 @@
#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 @@
}
return f_washf (b);
}
+
+#undef __ieee754_sqrtf
+float
+__ieee754_sqrtf (float x)
+{
+ return __slow_ieee754_sqrtf (x);
+}
+
strong_alias (__ieee754_sqrtf, __sqrtf_finite)
Index: git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
===================================================================
--- git.orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c 2014-08-29 10:35:02.616070587 -0700
+++ git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c 2014-08-29 10:35:02.608070587 -0700
@@ -41,10 +41,10 @@
#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 @@
/* 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 @@
}
return f_wash (b);
}
+
+#undef __ieee754_sqrt
+double
+__ieee754_sqrt (double x)
+{
+ return __slow_ieee754_sqrt (x);
+}
+
strong_alias (__ieee754_sqrt, __sqrt_finite)
Index: git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
===================================================================
--- git.orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c 2014-08-29 10:35:02.616070587 -0700
+++ git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c 2014-08-29 10:35:02.608070587 -0700
@@ -39,10 +39,10 @@
#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 @@
}
return f_washf (b);
}
+
+#undef __ieee754_sqrtf
+float
+__ieee754_sqrtf (float x)
+{
+ return __slow_ieee754_sqrtf (x);
+}
+
strong_alias (__ieee754_sqrtf, __sqrtf_finite)
Index: git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
===================================================================
--- git.orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c 2014-08-29 10:35:02.616070587 -0700
+++ git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c 2014-08-29 10:35:02.608070587 -0700
@@ -132,4 +132,12 @@
}
return f_wash (b);
}
+
+#undef __ieee754_sqrt
+double
+__ieee754_sqrt (double x)
+{
+ return __slow_ieee754_sqrt (x);
+}
+
strong_alias (__ieee754_sqrt, __sqrt_finite)
Index: git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
===================================================================
--- git.orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c 2014-08-29 10:35:02.616070587 -0700
+++ git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c 2014-08-29 10:35:02.608070587 -0700
@@ -99,4 +99,12 @@
@@ -99,4 +99,12 @@ __ieee754_sqrtf (b)
}
return f_washf (b);
}
@ -363,3 +382,6 @@ Index: git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
+}
+
strong_alias (__ieee754_sqrtf, __sqrtf_finite)
--
2.1.4

View File

@ -1,21 +1,24 @@
Quote from bug 1443 which explains what the patch does :
From acf7a028817e71eb99d785037659abd4d120ffe2 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:20:09 +0000
Subject: [PATCH 09/27] 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
@ -24,7 +27,7 @@ Quote from bug 1443 which explains what the patch does :
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
@ -36,16 +39,16 @@ Quote from bug 1443 which explains what the patch does :
Upstream-Status: Pending
Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../libc/ports/sysdeps/arm/dl-machine.h | 2 +-
sysdeps/arm/dl-machine.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
ndex 8d905e8..dcfa71e 100644
Index: git/sysdeps/arm/dl-machine.h
===================================================================
--- git.orig/sysdeps/arm/dl-machine.h 2014-08-27 05:30:47.748070587 +0000
+++ git/sysdeps/arm/dl-machine.h 2014-08-27 05:30:47.740070587 +0000
@@ -495,7 +495,7 @@
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 6fb20bd..8805537 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -499,7 +499,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
case R_ARM_TLS_DTPOFF32:
if (sym != NULL)
@ -54,3 +57,6 @@ Index: git/sysdeps/arm/dl-machine.h
break;
case R_ARM_TLS_TPOFF32:
--
2.1.4

View File

@ -1,7 +1,7 @@
From 713d822908d1b2ae8403af7f9375c7054ed3dd49 Mon Sep 17 00:00:00 2001
From 017322ee28c1579ce6c81904842aaada9c82403c Mon Sep 17 00:00:00 2001
From: Ting Liu <b28495@freescale.com>
Date: Wed, 19 Dec 2012 04:39:57 -0600
Subject: [PATCH] eglibc: run libm-err-tab.pl with specific dirs in ${S}
Subject: [PATCH 10/27] 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
@ -14,14 +14,14 @@ Upstream-Status: inappropriate [OE specific]
Signed-off-by: Ting Liu <b28495@freescale.com>
---
manual/Makefile | 3 ++-
manual/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: git/manual/Makefile
===================================================================
--- git.orig/manual/Makefile 2014-08-29 10:35:18.728070587 -0700
+++ git/manual/Makefile 2014-08-29 10:35:18.720070587 -0700
@@ -105,7 +105,8 @@
diff --git a/manual/Makefile b/manual/Makefile
index 5382208..6b701b0 100644
--- a/manual/Makefile
+++ b/manual/Makefile
@@ -105,7 +105,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`; \
@ -31,3 +31,6 @@ Index: git/manual/Makefile
$(move-if-change) $(objpfx)libm-err-tmp $(objpfx)libm-err.texi
touch $@
--
2.1.4

View File

@ -0,0 +1,61 @@
From 1be45f870ebbb0259bea5250a6d2c2fbcb33409d Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:24:46 +0000
Subject: [PATCH 11/27] __ieee754_sqrt{,f} are now inline functions and call
out __slow versions
Upstream-Status: Pending
Signed-off-by: chunrong guo <B40290@freescale.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | 6 +++---
sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
index 1c34244..7038a70 100644
--- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
@@ -41,10 +41,10 @@ static const float half = 0.5;
#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; \
diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
index 8126535..10de1f0 100644
--- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
@@ -39,10 +39,10 @@ static const float threehalf = 1.5;
#ifdef __STDC__
float
-__ieee754_sqrtf (float b)
+__slow_ieee754_sqrtf (float b)
#else
float
-__ieee754_sqrtf (b)
+__slow_ieee754_sqrtf (b)
float b;
#endif
{
--
2.1.4

View File

@ -1,16 +1,23 @@
Make ld --version output matching grok gold's output
From 49471ab1f90e392da9520eea831ce8731be9fc8b Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:25:45 +0000
Subject: [PATCH 12/27] Make ld --version output matching grok gold's output
adapted from from upstream branch roland/gold-vs-libc
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Backport
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
configure | 2 +-
configure.ac | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Index: git/configure
===================================================================
--- git.orig/configure
+++ git/configure
@@ -4593,7 +4593,7 @@ else
diff --git a/configure b/configure
index 45cc7cb..7d7299a 100755
--- a/configure
+++ b/configure
@@ -4709,7 +4709,7 @@ else
# Found it, now check the version.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $LD" >&5
$as_echo_n "checking version of $LD... " >&6; }
@ -19,11 +26,11 @@ Index: git/configure
case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*)
Index: git/configure.ac
===================================================================
--- git.orig/configure.ac
+++ git/configure.ac
@@ -913,7 +913,7 @@ AC_CHECK_PROG_VER(AS, $AS, --version,
diff --git a/configure.ac b/configure.ac
index 7e9383a..a467a69 100644
--- a/configure.ac
+++ b/configure.ac
@@ -941,7 +941,7 @@ AC_CHECK_PROG_VER(AS, $AS, --version,
[2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*],
AS=: critic_missing="$critic_missing as")
AC_CHECK_PROG_VER(LD, $LD, --version,
@ -32,3 +39,6 @@ Index: git/configure.ac
[2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*],
LD=: critic_missing="$critic_missing ld")
--
2.1.4

View File

@ -0,0 +1,42 @@
From b55e49b199c46a278ab66b6b1e3eab483b913197 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:27:10 +0000
Subject: [PATCH 13/27] sysdeps/gnu/configure.ac: handle correctly
$libc_cv_rootsbindir
Upstream-Status:Pending
Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
sysdeps/gnu/configure | 2 +-
sysdeps/gnu/configure.ac | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sysdeps/gnu/configure b/sysdeps/gnu/configure
index 9239297..c5ed3ca 100644
--- a/sysdeps/gnu/configure
+++ b/sysdeps/gnu/configure
@@ -32,6 +32,6 @@ case "$prefix" in
else
libc_cv_localstatedir=$localstatedir
fi
- libc_cv_rootsbindir=/sbin
+ test -n "$libc_cv_rootsbindir" || libc_cv_rootsbindir=/sbin
;;
esac
diff --git a/sysdeps/gnu/configure.ac b/sysdeps/gnu/configure.ac
index 634fe4d..3db1697 100644
--- a/sysdeps/gnu/configure.ac
+++ b/sysdeps/gnu/configure.ac
@@ -21,6 +21,6 @@ case "$prefix" in
else
libc_cv_localstatedir=$localstatedir
fi
- libc_cv_rootsbindir=/sbin
+ test -n "$libc_cv_rootsbindir" || libc_cv_rootsbindir=/sbin
;;
esac
--
2.1.4

View File

@ -1,16 +1,14 @@
2015-02-18 Khem Raj <raj.khem@gmail.com>>
* iconv/gconv_charset.h (strip):
Add unused attribute.
From 9c4a91cb331ff1e8cde2314dadee74559d8cb0dd Mon Sep 17 00:00:00 2001
From 0229d6c9c0e7721773118d5ae1d172c269bc9826 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Feb 2015 19:45:31 +0000
Subject: [PATCH] Add unused attribute
Date: Wed, 18 Mar 2015 00:28:41 +0000
Subject: [PATCH 14/27] Add unused attribute
Helps in avoiding gcc warning when header is is included in
a source file which does not use both functions
* iconv/gconv_charset.h (strip):
Add unused attribute.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Pending

View File

@ -1,8 +1,8 @@
From 6f5639f6405ff9a42e4f71e7b0f18bddb68d992a Mon Sep 17 00:00:00 2001
From f058c884dd26d10c94550ca5252ed6576614d659 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 19 Feb 2015 03:23:45 +0000
Subject: [PATCH] When disabling SSE also make sure that fpmath is not set to
use SSE as well
Subject: [PATCH 15/27] When disabling SSE also make sure that fpmath is not
set to use SSE as well
This fixes errors when we inject sse options through CFLAGS and now
that we have -Werror turned on by default this warning turns to become

View File

@ -1,4 +1,7 @@
'yes' within the path sets wrong config variables
From 70199fe59c38b621ab4121d7a55719b2b29b36de Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:31:06 +0000
Subject: [PATCH 16/27] 'yes' within the path sets wrong config variables
It seems that the 'AC_EGREP_CPP(yes...' example is quite popular
but being such a short word to grep it is likely to produce
@ -9,7 +12,22 @@ The change is to use a more elaborated string to grep for.
Upstream-Status: Submitted [libc-alpha@sourceware.org]
Signed-off-by: Benjamin Esquivel <benjamin.esquivel@linux.intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
sysdeps/aarch64/configure | 4 ++--
sysdeps/aarch64/configure.ac | 4 ++--
sysdeps/arm/configure | 4 ++--
sysdeps/arm/configure.ac | 4 ++--
sysdeps/mips/configure | 4 ++--
sysdeps/mips/configure.ac | 4 ++--
sysdeps/nios2/configure | 4 ++--
sysdeps/nios2/configure.ac | 4 ++--
sysdeps/unix/sysv/linux/mips/configure | 4 ++--
sysdeps/unix/sysv/linux/mips/configure.ac | 4 ++--
sysdeps/unix/sysv/linux/powerpc/powerpc64/configure | 8 ++++----
sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac | 8 ++++----
12 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/sysdeps/aarch64/configure b/sysdeps/aarch64/configure
index 5bd355a..3bc5537 100644
--- a/sysdeps/aarch64/configure
@ -45,10 +63,10 @@ index 7851dd4..6e92381 100644
], libc_cv_aarch64_be=yes, libc_cv_aarch64_be=no)])
if test $libc_cv_aarch64_be = yes; then
diff --git a/sysdeps/arm/configure b/sysdeps/arm/configure
index 45667cc..0b2ef11 100644
index 158116b..5eaf54e 100644
--- a/sysdeps/arm/configure
+++ b/sysdeps/arm/configure
@@ -150,12 +150,12 @@ else
@@ -151,12 +151,12 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef __ARM_PCS_VFP
@ -64,10 +82,10 @@ index 45667cc..0b2ef11 100644
else
libc_cv_arm_pcs_vfp=no
diff --git a/sysdeps/arm/configure.ac b/sysdeps/arm/configure.ac
index 002b8ef..e1746a7 100644
index 859c92a..2f4a6e2 100644
--- a/sysdeps/arm/configure.ac
+++ b/sysdeps/arm/configure.ac
@@ -16,8 +16,8 @@ dnl it. Until we do, don't define it.
@@ -15,8 +15,8 @@ AC_DEFINE(PI_STATIC_AND_HIDDEN)
# the dynamic linker via %ifdef.
AC_CACHE_CHECK([whether the compiler is using the ARM hard-float ABI],
[libc_cv_arm_pcs_vfp],
@ -241,5 +259,5 @@ index 0822915..9a32fdd 100644
], libc_cv_ppc64_def_call_elf=yes, libc_cv_ppc64_def_call_elf=no)])
if test $libc_cv_ppc64_def_call_elf = no; then
--
1.8.4.5
2.1.4

View File

@ -1,21 +1,25 @@
timezone: re-written tzselect as posix sh
From c90306107fbbe2979012917e87747ce78c82ab88 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:33:03 +0000
Subject: [PATCH 17/27] timezone: re-written tzselect as posix sh
To avoid the bash dependency.
Upstream-Status: Pending
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
timezone/Makefile | 2 +-
timezone/tzselect.ksh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Index: git/timezone/Makefile
===================================================================
--- git.orig/timezone/Makefile 2014-08-27 05:35:58.008070587 +0000
+++ git/timezone/Makefile 2014-08-27 05:36:37.908070587 +0000
@@ -114,7 +114,7 @@
diff --git a/timezone/Makefile b/timezone/Makefile
index 24c93c6..886b06e 100644
--- a/timezone/Makefile
+++ b/timezone/Makefile
@@ -126,7 +126,7 @@ $(testdata)/XT%: testdata/XT%
cp $< $@
$(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make
- sed -e 's|/bin/bash|$(BASH)|' \
@ -23,11 +27,11 @@ Index: git/timezone/Makefile
-e 's|TZDIR=[^}]*|TZDIR=$(zonedir)|' \
-e '/TZVERSION=/s|see_Makefile|"$(version)"|' \
-e '/PKGVERSION=/s|=.*|="$(PKGVERSION)"|' \
Index: git/timezone/tzselect.ksh
===================================================================
--- git.orig/timezone/tzselect.ksh 2014-08-27 05:35:58.008070587 +0000
+++ git/timezone/tzselect.ksh 2014-08-27 05:35:58.000070587 +0000
@@ -35,7 +35,7 @@
diff --git a/timezone/tzselect.ksh b/timezone/tzselect.ksh
index 9d70691..25f45a8 100755
--- a/timezone/tzselect.ksh
+++ b/timezone/tzselect.ksh
@@ -35,7 +35,7 @@ REPORT_BUGS_TO=tz@iana.org
# Specify default values for environment variables if they are unset.
: ${AWK=awk}
@ -36,3 +40,6 @@ Index: git/timezone/tzselect.ksh
# Check for awk Posix compliance.
($AWK -v x=y 'BEGIN { exit 123 }') </dev/null >/dev/null 2>&1
--
2.1.4

View File

@ -1,15 +1,28 @@
Instruction documents from eglibc
From eff048074ac7b5258bb615e5a5b221daa19b18ae Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:42:58 +0000
Subject: [PATCH 18/27] eglibc: Cross building and testing instructions
Ported from eglibc
Upstream-Status: Pending
Index: git/EGLIBC.cross-building
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ git/EGLIBC.cross-building 2014-08-27 07:27:25.580070587 +0000
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
GLIBC.cross-building | 383 +++++++++++++++++++++++++++++++++++++++++++++++++++
GLIBC.cross-testing | 205 +++++++++++++++++++++++++++
2 files changed, 588 insertions(+)
create mode 100644 GLIBC.cross-building
create mode 100644 GLIBC.cross-testing
diff --git a/GLIBC.cross-building b/GLIBC.cross-building
new file mode 100644
index 0000000..e6e0da1
--- /dev/null
+++ b/GLIBC.cross-building
@@ -0,0 +1,383 @@
+ -*- mode: text -*-
+
+ Cross-Compiling EGLIBC
+ Cross-Compiling GLIBC
+ Jim Blandy <jimb@codesourcery.com>
+
+
@ -39,11 +52,11 @@ Index: git/EGLIBC.cross-building
+library are distributed separately, they are not actually independent
+of each other: GCC requires the C library's headers and some object
+files to compile its own libraries, while the C library depends on
+GCC's libraries. EGLIBC includes features and bug fixes to the stock
+GCC's libraries. GLIBC includes features and bug fixes to the stock
+GNU C library that simplify this process, but the fundamental
+interdependency stands.
+
+In this document, we explain how to cross-compile an EGLIBC/GCC pair
+In this document, we explain how to cross-compile an GLIBC/GCC pair
+from source. Our intended audience is developers who are already
+familiar with the GNU toolchain and comfortable working with
+cross-development tools. While we do present a worked example to
@ -53,7 +66,7 @@ Index: git/EGLIBC.cross-building
+
+Preparation
+
+EGLIBC requires recent versions of the GNU binutils, GCC, and the
+GLIBC requires recent versions of the GNU binutils, GCC, and the
+Linux kernel. The web page <http://www.eglibc.org/prerequisites>
+documents the current requirements, and lists patches needed for
+certain target architectures. As of this writing, these build
@ -61,7 +74,7 @@ Index: git/EGLIBC.cross-building
+and Linux 3.1.
+
+First, let's set some variables, to simplify later commands. We'll
+build EGLIBC and GCC for an ARM target, known to the Linux kernel
+build GLIBC and GCC for an ARM target, known to the Linux kernel
+as 'arm', and we'll do the build on an Intel x86_64 Linux box:
+
+ $ build=x86_64-pc-linux-gnu
@ -77,13 +90,13 @@ Index: git/EGLIBC.cross-building
+
+We're carrying out the entire process under '~/cross-build', which
+contains unpacked source trees for binutils, gcc, and linux kernel,
+along with EGLIBC svn trunk (which can be checked-out with
+along with GLIBC svn trunk (which can be checked-out with
+'svn co http://www.eglibc.org/svn/trunk eglibc'):
+
+ $ top=$HOME/cross-build/$target
+ $ src=$HOME/cross-build/src
+ $ ls $src
+ binutils-2.22.51 eglibc gcc-4.6.2 linux-3.1
+ binutils-2.22.51 glibc gcc-4.6.2 linux-3.1
+
+We're going to place our build directories in a subdirectory 'obj',
+we'll install the cross-development toolchain in 'tools', and we'll
@ -113,7 +126,7 @@ Index: git/EGLIBC.cross-building
+
+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
+'libgcc_s.so', which is compiled against the GLIBC headers (which we
+haven't installed yet) and linked against 'libc.so' (which we haven't
+built yet).
+
@ -146,7 +159,7 @@ Index: git/EGLIBC.cross-building
+
+Linux Kernel Headers
+
+To configure EGLIBC, we also need Linux kernel headers in place.
+To configure GLIBC, we also need Linux kernel headers in place.
+Fortunately, the Linux makefiles have a target that installs them for
+us. Since the process does modify the source tree a bit, we make a
+copy first:
@ -162,20 +175,20 @@ Index: git/EGLIBC.cross-building
+ > INSTALL_HDR_PATH=$sysroot/usr
+
+
+EGLIBC Headers and Preliminary Objects
+GLIBC Headers and Preliminary Objects
+
+Using the cross-compiler we've just built, we can now configure EGLIBC
+Using the cross-compiler we've just built, we can now configure GLIBC
+well enough to install the headers and build the object files that the
+full cross-compiler will need:
+
+ $ mkdir -p $obj/eglibc-headers
+ $ cd $obj/eglibc-headers
+ $ mkdir -p $obj/glibc-headers
+ $ cd $obj/glibc-headers
+ $ BUILD_CC=gcc \
+ > CC=$tools/bin/$target-gcc \
+ > CXX=$tools/bin/$target-g++ \
+ > AR=$tools/bin/$target-ar \
+ > RANLIB=$tools/bin/$target-ranlib \
+ > $src/eglibc/libc/configure \
+ > $src/glibc/libc/configure \
+ > --prefix=/usr \
+ > --with-headers=$sysroot/usr/include \
+ > --build=$build \
@ -184,20 +197,20 @@ Index: git/EGLIBC.cross-building
+ > --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,
+EGLIBC's build system checks whether the prefix is '/usr', and does
+configure GLIBC with a prefix other than '/usr': in various places,
+GLIBC's build system checks whether the prefix is '/usr', and does
+special handling only if that is the case. Unless you use this
+prefix, you will get a sysroot that does not use the standard Linux
+directory layouts and cannot be used as a basis for the root
+filesystem on your target system compatibly with normal GLIBC
+installations.
+
+The '--with-headers' option tells EGLIBC where the Linux headers have
+The '--with-headers' option tells GLIBC where the Linux headers have
+been installed.
+
+The '--enable-add-ons=nptl,libidn,../ports' option tells EGLIBC to look
+The '--enable-add-ons=nptl,libidn,../ports' option tells GLIBC to look
+for the listed glibc add-ons. Most notably the ports add-on (located
+just above the libc sources in the EGLIBC svn tree) is required to
+just above the libc sources in the GLIBC svn tree) is required to
+support ARM targets.
+
+We can now use the 'install-headers' makefile target to install the
@ -230,8 +243,8 @@ Index: git/EGLIBC.cross-building
+
+The Second GCC
+
+With the EGLIBC headers and selected object files installed, we can
+now build a GCC that is capable of compiling EGLIBC. We configure,
+With the GLIBC headers and selected object files installed, we can
+now build a GCC that is capable of compiling GLIBC. We configure,
+build, and install the second GCC, again building only the C compiler,
+and avoiding libraries we won't use:
+
@ -248,19 +261,19 @@ Index: git/EGLIBC.cross-building
+ $ PATH=$tools/bin:$PATH make install
+
+
+EGLIBC, Complete
+GLIBC, Complete
+
+With the second compiler built and installed, we're now ready for the
+full EGLIBC build:
+full GLIBC build:
+
+ $ mkdir -p $obj/eglibc
+ $ cd $obj/eglibc
+ $ mkdir -p $obj/glibc
+ $ cd $obj/glibc
+ $ BUILD_CC=gcc \
+ > CC=$tools/bin/$target-gcc \
+ > CXX=$tools/bin/$target-g++ \
+ > AR=$tools/bin/$target-ar \
+ > RANLIB=$tools/bin/$target-ranlib \
+ > $src/eglibc/libc/configure \
+ > $src/glibc/libc/configure \
+ > --prefix=/usr \
+ > --with-headers=$sysroot/usr/include \
+ > --with-kconfig=$obj/linux/scripts/kconfig \
@ -269,9 +282,9 @@ Index: git/EGLIBC.cross-building
+ > --disable-profile --without-gd --without-cvs \
+ > --enable-add-ons=nptl,libidn,../ports
+
+Note the additional '--with-kconfig' option. This tells EGLIBC where to
+Note the additional '--with-kconfig' option. This tells GLIBC where to
+find the host config tools used by the kernel 'make config' and 'make
+menuconfig'. These tools can be re-used by EGLIBC for its own 'make
+menuconfig'. These tools can be re-used by GLIBC for its own 'make
+*config' support, which will create 'option-groups.config' for you.
+But first make sure those tools have been built by running some
+dummy 'make *config' calls in the kernel directory:
@ -282,15 +295,15 @@ Index: git/EGLIBC.cross-building
+ $ PATH=$tools/bin:$PATH make menuconfig \
+ > ARCH=$linux_arch CROSS_COMPILE=$target- \
+
+Now we can configure and build the full EGLIBC:
+Now we can configure and build the full GLIBC:
+
+ $ cd $obj/eglibc
+ $ cd $obj/glibc
+ $ PATH=$tools/bin:$PATH make defconfig
+ $ PATH=$tools/bin:$PATH make menuconfig
+ $ PATH=$tools/bin:$PATH make
+ $ PATH=$tools/bin:$PATH make install install_root=$sysroot
+
+At this point, we have a complete EGLIBC installation in '$sysroot',
+At this point, we have a complete GLIBC installation in '$sysroot',
+with header files, library files, and most of the C runtime startup
+files in place.
+
@ -314,7 +327,7 @@ Index: git/EGLIBC.cross-building
+
+The '--enable-__cxa_atexit' option tells GCC what sort of C++
+destructor support to expect from the C library; it's required with
+EGLIBC.
+GLIBC.
+
+And since GCC's installation process isn't designed to help construct
+sysroot trees, we must manually copy certain libraries into place in
@ -327,7 +340,7 @@ Index: git/EGLIBC.cross-building
+Trying Things Out
+
+At this point, '$tools' contains a cross toolchain ready to use
+the EGLIBC installation in '$sysroot':
+the GLIBC installation in '$sysroot':
+
+ $ cat > hello.c <<EOF
+ > #include <stdio.h>
@ -371,7 +384,7 @@ Index: git/EGLIBC.cross-building
+
+Looking at the dynamic section of the installed 'libgcc_s.so', we see
+that the 'NEEDED' entry for the C library does include the '.6'
+suffix, indicating that was linked against our fully build EGLIBC, and
+suffix, indicating that was linked against our fully build GLIBC, and
+not our dummy 'libc.so':
+
+ $ $tools/bin/$target-readelf -d $sysroot/lib/libgcc_s.so.1
@ -390,14 +403,15 @@ Index: git/EGLIBC.cross-building
+ $ $sysroot/lib/ld.so.1 --library-path $sysroot/lib:$sysroot/usr/lib \
+ > ./c++-hello
+ Hello, C++ world!
Index: git/EGLIBC.cross-testing
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ git/EGLIBC.cross-testing 2014-08-27 07:24:41.532070587 +0000
diff --git a/GLIBC.cross-testing b/GLIBC.cross-testing
new file mode 100644
index 0000000..b67b468
--- /dev/null
+++ b/GLIBC.cross-testing
@@ -0,0 +1,205 @@
+ -*- mode: text -*-
+
+ Cross-Testing With EGLIBC
+ Cross-Testing With GLIBC
+ Jim Blandy <jimb@codesourcery.com>
+
+
@ -408,7 +422,7 @@ Index: git/EGLIBC.cross-testing
+tests on the embedded system, or perhaps on a simulator. When
+configured for cross-compilation, the stock GNU C library simply
+disables running tests altogether: the command 'make tests' builds
+test programs, but does not run them. EGLIBC, however, provides
+test programs, but does not run them. GLIBC, however, provides
+facilities for compiling tests and generating data files on the build
+system, but running the test programs themselves on a remote system or
+simulator.
@ -416,12 +430,12 @@ Index: git/EGLIBC.cross-testing
+
+Test environment requirements
+
+The test environment must meet certain conditions for EGLIBC's
+The test environment must meet certain conditions for GLIBC's
+cross-testing facilities to work:
+
+- Shared filesystems. The 'build' system, on which you configure and
+ compile EGLIBC, and the 'host' system, on which you intend to run
+ EGLIBC, must share a filesystem containing the EGLIBC build and
+ compile GLIBC, and the 'host' system, on which you intend to run
+ GLIBC, must share a filesystem containing the GLIBC build and
+ source trees. Files must appear at the same paths on both systems.
+
+- Remote-shell like invocation. There must be a way to run a program
@ -432,7 +446,7 @@ Index: git/EGLIBC.cross-testing
+
+Usage
+
+To use EGLIBC's cross-testing support, provide values for the
+To use GLIBC's cross-testing support, provide values for the
+following Make variables when you invoke 'make':
+
+- cross-test-wrapper
@ -443,7 +457,7 @@ Index: git/EGLIBC.cross-testing
+- cross-localedef
+
+ This should be the name of a cross-capable localedef program, like
+ that included in the EGLIBC 'localedef' module, along with any
+ that included in the GLIBC 'localedef' module, along with any
+ arguments needed.
+
+These are each explained in detail below.
@ -475,11 +489,11 @@ Index: git/EGLIBC.cross-testing
+program, having loaded shared libraries from the appropriate
+directories.
+
+To support cross-testing, EGLIBC allows the developer to optionally
+To support cross-testing, GLIBC allows the developer to optionally
+set the 'cross-test-wrapper' Make variable to another wrapper command,
+to which it passes the entire dynamic linker invocation shown above as
+arguments. For example, if the developer supplies a wrapper of
+'my-wrapper hostname', then EGLIBC would run the test above as
+'my-wrapper hostname', then GLIBC would run the test above as
+follows:
+
+ $ my-wrapper hostname \
@ -501,7 +515,7 @@ Index: git/EGLIBC.cross-testing
+ current directory it inherits is also inherited by the dynamic
+ linker (and thus the test program itself).
+
+- It must preserve environment variables' values. Many EGLIBC tests
+- It must preserve environment variables' values. Many GLIBC tests
+ set environment variables for test runs; in native testing, it
+ invokes programs like this:
+
@ -529,7 +543,7 @@ Index: git/EGLIBC.cross-testing
+- It must pass the command's arguments, unmodified. The arguments
+ seen by the test program should be exactly those seen by the wrapper
+ (after whatever arguments are given to the wrapper itself). The
+ EGLIBC test framework performs all needed shell word splitting and
+ GLIBC test framework performs all needed shell word splitting and
+ expansion (wildcard expansion, parameter substitution, and so on)
+ before invoking the wrapper; further expansion may break the tests.
+
@ -537,7 +551,7 @@ Index: git/EGLIBC.cross-testing
+The 'cross-test-ssh.sh' script
+
+If you want to use 'ssh' (or something sufficiently similar) to run
+test programs on your host system, EGLIBC includes a shell script,
+test programs on your host system, GLIBC includes a shell script,
+'scripts/cross-test-ssh.sh', which you can use as your wrapper
+command. This script takes care of setting the test command's current
+directory, propagating environment variable values, and carrying
@ -549,28 +563,28 @@ Index: git/EGLIBC.cross-testing
+
+The Cross-Compiling Locale Definition Command
+
+Some EGLIBC tests rely on locales generated especially for the test
+Some GLIBC tests rely on locales generated especially for the test
+process. In a native configuration, these tests simply run the
+'localedef' command built by the normal EGLIBC build process,
+'localedef' command built by the normal GLIBC build process,
+'locale/localedef', to process and install their locales. However, in
+a cross-compiling configuration, this 'localedef' is built for the
+host system, not the build system, and since it requires quite a bit
+of memory to run (we have seen it fail on systems with 64MiB of
+memory), it may not be practical to run it on the host system.
+
+If set, EGLIBC uses the 'cross-localedef' Make variable as the command
+If set, GLIBC uses the 'cross-localedef' Make variable as the command
+to run on the build system to process and install locales. The
+localedef program built from the EGLIBC 'localedef' module is
+localedef program built from the GLIBC 'localedef' module is
+suitable.
+
+The value of 'cross-localedef' may also include command-line arguments
+to be passed to the program; if you are using EGLIBC's 'localedef',
+to be passed to the program; if you are using GLIBC's 'localedef',
+you may include endianness and 'uint32_t' alignment arguments here.
+
+
+Example
+
+In developing EGLIBC's cross-testing facility, we invoked 'make' with
+In developing GLIBC's cross-testing facility, we invoked 'make' with
+the following script:
+
+ #!/bin/sh
@ -592,11 +606,14 @@ Index: git/EGLIBC.cross-testing
+Other Cross-Testing Concerns
+
+Here are notes on some other issues which you may encounter in running
+the EGLIBC tests in a cross-compiling environment:
+the GLIBC tests in a cross-compiling environment:
+
+- Some tests require a C++ cross-compiler; you should set the 'CXX'
+ Make variable to the name of an appropriate cross-compiler.
+
+- Some tests require access to libstdc++.so.6 and libgcc_s.so.1; we
+ simply place copies of these libraries in the top EGLIBC build
+ simply place copies of these libraries in the top GLIBC build
+ directory.
--
2.1.4

View File

@ -1,11 +1,259 @@
Eglibc option group infrastructure
From aa7c5fe86d04584a9aed4dc40ba856c65a1ef9c4 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:45:18 +0000
Subject: [PATCH 19/27] eglibc: Bring Eglibc option group infrastructure to
glibc
Upstream-Status: Pending
Index: git/option-groups.def
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ git/option-groups.def 2014-08-27 07:26:51.652070587 +0000
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
EGLIBC.option-groups | 122 ++++++
Makefile | 1 +
config.make.in | 2 +
configure | 13 +
configure.ac | 10 +
option-groups.def | 868 ++++++++++++++++++++++++++++++++++++++
option-groups.defaults | 47 +++
option-groups.mak | 41 ++
options-config/Makefile | 55 +++
options-config/config-postproc.pl | 58 +++
options-config/config-preproc.pl | 8 +
scripts/option-groups.awk | 63 +++
12 files changed, 1288 insertions(+)
create mode 100644 EGLIBC.option-groups
create mode 100644 option-groups.def
create mode 100644 option-groups.defaults
create mode 100644 option-groups.mak
create mode 100644 options-config/Makefile
create mode 100644 options-config/config-postproc.pl
create mode 100644 options-config/config-preproc.pl
create mode 100644 scripts/option-groups.awk
diff --git a/EGLIBC.option-groups b/EGLIBC.option-groups
new file mode 100644
index 0000000..6a50b8d
--- /dev/null
+++ b/EGLIBC.option-groups
@@ -0,0 +1,122 @@
+ -*- mode: text -*-
+
+ The EGLIBC Component Configuration System
+ Jim Blandy <jimb@codesourcery.com>
+
+Introduction
+
+The GNU C library (GLIBC) provides a broad range of functionality,
+ranging from internationalization support to transcendental
+mathematical functions. Its website boasts that "nearly all known and
+useful functions from any other C library are available." This
+exhaustive approach has been one of GLIBC's strengths on desktop and
+server systems, but it has also given GLIBC a large footprint, both in
+memory and on disk, making it a challenge to use in embedded systems
+with limited resources.
+
+The Embedded GNU C library (EGLIBC) is a variant of the GNU C library
+designed to work well on embedded systems. In particular, EGLIBC's
+component configuration system allows embedded developers to build
+customized versions of the library that include only the features
+their application uses, reducing its space requirements.
+
+EGLIBC's component configuration system categorizes the library's
+functions into "option groups", and allows you to include or exclude
+option groups individually. Some option groups depend on others;
+EGLIBC tracks these relationships, and ensures that the selected
+configuration yields a functioning library.
+
+
+Consistent and Predictable Behavior
+
+A flexible configuration system is a mixed blessing: if the options
+offered are poorly designed, it can be hard to see which choices will
+have the desired effects, and choices with obscure consequences can
+make debugging difficult. EGLIBC's configuration follows some general
+principles to reduce these risks:
+
+- EGLIBC has a single default configuration for each target
+ architecture.
+
+- In the default configuration, all option groups are enabled, and
+ EGLIBC is upwardly API- and ABI-compatible with GLIBC.
+
+- As much as possible, configurations only affect what functions are
+ present, not how they behave. If the system works with an option
+ group disabled, it will still work with it enabled.
+
+- As much as possible, configurations only select option groups ---
+ they do not describe characteristics of the target architecture.
+
+These rules mean that you have a simple debugging strategy available
+if you suspect that your EGLIBC configuration might be the source of a
+problem: fall back to the default configuration, re-test, and then
+disable option groups one by one, until the problem reappears.
+
+
+The Option Groups
+
+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
+like 'sin' and 'cos'; networking functions like 'socket' and
+'connect'; and so on. EGLIBC could use this partitioning as the basis
+for future option groups.
+
+
+Implementation
+
+The EGLIBC component configuration system resembles the approach used
+by the Linux kernel to select device drivers, network protocols, and
+other features. A file named 'option-groups.config' in the top-level
+build directory contains assignments to Make variables, each of which
+enables or disables a particular option group. If the variable's
+value is set to 'y', then the option group is enabled; if it set to
+anything else, the option group is omitted. The file
+'option-groups.defaults', at the top of the source tree, establishes
+default values for all variables; all option groups are enabled by
+default.
+
+For example, the following 'option-groups.config' would omit locale
+data, but include mathematical functions, and everything else:
+
+ 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.
+
+Each subdirectory's Makefile categorizes its routines, libraries, and
+executables by option group. For example, EGLIBC's 'math/Makefile'
+places the 'libm' library in the OPTION_EGLIBC_LIBM group as follows:
+
+ extra-libs-$(OPTION_EGLIBC_LIBM) := libm
+
+Finally, common code in 'Makerules' cites the value of the variable
+'extra-libs-y', selecting only those libraries that belong to enabled
+option groups to be built.
+
+
+Current Status and Future Directions
+
+The EGLIBC component configuration system described here is still
+under development.
+
+We have used the system to subset some portions of EGLIBC's
+Index: libc/configure.ac
diff --git a/Makefile b/Makefile
index 658ccfa..f906391 100644
--- a/Makefile
+++ b/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
diff --git a/config.make.in b/config.make.in
index a9f5696..294f8d1 100644
--- a/config.make.in
+++ b/config.make.in
@@ -47,6 +47,8 @@ c++-sysincludes = @CXX_SYSINCLUDES@
all-warnings = @all_warnings@
enable-werror = @enable_werror@
+kconfig_tools = @KCONFIG_TOOLS@
+
have-z-combreloc = @libc_cv_z_combreloc@
have-z-execstack = @libc_cv_z_execstack@
have-Bgroup = @libc_cv_Bgroup@
diff --git a/configure b/configure
index 7d7299a..4116404 100755
--- a/configure
+++ b/configure
@@ -641,6 +641,7 @@ INSTALL_INFO
PERL
BASH_SHELL
libc_cv_gcc_static_libgcc
+KCONFIG_TOOLS
CXX_SYSINCLUDES
SYSINCLUDES
AUTOCONF
@@ -755,6 +756,7 @@ with_fp
with_binutils
with_selinux
with_headers
+with_kconfig
with_default_link
enable_sanity_checks
enable_shared
@@ -1459,6 +1461,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
@@ -3517,6 +3522,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 :
diff --git a/configure.ac b/configure.ac
index a467a69..fc0ed4d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -136,6 +136,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],
diff --git a/option-groups.def b/option-groups.def
new file mode 100644
index 0000000..6aebd94
--- /dev/null
+++ b/option-groups.def
@@ -0,0 +1,868 @@
+# This file documents the option groups EGLIBC currently supports, in
+# a format akin to the Linux Kconfig system's. The syntax may change
@ -875,56 +1123,11 @@ Index: git/option-groups.def
+# Local Variables:
+# page-delimiter: "^config\\s-"
+# End:
Index: git/option-groups.mak
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ git/option-groups.mak 2014-08-27 07:26:51.652070587 +0000
@@ -0,0 +1,41 @@
+# Setup file for subdirectory Makefiles that define EGLIBC option groups.
+
+# EGLIBC shouldn't need to override this. However, the
+# cross-build-friendly localedef includes this makefile to get option
+# group variable definitions; it uses a single build tree for all the
+# multilibs, and needs to be able to specify a different option group
+# configuration file for each multilib.
+option_group_config_file ?= $(objdir)/option-groups.config
+
+# Read the default settings for all options.
+# We're included before ../Rules, so we can't assume $(..) is set.
+include $(firstword $(..) ../)option-groups.defaults
+
+# Read the developer's option group selections, overriding the
+# defaults from option-groups.defaults.
+-include $(option_group_config_file)
+
+# $(call option-disabled, VAR) is 'y' if VAR is not 'y', or 'n' otherwise.
+# VAR should be a variable name, not a variable reference; this is
+# less general, but more terse for the intended use.
+# You can use it to add a file to a list if an option group is
+# disabled, like this:
+# routines-$(call option-disabled, OPTION_POSIX_C_LANG_WIDE_CHAR) += ...
+define option-disabled
+$(firstword $(subst y,n,$(filter y,$($(strip $(1))))) y)
+endef
+
+# Establish 'routines-y', etc. as simply-expanded variables.
+aux-y :=
+extra-libs-others-y :=
+extra-libs-y :=
+extra-objs-y :=
+install-bin-y :=
+install-others-y :=
+install-sbin-y :=
+others-y :=
+others-pie-y :=
+routines-y :=
+test-srcs-y :=
+tests-y :=
+xtests-y :=
Index: git/option-groups.defaults
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ git/option-groups.defaults 2014-08-27 07:24:41.652070587 +0000
diff --git a/option-groups.defaults b/option-groups.defaults
new file mode 100644
index 0000000..8141201
--- /dev/null
+++ b/option-groups.defaults
@@ -0,0 +1,47 @@
+# This file sets default values for all option group variables
+# mentioned in option-groups.def; see that file for a description of
@ -973,228 +1176,58 @@ Index: git/option-groups.defaults
+OPTION_POSIX_REGEXP = y
+OPTION_POSIX_REGEXP_GLIBC = y
+OPTION_POSIX_WIDE_CHAR_DEVICE_IO = y
Index: git/Makefile
===================================================================
--- git.orig/Makefile 2014-08-27 07:24:37.540070587 +0000
+++ git/Makefile 2014-08-27 07:24:41.656070587 +0000
@@ -24,6 +24,7 @@
include Makeconfig
+include options-config/Makefile
# This is the default target; it makes everything except the tests.
.PHONY: all
Index: git/EGLIBC.option-groups
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ git/EGLIBC.option-groups 2014-08-27 07:24:41.656070587 +0000
@@ -0,0 +1,122 @@
+ -*- mode: text -*-
diff --git a/option-groups.mak b/option-groups.mak
new file mode 100644
index 0000000..f83e0c1
--- /dev/null
+++ b/option-groups.mak
@@ -0,0 +1,41 @@
+# Setup file for subdirectory Makefiles that define EGLIBC option groups.
+
+ The EGLIBC Component Configuration System
+ Jim Blandy <jimb@codesourcery.com>
+# EGLIBC shouldn't need to override this. However, the
+# cross-build-friendly localedef includes this makefile to get option
+# group variable definitions; it uses a single build tree for all the
+# multilibs, and needs to be able to specify a different option group
+# configuration file for each multilib.
+option_group_config_file ?= $(objdir)/option-groups.config
+
+Introduction
+# Read the default settings for all options.
+# We're included before ../Rules, so we can't assume $(..) is set.
+include $(firstword $(..) ../)option-groups.defaults
+
+The GNU C library (GLIBC) provides a broad range of functionality,
+ranging from internationalization support to transcendental
+mathematical functions. Its website boasts that "nearly all known and
+useful functions from any other C library are available." This
+exhaustive approach has been one of GLIBC's strengths on desktop and
+server systems, but it has also given GLIBC a large footprint, both in
+memory and on disk, making it a challenge to use in embedded systems
+with limited resources.
+# Read the developer's option group selections, overriding the
+# defaults from option-groups.defaults.
+-include $(option_group_config_file)
+
+The Embedded GNU C library (EGLIBC) is a variant of the GNU C library
+designed to work well on embedded systems. In particular, EGLIBC's
+component configuration system allows embedded developers to build
+customized versions of the library that include only the features
+their application uses, reducing its space requirements.
+# $(call option-disabled, VAR) is 'y' if VAR is not 'y', or 'n' otherwise.
+# VAR should be a variable name, not a variable reference; this is
+# less general, but more terse for the intended use.
+# You can use it to add a file to a list if an option group is
+# disabled, like this:
+# routines-$(call option-disabled, OPTION_POSIX_C_LANG_WIDE_CHAR) += ...
+define option-disabled
+$(firstword $(subst y,n,$(filter y,$($(strip $(1))))) y)
+endef
+
+EGLIBC's component configuration system categorizes the library's
+functions into "option groups", and allows you to include or exclude
+option groups individually. Some option groups depend on others;
+EGLIBC tracks these relationships, and ensures that the selected
+configuration yields a functioning library.
+
+
+Consistent and Predictable Behavior
+
+A flexible configuration system is a mixed blessing: if the options
+offered are poorly designed, it can be hard to see which choices will
+have the desired effects, and choices with obscure consequences can
+make debugging difficult. EGLIBC's configuration follows some general
+principles to reduce these risks:
+
+- EGLIBC has a single default configuration for each target
+ architecture.
+
+- In the default configuration, all option groups are enabled, and
+ EGLIBC is upwardly API- and ABI-compatible with GLIBC.
+
+- As much as possible, configurations only affect what functions are
+ present, not how they behave. If the system works with an option
+ group disabled, it will still work with it enabled.
+
+- As much as possible, configurations only select option groups ---
+ they do not describe characteristics of the target architecture.
+
+These rules mean that you have a simple debugging strategy available
+if you suspect that your EGLIBC configuration might be the source of a
+problem: fall back to the default configuration, re-test, and then
+disable option groups one by one, until the problem reappears.
+
+
+The Option Groups
+
+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
+like 'sin' and 'cos'; networking functions like 'socket' and
+'connect'; and so on. EGLIBC could use this partitioning as the basis
+for future option groups.
+
+
+Implementation
+
+The EGLIBC component configuration system resembles the approach used
+by the Linux kernel to select device drivers, network protocols, and
+other features. A file named 'option-groups.config' in the top-level
+build directory contains assignments to Make variables, each of which
+enables or disables a particular option group. If the variable's
+value is set to 'y', then the option group is enabled; if it set to
+anything else, the option group is omitted. The file
+'option-groups.defaults', at the top of the source tree, establishes
+default values for all variables; all option groups are enabled by
+default.
+
+For example, the following 'option-groups.config' would omit locale
+data, but include mathematical functions, and everything else:
+
+ 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.
+
+Each subdirectory's Makefile categorizes its routines, libraries, and
+executables by option group. For example, EGLIBC's 'math/Makefile'
+places the 'libm' library in the OPTION_EGLIBC_LIBM group as follows:
+
+ extra-libs-$(OPTION_EGLIBC_LIBM) := libm
+
+Finally, common code in 'Makerules' cites the value of the variable
+'extra-libs-y', selecting only those libraries that belong to enabled
+option groups to be built.
+
+
+Current Status and Future Directions
+
+The EGLIBC component configuration system described here is still
+under development.
+
+We have used the system to subset some portions of EGLIBC's
+Index: libc/configure.ac
Index: git/configure.ac
===================================================================
--- git.orig/configure.ac 2014-08-27 07:24:41.196070587 +0000
+++ git/configure.ac 2014-08-27 07:24:41.656070587 +0000
@@ -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: git/config.make.in
===================================================================
--- git.orig/config.make.in 2014-08-27 07:24:37.560070587 +0000
+++ git/config.make.in 2014-08-27 07:24:41.656070587 +0000
@@ -46,6 +46,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: git/configure
===================================================================
--- git.orig/configure 2014-08-27 07:24:41.192070587 +0000
+++ git/configure 2014-08-27 07:24:41.660070587 +0000
@@ -619,6 +619,7 @@
PERL
BASH_SHELL
libc_cv_gcc_static_libgcc
+KCONFIG_TOOLS
CXX_SYSINCLUDES
SYSINCLUDES
AUTOCONF
@@ -733,6 +734,7 @@
with_binutils
with_selinux
with_headers
+with_kconfig
with_default_link
enable_sanity_checks
enable_shared
@@ -1437,6 +1439,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
@@ -3400,6 +3405,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: git/options-config/Makefile
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ git/options-config/Makefile 2014-08-27 07:24:41.652070587 +0000
+# Establish 'routines-y', etc. as simply-expanded variables.
+aux-y :=
+extra-libs-others-y :=
+extra-libs-y :=
+extra-objs-y :=
+install-bin-y :=
+install-others-y :=
+install-sbin-y :=
+others-y :=
+others-pie-y :=
+routines-y :=
+test-srcs-y :=
+tests-y :=
+xtests-y :=
diff --git a/options-config/Makefile b/options-config/Makefile
new file mode 100644
index 0000000..db00708
--- /dev/null
+++ b/options-config/Makefile
@@ -0,0 +1,55 @@
+# ===========================================================================
+# EGLIBC option-groups configuration targets
@ -1251,10 +1284,11 @@ Index: git/options-config/Makefile
+
+endif
+endif
Index: git/options-config/config-postproc.pl
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ git/options-config/config-postproc.pl 2014-08-27 07:24:41.652070587 +0000
diff --git a/options-config/config-postproc.pl b/options-config/config-postproc.pl
new file mode 100644
index 0000000..4dd1c63
--- /dev/null
+++ b/options-config/config-postproc.pl
@@ -0,0 +1,58 @@
+#!/usr/bin/perl
+
@ -1314,10 +1348,11 @@ Index: git/options-config/config-postproc.pl
+ print "OPTION_$opt\n";
+ }
+}
Index: git/options-config/config-preproc.pl
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ git/options-config/config-preproc.pl 2014-08-27 07:24:41.652070587 +0000
diff --git a/options-config/config-preproc.pl b/options-config/config-preproc.pl
new file mode 100644
index 0000000..b83bb85
--- /dev/null
+++ b/options-config/config-preproc.pl
@@ -0,0 +1,8 @@
+#!/usr/bin/perl
+
@ -1327,10 +1362,11 @@ Index: git/options-config/config-preproc.pl
+ print;
+ }
+}
Index: git/scripts/option-groups.awk
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ git/scripts/option-groups.awk 2014-08-27 07:26:51.652070587 +0000
diff --git a/scripts/option-groups.awk b/scripts/option-groups.awk
new file mode 100644
index 0000000..533af0c
--- /dev/null
+++ b/scripts/option-groups.awk
@@ -0,0 +1,63 @@
+# option-groups.awk --- generate option group header file
+# Given input files containing makefile-style assignments to variables,
@ -1395,3 +1431,6 @@ Index: git/scripts/option-groups.awk
+ print ""
+ print "#endif /* __GNU_OPTION_GROUPS_H */"
+}
--
2.1.4

View File

@ -1,27 +1,38 @@
From 8fe0d29488b376011cdaaa462d557ffc0b31fb63 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:49:28 +0000
Subject: [PATCH 20/27] eglibc: Help bootstrap cross toolchain
Taken from EGLIBC, r1484 + r1525
2007-02-20 Jim Blandy <jimb@codesourcery.com>
* Makefile (install-headers): Preserve old behavior: depend on
$(inst_includedir)/gnu/stubs.h only if install-bootstrap-headers
is set; otherwise, place gnu/stubs.h on the 'install-others' list.
2007-02-16 Jim Blandy <jimb@codesourcery.com>
* Makefile: Amend make install-headers to install everything
necessary for building a cross-compiler. Install gnu/stubs.h as
part of 'install-headers', not 'install-others'.
If install-bootstrap-headers is 'yes', install a dummy copy of
gnu/stubs.h, instead of computing the real thing.
* include/stubs-bootstrap.h: New file.
2007-02-20 Jim Blandy <jimb@codesourcery.com>
* Makefile (install-headers): Preserve old behavior: depend on
$(inst_includedir)/gnu/stubs.h only if install-bootstrap-headers
is set; otherwise, place gnu/stubs.h on the 'install-others' list.
2007-02-16 Jim Blandy <jimb@codesourcery.com>
* Makefile: Amend make install-headers to install everything
necessary for building a cross-compiler. Install gnu/stubs.h as
part of 'install-headers', not 'install-others'.
If install-bootstrap-headers is 'yes', install a dummy copy of
gnu/stubs.h, instead of computing the real thing.
* include/stubs-bootstrap.h: New file.
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Makefile | 22 +++++++++++++++++++++-
include/stubs-bootstrap.h | 12 ++++++++++++
2 files changed, 33 insertions(+), 1 deletion(-)
create mode 100644 include/stubs-bootstrap.h
Index: git/Makefile
===================================================================
--- git.orig/Makefile 2014-08-27 18:35:18.908070587 +0000
+++ git/Makefile 2014-08-27 18:35:19.340070587 +0000
@@ -69,9 +69,18 @@
diff --git a/Makefile b/Makefile
index f906391..e4e149e 100644
--- a/Makefile
+++ b/Makefile
@@ -69,9 +69,18 @@ subdir-dirs = include
vpath %.h $(subdir-dirs)
# What to install.
@ -41,7 +52,7 @@ Index: git/Makefile
ifeq (yes,$(build-shared))
headers += gnu/lib-names.h
endif
@@ -151,6 +160,16 @@
@@ -151,6 +160,16 @@ others: $(common-objpfx)testrun.sh
subdir-stubs := $(foreach dir,$(subdirs),$(common-objpfx)$(dir)/stubs)
@ -58,7 +69,7 @@ Index: git/Makefile
ifndef abi-variants
installed-stubs = $(inst_includedir)/gnu/stubs.h
else
@@ -177,6 +196,7 @@
@@ -177,6 +196,7 @@ $(inst_includedir)/gnu/stubs.h: $(+force)
install-others-nosubdir: $(installed-stubs)
endif
@ -66,10 +77,11 @@ Index: git/Makefile
# Since stubs.h is never needed when building the library, we simplify the
Index: git/include/stubs-bootstrap.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ git/include/stubs-bootstrap.h 2014-08-27 18:35:19.340070587 +0000
diff --git a/include/stubs-bootstrap.h b/include/stubs-bootstrap.h
new file mode 100644
index 0000000..1d2b669
--- /dev/null
+++ b/include/stubs-bootstrap.h
@@ -0,0 +1,12 @@
+/* Placeholder stubs.h file for bootstrapping.
+
@ -83,3 +95,6 @@ Index: git/include/stubs-bootstrap.h
+ difficult headers. The <gnu/stubs.h> header depends, via the
+ EGLIBC subdir 'stubs' make targets, on every .o file in EGLIBC, but
+ an empty stubs.h like this will do fine for GCC. */
--
2.1.4

View File

@ -1,15 +1,22 @@
cherry-picked from http://www.eglibc.org/archives/patches/msg00772.html
From fe2ae4f877928dd6bff5bac3f15bce4b50d2bd12 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:51:16 +0000
Subject: [PATCH 21/27] eglibc: cherry-picked from
http://www.eglibc.org/archives/patches/msg00772.html
It hasnt yet been merged into glibc
Signed-off-by: Khem Raj
It hasn't yet been merged into glibc
Upstream-Status: Pending
Index: git/resolv/res_libc.c
===================================================================
--- git.orig/resolv/res_libc.c 2014-08-27 18:35:15.492070587 +0000
+++ git/resolv/res_libc.c 2014-08-27 18:35:19.204070587 +0000
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
resolv/res_libc.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/resolv/res_libc.c b/resolv/res_libc.c
index ee3fa21..29e2340 100644
--- a/resolv/res_libc.c
+++ b/resolv/res_libc.c
@@ -22,12 +22,13 @@
#include <arpa/nameser.h>
#include <resolv.h>
@ -25,7 +32,7 @@ Index: git/resolv/res_libc.c
extern unsigned long long int __res_initstamp attribute_hidden;
/* We have atomic increment operations on 64-bit platforms. */
#if __WORDSIZE == 64
@@ -35,7 +36,6 @@
@@ -35,7 +36,6 @@ extern unsigned long long int __res_initstamp attribute_hidden;
# define atomicincunlock(lock) (void) 0
# define atomicinc(var) catomic_increment (&(var))
#else
@ -33,7 +40,7 @@ Index: git/resolv/res_libc.c
# define atomicinclock(lock) __libc_lock_lock (lock)
# define atomicincunlock(lock) __libc_lock_unlock (lock)
# define atomicinc(var) ++var
@@ -94,7 +94,18 @@
@@ -94,7 +94,18 @@ res_init(void) {
int
__res_maybe_init (res_state resp, int preinit)
{
@ -52,3 +59,6 @@ Index: git/resolv/res_libc.c
if (__res_initstamp != resp->_u._ext.initstamp) {
if (resp->nscount > 0)
__res_iclose (resp, true);
--
2.1.4

View File

@ -1,3 +1,8 @@
From be7273225698074347a71de58006977bb304d7f7 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:53:47 +0000
Subject: [PATCH 22/27] eglibc: Clear cache lines on ppc8xx
2007-06-13 Nathan Sidwell <nathan@codesourcery.com>
Mark Shinwell <shinwell@codesourcery.com>
@ -8,12 +13,17 @@
(DL_PLATFORM_AUXV): Likewise.
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c | 14 +++++++++++++-
sysdeps/unix/sysv/linux/powerpc/libc-start.c | 15 ++++++++++++++-
2 files changed, 27 insertions(+), 2 deletions(-)
Index: git/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
===================================================================
--- git.orig/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c 2014-08-27 18:49:23.996070587 +0000
+++ git/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c 2014-08-27 18:49:27.332070587 +0000
@@ -24,9 +24,21 @@
diff --git a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
index c2504ff..d50f1cb 100644
--- a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
+++ b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
@@ -24,9 +24,21 @@ int __cache_line_size attribute_hidden;
/* Scan the Aux Vector for the "Data Cache Block Size" entry. If found
verify that the static extern __cache_line_size is defined by checking
for not NULL. If it is defined then assign the cache block size
@ -36,11 +46,11 @@ Index: git/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
__cache_line_size = av->a_un.a_val; \
break;
Index: git/sysdeps/unix/sysv/linux/powerpc/libc-start.c
===================================================================
--- git.orig/sysdeps/unix/sysv/linux/powerpc/libc-start.c 2014-08-27 18:49:23.996070587 +0000
+++ git/sysdeps/unix/sysv/linux/powerpc/libc-start.c 2014-08-27 18:49:27.332070587 +0000
@@ -68,11 +68,24 @@
diff --git a/sysdeps/unix/sysv/linux/powerpc/libc-start.c b/sysdeps/unix/sysv/linux/powerpc/libc-start.c
index a9364c7..a3ed1d4 100644
--- a/sysdeps/unix/sysv/linux/powerpc/libc-start.c
+++ b/sysdeps/unix/sysv/linux/powerpc/libc-start.c
@@ -68,11 +68,24 @@ __libc_start_main (int argc, char **argv,
rtld_fini = NULL;
}
@ -66,3 +76,6 @@ Index: git/sysdeps/unix/sysv/linux/powerpc/libc-start.c
__cache_line_size = av->a_un.a_val;
break;
}
--
2.1.4

View File

@ -1,3 +1,8 @@
From 718e7e5db1c8b073adb9a79ec6f167238c2d8bda Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:55:53 +0000
Subject: [PATCH 23/27] eglibc: Resolve __fpscr_values on SH4
2010-09-29 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Andrew Stubbs <ams@codesourcery.com>
@ -9,11 +14,29 @@
Upstream-Status: Pending
Index: git/sysdeps/unix/sysv/linux/sh/sysdep.S
===================================================================
--- git.orig/sysdeps/unix/sysv/linux/sh/sysdep.S 2014-08-27 18:49:24.036070587 +0000
+++ git/sysdeps/unix/sysv/linux/sh/sysdep.S 2014-08-27 18:49:27.332070587 +0000
@@ -30,3 +30,14 @@
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
sysdeps/unix/sysv/linux/sh/Versions | 1 +
sysdeps/unix/sysv/linux/sh/sysdep.S | 11 +++++++++++
2 files changed, 12 insertions(+)
diff --git a/sysdeps/unix/sysv/linux/sh/Versions b/sysdeps/unix/sysv/linux/sh/Versions
index e0938c4..ca1d7da 100644
--- a/sysdeps/unix/sysv/linux/sh/Versions
+++ b/sysdeps/unix/sysv/linux/sh/Versions
@@ -2,6 +2,7 @@ libc {
GLIBC_2.2 {
# functions used in other libraries
__xstat64; __fxstat64; __lxstat64;
+ __fpscr_values;
# a*
alphasort64;
diff --git a/sysdeps/unix/sysv/linux/sh/sysdep.S b/sysdeps/unix/sysv/linux/sh/sysdep.S
index a02b7e2..b9be326 100644
--- a/sysdeps/unix/sysv/linux/sh/sysdep.S
+++ b/sysdeps/unix/sysv/linux/sh/sysdep.S
@@ -30,3 +30,14 @@ ENTRY (__syscall_error)
#define __syscall_error __syscall_error_1
#include <sysdeps/unix/sh/sysdep.S>
@ -28,15 +51,6 @@ Index: git/sysdeps/unix/sysv/linux/sh/sysdep.S
+ .long 0x80000
+weak_alias (___fpscr_values, __fpscr_values)
+
Index: git/sysdeps/unix/sysv/linux/sh/Versions
===================================================================
--- git.orig/sysdeps/unix/sysv/linux/sh/Versions 2014-08-27 18:49:24.028070587 +0000
+++ git/sysdeps/unix/sysv/linux/sh/Versions 2014-08-27 18:49:27.332070587 +0000
@@ -2,6 +2,7 @@
GLIBC_2.2 {
# functions used in other libraries
__xstat64; __fxstat64; __lxstat64;
+ __fpscr_values;
# a*
alphasort64;
--
2.1.4

View File

@ -1,3 +1,10 @@
From 5773417fa91a18cd39fb35c9907d72af0ed9ea33 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 01:57:01 +0000
Subject: [PATCH 25/27] eglibc: Install PIC archives
Forward port from eglibc
2008-02-07 Joseph Myers <joseph@codesourcery.com>
* Makerules (install-extras, install-map): New variables.
@ -9,7 +16,6 @@
(install-no-libc.a-nosubdir): Depend on install-map-nosubdir and
install-extras-nosubdir.
2008-04-01 Maxim Kuvyrkov <maxim@codesourcery.com>
* Makerules (install-lib): Don't install libpthread_pic.a.
@ -17,11 +23,16 @@
Upstream-Status: Pending
Index: git/Makerules
===================================================================
--- git.orig/Makerules 2014-08-27 18:49:22.552070587 +0000
+++ git/Makerules 2014-08-27 18:49:27.308070587 +0000
@@ -612,6 +631,9 @@
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Makerules | 42 ++++++++++++++++++++++++++++++++++++++++--
1 file changed, 40 insertions(+), 2 deletions(-)
diff --git a/Makerules b/Makerules
index 1dd41aa..41778e1 100644
--- a/Makerules
+++ b/Makerules
@@ -713,6 +713,9 @@ ifeq ($(build-shared),yes)
$(common-objpfx)libc.so: $(common-objpfx)libc.map
endif
common-generated += libc.so libc_pic.os
@ -31,15 +42,15 @@ Index: git/Makerules
ifdef libc.so-version
$(common-objpfx)libc.so$(libc.so-version): $(common-objpfx)libc.so
$(make-link)
@@ -834,6 +856,7 @@
installed-libcs := $(foreach o,$(filter-out .os,$(object-suffixes-for-libc)),\
$(inst_libdir)/$(patsubst %,$(libtype$o),\
$(libprefix)$(libc-name)))
@@ -955,6 +958,7 @@ endif
install: check-install-supported
+installed-libcs := $(installed-libcs) $(inst_libdir)/libc_pic.a
install: $(installed-libcs)
$(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
$(make-target-directory)
@@ -862,6 +885,22 @@
@@ -983,6 +987,22 @@ versioned := $(strip $(foreach so,$(install-lib.so),\
install-lib.so-versioned := $(filter $(versioned), $(install-lib.so))
install-lib.so-unversioned := $(filter-out $(versioned), $(install-lib.so))
@ -62,7 +73,7 @@ Index: git/Makerules
# For versioned libraries, we install three files:
# $(inst_libdir)/libfoo.so -- for linking, symlink or ld script
# $(inst_slibdir)/libfoo.so.NN -- for loading by SONAME, symlink
@@ -1103,9 +1142,22 @@
@@ -1225,9 +1245,22 @@ $(addprefix $(inst_includedir)/,$(headers-nonh)): $(inst_includedir)/%: \
endif # headers-nonh
endif # headers
@ -74,7 +85,7 @@ Index: git/Makerules
+
+ifdef install-extras
+$(addprefix $(inst_libdir)/libc_pic/,$(install-extras)): \
+ $(inst_libdir)/libc_pic/%.o: $(elfobjdir)/%.os $(+force)
+ $(inst_libdir)/libc_pic/%.o: $(elf-objpfx)%.os $(+force)
+ $(do-install)
+endif
+
@ -86,7 +97,7 @@ Index: git/Makerules
install-bin-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin))
install-bin-script-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin-script))
install-rootsbin-nosubdir: \
@@ -1118,6 +1170,10 @@
@@ -1240,6 +1273,10 @@ install-data-nosubdir: $(addprefix $(inst_datadir)/,$(install-data))
install-headers-nosubdir: $(addprefix $(inst_includedir)/,$(headers))
install-others-nosubdir: $(install-others)
install-others-programs-nosubdir: $(install-others-programs)
@ -97,7 +108,7 @@ Index: git/Makerules
# We need all the `-nosubdir' targets so that `install' in the parent
# doesn't depend on several things which each iterate over the subdirs.
@@ -1127,7 +1183,8 @@
@@ -1249,7 +1286,8 @@ install-%:: install-%-nosubdir ;
.PHONY: install install-no-libc.a-nosubdir
install-no-libc.a-nosubdir: install-headers-nosubdir install-data-nosubdir \
@ -107,3 +118,6 @@ Index: git/Makerules
ifeq ($(build-programs),yes)
install-no-libc.a-nosubdir: install-bin-nosubdir install-bin-script-nosubdir \
install-rootsbin-nosubdir install-sbin-nosubdir \
--
2.1.4

View File

@ -1,246 +1,38 @@
Its controlled by __OPTION_EGLIBC_RTLD_DEBUG
so we should use GLRO_dl_debug_mask
From ba069b3107f5ad200c4ab95e69cf368e2353b00a Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:46:50 +0000
Subject: [PATCH 26/27] eglibc: dl_debug_mask is controlled by
__OPTION_EGLIBC_RTLD_DEBUG
use GLRO_dl_debug_mask
Singed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Pending
Index: git/elf/dl-open.c
===================================================================
--- git.orig/elf/dl-open.c 2014-08-27 05:03:59.732070587 +0000
+++ git/elf/dl-open.c 2014-08-27 05:05:25.656070587 +0000
@@ -147,7 +147,7 @@
ns->_ns_main_searchlist->r_list[new_nlist++] = map;
/* We modify the global scope. Report this. */
- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES))
+ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SCOPES))
_dl_debug_printf ("\nadd %s [%lu] to global scope\n",
map->l_name, map->l_ns);
}
@@ -243,7 +243,7 @@
if (__glibc_unlikely (new->l_searchlist.r_list != NULL))
{
/* Let the user know about the opencount. */
- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES))
+ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES))
_dl_debug_printf ("opening file=%s [%lu]; direct_opencount=%u\n\n",
new->l_name, new->l_ns, new->l_direct_opencount);
@@ -294,7 +294,7 @@
LIBC_PROBE (map_complete, 3, args->nsid, r, new);
/* Print scope information. */
- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES))
+ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SCOPES))
_dl_show_scope (new, 0);
/* Only do lazy relocation if `LD_BIND_NOW' is not set. */
@@ -511,7 +511,7 @@
}
/* Print scope information. */
- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES))
+ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SCOPES))
_dl_show_scope (imap, from_scope);
}
@@ -584,7 +584,7 @@
#endif
/* Let the user know about the opencount. */
- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES))
+ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES))
_dl_debug_printf ("opening file=%s [%lu]; direct_opencount=%u\n\n",
new->l_name, new->l_ns, new->l_direct_opencount);
}
Index: git/elf/rtld.c
===================================================================
--- git.orig/elf/rtld.c 2014-08-27 05:03:59.732070587 +0000
+++ git/elf/rtld.c 2014-08-27 05:12:33.812070587 +0000
@@ -321,7 +321,7 @@
}
#endif
- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_STATISTICS))
+ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_STATISTICS))
{
#ifndef HP_TIMING_NONAVAIL
print_statistics (&rtld_total_time);
@@ -1699,7 +1699,7 @@
after relocation. */
struct link_map *l;
- if (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK)
+ if (GLRO_dl_debug_mask & DL_DEBUG_PRELINK)
{
struct r_scope_elem *scope = &main_map->l_searchlist;
@@ -1729,7 +1729,7 @@
_dl_printf ("\n");
}
}
- else if (GLRO(dl_debug_mask) & DL_DEBUG_UNUSED)
+ else if (GLRO_dl_debug_mask & DL_DEBUG_UNUSED)
{
/* Look through the dependencies of the main executable
and determine which of them is not actually
@@ -1837,7 +1837,7 @@
}
}
- if ((GLRO(dl_debug_mask) & DL_DEBUG_PRELINK)
+ if ((GLRO_dl_debug_mask & DL_DEBUG_PRELINK)
&& rtld_multiple_ref)
{
/* Mark the link map as not yet relocated again. */
@@ -1970,7 +1970,7 @@
if (r_list == r_listend && liblist == liblistend)
prelinked = true;
- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
+ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS))
_dl_debug_printf ("\nprelink checking: %s\n",
prelinked ? "ok" : "failed");
}
@@ -1988,7 +1988,7 @@
GLRO(dl_init_all_dirs) = GL(dl_all_dirs);
/* Print scope information. */
- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES))
+ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SCOPES))
{
_dl_debug_printf ("\nInitial object scopes\n");
@@ -2262,7 +2262,7 @@
if (debopts[cnt].len == len
&& memcmp (dl_debug, debopts[cnt].name, len) == 0)
{
- GLRO(dl_debug_mask) |= debopts[cnt].mask;
+ GLRO_dl_debug_mask |= debopts[cnt].mask;
any_debug = 1;
break;
}
@@ -2283,7 +2283,7 @@
++dl_debug;
}
- if (GLRO(dl_debug_mask) & DL_DEBUG_UNUSED)
+ if (GLRO_dl_debug_mask & DL_DEBUG_UNUSED)
{
/* In order to get an accurate picture of whether a particular
DT_NEEDED entry is actually used we have to process both
@@ -2291,7 +2291,7 @@
GLRO(dl_lazy) = 0;
}
- if (GLRO(dl_debug_mask) & DL_DEBUG_HELP)
+ if (GLRO_dl_debug_mask & DL_DEBUG_HELP)
{
size_t cnt;
@@ -2490,7 +2490,7 @@
{
mode = trace;
GLRO(dl_verbose) = 1;
- GLRO(dl_debug_mask) |= DL_DEBUG_PRELINK;
+ GLRO_dl_debug_mask |= DL_DEBUG_PRELINK;
GLRO(dl_trace_prelink) = &envline[17];
}
break;
@@ -2537,7 +2537,7 @@
if (__access ("/etc/suid-debug", F_OK) != 0)
{
unsetenv ("MALLOC_CHECK_");
- GLRO(dl_debug_mask) = 0;
+ GLRO_dl_debug_mask = 0;
}
if (mode != normal)
Index: git/elf/dl-lookup.c
===================================================================
--- git.orig/elf/dl-lookup.c 2014-08-27 05:03:59.732070587 +0000
+++ git/elf/dl-lookup.c 2014-08-27 05:13:07.644070587 +0000
@@ -300,7 +300,7 @@
hash table. */
if (__glibc_unlikely (tab->size))
{
- assert (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK);
+ assert (GLRO_dl_debug_mask & DL_DEBUG_PRELINK);
goto success;
}
#endif
@@ -375,7 +375,7 @@
continue;
/* Print some debugging info if wanted. */
- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SYMBOLS))
+ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SYMBOLS))
_dl_debug_printf ("symbol=%s; lookup in file=%s [%lu]\n",
undef_name, DSO_FILENAME (map->l_name),
map->l_ns);
@@ -698,7 +698,7 @@
}
/* Display information if we are debugging. */
- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES))
+ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES))
_dl_debug_printf ("\
\nfile=%s [%lu]; needed by %s [%lu] (relocation dependency)\n\n",
DSO_FILENAME (map->l_name),
@@ -802,7 +802,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 : "";
@@ -873,7 +873,7 @@
if (__glibc_unlikely (current_value.m->l_used == 0))
current_value.m->l_used = 1;
- if (__glibc_unlikely (GLRO(dl_debug_mask)
+ if (__glibc_unlikely (GLRO_dl_debug_mask
& (DL_DEBUG_BINDINGS|DL_DEBUG_PRELINK)))
_dl_debug_bindings (undef_name, undef_map, ref,
&current_value, version, type_class, protected);
@@ -938,7 +938,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'",
DSO_FILENAME (reference_name),
@@ -952,7 +952,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: git/elf/get-dynamic-info.h
===================================================================
--- git.orig/elf/get-dynamic-info.h 2014-08-27 05:03:59.732070587 +0000
+++ git/elf/get-dynamic-info.h 2014-08-27 05:03:59.728070587 +0000
@@ -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);
Index: git/csu/libc-start.c
===================================================================
--- git.orig/csu/libc-start.c 2014-08-27 04:59:01.412070587 +0000
+++ git/csu/libc-start.c 2014-08-27 05:09:28.936070587 +0000
@@ -238,7 +238,7 @@
---
csu/libc-start.c | 4 ++--
elf/dl-cache.c | 4 ++--
elf/dl-close.c | 6 +++---
elf/dl-conflict.c | 2 +-
elf/dl-deps.c | 6 +++---
elf/dl-error.c | 2 +-
elf/dl-fini.c | 4 ++--
elf/dl-init.c | 4 ++--
elf/dl-load.c | 16 ++++++++--------
elf/dl-lookup.c | 14 +++++++-------
elf/dl-object.c | 2 +-
elf/dl-open.c | 10 +++++-----
elf/dl-reloc.c | 2 +-
elf/dl-version.c | 2 +-
elf/get-dynamic-info.h | 2 +-
elf/rtld.c | 22 +++++++++++-----------
16 files changed, 51 insertions(+), 51 deletions(-)
diff --git a/csu/libc-start.c b/csu/libc-start.c
index 0afa7c0..2151fb6 100644
--- a/csu/libc-start.c
+++ b/csu/libc-start.c
@@ -238,7 +238,7 @@ LIBC_START_MAIN (int (*main) (int, char **, char ** MAIN_AUXVEC_DECL),
/* Call the initializer of the program, if any. */
#ifdef SHARED
@ -249,7 +41,7 @@ Index: git/csu/libc-start.c
GLRO(dl_debug_printf) ("\ninitialize program: %s\n\n", argv[0]);
#endif
if (init)
@@ -261,7 +261,7 @@
@@ -261,7 +261,7 @@ LIBC_START_MAIN (int (*main) (int, char **, char ** MAIN_AUXVEC_DECL),
#endif
#ifdef SHARED
@ -258,11 +50,11 @@ Index: git/csu/libc-start.c
GLRO(dl_debug_printf) ("\ntransferring control: %s\n\n", argv[0]);
#endif
Index: git/elf/dl-cache.c
===================================================================
--- git.orig/elf/dl-cache.c 2014-08-27 04:59:01.568070587 +0000
+++ git/elf/dl-cache.c 2014-08-27 05:10:14.384070587 +0000
@@ -187,7 +187,7 @@
diff --git a/elf/dl-cache.c b/elf/dl-cache.c
index 862f1d8..dab9c51 100644
--- a/elf/dl-cache.c
+++ b/elf/dl-cache.c
@@ -194,7 +194,7 @@ _dl_load_cache_lookup (const char *name)
const char *best;
/* Print a message if the loading of libs is traced. */
@ -271,7 +63,7 @@ Index: git/elf/dl-cache.c
_dl_debug_printf (" search cache=%s\n", LD_SO_CACHE);
if (cache == NULL)
@@ -285,7 +285,7 @@
@@ -292,7 +292,7 @@ _dl_load_cache_lookup (const char *name)
}
/* Print our result if wanted. */
@ -280,11 +72,11 @@ Index: git/elf/dl-cache.c
&& best != NULL)
_dl_debug_printf (" trying file=%s\n", best);
Index: git/elf/dl-close.c
===================================================================
--- git.orig/elf/dl-close.c 2014-08-27 04:59:01.568070587 +0000
+++ git/elf/dl-close.c 2014-08-27 05:10:26.456070587 +0000
@@ -125,7 +125,7 @@
diff --git a/elf/dl-close.c b/elf/dl-close.c
index c897247..b1b4bd5 100644
--- a/elf/dl-close.c
+++ b/elf/dl-close.c
@@ -125,7 +125,7 @@ _dl_close_worker (struct link_map *map, bool force)
dl_close_state = rerun;
/* There are still references to this object. Do nothing more. */
@ -293,7 +85,7 @@ Index: git/elf/dl-close.c
_dl_debug_printf ("\nclosing file=%s; direct_opencount=%u\n",
map->l_name, map->l_direct_opencount);
@@ -257,7 +257,7 @@
@@ -269,7 +269,7 @@ _dl_close_worker (struct link_map *map, bool force)
if (imap->l_init_called)
{
/* When debugging print a message first. */
@ -302,7 +94,7 @@ Index: git/elf/dl-close.c
0))
_dl_debug_printf ("\ncalling fini: %s [%lu]\n\n",
imap->l_name, nsid);
@@ -664,7 +664,7 @@
@@ -711,7 +711,7 @@ _dl_close_worker (struct link_map *map, bool force)
free (imap->l_reldeps);
/* Print debugging message. */
@ -311,11 +103,11 @@ Index: git/elf/dl-close.c
_dl_debug_printf ("\nfile=%s [%lu]; destroying link map\n",
imap->l_name, imap->l_ns);
Index: git/elf/dl-conflict.c
===================================================================
--- git.orig/elf/dl-conflict.c 2014-08-27 04:59:01.568070587 +0000
+++ git/elf/dl-conflict.c 2014-08-27 05:10:37.652070587 +0000
@@ -32,7 +32,7 @@
diff --git a/elf/dl-conflict.c b/elf/dl-conflict.c
index 47a946e..e6a3f21 100644
--- a/elf/dl-conflict.c
+++ b/elf/dl-conflict.c
@@ -32,7 +32,7 @@ _dl_resolve_conflicts (struct link_map *l, ElfW(Rela) *conflict,
ElfW(Rela) *conflictend)
{
#if ! ELF_MACHINE_NO_RELA
@ -324,11 +116,11 @@ Index: git/elf/dl-conflict.c
_dl_debug_printf ("\nconflict processing: %s\n", DSO_FILENAME (l->l_name));
{
Index: git/elf/dl-deps.c
===================================================================
--- git.orig/elf/dl-deps.c 2014-08-27 04:59:01.568070587 +0000
+++ git/elf/dl-deps.c 2014-08-27 05:10:48.260070587 +0000
@@ -127,7 +127,7 @@
diff --git a/elf/dl-deps.c b/elf/dl-deps.c
index eee146a..1a4b004 100644
--- a/elf/dl-deps.c
+++ b/elf/dl-deps.c
@@ -127,7 +127,7 @@ empty dynamic string token substitution")); \
else \
{ \
/* This is for DT_AUXILIARY. */ \
@ -337,7 +129,7 @@ Index: git/elf/dl-deps.c
_dl_debug_printf (N_("\
cannot load auxiliary `%s' because of empty dynamic string token " \
"substitution\n"), __str); \
@@ -303,7 +303,7 @@
@@ -303,7 +303,7 @@ _dl_map_object_deps (struct link_map *map,
args.name = name;
/* Say that we are about to load an auxiliary library. */
@ -346,7 +138,7 @@ Index: git/elf/dl-deps.c
0))
_dl_debug_printf ("load auxiliary object=%s"
" requested by file=%s\n",
@@ -520,7 +520,7 @@
@@ -520,7 +520,7 @@ _dl_map_object_deps (struct link_map *map,
runp->map->l_reserved = 0;
}
@ -355,11 +147,11 @@ Index: git/elf/dl-deps.c
&& map == GL(dl_ns)[LM_ID_BASE]._ns_loaded)
{
/* If we are to compute conflicts, we have to build local scope
Index: git/elf/dl-error.c
===================================================================
--- git.orig/elf/dl-error.c 2014-08-27 04:59:01.568070587 +0000
+++ git/elf/dl-error.c 2014-08-27 05:11:06.752070587 +0000
@@ -139,7 +139,7 @@
diff --git a/elf/dl-error.c b/elf/dl-error.c
index 0fc3fd8..ea82f4d 100644
--- a/elf/dl-error.c
+++ b/elf/dl-error.c
@@ -139,7 +139,7 @@ internal_function
_dl_signal_cerror (int errcode, const char *objname, const char *occation,
const char *errstring)
{
@ -368,11 +160,11 @@ Index: git/elf/dl-error.c
& ~(DL_DEBUG_STATISTICS|DL_DEBUG_PRELINK), 0))
_dl_debug_printf ("%s: error: %s: %s (%s)\n", objname, occation,
errstring, receiver ? "continued" : "fatal");
Index: git/elf/dl-fini.c
===================================================================
--- git.orig/elf/dl-fini.c 2014-08-27 04:59:01.568070587 +0000
+++ git/elf/dl-fini.c 2014-08-27 05:11:17.544070587 +0000
@@ -234,7 +234,7 @@
diff --git a/elf/dl-fini.c b/elf/dl-fini.c
index 6cfe651..f59f7fe 100644
--- a/elf/dl-fini.c
+++ b/elf/dl-fini.c
@@ -234,7 +234,7 @@ _dl_fini (void)
|| l->l_info[DT_FINI] != NULL)
{
/* When debugging print a message first. */
@ -381,7 +173,7 @@ Index: git/elf/dl-fini.c
& DL_DEBUG_IMPCALLS, 0))
_dl_debug_printf ("\ncalling fini: %s [%lu]\n\n",
DSO_FILENAME (l->l_name),
@@ -286,7 +286,7 @@
@@ -286,7 +286,7 @@ _dl_fini (void)
goto again;
}
@ -390,11 +182,11 @@ Index: git/elf/dl-fini.c
_dl_debug_printf ("\nruntime linker statistics:\n"
" final number of relocations: %lu\n"
"final number of relocations from cache: %lu\n",
Index: git/elf/dl-init.c
===================================================================
--- git.orig/elf/dl-init.c 2014-08-27 04:59:01.568070587 +0000
+++ git/elf/dl-init.c 2014-08-27 05:11:28.372070587 +0000
@@ -52,7 +52,7 @@
diff --git a/elf/dl-init.c b/elf/dl-init.c
index 2f85731..e46e8b6 100644
--- a/elf/dl-init.c
+++ b/elf/dl-init.c
@@ -46,7 +46,7 @@ call_init (struct link_map *l, int argc, char **argv, char **env)
return;
/* Print a debug message if wanted. */
@ -403,7 +195,7 @@ Index: git/elf/dl-init.c
_dl_debug_printf ("\ncalling init: %s\n\n",
DSO_FILENAME (l->l_name));
@@ -102,7 +102,7 @@
@@ -96,7 +96,7 @@ _dl_init (struct link_map *main_map, int argc, char **argv, char **env)
ElfW(Addr) *addrs;
unsigned int cnt;
@ -412,11 +204,11 @@ Index: git/elf/dl-init.c
_dl_debug_printf ("\ncalling preinit: %s\n\n",
DSO_FILENAME (main_map->l_name));
Index: git/elf/dl-load.c
===================================================================
--- git.orig/elf/dl-load.c 2014-08-27 04:59:01.572070587 +0000
+++ git/elf/dl-load.c 2014-08-27 05:11:41.156070587 +0000
@@ -957,7 +957,7 @@
diff --git a/elf/dl-load.c b/elf/dl-load.c
index f664f50..8c28744 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -943,7 +943,7 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
}
/* Print debugging message. */
@ -425,7 +217,7 @@ Index: git/elf/dl-load.c
_dl_debug_printf ("file=%s [%lu]; generating link map\n", name, nsid);
/* This is the ELF header. We read it in `open_verify'. */
@@ -1361,7 +1361,7 @@
@@ -1347,7 +1347,7 @@ cannot enable executable stack as shared object requires");
l->l_entry += l->l_addr;
@ -434,7 +226,7 @@ Index: git/elf/dl-load.c
_dl_debug_printf ("\
dynamic: 0x%0*lx base: 0x%0*lx size: 0x%0*Zx\n\
entry: 0x%0*lx phdr: 0x%0*lx phnum: %*u\n\n",
@@ -1787,7 +1787,7 @@
@@ -1789,7 +1789,7 @@ open_path (const char *name, size_t namelen, int mode,
/* If we are debugging the search for libraries print the path
now if it hasn't happened now. */
@ -443,7 +235,7 @@ Index: git/elf/dl-load.c
&& current_what != this_dir->what)
{
current_what = this_dir->what;
@@ -1808,7 +1808,7 @@
@@ -1810,7 +1810,7 @@ open_path (const char *name, size_t namelen, int mode,
- buf);
/* Print name we try if this is wanted. */
@ -452,7 +244,7 @@ Index: git/elf/dl-load.c
_dl_debug_printf (" trying file=%s\n", buf);
fd = open_verify (buf, fbp, loader, whatcode, mode,
@@ -1953,7 +1953,7 @@
@@ -1955,7 +1955,7 @@ _dl_map_object (struct link_map *loader, const char *name,
}
/* Display information if we are debugging. */
@ -461,7 +253,7 @@ Index: git/elf/dl-load.c
&& loader != NULL)
_dl_debug_printf ((mode & __RTLD_CALLMAP) == 0
? "\nfile=%s [%lu]; needed by %s [%lu]\n"
@@ -1995,7 +1995,7 @@
@@ -1997,7 +1997,7 @@ _dl_map_object (struct link_map *loader, const char *name,
size_t namelen = strlen (name) + 1;
@ -470,8 +262,8 @@ Index: git/elf/dl-load.c
_dl_debug_printf ("find library=%s [%lu]; searching\n", name, nsid);
fd = -1;
@@ -2122,7 +2122,7 @@
&realname, &fb, l, LA_SER_DEFAULT, &found_other_class);
@@ -2119,7 +2119,7 @@ _dl_map_object (struct link_map *loader, const char *name,
#endif
/* Add another newline when we are tracing the library loading. */
- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
@ -479,7 +271,7 @@ Index: git/elf/dl-load.c
_dl_debug_printf ("\n");
}
else
@@ -2155,7 +2155,7 @@
@@ -2152,7 +2152,7 @@ _dl_map_object (struct link_map *loader, const char *name,
if (__glibc_unlikely (fd == -1))
{
if (trace_mode
@ -488,11 +280,78 @@ Index: git/elf/dl-load.c
{
/* We haven't found an appropriate library. But since we
are only interested in the list of libraries this isn't
Index: git/elf/dl-object.c
===================================================================
--- git.orig/elf/dl-object.c 2014-08-27 04:59:01.572070587 +0000
+++ git/elf/dl-object.c 2014-08-27 05:11:51.756070587 +0000
@@ -98,7 +98,7 @@
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c
index 11cb44b..588c3e4 100644
--- a/elf/dl-lookup.c
+++ b/elf/dl-lookup.c
@@ -302,7 +302,7 @@ do_lookup_unique (const char *undef_name, uint_fast32_t new_hash,
hash table. */
if (__glibc_unlikely (tab->size))
{
- assert (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK);
+ assert (GLRO_dl_debug_mask & DL_DEBUG_PRELINK);
goto success;
}
#endif
@@ -378,7 +378,7 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash,
continue;
/* Print some debugging info if wanted. */
- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SYMBOLS))
+ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SYMBOLS))
_dl_debug_printf ("symbol=%s; lookup in file=%s [%lu]\n",
undef_name, DSO_FILENAME (map->l_name),
map->l_ns);
@@ -755,7 +755,7 @@ add_dependency (struct link_map *undef_map, struct link_map *map, int flags)
}
/* Display information if we are debugging. */
- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES))
+ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES))
_dl_debug_printf ("\
\nfile=%s [%lu]; needed by %s [%lu] (relocation dependency)\n\n",
DSO_FILENAME (map->l_name),
@@ -859,7 +859,7 @@ _dl_lookup_symbol_x (const char *undef_name, struct link_map *undef_map,
{
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 : "";
@@ -935,7 +935,7 @@ _dl_lookup_symbol_x (const char *undef_name, struct link_map *undef_map,
if (__glibc_unlikely (current_value.m->l_used == 0))
current_value.m->l_used = 1;
- if (__glibc_unlikely (GLRO(dl_debug_mask)
+ if (__glibc_unlikely (GLRO_dl_debug_mask
& (DL_DEBUG_BINDINGS|DL_DEBUG_PRELINK)))
_dl_debug_bindings (undef_name, undef_map, ref,
&current_value, version, type_class, protected);
@@ -1000,7 +1000,7 @@ _dl_debug_bindings (const char *undef_name, struct link_map *undef_map,
{
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'",
DSO_FILENAME (reference_name),
@@ -1014,7 +1014,7 @@ _dl_debug_bindings (const char *undef_name, struct link_map *undef_map,
_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 };
diff --git a/elf/dl-object.c b/elf/dl-object.c
index 1d58bbc..938a257 100644
--- a/elf/dl-object.c
+++ b/elf/dl-object.c
@@ -98,7 +98,7 @@ _dl_new_object (char *realname, const char *libname, int type,
new->l_type = type;
/* If we set the bit now since we know it is never used we avoid
dirtying the cache line later. */
@ -501,11 +360,60 @@ Index: git/elf/dl-object.c
new->l_used = 1;
new->l_loader = loader;
#if NO_TLS_OFFSET != 0
Index: git/elf/dl-reloc.c
===================================================================
--- git.orig/elf/dl-reloc.c 2014-08-27 04:59:01.572070587 +0000
+++ git/elf/dl-reloc.c 2014-08-27 05:12:07.056070587 +0000
@@ -183,7 +183,7 @@
diff --git a/elf/dl-open.c b/elf/dl-open.c
index 2db1c02..1288604 100644
--- a/elf/dl-open.c
+++ b/elf/dl-open.c
@@ -147,7 +147,7 @@ add_to_global (struct link_map *new)
ns->_ns_main_searchlist->r_list[new_nlist++] = map;
/* We modify the global scope. Report this. */
- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES))
+ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SCOPES))
_dl_debug_printf ("\nadd %s [%lu] to global scope\n",
map->l_name, map->l_ns);
}
@@ -251,7 +251,7 @@ dl_open_worker (void *a)
if (__glibc_unlikely (new->l_searchlist.r_list != NULL))
{
/* Let the user know about the opencount. */
- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES))
+ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES))
_dl_debug_printf ("opening file=%s [%lu]; direct_opencount=%u\n\n",
new->l_name, new->l_ns, new->l_direct_opencount);
@@ -302,7 +302,7 @@ dl_open_worker (void *a)
LIBC_PROBE (map_complete, 3, args->nsid, r, new);
/* Print scope information. */
- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES))
+ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SCOPES))
_dl_show_scope (new, 0);
/* Only do lazy relocation if `LD_BIND_NOW' is not set. */
@@ -519,7 +519,7 @@ dl_open_worker (void *a)
}
/* Print scope information. */
- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES))
+ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SCOPES))
_dl_show_scope (imap, from_scope);
}
@@ -577,7 +577,7 @@ TLS generation counter wrapped! Please report this."));
#endif
/* Let the user know about the opencount. */
- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES))
+ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES))
_dl_debug_printf ("opening file=%s [%lu]; direct_opencount=%u\n\n",
new->l_name, new->l_ns, new->l_direct_opencount);
}
diff --git a/elf/dl-reloc.c b/elf/dl-reloc.c
index 61252d7..4c83815 100644
--- a/elf/dl-reloc.c
+++ b/elf/dl-reloc.c
@@ -178,7 +178,7 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
&& __builtin_expect (l->l_info[DT_BIND_NOW] != NULL, 0))
lazy = 0;
@ -514,11 +422,11 @@ Index: git/elf/dl-reloc.c
_dl_debug_printf ("\nrelocation processing: %s%s\n",
DSO_FILENAME (l->l_name), lazy ? " (lazy)" : "");
Index: git/elf/dl-version.c
===================================================================
--- git.orig/elf/dl-version.c 2014-08-27 04:59:01.608070587 +0000
+++ git/elf/dl-version.c 2014-08-27 05:12:19.568070587 +0000
@@ -82,7 +82,7 @@
diff --git a/elf/dl-version.c b/elf/dl-version.c
index f6e5cd9..320628c 100644
--- a/elf/dl-version.c
+++ b/elf/dl-version.c
@@ -82,7 +82,7 @@ match_symbol (const char *name, Lmid_t ns, ElfW(Word) hash, const char *string,
int result = 0;
/* Display information about what we are doing while debugging. */
@ -527,3 +435,122 @@ Index: git/elf/dl-version.c
_dl_debug_printf ("\
checking for version `%s' in file %s [%lu] required by file %s [%lu]\n",
string, DSO_FILENAME (map->l_name),
diff --git a/elf/get-dynamic-info.h b/elf/get-dynamic-info.h
index dc8359d..7774fda 100644
--- a/elf/get-dynamic-info.h
+++ b/elf/get-dynamic-info.h
@@ -166,7 +166,7 @@ elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp)
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/elf/rtld.c b/elf/rtld.c
index fc3a2db..59c4637 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -323,7 +323,7 @@ _dl_start_final (void *arg, struct dl_start_final_info *info)
}
#endif
- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_STATISTICS))
+ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_STATISTICS))
{
#ifndef HP_TIMING_NONAVAIL
print_statistics (&rtld_total_time);
@@ -1701,7 +1701,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
after relocation. */
struct link_map *l;
- if (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK)
+ if (GLRO_dl_debug_mask & DL_DEBUG_PRELINK)
{
struct r_scope_elem *scope = &main_map->l_searchlist;
@@ -1731,7 +1731,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
_dl_printf ("\n");
}
}
- else if (GLRO(dl_debug_mask) & DL_DEBUG_UNUSED)
+ else if (GLRO_dl_debug_mask & DL_DEBUG_UNUSED)
{
/* Look through the dependencies of the main executable
and determine which of them is not actually
@@ -1839,7 +1839,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
}
}
- if ((GLRO(dl_debug_mask) & DL_DEBUG_PRELINK)
+ if ((GLRO_dl_debug_mask & DL_DEBUG_PRELINK)
&& rtld_multiple_ref)
{
/* Mark the link map as not yet relocated again. */
@@ -1972,7 +1972,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
if (r_list == r_listend && liblist == liblistend)
prelinked = true;
- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
+ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS))
_dl_debug_printf ("\nprelink checking: %s\n",
prelinked ? "ok" : "failed");
}
@@ -1990,7 +1990,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
GLRO(dl_init_all_dirs) = GL(dl_all_dirs);
/* Print scope information. */
- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES))
+ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SCOPES))
{
_dl_debug_printf ("\nInitial object scopes\n");
@@ -2265,7 +2265,7 @@ process_dl_debug (const char *dl_debug)
if (debopts[cnt].len == len
&& memcmp (dl_debug, debopts[cnt].name, len) == 0)
{
- GLRO(dl_debug_mask) |= debopts[cnt].mask;
+ GLRO_dl_debug_mask |= debopts[cnt].mask;
any_debug = 1;
break;
}
@@ -2286,7 +2286,7 @@ warning: debug option `%s' unknown; try LD_DEBUG=help\n", copy);
++dl_debug;
}
- if (GLRO(dl_debug_mask) & DL_DEBUG_UNUSED)
+ if (GLRO_dl_debug_mask & DL_DEBUG_UNUSED)
{
/* In order to get an accurate picture of whether a particular
DT_NEEDED entry is actually used we have to process both
@@ -2294,7 +2294,7 @@ warning: debug option `%s' unknown; try LD_DEBUG=help\n", copy);
GLRO(dl_lazy) = 0;
}
- if (GLRO(dl_debug_mask) & DL_DEBUG_HELP)
+ if (GLRO_dl_debug_mask & DL_DEBUG_HELP)
{
size_t cnt;
@@ -2499,7 +2499,7 @@ process_envvars (enum mode *modep)
mode = trace;
GLRO(dl_verbose) = 1;
#if __OPTION_EGLIBC_RTLD_DEBUG
- GLRO(dl_debug_mask) |= DL_DEBUG_PRELINK;
+ GLRO_dl_debug_mask |= DL_DEBUG_PRELINK;
#endif
GLRO(dl_trace_prelink) = &envline[17];
}
@@ -2548,7 +2548,7 @@ process_envvars (enum mode *modep)
{
unsetenv ("MALLOC_CHECK_");
#if __OPTION_EGLIBC_RTLD_DEBUG
- GLRO(dl_debug_mask) = 0;
+ GLRO_dl_debug_mask = 0;
#endif
}
--
2.1.4

View File

@ -0,0 +1,145 @@
From e98779aa56fae0346dff2d0b72acadd0eaf01891 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 27 May 2015 16:10:50 -0700
Subject: [PATCH 27/27] eglibc-use-option-groups: Conditionally exclude c++
tests
Some test programs written in c++ are still included in spite of
"libc-cxx-tests" being omitted from DISTRO_FEATURES_LIBC.
All .cc programs are compiled with g++.
g++ automatically specifies linking against the C++ library.
This patch conditionally excludes the following tests as well:
bug-atexit3-lib.cc
tst-cancel24.cc
tst-cancel24-static.cc
tst-unique3lib.cc
tst-unique3lib2.cc
tst-unique4lib.cc
tst-unique3.cc
tst-unique4.cc
Tested with DISTRO_FEATURES_LIBC_remove = " libc-cxx-tests"
[YOCTO #7003]
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
dlfcn/Makefile | 8 ++++++--
elf/Makefile | 19 ++++++++++++++-----
nptl/Makefile | 12 ++++++++++--
3 files changed, 30 insertions(+), 9 deletions(-)
diff --git a/dlfcn/Makefile b/dlfcn/Makefile
index 3827607..920bd58 100644
--- a/dlfcn/Makefile
+++ b/dlfcn/Makefile
@@ -39,16 +39,20 @@ ifeq (yes,$(build-shared))
tests = glrefmain failtest tst-dladdr default errmsg1 tstcxaatexit \
bug-dlopen1 bug-dlsym1 tst-dlinfo bug-atexit1 bug-atexit2 \
tstatexit bug-dl-leaf tst-rec-dlopen
-endif
-
tests-$(OPTION_EGLIBC_CXX_TESTS) += bug-atexit3
+endif
+
modules-names = glreflib1 glreflib2 glreflib3 failtestmod defaultmod1 \
defaultmod2 errmsg1mod modatexit modcxaatexit \
bug-dlsym1-lib1 bug-dlsym1-lib2 bug-atexit1-lib \
bug-atexit2-lib bug-dl-leaf-lib \
bug-dl-leaf-lib-cb moddummy1 moddummy2
+ifeq (y,$(OPTION_EGLIBC_CXX_TESTS))
+modules-names += bug-atexit3-lib
+endif
+
failtestmod.so-no-z-defs = yes
glreflib2.so-no-z-defs = yes
errmsg1mod.so-no-z-defs = yes
diff --git a/elf/Makefile b/elf/Makefile
index 71a18a1..26fe3c5 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -17,6 +17,8 @@
# Makefile for elf subdirectory of GNU C Library.
+include ../option-groups.mak
+
subdir := elf
include ../Makeconfig
@@ -145,12 +147,15 @@ tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \
unload3 unload4 unload5 unload6 unload7 unload8 tst-global1 order2 \
tst-audit1 tst-audit2 tst-audit8 tst-audit9 \
tst-stackguard1 tst-addr1 tst-thrlock \
- tst-unique1 tst-unique2 $(if $(CXX),tst-unique3 tst-unique4 \
- tst-nodelete) \
+ tst-unique1 tst-unique2 \
tst-initorder tst-initorder2 tst-relsort1 tst-null-argv \
tst-ptrguard1 tst-tlsalign tst-tlsalign-extern tst-nodelete-opened \
tst-nodelete2
# reldep9
+ifeq (y,$(OPTION_EGLIBC_CXX_TESTS))
+tests += $(if $(CXX),tst-unique3 tst-unique4 tst-nodelete)
+endif
+
ifeq ($(build-hardcoded-path-in-tests),yes)
tests += tst-dlopen-aout
LDFLAGS-tst-dlopen-aout = $(no-pie-ldflag)
@@ -209,9 +214,6 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
tst-unique1mod1 tst-unique1mod2 \
tst-unique2mod1 tst-unique2mod2 \
tst-auditmod9a tst-auditmod9b \
- $(if $(CXX),tst-unique3lib tst-unique3lib2 tst-unique4lib \
- tst-nodelete-uniquemod tst-nodelete-rtldmod \
- tst-nodelete-zmod) \
tst-initordera1 tst-initorderb1 \
tst-initordera2 tst-initorderb2 \
tst-initordera3 tst-initordera4 \
@@ -220,6 +222,13 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
tst-relsort1mod1 tst-relsort1mod2 tst-array2dep \
tst-array5dep tst-null-argv-lib \
tst-tlsalign-lib tst-nodelete-opened-lib tst-nodelete2mod
+
+ifeq (y,$(OPTION_EGLIBC_CXX_TESTS))
+modules-names += $(if $(CXX),tst-unique3lib tst-unique3lib2 tst-unique4lib \
+ tst-nodelete-uniquemod tst-nodelete-rtldmod \
+ tst-nodelete-zmod)
+endif
+
ifeq (yes,$(have-protected-data))
modules-names += tst-protected1moda tst-protected1modb
tests += tst-protected1a tst-protected1b
diff --git a/nptl/Makefile b/nptl/Makefile
index 596ca3c..50a708b 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -390,12 +390,20 @@ link-libc-static := $(common-objpfx)libc.a $(static-gnulib) \
$(common-objpfx)libc.a
tests-static += tst-locale1 tst-locale2 tst-stackguard1-static \
- tst-cancel21-static tst-cancel24-static tst-cond8-static \
+ tst-cancel21-static tst-cond8-static \
tst-mutex8-static tst-mutexpi8-static tst-sem11-static \
tst-sem12-static
-tests += tst-stackguard1-static tst-cancel21-static tst-cancel24-static \
+
+ifeq (y,$(OPTION_EGLIBC_CXX_TESTS))
+tests-static += tst-cancel24-static
+endif
+
+tests += tst-stackguard1-static tst-cancel21-static \
tst-cond8-static tst-mutex8-static tst-mutexpi8-static \
tst-sem11-static tst-sem12-static
+
+tests-$(OPTION_EGLIBC_CXX_TESTS) += tst-cancel24-static
+
xtests-static += tst-setuid1-static
# These tests are linked with libc before libpthread
--
2.1.4

View File

@ -1,43 +0,0 @@
From 2959eda9272a033863c271aff62095abd01bd4e3 Mon Sep 17 00:00:00 2001
From: Arjun Shankar <arjun.is@lostca.se>
Date: Tue, 21 Apr 2015 14:06:31 +0200
Subject: [PATCH] CVE-2015-1781: resolv/nss_dns/dns-host.c buffer overflow
[BZ#18287]
Upstream-Status: Backport
https://sourceware.org/bugzilla/show_bug.cgi?id=18287
---
resolv/nss_dns/dns-host.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c
index b16b0ddf110907a0086b86612e544d3dc75182b8..d8c55791591750567f00e616e5d7b378dec934a0 100644
--- a/resolv/nss_dns/dns-host.c
+++ b/resolv/nss_dns/dns-host.c
@@ -608,21 +608,22 @@ getanswer_r (const querybuf *answer, int anslen, const char *qname, int qtype,
int n, ancount, qdcount;
int haveanswer, had_error;
char *bp, **ap, **hap;
char tbuf[MAXDNAME];
const char *tname;
int (*name_ok) (const char *);
u_char packtmp[NS_MAXCDNAME];
int have_to_map = 0;
uintptr_t pad = -(uintptr_t) buffer % __alignof__ (struct host_data);
buffer += pad;
- if (__glibc_unlikely (buflen < sizeof (struct host_data) + pad))
+ buflen = buflen > pad ? buflen - pad : 0;
+ if (__glibc_unlikely (buflen < sizeof (struct host_data)))
{
/* The buffer is too small. */
too_small:
*errnop = ERANGE;
*h_errnop = NETDB_INTERNAL;
return NSS_STATUS_TRYAGAIN;
}
host_data = (struct host_data *) buffer;
linebuflen = buflen - sizeof (struct host_data);
if (buflen - sizeof (struct host_data) != linebuflen)
--
2.2.2

View File

@ -1,36 +0,0 @@
From 132a1328eccd20621b77f7810eebbeec0a1af187 Mon Sep 17 00:00:00 2001
From: Evangelos Foutras <evangelos@foutrelis.com>
Date: Tue, 10 Feb 2015 03:22:58 +0000
Subject: [PATCH] Fix __memcpy_chk on non-SSE2 CPUs
In commit 8b4416d, the 1: jump label in __mempcpy_chk was accidentally
moved. This resulted in failures of mempcpy on CPU without SSE2.
Upstream-Status: Backport
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=132a1328eccd20621b77f7810eebbeec0a1af187
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
---
sysdeps/i386/i686/multiarch/mempcpy_chk.S | 4 ++--
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/sysdeps/i386/i686/multiarch/mempcpy_chk.S b/sysdeps/i386/i686/multiarch/mempcpy_chk.S
index 207b648..b6fa202 100644
--- a/sysdeps/i386/i686/multiarch/mempcpy_chk.S
+++ b/sysdeps/i386/i686/multiarch/mempcpy_chk.S
@@ -36,8 +36,8 @@ ENTRY(__mempcpy_chk)
cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx)
jne 1f
call __init_cpu_features
- leal __mempcpy_chk_ia32@GOTOFF(%ebx), %eax
-1: testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx)
+1: leal __mempcpy_chk_ia32@GOTOFF(%ebx), %eax
+ testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx)
jz 2f
leal __mempcpy_chk_sse2_unaligned@GOTOFF(%ebx), %eax
testl $bit_Fast_Unaligned_Load, FEATURE_OFFSET+index_Fast_Unaligned_Load+__cpu_features@GOTOFF(%ebx)
--
1.9.1

View File

@ -1,17 +0,0 @@
import http://sourceware.org/ml/libc-ports/2007-12/msg00000.html
Upstream-Status: Pending
Index: git/bits/stdio-lock.h
===================================================================
--- git.orig/bits/stdio-lock.h 2014-08-29 10:33:57.960070587 -0700
+++ git/bits/stdio-lock.h 2014-08-29 10:33:57.952070587 -0700
@@ -49,6 +49,8 @@
_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)

View File

@ -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: Inappropriate [older kernel/perf specific]
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Index: git/posix/sys/wait.h
===================================================================
--- git.orig/posix/sys/wait.h 2014-08-29 10:35:10.432070587 -0700
+++ git/posix/sys/wait.h 2014-08-29 10:35:10.424070587 -0700
@@ -27,6 +27,7 @@
__BEGIN_DECLS
#include <signal.h>
+#include <sys/resource.h>
/* These macros could also be defined in <stdlib.h>. */
#if !defined _STDLIB_H || (!defined __USE_XOPEN && !defined __USE_XOPEN2K8)

View File

@ -1,36 +0,0 @@
From 6207fb45553ee98f2f326883b7c21b76c8267343 Mon Sep 17 00:00:00 2001
From: Robert Yang <liezhi.yang@windriver.com>
Date: Tue, 31 Mar 2015 02:31:25 -0700
Subject: [PATCH] elf/Makefile: fix a typo
Fixed a typo:
name-target-directory -> make-target-directory
There is no name-target-directory, it should be make-target-directory,
this fixed the error:
/bin/bash: /path/to/elf/runtime-linker.T: No such file or directory
Makefile:361: recipe for target '/path/to/elf/runtime-linker.st' failed
Upstream-Status: Pending
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
elf/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/elf/Makefile b/elf/Makefile
index e5b142c..62fe245 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -358,7 +358,7 @@ $(objpfx)interp.os: $(elf-objpfx)runtime-linker.h
$(elf-objpfx)runtime-linker.h: $(elf-objpfx)runtime-linker.st; @:
$(elf-objpfx)runtime-linker.st: $(common-objpfx)config.make
- $(name-target-directory)
+ $(make-target-directory)
echo '#define RUNTIME_LINKER "$(rtlddir)/$(rtld-installed-name)"' \
> ${@:st=T}
$(move-if-change) ${@:st=T} ${@:st=h}
--
1.7.9.5

View File

@ -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 <raj.khem@gmail.com>
Index: git/localedata/locales/bo_CN
===================================================================
--- git.orig/localedata/locales/bo_CN 2014-08-29 10:35:22.464070587 -0700
+++ git/localedata/locales/bo_CN 2014-08-29 10:35:22.456070587 -0700
@@ -146,7 +146,7 @@
LC_NAME
% FIXME
-name_fmt ""
+name_fmt "FIXME"
% name_gen "FIXME"
% name_miss "FIXME"
% name_mr "FIXME"
Index: git/localedata/locales/bo_IN
===================================================================
--- git.orig/localedata/locales/bo_IN 2014-08-29 10:35:22.464070587 -0700
+++ git/localedata/locales/bo_IN 2014-08-29 10:35:22.456070587 -0700
@@ -71,7 +71,7 @@
LC_NAME
% FIXME
-name_fmt ""
+name_fmt "FIXME"
% name_gen "FIXME"
% name_miss "FIXME"
% name_mr "FIXME"

View File

@ -1,29 +0,0 @@
sysdeps/gnu/configure.ac: handle correctly $libc_cv_rootsbindir
Upstream-Status:Pending
Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
Index: git/sysdeps/gnu/configure
===================================================================
--- git.orig/sysdeps/gnu/configure 2014-08-27 07:24:38.572070587 +0000
+++ git/sysdeps/gnu/configure 2014-08-27 07:24:41.308070587 +0000
@@ -32,6 +32,6 @@
else
libc_cv_localstatedir=$localstatedir
fi
- libc_cv_rootsbindir=/sbin
+ test -n "$libc_cv_rootsbindir" || libc_cv_rootsbindir=/sbin
;;
esac
Index: git/sysdeps/gnu/configure.ac
===================================================================
--- git.orig/sysdeps/gnu/configure.ac 2014-08-27 07:24:38.572070587 +0000
+++ git/sysdeps/gnu/configure.ac 2014-08-27 07:24:41.308070587 +0000
@@ -21,6 +21,6 @@
else
libc_cv_localstatedir=$localstatedir
fi
- libc_cv_rootsbindir=/sbin
+ test -n "$libc_cv_rootsbindir" || libc_cv_rootsbindir=/sbin
;;
esac

View File

@ -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 <raj.khem@gmail.com>
Upstream-Status: Pending
Index: git/nss/getent.c
===================================================================
--- git.orig/nss/getent.c 2014-08-27 05:15:25.996070587 +0000
+++ git/nss/getent.c 2014-08-27 05:16:00.048070587 +0000
@@ -879,7 +879,7 @@
D(group)
D(gshadow)
D(hosts)
-D(initgroups)
+DN(initgroups)
D(netgroup)
D(networks)
D(passwd)

View File

@ -1,51 +0,0 @@
On x32 builds, sysd-syscalls appears malformed since the make-target-directory
appears on the wrong line. This causes races during the build process where you can
see failures like:
Assembler messages:
Fatal error: can't create [...]glibc/2.21-r0/build-x86_64-poky-linux-gnux32/time/gettimeofday.os: No such file or directory
Assembler messages:
Fatal error: can't create [...]glibc/2.21-r0/build-x86_64-poky-linux-gnux32/time/time.os: No such file or directory
The isue is that the carridge return is being escaped when it should
not be. The change to sysd-syscalls with this change:
before:
"""
$(foreach p,$(sysd-rules-targets),$(objpfx)$(patsubst %,$p,time).os): \
$(..)sysdeps/unix/make-syscalls.sh $(make-target-directory)
(echo '#include <dl-vdso.h>';
"""
after:
"""
$(foreach p,$(sysd-rules-targets),$(objpfx)$(patsubst %,$p,time).os): \
$(..)sysdeps/unix/make-syscalls.sh
$(make-target-directory)
(echo '#include <dl-vdso.h>';
"""
which ensures the target directory is correctly created. Only x32 uses the vdso
code which contains the bug which is why the error only really appears on x32.
Upstream Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=18409
Upstream Fix: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d9efd775ba51916b58b899d8b1c8501105a830de
Upstream-Status: Backport
RP 2015/5/13
Index: git/sysdeps/unix/make-syscalls.sh
===================================================================
--- git.orig/sysdeps/unix/make-syscalls.sh
+++ git/sysdeps/unix/make-syscalls.sh
@@ -278,7 +278,7 @@ while read file srcfile caller syscall a
vdso_symver=`echo "$vdso_symver" | sed 's/\./_/g'`
echo "\
\$(foreach p,\$(sysd-rules-targets),\$(objpfx)\$(patsubst %,\$p,$file).os): \\
- \$(..)sysdeps/unix/make-syscalls.sh\
+ \$(..)sysdeps/unix/make-syscalls.sh
\$(make-target-directory)
(echo '#include <dl-vdso.h>'; \\
echo 'extern void *${strong}_ifunc (void) __asm (\"${strong}\");'; \\

View File

@ -1,27 +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 <qing.he@intel.com>
---
Index: git/sysdeps/mips/dl-machine.h
===================================================================
--- git.orig/sysdeps/mips/dl-machine.h 2014-08-27 04:58:11.840070587 +0000
+++ git/sysdeps/mips/dl-machine.h 2014-08-27 04:58:11.832070587 +0000
@@ -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)

View File

@ -1,19 +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
Index: git/elf/readlib.c
===================================================================
--- git.orig/elf/readlib.c 2014-08-29 10:34:16.824070587 -0700
+++ git/elf/readlib.c 2014-08-29 10:34:16.816070587 -0700
@@ -51,6 +51,7 @@
#ifdef SYSDEP_KNOWN_INTERPRETER_NAMES
SYSDEP_KNOWN_INTERPRETER_NAMES
#endif
+ OECORE_KNOWN_INTERPRETER_NAMES
};
static struct known_names known_libs[] =

View File

@ -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 <raj.khem@gmail.com>
* 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)

View File

@ -1,47 +0,0 @@
__ieee754_sqrt{,f} are now inline functions and call out __slow versions
Signed-off-by: chunrong guo <B40290@freescale.com>
Upstream-Status: Pending
diff -rNu 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 2014-04-08 04:39:58.487229887 -0500
+++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c 2014-04-08 04:40:52.643069198 -0500
@@ -41,10 +41,10 @@
#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 @@
/* 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; \
diff -rNu 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 2014-04-08 04:39:58.487229887 -0500
+++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c 2014-04-08 04:41:26.017067682 -0500
@@ -39,10 +39,10 @@
#ifdef __STDC__
float
-__ieee754_sqrtf (float b)
+__slow_ieee754_sqrtf (float b)
#else
float
-__ieee754_sqrtf (b)
+__slow_ieee754_sqrtf (b)
float b;
#endif
{

View File

@ -1,63 +1,56 @@
require glibc.inc
DEPENDS += "gperf-native kconfig-frontends-native"
SRCREV = "4e42b5b8f89f0e288e68be7ad70f9525aebc2cff"
BRANCH = "release/${PV}/master"
SRC_URI = "git://sourceware.org/git/glibc.git;branch=${BRANCH} \
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://ppc_slow_ieee754_sqrt.patch \
file://add_resource_h_to_wait_h.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 \
file://ppce6500-32b_slow_ieee754_sqrt.patch \
file://grok_gold.patch \
file://fix_am_rootsbindir.patch \
file://0001-Add-unused-attribute.patch \
file://0001-When-disabling-SSE-also-make-sure-that-fpmath-is-not.patch \
file://0001-yes-within-the-path-sets-wrong-config-variables.patch \
file://elf-Makefile-fix-a-typo.patch \
file://makesyscall.patch \
file://Fix-__memcpy_chk-on-non-SSE2-CPUs.patch \
${EGLIBCPATCHES} \
${CVEPATCHES} \
"
EGLIBCPATCHES = "\
file://timezone-re-written-tzselect-as-posix-sh.patch \
file://eglibc.patch \
file://option-groups.patch \
file://GLRO_dl_debug_mask.patch \
file://eglibc-header-bootstrap.patch \
file://eglibc-resolv-dynamic.patch \
file://eglibc-ppc8xx-cache-line-workaround.patch \
file://eglibc-sh4-fpscr_values.patch \
file://eglibc-use-option-groups.patch \
"
# file://eglibc-install-pic-archives.patch \
# file://initgroups_keys.patch \
#
CVEPATCHES = "\
file://CVE-2015-1781-resolv-nss_dns-dns-host.c-buffer-overf.patch \
"
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 \
"
DEPENDS += "gperf-native kconfig-frontends-native"
SRCREV ?= "a34d1c6afc86521d6ad17662a3b5362d8481514c"
BRANCH ?= "release/${PV}/master"
GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
SRC_URI = "${GLIBC_GIT_URI};branch=${BRANCH};name=glibc \
file://0004-Backport-https-sourceware.org-ml-libc-ports-2007-12-.patch \
file://0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch \
file://0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch \
file://0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch \
file://0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
file://0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch \
file://0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
file://0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
file://0012-Make-ld-version-output-matching-grok-gold-s-output.patch \
file://0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch \
file://0014-Add-unused-attribute.patch \
file://0015-When-disabling-SSE-also-make-sure-that-fpmath-is-not.patch \
file://0016-yes-within-the-path-sets-wrong-config-variables.patch \
file://0017-timezone-re-written-tzselect-as-posix-sh.patch \
file://0018-eglibc-Cross-building-and-testing-instructions.patch \
file://0019-eglibc-Bring-Eglibc-option-group-infrastructure-to-g.patch \
file://0020-eglibc-Help-bootstrap-cross-toolchain.patch \
file://0021-eglibc-cherry-picked-from-http-www.eglibc.org-archiv.patch \
file://0022-eglibc-Clear-cache-lines-on-ppc8xx.patch \
file://0023-eglibc-Resolve-__fpscr_values-on-SH4.patch \
file://0024-eglibc-Forward-port-eglibc-options-groups-support.patch \
file://0025-eglibc-Install-PIC-archives.patch \
file://0026-eglibc-dl_debug_mask-is-controlled-by-__OPTION_EGLIB.patch \
file://0027-eglibc-use-option-groups-Conditionally-exclude-c-tes.patch \
"
SRC_URI += "\
file://etc/ld.so.conf \
file://generate-supported.mk \
"
SRC_URI_append_class-nativesdk = "\
file://0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch \
file://0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch \
file://0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch \
"
S = "${WORKDIR}/git"
B = "${WORKDIR}/build-${TARGET_SYS}"