diff options
Diffstat (limited to 'meta')
48 files changed, 4482 insertions, 4091 deletions
diff --git a/meta/conf/distro/include/tcmode-default.inc b/meta/conf/distro/include/tcmode-default.inc index c08fe24f9a..fabd347a16 100644 --- a/meta/conf/distro/include/tcmode-default.inc +++ b/meta/conf/distro/include/tcmode-default.inc | |||
@@ -26,7 +26,7 @@ GCCVERSION ?= "4.9%" | |||
26 | SDKGCCVERSION ?= "${GCCVERSION}" | 26 | SDKGCCVERSION ?= "${GCCVERSION}" |
27 | BINUVERSION ?= "2.25%" | 27 | BINUVERSION ?= "2.25%" |
28 | GDBVERSION ?= "7.9%" | 28 | GDBVERSION ?= "7.9%" |
29 | GLIBCVERSION ?= "2.21" | 29 | GLIBCVERSION ?= "2.22" |
30 | UCLIBCVERSION ?= "0.9.33+git%" | 30 | UCLIBCVERSION ?= "0.9.33+git%" |
31 | LINUXLIBCVERSION ?= "4.1" | 31 | LINUXLIBCVERSION ?= "4.1" |
32 | 32 | ||
diff --git a/meta/recipes-core/glibc/cross-localedef-native_2.21.bb b/meta/recipes-core/glibc/cross-localedef-native_2.21.bb deleted file mode 100644 index 4e15f02140..0000000000 --- a/meta/recipes-core/glibc/cross-localedef-native_2.21.bb +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | SUMMARY = "Cross locale generation tool for glibc" | ||
2 | HOMEPAGE = "http://www.gnu.org/software/libc/libc.html" | ||
3 | SECTION = "libs" | ||
4 | LICENSE = "LGPL-2.1" | ||
5 | |||
6 | LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \ | ||
7 | file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
8 | file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \ | ||
9 | file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c" | ||
10 | |||
11 | |||
12 | inherit native | ||
13 | inherit autotools | ||
14 | |||
15 | FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/glibc:" | ||
16 | |||
17 | BRANCH = "release/${PV}/master" | ||
18 | |||
19 | SRC_URI = "git://sourceware.org/git/glibc.git;branch=${BRANCH};name=glibc \ | ||
20 | git://github.com/kraj/localedef;branch=master;name=localedef;destsuffix=git/localedef \ | ||
21 | file://fix_for_centos_5.8.patch \ | ||
22 | ${EGLIBCPATCHES} \ | ||
23 | " | ||
24 | EGLIBCPATCHES = "\ | ||
25 | file://timezone-re-written-tzselect-as-posix-sh.patch \ | ||
26 | file://eglibc.patch \ | ||
27 | file://option-groups.patch \ | ||
28 | file://GLRO_dl_debug_mask.patch \ | ||
29 | file://eglibc-header-bootstrap.patch \ | ||
30 | file://eglibc-resolv-dynamic.patch \ | ||
31 | file://eglibc-ppc8xx-cache-line-workaround.patch \ | ||
32 | file://eglibc-sh4-fpscr_values.patch \ | ||
33 | file://eglibc-use-option-groups.patch \ | ||
34 | " | ||
35 | |||
36 | SRCREV_glibc = "4e42b5b8f89f0e288e68be7ad70f9525aebc2cff" | ||
37 | SRCREV_localedef = "c833367348d39dad7ba018990bfdaffaec8e9ed3" | ||
38 | |||
39 | # Makes for a rather long rev (22 characters), but... | ||
40 | # | ||
41 | SRCREV_FORMAT = "glibc_localedef" | ||
42 | |||
43 | S = "${WORKDIR}/git" | ||
44 | |||
45 | EXTRA_OECONF = "--with-glibc=${S}" | ||
46 | CFLAGS += "-fgnu89-inline -std=gnu99 -DIS_IN\(x\)='0'" | ||
47 | |||
48 | do_configure () { | ||
49 | ${S}/localedef/configure ${EXTRA_OECONF} | ||
50 | } | ||
51 | |||
52 | |||
53 | do_install() { | ||
54 | install -d ${D}${bindir} | ||
55 | install -m 0755 ${B}/localedef ${D}${bindir}/cross-localedef | ||
56 | } | ||
diff --git a/meta/recipes-core/glibc/cross-localedef-native_2.22.bb b/meta/recipes-core/glibc/cross-localedef-native_2.22.bb new file mode 100644 index 0000000000..2153ece0e2 --- /dev/null +++ b/meta/recipes-core/glibc/cross-localedef-native_2.22.bb | |||
@@ -0,0 +1,59 @@ | |||
1 | SUMMARY = "Cross locale generation tool for glibc" | ||
2 | HOMEPAGE = "http://www.gnu.org/software/libc/libc.html" | ||
3 | SECTION = "libs" | ||
4 | LICENSE = "LGPL-2.1" | ||
5 | |||
6 | LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \ | ||
7 | file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
8 | file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \ | ||
9 | file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c" | ||
10 | |||
11 | |||
12 | inherit native | ||
13 | inherit autotools | ||
14 | |||
15 | FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/glibc:" | ||
16 | |||
17 | BRANCH ?= "release/${PV}/master" | ||
18 | GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git" | ||
19 | |||
20 | SRC_URI = "${GLIBC_GIT_URI};branch=${BRANCH};name=glibc \ | ||
21 | git://github.com/kraj/localedef;branch=master;name=localedef;destsuffix=git/localedef \ | ||
22 | file://fix_for_centos_5.8.patch \ | ||
23 | ${EGLIBCPATCHES} \ | ||
24 | " | ||
25 | EGLIBCPATCHES = "\ | ||
26 | file://0017-timezone-re-written-tzselect-as-posix-sh.patch \ | ||
27 | file://0018-eglibc-Cross-building-and-testing-instructions.patch \ | ||
28 | file://0019-eglibc-Bring-Eglibc-option-group-infrastructure-to-g.patch \ | ||
29 | file://0020-eglibc-Help-bootstrap-cross-toolchain.patch \ | ||
30 | file://0021-eglibc-cherry-picked-from-http-www.eglibc.org-archiv.patch \ | ||
31 | file://0022-eglibc-Clear-cache-lines-on-ppc8xx.patch \ | ||
32 | file://0023-eglibc-Resolve-__fpscr_values-on-SH4.patch \ | ||
33 | file://0024-eglibc-Forward-port-eglibc-options-groups-support.patch \ | ||
34 | file://0025-eglibc-Install-PIC-archives.patch \ | ||
35 | file://0026-eglibc-dl_debug_mask-is-controlled-by-__OPTION_EGLIB.patch \ | ||
36 | file://0027-eglibc-use-option-groups-Conditionally-exclude-c-tes.patch \ | ||
37 | " | ||
38 | |||
39 | SRCREV_glibc ?= "a34d1c6afc86521d6ad17662a3b5362d8481514c" | ||
40 | SRCREV_localedef ?= "c833367348d39dad7ba018990bfdaffaec8e9ed3" | ||
41 | |||
42 | # Makes for a rather long rev (22 characters), but... | ||
43 | # | ||
44 | SRCREV_FORMAT = "glibc_localedef" | ||
45 | |||
46 | S = "${WORKDIR}/git" | ||
47 | |||
48 | EXTRA_OECONF = "--with-glibc=${S}" | ||
49 | CFLAGS += "-fgnu89-inline -std=gnu99 -DIS_IN\(x\)='0'" | ||
50 | |||
51 | do_configure () { | ||
52 | ${S}/localedef/configure ${EXTRA_OECONF} | ||
53 | } | ||
54 | |||
55 | |||
56 | do_install() { | ||
57 | install -d ${D}${bindir} | ||
58 | install -m 0755 ${B}/localedef ${D}${bindir}/cross-localedef | ||
59 | } | ||
diff --git a/meta/recipes-core/glibc/glibc-initial_2.21.bb b/meta/recipes-core/glibc/glibc-initial_2.22.bb index 8ab01dc79d..8ab01dc79d 100644 --- a/meta/recipes-core/glibc/glibc-initial_2.21.bb +++ b/meta/recipes-core/glibc/glibc-initial_2.22.bb | |||
diff --git a/meta/recipes-core/glibc/glibc-locale_2.21.bb b/meta/recipes-core/glibc/glibc-locale_2.22.bb index f7702e0358..f7702e0358 100644 --- a/meta/recipes-core/glibc/glibc-locale_2.21.bb +++ b/meta/recipes-core/glibc/glibc-locale_2.22.bb | |||
diff --git a/meta/recipes-core/glibc/glibc-mtrace_2.21.bb b/meta/recipes-core/glibc/glibc-mtrace_2.22.bb index 0b69bad46a..0b69bad46a 100644 --- a/meta/recipes-core/glibc/glibc-mtrace_2.21.bb +++ b/meta/recipes-core/glibc/glibc-mtrace_2.22.bb | |||
diff --git a/meta/recipes-core/glibc/glibc-scripts_2.21.bb b/meta/recipes-core/glibc/glibc-scripts_2.22.bb index 5a89bd8022..5a89bd8022 100644 --- a/meta/recipes-core/glibc/glibc-scripts_2.21.bb +++ b/meta/recipes-core/glibc/glibc-scripts_2.22.bb | |||
diff --git a/meta/recipes-core/glibc/glibc/ld-search-order.patch b/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch index f518bc7642..3d66348133 100644 --- a/meta/recipes-core/glibc/glibc/ld-search-order.patch +++ b/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch | |||
@@ -1,3 +1,9 @@ | |||
1 | From 0876fea1b5b26da84f298714a2e23ba696607dba Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 18 Mar 2015 01:48:24 +0000 | ||
4 | Subject: [PATCH 01/27] nativesdk-glibc: Look for host system ld.so.cache as | ||
5 | well | ||
6 | |||
1 | Upstream-Status: Inappropriate [embedded specific] | 7 | Upstream-Status: Inappropriate [embedded specific] |
2 | 8 | ||
3 | The default lib search path order is: | 9 | The default lib search path order is: |
@@ -7,23 +13,28 @@ The default lib search path order is: | |||
7 | 3) ld.so.cache | 13 | 3) ld.so.cache |
8 | 4) default search paths embedded in the linker | 14 | 4) default search paths embedded in the linker |
9 | 15 | ||
10 | For nativesdk binaries which are being used alongside binaries on a host system, we | 16 | For nativesdk binaries which are being used alongside binaries on a host system, we |
11 | need the search paths to firstly search the shipped nativesdk libs but then also | 17 | need the search paths to firstly search the shipped nativesdk libs but then also |
12 | cover the host system. For example we want the host system's libGL and this may be | 18 | cover the host system. For example we want the host system's libGL and this may be |
13 | in a non-standard location like /usr/lib/mesa. The only place the location is know | 19 | in a non-standard location like /usr/lib/mesa. The only place the location is know |
14 | about is in the ld.so.cache of the host system. | 20 | about is in the ld.so.cache of the host system. |
15 | 21 | ||
16 | Since nativesdk has a simple structure and doesn't need to use a cache itself, we | 22 | Since nativesdk has a simple structure and doesn't need to use a cache itself, we |
17 | repurpose the cache for use as a last resort in finding host system binaries. This | 23 | repurpose the cache for use as a last resort in finding host system binaries. This |
18 | means we need to switch the order of 3 and 4 above to make this work effectively. | 24 | means we need to switch the order of 3 and 4 above to make this work effectively. |
19 | 25 | ||
20 | RP 14/10/2010 | 26 | RP 14/10/2010 |
21 | 27 | ||
22 | Index: git/elf/dl-load.c | 28 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
23 | =================================================================== | 29 | --- |
24 | --- git.orig/elf/dl-load.c 2014-08-28 17:32:46.292070587 -0700 | 30 | elf/dl-load.c | 17 ++++++++--------- |
25 | +++ git/elf/dl-load.c 2014-08-28 17:33:56.048070587 -0700 | 31 | 1 file changed, 8 insertions(+), 9 deletions(-) |
26 | @@ -2050,7 +2050,14 @@ | 32 | |
33 | diff --git a/elf/dl-load.c b/elf/dl-load.c | ||
34 | index 0c052e4..f45085a 100644 | ||
35 | --- a/elf/dl-load.c | ||
36 | +++ b/elf/dl-load.c | ||
37 | @@ -2040,7 +2040,14 @@ _dl_map_object (struct link_map *loader, const char *name, | ||
27 | fd = open_path (name, namelen, mode, | 38 | fd = open_path (name, namelen, mode, |
28 | &loader->l_runpath_dirs, &realname, &fb, loader, | 39 | &loader->l_runpath_dirs, &realname, &fb, loader, |
29 | LA_SER_RUNPATH, &found_other_class); | 40 | LA_SER_RUNPATH, &found_other_class); |
@@ -39,7 +50,7 @@ Index: git/elf/dl-load.c | |||
39 | #ifdef USE_LDCONFIG | 50 | #ifdef USE_LDCONFIG |
40 | if (fd == -1 | 51 | if (fd == -1 |
41 | && (__glibc_likely ((mode & __RTLD_SECURE) == 0) | 52 | && (__glibc_likely ((mode & __RTLD_SECURE) == 0) |
42 | @@ -2113,14 +2120,6 @@ | 53 | @@ -2099,14 +2106,6 @@ _dl_map_object (struct link_map *loader, const char *name, |
43 | } | 54 | } |
44 | #endif | 55 | #endif |
45 | 56 | ||
@@ -52,5 +63,8 @@ Index: git/elf/dl-load.c | |||
52 | - &realname, &fb, l, LA_SER_DEFAULT, &found_other_class); | 63 | - &realname, &fb, l, LA_SER_DEFAULT, &found_other_class); |
53 | - | 64 | - |
54 | /* Add another newline when we are tracing the library loading. */ | 65 | /* Add another newline when we are tracing the library loading. */ |
55 | if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS)) | 66 | if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS)) |
56 | _dl_debug_printf ("\n"); | 67 | _dl_debug_printf ("\n"); |
68 | -- | ||
69 | 2.1.4 | ||
70 | |||
diff --git a/meta/recipes-core/glibc/glibc/relocatable_sdk_fix_openpath.patch b/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch index f164f8f9ae..b568fc6bdc 100644 --- a/meta/recipes-core/glibc/glibc/relocatable_sdk_fix_openpath.patch +++ b/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch | |||
@@ -1,6 +1,8 @@ | |||
1 | Upstream-Status: Inappropriate [SDK specific] | 1 | From 086b65d9aacffc47fcd8df68818a476a5ae76fa1 Mon Sep 17 00:00:00 2001 |
2 | 2 | From: Khem Raj <raj.khem@gmail.com> | |
3 | eglibc-nativesdk: Fix buffer overrun with a relocated SDK | 3 | Date: Wed, 18 Mar 2015 01:50:00 +0000 |
4 | Subject: [PATCH 02/27] nativesdk-glibc: Fix buffer overrun with a relocated | ||
5 | SDK | ||
4 | 6 | ||
5 | When ld-linux-*.so.2 is relocated to a path that is longer than the | 7 | When ld-linux-*.so.2 is relocated to a path that is longer than the |
6 | original fixed location, the dynamic loader will crash in open_path | 8 | 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 | |||
11 | path string which is larger than the fixed location provided at build | 13 | path string which is larger than the fixed location provided at build |
12 | time. | 14 | time. |
13 | 15 | ||
14 | Signed-off-by: Jason Wessel <jason.wessel@windriver.com> | 16 | Upstream-Status: Inappropriate [OE SDK specific] |
15 | 17 | ||
18 | Signed-off-by: Jason Wessel <jason.wessel@windriver.com> | ||
19 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
16 | --- | 20 | --- |
17 | elf/dl-load.c | 12 ++++++++++++ | 21 | elf/dl-load.c | 12 ++++++++++++ |
18 | 1 file changed, 12 insertions(+) | 22 | 1 file changed, 12 insertions(+) |
19 | 23 | ||
24 | diff --git a/elf/dl-load.c b/elf/dl-load.c | ||
25 | index f45085a..f1eb5ed 100644 | ||
20 | --- a/elf/dl-load.c | 26 | --- a/elf/dl-load.c |
21 | +++ b/elf/dl-load.c | 27 | +++ b/elf/dl-load.c |
22 | @@ -1919,7 +1919,19 @@ open_path (const char *name, size_t name | 28 | @@ -1765,7 +1765,19 @@ open_path (const char *name, size_t namelen, int mode, |
23 | given on the command line when rtld is run directly. */ | 29 | given on the command line when rtld is run directly. */ |
24 | return -1; | 30 | return -1; |
25 | 31 | ||
@@ -39,3 +45,6 @@ Signed-off-by: Jason Wessel <jason.wessel@windriver.com> | |||
39 | do | 45 | do |
40 | { | 46 | { |
41 | struct r_search_path_elem *this_dir = *dirs; | 47 | struct r_search_path_elem *this_dir = *dirs; |
48 | -- | ||
49 | 2.1.4 | ||
50 | |||
diff --git a/meta/recipes-core/glibc/glibc/relocatable_sdk.patch b/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch index ca5f17ba58..a681a64e85 100644 --- a/meta/recipes-core/glibc/glibc/relocatable_sdk.patch +++ b/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch | |||
@@ -1,4 +1,8 @@ | |||
1 | Upstream-Status: Inappropriate [SDK specific] | 1 | From fd595a5ec885bcb4c14417daa21c2e61c5b72e42 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 18 Mar 2015 01:51:38 +0000 | ||
4 | Subject: [PATCH 03/27] nativesdk-glibc: Raise the size of arrays containing dl | ||
5 | paths | ||
2 | 6 | ||
3 | This patch puts the dynamic loader path in the binaries, SYSTEM_DIRS strings | 7 | This patch puts the dynamic loader path in the binaries, SYSTEM_DIRS strings |
4 | and lengths as well as ld.so.cache path in the dynamic loader to specific | 8 | and lengths as well as ld.so.cache path in the dynamic loader to specific |
@@ -7,24 +11,39 @@ byte section, which is the maximum path length in linux. This will allow the | |||
7 | relocating script to parse the ELF binary, detect the section and easily replace | 11 | relocating script to parse the ELF binary, detect the section and easily replace |
8 | the strings in a certain path. | 12 | the strings in a certain path. |
9 | 13 | ||
14 | Upstream-Status: Inappropriate [SDK specific] | ||
15 | |||
10 | Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> | 16 | Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> |
17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
18 | --- | ||
19 | elf/dl-cache.c | 4 ++++ | ||
20 | elf/dl-load.c | 4 ++-- | ||
21 | elf/interp.c | 2 +- | ||
22 | elf/ldconfig.c | 3 +++ | ||
23 | elf/rtld.c | 5 +++-- | ||
24 | sysdeps/generic/dl-cache.h | 4 ---- | ||
25 | 6 files changed, 13 insertions(+), 9 deletions(-) | ||
11 | 26 | ||
12 | Index: libc/elf/interp.c | 27 | diff --git a/elf/dl-cache.c b/elf/dl-cache.c |
13 | =================================================================== | 28 | index dec49bc..862f1d8 100644 |
14 | --- libc.orig/elf/interp.c | 29 | --- a/elf/dl-cache.c |
15 | +++ libc/elf/interp.c | 30 | +++ b/elf/dl-cache.c |
16 | @@ -16,5 +16,5 @@ | 31 | @@ -132,6 +132,10 @@ do \ |
17 | License along with the GNU C Library; if not, see | 32 | while (0) |
18 | <http://www.gnu.org/licenses/>. */ | ||
19 | 33 | ||
20 | -const char __invoke_dynamic_linker__[] __attribute__ ((section (".interp"))) | 34 | |
21 | +const char __invoke_dynamic_linker__[4096] __attribute__ ((section (".interp"))) | 35 | +const char LD_SO_CACHE[4096] __attribute__ ((section (".ldsocache"))) = |
22 | = RUNTIME_LINKER; | 36 | + SYSCONFDIR "/ld.so.cache"; |
23 | Index: libc/elf/dl-load.c | 37 | + |
24 | =================================================================== | 38 | + |
25 | --- libc.orig/elf/dl-load.c | 39 | int |
26 | +++ libc/elf/dl-load.c | 40 | internal_function |
27 | @@ -144,8 +144,8 @@ static size_t max_capstrlen attribute_re | 41 | _dl_cache_libcmp (const char *p1, const char *p2) |
42 | diff --git a/elf/dl-load.c b/elf/dl-load.c | ||
43 | index f1eb5ed..f664f50 100644 | ||
44 | --- a/elf/dl-load.c | ||
45 | +++ b/elf/dl-load.c | ||
46 | @@ -104,8 +104,8 @@ static size_t max_capstrlen attribute_relro; | ||
28 | /* Get the generated information about the trusted directories. */ | 47 | /* Get the generated information about the trusted directories. */ |
29 | #include "trusted-dirs.h" | 48 | #include "trusted-dirs.h" |
30 | 49 | ||
@@ -35,26 +54,22 @@ Index: libc/elf/dl-load.c | |||
35 | { | 54 | { |
36 | SYSTEM_DIRS_LEN | 55 | SYSTEM_DIRS_LEN |
37 | }; | 56 | }; |
38 | Index: libc/elf/dl-cache.c | 57 | diff --git a/elf/interp.c b/elf/interp.c |
39 | =================================================================== | 58 | index 422ea95e..6d61a36 100644 |
40 | --- libc.orig/elf/dl-cache.c | 59 | --- a/elf/interp.c |
41 | +++ libc/elf/dl-cache.c | 60 | +++ b/elf/interp.c |
42 | @@ -133,6 +133,10 @@ do \ | 61 | @@ -18,5 +18,5 @@ |
43 | while (0) | ||
44 | 62 | ||
63 | #include <runtime-linker.h> | ||
45 | 64 | ||
46 | +const char LD_SO_CACHE[4096] __attribute__ ((section (".ldsocache"))) = | 65 | -const char __invoke_dynamic_linker__[] __attribute__ ((section (".interp"))) |
47 | + SYSCONFDIR "/ld.so.cache"; | 66 | +const char __invoke_dynamic_linker__[4096] __attribute__ ((section (".interp"))) |
48 | + | 67 | = RUNTIME_LINKER; |
49 | + | 68 | diff --git a/elf/ldconfig.c b/elf/ldconfig.c |
50 | int | 69 | index f54ec22..0e78a83 100644 |
51 | internal_function | 70 | --- a/elf/ldconfig.c |
52 | _dl_cache_libcmp (const char *p1, const char *p2) | 71 | +++ b/elf/ldconfig.c |
53 | Index: libc/elf/ldconfig.c | 72 | @@ -167,6 +167,9 @@ static struct argp argp = |
54 | =================================================================== | ||
55 | --- libc.orig/elf/ldconfig.c | ||
56 | +++ libc/elf/ldconfig.c | ||
57 | @@ -166,6 +166,9 @@ static struct argp argp = | ||
58 | options, parse_opt, NULL, doc, NULL, more_help, NULL | 73 | options, parse_opt, NULL, doc, NULL, more_help, NULL |
59 | }; | 74 | }; |
60 | 75 | ||
@@ -64,25 +79,10 @@ Index: libc/elf/ldconfig.c | |||
64 | /* Check if string corresponds to an important hardware capability or | 79 | /* Check if string corresponds to an important hardware capability or |
65 | a platform. */ | 80 | a platform. */ |
66 | static int | 81 | static int |
67 | Index: libc/sysdeps/generic/dl-cache.h | 82 | diff --git a/elf/rtld.c b/elf/rtld.c |
68 | =================================================================== | 83 | index 69873c2..6d3add7 100644 |
69 | --- libc.orig/sysdeps/generic/dl-cache.h | 84 | --- a/elf/rtld.c |
70 | +++ libc/sysdeps/generic/dl-cache.h | 85 | +++ b/elf/rtld.c |
71 | @@ -27,10 +27,6 @@ | ||
72 | ((flags) == 1 || (flags) == _DL_CACHE_DEFAULT_ID) | ||
73 | #endif | ||
74 | |||
75 | -#ifndef LD_SO_CACHE | ||
76 | -# define LD_SO_CACHE SYSCONFDIR "/ld.so.cache" | ||
77 | -#endif | ||
78 | - | ||
79 | #ifndef add_system_dir | ||
80 | # define add_system_dir(dir) add_dir (dir) | ||
81 | #endif | ||
82 | Index: libc/elf/rtld.c | ||
83 | =================================================================== | ||
84 | --- libc.orig/elf/rtld.c | ||
85 | +++ libc/elf/rtld.c | ||
86 | @@ -99,6 +99,7 @@ uintptr_t __pointer_chk_guard_local | 86 | @@ -99,6 +99,7 @@ uintptr_t __pointer_chk_guard_local |
87 | strong_alias (__pointer_chk_guard_local, __pointer_chk_guard) | 87 | strong_alias (__pointer_chk_guard_local, __pointer_chk_guard) |
88 | #endif | 88 | #endif |
@@ -91,7 +91,7 @@ Index: libc/elf/rtld.c | |||
91 | 91 | ||
92 | /* List of auditing DSOs. */ | 92 | /* List of auditing DSOs. */ |
93 | static struct audit_list | 93 | static struct audit_list |
94 | @@ -1031,12 +1032,12 @@ of this helper program; chances are you | 94 | @@ -877,12 +878,12 @@ of this helper program; chances are you did not intend to run this program.\n\ |
95 | --list list all dependencies and how they are resolved\n\ | 95 | --list list all dependencies and how they are resolved\n\ |
96 | --verify verify that given object really is a dynamically linked\n\ | 96 | --verify verify that given object really is a dynamically linked\n\ |
97 | object we can handle\n\ | 97 | object we can handle\n\ |
@@ -106,3 +106,21 @@ Index: libc/elf/rtld.c | |||
106 | 106 | ||
107 | ++_dl_skip_args; | 107 | ++_dl_skip_args; |
108 | --_dl_argc; | 108 | --_dl_argc; |
109 | diff --git a/sysdeps/generic/dl-cache.h b/sysdeps/generic/dl-cache.h | ||
110 | index 4b49869..1800d03 100644 | ||
111 | --- a/sysdeps/generic/dl-cache.h | ||
112 | +++ b/sysdeps/generic/dl-cache.h | ||
113 | @@ -27,10 +27,6 @@ | ||
114 | ((flags) == 1 || (flags) == _DL_CACHE_DEFAULT_ID) | ||
115 | #endif | ||
116 | |||
117 | -#ifndef LD_SO_CACHE | ||
118 | -# define LD_SO_CACHE SYSCONFDIR "/ld.so.cache" | ||
119 | -#endif | ||
120 | - | ||
121 | #ifndef add_system_dir | ||
122 | # define add_system_dir(dir) add_dir (dir) | ||
123 | #endif | ||
124 | -- | ||
125 | 2.1.4 | ||
126 | |||
diff --git a/meta/recipes-core/glibc/glibc/0004-Backport-https-sourceware.org-ml-libc-ports-2007-12-.patch b/meta/recipes-core/glibc/glibc/0004-Backport-https-sourceware.org-ml-libc-ports-2007-12-.patch new file mode 100644 index 0000000000..748750304f --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0004-Backport-https-sourceware.org-ml-libc-ports-2007-12-.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From 2560b564b5674bf2990e5607f6342c1647a5dc4f Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sun, 8 Mar 2015 04:01:01 +0000 | ||
4 | Subject: [PATCH 04/27] Backport | ||
5 | https://sourceware.org/ml/libc-ports/2007-12/msg00000.html | ||
6 | |||
7 | Upstream-Status: Pending | ||
8 | |||
9 | 2007-12-03 Kristian Van Der Vliet <vanders@liqwyd.com> | ||
10 | |||
11 | * bits/stdio-lock.h (_IO_acquire_lock_clear_flags2): Define | ||
12 | |||
13 | Signed-off-by: Kristian Van Der Vliet <vanders@liqwyd.com> | ||
14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
15 | --- | ||
16 | bits/stdio-lock.h | 2 ++ | ||
17 | 1 file changed, 2 insertions(+) | ||
18 | |||
19 | diff --git a/bits/stdio-lock.h b/bits/stdio-lock.h | ||
20 | index 0c5bb65..66304a6 100644 | ||
21 | --- a/bits/stdio-lock.h | ||
22 | +++ b/bits/stdio-lock.h | ||
23 | @@ -49,6 +49,8 @@ __libc_lock_define_recursive (typedef, _IO_lock_t) | ||
24 | _IO_cleanup_region_start ((void (*) (void *)) _IO_funlockfile, (_fp)); \ | ||
25 | _IO_flockfile (_fp) | ||
26 | |||
27 | +# define _IO_acquire_lock_clear_flags2(_fp) _IO_acquire_lock (_fp) | ||
28 | + | ||
29 | # define _IO_release_lock(_fp) \ | ||
30 | _IO_funlockfile (_fp); \ | ||
31 | _IO_cleanup_region_end (0) | ||
32 | -- | ||
33 | 2.1.4 | ||
34 | |||
diff --git a/meta/recipes-core/glibc/glibc/glibc.fix_sqrt2.patch b/meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch index f5ed1bfeef..8d3f859555 100644 --- a/meta/recipes-core/glibc/glibc/glibc.fix_sqrt2.patch +++ b/meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch | |||
@@ -1,10 +1,57 @@ | |||
1 | Signed-of-by: Edmar Wienskoski <edmar@freescale.com> | 1 | From aa0cd82892f32e58602143c697ef0524696a6428 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 18 Mar 2015 00:01:50 +0000 | ||
4 | Subject: [PATCH 05/27] fsl e500/e5500/e6500/603e fsqrt implementation | ||
5 | |||
2 | Upstream-Status: Pending | 6 | Upstream-Status: Pending |
7 | Signed-off-by: Edmar Wienskoski <edmar@freescale.com> | ||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | --- | ||
10 | sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | 134 +++++++++++++++++++++ | ||
11 | sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | 101 ++++++++++++++++ | ||
12 | sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | 134 +++++++++++++++++++++ | ||
13 | sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | 101 ++++++++++++++++ | ||
14 | sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | 134 +++++++++++++++++++++ | ||
15 | sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | 101 ++++++++++++++++ | ||
16 | sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | 134 +++++++++++++++++++++ | ||
17 | sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | 101 ++++++++++++++++ | ||
18 | sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | 134 +++++++++++++++++++++ | ||
19 | sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | 101 ++++++++++++++++ | ||
20 | sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | 134 +++++++++++++++++++++ | ||
21 | sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | 101 ++++++++++++++++ | ||
22 | .../sysv/linux/powerpc/powerpc32/603e/fpu/Implies | 1 + | ||
23 | .../linux/powerpc/powerpc32/e300c3/fpu/Implies | 2 + | ||
24 | .../linux/powerpc/powerpc32/e500mc/fpu/Implies | 1 + | ||
25 | .../sysv/linux/powerpc/powerpc32/e5500/fpu/Implies | 1 + | ||
26 | .../sysv/linux/powerpc/powerpc32/e6500/fpu/Implies | 1 + | ||
27 | .../sysv/linux/powerpc/powerpc64/e5500/fpu/Implies | 1 + | ||
28 | .../sysv/linux/powerpc/powerpc64/e6500/fpu/Implies | 1 + | ||
29 | 19 files changed, 1418 insertions(+) | ||
30 | create mode 100644 sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | ||
31 | create mode 100644 sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | ||
32 | create mode 100644 sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | ||
33 | create mode 100644 sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | ||
34 | create mode 100644 sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | ||
35 | create mode 100644 sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | ||
36 | create mode 100644 sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | ||
37 | create mode 100644 sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | ||
38 | create mode 100644 sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | ||
39 | create mode 100644 sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | ||
40 | create mode 100644 sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | ||
41 | create mode 100644 sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | ||
42 | create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies | ||
43 | create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies | ||
44 | create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies | ||
45 | create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies | ||
46 | create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies | ||
47 | create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies | ||
48 | create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies | ||
3 | 49 | ||
4 | Index: git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | 50 | diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c |
5 | =================================================================== | 51 | new file mode 100644 |
6 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | 52 | index 0000000..71e516d |
7 | +++ git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c 2014-08-29 10:34:07.768070587 -0700 | 53 | --- /dev/null |
54 | +++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | ||
8 | @@ -0,0 +1,134 @@ | 55 | @@ -0,0 +1,134 @@ |
9 | +/* Double-precision floating point square root. | 56 | +/* Double-precision floating point square root. |
10 | + Copyright (C) 2010 Free Software Foundation, Inc. | 57 | + Copyright (C) 2010 Free Software Foundation, Inc. |
@@ -140,10 +187,11 @@ Index: git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | |||
140 | + } | 187 | + } |
141 | + return f_wash (b); | 188 | + return f_wash (b); |
142 | +} | 189 | +} |
143 | Index: git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | 190 | diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c |
144 | =================================================================== | 191 | new file mode 100644 |
145 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | 192 | index 0000000..26fa067 |
146 | +++ git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c 2014-08-29 10:34:07.768070587 -0700 | 193 | --- /dev/null |
194 | +++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | ||
147 | @@ -0,0 +1,101 @@ | 195 | @@ -0,0 +1,101 @@ |
148 | +/* Single-precision floating point square root. | 196 | +/* Single-precision floating point square root. |
149 | + Copyright (C) 2010 Free Software Foundation, Inc. | 197 | + Copyright (C) 2010 Free Software Foundation, Inc. |
@@ -246,10 +294,11 @@ Index: git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | |||
246 | + } | 294 | + } |
247 | + return f_washf (b); | 295 | + return f_washf (b); |
248 | +} | 296 | +} |
249 | Index: git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | 297 | diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c |
250 | =================================================================== | 298 | new file mode 100644 |
251 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | 299 | index 0000000..71e516d |
252 | +++ git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c 2014-08-29 10:34:07.768070587 -0700 | 300 | --- /dev/null |
301 | +++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | ||
253 | @@ -0,0 +1,134 @@ | 302 | @@ -0,0 +1,134 @@ |
254 | +/* Double-precision floating point square root. | 303 | +/* Double-precision floating point square root. |
255 | + Copyright (C) 2010 Free Software Foundation, Inc. | 304 | + Copyright (C) 2010 Free Software Foundation, Inc. |
@@ -385,10 +434,11 @@ Index: git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | |||
385 | + } | 434 | + } |
386 | + return f_wash (b); | 435 | + return f_wash (b); |
387 | +} | 436 | +} |
388 | Index: git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | 437 | diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c |
389 | =================================================================== | 438 | new file mode 100644 |
390 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | 439 | index 0000000..26fa067 |
391 | +++ git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c 2014-08-29 10:34:07.772070587 -0700 | 440 | --- /dev/null |
441 | +++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | ||
392 | @@ -0,0 +1,101 @@ | 442 | @@ -0,0 +1,101 @@ |
393 | +/* Single-precision floating point square root. | 443 | +/* Single-precision floating point square root. |
394 | + Copyright (C) 2010 Free Software Foundation, Inc. | 444 | + Copyright (C) 2010 Free Software Foundation, Inc. |
@@ -491,10 +541,11 @@ Index: git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | |||
491 | + } | 541 | + } |
492 | + return f_washf (b); | 542 | + return f_washf (b); |
493 | +} | 543 | +} |
494 | Index: git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | 544 | diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c |
495 | =================================================================== | 545 | new file mode 100644 |
496 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | 546 | index 0000000..71e516d |
497 | +++ git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c 2014-08-29 10:34:07.772070587 -0700 | 547 | --- /dev/null |
548 | +++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | ||
498 | @@ -0,0 +1,134 @@ | 549 | @@ -0,0 +1,134 @@ |
499 | +/* Double-precision floating point square root. | 550 | +/* Double-precision floating point square root. |
500 | + Copyright (C) 2010 Free Software Foundation, Inc. | 551 | + Copyright (C) 2010 Free Software Foundation, Inc. |
@@ -630,10 +681,11 @@ Index: git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | |||
630 | + } | 681 | + } |
631 | + return f_wash (b); | 682 | + return f_wash (b); |
632 | +} | 683 | +} |
633 | Index: git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | 684 | diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c |
634 | =================================================================== | 685 | new file mode 100644 |
635 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | 686 | index 0000000..26fa067 |
636 | +++ git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c 2014-08-29 10:34:07.772070587 -0700 | 687 | --- /dev/null |
688 | +++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | ||
637 | @@ -0,0 +1,101 @@ | 689 | @@ -0,0 +1,101 @@ |
638 | +/* Single-precision floating point square root. | 690 | +/* Single-precision floating point square root. |
639 | + Copyright (C) 2010 Free Software Foundation, Inc. | 691 | + Copyright (C) 2010 Free Software Foundation, Inc. |
@@ -736,10 +788,11 @@ Index: git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | |||
736 | + } | 788 | + } |
737 | + return f_washf (b); | 789 | + return f_washf (b); |
738 | +} | 790 | +} |
739 | Index: git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | 791 | diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c |
740 | =================================================================== | 792 | new file mode 100644 |
741 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | 793 | index 0000000..71e516d |
742 | +++ git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c 2014-08-29 10:34:07.772070587 -0700 | 794 | --- /dev/null |
795 | +++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | ||
743 | @@ -0,0 +1,134 @@ | 796 | @@ -0,0 +1,134 @@ |
744 | +/* Double-precision floating point square root. | 797 | +/* Double-precision floating point square root. |
745 | + Copyright (C) 2010 Free Software Foundation, Inc. | 798 | + Copyright (C) 2010 Free Software Foundation, Inc. |
@@ -875,10 +928,11 @@ Index: git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | |||
875 | + } | 928 | + } |
876 | + return f_wash (b); | 929 | + return f_wash (b); |
877 | +} | 930 | +} |
878 | Index: git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | 931 | diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c |
879 | =================================================================== | 932 | new file mode 100644 |
880 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | 933 | index 0000000..26fa067 |
881 | +++ git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c 2014-08-29 10:34:07.772070587 -0700 | 934 | --- /dev/null |
935 | +++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | ||
882 | @@ -0,0 +1,101 @@ | 936 | @@ -0,0 +1,101 @@ |
883 | +/* Single-precision floating point square root. | 937 | +/* Single-precision floating point square root. |
884 | + Copyright (C) 2010 Free Software Foundation, Inc. | 938 | + Copyright (C) 2010 Free Software Foundation, Inc. |
@@ -981,10 +1035,11 @@ Index: git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | |||
981 | + } | 1035 | + } |
982 | + return f_washf (b); | 1036 | + return f_washf (b); |
983 | +} | 1037 | +} |
984 | Index: git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | 1038 | diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c |
985 | =================================================================== | 1039 | new file mode 100644 |
986 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | 1040 | index 0000000..71e516d |
987 | +++ git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c 2014-08-29 10:34:07.772070587 -0700 | 1041 | --- /dev/null |
1042 | +++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | ||
988 | @@ -0,0 +1,134 @@ | 1043 | @@ -0,0 +1,134 @@ |
989 | +/* Double-precision floating point square root. | 1044 | +/* Double-precision floating point square root. |
990 | + Copyright (C) 2010 Free Software Foundation, Inc. | 1045 | + Copyright (C) 2010 Free Software Foundation, Inc. |
@@ -1120,10 +1175,11 @@ Index: git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | |||
1120 | + } | 1175 | + } |
1121 | + return f_wash (b); | 1176 | + return f_wash (b); |
1122 | +} | 1177 | +} |
1123 | Index: git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | 1178 | diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c |
1124 | =================================================================== | 1179 | new file mode 100644 |
1125 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | 1180 | index 0000000..26fa067 |
1126 | +++ git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c 2014-08-29 10:34:07.772070587 -0700 | 1181 | --- /dev/null |
1182 | +++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | ||
1127 | @@ -0,0 +1,101 @@ | 1183 | @@ -0,0 +1,101 @@ |
1128 | +/* Single-precision floating point square root. | 1184 | +/* Single-precision floating point square root. |
1129 | + Copyright (C) 2010 Free Software Foundation, Inc. | 1185 | + Copyright (C) 2010 Free Software Foundation, Inc. |
@@ -1226,10 +1282,11 @@ Index: git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | |||
1226 | + } | 1282 | + } |
1227 | + return f_washf (b); | 1283 | + return f_washf (b); |
1228 | +} | 1284 | +} |
1229 | Index: git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | 1285 | diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c |
1230 | =================================================================== | 1286 | new file mode 100644 |
1231 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | 1287 | index 0000000..71e516d |
1232 | +++ git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c 2014-08-29 10:34:07.772070587 -0700 | 1288 | --- /dev/null |
1289 | +++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | ||
1233 | @@ -0,0 +1,134 @@ | 1290 | @@ -0,0 +1,134 @@ |
1234 | +/* Double-precision floating point square root. | 1291 | +/* Double-precision floating point square root. |
1235 | + Copyright (C) 2010 Free Software Foundation, Inc. | 1292 | + Copyright (C) 2010 Free Software Foundation, Inc. |
@@ -1365,10 +1422,11 @@ Index: git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | |||
1365 | + } | 1422 | + } |
1366 | + return f_wash (b); | 1423 | + return f_wash (b); |
1367 | +} | 1424 | +} |
1368 | Index: git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | 1425 | diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c |
1369 | =================================================================== | 1426 | new file mode 100644 |
1370 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | 1427 | index 0000000..26fa067 |
1371 | +++ git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c 2014-08-29 10:34:07.776070587 -0700 | 1428 | --- /dev/null |
1429 | +++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | ||
1372 | @@ -0,0 +1,101 @@ | 1430 | @@ -0,0 +1,101 @@ |
1373 | +/* Single-precision floating point square root. | 1431 | +/* Single-precision floating point square root. |
1374 | + Copyright (C) 2010 Free Software Foundation, Inc. | 1432 | + Copyright (C) 2010 Free Software Foundation, Inc. |
@@ -1471,46 +1529,56 @@ Index: git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | |||
1471 | + } | 1529 | + } |
1472 | + return f_washf (b); | 1530 | + return f_washf (b); |
1473 | +} | 1531 | +} |
1474 | Index: git/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies | 1532 | diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies |
1475 | =================================================================== | 1533 | new file mode 100644 |
1476 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | 1534 | index 0000000..b103b4d |
1477 | +++ git/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies 2014-08-29 10:34:07.776070587 -0700 | 1535 | --- /dev/null |
1536 | +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies | ||
1478 | @@ -0,0 +1 @@ | 1537 | @@ -0,0 +1 @@ |
1479 | +powerpc/powerpc32/603e/fpu | 1538 | +powerpc/powerpc32/603e/fpu |
1480 | Index: git/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies | 1539 | diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies |
1481 | =================================================================== | 1540 | new file mode 100644 |
1482 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | 1541 | index 0000000..64db17f |
1483 | +++ git/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies 2014-08-29 10:34:07.776070587 -0700 | 1542 | --- /dev/null |
1543 | +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies | ||
1484 | @@ -0,0 +1,2 @@ | 1544 | @@ -0,0 +1,2 @@ |
1485 | +# e300c3 is a variant of 603e so use the same optimizations for sqrt | 1545 | +# e300c3 is a variant of 603e so use the same optimizations for sqrt |
1486 | +powerpc/powerpc32/603e/fpu | 1546 | +powerpc/powerpc32/603e/fpu |
1487 | Index: git/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies | 1547 | diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies |
1488 | =================================================================== | 1548 | new file mode 100644 |
1489 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | 1549 | index 0000000..7eac5fc |
1490 | +++ git/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies 2014-08-29 10:34:07.776070587 -0700 | 1550 | --- /dev/null |
1551 | +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies | ||
1491 | @@ -0,0 +1 @@ | 1552 | @@ -0,0 +1 @@ |
1492 | +powerpc/powerpc32/e500mc/fpu | 1553 | +powerpc/powerpc32/e500mc/fpu |
1493 | Index: git/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies | 1554 | diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies |
1494 | =================================================================== | 1555 | new file mode 100644 |
1495 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | 1556 | index 0000000..264b2a7 |
1496 | +++ git/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies 2014-08-29 10:34:07.776070587 -0700 | 1557 | --- /dev/null |
1558 | +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies | ||
1497 | @@ -0,0 +1 @@ | 1559 | @@ -0,0 +1 @@ |
1498 | +powerpc/powerpc32/e5500/fpu | 1560 | +powerpc/powerpc32/e5500/fpu |
1499 | Index: git/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies | 1561 | diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies |
1500 | =================================================================== | 1562 | new file mode 100644 |
1501 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | 1563 | index 0000000..a259344 |
1502 | +++ git/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies 2014-08-29 10:34:07.776070587 -0700 | 1564 | --- /dev/null |
1565 | +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies | ||
1503 | @@ -0,0 +1 @@ | 1566 | @@ -0,0 +1 @@ |
1504 | +powerpc/powerpc32/e6500/fpu | 1567 | +powerpc/powerpc32/e6500/fpu |
1505 | Index: git/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies | 1568 | diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies |
1506 | =================================================================== | 1569 | new file mode 100644 |
1507 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | 1570 | index 0000000..a7bc854 |
1508 | +++ git/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies 2014-08-29 10:34:07.780070587 -0700 | 1571 | --- /dev/null |
1572 | +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies | ||
1509 | @@ -0,0 +1 @@ | 1573 | @@ -0,0 +1 @@ |
1510 | +powerpc/powerpc64/e5500/fpu | 1574 | +powerpc/powerpc64/e5500/fpu |
1511 | Index: git/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies | 1575 | diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies |
1512 | =================================================================== | 1576 | new file mode 100644 |
1513 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | 1577 | index 0000000..04ff8cc |
1514 | +++ git/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies 2014-08-29 10:34:07.780070587 -0700 | 1578 | --- /dev/null |
1579 | +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies | ||
1515 | @@ -0,0 +1 @@ | 1580 | @@ -0,0 +1 @@ |
1516 | +powerpc/powerpc64/e6500/fpu | 1581 | +powerpc/powerpc64/e6500/fpu |
1582 | -- | ||
1583 | 2.1.4 | ||
1584 | |||
diff --git a/meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch b/meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch new file mode 100644 index 0000000000..65c227ff20 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 5ec1bc5172851278231ce940b68b35ce9cbf8500 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 18 Mar 2015 00:11:22 +0000 | ||
4 | Subject: [PATCH 06/27] readlib: Add OECORE_KNOWN_INTERPRETER_NAMES to known | ||
5 | names | ||
6 | |||
7 | This bolts in a hook for OE to pass its own version of interpreter | ||
8 | names into glibc especially for multilib case, where it differs from any | ||
9 | other distros | ||
10 | |||
11 | Upstream-Status: Inappropriate [OE specific] | ||
12 | |||
13 | Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> | ||
14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
15 | --- | ||
16 | elf/readlib.c | 1 + | ||
17 | 1 file changed, 1 insertion(+) | ||
18 | |||
19 | diff --git a/elf/readlib.c b/elf/readlib.c | ||
20 | index 7fd5b8a..2f5da9f 100644 | ||
21 | --- a/elf/readlib.c | ||
22 | +++ b/elf/readlib.c | ||
23 | @@ -51,6 +51,7 @@ static struct known_names interpreters[] = | ||
24 | #ifdef SYSDEP_KNOWN_INTERPRETER_NAMES | ||
25 | SYSDEP_KNOWN_INTERPRETER_NAMES | ||
26 | #endif | ||
27 | + OECORE_KNOWN_INTERPRETER_NAMES | ||
28 | }; | ||
29 | |||
30 | static struct known_names known_libs[] = | ||
31 | -- | ||
32 | 2.1.4 | ||
33 | |||
diff --git a/meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch b/meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch new file mode 100644 index 0000000000..aec8fbeb9a --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch | |||
@@ -0,0 +1,208 @@ | |||
1 | From ea98b1a12b5f779fd79478ff930a79ef60387851 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 18 Mar 2015 00:15:07 +0000 | ||
4 | Subject: [PATCH 07/27] ppc/sqrt: Fix undefined reference to `__sqrt_finite' | ||
5 | |||
6 | on ppc fixes the errors like below | ||
7 | | ./.libs/libpulsecore-1.1.so: undefined reference to `__sqrt_finite' | ||
8 | | collect2: ld returned 1 exit status | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | ChangeLog | ||
13 | |||
14 | 2012-01-06 Khem Raj <raj.khem@gmail.com> | ||
15 | |||
16 | * sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c: Add __*_finite alias. | ||
17 | Remove cruft. | ||
18 | * sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c: Ditto. | ||
19 | * sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c: Ditto. | ||
20 | * sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c: Ditto. | ||
21 | |||
22 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
23 | --- | ||
24 | sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | 7 +------ | ||
25 | sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | 7 +------ | ||
26 | sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | 1 + | ||
27 | sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | 1 + | ||
28 | sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | 1 + | ||
29 | sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | 1 + | ||
30 | sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | 1 + | ||
31 | sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | 1 + | ||
32 | sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | 7 +------ | ||
33 | sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | 7 +------ | ||
34 | sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | 1 + | ||
35 | sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | 1 + | ||
36 | 12 files changed, 12 insertions(+), 24 deletions(-) | ||
37 | |||
38 | diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | ||
39 | index 71e516d..1795fd6 100644 | ||
40 | --- a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | ||
41 | +++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | ||
42 | @@ -39,14 +39,8 @@ static const float half = 0.5; | ||
43 | We find the actual square root and half of its reciprocal | ||
44 | simultaneously. */ | ||
45 | |||
46 | -#ifdef __STDC__ | ||
47 | double | ||
48 | __ieee754_sqrt (double b) | ||
49 | -#else | ||
50 | -double | ||
51 | -__ieee754_sqrt (b) | ||
52 | - double b; | ||
53 | -#endif | ||
54 | { | ||
55 | if (__builtin_expect (b > 0, 1)) | ||
56 | { | ||
57 | @@ -132,3 +126,4 @@ __ieee754_sqrt (b) | ||
58 | } | ||
59 | return f_wash (b); | ||
60 | } | ||
61 | +strong_alias (__ieee754_sqrt, __sqrt_finite) | ||
62 | diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | ||
63 | index 26fa067..a917f31 100644 | ||
64 | --- a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | ||
65 | +++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | ||
66 | @@ -37,14 +37,8 @@ static const float threehalf = 1.5; | ||
67 | We find the reciprocal square root and use that to compute the actual | ||
68 | square root. */ | ||
69 | |||
70 | -#ifdef __STDC__ | ||
71 | float | ||
72 | __ieee754_sqrtf (float b) | ||
73 | -#else | ||
74 | -float | ||
75 | -__ieee754_sqrtf (b) | ||
76 | - float b; | ||
77 | -#endif | ||
78 | { | ||
79 | if (__builtin_expect (b > 0, 1)) | ||
80 | { | ||
81 | @@ -99,3 +93,4 @@ __ieee754_sqrtf (b) | ||
82 | } | ||
83 | return f_washf (b); | ||
84 | } | ||
85 | +strong_alias (__ieee754_sqrtf, __sqrtf_finite) | ||
86 | diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | ||
87 | index 71e516d..fc4a749 100644 | ||
88 | --- a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | ||
89 | +++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | ||
90 | @@ -132,3 +132,4 @@ __ieee754_sqrt (b) | ||
91 | } | ||
92 | return f_wash (b); | ||
93 | } | ||
94 | +strong_alias (__ieee754_sqrt, __sqrt_finite) | ||
95 | diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | ||
96 | index 26fa067..9d17512 100644 | ||
97 | --- a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | ||
98 | +++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | ||
99 | @@ -99,3 +99,4 @@ __ieee754_sqrtf (b) | ||
100 | } | ||
101 | return f_washf (b); | ||
102 | } | ||
103 | +strong_alias (__ieee754_sqrtf, __sqrtf_finite) | ||
104 | diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | ||
105 | index 71e516d..fc4a749 100644 | ||
106 | --- a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | ||
107 | +++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | ||
108 | @@ -132,3 +132,4 @@ __ieee754_sqrt (b) | ||
109 | } | ||
110 | return f_wash (b); | ||
111 | } | ||
112 | +strong_alias (__ieee754_sqrt, __sqrt_finite) | ||
113 | diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | ||
114 | index 26fa067..9d17512 100644 | ||
115 | --- a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | ||
116 | +++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | ||
117 | @@ -99,3 +99,4 @@ __ieee754_sqrtf (b) | ||
118 | } | ||
119 | return f_washf (b); | ||
120 | } | ||
121 | +strong_alias (__ieee754_sqrtf, __sqrtf_finite) | ||
122 | diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | ||
123 | index 71e516d..fc4a749 100644 | ||
124 | --- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | ||
125 | +++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | ||
126 | @@ -132,3 +132,4 @@ __ieee754_sqrt (b) | ||
127 | } | ||
128 | return f_wash (b); | ||
129 | } | ||
130 | +strong_alias (__ieee754_sqrt, __sqrt_finite) | ||
131 | diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | ||
132 | index 26fa067..9d17512 100644 | ||
133 | --- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | ||
134 | +++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | ||
135 | @@ -99,3 +99,4 @@ __ieee754_sqrtf (b) | ||
136 | } | ||
137 | return f_washf (b); | ||
138 | } | ||
139 | +strong_alias (__ieee754_sqrtf, __sqrtf_finite) | ||
140 | diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | ||
141 | index 71e516d..1795fd6 100644 | ||
142 | --- a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | ||
143 | +++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | ||
144 | @@ -39,14 +39,8 @@ static const float half = 0.5; | ||
145 | We find the actual square root and half of its reciprocal | ||
146 | simultaneously. */ | ||
147 | |||
148 | -#ifdef __STDC__ | ||
149 | double | ||
150 | __ieee754_sqrt (double b) | ||
151 | -#else | ||
152 | -double | ||
153 | -__ieee754_sqrt (b) | ||
154 | - double b; | ||
155 | -#endif | ||
156 | { | ||
157 | if (__builtin_expect (b > 0, 1)) | ||
158 | { | ||
159 | @@ -132,3 +126,4 @@ __ieee754_sqrt (b) | ||
160 | } | ||
161 | return f_wash (b); | ||
162 | } | ||
163 | +strong_alias (__ieee754_sqrt, __sqrt_finite) | ||
164 | diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | ||
165 | index 26fa067..a917f31 100644 | ||
166 | --- a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | ||
167 | +++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | ||
168 | @@ -37,14 +37,8 @@ static const float threehalf = 1.5; | ||
169 | We find the reciprocal square root and use that to compute the actual | ||
170 | square root. */ | ||
171 | |||
172 | -#ifdef __STDC__ | ||
173 | float | ||
174 | __ieee754_sqrtf (float b) | ||
175 | -#else | ||
176 | -float | ||
177 | -__ieee754_sqrtf (b) | ||
178 | - float b; | ||
179 | -#endif | ||
180 | { | ||
181 | if (__builtin_expect (b > 0, 1)) | ||
182 | { | ||
183 | @@ -99,3 +93,4 @@ __ieee754_sqrtf (b) | ||
184 | } | ||
185 | return f_washf (b); | ||
186 | } | ||
187 | +strong_alias (__ieee754_sqrtf, __sqrtf_finite) | ||
188 | diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | ||
189 | index 71e516d..fc4a749 100644 | ||
190 | --- a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | ||
191 | +++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | ||
192 | @@ -132,3 +132,4 @@ __ieee754_sqrt (b) | ||
193 | } | ||
194 | return f_wash (b); | ||
195 | } | ||
196 | +strong_alias (__ieee754_sqrt, __sqrt_finite) | ||
197 | diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | ||
198 | index 26fa067..9d17512 100644 | ||
199 | --- a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | ||
200 | +++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | ||
201 | @@ -99,3 +99,4 @@ __ieee754_sqrtf (b) | ||
202 | } | ||
203 | return f_washf (b); | ||
204 | } | ||
205 | +strong_alias (__ieee754_sqrtf, __sqrtf_finite) | ||
206 | -- | ||
207 | 2.1.4 | ||
208 | |||
diff --git a/meta/recipes-core/glibc/glibc/ppc_slow_ieee754_sqrt.patch b/meta/recipes-core/glibc/glibc/0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch index 5b819bc458..b3fa931c6c 100644 --- a/meta/recipes-core/glibc/glibc/ppc_slow_ieee754_sqrt.patch +++ b/meta/recipes-core/glibc/glibc/0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch | |||
@@ -1,13 +1,32 @@ | |||
1 | __ieee754_sqrt{,f} are now inline functions and call out __slow versions | 1 | From 2456ea44aeeedae87edb522f77a7969d636399b0 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 18 Mar 2015 00:16:38 +0000 | ||
4 | Subject: [PATCH 08/27] __ieee754_sqrt{,f} are now inline functions and call | ||
5 | out __slow versions | ||
2 | 6 | ||
7 | Upstream-Status: Pending | ||
3 | 8 | ||
4 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
5 | Upstream-Status: Pending | 10 | --- |
6 | Index: git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | 11 | sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | 12 ++++++++++-- |
7 | =================================================================== | 12 | sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | 8 +++++++- |
8 | --- git.orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c 2014-08-29 10:35:02.616070587 -0700 | 13 | sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | 14 +++++++++++--- |
9 | +++ git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c 2014-08-29 10:35:02.604070587 -0700 | 14 | sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | 12 ++++++++++-- |
10 | @@ -40,7 +40,7 @@ | 15 | sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | 14 +++++++++++--- |
16 | sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | 12 ++++++++++-- | ||
17 | sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | 8 ++++++++ | ||
18 | sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | 8 ++++++++ | ||
19 | sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | 12 ++++++++++-- | ||
20 | sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | 9 ++++++++- | ||
21 | sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | 14 +++++++++++--- | ||
22 | sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | 12 ++++++++++-- | ||
23 | 12 files changed, 114 insertions(+), 21 deletions(-) | ||
24 | |||
25 | diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | ||
26 | index 1795fd6..daa83f3 100644 | ||
27 | --- a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | ||
28 | +++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | ||
29 | @@ -40,7 +40,7 @@ static const float half = 0.5; | ||
11 | simultaneously. */ | 30 | simultaneously. */ |
12 | 31 | ||
13 | double | 32 | double |
@@ -16,7 +35,7 @@ Index: git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | |||
16 | { | 35 | { |
17 | if (__builtin_expect (b > 0, 1)) | 36 | if (__builtin_expect (b > 0, 1)) |
18 | { | 37 | { |
19 | @@ -77,7 +77,7 @@ | 38 | @@ -77,7 +77,7 @@ __ieee754_sqrt (double b) |
20 | 39 | ||
21 | /* Handle small numbers by scaling. */ | 40 | /* Handle small numbers by scaling. */ |
22 | if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) | 41 | if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) |
@@ -25,7 +44,7 @@ Index: git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | |||
25 | 44 | ||
26 | #define FMADD(a_, c_, b_) \ | 45 | #define FMADD(a_, c_, b_) \ |
27 | ({ double __r; \ | 46 | ({ double __r; \ |
28 | @@ -126,4 +126,12 @@ | 47 | @@ -126,4 +126,12 @@ __ieee754_sqrt (double b) |
29 | } | 48 | } |
30 | return f_wash (b); | 49 | return f_wash (b); |
31 | } | 50 | } |
@@ -38,11 +57,11 @@ Index: git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | |||
38 | +} | 57 | +} |
39 | + | 58 | + |
40 | strong_alias (__ieee754_sqrt, __sqrt_finite) | 59 | strong_alias (__ieee754_sqrt, __sqrt_finite) |
41 | Index: git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | 60 | diff --git a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c |
42 | =================================================================== | 61 | index a917f31..b812cf1 100644 |
43 | --- git.orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c 2014-08-29 10:35:02.616070587 -0700 | 62 | --- a/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c |
44 | +++ git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c 2014-08-29 10:35:02.604070587 -0700 | 63 | +++ b/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c |
45 | @@ -38,7 +38,7 @@ | 64 | @@ -38,7 +38,7 @@ static const float threehalf = 1.5; |
46 | square root. */ | 65 | square root. */ |
47 | 66 | ||
48 | float | 67 | float |
@@ -51,7 +70,7 @@ Index: git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | |||
51 | { | 70 | { |
52 | if (__builtin_expect (b > 0, 1)) | 71 | if (__builtin_expect (b > 0, 1)) |
53 | { | 72 | { |
54 | @@ -93,4 +93,10 @@ | 73 | @@ -93,4 +93,10 @@ __ieee754_sqrtf (float b) |
55 | } | 74 | } |
56 | return f_washf (b); | 75 | return f_washf (b); |
57 | } | 76 | } |
@@ -62,20 +81,24 @@ Index: git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | |||
62 | + return __slow_ieee754_sqrtf (x); | 81 | + return __slow_ieee754_sqrtf (x); |
63 | +} | 82 | +} |
64 | strong_alias (__ieee754_sqrtf, __sqrtf_finite) | 83 | strong_alias (__ieee754_sqrtf, __sqrtf_finite) |
65 | Index: git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | 84 | diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c |
66 | =================================================================== | 85 | index fc4a749..7038a70 100644 |
67 | --- git.orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c 2014-08-29 10:35:02.616070587 -0700 | 86 | --- a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c |
68 | +++ git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c 2014-08-29 10:35:02.604070587 -0700 | 87 | +++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c |
69 | @@ -40,7 +40,7 @@ | 88 | @@ -41,10 +41,10 @@ static const float half = 0.5; |
70 | simultaneously. */ | ||
71 | 89 | ||
90 | #ifdef __STDC__ | ||
72 | double | 91 | double |
73 | -__ieee754_sqrt (double b) | 92 | -__ieee754_sqrt (double b) |
74 | +__slow_ieee754_sqrt (double b) | 93 | +__slow_ieee754_sqrt (double b) |
94 | #else | ||
95 | double | ||
96 | -__ieee754_sqrt (b) | ||
97 | +__slow_ieee754_sqrt (b) | ||
98 | double b; | ||
99 | #endif | ||
75 | { | 100 | { |
76 | if (__builtin_expect (b > 0, 1)) | 101 | @@ -83,7 +83,7 @@ __ieee754_sqrt (b) |
77 | { | ||
78 | @@ -77,7 +77,7 @@ | ||
79 | 102 | ||
80 | /* Handle small numbers by scaling. */ | 103 | /* Handle small numbers by scaling. */ |
81 | if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) | 104 | if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) |
@@ -84,7 +107,7 @@ Index: git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | |||
84 | 107 | ||
85 | #define FMADD(a_, c_, b_) \ | 108 | #define FMADD(a_, c_, b_) \ |
86 | ({ double __r; \ | 109 | ({ double __r; \ |
87 | @@ -126,4 +126,12 @@ | 110 | @@ -132,4 +132,12 @@ __ieee754_sqrt (b) |
88 | } | 111 | } |
89 | return f_wash (b); | 112 | return f_wash (b); |
90 | } | 113 | } |
@@ -93,27 +116,32 @@ Index: git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | |||
93 | +double | 116 | +double |
94 | +__ieee754_sqrt (double x) | 117 | +__ieee754_sqrt (double x) |
95 | +{ | 118 | +{ |
96 | + return __slow_ieee754_sqrt (x); | 119 | + return __slow_ieee754_sqrt (x); |
97 | +} | 120 | +} |
98 | + | 121 | + |
99 | strong_alias (__ieee754_sqrt, __sqrt_finite) | 122 | strong_alias (__ieee754_sqrt, __sqrt_finite) |
100 | Index: git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | 123 | diff --git a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c |
101 | =================================================================== | 124 | index 9d17512..10de1f0 100644 |
102 | --- git.orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c 2014-08-29 10:35:02.616070587 -0700 | 125 | --- a/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c |
103 | +++ git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c 2014-08-29 10:35:02.604070587 -0700 | 126 | +++ b/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c |
104 | @@ -38,7 +38,7 @@ | 127 | @@ -39,10 +39,10 @@ static const float threehalf = 1.5; |
105 | square root. */ | ||
106 | 128 | ||
129 | #ifdef __STDC__ | ||
107 | float | 130 | float |
108 | -__ieee754_sqrtf (float b) | 131 | -__ieee754_sqrtf (float b) |
109 | +__slow_ieee754_sqrtf (float b) | 132 | +__slow_ieee754_sqrtf (float b) |
133 | #else | ||
134 | float | ||
135 | -__ieee754_sqrtf (b) | ||
136 | +__slow_ieee754_sqrtf (b) | ||
137 | float b; | ||
138 | #endif | ||
110 | { | 139 | { |
111 | if (__builtin_expect (b > 0, 1)) | 140 | @@ -99,4 +99,12 @@ __ieee754_sqrtf (b) |
112 | { | ||
113 | @@ -93,4 +93,11 @@ | ||
114 | } | 141 | } |
115 | return f_washf (b); | 142 | return f_washf (b); |
116 | } | 143 | } |
144 | + | ||
117 | +#undef __ieee754_sqrtf | 145 | +#undef __ieee754_sqrtf |
118 | +float | 146 | +float |
119 | +__ieee754_sqrtf (float x) | 147 | +__ieee754_sqrtf (float x) |
@@ -122,11 +150,11 @@ Index: git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | |||
122 | +} | 150 | +} |
123 | + | 151 | + |
124 | strong_alias (__ieee754_sqrtf, __sqrtf_finite) | 152 | strong_alias (__ieee754_sqrtf, __sqrtf_finite) |
125 | Index: git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | 153 | diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c |
126 | =================================================================== | 154 | index fc4a749..7038a70 100644 |
127 | --- git.orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c 2014-08-29 10:35:02.616070587 -0700 | 155 | --- a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c |
128 | +++ git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c 2014-08-29 10:35:02.604070587 -0700 | 156 | +++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c |
129 | @@ -41,10 +41,10 @@ | 157 | @@ -41,10 +41,10 @@ static const float half = 0.5; |
130 | 158 | ||
131 | #ifdef __STDC__ | 159 | #ifdef __STDC__ |
132 | double | 160 | double |
@@ -139,7 +167,7 @@ Index: git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | |||
139 | double b; | 167 | double b; |
140 | #endif | 168 | #endif |
141 | { | 169 | { |
142 | @@ -83,7 +83,7 @@ | 170 | @@ -83,7 +83,7 @@ __ieee754_sqrt (b) |
143 | 171 | ||
144 | /* Handle small numbers by scaling. */ | 172 | /* Handle small numbers by scaling. */ |
145 | if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) | 173 | if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) |
@@ -148,7 +176,7 @@ Index: git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | |||
148 | 176 | ||
149 | #define FMADD(a_, c_, b_) \ | 177 | #define FMADD(a_, c_, b_) \ |
150 | ({ double __r; \ | 178 | ({ double __r; \ |
151 | @@ -132,4 +132,12 @@ | 179 | @@ -132,4 +132,12 @@ __ieee754_sqrt (b) |
152 | } | 180 | } |
153 | return f_wash (b); | 181 | return f_wash (b); |
154 | } | 182 | } |
@@ -161,11 +189,11 @@ Index: git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | |||
161 | +} | 189 | +} |
162 | + | 190 | + |
163 | strong_alias (__ieee754_sqrt, __sqrt_finite) | 191 | strong_alias (__ieee754_sqrt, __sqrt_finite) |
164 | Index: git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | 192 | diff --git a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c |
165 | =================================================================== | 193 | index 9d17512..10de1f0 100644 |
166 | --- git.orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c 2014-08-29 10:35:02.616070587 -0700 | 194 | --- a/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c |
167 | +++ git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c 2014-08-29 10:35:02.604070587 -0700 | 195 | +++ b/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c |
168 | @@ -39,10 +39,10 @@ | 196 | @@ -39,10 +39,10 @@ static const float threehalf = 1.5; |
169 | 197 | ||
170 | #ifdef __STDC__ | 198 | #ifdef __STDC__ |
171 | float | 199 | float |
@@ -178,7 +206,41 @@ Index: git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | |||
178 | float b; | 206 | float b; |
179 | #endif | 207 | #endif |
180 | { | 208 | { |
181 | @@ -99,4 +99,12 @@ | 209 | @@ -99,4 +99,12 @@ __ieee754_sqrtf (b) |
210 | } | ||
211 | return f_washf (b); | ||
212 | } | ||
213 | + | ||
214 | +#undef __ieee754_sqrtf | ||
215 | +float | ||
216 | +__ieee754_sqrtf (float x) | ||
217 | +{ | ||
218 | + return __slow_ieee754_sqrtf (x); | ||
219 | +} | ||
220 | + | ||
221 | strong_alias (__ieee754_sqrtf, __sqrtf_finite) | ||
222 | diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | ||
223 | index fc4a749..1c34244 100644 | ||
224 | --- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | ||
225 | +++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | ||
226 | @@ -132,4 +132,12 @@ __ieee754_sqrt (b) | ||
227 | } | ||
228 | return f_wash (b); | ||
229 | } | ||
230 | + | ||
231 | +#undef __ieee754_sqrt | ||
232 | +double | ||
233 | +__ieee754_sqrt (double x) | ||
234 | +{ | ||
235 | + return __slow_ieee754_sqrt (x); | ||
236 | +} | ||
237 | + | ||
238 | strong_alias (__ieee754_sqrt, __sqrt_finite) | ||
239 | diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | ||
240 | index 9d17512..8126535 100644 | ||
241 | --- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | ||
242 | +++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | ||
243 | @@ -99,4 +99,12 @@ __ieee754_sqrtf (b) | ||
182 | } | 244 | } |
183 | return f_washf (b); | 245 | return f_washf (b); |
184 | } | 246 | } |
@@ -191,24 +253,20 @@ Index: git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | |||
191 | +} | 253 | +} |
192 | + | 254 | + |
193 | strong_alias (__ieee754_sqrtf, __sqrtf_finite) | 255 | strong_alias (__ieee754_sqrtf, __sqrtf_finite) |
194 | Index: git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | 256 | diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c |
195 | =================================================================== | 257 | index 1795fd6..13a8197 100644 |
196 | --- git.orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c 2014-08-29 10:35:02.616070587 -0700 | 258 | --- a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c |
197 | +++ git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c 2014-08-29 10:35:02.608070587 -0700 | 259 | +++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c |
198 | @@ -41,10 +41,10 @@ | 260 | @@ -40,7 +40,7 @@ static const float half = 0.5; |
261 | simultaneously. */ | ||
199 | 262 | ||
200 | #ifdef __STDC__ | ||
201 | double | 263 | double |
202 | -__ieee754_sqrt (double b) | 264 | -__ieee754_sqrt (double b) |
203 | +__slow_ieee754_sqrt (double b) | 265 | +__slow_ieee754_sqrt (double b) |
204 | #else | ||
205 | double | ||
206 | -__ieee754_sqrt (b) | ||
207 | +__slow_ieee754_sqrt (b) | ||
208 | double b; | ||
209 | #endif | ||
210 | { | 266 | { |
211 | @@ -83,7 +83,7 @@ | 267 | if (__builtin_expect (b > 0, 1)) |
268 | { | ||
269 | @@ -77,7 +77,7 @@ __ieee754_sqrt (double b) | ||
212 | 270 | ||
213 | /* Handle small numbers by scaling. */ | 271 | /* Handle small numbers by scaling. */ |
214 | if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) | 272 | if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) |
@@ -217,7 +275,7 @@ Index: git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | |||
217 | 275 | ||
218 | #define FMADD(a_, c_, b_) \ | 276 | #define FMADD(a_, c_, b_) \ |
219 | ({ double __r; \ | 277 | ({ double __r; \ |
220 | @@ -132,4 +132,12 @@ | 278 | @@ -126,4 +126,12 @@ __ieee754_sqrt (double b) |
221 | } | 279 | } |
222 | return f_wash (b); | 280 | return f_wash (b); |
223 | } | 281 | } |
@@ -226,32 +284,27 @@ Index: git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | |||
226 | +double | 284 | +double |
227 | +__ieee754_sqrt (double x) | 285 | +__ieee754_sqrt (double x) |
228 | +{ | 286 | +{ |
229 | + return __slow_ieee754_sqrt (x); | 287 | + return __slow_ieee754_sqrt (x); |
230 | +} | 288 | +} |
231 | + | 289 | + |
232 | strong_alias (__ieee754_sqrt, __sqrt_finite) | 290 | strong_alias (__ieee754_sqrt, __sqrt_finite) |
233 | Index: git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | 291 | diff --git a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c |
234 | =================================================================== | 292 | index a917f31..fae2d81 100644 |
235 | --- git.orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c 2014-08-29 10:35:02.616070587 -0700 | 293 | --- a/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c |
236 | +++ git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c 2014-08-29 10:35:02.608070587 -0700 | 294 | +++ b/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c |
237 | @@ -39,10 +39,10 @@ | 295 | @@ -38,7 +38,7 @@ static const float threehalf = 1.5; |
296 | square root. */ | ||
238 | 297 | ||
239 | #ifdef __STDC__ | ||
240 | float | 298 | float |
241 | -__ieee754_sqrtf (float b) | 299 | -__ieee754_sqrtf (float b) |
242 | +__slow_ieee754_sqrtf (float b) | 300 | +__slow_ieee754_sqrtf (float b) |
243 | #else | ||
244 | float | ||
245 | -__ieee754_sqrtf (b) | ||
246 | +__slow_ieee754_sqrtf (b) | ||
247 | float b; | ||
248 | #endif | ||
249 | { | 301 | { |
250 | @@ -99,4 +99,12 @@ | 302 | if (__builtin_expect (b > 0, 1)) |
303 | { | ||
304 | @@ -93,4 +93,11 @@ __ieee754_sqrtf (float b) | ||
251 | } | 305 | } |
252 | return f_washf (b); | 306 | return f_washf (b); |
253 | } | 307 | } |
254 | + | ||
255 | +#undef __ieee754_sqrtf | 308 | +#undef __ieee754_sqrtf |
256 | +float | 309 | +float |
257 | +__ieee754_sqrtf (float x) | 310 | +__ieee754_sqrtf (float x) |
@@ -260,11 +313,11 @@ Index: git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | |||
260 | +} | 313 | +} |
261 | + | 314 | + |
262 | strong_alias (__ieee754_sqrtf, __sqrtf_finite) | 315 | strong_alias (__ieee754_sqrtf, __sqrtf_finite) |
263 | Index: git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | 316 | diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c |
264 | =================================================================== | 317 | index fc4a749..7038a70 100644 |
265 | --- git.orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c 2014-08-29 10:35:02.616070587 -0700 | 318 | --- a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c |
266 | +++ git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c 2014-08-29 10:35:02.608070587 -0700 | 319 | +++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c |
267 | @@ -41,10 +41,10 @@ | 320 | @@ -41,10 +41,10 @@ static const float half = 0.5; |
268 | 321 | ||
269 | #ifdef __STDC__ | 322 | #ifdef __STDC__ |
270 | double | 323 | double |
@@ -277,7 +330,7 @@ Index: git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | |||
277 | double b; | 330 | double b; |
278 | #endif | 331 | #endif |
279 | { | 332 | { |
280 | @@ -83,7 +83,7 @@ | 333 | @@ -83,7 +83,7 @@ __ieee754_sqrt (b) |
281 | 334 | ||
282 | /* Handle small numbers by scaling. */ | 335 | /* Handle small numbers by scaling. */ |
283 | if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) | 336 | if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) |
@@ -286,7 +339,7 @@ Index: git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | |||
286 | 339 | ||
287 | #define FMADD(a_, c_, b_) \ | 340 | #define FMADD(a_, c_, b_) \ |
288 | ({ double __r; \ | 341 | ({ double __r; \ |
289 | @@ -132,4 +132,12 @@ | 342 | @@ -132,4 +132,12 @@ __ieee754_sqrt (b) |
290 | } | 343 | } |
291 | return f_wash (b); | 344 | return f_wash (b); |
292 | } | 345 | } |
@@ -299,11 +352,11 @@ Index: git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | |||
299 | +} | 352 | +} |
300 | + | 353 | + |
301 | strong_alias (__ieee754_sqrt, __sqrt_finite) | 354 | strong_alias (__ieee754_sqrt, __sqrt_finite) |
302 | Index: git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | 355 | diff --git a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c |
303 | =================================================================== | 356 | index 9d17512..10de1f0 100644 |
304 | --- git.orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c 2014-08-29 10:35:02.616070587 -0700 | 357 | --- a/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c |
305 | +++ git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c 2014-08-29 10:35:02.608070587 -0700 | 358 | +++ b/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c |
306 | @@ -39,10 +39,10 @@ | 359 | @@ -39,10 +39,10 @@ static const float threehalf = 1.5; |
307 | 360 | ||
308 | #ifdef __STDC__ | 361 | #ifdef __STDC__ |
309 | float | 362 | float |
@@ -316,41 +369,7 @@ Index: git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | |||
316 | float b; | 369 | float b; |
317 | #endif | 370 | #endif |
318 | { | 371 | { |
319 | @@ -99,4 +99,12 @@ | 372 | @@ -99,4 +99,12 @@ __ieee754_sqrtf (b) |
320 | } | ||
321 | return f_washf (b); | ||
322 | } | ||
323 | + | ||
324 | +#undef __ieee754_sqrtf | ||
325 | +float | ||
326 | +__ieee754_sqrtf (float x) | ||
327 | +{ | ||
328 | + return __slow_ieee754_sqrtf (x); | ||
329 | +} | ||
330 | + | ||
331 | strong_alias (__ieee754_sqrtf, __sqrtf_finite) | ||
332 | Index: git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | ||
333 | =================================================================== | ||
334 | --- git.orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c 2014-08-29 10:35:02.616070587 -0700 | ||
335 | +++ git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c 2014-08-29 10:35:02.608070587 -0700 | ||
336 | @@ -132,4 +132,12 @@ | ||
337 | } | ||
338 | return f_wash (b); | ||
339 | } | ||
340 | + | ||
341 | +#undef __ieee754_sqrt | ||
342 | +double | ||
343 | +__ieee754_sqrt (double x) | ||
344 | +{ | ||
345 | + return __slow_ieee754_sqrt (x); | ||
346 | +} | ||
347 | + | ||
348 | strong_alias (__ieee754_sqrt, __sqrt_finite) | ||
349 | Index: git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | ||
350 | =================================================================== | ||
351 | --- git.orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c 2014-08-29 10:35:02.616070587 -0700 | ||
352 | +++ git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c 2014-08-29 10:35:02.608070587 -0700 | ||
353 | @@ -99,4 +99,12 @@ | ||
354 | } | 373 | } |
355 | return f_washf (b); | 374 | return f_washf (b); |
356 | } | 375 | } |
@@ -363,3 +382,6 @@ Index: git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | |||
363 | +} | 382 | +} |
364 | + | 383 | + |
365 | strong_alias (__ieee754_sqrtf, __sqrtf_finite) | 384 | strong_alias (__ieee754_sqrtf, __sqrtf_finite) |
385 | -- | ||
386 | 2.1.4 | ||
387 | |||
diff --git a/meta/recipes-core/glibc/glibc/0001-R_ARM_TLS_DTPOFF32.patch b/meta/recipes-core/glibc/glibc/0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch index 3922cb818f..1f5475912c 100644 --- a/meta/recipes-core/glibc/glibc/0001-R_ARM_TLS_DTPOFF32.patch +++ b/meta/recipes-core/glibc/glibc/0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch | |||
@@ -1,21 +1,24 @@ | |||
1 | 1 | From acf7a028817e71eb99d785037659abd4d120ffe2 Mon Sep 17 00:00:00 2001 | |
2 | Quote from bug 1443 which explains what the patch does : | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Wed, 18 Mar 2015 00:20:09 +0000 | ||
4 | Subject: [PATCH 09/27] Quote from bug 1443 which explains what the patch does | ||
5 | : | ||
3 | 6 | ||
4 | We build some random program and link it with -lust. When we run it, | 7 | We build some random program and link it with -lust. When we run it, |
5 | it dies with a SIGSEGV before reaching main(). | 8 | it dies with a SIGSEGV before reaching main(). |
6 | 9 | ||
7 | Libust.so depends on liburcu-bp.so from the usermode-rcu package. | 10 | Libust.so depends on liburcu-bp.so from the usermode-rcu package. |
8 | Although libust.so is not prelinked, liburcu-bp.so IS prelinked; this | 11 | Although libust.so is not prelinked, liburcu-bp.so IS prelinked; this |
9 | is critical. | 12 | is critical. |
10 | 13 | ||
11 | Libust.so uses a TLS / __thread variable that is defined in liburcu- | 14 | Libust.so uses a TLS / __thread variable that is defined in liburcu- |
12 | bp.so. There are special ARM-specific relocation types that allow two | 15 | bp.so. There are special ARM-specific relocation types that allow two |
13 | shared libraries to share thread-specific data. This is critical too. | 16 | shared libraries to share thread-specific data. This is critical too. |
14 | 17 | ||
15 | One more critical issue: although liburcu-bp.so is prelinked, we can't | 18 | One more critical issue: although liburcu-bp.so is prelinked, we can't |
16 | load it at its prelinked address, because we also link against | 19 | load it at its prelinked address, because we also link against |
17 | librt.so, and librt.so uses that address. | 20 | librt.so, and librt.so uses that address. |
18 | 21 | ||
19 | The dynamic linker is forced to relink liburcu-bp.so at a different | 22 | The dynamic linker is forced to relink liburcu-bp.so at a different |
20 | address. In the course of relinking, it processes the special ARM | 23 | address. In the course of relinking, it processes the special ARM |
21 | relocation record mentioned above. The prelinker has already filled | 24 | relocation record mentioned above. The prelinker has already filled |
@@ -24,7 +27,7 @@ Quote from bug 1443 which explains what the patch does : | |||
24 | TLS. Because the normal behavior of a relocation is to add the symbol | 27 | TLS. Because the normal behavior of a relocation is to add the symbol |
25 | value to an addend stored at the address being relocated, we end up | 28 | value to an addend stored at the address being relocated, we end up |
26 | adding the short offset to itself, doubling it. | 29 | adding the short offset to itself, doubling it. |
27 | 30 | ||
28 | Now we have an awkward situation. The libust.so library doesn't know | 31 | Now we have an awkward situation. The libust.so library doesn't know |
29 | about the addend, so its TLS data for this element is correct. The | 32 | about the addend, so its TLS data for this element is correct. The |
30 | liburcu-bp.so library has a different offset for the element. When we | 33 | 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 : | |||
36 | Upstream-Status: Pending | 39 | Upstream-Status: Pending |
37 | 40 | ||
38 | Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com> | 41 | Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com> |
42 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
39 | --- | 43 | --- |
40 | .../libc/ports/sysdeps/arm/dl-machine.h | 2 +- | 44 | sysdeps/arm/dl-machine.h | 2 +- |
41 | 1 file changed, 1 insertion(+), 1 deletion(-) | 45 | 1 file changed, 1 insertion(+), 1 deletion(-) |
42 | 46 | ||
43 | ndex 8d905e8..dcfa71e 100644 | 47 | diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h |
44 | Index: git/sysdeps/arm/dl-machine.h | 48 | index 6fb20bd..8805537 100644 |
45 | =================================================================== | 49 | --- a/sysdeps/arm/dl-machine.h |
46 | --- git.orig/sysdeps/arm/dl-machine.h 2014-08-27 05:30:47.748070587 +0000 | 50 | +++ b/sysdeps/arm/dl-machine.h |
47 | +++ git/sysdeps/arm/dl-machine.h 2014-08-27 05:30:47.740070587 +0000 | 51 | @@ -499,7 +499,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, |
48 | @@ -495,7 +495,7 @@ | ||
49 | 52 | ||
50 | case R_ARM_TLS_DTPOFF32: | 53 | case R_ARM_TLS_DTPOFF32: |
51 | if (sym != NULL) | 54 | if (sym != NULL) |
@@ -54,3 +57,6 @@ Index: git/sysdeps/arm/dl-machine.h | |||
54 | break; | 57 | break; |
55 | 58 | ||
56 | case R_ARM_TLS_TPOFF32: | 59 | case R_ARM_TLS_TPOFF32: |
60 | -- | ||
61 | 2.1.4 | ||
62 | |||
diff --git a/meta/recipes-core/glibc/glibc/0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch b/meta/recipes-core/glibc/glibc/0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch index f341282ffb..d71e576a6f 100644 --- a/meta/recipes-core/glibc/glibc/0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch +++ b/meta/recipes-core/glibc/glibc/0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 713d822908d1b2ae8403af7f9375c7054ed3dd49 Mon Sep 17 00:00:00 2001 | 1 | From 017322ee28c1579ce6c81904842aaada9c82403c Mon Sep 17 00:00:00 2001 |
2 | From: Ting Liu <b28495@freescale.com> | 2 | From: Ting Liu <b28495@freescale.com> |
3 | Date: Wed, 19 Dec 2012 04:39:57 -0600 | 3 | Date: Wed, 19 Dec 2012 04:39:57 -0600 |
4 | Subject: [PATCH] eglibc: run libm-err-tab.pl with specific dirs in ${S} | 4 | Subject: [PATCH 10/27] eglibc: run libm-err-tab.pl with specific dirs in ${S} |
5 | 5 | ||
6 | libm-err-tab.pl will parse all the files named "libm-test-ulps" | 6 | libm-err-tab.pl will parse all the files named "libm-test-ulps" |
7 | in the given dir recursively. To avoid parsing the one in | 7 | in the given dir recursively. To avoid parsing the one in |
@@ -14,14 +14,14 @@ Upstream-Status: inappropriate [OE specific] | |||
14 | 14 | ||
15 | Signed-off-by: Ting Liu <b28495@freescale.com> | 15 | Signed-off-by: Ting Liu <b28495@freescale.com> |
16 | --- | 16 | --- |
17 | manual/Makefile | 3 ++- | 17 | manual/Makefile | 3 ++- |
18 | 1 file changed, 2 insertions(+), 1 deletion(-) | 18 | 1 file changed, 2 insertions(+), 1 deletion(-) |
19 | 19 | ||
20 | Index: git/manual/Makefile | 20 | diff --git a/manual/Makefile b/manual/Makefile |
21 | =================================================================== | 21 | index 5382208..6b701b0 100644 |
22 | --- git.orig/manual/Makefile 2014-08-29 10:35:18.728070587 -0700 | 22 | --- a/manual/Makefile |
23 | +++ git/manual/Makefile 2014-08-29 10:35:18.720070587 -0700 | 23 | +++ b/manual/Makefile |
24 | @@ -105,7 +105,8 @@ | 24 | @@ -105,7 +105,8 @@ $(objpfx)libm-err.texi: $(objpfx)stamp-libm-err |
25 | $(objpfx)stamp-libm-err: libm-err-tab.pl $(wildcard $(foreach dir,$(sysdirs),\ | 25 | $(objpfx)stamp-libm-err: libm-err-tab.pl $(wildcard $(foreach dir,$(sysdirs),\ |
26 | $(dir)/libm-test-ulps)) | 26 | $(dir)/libm-test-ulps)) |
27 | pwd=`pwd`; \ | 27 | pwd=`pwd`; \ |
@@ -31,3 +31,6 @@ Index: git/manual/Makefile | |||
31 | $(move-if-change) $(objpfx)libm-err-tmp $(objpfx)libm-err.texi | 31 | $(move-if-change) $(objpfx)libm-err-tmp $(objpfx)libm-err.texi |
32 | touch $@ | 32 | touch $@ |
33 | 33 | ||
34 | -- | ||
35 | 2.1.4 | ||
36 | |||
diff --git a/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch b/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch new file mode 100644 index 0000000000..07a112b218 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch | |||
@@ -0,0 +1,61 @@ | |||
1 | From 1be45f870ebbb0259bea5250a6d2c2fbcb33409d Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 18 Mar 2015 00:24:46 +0000 | ||
4 | Subject: [PATCH 11/27] __ieee754_sqrt{,f} are now inline functions and call | ||
5 | out __slow versions | ||
6 | |||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: chunrong guo <B40290@freescale.com> | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | 6 +++--- | ||
13 | sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | 4 ++-- | ||
14 | 2 files changed, 5 insertions(+), 5 deletions(-) | ||
15 | |||
16 | diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | ||
17 | index 1c34244..7038a70 100644 | ||
18 | --- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | ||
19 | +++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | ||
20 | @@ -41,10 +41,10 @@ static const float half = 0.5; | ||
21 | |||
22 | #ifdef __STDC__ | ||
23 | double | ||
24 | -__ieee754_sqrt (double b) | ||
25 | +__slow_ieee754_sqrt (double b) | ||
26 | #else | ||
27 | double | ||
28 | -__ieee754_sqrt (b) | ||
29 | +__slow_ieee754_sqrt (b) | ||
30 | double b; | ||
31 | #endif | ||
32 | { | ||
33 | @@ -83,7 +83,7 @@ __ieee754_sqrt (b) | ||
34 | |||
35 | /* Handle small numbers by scaling. */ | ||
36 | if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) | ||
37 | - return __ieee754_sqrt (b * two108) * twom54; | ||
38 | + return __slow_ieee754_sqrt (b * two108) * twom54; | ||
39 | |||
40 | #define FMADD(a_, c_, b_) \ | ||
41 | ({ double __r; \ | ||
42 | diff --git a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | ||
43 | index 8126535..10de1f0 100644 | ||
44 | --- a/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | ||
45 | +++ b/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | ||
46 | @@ -39,10 +39,10 @@ static const float threehalf = 1.5; | ||
47 | |||
48 | #ifdef __STDC__ | ||
49 | float | ||
50 | -__ieee754_sqrtf (float b) | ||
51 | +__slow_ieee754_sqrtf (float b) | ||
52 | #else | ||
53 | float | ||
54 | -__ieee754_sqrtf (b) | ||
55 | +__slow_ieee754_sqrtf (b) | ||
56 | float b; | ||
57 | #endif | ||
58 | { | ||
59 | -- | ||
60 | 2.1.4 | ||
61 | |||
diff --git a/meta/recipes-core/glibc/glibc/grok_gold.patch b/meta/recipes-core/glibc/glibc/0012-Make-ld-version-output-matching-grok-gold-s-output.patch index 5151802ecf..267791393e 100644 --- a/meta/recipes-core/glibc/glibc/grok_gold.patch +++ b/meta/recipes-core/glibc/glibc/0012-Make-ld-version-output-matching-grok-gold-s-output.patch | |||
@@ -1,16 +1,23 @@ | |||
1 | Make ld --version output matching grok gold's output | 1 | From 49471ab1f90e392da9520eea831ce8731be9fc8b Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 18 Mar 2015 00:25:45 +0000 | ||
4 | Subject: [PATCH 12/27] Make ld --version output matching grok gold's output | ||
2 | 5 | ||
3 | adapted from from upstream branch roland/gold-vs-libc | 6 | adapted from from upstream branch roland/gold-vs-libc |
4 | 7 | ||
5 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
6 | Upstream-Status: Backport | 8 | Upstream-Status: Backport |
7 | 9 | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | configure | 2 +- | ||
13 | configure.ac | 2 +- | ||
14 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
8 | 15 | ||
9 | Index: git/configure | 16 | diff --git a/configure b/configure |
10 | =================================================================== | 17 | index 45cc7cb..7d7299a 100755 |
11 | --- git.orig/configure | 18 | --- a/configure |
12 | +++ git/configure | 19 | +++ b/configure |
13 | @@ -4593,7 +4593,7 @@ else | 20 | @@ -4709,7 +4709,7 @@ else |
14 | # Found it, now check the version. | 21 | # Found it, now check the version. |
15 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $LD" >&5 | 22 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $LD" >&5 |
16 | $as_echo_n "checking version of $LD... " >&6; } | 23 | $as_echo_n "checking version of $LD... " >&6; } |
@@ -19,11 +26,11 @@ Index: git/configure | |||
19 | case $ac_prog_version in | 26 | case $ac_prog_version in |
20 | '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; | 27 | '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; |
21 | 2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*) | 28 | 2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*) |
22 | Index: git/configure.ac | 29 | diff --git a/configure.ac b/configure.ac |
23 | =================================================================== | 30 | index 7e9383a..a467a69 100644 |
24 | --- git.orig/configure.ac | 31 | --- a/configure.ac |
25 | +++ git/configure.ac | 32 | +++ b/configure.ac |
26 | @@ -913,7 +913,7 @@ AC_CHECK_PROG_VER(AS, $AS, --version, | 33 | @@ -941,7 +941,7 @@ AC_CHECK_PROG_VER(AS, $AS, --version, |
27 | [2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*], | 34 | [2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*], |
28 | AS=: critic_missing="$critic_missing as") | 35 | AS=: critic_missing="$critic_missing as") |
29 | AC_CHECK_PROG_VER(LD, $LD, --version, | 36 | AC_CHECK_PROG_VER(LD, $LD, --version, |
@@ -32,3 +39,6 @@ Index: git/configure.ac | |||
32 | [2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*], | 39 | [2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*], |
33 | LD=: critic_missing="$critic_missing ld") | 40 | LD=: critic_missing="$critic_missing ld") |
34 | 41 | ||
42 | -- | ||
43 | 2.1.4 | ||
44 | |||
diff --git a/meta/recipes-core/glibc/glibc/0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch b/meta/recipes-core/glibc/glibc/0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch new file mode 100644 index 0000000000..c1fda9d433 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From b55e49b199c46a278ab66b6b1e3eab483b913197 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 18 Mar 2015 00:27:10 +0000 | ||
4 | Subject: [PATCH 13/27] sysdeps/gnu/configure.ac: handle correctly | ||
5 | $libc_cv_rootsbindir | ||
6 | |||
7 | Upstream-Status:Pending | ||
8 | |||
9 | Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com> | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | sysdeps/gnu/configure | 2 +- | ||
13 | sysdeps/gnu/configure.ac | 2 +- | ||
14 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
15 | |||
16 | diff --git a/sysdeps/gnu/configure b/sysdeps/gnu/configure | ||
17 | index 9239297..c5ed3ca 100644 | ||
18 | --- a/sysdeps/gnu/configure | ||
19 | +++ b/sysdeps/gnu/configure | ||
20 | @@ -32,6 +32,6 @@ case "$prefix" in | ||
21 | else | ||
22 | libc_cv_localstatedir=$localstatedir | ||
23 | fi | ||
24 | - libc_cv_rootsbindir=/sbin | ||
25 | + test -n "$libc_cv_rootsbindir" || libc_cv_rootsbindir=/sbin | ||
26 | ;; | ||
27 | esac | ||
28 | diff --git a/sysdeps/gnu/configure.ac b/sysdeps/gnu/configure.ac | ||
29 | index 634fe4d..3db1697 100644 | ||
30 | --- a/sysdeps/gnu/configure.ac | ||
31 | +++ b/sysdeps/gnu/configure.ac | ||
32 | @@ -21,6 +21,6 @@ case "$prefix" in | ||
33 | else | ||
34 | libc_cv_localstatedir=$localstatedir | ||
35 | fi | ||
36 | - libc_cv_rootsbindir=/sbin | ||
37 | + test -n "$libc_cv_rootsbindir" || libc_cv_rootsbindir=/sbin | ||
38 | ;; | ||
39 | esac | ||
40 | -- | ||
41 | 2.1.4 | ||
42 | |||
diff --git a/meta/recipes-core/glibc/glibc/0001-Add-unused-attribute.patch b/meta/recipes-core/glibc/glibc/0014-Add-unused-attribute.patch index f51a0ccb22..0ba5d2fbad 100644 --- a/meta/recipes-core/glibc/glibc/0001-Add-unused-attribute.patch +++ b/meta/recipes-core/glibc/glibc/0014-Add-unused-attribute.patch | |||
@@ -1,16 +1,14 @@ | |||
1 | 2015-02-18 Khem Raj <raj.khem@gmail.com>> | 1 | From 0229d6c9c0e7721773118d5ae1d172c269bc9826 Mon Sep 17 00:00:00 2001 |
2 | |||
3 | * iconv/gconv_charset.h (strip): | ||
4 | Add unused attribute. | ||
5 | |||
6 | From 9c4a91cb331ff1e8cde2314dadee74559d8cb0dd Mon Sep 17 00:00:00 2001 | ||
7 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
8 | Date: Wed, 18 Feb 2015 19:45:31 +0000 | 3 | Date: Wed, 18 Mar 2015 00:28:41 +0000 |
9 | Subject: [PATCH] Add unused attribute | 4 | Subject: [PATCH 14/27] Add unused attribute |
10 | 5 | ||
11 | Helps in avoiding gcc warning when header is is included in | 6 | Helps in avoiding gcc warning when header is is included in |
12 | a source file which does not use both functions | 7 | a source file which does not use both functions |
13 | 8 | ||
9 | * iconv/gconv_charset.h (strip): | ||
10 | Add unused attribute. | ||
11 | |||
14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
15 | 13 | ||
16 | Upstream-Status: Pending | 14 | Upstream-Status: Pending |
diff --git a/meta/recipes-core/glibc/glibc/0001-When-disabling-SSE-also-make-sure-that-fpmath-is-not.patch b/meta/recipes-core/glibc/glibc/0015-When-disabling-SSE-also-make-sure-that-fpmath-is-not.patch index a6395b77bc..4b261ca1ef 100644 --- a/meta/recipes-core/glibc/glibc/0001-When-disabling-SSE-also-make-sure-that-fpmath-is-not.patch +++ b/meta/recipes-core/glibc/glibc/0015-When-disabling-SSE-also-make-sure-that-fpmath-is-not.patch | |||
@@ -1,8 +1,8 @@ | |||
1 | From 6f5639f6405ff9a42e4f71e7b0f18bddb68d992a Mon Sep 17 00:00:00 2001 | 1 | From f058c884dd26d10c94550ca5252ed6576614d659 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Thu, 19 Feb 2015 03:23:45 +0000 | 3 | Date: Thu, 19 Feb 2015 03:23:45 +0000 |
4 | Subject: [PATCH] When disabling SSE also make sure that fpmath is not set to | 4 | Subject: [PATCH 15/27] When disabling SSE also make sure that fpmath is not |
5 | use SSE as well | 5 | set to use SSE as well |
6 | 6 | ||
7 | This fixes errors when we inject sse options through CFLAGS and now | 7 | This fixes errors when we inject sse options through CFLAGS and now |
8 | that we have -Werror turned on by default this warning turns to become | 8 | that we have -Werror turned on by default this warning turns to become |
diff --git a/meta/recipes-core/glibc/glibc/0001-yes-within-the-path-sets-wrong-config-variables.patch b/meta/recipes-core/glibc/glibc/0016-yes-within-the-path-sets-wrong-config-variables.patch index 827e980332..089e8b1b0b 100644 --- a/meta/recipes-core/glibc/glibc/0001-yes-within-the-path-sets-wrong-config-variables.patch +++ b/meta/recipes-core/glibc/glibc/0016-yes-within-the-path-sets-wrong-config-variables.patch | |||
@@ -1,4 +1,7 @@ | |||
1 | 'yes' within the path sets wrong config variables | 1 | From 70199fe59c38b621ab4121d7a55719b2b29b36de Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 18 Mar 2015 00:31:06 +0000 | ||
4 | Subject: [PATCH 16/27] 'yes' within the path sets wrong config variables | ||
2 | 5 | ||
3 | It seems that the 'AC_EGREP_CPP(yes...' example is quite popular | 6 | It seems that the 'AC_EGREP_CPP(yes...' example is quite popular |
4 | but being such a short word to grep it is likely to produce | 7 | 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. | |||
9 | Upstream-Status: Submitted [libc-alpha@sourceware.org] | 12 | Upstream-Status: Submitted [libc-alpha@sourceware.org] |
10 | 13 | ||
11 | Signed-off-by: Benjamin Esquivel <benjamin.esquivel@linux.intel.com> | 14 | Signed-off-by: Benjamin Esquivel <benjamin.esquivel@linux.intel.com> |
15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | 16 | --- |
17 | sysdeps/aarch64/configure | 4 ++-- | ||
18 | sysdeps/aarch64/configure.ac | 4 ++-- | ||
19 | sysdeps/arm/configure | 4 ++-- | ||
20 | sysdeps/arm/configure.ac | 4 ++-- | ||
21 | sysdeps/mips/configure | 4 ++-- | ||
22 | sysdeps/mips/configure.ac | 4 ++-- | ||
23 | sysdeps/nios2/configure | 4 ++-- | ||
24 | sysdeps/nios2/configure.ac | 4 ++-- | ||
25 | sysdeps/unix/sysv/linux/mips/configure | 4 ++-- | ||
26 | sysdeps/unix/sysv/linux/mips/configure.ac | 4 ++-- | ||
27 | sysdeps/unix/sysv/linux/powerpc/powerpc64/configure | 8 ++++---- | ||
28 | sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac | 8 ++++---- | ||
29 | 12 files changed, 28 insertions(+), 28 deletions(-) | ||
30 | |||
13 | diff --git a/sysdeps/aarch64/configure b/sysdeps/aarch64/configure | 31 | diff --git a/sysdeps/aarch64/configure b/sysdeps/aarch64/configure |
14 | index 5bd355a..3bc5537 100644 | 32 | index 5bd355a..3bc5537 100644 |
15 | --- a/sysdeps/aarch64/configure | 33 | --- a/sysdeps/aarch64/configure |
@@ -45,10 +63,10 @@ index 7851dd4..6e92381 100644 | |||
45 | ], libc_cv_aarch64_be=yes, libc_cv_aarch64_be=no)]) | 63 | ], libc_cv_aarch64_be=yes, libc_cv_aarch64_be=no)]) |
46 | if test $libc_cv_aarch64_be = yes; then | 64 | if test $libc_cv_aarch64_be = yes; then |
47 | diff --git a/sysdeps/arm/configure b/sysdeps/arm/configure | 65 | diff --git a/sysdeps/arm/configure b/sysdeps/arm/configure |
48 | index 45667cc..0b2ef11 100644 | 66 | index 158116b..5eaf54e 100644 |
49 | --- a/sysdeps/arm/configure | 67 | --- a/sysdeps/arm/configure |
50 | +++ b/sysdeps/arm/configure | 68 | +++ b/sysdeps/arm/configure |
51 | @@ -150,12 +150,12 @@ else | 69 | @@ -151,12 +151,12 @@ else |
52 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | 70 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
53 | /* end confdefs.h. */ | 71 | /* end confdefs.h. */ |
54 | #ifdef __ARM_PCS_VFP | 72 | #ifdef __ARM_PCS_VFP |
@@ -64,10 +82,10 @@ index 45667cc..0b2ef11 100644 | |||
64 | else | 82 | else |
65 | libc_cv_arm_pcs_vfp=no | 83 | libc_cv_arm_pcs_vfp=no |
66 | diff --git a/sysdeps/arm/configure.ac b/sysdeps/arm/configure.ac | 84 | diff --git a/sysdeps/arm/configure.ac b/sysdeps/arm/configure.ac |
67 | index 002b8ef..e1746a7 100644 | 85 | index 859c92a..2f4a6e2 100644 |
68 | --- a/sysdeps/arm/configure.ac | 86 | --- a/sysdeps/arm/configure.ac |
69 | +++ b/sysdeps/arm/configure.ac | 87 | +++ b/sysdeps/arm/configure.ac |
70 | @@ -16,8 +16,8 @@ dnl it. Until we do, don't define it. | 88 | @@ -15,8 +15,8 @@ AC_DEFINE(PI_STATIC_AND_HIDDEN) |
71 | # the dynamic linker via %ifdef. | 89 | # the dynamic linker via %ifdef. |
72 | AC_CACHE_CHECK([whether the compiler is using the ARM hard-float ABI], | 90 | AC_CACHE_CHECK([whether the compiler is using the ARM hard-float ABI], |
73 | [libc_cv_arm_pcs_vfp], | 91 | [libc_cv_arm_pcs_vfp], |
@@ -241,5 +259,5 @@ index 0822915..9a32fdd 100644 | |||
241 | ], libc_cv_ppc64_def_call_elf=yes, libc_cv_ppc64_def_call_elf=no)]) | 259 | ], libc_cv_ppc64_def_call_elf=yes, libc_cv_ppc64_def_call_elf=no)]) |
242 | if test $libc_cv_ppc64_def_call_elf = no; then | 260 | if test $libc_cv_ppc64_def_call_elf = no; then |
243 | -- | 261 | -- |
244 | 1.8.4.5 | 262 | 2.1.4 |
245 | 263 | ||
diff --git a/meta/recipes-core/glibc/glibc/timezone-re-written-tzselect-as-posix-sh.patch b/meta/recipes-core/glibc/glibc/0017-timezone-re-written-tzselect-as-posix-sh.patch index 55547deae7..0ce823087d 100644 --- a/meta/recipes-core/glibc/glibc/timezone-re-written-tzselect-as-posix-sh.patch +++ b/meta/recipes-core/glibc/glibc/0017-timezone-re-written-tzselect-as-posix-sh.patch | |||
@@ -1,21 +1,25 @@ | |||
1 | timezone: re-written tzselect as posix sh | 1 | From c90306107fbbe2979012917e87747ce78c82ab88 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 18 Mar 2015 00:33:03 +0000 | ||
4 | Subject: [PATCH 17/27] timezone: re-written tzselect as posix sh | ||
2 | 5 | ||
3 | To avoid the bash dependency. | 6 | To avoid the bash dependency. |
4 | 7 | ||
5 | Upstream-Status: Pending | 8 | Upstream-Status: Pending |
6 | 9 | ||
7 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | 10 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> |
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
8 | --- | 12 | --- |
9 | timezone/Makefile | 2 +- | 13 | timezone/Makefile | 2 +- |
10 | timezone/tzselect.ksh | 2 +- | 14 | timezone/tzselect.ksh | 2 +- |
11 | 2 files changed, 2 insertions(+), 2 deletions(-) | 15 | 2 files changed, 2 insertions(+), 2 deletions(-) |
12 | 16 | ||
13 | Index: git/timezone/Makefile | 17 | diff --git a/timezone/Makefile b/timezone/Makefile |
14 | =================================================================== | 18 | index 24c93c6..886b06e 100644 |
15 | --- git.orig/timezone/Makefile 2014-08-27 05:35:58.008070587 +0000 | 19 | --- a/timezone/Makefile |
16 | +++ git/timezone/Makefile 2014-08-27 05:36:37.908070587 +0000 | 20 | +++ b/timezone/Makefile |
17 | @@ -114,7 +114,7 @@ | 21 | @@ -126,7 +126,7 @@ $(testdata)/XT%: testdata/XT% |
18 | 22 | cp $< $@ | |
19 | 23 | ||
20 | $(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make | 24 | $(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make |
21 | - sed -e 's|/bin/bash|$(BASH)|' \ | 25 | - sed -e 's|/bin/bash|$(BASH)|' \ |
@@ -23,11 +27,11 @@ Index: git/timezone/Makefile | |||
23 | -e 's|TZDIR=[^}]*|TZDIR=$(zonedir)|' \ | 27 | -e 's|TZDIR=[^}]*|TZDIR=$(zonedir)|' \ |
24 | -e '/TZVERSION=/s|see_Makefile|"$(version)"|' \ | 28 | -e '/TZVERSION=/s|see_Makefile|"$(version)"|' \ |
25 | -e '/PKGVERSION=/s|=.*|="$(PKGVERSION)"|' \ | 29 | -e '/PKGVERSION=/s|=.*|="$(PKGVERSION)"|' \ |
26 | Index: git/timezone/tzselect.ksh | 30 | diff --git a/timezone/tzselect.ksh b/timezone/tzselect.ksh |
27 | =================================================================== | 31 | index 9d70691..25f45a8 100755 |
28 | --- git.orig/timezone/tzselect.ksh 2014-08-27 05:35:58.008070587 +0000 | 32 | --- a/timezone/tzselect.ksh |
29 | +++ git/timezone/tzselect.ksh 2014-08-27 05:35:58.000070587 +0000 | 33 | +++ b/timezone/tzselect.ksh |
30 | @@ -35,7 +35,7 @@ | 34 | @@ -35,7 +35,7 @@ REPORT_BUGS_TO=tz@iana.org |
31 | 35 | ||
32 | # Specify default values for environment variables if they are unset. | 36 | # Specify default values for environment variables if they are unset. |
33 | : ${AWK=awk} | 37 | : ${AWK=awk} |
@@ -36,3 +40,6 @@ Index: git/timezone/tzselect.ksh | |||
36 | 40 | ||
37 | # Check for awk Posix compliance. | 41 | # Check for awk Posix compliance. |
38 | ($AWK -v x=y 'BEGIN { exit 123 }') </dev/null >/dev/null 2>&1 | 42 | ($AWK -v x=y 'BEGIN { exit 123 }') </dev/null >/dev/null 2>&1 |
43 | -- | ||
44 | 2.1.4 | ||
45 | |||
diff --git a/meta/recipes-core/glibc/glibc/eglibc.patch b/meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch index fdfabc3a06..8eacbc059f 100644 --- a/meta/recipes-core/glibc/glibc/eglibc.patch +++ b/meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch | |||
@@ -1,15 +1,28 @@ | |||
1 | Instruction documents from eglibc | 1 | From eff048074ac7b5258bb615e5a5b221daa19b18ae Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 18 Mar 2015 00:42:58 +0000 | ||
4 | Subject: [PATCH 18/27] eglibc: Cross building and testing instructions | ||
2 | 5 | ||
6 | Ported from eglibc | ||
3 | Upstream-Status: Pending | 7 | Upstream-Status: Pending |
4 | 8 | ||
5 | Index: git/EGLIBC.cross-building | 9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
6 | =================================================================== | 10 | --- |
7 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | 11 | GLIBC.cross-building | 383 +++++++++++++++++++++++++++++++++++++++++++++++++++ |
8 | +++ git/EGLIBC.cross-building 2014-08-27 07:27:25.580070587 +0000 | 12 | GLIBC.cross-testing | 205 +++++++++++++++++++++++++++ |
13 | 2 files changed, 588 insertions(+) | ||
14 | create mode 100644 GLIBC.cross-building | ||
15 | create mode 100644 GLIBC.cross-testing | ||
16 | |||
17 | diff --git a/GLIBC.cross-building b/GLIBC.cross-building | ||
18 | new file mode 100644 | ||
19 | index 0000000..e6e0da1 | ||
20 | --- /dev/null | ||
21 | +++ b/GLIBC.cross-building | ||
9 | @@ -0,0 +1,383 @@ | 22 | @@ -0,0 +1,383 @@ |
10 | + -*- mode: text -*- | 23 | + -*- mode: text -*- |
11 | + | 24 | + |
12 | + Cross-Compiling EGLIBC | 25 | + Cross-Compiling GLIBC |
13 | + Jim Blandy <jimb@codesourcery.com> | 26 | + Jim Blandy <jimb@codesourcery.com> |
14 | + | 27 | + |
15 | + | 28 | + |
@@ -39,11 +52,11 @@ Index: git/EGLIBC.cross-building | |||
39 | +library are distributed separately, they are not actually independent | 52 | +library are distributed separately, they are not actually independent |
40 | +of each other: GCC requires the C library's headers and some object | 53 | +of each other: GCC requires the C library's headers and some object |
41 | +files to compile its own libraries, while the C library depends on | 54 | +files to compile its own libraries, while the C library depends on |
42 | +GCC's libraries. EGLIBC includes features and bug fixes to the stock | 55 | +GCC's libraries. GLIBC includes features and bug fixes to the stock |
43 | +GNU C library that simplify this process, but the fundamental | 56 | +GNU C library that simplify this process, but the fundamental |
44 | +interdependency stands. | 57 | +interdependency stands. |
45 | + | 58 | + |
46 | +In this document, we explain how to cross-compile an EGLIBC/GCC pair | 59 | +In this document, we explain how to cross-compile an GLIBC/GCC pair |
47 | +from source. Our intended audience is developers who are already | 60 | +from source. Our intended audience is developers who are already |
48 | +familiar with the GNU toolchain and comfortable working with | 61 | +familiar with the GNU toolchain and comfortable working with |
49 | +cross-development tools. While we do present a worked example to | 62 | +cross-development tools. While we do present a worked example to |
@@ -53,7 +66,7 @@ Index: git/EGLIBC.cross-building | |||
53 | + | 66 | + |
54 | +Preparation | 67 | +Preparation |
55 | + | 68 | + |
56 | +EGLIBC requires recent versions of the GNU binutils, GCC, and the | 69 | +GLIBC requires recent versions of the GNU binutils, GCC, and the |
57 | +Linux kernel. The web page <http://www.eglibc.org/prerequisites> | 70 | +Linux kernel. The web page <http://www.eglibc.org/prerequisites> |
58 | +documents the current requirements, and lists patches needed for | 71 | +documents the current requirements, and lists patches needed for |
59 | +certain target architectures. As of this writing, these build | 72 | +certain target architectures. As of this writing, these build |
@@ -61,7 +74,7 @@ Index: git/EGLIBC.cross-building | |||
61 | +and Linux 3.1. | 74 | +and Linux 3.1. |
62 | + | 75 | + |
63 | +First, let's set some variables, to simplify later commands. We'll | 76 | +First, let's set some variables, to simplify later commands. We'll |
64 | +build EGLIBC and GCC for an ARM target, known to the Linux kernel | 77 | +build GLIBC and GCC for an ARM target, known to the Linux kernel |
65 | +as 'arm', and we'll do the build on an Intel x86_64 Linux box: | 78 | +as 'arm', and we'll do the build on an Intel x86_64 Linux box: |
66 | + | 79 | + |
67 | + $ build=x86_64-pc-linux-gnu | 80 | + $ build=x86_64-pc-linux-gnu |
@@ -77,13 +90,13 @@ Index: git/EGLIBC.cross-building | |||
77 | + | 90 | + |
78 | +We're carrying out the entire process under '~/cross-build', which | 91 | +We're carrying out the entire process under '~/cross-build', which |
79 | +contains unpacked source trees for binutils, gcc, and linux kernel, | 92 | +contains unpacked source trees for binutils, gcc, and linux kernel, |
80 | +along with EGLIBC svn trunk (which can be checked-out with | 93 | +along with GLIBC svn trunk (which can be checked-out with |
81 | +'svn co http://www.eglibc.org/svn/trunk eglibc'): | 94 | +'svn co http://www.eglibc.org/svn/trunk eglibc'): |
82 | + | 95 | + |
83 | + $ top=$HOME/cross-build/$target | 96 | + $ top=$HOME/cross-build/$target |
84 | + $ src=$HOME/cross-build/src | 97 | + $ src=$HOME/cross-build/src |
85 | + $ ls $src | 98 | + $ ls $src |
86 | + binutils-2.22.51 eglibc gcc-4.6.2 linux-3.1 | 99 | + binutils-2.22.51 glibc gcc-4.6.2 linux-3.1 |
87 | + | 100 | + |
88 | +We're going to place our build directories in a subdirectory 'obj', | 101 | +We're going to place our build directories in a subdirectory 'obj', |
89 | +we'll install the cross-development toolchain in 'tools', and we'll | 102 | +we'll install the cross-development toolchain in 'tools', and we'll |
@@ -113,7 +126,7 @@ Index: git/EGLIBC.cross-building | |||
113 | + | 126 | + |
114 | +For our work, we need a cross-compiler targeting an ARM Linux | 127 | +For our work, we need a cross-compiler targeting an ARM Linux |
115 | +system. However, that configuration includes the shared library | 128 | +system. However, that configuration includes the shared library |
116 | +'libgcc_s.so', which is compiled against the EGLIBC headers (which we | 129 | +'libgcc_s.so', which is compiled against the GLIBC headers (which we |
117 | +haven't installed yet) and linked against 'libc.so' (which we haven't | 130 | +haven't installed yet) and linked against 'libc.so' (which we haven't |
118 | +built yet). | 131 | +built yet). |
119 | + | 132 | + |
@@ -146,7 +159,7 @@ Index: git/EGLIBC.cross-building | |||
146 | + | 159 | + |
147 | +Linux Kernel Headers | 160 | +Linux Kernel Headers |
148 | + | 161 | + |
149 | +To configure EGLIBC, we also need Linux kernel headers in place. | 162 | +To configure GLIBC, we also need Linux kernel headers in place. |
150 | +Fortunately, the Linux makefiles have a target that installs them for | 163 | +Fortunately, the Linux makefiles have a target that installs them for |
151 | +us. Since the process does modify the source tree a bit, we make a | 164 | +us. Since the process does modify the source tree a bit, we make a |
152 | +copy first: | 165 | +copy first: |
@@ -162,20 +175,20 @@ Index: git/EGLIBC.cross-building | |||
162 | + > INSTALL_HDR_PATH=$sysroot/usr | 175 | + > INSTALL_HDR_PATH=$sysroot/usr |
163 | + | 176 | + |
164 | + | 177 | + |
165 | +EGLIBC Headers and Preliminary Objects | 178 | +GLIBC Headers and Preliminary Objects |
166 | + | 179 | + |
167 | +Using the cross-compiler we've just built, we can now configure EGLIBC | 180 | +Using the cross-compiler we've just built, we can now configure GLIBC |
168 | +well enough to install the headers and build the object files that the | 181 | +well enough to install the headers and build the object files that the |
169 | +full cross-compiler will need: | 182 | +full cross-compiler will need: |
170 | + | 183 | + |
171 | + $ mkdir -p $obj/eglibc-headers | 184 | + $ mkdir -p $obj/glibc-headers |
172 | + $ cd $obj/eglibc-headers | 185 | + $ cd $obj/glibc-headers |
173 | + $ BUILD_CC=gcc \ | 186 | + $ BUILD_CC=gcc \ |
174 | + > CC=$tools/bin/$target-gcc \ | 187 | + > CC=$tools/bin/$target-gcc \ |
175 | + > CXX=$tools/bin/$target-g++ \ | 188 | + > CXX=$tools/bin/$target-g++ \ |
176 | + > AR=$tools/bin/$target-ar \ | 189 | + > AR=$tools/bin/$target-ar \ |
177 | + > RANLIB=$tools/bin/$target-ranlib \ | 190 | + > RANLIB=$tools/bin/$target-ranlib \ |
178 | + > $src/eglibc/libc/configure \ | 191 | + > $src/glibc/libc/configure \ |
179 | + > --prefix=/usr \ | 192 | + > --prefix=/usr \ |
180 | + > --with-headers=$sysroot/usr/include \ | 193 | + > --with-headers=$sysroot/usr/include \ |
181 | + > --build=$build \ | 194 | + > --build=$build \ |
@@ -184,20 +197,20 @@ Index: git/EGLIBC.cross-building | |||
184 | + > --enable-add-ons=nptl,libidn,../ports | 197 | + > --enable-add-ons=nptl,libidn,../ports |
185 | + | 198 | + |
186 | +The option '--prefix=/usr' may look strange, but you should never | 199 | +The option '--prefix=/usr' may look strange, but you should never |
187 | +configure EGLIBC with a prefix other than '/usr': in various places, | 200 | +configure GLIBC with a prefix other than '/usr': in various places, |
188 | +EGLIBC's build system checks whether the prefix is '/usr', and does | 201 | +GLIBC's build system checks whether the prefix is '/usr', and does |
189 | +special handling only if that is the case. Unless you use this | 202 | +special handling only if that is the case. Unless you use this |
190 | +prefix, you will get a sysroot that does not use the standard Linux | 203 | +prefix, you will get a sysroot that does not use the standard Linux |
191 | +directory layouts and cannot be used as a basis for the root | 204 | +directory layouts and cannot be used as a basis for the root |
192 | +filesystem on your target system compatibly with normal GLIBC | 205 | +filesystem on your target system compatibly with normal GLIBC |
193 | +installations. | 206 | +installations. |
194 | + | 207 | + |
195 | +The '--with-headers' option tells EGLIBC where the Linux headers have | 208 | +The '--with-headers' option tells GLIBC where the Linux headers have |
196 | +been installed. | 209 | +been installed. |
197 | + | 210 | + |
198 | +The '--enable-add-ons=nptl,libidn,../ports' option tells EGLIBC to look | 211 | +The '--enable-add-ons=nptl,libidn,../ports' option tells GLIBC to look |
199 | +for the listed glibc add-ons. Most notably the ports add-on (located | 212 | +for the listed glibc add-ons. Most notably the ports add-on (located |
200 | +just above the libc sources in the EGLIBC svn tree) is required to | 213 | +just above the libc sources in the GLIBC svn tree) is required to |
201 | +support ARM targets. | 214 | +support ARM targets. |
202 | + | 215 | + |
203 | +We can now use the 'install-headers' makefile target to install the | 216 | +We can now use the 'install-headers' makefile target to install the |
@@ -230,8 +243,8 @@ Index: git/EGLIBC.cross-building | |||
230 | + | 243 | + |
231 | +The Second GCC | 244 | +The Second GCC |
232 | + | 245 | + |
233 | +With the EGLIBC headers and selected object files installed, we can | 246 | +With the GLIBC headers and selected object files installed, we can |
234 | +now build a GCC that is capable of compiling EGLIBC. We configure, | 247 | +now build a GCC that is capable of compiling GLIBC. We configure, |
235 | +build, and install the second GCC, again building only the C compiler, | 248 | +build, and install the second GCC, again building only the C compiler, |
236 | +and avoiding libraries we won't use: | 249 | +and avoiding libraries we won't use: |
237 | + | 250 | + |
@@ -248,19 +261,19 @@ Index: git/EGLIBC.cross-building | |||
248 | + $ PATH=$tools/bin:$PATH make install | 261 | + $ PATH=$tools/bin:$PATH make install |
249 | + | 262 | + |
250 | + | 263 | + |
251 | +EGLIBC, Complete | 264 | +GLIBC, Complete |
252 | + | 265 | + |
253 | +With the second compiler built and installed, we're now ready for the | 266 | +With the second compiler built and installed, we're now ready for the |
254 | +full EGLIBC build: | 267 | +full GLIBC build: |
255 | + | 268 | + |
256 | + $ mkdir -p $obj/eglibc | 269 | + $ mkdir -p $obj/glibc |
257 | + $ cd $obj/eglibc | 270 | + $ cd $obj/glibc |
258 | + $ BUILD_CC=gcc \ | 271 | + $ BUILD_CC=gcc \ |
259 | + > CC=$tools/bin/$target-gcc \ | 272 | + > CC=$tools/bin/$target-gcc \ |
260 | + > CXX=$tools/bin/$target-g++ \ | 273 | + > CXX=$tools/bin/$target-g++ \ |
261 | + > AR=$tools/bin/$target-ar \ | 274 | + > AR=$tools/bin/$target-ar \ |
262 | + > RANLIB=$tools/bin/$target-ranlib \ | 275 | + > RANLIB=$tools/bin/$target-ranlib \ |
263 | + > $src/eglibc/libc/configure \ | 276 | + > $src/glibc/libc/configure \ |
264 | + > --prefix=/usr \ | 277 | + > --prefix=/usr \ |
265 | + > --with-headers=$sysroot/usr/include \ | 278 | + > --with-headers=$sysroot/usr/include \ |
266 | + > --with-kconfig=$obj/linux/scripts/kconfig \ | 279 | + > --with-kconfig=$obj/linux/scripts/kconfig \ |
@@ -269,9 +282,9 @@ Index: git/EGLIBC.cross-building | |||
269 | + > --disable-profile --without-gd --without-cvs \ | 282 | + > --disable-profile --without-gd --without-cvs \ |
270 | + > --enable-add-ons=nptl,libidn,../ports | 283 | + > --enable-add-ons=nptl,libidn,../ports |
271 | + | 284 | + |
272 | +Note the additional '--with-kconfig' option. This tells EGLIBC where to | 285 | +Note the additional '--with-kconfig' option. This tells GLIBC where to |
273 | +find the host config tools used by the kernel 'make config' and 'make | 286 | +find the host config tools used by the kernel 'make config' and 'make |
274 | +menuconfig'. These tools can be re-used by EGLIBC for its own 'make | 287 | +menuconfig'. These tools can be re-used by GLIBC for its own 'make |
275 | +*config' support, which will create 'option-groups.config' for you. | 288 | +*config' support, which will create 'option-groups.config' for you. |
276 | +But first make sure those tools have been built by running some | 289 | +But first make sure those tools have been built by running some |
277 | +dummy 'make *config' calls in the kernel directory: | 290 | +dummy 'make *config' calls in the kernel directory: |
@@ -282,15 +295,15 @@ Index: git/EGLIBC.cross-building | |||
282 | + $ PATH=$tools/bin:$PATH make menuconfig \ | 295 | + $ PATH=$tools/bin:$PATH make menuconfig \ |
283 | + > ARCH=$linux_arch CROSS_COMPILE=$target- \ | 296 | + > ARCH=$linux_arch CROSS_COMPILE=$target- \ |
284 | + | 297 | + |
285 | +Now we can configure and build the full EGLIBC: | 298 | +Now we can configure and build the full GLIBC: |
286 | + | 299 | + |
287 | + $ cd $obj/eglibc | 300 | + $ cd $obj/glibc |
288 | + $ PATH=$tools/bin:$PATH make defconfig | 301 | + $ PATH=$tools/bin:$PATH make defconfig |
289 | + $ PATH=$tools/bin:$PATH make menuconfig | 302 | + $ PATH=$tools/bin:$PATH make menuconfig |
290 | + $ PATH=$tools/bin:$PATH make | 303 | + $ PATH=$tools/bin:$PATH make |
291 | + $ PATH=$tools/bin:$PATH make install install_root=$sysroot | 304 | + $ PATH=$tools/bin:$PATH make install install_root=$sysroot |
292 | + | 305 | + |
293 | +At this point, we have a complete EGLIBC installation in '$sysroot', | 306 | +At this point, we have a complete GLIBC installation in '$sysroot', |
294 | +with header files, library files, and most of the C runtime startup | 307 | +with header files, library files, and most of the C runtime startup |
295 | +files in place. | 308 | +files in place. |
296 | + | 309 | + |
@@ -314,7 +327,7 @@ Index: git/EGLIBC.cross-building | |||
314 | + | 327 | + |
315 | +The '--enable-__cxa_atexit' option tells GCC what sort of C++ | 328 | +The '--enable-__cxa_atexit' option tells GCC what sort of C++ |
316 | +destructor support to expect from the C library; it's required with | 329 | +destructor support to expect from the C library; it's required with |
317 | +EGLIBC. | 330 | +GLIBC. |
318 | + | 331 | + |
319 | +And since GCC's installation process isn't designed to help construct | 332 | +And since GCC's installation process isn't designed to help construct |
320 | +sysroot trees, we must manually copy certain libraries into place in | 333 | +sysroot trees, we must manually copy certain libraries into place in |
@@ -327,7 +340,7 @@ Index: git/EGLIBC.cross-building | |||
327 | +Trying Things Out | 340 | +Trying Things Out |
328 | + | 341 | + |
329 | +At this point, '$tools' contains a cross toolchain ready to use | 342 | +At this point, '$tools' contains a cross toolchain ready to use |
330 | +the EGLIBC installation in '$sysroot': | 343 | +the GLIBC installation in '$sysroot': |
331 | + | 344 | + |
332 | + $ cat > hello.c <<EOF | 345 | + $ cat > hello.c <<EOF |
333 | + > #include <stdio.h> | 346 | + > #include <stdio.h> |
@@ -371,7 +384,7 @@ Index: git/EGLIBC.cross-building | |||
371 | + | 384 | + |
372 | +Looking at the dynamic section of the installed 'libgcc_s.so', we see | 385 | +Looking at the dynamic section of the installed 'libgcc_s.so', we see |
373 | +that the 'NEEDED' entry for the C library does include the '.6' | 386 | +that the 'NEEDED' entry for the C library does include the '.6' |
374 | +suffix, indicating that was linked against our fully build EGLIBC, and | 387 | +suffix, indicating that was linked against our fully build GLIBC, and |
375 | +not our dummy 'libc.so': | 388 | +not our dummy 'libc.so': |
376 | + | 389 | + |
377 | + $ $tools/bin/$target-readelf -d $sysroot/lib/libgcc_s.so.1 | 390 | + $ $tools/bin/$target-readelf -d $sysroot/lib/libgcc_s.so.1 |
@@ -390,14 +403,15 @@ Index: git/EGLIBC.cross-building | |||
390 | + $ $sysroot/lib/ld.so.1 --library-path $sysroot/lib:$sysroot/usr/lib \ | 403 | + $ $sysroot/lib/ld.so.1 --library-path $sysroot/lib:$sysroot/usr/lib \ |
391 | + > ./c++-hello | 404 | + > ./c++-hello |
392 | + Hello, C++ world! | 405 | + Hello, C++ world! |
393 | Index: git/EGLIBC.cross-testing | 406 | diff --git a/GLIBC.cross-testing b/GLIBC.cross-testing |
394 | =================================================================== | 407 | new file mode 100644 |
395 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | 408 | index 0000000..b67b468 |
396 | +++ git/EGLIBC.cross-testing 2014-08-27 07:24:41.532070587 +0000 | 409 | --- /dev/null |
410 | +++ b/GLIBC.cross-testing | ||
397 | @@ -0,0 +1,205 @@ | 411 | @@ -0,0 +1,205 @@ |
398 | + -*- mode: text -*- | 412 | + -*- mode: text -*- |
399 | + | 413 | + |
400 | + Cross-Testing With EGLIBC | 414 | + Cross-Testing With GLIBC |
401 | + Jim Blandy <jimb@codesourcery.com> | 415 | + Jim Blandy <jimb@codesourcery.com> |
402 | + | 416 | + |
403 | + | 417 | + |
@@ -408,7 +422,7 @@ Index: git/EGLIBC.cross-testing | |||
408 | +tests on the embedded system, or perhaps on a simulator. When | 422 | +tests on the embedded system, or perhaps on a simulator. When |
409 | +configured for cross-compilation, the stock GNU C library simply | 423 | +configured for cross-compilation, the stock GNU C library simply |
410 | +disables running tests altogether: the command 'make tests' builds | 424 | +disables running tests altogether: the command 'make tests' builds |
411 | +test programs, but does not run them. EGLIBC, however, provides | 425 | +test programs, but does not run them. GLIBC, however, provides |
412 | +facilities for compiling tests and generating data files on the build | 426 | +facilities for compiling tests and generating data files on the build |
413 | +system, but running the test programs themselves on a remote system or | 427 | +system, but running the test programs themselves on a remote system or |
414 | +simulator. | 428 | +simulator. |
@@ -416,12 +430,12 @@ Index: git/EGLIBC.cross-testing | |||
416 | + | 430 | + |
417 | +Test environment requirements | 431 | +Test environment requirements |
418 | + | 432 | + |
419 | +The test environment must meet certain conditions for EGLIBC's | 433 | +The test environment must meet certain conditions for GLIBC's |
420 | +cross-testing facilities to work: | 434 | +cross-testing facilities to work: |
421 | + | 435 | + |
422 | +- Shared filesystems. The 'build' system, on which you configure and | 436 | +- Shared filesystems. The 'build' system, on which you configure and |
423 | + compile EGLIBC, and the 'host' system, on which you intend to run | 437 | + compile GLIBC, and the 'host' system, on which you intend to run |
424 | + EGLIBC, must share a filesystem containing the EGLIBC build and | 438 | + GLIBC, must share a filesystem containing the GLIBC build and |
425 | + source trees. Files must appear at the same paths on both systems. | 439 | + source trees. Files must appear at the same paths on both systems. |
426 | + | 440 | + |
427 | +- Remote-shell like invocation. There must be a way to run a program | 441 | +- Remote-shell like invocation. There must be a way to run a program |
@@ -432,7 +446,7 @@ Index: git/EGLIBC.cross-testing | |||
432 | + | 446 | + |
433 | +Usage | 447 | +Usage |
434 | + | 448 | + |
435 | +To use EGLIBC's cross-testing support, provide values for the | 449 | +To use GLIBC's cross-testing support, provide values for the |
436 | +following Make variables when you invoke 'make': | 450 | +following Make variables when you invoke 'make': |
437 | + | 451 | + |
438 | +- cross-test-wrapper | 452 | +- cross-test-wrapper |
@@ -443,7 +457,7 @@ Index: git/EGLIBC.cross-testing | |||
443 | +- cross-localedef | 457 | +- cross-localedef |
444 | + | 458 | + |
445 | + This should be the name of a cross-capable localedef program, like | 459 | + This should be the name of a cross-capable localedef program, like |
446 | + that included in the EGLIBC 'localedef' module, along with any | 460 | + that included in the GLIBC 'localedef' module, along with any |
447 | + arguments needed. | 461 | + arguments needed. |
448 | + | 462 | + |
449 | +These are each explained in detail below. | 463 | +These are each explained in detail below. |
@@ -475,11 +489,11 @@ Index: git/EGLIBC.cross-testing | |||
475 | +program, having loaded shared libraries from the appropriate | 489 | +program, having loaded shared libraries from the appropriate |
476 | +directories. | 490 | +directories. |
477 | + | 491 | + |
478 | +To support cross-testing, EGLIBC allows the developer to optionally | 492 | +To support cross-testing, GLIBC allows the developer to optionally |
479 | +set the 'cross-test-wrapper' Make variable to another wrapper command, | 493 | +set the 'cross-test-wrapper' Make variable to another wrapper command, |
480 | +to which it passes the entire dynamic linker invocation shown above as | 494 | +to which it passes the entire dynamic linker invocation shown above as |
481 | +arguments. For example, if the developer supplies a wrapper of | 495 | +arguments. For example, if the developer supplies a wrapper of |
482 | +'my-wrapper hostname', then EGLIBC would run the test above as | 496 | +'my-wrapper hostname', then GLIBC would run the test above as |
483 | +follows: | 497 | +follows: |
484 | + | 498 | + |
485 | + $ my-wrapper hostname \ | 499 | + $ my-wrapper hostname \ |
@@ -501,7 +515,7 @@ Index: git/EGLIBC.cross-testing | |||
501 | + current directory it inherits is also inherited by the dynamic | 515 | + current directory it inherits is also inherited by the dynamic |
502 | + linker (and thus the test program itself). | 516 | + linker (and thus the test program itself). |
503 | + | 517 | + |
504 | +- It must preserve environment variables' values. Many EGLIBC tests | 518 | +- It must preserve environment variables' values. Many GLIBC tests |
505 | + set environment variables for test runs; in native testing, it | 519 | + set environment variables for test runs; in native testing, it |
506 | + invokes programs like this: | 520 | + invokes programs like this: |
507 | + | 521 | + |
@@ -529,7 +543,7 @@ Index: git/EGLIBC.cross-testing | |||
529 | +- It must pass the command's arguments, unmodified. The arguments | 543 | +- It must pass the command's arguments, unmodified. The arguments |
530 | + seen by the test program should be exactly those seen by the wrapper | 544 | + seen by the test program should be exactly those seen by the wrapper |
531 | + (after whatever arguments are given to the wrapper itself). The | 545 | + (after whatever arguments are given to the wrapper itself). The |
532 | + EGLIBC test framework performs all needed shell word splitting and | 546 | + GLIBC test framework performs all needed shell word splitting and |
533 | + expansion (wildcard expansion, parameter substitution, and so on) | 547 | + expansion (wildcard expansion, parameter substitution, and so on) |
534 | + before invoking the wrapper; further expansion may break the tests. | 548 | + before invoking the wrapper; further expansion may break the tests. |
535 | + | 549 | + |
@@ -537,7 +551,7 @@ Index: git/EGLIBC.cross-testing | |||
537 | +The 'cross-test-ssh.sh' script | 551 | +The 'cross-test-ssh.sh' script |
538 | + | 552 | + |
539 | +If you want to use 'ssh' (or something sufficiently similar) to run | 553 | +If you want to use 'ssh' (or something sufficiently similar) to run |
540 | +test programs on your host system, EGLIBC includes a shell script, | 554 | +test programs on your host system, GLIBC includes a shell script, |
541 | +'scripts/cross-test-ssh.sh', which you can use as your wrapper | 555 | +'scripts/cross-test-ssh.sh', which you can use as your wrapper |
542 | +command. This script takes care of setting the test command's current | 556 | +command. This script takes care of setting the test command's current |
543 | +directory, propagating environment variable values, and carrying | 557 | +directory, propagating environment variable values, and carrying |
@@ -549,28 +563,28 @@ Index: git/EGLIBC.cross-testing | |||
549 | + | 563 | + |
550 | +The Cross-Compiling Locale Definition Command | 564 | +The Cross-Compiling Locale Definition Command |
551 | + | 565 | + |
552 | +Some EGLIBC tests rely on locales generated especially for the test | 566 | +Some GLIBC tests rely on locales generated especially for the test |
553 | +process. In a native configuration, these tests simply run the | 567 | +process. In a native configuration, these tests simply run the |
554 | +'localedef' command built by the normal EGLIBC build process, | 568 | +'localedef' command built by the normal GLIBC build process, |
555 | +'locale/localedef', to process and install their locales. However, in | 569 | +'locale/localedef', to process and install their locales. However, in |
556 | +a cross-compiling configuration, this 'localedef' is built for the | 570 | +a cross-compiling configuration, this 'localedef' is built for the |
557 | +host system, not the build system, and since it requires quite a bit | 571 | +host system, not the build system, and since it requires quite a bit |
558 | +of memory to run (we have seen it fail on systems with 64MiB of | 572 | +of memory to run (we have seen it fail on systems with 64MiB of |
559 | +memory), it may not be practical to run it on the host system. | 573 | +memory), it may not be practical to run it on the host system. |
560 | + | 574 | + |
561 | +If set, EGLIBC uses the 'cross-localedef' Make variable as the command | 575 | +If set, GLIBC uses the 'cross-localedef' Make variable as the command |
562 | +to run on the build system to process and install locales. The | 576 | +to run on the build system to process and install locales. The |
563 | +localedef program built from the EGLIBC 'localedef' module is | 577 | +localedef program built from the GLIBC 'localedef' module is |
564 | +suitable. | 578 | +suitable. |
565 | + | 579 | + |
566 | +The value of 'cross-localedef' may also include command-line arguments | 580 | +The value of 'cross-localedef' may also include command-line arguments |
567 | +to be passed to the program; if you are using EGLIBC's 'localedef', | 581 | +to be passed to the program; if you are using GLIBC's 'localedef', |
568 | +you may include endianness and 'uint32_t' alignment arguments here. | 582 | +you may include endianness and 'uint32_t' alignment arguments here. |
569 | + | 583 | + |
570 | + | 584 | + |
571 | +Example | 585 | +Example |
572 | + | 586 | + |
573 | +In developing EGLIBC's cross-testing facility, we invoked 'make' with | 587 | +In developing GLIBC's cross-testing facility, we invoked 'make' with |
574 | +the following script: | 588 | +the following script: |
575 | + | 589 | + |
576 | + #!/bin/sh | 590 | + #!/bin/sh |
@@ -592,11 +606,14 @@ Index: git/EGLIBC.cross-testing | |||
592 | +Other Cross-Testing Concerns | 606 | +Other Cross-Testing Concerns |
593 | + | 607 | + |
594 | +Here are notes on some other issues which you may encounter in running | 608 | +Here are notes on some other issues which you may encounter in running |
595 | +the EGLIBC tests in a cross-compiling environment: | 609 | +the GLIBC tests in a cross-compiling environment: |
596 | + | 610 | + |
597 | +- Some tests require a C++ cross-compiler; you should set the 'CXX' | 611 | +- Some tests require a C++ cross-compiler; you should set the 'CXX' |
598 | + Make variable to the name of an appropriate cross-compiler. | 612 | + Make variable to the name of an appropriate cross-compiler. |
599 | + | 613 | + |
600 | +- Some tests require access to libstdc++.so.6 and libgcc_s.so.1; we | 614 | +- Some tests require access to libstdc++.so.6 and libgcc_s.so.1; we |
601 | + simply place copies of these libraries in the top EGLIBC build | 615 | + simply place copies of these libraries in the top GLIBC build |
602 | + directory. | 616 | + directory. |
617 | -- | ||
618 | 2.1.4 | ||
619 | |||
diff --git a/meta/recipes-core/glibc/glibc/option-groups.patch b/meta/recipes-core/glibc/glibc/0019-eglibc-Bring-Eglibc-option-group-infrastructure-to-g.patch index 198be73524..dcb80f9c80 100644 --- a/meta/recipes-core/glibc/glibc/option-groups.patch +++ b/meta/recipes-core/glibc/glibc/0019-eglibc-Bring-Eglibc-option-group-infrastructure-to-g.patch | |||
@@ -1,11 +1,259 @@ | |||
1 | Eglibc option group infrastructure | 1 | From aa7c5fe86d04584a9aed4dc40ba856c65a1ef9c4 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 18 Mar 2015 00:45:18 +0000 | ||
4 | Subject: [PATCH 19/27] eglibc: Bring Eglibc option group infrastructure to | ||
5 | glibc | ||
2 | 6 | ||
3 | Upstream-Status: Pending | 7 | Upstream-Status: Pending |
4 | 8 | ||
5 | Index: git/option-groups.def | 9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
6 | =================================================================== | 10 | --- |
7 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | 11 | EGLIBC.option-groups | 122 ++++++ |
8 | +++ git/option-groups.def 2014-08-27 07:26:51.652070587 +0000 | 12 | Makefile | 1 + |
13 | config.make.in | 2 + | ||
14 | configure | 13 + | ||
15 | configure.ac | 10 + | ||
16 | option-groups.def | 868 ++++++++++++++++++++++++++++++++++++++ | ||
17 | option-groups.defaults | 47 +++ | ||
18 | option-groups.mak | 41 ++ | ||
19 | options-config/Makefile | 55 +++ | ||
20 | options-config/config-postproc.pl | 58 +++ | ||
21 | options-config/config-preproc.pl | 8 + | ||
22 | scripts/option-groups.awk | 63 +++ | ||
23 | 12 files changed, 1288 insertions(+) | ||
24 | create mode 100644 EGLIBC.option-groups | ||
25 | create mode 100644 option-groups.def | ||
26 | create mode 100644 option-groups.defaults | ||
27 | create mode 100644 option-groups.mak | ||
28 | create mode 100644 options-config/Makefile | ||
29 | create mode 100644 options-config/config-postproc.pl | ||
30 | create mode 100644 options-config/config-preproc.pl | ||
31 | create mode 100644 scripts/option-groups.awk | ||
32 | |||
33 | diff --git a/EGLIBC.option-groups b/EGLIBC.option-groups | ||
34 | new file mode 100644 | ||
35 | index 0000000..6a50b8d | ||
36 | --- /dev/null | ||
37 | +++ b/EGLIBC.option-groups | ||
38 | @@ -0,0 +1,122 @@ | ||
39 | + -*- mode: text -*- | ||
40 | + | ||
41 | + The EGLIBC Component Configuration System | ||
42 | + Jim Blandy <jimb@codesourcery.com> | ||
43 | + | ||
44 | +Introduction | ||
45 | + | ||
46 | +The GNU C library (GLIBC) provides a broad range of functionality, | ||
47 | +ranging from internationalization support to transcendental | ||
48 | +mathematical functions. Its website boasts that "nearly all known and | ||
49 | +useful functions from any other C library are available." This | ||
50 | +exhaustive approach has been one of GLIBC's strengths on desktop and | ||
51 | +server systems, but it has also given GLIBC a large footprint, both in | ||
52 | +memory and on disk, making it a challenge to use in embedded systems | ||
53 | +with limited resources. | ||
54 | + | ||
55 | +The Embedded GNU C library (EGLIBC) is a variant of the GNU C library | ||
56 | +designed to work well on embedded systems. In particular, EGLIBC's | ||
57 | +component configuration system allows embedded developers to build | ||
58 | +customized versions of the library that include only the features | ||
59 | +their application uses, reducing its space requirements. | ||
60 | + | ||
61 | +EGLIBC's component configuration system categorizes the library's | ||
62 | +functions into "option groups", and allows you to include or exclude | ||
63 | +option groups individually. Some option groups depend on others; | ||
64 | +EGLIBC tracks these relationships, and ensures that the selected | ||
65 | +configuration yields a functioning library. | ||
66 | + | ||
67 | + | ||
68 | +Consistent and Predictable Behavior | ||
69 | + | ||
70 | +A flexible configuration system is a mixed blessing: if the options | ||
71 | +offered are poorly designed, it can be hard to see which choices will | ||
72 | +have the desired effects, and choices with obscure consequences can | ||
73 | +make debugging difficult. EGLIBC's configuration follows some general | ||
74 | +principles to reduce these risks: | ||
75 | + | ||
76 | +- EGLIBC has a single default configuration for each target | ||
77 | + architecture. | ||
78 | + | ||
79 | +- In the default configuration, all option groups are enabled, and | ||
80 | + EGLIBC is upwardly API- and ABI-compatible with GLIBC. | ||
81 | + | ||
82 | +- As much as possible, configurations only affect what functions are | ||
83 | + present, not how they behave. If the system works with an option | ||
84 | + group disabled, it will still work with it enabled. | ||
85 | + | ||
86 | +- As much as possible, configurations only select option groups --- | ||
87 | + they do not describe characteristics of the target architecture. | ||
88 | + | ||
89 | +These rules mean that you have a simple debugging strategy available | ||
90 | +if you suspect that your EGLIBC configuration might be the source of a | ||
91 | +problem: fall back to the default configuration, re-test, and then | ||
92 | +disable option groups one by one, until the problem reappears. | ||
93 | + | ||
94 | + | ||
95 | +The Option Groups | ||
96 | + | ||
97 | +To see the current full list of implemented option groups, refer to the | ||
98 | +file 'option-groups.def' at the top of the source tree, or run | ||
99 | +'make menuconfig' from the top-level build directory. | ||
100 | + | ||
101 | +The POSIX.1-2001 specification includes a suggested partition of all | ||
102 | +the functions in the POSIX C API into option groups: math functions | ||
103 | +like 'sin' and 'cos'; networking functions like 'socket' and | ||
104 | +'connect'; and so on. EGLIBC could use this partitioning as the basis | ||
105 | +for future option groups. | ||
106 | + | ||
107 | + | ||
108 | +Implementation | ||
109 | + | ||
110 | +The EGLIBC component configuration system resembles the approach used | ||
111 | +by the Linux kernel to select device drivers, network protocols, and | ||
112 | +other features. A file named 'option-groups.config' in the top-level | ||
113 | +build directory contains assignments to Make variables, each of which | ||
114 | +enables or disables a particular option group. If the variable's | ||
115 | +value is set to 'y', then the option group is enabled; if it set to | ||
116 | +anything else, the option group is omitted. The file | ||
117 | +'option-groups.defaults', at the top of the source tree, establishes | ||
118 | +default values for all variables; all option groups are enabled by | ||
119 | +default. | ||
120 | + | ||
121 | +For example, the following 'option-groups.config' would omit locale | ||
122 | +data, but include mathematical functions, and everything else: | ||
123 | + | ||
124 | + OPTION_EGLIBC_LOCALES = n | ||
125 | + OPTION_EGLIBC_LIBM = y | ||
126 | + | ||
127 | +Like the Linux kernel, EGLIBC supports a similar set of '*config' make | ||
128 | +targets to make it easier to create 'option-groups.config', with all | ||
129 | +dependencies between option groups automatically satisfied. Run | ||
130 | +'make help' to see the list of supported make config targets. For | ||
131 | +example, 'make menuconfig' will update the current config utilising a | ||
132 | +menu based program. | ||
133 | + | ||
134 | +The option group names and their type (boolean, int, hex, string), help | ||
135 | +description, and dependencies with other option groups, are described by | ||
136 | +'option-groups.def' at the top of the source tree, analogous to the | ||
137 | +'Kconfig' files in the Linux kernel. | ||
138 | + | ||
139 | +In general, each option group variable controls whether a given set of | ||
140 | +object files in EGLIBC is compiled and included in the final | ||
141 | +libraries, or omitted from the build. | ||
142 | + | ||
143 | +Each subdirectory's Makefile categorizes its routines, libraries, and | ||
144 | +executables by option group. For example, EGLIBC's 'math/Makefile' | ||
145 | +places the 'libm' library in the OPTION_EGLIBC_LIBM group as follows: | ||
146 | + | ||
147 | + extra-libs-$(OPTION_EGLIBC_LIBM) := libm | ||
148 | + | ||
149 | +Finally, common code in 'Makerules' cites the value of the variable | ||
150 | +'extra-libs-y', selecting only those libraries that belong to enabled | ||
151 | +option groups to be built. | ||
152 | + | ||
153 | + | ||
154 | +Current Status and Future Directions | ||
155 | + | ||
156 | +The EGLIBC component configuration system described here is still | ||
157 | +under development. | ||
158 | + | ||
159 | +We have used the system to subset some portions of EGLIBC's | ||
160 | +Index: libc/configure.ac | ||
161 | diff --git a/Makefile b/Makefile | ||
162 | index 658ccfa..f906391 100644 | ||
163 | --- a/Makefile | ||
164 | +++ b/Makefile | ||
165 | @@ -24,6 +24,7 @@ endif | ||
166 | |||
167 | include Makeconfig | ||
168 | |||
169 | +include options-config/Makefile | ||
170 | |||
171 | # This is the default target; it makes everything except the tests. | ||
172 | .PHONY: all | ||
173 | diff --git a/config.make.in b/config.make.in | ||
174 | index a9f5696..294f8d1 100644 | ||
175 | --- a/config.make.in | ||
176 | +++ b/config.make.in | ||
177 | @@ -47,6 +47,8 @@ c++-sysincludes = @CXX_SYSINCLUDES@ | ||
178 | all-warnings = @all_warnings@ | ||
179 | enable-werror = @enable_werror@ | ||
180 | |||
181 | +kconfig_tools = @KCONFIG_TOOLS@ | ||
182 | + | ||
183 | have-z-combreloc = @libc_cv_z_combreloc@ | ||
184 | have-z-execstack = @libc_cv_z_execstack@ | ||
185 | have-Bgroup = @libc_cv_Bgroup@ | ||
186 | diff --git a/configure b/configure | ||
187 | index 7d7299a..4116404 100755 | ||
188 | --- a/configure | ||
189 | +++ b/configure | ||
190 | @@ -641,6 +641,7 @@ INSTALL_INFO | ||
191 | PERL | ||
192 | BASH_SHELL | ||
193 | libc_cv_gcc_static_libgcc | ||
194 | +KCONFIG_TOOLS | ||
195 | CXX_SYSINCLUDES | ||
196 | SYSINCLUDES | ||
197 | AUTOCONF | ||
198 | @@ -755,6 +756,7 @@ with_fp | ||
199 | with_binutils | ||
200 | with_selinux | ||
201 | with_headers | ||
202 | +with_kconfig | ||
203 | with_default_link | ||
204 | enable_sanity_checks | ||
205 | enable_shared | ||
206 | @@ -1459,6 +1461,9 @@ Optional Packages: | ||
207 | --with-selinux if building with SELinux support | ||
208 | --with-headers=PATH location of system headers to use (for example | ||
209 | /usr/src/linux/include) [default=compiler default] | ||
210 | + --with-kconfig=PATH location of kconfig tools to use (from Linux kernel | ||
211 | + builds) to re-use for configuring EGLIBC option | ||
212 | + groups | ||
213 | --with-default-link do not use explicit linker scripts | ||
214 | --with-cpu=CPU select code for CPU variant | ||
215 | |||
216 | @@ -3517,6 +3522,14 @@ fi | ||
217 | |||
218 | |||
219 | |||
220 | +# Check whether --with-kconfig was given. | ||
221 | +if test "${with_kconfig+set}" = set; then | ||
222 | + withval=$with_kconfig; KCONFIG_TOOLS=$withval | ||
223 | +else | ||
224 | + KCONFIG_TOOLS='' | ||
225 | +fi | ||
226 | + | ||
227 | + | ||
228 | |||
229 | # Check whether --with-default-link was given. | ||
230 | if test "${with_default_link+set}" = set; then : | ||
231 | diff --git a/configure.ac b/configure.ac | ||
232 | index a467a69..fc0ed4d 100644 | ||
233 | --- a/configure.ac | ||
234 | +++ b/configure.ac | ||
235 | @@ -136,6 +136,16 @@ AC_ARG_WITH([headers], | ||
236 | [sysheaders='']) | ||
237 | AC_SUBST(sysheaders) | ||
238 | |||
239 | +AC_ARG_WITH([kconfig], | ||
240 | + AC_HELP_STRING([--with-kconfig=PATH], | ||
241 | + [location of kconfig tools to use (from Linux | ||
242 | + kernel builds) to re-use for configuring EGLIBC | ||
243 | + option groups]), | ||
244 | + [KCONFIG_TOOLS=$withval], | ||
245 | + [KCONFIG_TOOLS='']) | ||
246 | +AC_SUBST(KCONFIG_TOOLS) | ||
247 | + | ||
248 | + | ||
249 | AC_SUBST(use_default_link) | ||
250 | AC_ARG_WITH([default-link], | ||
251 | AC_HELP_STRING([--with-default-link], | ||
252 | diff --git a/option-groups.def b/option-groups.def | ||
253 | new file mode 100644 | ||
254 | index 0000000..6aebd94 | ||
255 | --- /dev/null | ||
256 | +++ b/option-groups.def | ||
9 | @@ -0,0 +1,868 @@ | 257 | @@ -0,0 +1,868 @@ |
10 | +# This file documents the option groups EGLIBC currently supports, in | 258 | +# This file documents the option groups EGLIBC currently supports, in |
11 | +# a format akin to the Linux Kconfig system's. The syntax may change | 259 | +# a format akin to the Linux Kconfig system's. The syntax may change |
@@ -875,56 +1123,11 @@ Index: git/option-groups.def | |||
875 | +# Local Variables: | 1123 | +# Local Variables: |
876 | +# page-delimiter: "^config\\s-" | 1124 | +# page-delimiter: "^config\\s-" |
877 | +# End: | 1125 | +# End: |
878 | Index: git/option-groups.mak | 1126 | diff --git a/option-groups.defaults b/option-groups.defaults |
879 | =================================================================== | 1127 | new file mode 100644 |
880 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | 1128 | index 0000000..8141201 |
881 | +++ git/option-groups.mak 2014-08-27 07:26:51.652070587 +0000 | 1129 | --- /dev/null |
882 | @@ -0,0 +1,41 @@ | 1130 | +++ b/option-groups.defaults |
883 | +# Setup file for subdirectory Makefiles that define EGLIBC option groups. | ||
884 | + | ||
885 | +# EGLIBC shouldn't need to override this. However, the | ||
886 | +# cross-build-friendly localedef includes this makefile to get option | ||
887 | +# group variable definitions; it uses a single build tree for all the | ||
888 | +# multilibs, and needs to be able to specify a different option group | ||
889 | +# configuration file for each multilib. | ||
890 | +option_group_config_file ?= $(objdir)/option-groups.config | ||
891 | + | ||
892 | +# Read the default settings for all options. | ||
893 | +# We're included before ../Rules, so we can't assume $(..) is set. | ||
894 | +include $(firstword $(..) ../)option-groups.defaults | ||
895 | + | ||
896 | +# Read the developer's option group selections, overriding the | ||
897 | +# defaults from option-groups.defaults. | ||
898 | +-include $(option_group_config_file) | ||
899 | + | ||
900 | +# $(call option-disabled, VAR) is 'y' if VAR is not 'y', or 'n' otherwise. | ||
901 | +# VAR should be a variable name, not a variable reference; this is | ||
902 | +# less general, but more terse for the intended use. | ||
903 | +# You can use it to add a file to a list if an option group is | ||
904 | +# disabled, like this: | ||
905 | +# routines-$(call option-disabled, OPTION_POSIX_C_LANG_WIDE_CHAR) += ... | ||
906 | +define option-disabled | ||
907 | +$(firstword $(subst y,n,$(filter y,$($(strip $(1))))) y) | ||
908 | +endef | ||
909 | + | ||
910 | +# Establish 'routines-y', etc. as simply-expanded variables. | ||
911 | +aux-y := | ||
912 | +extra-libs-others-y := | ||
913 | +extra-libs-y := | ||
914 | +extra-objs-y := | ||
915 | +install-bin-y := | ||
916 | +install-others-y := | ||
917 | +install-sbin-y := | ||
918 | +others-y := | ||
919 | +others-pie-y := | ||
920 | +routines-y := | ||
921 | +test-srcs-y := | ||
922 | +tests-y := | ||
923 | +xtests-y := | ||
924 | Index: git/option-groups.defaults | ||
925 | =================================================================== | ||
926 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
927 | +++ git/option-groups.defaults 2014-08-27 07:24:41.652070587 +0000 | ||
928 | @@ -0,0 +1,47 @@ | 1131 | @@ -0,0 +1,47 @@ |
929 | +# This file sets default values for all option group variables | 1132 | +# This file sets default values for all option group variables |
930 | +# mentioned in option-groups.def; see that file for a description of | 1133 | +# mentioned in option-groups.def; see that file for a description of |
@@ -973,228 +1176,58 @@ Index: git/option-groups.defaults | |||
973 | +OPTION_POSIX_REGEXP = y | 1176 | +OPTION_POSIX_REGEXP = y |
974 | +OPTION_POSIX_REGEXP_GLIBC = y | 1177 | +OPTION_POSIX_REGEXP_GLIBC = y |
975 | +OPTION_POSIX_WIDE_CHAR_DEVICE_IO = y | 1178 | +OPTION_POSIX_WIDE_CHAR_DEVICE_IO = y |
976 | Index: git/Makefile | 1179 | diff --git a/option-groups.mak b/option-groups.mak |
977 | =================================================================== | 1180 | new file mode 100644 |
978 | --- git.orig/Makefile 2014-08-27 07:24:37.540070587 +0000 | 1181 | index 0000000..f83e0c1 |
979 | +++ git/Makefile 2014-08-27 07:24:41.656070587 +0000 | 1182 | --- /dev/null |
980 | @@ -24,6 +24,7 @@ | 1183 | +++ b/option-groups.mak |
981 | 1184 | @@ -0,0 +1,41 @@ | |
982 | include Makeconfig | 1185 | +# Setup file for subdirectory Makefiles that define EGLIBC option groups. |
983 | |||
984 | +include options-config/Makefile | ||
985 | |||
986 | # This is the default target; it makes everything except the tests. | ||
987 | .PHONY: all | ||
988 | Index: git/EGLIBC.option-groups | ||
989 | =================================================================== | ||
990 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
991 | +++ git/EGLIBC.option-groups 2014-08-27 07:24:41.656070587 +0000 | ||
992 | @@ -0,0 +1,122 @@ | ||
993 | + -*- mode: text -*- | ||
994 | + | ||
995 | + The EGLIBC Component Configuration System | ||
996 | + Jim Blandy <jimb@codesourcery.com> | ||
997 | + | ||
998 | +Introduction | ||
999 | + | ||
1000 | +The GNU C library (GLIBC) provides a broad range of functionality, | ||
1001 | +ranging from internationalization support to transcendental | ||
1002 | +mathematical functions. Its website boasts that "nearly all known and | ||
1003 | +useful functions from any other C library are available." This | ||
1004 | +exhaustive approach has been one of GLIBC's strengths on desktop and | ||
1005 | +server systems, but it has also given GLIBC a large footprint, both in | ||
1006 | +memory and on disk, making it a challenge to use in embedded systems | ||
1007 | +with limited resources. | ||
1008 | + | ||
1009 | +The Embedded GNU C library (EGLIBC) is a variant of the GNU C library | ||
1010 | +designed to work well on embedded systems. In particular, EGLIBC's | ||
1011 | +component configuration system allows embedded developers to build | ||
1012 | +customized versions of the library that include only the features | ||
1013 | +their application uses, reducing its space requirements. | ||
1014 | + | ||
1015 | +EGLIBC's component configuration system categorizes the library's | ||
1016 | +functions into "option groups", and allows you to include or exclude | ||
1017 | +option groups individually. Some option groups depend on others; | ||
1018 | +EGLIBC tracks these relationships, and ensures that the selected | ||
1019 | +configuration yields a functioning library. | ||
1020 | + | ||
1021 | + | ||
1022 | +Consistent and Predictable Behavior | ||
1023 | + | ||
1024 | +A flexible configuration system is a mixed blessing: if the options | ||
1025 | +offered are poorly designed, it can be hard to see which choices will | ||
1026 | +have the desired effects, and choices with obscure consequences can | ||
1027 | +make debugging difficult. EGLIBC's configuration follows some general | ||
1028 | +principles to reduce these risks: | ||
1029 | + | ||
1030 | +- EGLIBC has a single default configuration for each target | ||
1031 | + architecture. | ||
1032 | + | ||
1033 | +- In the default configuration, all option groups are enabled, and | ||
1034 | + EGLIBC is upwardly API- and ABI-compatible with GLIBC. | ||
1035 | + | ||
1036 | +- As much as possible, configurations only affect what functions are | ||
1037 | + present, not how they behave. If the system works with an option | ||
1038 | + group disabled, it will still work with it enabled. | ||
1039 | + | ||
1040 | +- As much as possible, configurations only select option groups --- | ||
1041 | + they do not describe characteristics of the target architecture. | ||
1042 | + | ||
1043 | +These rules mean that you have a simple debugging strategy available | ||
1044 | +if you suspect that your EGLIBC configuration might be the source of a | ||
1045 | +problem: fall back to the default configuration, re-test, and then | ||
1046 | +disable option groups one by one, until the problem reappears. | ||
1047 | + | ||
1048 | + | ||
1049 | +The Option Groups | ||
1050 | + | ||
1051 | +To see the current full list of implemented option groups, refer to the | ||
1052 | +file 'option-groups.def' at the top of the source tree, or run | ||
1053 | +'make menuconfig' from the top-level build directory. | ||
1054 | + | ||
1055 | +The POSIX.1-2001 specification includes a suggested partition of all | ||
1056 | +the functions in the POSIX C API into option groups: math functions | ||
1057 | +like 'sin' and 'cos'; networking functions like 'socket' and | ||
1058 | +'connect'; and so on. EGLIBC could use this partitioning as the basis | ||
1059 | +for future option groups. | ||
1060 | + | ||
1061 | + | ||
1062 | +Implementation | ||
1063 | + | ||
1064 | +The EGLIBC component configuration system resembles the approach used | ||
1065 | +by the Linux kernel to select device drivers, network protocols, and | ||
1066 | +other features. A file named 'option-groups.config' in the top-level | ||
1067 | +build directory contains assignments to Make variables, each of which | ||
1068 | +enables or disables a particular option group. If the variable's | ||
1069 | +value is set to 'y', then the option group is enabled; if it set to | ||
1070 | +anything else, the option group is omitted. The file | ||
1071 | +'option-groups.defaults', at the top of the source tree, establishes | ||
1072 | +default values for all variables; all option groups are enabled by | ||
1073 | +default. | ||
1074 | + | ||
1075 | +For example, the following 'option-groups.config' would omit locale | ||
1076 | +data, but include mathematical functions, and everything else: | ||
1077 | + | ||
1078 | + OPTION_EGLIBC_LOCALES = n | ||
1079 | + OPTION_EGLIBC_LIBM = y | ||
1080 | + | ||
1081 | +Like the Linux kernel, EGLIBC supports a similar set of '*config' make | ||
1082 | +targets to make it easier to create 'option-groups.config', with all | ||
1083 | +dependencies between option groups automatically satisfied. Run | ||
1084 | +'make help' to see the list of supported make config targets. For | ||
1085 | +example, 'make menuconfig' will update the current config utilising a | ||
1086 | +menu based program. | ||
1087 | + | ||
1088 | +The option group names and their type (boolean, int, hex, string), help | ||
1089 | +description, and dependencies with other option groups, are described by | ||
1090 | +'option-groups.def' at the top of the source tree, analogous to the | ||
1091 | +'Kconfig' files in the Linux kernel. | ||
1092 | + | ||
1093 | +In general, each option group variable controls whether a given set of | ||
1094 | +object files in EGLIBC is compiled and included in the final | ||
1095 | +libraries, or omitted from the build. | ||
1096 | + | ||
1097 | +Each subdirectory's Makefile categorizes its routines, libraries, and | ||
1098 | +executables by option group. For example, EGLIBC's 'math/Makefile' | ||
1099 | +places the 'libm' library in the OPTION_EGLIBC_LIBM group as follows: | ||
1100 | + | ||
1101 | + extra-libs-$(OPTION_EGLIBC_LIBM) := libm | ||
1102 | + | ||
1103 | +Finally, common code in 'Makerules' cites the value of the variable | ||
1104 | +'extra-libs-y', selecting only those libraries that belong to enabled | ||
1105 | +option groups to be built. | ||
1106 | + | ||
1107 | + | ||
1108 | +Current Status and Future Directions | ||
1109 | + | ||
1110 | +The EGLIBC component configuration system described here is still | ||
1111 | +under development. | ||
1112 | + | ||
1113 | +We have used the system to subset some portions of EGLIBC's | ||
1114 | +Index: libc/configure.ac | ||
1115 | Index: git/configure.ac | ||
1116 | =================================================================== | ||
1117 | --- git.orig/configure.ac 2014-08-27 07:24:41.196070587 +0000 | ||
1118 | +++ git/configure.ac 2014-08-27 07:24:41.656070587 +0000 | ||
1119 | @@ -127,6 +127,16 @@ | ||
1120 | [sysheaders='']) | ||
1121 | AC_SUBST(sysheaders) | ||
1122 | |||
1123 | +AC_ARG_WITH([kconfig], | ||
1124 | + AC_HELP_STRING([--with-kconfig=PATH], | ||
1125 | + [location of kconfig tools to use (from Linux | ||
1126 | + kernel builds) to re-use for configuring EGLIBC | ||
1127 | + option groups]), | ||
1128 | + [KCONFIG_TOOLS=$withval], | ||
1129 | + [KCONFIG_TOOLS='']) | ||
1130 | +AC_SUBST(KCONFIG_TOOLS) | ||
1131 | + | 1186 | + |
1187 | +# EGLIBC shouldn't need to override this. However, the | ||
1188 | +# cross-build-friendly localedef includes this makefile to get option | ||
1189 | +# group variable definitions; it uses a single build tree for all the | ||
1190 | +# multilibs, and needs to be able to specify a different option group | ||
1191 | +# configuration file for each multilib. | ||
1192 | +option_group_config_file ?= $(objdir)/option-groups.config | ||
1132 | + | 1193 | + |
1133 | AC_SUBST(use_default_link) | 1194 | +# Read the default settings for all options. |
1134 | AC_ARG_WITH([default-link], | 1195 | +# We're included before ../Rules, so we can't assume $(..) is set. |
1135 | AC_HELP_STRING([--with-default-link], | 1196 | +include $(firstword $(..) ../)option-groups.defaults |
1136 | Index: git/config.make.in | ||
1137 | =================================================================== | ||
1138 | --- git.orig/config.make.in 2014-08-27 07:24:37.560070587 +0000 | ||
1139 | +++ git/config.make.in 2014-08-27 07:24:41.656070587 +0000 | ||
1140 | @@ -46,6 +46,8 @@ | ||
1141 | c++-sysincludes = @CXX_SYSINCLUDES@ | ||
1142 | all-warnings = @all_warnings@ | ||
1143 | |||
1144 | +kconfig_tools = @KCONFIG_TOOLS@ | ||
1145 | + | 1197 | + |
1146 | have-z-combreloc = @libc_cv_z_combreloc@ | 1198 | +# Read the developer's option group selections, overriding the |
1147 | have-z-execstack = @libc_cv_z_execstack@ | 1199 | +# defaults from option-groups.defaults. |
1148 | have-Bgroup = @libc_cv_Bgroup@ | 1200 | +-include $(option_group_config_file) |
1149 | Index: git/configure | ||
1150 | =================================================================== | ||
1151 | --- git.orig/configure 2014-08-27 07:24:41.192070587 +0000 | ||
1152 | +++ git/configure 2014-08-27 07:24:41.660070587 +0000 | ||
1153 | @@ -619,6 +619,7 @@ | ||
1154 | PERL | ||
1155 | BASH_SHELL | ||
1156 | libc_cv_gcc_static_libgcc | ||
1157 | +KCONFIG_TOOLS | ||
1158 | CXX_SYSINCLUDES | ||
1159 | SYSINCLUDES | ||
1160 | AUTOCONF | ||
1161 | @@ -733,6 +734,7 @@ | ||
1162 | with_binutils | ||
1163 | with_selinux | ||
1164 | with_headers | ||
1165 | +with_kconfig | ||
1166 | with_default_link | ||
1167 | enable_sanity_checks | ||
1168 | enable_shared | ||
1169 | @@ -1437,6 +1439,9 @@ | ||
1170 | --with-selinux if building with SELinux support | ||
1171 | --with-headers=PATH location of system headers to use (for example | ||
1172 | /usr/src/linux/include) [default=compiler default] | ||
1173 | + --with-kconfig=PATH location of kconfig tools to use (from Linux kernel | ||
1174 | + builds) to re-use for configuring EGLIBC option | ||
1175 | + groups | ||
1176 | --with-default-link do not use explicit linker scripts | ||
1177 | --with-cpu=CPU select code for CPU variant | ||
1178 | |||
1179 | @@ -3400,6 +3405,14 @@ | ||
1180 | |||
1181 | |||
1182 | |||
1183 | +# Check whether --with-kconfig was given. | ||
1184 | +if test "${with_kconfig+set}" = set; then | ||
1185 | + withval=$with_kconfig; KCONFIG_TOOLS=$withval | ||
1186 | +else | ||
1187 | + KCONFIG_TOOLS='' | ||
1188 | +fi | ||
1189 | + | 1201 | + |
1202 | +# $(call option-disabled, VAR) is 'y' if VAR is not 'y', or 'n' otherwise. | ||
1203 | +# VAR should be a variable name, not a variable reference; this is | ||
1204 | +# less general, but more terse for the intended use. | ||
1205 | +# You can use it to add a file to a list if an option group is | ||
1206 | +# disabled, like this: | ||
1207 | +# routines-$(call option-disabled, OPTION_POSIX_C_LANG_WIDE_CHAR) += ... | ||
1208 | +define option-disabled | ||
1209 | +$(firstword $(subst y,n,$(filter y,$($(strip $(1))))) y) | ||
1210 | +endef | ||
1190 | + | 1211 | + |
1191 | 1212 | +# Establish 'routines-y', etc. as simply-expanded variables. | |
1192 | # Check whether --with-default-link was given. | 1213 | +aux-y := |
1193 | if test "${with_default_link+set}" = set; then : | 1214 | +extra-libs-others-y := |
1194 | Index: git/options-config/Makefile | 1215 | +extra-libs-y := |
1195 | =================================================================== | 1216 | +extra-objs-y := |
1196 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | 1217 | +install-bin-y := |
1197 | +++ git/options-config/Makefile 2014-08-27 07:24:41.652070587 +0000 | 1218 | +install-others-y := |
1219 | +install-sbin-y := | ||
1220 | +others-y := | ||
1221 | +others-pie-y := | ||
1222 | +routines-y := | ||
1223 | +test-srcs-y := | ||
1224 | +tests-y := | ||
1225 | +xtests-y := | ||
1226 | diff --git a/options-config/Makefile b/options-config/Makefile | ||
1227 | new file mode 100644 | ||
1228 | index 0000000..db00708 | ||
1229 | --- /dev/null | ||
1230 | +++ b/options-config/Makefile | ||
1198 | @@ -0,0 +1,55 @@ | 1231 | @@ -0,0 +1,55 @@ |
1199 | +# =========================================================================== | 1232 | +# =========================================================================== |
1200 | +# EGLIBC option-groups configuration targets | 1233 | +# EGLIBC option-groups configuration targets |
@@ -1251,10 +1284,11 @@ Index: git/options-config/Makefile | |||
1251 | + | 1284 | + |
1252 | +endif | 1285 | +endif |
1253 | +endif | 1286 | +endif |
1254 | Index: git/options-config/config-postproc.pl | 1287 | diff --git a/options-config/config-postproc.pl b/options-config/config-postproc.pl |
1255 | =================================================================== | 1288 | new file mode 100644 |
1256 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | 1289 | index 0000000..4dd1c63 |
1257 | +++ git/options-config/config-postproc.pl 2014-08-27 07:24:41.652070587 +0000 | 1290 | --- /dev/null |
1291 | +++ b/options-config/config-postproc.pl | ||
1258 | @@ -0,0 +1,58 @@ | 1292 | @@ -0,0 +1,58 @@ |
1259 | +#!/usr/bin/perl | 1293 | +#!/usr/bin/perl |
1260 | + | 1294 | + |
@@ -1314,10 +1348,11 @@ Index: git/options-config/config-postproc.pl | |||
1314 | + print "OPTION_$opt\n"; | 1348 | + print "OPTION_$opt\n"; |
1315 | + } | 1349 | + } |
1316 | +} | 1350 | +} |
1317 | Index: git/options-config/config-preproc.pl | 1351 | diff --git a/options-config/config-preproc.pl b/options-config/config-preproc.pl |
1318 | =================================================================== | 1352 | new file mode 100644 |
1319 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | 1353 | index 0000000..b83bb85 |
1320 | +++ git/options-config/config-preproc.pl 2014-08-27 07:24:41.652070587 +0000 | 1354 | --- /dev/null |
1355 | +++ b/options-config/config-preproc.pl | ||
1321 | @@ -0,0 +1,8 @@ | 1356 | @@ -0,0 +1,8 @@ |
1322 | +#!/usr/bin/perl | 1357 | +#!/usr/bin/perl |
1323 | + | 1358 | + |
@@ -1327,10 +1362,11 @@ Index: git/options-config/config-preproc.pl | |||
1327 | + print; | 1362 | + print; |
1328 | + } | 1363 | + } |
1329 | +} | 1364 | +} |
1330 | Index: git/scripts/option-groups.awk | 1365 | diff --git a/scripts/option-groups.awk b/scripts/option-groups.awk |
1331 | =================================================================== | 1366 | new file mode 100644 |
1332 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | 1367 | index 0000000..533af0c |
1333 | +++ git/scripts/option-groups.awk 2014-08-27 07:26:51.652070587 +0000 | 1368 | --- /dev/null |
1369 | +++ b/scripts/option-groups.awk | ||
1334 | @@ -0,0 +1,63 @@ | 1370 | @@ -0,0 +1,63 @@ |
1335 | +# option-groups.awk --- generate option group header file | 1371 | +# option-groups.awk --- generate option group header file |
1336 | +# Given input files containing makefile-style assignments to variables, | 1372 | +# Given input files containing makefile-style assignments to variables, |
@@ -1395,3 +1431,6 @@ Index: git/scripts/option-groups.awk | |||
1395 | + print "" | 1431 | + print "" |
1396 | + print "#endif /* __GNU_OPTION_GROUPS_H */" | 1432 | + print "#endif /* __GNU_OPTION_GROUPS_H */" |
1397 | +} | 1433 | +} |
1434 | -- | ||
1435 | 2.1.4 | ||
1436 | |||
diff --git a/meta/recipes-core/glibc/glibc/eglibc-header-bootstrap.patch b/meta/recipes-core/glibc/glibc/0020-eglibc-Help-bootstrap-cross-toolchain.patch index e1aa13926a..df93094543 100644 --- a/meta/recipes-core/glibc/glibc/eglibc-header-bootstrap.patch +++ b/meta/recipes-core/glibc/glibc/0020-eglibc-Help-bootstrap-cross-toolchain.patch | |||
@@ -1,27 +1,38 @@ | |||
1 | From 8fe0d29488b376011cdaaa462d557ffc0b31fb63 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 18 Mar 2015 00:49:28 +0000 | ||
4 | Subject: [PATCH 20/27] eglibc: Help bootstrap cross toolchain | ||
5 | |||
1 | Taken from EGLIBC, r1484 + r1525 | 6 | Taken from EGLIBC, r1484 + r1525 |
2 | 7 | ||
3 | 2007-02-20 Jim Blandy <jimb@codesourcery.com> | 8 | 2007-02-20 Jim Blandy <jimb@codesourcery.com> |
4 | 9 | ||
5 | * Makefile (install-headers): Preserve old behavior: depend on | 10 | * Makefile (install-headers): Preserve old behavior: depend on |
6 | $(inst_includedir)/gnu/stubs.h only if install-bootstrap-headers | 11 | $(inst_includedir)/gnu/stubs.h only if install-bootstrap-headers |
7 | is set; otherwise, place gnu/stubs.h on the 'install-others' list. | 12 | is set; otherwise, place gnu/stubs.h on the 'install-others' list. |
8 | 13 | ||
9 | 2007-02-16 Jim Blandy <jimb@codesourcery.com> | 14 | 2007-02-16 Jim Blandy <jimb@codesourcery.com> |
10 | 15 | ||
11 | * Makefile: Amend make install-headers to install everything | 16 | * Makefile: Amend make install-headers to install everything |
12 | necessary for building a cross-compiler. Install gnu/stubs.h as | 17 | necessary for building a cross-compiler. Install gnu/stubs.h as |
13 | part of 'install-headers', not 'install-others'. | 18 | part of 'install-headers', not 'install-others'. |
14 | If install-bootstrap-headers is 'yes', install a dummy copy of | 19 | If install-bootstrap-headers is 'yes', install a dummy copy of |
15 | gnu/stubs.h, instead of computing the real thing. | 20 | gnu/stubs.h, instead of computing the real thing. |
16 | * include/stubs-bootstrap.h: New file. | 21 | * include/stubs-bootstrap.h: New file. |
17 | 22 | ||
18 | Upstream-Status: Pending | 23 | Upstream-Status: Pending |
24 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
25 | --- | ||
26 | Makefile | 22 +++++++++++++++++++++- | ||
27 | include/stubs-bootstrap.h | 12 ++++++++++++ | ||
28 | 2 files changed, 33 insertions(+), 1 deletion(-) | ||
29 | create mode 100644 include/stubs-bootstrap.h | ||
19 | 30 | ||
20 | Index: git/Makefile | 31 | diff --git a/Makefile b/Makefile |
21 | =================================================================== | 32 | index f906391..e4e149e 100644 |
22 | --- git.orig/Makefile 2014-08-27 18:35:18.908070587 +0000 | 33 | --- a/Makefile |
23 | +++ git/Makefile 2014-08-27 18:35:19.340070587 +0000 | 34 | +++ b/Makefile |
24 | @@ -69,9 +69,18 @@ | 35 | @@ -69,9 +69,18 @@ subdir-dirs = include |
25 | vpath %.h $(subdir-dirs) | 36 | vpath %.h $(subdir-dirs) |
26 | 37 | ||
27 | # What to install. | 38 | # What to install. |
@@ -41,7 +52,7 @@ Index: git/Makefile | |||
41 | ifeq (yes,$(build-shared)) | 52 | ifeq (yes,$(build-shared)) |
42 | headers += gnu/lib-names.h | 53 | headers += gnu/lib-names.h |
43 | endif | 54 | endif |
44 | @@ -151,6 +160,16 @@ | 55 | @@ -151,6 +160,16 @@ others: $(common-objpfx)testrun.sh |
45 | 56 | ||
46 | subdir-stubs := $(foreach dir,$(subdirs),$(common-objpfx)$(dir)/stubs) | 57 | subdir-stubs := $(foreach dir,$(subdirs),$(common-objpfx)$(dir)/stubs) |
47 | 58 | ||
@@ -58,7 +69,7 @@ Index: git/Makefile | |||
58 | ifndef abi-variants | 69 | ifndef abi-variants |
59 | installed-stubs = $(inst_includedir)/gnu/stubs.h | 70 | installed-stubs = $(inst_includedir)/gnu/stubs.h |
60 | else | 71 | else |
61 | @@ -177,6 +196,7 @@ | 72 | @@ -177,6 +196,7 @@ $(inst_includedir)/gnu/stubs.h: $(+force) |
62 | 73 | ||
63 | install-others-nosubdir: $(installed-stubs) | 74 | install-others-nosubdir: $(installed-stubs) |
64 | endif | 75 | endif |
@@ -66,10 +77,11 @@ Index: git/Makefile | |||
66 | 77 | ||
67 | 78 | ||
68 | # Since stubs.h is never needed when building the library, we simplify the | 79 | # Since stubs.h is never needed when building the library, we simplify the |
69 | Index: git/include/stubs-bootstrap.h | 80 | diff --git a/include/stubs-bootstrap.h b/include/stubs-bootstrap.h |
70 | =================================================================== | 81 | new file mode 100644 |
71 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | 82 | index 0000000..1d2b669 |
72 | +++ git/include/stubs-bootstrap.h 2014-08-27 18:35:19.340070587 +0000 | 83 | --- /dev/null |
84 | +++ b/include/stubs-bootstrap.h | ||
73 | @@ -0,0 +1,12 @@ | 85 | @@ -0,0 +1,12 @@ |
74 | +/* Placeholder stubs.h file for bootstrapping. | 86 | +/* Placeholder stubs.h file for bootstrapping. |
75 | + | 87 | + |
@@ -83,3 +95,6 @@ Index: git/include/stubs-bootstrap.h | |||
83 | + difficult headers. The <gnu/stubs.h> header depends, via the | 95 | + difficult headers. The <gnu/stubs.h> header depends, via the |
84 | + EGLIBC subdir 'stubs' make targets, on every .o file in EGLIBC, but | 96 | + EGLIBC subdir 'stubs' make targets, on every .o file in EGLIBC, but |
85 | + an empty stubs.h like this will do fine for GCC. */ | 97 | + an empty stubs.h like this will do fine for GCC. */ |
98 | -- | ||
99 | 2.1.4 | ||
100 | |||
diff --git a/meta/recipes-core/glibc/glibc/eglibc-resolv-dynamic.patch b/meta/recipes-core/glibc/glibc/0021-eglibc-cherry-picked-from-http-www.eglibc.org-archiv.patch index a73bcebe34..38bb8a15e3 100644 --- a/meta/recipes-core/glibc/glibc/eglibc-resolv-dynamic.patch +++ b/meta/recipes-core/glibc/glibc/0021-eglibc-cherry-picked-from-http-www.eglibc.org-archiv.patch | |||
@@ -1,15 +1,22 @@ | |||
1 | cherry-picked from http://www.eglibc.org/archives/patches/msg00772.html | 1 | From fe2ae4f877928dd6bff5bac3f15bce4b50d2bd12 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 18 Mar 2015 00:51:16 +0000 | ||
4 | Subject: [PATCH 21/27] eglibc: cherry-picked from | ||
5 | http://www.eglibc.org/archives/patches/msg00772.html | ||
2 | 6 | ||
3 | It hasnt yet been merged into glibc | 7 | It hasn't yet been merged into glibc |
4 | |||
5 | Signed-off-by: Khem Raj | ||
6 | 8 | ||
7 | Upstream-Status: Pending | 9 | Upstream-Status: Pending |
8 | 10 | ||
9 | Index: git/resolv/res_libc.c | 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
10 | =================================================================== | 12 | --- |
11 | --- git.orig/resolv/res_libc.c 2014-08-27 18:35:15.492070587 +0000 | 13 | resolv/res_libc.c | 15 +++++++++++++-- |
12 | +++ git/resolv/res_libc.c 2014-08-27 18:35:19.204070587 +0000 | 14 | 1 file changed, 13 insertions(+), 2 deletions(-) |
15 | |||
16 | diff --git a/resolv/res_libc.c b/resolv/res_libc.c | ||
17 | index ee3fa21..29e2340 100644 | ||
18 | --- a/resolv/res_libc.c | ||
19 | +++ b/resolv/res_libc.c | ||
13 | @@ -22,12 +22,13 @@ | 20 | @@ -22,12 +22,13 @@ |
14 | #include <arpa/nameser.h> | 21 | #include <arpa/nameser.h> |
15 | #include <resolv.h> | 22 | #include <resolv.h> |
@@ -25,7 +32,7 @@ Index: git/resolv/res_libc.c | |||
25 | extern unsigned long long int __res_initstamp attribute_hidden; | 32 | extern unsigned long long int __res_initstamp attribute_hidden; |
26 | /* We have atomic increment operations on 64-bit platforms. */ | 33 | /* We have atomic increment operations on 64-bit platforms. */ |
27 | #if __WORDSIZE == 64 | 34 | #if __WORDSIZE == 64 |
28 | @@ -35,7 +36,6 @@ | 35 | @@ -35,7 +36,6 @@ extern unsigned long long int __res_initstamp attribute_hidden; |
29 | # define atomicincunlock(lock) (void) 0 | 36 | # define atomicincunlock(lock) (void) 0 |
30 | # define atomicinc(var) catomic_increment (&(var)) | 37 | # define atomicinc(var) catomic_increment (&(var)) |
31 | #else | 38 | #else |
@@ -33,7 +40,7 @@ Index: git/resolv/res_libc.c | |||
33 | # define atomicinclock(lock) __libc_lock_lock (lock) | 40 | # define atomicinclock(lock) __libc_lock_lock (lock) |
34 | # define atomicincunlock(lock) __libc_lock_unlock (lock) | 41 | # define atomicincunlock(lock) __libc_lock_unlock (lock) |
35 | # define atomicinc(var) ++var | 42 | # define atomicinc(var) ++var |
36 | @@ -94,7 +94,18 @@ | 43 | @@ -94,7 +94,18 @@ res_init(void) { |
37 | int | 44 | int |
38 | __res_maybe_init (res_state resp, int preinit) | 45 | __res_maybe_init (res_state resp, int preinit) |
39 | { | 46 | { |
@@ -52,3 +59,6 @@ Index: git/resolv/res_libc.c | |||
52 | if (__res_initstamp != resp->_u._ext.initstamp) { | 59 | if (__res_initstamp != resp->_u._ext.initstamp) { |
53 | if (resp->nscount > 0) | 60 | if (resp->nscount > 0) |
54 | __res_iclose (resp, true); | 61 | __res_iclose (resp, true); |
62 | -- | ||
63 | 2.1.4 | ||
64 | |||
diff --git a/meta/recipes-core/glibc/glibc/eglibc-ppc8xx-cache-line-workaround.patch b/meta/recipes-core/glibc/glibc/0022-eglibc-Clear-cache-lines-on-ppc8xx.patch index bb83d6d36e..8a4c9c3e89 100644 --- a/meta/recipes-core/glibc/glibc/eglibc-ppc8xx-cache-line-workaround.patch +++ b/meta/recipes-core/glibc/glibc/0022-eglibc-Clear-cache-lines-on-ppc8xx.patch | |||
@@ -1,3 +1,8 @@ | |||
1 | From be7273225698074347a71de58006977bb304d7f7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 18 Mar 2015 00:53:47 +0000 | ||
4 | Subject: [PATCH 22/27] eglibc: Clear cache lines on ppc8xx | ||
5 | |||
1 | 2007-06-13 Nathan Sidwell <nathan@codesourcery.com> | 6 | 2007-06-13 Nathan Sidwell <nathan@codesourcery.com> |
2 | Mark Shinwell <shinwell@codesourcery.com> | 7 | Mark Shinwell <shinwell@codesourcery.com> |
3 | 8 | ||
@@ -8,12 +13,17 @@ | |||
8 | (DL_PLATFORM_AUXV): Likewise. | 13 | (DL_PLATFORM_AUXV): Likewise. |
9 | 14 | ||
10 | Upstream-Status: Pending | 15 | Upstream-Status: Pending |
16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
17 | --- | ||
18 | sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c | 14 +++++++++++++- | ||
19 | sysdeps/unix/sysv/linux/powerpc/libc-start.c | 15 ++++++++++++++- | ||
20 | 2 files changed, 27 insertions(+), 2 deletions(-) | ||
11 | 21 | ||
12 | Index: git/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c | 22 | diff --git a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c |
13 | =================================================================== | 23 | index c2504ff..d50f1cb 100644 |
14 | --- git.orig/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c 2014-08-27 18:49:23.996070587 +0000 | 24 | --- a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c |
15 | +++ git/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c 2014-08-27 18:49:27.332070587 +0000 | 25 | +++ b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c |
16 | @@ -24,9 +24,21 @@ | 26 | @@ -24,9 +24,21 @@ int __cache_line_size attribute_hidden; |
17 | /* Scan the Aux Vector for the "Data Cache Block Size" entry. If found | 27 | /* Scan the Aux Vector for the "Data Cache Block Size" entry. If found |
18 | verify that the static extern __cache_line_size is defined by checking | 28 | verify that the static extern __cache_line_size is defined by checking |
19 | for not NULL. If it is defined then assign the cache block size | 29 | 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 | |||
36 | __cache_line_size = av->a_un.a_val; \ | 46 | __cache_line_size = av->a_un.a_val; \ |
37 | break; | 47 | break; |
38 | 48 | ||
39 | Index: git/sysdeps/unix/sysv/linux/powerpc/libc-start.c | 49 | diff --git a/sysdeps/unix/sysv/linux/powerpc/libc-start.c b/sysdeps/unix/sysv/linux/powerpc/libc-start.c |
40 | =================================================================== | 50 | index a9364c7..a3ed1d4 100644 |
41 | --- git.orig/sysdeps/unix/sysv/linux/powerpc/libc-start.c 2014-08-27 18:49:23.996070587 +0000 | 51 | --- a/sysdeps/unix/sysv/linux/powerpc/libc-start.c |
42 | +++ git/sysdeps/unix/sysv/linux/powerpc/libc-start.c 2014-08-27 18:49:27.332070587 +0000 | 52 | +++ b/sysdeps/unix/sysv/linux/powerpc/libc-start.c |
43 | @@ -68,11 +68,24 @@ | 53 | @@ -68,11 +68,24 @@ __libc_start_main (int argc, char **argv, |
44 | rtld_fini = NULL; | 54 | rtld_fini = NULL; |
45 | } | 55 | } |
46 | 56 | ||
@@ -66,3 +76,6 @@ Index: git/sysdeps/unix/sysv/linux/powerpc/libc-start.c | |||
66 | __cache_line_size = av->a_un.a_val; | 76 | __cache_line_size = av->a_un.a_val; |
67 | break; | 77 | break; |
68 | } | 78 | } |
79 | -- | ||
80 | 2.1.4 | ||
81 | |||
diff --git a/meta/recipes-core/glibc/glibc/eglibc-sh4-fpscr_values.patch b/meta/recipes-core/glibc/glibc/0023-eglibc-Resolve-__fpscr_values-on-SH4.patch index bfb813eb7c..9f3d753d70 100644 --- a/meta/recipes-core/glibc/glibc/eglibc-sh4-fpscr_values.patch +++ b/meta/recipes-core/glibc/glibc/0023-eglibc-Resolve-__fpscr_values-on-SH4.patch | |||
@@ -1,3 +1,8 @@ | |||
1 | From 718e7e5db1c8b073adb9a79ec6f167238c2d8bda Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 18 Mar 2015 00:55:53 +0000 | ||
4 | Subject: [PATCH 23/27] eglibc: Resolve __fpscr_values on SH4 | ||
5 | |||
1 | 2010-09-29 Nobuhiro Iwamatsu <iwamatsu@nigauri.org> | 6 | 2010-09-29 Nobuhiro Iwamatsu <iwamatsu@nigauri.org> |
2 | Andrew Stubbs <ams@codesourcery.com> | 7 | Andrew Stubbs <ams@codesourcery.com> |
3 | 8 | ||
@@ -9,11 +14,29 @@ | |||
9 | 14 | ||
10 | Upstream-Status: Pending | 15 | Upstream-Status: Pending |
11 | 16 | ||
12 | Index: git/sysdeps/unix/sysv/linux/sh/sysdep.S | 17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
13 | =================================================================== | 18 | --- |
14 | --- git.orig/sysdeps/unix/sysv/linux/sh/sysdep.S 2014-08-27 18:49:24.036070587 +0000 | 19 | sysdeps/unix/sysv/linux/sh/Versions | 1 + |
15 | +++ git/sysdeps/unix/sysv/linux/sh/sysdep.S 2014-08-27 18:49:27.332070587 +0000 | 20 | sysdeps/unix/sysv/linux/sh/sysdep.S | 11 +++++++++++ |
16 | @@ -30,3 +30,14 @@ | 21 | 2 files changed, 12 insertions(+) |
22 | |||
23 | diff --git a/sysdeps/unix/sysv/linux/sh/Versions b/sysdeps/unix/sysv/linux/sh/Versions | ||
24 | index e0938c4..ca1d7da 100644 | ||
25 | --- a/sysdeps/unix/sysv/linux/sh/Versions | ||
26 | +++ b/sysdeps/unix/sysv/linux/sh/Versions | ||
27 | @@ -2,6 +2,7 @@ libc { | ||
28 | GLIBC_2.2 { | ||
29 | # functions used in other libraries | ||
30 | __xstat64; __fxstat64; __lxstat64; | ||
31 | + __fpscr_values; | ||
32 | |||
33 | # a* | ||
34 | alphasort64; | ||
35 | diff --git a/sysdeps/unix/sysv/linux/sh/sysdep.S b/sysdeps/unix/sysv/linux/sh/sysdep.S | ||
36 | index a02b7e2..b9be326 100644 | ||
37 | --- a/sysdeps/unix/sysv/linux/sh/sysdep.S | ||
38 | +++ b/sysdeps/unix/sysv/linux/sh/sysdep.S | ||
39 | @@ -30,3 +30,14 @@ ENTRY (__syscall_error) | ||
17 | 40 | ||
18 | #define __syscall_error __syscall_error_1 | 41 | #define __syscall_error __syscall_error_1 |
19 | #include <sysdeps/unix/sh/sysdep.S> | 42 | #include <sysdeps/unix/sh/sysdep.S> |
@@ -28,15 +51,6 @@ Index: git/sysdeps/unix/sysv/linux/sh/sysdep.S | |||
28 | + .long 0x80000 | 51 | + .long 0x80000 |
29 | +weak_alias (___fpscr_values, __fpscr_values) | 52 | +weak_alias (___fpscr_values, __fpscr_values) |
30 | + | 53 | + |
31 | Index: git/sysdeps/unix/sysv/linux/sh/Versions | 54 | -- |
32 | =================================================================== | 55 | 2.1.4 |
33 | --- git.orig/sysdeps/unix/sysv/linux/sh/Versions 2014-08-27 18:49:24.028070587 +0000 | 56 | |
34 | +++ git/sysdeps/unix/sysv/linux/sh/Versions 2014-08-27 18:49:27.332070587 +0000 | ||
35 | @@ -2,6 +2,7 @@ | ||
36 | GLIBC_2.2 { | ||
37 | # functions used in other libraries | ||
38 | __xstat64; __fxstat64; __lxstat64; | ||
39 | + __fpscr_values; | ||
40 | |||
41 | # a* | ||
42 | alphasort64; | ||
diff --git a/meta/recipes-core/glibc/glibc/eglibc-use-option-groups.patch b/meta/recipes-core/glibc/glibc/0024-eglibc-Forward-port-eglibc-options-groups-support.patch index da92203ca7..0514e282e6 100644 --- a/meta/recipes-core/glibc/glibc/eglibc-use-option-groups.patch +++ b/meta/recipes-core/glibc/glibc/0024-eglibc-Forward-port-eglibc-options-groups-support.patch | |||
@@ -1,11 +1,249 @@ | |||
1 | Forward port eglibc options groups support | 1 | From 2a5d7bcf0ff791c95ee1388772408a1bf4454694 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 18 Mar 2015 01:33:49 +0000 | ||
4 | Subject: [PATCH 24/27] eglibc: Forward port eglibc options groups support | ||
2 | 5 | ||
3 | Upstream-Status: Pending | 6 | Upstream-Status: Pending |
4 | 7 | ||
5 | Index: git/argp/argp-fmtstream.c | 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
6 | =================================================================== | 9 | --- |
7 | --- git.orig/argp/argp-fmtstream.c | 10 | Makeconfig | 20 +- |
8 | +++ git/argp/argp-fmtstream.c | 11 | Makerules | 19 + |
12 | argp/Makefile | 2 + | ||
13 | argp/argp-fmtstream.c | 25 +- | ||
14 | argp/argp-help.c | 13 +- | ||
15 | argp/argp-namefrob.h | 2 + | ||
16 | catgets/Makefile | 17 +- | ||
17 | crypt/Makefile | 20 +- | ||
18 | crypt/crypt-entry.c | 13 + | ||
19 | crypt/crypt_common.c | 42 + | ||
20 | crypt/crypt_util.c | 18 - | ||
21 | csu/Makefile | 2 + | ||
22 | debug/Makefile | 41 +- | ||
23 | debug/segfault.c | 11 +- | ||
24 | debug/tst-chk1.c | 7 + | ||
25 | dlfcn/Makefile | 7 +- | ||
26 | elf/dl-support.c | 3 + | ||
27 | elf/rtld.c | 17 +- | ||
28 | extra-lib.mk | 6 +- | ||
29 | grp/Makefile | 5 + | ||
30 | hesiod/Makefile | 6 +- | ||
31 | iconv/Makefile | 7 + | ||
32 | iconv/gconv_db.c | 3 + | ||
33 | iconv/gconv_trans.c | 7 + | ||
34 | iconv/iconv_prog.c | 8 + | ||
35 | iconvdata/Makefile | 27 +- | ||
36 | include/netdb.h | 4 + | ||
37 | inet/Makefile | 22 +- | ||
38 | intl/Makefile | 3 +- | ||
39 | intl/dcigettext.c | 39 +- | ||
40 | io/Makefile | 18 +- | ||
41 | libidn/Makefile | 5 +- | ||
42 | libidn/toutf8.c | 11 +- | ||
43 | libio/Makefile | 66 +- | ||
44 | libio/__fpurge.c | 2 +- | ||
45 | libio/fileops.c | 10 +- | ||
46 | libio/iofwide.c | 26 + | ||
47 | libio/ioseekoff.c | 2 +- | ||
48 | libio/ioseekpos.c | 2 +- | ||
49 | libio/iosetbuffer.c | 4 + | ||
50 | libio/libioP.h | 18 +- | ||
51 | libio/wdummyfileops.c | 161 + | ||
52 | locale/C-ctype.c | 20 + | ||
53 | locale/Makefile | 41 +- | ||
54 | locale/catnames.c | 48 + | ||
55 | locale/dummy-setlocale.c | 33 + | ||
56 | locale/localeinfo.h | 2 +- | ||
57 | locale/programs/charmap-dir.c | 6 + | ||
58 | locale/programs/ld-collate.c | 17 +- | ||
59 | locale/programs/ld-ctype.c | 27 +- | ||
60 | locale/programs/ld-messages.c | 5 + | ||
61 | locale/programs/ld-time.c | 31 +- | ||
62 | locale/programs/linereader.c | 2 +- | ||
63 | locale/programs/localedef.c | 8 + | ||
64 | locale/programs/locfile.c | 5 +- | ||
65 | locale/programs/locfile.h | 59 +- | ||
66 | locale/setlocale.c | 30 - | ||
67 | locale/xlocale.c | 37 + | ||
68 | localedata/Makefile | 35 +- | ||
69 | login/Makefile | 17 +- | ||
70 | malloc/Makefile | 10 +- | ||
71 | malloc/memusage.c | 7 +- | ||
72 | malloc/memusage.sh | 2 +- | ||
73 | math/Makefile | 6 +- | ||
74 | misc/Makefile | 25 +- | ||
75 | misc/err.c | 11 + | ||
76 | misc/error.c | 5 + | ||
77 | misc/tst-efgcvt.c | 2 +- | ||
78 | nis/Makefile | 31 +- | ||
79 | nptl/Makefile | 28 +- | ||
80 | nptl/pthread_create.c | 5 + | ||
81 | nscd/Makefile | 33 +- | ||
82 | nscd/nis_hash.c | 3 + | ||
83 | nss/Makefile | 67 +- | ||
84 | nss/fixed-nsswitch.conf | 22 + | ||
85 | nss/fixed-nsswitch.functions | 121 + | ||
86 | nss/gen-fixed-nsswitch.c | 803 +++ | ||
87 | nss/getent.c | 46 +- | ||
88 | nss/getnssent_r.c | 9 +- | ||
89 | nss/nsswitch.c | 109 +- | ||
90 | nss/nsswitch.h | 18 +- | ||
91 | posix/Makefile | 94 +- | ||
92 | posix/bug-regex1.c | 3 + | ||
93 | posix/bug-regex6.c | 8 +- | ||
94 | posix/fnmatch.c | 6 +- | ||
95 | posix/fnmatch_loop.c | 23 +- | ||
96 | posix/glob.c | 15 +- | ||
97 | posix/regcomp.c | 98 +- | ||
98 | posix/regex.h | 11 + | ||
99 | posix/regex_internal.c | 45 +- | ||
100 | posix/regex_internal.h | 23 +- | ||
101 | posix/regexec-compat.c | 39 + | ||
102 | posix/regexec.c | 71 +- | ||
103 | posix/xregex.c | 8215 +++++++++++++++++++++++++++++++ | ||
104 | pwd/Makefile | 2 + | ||
105 | resolv/Makefile | 21 +- | ||
106 | stdio-common/Makefile | 35 +- | ||
107 | stdio-common/_i18n_number.h | 13 + | ||
108 | stdio-common/fxprintf.c | 5 + | ||
109 | stdio-common/printf_fp.c | 22 + | ||
110 | stdio-common/printf_fphex.c | 13 + | ||
111 | stdio-common/printf_size.c | 8 + | ||
112 | stdio-common/scanf14.c | 3 + | ||
113 | stdio-common/tst-popen.c | 3 + | ||
114 | stdio-common/tst-sprintf.c | 4 +- | ||
115 | stdio-common/tstdiomisc.c | 5 + | ||
116 | stdio-common/vfprintf.c | 31 +- | ||
117 | stdio-common/vfscanf.c | 53 +- | ||
118 | stdlib/Makefile | 34 +- | ||
119 | stdlib/strtod_l.c | 13 + | ||
120 | stdlib/tst-strtod.c | 5 + | ||
121 | streams/Makefile | 5 +- | ||
122 | string/Makefile | 14 +- | ||
123 | string/strcoll_l.c | 5 + | ||
124 | string/strerror_l.c | 5 + | ||
125 | string/strxfrm_l.c | 5 + | ||
126 | string/test-strcmp.c | 28 - | ||
127 | string/tst-strxfrm.c | 3 + | ||
128 | string/tst-strxfrm2.c | 3 + | ||
129 | sunrpc/Makefile | 44 +- | ||
130 | sysdeps/arm/Makefile | 5 +- | ||
131 | sysdeps/generic/ldsodefs.h | 8 + | ||
132 | sysdeps/gnu/Makefile | 3 +- | ||
133 | sysdeps/ieee754/ldbl-opt/Makefile | 27 +- | ||
134 | sysdeps/ieee754/ldbl-opt/nldbl-compat.c | 40 +- | ||
135 | sysdeps/ieee754/ldbl-opt/nldbl-compat.h | 24 +- | ||
136 | sysdeps/nptl/Makefile | 3 + | ||
137 | sysdeps/nptl/bits/libc-lock.h | 45 + | ||
138 | sysdeps/nptl/bits/libc-lockP.h | 50 +- | ||
139 | sysdeps/nptl/small-macros-fns.c | 72 + | ||
140 | sysdeps/unix/sysv/linux/gethostid.c | 6 + | ||
141 | sysdeps/unix/sysv/linux/libc_fatal.c | 3 + | ||
142 | time/Makefile | 18 +- | ||
143 | time/strftime_l.c | 12 +- | ||
144 | time/strptime_l.c | 14 +- | ||
145 | timezone/Makefile | 2 +- | ||
146 | wcsmbs/Makefile | 27 +- | ||
147 | wcsmbs/wcsmbsload.c | 13 + | ||
148 | wctype/Makefile | 14 +- | ||
149 | 139 files changed, 11363 insertions(+), 583 deletions(-) | ||
150 | create mode 100644 crypt/crypt_common.c | ||
151 | create mode 100644 libio/wdummyfileops.c | ||
152 | create mode 100644 locale/catnames.c | ||
153 | create mode 100644 locale/dummy-setlocale.c | ||
154 | create mode 100644 nscd/nis_hash.c | ||
155 | create mode 100644 nss/fixed-nsswitch.conf | ||
156 | create mode 100644 nss/fixed-nsswitch.functions | ||
157 | create mode 100644 nss/gen-fixed-nsswitch.c | ||
158 | create mode 100644 posix/regexec-compat.c | ||
159 | create mode 100644 posix/xregex.c | ||
160 | create mode 100644 sysdeps/nptl/small-macros-fns.c | ||
161 | |||
162 | diff --git a/Makeconfig b/Makeconfig | ||
163 | index f136b88..52dae8f 100644 | ||
164 | --- a/Makeconfig | ||
165 | +++ b/Makeconfig | ||
166 | @@ -609,7 +609,7 @@ elf-objpfx = $(common-objpfx)elf/ | ||
167 | # and run on the build system, causes that program with those | ||
168 | # arguments to be run on the host for which the library is built. | ||
169 | ifndef test-wrapper | ||
170 | -test-wrapper = | ||
171 | +test-wrapper = $(cross-test-wrapper) | ||
172 | endif | ||
173 | # Likewise, but the name of the program is preceded by | ||
174 | # <variable>=<value> assignments for environment variables. | ||
175 | @@ -1089,6 +1089,24 @@ libm = $(common-objpfx)math/libm.a | ||
176 | libmvec = $(common-objpfx)mathvec/libmvec.a | ||
177 | endif | ||
178 | |||
179 | +# Generate a header file that #defines preprocessor symbols indicating | ||
180 | +# which option groups are enabled. Note that the option-groups.config file | ||
181 | +# may not exist at all. | ||
182 | +before-compile += $(common-objpfx)gnu/option-groups.h | ||
183 | +common-generated += gnu/option-groups.h gnu/option-groups.stmp | ||
184 | +headers += gnu/option-groups.h | ||
185 | +$(common-objpfx)gnu/option-groups.h: $(common-objpfx)gnu/option-groups.stmp; @: | ||
186 | +$(common-objpfx)gnu/option-groups.stmp: \ | ||
187 | + $(..)scripts/option-groups.awk \ | ||
188 | + $(..)option-groups.defaults \ | ||
189 | + $(wildcard $(common-objpfx)option-groups.config) | ||
190 | + $(make-target-directory) | ||
191 | + @rm -f ${@:stmp=T} $@ | ||
192 | + LC_ALL=C $(AWK) -f $^ > ${@:stmp=T} | ||
193 | + $(move-if-change) ${@:stmp=T} ${@:stmp=h} | ||
194 | + touch $@ | ||
195 | + | ||
196 | + | ||
197 | # These are the subdirectories containing the library source. The order | ||
198 | # is more or less arbitrary. The sorting step will take care of the | ||
199 | # dependencies. | ||
200 | diff --git a/Makerules b/Makerules | ||
201 | index f9ca3f5..1dd41aa 100644 | ||
202 | --- a/Makerules | ||
203 | +++ b/Makerules | ||
204 | @@ -456,6 +456,25 @@ define sed-remove-objpfx | ||
205 | endef | ||
206 | endif | ||
207 | |||
208 | +# Include targets in the selected option groups. | ||
209 | +aux += $(aux-y) | ||
210 | +extra-libs += $(extra-libs-y) | ||
211 | +extra-libs-others += $(extra-libs-others-y) | ||
212 | +extra-objs += $(extra-objs-y) | ||
213 | +install-bin += $(install-bin-y) | ||
214 | +install-others += $(install-others-y) | ||
215 | +install-sbin += $(install-sbin-y) | ||
216 | +modules += $(modules-y) | ||
217 | +others += $(others-y) | ||
218 | +others-pie += $(others-pie-y) | ||
219 | +routines += $(routines-y) | ||
220 | +static-only-routines += $(static-only-routines-y) | ||
221 | +sysdep_routines += $(sysdep_routines-y) | ||
222 | +test-srcs += $(test-srcs-y) | ||
223 | +tests += $(tests-y) | ||
224 | +xtests += $(xtests-y) | ||
225 | + | ||
226 | + | ||
227 | # Modify the list of routines we build for different targets | ||
228 | |||
229 | ifeq (yes,$(build-shared)) | ||
230 | diff --git a/argp/Makefile b/argp/Makefile | ||
231 | index 1a87629..f7c1e40 100644 | ||
232 | --- a/argp/Makefile | ||
233 | +++ b/argp/Makefile | ||
234 | @@ -18,6 +18,8 @@ | ||
235 | # | ||
236 | # Makefile for argp. | ||
237 | # | ||
238 | +include ../option-groups.mak | ||
239 | + | ||
240 | subdir := argp | ||
241 | |||
242 | include ../Makeconfig | ||
243 | diff --git a/argp/argp-fmtstream.c b/argp/argp-fmtstream.c | ||
244 | index 2b845e0..c344e7b 100644 | ||
245 | --- a/argp/argp-fmtstream.c | ||
246 | +++ b/argp/argp-fmtstream.c | ||
9 | @@ -42,6 +42,7 @@ | 247 | @@ -42,6 +42,7 @@ |
10 | #ifdef _LIBC | 248 | #ifdef _LIBC |
11 | # include <wchar.h> | 249 | # include <wchar.h> |
@@ -14,7 +252,7 @@ Index: git/argp/argp-fmtstream.c | |||
14 | # define __vsnprintf(s, l, f, a) _IO_vsnprintf (s, l, f, a) | 252 | # define __vsnprintf(s, l, f, a) _IO_vsnprintf (s, l, f, a) |
15 | #endif | 253 | #endif |
16 | 254 | ||
17 | @@ -100,7 +101,11 @@ __argp_fmtstream_free (argp_fmtstream_t | 255 | @@ -100,7 +101,11 @@ __argp_fmtstream_free (argp_fmtstream_t fs) |
18 | __argp_fmtstream_update (fs); | 256 | __argp_fmtstream_update (fs); |
19 | if (fs->p > fs->buf) | 257 | if (fs->p > fs->buf) |
20 | { | 258 | { |
@@ -26,7 +264,7 @@ Index: git/argp/argp-fmtstream.c | |||
26 | } | 264 | } |
27 | free (fs->buf); | 265 | free (fs->buf); |
28 | free (fs); | 266 | free (fs); |
29 | @@ -145,9 +150,17 @@ __argp_fmtstream_update (argp_fmtstream_ | 267 | @@ -145,9 +150,17 @@ __argp_fmtstream_update (argp_fmtstream_t fs) |
30 | size_t i; | 268 | size_t i; |
31 | for (i = 0; i < pad; i++) | 269 | for (i = 0; i < pad; i++) |
32 | { | 270 | { |
@@ -45,7 +283,7 @@ Index: git/argp/argp-fmtstream.c | |||
45 | putc_unlocked (' ', fs->stream); | 283 | putc_unlocked (' ', fs->stream); |
46 | } | 284 | } |
47 | } | 285 | } |
48 | @@ -308,9 +321,17 @@ __argp_fmtstream_update (argp_fmtstream_ | 286 | @@ -308,9 +321,17 @@ __argp_fmtstream_update (argp_fmtstream_t fs) |
49 | *nl++ = ' '; | 287 | *nl++ = ' '; |
50 | else | 288 | else |
51 | for (i = 0; i < fs->wmargin; ++i) | 289 | for (i = 0; i < fs->wmargin; ++i) |
@@ -64,10 +302,10 @@ Index: git/argp/argp-fmtstream.c | |||
64 | putc_unlocked (' ', fs->stream); | 302 | putc_unlocked (' ', fs->stream); |
65 | 303 | ||
66 | /* Copy the tail of the original buffer into the current buffer | 304 | /* Copy the tail of the original buffer into the current buffer |
67 | Index: git/argp/argp-help.c | 305 | diff --git a/argp/argp-help.c b/argp/argp-help.c |
68 | =================================================================== | 306 | index b055e45..6b3c4c1 100644 |
69 | --- git.orig/argp/argp-help.c | 307 | --- a/argp/argp-help.c |
70 | +++ git/argp/argp-help.c | 308 | +++ b/argp/argp-help.c |
71 | @@ -51,6 +51,7 @@ char *alloca (); | 309 | @@ -51,6 +51,7 @@ char *alloca (); |
72 | #ifdef _LIBC | 310 | #ifdef _LIBC |
73 | # include <../libio/libioP.h> | 311 | # include <../libio/libioP.h> |
@@ -85,7 +323,7 @@ Index: git/argp/argp-help.c | |||
85 | { | 323 | { |
86 | # if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME | 324 | # if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME |
87 | return program_invocation_short_name; | 325 | return program_invocation_short_name; |
88 | @@ -1873,9 +1874,17 @@ __argp_failure (const struct argp_state | 326 | @@ -1873,9 +1874,17 @@ __argp_failure (const struct argp_state *state, int status, int errnum, |
89 | #endif | 327 | #endif |
90 | } | 328 | } |
91 | 329 | ||
@@ -104,10 +342,10 @@ Index: git/argp/argp-help.c | |||
104 | putc_unlocked ('\n', stream); | 342 | putc_unlocked ('\n', stream); |
105 | 343 | ||
106 | #if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE) | 344 | #if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE) |
107 | Index: git/argp/argp-namefrob.h | 345 | diff --git a/argp/argp-namefrob.h b/argp/argp-namefrob.h |
108 | =================================================================== | 346 | index f67c58f..e2002dc 100644 |
109 | --- git.orig/argp/argp-namefrob.h | 347 | --- a/argp/argp-namefrob.h |
110 | +++ git/argp/argp-namefrob.h | 348 | +++ b/argp/argp-namefrob.h |
111 | @@ -76,10 +76,12 @@ | 349 | @@ -76,10 +76,12 @@ |
112 | #undef __argp_fmtstream_wmargin | 350 | #undef __argp_fmtstream_wmargin |
113 | #define __argp_fmtstream_wmargin argp_fmtstream_wmargin | 351 | #define __argp_fmtstream_wmargin argp_fmtstream_wmargin |
@@ -121,23 +359,10 @@ Index: git/argp/argp-namefrob.h | |||
121 | 359 | ||
122 | /* normal libc functions we call */ | 360 | /* normal libc functions we call */ |
123 | #undef __flockfile | 361 | #undef __flockfile |
124 | Index: git/argp/Makefile | 362 | diff --git a/catgets/Makefile b/catgets/Makefile |
125 | =================================================================== | 363 | index 4624a88..05714fd 100644 |
126 | --- git.orig/argp/Makefile | 364 | --- a/catgets/Makefile |
127 | +++ git/argp/Makefile | 365 | +++ b/catgets/Makefile |
128 | @@ -18,6 +18,8 @@ | ||
129 | # | ||
130 | # Makefile for argp. | ||
131 | # | ||
132 | +include ../option-groups.mak | ||
133 | + | ||
134 | subdir := argp | ||
135 | |||
136 | include ../Makeconfig | ||
137 | Index: git/catgets/Makefile | ||
138 | =================================================================== | ||
139 | --- git.orig/catgets/Makefile | ||
140 | +++ git/catgets/Makefile | ||
141 | @@ -22,20 +22,23 @@ subdir := catgets | 366 | @@ -22,20 +22,23 @@ subdir := catgets |
142 | 367 | ||
143 | include ../Makeconfig | 368 | include ../Makeconfig |
@@ -169,10 +394,66 @@ Index: git/catgets/Makefile | |||
169 | gencat-modules = xmalloc | 394 | gencat-modules = xmalloc |
170 | 395 | ||
171 | # To find xmalloc.c | 396 | # To find xmalloc.c |
172 | Index: git/crypt/crypt-entry.c | 397 | diff --git a/crypt/Makefile b/crypt/Makefile |
173 | =================================================================== | 398 | index 34c4dd7..7c18c88 100644 |
174 | --- git.orig/crypt/crypt-entry.c | 399 | --- a/crypt/Makefile |
175 | +++ git/crypt/crypt-entry.c | 400 | +++ b/crypt/Makefile |
401 | @@ -18,21 +18,25 @@ | ||
402 | # | ||
403 | # Sub-makefile for crypt() portion of the library. | ||
404 | # | ||
405 | +include ../option-groups.mak | ||
406 | + | ||
407 | subdir := crypt | ||
408 | |||
409 | include ../Makeconfig | ||
410 | |||
411 | headers := crypt.h | ||
412 | |||
413 | -extra-libs := libcrypt | ||
414 | -extra-libs-others := $(extra-libs) | ||
415 | +extra-libs-$(OPTION_EGLIBC_CRYPT) := libcrypt | ||
416 | +extra-libs-others-y := $(extra-libs-y) | ||
417 | |||
418 | -libcrypt-routines := crypt-entry md5-crypt sha256-crypt sha512-crypt crypt \ | ||
419 | - crypt_util | ||
420 | +libcrypt-routines :=crypt-entry md5-crypt sha256-crypt sha512-crypt crypt_common | ||
421 | +libcrypt-routines-$(OPTION_EGLIBC_CRYPT_UFC) := crypt crypt_util | ||
422 | +libcrypt-routines += $(libcrypt-routines-y) | ||
423 | |||
424 | -tests := cert md5c-test sha256c-test sha512c-test badsalttest | ||
425 | +tests-$(OPTION_EGLIBC_CRYPT) := md5c-test sha256c-test sha512c-test badsalttest | ||
426 | +tests-$(OPTION_EGLIBC_CRYPT_UFC) += cert | ||
427 | |||
428 | -ifeq ($(crypt-in-libc),yes) | ||
429 | +ifeq ($(crypt-in-libc)$(OPTION_EGLIBC_CRYPT),yesy) | ||
430 | routines += $(libcrypt-routines) | ||
431 | endif | ||
432 | |||
433 | @@ -44,7 +48,7 @@ LDLIBS-crypt.so = -lfreebl3 | ||
434 | else | ||
435 | libcrypt-routines += md5 sha256 sha512 | ||
436 | |||
437 | -tests += md5test sha256test sha512test | ||
438 | +tests-$(OPTION_EGLIBC_CRYPT) += md5test sha256test sha512test | ||
439 | |||
440 | # The test md5test-giant uses up to 400 MB of RSS and runs on a fast | ||
441 | # machine over a minute. | ||
442 | @@ -64,8 +68,10 @@ $(objpfx)sha256test: $(patsubst %, $(objpfx)%.o,$(sha256-routines)) | ||
443 | $(objpfx)sha512test: $(patsubst %, $(objpfx)%.o,$(sha512-routines)) | ||
444 | endif | ||
445 | |||
446 | +ifeq ($(OPTION_EGLIBC_CRYPT),y) | ||
447 | ifeq (yes,$(build-shared)) | ||
448 | $(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.so | ||
449 | else | ||
450 | $(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.a | ||
451 | endif | ||
452 | +endif # eglibc: OPTION_EGLIBC_CRYPT | ||
453 | diff --git a/crypt/crypt-entry.c b/crypt/crypt-entry.c | ||
454 | index 7e655ba..6ae5c2b 100644 | ||
455 | --- a/crypt/crypt-entry.c | ||
456 | +++ b/crypt/crypt-entry.c | ||
176 | @@ -27,6 +27,7 @@ | 457 | @@ -27,6 +27,7 @@ |
177 | #include <stdio.h> | 458 | #include <stdio.h> |
178 | #endif | 459 | #endif |
@@ -225,66 +506,91 @@ Index: git/crypt/crypt-entry.c | |||
225 | } | 506 | } |
226 | 507 | ||
227 | 508 | ||
228 | Index: git/crypt/Makefile | 509 | diff --git a/crypt/crypt_common.c b/crypt/crypt_common.c |
229 | =================================================================== | 510 | new file mode 100644 |
230 | --- git.orig/crypt/Makefile | 511 | index 0000000..cce6a31 |
231 | +++ git/crypt/Makefile | 512 | --- /dev/null |
232 | @@ -18,21 +18,25 @@ | 513 | +++ b/crypt/crypt_common.c |
233 | # | 514 | @@ -0,0 +1,42 @@ |
234 | # Sub-makefile for crypt() portion of the library. | 515 | +/* |
235 | # | 516 | + * crypt: crypt(3) implementation |
236 | +include ../option-groups.mak | 517 | + * |
518 | + * Copyright (C) 1991-2014 Free Software Foundation, Inc. | ||
519 | + * | ||
520 | + * This library is free software; you can redistribute it and/or | ||
521 | + * modify it under the terms of the GNU Lesser General Public | ||
522 | + * License as published by the Free Software Foundation; either | ||
523 | + * version 2.1 of the License, or (at your option) any later version. | ||
524 | + * | ||
525 | + * This library is distributed in the hope that it will be useful, | ||
526 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
527 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
528 | + * Lesser General Public License for more details. | ||
529 | + * | ||
530 | + * You should have received a copy of the GNU Lesser General Public | ||
531 | + * License along with this library; see the file COPYING.LIB. If not, | ||
532 | + * see <http://www.gnu.org/licenses/>. | ||
533 | + * | ||
534 | + * General Support routines | ||
535 | + * | ||
536 | + */ | ||
237 | + | 537 | + |
238 | subdir := crypt | 538 | +#include "crypt-private.h" |
239 | 539 | + | |
240 | include ../Makeconfig | 540 | +/* Table with characters for base64 transformation. */ |
241 | 541 | +static const char b64t[64] = | |
242 | headers := crypt.h | 542 | +"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; |
243 | 543 | + | |
244 | -extra-libs := libcrypt | 544 | +void |
245 | -extra-libs-others := $(extra-libs) | 545 | +__b64_from_24bit (char **cp, int *buflen, |
246 | +extra-libs-$(OPTION_EGLIBC_CRYPT) := libcrypt | 546 | + unsigned int b2, unsigned int b1, unsigned int b0, |
247 | +extra-libs-others-y := $(extra-libs-y) | 547 | + int n) |
248 | 548 | +{ | |
249 | -libcrypt-routines := crypt-entry md5-crypt sha256-crypt sha512-crypt crypt \ | 549 | + unsigned int w = (b2 << 16) | (b1 << 8) | b0; |
250 | - crypt_util | 550 | + while (n-- > 0 && (*buflen) > 0) |
251 | +libcrypt-routines :=crypt-entry md5-crypt sha256-crypt sha512-crypt crypt_common | 551 | + { |
252 | +libcrypt-routines-$(OPTION_EGLIBC_CRYPT_UFC) := crypt crypt_util | 552 | + *(*cp)++ = b64t[w & 0x3f]; |
253 | +libcrypt-routines += $(libcrypt-routines-y) | 553 | + --(*buflen); |
254 | 554 | + w >>= 6; | |
255 | -tests := cert md5c-test sha256c-test sha512c-test badsalttest | 555 | + } |
256 | +tests-$(OPTION_EGLIBC_CRYPT) := md5c-test sha256c-test sha512c-test badsalttest | 556 | +} |
257 | +tests-$(OPTION_EGLIBC_CRYPT_UFC) += cert | 557 | diff --git a/crypt/crypt_util.c b/crypt/crypt_util.c |
258 | 558 | index 1597885..9297974 100644 | |
259 | -ifeq ($(crypt-in-libc),yes) | 559 | --- a/crypt/crypt_util.c |
260 | +ifeq ($(crypt-in-libc)$(OPTION_EGLIBC_CRYPT),yesy) | 560 | +++ b/crypt/crypt_util.c |
261 | routines += $(libcrypt-routines) | 561 | @@ -242,10 +242,6 @@ static ufc_long eperm32tab[4][256][2]; |
262 | endif | 562 | */ |
263 | 563 | static ufc_long efp[16][64][2]; | |
264 | @@ -44,7 +48,7 @@ LDLIBS-crypt.so = -lfreebl3 | ||
265 | else | ||
266 | libcrypt-routines += md5 sha256 sha512 | ||
267 | |||
268 | -tests += md5test sha256test sha512test | ||
269 | +tests-$(OPTION_EGLIBC_CRYPT) += md5test sha256test sha512test | ||
270 | |||
271 | # The test md5test-giant uses up to 400 MB of RSS and runs on a fast | ||
272 | # machine over a minute. | ||
273 | @@ -64,8 +68,10 @@ $(objpfx)sha256test: $(patsubst %, $(obj | ||
274 | $(objpfx)sha512test: $(patsubst %, $(objpfx)%.o,$(sha512-routines)) | ||
275 | endif | ||
276 | 564 | ||
277 | +ifeq ($(OPTION_EGLIBC_CRYPT),y) | 565 | -/* Table with characters for base64 transformation. */ |
278 | ifeq (yes,$(build-shared)) | 566 | -static const char b64t[64] = |
279 | $(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.so | 567 | -"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; |
280 | else | 568 | - |
281 | $(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.a | 569 | /* |
282 | endif | 570 | * For use by the old, non-reentrant routines |
283 | +endif # eglibc: OPTION_EGLIBC_CRYPT | 571 | * (crypt/encrypt/setkey) |
284 | Index: git/csu/Makefile | 572 | @@ -949,17 +945,3 @@ setkey(__key) |
285 | =================================================================== | 573 | { |
286 | --- git.orig/csu/Makefile | 574 | __setkey_r(__key, &_ufc_foobar); |
287 | +++ git/csu/Makefile | 575 | } |
576 | - | ||
577 | -void | ||
578 | -__b64_from_24bit (char **cp, int *buflen, | ||
579 | - unsigned int b2, unsigned int b1, unsigned int b0, | ||
580 | - int n) | ||
581 | -{ | ||
582 | - unsigned int w = (b2 << 16) | (b1 << 8) | b0; | ||
583 | - while (n-- > 0 && (*buflen) > 0) | ||
584 | - { | ||
585 | - *(*cp)++ = b64t[w & 0x3f]; | ||
586 | - --(*buflen); | ||
587 | - w >>= 6; | ||
588 | - } | ||
589 | -} | ||
590 | diff --git a/csu/Makefile b/csu/Makefile | ||
591 | index 9f0855a..b1c3363 100644 | ||
592 | --- a/csu/Makefile | ||
593 | +++ b/csu/Makefile | ||
288 | @@ -22,6 +22,8 @@ | 594 | @@ -22,6 +22,8 @@ |
289 | # crtn.o, special "initializer" and "finalizer" files used in the link | 595 | # crtn.o, special "initializer" and "finalizer" files used in the link |
290 | # to make the .init and .fini sections work right. | 596 | # to make the .init and .fini sections work right. |
@@ -294,10 +600,10 @@ Index: git/csu/Makefile | |||
294 | subdir := csu | 600 | subdir := csu |
295 | 601 | ||
296 | include ../Makeconfig | 602 | include ../Makeconfig |
297 | Index: git/debug/Makefile | 603 | diff --git a/debug/Makefile b/debug/Makefile |
298 | =================================================================== | 604 | index 9ff357b..d23d97d 100644 |
299 | --- git.orig/debug/Makefile | 605 | --- a/debug/Makefile |
300 | +++ git/debug/Makefile | 606 | +++ b/debug/Makefile |
301 | @@ -18,6 +18,8 @@ | 607 | @@ -18,6 +18,8 @@ |
302 | # | 608 | # |
303 | # Sub-makefile for debug portion of the library. | 609 | # Sub-makefile for debug portion of the library. |
@@ -316,7 +622,7 @@ Index: git/debug/Makefile | |||
316 | memcpy_chk memmove_chk mempcpy_chk memset_chk stpcpy_chk \ | 622 | memcpy_chk memmove_chk mempcpy_chk memset_chk stpcpy_chk \ |
317 | strcat_chk strcpy_chk strncat_chk strncpy_chk stpncpy_chk \ | 623 | strcat_chk strcpy_chk strncat_chk strncpy_chk stpncpy_chk \ |
318 | sprintf_chk vsprintf_chk snprintf_chk vsnprintf_chk \ | 624 | sprintf_chk vsprintf_chk snprintf_chk vsnprintf_chk \ |
319 | @@ -36,20 +38,27 @@ routines = backtrace backtracesyms back | 625 | @@ -36,20 +38,27 @@ routines = backtrace backtracesyms backtracesymsfd noophooks \ |
320 | read_chk pread_chk pread64_chk recv_chk recvfrom_chk \ | 626 | read_chk pread_chk pread64_chk recv_chk recvfrom_chk \ |
321 | readlink_chk readlinkat_chk getwd_chk getcwd_chk \ | 627 | readlink_chk readlinkat_chk getwd_chk getcwd_chk \ |
322 | realpath_chk fread_chk fread_u_chk \ | 628 | realpath_chk fread_chk fread_u_chk \ |
@@ -371,12 +677,12 @@ Index: git/debug/Makefile | |||
371 | +tests += tst-chk4 tst-chk5 tst-chk6 tst-lfschk4 tst-lfschk5 tst-lfschk6 | 677 | +tests += tst-chk4 tst-chk5 tst-chk6 tst-lfschk4 tst-lfschk5 tst-lfschk6 |
372 | +endif | 678 | +endif |
373 | 679 | ||
374 | extra-libs = libSegFault libpcprofile | 680 | ifeq (,$(CXX)) |
375 | extra-libs-others = $(extra-libs) | 681 | tests-unsupported = tst-chk4 tst-chk5 tst-chk6 \ |
376 | Index: git/debug/segfault.c | 682 | diff --git a/debug/segfault.c b/debug/segfault.c |
377 | =================================================================== | 683 | index 3459a2a..ee9a146 100644 |
378 | --- git.orig/debug/segfault.c | 684 | --- a/debug/segfault.c |
379 | +++ git/debug/segfault.c | 685 | +++ b/debug/segfault.c |
380 | @@ -30,6 +30,7 @@ | 686 | @@ -30,6 +30,7 @@ |
381 | #include <unistd.h> | 687 | #include <unistd.h> |
382 | #include <_itoa.h> | 688 | #include <_itoa.h> |
@@ -402,7 +708,7 @@ Index: git/debug/segfault.c | |||
402 | /* This is the name of the file we are writing to. If none is given | 708 | /* This is the name of the file we are writing to. If none is given |
403 | or we cannot write to this file write to stderr. */ | 709 | or we cannot write to this file write to stderr. */ |
404 | fd = 2; | 710 | fd = 2; |
405 | @@ -91,6 +94,7 @@ catch_segfault (int signal, SIGCONTEXT c | 711 | @@ -91,6 +94,7 @@ catch_segfault (int signal, SIGCONTEXT ctx) |
406 | REGISTER_DUMP; | 712 | REGISTER_DUMP; |
407 | #endif | 713 | #endif |
408 | 714 | ||
@@ -410,7 +716,7 @@ Index: git/debug/segfault.c | |||
410 | WRITE_STRING ("\nBacktrace:\n"); | 716 | WRITE_STRING ("\nBacktrace:\n"); |
411 | 717 | ||
412 | /* Get the backtrace. */ | 718 | /* Get the backtrace. */ |
413 | @@ -113,6 +117,7 @@ catch_segfault (int signal, SIGCONTEXT c | 719 | @@ -113,6 +117,7 @@ catch_segfault (int signal, SIGCONTEXT ctx) |
414 | 720 | ||
415 | /* Now generate nicely formatted output. */ | 721 | /* Now generate nicely formatted output. */ |
416 | __backtrace_symbols_fd (arr + i, cnt - i, fd); | 722 | __backtrace_symbols_fd (arr + i, cnt - i, fd); |
@@ -418,10 +724,10 @@ Index: git/debug/segfault.c | |||
418 | 724 | ||
419 | #ifdef HAVE_PROC_SELF | 725 | #ifdef HAVE_PROC_SELF |
420 | /* Now the link map. */ | 726 | /* Now the link map. */ |
421 | Index: git/debug/tst-chk1.c | 727 | diff --git a/debug/tst-chk1.c b/debug/tst-chk1.c |
422 | =================================================================== | 728 | index 53559e6..362d92a 100644 |
423 | --- git.orig/debug/tst-chk1.c | 729 | --- a/debug/tst-chk1.c |
424 | +++ git/debug/tst-chk1.c | 730 | +++ b/debug/tst-chk1.c |
425 | @@ -31,6 +31,7 @@ | 731 | @@ -31,6 +31,7 @@ |
426 | #include <sys/select.h> | 732 | #include <sys/select.h> |
427 | #include <sys/socket.h> | 733 | #include <sys/socket.h> |
@@ -478,10 +784,10 @@ Index: git/debug/tst-chk1.c | |||
478 | 784 | ||
479 | int fd = posix_openpt (O_RDWR); | 785 | int fd = posix_openpt (O_RDWR); |
480 | if (fd != -1) | 786 | if (fd != -1) |
481 | Index: git/dlfcn/Makefile | 787 | diff --git a/dlfcn/Makefile b/dlfcn/Makefile |
482 | =================================================================== | 788 | index 759780d..3827607 100644 |
483 | --- git.orig/dlfcn/Makefile | 789 | --- a/dlfcn/Makefile |
484 | +++ git/dlfcn/Makefile | 790 | +++ b/dlfcn/Makefile |
485 | @@ -15,6 +15,8 @@ | 791 | @@ -15,6 +15,8 @@ |
486 | # License along with the GNU C Library; if not, see | 792 | # License along with the GNU C Library; if not, see |
487 | # <http://www.gnu.org/licenses/>. | 793 | # <http://www.gnu.org/licenses/>. |
@@ -491,76 +797,23 @@ Index: git/dlfcn/Makefile | |||
491 | subdir := dlfcn | 797 | subdir := dlfcn |
492 | 798 | ||
493 | include ../Makeconfig | 799 | include ../Makeconfig |
494 | @@ -36,14 +38,18 @@ endif | 800 | @@ -36,8 +38,11 @@ endif |
495 | ifeq (yes,$(build-shared)) | 801 | ifeq (yes,$(build-shared)) |
496 | tests = glrefmain failtest tst-dladdr default errmsg1 tstcxaatexit \ | 802 | tests = glrefmain failtest tst-dladdr default errmsg1 tstcxaatexit \ |
497 | bug-dlopen1 bug-dlsym1 tst-dlinfo bug-atexit1 bug-atexit2 \ | 803 | bug-dlopen1 bug-dlsym1 tst-dlinfo bug-atexit1 bug-atexit2 \ |
498 | - bug-atexit3 tstatexit bug-dl-leaf tst-rec-dlopen | 804 | - bug-atexit3 tstatexit bug-dl-leaf tst-rec-dlopen |
499 | + tstatexit bug-dl-leaf tst-rec-dlopen | 805 | + tstatexit bug-dl-leaf tst-rec-dlopen |
500 | +tests-$(OPTION_EGLIBC_CXX_TESTS) += bug-atexit3 | ||
501 | endif | 806 | endif |
807 | + | ||
808 | +tests-$(OPTION_EGLIBC_CXX_TESTS) += bug-atexit3 | ||
809 | + | ||
502 | modules-names = glreflib1 glreflib2 glreflib3 failtestmod defaultmod1 \ | 810 | modules-names = glreflib1 glreflib2 glreflib3 failtestmod defaultmod1 \ |
503 | defaultmod2 errmsg1mod modatexit modcxaatexit \ | 811 | defaultmod2 errmsg1mod modatexit modcxaatexit \ |
504 | bug-dlsym1-lib1 bug-dlsym1-lib2 bug-atexit1-lib \ | 812 | bug-dlsym1-lib1 bug-dlsym1-lib2 bug-atexit1-lib \ |
505 | - bug-atexit2-lib bug-atexit3-lib bug-dl-leaf-lib \ | 813 | diff --git a/elf/dl-support.c b/elf/dl-support.c |
506 | + bug-atexit2-lib bug-dl-leaf-lib \ | 814 | index 4d036f1..c15f405 100644 |
507 | bug-dl-leaf-lib-cb moddummy1 moddummy2 | 815 | --- a/elf/dl-support.c |
508 | 816 | +++ b/elf/dl-support.c | |
509 | +ifeq (y,$(OPTION_EGLIBC_CXX_TESTS)) | ||
510 | +modules-names += bug-atexit3-lib | ||
511 | +endif | ||
512 | failtestmod.so-no-z-defs = yes | ||
513 | glreflib2.so-no-z-defs = yes | ||
514 | errmsg1mod.so-no-z-defs = yes | ||
515 | Index: git/elf/Makefile | ||
516 | =================================================================== | ||
517 | --- git.orig/elf/Makefile | ||
518 | +++ git/elf/Makefile | ||
519 | @@ -17,6 +17,8 @@ | ||
520 | |||
521 | # Makefile for elf subdirectory of GNU C Library. | ||
522 | |||
523 | +include ../option-groups.mak | ||
524 | + | ||
525 | subdir := elf | ||
526 | |||
527 | include ../Makeconfig | ||
528 | @@ -144,10 +146,11 @@ tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \ | ||
529 | unload3 unload4 unload5 unload6 unload7 unload8 tst-global1 order2 \ | ||
530 | tst-audit1 tst-audit2 tst-audit8 tst-audit9 \ | ||
531 | tst-stackguard1 tst-addr1 tst-thrlock \ | ||
532 | - tst-unique1 tst-unique2 tst-unique3 tst-unique4 \ | ||
533 | + tst-unique1 tst-unique2 \ | ||
534 | tst-initorder tst-initorder2 tst-relsort1 tst-null-argv \ | ||
535 | tst-ptrguard1 | ||
536 | # reldep9 | ||
537 | +tests-$(OPTION_EGLIBC_CXX_TESTS) += tst-unique3 tst-unique4 | ||
538 | ifeq ($(build-hardcoded-path-in-tests),yes) | ||
539 | tests += tst-dlopen-aout | ||
540 | endif | ||
541 | @@ -205,8 +208,6 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \ | ||
542 | tst-unique1mod1 tst-unique1mod2 \ | ||
543 | tst-unique2mod1 tst-unique2mod2 \ | ||
544 | tst-auditmod9a tst-auditmod9b \ | ||
545 | - tst-unique3lib tst-unique3lib2 \ | ||
546 | - tst-unique4lib \ | ||
547 | tst-initordera1 tst-initorderb1 \ | ||
548 | tst-initordera2 tst-initorderb2 \ | ||
549 | tst-initordera3 tst-initordera4 \ | ||
550 | @@ -214,6 +215,9 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \ | ||
551 | tst-initorder2d \ | ||
552 | tst-relsort1mod1 tst-relsort1mod2 tst-array2dep \ | ||
553 | tst-array5dep tst-null-argv-lib | ||
554 | +ifeq (y,$(OPTION_EGLIBC_CXX_TESTS)) | ||
555 | +modules-names += tst-unique3lib tst-unique3lib2 tst-unique4lib | ||
556 | +endif | ||
557 | ifeq (yesyes,$(have-fpie)$(build-shared)) | ||
558 | modules-names += tst-piemod1 | ||
559 | tests += tst-pie1 tst-pie2 | ||
560 | Index: git/elf/dl-support.c | ||
561 | =================================================================== | ||
562 | --- git.orig/elf/dl-support.c | ||
563 | +++ git/elf/dl-support.c | ||
564 | @@ -19,6 +19,7 @@ | 817 | @@ -19,6 +19,7 @@ |
565 | /* This file defines some things that for the dynamic linker are defined in | 818 | /* This file defines some things that for the dynamic linker are defined in |
566 | rtld.c and dl-sysdep.c in ways appropriate to bootstrap dynamic linking. */ | 819 | rtld.c and dl-sysdep.c in ways appropriate to bootstrap dynamic linking. */ |
@@ -569,7 +822,7 @@ Index: git/elf/dl-support.c | |||
569 | #include <errno.h> | 822 | #include <errno.h> |
570 | #include <libintl.h> | 823 | #include <libintl.h> |
571 | #include <stdlib.h> | 824 | #include <stdlib.h> |
572 | @@ -42,7 +43,9 @@ char **_dl_argv = &__progname; /* This i | 825 | @@ -42,7 +43,9 @@ char **_dl_argv = &__progname; /* This is checked for some error messages. */ |
573 | const char *_dl_platform; | 826 | const char *_dl_platform; |
574 | size_t _dl_platformlen; | 827 | size_t _dl_platformlen; |
575 | 828 | ||
@@ -579,10 +832,10 @@ Index: git/elf/dl-support.c | |||
579 | int _dl_lazy; | 832 | int _dl_lazy; |
580 | ElfW(Addr) _dl_use_load_bias = -2; | 833 | ElfW(Addr) _dl_use_load_bias = -2; |
581 | int _dl_dynamic_weak; | 834 | int _dl_dynamic_weak; |
582 | Index: git/elf/rtld.c | 835 | diff --git a/elf/rtld.c b/elf/rtld.c |
583 | =================================================================== | 836 | index 6d3add7..fc3a2db 100644 |
584 | --- git.orig/elf/rtld.c | 837 | --- a/elf/rtld.c |
585 | +++ git/elf/rtld.c | 838 | +++ b/elf/rtld.c |
586 | @@ -16,6 +16,7 @@ | 839 | @@ -16,6 +16,7 @@ |
587 | License along with the GNU C Library; if not, see | 840 | License along with the GNU C Library; if not, see |
588 | <http://www.gnu.org/licenses/>. */ | 841 | <http://www.gnu.org/licenses/>. */ |
@@ -591,7 +844,7 @@ Index: git/elf/rtld.c | |||
591 | #include <errno.h> | 844 | #include <errno.h> |
592 | #include <dlfcn.h> | 845 | #include <dlfcn.h> |
593 | #include <fcntl.h> | 846 | #include <fcntl.h> |
594 | @@ -2200,6 +2201,7 @@ print_missing_version (int errcode __att | 847 | @@ -2201,6 +2202,7 @@ print_missing_version (int errcode __attribute__ ((unused)), |
595 | objname, errstring); | 848 | objname, errstring); |
596 | } | 849 | } |
597 | 850 | ||
@@ -599,7 +852,7 @@ Index: git/elf/rtld.c | |||
599 | /* Nonzero if any of the debugging options is enabled. */ | 852 | /* Nonzero if any of the debugging options is enabled. */ |
600 | static int any_debug attribute_relro; | 853 | static int any_debug attribute_relro; |
601 | 854 | ||
602 | @@ -2309,6 +2311,7 @@ a filename can be specified using the LD | 855 | @@ -2310,6 +2312,7 @@ a filename can be specified using the LD_DEBUG_OUTPUT environment variable.\n"); |
603 | _exit (0); | 856 | _exit (0); |
604 | } | 857 | } |
605 | } | 858 | } |
@@ -607,7 +860,7 @@ Index: git/elf/rtld.c | |||
607 | 860 | ||
608 | static void | 861 | static void |
609 | process_dl_audit (char *str) | 862 | process_dl_audit (char *str) |
610 | @@ -2348,8 +2351,9 @@ process_envvars (enum mode *modep) | 863 | @@ -2349,8 +2352,9 @@ process_envvars (enum mode *modep) |
611 | char **runp = _environ; | 864 | char **runp = _environ; |
612 | char *envline; | 865 | char *envline; |
613 | enum mode mode = normal; | 866 | enum mode mode = normal; |
@@ -618,7 +871,7 @@ Index: git/elf/rtld.c | |||
618 | /* This is the default place for profiling data file. */ | 871 | /* This is the default place for profiling data file. */ |
619 | GLRO(dl_profile_output) | 872 | GLRO(dl_profile_output) |
620 | = &"/var/tmp\0/var/profile"[__libc_enable_secure ? 9 : 0]; | 873 | = &"/var/tmp\0/var/profile"[__libc_enable_secure ? 9 : 0]; |
621 | @@ -2376,12 +2380,14 @@ process_envvars (enum mode *modep) | 874 | @@ -2377,12 +2381,14 @@ process_envvars (enum mode *modep) |
622 | break; | 875 | break; |
623 | 876 | ||
624 | case 5: | 877 | case 5: |
@@ -633,7 +886,7 @@ Index: git/elf/rtld.c | |||
633 | if (memcmp (envline, "AUDIT", 5) == 0) | 886 | if (memcmp (envline, "AUDIT", 5) == 0) |
634 | process_dl_audit (&envline[6]); | 887 | process_dl_audit (&envline[6]); |
635 | break; | 888 | break; |
636 | @@ -2447,13 +2453,14 @@ process_envvars (enum mode *modep) | 889 | @@ -2448,13 +2454,14 @@ process_envvars (enum mode *modep) |
637 | break; | 890 | break; |
638 | } | 891 | } |
639 | 892 | ||
@@ -649,22 +902,22 @@ Index: git/elf/rtld.c | |||
649 | if (!__libc_enable_secure | 902 | if (!__libc_enable_secure |
650 | && memcmp (envline, "DYNAMIC_WEAK", 12) == 0) | 903 | && memcmp (envline, "DYNAMIC_WEAK", 12) == 0) |
651 | GLRO(dl_dynamic_weak) = 1; | 904 | GLRO(dl_dynamic_weak) = 1; |
652 | @@ -2490,7 +2497,9 @@ process_envvars (enum mode *modep) | 905 | @@ -2491,7 +2498,9 @@ process_envvars (enum mode *modep) |
653 | { | 906 | { |
654 | mode = trace; | 907 | mode = trace; |
655 | GLRO(dl_verbose) = 1; | 908 | GLRO(dl_verbose) = 1; |
656 | +#if __OPTION_EGLIBC_RTLD_DEBUG | 909 | +#if __OPTION_EGLIBC_RTLD_DEBUG |
657 | GLRO_dl_debug_mask |= DL_DEBUG_PRELINK; | 910 | GLRO(dl_debug_mask) |= DL_DEBUG_PRELINK; |
658 | +#endif | 911 | +#endif |
659 | GLRO(dl_trace_prelink) = &envline[17]; | 912 | GLRO(dl_trace_prelink) = &envline[17]; |
660 | } | 913 | } |
661 | break; | 914 | break; |
662 | @@ -2537,12 +2546,15 @@ process_envvars (enum mode *modep) | 915 | @@ -2538,12 +2547,15 @@ process_envvars (enum mode *modep) |
663 | if (__access ("/etc/suid-debug", F_OK) != 0) | 916 | if (__access ("/etc/suid-debug", F_OK) != 0) |
664 | { | 917 | { |
665 | unsetenv ("MALLOC_CHECK_"); | 918 | unsetenv ("MALLOC_CHECK_"); |
666 | +#if __OPTION_EGLIBC_RTLD_DEBUG | 919 | +#if __OPTION_EGLIBC_RTLD_DEBUG |
667 | GLRO_dl_debug_mask = 0; | 920 | GLRO(dl_debug_mask) = 0; |
668 | +#endif | 921 | +#endif |
669 | } | 922 | } |
670 | 923 | ||
@@ -675,7 +928,7 @@ Index: git/elf/rtld.c | |||
675 | /* If we have to run the dynamic linker in debugging mode and the | 928 | /* If we have to run the dynamic linker in debugging mode and the |
676 | LD_DEBUG_OUTPUT environment variable is given, we write the debug | 929 | LD_DEBUG_OUTPUT environment variable is given, we write the debug |
677 | messages to this file. */ | 930 | messages to this file. */ |
678 | @@ -2567,6 +2579,7 @@ process_envvars (enum mode *modep) | 931 | @@ -2568,6 +2580,7 @@ process_envvars (enum mode *modep) |
679 | /* We use standard output if opening the file failed. */ | 932 | /* We use standard output if opening the file failed. */ |
680 | GLRO(dl_debug_fd) = STDOUT_FILENO; | 933 | GLRO(dl_debug_fd) = STDOUT_FILENO; |
681 | } | 934 | } |
@@ -683,10 +936,10 @@ Index: git/elf/rtld.c | |||
683 | } | 936 | } |
684 | 937 | ||
685 | 938 | ||
686 | Index: git/extra-lib.mk | 939 | diff --git a/extra-lib.mk b/extra-lib.mk |
687 | =================================================================== | 940 | index b10748d..d71a06f 100644 |
688 | --- git.orig/extra-lib.mk | 941 | --- a/extra-lib.mk |
689 | +++ git/extra-lib.mk | 942 | +++ b/extra-lib.mk |
690 | @@ -25,7 +25,9 @@ install-lib := $(install-lib) | 943 | @@ -25,7 +25,9 @@ install-lib := $(install-lib) |
691 | extra-objs := $(extra-objs) | 944 | extra-objs := $(extra-objs) |
692 | 945 | ||
@@ -707,10 +960,10 @@ Index: git/extra-lib.mk | |||
707 | ifneq (,$(cpp-srcs-left)) | 960 | ifneq (,$(cpp-srcs-left)) |
708 | include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left)) | 961 | include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left)) |
709 | endif | 962 | endif |
710 | Index: git/grp/Makefile | 963 | diff --git a/grp/Makefile b/grp/Makefile |
711 | =================================================================== | 964 | index c63b552..7486f32 100644 |
712 | --- git.orig/grp/Makefile | 965 | --- a/grp/Makefile |
713 | +++ git/grp/Makefile | 966 | +++ b/grp/Makefile |
714 | @@ -18,6 +18,8 @@ | 967 | @@ -18,6 +18,8 @@ |
715 | # | 968 | # |
716 | # Sub-makefile for grp portion of the library. | 969 | # Sub-makefile for grp portion of the library. |
@@ -720,7 +973,7 @@ Index: git/grp/Makefile | |||
720 | subdir := grp | 973 | subdir := grp |
721 | 974 | ||
722 | include ../Makeconfig | 975 | include ../Makeconfig |
723 | @@ -29,6 +31,9 @@ routines := fgetgrent initgroups setgrou | 976 | @@ -29,6 +31,9 @@ routines := fgetgrent initgroups setgroups \ |
724 | getgrent_r getgrgid_r getgrnam_r fgetgrent_r | 977 | getgrent_r getgrgid_r getgrnam_r fgetgrent_r |
725 | 978 | ||
726 | tests := testgrp | 979 | tests := testgrp |
@@ -730,10 +983,10 @@ Index: git/grp/Makefile | |||
730 | 983 | ||
731 | ifeq (yes,$(build-shared)) | 984 | ifeq (yes,$(build-shared)) |
732 | test-srcs := tst_fgetgrent | 985 | test-srcs := tst_fgetgrent |
733 | Index: git/hesiod/Makefile | 986 | diff --git a/hesiod/Makefile b/hesiod/Makefile |
734 | =================================================================== | 987 | index ac0bc01..38263b4 100644 |
735 | --- git.orig/hesiod/Makefile | 988 | --- a/hesiod/Makefile |
736 | +++ git/hesiod/Makefile | 989 | +++ b/hesiod/Makefile |
737 | @@ -18,12 +18,14 @@ | 990 | @@ -18,12 +18,14 @@ |
738 | # | 991 | # |
739 | # Sub-makefile for hesiod portion of the library. | 992 | # Sub-makefile for hesiod portion of the library. |
@@ -751,10 +1004,35 @@ Index: git/hesiod/Makefile | |||
751 | 1004 | ||
752 | subdir-dirs = nss_hesiod | 1005 | subdir-dirs = nss_hesiod |
753 | vpath %.c nss_hesiod | 1006 | vpath %.c nss_hesiod |
754 | Index: git/iconv/gconv_db.c | 1007 | diff --git a/iconv/Makefile b/iconv/Makefile |
755 | =================================================================== | 1008 | index 0d55eda..a1847c6 100644 |
756 | --- git.orig/iconv/gconv_db.c | 1009 | --- a/iconv/Makefile |
757 | +++ git/iconv/gconv_db.c | 1010 | +++ b/iconv/Makefile |
1011 | @@ -18,6 +18,8 @@ | ||
1012 | # | ||
1013 | # Makefile for iconv. | ||
1014 | # | ||
1015 | +include ../option-groups.mak | ||
1016 | + | ||
1017 | subdir := iconv | ||
1018 | |||
1019 | include ../Makeconfig | ||
1020 | @@ -39,6 +41,11 @@ CFLAGS-iconv_charmap.c = -I../locale/programs | ||
1021 | CFLAGS-dummy-repertoire.c = -I../locale/programs | ||
1022 | CFLAGS-charmap.c = -DCHARMAP_PATH='"$(i18ndir)/charmaps"' \ | ||
1023 | -DDEFAULT_CHARMAP=null_pointer -DNEED_NULL_POINTER | ||
1024 | + | ||
1025 | +ifneq (y,$(OPTION_EGLIBC_SPAWN)) | ||
1026 | +CFLAGS-charmap-dir.c += -DNO_UNCOMPRESS | ||
1027 | +endif | ||
1028 | + | ||
1029 | CFLAGS-linereader.c = -DNO_TRANSLITERATION | ||
1030 | CFLAGS-simple-hash.c = -I../locale | ||
1031 | |||
1032 | diff --git a/iconv/gconv_db.c b/iconv/gconv_db.c | ||
1033 | index ce46216..ea18964 100644 | ||
1034 | --- a/iconv/gconv_db.c | ||
1035 | +++ b/iconv/gconv_db.c | ||
758 | @@ -25,6 +25,7 @@ | 1036 | @@ -25,6 +25,7 @@ |
759 | #include <sys/param.h> | 1037 | #include <sys/param.h> |
760 | #include <bits/libc-lock.h> | 1038 | #include <bits/libc-lock.h> |
@@ -763,7 +1041,7 @@ Index: git/iconv/gconv_db.c | |||
763 | 1041 | ||
764 | #include <dlfcn.h> | 1042 | #include <dlfcn.h> |
765 | #include <gconv_int.h> | 1043 | #include <gconv_int.h> |
766 | @@ -828,9 +829,11 @@ free_modules_db (struct gconv_module *no | 1044 | @@ -828,9 +829,11 @@ free_modules_db (struct gconv_module *node) |
767 | /* Free all resources if necessary. */ | 1045 | /* Free all resources if necessary. */ |
768 | libc_freeres_fn (free_mem) | 1046 | libc_freeres_fn (free_mem) |
769 | { | 1047 | { |
@@ -775,10 +1053,10 @@ Index: git/iconv/gconv_db.c | |||
775 | 1053 | ||
776 | /* finddomain.c has similar problem. */ | 1054 | /* finddomain.c has similar problem. */ |
777 | extern void _nl_finddomain_subfreeres (void) attribute_hidden; | 1055 | extern void _nl_finddomain_subfreeres (void) attribute_hidden; |
778 | Index: git/iconv/gconv_trans.c | 1056 | diff --git a/iconv/gconv_trans.c b/iconv/gconv_trans.c |
779 | =================================================================== | 1057 | index 5d5d4d7..a7d3072 100644 |
780 | --- git.orig/iconv/gconv_trans.c | 1058 | --- a/iconv/gconv_trans.c |
781 | +++ git/iconv/gconv_trans.c | 1059 | +++ b/iconv/gconv_trans.c |
782 | @@ -23,6 +23,7 @@ | 1060 | @@ -23,6 +23,7 @@ |
783 | #include <stdint.h> | 1061 | #include <stdint.h> |
784 | #include <string.h> | 1062 | #include <string.h> |
@@ -787,7 +1065,7 @@ Index: git/iconv/gconv_trans.c | |||
787 | 1065 | ||
788 | #include <bits/libc-lock.h> | 1066 | #include <bits/libc-lock.h> |
789 | #include "gconv_int.h" | 1067 | #include "gconv_int.h" |
790 | @@ -38,15 +39,19 @@ __gconv_transliterate (struct __gconv_st | 1068 | @@ -38,15 +39,19 @@ __gconv_transliterate (struct __gconv_step *step, |
791 | unsigned char **outbufstart, size_t *irreversible) | 1069 | unsigned char **outbufstart, size_t *irreversible) |
792 | { | 1070 | { |
793 | /* Find out about the locale's transliteration. */ | 1071 | /* Find out about the locale's transliteration. */ |
@@ -807,7 +1085,7 @@ Index: git/iconv/gconv_trans.c | |||
807 | 1085 | ||
808 | /* The input buffer. There are actually 4-byte values. */ | 1086 | /* The input buffer. There are actually 4-byte values. */ |
809 | winbuf = (const uint32_t *) *inbufp; | 1087 | winbuf = (const uint32_t *) *inbufp; |
810 | @@ -58,6 +63,7 @@ __gconv_transliterate (struct __gconv_st | 1088 | @@ -58,6 +63,7 @@ __gconv_transliterate (struct __gconv_step *step, |
811 | PTR_DEMANGLE (fct); | 1089 | PTR_DEMANGLE (fct); |
812 | #endif | 1090 | #endif |
813 | 1091 | ||
@@ -815,7 +1093,7 @@ Index: git/iconv/gconv_trans.c | |||
815 | /* If there is no transliteration information in the locale don't do | 1093 | /* If there is no transliteration information in the locale don't do |
816 | anything and return the error. */ | 1094 | anything and return the error. */ |
817 | size = _NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_TRANSLIT_TAB_SIZE); | 1095 | size = _NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_TRANSLIT_TAB_SIZE); |
818 | @@ -193,6 +199,7 @@ __gconv_transliterate (struct __gconv_st | 1096 | @@ -193,6 +199,7 @@ __gconv_transliterate (struct __gconv_step *step, |
819 | sorted. */ | 1097 | sorted. */ |
820 | break; | 1098 | break; |
821 | } | 1099 | } |
@@ -823,10 +1101,10 @@ Index: git/iconv/gconv_trans.c | |||
823 | 1101 | ||
824 | /* One last chance: use the default replacement. */ | 1102 | /* One last chance: use the default replacement. */ |
825 | if (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_TRANSLIT_DEFAULT_MISSING_LEN) != 0) | 1103 | if (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_TRANSLIT_DEFAULT_MISSING_LEN) != 0) |
826 | Index: git/iconv/iconv_prog.c | 1104 | diff --git a/iconv/iconv_prog.c b/iconv/iconv_prog.c |
827 | =================================================================== | 1105 | index e249bce..403ece5 100644 |
828 | --- git.orig/iconv/iconv_prog.c | 1106 | --- a/iconv/iconv_prog.c |
829 | +++ git/iconv/iconv_prog.c | 1107 | +++ b/iconv/iconv_prog.c |
830 | @@ -35,6 +35,7 @@ | 1108 | @@ -35,6 +35,7 @@ |
831 | #ifdef _POSIX_MAPPED_FILES | 1109 | #ifdef _POSIX_MAPPED_FILES |
832 | # include <sys/mman.h> | 1110 | # include <sys/mman.h> |
@@ -853,35 +1131,10 @@ Index: git/iconv/iconv_prog.c | |||
853 | 1131 | ||
854 | if (from_wrong) | 1132 | if (from_wrong) |
855 | { | 1133 | { |
856 | Index: git/iconv/Makefile | 1134 | diff --git a/iconvdata/Makefile b/iconvdata/Makefile |
857 | =================================================================== | 1135 | index a3d1d09..0832708 100644 |
858 | --- git.orig/iconv/Makefile | 1136 | --- a/iconvdata/Makefile |
859 | +++ git/iconv/Makefile | 1137 | +++ b/iconvdata/Makefile |
860 | @@ -18,6 +18,8 @@ | ||
861 | # | ||
862 | # Makefile for iconv. | ||
863 | # | ||
864 | +include ../option-groups.mak | ||
865 | + | ||
866 | subdir := iconv | ||
867 | |||
868 | include ../Makeconfig | ||
869 | @@ -39,6 +41,11 @@ CFLAGS-iconv_charmap.c = -I../locale/pro | ||
870 | CFLAGS-dummy-repertoire.c = -I../locale/programs | ||
871 | CFLAGS-charmap.c = -DCHARMAP_PATH='"$(i18ndir)/charmaps"' \ | ||
872 | -DDEFAULT_CHARMAP=null_pointer -DNEED_NULL_POINTER | ||
873 | + | ||
874 | +ifneq (y,$(OPTION_EGLIBC_SPAWN)) | ||
875 | +CFLAGS-charmap-dir.c += -DNO_UNCOMPRESS | ||
876 | +endif | ||
877 | + | ||
878 | CFLAGS-linereader.c = -DNO_TRANSLITERATION | ||
879 | CFLAGS-simple-hash.c = -I../locale | ||
880 | |||
881 | Index: git/iconvdata/Makefile | ||
882 | =================================================================== | ||
883 | --- git.orig/iconvdata/Makefile | ||
884 | +++ git/iconvdata/Makefile | ||
885 | @@ -18,12 +18,15 @@ | 1138 | @@ -18,12 +18,15 @@ |
886 | # | 1139 | # |
887 | # Makefile for iconv data and code. | 1140 | # Makefile for iconv data and code. |
@@ -899,7 +1152,7 @@ Index: git/iconvdata/Makefile | |||
899 | ISO8859-6 ISO8859-7 ISO8859-8 ISO8859-9 ISO8859-10 \ | 1152 | ISO8859-6 ISO8859-7 ISO8859-8 ISO8859-9 ISO8859-10 \ |
900 | ISO8859-11 ISO8859-13 ISO8859-14 ISO8859-15 ISO8859-16 \ | 1153 | ISO8859-11 ISO8859-13 ISO8859-14 ISO8859-15 ISO8859-16 \ |
901 | T.61 ISO_6937 SJIS KOI-8 HP-ROMAN8 HP-ROMAN9 EBCDIC-AT-DE \ | 1154 | T.61 ISO_6937 SJIS KOI-8 HP-ROMAN8 HP-ROMAN9 EBCDIC-AT-DE \ |
902 | @@ -63,11 +66,13 @@ modules := ISO8859-1 ISO8859-2 ISO8859-3 | 1155 | @@ -63,11 +66,13 @@ modules := ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-4 ISO8859-5 \ |
903 | MAC-CENTRALEUROPE KOI8-RU ISO8859-9E \ | 1156 | MAC-CENTRALEUROPE KOI8-RU ISO8859-9E \ |
904 | CP770 CP771 CP772 CP773 CP774 | 1157 | CP770 CP771 CP772 CP773 CP774 |
905 | 1158 | ||
@@ -932,7 +1185,7 @@ Index: git/iconvdata/Makefile | |||
932 | 1185 | ||
933 | # We can build the conversion tables for numerous charsets automatically. | 1186 | # We can build the conversion tables for numerous charsets automatically. |
934 | 1187 | ||
935 | @@ -201,7 +206,7 @@ before-compile += $(addprefix $(objpfx), | 1188 | @@ -201,7 +206,7 @@ before-compile += $(addprefix $(objpfx),$(generated-modules:=.h)) |
936 | ifndef avoid-generated | 1189 | ifndef avoid-generated |
937 | $(objpfx)iconv-rules: Makefile | 1190 | $(objpfx)iconv-rules: Makefile |
938 | $(make-target-directory) | 1191 | $(make-target-directory) |
@@ -941,7 +1194,7 @@ Index: git/iconvdata/Makefile | |||
941 | echo 8bit $(gen-8bit-modules); \ | 1194 | echo 8bit $(gen-8bit-modules); \ |
942 | echo 8bit-gap $(gen-8bit-gap-modules); } | \ | 1195 | echo 8bit-gap $(gen-8bit-gap-modules); } | \ |
943 | LC_ALL=C \ | 1196 | LC_ALL=C \ |
944 | @@ -245,7 +250,7 @@ $(addprefix $(inst_gconvdir)/, $(modules | 1197 | @@ -245,7 +250,7 @@ $(addprefix $(inst_gconvdir)/, $(modules.so)): \ |
945 | $(do-install-program) | 1198 | $(do-install-program) |
946 | $(inst_gconvdir)/gconv-modules: gconv-modules $(+force) | 1199 | $(inst_gconvdir)/gconv-modules: gconv-modules $(+force) |
947 | $(do-install) | 1200 | $(do-install) |
@@ -963,11 +1216,11 @@ Index: git/iconvdata/Makefile | |||
963 | 1216 | ||
964 | endif # build-shared = yes | 1217 | endif # build-shared = yes |
965 | 1218 | ||
966 | Index: git/include/netdb.h | 1219 | diff --git a/include/netdb.h b/include/netdb.h |
967 | =================================================================== | 1220 | index e1f051d..f6d15aa 100644 |
968 | --- git.orig/include/netdb.h | 1221 | --- a/include/netdb.h |
969 | +++ git/include/netdb.h | 1222 | +++ b/include/netdb.h |
970 | @@ -232,6 +232,10 @@ extern enum nss_status _nss_ ## service | 1223 | @@ -232,6 +232,10 @@ extern enum nss_status _nss_ ## service ## _gethostbyname2_r \ |
971 | (const char *name, int af, struct hostent *host, \ | 1224 | (const char *name, int af, struct hostent *host, \ |
972 | char *buffer, size_t buflen, int *errnop, \ | 1225 | char *buffer, size_t buflen, int *errnop, \ |
973 | int *h_errnop); \ | 1226 | int *h_errnop); \ |
@@ -978,10 +1231,10 @@ Index: git/include/netdb.h | |||
978 | extern enum nss_status _nss_ ## service ## _gethostbyname_r \ | 1231 | extern enum nss_status _nss_ ## service ## _gethostbyname_r \ |
979 | (const char *name, struct hostent *host, char *buffer, \ | 1232 | (const char *name, struct hostent *host, char *buffer, \ |
980 | size_t buflen, int *errnop, int *h_errnop); \ | 1233 | size_t buflen, int *errnop, int *h_errnop); \ |
981 | Index: git/inet/Makefile | 1234 | diff --git a/inet/Makefile b/inet/Makefile |
982 | =================================================================== | 1235 | index f1d871f..7cb1709 100644 |
983 | --- git.orig/inet/Makefile | 1236 | --- a/inet/Makefile |
984 | +++ git/inet/Makefile | 1237 | +++ b/inet/Makefile |
985 | @@ -18,6 +18,8 @@ | 1238 | @@ -18,6 +18,8 @@ |
986 | # | 1239 | # |
987 | # Sub-makefile for inet portion of the library. | 1240 | # Sub-makefile for inet portion of the library. |
@@ -991,7 +1244,7 @@ Index: git/inet/Makefile | |||
991 | subdir := inet | 1244 | subdir := inet |
992 | 1245 | ||
993 | include ../Makeconfig | 1246 | include ../Makeconfig |
994 | @@ -27,7 +29,8 @@ headers := netinet/ether.h netinet/in.h | 1247 | @@ -27,7 +29,8 @@ headers := netinet/ether.h netinet/in.h netinet/in_systm.h \ |
995 | netinet/tcp.h netinet/ip.h $(wildcard arpa/*.h protocols/*.h) \ | 1248 | netinet/tcp.h netinet/ip.h $(wildcard arpa/*.h protocols/*.h) \ |
996 | aliases.h ifaddrs.h netinet/ip6.h netinet/icmp6.h bits/in.h | 1249 | aliases.h ifaddrs.h netinet/ip6.h netinet/icmp6.h bits/in.h |
997 | 1250 | ||
@@ -1001,8 +1254,8 @@ Index: git/inet/Makefile | |||
1001 | inet_lnaof inet_mkadr \ | 1254 | inet_lnaof inet_mkadr \ |
1002 | inet_netof inet_ntoa inet_net herrno herrno-loc \ | 1255 | inet_netof inet_ntoa inet_net herrno herrno-loc \ |
1003 | gethstbyad gethstbyad_r gethstbynm gethstbynm2 gethstbynm2_r \ | 1256 | gethstbyad gethstbyad_r gethstbynm gethstbynm2 gethstbynm2_r \ |
1004 | @@ -41,18 +44,23 @@ routines := htonl htons \ | 1257 | @@ -39,18 +42,23 @@ routines := htonl htons \ |
1005 | getrpcent_r getrpcbyname_r getrpcbynumber_r \ | 1258 | getservent_r \ |
1006 | ether_aton ether_aton_r ether_hton ether_line \ | 1259 | ether_aton ether_aton_r ether_hton ether_line \ |
1007 | ether_ntoa ether_ntoa_r ether_ntoh \ | 1260 | ether_ntoa ether_ntoa_r ether_ntoh \ |
1008 | - rcmd rexec ruserpass \ | 1261 | - rcmd rexec ruserpass \ |
@@ -1031,10 +1284,31 @@ Index: git/inet/Makefile | |||
1031 | 1284 | ||
1032 | include ../Rules | 1285 | include ../Rules |
1033 | 1286 | ||
1034 | Index: git/intl/dcigettext.c | 1287 | diff --git a/intl/Makefile b/intl/Makefile |
1035 | =================================================================== | 1288 | index 9ecf8fe..587bc0d 100644 |
1036 | --- git.orig/intl/dcigettext.c | 1289 | --- a/intl/Makefile |
1037 | +++ git/intl/dcigettext.c | 1290 | +++ b/intl/Makefile |
1291 | @@ -16,6 +16,7 @@ | ||
1292 | # <http://www.gnu.org/licenses/>. | ||
1293 | |||
1294 | # Makefile for intl subdirectory: message handling code from GNU gettext. | ||
1295 | +include ../option-groups.mak | ||
1296 | |||
1297 | subdir = intl | ||
1298 | |||
1299 | @@ -48,7 +49,7 @@ endif | ||
1300 | $(objpfx)plural.o: plural.c | ||
1301 | |||
1302 | ifeq ($(run-built-tests),yes) | ||
1303 | -ifeq (yes,$(build-shared)) | ||
1304 | +ifeq (yyyes,$(OPTION_EGLIBC_LOCALES)$(OPTION_EGLIBC_LOCALE_CODE)$(build-shared)) | ||
1305 | ifneq ($(strip $(MSGFMT)),:) | ||
1306 | tests-special += $(objpfx)tst-translit.out $(objpfx)tst-gettext.out \ | ||
1307 | $(objpfx)tst-gettext2.out $(objpfx)tst-codeset.out \ | ||
1308 | diff --git a/intl/dcigettext.c b/intl/dcigettext.c | ||
1309 | index 8a3f091..e271648 100644 | ||
1310 | --- a/intl/dcigettext.c | ||
1311 | +++ b/intl/dcigettext.c | ||
1038 | @@ -100,11 +100,15 @@ extern int errno; | 1312 | @@ -100,11 +100,15 @@ extern int errno; |
1039 | # include "libgnuintl.h" | 1313 | # include "libgnuintl.h" |
1040 | #endif | 1314 | #endif |
@@ -1051,7 +1325,7 @@ Index: git/intl/dcigettext.c | |||
1051 | # define gl_rwlock_rdlock __libc_rwlock_rdlock | 1325 | # define gl_rwlock_rdlock __libc_rwlock_rdlock |
1052 | # define gl_rwlock_wrlock __libc_rwlock_wrlock | 1326 | # define gl_rwlock_wrlock __libc_rwlock_wrlock |
1053 | # define gl_rwlock_unlock __libc_rwlock_unlock | 1327 | # define gl_rwlock_unlock __libc_rwlock_unlock |
1054 | @@ -523,8 +527,10 @@ DCIGETTEXT (const char *domainname, cons | 1328 | @@ -523,8 +527,10 @@ DCIGETTEXT (const char *domainname, const char *msgid1, const char *msgid2, |
1055 | saved_errno = errno; | 1329 | saved_errno = errno; |
1056 | 1330 | ||
1057 | #ifdef _LIBC | 1331 | #ifdef _LIBC |
@@ -1064,7 +1338,7 @@ Index: git/intl/dcigettext.c | |||
1064 | #endif | 1338 | #endif |
1065 | 1339 | ||
1066 | gl_rwlock_rdlock (_nl_state_lock); | 1340 | gl_rwlock_rdlock (_nl_state_lock); |
1067 | @@ -550,7 +556,11 @@ DCIGETTEXT (const char *domainname, cons | 1341 | @@ -550,7 +556,11 @@ DCIGETTEXT (const char *domainname, const char *msgid1, const char *msgid2, |
1068 | #ifdef HAVE_PER_THREAD_LOCALE | 1342 | #ifdef HAVE_PER_THREAD_LOCALE |
1069 | # ifndef IN_LIBGLOCALE | 1343 | # ifndef IN_LIBGLOCALE |
1070 | # ifdef _LIBC | 1344 | # ifdef _LIBC |
@@ -1077,7 +1351,7 @@ Index: git/intl/dcigettext.c | |||
1077 | # else | 1351 | # else |
1078 | categoryname = category_to_name (category); | 1352 | categoryname = category_to_name (category); |
1079 | # define CATEGORYNAME_INITIALIZED | 1353 | # define CATEGORYNAME_INITIALIZED |
1080 | @@ -581,10 +591,12 @@ DCIGETTEXT (const char *domainname, cons | 1354 | @@ -581,10 +591,12 @@ DCIGETTEXT (const char *domainname, const char *msgid1, const char *msgid2, |
1081 | else | 1355 | else |
1082 | retval = (char *) (*foundp)->translation; | 1356 | retval = (char *) (*foundp)->translation; |
1083 | 1357 | ||
@@ -1092,7 +1366,7 @@ Index: git/intl/dcigettext.c | |||
1092 | __set_errno (saved_errno); | 1366 | __set_errno (saved_errno); |
1093 | return retval; | 1367 | return retval; |
1094 | } | 1368 | } |
1095 | @@ -838,10 +850,13 @@ DCIGETTEXT (const char *domainname, cons | 1369 | @@ -838,10 +850,13 @@ DCIGETTEXT (const char *domainname, const char *msgid1, const char *msgid2, |
1096 | if (plural) | 1370 | if (plural) |
1097 | retval = plural_lookup (domain, n, retval, retlen); | 1371 | retval = plural_lookup (domain, n, retval, retlen); |
1098 | 1372 | ||
@@ -1108,7 +1382,7 @@ Index: git/intl/dcigettext.c | |||
1108 | return retval; | 1382 | return retval; |
1109 | } | 1383 | } |
1110 | } | 1384 | } |
1111 | @@ -850,10 +865,12 @@ DCIGETTEXT (const char *domainname, cons | 1385 | @@ -850,10 +865,12 @@ DCIGETTEXT (const char *domainname, const char *msgid1, const char *msgid2, |
1112 | return_untranslated: | 1386 | return_untranslated: |
1113 | /* Return the untranslated MSGID. */ | 1387 | /* Return the untranslated MSGID. */ |
1114 | FREE_BLOCKS (block_list); | 1388 | FREE_BLOCKS (block_list); |
@@ -1123,7 +1397,7 @@ Index: git/intl/dcigettext.c | |||
1123 | #ifndef _LIBC | 1397 | #ifndef _LIBC |
1124 | if (!ENABLE_SECURE) | 1398 | if (!ENABLE_SECURE) |
1125 | { | 1399 | { |
1126 | @@ -1550,7 +1567,11 @@ guess_category_value (int category, cons | 1400 | @@ -1550,7 +1567,11 @@ guess_category_value (int category, const char *categoryname) |
1127 | `LC_xxx', and `LANG'. On some systems this can be done by the | 1401 | `LC_xxx', and `LANG'. On some systems this can be done by the |
1128 | `setlocale' function itself. */ | 1402 | `setlocale' function itself. */ |
1129 | # ifdef _LIBC | 1403 | # ifdef _LIBC |
@@ -1135,31 +1409,10 @@ Index: git/intl/dcigettext.c | |||
1135 | # else | 1409 | # else |
1136 | locale_defaulted = 0; | 1410 | locale_defaulted = 0; |
1137 | # if HAVE_USELOCALE | 1411 | # if HAVE_USELOCALE |
1138 | Index: git/intl/Makefile | 1412 | diff --git a/io/Makefile b/io/Makefile |
1139 | =================================================================== | 1413 | index 613dce0..697439e 100644 |
1140 | --- git.orig/intl/Makefile | 1414 | --- a/io/Makefile |
1141 | +++ git/intl/Makefile | 1415 | +++ b/io/Makefile |
1142 | @@ -16,6 +16,7 @@ | ||
1143 | # <http://www.gnu.org/licenses/>. | ||
1144 | |||
1145 | # Makefile for intl subdirectory: message handling code from GNU gettext. | ||
1146 | +include ../option-groups.mak | ||
1147 | |||
1148 | subdir = intl | ||
1149 | |||
1150 | @@ -48,7 +49,7 @@ endif | ||
1151 | $(objpfx)plural.o: plural.c | ||
1152 | |||
1153 | ifeq ($(run-built-tests),yes) | ||
1154 | -ifeq (yes,$(build-shared)) | ||
1155 | +ifeq (yyyes,$(OPTION_EGLIBC_LOCALES)$(OPTION_EGLIBC_LOCALE_CODE)$(build-shared)) | ||
1156 | ifneq ($(strip $(MSGFMT)),:) | ||
1157 | tests-special += $(objpfx)tst-translit.out $(objpfx)tst-gettext.out \ | ||
1158 | $(objpfx)tst-gettext2.out $(objpfx)tst-codeset.out \ | ||
1159 | Index: git/io/Makefile | ||
1160 | =================================================================== | ||
1161 | --- git.orig/io/Makefile | ||
1162 | +++ git/io/Makefile | ||
1163 | @@ -18,6 +18,8 @@ | 1416 | @@ -18,6 +18,8 @@ |
1164 | # | 1417 | # |
1165 | # Sub-makefile for I/O portion of the library. | 1418 | # Sub-makefile for I/O portion of the library. |
@@ -1193,7 +1446,7 @@ Index: git/io/Makefile | |||
1193 | 1446 | ||
1194 | aux := have_o_cloexec | 1447 | aux := have_o_cloexec |
1195 | 1448 | ||
1196 | @@ -64,18 +68,22 @@ static-only-routines = stat fstat lstat | 1449 | @@ -64,18 +68,22 @@ static-only-routines = stat fstat lstat stat64 fstat64 lstat64 \ |
1197 | fstatat fstatat64 mknod mknodat | 1450 | fstatat fstatat64 mknod mknodat |
1198 | 1451 | ||
1199 | others := pwd | 1452 | others := pwd |
@@ -1219,10 +1472,10 @@ Index: git/io/Makefile | |||
1219 | 1472 | ||
1220 | include ../Rules | 1473 | include ../Rules |
1221 | 1474 | ||
1222 | Index: git/libidn/Makefile | 1475 | diff --git a/libidn/Makefile b/libidn/Makefile |
1223 | =================================================================== | 1476 | index 940fa52..43aad0c 100644 |
1224 | --- git.orig/libidn/Makefile | 1477 | --- a/libidn/Makefile |
1225 | +++ git/libidn/Makefile | 1478 | +++ b/libidn/Makefile |
1226 | @@ -16,6 +16,7 @@ | 1479 | @@ -16,6 +16,7 @@ |
1227 | # <http://www.gnu.org/licenses/>. | 1480 | # <http://www.gnu.org/licenses/>. |
1228 | 1481 | ||
@@ -1242,10 +1495,10 @@ Index: git/libidn/Makefile | |||
1242 | 1495 | ||
1243 | libcidn-routines := punycode toutf8 nfkc stringprep rfc3454 profiles idna \ | 1496 | libcidn-routines := punycode toutf8 nfkc stringprep rfc3454 profiles idna \ |
1244 | iconvme | 1497 | iconvme |
1245 | Index: git/libidn/toutf8.c | 1498 | diff --git a/libidn/toutf8.c b/libidn/toutf8.c |
1246 | =================================================================== | 1499 | index c7e67ca..62df478 100644 |
1247 | --- git.orig/libidn/toutf8.c | 1500 | --- a/libidn/toutf8.c |
1248 | +++ git/libidn/toutf8.c | 1501 | +++ b/libidn/toutf8.c |
1249 | @@ -33,6 +33,11 @@ | 1502 | @@ -33,6 +33,11 @@ |
1250 | /* Get strlen. */ | 1503 | /* Get strlen. */ |
1251 | #include <string.h> | 1504 | #include <string.h> |
@@ -1271,11 +1524,138 @@ Index: git/libidn/toutf8.c | |||
1271 | #else | 1524 | #else |
1272 | /** | 1525 | /** |
1273 | * stringprep_locale_charset - return charset used in current locale | 1526 | * stringprep_locale_charset - return charset used in current locale |
1274 | Index: git/libio/fileops.c | 1527 | diff --git a/libio/Makefile b/libio/Makefile |
1275 | =================================================================== | 1528 | index 7b3bcf9..27c9186 100644 |
1276 | --- git.orig/libio/fileops.c | 1529 | --- a/libio/Makefile |
1277 | +++ git/libio/fileops.c | 1530 | +++ b/libio/Makefile |
1278 | @@ -38,6 +38,7 @@ | 1531 | @@ -18,6 +18,8 @@ |
1532 | # | ||
1533 | # Specific makefile for libio. | ||
1534 | # | ||
1535 | +include ../option-groups.mak | ||
1536 | + | ||
1537 | subdir := libio | ||
1538 | |||
1539 | include ../Makeconfig | ||
1540 | @@ -27,16 +29,13 @@ headers := stdio.h libio.h _G_config.h bits/stdio.h bits/stdio-lock.h \ | ||
1541 | |||
1542 | routines := \ | ||
1543 | filedoalloc iofclose iofdopen iofflush iofgetpos iofgets iofopen \ | ||
1544 | - iofopncook iofputs iofread iofsetpos ioftell wfiledoalloc \ | ||
1545 | + iofopncook iofputs iofread iofsetpos ioftell \ | ||
1546 | iofwrite iogetdelim iogetline iogets iopadn iopopen ioputs \ | ||
1547 | ioseekoff ioseekpos iosetbuffer iosetvbuf ioungetc \ | ||
1548 | iovsprintf iovsscanf \ | ||
1549 | iofgetpos64 iofopen64 iofsetpos64 \ | ||
1550 | - fputwc fputwc_u getwc getwc_u getwchar getwchar_u iofgetws iofgetws_u \ | ||
1551 | - iofputws iofputws_u iogetwline iowpadn ioungetwc putwc putwc_u \ | ||
1552 | - putwchar putwchar_u putchar putchar_u fwprintf swprintf vwprintf \ | ||
1553 | - wprintf wscanf fwscanf vwscanf vswprintf iovswscanf swscanf wgenops \ | ||
1554 | - wstrops wfileops iofwide fwide wmemstream \ | ||
1555 | + putchar putchar_u \ | ||
1556 | + iofwide \ | ||
1557 | \ | ||
1558 | clearerr feof ferror fileno fputc freopen fseek getc getchar \ | ||
1559 | memstream pclose putc putchar rewind setbuf setlinebuf vasprintf \ | ||
1560 | @@ -48,24 +47,49 @@ routines := \ | ||
1561 | \ | ||
1562 | libc_fatal fmemopen oldfmemopen | ||
1563 | |||
1564 | -tests = tst_swprintf tst_wprintf tst_swscanf tst_wscanf tst_getwc tst_putwc \ | ||
1565 | - tst_wprintf2 tst-widetext test-fmemopen tst-ext tst-ext2 \ | ||
1566 | - tst-fgetws tst-ungetwc1 tst-ungetwc2 tst-swscanf tst-sscanf \ | ||
1567 | - tst-mmap-setvbuf bug-ungetwc1 bug-ungetwc2 tst-atime tst-eof \ | ||
1568 | - tst-freopen bug-rewind bug-rewind2 bug-ungetc bug-fseek \ | ||
1569 | +routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR) += \ | ||
1570 | + wfiledoalloc \ | ||
1571 | + iowpadn \ | ||
1572 | + swprintf \ | ||
1573 | + vswprintf iovswscanf swscanf wgenops \ | ||
1574 | + wstrops wfileops wmemstream | ||
1575 | +routines-$(call option-disabled, OPTION_POSIX_C_LANG_WIDE_CHAR) += \ | ||
1576 | + wdummyfileops | ||
1577 | +routines-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) += \ | ||
1578 | + fputwc fputwc_u getwc getwc_u getwchar getwchar_u iofgetws iofgetws_u \ | ||
1579 | + iofputws iofputws_u iogetwline ioungetwc putwc putwc_u \ | ||
1580 | + putwchar putwchar_u fwprintf vwprintf \ | ||
1581 | + wprintf wscanf fwscanf vwscanf \ | ||
1582 | + fwide | ||
1583 | + | ||
1584 | +tests = test-fmemopen tst-ext tst-ext2 \ | ||
1585 | + tst-mmap-setvbuf tst-atime tst-eof \ | ||
1586 | + tst-freopen bug-ungetc bug-fseek \ | ||
1587 | tst-mmap-eofsync tst-mmap-fflushsync bug-mmap-fflush \ | ||
1588 | - tst-mmap2-eofsync tst-mmap-offend bug-fopena+ bug-wfflush \ | ||
1589 | - bug-ungetc2 bug-ftell bug-ungetc3 bug-ungetc4 tst-fopenloc2 \ | ||
1590 | + tst-mmap2-eofsync tst-mmap-offend bug-fopena+ \ | ||
1591 | + bug-ungetc2 bug-ungetc3 bug-ungetc4 \ | ||
1592 | tst-memstream1 tst-memstream2 \ | ||
1593 | - tst-wmemstream1 tst-wmemstream2 \ | ||
1594 | - bug-memstream1 bug-wmemstream1 \ | ||
1595 | - tst-setvbuf1 tst-popen1 tst-fgetwc bug-wsetpos tst-fseek \ | ||
1596 | - tst-fwrite-error tst-ftell-partial-wide tst-ftell-active-handler \ | ||
1597 | - tst-ftell-append tst-fputws | ||
1598 | + bug-memstream1 tst-popen1 tst-fwrite-error \ | ||
1599 | + tst-ftell-active-handler tst-ftell-append | ||
1600 | +tests-$(OPTION_EGLIBC_LOCALE_CODE) \ | ||
1601 | + += tst-swscanf tst-fgetws tst-setvbuf1 \ | ||
1602 | + tst-ungetwc1 tst-ungetwc2 bug-ftell bug-ungetwc2 \ | ||
1603 | + tst-widetext tst-fputws | ||
1604 | +tests-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) \ | ||
1605 | + += bug-rewind bug-rewind2 bug-ungetwc1 \ | ||
1606 | + bug-wfflush bug-wmemstream1 tst-fopenloc2 \ | ||
1607 | + tst_getwc \ | ||
1608 | + tst_putwc tst_wprintf tst_wprintf2 tst_wscanf \ | ||
1609 | + tst-fgetwc bug-wsetpos tst-fseek tst-ftell-partial-wide | ||
1610 | +tests-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \ | ||
1611 | + += tst_swprintf tst_swscanf \ | ||
1612 | + tst-sscanf \ | ||
1613 | + tst-wmemstream1 tst-wmemstream2 | ||
1614 | + | ||
1615 | ifeq (yes,$(build-shared)) | ||
1616 | # Add test-fopenloc only if shared library is enabled since it depends on | ||
1617 | # shared localedata objects. | ||
1618 | -tests += tst-fopenloc | ||
1619 | +tests-$(OPTION_EGLIBC_LOCALE_CODE) += tst-fopenloc | ||
1620 | endif | ||
1621 | test-srcs = test-freopen | ||
1622 | |||
1623 | @@ -164,13 +188,17 @@ shared-only-routines = oldiofopen oldiofdopen oldiofclose oldfileops \ | ||
1624 | oldiofsetpos64 | ||
1625 | |||
1626 | ifeq ($(run-built-tests),yes) | ||
1627 | +ifeq (y,$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO)) | ||
1628 | tests-special += $(objpfx)test-freopen.out | ||
1629 | +endif | ||
1630 | +ifeq (y,$(OPTION_EGLIBC_LOCALE_CODE)) | ||
1631 | ifeq (yes,$(build-shared)) | ||
1632 | # Run tst-fopenloc-cmp.out and tst-openloc-mem.out only if shared | ||
1633 | # library is enabled since they depend on tst-fopenloc.out. | ||
1634 | tests-special += $(objpfx)tst-fopenloc-cmp.out $(objpfx)tst-fopenloc-mem.out | ||
1635 | endif | ||
1636 | endif | ||
1637 | +endif | ||
1638 | |||
1639 | include ../Rules | ||
1640 | |||
1641 | diff --git a/libio/__fpurge.c b/libio/__fpurge.c | ||
1642 | index 065cf61..e32a3e9 100644 | ||
1643 | --- a/libio/__fpurge.c | ||
1644 | +++ b/libio/__fpurge.c | ||
1645 | @@ -21,7 +21,7 @@ | ||
1646 | void | ||
1647 | __fpurge (FILE *fp) | ||
1648 | { | ||
1649 | - if (fp->_mode > 0) | ||
1650 | + if (_IO_is_wide (fp)) | ||
1651 | { | ||
1652 | /* Wide-char stream. */ | ||
1653 | if (_IO_in_backup (fp)) | ||
1654 | diff --git a/libio/fileops.c b/libio/fileops.c | ||
1655 | index cbcd6f5..19e43c2 100644 | ||
1656 | --- a/libio/fileops.c | ||
1657 | +++ b/libio/fileops.c | ||
1658 | @@ -39,6 +39,7 @@ | ||
1279 | #include <string.h> | 1659 | #include <string.h> |
1280 | #include <errno.h> | 1660 | #include <errno.h> |
1281 | #include <unistd.h> | 1661 | #include <unistd.h> |
@@ -1283,7 +1663,7 @@ Index: git/libio/fileops.c | |||
1283 | #include <stdlib.h> | 1663 | #include <stdlib.h> |
1284 | #if _LIBC | 1664 | #if _LIBC |
1285 | # include "../wcsmbs/wcsmbsload.h" | 1665 | # include "../wcsmbs/wcsmbsload.h" |
1286 | @@ -172,7 +173,7 @@ _IO_new_file_close_it (_IO_FILE *fp) | 1666 | @@ -173,7 +174,7 @@ _IO_new_file_close_it (_IO_FILE *fp) |
1287 | 1667 | ||
1288 | /* Free buffer. */ | 1668 | /* Free buffer. */ |
1289 | #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T | 1669 | #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T |
@@ -1292,7 +1672,7 @@ Index: git/libio/fileops.c | |||
1292 | { | 1672 | { |
1293 | if (_IO_have_wbackup (fp)) | 1673 | if (_IO_have_wbackup (fp)) |
1294 | _IO_free_wbackup_area (fp); | 1674 | _IO_free_wbackup_area (fp); |
1295 | @@ -347,6 +348,7 @@ _IO_new_file_fopen (_IO_FILE *fp, const | 1675 | @@ -348,6 +349,7 @@ _IO_new_file_fopen (_IO_FILE *fp, const char *filename, const char *mode, |
1296 | cs = strstr (last_recognized + 1, ",ccs="); | 1676 | cs = strstr (last_recognized + 1, ",ccs="); |
1297 | if (cs != NULL) | 1677 | if (cs != NULL) |
1298 | { | 1678 | { |
@@ -1300,7 +1680,7 @@ Index: git/libio/fileops.c | |||
1300 | /* Yep. Load the appropriate conversions and set the orientation | 1680 | /* Yep. Load the appropriate conversions and set the orientation |
1301 | to wide. */ | 1681 | to wide. */ |
1302 | struct gconv_fcts fcts; | 1682 | struct gconv_fcts fcts; |
1303 | @@ -406,6 +408,12 @@ _IO_new_file_fopen (_IO_FILE *fp, const | 1683 | @@ -418,6 +420,12 @@ _IO_new_file_fopen (_IO_FILE *fp, const char *filename, const char *mode, |
1304 | 1684 | ||
1305 | /* Set the mode now. */ | 1685 | /* Set the mode now. */ |
1306 | result->_mode = 1; | 1686 | result->_mode = 1; |
@@ -1313,23 +1693,10 @@ Index: git/libio/fileops.c | |||
1313 | } | 1693 | } |
1314 | } | 1694 | } |
1315 | 1695 | ||
1316 | Index: git/libio/__fpurge.c | 1696 | diff --git a/libio/iofwide.c b/libio/iofwide.c |
1317 | =================================================================== | 1697 | index 0c175d1..3e9f52b 100644 |
1318 | --- git.orig/libio/__fpurge.c | 1698 | --- a/libio/iofwide.c |
1319 | +++ git/libio/__fpurge.c | 1699 | +++ b/libio/iofwide.c |
1320 | @@ -21,7 +21,7 @@ | ||
1321 | void | ||
1322 | __fpurge (FILE *fp) | ||
1323 | { | ||
1324 | - if (fp->_mode > 0) | ||
1325 | + if (_IO_is_wide (fp)) | ||
1326 | { | ||
1327 | /* Wide-char stream. */ | ||
1328 | if (_IO_in_backup (fp)) | ||
1329 | Index: git/libio/iofwide.c | ||
1330 | =================================================================== | ||
1331 | --- git.orig/libio/iofwide.c | ||
1332 | +++ git/libio/iofwide.c | ||
1333 | @@ -26,6 +26,7 @@ | 1700 | @@ -26,6 +26,7 @@ |
1334 | 1701 | ||
1335 | #include <libioP.h> | 1702 | #include <libioP.h> |
@@ -1347,7 +1714,7 @@ Index: git/libio/iofwide.c | |||
1347 | /* Prototypes of libio's codecvt functions. */ | 1714 | /* Prototypes of libio's codecvt functions. */ |
1348 | static enum __codecvt_result do_out (struct _IO_codecvt *codecvt, | 1715 | static enum __codecvt_result do_out (struct _IO_codecvt *codecvt, |
1349 | __mbstate_t *statep, | 1716 | __mbstate_t *statep, |
1350 | @@ -499,3 +502,26 @@ do_max_length (struct _IO_codecvt *codec | 1717 | @@ -499,3 +502,26 @@ do_max_length (struct _IO_codecvt *codecvt) |
1351 | return MB_CUR_MAX; | 1718 | return MB_CUR_MAX; |
1352 | #endif | 1719 | #endif |
1353 | } | 1720 | } |
@@ -1374,11 +1741,11 @@ Index: git/libio/iofwide.c | |||
1374 | +} | 1741 | +} |
1375 | + | 1742 | + |
1376 | +#endif | 1743 | +#endif |
1377 | Index: git/libio/ioseekoff.c | 1744 | diff --git a/libio/ioseekoff.c b/libio/ioseekoff.c |
1378 | =================================================================== | 1745 | index 11765cf..15d6230 100644 |
1379 | --- git.orig/libio/ioseekoff.c | 1746 | --- a/libio/ioseekoff.c |
1380 | +++ git/libio/ioseekoff.c | 1747 | +++ b/libio/ioseekoff.c |
1381 | @@ -60,7 +60,7 @@ _IO_seekoff_unlocked (fp, offset, dir, m | 1748 | @@ -60,7 +60,7 @@ _IO_seekoff_unlocked (fp, offset, dir, mode) |
1382 | else | 1749 | else |
1383 | abort (); | 1750 | abort (); |
1384 | } | 1751 | } |
@@ -1387,10 +1754,10 @@ Index: git/libio/ioseekoff.c | |||
1387 | _IO_free_backup_area (fp); | 1754 | _IO_free_backup_area (fp); |
1388 | else | 1755 | else |
1389 | _IO_free_wbackup_area (fp); | 1756 | _IO_free_wbackup_area (fp); |
1390 | Index: git/libio/ioseekpos.c | 1757 | diff --git a/libio/ioseekpos.c b/libio/ioseekpos.c |
1391 | =================================================================== | 1758 | index a7652a1..6938b68 100644 |
1392 | --- git.orig/libio/ioseekpos.c | 1759 | --- a/libio/ioseekpos.c |
1393 | +++ git/libio/ioseekpos.c | 1760 | +++ b/libio/ioseekpos.c |
1394 | @@ -35,7 +35,7 @@ _IO_seekpos_unlocked (fp, pos, mode) | 1761 | @@ -35,7 +35,7 @@ _IO_seekpos_unlocked (fp, pos, mode) |
1395 | /* If we have a backup buffer, get rid of it, since the __seekoff | 1762 | /* If we have a backup buffer, get rid of it, since the __seekoff |
1396 | callback may not know to do the right thing about it. | 1763 | callback may not know to do the right thing about it. |
@@ -1400,10 +1767,10 @@ Index: git/libio/ioseekpos.c | |||
1400 | { | 1767 | { |
1401 | if (_IO_have_backup (fp)) | 1768 | if (_IO_have_backup (fp)) |
1402 | _IO_free_backup_area (fp); | 1769 | _IO_free_backup_area (fp); |
1403 | Index: git/libio/iosetbuffer.c | 1770 | diff --git a/libio/iosetbuffer.c b/libio/iosetbuffer.c |
1404 | =================================================================== | 1771 | index 0a41c10..3d99fa0 100644 |
1405 | --- git.orig/libio/iosetbuffer.c | 1772 | --- a/libio/iosetbuffer.c |
1406 | +++ git/libio/iosetbuffer.c | 1773 | +++ b/libio/iosetbuffer.c |
1407 | @@ -24,6 +24,8 @@ | 1774 | @@ -24,6 +24,8 @@ |
1408 | This exception applies to code released by its copyright holders | 1775 | This exception applies to code released by its copyright holders |
1409 | in files containing the exception. */ | 1776 | in files containing the exception. */ |
@@ -1425,11 +1792,11 @@ Index: git/libio/iosetbuffer.c | |||
1425 | _IO_release_lock (fp); | 1792 | _IO_release_lock (fp); |
1426 | } | 1793 | } |
1427 | libc_hidden_def (_IO_setbuffer) | 1794 | libc_hidden_def (_IO_setbuffer) |
1428 | Index: git/libio/libioP.h | 1795 | diff --git a/libio/libioP.h b/libio/libioP.h |
1429 | =================================================================== | 1796 | index 0f16e2d..d2626d6 100644 |
1430 | --- git.orig/libio/libioP.h | 1797 | --- a/libio/libioP.h |
1431 | +++ git/libio/libioP.h | 1798 | +++ b/libio/libioP.h |
1432 | @@ -42,6 +42,10 @@ | 1799 | @@ -44,6 +44,10 @@ |
1433 | /*# include <comthread.h>*/ | 1800 | /*# include <comthread.h>*/ |
1434 | #endif | 1801 | #endif |
1435 | 1802 | ||
@@ -1440,7 +1807,7 @@ Index: git/libio/libioP.h | |||
1440 | #include <math_ldbl_opt.h> | 1807 | #include <math_ldbl_opt.h> |
1441 | 1808 | ||
1442 | #include "iolibio.h" | 1809 | #include "iolibio.h" |
1443 | @@ -508,8 +512,20 @@ extern void _IO_old_init (_IO_FILE *fp, | 1810 | @@ -523,8 +527,20 @@ extern void _IO_old_init (_IO_FILE *fp, int flags) __THROW; |
1444 | 1811 | ||
1445 | 1812 | ||
1446 | #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T | 1813 | #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T |
@@ -1462,124 +1829,11 @@ Index: git/libio/libioP.h | |||
1462 | ? _IO_do_write(_f, (_f)->_IO_write_base, \ | 1829 | ? _IO_do_write(_f, (_f)->_IO_write_base, \ |
1463 | (_f)->_IO_write_ptr-(_f)->_IO_write_base) \ | 1830 | (_f)->_IO_write_ptr-(_f)->_IO_write_base) \ |
1464 | : _IO_wdo_write(_f, (_f)->_wide_data->_IO_write_base, \ | 1831 | : _IO_wdo_write(_f, (_f)->_wide_data->_IO_write_base, \ |
1465 | Index: git/libio/Makefile | 1832 | diff --git a/libio/wdummyfileops.c b/libio/wdummyfileops.c |
1466 | =================================================================== | 1833 | new file mode 100644 |
1467 | --- git.orig/libio/Makefile | 1834 | index 0000000..c0150b8 |
1468 | +++ git/libio/Makefile | ||
1469 | @@ -18,6 +18,8 @@ | ||
1470 | # | ||
1471 | # Specific makefile for libio. | ||
1472 | # | ||
1473 | +include ../option-groups.mak | ||
1474 | + | ||
1475 | subdir := libio | ||
1476 | |||
1477 | include ../Makeconfig | ||
1478 | @@ -27,16 +29,13 @@ headers := stdio.h libio.h _G_config.h b | ||
1479 | |||
1480 | routines := \ | ||
1481 | filedoalloc iofclose iofdopen iofflush iofgetpos iofgets iofopen \ | ||
1482 | - iofopncook iofputs iofread iofsetpos ioftell wfiledoalloc \ | ||
1483 | + iofopncook iofputs iofread iofsetpos ioftell \ | ||
1484 | iofwrite iogetdelim iogetline iogets iopadn iopopen ioputs \ | ||
1485 | ioseekoff ioseekpos iosetbuffer iosetvbuf ioungetc \ | ||
1486 | iovsprintf iovsscanf \ | ||
1487 | iofgetpos64 iofopen64 iofsetpos64 \ | ||
1488 | - fputwc fputwc_u getwc getwc_u getwchar getwchar_u iofgetws iofgetws_u \ | ||
1489 | - iofputws iofputws_u iogetwline iowpadn ioungetwc putwc putwc_u \ | ||
1490 | - putwchar putwchar_u putchar putchar_u fwprintf swprintf vwprintf \ | ||
1491 | - wprintf wscanf fwscanf vwscanf vswprintf iovswscanf swscanf wgenops \ | ||
1492 | - wstrops wfileops iofwide fwide wmemstream \ | ||
1493 | + putchar putchar_u \ | ||
1494 | + iofwide \ | ||
1495 | \ | ||
1496 | clearerr feof ferror fileno fputc freopen fseek getc getchar \ | ||
1497 | memstream pclose putc putchar rewind setbuf setlinebuf vasprintf \ | ||
1498 | @@ -48,24 +47,49 @@ routines := \ | ||
1499 | \ | ||
1500 | libc_fatal fmemopen | ||
1501 | |||
1502 | -tests = tst_swprintf tst_wprintf tst_swscanf tst_wscanf tst_getwc tst_putwc \ | ||
1503 | - tst_wprintf2 tst-widetext test-fmemopen tst-ext tst-ext2 \ | ||
1504 | - tst-fgetws tst-ungetwc1 tst-ungetwc2 tst-swscanf tst-sscanf \ | ||
1505 | - tst-mmap-setvbuf bug-ungetwc1 bug-ungetwc2 tst-atime tst-eof \ | ||
1506 | - tst-freopen bug-rewind bug-rewind2 bug-ungetc bug-fseek \ | ||
1507 | +routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR) += \ | ||
1508 | + wfiledoalloc \ | ||
1509 | + iowpadn \ | ||
1510 | + swprintf \ | ||
1511 | + vswprintf iovswscanf swscanf wgenops \ | ||
1512 | + wstrops wfileops wmemstream | ||
1513 | +routines-$(call option-disabled, OPTION_POSIX_C_LANG_WIDE_CHAR) += \ | ||
1514 | + wdummyfileops | ||
1515 | +routines-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) += \ | ||
1516 | + fputwc fputwc_u getwc getwc_u getwchar getwchar_u iofgetws iofgetws_u \ | ||
1517 | + iofputws iofputws_u iogetwline ioungetwc putwc putwc_u \ | ||
1518 | + putwchar putwchar_u fwprintf vwprintf \ | ||
1519 | + wprintf wscanf fwscanf vwscanf \ | ||
1520 | + fwide | ||
1521 | + | ||
1522 | +tests = test-fmemopen tst-ext tst-ext2 \ | ||
1523 | + tst-mmap-setvbuf tst-atime tst-eof \ | ||
1524 | + tst-freopen bug-ungetc bug-fseek \ | ||
1525 | tst-mmap-eofsync tst-mmap-fflushsync bug-mmap-fflush \ | ||
1526 | - tst-mmap2-eofsync tst-mmap-offend bug-fopena+ bug-wfflush \ | ||
1527 | - bug-ungetc2 bug-ftell bug-ungetc3 bug-ungetc4 tst-fopenloc2 \ | ||
1528 | + tst-mmap2-eofsync tst-mmap-offend bug-fopena+ \ | ||
1529 | + bug-ungetc2 bug-ungetc3 bug-ungetc4 \ | ||
1530 | tst-memstream1 tst-memstream2 \ | ||
1531 | - tst-wmemstream1 tst-wmemstream2 \ | ||
1532 | - bug-memstream1 bug-wmemstream1 \ | ||
1533 | - tst-setvbuf1 tst-popen1 tst-fgetwc bug-wsetpos tst-fseek \ | ||
1534 | - tst-fwrite-error tst-ftell-partial-wide tst-ftell-active-handler \ | ||
1535 | - tst-ftell-append tst-fputws | ||
1536 | + bug-memstream1 tst-popen1 tst-fwrite-error \ | ||
1537 | + tst-ftell-active-handler tst-ftell-append | ||
1538 | +tests-$(OPTION_EGLIBC_LOCALE_CODE) \ | ||
1539 | + += tst-swscanf tst-fgetws tst-setvbuf1 \ | ||
1540 | + tst-ungetwc1 tst-ungetwc2 bug-ftell bug-ungetwc2 \ | ||
1541 | + tst-widetext tst-fputws | ||
1542 | +tests-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) \ | ||
1543 | + += bug-rewind bug-rewind2 bug-ungetwc1 \ | ||
1544 | + bug-wfflush bug-wmemstream1 tst-fopenloc2 \ | ||
1545 | + tst_getwc \ | ||
1546 | + tst_putwc tst_wprintf tst_wprintf2 tst_wscanf \ | ||
1547 | + tst-fgetwc bug-wsetpos tst-fseek tst-ftell-partial-wide | ||
1548 | +tests-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \ | ||
1549 | + += tst_swprintf tst_swscanf \ | ||
1550 | + tst-sscanf \ | ||
1551 | + tst-wmemstream1 tst-wmemstream2 | ||
1552 | + | ||
1553 | ifeq (yes,$(build-shared)) | ||
1554 | # Add test-fopenloc only if shared library is enabled since it depends on | ||
1555 | # shared localedata objects. | ||
1556 | -tests += tst-fopenloc | ||
1557 | +tests-$(OPTION_EGLIBC_LOCALE_CODE) += tst-fopenloc | ||
1558 | endif | ||
1559 | test-srcs = test-freopen | ||
1560 | |||
1561 | @@ -164,13 +188,17 @@ shared-only-routines = oldiofopen oldiof | ||
1562 | oldiofsetpos64 | ||
1563 | |||
1564 | ifeq ($(run-built-tests),yes) | ||
1565 | +ifeq (y,$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO)) | ||
1566 | tests-special += $(objpfx)test-freopen.out | ||
1567 | +endif | ||
1568 | +ifeq (y,$(OPTION_EGLIBC_LOCALE_CODE)) | ||
1569 | ifeq (yes,$(build-shared)) | ||
1570 | # Run tst-fopenloc-cmp.out and tst-openloc-mem.out only if shared | ||
1571 | # library is enabled since they depend on tst-fopenloc.out. | ||
1572 | tests-special += $(objpfx)tst-fopenloc-cmp.out $(objpfx)tst-fopenloc-mem.out | ||
1573 | endif | ||
1574 | endif | ||
1575 | +endif | ||
1576 | |||
1577 | include ../Rules | ||
1578 | |||
1579 | Index: git/libio/wdummyfileops.c | ||
1580 | =================================================================== | ||
1581 | --- /dev/null | 1835 | --- /dev/null |
1582 | +++ git/libio/wdummyfileops.c | 1836 | +++ b/libio/wdummyfileops.c |
1583 | @@ -0,0 +1,161 @@ | 1837 | @@ -0,0 +1,161 @@ |
1584 | +/* Copyright (C) 2007 Free Software Foundation, Inc. | 1838 | +/* Copyright (C) 2007 Free Software Foundation, Inc. |
1585 | + This file is part of the GNU C Library. | 1839 | + This file is part of the GNU C Library. |
@@ -1742,63 +1996,10 @@ Index: git/libio/wdummyfileops.c | |||
1742 | +libc_hidden_data_def (_IO_wfile_jumps) | 1996 | +libc_hidden_data_def (_IO_wfile_jumps) |
1743 | +strong_alias (_IO_wfile_jumps_disabled, _IO_wfile_jumps_mmap) | 1997 | +strong_alias (_IO_wfile_jumps_disabled, _IO_wfile_jumps_mmap) |
1744 | +strong_alias (_IO_wfile_jumps_disabled, _IO_wfile_jumps_maybe_mmap) | 1998 | +strong_alias (_IO_wfile_jumps_disabled, _IO_wfile_jumps_maybe_mmap) |
1745 | Index: git/locale/catnames.c | 1999 | diff --git a/locale/C-ctype.c b/locale/C-ctype.c |
1746 | =================================================================== | 2000 | index aa5f19f..06be081 100644 |
1747 | --- /dev/null | 2001 | --- a/locale/C-ctype.c |
1748 | +++ git/locale/catnames.c | 2002 | +++ b/locale/C-ctype.c |
1749 | @@ -0,0 +1,48 @@ | ||
1750 | +/* Copyright (C) 2006 Free Software Foundation, Inc. | ||
1751 | + This file is part of the GNU C Library. | ||
1752 | + | ||
1753 | + The GNU C Library is free software; you can redistribute it and/or | ||
1754 | + modify it under the terms of the GNU Lesser General Public | ||
1755 | + License as published by the Free Software Foundation; either | ||
1756 | + version 2.1 of the License, or (at your option) any later version. | ||
1757 | + | ||
1758 | + The GNU C Library is distributed in the hope that it will be useful, | ||
1759 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1760 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
1761 | + Lesser General Public License for more details. | ||
1762 | + | ||
1763 | + You should have received a copy of the GNU Lesser General Public | ||
1764 | + License along with the GNU C Library; if not, write to the Free | ||
1765 | + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
1766 | + 02111-1307 USA. */ | ||
1767 | + | ||
1768 | +#include "localeinfo.h" | ||
1769 | + | ||
1770 | +/* Define an array of category names (also the environment variable names). */ | ||
1771 | +const union catnamestr_t _nl_category_names attribute_hidden = | ||
1772 | + { | ||
1773 | + { | ||
1774 | +#define DEFINE_CATEGORY(category, category_name, items, a) \ | ||
1775 | + category_name, | ||
1776 | +#include "categories.def" | ||
1777 | +#undef DEFINE_CATEGORY | ||
1778 | + } | ||
1779 | + }; | ||
1780 | + | ||
1781 | +const uint8_t _nl_category_name_idxs[__LC_LAST] attribute_hidden = | ||
1782 | + { | ||
1783 | +#define DEFINE_CATEGORY(category, category_name, items, a) \ | ||
1784 | + [category] = offsetof (union catnamestr_t, CATNAMEMF (__LINE__)), | ||
1785 | +#include "categories.def" | ||
1786 | +#undef DEFINE_CATEGORY | ||
1787 | + }; | ||
1788 | + | ||
1789 | +/* An array of their lengths, for convenience. */ | ||
1790 | +const uint8_t _nl_category_name_sizes[] attribute_hidden = | ||
1791 | + { | ||
1792 | +#define DEFINE_CATEGORY(category, category_name, items, a) \ | ||
1793 | + [category] = sizeof (category_name) - 1, | ||
1794 | +#include "categories.def" | ||
1795 | +#undef DEFINE_CATEGORY | ||
1796 | + [LC_ALL] = sizeof ("LC_ALL") - 1 | ||
1797 | + }; | ||
1798 | Index: git/locale/C-ctype.c | ||
1799 | =================================================================== | ||
1800 | --- git.orig/locale/C-ctype.c | ||
1801 | +++ git/locale/C-ctype.c | ||
1802 | @@ -19,8 +19,11 @@ | 2003 | @@ -19,8 +19,11 @@ |
1803 | #include "localeinfo.h" | 2004 | #include "localeinfo.h" |
1804 | #include <endian.h> | 2005 | #include <endian.h> |
@@ -1811,7 +2012,7 @@ Index: git/locale/C-ctype.c | |||
1811 | 2012 | ||
1812 | /* This table's entries are taken from POSIX.2 Table 2-6 | 2013 | /* This table's entries are taken from POSIX.2 Table 2-6 |
1813 | ``LC_CTYPE Category Definition in the POSIX Locale''. | 2014 | ``LC_CTYPE Category Definition in the POSIX Locale''. |
1814 | @@ -647,6 +650,7 @@ const struct __locale_data _nl_C_LC_CTYP | 2015 | @@ -634,6 +637,7 @@ const struct __locale_data _nl_C_LC_CTYPE attribute_hidden = |
1815 | { .word = L'7' }, | 2016 | { .word = L'7' }, |
1816 | { .word = L'8' }, | 2017 | { .word = L'8' }, |
1817 | { .word = L'9' }, | 2018 | { .word = L'9' }, |
@@ -1819,7 +2020,7 @@ Index: git/locale/C-ctype.c | |||
1819 | /* _NL_CTYPE_TRANSLIT_TAB_SIZE */ | 2020 | /* _NL_CTYPE_TRANSLIT_TAB_SIZE */ |
1820 | { .word = NTRANSLIT }, | 2021 | { .word = NTRANSLIT }, |
1821 | /* _NL_CTYPE_TRANSLIT_FROM_IDX */ | 2022 | /* _NL_CTYPE_TRANSLIT_FROM_IDX */ |
1822 | @@ -657,6 +661,22 @@ const struct __locale_data _nl_C_LC_CTYP | 2023 | @@ -644,6 +648,22 @@ const struct __locale_data _nl_C_LC_CTYPE attribute_hidden = |
1823 | { .wstr = translit_to_idx }, | 2024 | { .wstr = translit_to_idx }, |
1824 | /* _NL_CTYPE_TRANSLIT_TO_TBL */ | 2025 | /* _NL_CTYPE_TRANSLIT_TO_TBL */ |
1825 | { .wstr = (uint32_t *) translit_to_tbl }, | 2026 | { .wstr = (uint32_t *) translit_to_tbl }, |
@@ -1842,61 +2043,10 @@ Index: git/locale/C-ctype.c | |||
1842 | /* _NL_CTYPE_TRANSLIT_DEFAULT_MISSING_LEN */ | 2043 | /* _NL_CTYPE_TRANSLIT_DEFAULT_MISSING_LEN */ |
1843 | { .word = 1 }, | 2044 | { .word = 1 }, |
1844 | /* _NL_CTYPE_TRANSLIT_DEFAULT_MISSING */ | 2045 | /* _NL_CTYPE_TRANSLIT_DEFAULT_MISSING */ |
1845 | Index: git/locale/dummy-setlocale.c | 2046 | diff --git a/locale/Makefile b/locale/Makefile |
1846 | =================================================================== | 2047 | index f1b4343..599a1a9 100644 |
1847 | --- /dev/null | 2048 | --- a/locale/Makefile |
1848 | +++ git/locale/dummy-setlocale.c | 2049 | +++ b/locale/Makefile |
1849 | @@ -0,0 +1,33 @@ | ||
1850 | +/* Copyright (C) 2006 Free Software Foundation, Inc. | ||
1851 | + This file is part of the GNU C Library. | ||
1852 | + | ||
1853 | + The GNU C Library is free software; you can redistribute it and/or | ||
1854 | + modify it under the terms of the GNU Lesser General Public | ||
1855 | + License as published by the Free Software Foundation; either | ||
1856 | + version 2.1 of the License, or (at your option) any later version. | ||
1857 | + | ||
1858 | + The GNU C Library is distributed in the hope that it will be useful, | ||
1859 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1860 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
1861 | + Lesser General Public License for more details. | ||
1862 | + | ||
1863 | + You should have received a copy of the GNU Lesser General Public | ||
1864 | + License along with the GNU C Library; if not, write to the Free | ||
1865 | + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
1866 | + 02111-1307 USA. */ | ||
1867 | + | ||
1868 | +#include <string.h> | ||
1869 | +#include <locale.h> | ||
1870 | + | ||
1871 | +char * | ||
1872 | +setlocale (int category, const char *locale) | ||
1873 | +{ | ||
1874 | + if (! locale | ||
1875 | + || locale[0] == '\0' | ||
1876 | + || strcmp (locale, "C") == 0 | ||
1877 | + || strcmp (locale, "POSIX") == 0) | ||
1878 | + return (char *) "C"; | ||
1879 | + else | ||
1880 | + return NULL; | ||
1881 | +} | ||
1882 | +libc_hidden_def (setlocale) | ||
1883 | Index: git/locale/localeinfo.h | ||
1884 | =================================================================== | ||
1885 | --- git.orig/locale/localeinfo.h | ||
1886 | +++ git/locale/localeinfo.h | ||
1887 | @@ -224,7 +224,7 @@ __libc_tsd_define (extern, __locale_t, L | ||
1888 | unused. We can manage this playing some tricks with weak references. | ||
1889 | But with thread-local locale settings, it becomes quite ungainly unless | ||
1890 | we can use __thread variables. So only in that case do we attempt this. */ | ||
1891 | -#ifndef SHARED | ||
1892 | +#if !defined SHARED && !defined IN_GLIBC_LOCALEDEF | ||
1893 | # include <tls.h> | ||
1894 | # define NL_CURRENT_INDIRECT 1 | ||
1895 | #endif | ||
1896 | Index: git/locale/Makefile | ||
1897 | =================================================================== | ||
1898 | --- git.orig/locale/Makefile | ||
1899 | +++ git/locale/Makefile | ||
1900 | @@ -18,27 +18,43 @@ | 2050 | @@ -18,27 +18,43 @@ |
1901 | # | 2051 | # |
1902 | # Makefile for locales. | 2052 | # Makefile for locales. |
@@ -1952,7 +2102,7 @@ Index: git/locale/Makefile | |||
1952 | 2102 | ||
1953 | libBrokenLocale-routines = broken_cur_max | 2103 | libBrokenLocale-routines = broken_cur_max |
1954 | 2104 | ||
1955 | @@ -93,6 +109,9 @@ CPPFLAGS-locale-programs = -DLOCALE_PATH | 2105 | @@ -93,6 +109,9 @@ CPPFLAGS-locale-programs = -DLOCALE_PATH='$(localepath)' \ |
1956 | CFLAGS-charmap.c = -Wno-write-strings -Wno-char-subscripts | 2106 | CFLAGS-charmap.c = -Wno-write-strings -Wno-char-subscripts |
1957 | CFLAGS-locfile.c = -Wno-write-strings -Wno-char-subscripts | 2107 | CFLAGS-locfile.c = -Wno-write-strings -Wno-char-subscripts |
1958 | CFLAGS-charmap-dir.c = -Wno-write-strings | 2108 | CFLAGS-charmap-dir.c = -Wno-write-strings |
@@ -1962,10 +2112,116 @@ Index: git/locale/Makefile | |||
1962 | 2112 | ||
1963 | # Set libof-* for each routine. | 2113 | # Set libof-* for each routine. |
1964 | cpp-srcs-left := $(localedef-modules) $(localedef-aux) $(locale-modules) \ | 2114 | cpp-srcs-left := $(localedef-modules) $(localedef-aux) $(locale-modules) \ |
1965 | Index: git/locale/programs/charmap-dir.c | 2115 | diff --git a/locale/catnames.c b/locale/catnames.c |
1966 | =================================================================== | 2116 | new file mode 100644 |
1967 | --- git.orig/locale/programs/charmap-dir.c | 2117 | index 0000000..9fad357 |
1968 | +++ git/locale/programs/charmap-dir.c | 2118 | --- /dev/null |
2119 | +++ b/locale/catnames.c | ||
2120 | @@ -0,0 +1,48 @@ | ||
2121 | +/* Copyright (C) 2006 Free Software Foundation, Inc. | ||
2122 | + This file is part of the GNU C Library. | ||
2123 | + | ||
2124 | + The GNU C Library is free software; you can redistribute it and/or | ||
2125 | + modify it under the terms of the GNU Lesser General Public | ||
2126 | + License as published by the Free Software Foundation; either | ||
2127 | + version 2.1 of the License, or (at your option) any later version. | ||
2128 | + | ||
2129 | + The GNU C Library is distributed in the hope that it will be useful, | ||
2130 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2131 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
2132 | + Lesser General Public License for more details. | ||
2133 | + | ||
2134 | + You should have received a copy of the GNU Lesser General Public | ||
2135 | + License along with the GNU C Library; if not, write to the Free | ||
2136 | + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
2137 | + 02111-1307 USA. */ | ||
2138 | + | ||
2139 | +#include "localeinfo.h" | ||
2140 | + | ||
2141 | +/* Define an array of category names (also the environment variable names). */ | ||
2142 | +const union catnamestr_t _nl_category_names attribute_hidden = | ||
2143 | + { | ||
2144 | + { | ||
2145 | +#define DEFINE_CATEGORY(category, category_name, items, a) \ | ||
2146 | + category_name, | ||
2147 | +#include "categories.def" | ||
2148 | +#undef DEFINE_CATEGORY | ||
2149 | + } | ||
2150 | + }; | ||
2151 | + | ||
2152 | +const uint8_t _nl_category_name_idxs[__LC_LAST] attribute_hidden = | ||
2153 | + { | ||
2154 | +#define DEFINE_CATEGORY(category, category_name, items, a) \ | ||
2155 | + [category] = offsetof (union catnamestr_t, CATNAMEMF (__LINE__)), | ||
2156 | +#include "categories.def" | ||
2157 | +#undef DEFINE_CATEGORY | ||
2158 | + }; | ||
2159 | + | ||
2160 | +/* An array of their lengths, for convenience. */ | ||
2161 | +const uint8_t _nl_category_name_sizes[] attribute_hidden = | ||
2162 | + { | ||
2163 | +#define DEFINE_CATEGORY(category, category_name, items, a) \ | ||
2164 | + [category] = sizeof (category_name) - 1, | ||
2165 | +#include "categories.def" | ||
2166 | +#undef DEFINE_CATEGORY | ||
2167 | + [LC_ALL] = sizeof ("LC_ALL") - 1 | ||
2168 | + }; | ||
2169 | diff --git a/locale/dummy-setlocale.c b/locale/dummy-setlocale.c | ||
2170 | new file mode 100644 | ||
2171 | index 0000000..219964a | ||
2172 | --- /dev/null | ||
2173 | +++ b/locale/dummy-setlocale.c | ||
2174 | @@ -0,0 +1,33 @@ | ||
2175 | +/* Copyright (C) 2006 Free Software Foundation, Inc. | ||
2176 | + This file is part of the GNU C Library. | ||
2177 | + | ||
2178 | + The GNU C Library is free software; you can redistribute it and/or | ||
2179 | + modify it under the terms of the GNU Lesser General Public | ||
2180 | + License as published by the Free Software Foundation; either | ||
2181 | + version 2.1 of the License, or (at your option) any later version. | ||
2182 | + | ||
2183 | + The GNU C Library is distributed in the hope that it will be useful, | ||
2184 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2185 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
2186 | + Lesser General Public License for more details. | ||
2187 | + | ||
2188 | + You should have received a copy of the GNU Lesser General Public | ||
2189 | + License along with the GNU C Library; if not, write to the Free | ||
2190 | + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
2191 | + 02111-1307 USA. */ | ||
2192 | + | ||
2193 | +#include <string.h> | ||
2194 | +#include <locale.h> | ||
2195 | + | ||
2196 | +char * | ||
2197 | +setlocale (int category, const char *locale) | ||
2198 | +{ | ||
2199 | + if (! locale | ||
2200 | + || locale[0] == '\0' | ||
2201 | + || strcmp (locale, "C") == 0 | ||
2202 | + || strcmp (locale, "POSIX") == 0) | ||
2203 | + return (char *) "C"; | ||
2204 | + else | ||
2205 | + return NULL; | ||
2206 | +} | ||
2207 | +libc_hidden_def (setlocale) | ||
2208 | diff --git a/locale/localeinfo.h b/locale/localeinfo.h | ||
2209 | index bdab9fe..a7516c0 100644 | ||
2210 | --- a/locale/localeinfo.h | ||
2211 | +++ b/locale/localeinfo.h | ||
2212 | @@ -232,7 +232,7 @@ __libc_tsd_define (extern, __locale_t, LOCALE) | ||
2213 | unused. We can manage this playing some tricks with weak references. | ||
2214 | But with thread-local locale settings, it becomes quite ungainly unless | ||
2215 | we can use __thread variables. So only in that case do we attempt this. */ | ||
2216 | -#ifndef SHARED | ||
2217 | +#if !defined SHARED && !defined IN_GLIBC_LOCALEDEF | ||
2218 | # include <tls.h> | ||
2219 | # define NL_CURRENT_INDIRECT 1 | ||
2220 | #endif | ||
2221 | diff --git a/locale/programs/charmap-dir.c b/locale/programs/charmap-dir.c | ||
2222 | index cf7adea..ef3b811 100644 | ||
2223 | --- a/locale/programs/charmap-dir.c | ||
2224 | +++ b/locale/programs/charmap-dir.c | ||
1969 | @@ -19,7 +19,9 @@ | 2225 | @@ -19,7 +19,9 @@ |
1970 | #include <error.h> | 2226 | #include <error.h> |
1971 | #include <fcntl.h> | 2227 | #include <fcntl.h> |
@@ -1984,7 +2240,7 @@ Index: git/locale/programs/charmap-dir.c | |||
1984 | /* Creates a subprocess decompressing the given pathname, and returns | 2240 | /* Creates a subprocess decompressing the given pathname, and returns |
1985 | a stream reading its output (the decompressed data). */ | 2241 | a stream reading its output (the decompressed data). */ |
1986 | static | 2242 | static |
1987 | @@ -204,6 +207,7 @@ fopen_uncompressed (const char *pathname | 2243 | @@ -204,6 +207,7 @@ fopen_uncompressed (const char *pathname, const char *compressor) |
1988 | } | 2244 | } |
1989 | return NULL; | 2245 | return NULL; |
1990 | } | 2246 | } |
@@ -1992,7 +2248,7 @@ Index: git/locale/programs/charmap-dir.c | |||
1992 | 2248 | ||
1993 | /* Opens a charmap for reading, given its name (not an alias name). */ | 2249 | /* Opens a charmap for reading, given its name (not an alias name). */ |
1994 | FILE * | 2250 | FILE * |
1995 | @@ -226,6 +230,7 @@ charmap_open (const char *directory, con | 2251 | @@ -226,6 +230,7 @@ charmap_open (const char *directory, const char *name) |
1996 | if (stream != NULL) | 2252 | if (stream != NULL) |
1997 | return stream; | 2253 | return stream; |
1998 | 2254 | ||
@@ -2000,7 +2256,7 @@ Index: git/locale/programs/charmap-dir.c | |||
2000 | memcpy (p, ".gz", 4); | 2256 | memcpy (p, ".gz", 4); |
2001 | stream = fopen_uncompressed (pathname, "gzip"); | 2257 | stream = fopen_uncompressed (pathname, "gzip"); |
2002 | if (stream != NULL) | 2258 | if (stream != NULL) |
2003 | @@ -235,6 +240,7 @@ charmap_open (const char *directory, con | 2259 | @@ -235,6 +240,7 @@ charmap_open (const char *directory, const char *name) |
2004 | stream = fopen_uncompressed (pathname, "bzip2"); | 2260 | stream = fopen_uncompressed (pathname, "bzip2"); |
2005 | if (stream != NULL) | 2261 | if (stream != NULL) |
2006 | return stream; | 2262 | return stream; |
@@ -2008,11 +2264,11 @@ Index: git/locale/programs/charmap-dir.c | |||
2008 | 2264 | ||
2009 | return NULL; | 2265 | return NULL; |
2010 | } | 2266 | } |
2011 | Index: git/locale/programs/ld-collate.c | 2267 | diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c |
2012 | =================================================================== | 2268 | index a39a94f..16e9039 100644 |
2013 | --- git.orig/locale/programs/ld-collate.c | 2269 | --- a/locale/programs/ld-collate.c |
2014 | +++ git/locale/programs/ld-collate.c | 2270 | +++ b/locale/programs/ld-collate.c |
2015 | @@ -350,7 +350,7 @@ new_element (struct locale_collate_t *co | 2271 | @@ -351,7 +351,7 @@ new_element (struct locale_collate_t *collate, const char *mbs, size_t mbslen, |
2016 | } | 2272 | } |
2017 | if (wcs != NULL) | 2273 | if (wcs != NULL) |
2018 | { | 2274 | { |
@@ -2021,7 +2277,7 @@ Index: git/locale/programs/ld-collate.c | |||
2021 | uint32_t zero = 0; | 2277 | uint32_t zero = 0; |
2022 | /* Handle <U0000> as a single character. */ | 2278 | /* Handle <U0000> as a single character. */ |
2023 | if (nwcs == 0) | 2279 | if (nwcs == 0) |
2024 | @@ -1776,8 +1776,7 @@ symbol `%s' has the same encoding as"), | 2280 | @@ -1777,8 +1777,7 @@ symbol `%s' has the same encoding as"), (*eptr)->name); |
2025 | 2281 | ||
2026 | if ((*eptr)->nwcs == runp->nwcs) | 2282 | if ((*eptr)->nwcs == runp->nwcs) |
2027 | { | 2283 | { |
@@ -2031,7 +2287,7 @@ Index: git/locale/programs/ld-collate.c | |||
2031 | 2287 | ||
2032 | if (c == 0) | 2288 | if (c == 0) |
2033 | { | 2289 | { |
2034 | @@ -2010,9 +2009,9 @@ add_to_tablewc (uint32_t ch, struct elem | 2290 | @@ -2011,9 +2010,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp) |
2035 | one consecutive entry. */ | 2291 | one consecutive entry. */ |
2036 | if (runp->wcnext != NULL | 2292 | if (runp->wcnext != NULL |
2037 | && runp->nwcs == runp->wcnext->nwcs | 2293 | && runp->nwcs == runp->wcnext->nwcs |
@@ -2044,7 +2300,7 @@ Index: git/locale/programs/ld-collate.c | |||
2044 | && (runp->wcs[runp->nwcs - 1] | 2300 | && (runp->wcs[runp->nwcs - 1] |
2045 | == runp->wcnext->wcs[runp->nwcs - 1] + 1)) | 2301 | == runp->wcnext->wcs[runp->nwcs - 1] + 1)) |
2046 | { | 2302 | { |
2047 | @@ -2036,9 +2035,9 @@ add_to_tablewc (uint32_t ch, struct elem | 2303 | @@ -2037,9 +2036,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp) |
2048 | runp = runp->wcnext; | 2304 | runp = runp->wcnext; |
2049 | while (runp->wcnext != NULL | 2305 | while (runp->wcnext != NULL |
2050 | && runp->nwcs == runp->wcnext->nwcs | 2306 | && runp->nwcs == runp->wcnext->nwcs |
@@ -2057,11 +2313,11 @@ Index: git/locale/programs/ld-collate.c | |||
2057 | && (runp->wcs[runp->nwcs - 1] | 2313 | && (runp->wcs[runp->nwcs - 1] |
2058 | == runp->wcnext->wcs[runp->nwcs - 1] + 1)); | 2314 | == runp->wcnext->wcs[runp->nwcs - 1] + 1)); |
2059 | 2315 | ||
2060 | Index: git/locale/programs/ld-ctype.c | 2316 | diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c |
2061 | =================================================================== | 2317 | index 3f464ef..b7b6b51 100644 |
2062 | --- git.orig/locale/programs/ld-ctype.c | 2318 | --- a/locale/programs/ld-ctype.c |
2063 | +++ git/locale/programs/ld-ctype.c | 2319 | +++ b/locale/programs/ld-ctype.c |
2064 | @@ -960,7 +960,7 @@ ctype_output (struct localedef_t *locale | 2320 | @@ -926,7 +926,7 @@ ctype_output (struct localedef_t *locale, const struct charmap_t *charmap, |
2065 | allocate_arrays (ctype, charmap, ctype->repertoire); | 2321 | allocate_arrays (ctype, charmap, ctype->repertoire); |
2066 | 2322 | ||
2067 | default_missing_len = (ctype->default_missing | 2323 | default_missing_len = (ctype->default_missing |
@@ -2070,7 +2326,7 @@ Index: git/locale/programs/ld-ctype.c | |||
2070 | : 0); | 2326 | : 0); |
2071 | 2327 | ||
2072 | init_locale_data (&file, nelems); | 2328 | init_locale_data (&file, nelems); |
2073 | @@ -1971,7 +1971,7 @@ read_translit_entry (struct linereader * | 2329 | @@ -1937,7 +1937,7 @@ read_translit_entry (struct linereader *ldfile, struct locale_ctype_t *ctype, |
2074 | ignore = 1; | 2330 | ignore = 1; |
2075 | else | 2331 | else |
2076 | /* This value is usable. */ | 2332 | /* This value is usable. */ |
@@ -2079,7 +2335,7 @@ Index: git/locale/programs/ld-ctype.c | |||
2079 | 2335 | ||
2080 | first = 0; | 2336 | first = 0; |
2081 | } | 2337 | } |
2082 | @@ -2519,8 +2519,8 @@ with character code range values one mus | 2338 | @@ -2471,8 +2471,8 @@ with character code range values one must use the absolute ellipsis `...'")); |
2083 | } | 2339 | } |
2084 | 2340 | ||
2085 | handle_tok_digit: | 2341 | handle_tok_digit: |
@@ -2090,7 +2346,7 @@ Index: git/locale/programs/ld-ctype.c | |||
2090 | handle_digits = 1; | 2346 | handle_digits = 1; |
2091 | goto read_charclass; | 2347 | goto read_charclass; |
2092 | 2348 | ||
2093 | @@ -4002,8 +4002,7 @@ allocate_arrays (struct locale_ctype_t * | 2349 | @@ -3929,8 +3929,7 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap, |
2094 | 2350 | ||
2095 | while (idx < number) | 2351 | while (idx < number) |
2096 | { | 2352 | { |
@@ -2100,7 +2356,7 @@ Index: git/locale/programs/ld-ctype.c | |||
2100 | if (res == 0) | 2356 | if (res == 0) |
2101 | { | 2357 | { |
2102 | replace = 1; | 2358 | replace = 1; |
2103 | @@ -4040,11 +4039,11 @@ allocate_arrays (struct locale_ctype_t * | 2359 | @@ -3967,11 +3966,11 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap, |
2104 | for (size_t cnt = 0; cnt < number; ++cnt) | 2360 | for (size_t cnt = 0; cnt < number; ++cnt) |
2105 | { | 2361 | { |
2106 | struct translit_to_t *srunp; | 2362 | struct translit_to_t *srunp; |
@@ -2114,7 +2370,7 @@ Index: git/locale/programs/ld-ctype.c | |||
2114 | srunp = srunp->next; | 2370 | srunp = srunp->next; |
2115 | } | 2371 | } |
2116 | /* Plus one for the extra NUL character marking the end of | 2372 | /* Plus one for the extra NUL character marking the end of |
2117 | @@ -4068,18 +4067,18 @@ allocate_arrays (struct locale_ctype_t * | 2373 | @@ -3995,18 +3994,18 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap, |
2118 | ctype->translit_from_idx[cnt] = from_len; | 2374 | ctype->translit_from_idx[cnt] = from_len; |
2119 | ctype->translit_to_idx[cnt] = to_len; | 2375 | ctype->translit_to_idx[cnt] = to_len; |
2120 | 2376 | ||
@@ -2139,10 +2395,10 @@ Index: git/locale/programs/ld-ctype.c | |||
2139 | to_len += len; | 2395 | to_len += len; |
2140 | srunp = srunp->next; | 2396 | srunp = srunp->next; |
2141 | } | 2397 | } |
2142 | Index: git/locale/programs/ld-messages.c | 2398 | diff --git a/locale/programs/ld-messages.c b/locale/programs/ld-messages.c |
2143 | =================================================================== | 2399 | index ec1a80b..736eed8 100644 |
2144 | --- git.orig/locale/programs/ld-messages.c | 2400 | --- a/locale/programs/ld-messages.c |
2145 | +++ git/locale/programs/ld-messages.c | 2401 | +++ b/locale/programs/ld-messages.c |
2146 | @@ -25,6 +25,7 @@ | 2402 | @@ -25,6 +25,7 @@ |
2147 | #include <string.h> | 2403 | #include <string.h> |
2148 | #include <stdint.h> | 2404 | #include <stdint.h> |
@@ -2151,7 +2407,7 @@ Index: git/locale/programs/ld-messages.c | |||
2151 | 2407 | ||
2152 | #include <assert.h> | 2408 | #include <assert.h> |
2153 | 2409 | ||
2154 | @@ -124,6 +125,7 @@ No definition for %s category found"), " | 2410 | @@ -124,6 +125,7 @@ No definition for %s category found"), "LC_MESSAGES")); |
2155 | } | 2411 | } |
2156 | else | 2412 | else |
2157 | { | 2413 | { |
@@ -2159,7 +2415,7 @@ Index: git/locale/programs/ld-messages.c | |||
2159 | int result; | 2415 | int result; |
2160 | regex_t re; | 2416 | regex_t re; |
2161 | 2417 | ||
2162 | @@ -140,6 +142,7 @@ No definition for %s category found"), " | 2418 | @@ -140,6 +142,7 @@ No definition for %s category found"), "LC_MESSAGES")); |
2163 | } | 2419 | } |
2164 | else if (result != 0) | 2420 | else if (result != 0) |
2165 | regfree (&re); | 2421 | regfree (&re); |
@@ -2167,7 +2423,7 @@ Index: git/locale/programs/ld-messages.c | |||
2167 | } | 2423 | } |
2168 | 2424 | ||
2169 | if (messages->noexpr == NULL) | 2425 | if (messages->noexpr == NULL) |
2170 | @@ -158,6 +161,7 @@ No definition for %s category found"), " | 2426 | @@ -158,6 +161,7 @@ No definition for %s category found"), "LC_MESSAGES")); |
2171 | } | 2427 | } |
2172 | else | 2428 | else |
2173 | { | 2429 | { |
@@ -2175,7 +2431,7 @@ Index: git/locale/programs/ld-messages.c | |||
2175 | int result; | 2431 | int result; |
2176 | regex_t re; | 2432 | regex_t re; |
2177 | 2433 | ||
2178 | @@ -174,6 +178,7 @@ No definition for %s category found"), " | 2434 | @@ -174,6 +178,7 @@ No definition for %s category found"), "LC_MESSAGES")); |
2179 | } | 2435 | } |
2180 | else if (result != 0) | 2436 | else if (result != 0) |
2181 | regfree (&re); | 2437 | regfree (&re); |
@@ -2183,11 +2439,11 @@ Index: git/locale/programs/ld-messages.c | |||
2183 | } | 2439 | } |
2184 | } | 2440 | } |
2185 | 2441 | ||
2186 | Index: git/locale/programs/ld-time.c | 2442 | diff --git a/locale/programs/ld-time.c b/locale/programs/ld-time.c |
2187 | =================================================================== | 2443 | index db490c6..75dc505 100644 |
2188 | --- git.orig/locale/programs/ld-time.c | 2444 | --- a/locale/programs/ld-time.c |
2189 | +++ git/locale/programs/ld-time.c | 2445 | +++ b/locale/programs/ld-time.c |
2190 | @@ -215,8 +215,10 @@ No definition for %s category found"), " | 2446 | @@ -215,8 +215,10 @@ No definition for %s category found"), "LC_TIME")); |
2191 | } | 2447 | } |
2192 | else | 2448 | else |
2193 | { | 2449 | { |
@@ -2199,7 +2455,7 @@ Index: git/locale/programs/ld-time.c | |||
2199 | } | 2455 | } |
2200 | } | 2456 | } |
2201 | 2457 | ||
2202 | @@ -226,7 +228,7 @@ No definition for %s category found"), " | 2458 | @@ -226,7 +228,7 @@ No definition for %s category found"), "LC_TIME")); |
2203 | const int days_per_month[12] = { 31, 29, 31, 30, 31, 30, | 2459 | const int days_per_month[12] = { 31, 29, 31, 30, 31, 30, |
2204 | 31, 31, 30, 31 ,30, 31 }; | 2460 | 31, 31, 30, 31 ,30, 31 }; |
2205 | size_t idx; | 2461 | size_t idx; |
@@ -2208,7 +2464,7 @@ Index: git/locale/programs/ld-time.c | |||
2208 | 2464 | ||
2209 | time->era_entries = | 2465 | time->era_entries = |
2210 | (struct era_data *) xmalloc (time->num_era | 2466 | (struct era_data *) xmalloc (time->num_era |
2211 | @@ -464,18 +466,18 @@ No definition for %s category found"), " | 2467 | @@ -464,18 +466,18 @@ No definition for %s category found"), "LC_TIME")); |
2212 | } | 2468 | } |
2213 | 2469 | ||
2214 | /* Now generate the wide character name and format. */ | 2470 | /* Now generate the wide character name and format. */ |
@@ -2234,7 +2490,7 @@ Index: git/locale/programs/ld-time.c | |||
2234 | } | 2490 | } |
2235 | else | 2491 | else |
2236 | time->era_entries[idx].wname = | 2492 | time->era_entries[idx].wname = |
2237 | @@ -530,7 +532,16 @@ No definition for %s category found"), " | 2493 | @@ -530,7 +532,16 @@ No definition for %s category found"), "LC_TIME")); |
2238 | if (time->date_fmt == NULL) | 2494 | if (time->date_fmt == NULL) |
2239 | time->date_fmt = "%a %b %e %H:%M:%S %Z %Y"; | 2495 | time->date_fmt = "%a %b %e %H:%M:%S %Z %Y"; |
2240 | if (time->wdate_fmt == NULL) | 2496 | if (time->wdate_fmt == NULL) |
@@ -2252,11 +2508,11 @@ Index: git/locale/programs/ld-time.c | |||
2252 | } | 2508 | } |
2253 | 2509 | ||
2254 | 2510 | ||
2255 | Index: git/locale/programs/linereader.c | 2511 | diff --git a/locale/programs/linereader.c b/locale/programs/linereader.c |
2256 | =================================================================== | 2512 | index 2e05130..653b68c 100644 |
2257 | --- git.orig/locale/programs/linereader.c | 2513 | --- a/locale/programs/linereader.c |
2258 | +++ git/locale/programs/linereader.c | 2514 | +++ b/locale/programs/linereader.c |
2259 | @@ -595,7 +595,7 @@ get_string (struct linereader *lr, const | 2515 | @@ -595,7 +595,7 @@ get_string (struct linereader *lr, const struct charmap_t *charmap, |
2260 | { | 2516 | { |
2261 | int return_widestr = lr->return_widestr; | 2517 | int return_widestr = lr->return_widestr; |
2262 | char *buf; | 2518 | char *buf; |
@@ -2265,11 +2521,11 @@ Index: git/locale/programs/linereader.c | |||
2265 | size_t bufact; | 2521 | size_t bufact; |
2266 | size_t bufmax = 56; | 2522 | size_t bufmax = 56; |
2267 | 2523 | ||
2268 | Index: git/locale/programs/localedef.c | 2524 | diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c |
2269 | =================================================================== | 2525 | index 2a0f2aa..583d233 100644 |
2270 | --- git.orig/locale/programs/localedef.c | 2526 | --- a/locale/programs/localedef.c |
2271 | +++ git/locale/programs/localedef.c | 2527 | +++ b/locale/programs/localedef.c |
2272 | @@ -114,6 +114,7 @@ void (*argp_program_version_hook) (FILE | 2528 | @@ -114,6 +114,7 @@ void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version; |
2273 | #define OPT_LIST_ARCHIVE 309 | 2529 | #define OPT_LIST_ARCHIVE 309 |
2274 | #define OPT_LITTLE_ENDIAN 400 | 2530 | #define OPT_LITTLE_ENDIAN 400 |
2275 | #define OPT_BIG_ENDIAN 401 | 2531 | #define OPT_BIG_ENDIAN 401 |
@@ -2277,7 +2533,7 @@ Index: git/locale/programs/localedef.c | |||
2277 | 2533 | ||
2278 | /* Definitions of arguments for argp functions. */ | 2534 | /* Definitions of arguments for argp functions. */ |
2279 | static const struct argp_option options[] = | 2535 | static const struct argp_option options[] = |
2280 | @@ -150,6 +151,8 @@ static const struct argp_option options[ | 2536 | @@ -150,6 +151,8 @@ static const struct argp_option options[] = |
2281 | N_("Generate little-endian output") }, | 2537 | N_("Generate little-endian output") }, |
2282 | { "big-endian", OPT_BIG_ENDIAN, NULL, 0, | 2538 | { "big-endian", OPT_BIG_ENDIAN, NULL, 0, |
2283 | N_("Generate big-endian output") }, | 2539 | N_("Generate big-endian output") }, |
@@ -2301,7 +2557,7 @@ Index: git/locale/programs/localedef.c | |||
2301 | 2557 | ||
2302 | /* Process charmap file. */ | 2558 | /* Process charmap file. */ |
2303 | charmap = charmap_read (charmap_file, verbose, 1, be_quiet, 1); | 2559 | charmap = charmap_read (charmap_file, verbose, 1, be_quiet, 1); |
2304 | @@ -338,6 +343,9 @@ parse_opt (int key, char *arg, struct ar | 2560 | @@ -338,6 +343,9 @@ parse_opt (int key, char *arg, struct argp_state *state) |
2305 | case OPT_BIG_ENDIAN: | 2561 | case OPT_BIG_ENDIAN: |
2306 | set_big_endian (true); | 2562 | set_big_endian (true); |
2307 | break; | 2563 | break; |
@@ -2311,11 +2567,11 @@ Index: git/locale/programs/localedef.c | |||
2311 | case 'c': | 2567 | case 'c': |
2312 | force_output = 1; | 2568 | force_output = 1; |
2313 | break; | 2569 | break; |
2314 | Index: git/locale/programs/locfile.c | 2570 | diff --git a/locale/programs/locfile.c b/locale/programs/locfile.c |
2315 | =================================================================== | 2571 | index 33da52e..f790c4c 100644 |
2316 | --- git.orig/locale/programs/locfile.c | 2572 | --- a/locale/programs/locfile.c |
2317 | +++ git/locale/programs/locfile.c | 2573 | +++ b/locale/programs/locfile.c |
2318 | @@ -544,6 +544,9 @@ compare_files (const char *filename1, co | 2574 | @@ -544,6 +544,9 @@ compare_files (const char *filename1, const char *filename2, size_t size, |
2319 | machine running localedef. */ | 2575 | machine running localedef. */ |
2320 | bool swap_endianness_p; | 2576 | bool swap_endianness_p; |
2321 | 2577 | ||
@@ -2325,7 +2581,7 @@ Index: git/locale/programs/locfile.c | |||
2325 | /* When called outside a start_locale_structure/end_locale_structure | 2581 | /* When called outside a start_locale_structure/end_locale_structure |
2326 | or start_locale_prelude/end_locale_prelude block, record that the | 2582 | or start_locale_prelude/end_locale_prelude block, record that the |
2327 | next byte in FILE's obstack will be the first byte of a new element. | 2583 | next byte in FILE's obstack will be the first byte of a new element. |
2328 | @@ -621,7 +624,7 @@ add_locale_string (struct locale_file *f | 2584 | @@ -621,7 +624,7 @@ add_locale_string (struct locale_file *file, const char *string) |
2329 | void | 2585 | void |
2330 | add_locale_wstring (struct locale_file *file, const uint32_t *string) | 2586 | add_locale_wstring (struct locale_file *file, const uint32_t *string) |
2331 | { | 2587 | { |
@@ -2334,11 +2590,11 @@ Index: git/locale/programs/locfile.c | |||
2334 | } | 2590 | } |
2335 | 2591 | ||
2336 | /* Record that FILE's next element is the 32-bit integer VALUE. */ | 2592 | /* Record that FILE's next element is the 32-bit integer VALUE. */ |
2337 | Index: git/locale/programs/locfile.h | 2593 | diff --git a/locale/programs/locfile.h b/locale/programs/locfile.h |
2338 | =================================================================== | 2594 | index 6fc441b..118b171 100644 |
2339 | --- git.orig/locale/programs/locfile.h | 2595 | --- a/locale/programs/locfile.h |
2340 | +++ git/locale/programs/locfile.h | 2596 | +++ b/locale/programs/locfile.h |
2341 | @@ -71,6 +71,8 @@ extern void write_all_categories (struct | 2597 | @@ -71,6 +71,8 @@ extern void write_all_categories (struct localedef_t *definitions, |
2342 | 2598 | ||
2343 | extern bool swap_endianness_p; | 2599 | extern bool swap_endianness_p; |
2344 | 2600 | ||
@@ -2357,7 +2613,7 @@ Index: git/locale/programs/locfile.h | |||
2357 | maybe_swap_uint32_array (uint32_t *array, size_t n) | 2613 | maybe_swap_uint32_array (uint32_t *array, size_t n) |
2358 | { | 2614 | { |
2359 | if (swap_endianness_p) | 2615 | if (swap_endianness_p) |
2360 | @@ -99,7 +102,8 @@ maybe_swap_uint32_array (uint32_t *array | 2616 | @@ -99,7 +102,8 @@ maybe_swap_uint32_array (uint32_t *array, size_t n) |
2361 | 2617 | ||
2362 | /* Like maybe_swap_uint32_array, but the array of N elements is at | 2618 | /* Like maybe_swap_uint32_array, but the array of N elements is at |
2363 | the end of OBSTACK's current object. */ | 2619 | the end of OBSTACK's current object. */ |
@@ -2367,7 +2623,7 @@ Index: git/locale/programs/locfile.h | |||
2367 | maybe_swap_uint32_obstack (struct obstack *obstack, size_t n) | 2623 | maybe_swap_uint32_obstack (struct obstack *obstack, size_t n) |
2368 | { | 2624 | { |
2369 | maybe_swap_uint32_array ((uint32_t *) obstack_next_free (obstack) - n, n); | 2625 | maybe_swap_uint32_array ((uint32_t *) obstack_next_free (obstack) - n, n); |
2370 | @@ -276,4 +280,55 @@ extern void identification_output (struc | 2626 | @@ -276,4 +280,55 @@ extern void identification_output (struct localedef_t *locale, |
2371 | const struct charmap_t *charmap, | 2627 | const struct charmap_t *charmap, |
2372 | const char *output_path); | 2628 | const char *output_path); |
2373 | 2629 | ||
@@ -2423,10 +2679,10 @@ Index: git/locale/programs/locfile.h | |||
2423 | +} | 2679 | +} |
2424 | + | 2680 | + |
2425 | #endif /* locfile.h */ | 2681 | #endif /* locfile.h */ |
2426 | Index: git/locale/setlocale.c | 2682 | diff --git a/locale/setlocale.c b/locale/setlocale.c |
2427 | =================================================================== | 2683 | index fa9cb3a..8eee284 100644 |
2428 | --- git.orig/locale/setlocale.c | 2684 | --- a/locale/setlocale.c |
2429 | +++ git/locale/setlocale.c | 2685 | +++ b/locale/setlocale.c |
2430 | @@ -64,36 +64,6 @@ static char *const _nl_current_used[] = | 2686 | @@ -64,36 +64,6 @@ static char *const _nl_current_used[] = |
2431 | #endif | 2687 | #endif |
2432 | 2688 | ||
@@ -2464,10 +2720,10 @@ Index: git/locale/setlocale.c | |||
2464 | #ifdef NL_CURRENT_INDIRECT | 2720 | #ifdef NL_CURRENT_INDIRECT |
2465 | # define WEAK_POSTLOAD(postload) weak_extern (postload) | 2721 | # define WEAK_POSTLOAD(postload) weak_extern (postload) |
2466 | #else | 2722 | #else |
2467 | Index: git/locale/xlocale.c | 2723 | diff --git a/locale/xlocale.c b/locale/xlocale.c |
2468 | =================================================================== | 2724 | index fec4564..f00269c 100644 |
2469 | --- git.orig/locale/xlocale.c | 2725 | --- a/locale/xlocale.c |
2470 | +++ git/locale/xlocale.c | 2726 | +++ b/locale/xlocale.c |
2471 | @@ -18,6 +18,7 @@ | 2727 | @@ -18,6 +18,7 @@ |
2472 | <http://www.gnu.org/licenses/>. */ | 2728 | <http://www.gnu.org/licenses/>. */ |
2473 | 2729 | ||
@@ -2476,7 +2732,7 @@ Index: git/locale/xlocale.c | |||
2476 | #include "localeinfo.h" | 2732 | #include "localeinfo.h" |
2477 | 2733 | ||
2478 | #define DEFINE_CATEGORY(category, category_name, items, a) \ | 2734 | #define DEFINE_CATEGORY(category, category_name, items, a) \ |
2479 | @@ -25,6 +26,19 @@ extern struct __locale_data _nl_C_##cate | 2735 | @@ -25,6 +26,19 @@ extern struct __locale_data _nl_C_##category; |
2480 | #include "categories.def" | 2736 | #include "categories.def" |
2481 | #undef DEFINE_CATEGORY | 2737 | #undef DEFINE_CATEGORY |
2482 | 2738 | ||
@@ -2496,7 +2752,7 @@ Index: git/locale/xlocale.c | |||
2496 | /* Defined in locale/C-ctype.c. */ | 2752 | /* Defined in locale/C-ctype.c. */ |
2497 | extern const char _nl_C_LC_CTYPE_class[] attribute_hidden; | 2753 | extern const char _nl_C_LC_CTYPE_class[] attribute_hidden; |
2498 | extern const char _nl_C_LC_CTYPE_toupper[] attribute_hidden; | 2754 | extern const char _nl_C_LC_CTYPE_toupper[] attribute_hidden; |
2499 | @@ -52,3 +66,26 @@ const struct __locale_struct _nl_C_locob | 2755 | @@ -52,3 +66,26 @@ const struct __locale_struct _nl_C_locobj attribute_hidden = |
2500 | .__ctype_tolower = (const int *) _nl_C_LC_CTYPE_tolower + 128, | 2756 | .__ctype_tolower = (const int *) _nl_C_LC_CTYPE_tolower + 128, |
2501 | .__ctype_toupper = (const int *) _nl_C_LC_CTYPE_toupper + 128 | 2757 | .__ctype_toupper = (const int *) _nl_C_LC_CTYPE_toupper + 128 |
2502 | }; | 2758 | }; |
@@ -2523,10 +2779,10 @@ Index: git/locale/xlocale.c | |||
2523 | +#undef DEFINE_CATEGORY | 2779 | +#undef DEFINE_CATEGORY |
2524 | +#endif | 2780 | +#endif |
2525 | +#endif /* __OPTION_EGLIBC_LOCALE_CODE */ | 2781 | +#endif /* __OPTION_EGLIBC_LOCALE_CODE */ |
2526 | Index: git/localedata/Makefile | 2782 | diff --git a/localedata/Makefile b/localedata/Makefile |
2527 | =================================================================== | 2783 | index ebf6ac9..1870753 100644 |
2528 | --- git.orig/localedata/Makefile | 2784 | --- a/localedata/Makefile |
2529 | +++ git/localedata/Makefile | 2785 | +++ b/localedata/Makefile |
2530 | @@ -21,12 +21,22 @@ subdir := localedata | 2786 | @@ -21,12 +21,22 @@ subdir := localedata |
2531 | 2787 | ||
2532 | include ../Makeconfig | 2788 | include ../Makeconfig |
@@ -2537,10 +2793,11 @@ Index: git/localedata/Makefile | |||
2537 | 2793 | ||
2538 | # List with all available character set descriptions. | 2794 | # List with all available character set descriptions. |
2539 | -locales := $(wildcard locales/*) | 2795 | -locales := $(wildcard locales/*) |
2796 | - | ||
2540 | +all-charmaps := $(wildcard charmaps/[A-I]*) $(wildcard charmaps/[J-Z]*) | 2797 | +all-charmaps := $(wildcard charmaps/[A-I]*) $(wildcard charmaps/[J-Z]*) |
2541 | + | 2798 | + |
2542 | +all-locales := $(wildcard locales/*) | 2799 | +all-locales := $(wildcard locales/*) |
2543 | 2800 | + | |
2544 | +# If the EGLIBC_LOCALES option group is not enabled, trim the | 2801 | +# If the EGLIBC_LOCALES option group is not enabled, trim the |
2545 | +# list of charmap and locale source files. | 2802 | +# list of charmap and locale source files. |
2546 | +ifeq ($(OPTION_EGLIBC_LOCALES),y) | 2803 | +ifeq ($(OPTION_EGLIBC_LOCALES),y) |
@@ -2553,7 +2810,7 @@ Index: git/localedata/Makefile | |||
2553 | 2810 | ||
2554 | subdir-dirs = tests-mbwc | 2811 | subdir-dirs = tests-mbwc |
2555 | vpath %.c tests-mbwc | 2812 | vpath %.c tests-mbwc |
2556 | @@ -71,14 +81,20 @@ locale_test_suite := tst_iswalnum tst_is | 2813 | @@ -71,14 +81,20 @@ locale_test_suite := tst_iswalnum tst_iswalpha tst_iswcntrl \ |
2557 | tst_wcsxfrm tst_wctob tst_wctomb tst_wctrans \ | 2814 | tst_wcsxfrm tst_wctob tst_wctomb tst_wctrans \ |
2558 | tst_wctype tst_wcwidth | 2815 | tst_wctype tst_wcwidth |
2559 | 2816 | ||
@@ -2584,15 +2841,15 @@ Index: git/localedata/Makefile | |||
2584 | tests-special += $(objpfx)sort-test.out $(objpfx)tst-fmon.out \ | 2841 | tests-special += $(objpfx)sort-test.out $(objpfx)tst-fmon.out \ |
2585 | $(objpfx)tst-locale.out $(objpfx)tst-rpmatch.out \ | 2842 | $(objpfx)tst-locale.out $(objpfx)tst-rpmatch.out \ |
2586 | $(objpfx)tst-trans.out $(objpfx)tst-ctype.out \ | 2843 | $(objpfx)tst-trans.out $(objpfx)tst-ctype.out \ |
2587 | @@ -113,6 +130,7 @@ CHARMAPS := $(shell echo "$(LOCALES)" | | 2844 | @@ -109,6 +126,7 @@ LOCALES := de_DE.ISO-8859-1 de_DE.UTF-8 en_US.ANSI_X3.4-1968 \ |
2588 | CTYPE_FILES = $(addsuffix /LC_CTYPE,$(LOCALES)) | 2845 | tr_TR.ISO-8859-9 en_GB.UTF-8 uk_UA.UTF-8 |
2589 | tests-special += $(addprefix $(objpfx),$(CTYPE_FILES)) | 2846 | include ../gen-locales.mk |
2590 | endif | 2847 | endif |
2591 | +endif | 2848 | +endif |
2592 | 2849 | ||
2593 | include ../Rules | 2850 | include ../Rules |
2594 | 2851 | ||
2595 | @@ -205,6 +223,11 @@ endif | 2852 | @@ -191,6 +209,11 @@ endif |
2596 | 2853 | ||
2597 | include SUPPORTED | 2854 | include SUPPORTED |
2598 | 2855 | ||
@@ -2604,10 +2861,10 @@ Index: git/localedata/Makefile | |||
2604 | INSTALL-SUPPORTED-LOCALES=$(addprefix install-, $(SUPPORTED-LOCALES)) | 2861 | INSTALL-SUPPORTED-LOCALES=$(addprefix install-, $(SUPPORTED-LOCALES)) |
2605 | 2862 | ||
2606 | # Sometimes the whole collection of locale files should be installed. | 2863 | # Sometimes the whole collection of locale files should be installed. |
2607 | Index: git/login/Makefile | 2864 | diff --git a/login/Makefile b/login/Makefile |
2608 | =================================================================== | 2865 | index 0f4bb22..4036ddb 100644 |
2609 | --- git.orig/login/Makefile | 2866 | --- a/login/Makefile |
2610 | +++ git/login/Makefile | 2867 | +++ b/login/Makefile |
2611 | @@ -18,6 +18,7 @@ | 2868 | @@ -18,6 +18,7 @@ |
2612 | # | 2869 | # |
2613 | # Sub-makefile for login portion of the library. | 2870 | # Sub-makefile for login portion of the library. |
@@ -2639,7 +2896,7 @@ Index: git/login/Makefile | |||
2639 | ifeq (yes,$(build-pt-chown)) | 2896 | ifeq (yes,$(build-pt-chown)) |
2640 | others += pt_chown | 2897 | others += pt_chown |
2641 | @@ -46,8 +49,8 @@ vpath %.c programs | 2898 | @@ -46,8 +49,8 @@ vpath %.c programs |
2642 | tests := tst-utmp tst-utmpx tst-grantpt tst-ptsname | 2899 | tests := tst-utmp tst-utmpx tst-grantpt tst-ptsname tst-getlogin |
2643 | 2900 | ||
2644 | # Build the -lutil library with these extra functions. | 2901 | # Build the -lutil library with these extra functions. |
2645 | -extra-libs := libutil | 2902 | -extra-libs := libutil |
@@ -2649,78 +2906,10 @@ Index: git/login/Makefile | |||
2649 | 2906 | ||
2650 | libutil-routines:= login login_tty logout logwtmp openpty forkpty | 2907 | libutil-routines:= login login_tty logout logwtmp openpty forkpty |
2651 | 2908 | ||
2652 | Index: git/Makeconfig | 2909 | diff --git a/malloc/Makefile b/malloc/Makefile |
2653 | =================================================================== | 2910 | index 67ed293..272ca4d 100644 |
2654 | --- git.orig/Makeconfig | 2911 | --- a/malloc/Makefile |
2655 | +++ git/Makeconfig | 2912 | +++ b/malloc/Makefile |
2656 | @@ -582,7 +582,7 @@ elf-objpfx = $(common-objpfx)elf/ | ||
2657 | # and run on the build system, causes that program with those | ||
2658 | # arguments to be run on the host for which the library is built. | ||
2659 | ifndef test-wrapper | ||
2660 | -test-wrapper = | ||
2661 | +test-wrapper = $(cross-test-wrapper) | ||
2662 | endif | ||
2663 | # Likewise, but the name of the program is preceded by | ||
2664 | # <variable>=<value> assignments for environment variables. | ||
2665 | @@ -1055,6 +1055,24 @@ else | ||
2666 | libm = $(common-objpfx)math/libm.a | ||
2667 | endif | ||
2668 | |||
2669 | +# Generate a header file that #defines preprocessor symbols indicating | ||
2670 | +# which option groups are enabled. Note that the option-groups.config file | ||
2671 | +# may not exist at all. | ||
2672 | +before-compile += $(common-objpfx)gnu/option-groups.h | ||
2673 | +common-generated += gnu/option-groups.h gnu/option-groups.stmp | ||
2674 | +headers += gnu/option-groups.h | ||
2675 | +$(common-objpfx)gnu/option-groups.h: $(common-objpfx)gnu/option-groups.stmp; @: | ||
2676 | +$(common-objpfx)gnu/option-groups.stmp: \ | ||
2677 | + $(..)scripts/option-groups.awk \ | ||
2678 | + $(..)option-groups.defaults \ | ||
2679 | + $(wildcard $(common-objpfx)option-groups.config) | ||
2680 | + $(make-target-directory) | ||
2681 | + @rm -f ${@:stmp=T} $@ | ||
2682 | + LC_ALL=C $(AWK) -f $^ > ${@:stmp=T} | ||
2683 | + $(move-if-change) ${@:stmp=T} ${@:stmp=h} | ||
2684 | + touch $@ | ||
2685 | + | ||
2686 | + | ||
2687 | # These are the subdirectories containing the library source. The order | ||
2688 | # is more or less arbitrary. The sorting step will take care of the | ||
2689 | # dependencies. | ||
2690 | Index: git/Makerules | ||
2691 | =================================================================== | ||
2692 | --- git.orig/Makerules | ||
2693 | +++ git/Makerules | ||
2694 | @@ -446,6 +446,25 @@ define sed-remove-objpfx | ||
2695 | endef | ||
2696 | endif | ||
2697 | |||
2698 | +# Include targets in the selected option groups. | ||
2699 | +aux += $(aux-y) | ||
2700 | +extra-libs += $(extra-libs-y) | ||
2701 | +extra-libs-others += $(extra-libs-others-y) | ||
2702 | +extra-objs += $(extra-objs-y) | ||
2703 | +install-bin += $(install-bin-y) | ||
2704 | +install-others += $(install-others-y) | ||
2705 | +install-sbin += $(install-sbin-y) | ||
2706 | +modules += $(modules-y) | ||
2707 | +others += $(others-y) | ||
2708 | +others-pie += $(others-pie-y) | ||
2709 | +routines += $(routines-y) | ||
2710 | +static-only-routines += $(static-only-routines-y) | ||
2711 | +sysdep_routines += $(sysdep_routines-y) | ||
2712 | +test-srcs += $(test-srcs-y) | ||
2713 | +tests += $(tests-y) | ||
2714 | +xtests += $(xtests-y) | ||
2715 | + | ||
2716 | + | ||
2717 | # Modify the list of routines we build for different targets | ||
2718 | |||
2719 | ifeq (yes,$(build-shared)) | ||
2720 | Index: git/malloc/Makefile | ||
2721 | =================================================================== | ||
2722 | --- git.orig/malloc/Makefile | ||
2723 | +++ git/malloc/Makefile | ||
2724 | @@ -18,6 +18,8 @@ | 2913 | @@ -18,6 +18,8 @@ |
2725 | # | 2914 | # |
2726 | # Makefile for malloc routines | 2915 | # Makefile for malloc routines |
@@ -2730,7 +2919,7 @@ Index: git/malloc/Makefile | |||
2730 | subdir := malloc | 2919 | subdir := malloc |
2731 | 2920 | ||
2732 | include ../Makeconfig | 2921 | include ../Makeconfig |
2733 | @@ -36,9 +38,15 @@ install-lib := libmcheck.a | 2922 | @@ -39,9 +41,15 @@ install-lib := libmcheck.a |
2734 | non-lib.a := libmcheck.a | 2923 | non-lib.a := libmcheck.a |
2735 | 2924 | ||
2736 | # Additional library. | 2925 | # Additional library. |
@@ -2746,7 +2935,7 @@ Index: git/malloc/Makefile | |||
2746 | libmemusage-routines = memusage | 2935 | libmemusage-routines = memusage |
2747 | libmemusage-inhibit-o = $(filter-out .os,$(object-suffixes)) | 2936 | libmemusage-inhibit-o = $(filter-out .os,$(object-suffixes)) |
2748 | 2937 | ||
2749 | @@ -65,7 +73,7 @@ endif | 2938 | @@ -71,7 +79,7 @@ endif |
2750 | # Unless we get a test for the availability of libgd which also works | 2939 | # Unless we get a test for the availability of libgd which also works |
2751 | # for cross-compiling we disable the memusagestat generation in this | 2940 | # for cross-compiling we disable the memusagestat generation in this |
2752 | # situation. | 2941 | # situation. |
@@ -2755,10 +2944,10 @@ Index: git/malloc/Makefile | |||
2755 | # If the gd library is available we build the `memusagestat' program. | 2944 | # If the gd library is available we build the `memusagestat' program. |
2756 | ifneq ($(LIBGD),no) | 2945 | ifneq ($(LIBGD),no) |
2757 | others: $(objpfx)memusage | 2946 | others: $(objpfx)memusage |
2758 | Index: git/malloc/memusage.c | 2947 | diff --git a/malloc/memusage.c b/malloc/memusage.c |
2759 | =================================================================== | 2948 | index a57ba8e..732ba9d 100644 |
2760 | --- git.orig/malloc/memusage.c | 2949 | --- a/malloc/memusage.c |
2761 | +++ git/malloc/memusage.c | 2950 | +++ b/malloc/memusage.c |
2762 | @@ -33,6 +33,7 @@ | 2951 | @@ -33,6 +33,7 @@ |
2763 | #include <stdint.h> | 2952 | #include <stdint.h> |
2764 | #include <sys/mman.h> | 2953 | #include <sys/mman.h> |
@@ -2780,10 +2969,10 @@ Index: git/malloc/memusage.c | |||
2780 | static size_t buffer_size; | 2969 | static size_t buffer_size; |
2781 | 2970 | ||
2782 | static int fd = -1; | 2971 | static int fd = -1; |
2783 | Index: git/malloc/memusage.sh | 2972 | diff --git a/malloc/memusage.sh b/malloc/memusage.sh |
2784 | =================================================================== | 2973 | index 8ab8cc2..d18f446 100755 |
2785 | --- git.orig/malloc/memusage.sh | 2974 | --- a/malloc/memusage.sh |
2786 | +++ git/malloc/memusage.sh | 2975 | +++ b/malloc/memusage.sh |
2787 | @@ -35,7 +35,7 @@ do_missing_arg() { | 2976 | @@ -35,7 +35,7 @@ do_missing_arg() { |
2788 | 2977 | ||
2789 | # Print help message | 2978 | # Print help message |
@@ -2793,10 +2982,10 @@ Index: git/malloc/memusage.sh | |||
2793 | Profile memory usage of PROGRAM. | 2982 | Profile memory usage of PROGRAM. |
2794 | 2983 | ||
2795 | -n,--progname=NAME Name of the program file to profile | 2984 | -n,--progname=NAME Name of the program file to profile |
2796 | Index: git/math/Makefile | 2985 | diff --git a/math/Makefile b/math/Makefile |
2797 | =================================================================== | 2986 | index 6388bae..ed1c511 100644 |
2798 | --- git.orig/math/Makefile | 2987 | --- a/math/Makefile |
2799 | +++ git/math/Makefile | 2988 | +++ b/math/Makefile |
2800 | @@ -21,6 +21,8 @@ subdir := math | 2989 | @@ -21,6 +21,8 @@ subdir := math |
2801 | 2990 | ||
2802 | include ../Makeconfig | 2991 | include ../Makeconfig |
@@ -2806,7 +2995,7 @@ Index: git/math/Makefile | |||
2806 | # Installed header files. | 2995 | # Installed header files. |
2807 | headers := math.h bits/mathcalls.h bits/mathinline.h bits/huge_val.h \ | 2996 | headers := math.h bits/mathcalls.h bits/mathinline.h bits/huge_val.h \ |
2808 | bits/huge_valf.h bits/huge_vall.h bits/inf.h bits/nan.h \ | 2997 | bits/huge_valf.h bits/huge_vall.h bits/inf.h bits/nan.h \ |
2809 | @@ -33,8 +35,8 @@ aux := setfpucw fpu_control | 2998 | @@ -34,8 +36,8 @@ aux := setfpucw fpu_control |
2810 | 2999 | ||
2811 | # Build the -lm library. | 3000 | # Build the -lm library. |
2812 | 3001 | ||
@@ -2817,10 +3006,80 @@ Index: git/math/Makefile | |||
2817 | 3006 | ||
2818 | libm-support = s_lib_version s_matherr s_signgam \ | 3007 | libm-support = s_lib_version s_matherr s_signgam \ |
2819 | fclrexcpt fgetexcptflg fraiseexcpt fsetexcptflg \ | 3008 | fclrexcpt fgetexcptflg fraiseexcpt fsetexcptflg \ |
2820 | Index: git/misc/err.c | 3009 | diff --git a/misc/Makefile b/misc/Makefile |
2821 | =================================================================== | 3010 | index aecb0da..e6b7c23 100644 |
2822 | --- git.orig/misc/err.c | 3011 | --- a/misc/Makefile |
2823 | +++ git/misc/err.c | 3012 | +++ b/misc/Makefile |
3013 | @@ -19,6 +19,10 @@ | ||
3014 | # Sub-makefile for misc portion of the library. | ||
3015 | # | ||
3016 | |||
3017 | +# Some system-dependent implementations of these functions use option | ||
3018 | +# groups (see sysdeps/unix/sysv/linux/Makefile, for example). | ||
3019 | +include ../option-groups.mak | ||
3020 | + | ||
3021 | subdir := misc | ||
3022 | |||
3023 | include ../Makeconfig | ||
3024 | @@ -46,40 +50,47 @@ routines := brk sbrk sstk ioctl \ | ||
3025 | select pselect \ | ||
3026 | acct chroot fsync sync fdatasync syncfs reboot \ | ||
3027 | gethostid sethostid \ | ||
3028 | - revoke vhangup \ | ||
3029 | + vhangup \ | ||
3030 | swapon swapoff mktemp mkstemp mkstemp64 mkdtemp \ | ||
3031 | mkostemp mkostemp64 mkstemps mkstemps64 mkostemps mkostemps64 \ | ||
3032 | ualarm usleep \ | ||
3033 | gtty stty \ | ||
3034 | ptrace \ | ||
3035 | - fstab mntent mntent_r \ | ||
3036 | + mntent mntent_r \ | ||
3037 | utimes lutimes futimes futimesat \ | ||
3038 | truncate ftruncate truncate64 ftruncate64 \ | ||
3039 | - chflags fchflags \ | ||
3040 | insremque getttyent getusershell getpass ttyslot \ | ||
3041 | syslog syscall daemon \ | ||
3042 | mmap mmap64 munmap mprotect msync madvise mincore remap_file_pages\ | ||
3043 | mlock munlock mlockall munlockall \ | ||
3044 | - efgcvt efgcvt_r qefgcvt qefgcvt_r \ | ||
3045 | hsearch hsearch_r tsearch lsearch \ | ||
3046 | err error ustat \ | ||
3047 | - getsysstats dirname regexp \ | ||
3048 | + getsysstats dirname \ | ||
3049 | getloadavg getclktck \ | ||
3050 | fgetxattr flistxattr fremovexattr fsetxattr getxattr \ | ||
3051 | listxattr lgetxattr llistxattr lremovexattr lsetxattr \ | ||
3052 | removexattr setxattr getauxval ifunc-impl-list | ||
3053 | |||
3054 | +routines-$(OPTION_POSIX_REGEXP) += regexp | ||
3055 | +routines-$(OPTION_EGLIBC_FSTAB) += fstab | ||
3056 | +routines-$(OPTION_EGLIBC_BSD) += chflags fchflags revoke | ||
3057 | +routines-$(OPTION_EGLIBC_FCVT) += efgcvt efgcvt_r qefgcvt qefgcvt_r | ||
3058 | + | ||
3059 | generated += tst-error1.mtrace tst-error1-mem.out | ||
3060 | |||
3061 | aux := init-misc | ||
3062 | install-lib := libg.a | ||
3063 | gpl2lgpl := error.c error.h | ||
3064 | |||
3065 | -tests := tst-dirname tst-tsearch tst-fdset tst-efgcvt tst-mntent tst-hsearch \ | ||
3066 | - tst-error1 tst-pselect tst-insremque tst-mntent2 bug-hsearch1 | ||
3067 | +tests := tst-dirname tst-tsearch tst-fdset tst-mntent tst-hsearch \ | ||
3068 | + tst-pselect tst-insremque tst-mntent2 bug-hsearch1 | ||
3069 | +tests-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) += tst-error1 | ||
3070 | +tests-$(OPTION_EGLIBC_FCVT) += tst-efgcvt | ||
3071 | ifeq ($(run-built-tests),yes) | ||
3072 | +ifeq (y,$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO)) | ||
3073 | tests-special += $(objpfx)tst-error1-mem.out | ||
3074 | endif | ||
3075 | +endif | ||
3076 | |||
3077 | CFLAGS-select.c = -fexceptions -fasynchronous-unwind-tables | ||
3078 | CFLAGS-tsearch.c = $(uses-callbacks) | ||
3079 | diff --git a/misc/err.c b/misc/err.c | ||
3080 | index 7b98157..efce8d5 100644 | ||
3081 | --- a/misc/err.c | ||
3082 | +++ b/misc/err.c | ||
2824 | @@ -22,6 +22,7 @@ | 3083 | @@ -22,6 +22,7 @@ |
2825 | #include <errno.h> | 3084 | #include <errno.h> |
2826 | #include <string.h> | 3085 | #include <string.h> |
@@ -2837,7 +3096,7 @@ Index: git/misc/err.c | |||
2837 | static void | 3096 | static void |
2838 | convert_and_print (const char *format, __gnuc_va_list ap) | 3097 | convert_and_print (const char *format, __gnuc_va_list ap) |
2839 | { | 3098 | { |
2840 | @@ -81,6 +83,7 @@ convert_and_print (const char *format, _ | 3099 | @@ -81,6 +83,7 @@ convert_and_print (const char *format, __gnuc_va_list ap) |
2841 | 3100 | ||
2842 | __vfwprintf (stderr, wformat, ap); | 3101 | __vfwprintf (stderr, wformat, ap); |
2843 | } | 3102 | } |
@@ -2845,7 +3104,7 @@ Index: git/misc/err.c | |||
2845 | 3104 | ||
2846 | void | 3105 | void |
2847 | vwarnx (const char *format, __gnuc_va_list ap) | 3106 | vwarnx (const char *format, __gnuc_va_list ap) |
2848 | @@ -88,9 +91,13 @@ vwarnx (const char *format, __gnuc_va_li | 3107 | @@ -88,9 +91,13 @@ vwarnx (const char *format, __gnuc_va_list ap) |
2849 | flockfile (stderr); | 3108 | flockfile (stderr); |
2850 | if (_IO_fwide (stderr, 0) > 0) | 3109 | if (_IO_fwide (stderr, 0) > 0) |
2851 | { | 3110 | { |
@@ -2859,7 +3118,7 @@ Index: git/misc/err.c | |||
2859 | } | 3118 | } |
2860 | else | 3119 | else |
2861 | { | 3120 | { |
2862 | @@ -111,6 +118,7 @@ vwarn (const char *format, __gnuc_va_lis | 3121 | @@ -111,6 +118,7 @@ vwarn (const char *format, __gnuc_va_list ap) |
2863 | flockfile (stderr); | 3122 | flockfile (stderr); |
2864 | if (_IO_fwide (stderr, 0) > 0) | 3123 | if (_IO_fwide (stderr, 0) > 0) |
2865 | { | 3124 | { |
@@ -2867,7 +3126,7 @@ Index: git/misc/err.c | |||
2867 | __fwprintf (stderr, L"%s: ", __progname); | 3126 | __fwprintf (stderr, L"%s: ", __progname); |
2868 | if (format) | 3127 | if (format) |
2869 | { | 3128 | { |
2870 | @@ -119,6 +127,9 @@ vwarn (const char *format, __gnuc_va_lis | 3129 | @@ -119,6 +127,9 @@ vwarn (const char *format, __gnuc_va_list ap) |
2871 | } | 3130 | } |
2872 | __set_errno (error); | 3131 | __set_errno (error); |
2873 | __fwprintf (stderr, L"%m\n"); | 3132 | __fwprintf (stderr, L"%m\n"); |
@@ -2877,10 +3136,10 @@ Index: git/misc/err.c | |||
2877 | } | 3136 | } |
2878 | else | 3137 | else |
2879 | { | 3138 | { |
2880 | Index: git/misc/error.c | 3139 | diff --git a/misc/error.c b/misc/error.c |
2881 | =================================================================== | 3140 | index aaa120d..d6cbc82 100644 |
2882 | --- git.orig/misc/error.c | 3141 | --- a/misc/error.c |
2883 | +++ git/misc/error.c | 3142 | +++ b/misc/error.c |
2884 | @@ -35,6 +35,7 @@ | 3143 | @@ -35,6 +35,7 @@ |
2885 | #endif | 3144 | #endif |
2886 | 3145 | ||
@@ -2889,7 +3148,7 @@ Index: git/misc/error.c | |||
2889 | # include <libintl.h> | 3148 | # include <libintl.h> |
2890 | # include <stdbool.h> | 3149 | # include <stdbool.h> |
2891 | # include <stdint.h> | 3150 | # include <stdint.h> |
2892 | @@ -205,6 +206,7 @@ error_tail (int status, int errnum, cons | 3151 | @@ -205,6 +206,7 @@ error_tail (int status, int errnum, const char *message, va_list args) |
2893 | #if _LIBC | 3152 | #if _LIBC |
2894 | if (_IO_fwide (stderr, 0) > 0) | 3153 | if (_IO_fwide (stderr, 0) > 0) |
2895 | { | 3154 | { |
@@ -2897,7 +3156,7 @@ Index: git/misc/error.c | |||
2897 | size_t len = strlen (message) + 1; | 3156 | size_t len = strlen (message) + 1; |
2898 | wchar_t *wmessage = NULL; | 3157 | wchar_t *wmessage = NULL; |
2899 | mbstate_t st; | 3158 | mbstate_t st; |
2900 | @@ -265,6 +267,9 @@ error_tail (int status, int errnum, cons | 3159 | @@ -265,6 +267,9 @@ error_tail (int status, int errnum, const char *message, va_list args) |
2901 | 3160 | ||
2902 | if (use_malloc) | 3161 | if (use_malloc) |
2903 | free (wmessage); | 3162 | free (wmessage); |
@@ -2907,80 +3166,10 @@ Index: git/misc/error.c | |||
2907 | } | 3166 | } |
2908 | else | 3167 | else |
2909 | #endif | 3168 | #endif |
2910 | Index: git/misc/Makefile | 3169 | diff --git a/misc/tst-efgcvt.c b/misc/tst-efgcvt.c |
2911 | =================================================================== | 3170 | index 5083fec..79ed36c 100644 |
2912 | --- git.orig/misc/Makefile | 3171 | --- a/misc/tst-efgcvt.c |
2913 | +++ git/misc/Makefile | 3172 | +++ b/misc/tst-efgcvt.c |
2914 | @@ -19,6 +19,10 @@ | ||
2915 | # Sub-makefile for misc portion of the library. | ||
2916 | # | ||
2917 | |||
2918 | +# Some system-dependent implementations of these functions use option | ||
2919 | +# groups (see sysdeps/unix/sysv/linux/Makefile, for example). | ||
2920 | +include ../option-groups.mak | ||
2921 | + | ||
2922 | subdir := misc | ||
2923 | |||
2924 | include ../Makeconfig | ||
2925 | @@ -46,40 +50,47 @@ routines := brk sbrk sstk ioctl \ | ||
2926 | select pselect \ | ||
2927 | acct chroot fsync sync fdatasync syncfs reboot \ | ||
2928 | gethostid sethostid \ | ||
2929 | - revoke vhangup \ | ||
2930 | + vhangup \ | ||
2931 | swapon swapoff mktemp mkstemp mkstemp64 mkdtemp \ | ||
2932 | mkostemp mkostemp64 mkstemps mkstemps64 mkostemps mkostemps64 \ | ||
2933 | ualarm usleep \ | ||
2934 | gtty stty \ | ||
2935 | ptrace \ | ||
2936 | - fstab mntent mntent_r \ | ||
2937 | + mntent mntent_r \ | ||
2938 | utimes lutimes futimes futimesat \ | ||
2939 | truncate ftruncate truncate64 ftruncate64 \ | ||
2940 | - chflags fchflags \ | ||
2941 | insremque getttyent getusershell getpass ttyslot \ | ||
2942 | syslog syscall daemon \ | ||
2943 | mmap mmap64 munmap mprotect msync madvise mincore remap_file_pages\ | ||
2944 | mlock munlock mlockall munlockall \ | ||
2945 | - efgcvt efgcvt_r qefgcvt qefgcvt_r \ | ||
2946 | hsearch hsearch_r tsearch lsearch \ | ||
2947 | err error ustat \ | ||
2948 | - getsysstats dirname regexp \ | ||
2949 | + getsysstats dirname \ | ||
2950 | getloadavg getclktck \ | ||
2951 | fgetxattr flistxattr fremovexattr fsetxattr getxattr \ | ||
2952 | listxattr lgetxattr llistxattr lremovexattr lsetxattr \ | ||
2953 | removexattr setxattr getauxval ifunc-impl-list | ||
2954 | |||
2955 | +routines-$(OPTION_POSIX_REGEXP) += regexp | ||
2956 | +routines-$(OPTION_EGLIBC_FSTAB) += fstab | ||
2957 | +routines-$(OPTION_EGLIBC_BSD) += chflags fchflags revoke | ||
2958 | +routines-$(OPTION_EGLIBC_FCVT) += efgcvt efgcvt_r qefgcvt qefgcvt_r | ||
2959 | + | ||
2960 | generated += tst-error1.mtrace tst-error1-mem.out | ||
2961 | |||
2962 | aux := init-misc | ||
2963 | install-lib := libg.a | ||
2964 | gpl2lgpl := error.c error.h | ||
2965 | |||
2966 | -tests := tst-dirname tst-tsearch tst-fdset tst-efgcvt tst-mntent tst-hsearch \ | ||
2967 | - tst-error1 tst-pselect tst-insremque tst-mntent2 bug-hsearch1 | ||
2968 | +tests := tst-dirname tst-tsearch tst-fdset tst-mntent tst-hsearch \ | ||
2969 | + tst-pselect tst-insremque tst-mntent2 bug-hsearch1 | ||
2970 | +tests-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) += tst-error1 | ||
2971 | +tests-$(OPTION_EGLIBC_FCVT) += tst-efgcvt | ||
2972 | ifeq ($(run-built-tests),yes) | ||
2973 | +ifeq (y,$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO)) | ||
2974 | tests-special += $(objpfx)tst-error1-mem.out | ||
2975 | endif | ||
2976 | +endif | ||
2977 | |||
2978 | CFLAGS-select.c = -fexceptions -fasynchronous-unwind-tables | ||
2979 | CFLAGS-tsearch.c = $(uses-callbacks) | ||
2980 | Index: git/misc/tst-efgcvt.c | ||
2981 | =================================================================== | ||
2982 | --- git.orig/misc/tst-efgcvt.c | ||
2983 | +++ git/misc/tst-efgcvt.c | ||
2984 | @@ -59,7 +59,7 @@ static testcase ecvt_tests[] = | 3173 | @@ -59,7 +59,7 @@ static testcase ecvt_tests[] = |
2985 | { 123.01, -4, 3, "" }, | 3174 | { 123.01, -4, 3, "" }, |
2986 | { 126.71, -4, 3, "" }, | 3175 | { 126.71, -4, 3, "" }, |
@@ -2990,10 +3179,10 @@ Index: git/misc/tst-efgcvt.c | |||
2990 | { 0x1p-1074, 3, -323, "494" }, | 3179 | { 0x1p-1074, 3, -323, "494" }, |
2991 | { -0x1p-1074, 3, -323, "494" }, | 3180 | { -0x1p-1074, 3, -323, "494" }, |
2992 | #endif | 3181 | #endif |
2993 | Index: git/nis/Makefile | 3182 | diff --git a/nis/Makefile b/nis/Makefile |
2994 | =================================================================== | 3183 | index 037e674..c967850 100644 |
2995 | --- git.orig/nis/Makefile | 3184 | --- a/nis/Makefile |
2996 | +++ git/nis/Makefile | 3185 | +++ b/nis/Makefile |
2997 | @@ -18,6 +18,8 @@ | 3186 | @@ -18,6 +18,8 @@ |
2998 | # | 3187 | # |
2999 | # Makefile for NIS/NIS+ part. | 3188 | # Makefile for NIS/NIS+ part. |
@@ -3036,7 +3225,7 @@ Index: git/nis/Makefile | |||
3036 | vpath %.c $(subdir-dirs) | 3225 | vpath %.c $(subdir-dirs) |
3037 | 3226 | ||
3038 | libnsl-routines = yp_xdr ypclnt ypupdate_xdr \ | 3227 | libnsl-routines = yp_xdr ypclnt ypupdate_xdr \ |
3039 | @@ -60,11 +69,11 @@ libnsl-routines = yp_xdr ypclnt ypupdate | 3228 | @@ -60,11 +69,11 @@ libnsl-routines = yp_xdr ypclnt ypupdate_xdr \ |
3040 | libnss_compat-routines := $(addprefix compat-,grp pwd spwd initgroups) | 3229 | libnss_compat-routines := $(addprefix compat-,grp pwd spwd initgroups) |
3041 | libnss_compat-inhibit-o = $(filter-out .os,$(object-suffixes)) | 3230 | libnss_compat-inhibit-o = $(filter-out .os,$(object-suffixes)) |
3042 | 3231 | ||
@@ -3050,7 +3239,7 @@ Index: git/nis/Makefile | |||
3050 | nss-nisplus nisplus-initgroups | 3239 | nss-nisplus nisplus-initgroups |
3051 | libnss_nisplus-inhibit-o = $(filter-out .os,$(object-suffixes)) | 3240 | libnss_nisplus-inhibit-o = $(filter-out .os,$(object-suffixes)) |
3052 | 3241 | ||
3053 | @@ -80,12 +89,12 @@ libnsl-libc = $(common-objpfx)linkobj/li | 3242 | @@ -80,12 +89,12 @@ libnsl-libc = $(common-objpfx)linkobj/libc.so |
3054 | # Target-specific variable setting to link objects using deprecated | 3243 | # Target-specific variable setting to link objects using deprecated |
3055 | # RPC interfaces with the version of libc.so that makes them available | 3244 | # RPC interfaces with the version of libc.so that makes them available |
3056 | # for new links: | 3245 | # for new links: |
@@ -3066,10 +3255,10 @@ Index: git/nis/Makefile | |||
3066 | -$(others:%=$(objpfx)%): $(objpfx)libnsl.a | 3255 | -$(others:%=$(objpfx)%): $(objpfx)libnsl.a |
3067 | +$(others-y:%=$(objpfx)%): $(objpfx)libnsl.a | 3256 | +$(others-y:%=$(objpfx)%): $(objpfx)libnsl.a |
3068 | endif | 3257 | endif |
3069 | Index: git/nptl/Makefile | 3258 | diff --git a/nptl/Makefile b/nptl/Makefile |
3070 | =================================================================== | 3259 | index aaca0a4..596ca3c 100644 |
3071 | --- git.orig/nptl/Makefile | 3260 | --- a/nptl/Makefile |
3072 | +++ git/nptl/Makefile | 3261 | +++ b/nptl/Makefile |
3073 | @@ -18,6 +18,8 @@ | 3262 | @@ -18,6 +18,8 @@ |
3074 | # | 3263 | # |
3075 | # Sub-makefile for NPTL portion of the library. | 3264 | # Sub-makefile for NPTL portion of the library. |
@@ -3079,7 +3268,7 @@ Index: git/nptl/Makefile | |||
3079 | subdir := nptl | 3268 | subdir := nptl |
3080 | 3269 | ||
3081 | include ../Makeconfig | 3270 | include ../Makeconfig |
3082 | @@ -117,7 +119,7 @@ libpthread-routines = nptl-init vars eve | 3271 | @@ -118,7 +120,7 @@ libpthread-routines = nptl-init vars events version pt-interp \ |
3083 | pt-raise pt-system \ | 3272 | pt-raise pt-system \ |
3084 | flockfile ftrylockfile funlockfile \ | 3273 | flockfile ftrylockfile funlockfile \ |
3085 | sigaction \ | 3274 | sigaction \ |
@@ -3088,16 +3277,18 @@ Index: git/nptl/Makefile | |||
3088 | pthread_kill_other_threads \ | 3277 | pthread_kill_other_threads \ |
3089 | pthread_getaffinity pthread_setaffinity \ | 3278 | pthread_getaffinity pthread_setaffinity \ |
3090 | pthread_attr_getaffinity pthread_attr_setaffinity \ | 3279 | pthread_attr_getaffinity pthread_attr_setaffinity \ |
3091 | @@ -137,6 +139,8 @@ libpthread-routines = nptl-init vars eve | 3280 | @@ -138,8 +140,10 @@ libpthread-routines = nptl-init vars events version pt-interp \ |
3092 | # pthread_setgid pthread_setegid pthread_setregid \ | 3281 | # pthread_setgid pthread_setegid pthread_setregid \ |
3093 | # pthread_setresgid | 3282 | # pthread_setresgid |
3094 | 3283 | ||
3095 | +libpthread-routines-$(OPTION_EGLIBC_INET) := herrno res | 3284 | +libpthread-routines-$(OPTION_EGLIBC_INET) := herrno res |
3285 | libpthread-shared-only-routines = version pt-interp pt-allocrtsig \ | ||
3286 | unwind-forcedunwind | ||
3096 | + | 3287 | + |
3097 | libpthread-shared-only-routines = version pt-allocrtsig unwind-forcedunwind | ||
3098 | libpthread-static-only-routines = pthread_atfork | 3288 | libpthread-static-only-routines = pthread_atfork |
3099 | 3289 | ||
3100 | @@ -211,7 +215,7 @@ tests = tst-typesizes \ | 3290 | # Since cancellation handling is in large parts handled using exceptions |
3291 | @@ -220,7 +224,7 @@ tests = tst-typesizes \ | ||
3101 | tst-mutexpi1 tst-mutexpi2 tst-mutexpi3 tst-mutexpi4 tst-mutexpi5 \ | 3292 | tst-mutexpi1 tst-mutexpi2 tst-mutexpi3 tst-mutexpi4 tst-mutexpi5 \ |
3102 | tst-mutexpi5a tst-mutexpi6 tst-mutexpi7 tst-mutexpi7a tst-mutexpi8 \ | 3293 | tst-mutexpi5a tst-mutexpi6 tst-mutexpi7 tst-mutexpi7a tst-mutexpi8 \ |
3103 | tst-mutexpi9 \ | 3294 | tst-mutexpi9 \ |
@@ -3106,7 +3297,7 @@ Index: git/nptl/Makefile | |||
3106 | tst-cond1 tst-cond2 tst-cond3 tst-cond4 tst-cond5 tst-cond6 tst-cond7 \ | 3297 | tst-cond1 tst-cond2 tst-cond3 tst-cond4 tst-cond5 tst-cond6 tst-cond7 \ |
3107 | tst-cond8 tst-cond9 tst-cond10 tst-cond11 tst-cond12 tst-cond13 \ | 3298 | tst-cond8 tst-cond9 tst-cond10 tst-cond11 tst-cond12 tst-cond13 \ |
3108 | tst-cond14 tst-cond15 tst-cond16 tst-cond17 tst-cond18 tst-cond19 \ | 3299 | tst-cond14 tst-cond15 tst-cond16 tst-cond17 tst-cond18 tst-cond19 \ |
3109 | @@ -245,14 +249,14 @@ tests = tst-typesizes \ | 3300 | @@ -256,14 +260,14 @@ tests = tst-typesizes \ |
3110 | tst-cancel6 tst-cancel7 tst-cancel8 tst-cancel9 tst-cancel10 \ | 3301 | tst-cancel6 tst-cancel7 tst-cancel8 tst-cancel9 tst-cancel10 \ |
3111 | tst-cancel11 tst-cancel12 tst-cancel13 tst-cancel14 tst-cancel15 \ | 3302 | tst-cancel11 tst-cancel12 tst-cancel13 tst-cancel14 tst-cancel15 \ |
3112 | tst-cancel16 tst-cancel17 tst-cancel18 tst-cancel19 tst-cancel20 \ | 3303 | tst-cancel16 tst-cancel17 tst-cancel18 tst-cancel19 tst-cancel20 \ |
@@ -3123,7 +3314,7 @@ Index: git/nptl/Makefile | |||
3123 | tst-exit1 tst-exit2 tst-exit3 \ | 3314 | tst-exit1 tst-exit2 tst-exit3 \ |
3124 | tst-stdio1 tst-stdio2 \ | 3315 | tst-stdio1 tst-stdio2 \ |
3125 | tst-stack1 tst-stack2 tst-stack3 tst-stack4 tst-pthread-getattr \ | 3316 | tst-stack1 tst-stack2 tst-stack3 tst-stack4 tst-pthread-getattr \ |
3126 | @@ -260,13 +264,12 @@ tests = tst-typesizes \ | 3317 | @@ -271,13 +275,12 @@ tests = tst-typesizes \ |
3127 | tst-unload \ | 3318 | tst-unload \ |
3128 | tst-dlsym1 \ | 3319 | tst-dlsym1 \ |
3129 | tst-sysconf \ | 3320 | tst-sysconf \ |
@@ -3137,11 +3328,14 @@ Index: git/nptl/Makefile | |||
3137 | - tst-backtrace1 \ | 3328 | - tst-backtrace1 \ |
3138 | tst-abstime \ | 3329 | tst-abstime \ |
3139 | tst-vfork1 tst-vfork2 tst-vfork1x tst-vfork2x \ | 3330 | tst-vfork1 tst-vfork2 tst-vfork1x tst-vfork2x \ |
3140 | tst-getpid1 tst-getpid2 tst-getpid3 \ | 3331 | tst-getpid3 \ |
3141 | @@ -277,6 +280,17 @@ xtests = tst-setuid1 tst-setuid1-static | 3332 | @@ -288,9 +291,16 @@ xtests = tst-setuid1 tst-setuid1-static tst-setuid2 \ |
3142 | tst-mutexpp1 tst-mutexpp6 tst-mutexpp10 | 3333 | tst-mutexpp1 tst-mutexpp6 tst-mutexpp10 |
3143 | test-srcs = tst-oddstacklimit | 3334 | test-srcs = tst-oddstacklimit |
3144 | 3335 | ||
3336 | -# Test expected to fail on most targets (except x86_64) due to bug | ||
3337 | -# 18435 - pthread_once hangs when init routine throws an exception. | ||
3338 | -test-xfail-tst-once5 = yes | ||
3145 | +# This test uses the posix_spawn functions. | 3339 | +# This test uses the posix_spawn functions. |
3146 | +tests-$(OPTION_EGLIBC_SPAWN) += tst-exec1 | 3340 | +tests-$(OPTION_EGLIBC_SPAWN) += tst-exec1 |
3147 | + | 3341 | + |
@@ -3152,44 +3346,22 @@ Index: git/nptl/Makefile | |||
3152 | +tests-$(OPTION_EGLIBC_CXX_TESTS) += tst-cancel24 | 3346 | +tests-$(OPTION_EGLIBC_CXX_TESTS) += tst-cancel24 |
3153 | + | 3347 | + |
3154 | +tests-$(OPTION_EGLIBC_LOCALE_CODE) += tst-locale1 | 3348 | +tests-$(OPTION_EGLIBC_LOCALE_CODE) += tst-locale1 |
3155 | + | 3349 | |
3156 | # Files which must not be linked with libpthread. | 3350 | # Files which must not be linked with libpthread. |
3157 | tests-nolibpthread = tst-unload | 3351 | tests-nolibpthread = tst-unload |
3158 | 3352 | diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c | |
3159 | @@ -363,12 +377,18 @@ | 3353 | index d10f4ea..14257ce 100644 |
3160 | $(common-objpfx)libc.a | 3354 | --- a/nptl/pthread_create.c |
3161 | 3355 | +++ b/nptl/pthread_create.c | |
3162 | tests-static += tst-locale1 tst-locale2 tst-stackguard1-static \ | 3356 | @@ -33,6 +33,7 @@ |
3163 | - tst-cancel21-static tst-cancel24-static tst-cond8-static \ | ||
3164 | + tst-cancel21-static tst-cond8-static \ | ||
3165 | tst-mutex8-static tst-mutexpi8-static tst-sem11-static \ | ||
3166 | tst-sem12-static | ||
3167 | -tests += tst-stackguard1-static tst-cancel21-static tst-cancel24-static \ | ||
3168 | + | ||
3169 | +ifeq (y,$(OPTION_EGLIBC_CXX_TESTS)) | ||
3170 | +tests-static += tst-cancel24-static | ||
3171 | +endif | ||
3172 | + | ||
3173 | +tests += tst-stackguard1-static tst-cancel21-static \ | ||
3174 | tst-cond8-static tst-mutex8-static tst-mutexpi8-static \ | ||
3175 | tst-sem11-static tst-sem12-static | ||
3176 | +tests-$(OPTION_EGLIBC_CXX_TESTS) += tst-cancel24-static | ||
3177 | xtests-static += tst-setuid1-static | ||
3178 | |||
3179 | # These tests are linked with libc before libpthread | ||
3180 | Index: git/nptl/pthread_create.c | ||
3181 | =================================================================== | ||
3182 | --- git.orig/nptl/pthread_create.c | ||
3183 | +++ git/nptl/pthread_create.c | ||
3184 | @@ -32,6 +32,7 @@ | ||
3185 | #include <exit-thread.h> | ||
3186 | #include <default-sched.h> | 3357 | #include <default-sched.h> |
3358 | #include <futex-internal.h> | ||
3187 | 3359 | ||
3188 | +#include <gnu/option-groups.h> | 3360 | +#include <gnu/option-groups.h> |
3189 | #include <shlib-compat.h> | 3361 | #include <shlib-compat.h> |
3190 | 3362 | ||
3191 | #include <stap-probe.h> | 3363 | #include <stap-probe.h> |
3192 | @@ -261,8 +262,10 @@ START_THREAD_DEFN | 3364 | @@ -262,8 +263,10 @@ START_THREAD_DEFN |
3193 | THREAD_SETMEM (pd, cpuclock_offset, now); | 3365 | THREAD_SETMEM (pd, cpuclock_offset, now); |
3194 | #endif | 3366 | #endif |
3195 | 3367 | ||
@@ -3200,7 +3372,7 @@ Index: git/nptl/pthread_create.c | |||
3200 | 3372 | ||
3201 | /* Initialize pointers to locale data. */ | 3373 | /* Initialize pointers to locale data. */ |
3202 | __ctype_init (); | 3374 | __ctype_init (); |
3203 | @@ -345,8 +348,10 @@ START_THREAD_DEFN | 3375 | @@ -346,8 +349,10 @@ START_THREAD_DEFN |
3204 | /* Run the destructor for the thread-local data. */ | 3376 | /* Run the destructor for the thread-local data. */ |
3205 | __nptl_deallocate_tsd (); | 3377 | __nptl_deallocate_tsd (); |
3206 | 3378 | ||
@@ -3211,10 +3383,10 @@ Index: git/nptl/pthread_create.c | |||
3211 | 3383 | ||
3212 | /* If this is the last thread we terminate the process now. We | 3384 | /* If this is the last thread we terminate the process now. We |
3213 | do not notify the debugger, it might just irritate it if there | 3385 | do not notify the debugger, it might just irritate it if there |
3214 | Index: git/nscd/Makefile | 3386 | diff --git a/nscd/Makefile b/nscd/Makefile |
3215 | =================================================================== | 3387 | index ede941d..f4f3f8d 100644 |
3216 | --- git.orig/nscd/Makefile | 3388 | --- a/nscd/Makefile |
3217 | +++ git/nscd/Makefile | 3389 | +++ b/nscd/Makefile |
3218 | @@ -18,14 +18,17 @@ | 3390 | @@ -18,14 +18,17 @@ |
3219 | # | 3391 | # |
3220 | # Sub-makefile for nscd portion of the library. | 3392 | # Sub-makefile for nscd portion of the library. |
@@ -3235,7 +3407,7 @@ Index: git/nscd/Makefile | |||
3235 | endif | 3407 | endif |
3236 | 3408 | ||
3237 | # To find xmalloc.c | 3409 | # To find xmalloc.c |
3238 | @@ -37,14 +40,18 @@ nscd-modules := nscd connections pwdcach | 3410 | @@ -37,14 +40,18 @@ nscd-modules := nscd connections pwdcache getpwnam_r getpwuid_r grpcache \ |
3239 | dbg_log nscd_conf nscd_stat cache mem nscd_setup_thread \ | 3411 | dbg_log nscd_conf nscd_stat cache mem nscd_setup_thread \ |
3240 | xmalloc xstrdup aicache initgrcache gai res_hconf \ | 3412 | xmalloc xstrdup aicache initgrcache gai res_hconf \ |
3241 | netgroupcache | 3413 | netgroupcache |
@@ -3259,7 +3431,7 @@ Index: git/nscd/Makefile | |||
3259 | 3431 | ||
3260 | endif | 3432 | endif |
3261 | 3433 | ||
3262 | @@ -100,7 +107,15 @@ include $(patsubst %,$(..)cppflags-itera | 3434 | @@ -100,7 +107,15 @@ include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left)) |
3263 | $(objpfx)nscd: $(nscd-modules:%=$(objpfx)%.o) | 3435 | $(objpfx)nscd: $(nscd-modules:%=$(objpfx)%.o) |
3264 | 3436 | ||
3265 | ifeq ($(build-shared),yes) | 3437 | ifeq ($(build-shared),yes) |
@@ -3277,18 +3449,134 @@ Index: git/nscd/Makefile | |||
3277 | +$(objpfx)nscd: $(common-objpfx)nis/libnsl.a | 3449 | +$(objpfx)nscd: $(common-objpfx)nis/libnsl.a |
3278 | +endif | 3450 | +endif |
3279 | endif | 3451 | endif |
3280 | Index: git/nscd/nis_hash.c | 3452 | diff --git a/nscd/nis_hash.c b/nscd/nis_hash.c |
3281 | =================================================================== | 3453 | new file mode 100644 |
3454 | index 0000000..d244c41 | ||
3282 | --- /dev/null | 3455 | --- /dev/null |
3283 | +++ git/nscd/nis_hash.c | 3456 | +++ b/nscd/nis_hash.c |
3284 | @@ -0,0 +1,3 @@ | 3457 | @@ -0,0 +1,3 @@ |
3285 | +/* If OPTION_EGLIBC_NIS is disabled, nscd can't get this from libnsl.so; | 3458 | +/* If OPTION_EGLIBC_NIS is disabled, nscd can't get this from libnsl.so; |
3286 | + we need our own copy. */ | 3459 | + we need our own copy. */ |
3287 | +#include "../nis/nis_hash.c" | 3460 | +#include "../nis/nis_hash.c" |
3288 | Index: git/nss/fixed-nsswitch.conf | 3461 | diff --git a/nss/Makefile b/nss/Makefile |
3289 | =================================================================== | 3462 | index 65ab7b5..19f0aef 100644 |
3463 | --- a/nss/Makefile | ||
3464 | +++ b/nss/Makefile | ||
3465 | @@ -18,28 +18,35 @@ | ||
3466 | # | ||
3467 | # Makefile for name service switch. | ||
3468 | # | ||
3469 | +include ../option-groups.mak | ||
3470 | + | ||
3471 | subdir := nss | ||
3472 | |||
3473 | include ../Makeconfig | ||
3474 | |||
3475 | headers := nss.h | ||
3476 | |||
3477 | -# This is the trivial part which goes into libc itself. | ||
3478 | -routines = nsswitch getnssent getnssent_r digits_dots \ | ||
3479 | - $(addsuffix -lookup,$(databases)) | ||
3480 | - | ||
3481 | # These are the databases that go through nss dispatch. | ||
3482 | # Caution: if you add a database here, you must add its real name | ||
3483 | # in databases.def, too. | ||
3484 | -databases = proto service hosts network grp pwd ethers \ | ||
3485 | - spwd netgrp alias sgrp | ||
3486 | +databases-y = grp pwd spwd sgrp | ||
3487 | +databases-$(OPTION_EGLIBC_INET) \ | ||
3488 | + += proto service hosts network ethers \ | ||
3489 | + netgrp | ||
3490 | +databases-$(OPTION_EGLIBC_DB_ALIASES) += alias | ||
3491 | + | ||
3492 | +routines-$(OPTION_EGLIBC_INET) += digits_dots | ||
3493 | |||
3494 | ifneq (,$(filter sunrpc,$(subdirs))) | ||
3495 | -databases += key rpc | ||
3496 | +databases-$(OPTION_EGLIBC_INET) += key rpc | ||
3497 | have-sunrpc := 1 | ||
3498 | else | ||
3499 | have-sunrpc := 0 | ||
3500 | endif | ||
3501 | +# This is the trivial part which goes into libc itself. | ||
3502 | +routines-y += nsswitch getnssent getnssent_r \ | ||
3503 | + $(addsuffix -lookup,$(databases-y)) | ||
3504 | + | ||
3505 | CPPFLAGS-getent.c = -DHAVE_SUNRPC=$(have-sunrpc) | ||
3506 | |||
3507 | others := getent makedb | ||
3508 | @@ -47,8 +54,9 @@ install-bin := getent makedb | ||
3509 | makedb-modules = xmalloc hash-string | ||
3510 | extra-objs += $(makedb-modules:=.o) | ||
3511 | |||
3512 | -tests = test-netdb tst-nss-test1 test-digits-dots tst-nss-getpwent | ||
3513 | -xtests = bug-erange | ||
3514 | +tests = tst-nss-test1 tst-nss-getpwent | ||
3515 | +tests-$(OPTION_EGLIBC_INET) += test-netdb test-digits-dots | ||
3516 | +xtests-$(OPTION_EGLIBC_INET) += bug-erange | ||
3517 | |||
3518 | # Specify rules for the nss_* modules. We have some services. | ||
3519 | services := files db | ||
3520 | @@ -63,7 +71,7 @@ subdir-dirs = $(services:%=nss_%) | ||
3521 | vpath %.c $(subdir-dirs) ../locale/programs ../intl | ||
3522 | |||
3523 | |||
3524 | -libnss_files-routines := $(addprefix files-,$(databases)) \ | ||
3525 | +libnss_files-routines := $(addprefix files-,$(databases-y)) \ | ||
3526 | files-initgroups files-have_o_cloexec files-init | ||
3527 | |||
3528 | libnss_db-dbs := $(addprefix db-,\ | ||
3529 | @@ -86,6 +94,45 @@ tests-static = tst-nss-static | ||
3530 | tests += $(tests-static) | ||
3531 | endif | ||
3532 | |||
3533 | +ifneq ($(OPTION_EGLIBC_NSSWITCH),y) | ||
3534 | + | ||
3535 | +ifndef OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG | ||
3536 | +$(error OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG variable left unset) | ||
3537 | +endif | ||
3538 | + | ||
3539 | +ifndef OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS | ||
3540 | +$(error OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS variable left unset) | ||
3541 | +endif | ||
3542 | + | ||
3543 | +ifeq (,$(wildcard $(OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG))) | ||
3544 | +$(warning OPTION_EGLIBC_NSSWITCH is disabled, but fixed config file) | ||
3545 | +$(error does not exist: $(OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG)) | ||
3546 | +endif | ||
3547 | + | ||
3548 | +ifeq (,$(wildcard $(OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS))) | ||
3549 | +$(warning OPTION_EGLIBC_NSSWITCH is disabled, but fixed functions file) | ||
3550 | +$(error does not exist: $(OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS)) | ||
3551 | +endif | ||
3552 | + | ||
3553 | +before-compile := $(objpfx)fixed-nsswitch.h | ||
3554 | +generated := fixed-nsswitch.h | ||
3555 | +$(objpfx)fixed-nsswitch.h $(objfpx)fixed-nsswitch-libs: \ | ||
3556 | + $(objpfx)gen-fixed-nsswitch \ | ||
3557 | + $(OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG) | ||
3558 | + $< $(objpfx)fixed-nsswitch.h \ | ||
3559 | + $(objpfx)fixed-nsswitch-libs \ | ||
3560 | + $(OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG) | ||
3561 | + | ||
3562 | +$(objpfx)gen-fixed-nsswitch: gen-fixed-nsswitch.c \ | ||
3563 | + $(common-objpfx)option-groups.config \ | ||
3564 | + $(OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS) | ||
3565 | + $(native-compile) | ||
3566 | +gen-fixed-nsswitch-CFLAGS = \ | ||
3567 | + -g3 -O -Wall \ | ||
3568 | + -I $(objpfx) \ | ||
3569 | + -DFIXED_FUNCTIONS='"$(OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS)"' | ||
3570 | +endif | ||
3571 | + | ||
3572 | include ../Rules | ||
3573 | |||
3574 | ifeq (yes,$(have-selinux)) | ||
3575 | diff --git a/nss/fixed-nsswitch.conf b/nss/fixed-nsswitch.conf | ||
3576 | new file mode 100644 | ||
3577 | index 0000000..91bb675 | ||
3290 | --- /dev/null | 3578 | --- /dev/null |
3291 | +++ git/nss/fixed-nsswitch.conf | 3579 | +++ b/nss/fixed-nsswitch.conf |
3292 | @@ -0,0 +1,22 @@ | 3580 | @@ -0,0 +1,22 @@ |
3293 | +# /etc/nsswitch.conf | 3581 | +# /etc/nsswitch.conf |
3294 | +# | 3582 | +# |
@@ -3312,10 +3600,11 @@ Index: git/nss/fixed-nsswitch.conf | |||
3312 | +rpc: files | 3600 | +rpc: files |
3313 | + | 3601 | + |
3314 | +netgroup: files | 3602 | +netgroup: files |
3315 | Index: git/nss/fixed-nsswitch.functions | 3603 | diff --git a/nss/fixed-nsswitch.functions b/nss/fixed-nsswitch.functions |
3316 | =================================================================== | 3604 | new file mode 100644 |
3605 | index 0000000..2f3fa83 | ||
3317 | --- /dev/null | 3606 | --- /dev/null |
3318 | +++ git/nss/fixed-nsswitch.functions | 3607 | +++ b/nss/fixed-nsswitch.functions |
3319 | @@ -0,0 +1,121 @@ | 3608 | @@ -0,0 +1,121 @@ |
3320 | +/* List of functions defined for fixed NSS in GNU C Library. | 3609 | +/* List of functions defined for fixed NSS in GNU C Library. |
3321 | + Copyright (C) 1996, 1997, 1998, 2005 Free Software Foundation, Inc. | 3610 | + Copyright (C) 1996, 1997, 1998, 2005 Free Software Foundation, Inc. |
@@ -3438,10 +3727,11 @@ Index: git/nss/fixed-nsswitch.functions | |||
3438 | +/* shadow */ | 3727 | +/* shadow */ |
3439 | +DEFINE_ENT (shadow, files, sp) | 3728 | +DEFINE_ENT (shadow, files, sp) |
3440 | +DEFINE_GET (shadow, files, spnam) | 3729 | +DEFINE_GET (shadow, files, spnam) |
3441 | Index: git/nss/gen-fixed-nsswitch.c | 3730 | diff --git a/nss/gen-fixed-nsswitch.c b/nss/gen-fixed-nsswitch.c |
3442 | =================================================================== | 3731 | new file mode 100644 |
3732 | index 0000000..6e1c98c | ||
3443 | --- /dev/null | 3733 | --- /dev/null |
3444 | +++ git/nss/gen-fixed-nsswitch.c | 3734 | +++ b/nss/gen-fixed-nsswitch.c |
3445 | @@ -0,0 +1,803 @@ | 3735 | @@ -0,0 +1,803 @@ |
3446 | +/* gen-fixed-nsswitch.c --- generate fixed name service data structures | 3736 | +/* gen-fixed-nsswitch.c --- generate fixed name service data structures |
3447 | + Copyright (C) 1996-1999, 2001-2006, 2007 Free Software Foundation, Inc. | 3737 | + Copyright (C) 1996-1999, 2001-2006, 2007 Free Software Foundation, Inc. |
@@ -4246,10 +4536,10 @@ Index: git/nss/gen-fixed-nsswitch.c | |||
4246 | + | 4536 | + |
4247 | + return 0; | 4537 | + return 0; |
4248 | +} | 4538 | +} |
4249 | Index: git/nss/getent.c | 4539 | diff --git a/nss/getent.c b/nss/getent.c |
4250 | =================================================================== | 4540 | index 34df848..674c8ee 100644 |
4251 | --- git.orig/nss/getent.c | 4541 | --- a/nss/getent.c |
4252 | +++ git/nss/getent.c | 4542 | +++ b/nss/getent.c |
4253 | @@ -39,6 +39,7 @@ | 4543 | @@ -39,6 +39,7 @@ |
4254 | #include <netinet/ether.h> | 4544 | #include <netinet/ether.h> |
4255 | #include <netinet/in.h> | 4545 | #include <netinet/in.h> |
@@ -4258,7 +4548,7 @@ Index: git/nss/getent.c | |||
4258 | 4548 | ||
4259 | /* Get libc version number. */ | 4549 | /* Get libc version number. */ |
4260 | #include <version.h> | 4550 | #include <version.h> |
4261 | @@ -91,6 +92,7 @@ warranty; not even for MERCHANTABILITY o | 4551 | @@ -91,6 +92,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ |
4262 | fprintf (stream, gettext ("Written by %s.\n"), "Thorsten Kukuk"); | 4552 | fprintf (stream, gettext ("Written by %s.\n"), "Thorsten Kukuk"); |
4263 | } | 4553 | } |
4264 | 4554 | ||
@@ -4308,7 +4598,7 @@ Index: git/nss/getent.c | |||
4308 | /* This is for protocols */ | 4598 | /* This is for protocols */ |
4309 | static void | 4599 | static void |
4310 | print_protocols (struct protoent *proto) | 4600 | print_protocols (struct protoent *proto) |
4311 | @@ -805,6 +813,7 @@ services_keys (int number, char *key[]) | 4601 | @@ -807,6 +815,7 @@ services_keys (int number, char *key[]) |
4312 | 4602 | ||
4313 | return result; | 4603 | return result; |
4314 | } | 4604 | } |
@@ -4316,7 +4606,7 @@ Index: git/nss/getent.c | |||
4316 | 4606 | ||
4317 | /* This is for shadow */ | 4607 | /* This is for shadow */ |
4318 | static void | 4608 | static void |
4319 | @@ -871,21 +880,34 @@ struct | 4609 | @@ -873,23 +882,36 @@ struct |
4320 | } databases[] = | 4610 | } databases[] = |
4321 | { | 4611 | { |
4322 | #define D(name) { #name, name ## _keys }, | 4612 | #define D(name) { #name, name ## _keys }, |
@@ -4327,15 +4617,15 @@ Index: git/nss/getent.c | |||
4327 | -D(ethers) | 4617 | -D(ethers) |
4328 | + | 4618 | + |
4329 | +#if __OPTION_EGLIBC_INET | 4619 | +#if __OPTION_EGLIBC_INET |
4330 | +#define DN(name) D(name) | 4620 | +# define DN(name) D(name) |
4331 | +#else | 4621 | +#else |
4332 | +#define DN(name) | 4622 | +# define DN(name) |
4333 | +#endif | 4623 | +#endif |
4334 | + | 4624 | + |
4335 | +#if __OPTION_EGLIBC_DB_ALIASES | 4625 | +#if __OPTION_EGLIBC_DB_ALIASES |
4336 | +#define DA(name) D(name) | 4626 | +# define DA(name) D(name) |
4337 | +#else | 4627 | +#else |
4338 | +#define DA(name) | 4628 | +# define DA(name) |
4339 | +#endif | 4629 | +#endif |
4340 | + | 4630 | + |
4341 | +DN(ahosts) | 4631 | +DN(ahosts) |
@@ -4355,18 +4645,20 @@ Index: git/nss/getent.c | |||
4355 | +DN(networks) | 4645 | +DN(networks) |
4356 | D(passwd) | 4646 | D(passwd) |
4357 | -D(protocols) | 4647 | -D(protocols) |
4358 | -D(rpc) | ||
4359 | -D(services) | ||
4360 | +DN(protocols) | 4648 | +DN(protocols) |
4649 | #if HAVE_SUNRPC | ||
4650 | -D(rpc) | ||
4361 | +DN(rpc) | 4651 | +DN(rpc) |
4652 | #endif | ||
4653 | -D(services) | ||
4362 | +DN(services) | 4654 | +DN(services) |
4363 | D(shadow) | 4655 | D(shadow) |
4364 | #undef D | 4656 | #undef D |
4365 | { NULL, NULL } | 4657 | { NULL, NULL } |
4366 | Index: git/nss/getnssent_r.c | 4658 | diff --git a/nss/getnssent_r.c b/nss/getnssent_r.c |
4367 | =================================================================== | 4659 | index f5b9036..f09f7fe 100644 |
4368 | --- git.orig/nss/getnssent_r.c | 4660 | --- a/nss/getnssent_r.c |
4369 | +++ git/nss/getnssent_r.c | 4661 | +++ b/nss/getnssent_r.c |
4370 | @@ -16,6 +16,7 @@ | 4662 | @@ -16,6 +16,7 @@ |
4371 | <http://www.gnu.org/licenses/>. */ | 4663 | <http://www.gnu.org/licenses/>. */ |
4372 | 4664 | ||
@@ -4375,7 +4667,7 @@ Index: git/nss/getnssent_r.c | |||
4375 | #include <netdb.h> | 4667 | #include <netdb.h> |
4376 | #include "nsswitch.h" | 4668 | #include "nsswitch.h" |
4377 | 4669 | ||
4378 | @@ -59,11 +60,13 @@ __nss_setent (const char *func_name, db_ | 4670 | @@ -59,11 +60,13 @@ __nss_setent (const char *func_name, db_lookup_function lookup_fct, |
4379 | } fct; | 4671 | } fct; |
4380 | int no_more; | 4672 | int no_more; |
4381 | 4673 | ||
@@ -4389,7 +4681,7 @@ Index: git/nss/getnssent_r.c | |||
4389 | 4681 | ||
4390 | /* Cycle through the services and run their `setXXent' functions until | 4682 | /* Cycle through the services and run their `setXXent' functions until |
4391 | we find an available service. */ | 4683 | we find an available service. */ |
4392 | @@ -101,11 +104,13 @@ __nss_endent (const char *func_name, db_ | 4684 | @@ -101,11 +104,13 @@ __nss_endent (const char *func_name, db_lookup_function lookup_fct, |
4393 | } fct; | 4685 | } fct; |
4394 | int no_more; | 4686 | int no_more; |
4395 | 4687 | ||
@@ -4403,7 +4695,7 @@ Index: git/nss/getnssent_r.c | |||
4403 | 4695 | ||
4404 | /* Cycle through all the services and run their endXXent functions. */ | 4696 | /* Cycle through all the services and run their endXXent functions. */ |
4405 | no_more = setup (func_name, lookup_fct, &fct.ptr, nip, startp, 1); | 4697 | no_more = setup (func_name, lookup_fct, &fct.ptr, nip, startp, 1); |
4406 | @@ -141,12 +146,14 @@ __nss_getent_r (const char *getent_func_ | 4698 | @@ -141,12 +146,14 @@ __nss_getent_r (const char *getent_func_name, |
4407 | int no_more; | 4699 | int no_more; |
4408 | enum nss_status status; | 4700 | enum nss_status status; |
4409 | 4701 | ||
@@ -4418,7 +4710,7 @@ Index: git/nss/getnssent_r.c | |||
4418 | 4710 | ||
4419 | /* Initialize status to return if no more functions are found. */ | 4711 | /* Initialize status to return if no more functions are found. */ |
4420 | status = NSS_STATUS_NOTFOUND; | 4712 | status = NSS_STATUS_NOTFOUND; |
4421 | @@ -161,7 +168,7 @@ __nss_getent_r (const char *getent_func_ | 4713 | @@ -161,7 +168,7 @@ __nss_getent_r (const char *getent_func_name, |
4422 | int is_last_nip = *nip == *last_nip; | 4714 | int is_last_nip = *nip == *last_nip; |
4423 | 4715 | ||
4424 | status = DL_CALL_FCT (fct.f, | 4716 | status = DL_CALL_FCT (fct.f, |
@@ -4427,114 +4719,10 @@ Index: git/nss/getnssent_r.c | |||
4427 | 4719 | ||
4428 | /* The status is NSS_STATUS_TRYAGAIN and errno is ERANGE the | 4720 | /* The status is NSS_STATUS_TRYAGAIN and errno is ERANGE the |
4429 | provided buffer is too small. In this case we should give | 4721 | provided buffer is too small. In this case we should give |
4430 | Index: git/nss/Makefile | 4722 | diff --git a/nss/nsswitch.c b/nss/nsswitch.c |
4431 | =================================================================== | 4723 | index 9712623..c81e207 100644 |
4432 | --- git.orig/nss/Makefile | 4724 | --- a/nss/nsswitch.c |
4433 | +++ git/nss/Makefile | 4725 | +++ b/nss/nsswitch.c |
4434 | @@ -18,29 +18,36 @@ | ||
4435 | # | ||
4436 | # Makefile for name service switch. | ||
4437 | # | ||
4438 | +include ../option-groups.mak | ||
4439 | + | ||
4440 | subdir := nss | ||
4441 | |||
4442 | include ../Makeconfig | ||
4443 | |||
4444 | headers := nss.h | ||
4445 | |||
4446 | -# This is the trivial part which goes into libc itself. | ||
4447 | -routines = nsswitch getnssent getnssent_r digits_dots \ | ||
4448 | - $(addsuffix -lookup,$(databases)) | ||
4449 | - | ||
4450 | # These are the databases that go through nss dispatch. | ||
4451 | # Caution: if you add a database here, you must add its real name | ||
4452 | # in databases.def, too. | ||
4453 | -databases = proto service hosts network grp pwd rpc ethers \ | ||
4454 | - spwd netgrp key alias sgrp | ||
4455 | +databases-y = grp pwd spwd sgrp | ||
4456 | +databases-$(OPTION_EGLIBC_INET) \ | ||
4457 | + += proto service hosts network rpc ethers \ | ||
4458 | + netgrp key | ||
4459 | +databases-$(OPTION_EGLIBC_DB_ALIASES) += alias | ||
4460 | + | ||
4461 | +# This is the trivial part which goes into libc itself. | ||
4462 | +routines-y += nsswitch getnssent getnssent_r \ | ||
4463 | + $(addsuffix -lookup,$(databases-y)) | ||
4464 | +routines-$(OPTION_EGLIBC_INET) += digits_dots | ||
4465 | |||
4466 | others := getent makedb | ||
4467 | install-bin := getent makedb | ||
4468 | makedb-modules = xmalloc hash-string | ||
4469 | extra-objs += $(makedb-modules:=.o) | ||
4470 | |||
4471 | -tests = test-netdb tst-nss-test1 test-digits-dots | ||
4472 | -xtests = bug-erange | ||
4473 | +tests = tst-nss-test1 | ||
4474 | +tests-$(OPTION_EGLIBC_INET) += test-netdb test-digits-dots | ||
4475 | +xtests-$(OPTION_EGLIBC_INET) += bug-erange | ||
4476 | |||
4477 | # Specify rules for the nss_* modules. We have some services. | ||
4478 | services := files db | ||
4479 | @@ -55,7 +62,7 @@ subdir-dirs = $(services:%=nss_%) | ||
4480 | vpath %.c $(subdir-dirs) ../locale/programs ../intl | ||
4481 | |||
4482 | |||
4483 | -libnss_files-routines := $(addprefix files-,$(databases)) \ | ||
4484 | +libnss_files-routines := $(addprefix files-,$(databases-y)) \ | ||
4485 | files-initgroups files-have_o_cloexec files-init | ||
4486 | |||
4487 | libnss_db-dbs := $(addprefix db-,\ | ||
4488 | @@ -78,6 +85,45 @@ tests-static = tst-nss-static | ||
4489 | tests += $(tests-static) | ||
4490 | endif | ||
4491 | |||
4492 | +ifneq ($(OPTION_EGLIBC_NSSWITCH),y) | ||
4493 | + | ||
4494 | +ifndef OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG | ||
4495 | +$(error OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG variable left unset) | ||
4496 | +endif | ||
4497 | + | ||
4498 | +ifndef OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS | ||
4499 | +$(error OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS variable left unset) | ||
4500 | +endif | ||
4501 | + | ||
4502 | +ifeq (,$(wildcard $(OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG))) | ||
4503 | +$(warning OPTION_EGLIBC_NSSWITCH is disabled, but fixed config file) | ||
4504 | +$(error does not exist: $(OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG)) | ||
4505 | +endif | ||
4506 | + | ||
4507 | +ifeq (,$(wildcard $(OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS))) | ||
4508 | +$(warning OPTION_EGLIBC_NSSWITCH is disabled, but fixed functions file) | ||
4509 | +$(error does not exist: $(OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS)) | ||
4510 | +endif | ||
4511 | + | ||
4512 | +before-compile := $(objpfx)fixed-nsswitch.h | ||
4513 | +generated := fixed-nsswitch.h | ||
4514 | +$(objpfx)fixed-nsswitch.h $(objfpx)fixed-nsswitch-libs: \ | ||
4515 | + $(objpfx)gen-fixed-nsswitch \ | ||
4516 | + $(OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG) | ||
4517 | + $< $(objpfx)fixed-nsswitch.h \ | ||
4518 | + $(objpfx)fixed-nsswitch-libs \ | ||
4519 | + $(OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG) | ||
4520 | + | ||
4521 | +$(objpfx)gen-fixed-nsswitch: gen-fixed-nsswitch.c \ | ||
4522 | + $(common-objpfx)option-groups.config \ | ||
4523 | + $(OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS) | ||
4524 | + $(native-compile) | ||
4525 | +gen-fixed-nsswitch-CFLAGS = \ | ||
4526 | + -g3 -O -Wall \ | ||
4527 | + -I $(objpfx) \ | ||
4528 | + -DFIXED_FUNCTIONS='"$(OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS)"' | ||
4529 | +endif | ||
4530 | + | ||
4531 | include ../Rules | ||
4532 | |||
4533 | ifeq (yes,$(have-selinux)) | ||
4534 | Index: git/nss/nsswitch.c | ||
4535 | =================================================================== | ||
4536 | --- git.orig/nss/nsswitch.c | ||
4537 | +++ git/nss/nsswitch.c | ||
4538 | @@ -26,6 +26,7 @@ | 4726 | @@ -26,6 +26,7 @@ |
4539 | #include <stdio_ext.h> | 4727 | #include <stdio_ext.h> |
4540 | #include <stdlib.h> | 4728 | #include <stdlib.h> |
@@ -4559,7 +4747,7 @@ Index: git/nss/nsswitch.c | |||
4559 | /* Prototypes for the local functions. */ | 4747 | /* Prototypes for the local functions. */ |
4560 | static name_database *nss_parse_file (const char *fname) internal_function; | 4748 | static name_database *nss_parse_file (const char *fname) internal_function; |
4561 | static name_database_entry *nss_getline (char *line) internal_function; | 4749 | static name_database_entry *nss_getline (char *line) internal_function; |
4562 | @@ -79,6 +89,9 @@ bool __nss_database_custom[NSS_DBSIDX_ma | 4750 | @@ -79,6 +89,9 @@ bool __nss_database_custom[NSS_DBSIDX_max]; |
4563 | 4751 | ||
4564 | __libc_lock_define_initialized (static, lock) | 4752 | __libc_lock_define_initialized (static, lock) |
4565 | 4753 | ||
@@ -4590,7 +4778,7 @@ Index: git/nss/nsswitch.c | |||
4590 | 4778 | ||
4591 | #ifdef USE_NSCD | 4779 | #ifdef USE_NSCD |
4592 | /* Nonzero if this is the nscd process. */ | 4780 | /* Nonzero if this is the nscd process. */ |
4593 | @@ -109,20 +136,22 @@ __nss_database_lookup (const char *datab | 4781 | @@ -109,20 +136,22 @@ __nss_database_lookup (const char *database, const char *alternate_name, |
4594 | const char *defconfig, service_user **ni) | 4782 | const char *defconfig, service_user **ni) |
4595 | { | 4783 | { |
4596 | /* Prevent multiple threads to change the service table. */ | 4784 | /* Prevent multiple threads to change the service table. */ |
@@ -4615,7 +4803,7 @@ Index: git/nss/nsswitch.c | |||
4615 | 4803 | ||
4616 | /* Test whether configuration data is available. */ | 4804 | /* Test whether configuration data is available. */ |
4617 | if (service_table != NULL) | 4805 | if (service_table != NULL) |
4618 | @@ -144,6 +173,7 @@ __nss_database_lookup (const char *datab | 4806 | @@ -144,6 +173,7 @@ __nss_database_lookup (const char *database, const char *alternate_name, |
4619 | *ni = entry->service; | 4807 | *ni = entry->service; |
4620 | } | 4808 | } |
4621 | 4809 | ||
@@ -4623,7 +4811,7 @@ Index: git/nss/nsswitch.c | |||
4623 | /* No configuration data is available, either because nsswitch.conf | 4811 | /* No configuration data is available, either because nsswitch.conf |
4624 | doesn't exist or because it doesn't have a line for this database. | 4812 | doesn't exist or because it doesn't have a line for this database. |
4625 | 4813 | ||
4626 | @@ -166,13 +196,23 @@ __nss_database_lookup (const char *datab | 4814 | @@ -166,13 +196,23 @@ __nss_database_lookup (const char *database, const char *alternate_name, |
4627 | { | 4815 | { |
4628 | entry->next = defconfig_entries; | 4816 | entry->next = defconfig_entries; |
4629 | entry->service = *ni; | 4817 | entry->service = *ni; |
@@ -4649,7 +4837,7 @@ Index: git/nss/nsswitch.c | |||
4649 | 4837 | ||
4650 | return *ni != NULL ? 0 : -1; | 4838 | return *ni != NULL ? 0 : -1; |
4651 | } | 4839 | } |
4652 | @@ -252,6 +292,7 @@ __nss_next2 (service_user **ni, const ch | 4840 | @@ -252,6 +292,7 @@ __nss_next2 (service_user **ni, const char *fct_name, const char *fct2_name, |
4653 | libc_hidden_def (__nss_next2) | 4841 | libc_hidden_def (__nss_next2) |
4654 | 4842 | ||
4655 | 4843 | ||
@@ -4657,7 +4845,7 @@ Index: git/nss/nsswitch.c | |||
4657 | int | 4845 | int |
4658 | attribute_compat_text_section | 4846 | attribute_compat_text_section |
4659 | __nss_next (service_user **ni, const char *fct_name, void **fctp, int status, | 4847 | __nss_next (service_user **ni, const char *fct_name, void **fctp, int status, |
4660 | @@ -300,13 +341,13 @@ __nss_configure_lookup (const char *dbna | 4848 | @@ -300,13 +341,13 @@ __nss_configure_lookup (const char *dbname, const char *service_line) |
4661 | } | 4849 | } |
4662 | 4850 | ||
4663 | /* Prevent multiple threads to change the service table. */ | 4851 | /* Prevent multiple threads to change the service table. */ |
@@ -4673,7 +4861,7 @@ Index: git/nss/nsswitch.c | |||
4673 | 4861 | ||
4674 | return 0; | 4862 | return 0; |
4675 | } | 4863 | } |
4676 | @@ -402,7 +443,7 @@ __nss_lookup_function (service_user *ni, | 4864 | @@ -402,7 +443,7 @@ __nss_lookup_function (service_user *ni, const char *fct_name) |
4677 | void **found, *result; | 4865 | void **found, *result; |
4678 | 4866 | ||
4679 | /* We now modify global data. Protect it. */ | 4867 | /* We now modify global data. Protect it. */ |
@@ -4682,7 +4870,7 @@ Index: git/nss/nsswitch.c | |||
4682 | 4870 | ||
4683 | /* Search the tree of functions previously requested. Data in the | 4871 | /* Search the tree of functions previously requested. Data in the |
4684 | tree are `known_function' structures, whose first member is a | 4872 | tree are `known_function' structures, whose first member is a |
4685 | @@ -413,7 +454,7 @@ __nss_lookup_function (service_user *ni, | 4873 | @@ -413,7 +454,7 @@ __nss_lookup_function (service_user *ni, const char *fct_name) |
4686 | enough to a pointer to our structure to use as a lookup key that | 4874 | enough to a pointer to our structure to use as a lookup key that |
4687 | will be passed to `known_compare' (above). */ | 4875 | will be passed to `known_compare' (above). */ |
4688 | 4876 | ||
@@ -4691,7 +4879,7 @@ Index: git/nss/nsswitch.c | |||
4691 | if (found == NULL) | 4879 | if (found == NULL) |
4692 | /* This means out-of-memory. */ | 4880 | /* This means out-of-memory. */ |
4693 | result = NULL; | 4881 | result = NULL; |
4694 | @@ -440,7 +481,7 @@ __nss_lookup_function (service_user *ni, | 4882 | @@ -440,7 +481,7 @@ __nss_lookup_function (service_user *ni, const char *fct_name) |
4695 | #endif | 4883 | #endif |
4696 | /* Oops. We can't instantiate this node properly. | 4884 | /* Oops. We can't instantiate this node properly. |
4697 | Remove it from the tree. */ | 4885 | Remove it from the tree. */ |
@@ -4700,7 +4888,7 @@ Index: git/nss/nsswitch.c | |||
4700 | free (known); | 4888 | free (known); |
4701 | result = NULL; | 4889 | result = NULL; |
4702 | } | 4890 | } |
4703 | @@ -520,13 +561,43 @@ __nss_lookup_function (service_user *ni, | 4891 | @@ -520,13 +561,43 @@ __nss_lookup_function (service_user *ni, const char *fct_name) |
4704 | } | 4892 | } |
4705 | 4893 | ||
4706 | /* Remove the lock. */ | 4894 | /* Remove the lock. */ |
@@ -4745,7 +4933,7 @@ Index: git/nss/nsswitch.c | |||
4745 | static name_database * | 4933 | static name_database * |
4746 | internal_function | 4934 | internal_function |
4747 | nss_parse_file (const char *fname) | 4935 | nss_parse_file (const char *fname) |
4748 | @@ -632,8 +703,10 @@ nss_parse_service_list (const char *line | 4936 | @@ -632,8 +703,10 @@ nss_parse_service_list (const char *line) |
4749 | + (line - name + 1)); | 4937 | + (line - name + 1)); |
4750 | if (new_service == NULL) | 4938 | if (new_service == NULL) |
4751 | return result; | 4939 | return result; |
@@ -4757,7 +4945,7 @@ Index: git/nss/nsswitch.c | |||
4757 | 4945 | ||
4758 | /* Set default actions. */ | 4946 | /* Set default actions. */ |
4759 | new_service->actions[2 + NSS_STATUS_TRYAGAIN] = NSS_ACTION_CONTINUE; | 4947 | new_service->actions[2 + NSS_STATUS_TRYAGAIN] = NSS_ACTION_CONTINUE; |
4760 | @@ -642,7 +715,7 @@ nss_parse_service_list (const char *line | 4948 | @@ -642,7 +715,7 @@ nss_parse_service_list (const char *line) |
4761 | new_service->actions[2 + NSS_STATUS_SUCCESS] = NSS_ACTION_RETURN; | 4949 | new_service->actions[2 + NSS_STATUS_SUCCESS] = NSS_ACTION_RETURN; |
4762 | new_service->actions[2 + NSS_STATUS_RETURN] = NSS_ACTION_RETURN; | 4950 | new_service->actions[2 + NSS_STATUS_RETURN] = NSS_ACTION_RETURN; |
4763 | new_service->library = NULL; | 4951 | new_service->library = NULL; |
@@ -4778,7 +4966,7 @@ Index: git/nss/nsswitch.c | |||
4778 | 4966 | ||
4779 | /* Parse the list of services. */ | 4967 | /* Parse the list of services. */ |
4780 | result->service = nss_parse_service_list (line); | 4968 | result->service = nss_parse_service_list (line); |
4781 | @@ -816,6 +890,7 @@ nss_new_service (name_database *database | 4969 | @@ -816,6 +890,7 @@ nss_new_service (name_database *database, const char *name) |
4782 | return *currentp; | 4970 | return *currentp; |
4783 | } | 4971 | } |
4784 | #endif | 4972 | #endif |
@@ -4786,7 +4974,7 @@ Index: git/nss/nsswitch.c | |||
4786 | 4974 | ||
4787 | 4975 | ||
4788 | #if defined SHARED && defined USE_NSCD | 4976 | #if defined SHARED && defined USE_NSCD |
4789 | @@ -834,6 +909,7 @@ nss_load_all_libraries (const char *serv | 4977 | @@ -834,6 +909,7 @@ nss_load_all_libraries (const char *service, const char *def) |
4790 | } | 4978 | } |
4791 | 4979 | ||
4792 | 4980 | ||
@@ -4794,7 +4982,7 @@ Index: git/nss/nsswitch.c | |||
4794 | /* Called by nscd and nscd alone. */ | 4982 | /* Called by nscd and nscd alone. */ |
4795 | void | 4983 | void |
4796 | __nss_disable_nscd (void (*cb) (size_t, struct traced_file *)) | 4984 | __nss_disable_nscd (void (*cb) (size_t, struct traced_file *)) |
4797 | @@ -857,8 +933,10 @@ __nss_disable_nscd (void (*cb) (size_t, | 4985 | @@ -857,8 +933,10 @@ __nss_disable_nscd (void (*cb) (size_t, struct traced_file *)) |
4798 | __nss_not_use_nscd_services = -1; | 4986 | __nss_not_use_nscd_services = -1; |
4799 | __nss_not_use_nscd_netgroup = -1; | 4987 | __nss_not_use_nscd_netgroup = -1; |
4800 | } | 4988 | } |
@@ -4805,7 +4993,7 @@ Index: git/nss/nsswitch.c | |||
4805 | static void | 4993 | static void |
4806 | free_database_entries (name_database_entry *entry) | 4994 | free_database_entries (name_database_entry *entry) |
4807 | { | 4995 | { |
4808 | @@ -871,8 +949,8 @@ free_database_entries (name_database_ent | 4996 | @@ -871,8 +949,8 @@ free_database_entries (name_database_entry *entry) |
4809 | { | 4997 | { |
4810 | service_user *olds = service; | 4998 | service_user *olds = service; |
4811 | 4999 | ||
@@ -4821,10 +5009,10 @@ Index: git/nss/nsswitch.c | |||
4821 | free (top); | 5009 | free (top); |
4822 | } | 5010 | } |
4823 | +#endif /* __OPTION_EGLIBC_NSSWITCH */ | 5011 | +#endif /* __OPTION_EGLIBC_NSSWITCH */ |
4824 | Index: git/nss/nsswitch.h | 5012 | diff --git a/nss/nsswitch.h b/nss/nsswitch.h |
4825 | =================================================================== | 5013 | index a5318fa..1730977 100644 |
4826 | --- git.orig/nss/nsswitch.h | 5014 | --- a/nss/nsswitch.h |
4827 | +++ git/nss/nsswitch.h | 5015 | +++ b/nss/nsswitch.h |
4828 | @@ -65,10 +65,20 @@ typedef struct service_user | 5016 | @@ -65,10 +65,20 @@ typedef struct service_user |
4829 | lookup_actions actions[5]; | 5017 | lookup_actions actions[5]; |
4830 | /* Link to the underlying library object. */ | 5018 | /* Link to the underlying library object. */ |
@@ -4858,10 +5046,177 @@ Index: git/nss/nsswitch.h | |||
4858 | } name_database_entry; | 5046 | } name_database_entry; |
4859 | 5047 | ||
4860 | 5048 | ||
4861 | Index: git/posix/bug-regex1.c | 5049 | diff --git a/posix/Makefile b/posix/Makefile |
4862 | =================================================================== | 5050 | index 15e8818..609ed03 100644 |
4863 | --- git.orig/posix/bug-regex1.c | 5051 | --- a/posix/Makefile |
4864 | +++ git/posix/bug-regex1.c | 5052 | +++ b/posix/Makefile |
5053 | @@ -18,6 +18,8 @@ | ||
5054 | # | ||
5055 | # Sub-makefile for POSIX portion of the library. | ||
5056 | # | ||
5057 | +include ../option-groups.mak | ||
5058 | + | ||
5059 | subdir := posix | ||
5060 | |||
5061 | include ../Makeconfig | ||
5062 | @@ -43,13 +45,24 @@ routines := \ | ||
5063 | getpgid setpgid getpgrp bsd-getpgrp setpgrp getsid setsid \ | ||
5064 | getresuid getresgid setresuid setresgid \ | ||
5065 | pathconf sysconf fpathconf \ | ||
5066 | - glob glob64 fnmatch regex \ | ||
5067 | + glob glob64 fnmatch \ | ||
5068 | confstr \ | ||
5069 | getopt getopt1 getopt_init \ | ||
5070 | sched_setp sched_getp sched_sets sched_gets sched_yield sched_primax \ | ||
5071 | sched_primin sched_rr_gi sched_getaffinity sched_setaffinity \ | ||
5072 | - getaddrinfo gai_strerror wordexp \ | ||
5073 | pread pwrite pread64 pwrite64 \ | ||
5074 | + posix_madvise \ | ||
5075 | + get_child_max sched_cpucount sched_cpualloc sched_cpufree | ||
5076 | + | ||
5077 | +routines-$(OPTION_EGLIBC_INET) += getaddrinfo gai_strerror | ||
5078 | + | ||
5079 | +ifeq (y,$(OPTION_POSIX_REGEXP_GLIBC)) | ||
5080 | +routines-$(OPTION_POSIX_REGEXP) += regex | ||
5081 | +else | ||
5082 | +routines-$(OPTION_POSIX_REGEXP) += xregex | ||
5083 | +endif | ||
5084 | + | ||
5085 | +routines-$(OPTION_EGLIBC_SPAWN) += \ | ||
5086 | spawn_faction_init spawn_faction_destroy spawn_faction_addclose \ | ||
5087 | spawn_faction_addopen spawn_faction_adddup2 \ | ||
5088 | spawnattr_init spawnattr_destroy \ | ||
5089 | @@ -61,37 +74,54 @@ routines := \ | ||
5090 | posix_madvise \ | ||
5091 | get_child_max sched_cpucount sched_cpualloc sched_cpufree | ||
5092 | |||
5093 | +routines-$(OPTION_EGLIBC_WORDEXP) += wordexp | ||
5094 | + | ||
5095 | aux := init-posix environ | ||
5096 | -tests := tstgetopt testfnm runtests runptests \ | ||
5097 | +tests := tstgetopt testfnm runtests \ | ||
5098 | tst-preadwrite tst-preadwrite64 test-vfork regexbug1 \ | ||
5099 | - tst-mmap tst-getaddrinfo tst-truncate \ | ||
5100 | - tst-truncate64 tst-fork tst-fnmatch tst-regexloc tst-dir \ | ||
5101 | - tst-chmod bug-regex1 bug-regex2 bug-regex3 bug-regex4 \ | ||
5102 | - tst-gnuglob tst-regex bug-regex5 bug-regex6 bug-regex7 \ | ||
5103 | - bug-regex8 bug-regex9 bug-regex10 bug-regex11 bug-regex12 \ | ||
5104 | - bug-regex13 bug-regex14 bug-regex15 bug-regex16 \ | ||
5105 | - bug-regex17 bug-regex18 bug-regex19 bug-regex20 \ | ||
5106 | - bug-regex21 bug-regex22 bug-regex23 bug-regex24 \ | ||
5107 | - bug-regex25 bug-regex26 bug-regex27 bug-regex28 \ | ||
5108 | + tst-mmap tst-truncate \ | ||
5109 | + tst-truncate64 tst-fork tst-dir \ | ||
5110 | + tst-chmod bug-regex2 bug-regex3 bug-regex4 \ | ||
5111 | + tst-gnuglob bug-regex6 bug-regex7 \ | ||
5112 | + bug-regex8 bug-regex9 bug-regex10 bug-regex12 \ | ||
5113 | + bug-regex14 bug-regex15 \ | ||
5114 | + bug-regex21 bug-regex24 \ | ||
5115 | + bug-regex27 bug-regex28 \ | ||
5116 | bug-regex29 bug-regex30 bug-regex31 bug-regex32 \ | ||
5117 | - bug-regex33 tst-nice tst-nanosleep tst-regex2 \ | ||
5118 | - transbug tst-rxspencer tst-pcre tst-boost \ | ||
5119 | - bug-ga1 tst-vfork1 tst-vfork2 tst-vfork3 tst-waitid \ | ||
5120 | - tst-getaddrinfo2 bug-glob1 bug-glob2 bug-glob3 tst-sysconf \ | ||
5121 | + tst-nice tst-nanosleep \ | ||
5122 | + transbug \ | ||
5123 | + tst-vfork1 tst-vfork2 tst-vfork3 tst-waitid \ | ||
5124 | + bug-glob1 bug-glob2 bug-glob3 tst-sysconf \ | ||
5125 | tst-execvp1 tst-execvp2 tst-execlp1 tst-execlp2 \ | ||
5126 | tst-execv1 tst-execv2 tst-execl1 tst-execl2 \ | ||
5127 | tst-execve1 tst-execve2 tst-execle1 tst-execle2 \ | ||
5128 | - tst-execvp3 tst-execvp4 tst-rfc3484 tst-rfc3484-2 \ | ||
5129 | - tst-rfc3484-3 \ | ||
5130 | - tst-getaddrinfo3 tst-fnmatch2 tst-cpucount tst-cpuset \ | ||
5131 | + tst-execvp3 tst-execvp4 \ | ||
5132 | + tst-fnmatch2 tst-cpucount tst-cpuset \ | ||
5133 | bug-getopt1 bug-getopt2 bug-getopt3 bug-getopt4 \ | ||
5134 | bug-getopt5 tst-getopt_long1 bug-regex34 bug-regex35 \ | ||
5135 | tst-pathconf tst-getaddrinfo4 tst-rxspencer-no-utf8 \ | ||
5136 | tst-fnmatch3 bug-regex36 tst-getaddrinfo5 | ||
5137 | -xtests := bug-ga2 | ||
5138 | + | ||
5139 | +tests-$(OPTION_EGLIBC_LOCALE_CODE) \ | ||
5140 | + += tst-fnmatch tst-regexloc bug-regex1 bug-regex5 \ | ||
5141 | + bug-regex23 bug-regex25 bug-regex32 bug-regex33 | ||
5142 | +tests-$(OPTION_EGLIBC_INET) \ | ||
5143 | + += tst-getaddrinfo bug-ga1 tst-getaddrinfo2 \ | ||
5144 | + tst-rfc3484 tst-rfc3484-2 tst-rfc3484-3 tst-getaddrinfo3 | ||
5145 | +tests-$(OPTION_POSIX_REGEXP_GLIBC) \ | ||
5146 | + += runptests bug-regex11 bug-regex13 bug-regex16 \ | ||
5147 | + tst-regex2 tst-rxspencer tst-pcre tst-boost | ||
5148 | +ifeq (yy,$(OPTION_EGLIBC_LOCALE_CODE)$(OPTION_POSIX_REGEXP_GLIBC)) | ||
5149 | +tests += tst-regex bug-regex17 bug-regex18 bug-regex19 bug-regex20 \ | ||
5150 | + bug-regex22 bug-regex26 | ||
5151 | +endif | ||
5152 | +xtests-$(OPTION_EGLIBC_INET) += bug-ga2 | ||
5153 | + | ||
5154 | ifeq (yes,$(build-shared)) | ||
5155 | test-srcs := globtest | ||
5156 | -tests += wordexp-test tst-exec tst-spawn | ||
5157 | +tests += tst-exec | ||
5158 | +tests-$(OPTION_EGLIBC_SPAWN) += tst-spawn | ||
5159 | +tests-$(OPTION_EGLIBC_WORDEXP) += wordexp-test | ||
5160 | endif | ||
5161 | tests-static = tst-exec-static tst-spawn-static | ||
5162 | tests += $(tests-static) | ||
5163 | @@ -117,7 +147,10 @@ generated += $(addprefix wordexp-test-result, 1 2 3 4 5 6 7 8 9 10) \ | ||
5164 | |||
5165 | ifeq ($(run-built-tests),yes) | ||
5166 | ifeq (yes,$(build-shared)) | ||
5167 | -tests-special += $(objpfx)globtest.out $(objpfx)wordexp-tst.out | ||
5168 | +tests-special += $(objpfx)globtest.out | ||
5169 | +ifeq (y,$(OPTION_EGLIBC_WORDEXP)) | ||
5170 | +tests-special += $(objpfx)wordexp-tst.out | ||
5171 | +endif | ||
5172 | endif | ||
5173 | endif | ||
5174 | |||
5175 | @@ -125,12 +158,16 @@ endif | ||
5176 | # XXX Please note that for now we ignore the result of this test. | ||
5177 | tests-special += $(objpfx)annexc.out | ||
5178 | ifeq ($(run-built-tests),yes) | ||
5179 | -tests-special += $(objpfx)bug-regex2-mem.out $(objpfx)bug-regex14-mem.out \ | ||
5180 | +tests-special += $(objpfx)bug-regex2-mem.out \ | ||
5181 | $(objpfx)bug-regex21-mem.out $(objpfx)bug-regex31-mem.out \ | ||
5182 | - $(objpfx)tst-rxspencer-no-utf8-mem.out $(objpfx)tst-pcre-mem.out \ | ||
5183 | - $(objpfx)tst-boost-mem.out $(objpfx)tst-getconf.out \ | ||
5184 | + $(objpfx)tst-getconf.out \ | ||
5185 | $(objpfx)bug-glob2-mem.out $(objpfx)tst-vfork3-mem.out \ | ||
5186 | $(objpfx)tst-fnmatch-mem.out $(objpfx)bug-regex36-mem.out | ||
5187 | +ifeq (y,$(OPTION_POSIX_REGEXP_GLIBC)) | ||
5188 | +tests-special += $(objpfx)bug-regex14-mem.out $(objpfx)tst-rxspencer-no-utf8-mem.out \ | ||
5189 | + $(objpfx)tst-pcre-mem.out $(objpfx)tst-boost-mem.out | ||
5190 | +endif | ||
5191 | + | ||
5192 | xtests-special += $(objpfx)bug-ga2-mem.out | ||
5193 | endif | ||
5194 | |||
5195 | @@ -143,6 +180,8 @@ $(objpfx)globtest.out: globtest.sh $(objpfx)globtest | ||
5196 | $(SHELL) $< $(common-objpfx) '$(test-via-rtld-prefix)' \ | ||
5197 | '$(test-program-prefix)' '$(test-wrapper-env)'; \ | ||
5198 | $(evaluate-test) | ||
5199 | +LDLIBS-globtest += $(shell cat $(common-objpfx)nss/fixed-nsswitch-libs) | ||
5200 | + | ||
5201 | $(objpfx)wordexp-tst.out: wordexp-tst.sh $(objpfx)wordexp-test | ||
5202 | $(SHELL) $< $(common-objpfx) '$(test-program-prefix-before-env)' \ | ||
5203 | '$(run-program-env)' '$(test-program-prefix-after-env)'; \ | ||
5204 | @@ -205,7 +244,10 @@ tst-dir-ARGS = `pwd` `cd $(common-objdir)/$(subdir); pwd` `cd $(common-objdir); | ||
5205 | tst-chmod-ARGS = $(objdir) | ||
5206 | tst-vfork3-ARGS = --test-dir=$(objpfx) | ||
5207 | |||
5208 | -tst-rxspencer-ARGS = --utf8 rxspencer/tests | ||
5209 | +tst-rxspencer-ARGS = rxspencer/tests | ||
5210 | +ifeq (y,$(OPTION_EGLIBC_LOCALE_CODE)) | ||
5211 | +tst-rxspencer-ARGS += --utf8 | ||
5212 | +endif | ||
5213 | tst-rxspencer-no-utf8-ARGS = rxspencer/tests | ||
5214 | tst-pcre-ARGS = PCRE.tests | ||
5215 | tst-boost-ARGS = BOOST.tests | ||
5216 | diff --git a/posix/bug-regex1.c b/posix/bug-regex1.c | ||
5217 | index 38eb543..17cd1a0 100644 | ||
5218 | --- a/posix/bug-regex1.c | ||
5219 | +++ b/posix/bug-regex1.c | ||
4865 | @@ -4,6 +4,7 @@ | 5220 | @@ -4,6 +4,7 @@ |
4866 | #include <string.h> | 5221 | #include <string.h> |
4867 | #include <regex.h> | 5222 | #include <regex.h> |
@@ -4880,10 +5235,10 @@ Index: git/posix/bug-regex1.c | |||
4880 | 5235 | ||
4881 | re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_DEBUG); | 5236 | re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_DEBUG); |
4882 | 5237 | ||
4883 | Index: git/posix/bug-regex6.c | 5238 | diff --git a/posix/bug-regex6.c b/posix/bug-regex6.c |
4884 | =================================================================== | 5239 | index efcc890..3b270c7 100644 |
4885 | --- git.orig/posix/bug-regex6.c | 5240 | --- a/posix/bug-regex6.c |
4886 | +++ git/posix/bug-regex6.c | 5241 | +++ b/posix/bug-regex6.c |
4887 | @@ -22,6 +22,7 @@ | 5242 | @@ -22,6 +22,7 @@ |
4888 | #include <string.h> | 5243 | #include <string.h> |
4889 | #include <sys/types.h> | 5244 | #include <sys/types.h> |
@@ -4906,10 +5261,10 @@ Index: git/posix/bug-regex6.c | |||
4906 | const char *string = "http://www.regex.com/pattern/matching.html#intro"; | 5261 | const char *string = "http://www.regex.com/pattern/matching.html#intro"; |
4907 | regmatch_t expect[10] = { | 5262 | regmatch_t expect[10] = { |
4908 | { 0, 48 }, { 0, 5 }, { 0, 4 }, { 5, 20 }, { 7, 20 }, { 20, 42 }, | 5263 | { 0, 48 }, { 0, 5 }, { 0, 4 }, { 5, 20 }, { 7, 20 }, { 20, 42 }, |
4909 | Index: git/posix/fnmatch.c | 5264 | diff --git a/posix/fnmatch.c b/posix/fnmatch.c |
4910 | =================================================================== | 5265 | index fd85efa..01cc9fe 100644 |
4911 | --- git.orig/posix/fnmatch.c | 5266 | --- a/posix/fnmatch.c |
4912 | +++ git/posix/fnmatch.c | 5267 | +++ b/posix/fnmatch.c |
4913 | @@ -30,6 +30,10 @@ | 5268 | @@ -30,6 +30,10 @@ |
4914 | #include <ctype.h> | 5269 | #include <ctype.h> |
4915 | #include <string.h> | 5270 | #include <string.h> |
@@ -4921,7 +5276,7 @@ Index: git/posix/fnmatch.c | |||
4921 | #if defined STDC_HEADERS || defined _LIBC | 5276 | #if defined STDC_HEADERS || defined _LIBC |
4922 | # include <stdlib.h> | 5277 | # include <stdlib.h> |
4923 | #endif | 5278 | #endif |
4924 | @@ -131,7 +135,7 @@ extern int fnmatch (const char *pattern, | 5279 | @@ -131,7 +135,7 @@ extern int fnmatch (const char *pattern, const char *string, int flags); |
4925 | # define ISWCTYPE(WC, WT) iswctype (WC, WT) | 5280 | # define ISWCTYPE(WC, WT) iswctype (WC, WT) |
4926 | # endif | 5281 | # endif |
4927 | 5282 | ||
@@ -4930,10 +5285,10 @@ Index: git/posix/fnmatch.c | |||
4930 | /* In this case we are implementing the multibyte character handling. */ | 5285 | /* In this case we are implementing the multibyte character handling. */ |
4931 | # define HANDLE_MULTIBYTE 1 | 5286 | # define HANDLE_MULTIBYTE 1 |
4932 | # endif | 5287 | # endif |
4933 | Index: git/posix/fnmatch_loop.c | 5288 | diff --git a/posix/fnmatch_loop.c b/posix/fnmatch_loop.c |
4934 | =================================================================== | 5289 | index f46c9df..74e1754 100644 |
4935 | --- git.orig/posix/fnmatch_loop.c | 5290 | --- a/posix/fnmatch_loop.c |
4936 | +++ git/posix/fnmatch_loop.c | 5291 | +++ b/posix/fnmatch_loop.c |
4937 | @@ -15,6 +15,8 @@ | 5292 | @@ -15,6 +15,8 @@ |
4938 | License along with the GNU C Library; if not, see | 5293 | License along with the GNU C Library; if not, see |
4939 | <http://www.gnu.org/licenses/>. */ | 5294 | <http://www.gnu.org/licenses/>. */ |
@@ -4943,7 +5298,7 @@ Index: git/posix/fnmatch_loop.c | |||
4943 | #include <stdint.h> | 5298 | #include <stdint.h> |
4944 | 5299 | ||
4945 | struct STRUCT | 5300 | struct STRUCT |
4946 | @@ -54,10 +56,15 @@ FCT (pattern, string, string_end, no_lea | 5301 | @@ -54,10 +56,15 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends, alloca_used) |
4947 | const char *collseq = (const char *) | 5302 | const char *collseq = (const char *) |
4948 | _NL_CURRENT(LC_COLLATE, _NL_COLLATE_COLLSEQWC); | 5303 | _NL_CURRENT(LC_COLLATE, _NL_COLLATE_COLLSEQWC); |
4949 | # else | 5304 | # else |
@@ -4961,7 +5316,7 @@ Index: git/posix/fnmatch_loop.c | |||
4961 | 5316 | ||
4962 | while ((c = *p++) != L('\0')) | 5317 | while ((c = *p++) != L('\0')) |
4963 | { | 5318 | { |
4964 | @@ -277,7 +284,7 @@ FCT (pattern, string, string_end, no_lea | 5319 | @@ -277,7 +284,7 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends, alloca_used) |
4965 | /* Leave room for the null. */ | 5320 | /* Leave room for the null. */ |
4966 | CHAR str[CHAR_CLASS_MAX_LENGTH + 1]; | 5321 | CHAR str[CHAR_CLASS_MAX_LENGTH + 1]; |
4967 | size_t c1 = 0; | 5322 | size_t c1 = 0; |
@@ -4970,7 +5325,7 @@ Index: git/posix/fnmatch_loop.c | |||
4970 | wctype_t wt; | 5325 | wctype_t wt; |
4971 | #endif | 5326 | #endif |
4972 | const CHAR *startp = p; | 5327 | const CHAR *startp = p; |
4973 | @@ -307,7 +314,7 @@ FCT (pattern, string, string_end, no_lea | 5328 | @@ -307,7 +314,7 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends, alloca_used) |
4974 | } | 5329 | } |
4975 | str[c1] = L('\0'); | 5330 | str[c1] = L('\0'); |
4976 | 5331 | ||
@@ -4979,7 +5334,7 @@ Index: git/posix/fnmatch_loop.c | |||
4979 | wt = IS_CHAR_CLASS (str); | 5334 | wt = IS_CHAR_CLASS (str); |
4980 | if (wt == 0) | 5335 | if (wt == 0) |
4981 | /* Invalid character class name. */ | 5336 | /* Invalid character class name. */ |
4982 | @@ -680,8 +687,10 @@ FCT (pattern, string, string_end, no_lea | 5337 | @@ -680,8 +687,10 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends, alloca_used) |
4983 | else | 5338 | else |
4984 | lcollseq = __collseq_table_lookup (collseq, cold); | 5339 | lcollseq = __collseq_table_lookup (collseq, cold); |
4985 | # else | 5340 | # else |
@@ -4992,7 +5347,7 @@ Index: git/posix/fnmatch_loop.c | |||
4992 | # endif | 5347 | # endif |
4993 | 5348 | ||
4994 | is_seqval = 0; | 5349 | is_seqval = 0; |
4995 | @@ -857,7 +866,7 @@ FCT (pattern, string, string_end, no_lea | 5350 | @@ -857,7 +866,7 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends, alloca_used) |
4996 | goto matched; | 5351 | goto matched; |
4997 | } | 5352 | } |
4998 | # else | 5353 | # else |
@@ -5001,10 +5356,10 @@ Index: git/posix/fnmatch_loop.c | |||
5001 | # endif | 5356 | # endif |
5002 | } | 5357 | } |
5003 | 5358 | ||
5004 | Index: git/posix/glob.c | 5359 | diff --git a/posix/glob.c b/posix/glob.c |
5005 | =================================================================== | 5360 | index d65e55d..1ac00a1 100644 |
5006 | --- git.orig/posix/glob.c | 5361 | --- a/posix/glob.c |
5007 | +++ git/posix/glob.c | 5362 | +++ b/posix/glob.c |
5008 | @@ -25,6 +25,9 @@ | 5363 | @@ -25,6 +25,9 @@ |
5009 | #include <sys/types.h> | 5364 | #include <sys/types.h> |
5010 | #include <sys/stat.h> | 5365 | #include <sys/stat.h> |
@@ -5066,177 +5421,10 @@ Index: git/posix/glob.c | |||
5066 | if (home_dir == NULL || home_dir[0] == '\0') | 5421 | if (home_dir == NULL || home_dir[0] == '\0') |
5067 | { | 5422 | { |
5068 | if (flags & GLOB_TILDE_CHECK) | 5423 | if (flags & GLOB_TILDE_CHECK) |
5069 | Index: git/posix/Makefile | 5424 | diff --git a/posix/regcomp.c b/posix/regcomp.c |
5070 | =================================================================== | 5425 | index bf8aa16..6a41251 100644 |
5071 | --- git.orig/posix/Makefile | 5426 | --- a/posix/regcomp.c |
5072 | +++ git/posix/Makefile | 5427 | +++ b/posix/regcomp.c |
5073 | @@ -18,6 +18,8 @@ | ||
5074 | # | ||
5075 | # Sub-makefile for POSIX portion of the library. | ||
5076 | # | ||
5077 | +include ../option-groups.mak | ||
5078 | + | ||
5079 | subdir := posix | ||
5080 | |||
5081 | include ../Makeconfig | ||
5082 | @@ -43,13 +45,24 @@ routines := \ | ||
5083 | getpgid setpgid getpgrp bsd-getpgrp setpgrp getsid setsid \ | ||
5084 | getresuid getresgid setresuid setresgid \ | ||
5085 | pathconf sysconf fpathconf \ | ||
5086 | - glob glob64 fnmatch regex \ | ||
5087 | + glob glob64 fnmatch \ | ||
5088 | confstr \ | ||
5089 | getopt getopt1 getopt_init \ | ||
5090 | sched_setp sched_getp sched_sets sched_gets sched_yield sched_primax \ | ||
5091 | sched_primin sched_rr_gi sched_getaffinity sched_setaffinity \ | ||
5092 | - getaddrinfo gai_strerror wordexp \ | ||
5093 | pread pwrite pread64 pwrite64 \ | ||
5094 | + posix_madvise \ | ||
5095 | + get_child_max sched_cpucount sched_cpualloc sched_cpufree | ||
5096 | + | ||
5097 | +routines-$(OPTION_EGLIBC_INET) += getaddrinfo gai_strerror | ||
5098 | + | ||
5099 | +ifeq (y,$(OPTION_POSIX_REGEXP_GLIBC)) | ||
5100 | +routines-$(OPTION_POSIX_REGEXP) += regex | ||
5101 | +else | ||
5102 | +routines-$(OPTION_POSIX_REGEXP) += xregex | ||
5103 | +endif | ||
5104 | + | ||
5105 | +routines-$(OPTION_EGLIBC_SPAWN) += \ | ||
5106 | spawn_faction_init spawn_faction_destroy spawn_faction_addclose \ | ||
5107 | spawn_faction_addopen spawn_faction_adddup2 \ | ||
5108 | spawnattr_init spawnattr_destroy \ | ||
5109 | @@ -61,37 +74,53 @@ routines := \ | ||
5110 | posix_madvise \ | ||
5111 | get_child_max sched_cpucount sched_cpualloc sched_cpufree | ||
5112 | |||
5113 | +routines-$(OPTION_EGLIBC_WORDEXP) += wordexp | ||
5114 | + | ||
5115 | aux := init-posix environ | ||
5116 | -tests := tstgetopt testfnm runtests runptests \ | ||
5117 | +tests := tstgetopt testfnm runtests \ | ||
5118 | tst-preadwrite tst-preadwrite64 test-vfork regexbug1 \ | ||
5119 | - tst-getlogin tst-mmap tst-getaddrinfo tst-truncate \ | ||
5120 | - tst-truncate64 tst-fork tst-fnmatch tst-regexloc tst-dir \ | ||
5121 | - tst-chmod bug-regex1 bug-regex2 bug-regex3 bug-regex4 \ | ||
5122 | - tst-gnuglob tst-regex bug-regex5 bug-regex6 bug-regex7 \ | ||
5123 | - bug-regex8 bug-regex9 bug-regex10 bug-regex11 bug-regex12 \ | ||
5124 | - bug-regex13 bug-regex14 bug-regex15 bug-regex16 \ | ||
5125 | - bug-regex17 bug-regex18 bug-regex19 bug-regex20 \ | ||
5126 | - bug-regex21 bug-regex22 bug-regex23 bug-regex24 \ | ||
5127 | - bug-regex25 bug-regex26 bug-regex27 bug-regex28 \ | ||
5128 | - bug-regex29 bug-regex30 bug-regex31 bug-regex32 \ | ||
5129 | - bug-regex33 tst-nice tst-nanosleep tst-regex2 \ | ||
5130 | - transbug tst-rxspencer tst-pcre tst-boost \ | ||
5131 | - bug-ga1 tst-vfork1 tst-vfork2 tst-vfork3 tst-waitid \ | ||
5132 | - tst-getaddrinfo2 bug-glob1 bug-glob2 bug-glob3 tst-sysconf \ | ||
5133 | + tst-getlogin tst-mmap tst-truncate \ | ||
5134 | + tst-truncate64 tst-fork tst-dir \ | ||
5135 | + tst-chmod bug-regex2 bug-regex3 bug-regex4 \ | ||
5136 | + tst-gnuglob bug-regex6 bug-regex7 \ | ||
5137 | + bug-regex8 bug-regex9 bug-regex10 bug-regex12 \ | ||
5138 | + bug-regex14 bug-regex15 \ | ||
5139 | + bug-regex21 bug-regex24 \ | ||
5140 | + bug-regex27 bug-regex28 \ | ||
5141 | + bug-regex29 bug-regex30 bug-regex31 \ | ||
5142 | + tst-nice tst-nanosleep \ | ||
5143 | + transbug \ | ||
5144 | + tst-vfork1 tst-vfork2 tst-vfork3 tst-waitid \ | ||
5145 | + bug-glob1 bug-glob2 bug-glob3 tst-sysconf \ | ||
5146 | tst-execvp1 tst-execvp2 tst-execlp1 tst-execlp2 \ | ||
5147 | tst-execv1 tst-execv2 tst-execl1 tst-execl2 \ | ||
5148 | tst-execve1 tst-execve2 tst-execle1 tst-execle2 \ | ||
5149 | - tst-execvp3 tst-execvp4 tst-rfc3484 tst-rfc3484-2 \ | ||
5150 | - tst-rfc3484-3 \ | ||
5151 | - tst-getaddrinfo3 tst-fnmatch2 tst-cpucount tst-cpuset \ | ||
5152 | + tst-execvp3 tst-execvp4 \ | ||
5153 | + tst-fnmatch2 tst-cpucount tst-cpuset \ | ||
5154 | bug-getopt1 bug-getopt2 bug-getopt3 bug-getopt4 \ | ||
5155 | bug-getopt5 tst-getopt_long1 bug-regex34 bug-regex35 \ | ||
5156 | tst-pathconf tst-getaddrinfo4 tst-rxspencer-no-utf8 \ | ||
5157 | tst-fnmatch3 bug-regex36 tst-getaddrinfo5 | ||
5158 | -xtests := bug-ga2 | ||
5159 | +tests-$(OPTION_EGLIBC_LOCALE_CODE) \ | ||
5160 | + += tst-fnmatch tst-regexloc bug-regex1 bug-regex5 \ | ||
5161 | + bug-regex23 bug-regex25 bug-regex32 bug-regex33 | ||
5162 | +tests-$(OPTION_EGLIBC_INET) \ | ||
5163 | + += tst-getaddrinfo bug-ga1 tst-getaddrinfo2 \ | ||
5164 | + tst-rfc3484 tst-rfc3484-2 tst-rfc3484-3 tst-getaddrinfo3 | ||
5165 | +tests-$(OPTION_POSIX_REGEXP_GLIBC) \ | ||
5166 | + += runptests bug-regex11 bug-regex13 bug-regex16 \ | ||
5167 | + tst-regex2 tst-rxspencer tst-pcre tst-boost | ||
5168 | +ifeq (yy,$(OPTION_EGLIBC_LOCALE_CODE)$(OPTION_POSIX_REGEXP_GLIBC)) | ||
5169 | +tests += tst-regex bug-regex17 bug-regex18 bug-regex19 bug-regex20 \ | ||
5170 | + bug-regex22 bug-regex26 | ||
5171 | +endif | ||
5172 | +xtests-$(OPTION_EGLIBC_INET) += bug-ga2 | ||
5173 | + | ||
5174 | ifeq (yes,$(build-shared)) | ||
5175 | test-srcs := globtest | ||
5176 | -tests += wordexp-test tst-exec tst-spawn | ||
5177 | +tests += tst-exec | ||
5178 | +tests-$(OPTION_EGLIBC_SPAWN) += tst-spawn | ||
5179 | +tests-$(OPTION_EGLIBC_WORDEXP) += wordexp-test | ||
5180 | endif | ||
5181 | tests-static = tst-exec-static tst-spawn-static | ||
5182 | tests += $(tests-static) | ||
5183 | @@ -117,7 +146,10 @@ generated += $(addprefix wordexp-test-re | ||
5184 | |||
5185 | ifeq ($(run-built-tests),yes) | ||
5186 | ifeq (yes,$(build-shared)) | ||
5187 | -tests-special += $(objpfx)globtest.out $(objpfx)wordexp-tst.out | ||
5188 | +tests-special += $(objpfx)globtest.out | ||
5189 | +ifeq (y,$(OPTION_EGLIBC_WORDEXP)) | ||
5190 | +tests-special += $(objpfx)wordexp-tst.out | ||
5191 | +endif | ||
5192 | endif | ||
5193 | endif | ||
5194 | |||
5195 | @@ -125,12 +157,16 @@ endif | ||
5196 | # XXX Please note that for now we ignore the result of this test. | ||
5197 | tests-special += $(objpfx)annexc.out | ||
5198 | ifeq ($(run-built-tests),yes) | ||
5199 | -tests-special += $(objpfx)bug-regex2-mem.out $(objpfx)bug-regex14-mem.out \ | ||
5200 | +tests-special += $(objpfx)bug-regex2-mem.out \ | ||
5201 | $(objpfx)bug-regex21-mem.out $(objpfx)bug-regex31-mem.out \ | ||
5202 | - $(objpfx)tst-rxspencer-no-utf8-mem.out $(objpfx)tst-pcre-mem.out \ | ||
5203 | - $(objpfx)tst-boost-mem.out $(objpfx)tst-getconf.out \ | ||
5204 | + $(objpfx)tst-getconf.out \ | ||
5205 | $(objpfx)bug-glob2-mem.out $(objpfx)tst-vfork3-mem.out \ | ||
5206 | $(objpfx)tst-fnmatch-mem.out $(objpfx)bug-regex36-mem.out | ||
5207 | +ifeq (y,$(OPTION_POSIX_REGEXP_GLIBC)) | ||
5208 | +tests-special += $(objpfx)bug-regex14-mem.out $(objpfx)tst-rxspencer-no-utf8-mem.out \ | ||
5209 | + $(objpfx)tst-pcre-mem.out $(objpfx)tst-boost-mem.out | ||
5210 | +endif | ||
5211 | + | ||
5212 | xtests-special += $(objpfx)bug-ga2-mem.out | ||
5213 | endif | ||
5214 | |||
5215 | @@ -143,6 +179,8 @@ $(objpfx)globtest.out: globtest.sh $(obj | ||
5216 | $(SHELL) $< $(common-objpfx) '$(test-via-rtld-prefix)' \ | ||
5217 | '$(test-program-prefix)' '$(test-wrapper-env)'; \ | ||
5218 | $(evaluate-test) | ||
5219 | +LDLIBS-globtest += $(shell cat $(common-objpfx)nss/fixed-nsswitch-libs) | ||
5220 | + | ||
5221 | $(objpfx)wordexp-tst.out: wordexp-tst.sh $(objpfx)wordexp-test | ||
5222 | $(SHELL) $< $(common-objpfx) '$(test-program-prefix-before-env)' \ | ||
5223 | '$(run-program-env)' '$(test-program-prefix-after-env)'; \ | ||
5224 | @@ -205,7 +243,10 @@ tst-dir-ARGS = `pwd` `cd $(common-objdir | ||
5225 | tst-chmod-ARGS = $(objdir) | ||
5226 | tst-vfork3-ARGS = --test-dir=$(objpfx) | ||
5227 | |||
5228 | -tst-rxspencer-ARGS = --utf8 rxspencer/tests | ||
5229 | +tst-rxspencer-ARGS = rxspencer/tests | ||
5230 | +ifeq (y,$(OPTION_EGLIBC_LOCALE_CODE)) | ||
5231 | +tst-rxspencer-ARGS += --utf8 | ||
5232 | +endif | ||
5233 | tst-rxspencer-no-utf8-ARGS = rxspencer/tests | ||
5234 | tst-pcre-ARGS = PCRE.tests | ||
5235 | tst-boost-ARGS = BOOST.tests | ||
5236 | Index: git/posix/regcomp.c | ||
5237 | =================================================================== | ||
5238 | --- git.orig/posix/regcomp.c | ||
5239 | +++ git/posix/regcomp.c | ||
5240 | @@ -18,6 +18,7 @@ | 5428 | @@ -18,6 +18,7 @@ |
5241 | <http://www.gnu.org/licenses/>. */ | 5429 | <http://www.gnu.org/licenses/>. */ |
5242 | 5430 | ||
@@ -5245,7 +5433,7 @@ Index: git/posix/regcomp.c | |||
5245 | 5433 | ||
5246 | #ifdef _LIBC | 5434 | #ifdef _LIBC |
5247 | # include <locale/weight.h> | 5435 | # include <locale/weight.h> |
5248 | @@ -309,7 +310,7 @@ re_compile_fastmap_iter (regex_t *bufp, | 5436 | @@ -309,7 +310,7 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, |
5249 | { | 5437 | { |
5250 | re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; | 5438 | re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; |
5251 | int node_cnt; | 5439 | int node_cnt; |
@@ -5254,7 +5442,7 @@ Index: git/posix/regcomp.c | |||
5254 | for (node_cnt = 0; node_cnt < init_state->nodes.nelem; ++node_cnt) | 5442 | for (node_cnt = 0; node_cnt < init_state->nodes.nelem; ++node_cnt) |
5255 | { | 5443 | { |
5256 | int node = init_state->nodes.elems[node_cnt]; | 5444 | int node = init_state->nodes.elems[node_cnt]; |
5257 | @@ -319,9 +320,9 @@ re_compile_fastmap_iter (regex_t *bufp, | 5445 | @@ -319,9 +320,9 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, |
5258 | { | 5446 | { |
5259 | re_set_fastmap (fastmap, icase, dfa->nodes[node].opr.c); | 5447 | re_set_fastmap (fastmap, icase, dfa->nodes[node].opr.c); |
5260 | #ifdef RE_ENABLE_I18N | 5448 | #ifdef RE_ENABLE_I18N |
@@ -5266,7 +5454,7 @@ Index: git/posix/regcomp.c | |||
5266 | wchar_t wc; | 5454 | wchar_t wc; |
5267 | mbstate_t state; | 5455 | mbstate_t state; |
5268 | 5456 | ||
5269 | @@ -352,7 +353,11 @@ re_compile_fastmap_iter (regex_t *bufp, | 5457 | @@ -352,7 +353,11 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, |
5270 | re_set_fastmap (fastmap, icase, ch); | 5458 | re_set_fastmap (fastmap, icase, ch); |
5271 | } | 5459 | } |
5272 | } | 5460 | } |
@@ -5279,7 +5467,7 @@ Index: git/posix/regcomp.c | |||
5279 | else if (type == COMPLEX_BRACKET) | 5467 | else if (type == COMPLEX_BRACKET) |
5280 | { | 5468 | { |
5281 | re_charset_t *cset = dfa->nodes[node].opr.mbcset; | 5469 | re_charset_t *cset = dfa->nodes[node].opr.mbcset; |
5282 | @@ -380,7 +385,7 @@ re_compile_fastmap_iter (regex_t *bufp, | 5470 | @@ -380,7 +385,7 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, |
5283 | i.e. where we would not find an invalid sequence. This only | 5471 | i.e. where we would not find an invalid sequence. This only |
5284 | applies to multibyte character sets; for single byte character | 5472 | applies to multibyte character sets; for single byte character |
5285 | sets, the SIMPLE_BRACKET again suffices. */ | 5473 | sets, the SIMPLE_BRACKET again suffices. */ |
@@ -5288,16 +5476,16 @@ Index: git/posix/regcomp.c | |||
5288 | && (cset->nchar_classes || cset->non_match || cset->nranges | 5476 | && (cset->nchar_classes || cset->non_match || cset->nranges |
5289 | # ifdef _LIBC | 5477 | # ifdef _LIBC |
5290 | || cset->nequiv_classes | 5478 | || cset->nequiv_classes |
5291 | @@ -408,7 +413,7 @@ re_compile_fastmap_iter (regex_t *bufp, | 5479 | @@ -408,7 +413,7 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, |
5292 | memset (&state, '\0', sizeof (state)); | 5480 | memset (&state, '\0', sizeof (state)); |
5293 | if (__wcrtomb (buf, cset->mbchars[i], &state) != (size_t) -1) | 5481 | if (__wcrtomb (buf, cset->mbchars[i], &state) != (size_t) -1) |
5294 | re_set_fastmap (fastmap, icase, *(unsigned char *) buf); | 5482 | re_set_fastmap (fastmap, icase, *(unsigned char *) buf); |
5295 | - if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1) | 5483 | - if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1) |
5296 | + if ((bufp->syntax & RE_ICASE) && dfa_mb_cur_max (dfa) > 1) | 5484 | + if ((bufp->syntax & RE_ICASE) && dfa_mb_cur_max (dfa) > 1) |
5297 | { | 5485 | { |
5298 | if (__wcrtomb (buf, towlower (cset->mbchars[i]), &state) | 5486 | if (__wcrtomb (buf, __towlower (cset->mbchars[i]), &state) |
5299 | != (size_t) -1) | 5487 | != (size_t) -1) |
5300 | @@ -417,7 +422,7 @@ re_compile_fastmap_iter (regex_t *bufp, | 5488 | @@ -417,7 +422,7 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, |
5301 | } | 5489 | } |
5302 | } | 5490 | } |
5303 | } | 5491 | } |
@@ -5332,7 +5520,7 @@ Index: git/posix/regcomp.c | |||
5332 | { | 5520 | { |
5333 | if (dfa->is_utf8) | 5521 | if (dfa->is_utf8) |
5334 | dfa->sb_char = (re_bitset_ptr_t) utf8_sb_map; | 5522 | dfa->sb_char = (re_bitset_ptr_t) utf8_sb_map; |
5335 | @@ -1788,7 +1797,7 @@ peek_token (re_token_t *token, re_string | 5523 | @@ -1788,7 +1797,7 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) |
5336 | token->word_char = 0; | 5524 | token->word_char = 0; |
5337 | #ifdef RE_ENABLE_I18N | 5525 | #ifdef RE_ENABLE_I18N |
5338 | token->mb_partial = 0; | 5526 | token->mb_partial = 0; |
@@ -5341,7 +5529,7 @@ Index: git/posix/regcomp.c | |||
5341 | !re_string_first_byte (input, re_string_cur_idx (input))) | 5529 | !re_string_first_byte (input, re_string_cur_idx (input))) |
5342 | { | 5530 | { |
5343 | token->type = CHARACTER; | 5531 | token->type = CHARACTER; |
5344 | @@ -1809,7 +1818,7 @@ peek_token (re_token_t *token, re_string | 5532 | @@ -1809,7 +1818,7 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) |
5345 | token->opr.c = c2; | 5533 | token->opr.c = c2; |
5346 | token->type = CHARACTER; | 5534 | token->type = CHARACTER; |
5347 | #ifdef RE_ENABLE_I18N | 5535 | #ifdef RE_ENABLE_I18N |
@@ -5350,7 +5538,7 @@ Index: git/posix/regcomp.c | |||
5350 | { | 5538 | { |
5351 | wint_t wc = re_string_wchar_at (input, | 5539 | wint_t wc = re_string_wchar_at (input, |
5352 | re_string_cur_idx (input) + 1); | 5540 | re_string_cur_idx (input) + 1); |
5353 | @@ -1923,7 +1932,7 @@ peek_token (re_token_t *token, re_string | 5541 | @@ -1923,7 +1932,7 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) |
5354 | 5542 | ||
5355 | token->type = CHARACTER; | 5543 | token->type = CHARACTER; |
5356 | #ifdef RE_ENABLE_I18N | 5544 | #ifdef RE_ENABLE_I18N |
@@ -5359,7 +5547,7 @@ Index: git/posix/regcomp.c | |||
5359 | { | 5547 | { |
5360 | wint_t wc = re_string_wchar_at (input, re_string_cur_idx (input)); | 5548 | wint_t wc = re_string_wchar_at (input, re_string_cur_idx (input)); |
5361 | token->word_char = IS_WIDE_WORD_CHAR (wc) != 0; | 5549 | token->word_char = IS_WIDE_WORD_CHAR (wc) != 0; |
5362 | @@ -2023,7 +2032,7 @@ peek_token_bracket (re_token_t *token, r | 5550 | @@ -2023,7 +2032,7 @@ peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax) |
5363 | token->opr.c = c; | 5551 | token->opr.c = c; |
5364 | 5552 | ||
5365 | #ifdef RE_ENABLE_I18N | 5553 | #ifdef RE_ENABLE_I18N |
@@ -5368,7 +5556,7 @@ Index: git/posix/regcomp.c | |||
5368 | !re_string_first_byte (input, re_string_cur_idx (input))) | 5556 | !re_string_first_byte (input, re_string_cur_idx (input))) |
5369 | { | 5557 | { |
5370 | token->type = CHARACTER; | 5558 | token->type = CHARACTER; |
5371 | @@ -2246,7 +2255,7 @@ parse_expression (re_string_t *regexp, r | 5559 | @@ -2246,7 +2255,7 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token, |
5372 | return NULL; | 5560 | return NULL; |
5373 | } | 5561 | } |
5374 | #ifdef RE_ENABLE_I18N | 5562 | #ifdef RE_ENABLE_I18N |
@@ -5377,7 +5565,7 @@ Index: git/posix/regcomp.c | |||
5377 | { | 5565 | { |
5378 | while (!re_string_eoi (regexp) | 5566 | while (!re_string_eoi (regexp) |
5379 | && !re_string_first_byte (regexp, re_string_cur_idx (regexp))) | 5567 | && !re_string_first_byte (regexp, re_string_cur_idx (regexp))) |
5380 | @@ -2384,7 +2393,7 @@ parse_expression (re_string_t *regexp, r | 5568 | @@ -2384,7 +2393,7 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token, |
5381 | *err = REG_ESPACE; | 5569 | *err = REG_ESPACE; |
5382 | return NULL; | 5570 | return NULL; |
5383 | } | 5571 | } |
@@ -5386,7 +5574,7 @@ Index: git/posix/regcomp.c | |||
5386 | dfa->has_mb_node = 1; | 5574 | dfa->has_mb_node = 1; |
5387 | break; | 5575 | break; |
5388 | case OP_WORD: | 5576 | case OP_WORD: |
5389 | @@ -2690,7 +2699,7 @@ build_range_exp (bitset_t sbcset, bracke | 5577 | @@ -2690,7 +2699,7 @@ build_range_exp (bitset_t sbcset, bracket_elem_t *start_elem, |
5390 | However, for !_LIBC we have no collation elements: if the | 5578 | However, for !_LIBC we have no collation elements: if the |
5391 | character set is single byte, the single byte character set | 5579 | character set is single byte, the single byte character set |
5392 | that we build below suffices. parse_bracket_exp passes | 5580 | that we build below suffices. parse_bracket_exp passes |
@@ -5395,7 +5583,7 @@ Index: git/posix/regcomp.c | |||
5395 | if (mbcset) | 5583 | if (mbcset) |
5396 | { | 5584 | { |
5397 | /* Check the space of the arrays. */ | 5585 | /* Check the space of the arrays. */ |
5398 | @@ -2786,7 +2795,13 @@ parse_bracket_exp (re_string_t *regexp, | 5586 | @@ -2786,7 +2795,13 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, |
5399 | reg_syntax_t syntax, reg_errcode_t *err) | 5587 | reg_syntax_t syntax, reg_errcode_t *err) |
5400 | { | 5588 | { |
5401 | #ifdef _LIBC | 5589 | #ifdef _LIBC |
@@ -5409,7 +5597,7 @@ Index: git/posix/regcomp.c | |||
5409 | const char *collseqwc; | 5597 | const char *collseqwc; |
5410 | uint32_t nrules; | 5598 | uint32_t nrules; |
5411 | int32_t table_size; | 5599 | int32_t table_size; |
5412 | @@ -2834,18 +2849,20 @@ parse_bracket_exp (re_string_t *regexp, | 5600 | @@ -2834,18 +2849,20 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, |
5413 | if (MB_CUR_MAX == 1) | 5601 | if (MB_CUR_MAX == 1) |
5414 | */ | 5602 | */ |
5415 | if (nrules == 0) | 5603 | if (nrules == 0) |
@@ -5431,7 +5619,7 @@ Index: git/posix/regcomp.c | |||
5431 | else if (br_elem->type == COLL_SYM) | 5619 | else if (br_elem->type == COLL_SYM) |
5432 | { | 5620 | { |
5433 | size_t sym_name_len = strlen ((char *) br_elem->opr.name); | 5621 | size_t sym_name_len = strlen ((char *) br_elem->opr.name); |
5434 | @@ -2876,11 +2893,11 @@ parse_bracket_exp (re_string_t *regexp, | 5622 | @@ -2876,11 +2893,11 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, |
5435 | { | 5623 | { |
5436 | /* No valid character. Match it as a single byte | 5624 | /* No valid character. Match it as a single byte |
5437 | character. */ | 5625 | character. */ |
@@ -5445,7 +5633,7 @@ Index: git/posix/regcomp.c | |||
5445 | } | 5633 | } |
5446 | return UINT_MAX; | 5634 | return UINT_MAX; |
5447 | } | 5635 | } |
5448 | @@ -2920,7 +2937,7 @@ parse_bracket_exp (re_string_t *regexp, | 5636 | @@ -2920,7 +2937,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, |
5449 | However, if we have no collation elements, and the character set | 5637 | However, if we have no collation elements, and the character set |
5450 | is single byte, the single byte character set that we | 5638 | is single byte, the single byte character set that we |
5451 | build below suffices. */ | 5639 | build below suffices. */ |
@@ -5454,7 +5642,7 @@ Index: git/posix/regcomp.c | |||
5454 | { | 5642 | { |
5455 | /* Check the space of the arrays. */ | 5643 | /* Check the space of the arrays. */ |
5456 | if (BE (*range_alloc == mbcset->nranges, 0)) | 5644 | if (BE (*range_alloc == mbcset->nranges, 0)) |
5457 | @@ -2957,7 +2974,7 @@ parse_bracket_exp (re_string_t *regexp, | 5645 | @@ -2957,7 +2974,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, |
5458 | if (MB_CUR_MAX == 1) | 5646 | if (MB_CUR_MAX == 1) |
5459 | */ | 5647 | */ |
5460 | if (nrules == 0) | 5648 | if (nrules == 0) |
@@ -5463,7 +5651,7 @@ Index: git/posix/regcomp.c | |||
5463 | else | 5651 | else |
5464 | ch_collseq = __collseq_table_lookup (collseqwc, __btowc (ch)); | 5652 | ch_collseq = __collseq_table_lookup (collseqwc, __btowc (ch)); |
5465 | if (start_collseq <= ch_collseq && ch_collseq <= end_collseq) | 5653 | if (start_collseq <= ch_collseq && ch_collseq <= end_collseq) |
5466 | @@ -3035,7 +3052,10 @@ parse_bracket_exp (re_string_t *regexp, | 5654 | @@ -3035,7 +3052,10 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, |
5467 | re_bitset_ptr_t sbcset; | 5655 | re_bitset_ptr_t sbcset; |
5468 | #ifdef RE_ENABLE_I18N | 5656 | #ifdef RE_ENABLE_I18N |
5469 | re_charset_t *mbcset; | 5657 | re_charset_t *mbcset; |
@@ -5475,7 +5663,7 @@ Index: git/posix/regcomp.c | |||
5475 | int equiv_class_alloc = 0, char_class_alloc = 0; | 5663 | int equiv_class_alloc = 0, char_class_alloc = 0; |
5476 | #endif /* not RE_ENABLE_I18N */ | 5664 | #endif /* not RE_ENABLE_I18N */ |
5477 | int non_match = 0; | 5665 | int non_match = 0; |
5478 | @@ -3043,9 +3063,15 @@ parse_bracket_exp (re_string_t *regexp, | 5666 | @@ -3043,9 +3063,15 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, |
5479 | int token_len; | 5667 | int token_len; |
5480 | int first_round = 1; | 5668 | int first_round = 1; |
5481 | #ifdef _LIBC | 5669 | #ifdef _LIBC |
@@ -5491,7 +5679,7 @@ Index: git/posix/regcomp.c | |||
5491 | if (nrules) | 5679 | if (nrules) |
5492 | { | 5680 | { |
5493 | /* | 5681 | /* |
5494 | @@ -3175,7 +3201,7 @@ parse_bracket_exp (re_string_t *regexp, | 5682 | @@ -3175,7 +3201,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, |
5495 | #else | 5683 | #else |
5496 | # ifdef RE_ENABLE_I18N | 5684 | # ifdef RE_ENABLE_I18N |
5497 | *err = build_range_exp (sbcset, | 5685 | *err = build_range_exp (sbcset, |
@@ -5500,7 +5688,7 @@ Index: git/posix/regcomp.c | |||
5500 | &range_alloc, &start_elem, &end_elem); | 5688 | &range_alloc, &start_elem, &end_elem); |
5501 | # else | 5689 | # else |
5502 | *err = build_range_exp (sbcset, &start_elem, &end_elem); | 5690 | *err = build_range_exp (sbcset, &start_elem, &end_elem); |
5503 | @@ -3191,7 +3217,7 @@ parse_bracket_exp (re_string_t *regexp, | 5691 | @@ -3191,7 +3217,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, |
5504 | case SB_CHAR: | 5692 | case SB_CHAR: |
5505 | bitset_set (sbcset, start_elem.opr.ch); | 5693 | bitset_set (sbcset, start_elem.opr.ch); |
5506 | break; | 5694 | break; |
@@ -5509,7 +5697,7 @@ Index: git/posix/regcomp.c | |||
5509 | case MB_CHAR: | 5697 | case MB_CHAR: |
5510 | /* Check whether the array has enough space. */ | 5698 | /* Check whether the array has enough space. */ |
5511 | if (BE (mbchar_alloc == mbcset->nmbchars, 0)) | 5699 | if (BE (mbchar_alloc == mbcset->nmbchars, 0)) |
5512 | @@ -3209,7 +3235,7 @@ parse_bracket_exp (re_string_t *regexp, | 5700 | @@ -3209,7 +3235,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, |
5513 | } | 5701 | } |
5514 | mbcset->mbchars[mbcset->nmbchars++] = start_elem.opr.wch; | 5702 | mbcset->mbchars[mbcset->nmbchars++] = start_elem.opr.wch; |
5515 | break; | 5703 | break; |
@@ -5518,7 +5706,7 @@ Index: git/posix/regcomp.c | |||
5518 | case EQUIV_CLASS: | 5706 | case EQUIV_CLASS: |
5519 | *err = build_equiv_class (sbcset, | 5707 | *err = build_equiv_class (sbcset, |
5520 | #ifdef RE_ENABLE_I18N | 5708 | #ifdef RE_ENABLE_I18N |
5521 | @@ -3259,11 +3285,11 @@ parse_bracket_exp (re_string_t *regexp, | 5709 | @@ -3259,11 +3285,11 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, |
5522 | 5710 | ||
5523 | #ifdef RE_ENABLE_I18N | 5711 | #ifdef RE_ENABLE_I18N |
5524 | /* Ensure only single byte characters are set. */ | 5712 | /* Ensure only single byte characters are set. */ |
@@ -5532,7 +5720,7 @@ Index: git/posix/regcomp.c | |||
5532 | || mbcset->non_match))) | 5720 | || mbcset->non_match))) |
5533 | { | 5721 | { |
5534 | bin_tree_t *mbc_tree; | 5722 | bin_tree_t *mbc_tree; |
5535 | @@ -3332,7 +3358,7 @@ parse_bracket_element (bracket_elem_t *e | 5723 | @@ -3332,7 +3358,7 @@ parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp, |
5536 | re_token_t *token, int token_len, re_dfa_t *dfa, | 5724 | re_token_t *token, int token_len, re_dfa_t *dfa, |
5537 | reg_syntax_t syntax, int accept_hyphen) | 5725 | reg_syntax_t syntax, int accept_hyphen) |
5538 | { | 5726 | { |
@@ -5541,7 +5729,7 @@ Index: git/posix/regcomp.c | |||
5541 | int cur_char_size; | 5729 | int cur_char_size; |
5542 | cur_char_size = re_string_char_size_at (regexp, re_string_cur_idx (regexp)); | 5730 | cur_char_size = re_string_char_size_at (regexp, re_string_cur_idx (regexp)); |
5543 | if (cur_char_size > 1) | 5731 | if (cur_char_size > 1) |
5544 | @@ -3342,7 +3368,7 @@ parse_bracket_element (bracket_elem_t *e | 5732 | @@ -3342,7 +3368,7 @@ parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp, |
5545 | re_string_skip_bytes (regexp, cur_char_size); | 5733 | re_string_skip_bytes (regexp, cur_char_size); |
5546 | return REG_NOERROR; | 5734 | return REG_NOERROR; |
5547 | } | 5735 | } |
@@ -5550,7 +5738,7 @@ Index: git/posix/regcomp.c | |||
5550 | re_string_skip_bytes (regexp, token_len); /* Skip a token. */ | 5738 | re_string_skip_bytes (regexp, token_len); /* Skip a token. */ |
5551 | if (token->type == OP_OPEN_COLL_ELEM || token->type == OP_OPEN_CHAR_CLASS | 5739 | if (token->type == OP_OPEN_COLL_ELEM || token->type == OP_OPEN_CHAR_CLASS |
5552 | || token->type == OP_OPEN_EQUIV_CLASS) | 5740 | || token->type == OP_OPEN_EQUIV_CLASS) |
5553 | @@ -3422,7 +3448,9 @@ build_equiv_class (bitset_t sbcset, re_c | 5741 | @@ -3422,7 +3448,9 @@ build_equiv_class (bitset_t sbcset, re_charset_t *mbcset, |
5554 | build_equiv_class (bitset_t sbcset, const unsigned char *name) | 5742 | build_equiv_class (bitset_t sbcset, const unsigned char *name) |
5555 | #endif /* not RE_ENABLE_I18N */ | 5743 | #endif /* not RE_ENABLE_I18N */ |
5556 | { | 5744 | { |
@@ -5561,7 +5749,7 @@ Index: git/posix/regcomp.c | |||
5561 | uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); | 5749 | uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); |
5562 | if (nrules != 0) | 5750 | if (nrules != 0) |
5563 | { | 5751 | { |
5564 | @@ -3492,7 +3520,7 @@ build_equiv_class (bitset_t sbcset, cons | 5752 | @@ -3492,7 +3520,7 @@ build_equiv_class (bitset_t sbcset, const unsigned char *name) |
5565 | mbcset->equiv_classes[mbcset->nequiv_classes++] = idx1; | 5753 | mbcset->equiv_classes[mbcset->nequiv_classes++] = idx1; |
5566 | } | 5754 | } |
5567 | else | 5755 | else |
@@ -5570,7 +5758,7 @@ Index: git/posix/regcomp.c | |||
5570 | { | 5758 | { |
5571 | if (BE (strlen ((const char *) name) != 1, 0)) | 5759 | if (BE (strlen ((const char *) name) != 1, 0)) |
5572 | return REG_ECOLLATE; | 5760 | return REG_ECOLLATE; |
5573 | @@ -3526,7 +3554,7 @@ build_charclass (RE_TRANSLATE_TYPE trans | 5761 | @@ -3526,7 +3554,7 @@ build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, |
5574 | && (strcmp (name, "upper") == 0 || strcmp (name, "lower") == 0)) | 5762 | && (strcmp (name, "upper") == 0 || strcmp (name, "lower") == 0)) |
5575 | name = "alpha"; | 5763 | name = "alpha"; |
5576 | 5764 | ||
@@ -5579,7 +5767,7 @@ Index: git/posix/regcomp.c | |||
5579 | /* Check the space of the arrays. */ | 5767 | /* Check the space of the arrays. */ |
5580 | if (BE (*char_class_alloc == mbcset->nchar_classes, 0)) | 5768 | if (BE (*char_class_alloc == mbcset->nchar_classes, 0)) |
5581 | { | 5769 | { |
5582 | @@ -3542,7 +3570,7 @@ build_charclass (RE_TRANSLATE_TYPE trans | 5770 | @@ -3542,7 +3570,7 @@ build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, |
5583 | *char_class_alloc = new_char_class_alloc; | 5771 | *char_class_alloc = new_char_class_alloc; |
5584 | } | 5772 | } |
5585 | mbcset->char_classes[mbcset->nchar_classes++] = __wctype (name); | 5773 | mbcset->char_classes[mbcset->nchar_classes++] = __wctype (name); |
@@ -5588,7 +5776,7 @@ Index: git/posix/regcomp.c | |||
5588 | 5776 | ||
5589 | #define BUILD_CHARCLASS_LOOP(ctype_func) \ | 5777 | #define BUILD_CHARCLASS_LOOP(ctype_func) \ |
5590 | do { \ | 5778 | do { \ |
5591 | @@ -3653,7 +3681,7 @@ build_charclass_op (re_dfa_t *dfa, RE_TR | 5779 | @@ -3653,7 +3681,7 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans, |
5592 | 5780 | ||
5593 | #ifdef RE_ENABLE_I18N | 5781 | #ifdef RE_ENABLE_I18N |
5594 | /* Ensure only single byte characters are set. */ | 5782 | /* Ensure only single byte characters are set. */ |
@@ -5597,7 +5785,7 @@ Index: git/posix/regcomp.c | |||
5597 | bitset_mask (sbcset, dfa->sb_char); | 5785 | bitset_mask (sbcset, dfa->sb_char); |
5598 | #endif | 5786 | #endif |
5599 | 5787 | ||
5600 | @@ -3665,7 +3693,7 @@ build_charclass_op (re_dfa_t *dfa, RE_TR | 5788 | @@ -3665,7 +3693,7 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans, |
5601 | goto build_word_op_espace; | 5789 | goto build_word_op_espace; |
5602 | 5790 | ||
5603 | #ifdef RE_ENABLE_I18N | 5791 | #ifdef RE_ENABLE_I18N |
@@ -5606,258 +5794,10 @@ Index: git/posix/regcomp.c | |||
5606 | { | 5794 | { |
5607 | bin_tree_t *mbc_tree; | 5795 | bin_tree_t *mbc_tree; |
5608 | /* Build a tree for complex bracket. */ | 5796 | /* Build a tree for complex bracket. */ |
5609 | Index: git/posix/regexec.c | 5797 | diff --git a/posix/regex.h b/posix/regex.h |
5610 | =================================================================== | 5798 | index 5b1981e..2941f94 100644 |
5611 | --- git.orig/posix/regexec.c | 5799 | --- a/posix/regex.h |
5612 | +++ git/posix/regexec.c | 5800 | +++ b/posix/regex.h |
5613 | @@ -18,6 +18,7 @@ | ||
5614 | <http://www.gnu.org/licenses/>. */ | ||
5615 | |||
5616 | #include <stdint.h> | ||
5617 | +#include <gnu/option-groups.h> | ||
5618 | |||
5619 | static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags, | ||
5620 | int n) internal_function; | ||
5621 | @@ -186,11 +187,11 @@ static int build_trtable (const re_dfa_t | ||
5622 | static int check_node_accept_bytes (const re_dfa_t *dfa, int node_idx, | ||
5623 | const re_string_t *input, int idx) | ||
5624 | internal_function; | ||
5625 | -# ifdef _LIBC | ||
5626 | +# if defined _LIBC && __OPTION_EGLIBC_LOCALE_CODE | ||
5627 | static unsigned int find_collation_sequence_value (const unsigned char *mbs, | ||
5628 | size_t name_len) | ||
5629 | internal_function; | ||
5630 | -# endif /* _LIBC */ | ||
5631 | +# endif /* _LIBC && __OPTION_EGLIBC_LOCALE_CODE */ | ||
5632 | #endif /* RE_ENABLE_I18N */ | ||
5633 | static int group_nodes_into_DFAstates (const re_dfa_t *dfa, | ||
5634 | const re_dfastate_t *state, | ||
5635 | @@ -255,25 +256,9 @@ regexec (preg, string, nmatch, pmatch, e | ||
5636 | return err != REG_NOERROR; | ||
5637 | } | ||
5638 | |||
5639 | -#ifdef _LIBC | ||
5640 | -# include <shlib-compat.h> | ||
5641 | -versioned_symbol (libc, __regexec, regexec, GLIBC_2_3_4); | ||
5642 | - | ||
5643 | -# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4) | ||
5644 | -__typeof__ (__regexec) __compat_regexec; | ||
5645 | - | ||
5646 | -int | ||
5647 | -attribute_compat_text_section | ||
5648 | -__compat_regexec (const regex_t *__restrict preg, | ||
5649 | - const char *__restrict string, size_t nmatch, | ||
5650 | - regmatch_t pmatch[], int eflags) | ||
5651 | -{ | ||
5652 | - return regexec (preg, string, nmatch, pmatch, | ||
5653 | - eflags & (REG_NOTBOL | REG_NOTEOL)); | ||
5654 | -} | ||
5655 | -compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0); | ||
5656 | -# endif | ||
5657 | -#endif | ||
5658 | +/* EGLIBC: The code that used to be here was move to a separate file | ||
5659 | + so that it can be shared with xregex.c. */ | ||
5660 | +#include "regexec-compat.c" | ||
5661 | |||
5662 | /* Entry points for GNU code. */ | ||
5663 | |||
5664 | @@ -728,7 +713,7 @@ re_search_internal (preg, string, length | ||
5665 | incr = (range < 0) ? -1 : 1; | ||
5666 | left_lim = (range < 0) ? start + range : start; | ||
5667 | right_lim = (range < 0) ? start : start + range; | ||
5668 | - sb = dfa->mb_cur_max == 1; | ||
5669 | + sb = dfa_mb_cur_max (dfa) == 1; | ||
5670 | match_kind = | ||
5671 | (fastmap | ||
5672 | ? ((sb || !(preg->syntax & RE_ICASE || t) ? 4 : 0) | ||
5673 | @@ -3448,7 +3433,7 @@ out_free: | ||
5674 | if (BE (dest_states_word[i] == NULL && err != REG_NOERROR, 0)) | ||
5675 | goto out_free; | ||
5676 | |||
5677 | - if (dest_states[i] != dest_states_word[i] && dfa->mb_cur_max > 1) | ||
5678 | + if (dest_states[i] != dest_states_word[i] && dfa_mb_cur_max (dfa) > 1) | ||
5679 | need_word_trtable = 1; | ||
5680 | |||
5681 | dest_states_nl[i] = re_acquire_state_context (&err, dfa, &follows, | ||
5682 | @@ -3590,7 +3575,7 @@ group_nodes_into_DFAstates (const re_dfa | ||
5683 | else if (type == OP_PERIOD) | ||
5684 | { | ||
5685 | #ifdef RE_ENABLE_I18N | ||
5686 | - if (dfa->mb_cur_max > 1) | ||
5687 | + if (dfa_mb_cur_max (dfa) > 1) | ||
5688 | bitset_merge (accepts, dfa->sb_char); | ||
5689 | else | ||
5690 | #endif | ||
5691 | @@ -3641,7 +3626,7 @@ group_nodes_into_DFAstates (const re_dfa | ||
5692 | continue; | ||
5693 | } | ||
5694 | #ifdef RE_ENABLE_I18N | ||
5695 | - if (dfa->mb_cur_max > 1) | ||
5696 | + if (dfa_mb_cur_max (dfa) > 1) | ||
5697 | for (j = 0; j < BITSET_WORDS; ++j) | ||
5698 | any_set |= (accepts[j] &= (dfa->word_char[j] | ~dfa->sb_char[j])); | ||
5699 | else | ||
5700 | @@ -3660,7 +3645,7 @@ group_nodes_into_DFAstates (const re_dfa | ||
5701 | continue; | ||
5702 | } | ||
5703 | #ifdef RE_ENABLE_I18N | ||
5704 | - if (dfa->mb_cur_max > 1) | ||
5705 | + if (dfa_mb_cur_max (dfa) > 1) | ||
5706 | for (j = 0; j < BITSET_WORDS; ++j) | ||
5707 | any_set |= (accepts[j] &= ~(dfa->word_char[j] & dfa->sb_char[j])); | ||
5708 | else | ||
5709 | @@ -3836,12 +3821,6 @@ check_node_accept_bytes (const re_dfa_t | ||
5710 | if (node->type == COMPLEX_BRACKET) | ||
5711 | { | ||
5712 | const re_charset_t *cset = node->opr.mbcset; | ||
5713 | -# ifdef _LIBC | ||
5714 | - const unsigned char *pin | ||
5715 | - = ((const unsigned char *) re_string_get_buffer (input) + str_idx); | ||
5716 | - int j; | ||
5717 | - uint32_t nrules; | ||
5718 | -# endif /* _LIBC */ | ||
5719 | int match_len = 0; | ||
5720 | wchar_t wc = ((cset->nranges || cset->nchar_classes || cset->nmbchars) | ||
5721 | ? re_string_wchar_at (input, str_idx) : 0); | ||
5722 | @@ -3853,6 +3832,7 @@ check_node_accept_bytes (const re_dfa_t | ||
5723 | match_len = char_len; | ||
5724 | goto check_node_accept_bytes_match; | ||
5725 | } | ||
5726 | +#if __OPTION_EGLIBC_LOCALE_CODE | ||
5727 | /* match with character_class? */ | ||
5728 | for (i = 0; i < cset->nchar_classes; ++i) | ||
5729 | { | ||
5730 | @@ -3863,14 +3843,22 @@ check_node_accept_bytes (const re_dfa_t | ||
5731 | goto check_node_accept_bytes_match; | ||
5732 | } | ||
5733 | } | ||
5734 | +#endif | ||
5735 | + | ||
5736 | + /* When __OPTION_EGLIBC_LOCALE_CODE is disabled, only the C | ||
5737 | + locale is supported; it has no collation rules. */ | ||
5738 | +# if defined _LIBC && __OPTION_EGLIBC_LOCALE_CODE | ||
5739 | + const unsigned char *pin | ||
5740 | + = ((const unsigned char *) re_string_get_buffer (input) + str_idx); | ||
5741 | + int j; | ||
5742 | + uint32_t nrules; | ||
5743 | |||
5744 | -# ifdef _LIBC | ||
5745 | nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); | ||
5746 | if (nrules != 0) | ||
5747 | { | ||
5748 | unsigned int in_collseq = 0; | ||
5749 | const int32_t *table, *indirect; | ||
5750 | - const unsigned char *weights, *extra; | ||
5751 | + const unsigned char *weights, *extra = NULL; | ||
5752 | const char *collseqwc; | ||
5753 | |||
5754 | /* match with collating_symbol? */ | ||
5755 | @@ -3955,8 +3943,12 @@ check_node_accept_bytes (const re_dfa_t | ||
5756 | } | ||
5757 | } | ||
5758 | else | ||
5759 | -# endif /* _LIBC */ | ||
5760 | +# endif /* _LIBC && __OPTION_EGLIBC_LOCALE_CODE */ | ||
5761 | { | ||
5762 | + /* In the _LIBC version, if OPTION_EGLIBC_LOCALE_CODE is | ||
5763 | + disabled, there can be no multibyte range endpoints, and | ||
5764 | + cset->nranges is always zero. */ | ||
5765 | +#if __OPTION_EGLIBC_LOCALE_CODE | ||
5766 | /* match with range expression? */ | ||
5767 | #if __GNUC__ >= 2 | ||
5768 | wchar_t cmp_buf[] = {L'\0', L'\0', wc, L'\0', L'\0', L'\0'}; | ||
5769 | @@ -3975,6 +3967,7 @@ check_node_accept_bytes (const re_dfa_t | ||
5770 | goto check_node_accept_bytes_match; | ||
5771 | } | ||
5772 | } | ||
5773 | +#endif /* __OPTION_EGLIBC_LOCALE_CODE */ | ||
5774 | } | ||
5775 | check_node_accept_bytes_match: | ||
5776 | if (!cset->non_match) | ||
5777 | @@ -3990,7 +3983,7 @@ check_node_accept_bytes (const re_dfa_t | ||
5778 | return 0; | ||
5779 | } | ||
5780 | |||
5781 | -# ifdef _LIBC | ||
5782 | +# if defined _LIBC && __OPTION_EGLIBC_LOCALE_CODE | ||
5783 | static unsigned int | ||
5784 | internal_function | ||
5785 | find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len) | ||
5786 | @@ -4048,7 +4041,7 @@ find_collation_sequence_value (const uns | ||
5787 | return UINT_MAX; | ||
5788 | } | ||
5789 | } | ||
5790 | -# endif /* _LIBC */ | ||
5791 | +# endif /* _LIBC && __OPTION_EGLIBC_LOCALE_CODE */ | ||
5792 | #endif /* RE_ENABLE_I18N */ | ||
5793 | |||
5794 | /* Check whether the node accepts the byte which is IDX-th | ||
5795 | @@ -4139,7 +4132,7 @@ extend_buffers (re_match_context_t *mctx | ||
5796 | if (pstr->icase) | ||
5797 | { | ||
5798 | #ifdef RE_ENABLE_I18N | ||
5799 | - if (pstr->mb_cur_max > 1) | ||
5800 | + if (string_mb_cur_max (pstr) > 1) | ||
5801 | { | ||
5802 | ret = build_wcs_upper_buffer (pstr); | ||
5803 | if (BE (ret != REG_NOERROR, 0)) | ||
5804 | @@ -4152,7 +4145,7 @@ extend_buffers (re_match_context_t *mctx | ||
5805 | else | ||
5806 | { | ||
5807 | #ifdef RE_ENABLE_I18N | ||
5808 | - if (pstr->mb_cur_max > 1) | ||
5809 | + if (string_mb_cur_max (pstr) > 1) | ||
5810 | build_wcs_buffer (pstr); | ||
5811 | else | ||
5812 | #endif /* RE_ENABLE_I18N */ | ||
5813 | Index: git/posix/regexec-compat.c | ||
5814 | =================================================================== | ||
5815 | --- /dev/null | ||
5816 | +++ git/posix/regexec-compat.c | ||
5817 | @@ -0,0 +1,39 @@ | ||
5818 | +/* Extended regular expression matching and search library. | ||
5819 | + Copyright (C) 2008 Free Software Foundation, Inc. | ||
5820 | + This file is part of the GNU C Library. | ||
5821 | + Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. | ||
5822 | + | ||
5823 | + The GNU C Library is free software; you can redistribute it and/or | ||
5824 | + modify it under the terms of the GNU Lesser General Public | ||
5825 | + License as published by the Free Software Foundation; either | ||
5826 | + version 2.1 of the License, or (at your option) any later version. | ||
5827 | + | ||
5828 | + The GNU C Library is distributed in the hope that it will be useful, | ||
5829 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
5830 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
5831 | + Lesser General Public License for more details. | ||
5832 | + | ||
5833 | + You should have received a copy of the GNU Lesser General Public | ||
5834 | + License along with the GNU C Library; if not, write to the Free | ||
5835 | + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
5836 | + 02111-1307 USA. */ | ||
5837 | + | ||
5838 | +#ifdef _LIBC | ||
5839 | +# include <shlib-compat.h> | ||
5840 | +versioned_symbol (libc, __regexec, regexec, GLIBC_2_3_4); | ||
5841 | + | ||
5842 | +# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4) | ||
5843 | +__typeof__ (__regexec) __compat_regexec; | ||
5844 | + | ||
5845 | +int | ||
5846 | +attribute_compat_text_section | ||
5847 | +__compat_regexec (const regex_t *__restrict preg, | ||
5848 | + const char *__restrict string, size_t nmatch, | ||
5849 | + regmatch_t pmatch[], int eflags) | ||
5850 | +{ | ||
5851 | + return regexec (preg, string, nmatch, pmatch, | ||
5852 | + eflags & (REG_NOTBOL | REG_NOTEOL)); | ||
5853 | +} | ||
5854 | +compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0); | ||
5855 | +# endif | ||
5856 | +#endif | ||
5857 | Index: git/posix/regex.h | ||
5858 | =================================================================== | ||
5859 | --- git.orig/posix/regex.h | ||
5860 | +++ git/posix/regex.h | ||
5861 | @@ -21,6 +21,7 @@ | 5801 | @@ -21,6 +21,7 @@ |
5862 | #define _REGEX_H 1 | 5802 | #define _REGEX_H 1 |
5863 | 5803 | ||
@@ -5909,11 +5849,11 @@ Index: git/posix/regex.h | |||
5909 | 5849 | ||
5910 | 5850 | ||
5911 | /* If any error codes are removed, changed, or added, update the | 5851 | /* If any error codes are removed, changed, or added, update the |
5912 | Index: git/posix/regex_internal.c | 5852 | diff --git a/posix/regex_internal.c b/posix/regex_internal.c |
5913 | =================================================================== | 5853 | index 8597d7e..d53b2a8 100644 |
5914 | --- git.orig/posix/regex_internal.c | 5854 | --- a/posix/regex_internal.c |
5915 | +++ git/posix/regex_internal.c | 5855 | +++ b/posix/regex_internal.c |
5916 | @@ -43,8 +43,8 @@ re_string_allocate (re_string_t *pstr, c | 5856 | @@ -43,8 +43,8 @@ re_string_allocate (re_string_t *pstr, const char *str, int len, int init_len, |
5917 | int init_buf_len; | 5857 | int init_buf_len; |
5918 | 5858 | ||
5919 | /* Ensure at least one character fits into the buffers. */ | 5859 | /* Ensure at least one character fits into the buffers. */ |
@@ -5924,7 +5864,7 @@ Index: git/posix/regex_internal.c | |||
5924 | init_buf_len = (len + 1 < init_len) ? len + 1: init_len; | 5864 | init_buf_len = (len + 1 < init_len) ? len + 1: init_len; |
5925 | re_string_construct_common (str, len, pstr, trans, icase, dfa); | 5865 | re_string_construct_common (str, len, pstr, trans, icase, dfa); |
5926 | 5866 | ||
5927 | @@ -55,7 +55,7 @@ re_string_allocate (re_string_t *pstr, c | 5867 | @@ -55,7 +55,7 @@ re_string_allocate (re_string_t *pstr, const char *str, int len, int init_len, |
5928 | pstr->word_char = dfa->word_char; | 5868 | pstr->word_char = dfa->word_char; |
5929 | pstr->word_ops_used = dfa->word_ops_used; | 5869 | pstr->word_ops_used = dfa->word_ops_used; |
5930 | pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str; | 5870 | pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str; |
@@ -5933,7 +5873,7 @@ Index: git/posix/regex_internal.c | |||
5933 | pstr->valid_raw_len = pstr->valid_len; | 5873 | pstr->valid_raw_len = pstr->valid_len; |
5934 | return REG_NOERROR; | 5874 | return REG_NOERROR; |
5935 | } | 5875 | } |
5936 | @@ -82,7 +82,7 @@ re_string_construct (re_string_t *pstr, | 5876 | @@ -82,7 +82,7 @@ re_string_construct (re_string_t *pstr, const char *str, int len, |
5937 | if (icase) | 5877 | if (icase) |
5938 | { | 5878 | { |
5939 | #ifdef RE_ENABLE_I18N | 5879 | #ifdef RE_ENABLE_I18N |
@@ -5942,7 +5882,7 @@ Index: git/posix/regex_internal.c | |||
5942 | { | 5882 | { |
5943 | while (1) | 5883 | while (1) |
5944 | { | 5884 | { |
5945 | @@ -91,7 +91,7 @@ re_string_construct (re_string_t *pstr, | 5885 | @@ -91,7 +91,7 @@ re_string_construct (re_string_t *pstr, const char *str, int len, |
5946 | return ret; | 5886 | return ret; |
5947 | if (pstr->valid_raw_len >= len) | 5887 | if (pstr->valid_raw_len >= len) |
5948 | break; | 5888 | break; |
@@ -5951,7 +5891,7 @@ Index: git/posix/regex_internal.c | |||
5951 | break; | 5891 | break; |
5952 | ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2); | 5892 | ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2); |
5953 | if (BE (ret != REG_NOERROR, 0)) | 5893 | if (BE (ret != REG_NOERROR, 0)) |
5954 | @@ -105,7 +105,7 @@ re_string_construct (re_string_t *pstr, | 5894 | @@ -105,7 +105,7 @@ re_string_construct (re_string_t *pstr, const char *str, int len, |
5955 | else | 5895 | else |
5956 | { | 5896 | { |
5957 | #ifdef RE_ENABLE_I18N | 5897 | #ifdef RE_ENABLE_I18N |
@@ -5960,7 +5900,7 @@ Index: git/posix/regex_internal.c | |||
5960 | build_wcs_buffer (pstr); | 5900 | build_wcs_buffer (pstr); |
5961 | else | 5901 | else |
5962 | #endif /* RE_ENABLE_I18N */ | 5902 | #endif /* RE_ENABLE_I18N */ |
5963 | @@ -130,7 +130,7 @@ internal_function __attribute_warn_unuse | 5903 | @@ -130,7 +130,7 @@ internal_function __attribute_warn_unused_result__ |
5964 | re_string_realloc_buffers (re_string_t *pstr, int new_buf_len) | 5904 | re_string_realloc_buffers (re_string_t *pstr, int new_buf_len) |
5965 | { | 5905 | { |
5966 | #ifdef RE_ENABLE_I18N | 5906 | #ifdef RE_ENABLE_I18N |
@@ -5969,7 +5909,7 @@ Index: git/posix/regex_internal.c | |||
5969 | { | 5909 | { |
5970 | wint_t *new_wcs; | 5910 | wint_t *new_wcs; |
5971 | 5911 | ||
5972 | @@ -177,7 +177,7 @@ re_string_construct_common (const char * | 5912 | @@ -177,7 +177,7 @@ re_string_construct_common (const char *str, int len, re_string_t *pstr, |
5973 | pstr->trans = trans; | 5913 | pstr->trans = trans; |
5974 | pstr->icase = icase ? 1 : 0; | 5914 | pstr->icase = icase ? 1 : 0; |
5975 | pstr->mbs_allocated = (trans != NULL || icase); | 5915 | pstr->mbs_allocated = (trans != NULL || icase); |
@@ -5996,7 +5936,7 @@ Index: git/posix/regex_internal.c | |||
5996 | { | 5936 | { |
5997 | ch = pstr->raw_mbs [pstr->raw_mbs_idx + byte_idx + i]; | 5937 | ch = pstr->raw_mbs [pstr->raw_mbs_idx + byte_idx + i]; |
5998 | buf[i] = pstr->mbs[byte_idx + i] = pstr->trans[ch]; | 5938 | buf[i] = pstr->mbs[byte_idx + i] = pstr->trans[ch]; |
5999 | @@ -275,7 +275,7 @@ build_wcs_upper_buffer (re_string_t *pst | 5939 | @@ -275,7 +275,7 @@ build_wcs_upper_buffer (re_string_t *pstr) |
6000 | size_t mbclen; | 5940 | size_t mbclen; |
6001 | #ifdef _LIBC | 5941 | #ifdef _LIBC |
6002 | char buf[MB_LEN_MAX]; | 5942 | char buf[MB_LEN_MAX]; |
@@ -6005,7 +5945,7 @@ Index: git/posix/regex_internal.c | |||
6005 | #else | 5945 | #else |
6006 | char buf[64]; | 5946 | char buf[64]; |
6007 | #endif | 5947 | #endif |
6008 | @@ -369,7 +369,7 @@ build_wcs_upper_buffer (re_string_t *pst | 5948 | @@ -369,7 +369,7 @@ build_wcs_upper_buffer (re_string_t *pstr) |
6009 | { | 5949 | { |
6010 | int i, ch; | 5950 | int i, ch; |
6011 | 5951 | ||
@@ -6014,7 +5954,7 @@ Index: git/posix/regex_internal.c | |||
6014 | { | 5954 | { |
6015 | ch = pstr->raw_mbs [pstr->raw_mbs_idx + src_idx + i]; | 5955 | ch = pstr->raw_mbs [pstr->raw_mbs_idx + src_idx + i]; |
6016 | buf[i] = pstr->trans[ch]; | 5956 | buf[i] = pstr->trans[ch]; |
6017 | @@ -567,8 +567,9 @@ re_string_translate_buffer (re_string_t | 5957 | @@ -567,8 +567,9 @@ re_string_translate_buffer (re_string_t *pstr) |
6018 | } | 5958 | } |
6019 | 5959 | ||
6020 | /* This function re-construct the buffers. | 5960 | /* This function re-construct the buffers. |
@@ -6026,7 +5966,7 @@ Index: git/posix/regex_internal.c | |||
6026 | 5966 | ||
6027 | static reg_errcode_t | 5967 | static reg_errcode_t |
6028 | internal_function __attribute_warn_unused_result__ | 5968 | internal_function __attribute_warn_unused_result__ |
6029 | @@ -579,7 +580,7 @@ re_string_reconstruct (re_string_t *pstr | 5969 | @@ -579,7 +580,7 @@ re_string_reconstruct (re_string_t *pstr, int idx, int eflags) |
6030 | { | 5970 | { |
6031 | /* Reset buffer. */ | 5971 | /* Reset buffer. */ |
6032 | #ifdef RE_ENABLE_I18N | 5972 | #ifdef RE_ENABLE_I18N |
@@ -6035,7 +5975,7 @@ Index: git/posix/regex_internal.c | |||
6035 | memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); | 5975 | memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); |
6036 | #endif /* RE_ENABLE_I18N */ | 5976 | #endif /* RE_ENABLE_I18N */ |
6037 | pstr->len = pstr->raw_len; | 5977 | pstr->len = pstr->raw_len; |
6038 | @@ -670,7 +671,7 @@ re_string_reconstruct (re_string_t *pstr | 5978 | @@ -670,7 +671,7 @@ re_string_reconstruct (re_string_t *pstr, int idx, int eflags) |
6039 | pstr->tip_context = re_string_context_at (pstr, offset - 1, | 5979 | pstr->tip_context = re_string_context_at (pstr, offset - 1, |
6040 | eflags); | 5980 | eflags); |
6041 | #ifdef RE_ENABLE_I18N | 5981 | #ifdef RE_ENABLE_I18N |
@@ -6044,7 +5984,7 @@ Index: git/posix/regex_internal.c | |||
6044 | memmove (pstr->wcs, pstr->wcs + offset, | 5984 | memmove (pstr->wcs, pstr->wcs + offset, |
6045 | (pstr->valid_len - offset) * sizeof (wint_t)); | 5985 | (pstr->valid_len - offset) * sizeof (wint_t)); |
6046 | #endif /* RE_ENABLE_I18N */ | 5986 | #endif /* RE_ENABLE_I18N */ |
6047 | @@ -699,7 +700,7 @@ re_string_reconstruct (re_string_t *pstr | 5987 | @@ -699,7 +700,7 @@ re_string_reconstruct (re_string_t *pstr, int idx, int eflags) |
6048 | #endif | 5988 | #endif |
6049 | pstr->valid_len = 0; | 5989 | pstr->valid_len = 0; |
6050 | #ifdef RE_ENABLE_I18N | 5990 | #ifdef RE_ENABLE_I18N |
@@ -6053,7 +5993,7 @@ Index: git/posix/regex_internal.c | |||
6053 | { | 5993 | { |
6054 | int wcs_idx; | 5994 | int wcs_idx; |
6055 | wint_t wc = WEOF; | 5995 | wint_t wc = WEOF; |
6056 | @@ -711,7 +712,7 @@ re_string_reconstruct (re_string_t *pstr | 5996 | @@ -711,7 +712,7 @@ re_string_reconstruct (re_string_t *pstr, int idx, int eflags) |
6057 | /* Special case UTF-8. Multi-byte chars start with any | 5997 | /* Special case UTF-8. Multi-byte chars start with any |
6058 | byte other than 0x80 - 0xbf. */ | 5998 | byte other than 0x80 - 0xbf. */ |
6059 | raw = pstr->raw_mbs + pstr->raw_mbs_idx; | 5999 | raw = pstr->raw_mbs + pstr->raw_mbs_idx; |
@@ -6062,7 +6002,7 @@ Index: git/posix/regex_internal.c | |||
6062 | if (end < pstr->raw_mbs) | 6002 | if (end < pstr->raw_mbs) |
6063 | end = pstr->raw_mbs; | 6003 | end = pstr->raw_mbs; |
6064 | p = raw + offset - 1; | 6004 | p = raw + offset - 1; |
6065 | @@ -803,7 +804,7 @@ re_string_reconstruct (re_string_t *pstr | 6005 | @@ -803,7 +804,7 @@ re_string_reconstruct (re_string_t *pstr, int idx, int eflags) |
6066 | 6006 | ||
6067 | /* Then build the buffers. */ | 6007 | /* Then build the buffers. */ |
6068 | #ifdef RE_ENABLE_I18N | 6008 | #ifdef RE_ENABLE_I18N |
@@ -6071,7 +6011,7 @@ Index: git/posix/regex_internal.c | |||
6071 | { | 6011 | { |
6072 | if (pstr->icase) | 6012 | if (pstr->icase) |
6073 | { | 6013 | { |
6074 | @@ -841,7 +842,7 @@ re_string_peek_byte_case (const re_strin | 6014 | @@ -841,7 +842,7 @@ re_string_peek_byte_case (const re_string_t *pstr, int idx) |
6075 | return re_string_peek_byte (pstr, idx); | 6015 | return re_string_peek_byte (pstr, idx); |
6076 | 6016 | ||
6077 | #ifdef RE_ENABLE_I18N | 6017 | #ifdef RE_ENABLE_I18N |
@@ -6080,7 +6020,7 @@ Index: git/posix/regex_internal.c | |||
6080 | && ! re_string_is_single_byte_char (pstr, pstr->cur_idx + idx)) | 6020 | && ! re_string_is_single_byte_char (pstr, pstr->cur_idx + idx)) |
6081 | return re_string_peek_byte (pstr, idx); | 6021 | return re_string_peek_byte (pstr, idx); |
6082 | #endif | 6022 | #endif |
6083 | @@ -930,7 +931,7 @@ re_string_context_at (const re_string_t | 6023 | @@ -930,7 +931,7 @@ re_string_context_at (const re_string_t *input, int idx, int eflags) |
6084 | return ((eflags & REG_NOTEOL) ? CONTEXT_ENDBUF | 6024 | return ((eflags & REG_NOTEOL) ? CONTEXT_ENDBUF |
6085 | : CONTEXT_NEWLINE | CONTEXT_ENDBUF); | 6025 | : CONTEXT_NEWLINE | CONTEXT_ENDBUF); |
6086 | #ifdef RE_ENABLE_I18N | 6026 | #ifdef RE_ENABLE_I18N |
@@ -6089,7 +6029,7 @@ Index: git/posix/regex_internal.c | |||
6089 | { | 6029 | { |
6090 | wint_t wc; | 6030 | wint_t wc; |
6091 | int wc_idx = idx; | 6031 | int wc_idx = idx; |
6092 | @@ -1444,7 +1445,7 @@ re_dfa_add_node (re_dfa_t *dfa, re_token | 6032 | @@ -1444,7 +1445,7 @@ re_dfa_add_node (re_dfa_t *dfa, re_token_t token) |
6093 | dfa->nodes[dfa->nodes_len].constraint = 0; | 6033 | dfa->nodes[dfa->nodes_len].constraint = 0; |
6094 | #ifdef RE_ENABLE_I18N | 6034 | #ifdef RE_ENABLE_I18N |
6095 | dfa->nodes[dfa->nodes_len].accept_mb = | 6035 | dfa->nodes[dfa->nodes_len].accept_mb = |
@@ -6098,10 +6038,10 @@ Index: git/posix/regex_internal.c | |||
6098 | #endif | 6038 | #endif |
6099 | dfa->nexts[dfa->nodes_len] = -1; | 6039 | dfa->nexts[dfa->nodes_len] = -1; |
6100 | re_node_set_init_empty (dfa->edests + dfa->nodes_len); | 6040 | re_node_set_init_empty (dfa->edests + dfa->nodes_len); |
6101 | Index: git/posix/regex_internal.h | 6041 | diff --git a/posix/regex_internal.h b/posix/regex_internal.h |
6102 | =================================================================== | 6042 | index 154e969..c43909a 100644 |
6103 | --- git.orig/posix/regex_internal.h | 6043 | --- a/posix/regex_internal.h |
6104 | +++ git/posix/regex_internal.h | 6044 | +++ b/posix/regex_internal.h |
6105 | @@ -26,6 +26,10 @@ | 6045 | @@ -26,6 +26,10 @@ |
6106 | #include <stdlib.h> | 6046 | #include <stdlib.h> |
6107 | #include <string.h> | 6047 | #include <string.h> |
@@ -6142,7 +6082,7 @@ Index: git/posix/regex_internal.h | |||
6142 | #define re_node_set_init_empty(set) memset (set, '\0', sizeof (re_node_set)) | 6082 | #define re_node_set_init_empty(set) memset (set, '\0', sizeof (re_node_set)) |
6143 | #define re_node_set_remove(set,id) \ | 6083 | #define re_node_set_remove(set,id) \ |
6144 | (re_node_set_remove_at (set, re_node_set_contains (set, id) - 1)) | 6084 | (re_node_set_remove_at (set, re_node_set_contains (set, id) - 1)) |
6145 | @@ -714,7 +733,7 @@ internal_function __attribute__ ((pure, | 6085 | @@ -714,7 +733,7 @@ internal_function __attribute__ ((pure, unused)) |
6146 | re_string_char_size_at (const re_string_t *pstr, int idx) | 6086 | re_string_char_size_at (const re_string_t *pstr, int idx) |
6147 | { | 6087 | { |
6148 | int byte_idx; | 6088 | int byte_idx; |
@@ -6160,10 +6100,260 @@ Index: git/posix/regex_internal.h | |||
6160 | return (wint_t) pstr->mbs[idx]; | 6100 | return (wint_t) pstr->mbs[idx]; |
6161 | return (wint_t) pstr->wcs[idx]; | 6101 | return (wint_t) pstr->wcs[idx]; |
6162 | } | 6102 | } |
6163 | Index: git/posix/xregex.c | 6103 | diff --git a/posix/regexec-compat.c b/posix/regexec-compat.c |
6164 | =================================================================== | 6104 | new file mode 100644 |
6105 | index 0000000..0f9b7c7 | ||
6165 | --- /dev/null | 6106 | --- /dev/null |
6166 | +++ git/posix/xregex.c | 6107 | +++ b/posix/regexec-compat.c |
6108 | @@ -0,0 +1,39 @@ | ||
6109 | +/* Extended regular expression matching and search library. | ||
6110 | + Copyright (C) 2008 Free Software Foundation, Inc. | ||
6111 | + This file is part of the GNU C Library. | ||
6112 | + Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. | ||
6113 | + | ||
6114 | + The GNU C Library is free software; you can redistribute it and/or | ||
6115 | + modify it under the terms of the GNU Lesser General Public | ||
6116 | + License as published by the Free Software Foundation; either | ||
6117 | + version 2.1 of the License, or (at your option) any later version. | ||
6118 | + | ||
6119 | + The GNU C Library is distributed in the hope that it will be useful, | ||
6120 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
6121 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
6122 | + Lesser General Public License for more details. | ||
6123 | + | ||
6124 | + You should have received a copy of the GNU Lesser General Public | ||
6125 | + License along with the GNU C Library; if not, write to the Free | ||
6126 | + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
6127 | + 02111-1307 USA. */ | ||
6128 | + | ||
6129 | +#ifdef _LIBC | ||
6130 | +# include <shlib-compat.h> | ||
6131 | +versioned_symbol (libc, __regexec, regexec, GLIBC_2_3_4); | ||
6132 | + | ||
6133 | +# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4) | ||
6134 | +__typeof__ (__regexec) __compat_regexec; | ||
6135 | + | ||
6136 | +int | ||
6137 | +attribute_compat_text_section | ||
6138 | +__compat_regexec (const regex_t *__restrict preg, | ||
6139 | + const char *__restrict string, size_t nmatch, | ||
6140 | + regmatch_t pmatch[], int eflags) | ||
6141 | +{ | ||
6142 | + return regexec (preg, string, nmatch, pmatch, | ||
6143 | + eflags & (REG_NOTBOL | REG_NOTEOL)); | ||
6144 | +} | ||
6145 | +compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0); | ||
6146 | +# endif | ||
6147 | +#endif | ||
6148 | diff --git a/posix/regexec.c b/posix/regexec.c | ||
6149 | index 70cd606..e3b49e4 100644 | ||
6150 | --- a/posix/regexec.c | ||
6151 | +++ b/posix/regexec.c | ||
6152 | @@ -18,6 +18,7 @@ | ||
6153 | <http://www.gnu.org/licenses/>. */ | ||
6154 | |||
6155 | #include <stdint.h> | ||
6156 | +#include <gnu/option-groups.h> | ||
6157 | |||
6158 | static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags, | ||
6159 | int n) internal_function; | ||
6160 | @@ -186,11 +187,11 @@ static int build_trtable (const re_dfa_t *dfa, | ||
6161 | static int check_node_accept_bytes (const re_dfa_t *dfa, int node_idx, | ||
6162 | const re_string_t *input, int idx) | ||
6163 | internal_function; | ||
6164 | -# ifdef _LIBC | ||
6165 | +# if defined _LIBC && __OPTION_EGLIBC_LOCALE_CODE | ||
6166 | static unsigned int find_collation_sequence_value (const unsigned char *mbs, | ||
6167 | size_t name_len) | ||
6168 | internal_function; | ||
6169 | -# endif /* _LIBC */ | ||
6170 | +# endif /* _LIBC && __OPTION_EGLIBC_LOCALE_CODE */ | ||
6171 | #endif /* RE_ENABLE_I18N */ | ||
6172 | static int group_nodes_into_DFAstates (const re_dfa_t *dfa, | ||
6173 | const re_dfastate_t *state, | ||
6174 | @@ -255,25 +256,9 @@ regexec (preg, string, nmatch, pmatch, eflags) | ||
6175 | return err != REG_NOERROR; | ||
6176 | } | ||
6177 | |||
6178 | -#ifdef _LIBC | ||
6179 | -# include <shlib-compat.h> | ||
6180 | -versioned_symbol (libc, __regexec, regexec, GLIBC_2_3_4); | ||
6181 | - | ||
6182 | -# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4) | ||
6183 | -__typeof__ (__regexec) __compat_regexec; | ||
6184 | - | ||
6185 | -int | ||
6186 | -attribute_compat_text_section | ||
6187 | -__compat_regexec (const regex_t *__restrict preg, | ||
6188 | - const char *__restrict string, size_t nmatch, | ||
6189 | - regmatch_t pmatch[], int eflags) | ||
6190 | -{ | ||
6191 | - return regexec (preg, string, nmatch, pmatch, | ||
6192 | - eflags & (REG_NOTBOL | REG_NOTEOL)); | ||
6193 | -} | ||
6194 | -compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0); | ||
6195 | -# endif | ||
6196 | -#endif | ||
6197 | +/* EGLIBC: The code that used to be here was move to a separate file | ||
6198 | + so that it can be shared with xregex.c. */ | ||
6199 | +#include "regexec-compat.c" | ||
6200 | |||
6201 | /* Entry points for GNU code. */ | ||
6202 | |||
6203 | @@ -728,7 +713,7 @@ re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch, | ||
6204 | incr = (range < 0) ? -1 : 1; | ||
6205 | left_lim = (range < 0) ? start + range : start; | ||
6206 | right_lim = (range < 0) ? start : start + range; | ||
6207 | - sb = dfa->mb_cur_max == 1; | ||
6208 | + sb = dfa_mb_cur_max (dfa) == 1; | ||
6209 | match_kind = | ||
6210 | (fastmap | ||
6211 | ? ((sb || !(preg->syntax & RE_ICASE || t) ? 4 : 0) | ||
6212 | @@ -3448,7 +3433,7 @@ out_free: | ||
6213 | if (BE (dest_states_word[i] == NULL && err != REG_NOERROR, 0)) | ||
6214 | goto out_free; | ||
6215 | |||
6216 | - if (dest_states[i] != dest_states_word[i] && dfa->mb_cur_max > 1) | ||
6217 | + if (dest_states[i] != dest_states_word[i] && dfa_mb_cur_max (dfa) > 1) | ||
6218 | need_word_trtable = 1; | ||
6219 | |||
6220 | dest_states_nl[i] = re_acquire_state_context (&err, dfa, &follows, | ||
6221 | @@ -3590,7 +3575,7 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, | ||
6222 | else if (type == OP_PERIOD) | ||
6223 | { | ||
6224 | #ifdef RE_ENABLE_I18N | ||
6225 | - if (dfa->mb_cur_max > 1) | ||
6226 | + if (dfa_mb_cur_max (dfa) > 1) | ||
6227 | bitset_merge (accepts, dfa->sb_char); | ||
6228 | else | ||
6229 | #endif | ||
6230 | @@ -3641,7 +3626,7 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, | ||
6231 | continue; | ||
6232 | } | ||
6233 | #ifdef RE_ENABLE_I18N | ||
6234 | - if (dfa->mb_cur_max > 1) | ||
6235 | + if (dfa_mb_cur_max (dfa) > 1) | ||
6236 | for (j = 0; j < BITSET_WORDS; ++j) | ||
6237 | any_set |= (accepts[j] &= (dfa->word_char[j] | ~dfa->sb_char[j])); | ||
6238 | else | ||
6239 | @@ -3660,7 +3645,7 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, | ||
6240 | continue; | ||
6241 | } | ||
6242 | #ifdef RE_ENABLE_I18N | ||
6243 | - if (dfa->mb_cur_max > 1) | ||
6244 | + if (dfa_mb_cur_max (dfa) > 1) | ||
6245 | for (j = 0; j < BITSET_WORDS; ++j) | ||
6246 | any_set |= (accepts[j] &= ~(dfa->word_char[j] & dfa->sb_char[j])); | ||
6247 | else | ||
6248 | @@ -3836,12 +3821,6 @@ check_node_accept_bytes (const re_dfa_t *dfa, int node_idx, | ||
6249 | if (node->type == COMPLEX_BRACKET) | ||
6250 | { | ||
6251 | const re_charset_t *cset = node->opr.mbcset; | ||
6252 | -# ifdef _LIBC | ||
6253 | - const unsigned char *pin | ||
6254 | - = ((const unsigned char *) re_string_get_buffer (input) + str_idx); | ||
6255 | - int j; | ||
6256 | - uint32_t nrules; | ||
6257 | -# endif /* _LIBC */ | ||
6258 | int match_len = 0; | ||
6259 | wchar_t wc = ((cset->nranges || cset->nchar_classes || cset->nmbchars) | ||
6260 | ? re_string_wchar_at (input, str_idx) : 0); | ||
6261 | @@ -3853,6 +3832,7 @@ check_node_accept_bytes (const re_dfa_t *dfa, int node_idx, | ||
6262 | match_len = char_len; | ||
6263 | goto check_node_accept_bytes_match; | ||
6264 | } | ||
6265 | +#if __OPTION_EGLIBC_LOCALE_CODE | ||
6266 | /* match with character_class? */ | ||
6267 | for (i = 0; i < cset->nchar_classes; ++i) | ||
6268 | { | ||
6269 | @@ -3863,14 +3843,22 @@ check_node_accept_bytes (const re_dfa_t *dfa, int node_idx, | ||
6270 | goto check_node_accept_bytes_match; | ||
6271 | } | ||
6272 | } | ||
6273 | +#endif | ||
6274 | + | ||
6275 | + /* When __OPTION_EGLIBC_LOCALE_CODE is disabled, only the C | ||
6276 | + locale is supported; it has no collation rules. */ | ||
6277 | +# if defined _LIBC && __OPTION_EGLIBC_LOCALE_CODE | ||
6278 | + const unsigned char *pin | ||
6279 | + = ((const unsigned char *) re_string_get_buffer (input) + str_idx); | ||
6280 | + int j; | ||
6281 | + uint32_t nrules; | ||
6282 | |||
6283 | -# ifdef _LIBC | ||
6284 | nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); | ||
6285 | if (nrules != 0) | ||
6286 | { | ||
6287 | unsigned int in_collseq = 0; | ||
6288 | const int32_t *table, *indirect; | ||
6289 | - const unsigned char *weights, *extra; | ||
6290 | + const unsigned char *weights, *extra = NULL; | ||
6291 | const char *collseqwc; | ||
6292 | |||
6293 | /* match with collating_symbol? */ | ||
6294 | @@ -3955,8 +3943,12 @@ check_node_accept_bytes (const re_dfa_t *dfa, int node_idx, | ||
6295 | } | ||
6296 | } | ||
6297 | else | ||
6298 | -# endif /* _LIBC */ | ||
6299 | +# endif /* _LIBC && __OPTION_EGLIBC_LOCALE_CODE */ | ||
6300 | { | ||
6301 | + /* In the _LIBC version, if OPTION_EGLIBC_LOCALE_CODE is | ||
6302 | + disabled, there can be no multibyte range endpoints, and | ||
6303 | + cset->nranges is always zero. */ | ||
6304 | +#if __OPTION_EGLIBC_LOCALE_CODE | ||
6305 | /* match with range expression? */ | ||
6306 | #if __GNUC__ >= 2 | ||
6307 | wchar_t cmp_buf[] = {L'\0', L'\0', wc, L'\0', L'\0', L'\0'}; | ||
6308 | @@ -3975,6 +3967,7 @@ check_node_accept_bytes (const re_dfa_t *dfa, int node_idx, | ||
6309 | goto check_node_accept_bytes_match; | ||
6310 | } | ||
6311 | } | ||
6312 | +#endif /* __OPTION_EGLIBC_LOCALE_CODE */ | ||
6313 | } | ||
6314 | check_node_accept_bytes_match: | ||
6315 | if (!cset->non_match) | ||
6316 | @@ -3990,7 +3983,7 @@ check_node_accept_bytes (const re_dfa_t *dfa, int node_idx, | ||
6317 | return 0; | ||
6318 | } | ||
6319 | |||
6320 | -# ifdef _LIBC | ||
6321 | +# if defined _LIBC && __OPTION_EGLIBC_LOCALE_CODE | ||
6322 | static unsigned int | ||
6323 | internal_function | ||
6324 | find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len) | ||
6325 | @@ -4048,7 +4041,7 @@ find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len) | ||
6326 | return UINT_MAX; | ||
6327 | } | ||
6328 | } | ||
6329 | -# endif /* _LIBC */ | ||
6330 | +# endif /* _LIBC && __OPTION_EGLIBC_LOCALE_CODE */ | ||
6331 | #endif /* RE_ENABLE_I18N */ | ||
6332 | |||
6333 | /* Check whether the node accepts the byte which is IDX-th | ||
6334 | @@ -4139,7 +4132,7 @@ extend_buffers (re_match_context_t *mctx, int min_len) | ||
6335 | if (pstr->icase) | ||
6336 | { | ||
6337 | #ifdef RE_ENABLE_I18N | ||
6338 | - if (pstr->mb_cur_max > 1) | ||
6339 | + if (string_mb_cur_max (pstr) > 1) | ||
6340 | { | ||
6341 | ret = build_wcs_upper_buffer (pstr); | ||
6342 | if (BE (ret != REG_NOERROR, 0)) | ||
6343 | @@ -4152,7 +4145,7 @@ extend_buffers (re_match_context_t *mctx, int min_len) | ||
6344 | else | ||
6345 | { | ||
6346 | #ifdef RE_ENABLE_I18N | ||
6347 | - if (pstr->mb_cur_max > 1) | ||
6348 | + if (string_mb_cur_max (pstr) > 1) | ||
6349 | build_wcs_buffer (pstr); | ||
6350 | else | ||
6351 | #endif /* RE_ENABLE_I18N */ | ||
6352 | diff --git a/posix/xregex.c b/posix/xregex.c | ||
6353 | new file mode 100644 | ||
6354 | index 0000000..d3f7ace | ||
6355 | --- /dev/null | ||
6356 | +++ b/posix/xregex.c | ||
6167 | @@ -0,0 +1,8215 @@ | 6357 | @@ -0,0 +1,8215 @@ |
6168 | +/* Extended regular expression matching and search library, | 6358 | +/* Extended regular expression matching and search library, |
6169 | + version 0.12. | 6359 | + version 0.12. |
@@ -14380,10 +14570,10 @@ Index: git/posix/xregex.c | |||
14380 | +# undef WCHAR | 14570 | +# undef WCHAR |
14381 | + | 14571 | + |
14382 | +# define DEFINED_ONCE | 14572 | +# define DEFINED_ONCE |
14383 | Index: git/pwd/Makefile | 14573 | diff --git a/pwd/Makefile b/pwd/Makefile |
14384 | =================================================================== | 14574 | index 7f6de03..916d546 100644 |
14385 | --- git.orig/pwd/Makefile | 14575 | --- a/pwd/Makefile |
14386 | +++ git/pwd/Makefile | 14576 | +++ b/pwd/Makefile |
14387 | @@ -18,6 +18,8 @@ | 14577 | @@ -18,6 +18,8 @@ |
14388 | # | 14578 | # |
14389 | # Sub-makefile for pwd portion of the library. | 14579 | # Sub-makefile for pwd portion of the library. |
@@ -14393,10 +14583,10 @@ Index: git/pwd/Makefile | |||
14393 | subdir := pwd | 14583 | subdir := pwd |
14394 | 14584 | ||
14395 | include ../Makeconfig | 14585 | include ../Makeconfig |
14396 | Index: git/resolv/Makefile | 14586 | diff --git a/resolv/Makefile b/resolv/Makefile |
14397 | =================================================================== | 14587 | index 1dcb75f..2e4b630 100644 |
14398 | --- git.orig/resolv/Makefile | 14588 | --- a/resolv/Makefile |
14399 | +++ git/resolv/Makefile | 14589 | +++ b/resolv/Makefile |
14400 | @@ -18,6 +18,8 @@ | 14590 | @@ -18,6 +18,8 @@ |
14401 | # | 14591 | # |
14402 | # Sub-makefile for resolv portion of the library. | 14592 | # Sub-makefile for resolv portion of the library. |
@@ -14406,7 +14596,7 @@ Index: git/resolv/Makefile | |||
14406 | subdir := resolv | 14596 | subdir := resolv |
14407 | 14597 | ||
14408 | include ../Makeconfig | 14598 | include ../Makeconfig |
14409 | @@ -27,20 +29,21 @@ headers := resolv.h \ | 14599 | @@ -27,21 +29,22 @@ headers := resolv.h \ |
14410 | arpa/nameser.h arpa/nameser_compat.h \ | 14600 | arpa/nameser.h arpa/nameser_compat.h \ |
14411 | sys/bitypes.h | 14601 | sys/bitypes.h |
14412 | 14602 | ||
@@ -14430,13 +14620,14 @@ Index: git/resolv/Makefile | |||
14430 | -routines += gai_sigqueue | 14620 | -routines += gai_sigqueue |
14431 | +extra-libs-$(OPTION_EGLIBC_INET_ANL) += libanl | 14621 | +extra-libs-$(OPTION_EGLIBC_INET_ANL) += libanl |
14432 | +routines-$(OPTION_EGLIBC_INET) += gai_sigqueue | 14622 | +routines-$(OPTION_EGLIBC_INET) += gai_sigqueue |
14623 | tests += tst-res_hconf_reorder | ||
14433 | endif | 14624 | endif |
14434 | -extra-libs-others = $(extra-libs) | 14625 | -extra-libs-others = $(extra-libs) |
14435 | +extra-libs-others-y += $(extra-libs-y) | 14626 | +extra-libs-others-y += $(extra-libs-y) |
14436 | libresolv-routines := gethnamaddr res_comp res_debug \ | 14627 | libresolv-routines := gethnamaddr res_comp res_debug \ |
14437 | res_data res_mkquery res_query res_send \ | 14628 | res_data res_mkquery res_query res_send \ |
14438 | inet_net_ntop inet_net_pton inet_neta base64 \ | 14629 | inet_net_ntop inet_net_pton inet_neta base64 \ |
14439 | @@ -60,7 +63,7 @@ routines += $(libnss_dns- | 14630 | @@ -61,7 +64,7 @@ routines += $(libnss_dns-routines) $(libresolv-routines) |
14440 | static-only-routines += $(libnss_dns-routines) $(libresolv-routines) | 14631 | static-only-routines += $(libnss_dns-routines) $(libresolv-routines) |
14441 | endif | 14632 | endif |
14442 | 14633 | ||
@@ -14445,72 +14636,10 @@ Index: git/resolv/Makefile | |||
14445 | tests: $(objpfx)ga_test | 14636 | tests: $(objpfx)ga_test |
14446 | endif | 14637 | endif |
14447 | 14638 | ||
14448 | Index: git/stdio-common/fxprintf.c | 14639 | diff --git a/stdio-common/Makefile b/stdio-common/Makefile |
14449 | =================================================================== | 14640 | index d0bf0e1..8655801 100644 |
14450 | --- git.orig/stdio-common/fxprintf.c | 14641 | --- a/stdio-common/Makefile |
14451 | +++ git/stdio-common/fxprintf.c | 14642 | +++ b/stdio-common/Makefile |
14452 | @@ -23,6 +23,7 @@ | ||
14453 | #include <wchar.h> | ||
14454 | #include <string.h> | ||
14455 | #include <libioP.h> | ||
14456 | +#include <gnu/option-groups.h> | ||
14457 | |||
14458 | |||
14459 | int | ||
14460 | @@ -37,6 +38,7 @@ __fxprintf (FILE *fp, const char *fmt, . | ||
14461 | int res; | ||
14462 | if (_IO_fwide (fp, 0) > 0) | ||
14463 | { | ||
14464 | +#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO | ||
14465 | size_t len = strlen (fmt) + 1; | ||
14466 | wchar_t wfmt[len]; | ||
14467 | for (size_t i = 0; i < len; ++i) | ||
14468 | @@ -45,6 +47,9 @@ __fxprintf (FILE *fp, const char *fmt, . | ||
14469 | wfmt[i] = fmt[i]; | ||
14470 | } | ||
14471 | res = __vfwprintf (fp, wfmt, ap); | ||
14472 | +#else | ||
14473 | + abort(); | ||
14474 | +#endif | ||
14475 | } | ||
14476 | else | ||
14477 | res = _IO_vfprintf (fp, fmt, ap); | ||
14478 | Index: git/stdio-common/_i18n_number.h | ||
14479 | =================================================================== | ||
14480 | --- git.orig/stdio-common/_i18n_number.h | ||
14481 | +++ git/stdio-common/_i18n_number.h | ||
14482 | @@ -19,10 +19,13 @@ | ||
14483 | #include <stdbool.h> | ||
14484 | #include <wchar.h> | ||
14485 | #include <wctype.h> | ||
14486 | +#include <gnu/option-groups.h> | ||
14487 | |||
14488 | #include "../locale/outdigits.h" | ||
14489 | #include "../locale/outdigitswc.h" | ||
14490 | |||
14491 | +#if __OPTION_EGLIBC_LOCALE_CODE | ||
14492 | + | ||
14493 | static CHAR_T * | ||
14494 | _i18n_number_rewrite (CHAR_T *w, CHAR_T *rear_ptr, CHAR_T *end) | ||
14495 | { | ||
14496 | @@ -115,3 +118,13 @@ _i18n_number_rewrite (CHAR_T *w, CHAR_T | ||
14497 | |||
14498 | return w; | ||
14499 | } | ||
14500 | + | ||
14501 | +#else | ||
14502 | + | ||
14503 | +static CHAR_T * | ||
14504 | +_i18n_number_rewrite (CHAR_T *w, CHAR_T *rear_ptr, CHAR_T *end) | ||
14505 | +{ | ||
14506 | + return w; | ||
14507 | +} | ||
14508 | + | ||
14509 | +#endif | ||
14510 | Index: git/stdio-common/Makefile | ||
14511 | =================================================================== | ||
14512 | --- git.orig/stdio-common/Makefile | ||
14513 | +++ git/stdio-common/Makefile | ||
14514 | @@ -18,6 +18,8 @@ | 14643 | @@ -18,6 +18,8 @@ |
14515 | # | 14644 | # |
14516 | # Specific makefile for stdio-common. | 14645 | # Specific makefile for stdio-common. |
@@ -14565,7 +14694,7 @@ Index: git/stdio-common/Makefile | |||
14565 | + bug19 tst-popen2 scanf14 scanf15 bug21 bug22 \ | 14694 | + bug19 tst-popen2 scanf14 scanf15 bug21 bug22 \ |
14566 | + scanf16 scanf17 tst-setvbuf1 bug23 bug24 \ | 14695 | + scanf16 scanf17 tst-setvbuf1 bug23 bug24 \ |
14567 | + bug-vfprintf-nargs tst-sprintf3 \ | 14696 | + bug-vfprintf-nargs tst-sprintf3 \ |
14568 | bug25 tst-printf-round bug23-2 bug23-3 bug23-4 bug26 | 14697 | bug25 tst-printf-round bug23-2 bug23-3 bug23-4 bug26 tst-fmemopen3 |
14569 | +tests-$(OPTION_EGLIBC_LOCALE_CODE) \ | 14698 | +tests-$(OPTION_EGLIBC_LOCALE_CODE) \ |
14570 | + += tst-sscanf tst-swprintf test-vfprintf bug14 scanf13 tst-grouping | 14699 | + += tst-sscanf tst-swprintf test-vfprintf bug14 scanf13 tst-grouping |
14571 | +tests-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) \ | 14700 | +tests-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) \ |
@@ -14575,10 +14704,72 @@ Index: git/stdio-common/Makefile | |||
14575 | 14704 | ||
14576 | test-srcs = tst-unbputc tst-printf | 14705 | test-srcs = tst-unbputc tst-printf |
14577 | 14706 | ||
14578 | Index: git/stdio-common/printf_fp.c | 14707 | diff --git a/stdio-common/_i18n_number.h b/stdio-common/_i18n_number.h |
14579 | =================================================================== | 14708 | index 3c73044..ac62b3a 100644 |
14580 | --- git.orig/stdio-common/printf_fp.c | 14709 | --- a/stdio-common/_i18n_number.h |
14581 | +++ git/stdio-common/printf_fp.c | 14710 | +++ b/stdio-common/_i18n_number.h |
14711 | @@ -19,10 +19,13 @@ | ||
14712 | #include <stdbool.h> | ||
14713 | #include <wchar.h> | ||
14714 | #include <wctype.h> | ||
14715 | +#include <gnu/option-groups.h> | ||
14716 | |||
14717 | #include "../locale/outdigits.h" | ||
14718 | #include "../locale/outdigitswc.h" | ||
14719 | |||
14720 | +#if __OPTION_EGLIBC_LOCALE_CODE | ||
14721 | + | ||
14722 | static CHAR_T * | ||
14723 | _i18n_number_rewrite (CHAR_T *w, CHAR_T *rear_ptr, CHAR_T *end) | ||
14724 | { | ||
14725 | @@ -115,3 +118,13 @@ _i18n_number_rewrite (CHAR_T *w, CHAR_T *rear_ptr, CHAR_T *end) | ||
14726 | |||
14727 | return w; | ||
14728 | } | ||
14729 | + | ||
14730 | +#else | ||
14731 | + | ||
14732 | +static CHAR_T * | ||
14733 | +_i18n_number_rewrite (CHAR_T *w, CHAR_T *rear_ptr, CHAR_T *end) | ||
14734 | +{ | ||
14735 | + return w; | ||
14736 | +} | ||
14737 | + | ||
14738 | +#endif | ||
14739 | diff --git a/stdio-common/fxprintf.c b/stdio-common/fxprintf.c | ||
14740 | index 7b2eb94..8476076 100644 | ||
14741 | --- a/stdio-common/fxprintf.c | ||
14742 | +++ b/stdio-common/fxprintf.c | ||
14743 | @@ -23,6 +23,7 @@ | ||
14744 | #include <wchar.h> | ||
14745 | #include <string.h> | ||
14746 | #include <libioP.h> | ||
14747 | +#include <gnu/option-groups.h> | ||
14748 | |||
14749 | |||
14750 | int | ||
14751 | @@ -37,6 +38,7 @@ __fxprintf (FILE *fp, const char *fmt, ...) | ||
14752 | int res; | ||
14753 | if (_IO_fwide (fp, 0) > 0) | ||
14754 | { | ||
14755 | +#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO | ||
14756 | size_t len = strlen (fmt) + 1; | ||
14757 | wchar_t wfmt[len]; | ||
14758 | for (size_t i = 0; i < len; ++i) | ||
14759 | @@ -45,6 +47,9 @@ __fxprintf (FILE *fp, const char *fmt, ...) | ||
14760 | wfmt[i] = fmt[i]; | ||
14761 | } | ||
14762 | res = __vfwprintf (fp, wfmt, ap); | ||
14763 | +#else | ||
14764 | + abort(); | ||
14765 | +#endif | ||
14766 | } | ||
14767 | else | ||
14768 | res = _IO_vfprintf (fp, fmt, ap); | ||
14769 | diff --git a/stdio-common/printf_fp.c b/stdio-common/printf_fp.c | ||
14770 | index 3023b20..bd0df66 100644 | ||
14771 | --- a/stdio-common/printf_fp.c | ||
14772 | +++ b/stdio-common/printf_fp.c | ||
14582 | @@ -39,6 +39,7 @@ | 14773 | @@ -39,6 +39,7 @@ |
14583 | #include <unistd.h> | 14774 | #include <unistd.h> |
14584 | #include <stdlib.h> | 14775 | #include <stdlib.h> |
@@ -14587,7 +14778,7 @@ Index: git/stdio-common/printf_fp.c | |||
14587 | #include <stdbool.h> | 14778 | #include <stdbool.h> |
14588 | #include <rounding-mode.h> | 14779 | #include <rounding-mode.h> |
14589 | 14780 | ||
14590 | @@ -142,6 +143,10 @@ extern mp_size_t __mpn_extract_long_doub | 14781 | @@ -142,6 +143,10 @@ extern mp_size_t __mpn_extract_long_double (mp_ptr res_ptr, mp_size_t size, |
14591 | extern unsigned int __guess_grouping (unsigned int intdig_max, | 14782 | extern unsigned int __guess_grouping (unsigned int intdig_max, |
14592 | const char *grouping); | 14783 | const char *grouping); |
14593 | 14784 | ||
@@ -14645,10 +14836,10 @@ Index: git/stdio-common/printf_fp.c | |||
14645 | 14836 | ||
14646 | /* Fetch the argument value. */ | 14837 | /* Fetch the argument value. */ |
14647 | #ifndef __NO_LONG_DOUBLE_MATH | 14838 | #ifndef __NO_LONG_DOUBLE_MATH |
14648 | Index: git/stdio-common/printf_fphex.c | 14839 | diff --git a/stdio-common/printf_fphex.c b/stdio-common/printf_fphex.c |
14649 | =================================================================== | 14840 | index 6c3b5e9..f660ce0 100644 |
14650 | --- git.orig/stdio-common/printf_fphex.c | 14841 | --- a/stdio-common/printf_fphex.c |
14651 | +++ git/stdio-common/printf_fphex.c | 14842 | +++ b/stdio-common/printf_fphex.c |
14652 | @@ -28,6 +28,7 @@ | 14843 | @@ -28,6 +28,7 @@ |
14653 | #include <_itoa.h> | 14844 | #include <_itoa.h> |
14654 | #include <_itowa.h> | 14845 | #include <_itowa.h> |
@@ -14687,10 +14878,10 @@ Index: git/stdio-common/printf_fphex.c | |||
14687 | 14878 | ||
14688 | 14879 | ||
14689 | /* Fetch the argument value. */ | 14880 | /* Fetch the argument value. */ |
14690 | Index: git/stdio-common/printf_size.c | 14881 | diff --git a/stdio-common/printf_size.c b/stdio-common/printf_size.c |
14691 | =================================================================== | 14882 | index 7dcd58e..6fb7491 100644 |
14692 | --- git.orig/stdio-common/printf_size.c | 14883 | --- a/stdio-common/printf_size.c |
14693 | +++ git/stdio-common/printf_size.c | 14884 | +++ b/stdio-common/printf_size.c |
14694 | @@ -23,6 +23,7 @@ | 14885 | @@ -23,6 +23,7 @@ |
14695 | #include <math.h> | 14886 | #include <math.h> |
14696 | #include <printf.h> | 14887 | #include <printf.h> |
@@ -14699,7 +14890,7 @@ Index: git/stdio-common/printf_size.c | |||
14699 | 14890 | ||
14700 | 14891 | ||
14701 | /* This defines make it possible to use the same code for GNU C library and | 14892 | /* This defines make it possible to use the same code for GNU C library and |
14702 | @@ -116,7 +117,14 @@ __printf_size (FILE *fp, const struct pr | 14893 | @@ -116,7 +117,14 @@ __printf_size (FILE *fp, const struct printf_info *info, |
14703 | 14894 | ||
14704 | struct printf_info fp_info; | 14895 | struct printf_info fp_info; |
14705 | int done = 0; | 14896 | int done = 0; |
@@ -14714,10 +14905,10 @@ Index: git/stdio-common/printf_size.c | |||
14714 | int res; | 14905 | int res; |
14715 | 14906 | ||
14716 | /* Fetch the argument value. */ | 14907 | /* Fetch the argument value. */ |
14717 | Index: git/stdio-common/scanf14.c | 14908 | diff --git a/stdio-common/scanf14.c b/stdio-common/scanf14.c |
14718 | =================================================================== | 14909 | index cffccb0..6cc260a 100644 |
14719 | --- git.orig/stdio-common/scanf14.c | 14910 | --- a/stdio-common/scanf14.c |
14720 | +++ git/stdio-common/scanf14.c | 14911 | +++ b/stdio-common/scanf14.c |
14721 | @@ -3,6 +3,7 @@ | 14912 | @@ -3,6 +3,7 @@ |
14722 | #include <string.h> | 14913 | #include <string.h> |
14723 | #include <wchar.h> | 14914 | #include <wchar.h> |
@@ -14742,54 +14933,10 @@ Index: git/stdio-common/scanf14.c | |||
14742 | if (sscanf ("4.25[0-9.] x", "%a[0-9.]%8c", &sp, c) != 2) | 14933 | if (sscanf ("4.25[0-9.] x", "%a[0-9.]%8c", &sp, c) != 2) |
14743 | FAIL (); | 14934 | FAIL (); |
14744 | else | 14935 | else |
14745 | Index: git/stdio-common/tstdiomisc.c | 14936 | diff --git a/stdio-common/tst-popen.c b/stdio-common/tst-popen.c |
14746 | =================================================================== | 14937 | index 5def27f..7c9b91e 100644 |
14747 | --- git.orig/stdio-common/tstdiomisc.c | 14938 | --- a/stdio-common/tst-popen.c |
14748 | +++ git/stdio-common/tstdiomisc.c | 14939 | +++ b/stdio-common/tst-popen.c |
14749 | @@ -4,6 +4,7 @@ | ||
14750 | #include <string.h> | ||
14751 | #include <wchar.h> | ||
14752 | #include <libc-internal.h> | ||
14753 | +#include <gnu/option-groups.h> | ||
14754 | |||
14755 | static int | ||
14756 | t1 (void) | ||
14757 | @@ -134,6 +135,7 @@ F (void) | ||
14758 | printf ("expected \"-inf -INF -inf -INF -inf -INF -inf -INF\", got \"%s\"\n", | ||
14759 | buf); | ||
14760 | |||
14761 | +#if __OPTION_POSIX_C_LANG_WIDE_CHAR | ||
14762 | swprintf (wbuf, sizeof wbuf / sizeof (wbuf[0]), L"%a %A %e %E %f %F %g %G", | ||
14763 | qnanval, qnanval, qnanval, qnanval, | ||
14764 | qnanval, qnanval, qnanval, qnanval); | ||
14765 | @@ -171,6 +173,7 @@ F (void) | ||
14766 | result |= wcscmp (wbuf, L"-inf -INF -inf -INF -inf -INF -inf -INF") != 0; | ||
14767 | printf ("expected L\"-inf -INF -inf -INF -inf -INF -inf -INF\", got L\"%S\"\n", | ||
14768 | wbuf); | ||
14769 | +#endif /* __OPTION_POSIX_C_LANG_WIDE_CHAR */ | ||
14770 | |||
14771 | lqnanval = NAN; | ||
14772 | |||
14773 | @@ -215,6 +218,7 @@ F (void) | ||
14774 | printf ("expected \"-inf -INF -inf -INF -inf -INF -inf -INF\", got \"%s\"\n", | ||
14775 | buf); | ||
14776 | |||
14777 | +#if __OPTION_POSIX_C_LANG_WIDE_CHAR | ||
14778 | swprintf (wbuf, sizeof wbuf / sizeof (wbuf[0]), | ||
14779 | L"%La %LA %Le %LE %Lf %LF %Lg %LG", | ||
14780 | lqnanval, lqnanval, lqnanval, lqnanval, | ||
14781 | @@ -259,6 +263,7 @@ F (void) | ||
14782 | result |= wcscmp (wbuf, L"-inf -INF -inf -INF -inf -INF -inf -INF") != 0; | ||
14783 | printf ("expected L\"-inf -INF -inf -INF -inf -INF -inf -INF\", got L\"%S\"\n", | ||
14784 | wbuf); | ||
14785 | +#endif /* __OPTION_POSIX_C_LANG_WIDE_CHAR */ | ||
14786 | |||
14787 | return result; | ||
14788 | } | ||
14789 | Index: git/stdio-common/tst-popen.c | ||
14790 | =================================================================== | ||
14791 | --- git.orig/stdio-common/tst-popen.c | ||
14792 | +++ git/stdio-common/tst-popen.c | ||
14793 | @@ -19,6 +19,7 @@ | 14940 | @@ -19,6 +19,7 @@ |
14794 | #include <stdio.h> | 14941 | #include <stdio.h> |
14795 | #include <string.h> | 14942 | #include <string.h> |
@@ -14813,10 +14960,10 @@ Index: git/stdio-common/tst-popen.c | |||
14813 | 14960 | ||
14814 | if (getline (&line, &len, f) != 5) | 14961 | if (getline (&line, &len, f) != 5) |
14815 | { | 14962 | { |
14816 | Index: git/stdio-common/tst-sprintf.c | 14963 | diff --git a/stdio-common/tst-sprintf.c b/stdio-common/tst-sprintf.c |
14817 | =================================================================== | 14964 | index d5284b9..f1e3d21 100644 |
14818 | --- git.orig/stdio-common/tst-sprintf.c | 14965 | --- a/stdio-common/tst-sprintf.c |
14819 | +++ git/stdio-common/tst-sprintf.c | 14966 | +++ b/stdio-common/tst-sprintf.c |
14820 | @@ -3,7 +3,7 @@ | 14967 | @@ -3,7 +3,7 @@ |
14821 | #include <locale.h> | 14968 | #include <locale.h> |
14822 | #include <string.h> | 14969 | #include <string.h> |
@@ -14841,10 +14988,54 @@ Index: git/stdio-common/tst-sprintf.c | |||
14841 | 14988 | ||
14842 | #define SIZE (1024*70000) | 14989 | #define SIZE (1024*70000) |
14843 | #define STR(x) #x | 14990 | #define STR(x) #x |
14844 | Index: git/stdio-common/vfprintf.c | 14991 | diff --git a/stdio-common/tstdiomisc.c b/stdio-common/tstdiomisc.c |
14845 | =================================================================== | 14992 | index 5548a71..31ed024 100644 |
14846 | --- git.orig/stdio-common/vfprintf.c | 14993 | --- a/stdio-common/tstdiomisc.c |
14847 | +++ git/stdio-common/vfprintf.c | 14994 | +++ b/stdio-common/tstdiomisc.c |
14995 | @@ -4,6 +4,7 @@ | ||
14996 | #include <string.h> | ||
14997 | #include <wchar.h> | ||
14998 | #include <libc-internal.h> | ||
14999 | +#include <gnu/option-groups.h> | ||
15000 | |||
15001 | static int | ||
15002 | t1 (void) | ||
15003 | @@ -134,6 +135,7 @@ F (void) | ||
15004 | printf ("expected \"-inf -INF -inf -INF -inf -INF -inf -INF\", got \"%s\"\n", | ||
15005 | buf); | ||
15006 | |||
15007 | +#if __OPTION_POSIX_C_LANG_WIDE_CHAR | ||
15008 | swprintf (wbuf, sizeof wbuf / sizeof (wbuf[0]), L"%a %A %e %E %f %F %g %G", | ||
15009 | qnanval, qnanval, qnanval, qnanval, | ||
15010 | qnanval, qnanval, qnanval, qnanval); | ||
15011 | @@ -171,6 +173,7 @@ F (void) | ||
15012 | result |= wcscmp (wbuf, L"-inf -INF -inf -INF -inf -INF -inf -INF") != 0; | ||
15013 | printf ("expected L\"-inf -INF -inf -INF -inf -INF -inf -INF\", got L\"%S\"\n", | ||
15014 | wbuf); | ||
15015 | +#endif /* __OPTION_POSIX_C_LANG_WIDE_CHAR */ | ||
15016 | |||
15017 | lqnanval = NAN; | ||
15018 | |||
15019 | @@ -215,6 +218,7 @@ F (void) | ||
15020 | printf ("expected \"-inf -INF -inf -INF -inf -INF -inf -INF\", got \"%s\"\n", | ||
15021 | buf); | ||
15022 | |||
15023 | +#if __OPTION_POSIX_C_LANG_WIDE_CHAR | ||
15024 | swprintf (wbuf, sizeof wbuf / sizeof (wbuf[0]), | ||
15025 | L"%La %LA %Le %LE %Lf %LF %Lg %LG", | ||
15026 | lqnanval, lqnanval, lqnanval, lqnanval, | ||
15027 | @@ -259,6 +263,7 @@ F (void) | ||
15028 | result |= wcscmp (wbuf, L"-inf -INF -inf -INF -inf -INF -inf -INF") != 0; | ||
15029 | printf ("expected L\"-inf -INF -inf -INF -inf -INF -inf -INF\", got L\"%S\"\n", | ||
15030 | wbuf); | ||
15031 | +#endif /* __OPTION_POSIX_C_LANG_WIDE_CHAR */ | ||
15032 | |||
15033 | return result; | ||
15034 | } | ||
15035 | diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c | ||
15036 | index 0592e70..f21d973 100644 | ||
15037 | --- a/stdio-common/vfprintf.c | ||
15038 | +++ b/stdio-common/vfprintf.c | ||
14848 | @@ -29,6 +29,7 @@ | 15039 | @@ -29,6 +29,7 @@ |
14849 | #include <_itoa.h> | 15040 | #include <_itoa.h> |
14850 | #include <locale/localeinfo.h> | 15041 | #include <locale/localeinfo.h> |
@@ -14853,7 +15044,7 @@ Index: git/stdio-common/vfprintf.c | |||
14853 | 15044 | ||
14854 | /* This code is shared between the standard stdio implementation found | 15045 | /* This code is shared between the standard stdio implementation found |
14855 | in GNU C library and the libio implementation originally found in | 15046 | in GNU C library and the libio implementation originally found in |
14856 | @@ -138,6 +139,18 @@ | 15047 | @@ -140,6 +141,18 @@ typedef wchar_t THOUSANDS_SEP_T; |
14857 | # define EOF WEOF | 15048 | # define EOF WEOF |
14858 | #endif | 15049 | #endif |
14859 | 15050 | ||
@@ -14872,7 +15063,7 @@ Index: git/stdio-common/vfprintf.c | |||
14872 | #include "_i18n_number.h" | 15063 | #include "_i18n_number.h" |
14873 | 15064 | ||
14874 | /* Include the shared code for parsing the format string. */ | 15065 | /* Include the shared code for parsing the format string. */ |
14875 | @@ -1129,8 +1142,11 @@ vfprintf (FILE *s, const CHAR_T *format, | 15066 | @@ -1065,8 +1078,11 @@ static const uint8_t jump_table[] = |
14876 | # define process_string_arg(fspec) \ | 15067 | # define process_string_arg(fspec) \ |
14877 | LABEL (form_character): \ | 15068 | LABEL (form_character): \ |
14878 | /* Character. */ \ | 15069 | /* Character. */ \ |
@@ -14886,7 +15077,7 @@ Index: git/stdio-common/vfprintf.c | |||
14886 | --width; /* Account for the character itself. */ \ | 15077 | --width; /* Account for the character itself. */ \ |
14887 | if (!left) \ | 15078 | if (!left) \ |
14888 | PAD (' '); \ | 15079 | PAD (' '); \ |
14889 | @@ -1143,6 +1159,7 @@ vfprintf (FILE *s, const CHAR_T *format, | 15080 | @@ -1079,6 +1095,7 @@ static const uint8_t jump_table[] = |
14890 | break; \ | 15081 | break; \ |
14891 | \ | 15082 | \ |
14892 | LABEL (form_wcharacter): \ | 15083 | LABEL (form_wcharacter): \ |
@@ -14894,7 +15085,7 @@ Index: git/stdio-common/vfprintf.c | |||
14894 | { \ | 15085 | { \ |
14895 | /* Wide character. */ \ | 15086 | /* Wide character. */ \ |
14896 | char buf[MB_CUR_MAX]; \ | 15087 | char buf[MB_CUR_MAX]; \ |
14897 | @@ -1209,6 +1226,7 @@ vfprintf (FILE *s, const CHAR_T *format, | 15088 | @@ -1145,6 +1162,7 @@ static const uint8_t jump_table[] = |
14898 | } \ | 15089 | } \ |
14899 | else \ | 15090 | else \ |
14900 | { \ | 15091 | { \ |
@@ -14902,7 +15093,7 @@ Index: git/stdio-common/vfprintf.c | |||
14902 | const wchar_t *s2 = (const wchar_t *) string; \ | 15093 | const wchar_t *s2 = (const wchar_t *) string; \ |
14903 | mbstate_t mbstate; \ | 15094 | mbstate_t mbstate; \ |
14904 | \ | 15095 | \ |
14905 | @@ -1409,7 +1427,9 @@ vfprintf (FILE *s, const CHAR_T *format, | 15096 | @@ -1399,7 +1417,9 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap) |
14906 | LABEL (flag_quote): | 15097 | LABEL (flag_quote): |
14907 | group = 1; | 15098 | group = 1; |
14908 | 15099 | ||
@@ -14913,21 +15104,22 @@ Index: git/stdio-common/vfprintf.c | |||
14913 | { | 15104 | { |
14914 | #ifdef COMPILE_WPRINTF | 15105 | #ifdef COMPILE_WPRINTF |
14915 | thousands_sep = _NL_CURRENT_WORD (LC_NUMERIC, | 15106 | thousands_sep = _NL_CURRENT_WORD (LC_NUMERIC, |
14916 | @@ -1708,7 +1728,9 @@ do_positional: | 15107 | @@ -1728,8 +1748,9 @@ printf_positional (_IO_FILE *s, const CHAR_T *format, int readonly_format, |
14917 | free (workstart); | 15108 | size_t cnt; |
14918 | workstart = NULL; | 15109 | |
14919 | 15110 | CHAR_T *workstart = NULL; | |
14920 | - if (grouping == (const char *) -1) | 15111 | - |
14921 | + if (! LOCALE_SUPPORT) | 15112 | - if (grouping == (const char *) -1) |
14922 | + grouping = NULL; | 15113 | + if (! LOCALE_SUPPORT) |
14923 | + else if (grouping == (const char *) -1) | 15114 | + grouping = NULL; |
14924 | { | 15115 | + else if (grouping == (const char *) -1) |
15116 | { | ||
14925 | #ifdef COMPILE_WPRINTF | 15117 | #ifdef COMPILE_WPRINTF |
14926 | thousands_sep = _NL_CURRENT_WORD (LC_NUMERIC, | 15118 | thousands_sep = _NL_CURRENT_WORD (LC_NUMERIC, |
14927 | Index: git/stdio-common/vfscanf.c | 15119 | diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c |
14928 | =================================================================== | 15120 | index 0e204e7..66cc0af 100644 |
14929 | --- git.orig/stdio-common/vfscanf.c | 15121 | --- a/stdio-common/vfscanf.c |
14930 | +++ git/stdio-common/vfscanf.c | 15122 | +++ b/stdio-common/vfscanf.c |
14931 | @@ -29,6 +29,7 @@ | 15123 | @@ -29,6 +29,7 @@ |
14932 | #include <wctype.h> | 15124 | #include <wctype.h> |
14933 | #include <bits/libc-lock.h> | 15125 | #include <bits/libc-lock.h> |
@@ -14949,7 +15141,7 @@ Index: git/stdio-common/vfscanf.c | |||
14949 | #define encode_error() do { \ | 15141 | #define encode_error() do { \ |
14950 | errval = 4; \ | 15142 | errval = 4; \ |
14951 | __set_errno (EILSEQ); \ | 15143 | __set_errno (EILSEQ); \ |
14952 | @@ -316,24 +323,35 @@ _IO_vfscanf_internal (_IO_FILE *s, const | 15144 | @@ -316,24 +323,35 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr, |
14953 | ARGCHECK (s, format); | 15145 | ARGCHECK (s, format); |
14954 | 15146 | ||
14955 | { | 15147 | { |
@@ -14992,7 +15184,7 @@ Index: git/stdio-common/vfscanf.c | |||
14992 | } | 15184 | } |
14993 | 15185 | ||
14994 | /* Lock the stream. */ | 15186 | /* Lock the stream. */ |
14995 | @@ -385,6 +403,8 @@ _IO_vfscanf_internal (_IO_FILE *s, const | 15187 | @@ -385,6 +403,8 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr, |
14996 | #ifndef COMPILE_WSCANF | 15188 | #ifndef COMPILE_WSCANF |
14997 | if (!isascii ((unsigned char) *f)) | 15189 | if (!isascii ((unsigned char) *f)) |
14998 | { | 15190 | { |
@@ -15001,7 +15193,7 @@ Index: git/stdio-common/vfscanf.c | |||
15001 | /* Non-ASCII, may be a multibyte. */ | 15193 | /* Non-ASCII, may be a multibyte. */ |
15002 | int len = __mbrlen (f, strlen (f), &state); | 15194 | int len = __mbrlen (f, strlen (f), &state); |
15003 | if (len > 0) | 15195 | if (len > 0) |
15004 | @@ -830,6 +850,8 @@ _IO_vfscanf_internal (_IO_FILE *s, const | 15196 | @@ -830,6 +850,8 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr, |
15005 | } | 15197 | } |
15006 | /* FALLTHROUGH */ | 15198 | /* FALLTHROUGH */ |
15007 | case L_('C'): | 15199 | case L_('C'): |
@@ -15010,7 +15202,7 @@ Index: git/stdio-common/vfscanf.c | |||
15010 | if (width == -1) | 15202 | if (width == -1) |
15011 | width = 1; | 15203 | width = 1; |
15012 | 15204 | ||
15013 | @@ -1172,6 +1194,8 @@ _IO_vfscanf_internal (_IO_FILE *s, const | 15205 | @@ -1172,6 +1194,8 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr, |
15014 | /* FALLTHROUGH */ | 15206 | /* FALLTHROUGH */ |
15015 | 15207 | ||
15016 | case L_('S'): | 15208 | case L_('S'): |
@@ -15019,7 +15211,7 @@ Index: git/stdio-common/vfscanf.c | |||
15019 | { | 15211 | { |
15020 | #ifndef COMPILE_WSCANF | 15212 | #ifndef COMPILE_WSCANF |
15021 | mbstate_t cstate; | 15213 | mbstate_t cstate; |
15022 | @@ -1419,10 +1443,17 @@ _IO_vfscanf_internal (_IO_FILE *s, const | 15214 | @@ -1419,10 +1443,17 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr, |
15023 | const char *mbdigits[10]; | 15215 | const char *mbdigits[10]; |
15024 | const char *mbdigits_extended[10]; | 15216 | const char *mbdigits_extended[10]; |
15025 | #endif | 15217 | #endif |
@@ -15037,7 +15229,7 @@ Index: git/stdio-common/vfscanf.c | |||
15037 | int n; | 15229 | int n; |
15038 | 15230 | ||
15039 | from_level = 0; | 15231 | from_level = 0; |
15040 | @@ -2088,6 +2119,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const | 15232 | @@ -2088,6 +2119,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr, |
15041 | --width; | 15233 | --width; |
15042 | } | 15234 | } |
15043 | 15235 | ||
@@ -15045,7 +15237,7 @@ Index: git/stdio-common/vfscanf.c | |||
15045 | wctrans_t map; | 15237 | wctrans_t map; |
15046 | if (__builtin_expect ((flags & I18N) != 0, 0) | 15238 | if (__builtin_expect ((flags & I18N) != 0, 0) |
15047 | /* Hexadecimal floats make no sense, fixing localized | 15239 | /* Hexadecimal floats make no sense, fixing localized |
15048 | @@ -2304,6 +2336,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const | 15240 | @@ -2304,6 +2336,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr, |
15049 | ; | 15241 | ; |
15050 | #endif | 15242 | #endif |
15051 | } | 15243 | } |
@@ -15053,7 +15245,7 @@ Index: git/stdio-common/vfscanf.c | |||
15053 | 15245 | ||
15054 | /* Have we read any character? If we try to read a number | 15246 | /* Have we read any character? If we try to read a number |
15055 | in hexadecimal notation and we have read only the `0x' | 15247 | in hexadecimal notation and we have read only the `0x' |
15056 | @@ -2343,7 +2376,10 @@ _IO_vfscanf_internal (_IO_FILE *s, const | 15248 | @@ -2343,7 +2376,10 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr, |
15057 | 15249 | ||
15058 | case L_('['): /* Character class. */ | 15250 | case L_('['): /* Character class. */ |
15059 | if (flags & LONG) | 15251 | if (flags & LONG) |
@@ -15065,7 +15257,7 @@ Index: git/stdio-common/vfscanf.c | |||
15065 | else | 15257 | else |
15066 | STRING_ARG (str, char, 100); | 15258 | STRING_ARG (str, char, 100); |
15067 | 15259 | ||
15068 | @@ -2417,6 +2453,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const | 15260 | @@ -2417,6 +2453,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr, |
15069 | if (flags & LONG) | 15261 | if (flags & LONG) |
15070 | { | 15262 | { |
15071 | size_t now = read_in; | 15263 | size_t now = read_in; |
@@ -15073,10 +15265,10 @@ Index: git/stdio-common/vfscanf.c | |||
15073 | #ifdef COMPILE_WSCANF | 15265 | #ifdef COMPILE_WSCANF |
15074 | if (__glibc_unlikely (inchar () == WEOF)) | 15266 | if (__glibc_unlikely (inchar () == WEOF)) |
15075 | input_error (); | 15267 | input_error (); |
15076 | Index: git/stdlib/Makefile | 15268 | diff --git a/stdlib/Makefile b/stdlib/Makefile |
15077 | =================================================================== | 15269 | index 402466a..7e7e304 100644 |
15078 | --- git.orig/stdlib/Makefile | 15270 | --- a/stdlib/Makefile |
15079 | +++ git/stdlib/Makefile | 15271 | +++ b/stdlib/Makefile |
15080 | @@ -18,6 +18,8 @@ | 15272 | @@ -18,6 +18,8 @@ |
15081 | # | 15273 | # |
15082 | # Makefile for stdlib routines | 15274 | # Makefile for stdlib routines |
@@ -15086,7 +15278,7 @@ Index: git/stdlib/Makefile | |||
15086 | subdir := stdlib | 15278 | subdir := stdlib |
15087 | 15279 | ||
15088 | include ../Makeconfig | 15280 | include ../Makeconfig |
15089 | @@ -30,7 +32,7 @@ headers := stdlib.h bits/stdlib.h bits/s | 15281 | @@ -30,7 +32,7 @@ headers := stdlib.h bits/stdlib.h bits/stdlib-ldbl.h bits/stdlib-float.h \ |
15090 | alloca.h fmtmsg.h \ | 15282 | alloca.h fmtmsg.h \ |
15091 | bits/stdlib-bsearch.h | 15283 | bits/stdlib-bsearch.h |
15092 | 15284 | ||
@@ -15124,38 +15316,37 @@ Index: git/stdlib/Makefile | |||
15124 | aux = grouping groupingwc tens_in_limb | 15316 | aux = grouping groupingwc tens_in_limb |
15125 | 15317 | ||
15126 | # These routines will be omitted from the libc shared object. | 15318 | # These routines will be omitted from the libc shared object. |
15127 | @@ -62,20 +72,22 @@ aux = grouping groupingwc tens_in_limb | 15319 | @@ -62,20 +72,24 @@ aux = grouping groupingwc tens_in_limb |
15128 | # linked against when the shared library will be used. | 15320 | # linked against when the shared library will be used. |
15129 | static-only-routines = atexit at_quick_exit | 15321 | static-only-routines = atexit at_quick_exit |
15130 | 15322 | ||
15131 | -test-srcs := tst-fmtmsg | 15323 | -test-srcs := tst-fmtmsg |
15132 | -tests := tst-strtol tst-strtod testmb testrand testsort testdiv \ | 15324 | -tests := tst-strtol tst-strtod testmb testrand testsort testdiv \ |
15133 | +test-srcs-$(OPTION_EGLIBC_FMTMSG) := tst-fmtmsg | 15325 | +test-srcs-$(OPTION_EGLIBC_FMTMSG) := tst-fmtmsg |
15134 | +tests := tst-strtol tst-strtod testrand testsort testdiv \ | 15326 | +tests := tst-strtol tst-strtod testrand testsort testdiv \ |
15135 | test-canon test-canon2 tst-strtoll tst-environ \ | 15327 | test-canon test-canon2 tst-strtoll tst-environ \ |
15136 | tst-xpg-basename tst-random tst-random2 tst-bsearch \ | 15328 | tst-xpg-basename tst-random tst-random2 tst-bsearch \ |
15137 | tst-limits tst-rand48 bug-strtod tst-setcontext \ | 15329 | tst-limits tst-rand48 bug-strtod tst-setcontext \ |
15138 | - test-a64l tst-qsort tst-system testmb2 bug-strtod2 \ | 15330 | - tst-setcontext2 test-a64l tst-qsort tst-system testmb2 \ |
15139 | - tst-atof1 tst-atof2 tst-strtod2 tst-strtod3 tst-rand48-2 \ | 15331 | - bug-strtod2 tst-atof1 tst-atof2 tst-strtod2 tst-strtod3 \ |
15140 | - tst-makecontext tst-strtod4 tst-strtod5 tst-qsort2 \ | 15332 | - tst-rand48-2 tst-makecontext tst-strtod4 tst-strtod5 \ |
15141 | - tst-makecontext2 tst-strtod6 tst-unsetenv1 \ | 15333 | + tst-setcontext2 test-a64l tst-qsort tst-system \ |
15142 | - tst-makecontext3 bug-getcontext bug-fmtmsg1 \ | 15334 | + bug-strtod2 tst-atof1 tst-atof2 tst-strtod2 \ |
15143 | + test-a64l tst-qsort tst-system bug-strtod2 \ | 15335 | + tst-rand48-2 tst-makecontext \ |
15144 | + tst-atof1 tst-atof2 tst-strtod2 tst-rand48-2 \ | 15336 | tst-qsort2 tst-makecontext2 tst-strtod6 tst-unsetenv1 \ |
15145 | + tst-makecontext tst-qsort2 tst-makecontext2 tst-strtod6 \ | 15337 | tst-makecontext3 bug-getcontext bug-fmtmsg1 \ |
15146 | + tst-unsetenv1 tst-makecontext3 bug-getcontext bug-fmtmsg1 \ | ||
15147 | tst-secure-getenv tst-strtod-overflow tst-strtod-round \ | 15338 | tst-secure-getenv tst-strtod-overflow tst-strtod-round \ |
15148 | tst-tininess tst-strtod-underflow tst-tls-atexit | 15339 | tst-tininess tst-strtod-underflow tst-tls-atexit \ |
15340 | tst-setcontext3 tst-tls-atexit-nodelete | ||
15149 | tests-static := tst-secure-getenv | 15341 | tests-static := tst-secure-getenv |
15150 | - | ||
15151 | +tests-$(OPTION_EGLIBC_LOCALE_CODE) \ | 15342 | +tests-$(OPTION_EGLIBC_LOCALE_CODE) \ |
15152 | + += tst-strtod3 tst-strtod4 tst-strtod5 testmb2 | 15343 | + += tst-strtod3 tst-strtod4 tst-strtod5 testmb2 |
15153 | +tests-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \ | 15344 | +tests-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \ |
15154 | + += testmb | 15345 | + += testmb |
15346 | |||
15155 | modules-names = tst-tls-atexit-lib | 15347 | modules-names = tst-tls-atexit-lib |
15156 | 15348 | ||
15157 | ifeq ($(build-shared),yes) | 15349 | @@ -116,8 +130,10 @@ CFLAGS-tst-makecontext2.c = $(stack-align-test-flags) |
15158 | @@ -115,8 +127,10 @@ CFLAGS-tst-makecontext2.c = $(stack-alig | ||
15159 | tests-special += $(objpfx)isomac.out | 15350 | tests-special += $(objpfx)isomac.out |
15160 | 15351 | ||
15161 | ifeq ($(run-built-tests),yes) | 15352 | ifeq ($(run-built-tests),yes) |
@@ -15166,10 +15357,10 @@ Index: git/stdlib/Makefile | |||
15166 | 15357 | ||
15167 | include ../Rules | 15358 | include ../Rules |
15168 | 15359 | ||
15169 | Index: git/stdlib/strtod_l.c | 15360 | diff --git a/stdlib/strtod_l.c b/stdlib/strtod_l.c |
15170 | =================================================================== | 15361 | index e13ab1e..63efe41 100644 |
15171 | --- git.orig/stdlib/strtod_l.c | 15362 | --- a/stdlib/strtod_l.c |
15172 | +++ git/stdlib/strtod_l.c | 15363 | +++ b/stdlib/strtod_l.c |
15173 | @@ -17,6 +17,7 @@ | 15364 | @@ -17,6 +17,7 @@ |
15174 | License along with the GNU C Library; if not, see | 15365 | License along with the GNU C Library; if not, see |
15175 | <http://www.gnu.org/licenses/>. */ | 15366 | <http://www.gnu.org/licenses/>. */ |
@@ -15178,7 +15369,7 @@ Index: git/stdlib/strtod_l.c | |||
15178 | #include <xlocale.h> | 15369 | #include <xlocale.h> |
15179 | 15370 | ||
15180 | extern double ____strtod_l_internal (const char *, char **, int, __locale_t); | 15371 | extern double ____strtod_l_internal (const char *, char **, int, __locale_t); |
15181 | @@ -548,6 +549,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group | 15372 | @@ -548,6 +549,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc) |
15182 | /* Used in several places. */ | 15373 | /* Used in several places. */ |
15183 | int cnt; | 15374 | int cnt; |
15184 | 15375 | ||
@@ -15186,7 +15377,7 @@ Index: git/stdlib/strtod_l.c | |||
15186 | struct __locale_data *current = loc->__locales[LC_NUMERIC]; | 15377 | struct __locale_data *current = loc->__locales[LC_NUMERIC]; |
15187 | 15378 | ||
15188 | if (__glibc_unlikely (group)) | 15379 | if (__glibc_unlikely (group)) |
15189 | @@ -586,6 +588,17 @@ ____STRTOF_INTERNAL (nptr, endptr, group | 15380 | @@ -586,6 +588,17 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc) |
15190 | decimal_len = strlen (decimal); | 15381 | decimal_len = strlen (decimal); |
15191 | assert (decimal_len > 0); | 15382 | assert (decimal_len > 0); |
15192 | #endif | 15383 | #endif |
@@ -15204,10 +15395,10 @@ Index: git/stdlib/strtod_l.c | |||
15204 | 15395 | ||
15205 | /* Prepare number representation. */ | 15396 | /* Prepare number representation. */ |
15206 | exponent = 0; | 15397 | exponent = 0; |
15207 | Index: git/stdlib/tst-strtod.c | 15398 | diff --git a/stdlib/tst-strtod.c b/stdlib/tst-strtod.c |
15208 | =================================================================== | 15399 | index a469208..28fb423 100644 |
15209 | --- git.orig/stdlib/tst-strtod.c | 15400 | --- a/stdlib/tst-strtod.c |
15210 | +++ git/stdlib/tst-strtod.c | 15401 | +++ b/stdlib/tst-strtod.c |
15211 | @@ -23,6 +23,7 @@ | 15402 | @@ -23,6 +23,7 @@ |
15212 | #include <errno.h> | 15403 | #include <errno.h> |
15213 | #include <string.h> | 15404 | #include <string.h> |
@@ -15239,10 +15430,10 @@ Index: git/stdlib/tst-strtod.c | |||
15239 | return result; | 15430 | return result; |
15240 | } | 15431 | } |
15241 | +#endif /* __OPTION_EGLIBC_LOCALE_CODE */ | 15432 | +#endif /* __OPTION_EGLIBC_LOCALE_CODE */ |
15242 | Index: git/streams/Makefile | 15433 | diff --git a/streams/Makefile b/streams/Makefile |
15243 | =================================================================== | 15434 | index a8a6162..ceb423f 100644 |
15244 | --- git.orig/streams/Makefile | 15435 | --- a/streams/Makefile |
15245 | +++ git/streams/Makefile | 15436 | +++ b/streams/Makefile |
15246 | @@ -18,11 +18,14 @@ | 15437 | @@ -18,11 +18,14 @@ |
15247 | # | 15438 | # |
15248 | # Makefile for streams. | 15439 | # Makefile for streams. |
@@ -15259,10 +15450,10 @@ Index: git/streams/Makefile | |||
15259 | + += isastream getmsg getpmsg putmsg putpmsg fattach fdetach | 15450 | + += isastream getmsg getpmsg putmsg putpmsg fattach fdetach |
15260 | 15451 | ||
15261 | include ../Rules | 15452 | include ../Rules |
15262 | Index: git/string/Makefile | 15453 | diff --git a/string/Makefile b/string/Makefile |
15263 | =================================================================== | 15454 | index 8424a61..5988834 100644 |
15264 | --- git.orig/string/Makefile | 15455 | --- a/string/Makefile |
15265 | +++ git/string/Makefile | 15456 | +++ b/string/Makefile |
15266 | @@ -18,6 +18,8 @@ | 15457 | @@ -18,6 +18,8 @@ |
15267 | # | 15458 | # |
15268 | # Sub-makefile for string portion of library. | 15459 | # Sub-makefile for string portion of library. |
@@ -15272,7 +15463,7 @@ Index: git/string/Makefile | |||
15272 | subdir := string | 15463 | subdir := string |
15273 | 15464 | ||
15274 | include ../Makeconfig | 15465 | include ../Makeconfig |
15275 | @@ -39,10 +41,12 @@ routines := strcat strchr strcmp strcoll | 15466 | @@ -39,10 +41,12 @@ routines := strcat strchr strcmp strcoll strcpy strcspn \ |
15276 | $(addprefix argz-,append count create ctsep next \ | 15467 | $(addprefix argz-,append count create ctsep next \ |
15277 | delete extract insert stringify \ | 15468 | delete extract insert stringify \ |
15278 | addsep replace) \ | 15469 | addsep replace) \ |
@@ -15286,7 +15477,7 @@ Index: git/string/Makefile | |||
15286 | strop-tests := memchr memcmp memcpy memmove mempcpy memset memccpy \ | 15477 | strop-tests := memchr memcmp memcpy memmove mempcpy memset memccpy \ |
15287 | stpcpy stpncpy strcat strchr strcmp strcpy strcspn \ | 15478 | stpcpy stpncpy strcat strchr strcmp strcpy strcspn \ |
15288 | strlen strncmp strncpy strpbrk strrchr strspn memmem \ | 15479 | strlen strncmp strncpy strpbrk strrchr strspn memmem \ |
15289 | @@ -51,10 +55,12 @@ strop-tests := memchr memcmp memcpy memm | 15480 | @@ -51,10 +55,12 @@ strop-tests := memchr memcmp memcpy memmove mempcpy memset memccpy \ |
15290 | tests := tester inl-tester noinl-tester testcopy test-ffs \ | 15481 | tests := tester inl-tester noinl-tester testcopy test-ffs \ |
15291 | tst-strlen stratcliff tst-svc tst-inlcall \ | 15482 | tst-strlen stratcliff tst-svc tst-inlcall \ |
15292 | bug-strncat1 bug-strspn1 bug-strpbrk1 tst-bswap \ | 15483 | bug-strncat1 bug-strspn1 bug-strpbrk1 tst-bswap \ |
@@ -15302,10 +15493,10 @@ Index: git/string/Makefile | |||
15302 | 15493 | ||
15303 | xtests = tst-strcoll-overflow | 15494 | xtests = tst-strcoll-overflow |
15304 | 15495 | ||
15305 | Index: git/string/strcoll_l.c | 15496 | diff --git a/string/strcoll_l.c b/string/strcoll_l.c |
15306 | =================================================================== | 15497 | index 8f1225f..b36b18c 100644 |
15307 | --- git.orig/string/strcoll_l.c | 15498 | --- a/string/strcoll_l.c |
15308 | +++ git/string/strcoll_l.c | 15499 | +++ b/string/strcoll_l.c |
15309 | @@ -24,6 +24,7 @@ | 15500 | @@ -24,6 +24,7 @@ |
15310 | #include <stdint.h> | 15501 | #include <stdint.h> |
15311 | #include <string.h> | 15502 | #include <string.h> |
@@ -15314,7 +15505,7 @@ Index: git/string/strcoll_l.c | |||
15314 | 15505 | ||
15315 | #ifndef STRING_TYPE | 15506 | #ifndef STRING_TYPE |
15316 | # define STRING_TYPE char | 15507 | # define STRING_TYPE char |
15317 | @@ -247,7 +248,11 @@ int | 15508 | @@ -260,7 +261,11 @@ int |
15318 | STRCOLL (const STRING_TYPE *s1, const STRING_TYPE *s2, __locale_t l) | 15509 | STRCOLL (const STRING_TYPE *s1, const STRING_TYPE *s2, __locale_t l) |
15319 | { | 15510 | { |
15320 | struct __locale_data *current = l->__locales[LC_COLLATE]; | 15511 | struct __locale_data *current = l->__locales[LC_COLLATE]; |
@@ -15326,10 +15517,10 @@ Index: git/string/strcoll_l.c | |||
15326 | /* We don't assign the following values right away since it might be | 15517 | /* We don't assign the following values right away since it might be |
15327 | unnecessary in case there are no rules. */ | 15518 | unnecessary in case there are no rules. */ |
15328 | const unsigned char *rulesets; | 15519 | const unsigned char *rulesets; |
15329 | Index: git/string/strerror_l.c | 15520 | diff --git a/string/strerror_l.c b/string/strerror_l.c |
15330 | =================================================================== | 15521 | index 2ed78b5..6584813 100644 |
15331 | --- git.orig/string/strerror_l.c | 15522 | --- a/string/strerror_l.c |
15332 | +++ git/string/strerror_l.c | 15523 | +++ b/string/strerror_l.c |
15333 | @@ -21,6 +21,7 @@ | 15524 | @@ -21,6 +21,7 @@ |
15334 | #include <stdlib.h> | 15525 | #include <stdlib.h> |
15335 | #include <string.h> | 15526 | #include <string.h> |
@@ -15353,10 +15544,10 @@ Index: git/string/strerror_l.c | |||
15353 | } | 15544 | } |
15354 | 15545 | ||
15355 | 15546 | ||
15356 | Index: git/string/strxfrm_l.c | 15547 | diff --git a/string/strxfrm_l.c b/string/strxfrm_l.c |
15357 | =================================================================== | 15548 | index 8b61ea2..41fdc22 100644 |
15358 | --- git.orig/string/strxfrm_l.c | 15549 | --- a/string/strxfrm_l.c |
15359 | +++ git/string/strxfrm_l.c | 15550 | +++ b/string/strxfrm_l.c |
15360 | @@ -24,6 +24,7 @@ | 15551 | @@ -24,6 +24,7 @@ |
15361 | #include <stdlib.h> | 15552 | #include <stdlib.h> |
15362 | #include <string.h> | 15553 | #include <string.h> |
@@ -15365,7 +15556,7 @@ Index: git/string/strxfrm_l.c | |||
15365 | 15556 | ||
15366 | #ifndef STRING_TYPE | 15557 | #ifndef STRING_TYPE |
15367 | # define STRING_TYPE char | 15558 | # define STRING_TYPE char |
15368 | @@ -670,7 +671,11 @@ STRXFRM (STRING_TYPE *dest, const STRING | 15559 | @@ -669,7 +670,11 @@ STRXFRM (STRING_TYPE *dest, const STRING_TYPE *src, size_t n, __locale_t l) |
15369 | { | 15560 | { |
15370 | locale_data_t l_data; | 15561 | locale_data_t l_data; |
15371 | struct __locale_data *current = l->__locales[LC_COLLATE]; | 15562 | struct __locale_data *current = l->__locales[LC_COLLATE]; |
@@ -15377,10 +15568,10 @@ Index: git/string/strxfrm_l.c | |||
15377 | 15568 | ||
15378 | /* Handle byte comparison case. */ | 15569 | /* Handle byte comparison case. */ |
15379 | if (l_data.nrules == 0) | 15570 | if (l_data.nrules == 0) |
15380 | Index: git/string/test-strcmp.c | 15571 | diff --git a/string/test-strcmp.c b/string/test-strcmp.c |
15381 | =================================================================== | 15572 | index dc4ba6f..a978656 100644 |
15382 | --- git.orig/string/test-strcmp.c | 15573 | --- a/string/test-strcmp.c |
15383 | +++ git/string/test-strcmp.c | 15574 | +++ b/string/test-strcmp.c |
15384 | @@ -329,34 +329,6 @@ check (void) | 15575 | @@ -329,34 +329,6 @@ check (void) |
15385 | FOR_EACH_IMPL (impl, 0) | 15576 | FOR_EACH_IMPL (impl, 0) |
15386 | check_result (impl, s1 + i1, s2 + i2, exp_result); | 15577 | check_result (impl, s1 + i1, s2 + i2, exp_result); |
@@ -15416,10 +15607,33 @@ Index: git/string/test-strcmp.c | |||
15416 | } | 15607 | } |
15417 | 15608 | ||
15418 | 15609 | ||
15419 | Index: git/string/tst-strxfrm2.c | 15610 | diff --git a/string/tst-strxfrm.c b/string/tst-strxfrm.c |
15420 | =================================================================== | 15611 | index f48cfc0..c3a51f9 100644 |
15421 | --- git.orig/string/tst-strxfrm2.c | 15612 | --- a/string/tst-strxfrm.c |
15422 | +++ git/string/tst-strxfrm2.c | 15613 | +++ b/string/tst-strxfrm.c |
15614 | @@ -3,6 +3,7 @@ | ||
15615 | #include <stdio.h> | ||
15616 | #include <stdlib.h> | ||
15617 | #include <string.h> | ||
15618 | +#include <gnu/option-groups.h> | ||
15619 | |||
15620 | |||
15621 | char const string[] = ""; | ||
15622 | @@ -64,8 +65,10 @@ do_test (void) | ||
15623 | int result = 0; | ||
15624 | |||
15625 | result |= test ("C"); | ||
15626 | +#if __OPTION_EGLIBC_LOCALE_CODE | ||
15627 | result |= test ("en_US.ISO-8859-1"); | ||
15628 | result |= test ("de_DE.UTF-8"); | ||
15629 | +#endif | ||
15630 | |||
15631 | return result; | ||
15632 | } | ||
15633 | diff --git a/string/tst-strxfrm2.c b/string/tst-strxfrm2.c | ||
15634 | index d5a1115..19c7f30 100644 | ||
15635 | --- a/string/tst-strxfrm2.c | ||
15636 | +++ b/string/tst-strxfrm2.c | ||
15423 | @@ -1,6 +1,7 @@ | 15637 | @@ -1,6 +1,7 @@ |
15424 | #include <locale.h> | 15638 | #include <locale.h> |
15425 | #include <stdio.h> | 15639 | #include <stdio.h> |
@@ -15444,33 +15658,10 @@ Index: git/string/tst-strxfrm2.c | |||
15444 | 15658 | ||
15445 | return res; | 15659 | return res; |
15446 | } | 15660 | } |
15447 | Index: git/string/tst-strxfrm.c | 15661 | diff --git a/sunrpc/Makefile b/sunrpc/Makefile |
15448 | =================================================================== | 15662 | index 60caa0a..5bc70ab 100644 |
15449 | --- git.orig/string/tst-strxfrm.c | 15663 | --- a/sunrpc/Makefile |
15450 | +++ git/string/tst-strxfrm.c | 15664 | +++ b/sunrpc/Makefile |
15451 | @@ -3,6 +3,7 @@ | ||
15452 | #include <stdio.h> | ||
15453 | #include <stdlib.h> | ||
15454 | #include <string.h> | ||
15455 | +#include <gnu/option-groups.h> | ||
15456 | |||
15457 | |||
15458 | char const string[] = ""; | ||
15459 | @@ -64,8 +65,10 @@ do_test (void) | ||
15460 | int result = 0; | ||
15461 | |||
15462 | result |= test ("C"); | ||
15463 | +#if __OPTION_EGLIBC_LOCALE_CODE | ||
15464 | result |= test ("en_US.ISO-8859-1"); | ||
15465 | result |= test ("de_DE.UTF-8"); | ||
15466 | +#endif | ||
15467 | |||
15468 | return result; | ||
15469 | } | ||
15470 | Index: git/sunrpc/Makefile | ||
15471 | =================================================================== | ||
15472 | --- git.orig/sunrpc/Makefile | ||
15473 | +++ git/sunrpc/Makefile | ||
15474 | @@ -18,6 +18,8 @@ | 15665 | @@ -18,6 +18,8 @@ |
15475 | # | 15666 | # |
15476 | # Sub-makefile for sunrpc portion of the library. | 15667 | # Sub-makefile for sunrpc portion of the library. |
@@ -15480,7 +15671,7 @@ Index: git/sunrpc/Makefile | |||
15480 | subdir := sunrpc | 15671 | subdir := sunrpc |
15481 | 15672 | ||
15482 | include ../Makeconfig | 15673 | include ../Makeconfig |
15483 | @@ -55,7 +57,6 @@ headers-in-tirpc = $(addprefix rpc/,auth | 15674 | @@ -55,7 +57,6 @@ headers-in-tirpc = $(addprefix rpc/,auth.h auth_unix.h clnt.h pmap_clnt.h \ |
15484 | headers-not-in-tirpc = $(addprefix rpc/,key_prot.h rpc_des.h) \ | 15675 | headers-not-in-tirpc = $(addprefix rpc/,key_prot.h rpc_des.h) \ |
15485 | $(rpcsvc:%=rpcsvc/%) rpcsvc/bootparam.h | 15676 | $(rpcsvc:%=rpcsvc/%) rpcsvc/bootparam.h |
15486 | headers = rpc/netdb.h | 15677 | headers = rpc/netdb.h |
@@ -15488,32 +15679,32 @@ Index: git/sunrpc/Makefile | |||
15488 | generated += $(rpcsvc:%.x=rpcsvc/%.h) $(rpcsvc:%.x=x%.c) $(rpcsvc:%.x=x%.stmp) \ | 15679 | generated += $(rpcsvc:%.x=rpcsvc/%.h) $(rpcsvc:%.x=x%.c) $(rpcsvc:%.x=x%.stmp) \ |
15489 | $(rpcsvc:%.x=rpcsvc/%.stmp) rpcgen | 15680 | $(rpcsvc:%.x=rpcsvc/%.stmp) rpcgen |
15490 | generated-dirs += rpcsvc | 15681 | generated-dirs += rpcsvc |
15491 | @@ -65,18 +66,28 @@ headers += $(headers-in-tirpc) $(headers | 15682 | @@ -65,20 +66,28 @@ headers += $(headers-in-tirpc) $(headers-not-in-tirpc) |
15492 | endif | 15683 | endif |
15493 | 15684 | ||
15494 | ifeq ($(build-shared),yes) | 15685 | ifeq ($(build-shared),yes) |
15495 | -need-export-routines := auth_des auth_unix clnt_gen clnt_perr clnt_tcp \ | 15686 | -need-export-routines := auth_des auth_unix clnt_gen clnt_perr clnt_tcp \ |
15496 | +need-export-routines-$(OPTION_EGLIBC_SUNRPC) += \ | 15687 | +need-export-routines-$(OPTION_EGLIBC_SUNRPC) := \ |
15497 | + auth_des auth_unix clnt_gen clnt_perr clnt_tcp \ | 15688 | + auth_des auth_unix clnt_gen clnt_perr clnt_tcp \ |
15498 | clnt_udp get_myaddr key_call netname pm_getport \ | 15689 | clnt_udp get_myaddr key_call netname pm_getport \ |
15499 | - rpc_thread svc svc_tcp svc_udp xcrypt xdr_array xdr \ | 15690 | - rpc_thread svc svc_tcp svc_udp xcrypt xdr_array xdr \ |
15500 | + rpc_thread svc svc_tcp svc_udp xdr_array xdr \ | 15691 | + rpc_thread svc svc_tcp svc_udp xdr_array xdr \ |
15501 | xdr_intXX_t xdr_mem xdr_ref xdr_sizeof xdr_stdio \ | 15692 | xdr_intXX_t xdr_mem xdr_ref xdr_sizeof xdr_stdio \ |
15502 | svc_run | 15693 | svc_run |
15503 | |||
15504 | -routines := auth_none authuxprot bindrsvprt clnt_raw clnt_simp \ | ||
15505 | +need-export-routines-y += xcrypt | 15694 | +need-export-routines-y += xcrypt |
15506 | + | ||
15507 | +need-export-routines := $(need-export-routines-y) | 15695 | +need-export-routines := $(need-export-routines-y) |
15508 | + | 15696 | |
15509 | +routines-$(OPTION_EGLIBC_SUNRPC) \ | 15697 | -routines := auth_none authuxprot bindrsvprt clnt_raw clnt_simp \ |
15510 | + += auth_none authuxprot bindrsvprt clnt_raw clnt_simp \ | 15698 | +routines-$(OPTION_EGLIBC_SUNRPC) := \ |
15699 | + auth_none authuxprot bindrsvprt clnt_raw clnt_simp \ | ||
15511 | rpc_dtable getrpcport pmap_clnt pm_getmaps pmap_prot pmap_prot2 \ | 15700 | rpc_dtable getrpcport pmap_clnt pm_getmaps pmap_prot pmap_prot2 \ |
15512 | pmap_rmt rpc_prot rpc_common rpc_cmsg svc_auth svc_authux svc_raw \ | 15701 | pmap_rmt rpc_prot rpc_common rpc_cmsg svc_auth svc_authux svc_raw \ |
15513 | svc_simple xdr_float xdr_rec publickey authdes_prot \ | 15702 | svc_simple xdr_float xdr_rec publickey authdes_prot \ |
15514 | - des_crypt des_impl des_soft key_prot openchild rtime svcauth_des \ | 15703 | - des_crypt des_impl des_soft key_prot openchild rtime svcauth_des \ |
15515 | - clnt_unix svc_unix create_xid $(need-export-routines) | ||
15516 | + key_prot openchild rtime svcauth_des \ | 15704 | + key_prot openchild rtime svcauth_des \ |
15705 | getrpcent getrpcbyname getrpcbynumber \ | ||
15706 | getrpcent_r getrpcbyname_r getrpcbynumber_r \ | ||
15707 | - clnt_unix svc_unix create_xid $(need-export-routines) | ||
15517 | + clnt_unix svc_unix create_xid | 15708 | + clnt_unix svc_unix create_xid |
15518 | + | 15709 | + |
15519 | +# xdecrypt is also used by nss/nss_files/files-key.c. | 15710 | +# xdecrypt is also used by nss/nss_files/files-key.c. |
@@ -15522,7 +15713,7 @@ Index: git/sunrpc/Makefile | |||
15522 | ifneq ($(link-obsolete-rpc),yes) | 15713 | ifneq ($(link-obsolete-rpc),yes) |
15523 | # We only add the RPC for compatibility to libc.so. | 15714 | # We only add the RPC for compatibility to libc.so. |
15524 | shared-only-routines = $(routines) | 15715 | shared-only-routines = $(routines) |
15525 | @@ -85,25 +96,28 @@ endif | 15716 | @@ -87,25 +96,28 @@ endif |
15526 | 15717 | ||
15527 | # We do not build rpcinfo anymore. It is not needed for a bootstrap | 15718 | # We do not build rpcinfo anymore. It is not needed for a bootstrap |
15528 | # and not wanted on complete systems. | 15719 | # and not wanted on complete systems. |
@@ -15542,9 +15733,9 @@ Index: git/sunrpc/Makefile | |||
15542 | + | 15733 | + |
15543 | +install-others-$(OPTION_EGLIBC_SUNRPC) += $(inst_sysconfdir)/rpc | 15734 | +install-others-$(OPTION_EGLIBC_SUNRPC) += $(inst_sysconfdir)/rpc |
15544 | 15735 | ||
15545 | -tests = tst-xdrmem tst-xdrmem2 | 15736 | -tests = tst-xdrmem tst-xdrmem2 test-rpcent |
15546 | -xtests := tst-getmyaddr | 15737 | -xtests := tst-getmyaddr |
15547 | +tests-$(OPTION_EGLIBC_SUNRPC) = tst-xdrmem tst-xdrmem2 | 15738 | +tests-$(OPTION_EGLIBC_SUNRPC) = tst-xdrmem tst-xdrmem2 test-rpcent |
15548 | +xtests-$(OPTION_EGLIBC_SUNRPC) := tst-getmyaddr | 15739 | +xtests-$(OPTION_EGLIBC_SUNRPC) := tst-getmyaddr |
15549 | 15740 | ||
15550 | ifeq ($(have-thread-library),yes) | 15741 | ifeq ($(have-thread-library),yes) |
@@ -15561,11 +15752,30 @@ Index: git/sunrpc/Makefile | |||
15561 | librpcsvc-routines = $(rpcsvc:%.x=x%) | 15752 | librpcsvc-routines = $(rpcsvc:%.x=x%) |
15562 | librpcsvc-inhibit-o = .os # Build no shared rpcsvc library. | 15753 | librpcsvc-inhibit-o = .os # Build no shared rpcsvc library. |
15563 | omit-deps = $(librpcsvc-routines) | 15754 | omit-deps = $(librpcsvc-routines) |
15564 | Index: git/sysdeps/generic/ldsodefs.h | 15755 | diff --git a/sysdeps/arm/Makefile b/sysdeps/arm/Makefile |
15565 | =================================================================== | 15756 | index 17c129b..543791a 100644 |
15566 | --- git.orig/sysdeps/generic/ldsodefs.h | 15757 | --- a/sysdeps/arm/Makefile |
15567 | +++ git/sysdeps/generic/ldsodefs.h | 15758 | +++ b/sysdeps/arm/Makefile |
15568 | @@ -425,6 +425,12 @@ extern struct rtld_global _rtld_global _ | 15759 | @@ -37,10 +37,13 @@ ifeq ($(subdir),csu) |
15760 | # get offset to rtld_global._dl_hwcap | ||
15761 | gen-as-const-headers += rtld-global-offsets.sym tlsdesc.sym | ||
15762 | aeabi_constants = aeabi_lcsts aeabi_sighandlers aeabi_math | ||
15763 | -aeabi_routines = aeabi_assert aeabi_localeconv aeabi_errno_addr \ | ||
15764 | +aeabi_routines = aeabi_assert aeabi_errno_addr \ | ||
15765 | aeabi_mb_cur_max aeabi_atexit aeabi_memclr aeabi_memcpy \ | ||
15766 | aeabi_memmove aeabi_memset \ | ||
15767 | aeabi_read_tp libc-aeabi_read_tp | ||
15768 | +ifeq (y,$(OPTION_EGLIBC_LOCALE_CODE)) | ||
15769 | +aeabi_routines += aeabi_localeconv | ||
15770 | +endif | ||
15771 | |||
15772 | sysdep_routines += $(aeabi_constants) $(aeabi_routines) | ||
15773 | static-only-routines += $(aeabi_constants) aeabi_read_tp | ||
15774 | diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h | ||
15775 | index 7a0fe8d..a3e2c0a 100644 | ||
15776 | --- a/sysdeps/generic/ldsodefs.h | ||
15777 | +++ b/sysdeps/generic/ldsodefs.h | ||
15778 | @@ -435,6 +435,12 @@ extern struct rtld_global _rtld_global __rtld_global_attribute__; | ||
15569 | # undef __rtld_global_attribute__ | 15779 | # undef __rtld_global_attribute__ |
15570 | #endif | 15780 | #endif |
15571 | 15781 | ||
@@ -15578,7 +15788,7 @@ Index: git/sysdeps/generic/ldsodefs.h | |||
15578 | #ifndef SHARED | 15788 | #ifndef SHARED |
15579 | # define GLRO(name) _##name | 15789 | # define GLRO(name) _##name |
15580 | #else | 15790 | #else |
15581 | @@ -437,8 +443,10 @@ struct rtld_global_ro | 15791 | @@ -447,8 +453,10 @@ struct rtld_global_ro |
15582 | { | 15792 | { |
15583 | #endif | 15793 | #endif |
15584 | 15794 | ||
@@ -15589,11 +15799,11 @@ Index: git/sysdeps/generic/ldsodefs.h | |||
15589 | #define DL_DEBUG_LIBS (1 << 0) | 15799 | #define DL_DEBUG_LIBS (1 << 0) |
15590 | #define DL_DEBUG_IMPCALLS (1 << 1) | 15800 | #define DL_DEBUG_IMPCALLS (1 << 1) |
15591 | #define DL_DEBUG_BINDINGS (1 << 2) | 15801 | #define DL_DEBUG_BINDINGS (1 << 2) |
15592 | Index: git/sysdeps/gnu/Makefile | 15802 | diff --git a/sysdeps/gnu/Makefile b/sysdeps/gnu/Makefile |
15593 | =================================================================== | 15803 | index ea68037..3175cc3 100644 |
15594 | --- git.orig/sysdeps/gnu/Makefile | 15804 | --- a/sysdeps/gnu/Makefile |
15595 | +++ git/sysdeps/gnu/Makefile | 15805 | +++ b/sysdeps/gnu/Makefile |
15596 | @@ -59,7 +59,8 @@ $(foreach o,$(object-suffixes) $(object- | 15806 | @@ -59,7 +59,8 @@ $(foreach o,$(object-suffixes) $(object-suffixes:=.d),\ |
15597 | endif | 15807 | endif |
15598 | 15808 | ||
15599 | ifeq ($(subdir),login) | 15809 | ifeq ($(subdir),login) |
@@ -15603,10 +15813,10 @@ Index: git/sysdeps/gnu/Makefile | |||
15603 | pututxline utmpxname updwtmpx getutmpx getutmp | 15813 | pututxline utmpxname updwtmpx getutmpx getutmp |
15604 | 15814 | ||
15605 | sysdep_headers += utmpx.h bits/utmpx.h | 15815 | sysdep_headers += utmpx.h bits/utmpx.h |
15606 | Index: git/sysdeps/ieee754/ldbl-opt/Makefile | 15816 | diff --git a/sysdeps/ieee754/ldbl-opt/Makefile b/sysdeps/ieee754/ldbl-opt/Makefile |
15607 | =================================================================== | 15817 | index 222122d..4509357 100644 |
15608 | --- git.orig/sysdeps/ieee754/ldbl-opt/Makefile | 15818 | --- a/sysdeps/ieee754/ldbl-opt/Makefile |
15609 | +++ git/sysdeps/ieee754/ldbl-opt/Makefile | 15819 | +++ b/sysdeps/ieee754/ldbl-opt/Makefile |
15610 | @@ -11,19 +11,18 @@ libm-routines += s_nexttowardfd | 15820 | @@ -11,19 +11,18 @@ libm-routines += s_nexttowardfd |
15611 | routines += math_ldbl_opt nldbl-compat | 15821 | routines += math_ldbl_opt nldbl-compat |
15612 | 15822 | ||
@@ -15636,7 +15846,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/Makefile | |||
15636 | strtold strtold_l strtoldint wcstold wcstold_l wcstoldint \ | 15846 | strtold strtold_l strtoldint wcstold wcstold_l wcstoldint \ |
15637 | qecvt qfcvt qgcvt qecvt_r qfcvt_r \ | 15847 | qecvt qfcvt qgcvt qecvt_r qfcvt_r \ |
15638 | isinf isnan finite signbit scalb log2 lgamma_r ceil \ | 15848 | isinf isnan finite signbit scalb log2 lgamma_r ceil \ |
15639 | @@ -38,9 +37,15 @@ libnldbl-calls = asprintf dprintf fprint | 15849 | @@ -38,9 +37,15 @@ libnldbl-calls = asprintf dprintf fprintf fscanf fwprintf fwscanf iovfscanf \ |
15640 | casinh cexp clog cproj csin csinh csqrt ctan ctanh cpow \ | 15850 | casinh cexp clog cproj csin csinh csqrt ctan ctanh cpow \ |
15641 | cabs carg cimag creal clog10 \ | 15851 | cabs carg cimag creal clog10 \ |
15642 | isoc99_scanf isoc99_fscanf isoc99_sscanf \ | 15852 | isoc99_scanf isoc99_fscanf isoc99_sscanf \ |
@@ -15653,10 +15863,10 @@ Index: git/sysdeps/ieee754/ldbl-opt/Makefile | |||
15653 | libnldbl-routines = $(libnldbl-calls:%=nldbl-%) | 15863 | libnldbl-routines = $(libnldbl-calls:%=nldbl-%) |
15654 | libnldbl-inhibit-o = $(object-suffixes) | 15864 | libnldbl-inhibit-o = $(object-suffixes) |
15655 | libnldbl-static-only-routines = $(libnldbl-routines) | 15865 | libnldbl-static-only-routines = $(libnldbl-routines) |
15656 | Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c | 15866 | diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-compat.c b/sysdeps/ieee754/ldbl-opt/nldbl-compat.c |
15657 | =================================================================== | 15867 | index 0198886..55501cd 100644 |
15658 | --- git.orig/sysdeps/ieee754/ldbl-opt/nldbl-compat.c | 15868 | --- a/sysdeps/ieee754/ldbl-opt/nldbl-compat.c |
15659 | +++ git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c | 15869 | +++ b/sysdeps/ieee754/ldbl-opt/nldbl-compat.c |
15660 | @@ -26,6 +26,7 @@ | 15870 | @@ -26,6 +26,7 @@ |
15661 | #include <locale/localeinfo.h> | 15871 | #include <locale/localeinfo.h> |
15662 | #include <sys/syslog.h> | 15872 | #include <sys/syslog.h> |
@@ -15704,7 +15914,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c | |||
15704 | 15914 | ||
15705 | static void | 15915 | static void |
15706 | __nldbl_cleanup (void *arg) | 15916 | __nldbl_cleanup (void *arg) |
15707 | @@ -117,6 +121,7 @@ __nldbl_fprintf (FILE *stream, const cha | 15917 | @@ -117,6 +121,7 @@ __nldbl_fprintf (FILE *stream, const char *fmt, ...) |
15708 | } | 15918 | } |
15709 | weak_alias (__nldbl_fprintf, __nldbl__IO_fprintf) | 15919 | weak_alias (__nldbl_fprintf, __nldbl__IO_fprintf) |
15710 | 15920 | ||
@@ -15712,7 +15922,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c | |||
15712 | int | 15922 | int |
15713 | attribute_compat_text_section weak_function | 15923 | attribute_compat_text_section weak_function |
15714 | __nldbl_fwprintf (FILE *stream, const wchar_t *fmt, ...) | 15924 | __nldbl_fwprintf (FILE *stream, const wchar_t *fmt, ...) |
15715 | @@ -130,6 +135,7 @@ __nldbl_fwprintf (FILE *stream, const wc | 15925 | @@ -130,6 +135,7 @@ __nldbl_fwprintf (FILE *stream, const wchar_t *fmt, ...) |
15716 | 15926 | ||
15717 | return done; | 15927 | return done; |
15718 | } | 15928 | } |
@@ -15720,7 +15930,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c | |||
15720 | 15930 | ||
15721 | int | 15931 | int |
15722 | attribute_compat_text_section | 15932 | attribute_compat_text_section |
15723 | @@ -226,6 +232,7 @@ __nldbl_snprintf (char *s, size_t maxlen | 15933 | @@ -226,6 +232,7 @@ __nldbl_snprintf (char *s, size_t maxlen, const char *fmt, ...) |
15724 | return done; | 15934 | return done; |
15725 | } | 15935 | } |
15726 | 15936 | ||
@@ -15728,7 +15938,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c | |||
15728 | int | 15938 | int |
15729 | attribute_compat_text_section | 15939 | attribute_compat_text_section |
15730 | __nldbl_swprintf (wchar_t *s, size_t n, const wchar_t *fmt, ...) | 15940 | __nldbl_swprintf (wchar_t *s, size_t n, const wchar_t *fmt, ...) |
15731 | @@ -239,6 +246,7 @@ __nldbl_swprintf (wchar_t *s, size_t n, | 15941 | @@ -239,6 +246,7 @@ __nldbl_swprintf (wchar_t *s, size_t n, const wchar_t *fmt, ...) |
15732 | 15942 | ||
15733 | return done; | 15943 | return done; |
15734 | } | 15944 | } |
@@ -15736,7 +15946,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c | |||
15736 | 15946 | ||
15737 | int | 15947 | int |
15738 | attribute_compat_text_section weak_function | 15948 | attribute_compat_text_section weak_function |
15739 | @@ -264,6 +272,7 @@ __nldbl_vdprintf (int d, const char *fmt | 15949 | @@ -264,6 +272,7 @@ __nldbl_vdprintf (int d, const char *fmt, va_list arg) |
15740 | } | 15950 | } |
15741 | libc_hidden_def (__nldbl_vdprintf) | 15951 | libc_hidden_def (__nldbl_vdprintf) |
15742 | 15952 | ||
@@ -15744,7 +15954,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c | |||
15744 | int | 15954 | int |
15745 | attribute_compat_text_section weak_function | 15955 | attribute_compat_text_section weak_function |
15746 | __nldbl_vfwprintf (FILE *s, const wchar_t *fmt, va_list ap) | 15956 | __nldbl_vfwprintf (FILE *s, const wchar_t *fmt, va_list ap) |
15747 | @@ -275,6 +284,7 @@ __nldbl_vfwprintf (FILE *s, const wchar_ | 15957 | @@ -275,6 +284,7 @@ __nldbl_vfwprintf (FILE *s, const wchar_t *fmt, va_list ap) |
15748 | return res; | 15958 | return res; |
15749 | } | 15959 | } |
15750 | libc_hidden_def (__nldbl_vfwprintf) | 15960 | libc_hidden_def (__nldbl_vfwprintf) |
@@ -15752,7 +15962,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c | |||
15752 | 15962 | ||
15753 | int | 15963 | int |
15754 | attribute_compat_text_section | 15964 | attribute_compat_text_section |
15755 | @@ -297,6 +307,7 @@ __nldbl_vsnprintf (char *string, size_t | 15965 | @@ -297,6 +307,7 @@ __nldbl_vsnprintf (char *string, size_t maxlen, const char *fmt, |
15756 | libc_hidden_def (__nldbl_vsnprintf) | 15966 | libc_hidden_def (__nldbl_vsnprintf) |
15757 | weak_alias (__nldbl_vsnprintf, __nldbl___vsnprintf) | 15967 | weak_alias (__nldbl_vsnprintf, __nldbl___vsnprintf) |
15758 | 15968 | ||
@@ -15760,7 +15970,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c | |||
15760 | int | 15970 | int |
15761 | attribute_compat_text_section weak_function | 15971 | attribute_compat_text_section weak_function |
15762 | __nldbl_vswprintf (wchar_t *string, size_t maxlen, const wchar_t *fmt, | 15972 | __nldbl_vswprintf (wchar_t *string, size_t maxlen, const wchar_t *fmt, |
15763 | @@ -330,6 +341,7 @@ __nldbl_wprintf (const wchar_t *fmt, ... | 15973 | @@ -330,6 +341,7 @@ __nldbl_wprintf (const wchar_t *fmt, ...) |
15764 | 15974 | ||
15765 | return done; | 15975 | return done; |
15766 | } | 15976 | } |
@@ -15784,7 +15994,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c | |||
15784 | 15994 | ||
15785 | int | 15995 | int |
15786 | attribute_compat_text_section | 15996 | attribute_compat_text_section |
15787 | @@ -506,6 +520,7 @@ __nldbl___fprintf_chk (FILE *stream, int | 15997 | @@ -506,6 +520,7 @@ __nldbl___fprintf_chk (FILE *stream, int flag, const char *fmt, ...) |
15788 | return done; | 15998 | return done; |
15789 | } | 15999 | } |
15790 | 16000 | ||
@@ -15792,7 +16002,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c | |||
15792 | int | 16002 | int |
15793 | attribute_compat_text_section | 16003 | attribute_compat_text_section |
15794 | __nldbl___fwprintf_chk (FILE *stream, int flag, const wchar_t *fmt, ...) | 16004 | __nldbl___fwprintf_chk (FILE *stream, int flag, const wchar_t *fmt, ...) |
15795 | @@ -519,6 +534,7 @@ __nldbl___fwprintf_chk (FILE *stream, in | 16005 | @@ -519,6 +534,7 @@ __nldbl___fwprintf_chk (FILE *stream, int flag, const wchar_t *fmt, ...) |
15796 | 16006 | ||
15797 | return done; | 16007 | return done; |
15798 | } | 16008 | } |
@@ -15800,7 +16010,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c | |||
15800 | 16010 | ||
15801 | int | 16011 | int |
15802 | attribute_compat_text_section | 16012 | attribute_compat_text_section |
15803 | @@ -563,6 +579,7 @@ __nldbl___sprintf_chk (char *s, int flag | 16013 | @@ -563,6 +579,7 @@ __nldbl___sprintf_chk (char *s, int flag, size_t slen, const char *fmt, ...) |
15804 | return done; | 16014 | return done; |
15805 | } | 16015 | } |
15806 | 16016 | ||
@@ -15808,7 +16018,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c | |||
15808 | int | 16018 | int |
15809 | attribute_compat_text_section | 16019 | attribute_compat_text_section |
15810 | __nldbl___swprintf_chk (wchar_t *s, size_t n, int flag, size_t slen, | 16020 | __nldbl___swprintf_chk (wchar_t *s, size_t n, int flag, size_t slen, |
15811 | @@ -577,6 +594,7 @@ __nldbl___swprintf_chk (wchar_t *s, size | 16021 | @@ -577,6 +594,7 @@ __nldbl___swprintf_chk (wchar_t *s, size_t n, int flag, size_t slen, |
15812 | 16022 | ||
15813 | return done; | 16023 | return done; |
15814 | } | 16024 | } |
@@ -15816,7 +16026,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c | |||
15816 | 16026 | ||
15817 | int | 16027 | int |
15818 | attribute_compat_text_section | 16028 | attribute_compat_text_section |
15819 | @@ -590,6 +608,7 @@ __nldbl___vfprintf_chk (FILE *s, int fla | 16029 | @@ -590,6 +608,7 @@ __nldbl___vfprintf_chk (FILE *s, int flag, const char *fmt, va_list ap) |
15820 | } | 16030 | } |
15821 | libc_hidden_def (__nldbl___vfprintf_chk) | 16031 | libc_hidden_def (__nldbl___vfprintf_chk) |
15822 | 16032 | ||
@@ -15824,7 +16034,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c | |||
15824 | int | 16034 | int |
15825 | attribute_compat_text_section | 16035 | attribute_compat_text_section |
15826 | __nldbl___vfwprintf_chk (FILE *s, int flag, const wchar_t *fmt, va_list ap) | 16036 | __nldbl___vfwprintf_chk (FILE *s, int flag, const wchar_t *fmt, va_list ap) |
15827 | @@ -601,6 +620,7 @@ __nldbl___vfwprintf_chk (FILE *s, int fl | 16037 | @@ -601,6 +620,7 @@ __nldbl___vfwprintf_chk (FILE *s, int flag, const wchar_t *fmt, va_list ap) |
15828 | return res; | 16038 | return res; |
15829 | } | 16039 | } |
15830 | libc_hidden_def (__nldbl___vfwprintf_chk) | 16040 | libc_hidden_def (__nldbl___vfwprintf_chk) |
@@ -15832,7 +16042,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c | |||
15832 | 16042 | ||
15833 | int | 16043 | int |
15834 | attribute_compat_text_section | 16044 | attribute_compat_text_section |
15835 | @@ -635,6 +655,7 @@ __nldbl___vsprintf_chk (char *string, in | 16045 | @@ -635,6 +655,7 @@ __nldbl___vsprintf_chk (char *string, int flag, size_t slen, const char *fmt, |
15836 | } | 16046 | } |
15837 | libc_hidden_def (__nldbl___vsprintf_chk) | 16047 | libc_hidden_def (__nldbl___vsprintf_chk) |
15838 | 16048 | ||
@@ -15840,7 +16050,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c | |||
15840 | int | 16050 | int |
15841 | attribute_compat_text_section | 16051 | attribute_compat_text_section |
15842 | __nldbl___vswprintf_chk (wchar_t *string, size_t maxlen, int flag, size_t slen, | 16052 | __nldbl___vswprintf_chk (wchar_t *string, size_t maxlen, int flag, size_t slen, |
15843 | @@ -668,6 +689,7 @@ __nldbl___wprintf_chk (int flag, const w | 16053 | @@ -668,6 +689,7 @@ __nldbl___wprintf_chk (int flag, const wchar_t *fmt, ...) |
15844 | 16054 | ||
15845 | return done; | 16055 | return done; |
15846 | } | 16056 | } |
@@ -15848,7 +16058,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c | |||
15848 | 16058 | ||
15849 | int | 16059 | int |
15850 | attribute_compat_text_section | 16060 | attribute_compat_text_section |
15851 | @@ -775,6 +797,7 @@ __nldbl___printf_fp (FILE *fp, const str | 16061 | @@ -775,6 +797,7 @@ __nldbl___printf_fp (FILE *fp, const struct printf_info *info, |
15852 | return ___printf_fp (fp, &info_no_ldbl, args); | 16062 | return ___printf_fp (fp, &info_no_ldbl, args); |
15853 | } | 16063 | } |
15854 | 16064 | ||
@@ -15856,7 +16066,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c | |||
15856 | ssize_t | 16066 | ssize_t |
15857 | attribute_compat_text_section | 16067 | attribute_compat_text_section |
15858 | __nldbl_strfmon (char *s, size_t maxsize, const char *format, ...) | 16068 | __nldbl_strfmon (char *s, size_t maxsize, const char *format, ...) |
15859 | @@ -829,6 +852,7 @@ __nldbl___vstrfmon_l (char *s, size_t ma | 16069 | @@ -829,6 +852,7 @@ __nldbl___vstrfmon_l (char *s, size_t maxsize, __locale_t loc, |
15860 | return res; | 16070 | return res; |
15861 | } | 16071 | } |
15862 | libc_hidden_def (__nldbl___vstrfmon_l) | 16072 | libc_hidden_def (__nldbl___vstrfmon_l) |
@@ -15864,7 +16074,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c | |||
15864 | 16074 | ||
15865 | void | 16075 | void |
15866 | attribute_compat_text_section | 16076 | attribute_compat_text_section |
15867 | @@ -941,6 +965,7 @@ __nldbl___isoc99_scanf (const char *fmt, | 16077 | @@ -941,6 +965,7 @@ __nldbl___isoc99_scanf (const char *fmt, ...) |
15868 | return done; | 16078 | return done; |
15869 | } | 16079 | } |
15870 | 16080 | ||
@@ -15872,7 +16082,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c | |||
15872 | int | 16082 | int |
15873 | attribute_compat_text_section | 16083 | attribute_compat_text_section |
15874 | __nldbl___isoc99_vfwscanf (FILE *s, const wchar_t *fmt, va_list ap) | 16084 | __nldbl___isoc99_vfwscanf (FILE *s, const wchar_t *fmt, va_list ap) |
15875 | @@ -1014,6 +1039,7 @@ __nldbl___isoc99_wscanf (const wchar_t * | 16085 | @@ -1014,6 +1039,7 @@ __nldbl___isoc99_wscanf (const wchar_t *fmt, ...) |
15876 | 16086 | ||
15877 | return done; | 16087 | return done; |
15878 | } | 16088 | } |
@@ -15880,7 +16090,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c | |||
15880 | 16090 | ||
15881 | #if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0) | 16091 | #if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0) |
15882 | compat_symbol (libc, __nldbl__IO_printf, _IO_printf, GLIBC_2_0); | 16092 | compat_symbol (libc, __nldbl__IO_printf, _IO_printf, GLIBC_2_0); |
15883 | @@ -1057,6 +1083,7 @@ compat_symbol (libc, __nldbl_printf_size | 16093 | @@ -1057,6 +1083,7 @@ compat_symbol (libc, __nldbl_printf_size, printf_size, GLIBC_2_1); |
15884 | compat_symbol (libc, __nldbl___strfmon_l, __strfmon_l, GLIBC_2_1); | 16094 | compat_symbol (libc, __nldbl___strfmon_l, __strfmon_l, GLIBC_2_1); |
15885 | #endif | 16095 | #endif |
15886 | #if LONG_DOUBLE_COMPAT(libc, GLIBC_2_2) | 16096 | #if LONG_DOUBLE_COMPAT(libc, GLIBC_2_2) |
@@ -15888,7 +16098,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c | |||
15888 | compat_symbol (libc, __nldbl_swprintf, swprintf, GLIBC_2_2); | 16098 | compat_symbol (libc, __nldbl_swprintf, swprintf, GLIBC_2_2); |
15889 | compat_symbol (libc, __nldbl_vwprintf, vwprintf, GLIBC_2_2); | 16099 | compat_symbol (libc, __nldbl_vwprintf, vwprintf, GLIBC_2_2); |
15890 | compat_symbol (libc, __nldbl_wprintf, wprintf, GLIBC_2_2); | 16100 | compat_symbol (libc, __nldbl_wprintf, wprintf, GLIBC_2_2); |
15891 | @@ -1069,6 +1096,7 @@ compat_symbol (libc, __nldbl_vfwscanf, v | 16101 | @@ -1069,6 +1096,7 @@ compat_symbol (libc, __nldbl_vfwscanf, vfwscanf, GLIBC_2_2); |
15892 | compat_symbol (libc, __nldbl_vswscanf, vswscanf, GLIBC_2_2); | 16102 | compat_symbol (libc, __nldbl_vswscanf, vswscanf, GLIBC_2_2); |
15893 | compat_symbol (libc, __nldbl_vwscanf, vwscanf, GLIBC_2_2); | 16103 | compat_symbol (libc, __nldbl_vwscanf, vwscanf, GLIBC_2_2); |
15894 | compat_symbol (libc, __nldbl_wscanf, wscanf, GLIBC_2_2); | 16104 | compat_symbol (libc, __nldbl_wscanf, wscanf, GLIBC_2_2); |
@@ -15896,10 +16106,10 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c | |||
15896 | #endif | 16106 | #endif |
15897 | #if LONG_DOUBLE_COMPAT(libc, GLIBC_2_3) | 16107 | #if LONG_DOUBLE_COMPAT(libc, GLIBC_2_3) |
15898 | compat_symbol (libc, __nldbl_strfmon_l, strfmon_l, GLIBC_2_3); | 16108 | compat_symbol (libc, __nldbl_strfmon_l, strfmon_l, GLIBC_2_3); |
15899 | Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.h | 16109 | diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-compat.h b/sysdeps/ieee754/ldbl-opt/nldbl-compat.h |
15900 | =================================================================== | 16110 | index 0d2c8af..f4cea50 100644 |
15901 | --- git.orig/sysdeps/ieee754/ldbl-opt/nldbl-compat.h | 16111 | --- a/sysdeps/ieee754/ldbl-opt/nldbl-compat.h |
15902 | +++ git/sysdeps/ieee754/ldbl-opt/nldbl-compat.h | 16112 | +++ b/sysdeps/ieee754/ldbl-opt/nldbl-compat.h |
15903 | @@ -30,6 +30,7 @@ | 16113 | @@ -30,6 +30,7 @@ |
15904 | #include <math.h> | 16114 | #include <math.h> |
15905 | #include <monetary.h> | 16115 | #include <monetary.h> |
@@ -15947,7 +16157,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.h | |||
15947 | 16157 | ||
15948 | /* This one does not exist in the normal interface, only | 16158 | /* This one does not exist in the normal interface, only |
15949 | __nldbl___vstrfmon really exists. */ | 16159 | __nldbl___vstrfmon really exists. */ |
15950 | @@ -82,22 +85,23 @@ extern ssize_t __nldbl___vstrfmon (char | 16160 | @@ -82,22 +85,23 @@ extern ssize_t __nldbl___vstrfmon (char *, size_t, const char *, va_list) |
15951 | since we don't compile with _FORTIFY_SOURCE. */ | 16161 | since we don't compile with _FORTIFY_SOURCE. */ |
15952 | extern int __nldbl___vfprintf_chk (FILE *__restrict, int, | 16162 | extern int __nldbl___vfprintf_chk (FILE *__restrict, int, |
15953 | const char *__restrict, _G_va_list); | 16163 | const char *__restrict, _G_va_list); |
@@ -15977,10 +16187,286 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.h | |||
15977 | +#endif | 16187 | +#endif |
15978 | 16188 | ||
15979 | #endif /* __NLDBL_COMPAT_H */ | 16189 | #endif /* __NLDBL_COMPAT_H */ |
15980 | Index: git/sysdeps/unix/sysv/linux/gethostid.c | 16190 | diff --git a/sysdeps/nptl/Makefile b/sysdeps/nptl/Makefile |
15981 | =================================================================== | 16191 | index e9339a3..782009b 100644 |
15982 | --- git.orig/sysdeps/unix/sysv/linux/gethostid.c | 16192 | --- a/sysdeps/nptl/Makefile |
15983 | +++ git/sysdeps/unix/sysv/linux/gethostid.c | 16193 | +++ b/sysdeps/nptl/Makefile |
16194 | @@ -18,6 +18,9 @@ | ||
16195 | |||
16196 | ifeq ($(subdir),nptl) | ||
16197 | libpthread-sysdep_routines += errno-loc | ||
16198 | +ifeq ($(OPTION_EGLIBC_BIG_MACROS),n) | ||
16199 | +sysdep_routines += small-macros-fns | ||
16200 | +endif | ||
16201 | endif | ||
16202 | |||
16203 | ifeq ($(subdir),rt) | ||
16204 | diff --git a/sysdeps/nptl/bits/libc-lock.h b/sysdeps/nptl/bits/libc-lock.h | ||
16205 | index 5599cf1..b839378 100644 | ||
16206 | --- a/sysdeps/nptl/bits/libc-lock.h | ||
16207 | +++ b/sysdeps/nptl/bits/libc-lock.h | ||
16208 | @@ -24,6 +24,14 @@ | ||
16209 | #include <stddef.h> | ||
16210 | |||
16211 | |||
16212 | +#ifdef _LIBC | ||
16213 | +# include <lowlevellock.h> | ||
16214 | +# include <tls.h> | ||
16215 | +# include <pthread-functions.h> | ||
16216 | +# include <errno.h> /* For EBUSY. */ | ||
16217 | +# include <gnu/option-groups.h> /* For __OPTION_EGLIBC_BIG_MACROS. */ | ||
16218 | +#endif | ||
16219 | + | ||
16220 | /* Mutex type. */ | ||
16221 | #if defined _LIBC || defined _IO_MTSAFE_IO | ||
16222 | # if (!IS_IN (libc) && !IS_IN (libpthread)) || !defined _LIBC | ||
16223 | @@ -87,6 +95,15 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t; | ||
16224 | |||
16225 | /* Lock the recursive named lock variable. */ | ||
16226 | #if defined _LIBC && (IS_IN (libc) || IS_IN (libpthread)) | ||
16227 | +# if __OPTION_EGLIBC_BIG_MACROS != 1 | ||
16228 | +/* EGLIBC: Declare wrapper function for a big macro if either | ||
16229 | + !__OPTION_EGLIBC_BIG_MACROS or we are using a back door from | ||
16230 | + small-macros-fns.c (__OPTION_EGLIBC_BIG_MACROS == 2). */ | ||
16231 | +extern void __libc_lock_lock_recursive_fn (__libc_lock_recursive_t *); | ||
16232 | +libc_hidden_proto (__libc_lock_lock_recursive_fn); | ||
16233 | +# endif /* __OPTION_EGLIBC_BIG_MACROS != 1 */ | ||
16234 | +# if __OPTION_EGLIBC_BIG_MACROS | ||
16235 | + | ||
16236 | # define __libc_lock_lock_recursive(NAME) \ | ||
16237 | do { \ | ||
16238 | void *self = THREAD_SELF; \ | ||
16239 | @@ -97,6 +114,10 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t; | ||
16240 | } \ | ||
16241 | ++(NAME).cnt; \ | ||
16242 | } while (0) | ||
16243 | +# else | ||
16244 | +# define __libc_lock_lock_recursive(NAME) \ | ||
16245 | + __libc_lock_lock_recursive_fn (&(NAME)) | ||
16246 | +# endif /* __OPTION_EGLIBC_BIG_MACROS */ | ||
16247 | #else | ||
16248 | # define __libc_lock_lock_recursive(NAME) \ | ||
16249 | __libc_maybe_call (__pthread_mutex_lock, (&(NAME).mutex), 0) | ||
16250 | @@ -104,6 +125,14 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t; | ||
16251 | |||
16252 | /* Try to lock the recursive named lock variable. */ | ||
16253 | #if defined _LIBC && (IS_IN (libc) || IS_IN (libpthread)) | ||
16254 | +# if __OPTION_EGLIBC_BIG_MACROS != 1 | ||
16255 | +/* EGLIBC: Declare wrapper function for a big macro if either | ||
16256 | + !__OPTION_EGLIBC_BIG_MACROS or we are using a back door from | ||
16257 | + small-macros-fns.c (__OPTION_EGLIBC_BIG_MACROS == 2). */ | ||
16258 | +extern int __libc_lock_trylock_recursive_fn (__libc_lock_recursive_t *); | ||
16259 | +libc_hidden_proto (__libc_lock_trylock_recursive_fn); | ||
16260 | +# endif /* __OPTION_EGLIBC_BIG_MACROS != 1 */ | ||
16261 | +# if __OPTION_EGLIBC_BIG_MACROS | ||
16262 | # define __libc_lock_trylock_recursive(NAME) \ | ||
16263 | ({ \ | ||
16264 | int result = 0; \ | ||
16265 | @@ -122,6 +151,10 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t; | ||
16266 | ++(NAME).cnt; \ | ||
16267 | result; \ | ||
16268 | }) | ||
16269 | +# else | ||
16270 | +# define __libc_lock_trylock_recursive(NAME) \ | ||
16271 | + __libc_lock_trylock_recursive_fn (&(NAME)) | ||
16272 | +# endif /* __OPTION_EGLIBC_BIG_MACROS */ | ||
16273 | #else | ||
16274 | # define __libc_lock_trylock_recursive(NAME) \ | ||
16275 | __libc_maybe_call (__pthread_mutex_trylock, (&(NAME).mutex), 0) | ||
16276 | @@ -129,6 +162,14 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t; | ||
16277 | |||
16278 | /* Unlock the recursive named lock variable. */ | ||
16279 | #if defined _LIBC && (IS_IN (libc) || IS_IN (libpthread)) | ||
16280 | +# if __OPTION_EGLIBC_BIG_MACROS != 1 | ||
16281 | +/* EGLIBC: Declare wrapper function for a big macro if either | ||
16282 | + !__OPTION_EGLIBC_BIG_MACROS, or we are using a back door from | ||
16283 | + small-macros-fns.c (__OPTION_EGLIBC_BIG_MACROS == 2). */ | ||
16284 | +extern void __libc_lock_unlock_recursive_fn (__libc_lock_recursive_t *); | ||
16285 | +libc_hidden_proto (__libc_lock_unlock_recursive_fn); | ||
16286 | +# endif /* __OPTION_EGLIBC_BIG_MACROS != 1 */ | ||
16287 | +# if __OPTION_EGLIBC_BIG_MACROS | ||
16288 | /* We do no error checking here. */ | ||
16289 | # define __libc_lock_unlock_recursive(NAME) \ | ||
16290 | do { \ | ||
16291 | @@ -138,6 +179,10 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t; | ||
16292 | lll_unlock ((NAME).lock, LLL_PRIVATE); \ | ||
16293 | } \ | ||
16294 | } while (0) | ||
16295 | +# else | ||
16296 | +# define __libc_lock_unlock_recursive(NAME) \ | ||
16297 | + __libc_lock_unlock_recursive_fn (&(NAME)) | ||
16298 | +# endif /* __OPTION_EGLIBC_BIG_MACROS */ | ||
16299 | #else | ||
16300 | # define __libc_lock_unlock_recursive(NAME) \ | ||
16301 | __libc_maybe_call (__pthread_mutex_unlock, (&(NAME).mutex), 0) | ||
16302 | diff --git a/sysdeps/nptl/bits/libc-lockP.h b/sysdeps/nptl/bits/libc-lockP.h | ||
16303 | index f55f621..da98869 100644 | ||
16304 | --- a/sysdeps/nptl/bits/libc-lockP.h | ||
16305 | +++ b/sysdeps/nptl/bits/libc-lockP.h | ||
16306 | @@ -33,6 +33,8 @@ | ||
16307 | #include <lowlevellock.h> | ||
16308 | #include <tls.h> | ||
16309 | #include <pthread-functions.h> | ||
16310 | +#include <errno.h> /* For EBUSY. */ | ||
16311 | +#include <gnu/option-groups.h> /* For __OPTION_EGLIBC_BIG_MACROS. */ | ||
16312 | |||
16313 | #if IS_IN (libpthread) | ||
16314 | /* This gets us the declarations of the __pthread_* internal names, | ||
16315 | @@ -171,10 +173,22 @@ typedef pthread_key_t __libc_key_t; | ||
16316 | |||
16317 | /* Lock the named lock variable. */ | ||
16318 | #if IS_IN (libc) || IS_IN (libpthread) | ||
16319 | -# ifndef __libc_lock_lock | ||
16320 | -# define __libc_lock_lock(NAME) \ | ||
16321 | +# if __OPTION_EGLIBC_BIG_MACROS != 1 | ||
16322 | +/* EGLIBC: Declare wrapper function for a big macro if either | ||
16323 | + !__OPTION_EGLIBC_BIG_MACROS or we are using a back door from | ||
16324 | + small-macros-fns.c (__OPTION_EGLIBC_BIG_MACROS == 2). */ | ||
16325 | +extern void __libc_lock_lock_fn (__libc_lock_t *); | ||
16326 | +libc_hidden_proto (__libc_lock_lock_fn); | ||
16327 | +# endif /* __OPTION_EGLIBC_BIG_MACROS != 1 */ | ||
16328 | +# if __OPTION_EGLIBC_BIG_MACROS | ||
16329 | +# ifndef __libc_lock_lock | ||
16330 | +# define __libc_lock_lock(NAME) \ | ||
16331 | ({ lll_lock (NAME, LLL_PRIVATE); 0; }) | ||
16332 | -# endif | ||
16333 | +# endif | ||
16334 | +# else | ||
16335 | +# define __libc_lock_lock(NAME) \ | ||
16336 | + __libc_lock_lock_fn (&(NAME)) | ||
16337 | +# endif /* __OPTION_EGLIBC_BIG_MACROS */ | ||
16338 | #else | ||
16339 | # undef __libc_lock_lock | ||
16340 | # define __libc_lock_lock(NAME) \ | ||
16341 | @@ -187,10 +201,22 @@ typedef pthread_key_t __libc_key_t; | ||
16342 | |||
16343 | /* Try to lock the named lock variable. */ | ||
16344 | #if IS_IN (libc) || IS_IN (libpthread) | ||
16345 | -# ifndef __libc_lock_trylock | ||
16346 | -# define __libc_lock_trylock(NAME) \ | ||
16347 | +# if __OPTION_EGLIBC_BIG_MACROS != 1 | ||
16348 | +/* EGLIBC: Declare wrapper function for a big macro if either | ||
16349 | + !__OPTION_EGLIBC_BIG_MACROS or we are using a back door from | ||
16350 | + small-macros-fns.c (__OPTION_EGLIBC_BIG_MACROS == 2). */ | ||
16351 | +extern int __libc_lock_trylock_fn (__libc_lock_t *); | ||
16352 | +libc_hidden_proto (__libc_lock_trylock_fn); | ||
16353 | +# endif /* __OPTION_EGLIBC_BIG_MACROS != 1 */ | ||
16354 | +# if __OPTION_EGLIBC_BIG_MACROS | ||
16355 | +# ifndef __libc_lock_trylock | ||
16356 | +# define __libc_lock_trylock(NAME) \ | ||
16357 | lll_trylock (NAME) | ||
16358 | -# endif | ||
16359 | +# endif | ||
16360 | +# else | ||
16361 | +# define __libc_lock_trylock(NAME) \ | ||
16362 | + __libc_lock_trylock_fn (&(NAME)) | ||
16363 | +# endif /* __OPTION_EGLIBC_BIG_MACROS */ | ||
16364 | #else | ||
16365 | # undef __libc_lock_trylock | ||
16366 | # define __libc_lock_trylock(NAME) \ | ||
16367 | @@ -206,8 +232,20 @@ typedef pthread_key_t __libc_key_t; | ||
16368 | |||
16369 | /* Unlock the named lock variable. */ | ||
16370 | #if IS_IN (libc) || IS_IN (libpthread) | ||
16371 | +# if __OPTION_EGLIBC_BIG_MACROS != 1 | ||
16372 | +/* EGLIBC: Declare wrapper function for a big macro if either | ||
16373 | + !__OPTION_EGLIBC_BIG_MACROS, or we are using a back door from | ||
16374 | + small-macros-fns.c (__OPTION_EGLIBC_BIG_MACROS == 2). */ | ||
16375 | +extern void __libc_lock_unlock_fn (__libc_lock_t *); | ||
16376 | +libc_hidden_proto (__libc_lock_unlock_fn); | ||
16377 | +# endif /* __OPTION_EGLIBC_BIG_MACROS != 1 */ | ||
16378 | +# if __OPTION_EGLIBC_BIG_MACROS | ||
16379 | # define __libc_lock_unlock(NAME) \ | ||
16380 | lll_unlock (NAME, LLL_PRIVATE) | ||
16381 | +# else | ||
16382 | +# define __libc_lock_unlock(NAME) \ | ||
16383 | + __libc_lock_unlock_fn (&(NAME)) | ||
16384 | +# endif /* __OPTION_EGLIBC_BIG_MACROS */ | ||
16385 | #else | ||
16386 | # define __libc_lock_unlock(NAME) \ | ||
16387 | __libc_maybe_call (__pthread_mutex_unlock, (&(NAME)), 0) | ||
16388 | diff --git a/sysdeps/nptl/small-macros-fns.c b/sysdeps/nptl/small-macros-fns.c | ||
16389 | new file mode 100644 | ||
16390 | index 0000000..f751053 | ||
16391 | --- /dev/null | ||
16392 | +++ b/sysdeps/nptl/small-macros-fns.c | ||
16393 | @@ -0,0 +1,72 @@ | ||
16394 | +/* EGLIBC: function wrappers for big macros. | ||
16395 | + Copyright (C) 2009 Free Software Foundation, Inc. | ||
16396 | + This file is part of the GNU C Library. | ||
16397 | + | ||
16398 | + The GNU C Library is free software; you can redistribute it and/or | ||
16399 | + modify it under the terms of the GNU Lesser General Public License as | ||
16400 | + published by the Free Software Foundation; either version 2.1 of the | ||
16401 | + License, or (at your option) any later version. | ||
16402 | + | ||
16403 | + The GNU C Library is distributed in the hope that it will be useful, | ||
16404 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16405 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16406 | + Lesser General Public License for more details. | ||
16407 | + | ||
16408 | + You should have received a copy of the GNU Lesser General Public | ||
16409 | + License along with the GNU C Library; see the file COPYING.LIB. If not, | ||
16410 | + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
16411 | + Boston, MA 02111-1307, USA. */ | ||
16412 | + | ||
16413 | +#include <gnu/option-groups.h> | ||
16414 | + | ||
16415 | +/* Handle macros from ./bits/libc-lock.h. */ | ||
16416 | +#if defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread) | ||
16417 | + | ||
16418 | +/* Get the macros for function bodies through a back door. */ | ||
16419 | +# undef __OPTION_EGLIBC_BIG_MACROS | ||
16420 | +# define __OPTION_EGLIBC_BIG_MACROS 2 | ||
16421 | +# include <bits/libc-lock.h> | ||
16422 | + | ||
16423 | +void | ||
16424 | +__libc_lock_lock_fn (__libc_lock_t *name) | ||
16425 | +{ | ||
16426 | + __libc_lock_lock (*name); | ||
16427 | +} | ||
16428 | +libc_hidden_def (__libc_lock_lock_fn); | ||
16429 | + | ||
16430 | +void | ||
16431 | +__libc_lock_lock_recursive_fn (__libc_lock_recursive_t *name) | ||
16432 | +{ | ||
16433 | + __libc_lock_lock_recursive (*name); | ||
16434 | +} | ||
16435 | +libc_hidden_def (__libc_lock_lock_recursive_fn); | ||
16436 | + | ||
16437 | +int | ||
16438 | +__libc_lock_trylock_fn (__libc_lock_t *name) | ||
16439 | +{ | ||
16440 | + return __libc_lock_trylock (*name); | ||
16441 | +} | ||
16442 | +libc_hidden_def (__libc_lock_trylock_fn); | ||
16443 | + | ||
16444 | +int | ||
16445 | +__libc_lock_trylock_recursive_fn (__libc_lock_recursive_t *name) | ||
16446 | +{ | ||
16447 | + return __libc_lock_trylock_recursive (*name); | ||
16448 | +} | ||
16449 | +libc_hidden_def (__libc_lock_trylock_recursive_fn); | ||
16450 | + | ||
16451 | +void | ||
16452 | +__libc_lock_unlock_fn (__libc_lock_t *name) | ||
16453 | +{ | ||
16454 | + __libc_lock_unlock (*name); | ||
16455 | +} | ||
16456 | +libc_hidden_def (__libc_lock_unlock_fn); | ||
16457 | + | ||
16458 | +void | ||
16459 | +__libc_lock_unlock_recursive_fn (__libc_lock_recursive_t *name) | ||
16460 | +{ | ||
16461 | + __libc_lock_unlock_recursive (*name); | ||
16462 | +} | ||
16463 | +libc_hidden_def (__libc_lock_unlock_recursive_fn); | ||
16464 | + | ||
16465 | +#endif /*defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread)*/ | ||
16466 | diff --git a/sysdeps/unix/sysv/linux/gethostid.c b/sysdeps/unix/sysv/linux/gethostid.c | ||
16467 | index 26e4692..d0a26c8 100644 | ||
16468 | --- a/sysdeps/unix/sysv/linux/gethostid.c | ||
16469 | +++ b/sysdeps/unix/sysv/linux/gethostid.c | ||
15984 | @@ -21,6 +21,7 @@ | 16470 | @@ -21,6 +21,7 @@ |
15985 | #include <unistd.h> | 16471 | #include <unistd.h> |
15986 | #include <netdb.h> | 16472 | #include <netdb.h> |
@@ -16007,10 +16493,10 @@ Index: git/sysdeps/unix/sysv/linux/gethostid.c | |||
16007 | +#endif | 16493 | +#endif |
16008 | } | 16494 | } |
16009 | #endif | 16495 | #endif |
16010 | Index: git/sysdeps/unix/sysv/linux/libc_fatal.c | 16496 | diff --git a/sysdeps/unix/sysv/linux/libc_fatal.c b/sysdeps/unix/sysv/linux/libc_fatal.c |
16011 | =================================================================== | 16497 | index 53a8bbb..cb110d4 100644 |
16012 | --- git.orig/sysdeps/unix/sysv/linux/libc_fatal.c | 16498 | --- a/sysdeps/unix/sysv/linux/libc_fatal.c |
16013 | +++ git/sysdeps/unix/sysv/linux/libc_fatal.c | 16499 | +++ b/sysdeps/unix/sysv/linux/libc_fatal.c |
16014 | @@ -23,6 +23,7 @@ | 16500 | @@ -23,6 +23,7 @@ |
16015 | #include <string.h> | 16501 | #include <string.h> |
16016 | #include <sys/mman.h> | 16502 | #include <sys/mman.h> |
@@ -16019,7 +16505,7 @@ Index: git/sysdeps/unix/sysv/linux/libc_fatal.c | |||
16019 | 16505 | ||
16020 | static bool | 16506 | static bool |
16021 | writev_for_fatal (int fd, const struct iovec *iov, size_t niov, size_t total) | 16507 | writev_for_fatal (int fd, const struct iovec *iov, size_t niov, size_t total) |
16022 | @@ -40,6 +41,7 @@ writev_for_fatal (int fd, const struct i | 16508 | @@ -40,6 +41,7 @@ writev_for_fatal (int fd, const struct iovec *iov, size_t niov, size_t total) |
16023 | static void | 16509 | static void |
16024 | backtrace_and_maps (int do_abort, bool written, int fd) | 16510 | backtrace_and_maps (int do_abort, bool written, int fd) |
16025 | { | 16511 | { |
@@ -16027,7 +16513,7 @@ Index: git/sysdeps/unix/sysv/linux/libc_fatal.c | |||
16027 | if (do_abort > 1 && written) | 16513 | if (do_abort > 1 && written) |
16028 | { | 16514 | { |
16029 | void *addrs[64]; | 16515 | void *addrs[64]; |
16030 | @@ -62,6 +64,7 @@ backtrace_and_maps (int do_abort, bool w | 16516 | @@ -62,6 +64,7 @@ backtrace_and_maps (int do_abort, bool written, int fd) |
16031 | close_not_cancel_no_status (fd2); | 16517 | close_not_cancel_no_status (fd2); |
16032 | } | 16518 | } |
16033 | } | 16519 | } |
@@ -16035,10 +16521,10 @@ Index: git/sysdeps/unix/sysv/linux/libc_fatal.c | |||
16035 | } | 16521 | } |
16036 | #define BEFORE_ABORT backtrace_and_maps | 16522 | #define BEFORE_ABORT backtrace_and_maps |
16037 | 16523 | ||
16038 | Index: git/time/Makefile | 16524 | diff --git a/time/Makefile b/time/Makefile |
16039 | =================================================================== | 16525 | index a411f62..2d022ca 100644 |
16040 | --- git.orig/time/Makefile | 16526 | --- a/time/Makefile |
16041 | +++ git/time/Makefile | 16527 | +++ b/time/Makefile |
16042 | @@ -18,6 +18,8 @@ | 16528 | @@ -18,6 +18,8 @@ |
16043 | # | 16529 | # |
16044 | # Makefile for time routines | 16530 | # Makefile for time routines |
@@ -16048,7 +16534,7 @@ Index: git/time/Makefile | |||
16048 | subdir := time | 16534 | subdir := time |
16049 | 16535 | ||
16050 | include ../Makeconfig | 16536 | include ../Makeconfig |
16051 | @@ -30,15 +32,23 @@ routines := offtime asctime clock ctime | 16537 | @@ -30,15 +32,23 @@ routines := offtime asctime clock ctime ctime_r difftime \ |
16052 | tzfile getitimer setitimer \ | 16538 | tzfile getitimer setitimer \ |
16053 | stime dysize timegm ftime \ | 16539 | stime dysize timegm ftime \ |
16054 | getdate strptime strptime_l \ | 16540 | getdate strptime strptime_l \ |
@@ -16076,10 +16562,10 @@ Index: git/time/Makefile | |||
16076 | include ../Rules | 16562 | include ../Rules |
16077 | 16563 | ||
16078 | tz-cflags = -DTZDIR='"$(zonedir)"' \ | 16564 | tz-cflags = -DTZDIR='"$(zonedir)"' \ |
16079 | Index: git/time/strftime_l.c | 16565 | diff --git a/time/strftime_l.c b/time/strftime_l.c |
16080 | =================================================================== | 16566 | index b48ef34..bfdd618 100644 |
16081 | --- git.orig/time/strftime_l.c | 16567 | --- a/time/strftime_l.c |
16082 | +++ git/time/strftime_l.c | 16568 | +++ b/time/strftime_l.c |
16083 | @@ -35,6 +35,10 @@ | 16569 | @@ -35,6 +35,10 @@ |
16084 | # include "../locale/localeinfo.h" | 16570 | # include "../locale/localeinfo.h" |
16085 | #endif | 16571 | #endif |
@@ -16091,7 +16577,7 @@ Index: git/time/strftime_l.c | |||
16091 | #if defined emacs && !defined HAVE_BCOPY | 16577 | #if defined emacs && !defined HAVE_BCOPY |
16092 | # define HAVE_MEMCPY 1 | 16578 | # define HAVE_MEMCPY 1 |
16093 | #endif | 16579 | #endif |
16094 | @@ -882,7 +886,7 @@ __strftime_internal (s, maxsize, format, | 16580 | @@ -882,7 +886,7 @@ __strftime_internal (s, maxsize, format, tp, tzset_called ut_argument |
16095 | case L_('C'): | 16581 | case L_('C'): |
16096 | if (modifier == L_('E')) | 16582 | if (modifier == L_('E')) |
16097 | { | 16583 | { |
@@ -16100,7 +16586,7 @@ Index: git/time/strftime_l.c | |||
16100 | struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG); | 16586 | struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG); |
16101 | if (era) | 16587 | if (era) |
16102 | { | 16588 | { |
16103 | @@ -955,7 +959,7 @@ __strftime_internal (s, maxsize, format, | 16589 | @@ -955,7 +959,7 @@ __strftime_internal (s, maxsize, format, tp, tzset_called ut_argument |
16104 | 16590 | ||
16105 | if (modifier == L_('O') && 0 <= number_value) | 16591 | if (modifier == L_('O') && 0 <= number_value) |
16106 | { | 16592 | { |
@@ -16109,7 +16595,7 @@ Index: git/time/strftime_l.c | |||
16109 | /* Get the locale specific alternate representation of | 16595 | /* Get the locale specific alternate representation of |
16110 | the number NUMBER_VALUE. If none exist NULL is returned. */ | 16596 | the number NUMBER_VALUE. If none exist NULL is returned. */ |
16111 | const CHAR_T *cp = nl_get_alt_digit (number_value | 16597 | const CHAR_T *cp = nl_get_alt_digit (number_value |
16112 | @@ -1260,7 +1264,7 @@ __strftime_internal (s, maxsize, format, | 16598 | @@ -1260,7 +1264,7 @@ __strftime_internal (s, maxsize, format, tp, tzset_called ut_argument |
16113 | case L_('Y'): | 16599 | case L_('Y'): |
16114 | if (modifier == 'E') | 16600 | if (modifier == 'E') |
16115 | { | 16601 | { |
@@ -16118,7 +16604,7 @@ Index: git/time/strftime_l.c | |||
16118 | struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG); | 16604 | struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG); |
16119 | if (era) | 16605 | if (era) |
16120 | { | 16606 | { |
16121 | @@ -1285,7 +1289,7 @@ __strftime_internal (s, maxsize, format, | 16607 | @@ -1285,7 +1289,7 @@ __strftime_internal (s, maxsize, format, tp, tzset_called ut_argument |
16122 | case L_('y'): | 16608 | case L_('y'): |
16123 | if (modifier == L_('E')) | 16609 | if (modifier == L_('E')) |
16124 | { | 16610 | { |
@@ -16127,10 +16613,10 @@ Index: git/time/strftime_l.c | |||
16127 | struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG); | 16613 | struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG); |
16128 | if (era) | 16614 | if (era) |
16129 | { | 16615 | { |
16130 | Index: git/time/strptime_l.c | 16616 | diff --git a/time/strptime_l.c b/time/strptime_l.c |
16131 | =================================================================== | 16617 | index 5640cce..784ccbc 100644 |
16132 | --- git.orig/time/strptime_l.c | 16618 | --- a/time/strptime_l.c |
16133 | +++ git/time/strptime_l.c | 16619 | +++ b/time/strptime_l.c |
16134 | @@ -29,6 +29,7 @@ | 16620 | @@ -29,6 +29,7 @@ |
16135 | 16621 | ||
16136 | #ifdef _LIBC | 16622 | #ifdef _LIBC |
@@ -16148,7 +16634,7 @@ Index: git/time/strptime_l.c | |||
16148 | # define get_alt_number(from, to, n) \ | 16634 | # define get_alt_number(from, to, n) \ |
16149 | ({ \ | 16635 | ({ \ |
16150 | __label__ do_normal; \ | 16636 | __label__ do_normal; \ |
16151 | @@ -257,8 +258,10 @@ __strptime_internal (rp, fmt, tmp, state | 16637 | @@ -257,8 +258,10 @@ __strptime_internal (rp, fmt, tmp, statep LOCALE_PARAM) |
16152 | int cnt; | 16638 | int cnt; |
16153 | int cnt_longest; | 16639 | int cnt_longest; |
16154 | size_t val; | 16640 | size_t val; |
@@ -16159,7 +16645,7 @@ Index: git/time/strptime_l.c | |||
16159 | enum ptime_locale_status { not, loc, raw } decided_longest; | 16645 | enum ptime_locale_status { not, loc, raw } decided_longest; |
16160 | struct __strptime_state | 16646 | struct __strptime_state |
16161 | { | 16647 | { |
16162 | @@ -820,6 +823,7 @@ __strptime_internal (rp, fmt, tmp, state | 16648 | @@ -820,6 +823,7 @@ __strptime_internal (rp, fmt, tmp, statep LOCALE_PARAM) |
16163 | s.want_xday = 1; | 16649 | s.want_xday = 1; |
16164 | break; | 16650 | break; |
16165 | case 'C': | 16651 | case 'C': |
@@ -16167,7 +16653,7 @@ Index: git/time/strptime_l.c | |||
16167 | if (s.decided != raw) | 16653 | if (s.decided != raw) |
16168 | { | 16654 | { |
16169 | if (s.era_cnt >= 0) | 16655 | if (s.era_cnt >= 0) |
16170 | @@ -856,10 +860,12 @@ __strptime_internal (rp, fmt, tmp, state | 16656 | @@ -856,10 +860,12 @@ __strptime_internal (rp, fmt, tmp, statep LOCALE_PARAM) |
16171 | 16657 | ||
16172 | s.decided = raw; | 16658 | s.decided = raw; |
16173 | } | 16659 | } |
@@ -16180,7 +16666,7 @@ Index: git/time/strptime_l.c | |||
16180 | if (s.decided != raw) | 16666 | if (s.decided != raw) |
16181 | { | 16667 | { |
16182 | get_number(0, 9999, 4); | 16668 | get_number(0, 9999, 4); |
16183 | @@ -918,9 +924,10 @@ __strptime_internal (rp, fmt, tmp, state | 16669 | @@ -918,9 +924,10 @@ __strptime_internal (rp, fmt, tmp, statep LOCALE_PARAM) |
16184 | 16670 | ||
16185 | s.decided = raw; | 16671 | s.decided = raw; |
16186 | } | 16672 | } |
@@ -16192,7 +16678,7 @@ Index: git/time/strptime_l.c | |||
16192 | if (s.decided != raw) | 16678 | if (s.decided != raw) |
16193 | { | 16679 | { |
16194 | num_eras = _NL_CURRENT_WORD (LC_TIME, | 16680 | num_eras = _NL_CURRENT_WORD (LC_TIME, |
16195 | @@ -948,6 +955,7 @@ __strptime_internal (rp, fmt, tmp, state | 16681 | @@ -948,6 +955,7 @@ __strptime_internal (rp, fmt, tmp, statep LOCALE_PARAM) |
16196 | 16682 | ||
16197 | s.decided = raw; | 16683 | s.decided = raw; |
16198 | } | 16684 | } |
@@ -16200,7 +16686,7 @@ Index: git/time/strptime_l.c | |||
16200 | get_number (0, 9999, 4); | 16686 | get_number (0, 9999, 4); |
16201 | tm->tm_year = val - 1900; | 16687 | tm->tm_year = val - 1900; |
16202 | s.want_century = 0; | 16688 | s.want_century = 0; |
16203 | @@ -1118,6 +1126,7 @@ __strptime_internal (rp, fmt, tmp, state | 16689 | @@ -1118,6 +1126,7 @@ __strptime_internal (rp, fmt, tmp, statep LOCALE_PARAM) |
16204 | tm->tm_year = (s.century - 19) * 100; | 16690 | tm->tm_year = (s.century - 19) * 100; |
16205 | } | 16691 | } |
16206 | 16692 | ||
@@ -16208,7 +16694,7 @@ Index: git/time/strptime_l.c | |||
16208 | if (s.era_cnt != -1) | 16694 | if (s.era_cnt != -1) |
16209 | { | 16695 | { |
16210 | era = _nl_select_era_entry (s.era_cnt HELPER_LOCALE_ARG); | 16696 | era = _nl_select_era_entry (s.era_cnt HELPER_LOCALE_ARG); |
16211 | @@ -1132,6 +1141,7 @@ __strptime_internal (rp, fmt, tmp, state | 16697 | @@ -1132,6 +1141,7 @@ __strptime_internal (rp, fmt, tmp, statep LOCALE_PARAM) |
16212 | tm->tm_year = era->start_date[0]; | 16698 | tm->tm_year = era->start_date[0]; |
16213 | } | 16699 | } |
16214 | else | 16700 | else |
@@ -16216,11 +16702,11 @@ Index: git/time/strptime_l.c | |||
16216 | if (s.want_era) | 16702 | if (s.want_era) |
16217 | { | 16703 | { |
16218 | /* No era found but we have seen an E modifier. Rectify some | 16704 | /* No era found but we have seen an E modifier. Rectify some |
16219 | Index: git/timezone/Makefile | 16705 | diff --git a/timezone/Makefile b/timezone/Makefile |
16220 | =================================================================== | 16706 | index 886b06e..f922684 100644 |
16221 | --- git.orig/timezone/Makefile | 16707 | --- a/timezone/Makefile |
16222 | +++ git/timezone/Makefile | 16708 | +++ b/timezone/Makefile |
16223 | @@ -117,7 +117,7 @@ $(testdata)/Asia/Tokyo: asia $(zic-deps) | 16709 | @@ -127,7 +127,7 @@ $(testdata)/XT%: testdata/XT% |
16224 | 16710 | ||
16225 | $(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make | 16711 | $(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make |
16226 | sed -e 's|/bin/bash|/bin/sh|' \ | 16712 | sed -e 's|/bin/bash|/bin/sh|' \ |
@@ -16229,10 +16715,10 @@ Index: git/timezone/Makefile | |||
16229 | -e '/TZVERSION=/s|see_Makefile|"$(version)"|' \ | 16715 | -e '/TZVERSION=/s|see_Makefile|"$(version)"|' \ |
16230 | -e '/PKGVERSION=/s|=.*|="$(PKGVERSION)"|' \ | 16716 | -e '/PKGVERSION=/s|=.*|="$(PKGVERSION)"|' \ |
16231 | -e '/REPORT_BUGS_TO=/s|=.*|="$(REPORT_BUGS_TO)"|' \ | 16717 | -e '/REPORT_BUGS_TO=/s|=.*|="$(REPORT_BUGS_TO)"|' \ |
16232 | Index: git/wcsmbs/Makefile | 16718 | diff --git a/wcsmbs/Makefile b/wcsmbs/Makefile |
16233 | =================================================================== | 16719 | index 44a4494..db9fc24 100644 |
16234 | --- git.orig/wcsmbs/Makefile | 16720 | --- a/wcsmbs/Makefile |
16235 | +++ git/wcsmbs/Makefile | 16721 | +++ b/wcsmbs/Makefile |
16236 | @@ -18,15 +18,21 @@ | 16722 | @@ -18,15 +18,21 @@ |
16237 | # | 16723 | # |
16238 | # Sub-makefile for wcsmbs portion of the library. | 16724 | # Sub-makefile for wcsmbs portion of the library. |
@@ -16257,7 +16743,7 @@ Index: git/wcsmbs/Makefile | |||
16257 | btowc wctob mbsinit \ | 16743 | btowc wctob mbsinit \ |
16258 | mbrlen mbrtowc wcrtomb mbsrtowcs wcsrtombs \ | 16744 | mbrlen mbrtowc wcrtomb mbsrtowcs wcsrtombs \ |
16259 | mbsnrtowcs wcsnrtombs wcsnlen wcschrnul \ | 16745 | mbsnrtowcs wcsnrtombs wcsnlen wcschrnul \ |
16260 | @@ -38,14 +44,21 @@ routines := wcscat wcschr wcscmp wcscpy | 16746 | @@ -38,14 +44,21 @@ routines := wcscat wcschr wcscmp wcscpy wcscspn wcsdup wcslen wcsncat \ |
16261 | wcscoll_l wcsxfrm_l \ | 16747 | wcscoll_l wcsxfrm_l \ |
16262 | wcscasecmp wcsncase wcscasecmp_l wcsncase_l \ | 16748 | wcscasecmp wcsncase wcscasecmp_l wcsncase_l \ |
16263 | wcsmbsload mbsrtowcs_l \ | 16749 | wcsmbsload mbsrtowcs_l \ |
@@ -16265,28 +16751,29 @@ Index: git/wcsmbs/Makefile | |||
16265 | isoc99_swscanf isoc99_vswscanf \ | 16751 | isoc99_swscanf isoc99_vswscanf \ |
16266 | mbrtoc16 c16rtomb | 16752 | mbrtoc16 c16rtomb |
16267 | 16753 | ||
16268 | +routines-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) \ | 16754 | -strop-tests := wcscmp wcsncmp wmemcmp wcslen wcschr wcsrchr wcscpy |
16269 | + += isoc99_wscanf isoc99_vwscanf isoc99_fwscanf isoc99_vfwscanf | ||
16270 | + | ||
16271 | strop-tests := wcscmp wmemcmp wcslen wcschr wcsrchr wcscpy | ||
16272 | -tests := tst-wcstof wcsmbs-tst1 tst-wcsnlen tst-btowc tst-mbrtowc \ | 16755 | -tests := tst-wcstof wcsmbs-tst1 tst-wcsnlen tst-btowc tst-mbrtowc \ |
16273 | - tst-wcrtomb tst-wcpncpy tst-mbsrtowcs tst-wchar-h tst-mbrtowc2 \ | 16756 | - tst-wcrtomb tst-wcpncpy tst-mbsrtowcs tst-wchar-h tst-mbrtowc2 \ |
16274 | - tst-c16c32-1 wcsatcliff $(addprefix test-,$(strop-tests)) | 16757 | - tst-c16c32-1 wcsatcliff $(addprefix test-,$(strop-tests)) |
16758 | +routines-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) \ | ||
16759 | + += isoc99_wscanf isoc99_vwscanf isoc99_fwscanf isoc99_vfwscanf | ||
16760 | + | ||
16761 | +strop-tests := wcscmp wmemcmp wmemcmp wcslen wcschr wcsrchr wcscpy | ||
16275 | + | 16762 | + |
16276 | +tests := tst-wchar-h | 16763 | +tests := tst-wchar-h |
16277 | +tests-$(OPTION_EGLIBC_LOCALE_CODE) \ | 16764 | +tests-$(OPTION_EGLIBC_LOCALE_CODE) \ |
16278 | + += tst-btowc tst-mbrtowc tst-mbrtowc2 tst-wcrtomb tst-c16c32-1 | 16765 | + += tst-btowc tst-mbrtowc tst-mbrtowc2 tst-wcrtomb tst-c16c32-1 |
16279 | +tests-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \ | 16766 | +tests-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \ |
16280 | + += tst-wcstof wcsmbs-tst1 tst-wcsnlen \ | 16767 | + += tst-wcstof wcsmbs-tst1 tst-wcsnlen \ |
16281 | + tst-wcpncpy tst-mbsrtowcs \ | 16768 | + tst-wcpncpy tst-mbsrtowcs \ |
16282 | + wcsatcliff $(addprefix test-,$(strop-tests)) | 16769 | + wcsatcliff $(addprefix test-,$(strop-tests)) |
16283 | 16770 | ||
16284 | include ../Rules | 16771 | include ../Rules |
16285 | 16772 | ||
16286 | Index: git/wcsmbs/wcsmbsload.c | 16773 | diff --git a/wcsmbs/wcsmbsload.c b/wcsmbs/wcsmbsload.c |
16287 | =================================================================== | 16774 | index 6bb49bc..2ab9d07 100644 |
16288 | --- git.orig/wcsmbs/wcsmbsload.c | 16775 | --- a/wcsmbs/wcsmbsload.c |
16289 | +++ git/wcsmbs/wcsmbsload.c | 16776 | +++ b/wcsmbs/wcsmbsload.c |
16290 | @@ -21,6 +21,7 @@ | 16777 | @@ -21,6 +21,7 @@ |
16291 | #include <limits.h> | 16778 | #include <limits.h> |
16292 | #include <stdlib.h> | 16779 | #include <stdlib.h> |
@@ -16295,7 +16782,7 @@ Index: git/wcsmbs/wcsmbsload.c | |||
16295 | 16782 | ||
16296 | #include <locale/localeinfo.h> | 16783 | #include <locale/localeinfo.h> |
16297 | #include <wcsmbsload.h> | 16784 | #include <wcsmbsload.h> |
16298 | @@ -143,6 +144,7 @@ __wcsmbs_getfct (const char *to, const c | 16785 | @@ -143,6 +144,7 @@ __wcsmbs_getfct (const char *to, const char *from, size_t *nstepsp) |
16299 | }) | 16786 | }) |
16300 | 16787 | ||
16301 | 16788 | ||
@@ -16303,7 +16790,7 @@ Index: git/wcsmbs/wcsmbsload.c | |||
16303 | /* Some of the functions here must not be used while setlocale is called. */ | 16790 | /* Some of the functions here must not be used while setlocale is called. */ |
16304 | __libc_rwlock_define (extern, __libc_setlocale_lock attribute_hidden) | 16791 | __libc_rwlock_define (extern, __libc_setlocale_lock attribute_hidden) |
16305 | 16792 | ||
16306 | @@ -211,6 +213,17 @@ __wcsmbs_load_conv (struct __locale_data | 16793 | @@ -211,6 +213,17 @@ __wcsmbs_load_conv (struct __locale_data *new_category) |
16307 | 16794 | ||
16308 | __libc_rwlock_unlock (__libc_setlocale_lock); | 16795 | __libc_rwlock_unlock (__libc_setlocale_lock); |
16309 | } | 16796 | } |
@@ -16321,10 +16808,10 @@ Index: git/wcsmbs/wcsmbsload.c | |||
16321 | 16808 | ||
16322 | 16809 | ||
16323 | /* Clone the current conversion function set. */ | 16810 | /* Clone the current conversion function set. */ |
16324 | Index: git/wctype/Makefile | 16811 | diff --git a/wctype/Makefile b/wctype/Makefile |
16325 | =================================================================== | 16812 | index c56f07c..4e8af43 100644 |
16326 | --- git.orig/wctype/Makefile | 16813 | --- a/wctype/Makefile |
16327 | +++ git/wctype/Makefile | 16814 | +++ b/wctype/Makefile |
16328 | @@ -18,14 +18,20 @@ | 16815 | @@ -18,14 +18,20 @@ |
16329 | # | 16816 | # |
16330 | # Sub-makefile for wctype portion of the library. | 16817 | # Sub-makefile for wctype portion of the library. |
@@ -16338,388 +16825,18 @@ Index: git/wctype/Makefile | |||
16338 | headers := wctype.h | 16825 | headers := wctype.h |
16339 | -routines := wcfuncs wctype iswctype wctrans towctrans \ | 16826 | -routines := wcfuncs wctype iswctype wctrans towctrans \ |
16340 | - wcfuncs_l wctype_l iswctype_l wctrans_l towctrans_l | 16827 | - wcfuncs_l wctype_l iswctype_l wctrans_l towctrans_l |
16828 | - | ||
16829 | -tests := test_wctype test_wcfuncs bug-wctypeh | ||
16341 | +routines := wctrans towctrans towctrans_l | 16830 | +routines := wctrans towctrans towctrans_l |
16342 | +routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \ | 16831 | +routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \ |
16343 | + := wcfuncs wctype iswctype \ | 16832 | + := wcfuncs wctype iswctype \ |
16344 | + wcfuncs_l wctype_l iswctype_l wctrans_l | 16833 | + wcfuncs_l wctype_l iswctype_l wctrans_l |
16345 | 16834 | + | |
16346 | -tests := test_wctype test_wcfuncs bug-wctypeh | ||
16347 | +tests := | 16835 | +tests := |
16348 | +tests-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \ | 16836 | +tests-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \ |
16349 | + += test_wctype test_wcfuncs bug-wctypeh | 16837 | + += test_wctype test_wcfuncs bug-wctypeh |
16350 | 16838 | ||
16351 | include ../Rules | 16839 | include ../Rules |
16352 | Index: git/sysdeps/nptl/Makefile | 16840 | -- |
16353 | =================================================================== | 16841 | 2.1.4 |
16354 | --- git.orig/sysdeps/nptl/Makefile | 16842 | |
16355 | +++ git/sysdeps/nptl/Makefile | ||
16356 | @@ -18,6 +18,9 @@ | ||
16357 | |||
16358 | ifeq ($(subdir),nptl) | ||
16359 | libpthread-sysdep_routines += errno-loc | ||
16360 | +ifeq ($(OPTION_EGLIBC_BIG_MACROS),n) | ||
16361 | +sysdep_routines += small-macros-fns | ||
16362 | +endif | ||
16363 | endif | ||
16364 | |||
16365 | ifeq ($(subdir),rt) | ||
16366 | Index: git/sysdeps/nptl/bits/libc-lock.h | ||
16367 | =================================================================== | ||
16368 | --- git.orig/sysdeps/nptl/bits/libc-lock.h | ||
16369 | +++ git/sysdeps/nptl/bits/libc-lock.h | ||
16370 | @@ -24,6 +24,14 @@ | ||
16371 | #include <stddef.h> | ||
16372 | |||
16373 | |||
16374 | +#ifdef _LIBC | ||
16375 | +# include <lowlevellock.h> | ||
16376 | +# include <tls.h> | ||
16377 | +# include <pthread-functions.h> | ||
16378 | +# include <errno.h> /* For EBUSY. */ | ||
16379 | +# include <gnu/option-groups.h> /* For __OPTION_EGLIBC_BIG_MACROS. */ | ||
16380 | +#endif | ||
16381 | + | ||
16382 | /* Mutex type. */ | ||
16383 | #if defined _LIBC || defined _IO_MTSAFE_IO | ||
16384 | # if (!IS_IN (libc) && !IS_IN (libpthread)) || !defined _LIBC | ||
16385 | @@ -87,6 +95,15 @@ typedef struct __libc_lock_recursive_opa | ||
16386 | |||
16387 | /* Lock the recursive named lock variable. */ | ||
16388 | #if defined _LIBC && (IS_IN (libc) || IS_IN (libpthread)) | ||
16389 | +# if __OPTION_EGLIBC_BIG_MACROS != 1 | ||
16390 | +/* EGLIBC: Declare wrapper function for a big macro if either | ||
16391 | + !__OPTION_EGLIBC_BIG_MACROS or we are using a back door from | ||
16392 | + small-macros-fns.c (__OPTION_EGLIBC_BIG_MACROS == 2). */ | ||
16393 | +extern void __libc_lock_lock_recursive_fn (__libc_lock_recursive_t *); | ||
16394 | +libc_hidden_proto (__libc_lock_lock_recursive_fn); | ||
16395 | +# endif /* __OPTION_EGLIBC_BIG_MACROS != 1 */ | ||
16396 | +# if __OPTION_EGLIBC_BIG_MACROS | ||
16397 | + | ||
16398 | # define __libc_lock_lock_recursive(NAME) \ | ||
16399 | do { \ | ||
16400 | void *self = THREAD_SELF; \ | ||
16401 | @@ -97,6 +114,10 @@ typedef struct __libc_lock_recursive_opa | ||
16402 | } \ | ||
16403 | ++(NAME).cnt; \ | ||
16404 | } while (0) | ||
16405 | +# else | ||
16406 | +# define __libc_lock_lock_recursive(NAME) \ | ||
16407 | + __libc_lock_lock_recursive_fn (&(NAME)) | ||
16408 | +# endif /* __OPTION_EGLIBC_BIG_MACROS */ | ||
16409 | #else | ||
16410 | # define __libc_lock_lock_recursive(NAME) \ | ||
16411 | __libc_maybe_call (__pthread_mutex_lock, (&(NAME).mutex), 0) | ||
16412 | @@ -104,6 +125,14 @@ typedef struct __libc_lock_recursive_opa | ||
16413 | |||
16414 | /* Try to lock the recursive named lock variable. */ | ||
16415 | #if defined _LIBC && (IS_IN (libc) || IS_IN (libpthread)) | ||
16416 | +# if __OPTION_EGLIBC_BIG_MACROS != 1 | ||
16417 | +/* EGLIBC: Declare wrapper function for a big macro if either | ||
16418 | + !__OPTION_EGLIBC_BIG_MACROS or we are using a back door from | ||
16419 | + small-macros-fns.c (__OPTION_EGLIBC_BIG_MACROS == 2). */ | ||
16420 | +extern int __libc_lock_trylock_recursive_fn (__libc_lock_recursive_t *); | ||
16421 | +libc_hidden_proto (__libc_lock_trylock_recursive_fn); | ||
16422 | +# endif /* __OPTION_EGLIBC_BIG_MACROS != 1 */ | ||
16423 | +# if __OPTION_EGLIBC_BIG_MACROS | ||
16424 | # define __libc_lock_trylock_recursive(NAME) \ | ||
16425 | ({ \ | ||
16426 | int result = 0; \ | ||
16427 | @@ -122,6 +151,10 @@ typedef struct __libc_lock_recursive_opa | ||
16428 | ++(NAME).cnt; \ | ||
16429 | result; \ | ||
16430 | }) | ||
16431 | +# else | ||
16432 | +# define __libc_lock_trylock_recursive(NAME) \ | ||
16433 | + __libc_lock_trylock_recursive_fn (&(NAME)) | ||
16434 | +# endif /* __OPTION_EGLIBC_BIG_MACROS */ | ||
16435 | #else | ||
16436 | # define __libc_lock_trylock_recursive(NAME) \ | ||
16437 | __libc_maybe_call (__pthread_mutex_trylock, (&(NAME).mutex), 0) | ||
16438 | @@ -129,6 +162,14 @@ typedef struct __libc_lock_recursive_opa | ||
16439 | |||
16440 | /* Unlock the recursive named lock variable. */ | ||
16441 | #if defined _LIBC && (IS_IN (libc) || IS_IN (libpthread)) | ||
16442 | +# if __OPTION_EGLIBC_BIG_MACROS != 1 | ||
16443 | +/* EGLIBC: Declare wrapper function for a big macro if either | ||
16444 | + !__OPTION_EGLIBC_BIG_MACROS, or we are using a back door from | ||
16445 | + small-macros-fns.c (__OPTION_EGLIBC_BIG_MACROS == 2). */ | ||
16446 | +extern void __libc_lock_unlock_recursive_fn (__libc_lock_recursive_t *); | ||
16447 | +libc_hidden_proto (__libc_lock_unlock_recursive_fn); | ||
16448 | +# endif /* __OPTION_EGLIBC_BIG_MACROS != 1 */ | ||
16449 | +# if __OPTION_EGLIBC_BIG_MACROS | ||
16450 | /* We do no error checking here. */ | ||
16451 | # define __libc_lock_unlock_recursive(NAME) \ | ||
16452 | do { \ | ||
16453 | @@ -138,6 +179,10 @@ typedef struct __libc_lock_recursive_opa | ||
16454 | lll_unlock ((NAME).lock, LLL_PRIVATE); \ | ||
16455 | } \ | ||
16456 | } while (0) | ||
16457 | +# else | ||
16458 | +# define __libc_lock_unlock_recursive(NAME) \ | ||
16459 | + __libc_lock_unlock_recursive_fn (&(NAME)) | ||
16460 | +# endif /* __OPTION_EGLIBC_BIG_MACROS */ | ||
16461 | #else | ||
16462 | # define __libc_lock_unlock_recursive(NAME) \ | ||
16463 | __libc_maybe_call (__pthread_mutex_unlock, (&(NAME).mutex), 0) | ||
16464 | Index: git/sysdeps/nptl/bits/libc-lockP.h | ||
16465 | =================================================================== | ||
16466 | --- git.orig/sysdeps/nptl/bits/libc-lockP.h | ||
16467 | +++ git/sysdeps/nptl/bits/libc-lockP.h | ||
16468 | @@ -33,6 +33,8 @@ | ||
16469 | #include <lowlevellock.h> | ||
16470 | #include <tls.h> | ||
16471 | #include <pthread-functions.h> | ||
16472 | +#include <errno.h> /* For EBUSY. */ | ||
16473 | +#include <gnu/option-groups.h> /* For __OPTION_EGLIBC_BIG_MACROS. */ | ||
16474 | |||
16475 | #if IS_IN (libpthread) | ||
16476 | /* This gets us the declarations of the __pthread_* internal names, | ||
16477 | @@ -171,10 +173,22 @@ typedef pthread_key_t __libc_key_t; | ||
16478 | |||
16479 | /* Lock the named lock variable. */ | ||
16480 | #if IS_IN (libc) || IS_IN (libpthread) | ||
16481 | -# ifndef __libc_lock_lock | ||
16482 | -# define __libc_lock_lock(NAME) \ | ||
16483 | +# if __OPTION_EGLIBC_BIG_MACROS != 1 | ||
16484 | +/* EGLIBC: Declare wrapper function for a big macro if either | ||
16485 | + !__OPTION_EGLIBC_BIG_MACROS or we are using a back door from | ||
16486 | + small-macros-fns.c (__OPTION_EGLIBC_BIG_MACROS == 2). */ | ||
16487 | +extern void __libc_lock_lock_fn (__libc_lock_t *); | ||
16488 | +libc_hidden_proto (__libc_lock_lock_fn); | ||
16489 | +# endif /* __OPTION_EGLIBC_BIG_MACROS != 1 */ | ||
16490 | +# if __OPTION_EGLIBC_BIG_MACROS | ||
16491 | +# ifndef __libc_lock_lock | ||
16492 | +# define __libc_lock_lock(NAME) \ | ||
16493 | ({ lll_lock (NAME, LLL_PRIVATE); 0; }) | ||
16494 | -# endif | ||
16495 | +# endif | ||
16496 | +# else | ||
16497 | +# define __libc_lock_lock(NAME) \ | ||
16498 | + __libc_lock_lock_fn (&(NAME)) | ||
16499 | +# endif /* __OPTION_EGLIBC_BIG_MACROS */ | ||
16500 | #else | ||
16501 | # undef __libc_lock_lock | ||
16502 | # define __libc_lock_lock(NAME) \ | ||
16503 | @@ -187,10 +201,22 @@ typedef pthread_key_t __libc_key_t; | ||
16504 | |||
16505 | /* Try to lock the named lock variable. */ | ||
16506 | #if IS_IN (libc) || IS_IN (libpthread) | ||
16507 | -# ifndef __libc_lock_trylock | ||
16508 | -# define __libc_lock_trylock(NAME) \ | ||
16509 | +# if __OPTION_EGLIBC_BIG_MACROS != 1 | ||
16510 | +/* EGLIBC: Declare wrapper function for a big macro if either | ||
16511 | + !__OPTION_EGLIBC_BIG_MACROS or we are using a back door from | ||
16512 | + small-macros-fns.c (__OPTION_EGLIBC_BIG_MACROS == 2). */ | ||
16513 | +extern int __libc_lock_trylock_fn (__libc_lock_t *); | ||
16514 | +libc_hidden_proto (__libc_lock_trylock_fn); | ||
16515 | +# endif /* __OPTION_EGLIBC_BIG_MACROS != 1 */ | ||
16516 | +# if __OPTION_EGLIBC_BIG_MACROS | ||
16517 | +# ifndef __libc_lock_trylock | ||
16518 | +# define __libc_lock_trylock(NAME) \ | ||
16519 | lll_trylock (NAME) | ||
16520 | -# endif | ||
16521 | +# endif | ||
16522 | +# else | ||
16523 | +# define __libc_lock_trylock(NAME) \ | ||
16524 | + __libc_lock_trylock_fn (&(NAME)) | ||
16525 | +# endif /* __OPTION_EGLIBC_BIG_MACROS */ | ||
16526 | #else | ||
16527 | # undef __libc_lock_trylock | ||
16528 | # define __libc_lock_trylock(NAME) \ | ||
16529 | @@ -206,8 +232,20 @@ typedef pthread_key_t __libc_key_t; | ||
16530 | |||
16531 | /* Unlock the named lock variable. */ | ||
16532 | #if IS_IN (libc) || IS_IN (libpthread) | ||
16533 | +# if __OPTION_EGLIBC_BIG_MACROS != 1 | ||
16534 | +/* EGLIBC: Declare wrapper function for a big macro if either | ||
16535 | + !__OPTION_EGLIBC_BIG_MACROS, or we are using a back door from | ||
16536 | + small-macros-fns.c (__OPTION_EGLIBC_BIG_MACROS == 2). */ | ||
16537 | +extern void __libc_lock_unlock_fn (__libc_lock_t *); | ||
16538 | +libc_hidden_proto (__libc_lock_unlock_fn); | ||
16539 | +# endif /* __OPTION_EGLIBC_BIG_MACROS != 1 */ | ||
16540 | +# if __OPTION_EGLIBC_BIG_MACROS | ||
16541 | # define __libc_lock_unlock(NAME) \ | ||
16542 | lll_unlock (NAME, LLL_PRIVATE) | ||
16543 | +# else | ||
16544 | +# define __libc_lock_unlock(NAME) \ | ||
16545 | + __libc_lock_unlock_fn (&(NAME)) | ||
16546 | +# endif /* __OPTION_EGLIBC_BIG_MACROS */ | ||
16547 | #else | ||
16548 | # define __libc_lock_unlock(NAME) \ | ||
16549 | __libc_maybe_call (__pthread_mutex_unlock, (&(NAME)), 0) | ||
16550 | Index: git/sysdeps/nptl/small-macros-fns.c | ||
16551 | =================================================================== | ||
16552 | --- /dev/null | ||
16553 | +++ git/sysdeps/nptl/small-macros-fns.c | ||
16554 | @@ -0,0 +1,72 @@ | ||
16555 | +/* EGLIBC: function wrappers for big macros. | ||
16556 | + Copyright (C) 2009 Free Software Foundation, Inc. | ||
16557 | + This file is part of the GNU C Library. | ||
16558 | + | ||
16559 | + The GNU C Library is free software; you can redistribute it and/or | ||
16560 | + modify it under the terms of the GNU Lesser General Public License as | ||
16561 | + published by the Free Software Foundation; either version 2.1 of the | ||
16562 | + License, or (at your option) any later version. | ||
16563 | + | ||
16564 | + The GNU C Library is distributed in the hope that it will be useful, | ||
16565 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16566 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16567 | + Lesser General Public License for more details. | ||
16568 | + | ||
16569 | + You should have received a copy of the GNU Lesser General Public | ||
16570 | + License along with the GNU C Library; see the file COPYING.LIB. If not, | ||
16571 | + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
16572 | + Boston, MA 02111-1307, USA. */ | ||
16573 | + | ||
16574 | +#include <gnu/option-groups.h> | ||
16575 | + | ||
16576 | +/* Handle macros from ./bits/libc-lock.h. */ | ||
16577 | +#if defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread) | ||
16578 | + | ||
16579 | +/* Get the macros for function bodies through a back door. */ | ||
16580 | +# undef __OPTION_EGLIBC_BIG_MACROS | ||
16581 | +# define __OPTION_EGLIBC_BIG_MACROS 2 | ||
16582 | +# include <bits/libc-lock.h> | ||
16583 | + | ||
16584 | +void | ||
16585 | +__libc_lock_lock_fn (__libc_lock_t *name) | ||
16586 | +{ | ||
16587 | + __libc_lock_lock (*name); | ||
16588 | +} | ||
16589 | +libc_hidden_def (__libc_lock_lock_fn); | ||
16590 | + | ||
16591 | +void | ||
16592 | +__libc_lock_lock_recursive_fn (__libc_lock_recursive_t *name) | ||
16593 | +{ | ||
16594 | + __libc_lock_lock_recursive (*name); | ||
16595 | +} | ||
16596 | +libc_hidden_def (__libc_lock_lock_recursive_fn); | ||
16597 | + | ||
16598 | +int | ||
16599 | +__libc_lock_trylock_fn (__libc_lock_t *name) | ||
16600 | +{ | ||
16601 | + return __libc_lock_trylock (*name); | ||
16602 | +} | ||
16603 | +libc_hidden_def (__libc_lock_trylock_fn); | ||
16604 | + | ||
16605 | +int | ||
16606 | +__libc_lock_trylock_recursive_fn (__libc_lock_recursive_t *name) | ||
16607 | +{ | ||
16608 | + return __libc_lock_trylock_recursive (*name); | ||
16609 | +} | ||
16610 | +libc_hidden_def (__libc_lock_trylock_recursive_fn); | ||
16611 | + | ||
16612 | +void | ||
16613 | +__libc_lock_unlock_fn (__libc_lock_t *name) | ||
16614 | +{ | ||
16615 | + __libc_lock_unlock (*name); | ||
16616 | +} | ||
16617 | +libc_hidden_def (__libc_lock_unlock_fn); | ||
16618 | + | ||
16619 | +void | ||
16620 | +__libc_lock_unlock_recursive_fn (__libc_lock_recursive_t *name) | ||
16621 | +{ | ||
16622 | + __libc_lock_unlock_recursive (*name); | ||
16623 | +} | ||
16624 | +libc_hidden_def (__libc_lock_unlock_recursive_fn); | ||
16625 | + | ||
16626 | +#endif /*defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread)*/ | ||
16627 | Index: git/crypt/crypt_common.c | ||
16628 | =================================================================== | ||
16629 | --- /dev/null | ||
16630 | +++ git/crypt/crypt_common.c | ||
16631 | @@ -0,0 +1,42 @@ | ||
16632 | +/* | ||
16633 | + * crypt: crypt(3) implementation | ||
16634 | + * | ||
16635 | + * Copyright (C) 1991-2014 Free Software Foundation, Inc. | ||
16636 | + * | ||
16637 | + * This library is free software; you can redistribute it and/or | ||
16638 | + * modify it under the terms of the GNU Lesser General Public | ||
16639 | + * License as published by the Free Software Foundation; either | ||
16640 | + * version 2.1 of the License, or (at your option) any later version. | ||
16641 | + * | ||
16642 | + * This library is distributed in the hope that it will be useful, | ||
16643 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16644 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16645 | + * Lesser General Public License for more details. | ||
16646 | + * | ||
16647 | + * You should have received a copy of the GNU Lesser General Public | ||
16648 | + * License along with this library; see the file COPYING.LIB. If not, | ||
16649 | + * see <http://www.gnu.org/licenses/>. | ||
16650 | + * | ||
16651 | + * General Support routines | ||
16652 | + * | ||
16653 | + */ | ||
16654 | + | ||
16655 | +#include "crypt-private.h" | ||
16656 | + | ||
16657 | +/* Table with characters for base64 transformation. */ | ||
16658 | +static const char b64t[64] = | ||
16659 | +"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; | ||
16660 | + | ||
16661 | +void | ||
16662 | +__b64_from_24bit (char **cp, int *buflen, | ||
16663 | + unsigned int b2, unsigned int b1, unsigned int b0, | ||
16664 | + int n) | ||
16665 | +{ | ||
16666 | + unsigned int w = (b2 << 16) | (b1 << 8) | b0; | ||
16667 | + while (n-- > 0 && (*buflen) > 0) | ||
16668 | + { | ||
16669 | + *(*cp)++ = b64t[w & 0x3f]; | ||
16670 | + --(*buflen); | ||
16671 | + w >>= 6; | ||
16672 | + } | ||
16673 | +} | ||
16674 | Index: git/crypt/crypt_util.c | ||
16675 | =================================================================== | ||
16676 | --- git.orig/crypt/crypt_util.c | ||
16677 | +++ git/crypt/crypt_util.c | ||
16678 | @@ -242,10 +242,6 @@ static ufc_long eperm32tab[4][256][2]; | ||
16679 | */ | ||
16680 | static ufc_long efp[16][64][2]; | ||
16681 | |||
16682 | -/* Table with characters for base64 transformation. */ | ||
16683 | -static const char b64t[64] = | ||
16684 | -"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; | ||
16685 | - | ||
16686 | /* | ||
16687 | * For use by the old, non-reentrant routines | ||
16688 | * (crypt/encrypt/setkey) | ||
16689 | @@ -949,17 +945,3 @@ setkey(__key) | ||
16690 | { | ||
16691 | __setkey_r(__key, &_ufc_foobar); | ||
16692 | } | ||
16693 | - | ||
16694 | -void | ||
16695 | -__b64_from_24bit (char **cp, int *buflen, | ||
16696 | - unsigned int b2, unsigned int b1, unsigned int b0, | ||
16697 | - int n) | ||
16698 | -{ | ||
16699 | - unsigned int w = (b2 << 16) | (b1 << 8) | b0; | ||
16700 | - while (n-- > 0 && (*buflen) > 0) | ||
16701 | - { | ||
16702 | - *(*cp)++ = b64t[w & 0x3f]; | ||
16703 | - --(*buflen); | ||
16704 | - w >>= 6; | ||
16705 | - } | ||
16706 | -} | ||
16707 | Index: git/sysdeps/arm/Makefile | ||
16708 | =================================================================== | ||
16709 | --- git.orig/sysdeps/arm/Makefile | ||
16710 | +++ git/sysdeps/arm/Makefile | ||
16711 | @@ -37,10 +37,13 @@ ifeq ($(subdir),csu) | ||
16712 | # get offset to rtld_global._dl_hwcap | ||
16713 | gen-as-const-headers += rtld-global-offsets.sym tlsdesc.sym | ||
16714 | aeabi_constants = aeabi_lcsts aeabi_sighandlers aeabi_math | ||
16715 | -aeabi_routines = aeabi_assert aeabi_localeconv aeabi_errno_addr \ | ||
16716 | +aeabi_routines = aeabi_assert aeabi_errno_addr \ | ||
16717 | aeabi_mb_cur_max aeabi_atexit aeabi_memclr aeabi_memcpy \ | ||
16718 | aeabi_memmove aeabi_memset \ | ||
16719 | aeabi_read_tp libc-aeabi_read_tp | ||
16720 | +ifeq (y,$(OPTION_EGLIBC_LOCALE_CODE)) | ||
16721 | +aeabi_routines += aeabi_localeconv | ||
16722 | +endif | ||
16723 | |||
16724 | sysdep_routines += $(aeabi_constants) $(aeabi_routines) | ||
16725 | static-only-routines += $(aeabi_constants) aeabi_read_tp | ||
diff --git a/meta/recipes-core/glibc/glibc/eglibc-install-pic-archives.patch b/meta/recipes-core/glibc/glibc/0025-eglibc-Install-PIC-archives.patch index 9a31255b09..c359cce9c5 100644 --- a/meta/recipes-core/glibc/glibc/eglibc-install-pic-archives.patch +++ b/meta/recipes-core/glibc/glibc/0025-eglibc-Install-PIC-archives.patch | |||
@@ -1,3 +1,10 @@ | |||
1 | From 5773417fa91a18cd39fb35c9907d72af0ed9ea33 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 18 Mar 2015 01:57:01 +0000 | ||
4 | Subject: [PATCH 25/27] eglibc: Install PIC archives | ||
5 | |||
6 | Forward port from eglibc | ||
7 | |||
1 | 2008-02-07 Joseph Myers <joseph@codesourcery.com> | 8 | 2008-02-07 Joseph Myers <joseph@codesourcery.com> |
2 | 9 | ||
3 | * Makerules (install-extras, install-map): New variables. | 10 | * Makerules (install-extras, install-map): New variables. |
@@ -9,7 +16,6 @@ | |||
9 | (install-no-libc.a-nosubdir): Depend on install-map-nosubdir and | 16 | (install-no-libc.a-nosubdir): Depend on install-map-nosubdir and |
10 | install-extras-nosubdir. | 17 | install-extras-nosubdir. |
11 | 18 | ||
12 | |||
13 | 2008-04-01 Maxim Kuvyrkov <maxim@codesourcery.com> | 19 | 2008-04-01 Maxim Kuvyrkov <maxim@codesourcery.com> |
14 | 20 | ||
15 | * Makerules (install-lib): Don't install libpthread_pic.a. | 21 | * Makerules (install-lib): Don't install libpthread_pic.a. |
@@ -17,11 +23,16 @@ | |||
17 | 23 | ||
18 | Upstream-Status: Pending | 24 | Upstream-Status: Pending |
19 | 25 | ||
20 | Index: git/Makerules | 26 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
21 | =================================================================== | 27 | --- |
22 | --- git.orig/Makerules 2014-08-27 18:49:22.552070587 +0000 | 28 | Makerules | 42 ++++++++++++++++++++++++++++++++++++++++-- |
23 | +++ git/Makerules 2014-08-27 18:49:27.308070587 +0000 | 29 | 1 file changed, 40 insertions(+), 2 deletions(-) |
24 | @@ -612,6 +631,9 @@ | 30 | |
31 | diff --git a/Makerules b/Makerules | ||
32 | index 1dd41aa..41778e1 100644 | ||
33 | --- a/Makerules | ||
34 | +++ b/Makerules | ||
35 | @@ -713,6 +713,9 @@ ifeq ($(build-shared),yes) | ||
25 | $(common-objpfx)libc.so: $(common-objpfx)libc.map | 36 | $(common-objpfx)libc.so: $(common-objpfx)libc.map |
26 | endif | 37 | endif |
27 | common-generated += libc.so libc_pic.os | 38 | common-generated += libc.so libc_pic.os |
@@ -31,15 +42,15 @@ Index: git/Makerules | |||
31 | ifdef libc.so-version | 42 | ifdef libc.so-version |
32 | $(common-objpfx)libc.so$(libc.so-version): $(common-objpfx)libc.so | 43 | $(common-objpfx)libc.so$(libc.so-version): $(common-objpfx)libc.so |
33 | $(make-link) | 44 | $(make-link) |
34 | @@ -834,6 +856,7 @@ | 45 | @@ -955,6 +958,7 @@ endif |
35 | installed-libcs := $(foreach o,$(filter-out .os,$(object-suffixes-for-libc)),\ | 46 | |
36 | $(inst_libdir)/$(patsubst %,$(libtype$o),\ | 47 | install: check-install-supported |
37 | $(libprefix)$(libc-name))) | 48 | |
38 | +installed-libcs := $(installed-libcs) $(inst_libdir)/libc_pic.a | 49 | +installed-libcs := $(installed-libcs) $(inst_libdir)/libc_pic.a |
39 | install: $(installed-libcs) | 50 | install: $(installed-libcs) |
40 | $(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force) | 51 | $(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force) |
41 | $(make-target-directory) | 52 | $(make-target-directory) |
42 | @@ -862,6 +885,22 @@ | 53 | @@ -983,6 +987,22 @@ versioned := $(strip $(foreach so,$(install-lib.so),\ |
43 | install-lib.so-versioned := $(filter $(versioned), $(install-lib.so)) | 54 | install-lib.so-versioned := $(filter $(versioned), $(install-lib.so)) |
44 | install-lib.so-unversioned := $(filter-out $(versioned), $(install-lib.so)) | 55 | install-lib.so-unversioned := $(filter-out $(versioned), $(install-lib.so)) |
45 | 56 | ||
@@ -62,7 +73,7 @@ Index: git/Makerules | |||
62 | # For versioned libraries, we install three files: | 73 | # For versioned libraries, we install three files: |
63 | # $(inst_libdir)/libfoo.so -- for linking, symlink or ld script | 74 | # $(inst_libdir)/libfoo.so -- for linking, symlink or ld script |
64 | # $(inst_slibdir)/libfoo.so.NN -- for loading by SONAME, symlink | 75 | # $(inst_slibdir)/libfoo.so.NN -- for loading by SONAME, symlink |
65 | @@ -1103,9 +1142,22 @@ | 76 | @@ -1225,9 +1245,22 @@ $(addprefix $(inst_includedir)/,$(headers-nonh)): $(inst_includedir)/%: \ |
66 | endif # headers-nonh | 77 | endif # headers-nonh |
67 | endif # headers | 78 | endif # headers |
68 | 79 | ||
@@ -74,7 +85,7 @@ Index: git/Makerules | |||
74 | + | 85 | + |
75 | +ifdef install-extras | 86 | +ifdef install-extras |
76 | +$(addprefix $(inst_libdir)/libc_pic/,$(install-extras)): \ | 87 | +$(addprefix $(inst_libdir)/libc_pic/,$(install-extras)): \ |
77 | + $(inst_libdir)/libc_pic/%.o: $(elfobjdir)/%.os $(+force) | 88 | + $(inst_libdir)/libc_pic/%.o: $(elf-objpfx)%.os $(+force) |
78 | + $(do-install) | 89 | + $(do-install) |
79 | +endif | 90 | +endif |
80 | + | 91 | + |
@@ -86,7 +97,7 @@ Index: git/Makerules | |||
86 | install-bin-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin)) | 97 | install-bin-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin)) |
87 | install-bin-script-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin-script)) | 98 | install-bin-script-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin-script)) |
88 | install-rootsbin-nosubdir: \ | 99 | install-rootsbin-nosubdir: \ |
89 | @@ -1118,6 +1170,10 @@ | 100 | @@ -1240,6 +1273,10 @@ install-data-nosubdir: $(addprefix $(inst_datadir)/,$(install-data)) |
90 | install-headers-nosubdir: $(addprefix $(inst_includedir)/,$(headers)) | 101 | install-headers-nosubdir: $(addprefix $(inst_includedir)/,$(headers)) |
91 | install-others-nosubdir: $(install-others) | 102 | install-others-nosubdir: $(install-others) |
92 | install-others-programs-nosubdir: $(install-others-programs) | 103 | install-others-programs-nosubdir: $(install-others-programs) |
@@ -97,7 +108,7 @@ Index: git/Makerules | |||
97 | 108 | ||
98 | # We need all the `-nosubdir' targets so that `install' in the parent | 109 | # We need all the `-nosubdir' targets so that `install' in the parent |
99 | # doesn't depend on several things which each iterate over the subdirs. | 110 | # doesn't depend on several things which each iterate over the subdirs. |
100 | @@ -1127,7 +1183,8 @@ | 111 | @@ -1249,7 +1286,8 @@ install-%:: install-%-nosubdir ; |
101 | 112 | ||
102 | .PHONY: install install-no-libc.a-nosubdir | 113 | .PHONY: install install-no-libc.a-nosubdir |
103 | install-no-libc.a-nosubdir: install-headers-nosubdir install-data-nosubdir \ | 114 | install-no-libc.a-nosubdir: install-headers-nosubdir install-data-nosubdir \ |
@@ -107,3 +118,6 @@ Index: git/Makerules | |||
107 | ifeq ($(build-programs),yes) | 118 | ifeq ($(build-programs),yes) |
108 | install-no-libc.a-nosubdir: install-bin-nosubdir install-bin-script-nosubdir \ | 119 | install-no-libc.a-nosubdir: install-bin-nosubdir install-bin-script-nosubdir \ |
109 | install-rootsbin-nosubdir install-sbin-nosubdir \ | 120 | install-rootsbin-nosubdir install-sbin-nosubdir \ |
121 | -- | ||
122 | 2.1.4 | ||
123 | |||
diff --git a/meta/recipes-core/glibc/glibc/GLRO_dl_debug_mask.patch b/meta/recipes-core/glibc/glibc/0026-eglibc-dl_debug_mask-is-controlled-by-__OPTION_EGLIB.patch index e858bfaeda..6b611dbde7 100644 --- a/meta/recipes-core/glibc/glibc/GLRO_dl_debug_mask.patch +++ b/meta/recipes-core/glibc/glibc/0026-eglibc-dl_debug_mask-is-controlled-by-__OPTION_EGLIB.patch | |||
@@ -1,246 +1,38 @@ | |||
1 | Its controlled by __OPTION_EGLIBC_RTLD_DEBUG | 1 | From ba069b3107f5ad200c4ab95e69cf368e2353b00a Mon Sep 17 00:00:00 2001 |
2 | so we should use GLRO_dl_debug_mask | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Wed, 18 Mar 2015 00:46:50 +0000 | ||
4 | Subject: [PATCH 26/27] eglibc: dl_debug_mask is controlled by | ||
5 | __OPTION_EGLIBC_RTLD_DEBUG | ||
6 | |||
7 | use GLRO_dl_debug_mask | ||
3 | 8 | ||
4 | Singed-off-by: Khem Raj <raj.khem@gmail.com> | 9 | Singed-off-by: Khem Raj <raj.khem@gmail.com> |
5 | 10 | ||
6 | Upstream-Status: Pending | 11 | Upstream-Status: Pending |
7 | Index: git/elf/dl-open.c | 12 | --- |
8 | =================================================================== | 13 | csu/libc-start.c | 4 ++-- |
9 | --- git.orig/elf/dl-open.c 2014-08-27 05:03:59.732070587 +0000 | 14 | elf/dl-cache.c | 4 ++-- |
10 | +++ git/elf/dl-open.c 2014-08-27 05:05:25.656070587 +0000 | 15 | elf/dl-close.c | 6 +++--- |
11 | @@ -147,7 +147,7 @@ | 16 | elf/dl-conflict.c | 2 +- |
12 | ns->_ns_main_searchlist->r_list[new_nlist++] = map; | 17 | elf/dl-deps.c | 6 +++--- |
13 | 18 | elf/dl-error.c | 2 +- | |
14 | /* We modify the global scope. Report this. */ | 19 | elf/dl-fini.c | 4 ++-- |
15 | - if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES)) | 20 | elf/dl-init.c | 4 ++-- |
16 | + if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SCOPES)) | 21 | elf/dl-load.c | 16 ++++++++-------- |
17 | _dl_debug_printf ("\nadd %s [%lu] to global scope\n", | 22 | elf/dl-lookup.c | 14 +++++++------- |
18 | map->l_name, map->l_ns); | 23 | elf/dl-object.c | 2 +- |
19 | } | 24 | elf/dl-open.c | 10 +++++----- |
20 | @@ -243,7 +243,7 @@ | 25 | elf/dl-reloc.c | 2 +- |
21 | if (__glibc_unlikely (new->l_searchlist.r_list != NULL)) | 26 | elf/dl-version.c | 2 +- |
22 | { | 27 | elf/get-dynamic-info.h | 2 +- |
23 | /* Let the user know about the opencount. */ | 28 | elf/rtld.c | 22 +++++++++++----------- |
24 | - if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES)) | 29 | 16 files changed, 51 insertions(+), 51 deletions(-) |
25 | + if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES)) | 30 | |
26 | _dl_debug_printf ("opening file=%s [%lu]; direct_opencount=%u\n\n", | 31 | diff --git a/csu/libc-start.c b/csu/libc-start.c |
27 | new->l_name, new->l_ns, new->l_direct_opencount); | 32 | index 0afa7c0..2151fb6 100644 |
28 | 33 | --- a/csu/libc-start.c | |
29 | @@ -294,7 +294,7 @@ | 34 | +++ b/csu/libc-start.c |
30 | LIBC_PROBE (map_complete, 3, args->nsid, r, new); | 35 | @@ -238,7 +238,7 @@ LIBC_START_MAIN (int (*main) (int, char **, char ** MAIN_AUXVEC_DECL), |
31 | |||
32 | /* Print scope information. */ | ||
33 | - if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES)) | ||
34 | + if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SCOPES)) | ||
35 | _dl_show_scope (new, 0); | ||
36 | |||
37 | /* Only do lazy relocation if `LD_BIND_NOW' is not set. */ | ||
38 | @@ -511,7 +511,7 @@ | ||
39 | } | ||
40 | |||
41 | /* Print scope information. */ | ||
42 | - if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES)) | ||
43 | + if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SCOPES)) | ||
44 | _dl_show_scope (imap, from_scope); | ||
45 | } | ||
46 | |||
47 | @@ -584,7 +584,7 @@ | ||
48 | #endif | ||
49 | |||
50 | /* Let the user know about the opencount. */ | ||
51 | - if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES)) | ||
52 | + if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES)) | ||
53 | _dl_debug_printf ("opening file=%s [%lu]; direct_opencount=%u\n\n", | ||
54 | new->l_name, new->l_ns, new->l_direct_opencount); | ||
55 | } | ||
56 | Index: git/elf/rtld.c | ||
57 | =================================================================== | ||
58 | --- git.orig/elf/rtld.c 2014-08-27 05:03:59.732070587 +0000 | ||
59 | +++ git/elf/rtld.c 2014-08-27 05:12:33.812070587 +0000 | ||
60 | @@ -321,7 +321,7 @@ | ||
61 | } | ||
62 | #endif | ||
63 | |||
64 | - if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_STATISTICS)) | ||
65 | + if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_STATISTICS)) | ||
66 | { | ||
67 | #ifndef HP_TIMING_NONAVAIL | ||
68 | print_statistics (&rtld_total_time); | ||
69 | @@ -1699,7 +1699,7 @@ | ||
70 | after relocation. */ | ||
71 | struct link_map *l; | ||
72 | |||
73 | - if (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK) | ||
74 | + if (GLRO_dl_debug_mask & DL_DEBUG_PRELINK) | ||
75 | { | ||
76 | struct r_scope_elem *scope = &main_map->l_searchlist; | ||
77 | |||
78 | @@ -1729,7 +1729,7 @@ | ||
79 | _dl_printf ("\n"); | ||
80 | } | ||
81 | } | ||
82 | - else if (GLRO(dl_debug_mask) & DL_DEBUG_UNUSED) | ||
83 | + else if (GLRO_dl_debug_mask & DL_DEBUG_UNUSED) | ||
84 | { | ||
85 | /* Look through the dependencies of the main executable | ||
86 | and determine which of them is not actually | ||
87 | @@ -1837,7 +1837,7 @@ | ||
88 | } | ||
89 | } | ||
90 | |||
91 | - if ((GLRO(dl_debug_mask) & DL_DEBUG_PRELINK) | ||
92 | + if ((GLRO_dl_debug_mask & DL_DEBUG_PRELINK) | ||
93 | && rtld_multiple_ref) | ||
94 | { | ||
95 | /* Mark the link map as not yet relocated again. */ | ||
96 | @@ -1970,7 +1970,7 @@ | ||
97 | if (r_list == r_listend && liblist == liblistend) | ||
98 | prelinked = true; | ||
99 | |||
100 | - if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS)) | ||
101 | + if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS)) | ||
102 | _dl_debug_printf ("\nprelink checking: %s\n", | ||
103 | prelinked ? "ok" : "failed"); | ||
104 | } | ||
105 | @@ -1988,7 +1988,7 @@ | ||
106 | GLRO(dl_init_all_dirs) = GL(dl_all_dirs); | ||
107 | |||
108 | /* Print scope information. */ | ||
109 | - if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES)) | ||
110 | + if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SCOPES)) | ||
111 | { | ||
112 | _dl_debug_printf ("\nInitial object scopes\n"); | ||
113 | |||
114 | @@ -2262,7 +2262,7 @@ | ||
115 | if (debopts[cnt].len == len | ||
116 | && memcmp (dl_debug, debopts[cnt].name, len) == 0) | ||
117 | { | ||
118 | - GLRO(dl_debug_mask) |= debopts[cnt].mask; | ||
119 | + GLRO_dl_debug_mask |= debopts[cnt].mask; | ||
120 | any_debug = 1; | ||
121 | break; | ||
122 | } | ||
123 | @@ -2283,7 +2283,7 @@ | ||
124 | ++dl_debug; | ||
125 | } | ||
126 | |||
127 | - if (GLRO(dl_debug_mask) & DL_DEBUG_UNUSED) | ||
128 | + if (GLRO_dl_debug_mask & DL_DEBUG_UNUSED) | ||
129 | { | ||
130 | /* In order to get an accurate picture of whether a particular | ||
131 | DT_NEEDED entry is actually used we have to process both | ||
132 | @@ -2291,7 +2291,7 @@ | ||
133 | GLRO(dl_lazy) = 0; | ||
134 | } | ||
135 | |||
136 | - if (GLRO(dl_debug_mask) & DL_DEBUG_HELP) | ||
137 | + if (GLRO_dl_debug_mask & DL_DEBUG_HELP) | ||
138 | { | ||
139 | size_t cnt; | ||
140 | |||
141 | @@ -2490,7 +2490,7 @@ | ||
142 | { | ||
143 | mode = trace; | ||
144 | GLRO(dl_verbose) = 1; | ||
145 | - GLRO(dl_debug_mask) |= DL_DEBUG_PRELINK; | ||
146 | + GLRO_dl_debug_mask |= DL_DEBUG_PRELINK; | ||
147 | GLRO(dl_trace_prelink) = &envline[17]; | ||
148 | } | ||
149 | break; | ||
150 | @@ -2537,7 +2537,7 @@ | ||
151 | if (__access ("/etc/suid-debug", F_OK) != 0) | ||
152 | { | ||
153 | unsetenv ("MALLOC_CHECK_"); | ||
154 | - GLRO(dl_debug_mask) = 0; | ||
155 | + GLRO_dl_debug_mask = 0; | ||
156 | } | ||
157 | |||
158 | if (mode != normal) | ||
159 | Index: git/elf/dl-lookup.c | ||
160 | =================================================================== | ||
161 | --- git.orig/elf/dl-lookup.c 2014-08-27 05:03:59.732070587 +0000 | ||
162 | +++ git/elf/dl-lookup.c 2014-08-27 05:13:07.644070587 +0000 | ||
163 | @@ -300,7 +300,7 @@ | ||
164 | hash table. */ | ||
165 | if (__glibc_unlikely (tab->size)) | ||
166 | { | ||
167 | - assert (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK); | ||
168 | + assert (GLRO_dl_debug_mask & DL_DEBUG_PRELINK); | ||
169 | goto success; | ||
170 | } | ||
171 | #endif | ||
172 | @@ -375,7 +375,7 @@ | ||
173 | continue; | ||
174 | |||
175 | /* Print some debugging info if wanted. */ | ||
176 | - if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SYMBOLS)) | ||
177 | + if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SYMBOLS)) | ||
178 | _dl_debug_printf ("symbol=%s; lookup in file=%s [%lu]\n", | ||
179 | undef_name, DSO_FILENAME (map->l_name), | ||
180 | map->l_ns); | ||
181 | @@ -698,7 +698,7 @@ | ||
182 | } | ||
183 | |||
184 | /* Display information if we are debugging. */ | ||
185 | - if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES)) | ||
186 | + if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES)) | ||
187 | _dl_debug_printf ("\ | ||
188 | \nfile=%s [%lu]; needed by %s [%lu] (relocation dependency)\n\n", | ||
189 | DSO_FILENAME (map->l_name), | ||
190 | @@ -802,7 +802,7 @@ | ||
191 | { | ||
192 | if ((*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK) | ||
193 | && skip_map == NULL | ||
194 | - && !(GLRO(dl_debug_mask) & DL_DEBUG_UNUSED)) | ||
195 | + && !(GLRO_dl_debug_mask & DL_DEBUG_UNUSED)) | ||
196 | { | ||
197 | /* We could find no value for a strong reference. */ | ||
198 | const char *reference_name = undef_map ? undef_map->l_name : ""; | ||
199 | @@ -873,7 +873,7 @@ | ||
200 | if (__glibc_unlikely (current_value.m->l_used == 0)) | ||
201 | current_value.m->l_used = 1; | ||
202 | |||
203 | - if (__glibc_unlikely (GLRO(dl_debug_mask) | ||
204 | + if (__glibc_unlikely (GLRO_dl_debug_mask | ||
205 | & (DL_DEBUG_BINDINGS|DL_DEBUG_PRELINK))) | ||
206 | _dl_debug_bindings (undef_name, undef_map, ref, | ||
207 | ¤t_value, version, type_class, protected); | ||
208 | @@ -938,7 +938,7 @@ | ||
209 | { | ||
210 | const char *reference_name = undef_map->l_name; | ||
211 | |||
212 | - if (GLRO(dl_debug_mask) & DL_DEBUG_BINDINGS) | ||
213 | + if (GLRO_dl_debug_mask & DL_DEBUG_BINDINGS) | ||
214 | { | ||
215 | _dl_debug_printf ("binding file %s [%lu] to %s [%lu]: %s symbol `%s'", | ||
216 | DSO_FILENAME (reference_name), | ||
217 | @@ -952,7 +952,7 @@ | ||
218 | _dl_debug_printf_c ("\n"); | ||
219 | } | ||
220 | #ifdef SHARED | ||
221 | - if (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK) | ||
222 | + if (GLRO_dl_debug_mask & DL_DEBUG_PRELINK) | ||
223 | { | ||
224 | int conflict = 0; | ||
225 | struct sym_val val = { NULL, NULL }; | ||
226 | Index: git/elf/get-dynamic-info.h | ||
227 | =================================================================== | ||
228 | --- git.orig/elf/get-dynamic-info.h 2014-08-27 05:03:59.732070587 +0000 | ||
229 | +++ git/elf/get-dynamic-info.h 2014-08-27 05:03:59.728070587 +0000 | ||
230 | @@ -157,7 +157,7 @@ | ||
231 | them. Therefore to avoid breaking existing applications the | ||
232 | best we can do is add a warning during debugging with the | ||
233 | intent of notifying the user of the problem. */ | ||
234 | - if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0) | ||
235 | + if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_FILES, 0) | ||
236 | && l->l_flags_1 & ~DT_1_SUPPORTED_MASK) | ||
237 | _dl_debug_printf ("\nWARNING: Unsupported flag value(s) of 0x%x in DT_FLAGS_1.\n", | ||
238 | l->l_flags_1 & ~DT_1_SUPPORTED_MASK); | ||
239 | Index: git/csu/libc-start.c | ||
240 | =================================================================== | ||
241 | --- git.orig/csu/libc-start.c 2014-08-27 04:59:01.412070587 +0000 | ||
242 | +++ git/csu/libc-start.c 2014-08-27 05:09:28.936070587 +0000 | ||
243 | @@ -238,7 +238,7 @@ | ||
244 | 36 | ||
245 | /* Call the initializer of the program, if any. */ | 37 | /* Call the initializer of the program, if any. */ |
246 | #ifdef SHARED | 38 | #ifdef SHARED |
@@ -249,7 +41,7 @@ Index: git/csu/libc-start.c | |||
249 | GLRO(dl_debug_printf) ("\ninitialize program: %s\n\n", argv[0]); | 41 | GLRO(dl_debug_printf) ("\ninitialize program: %s\n\n", argv[0]); |
250 | #endif | 42 | #endif |
251 | if (init) | 43 | if (init) |
252 | @@ -261,7 +261,7 @@ | 44 | @@ -261,7 +261,7 @@ LIBC_START_MAIN (int (*main) (int, char **, char ** MAIN_AUXVEC_DECL), |
253 | #endif | 45 | #endif |
254 | 46 | ||
255 | #ifdef SHARED | 47 | #ifdef SHARED |
@@ -258,11 +50,11 @@ Index: git/csu/libc-start.c | |||
258 | GLRO(dl_debug_printf) ("\ntransferring control: %s\n\n", argv[0]); | 50 | GLRO(dl_debug_printf) ("\ntransferring control: %s\n\n", argv[0]); |
259 | #endif | 51 | #endif |
260 | 52 | ||
261 | Index: git/elf/dl-cache.c | 53 | diff --git a/elf/dl-cache.c b/elf/dl-cache.c |
262 | =================================================================== | 54 | index 862f1d8..dab9c51 100644 |
263 | --- git.orig/elf/dl-cache.c 2014-08-27 04:59:01.568070587 +0000 | 55 | --- a/elf/dl-cache.c |
264 | +++ git/elf/dl-cache.c 2014-08-27 05:10:14.384070587 +0000 | 56 | +++ b/elf/dl-cache.c |
265 | @@ -187,7 +187,7 @@ | 57 | @@ -194,7 +194,7 @@ _dl_load_cache_lookup (const char *name) |
266 | const char *best; | 58 | const char *best; |
267 | 59 | ||
268 | /* Print a message if the loading of libs is traced. */ | 60 | /* Print a message if the loading of libs is traced. */ |
@@ -271,7 +63,7 @@ Index: git/elf/dl-cache.c | |||
271 | _dl_debug_printf (" search cache=%s\n", LD_SO_CACHE); | 63 | _dl_debug_printf (" search cache=%s\n", LD_SO_CACHE); |
272 | 64 | ||
273 | if (cache == NULL) | 65 | if (cache == NULL) |
274 | @@ -285,7 +285,7 @@ | 66 | @@ -292,7 +292,7 @@ _dl_load_cache_lookup (const char *name) |
275 | } | 67 | } |
276 | 68 | ||
277 | /* Print our result if wanted. */ | 69 | /* Print our result if wanted. */ |
@@ -280,11 +72,11 @@ Index: git/elf/dl-cache.c | |||
280 | && best != NULL) | 72 | && best != NULL) |
281 | _dl_debug_printf (" trying file=%s\n", best); | 73 | _dl_debug_printf (" trying file=%s\n", best); |
282 | 74 | ||
283 | Index: git/elf/dl-close.c | 75 | diff --git a/elf/dl-close.c b/elf/dl-close.c |
284 | =================================================================== | 76 | index c897247..b1b4bd5 100644 |
285 | --- git.orig/elf/dl-close.c 2014-08-27 04:59:01.568070587 +0000 | 77 | --- a/elf/dl-close.c |
286 | +++ git/elf/dl-close.c 2014-08-27 05:10:26.456070587 +0000 | 78 | +++ b/elf/dl-close.c |
287 | @@ -125,7 +125,7 @@ | 79 | @@ -125,7 +125,7 @@ _dl_close_worker (struct link_map *map, bool force) |
288 | dl_close_state = rerun; | 80 | dl_close_state = rerun; |
289 | 81 | ||
290 | /* There are still references to this object. Do nothing more. */ | 82 | /* There are still references to this object. Do nothing more. */ |
@@ -293,7 +85,7 @@ Index: git/elf/dl-close.c | |||
293 | _dl_debug_printf ("\nclosing file=%s; direct_opencount=%u\n", | 85 | _dl_debug_printf ("\nclosing file=%s; direct_opencount=%u\n", |
294 | map->l_name, map->l_direct_opencount); | 86 | map->l_name, map->l_direct_opencount); |
295 | 87 | ||
296 | @@ -257,7 +257,7 @@ | 88 | @@ -269,7 +269,7 @@ _dl_close_worker (struct link_map *map, bool force) |
297 | if (imap->l_init_called) | 89 | if (imap->l_init_called) |
298 | { | 90 | { |
299 | /* When debugging print a message first. */ | 91 | /* When debugging print a message first. */ |
@@ -302,7 +94,7 @@ Index: git/elf/dl-close.c | |||
302 | 0)) | 94 | 0)) |
303 | _dl_debug_printf ("\ncalling fini: %s [%lu]\n\n", | 95 | _dl_debug_printf ("\ncalling fini: %s [%lu]\n\n", |
304 | imap->l_name, nsid); | 96 | imap->l_name, nsid); |
305 | @@ -664,7 +664,7 @@ | 97 | @@ -711,7 +711,7 @@ _dl_close_worker (struct link_map *map, bool force) |
306 | free (imap->l_reldeps); | 98 | free (imap->l_reldeps); |
307 | 99 | ||
308 | /* Print debugging message. */ | 100 | /* Print debugging message. */ |
@@ -311,11 +103,11 @@ Index: git/elf/dl-close.c | |||
311 | _dl_debug_printf ("\nfile=%s [%lu]; destroying link map\n", | 103 | _dl_debug_printf ("\nfile=%s [%lu]; destroying link map\n", |
312 | imap->l_name, imap->l_ns); | 104 | imap->l_name, imap->l_ns); |
313 | 105 | ||
314 | Index: git/elf/dl-conflict.c | 106 | diff --git a/elf/dl-conflict.c b/elf/dl-conflict.c |
315 | =================================================================== | 107 | index 47a946e..e6a3f21 100644 |
316 | --- git.orig/elf/dl-conflict.c 2014-08-27 04:59:01.568070587 +0000 | 108 | --- a/elf/dl-conflict.c |
317 | +++ git/elf/dl-conflict.c 2014-08-27 05:10:37.652070587 +0000 | 109 | +++ b/elf/dl-conflict.c |
318 | @@ -32,7 +32,7 @@ | 110 | @@ -32,7 +32,7 @@ _dl_resolve_conflicts (struct link_map *l, ElfW(Rela) *conflict, |
319 | ElfW(Rela) *conflictend) | 111 | ElfW(Rela) *conflictend) |
320 | { | 112 | { |
321 | #if ! ELF_MACHINE_NO_RELA | 113 | #if ! ELF_MACHINE_NO_RELA |
@@ -324,11 +116,11 @@ Index: git/elf/dl-conflict.c | |||
324 | _dl_debug_printf ("\nconflict processing: %s\n", DSO_FILENAME (l->l_name)); | 116 | _dl_debug_printf ("\nconflict processing: %s\n", DSO_FILENAME (l->l_name)); |
325 | 117 | ||
326 | { | 118 | { |
327 | Index: git/elf/dl-deps.c | 119 | diff --git a/elf/dl-deps.c b/elf/dl-deps.c |
328 | =================================================================== | 120 | index eee146a..1a4b004 100644 |
329 | --- git.orig/elf/dl-deps.c 2014-08-27 04:59:01.568070587 +0000 | 121 | --- a/elf/dl-deps.c |
330 | +++ git/elf/dl-deps.c 2014-08-27 05:10:48.260070587 +0000 | 122 | +++ b/elf/dl-deps.c |
331 | @@ -127,7 +127,7 @@ | 123 | @@ -127,7 +127,7 @@ empty dynamic string token substitution")); \ |
332 | else \ | 124 | else \ |
333 | { \ | 125 | { \ |
334 | /* This is for DT_AUXILIARY. */ \ | 126 | /* This is for DT_AUXILIARY. */ \ |
@@ -337,7 +129,7 @@ Index: git/elf/dl-deps.c | |||
337 | _dl_debug_printf (N_("\ | 129 | _dl_debug_printf (N_("\ |
338 | cannot load auxiliary `%s' because of empty dynamic string token " \ | 130 | cannot load auxiliary `%s' because of empty dynamic string token " \ |
339 | "substitution\n"), __str); \ | 131 | "substitution\n"), __str); \ |
340 | @@ -303,7 +303,7 @@ | 132 | @@ -303,7 +303,7 @@ _dl_map_object_deps (struct link_map *map, |
341 | args.name = name; | 133 | args.name = name; |
342 | 134 | ||
343 | /* Say that we are about to load an auxiliary library. */ | 135 | /* Say that we are about to load an auxiliary library. */ |
@@ -346,7 +138,7 @@ Index: git/elf/dl-deps.c | |||
346 | 0)) | 138 | 0)) |
347 | _dl_debug_printf ("load auxiliary object=%s" | 139 | _dl_debug_printf ("load auxiliary object=%s" |
348 | " requested by file=%s\n", | 140 | " requested by file=%s\n", |
349 | @@ -520,7 +520,7 @@ | 141 | @@ -520,7 +520,7 @@ _dl_map_object_deps (struct link_map *map, |
350 | runp->map->l_reserved = 0; | 142 | runp->map->l_reserved = 0; |
351 | } | 143 | } |
352 | 144 | ||
@@ -355,11 +147,11 @@ Index: git/elf/dl-deps.c | |||
355 | && map == GL(dl_ns)[LM_ID_BASE]._ns_loaded) | 147 | && map == GL(dl_ns)[LM_ID_BASE]._ns_loaded) |
356 | { | 148 | { |
357 | /* If we are to compute conflicts, we have to build local scope | 149 | /* If we are to compute conflicts, we have to build local scope |
358 | Index: git/elf/dl-error.c | 150 | diff --git a/elf/dl-error.c b/elf/dl-error.c |
359 | =================================================================== | 151 | index 0fc3fd8..ea82f4d 100644 |
360 | --- git.orig/elf/dl-error.c 2014-08-27 04:59:01.568070587 +0000 | 152 | --- a/elf/dl-error.c |
361 | +++ git/elf/dl-error.c 2014-08-27 05:11:06.752070587 +0000 | 153 | +++ b/elf/dl-error.c |
362 | @@ -139,7 +139,7 @@ | 154 | @@ -139,7 +139,7 @@ internal_function |
363 | _dl_signal_cerror (int errcode, const char *objname, const char *occation, | 155 | _dl_signal_cerror (int errcode, const char *objname, const char *occation, |
364 | const char *errstring) | 156 | const char *errstring) |
365 | { | 157 | { |
@@ -368,11 +160,11 @@ Index: git/elf/dl-error.c | |||
368 | & ~(DL_DEBUG_STATISTICS|DL_DEBUG_PRELINK), 0)) | 160 | & ~(DL_DEBUG_STATISTICS|DL_DEBUG_PRELINK), 0)) |
369 | _dl_debug_printf ("%s: error: %s: %s (%s)\n", objname, occation, | 161 | _dl_debug_printf ("%s: error: %s: %s (%s)\n", objname, occation, |
370 | errstring, receiver ? "continued" : "fatal"); | 162 | errstring, receiver ? "continued" : "fatal"); |
371 | Index: git/elf/dl-fini.c | 163 | diff --git a/elf/dl-fini.c b/elf/dl-fini.c |
372 | =================================================================== | 164 | index 6cfe651..f59f7fe 100644 |
373 | --- git.orig/elf/dl-fini.c 2014-08-27 04:59:01.568070587 +0000 | 165 | --- a/elf/dl-fini.c |
374 | +++ git/elf/dl-fini.c 2014-08-27 05:11:17.544070587 +0000 | 166 | +++ b/elf/dl-fini.c |
375 | @@ -234,7 +234,7 @@ | 167 | @@ -234,7 +234,7 @@ _dl_fini (void) |
376 | || l->l_info[DT_FINI] != NULL) | 168 | || l->l_info[DT_FINI] != NULL) |
377 | { | 169 | { |
378 | /* When debugging print a message first. */ | 170 | /* When debugging print a message first. */ |
@@ -381,7 +173,7 @@ Index: git/elf/dl-fini.c | |||
381 | & DL_DEBUG_IMPCALLS, 0)) | 173 | & DL_DEBUG_IMPCALLS, 0)) |
382 | _dl_debug_printf ("\ncalling fini: %s [%lu]\n\n", | 174 | _dl_debug_printf ("\ncalling fini: %s [%lu]\n\n", |
383 | DSO_FILENAME (l->l_name), | 175 | DSO_FILENAME (l->l_name), |
384 | @@ -286,7 +286,7 @@ | 176 | @@ -286,7 +286,7 @@ _dl_fini (void) |
385 | goto again; | 177 | goto again; |
386 | } | 178 | } |
387 | 179 | ||
@@ -390,11 +182,11 @@ Index: git/elf/dl-fini.c | |||
390 | _dl_debug_printf ("\nruntime linker statistics:\n" | 182 | _dl_debug_printf ("\nruntime linker statistics:\n" |
391 | " final number of relocations: %lu\n" | 183 | " final number of relocations: %lu\n" |
392 | "final number of relocations from cache: %lu\n", | 184 | "final number of relocations from cache: %lu\n", |
393 | Index: git/elf/dl-init.c | 185 | diff --git a/elf/dl-init.c b/elf/dl-init.c |
394 | =================================================================== | 186 | index 2f85731..e46e8b6 100644 |
395 | --- git.orig/elf/dl-init.c 2014-08-27 04:59:01.568070587 +0000 | 187 | --- a/elf/dl-init.c |
396 | +++ git/elf/dl-init.c 2014-08-27 05:11:28.372070587 +0000 | 188 | +++ b/elf/dl-init.c |
397 | @@ -52,7 +52,7 @@ | 189 | @@ -46,7 +46,7 @@ call_init (struct link_map *l, int argc, char **argv, char **env) |
398 | return; | 190 | return; |
399 | 191 | ||
400 | /* Print a debug message if wanted. */ | 192 | /* Print a debug message if wanted. */ |
@@ -403,7 +195,7 @@ Index: git/elf/dl-init.c | |||
403 | _dl_debug_printf ("\ncalling init: %s\n\n", | 195 | _dl_debug_printf ("\ncalling init: %s\n\n", |
404 | DSO_FILENAME (l->l_name)); | 196 | DSO_FILENAME (l->l_name)); |
405 | 197 | ||
406 | @@ -102,7 +102,7 @@ | 198 | @@ -96,7 +96,7 @@ _dl_init (struct link_map *main_map, int argc, char **argv, char **env) |
407 | ElfW(Addr) *addrs; | 199 | ElfW(Addr) *addrs; |
408 | unsigned int cnt; | 200 | unsigned int cnt; |
409 | 201 | ||
@@ -412,11 +204,11 @@ Index: git/elf/dl-init.c | |||
412 | _dl_debug_printf ("\ncalling preinit: %s\n\n", | 204 | _dl_debug_printf ("\ncalling preinit: %s\n\n", |
413 | DSO_FILENAME (main_map->l_name)); | 205 | DSO_FILENAME (main_map->l_name)); |
414 | 206 | ||
415 | Index: git/elf/dl-load.c | 207 | diff --git a/elf/dl-load.c b/elf/dl-load.c |
416 | =================================================================== | 208 | index f664f50..8c28744 100644 |
417 | --- git.orig/elf/dl-load.c 2014-08-27 04:59:01.572070587 +0000 | 209 | --- a/elf/dl-load.c |
418 | +++ git/elf/dl-load.c 2014-08-27 05:11:41.156070587 +0000 | 210 | +++ b/elf/dl-load.c |
419 | @@ -957,7 +957,7 @@ | 211 | @@ -943,7 +943,7 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp, |
420 | } | 212 | } |
421 | 213 | ||
422 | /* Print debugging message. */ | 214 | /* Print debugging message. */ |
@@ -425,7 +217,7 @@ Index: git/elf/dl-load.c | |||
425 | _dl_debug_printf ("file=%s [%lu]; generating link map\n", name, nsid); | 217 | _dl_debug_printf ("file=%s [%lu]; generating link map\n", name, nsid); |
426 | 218 | ||
427 | /* This is the ELF header. We read it in `open_verify'. */ | 219 | /* This is the ELF header. We read it in `open_verify'. */ |
428 | @@ -1361,7 +1361,7 @@ | 220 | @@ -1347,7 +1347,7 @@ cannot enable executable stack as shared object requires"); |
429 | 221 | ||
430 | l->l_entry += l->l_addr; | 222 | l->l_entry += l->l_addr; |
431 | 223 | ||
@@ -434,7 +226,7 @@ Index: git/elf/dl-load.c | |||
434 | _dl_debug_printf ("\ | 226 | _dl_debug_printf ("\ |
435 | dynamic: 0x%0*lx base: 0x%0*lx size: 0x%0*Zx\n\ | 227 | dynamic: 0x%0*lx base: 0x%0*lx size: 0x%0*Zx\n\ |
436 | entry: 0x%0*lx phdr: 0x%0*lx phnum: %*u\n\n", | 228 | entry: 0x%0*lx phdr: 0x%0*lx phnum: %*u\n\n", |
437 | @@ -1787,7 +1787,7 @@ | 229 | @@ -1789,7 +1789,7 @@ open_path (const char *name, size_t namelen, int mode, |
438 | 230 | ||
439 | /* If we are debugging the search for libraries print the path | 231 | /* If we are debugging the search for libraries print the path |
440 | now if it hasn't happened now. */ | 232 | now if it hasn't happened now. */ |
@@ -443,7 +235,7 @@ Index: git/elf/dl-load.c | |||
443 | && current_what != this_dir->what) | 235 | && current_what != this_dir->what) |
444 | { | 236 | { |
445 | current_what = this_dir->what; | 237 | current_what = this_dir->what; |
446 | @@ -1808,7 +1808,7 @@ | 238 | @@ -1810,7 +1810,7 @@ open_path (const char *name, size_t namelen, int mode, |
447 | - buf); | 239 | - buf); |
448 | 240 | ||
449 | /* Print name we try if this is wanted. */ | 241 | /* Print name we try if this is wanted. */ |
@@ -452,7 +244,7 @@ Index: git/elf/dl-load.c | |||
452 | _dl_debug_printf (" trying file=%s\n", buf); | 244 | _dl_debug_printf (" trying file=%s\n", buf); |
453 | 245 | ||
454 | fd = open_verify (buf, fbp, loader, whatcode, mode, | 246 | fd = open_verify (buf, fbp, loader, whatcode, mode, |
455 | @@ -1953,7 +1953,7 @@ | 247 | @@ -1955,7 +1955,7 @@ _dl_map_object (struct link_map *loader, const char *name, |
456 | } | 248 | } |
457 | 249 | ||
458 | /* Display information if we are debugging. */ | 250 | /* Display information if we are debugging. */ |
@@ -461,7 +253,7 @@ Index: git/elf/dl-load.c | |||
461 | && loader != NULL) | 253 | && loader != NULL) |
462 | _dl_debug_printf ((mode & __RTLD_CALLMAP) == 0 | 254 | _dl_debug_printf ((mode & __RTLD_CALLMAP) == 0 |
463 | ? "\nfile=%s [%lu]; needed by %s [%lu]\n" | 255 | ? "\nfile=%s [%lu]; needed by %s [%lu]\n" |
464 | @@ -1995,7 +1995,7 @@ | 256 | @@ -1997,7 +1997,7 @@ _dl_map_object (struct link_map *loader, const char *name, |
465 | 257 | ||
466 | size_t namelen = strlen (name) + 1; | 258 | size_t namelen = strlen (name) + 1; |
467 | 259 | ||
@@ -470,8 +262,8 @@ Index: git/elf/dl-load.c | |||
470 | _dl_debug_printf ("find library=%s [%lu]; searching\n", name, nsid); | 262 | _dl_debug_printf ("find library=%s [%lu]; searching\n", name, nsid); |
471 | 263 | ||
472 | fd = -1; | 264 | fd = -1; |
473 | @@ -2122,7 +2122,7 @@ | 265 | @@ -2119,7 +2119,7 @@ _dl_map_object (struct link_map *loader, const char *name, |
474 | &realname, &fb, l, LA_SER_DEFAULT, &found_other_class); | 266 | #endif |
475 | 267 | ||
476 | /* Add another newline when we are tracing the library loading. */ | 268 | /* Add another newline when we are tracing the library loading. */ |
477 | - if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS)) | 269 | - if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS)) |
@@ -479,7 +271,7 @@ Index: git/elf/dl-load.c | |||
479 | _dl_debug_printf ("\n"); | 271 | _dl_debug_printf ("\n"); |
480 | } | 272 | } |
481 | else | 273 | else |
482 | @@ -2155,7 +2155,7 @@ | 274 | @@ -2152,7 +2152,7 @@ _dl_map_object (struct link_map *loader, const char *name, |
483 | if (__glibc_unlikely (fd == -1)) | 275 | if (__glibc_unlikely (fd == -1)) |
484 | { | 276 | { |
485 | if (trace_mode | 277 | if (trace_mode |
@@ -488,11 +280,78 @@ Index: git/elf/dl-load.c | |||
488 | { | 280 | { |
489 | /* We haven't found an appropriate library. But since we | 281 | /* We haven't found an appropriate library. But since we |
490 | are only interested in the list of libraries this isn't | 282 | are only interested in the list of libraries this isn't |
491 | Index: git/elf/dl-object.c | 283 | diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c |
492 | =================================================================== | 284 | index 11cb44b..588c3e4 100644 |
493 | --- git.orig/elf/dl-object.c 2014-08-27 04:59:01.572070587 +0000 | 285 | --- a/elf/dl-lookup.c |
494 | +++ git/elf/dl-object.c 2014-08-27 05:11:51.756070587 +0000 | 286 | +++ b/elf/dl-lookup.c |
495 | @@ -98,7 +98,7 @@ | 287 | @@ -302,7 +302,7 @@ do_lookup_unique (const char *undef_name, uint_fast32_t new_hash, |
288 | hash table. */ | ||
289 | if (__glibc_unlikely (tab->size)) | ||
290 | { | ||
291 | - assert (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK); | ||
292 | + assert (GLRO_dl_debug_mask & DL_DEBUG_PRELINK); | ||
293 | goto success; | ||
294 | } | ||
295 | #endif | ||
296 | @@ -378,7 +378,7 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash, | ||
297 | continue; | ||
298 | |||
299 | /* Print some debugging info if wanted. */ | ||
300 | - if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SYMBOLS)) | ||
301 | + if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SYMBOLS)) | ||
302 | _dl_debug_printf ("symbol=%s; lookup in file=%s [%lu]\n", | ||
303 | undef_name, DSO_FILENAME (map->l_name), | ||
304 | map->l_ns); | ||
305 | @@ -755,7 +755,7 @@ add_dependency (struct link_map *undef_map, struct link_map *map, int flags) | ||
306 | } | ||
307 | |||
308 | /* Display information if we are debugging. */ | ||
309 | - if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES)) | ||
310 | + if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES)) | ||
311 | _dl_debug_printf ("\ | ||
312 | \nfile=%s [%lu]; needed by %s [%lu] (relocation dependency)\n\n", | ||
313 | DSO_FILENAME (map->l_name), | ||
314 | @@ -859,7 +859,7 @@ _dl_lookup_symbol_x (const char *undef_name, struct link_map *undef_map, | ||
315 | { | ||
316 | if ((*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK) | ||
317 | && skip_map == NULL | ||
318 | - && !(GLRO(dl_debug_mask) & DL_DEBUG_UNUSED)) | ||
319 | + && !(GLRO_dl_debug_mask & DL_DEBUG_UNUSED)) | ||
320 | { | ||
321 | /* We could find no value for a strong reference. */ | ||
322 | const char *reference_name = undef_map ? undef_map->l_name : ""; | ||
323 | @@ -935,7 +935,7 @@ _dl_lookup_symbol_x (const char *undef_name, struct link_map *undef_map, | ||
324 | if (__glibc_unlikely (current_value.m->l_used == 0)) | ||
325 | current_value.m->l_used = 1; | ||
326 | |||
327 | - if (__glibc_unlikely (GLRO(dl_debug_mask) | ||
328 | + if (__glibc_unlikely (GLRO_dl_debug_mask | ||
329 | & (DL_DEBUG_BINDINGS|DL_DEBUG_PRELINK))) | ||
330 | _dl_debug_bindings (undef_name, undef_map, ref, | ||
331 | ¤t_value, version, type_class, protected); | ||
332 | @@ -1000,7 +1000,7 @@ _dl_debug_bindings (const char *undef_name, struct link_map *undef_map, | ||
333 | { | ||
334 | const char *reference_name = undef_map->l_name; | ||
335 | |||
336 | - if (GLRO(dl_debug_mask) & DL_DEBUG_BINDINGS) | ||
337 | + if (GLRO_dl_debug_mask & DL_DEBUG_BINDINGS) | ||
338 | { | ||
339 | _dl_debug_printf ("binding file %s [%lu] to %s [%lu]: %s symbol `%s'", | ||
340 | DSO_FILENAME (reference_name), | ||
341 | @@ -1014,7 +1014,7 @@ _dl_debug_bindings (const char *undef_name, struct link_map *undef_map, | ||
342 | _dl_debug_printf_c ("\n"); | ||
343 | } | ||
344 | #ifdef SHARED | ||
345 | - if (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK) | ||
346 | + if (GLRO_dl_debug_mask & DL_DEBUG_PRELINK) | ||
347 | { | ||
348 | int conflict = 0; | ||
349 | struct sym_val val = { NULL, NULL }; | ||
350 | diff --git a/elf/dl-object.c b/elf/dl-object.c | ||
351 | index 1d58bbc..938a257 100644 | ||
352 | --- a/elf/dl-object.c | ||
353 | +++ b/elf/dl-object.c | ||
354 | @@ -98,7 +98,7 @@ _dl_new_object (char *realname, const char *libname, int type, | ||
496 | new->l_type = type; | 355 | new->l_type = type; |
497 | /* If we set the bit now since we know it is never used we avoid | 356 | /* If we set the bit now since we know it is never used we avoid |
498 | dirtying the cache line later. */ | 357 | dirtying the cache line later. */ |
@@ -501,11 +360,60 @@ Index: git/elf/dl-object.c | |||
501 | new->l_used = 1; | 360 | new->l_used = 1; |
502 | new->l_loader = loader; | 361 | new->l_loader = loader; |
503 | #if NO_TLS_OFFSET != 0 | 362 | #if NO_TLS_OFFSET != 0 |
504 | Index: git/elf/dl-reloc.c | 363 | diff --git a/elf/dl-open.c b/elf/dl-open.c |
505 | =================================================================== | 364 | index 2db1c02..1288604 100644 |
506 | --- git.orig/elf/dl-reloc.c 2014-08-27 04:59:01.572070587 +0000 | 365 | --- a/elf/dl-open.c |
507 | +++ git/elf/dl-reloc.c 2014-08-27 05:12:07.056070587 +0000 | 366 | +++ b/elf/dl-open.c |
508 | @@ -183,7 +183,7 @@ | 367 | @@ -147,7 +147,7 @@ add_to_global (struct link_map *new) |
368 | ns->_ns_main_searchlist->r_list[new_nlist++] = map; | ||
369 | |||
370 | /* We modify the global scope. Report this. */ | ||
371 | - if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES)) | ||
372 | + if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SCOPES)) | ||
373 | _dl_debug_printf ("\nadd %s [%lu] to global scope\n", | ||
374 | map->l_name, map->l_ns); | ||
375 | } | ||
376 | @@ -251,7 +251,7 @@ dl_open_worker (void *a) | ||
377 | if (__glibc_unlikely (new->l_searchlist.r_list != NULL)) | ||
378 | { | ||
379 | /* Let the user know about the opencount. */ | ||
380 | - if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES)) | ||
381 | + if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES)) | ||
382 | _dl_debug_printf ("opening file=%s [%lu]; direct_opencount=%u\n\n", | ||
383 | new->l_name, new->l_ns, new->l_direct_opencount); | ||
384 | |||
385 | @@ -302,7 +302,7 @@ dl_open_worker (void *a) | ||
386 | LIBC_PROBE (map_complete, 3, args->nsid, r, new); | ||
387 | |||
388 | /* Print scope information. */ | ||
389 | - if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES)) | ||
390 | + if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SCOPES)) | ||
391 | _dl_show_scope (new, 0); | ||
392 | |||
393 | /* Only do lazy relocation if `LD_BIND_NOW' is not set. */ | ||
394 | @@ -519,7 +519,7 @@ dl_open_worker (void *a) | ||
395 | } | ||
396 | |||
397 | /* Print scope information. */ | ||
398 | - if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES)) | ||
399 | + if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SCOPES)) | ||
400 | _dl_show_scope (imap, from_scope); | ||
401 | } | ||
402 | |||
403 | @@ -577,7 +577,7 @@ TLS generation counter wrapped! Please report this.")); | ||
404 | #endif | ||
405 | |||
406 | /* Let the user know about the opencount. */ | ||
407 | - if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES)) | ||
408 | + if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES)) | ||
409 | _dl_debug_printf ("opening file=%s [%lu]; direct_opencount=%u\n\n", | ||
410 | new->l_name, new->l_ns, new->l_direct_opencount); | ||
411 | } | ||
412 | diff --git a/elf/dl-reloc.c b/elf/dl-reloc.c | ||
413 | index 61252d7..4c83815 100644 | ||
414 | --- a/elf/dl-reloc.c | ||
415 | +++ b/elf/dl-reloc.c | ||
416 | @@ -178,7 +178,7 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[], | ||
509 | && __builtin_expect (l->l_info[DT_BIND_NOW] != NULL, 0)) | 417 | && __builtin_expect (l->l_info[DT_BIND_NOW] != NULL, 0)) |
510 | lazy = 0; | 418 | lazy = 0; |
511 | 419 | ||
@@ -514,11 +422,11 @@ Index: git/elf/dl-reloc.c | |||
514 | _dl_debug_printf ("\nrelocation processing: %s%s\n", | 422 | _dl_debug_printf ("\nrelocation processing: %s%s\n", |
515 | DSO_FILENAME (l->l_name), lazy ? " (lazy)" : ""); | 423 | DSO_FILENAME (l->l_name), lazy ? " (lazy)" : ""); |
516 | 424 | ||
517 | Index: git/elf/dl-version.c | 425 | diff --git a/elf/dl-version.c b/elf/dl-version.c |
518 | =================================================================== | 426 | index f6e5cd9..320628c 100644 |
519 | --- git.orig/elf/dl-version.c 2014-08-27 04:59:01.608070587 +0000 | 427 | --- a/elf/dl-version.c |
520 | +++ git/elf/dl-version.c 2014-08-27 05:12:19.568070587 +0000 | 428 | +++ b/elf/dl-version.c |
521 | @@ -82,7 +82,7 @@ | 429 | @@ -82,7 +82,7 @@ match_symbol (const char *name, Lmid_t ns, ElfW(Word) hash, const char *string, |
522 | int result = 0; | 430 | int result = 0; |
523 | 431 | ||
524 | /* Display information about what we are doing while debugging. */ | 432 | /* Display information about what we are doing while debugging. */ |
@@ -527,3 +435,122 @@ Index: git/elf/dl-version.c | |||
527 | _dl_debug_printf ("\ | 435 | _dl_debug_printf ("\ |
528 | checking for version `%s' in file %s [%lu] required by file %s [%lu]\n", | 436 | checking for version `%s' in file %s [%lu] required by file %s [%lu]\n", |
529 | string, DSO_FILENAME (map->l_name), | 437 | string, DSO_FILENAME (map->l_name), |
438 | diff --git a/elf/get-dynamic-info.h b/elf/get-dynamic-info.h | ||
439 | index dc8359d..7774fda 100644 | ||
440 | --- a/elf/get-dynamic-info.h | ||
441 | +++ b/elf/get-dynamic-info.h | ||
442 | @@ -166,7 +166,7 @@ elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp) | ||
443 | them. Therefore to avoid breaking existing applications the | ||
444 | best we can do is add a warning during debugging with the | ||
445 | intent of notifying the user of the problem. */ | ||
446 | - if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0) | ||
447 | + if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_FILES, 0) | ||
448 | && l->l_flags_1 & ~DT_1_SUPPORTED_MASK) | ||
449 | _dl_debug_printf ("\nWARNING: Unsupported flag value(s) of 0x%x in DT_FLAGS_1.\n", | ||
450 | l->l_flags_1 & ~DT_1_SUPPORTED_MASK); | ||
451 | diff --git a/elf/rtld.c b/elf/rtld.c | ||
452 | index fc3a2db..59c4637 100644 | ||
453 | --- a/elf/rtld.c | ||
454 | +++ b/elf/rtld.c | ||
455 | @@ -323,7 +323,7 @@ _dl_start_final (void *arg, struct dl_start_final_info *info) | ||
456 | } | ||
457 | #endif | ||
458 | |||
459 | - if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_STATISTICS)) | ||
460 | + if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_STATISTICS)) | ||
461 | { | ||
462 | #ifndef HP_TIMING_NONAVAIL | ||
463 | print_statistics (&rtld_total_time); | ||
464 | @@ -1701,7 +1701,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n", | ||
465 | after relocation. */ | ||
466 | struct link_map *l; | ||
467 | |||
468 | - if (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK) | ||
469 | + if (GLRO_dl_debug_mask & DL_DEBUG_PRELINK) | ||
470 | { | ||
471 | struct r_scope_elem *scope = &main_map->l_searchlist; | ||
472 | |||
473 | @@ -1731,7 +1731,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n", | ||
474 | _dl_printf ("\n"); | ||
475 | } | ||
476 | } | ||
477 | - else if (GLRO(dl_debug_mask) & DL_DEBUG_UNUSED) | ||
478 | + else if (GLRO_dl_debug_mask & DL_DEBUG_UNUSED) | ||
479 | { | ||
480 | /* Look through the dependencies of the main executable | ||
481 | and determine which of them is not actually | ||
482 | @@ -1839,7 +1839,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n", | ||
483 | } | ||
484 | } | ||
485 | |||
486 | - if ((GLRO(dl_debug_mask) & DL_DEBUG_PRELINK) | ||
487 | + if ((GLRO_dl_debug_mask & DL_DEBUG_PRELINK) | ||
488 | && rtld_multiple_ref) | ||
489 | { | ||
490 | /* Mark the link map as not yet relocated again. */ | ||
491 | @@ -1972,7 +1972,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n", | ||
492 | if (r_list == r_listend && liblist == liblistend) | ||
493 | prelinked = true; | ||
494 | |||
495 | - if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS)) | ||
496 | + if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS)) | ||
497 | _dl_debug_printf ("\nprelink checking: %s\n", | ||
498 | prelinked ? "ok" : "failed"); | ||
499 | } | ||
500 | @@ -1990,7 +1990,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n", | ||
501 | GLRO(dl_init_all_dirs) = GL(dl_all_dirs); | ||
502 | |||
503 | /* Print scope information. */ | ||
504 | - if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES)) | ||
505 | + if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SCOPES)) | ||
506 | { | ||
507 | _dl_debug_printf ("\nInitial object scopes\n"); | ||
508 | |||
509 | @@ -2265,7 +2265,7 @@ process_dl_debug (const char *dl_debug) | ||
510 | if (debopts[cnt].len == len | ||
511 | && memcmp (dl_debug, debopts[cnt].name, len) == 0) | ||
512 | { | ||
513 | - GLRO(dl_debug_mask) |= debopts[cnt].mask; | ||
514 | + GLRO_dl_debug_mask |= debopts[cnt].mask; | ||
515 | any_debug = 1; | ||
516 | break; | ||
517 | } | ||
518 | @@ -2286,7 +2286,7 @@ warning: debug option `%s' unknown; try LD_DEBUG=help\n", copy); | ||
519 | ++dl_debug; | ||
520 | } | ||
521 | |||
522 | - if (GLRO(dl_debug_mask) & DL_DEBUG_UNUSED) | ||
523 | + if (GLRO_dl_debug_mask & DL_DEBUG_UNUSED) | ||
524 | { | ||
525 | /* In order to get an accurate picture of whether a particular | ||
526 | DT_NEEDED entry is actually used we have to process both | ||
527 | @@ -2294,7 +2294,7 @@ warning: debug option `%s' unknown; try LD_DEBUG=help\n", copy); | ||
528 | GLRO(dl_lazy) = 0; | ||
529 | } | ||
530 | |||
531 | - if (GLRO(dl_debug_mask) & DL_DEBUG_HELP) | ||
532 | + if (GLRO_dl_debug_mask & DL_DEBUG_HELP) | ||
533 | { | ||
534 | size_t cnt; | ||
535 | |||
536 | @@ -2499,7 +2499,7 @@ process_envvars (enum mode *modep) | ||
537 | mode = trace; | ||
538 | GLRO(dl_verbose) = 1; | ||
539 | #if __OPTION_EGLIBC_RTLD_DEBUG | ||
540 | - GLRO(dl_debug_mask) |= DL_DEBUG_PRELINK; | ||
541 | + GLRO_dl_debug_mask |= DL_DEBUG_PRELINK; | ||
542 | #endif | ||
543 | GLRO(dl_trace_prelink) = &envline[17]; | ||
544 | } | ||
545 | @@ -2548,7 +2548,7 @@ process_envvars (enum mode *modep) | ||
546 | { | ||
547 | unsetenv ("MALLOC_CHECK_"); | ||
548 | #if __OPTION_EGLIBC_RTLD_DEBUG | ||
549 | - GLRO(dl_debug_mask) = 0; | ||
550 | + GLRO_dl_debug_mask = 0; | ||
551 | #endif | ||
552 | } | ||
553 | |||
554 | -- | ||
555 | 2.1.4 | ||
556 | |||
diff --git a/meta/recipes-core/glibc/glibc/0027-eglibc-use-option-groups-Conditionally-exclude-c-tes.patch b/meta/recipes-core/glibc/glibc/0027-eglibc-use-option-groups-Conditionally-exclude-c-tes.patch new file mode 100644 index 0000000000..4106167df5 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0027-eglibc-use-option-groups-Conditionally-exclude-c-tes.patch | |||
@@ -0,0 +1,145 @@ | |||
1 | From e98779aa56fae0346dff2d0b72acadd0eaf01891 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 27 May 2015 16:10:50 -0700 | ||
4 | Subject: [PATCH 27/27] eglibc-use-option-groups: Conditionally exclude c++ | ||
5 | tests | ||
6 | |||
7 | Some test programs written in c++ are still included in spite of | ||
8 | "libc-cxx-tests" being omitted from DISTRO_FEATURES_LIBC. | ||
9 | All .cc programs are compiled with g++. | ||
10 | g++ automatically specifies linking against the C++ library. | ||
11 | This patch conditionally excludes the following tests as well: | ||
12 | |||
13 | bug-atexit3-lib.cc | ||
14 | tst-cancel24.cc | ||
15 | tst-cancel24-static.cc | ||
16 | tst-unique3lib.cc | ||
17 | tst-unique3lib2.cc | ||
18 | tst-unique4lib.cc | ||
19 | tst-unique3.cc | ||
20 | tst-unique4.cc | ||
21 | |||
22 | Tested with DISTRO_FEATURES_LIBC_remove = " libc-cxx-tests" | ||
23 | |||
24 | [YOCTO #7003] | ||
25 | |||
26 | Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> | ||
27 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
28 | --- | ||
29 | dlfcn/Makefile | 8 ++++++-- | ||
30 | elf/Makefile | 19 ++++++++++++++----- | ||
31 | nptl/Makefile | 12 ++++++++++-- | ||
32 | 3 files changed, 30 insertions(+), 9 deletions(-) | ||
33 | |||
34 | diff --git a/dlfcn/Makefile b/dlfcn/Makefile | ||
35 | index 3827607..920bd58 100644 | ||
36 | --- a/dlfcn/Makefile | ||
37 | +++ b/dlfcn/Makefile | ||
38 | @@ -39,16 +39,20 @@ ifeq (yes,$(build-shared)) | ||
39 | tests = glrefmain failtest tst-dladdr default errmsg1 tstcxaatexit \ | ||
40 | bug-dlopen1 bug-dlsym1 tst-dlinfo bug-atexit1 bug-atexit2 \ | ||
41 | tstatexit bug-dl-leaf tst-rec-dlopen | ||
42 | -endif | ||
43 | - | ||
44 | tests-$(OPTION_EGLIBC_CXX_TESTS) += bug-atexit3 | ||
45 | |||
46 | +endif | ||
47 | + | ||
48 | modules-names = glreflib1 glreflib2 glreflib3 failtestmod defaultmod1 \ | ||
49 | defaultmod2 errmsg1mod modatexit modcxaatexit \ | ||
50 | bug-dlsym1-lib1 bug-dlsym1-lib2 bug-atexit1-lib \ | ||
51 | bug-atexit2-lib bug-dl-leaf-lib \ | ||
52 | bug-dl-leaf-lib-cb moddummy1 moddummy2 | ||
53 | |||
54 | +ifeq (y,$(OPTION_EGLIBC_CXX_TESTS)) | ||
55 | +modules-names += bug-atexit3-lib | ||
56 | +endif | ||
57 | + | ||
58 | failtestmod.so-no-z-defs = yes | ||
59 | glreflib2.so-no-z-defs = yes | ||
60 | errmsg1mod.so-no-z-defs = yes | ||
61 | diff --git a/elf/Makefile b/elf/Makefile | ||
62 | index 71a18a1..26fe3c5 100644 | ||
63 | --- a/elf/Makefile | ||
64 | +++ b/elf/Makefile | ||
65 | @@ -17,6 +17,8 @@ | ||
66 | |||
67 | # Makefile for elf subdirectory of GNU C Library. | ||
68 | |||
69 | +include ../option-groups.mak | ||
70 | + | ||
71 | subdir := elf | ||
72 | |||
73 | include ../Makeconfig | ||
74 | @@ -145,12 +147,15 @@ tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \ | ||
75 | unload3 unload4 unload5 unload6 unload7 unload8 tst-global1 order2 \ | ||
76 | tst-audit1 tst-audit2 tst-audit8 tst-audit9 \ | ||
77 | tst-stackguard1 tst-addr1 tst-thrlock \ | ||
78 | - tst-unique1 tst-unique2 $(if $(CXX),tst-unique3 tst-unique4 \ | ||
79 | - tst-nodelete) \ | ||
80 | + tst-unique1 tst-unique2 \ | ||
81 | tst-initorder tst-initorder2 tst-relsort1 tst-null-argv \ | ||
82 | tst-ptrguard1 tst-tlsalign tst-tlsalign-extern tst-nodelete-opened \ | ||
83 | tst-nodelete2 | ||
84 | # reldep9 | ||
85 | +ifeq (y,$(OPTION_EGLIBC_CXX_TESTS)) | ||
86 | +tests += $(if $(CXX),tst-unique3 tst-unique4 tst-nodelete) | ||
87 | +endif | ||
88 | + | ||
89 | ifeq ($(build-hardcoded-path-in-tests),yes) | ||
90 | tests += tst-dlopen-aout | ||
91 | LDFLAGS-tst-dlopen-aout = $(no-pie-ldflag) | ||
92 | @@ -209,9 +214,6 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \ | ||
93 | tst-unique1mod1 tst-unique1mod2 \ | ||
94 | tst-unique2mod1 tst-unique2mod2 \ | ||
95 | tst-auditmod9a tst-auditmod9b \ | ||
96 | - $(if $(CXX),tst-unique3lib tst-unique3lib2 tst-unique4lib \ | ||
97 | - tst-nodelete-uniquemod tst-nodelete-rtldmod \ | ||
98 | - tst-nodelete-zmod) \ | ||
99 | tst-initordera1 tst-initorderb1 \ | ||
100 | tst-initordera2 tst-initorderb2 \ | ||
101 | tst-initordera3 tst-initordera4 \ | ||
102 | @@ -220,6 +222,13 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \ | ||
103 | tst-relsort1mod1 tst-relsort1mod2 tst-array2dep \ | ||
104 | tst-array5dep tst-null-argv-lib \ | ||
105 | tst-tlsalign-lib tst-nodelete-opened-lib tst-nodelete2mod | ||
106 | + | ||
107 | +ifeq (y,$(OPTION_EGLIBC_CXX_TESTS)) | ||
108 | +modules-names += $(if $(CXX),tst-unique3lib tst-unique3lib2 tst-unique4lib \ | ||
109 | + tst-nodelete-uniquemod tst-nodelete-rtldmod \ | ||
110 | + tst-nodelete-zmod) | ||
111 | +endif | ||
112 | + | ||
113 | ifeq (yes,$(have-protected-data)) | ||
114 | modules-names += tst-protected1moda tst-protected1modb | ||
115 | tests += tst-protected1a tst-protected1b | ||
116 | diff --git a/nptl/Makefile b/nptl/Makefile | ||
117 | index 596ca3c..50a708b 100644 | ||
118 | --- a/nptl/Makefile | ||
119 | +++ b/nptl/Makefile | ||
120 | @@ -390,12 +390,20 @@ link-libc-static := $(common-objpfx)libc.a $(static-gnulib) \ | ||
121 | $(common-objpfx)libc.a | ||
122 | |||
123 | tests-static += tst-locale1 tst-locale2 tst-stackguard1-static \ | ||
124 | - tst-cancel21-static tst-cancel24-static tst-cond8-static \ | ||
125 | + tst-cancel21-static tst-cond8-static \ | ||
126 | tst-mutex8-static tst-mutexpi8-static tst-sem11-static \ | ||
127 | tst-sem12-static | ||
128 | -tests += tst-stackguard1-static tst-cancel21-static tst-cancel24-static \ | ||
129 | + | ||
130 | +ifeq (y,$(OPTION_EGLIBC_CXX_TESTS)) | ||
131 | +tests-static += tst-cancel24-static | ||
132 | +endif | ||
133 | + | ||
134 | +tests += tst-stackguard1-static tst-cancel21-static \ | ||
135 | tst-cond8-static tst-mutex8-static tst-mutexpi8-static \ | ||
136 | tst-sem11-static tst-sem12-static | ||
137 | + | ||
138 | +tests-$(OPTION_EGLIBC_CXX_TESTS) += tst-cancel24-static | ||
139 | + | ||
140 | xtests-static += tst-setuid1-static | ||
141 | |||
142 | # These tests are linked with libc before libpthread | ||
143 | -- | ||
144 | 2.1.4 | ||
145 | |||
diff --git a/meta/recipes-core/glibc/glibc/CVE-2015-1781-resolv-nss_dns-dns-host.c-buffer-overf.patch b/meta/recipes-core/glibc/glibc/CVE-2015-1781-resolv-nss_dns-dns-host.c-buffer-overf.patch deleted file mode 100644 index c02fa127cd..0000000000 --- a/meta/recipes-core/glibc/glibc/CVE-2015-1781-resolv-nss_dns-dns-host.c-buffer-overf.patch +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | From 2959eda9272a033863c271aff62095abd01bd4e3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Arjun Shankar <arjun.is@lostca.se> | ||
3 | Date: Tue, 21 Apr 2015 14:06:31 +0200 | ||
4 | Subject: [PATCH] CVE-2015-1781: resolv/nss_dns/dns-host.c buffer overflow | ||
5 | [BZ#18287] | ||
6 | |||
7 | Upstream-Status: Backport | ||
8 | https://sourceware.org/bugzilla/show_bug.cgi?id=18287 | ||
9 | --- | ||
10 | resolv/nss_dns/dns-host.c | 3 ++- | ||
11 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
12 | |||
13 | diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c | ||
14 | index b16b0ddf110907a0086b86612e544d3dc75182b8..d8c55791591750567f00e616e5d7b378dec934a0 100644 | ||
15 | --- a/resolv/nss_dns/dns-host.c | ||
16 | +++ b/resolv/nss_dns/dns-host.c | ||
17 | @@ -608,21 +608,22 @@ getanswer_r (const querybuf *answer, int anslen, const char *qname, int qtype, | ||
18 | int n, ancount, qdcount; | ||
19 | int haveanswer, had_error; | ||
20 | char *bp, **ap, **hap; | ||
21 | char tbuf[MAXDNAME]; | ||
22 | const char *tname; | ||
23 | int (*name_ok) (const char *); | ||
24 | u_char packtmp[NS_MAXCDNAME]; | ||
25 | int have_to_map = 0; | ||
26 | uintptr_t pad = -(uintptr_t) buffer % __alignof__ (struct host_data); | ||
27 | buffer += pad; | ||
28 | - if (__glibc_unlikely (buflen < sizeof (struct host_data) + pad)) | ||
29 | + buflen = buflen > pad ? buflen - pad : 0; | ||
30 | + if (__glibc_unlikely (buflen < sizeof (struct host_data))) | ||
31 | { | ||
32 | /* The buffer is too small. */ | ||
33 | too_small: | ||
34 | *errnop = ERANGE; | ||
35 | *h_errnop = NETDB_INTERNAL; | ||
36 | return NSS_STATUS_TRYAGAIN; | ||
37 | } | ||
38 | host_data = (struct host_data *) buffer; | ||
39 | linebuflen = buflen - sizeof (struct host_data); | ||
40 | if (buflen - sizeof (struct host_data) != linebuflen) | ||
41 | -- | ||
42 | 2.2.2 | ||
43 | |||
diff --git a/meta/recipes-core/glibc/glibc/Fix-__memcpy_chk-on-non-SSE2-CPUs.patch b/meta/recipes-core/glibc/glibc/Fix-__memcpy_chk-on-non-SSE2-CPUs.patch deleted file mode 100644 index 2e768bb6e8..0000000000 --- a/meta/recipes-core/glibc/glibc/Fix-__memcpy_chk-on-non-SSE2-CPUs.patch +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | From 132a1328eccd20621b77f7810eebbeec0a1af187 Mon Sep 17 00:00:00 2001 | ||
2 | From: Evangelos Foutras <evangelos@foutrelis.com> | ||
3 | Date: Tue, 10 Feb 2015 03:22:58 +0000 | ||
4 | Subject: [PATCH] Fix __memcpy_chk on non-SSE2 CPUs | ||
5 | |||
6 | In commit 8b4416d, the 1: jump label in __mempcpy_chk was accidentally | ||
7 | moved. This resulted in failures of mempcpy on CPU without SSE2. | ||
8 | |||
9 | Upstream-Status: Backport | ||
10 | |||
11 | https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=132a1328eccd20621b77f7810eebbeec0a1af187 | ||
12 | |||
13 | Signed-off-by: Andre McCurdy <armccurdy@gmail.com> | ||
14 | |||
15 | --- | ||
16 | sysdeps/i386/i686/multiarch/mempcpy_chk.S | 4 ++-- | ||
17 | 3 files changed, 9 insertions(+), 3 deletions(-) | ||
18 | |||
19 | diff --git a/sysdeps/i386/i686/multiarch/mempcpy_chk.S b/sysdeps/i386/i686/multiarch/mempcpy_chk.S | ||
20 | index 207b648..b6fa202 100644 | ||
21 | --- a/sysdeps/i386/i686/multiarch/mempcpy_chk.S | ||
22 | +++ b/sysdeps/i386/i686/multiarch/mempcpy_chk.S | ||
23 | @@ -36,8 +36,8 @@ ENTRY(__mempcpy_chk) | ||
24 | cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) | ||
25 | jne 1f | ||
26 | call __init_cpu_features | ||
27 | - leal __mempcpy_chk_ia32@GOTOFF(%ebx), %eax | ||
28 | -1: testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) | ||
29 | +1: leal __mempcpy_chk_ia32@GOTOFF(%ebx), %eax | ||
30 | + testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) | ||
31 | jz 2f | ||
32 | leal __mempcpy_chk_sse2_unaligned@GOTOFF(%ebx), %eax | ||
33 | testl $bit_Fast_Unaligned_Load, FEATURE_OFFSET+index_Fast_Unaligned_Load+__cpu_features@GOTOFF(%ebx) | ||
34 | -- | ||
35 | 1.9.1 | ||
36 | |||
diff --git a/meta/recipes-core/glibc/glibc/IO-acquire-lock-fix.patch b/meta/recipes-core/glibc/glibc/IO-acquire-lock-fix.patch deleted file mode 100644 index ffbaba14a2..0000000000 --- a/meta/recipes-core/glibc/glibc/IO-acquire-lock-fix.patch +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | import http://sourceware.org/ml/libc-ports/2007-12/msg00000.html | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | Index: git/bits/stdio-lock.h | ||
6 | =================================================================== | ||
7 | --- git.orig/bits/stdio-lock.h 2014-08-29 10:33:57.960070587 -0700 | ||
8 | +++ git/bits/stdio-lock.h 2014-08-29 10:33:57.952070587 -0700 | ||
9 | @@ -49,6 +49,8 @@ | ||
10 | _IO_cleanup_region_start ((void (*) (void *)) _IO_funlockfile, (_fp)); \ | ||
11 | _IO_flockfile (_fp) | ||
12 | |||
13 | +# define _IO_acquire_lock_clear_flags2(_fp) _IO_acquire_lock (_fp) | ||
14 | + | ||
15 | # define _IO_release_lock(_fp) \ | ||
16 | _IO_funlockfile (_fp); \ | ||
17 | _IO_cleanup_region_end (0) | ||
diff --git a/meta/recipes-core/glibc/glibc/add_resource_h_to_wait_h.patch b/meta/recipes-core/glibc/glibc/add_resource_h_to_wait_h.patch deleted file mode 100644 index 70f57c4979..0000000000 --- a/meta/recipes-core/glibc/glibc/add_resource_h_to_wait_h.patch +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | The older versions of perf still require sys/resource.h to be | ||
2 | present in this header, the newer version of perf in 3.2 and | ||
3 | beyond directly include sys/resource.h | ||
4 | |||
5 | Upstream-Status: Inappropriate [older kernel/perf specific] | ||
6 | |||
7 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
8 | |||
9 | Index: git/posix/sys/wait.h | ||
10 | =================================================================== | ||
11 | --- git.orig/posix/sys/wait.h 2014-08-29 10:35:10.432070587 -0700 | ||
12 | +++ git/posix/sys/wait.h 2014-08-29 10:35:10.424070587 -0700 | ||
13 | @@ -27,6 +27,7 @@ | ||
14 | __BEGIN_DECLS | ||
15 | |||
16 | #include <signal.h> | ||
17 | +#include <sys/resource.h> | ||
18 | |||
19 | /* These macros could also be defined in <stdlib.h>. */ | ||
20 | #if !defined _STDLIB_H || (!defined __USE_XOPEN && !defined __USE_XOPEN2K8) | ||
diff --git a/meta/recipes-core/glibc/glibc/elf-Makefile-fix-a-typo.patch b/meta/recipes-core/glibc/glibc/elf-Makefile-fix-a-typo.patch deleted file mode 100644 index ec480067a8..0000000000 --- a/meta/recipes-core/glibc/glibc/elf-Makefile-fix-a-typo.patch +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | From 6207fb45553ee98f2f326883b7c21b76c8267343 Mon Sep 17 00:00:00 2001 | ||
2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
3 | Date: Tue, 31 Mar 2015 02:31:25 -0700 | ||
4 | Subject: [PATCH] elf/Makefile: fix a typo | ||
5 | |||
6 | Fixed a typo: | ||
7 | name-target-directory -> make-target-directory | ||
8 | |||
9 | There is no name-target-directory, it should be make-target-directory, | ||
10 | this fixed the error: | ||
11 | /bin/bash: /path/to/elf/runtime-linker.T: No such file or directory | ||
12 | Makefile:361: recipe for target '/path/to/elf/runtime-linker.st' failed | ||
13 | |||
14 | Upstream-Status: Pending | ||
15 | |||
16 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
17 | --- | ||
18 | elf/Makefile | 2 +- | ||
19 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
20 | |||
21 | diff --git a/elf/Makefile b/elf/Makefile | ||
22 | index e5b142c..62fe245 100644 | ||
23 | --- a/elf/Makefile | ||
24 | +++ b/elf/Makefile | ||
25 | @@ -358,7 +358,7 @@ $(objpfx)interp.os: $(elf-objpfx)runtime-linker.h | ||
26 | |||
27 | $(elf-objpfx)runtime-linker.h: $(elf-objpfx)runtime-linker.st; @: | ||
28 | $(elf-objpfx)runtime-linker.st: $(common-objpfx)config.make | ||
29 | - $(name-target-directory) | ||
30 | + $(make-target-directory) | ||
31 | echo '#define RUNTIME_LINKER "$(rtlddir)/$(rtld-installed-name)"' \ | ||
32 | > ${@:st=T} | ||
33 | $(move-if-change) ${@:st=T} ${@:st=h} | ||
34 | -- | ||
35 | 1.7.9.5 | ||
36 | |||
diff --git a/meta/recipes-core/glibc/glibc/fix-tibetian-locales.patch b/meta/recipes-core/glibc/glibc/fix-tibetian-locales.patch deleted file mode 100644 index 9ab9fdcf12..0000000000 --- a/meta/recipes-core/glibc/glibc/fix-tibetian-locales.patch +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | cross localedef fails to compile these locales because name_fmt field is empty | ||
2 | It is not acceptable for cross localedef and it errors out | ||
3 | |||
4 | LC_NAME: field `name_fmt' not defined | ||
5 | |||
6 | We therefore give a dummy string to the format, the real fix needs some native | ||
7 | tibetian person to define proper name_fmt | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | |||
13 | Index: git/localedata/locales/bo_CN | ||
14 | =================================================================== | ||
15 | --- git.orig/localedata/locales/bo_CN 2014-08-29 10:35:22.464070587 -0700 | ||
16 | +++ git/localedata/locales/bo_CN 2014-08-29 10:35:22.456070587 -0700 | ||
17 | @@ -146,7 +146,7 @@ | ||
18 | LC_NAME | ||
19 | % FIXME | ||
20 | |||
21 | -name_fmt "" | ||
22 | +name_fmt "FIXME" | ||
23 | % name_gen "FIXME" | ||
24 | % name_miss "FIXME" | ||
25 | % name_mr "FIXME" | ||
26 | Index: git/localedata/locales/bo_IN | ||
27 | =================================================================== | ||
28 | --- git.orig/localedata/locales/bo_IN 2014-08-29 10:35:22.464070587 -0700 | ||
29 | +++ git/localedata/locales/bo_IN 2014-08-29 10:35:22.456070587 -0700 | ||
30 | @@ -71,7 +71,7 @@ | ||
31 | |||
32 | LC_NAME | ||
33 | % FIXME | ||
34 | -name_fmt "" | ||
35 | +name_fmt "FIXME" | ||
36 | % name_gen "FIXME" | ||
37 | % name_miss "FIXME" | ||
38 | % name_mr "FIXME" | ||
diff --git a/meta/recipes-core/glibc/glibc/fix_am_rootsbindir.patch b/meta/recipes-core/glibc/glibc/fix_am_rootsbindir.patch deleted file mode 100644 index 668e8bf678..0000000000 --- a/meta/recipes-core/glibc/glibc/fix_am_rootsbindir.patch +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | sysdeps/gnu/configure.ac: handle correctly $libc_cv_rootsbindir | ||
2 | |||
3 | Upstream-Status:Pending | ||
4 | Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com> | ||
5 | |||
6 | Index: git/sysdeps/gnu/configure | ||
7 | =================================================================== | ||
8 | --- git.orig/sysdeps/gnu/configure 2014-08-27 07:24:38.572070587 +0000 | ||
9 | +++ git/sysdeps/gnu/configure 2014-08-27 07:24:41.308070587 +0000 | ||
10 | @@ -32,6 +32,6 @@ | ||
11 | else | ||
12 | libc_cv_localstatedir=$localstatedir | ||
13 | fi | ||
14 | - libc_cv_rootsbindir=/sbin | ||
15 | + test -n "$libc_cv_rootsbindir" || libc_cv_rootsbindir=/sbin | ||
16 | ;; | ||
17 | esac | ||
18 | Index: git/sysdeps/gnu/configure.ac | ||
19 | =================================================================== | ||
20 | --- git.orig/sysdeps/gnu/configure.ac 2014-08-27 07:24:38.572070587 +0000 | ||
21 | +++ git/sysdeps/gnu/configure.ac 2014-08-27 07:24:41.308070587 +0000 | ||
22 | @@ -21,6 +21,6 @@ | ||
23 | else | ||
24 | libc_cv_localstatedir=$localstatedir | ||
25 | fi | ||
26 | - libc_cv_rootsbindir=/sbin | ||
27 | + test -n "$libc_cv_rootsbindir" || libc_cv_rootsbindir=/sbin | ||
28 | ;; | ||
29 | esac | ||
diff --git a/meta/recipes-core/glibc/glibc/initgroups_keys.patch b/meta/recipes-core/glibc/glibc/initgroups_keys.patch deleted file mode 100644 index 32aa15a533..0000000000 --- a/meta/recipes-core/glibc/glibc/initgroups_keys.patch +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | This is needed since initgroups belongs to NET group | ||
2 | so when NET is disabled in eglibc build then it reports | ||
3 | as undefined symbol | ||
4 | |||
5 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Index: git/nss/getent.c | ||
9 | =================================================================== | ||
10 | --- git.orig/nss/getent.c 2014-08-27 05:15:25.996070587 +0000 | ||
11 | +++ git/nss/getent.c 2014-08-27 05:16:00.048070587 +0000 | ||
12 | @@ -879,7 +879,7 @@ | ||
13 | D(group) | ||
14 | D(gshadow) | ||
15 | D(hosts) | ||
16 | -D(initgroups) | ||
17 | +DN(initgroups) | ||
18 | D(netgroup) | ||
19 | D(networks) | ||
20 | D(passwd) | ||
diff --git a/meta/recipes-core/glibc/glibc/makesyscall.patch b/meta/recipes-core/glibc/glibc/makesyscall.patch deleted file mode 100644 index 9ab597f604..0000000000 --- a/meta/recipes-core/glibc/glibc/makesyscall.patch +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | On x32 builds, sysd-syscalls appears malformed since the make-target-directory | ||
2 | appears on the wrong line. This causes races during the build process where you can | ||
3 | see failures like: | ||
4 | |||
5 | Assembler messages: | ||
6 | Fatal error: can't create [...]glibc/2.21-r0/build-x86_64-poky-linux-gnux32/time/gettimeofday.os: No such file or directory | ||
7 | Assembler messages: | ||
8 | Fatal error: can't create [...]glibc/2.21-r0/build-x86_64-poky-linux-gnux32/time/time.os: No such file or directory | ||
9 | |||
10 | The isue is that the carridge return is being escaped when it should | ||
11 | not be. The change to sysd-syscalls with this change: | ||
12 | |||
13 | before: | ||
14 | |||
15 | """ | ||
16 | $(foreach p,$(sysd-rules-targets),$(objpfx)$(patsubst %,$p,time).os): \ | ||
17 | $(..)sysdeps/unix/make-syscalls.sh $(make-target-directory) | ||
18 | (echo '#include <dl-vdso.h>'; | ||
19 | """ | ||
20 | |||
21 | after: | ||
22 | |||
23 | """ | ||
24 | $(foreach p,$(sysd-rules-targets),$(objpfx)$(patsubst %,$p,time).os): \ | ||
25 | $(..)sysdeps/unix/make-syscalls.sh | ||
26 | $(make-target-directory) | ||
27 | (echo '#include <dl-vdso.h>'; | ||
28 | """ | ||
29 | |||
30 | which ensures the target directory is correctly created. Only x32 uses the vdso | ||
31 | code which contains the bug which is why the error only really appears on x32. | ||
32 | |||
33 | Upstream Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=18409 | ||
34 | Upstream Fix: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d9efd775ba51916b58b899d8b1c8501105a830de | ||
35 | |||
36 | Upstream-Status: Backport | ||
37 | RP 2015/5/13 | ||
38 | |||
39 | Index: git/sysdeps/unix/make-syscalls.sh | ||
40 | =================================================================== | ||
41 | --- git.orig/sysdeps/unix/make-syscalls.sh | ||
42 | +++ git/sysdeps/unix/make-syscalls.sh | ||
43 | @@ -278,7 +278,7 @@ while read file srcfile caller syscall a | ||
44 | vdso_symver=`echo "$vdso_symver" | sed 's/\./_/g'` | ||
45 | echo "\ | ||
46 | \$(foreach p,\$(sysd-rules-targets),\$(objpfx)\$(patsubst %,\$p,$file).os): \\ | ||
47 | - \$(..)sysdeps/unix/make-syscalls.sh\ | ||
48 | + \$(..)sysdeps/unix/make-syscalls.sh | ||
49 | \$(make-target-directory) | ||
50 | (echo '#include <dl-vdso.h>'; \\ | ||
51 | echo 'extern void *${strong}_ifunc (void) __asm (\"${strong}\");'; \\ | ||
diff --git a/meta/recipes-core/glibc/glibc/mips-rld-map-check.patch b/meta/recipes-core/glibc/glibc/mips-rld-map-check.patch deleted file mode 100644 index 9f593d6359..0000000000 --- a/meta/recipes-core/glibc/glibc/mips-rld-map-check.patch +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | |||
2 | On mips target, binutils currently sets DT_MIPS_RLD_MAP to 0 in dynamic | ||
3 | section if a --version-script sets _RLD_MAP to local. This is apparently | ||
4 | a binutils bug, but libc shouldn't segfault in this case. | ||
5 | |||
6 | see also: http://sourceware.org/bugilla/show_bug.cgi?id=11615 | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | 9/19/2010 - added by Qing He <qing.he@intel.com> | ||
11 | |||
12 | |||
13 | --- | ||
14 | Index: git/sysdeps/mips/dl-machine.h | ||
15 | =================================================================== | ||
16 | --- git.orig/sysdeps/mips/dl-machine.h 2014-08-27 04:58:11.840070587 +0000 | ||
17 | +++ git/sysdeps/mips/dl-machine.h 2014-08-27 04:58:11.832070587 +0000 | ||
18 | @@ -70,7 +70,8 @@ | ||
19 | /* If there is a DT_MIPS_RLD_MAP entry in the dynamic section, fill it in | ||
20 | with the run-time address of the r_debug structure */ | ||
21 | #define ELF_MACHINE_DEBUG_SETUP(l,r) \ | ||
22 | -do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \ | ||
23 | +do { if ((l)->l_info[DT_MIPS (RLD_MAP)] && \ | ||
24 | + (l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) \ | ||
25 | *(ElfW(Addr) *)((l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) = \ | ||
26 | (ElfW(Addr)) (r); \ | ||
27 | } while (0) | ||
diff --git a/meta/recipes-core/glibc/glibc/multilib_readlib.patch b/meta/recipes-core/glibc/glibc/multilib_readlib.patch deleted file mode 100644 index 13ffc46f91..0000000000 --- a/meta/recipes-core/glibc/glibc/multilib_readlib.patch +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | Upstream-Status: Inappropriate [embedded specific] | ||
2 | |||
3 | Replace the OECORE_KNOWN_INTERPRETER_NAMES with the value of | ||
4 | variable EGLIBC_KNOWN_INTERPRETER_NAMES. | ||
5 | |||
6 | Lianhao Lu, 08/01/2011 | ||
7 | |||
8 | Index: git/elf/readlib.c | ||
9 | =================================================================== | ||
10 | --- git.orig/elf/readlib.c 2014-08-29 10:34:16.824070587 -0700 | ||
11 | +++ git/elf/readlib.c 2014-08-29 10:34:16.816070587 -0700 | ||
12 | @@ -51,6 +51,7 @@ | ||
13 | #ifdef SYSDEP_KNOWN_INTERPRETER_NAMES | ||
14 | SYSDEP_KNOWN_INTERPRETER_NAMES | ||
15 | #endif | ||
16 | + OECORE_KNOWN_INTERPRETER_NAMES | ||
17 | }; | ||
18 | |||
19 | static struct known_names known_libs[] = | ||
diff --git a/meta/recipes-core/glibc/glibc/ppc-sqrt_finite.patch b/meta/recipes-core/glibc/glibc/ppc-sqrt_finite.patch deleted file mode 100644 index 6ea666b1d6..0000000000 --- a/meta/recipes-core/glibc/glibc/ppc-sqrt_finite.patch +++ /dev/null | |||
@@ -1,184 +0,0 @@ | |||
1 | on ppc fixes the errors like below | ||
2 | | ./.libs/libpulsecore-1.1.so: undefined reference to `__sqrt_finite' | ||
3 | | collect2: ld returned 1 exit status | ||
4 | |||
5 | Upstream-Status: Pending | ||
6 | |||
7 | ChangeLog | ||
8 | |||
9 | 2012-01-06 Khem Raj <raj.khem@gmail.com> | ||
10 | |||
11 | * sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c: Add __*_finite alias. | ||
12 | Remove cruft. | ||
13 | * sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c: Ditto. | ||
14 | * sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c: Ditto. | ||
15 | * sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c: Ditto. | ||
16 | |||
17 | Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | ||
18 | =================================================================== | ||
19 | --- libc.orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | ||
20 | +++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | ||
21 | @@ -39,14 +39,8 @@ static const float half = 0.5; | ||
22 | We find the actual square root and half of its reciprocal | ||
23 | simultaneously. */ | ||
24 | |||
25 | -#ifdef __STDC__ | ||
26 | double | ||
27 | __ieee754_sqrt (double b) | ||
28 | -#else | ||
29 | -double | ||
30 | -__ieee754_sqrt (b) | ||
31 | - double b; | ||
32 | -#endif | ||
33 | { | ||
34 | if (__builtin_expect (b > 0, 1)) | ||
35 | { | ||
36 | @@ -132,3 +126,4 @@ __ieee754_sqrt (b) | ||
37 | } | ||
38 | return f_wash (b); | ||
39 | } | ||
40 | +strong_alias (__ieee754_sqrt, __sqrt_finite) | ||
41 | Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | ||
42 | =================================================================== | ||
43 | --- libc.orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | ||
44 | +++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | ||
45 | @@ -37,14 +37,8 @@ static const float threehalf = 1.5; | ||
46 | We find the reciprocal square root and use that to compute the actual | ||
47 | square root. */ | ||
48 | |||
49 | -#ifdef __STDC__ | ||
50 | float | ||
51 | __ieee754_sqrtf (float b) | ||
52 | -#else | ||
53 | -float | ||
54 | -__ieee754_sqrtf (b) | ||
55 | - float b; | ||
56 | -#endif | ||
57 | { | ||
58 | if (__builtin_expect (b > 0, 1)) | ||
59 | { | ||
60 | @@ -99,3 +93,4 @@ __ieee754_sqrtf (b) | ||
61 | } | ||
62 | return f_washf (b); | ||
63 | } | ||
64 | +strong_alias (__ieee754_sqrtf, __sqrtf_finite) | ||
65 | Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | ||
66 | =================================================================== | ||
67 | --- libc.orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | ||
68 | +++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | ||
69 | @@ -39,14 +39,8 @@ static const float half = 0.5; | ||
70 | We find the actual square root and half of its reciprocal | ||
71 | simultaneously. */ | ||
72 | |||
73 | -#ifdef __STDC__ | ||
74 | double | ||
75 | __ieee754_sqrt (double b) | ||
76 | -#else | ||
77 | -double | ||
78 | -__ieee754_sqrt (b) | ||
79 | - double b; | ||
80 | -#endif | ||
81 | { | ||
82 | if (__builtin_expect (b > 0, 1)) | ||
83 | { | ||
84 | @@ -132,3 +126,4 @@ __ieee754_sqrt (b) | ||
85 | } | ||
86 | return f_wash (b); | ||
87 | } | ||
88 | +strong_alias (__ieee754_sqrt, __sqrt_finite) | ||
89 | Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | ||
90 | =================================================================== | ||
91 | --- libc.orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | ||
92 | +++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | ||
93 | @@ -37,14 +37,8 @@ static const float threehalf = 1.5; | ||
94 | We find the reciprocal square root and use that to compute the actual | ||
95 | square root. */ | ||
96 | |||
97 | -#ifdef __STDC__ | ||
98 | float | ||
99 | __ieee754_sqrtf (float b) | ||
100 | -#else | ||
101 | -float | ||
102 | -__ieee754_sqrtf (b) | ||
103 | - float b; | ||
104 | -#endif | ||
105 | { | ||
106 | if (__builtin_expect (b > 0, 1)) | ||
107 | { | ||
108 | @@ -99,3 +93,4 @@ __ieee754_sqrtf (b) | ||
109 | } | ||
110 | return f_washf (b); | ||
111 | } | ||
112 | +strong_alias (__ieee754_sqrtf, __sqrtf_finite) | ||
113 | Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | ||
114 | =================================================================== | ||
115 | --- libc.orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | ||
116 | +++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | ||
117 | @@ -132,3 +132,4 @@ __ieee754_sqrt (b) | ||
118 | } | ||
119 | return f_wash (b); | ||
120 | } | ||
121 | +strong_alias (__ieee754_sqrt, __sqrt_finite) | ||
122 | Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | ||
123 | =================================================================== | ||
124 | --- libc.orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | ||
125 | +++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | ||
126 | @@ -99,3 +99,4 @@ __ieee754_sqrtf (b) | ||
127 | } | ||
128 | return f_washf (b); | ||
129 | } | ||
130 | +strong_alias (__ieee754_sqrtf, __sqrtf_finite) | ||
131 | Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | ||
132 | =================================================================== | ||
133 | --- libc.orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | ||
134 | +++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | ||
135 | @@ -132,3 +132,4 @@ __ieee754_sqrt (b) | ||
136 | } | ||
137 | return f_wash (b); | ||
138 | } | ||
139 | +strong_alias (__ieee754_sqrt, __sqrt_finite) | ||
140 | Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | ||
141 | =================================================================== | ||
142 | --- libc.orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | ||
143 | +++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | ||
144 | @@ -99,3 +99,4 @@ __ieee754_sqrtf (b) | ||
145 | } | ||
146 | return f_washf (b); | ||
147 | } | ||
148 | +strong_alias (__ieee754_sqrtf, __sqrtf_finite) | ||
149 | Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | ||
150 | =================================================================== | ||
151 | --- libc.orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | ||
152 | +++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | ||
153 | @@ -132,3 +132,4 @@ __ieee754_sqrt (b) | ||
154 | } | ||
155 | return f_wash (b); | ||
156 | } | ||
157 | +strong_alias (__ieee754_sqrt, __sqrt_finite) | ||
158 | Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | ||
159 | =================================================================== | ||
160 | --- libc.orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | ||
161 | +++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | ||
162 | @@ -99,3 +99,4 @@ __ieee754_sqrtf (b) | ||
163 | } | ||
164 | return f_washf (b); | ||
165 | } | ||
166 | +strong_alias (__ieee754_sqrtf, __sqrtf_finite) | ||
167 | Index: libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | ||
168 | =================================================================== | ||
169 | --- libc.orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | ||
170 | +++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | ||
171 | @@ -132,3 +132,4 @@ __ieee754_sqrt (b) | ||
172 | } | ||
173 | return f_wash (b); | ||
174 | } | ||
175 | +strong_alias (__ieee754_sqrt, __sqrt_finite) | ||
176 | Index: libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | ||
177 | =================================================================== | ||
178 | --- libc.orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | ||
179 | +++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | ||
180 | @@ -99,3 +99,4 @@ __ieee754_sqrtf (b) | ||
181 | } | ||
182 | return f_washf (b); | ||
183 | } | ||
184 | +strong_alias (__ieee754_sqrtf, __sqrtf_finite) | ||
diff --git a/meta/recipes-core/glibc/glibc/ppce6500-32b_slow_ieee754_sqrt.patch b/meta/recipes-core/glibc/glibc/ppce6500-32b_slow_ieee754_sqrt.patch deleted file mode 100644 index 4c6c1070c3..0000000000 --- a/meta/recipes-core/glibc/glibc/ppce6500-32b_slow_ieee754_sqrt.patch +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | __ieee754_sqrt{,f} are now inline functions and call out __slow versions | ||
2 | |||
3 | |||
4 | Signed-off-by: chunrong guo <B40290@freescale.com> | ||
5 | Upstream-Status: Pending | ||
6 | |||
7 | diff -rNu libc-orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | ||
8 | --- libc-orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c 2014-04-08 04:39:58.487229887 -0500 | ||
9 | +++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c 2014-04-08 04:40:52.643069198 -0500 | ||
10 | @@ -41,10 +41,10 @@ | ||
11 | |||
12 | #ifdef __STDC__ | ||
13 | double | ||
14 | -__ieee754_sqrt (double b) | ||
15 | +__slow_ieee754_sqrt (double b) | ||
16 | #else | ||
17 | double | ||
18 | -__ieee754_sqrt (b) | ||
19 | +__slow_ieee754_sqrt (b) | ||
20 | double b; | ||
21 | #endif | ||
22 | { | ||
23 | @@ -83,7 +83,7 @@ | ||
24 | |||
25 | /* Handle small numbers by scaling. */ | ||
26 | if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) | ||
27 | - return __ieee754_sqrt (b * two108) * twom54; | ||
28 | + return __slow_ieee754_sqrt (b * two108) * twom54; | ||
29 | |||
30 | #define FMADD(a_, c_, b_) \ | ||
31 | ({ double __r; \ | ||
32 | diff -rNu libc-orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | ||
33 | --- libc-orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c 2014-04-08 04:39:58.487229887 -0500 | ||
34 | +++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c 2014-04-08 04:41:26.017067682 -0500 | ||
35 | @@ -39,10 +39,10 @@ | ||
36 | |||
37 | #ifdef __STDC__ | ||
38 | float | ||
39 | -__ieee754_sqrtf (float b) | ||
40 | +__slow_ieee754_sqrtf (float b) | ||
41 | #else | ||
42 | float | ||
43 | -__ieee754_sqrtf (b) | ||
44 | +__slow_ieee754_sqrtf (b) | ||
45 | float b; | ||
46 | #endif | ||
47 | { | ||
diff --git a/meta/recipes-core/glibc/glibc_2.21.bb b/meta/recipes-core/glibc/glibc_2.22.bb index 55424bfaac..6aaf72260a 100644 --- a/meta/recipes-core/glibc/glibc_2.21.bb +++ b/meta/recipes-core/glibc/glibc_2.22.bb | |||
@@ -1,63 +1,56 @@ | |||
1 | require glibc.inc | 1 | require glibc.inc |
2 | 2 | ||
3 | DEPENDS += "gperf-native kconfig-frontends-native" | 3 | LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \ |
4 | file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
5 | file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \ | ||
6 | file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c" | ||
4 | 7 | ||
5 | SRCREV = "4e42b5b8f89f0e288e68be7ad70f9525aebc2cff" | 8 | DEPENDS += "gperf-native kconfig-frontends-native" |
6 | 9 | ||
7 | BRANCH = "release/${PV}/master" | 10 | SRCREV ?= "a34d1c6afc86521d6ad17662a3b5362d8481514c" |
11 | |||
12 | BRANCH ?= "release/${PV}/master" | ||
13 | |||
14 | GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git" | ||
15 | |||
16 | SRC_URI = "${GLIBC_GIT_URI};branch=${BRANCH};name=glibc \ | ||
17 | file://0004-Backport-https-sourceware.org-ml-libc-ports-2007-12-.patch \ | ||
18 | file://0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch \ | ||
19 | file://0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch \ | ||
20 | file://0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch \ | ||
21 | file://0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \ | ||
22 | file://0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch \ | ||
23 | file://0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \ | ||
24 | file://0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \ | ||
25 | file://0012-Make-ld-version-output-matching-grok-gold-s-output.patch \ | ||
26 | file://0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch \ | ||
27 | file://0014-Add-unused-attribute.patch \ | ||
28 | file://0015-When-disabling-SSE-also-make-sure-that-fpmath-is-not.patch \ | ||
29 | file://0016-yes-within-the-path-sets-wrong-config-variables.patch \ | ||
30 | file://0017-timezone-re-written-tzselect-as-posix-sh.patch \ | ||
31 | file://0018-eglibc-Cross-building-and-testing-instructions.patch \ | ||
32 | file://0019-eglibc-Bring-Eglibc-option-group-infrastructure-to-g.patch \ | ||
33 | file://0020-eglibc-Help-bootstrap-cross-toolchain.patch \ | ||
34 | file://0021-eglibc-cherry-picked-from-http-www.eglibc.org-archiv.patch \ | ||
35 | file://0022-eglibc-Clear-cache-lines-on-ppc8xx.patch \ | ||
36 | file://0023-eglibc-Resolve-__fpscr_values-on-SH4.patch \ | ||
37 | file://0024-eglibc-Forward-port-eglibc-options-groups-support.patch \ | ||
38 | file://0025-eglibc-Install-PIC-archives.patch \ | ||
39 | file://0026-eglibc-dl_debug_mask-is-controlled-by-__OPTION_EGLIB.patch \ | ||
40 | file://0027-eglibc-use-option-groups-Conditionally-exclude-c-tes.patch \ | ||
41 | " | ||
8 | 42 | ||
9 | SRC_URI = "git://sourceware.org/git/glibc.git;branch=${BRANCH} \ | 43 | SRC_URI += "\ |
10 | file://IO-acquire-lock-fix.patch \ | ||
11 | file://mips-rld-map-check.patch \ | ||
12 | file://etc/ld.so.conf \ | 44 | file://etc/ld.so.conf \ |
13 | file://generate-supported.mk \ | 45 | file://generate-supported.mk \ |
14 | file://glibc.fix_sqrt2.patch \ | ||
15 | file://multilib_readlib.patch \ | ||
16 | file://ppc-sqrt_finite.patch \ | ||
17 | file://ppc_slow_ieee754_sqrt.patch \ | ||
18 | file://add_resource_h_to_wait_h.patch \ | ||
19 | file://0001-R_ARM_TLS_DTPOFF32.patch \ | ||
20 | file://0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \ | ||
21 | file://fix-tibetian-locales.patch \ | ||
22 | file://ppce6500-32b_slow_ieee754_sqrt.patch \ | ||
23 | file://grok_gold.patch \ | ||
24 | file://fix_am_rootsbindir.patch \ | ||
25 | file://0001-Add-unused-attribute.patch \ | ||
26 | file://0001-When-disabling-SSE-also-make-sure-that-fpmath-is-not.patch \ | ||
27 | file://0001-yes-within-the-path-sets-wrong-config-variables.patch \ | ||
28 | file://elf-Makefile-fix-a-typo.patch \ | ||
29 | file://makesyscall.patch \ | ||
30 | file://Fix-__memcpy_chk-on-non-SSE2-CPUs.patch \ | ||
31 | ${EGLIBCPATCHES} \ | ||
32 | ${CVEPATCHES} \ | ||
33 | " | ||
34 | EGLIBCPATCHES = "\ | ||
35 | file://timezone-re-written-tzselect-as-posix-sh.patch \ | ||
36 | file://eglibc.patch \ | ||
37 | file://option-groups.patch \ | ||
38 | file://GLRO_dl_debug_mask.patch \ | ||
39 | file://eglibc-header-bootstrap.patch \ | ||
40 | file://eglibc-resolv-dynamic.patch \ | ||
41 | file://eglibc-ppc8xx-cache-line-workaround.patch \ | ||
42 | file://eglibc-sh4-fpscr_values.patch \ | ||
43 | file://eglibc-use-option-groups.patch \ | ||
44 | " | ||
45 | # file://eglibc-install-pic-archives.patch \ | ||
46 | # file://initgroups_keys.patch \ | ||
47 | # | ||
48 | CVEPATCHES = "\ | ||
49 | file://CVE-2015-1781-resolv-nss_dns-dns-host.c-buffer-overf.patch \ | ||
50 | " | 46 | " |
51 | 47 | ||
52 | LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \ | 48 | SRC_URI_append_class-nativesdk = "\ |
53 | file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | 49 | file://0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch \ |
54 | file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \ | 50 | file://0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch \ |
55 | file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c" | 51 | file://0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch \ |
52 | " | ||
56 | 53 | ||
57 | SRC_URI_append_class-nativesdk = " file://ld-search-order.patch \ | ||
58 | file://relocatable_sdk.patch \ | ||
59 | file://relocatable_sdk_fix_openpath.patch \ | ||
60 | " | ||
61 | S = "${WORKDIR}/git" | 54 | S = "${WORKDIR}/git" |
62 | B = "${WORKDIR}/build-${TARGET_SYS}" | 55 | B = "${WORKDIR}/build-${TARGET_SYS}" |
63 | 56 | ||