mirror of
https://abf.rosa.ru/djam/glibc40.git
synced 2025-02-23 07:42:54 +00:00
Add more patches from OpenMandriva package
This commit is contained in:
parent
bbbf561823
commit
3404e089cb
20 changed files with 15296 additions and 0 deletions
122
glibc-2.20-i586-hptiming.patch
Normal file
122
glibc-2.20-i586-hptiming.patch
Normal file
|
@ -0,0 +1,122 @@
|
||||||
|
2011-2014 Thomas Backlund <tmb@mageia.org>
|
||||||
|
|
||||||
|
* Rebased / adapted for new glibc
|
||||||
|
|
||||||
|
2006-05-17 Gwenole Beauchesne <gbeauchesne@mandriva.com>
|
||||||
|
|
||||||
|
* Update and simplify for glibc 2.4.90.
|
||||||
|
|
||||||
|
2002-12-07 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com>
|
||||||
|
|
||||||
|
Let an i586 rtld load i686 libraries (especially libpthread)
|
||||||
|
|
||||||
|
* elf/rtld.c (HP_TIMING_AVAIL): Redefine to HP_TIMING_HWCAP_AVAIL
|
||||||
|
since early statistics require high-precision timers.
|
||||||
|
* sysdeps/generic/ldsodefs.h (rtld_global): Declare
|
||||||
|
_dl_cpuclock_offset if HP_TIMING_HWCAP_AVAIL is defined too.
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/i386/i586/Makefile: New file.
|
||||||
|
* sysdeps/unix/sysv/linux/i386/i586/hp-timing.c: New file.
|
||||||
|
* sysdeps/unix/sysv/linux/i386/i586/hp-timing.h: New file.
|
||||||
|
---
|
||||||
|
elf/rtld.c | 12 ++++++++++-
|
||||||
|
sysdeps/generic/ldsodefs.h | 2 -
|
||||||
|
sysdeps/i386/i586/Makefile | 4 +++
|
||||||
|
sysdeps/i386/i586/hp-timing.c | 2 +
|
||||||
|
sysdeps/i386/i586/hp-timing.h | 43 ++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
|
||||||
|
diff -Nurp glibc-2.20.orig/elf/rtld.c glibc-2.20/elf/rtld.c
|
||||||
|
--- glibc-2.20.orig/elf/rtld.c 2014-09-07 11:09:09.000000000 +0300
|
||||||
|
+++ glibc-2.20/elf/rtld.c 2014-09-08 18:12:17.640928030 +0300
|
||||||
|
@@ -16,6 +16,9 @@
|
||||||
|
License along with the GNU C Library; if not, see
|
||||||
|
<http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
+/* Early statistics require high-precision timing. */
|
||||||
|
+#define NEED_HP_TIMING_HWCAP_AVAIL 1
|
||||||
|
+
|
||||||
|
#include <errno.h>
|
||||||
|
#include <dlfcn.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
@@ -195,6 +198,12 @@ static void dl_main (const ElfW(Phdr) *p
|
||||||
|
static struct libname_list _dl_rtld_libname;
|
||||||
|
static struct libname_list _dl_rtld_libname2;
|
||||||
|
|
||||||
|
+/* Run-time detect availability of high-precision timer? */
|
||||||
|
+#ifdef HP_TIMING_HWCAP_AVAIL
|
||||||
|
+# undef HP_SMALL_TIMING_AVAIL
|
||||||
|
+# define HP_SMALL_TIMING_AVAIL HP_TIMING_HWCAP_AVAIL
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
/* Variable for statistics. */
|
||||||
|
#ifndef HP_TIMING_NONAVAIL
|
||||||
|
static hp_timing_t relocate_time;
|
||||||
|
@@ -296,7 +305,8 @@ _dl_start_final (void *arg, struct dl_st
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
- HP_TIMING_NOW (GL(dl_cpuclock_offset));
|
||||||
|
+ if (HP_SMALL_TIMING_AVAIL)
|
||||||
|
+ HP_TIMING_NOW (GL(dl_cpuclock_offset));
|
||||||
|
|
||||||
|
/* Initialize the stack end variable. */
|
||||||
|
__libc_stack_end = __builtin_frame_address (0);
|
||||||
|
diff -Nurp glibc-2.20.orig/sysdeps/generic/ldsodefs.h glibc-2.20/sysdeps/generic/ldsodefs.h
|
||||||
|
--- glibc-2.20.orig/sysdeps/generic/ldsodefs.h 2014-09-07 11:09:09.000000000 +0300
|
||||||
|
+++ glibc-2.20/sysdeps/generic/ldsodefs.h 2014-09-08 18:17:19.655631175 +0300
|
||||||
|
@@ -319,7 +319,7 @@ struct rtld_global
|
||||||
|
/* The object to be initialized first. */
|
||||||
|
EXTERN struct link_map *_dl_initfirst;
|
||||||
|
|
||||||
|
-#if HP_SMALL_TIMING_AVAIL
|
||||||
|
+#if HP_SMALL_TIMING_AVAIL || defined HP_TIMING_HWCAP_AVAIL
|
||||||
|
/* Start time on CPU clock. */
|
||||||
|
EXTERN hp_timing_t _dl_cpuclock_offset;
|
||||||
|
#endif
|
||||||
|
diff -Nurp glibc-2.20.orig/sysdeps/i386/i586/hp-timing.h glibc-2.20/sysdeps/i386/i586/hp-timing.h
|
||||||
|
--- glibc-2.20.orig/sysdeps/i386/i586/hp-timing.h 1970-01-01 02:00:00.000000000 +0200
|
||||||
|
+++ glibc-2.20/sysdeps/i386/i586/hp-timing.h 2014-09-08 18:07:38.466353624 +0300
|
||||||
|
@@ -0,0 +1,43 @@
|
||||||
|
+#ifndef _HP_HWCAP_TIMING_H
|
||||||
|
+#define _HP_HWCAP_TIMING_H 1
|
||||||
|
+
|
||||||
|
+/* We can use the i686 implementation with slight changes. */
|
||||||
|
+#include <sysdeps/i386/i686/hp-timing.h>
|
||||||
|
+
|
||||||
|
+/* We need the definition of HWCAP_I386_TSC. */
|
||||||
|
+#include <sysdeps/i386/dl-hwcapinfo.h>
|
||||||
|
+
|
||||||
|
+/* We need to perform a runtime check for the timestamp register. */
|
||||||
|
+#undef HP_SMALL_TIMING_AVAIL
|
||||||
|
+#define HP_SMALL_TIMING_AVAIL (0)
|
||||||
|
+
|
||||||
|
+/* HP_TIMING_HWCAP_AVAIL: this macro performs a run-time check for the
|
||||||
|
+ capability. */
|
||||||
|
+#define HP_TIMING_HWCAP_AVAIL (_dl_hp_timing_avail())
|
||||||
|
+
|
||||||
|
+/* Perform the TSC check. */
|
||||||
|
+#ifdef NEED_HP_TIMING_HWCAP_AVAIL
|
||||||
|
+static inline
|
||||||
|
+unsigned int
|
||||||
|
+_dl_cpuid_edx (unsigned int op)
|
||||||
|
+{
|
||||||
|
+ unsigned int edx;
|
||||||
|
+ __asm__ __volatile__("push %%ebx ; cpuid ; pop %%ebx"
|
||||||
|
+ : "=d" (edx) : "a" (op) : "ecx");
|
||||||
|
+ return edx;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static int
|
||||||
|
+internal_function
|
||||||
|
+_dl_hp_timing_avail (void)
|
||||||
|
+{
|
||||||
|
+ static int has_tsc = -1;
|
||||||
|
+
|
||||||
|
+ if (__builtin_expect (has_tsc == -1, 0))
|
||||||
|
+ has_tsc = (_dl_cpuid_edx(1) & HWCAP_I386_TSC) == HWCAP_I386_TSC;
|
||||||
|
+
|
||||||
|
+ return has_tsc;
|
||||||
|
+}
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#endif /* hp-timing.h */
|
92
glibc-2.22-blacklist-CPUs-from-lock-elision.patch
Normal file
92
glibc-2.22-blacklist-CPUs-from-lock-elision.patch
Normal file
|
@ -0,0 +1,92 @@
|
||||||
|
--- glibc-2.24/sysdeps/unix/sysv/linux/x86/elision-conf.c.0091~ 2016-08-02 04:01:36.000000000 +0200
|
||||||
|
+++ glibc-2.24/sysdeps/unix/sysv/linux/x86/elision-conf.c 2016-08-17 17:04:53.815350950 +0200
|
||||||
|
@@ -66,8 +66,11 @@ elision_init (int argc __attribute__ ((u
|
||||||
|
#ifdef ENABLE_LOCK_ELISION
|
||||||
|
__pthread_force_elision = __libc_enable_secure ? 0 : __elision_available;
|
||||||
|
#endif
|
||||||
|
- if (!HAS_CPU_FEATURE (RTM))
|
||||||
|
+ if (!HAS_CPU_FEATURE (RTM)) {
|
||||||
|
__elision_aconf.retry_try_xbegin = 0; /* Disable elision on rwlocks */
|
||||||
|
+ __elision_available = 0;
|
||||||
|
+ __pthread_force_elision = 0;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef SHARED
|
||||||
|
--- glibc-2.24/sysdeps/x86/cpu-features.c.0091~ 2016-08-02 04:01:36.000000000 +0200
|
||||||
|
+++ glibc-2.24/sysdeps/x86/cpu-features.c 2016-08-17 17:10:06.401454187 +0200
|
||||||
|
@@ -22,7 +22,7 @@
|
||||||
|
static void
|
||||||
|
get_common_indeces (struct cpu_features *cpu_features,
|
||||||
|
unsigned int *family, unsigned int *model,
|
||||||
|
- unsigned int *extended_model)
|
||||||
|
+ unsigned int *extended_model, unsigned int *stepping)
|
||||||
|
{
|
||||||
|
if (family)
|
||||||
|
{
|
||||||
|
@@ -34,6 +34,7 @@ get_common_indeces (struct cpu_features
|
||||||
|
*family = (eax >> 8) & 0x0f;
|
||||||
|
*model = (eax >> 4) & 0x0f;
|
||||||
|
*extended_model = (eax >> 12) & 0xf0;
|
||||||
|
+ *stepping = eax & 0x0f;
|
||||||
|
if (*family == 0x0f)
|
||||||
|
{
|
||||||
|
*family += (eax >> 20) & 0xff;
|
||||||
|
@@ -97,6 +98,7 @@ init_cpu_features (struct cpu_features *
|
||||||
|
unsigned int ebx, ecx, edx;
|
||||||
|
unsigned int family = 0;
|
||||||
|
unsigned int model = 0;
|
||||||
|
+ unsigned int stepping = 0;
|
||||||
|
enum cpu_features_kind kind;
|
||||||
|
|
||||||
|
#if !HAS_CPUID
|
||||||
|
@@ -116,7 +118,7 @@ init_cpu_features (struct cpu_features *
|
||||||
|
|
||||||
|
kind = arch_kind_intel;
|
||||||
|
|
||||||
|
- get_common_indeces (cpu_features, &family, &model, &extended_model);
|
||||||
|
+ get_common_indeces (cpu_features, &family, &model, &extended_model, &stepping);
|
||||||
|
|
||||||
|
if (family == 0x06)
|
||||||
|
{
|
||||||
|
@@ -213,7 +215,7 @@ init_cpu_features (struct cpu_features *
|
||||||
|
|
||||||
|
kind = arch_kind_amd;
|
||||||
|
|
||||||
|
- get_common_indeces (cpu_features, &family, &model, &extended_model);
|
||||||
|
+ get_common_indeces (cpu_features, &family, &model, &extended_model, &stepping);
|
||||||
|
|
||||||
|
ecx = cpu_features->cpuid[COMMON_CPUID_INDEX_1].ecx;
|
||||||
|
|
||||||
|
@@ -250,7 +252,7 @@ init_cpu_features (struct cpu_features *
|
||||||
|
else
|
||||||
|
{
|
||||||
|
kind = arch_kind_other;
|
||||||
|
- get_common_indeces (cpu_features, NULL, NULL, NULL);
|
||||||
|
+ get_common_indeces (cpu_features, NULL, NULL, NULL, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Support i586 if CX8 is available. */
|
||||||
|
@@ -265,6 +267,12 @@ init_cpu_features (struct cpu_features *
|
||||||
|
no_cpuid:
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+ /* Disable Intel TSX (HLE and RTM) due to erratum HSD136/HSW136
|
||||||
|
+ on Haswell processors */
|
||||||
|
+ if (kind == arch_kind_intel && family == 6 &&
|
||||||
|
+ ((model == 63 && stepping <= 2) || (model == 60 && stepping <= 3) ||
|
||||||
|
+ (model == 69 && stepping <= 1) || (model == 70 && stepping <= 1)))
|
||||||
|
+ cpu_features->cpuid[COMMON_CPUID_INDEX_7].ebx &= ~(bit_cpu_RTM | bit_cpu_HLE);
|
||||||
|
cpu_features->family = family;
|
||||||
|
cpu_features->model = model;
|
||||||
|
cpu_features->kind = kind;
|
||||||
|
--- glibc-2.24/sysdeps/x86/cpu-features.h.0091~ 2016-08-02 04:01:36.000000000 +0200
|
||||||
|
+++ glibc-2.24/sysdeps/x86/cpu-features.h 2016-08-17 17:04:53.815350950 +0200
|
||||||
|
@@ -57,6 +57,7 @@
|
||||||
|
/* COMMON_CPUID_INDEX_7. */
|
||||||
|
#define bit_cpu_ERMS (1 << 9)
|
||||||
|
#define bit_cpu_RTM (1 << 11)
|
||||||
|
+#define bit_cpu_HLE (1 << 4)
|
||||||
|
#define bit_cpu_AVX2 (1 << 5)
|
||||||
|
#define bit_cpu_AVX512F (1 << 16)
|
||||||
|
#define bit_cpu_AVX512DQ (1 << 17)
|
140
glibc-bug-regex-gcc5.patch
Normal file
140
glibc-bug-regex-gcc5.patch
Normal file
|
@ -0,0 +1,140 @@
|
||||||
|
Index: glibc-2.22-193-g315267a/posix/bug-regex11.c
|
||||||
|
===================================================================
|
||||||
|
--- glibc-2.22-193-g315267a.orig/posix/bug-regex11.c
|
||||||
|
+++ glibc-2.22-193-g315267a/posix/bug-regex11.c
|
||||||
|
@@ -22,6 +22,7 @@
|
||||||
|
#include <regex.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
+#include <libc-internal.h>
|
||||||
|
|
||||||
|
/* Tests supposed to match. */
|
||||||
|
struct
|
||||||
|
@@ -119,6 +120,14 @@ main (void)
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ DIAG_PUSH_NEEDS_COMMENT
|
||||||
|
+#if __GNUC_PREREQ (5, 0)
|
||||||
|
+ /* GCC 5.0 warns about array subscript being above array bounds,
|
||||||
|
+ but that's not entirely possible since n is limited to
|
||||||
|
+ static nmatch which is limited to at most 5 (see tests above).
|
||||||
|
+ This is likely PR/59124 which is still not fixed. */
|
||||||
|
+ DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Warray-bounds")
|
||||||
|
+#endif
|
||||||
|
for (n = 0; n < tests[i].nmatch; ++n)
|
||||||
|
if (rm[n].rm_so != tests[i].rm[n].rm_so
|
||||||
|
|| rm[n].rm_eo != tests[i].rm[n].rm_eo)
|
||||||
|
@@ -130,6 +139,7 @@ main (void)
|
||||||
|
ret = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
+ DIAG_POP_NEEDS_COMMENT
|
||||||
|
|
||||||
|
regfree (&re);
|
||||||
|
}
|
||||||
|
Index: glibc-2.22-193-g315267a/posix/bug-regex17.c
|
||||||
|
===================================================================
|
||||||
|
--- glibc-2.22-193-g315267a.orig/posix/bug-regex17.c
|
||||||
|
+++ glibc-2.22-193-g315267a/posix/bug-regex17.c
|
||||||
|
@@ -23,6 +23,7 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <locale.h>
|
||||||
|
+#include <libc-internal.h>
|
||||||
|
|
||||||
|
/* Tests supposed to match. */
|
||||||
|
struct
|
||||||
|
@@ -87,6 +88,14 @@ do_test (void)
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ DIAG_PUSH_NEEDS_COMMENT
|
||||||
|
+#if __GNUC_PREREQ (5, 0)
|
||||||
|
+ /* GCC 5.0 warns about array subscript being above array bounds,
|
||||||
|
+ but that's not entirely possible since n is limited to
|
||||||
|
+ static nmatch which is limited to at most 5 (see tests above).
|
||||||
|
+ This is likely PR/59124 which is still not fixed. */
|
||||||
|
+ DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Warray-bounds")
|
||||||
|
+#endif
|
||||||
|
for (n = 0; n < tests[i].nmatch; ++n)
|
||||||
|
if (rm[n].rm_so != tests[i].rm[n].rm_so
|
||||||
|
|| rm[n].rm_eo != tests[i].rm[n].rm_eo)
|
||||||
|
@@ -98,6 +107,7 @@ do_test (void)
|
||||||
|
ret = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
+ DIAG_POP_NEEDS_COMMENT
|
||||||
|
|
||||||
|
regfree (&re);
|
||||||
|
}
|
||||||
|
Index: glibc-2.22-193-g315267a/posix/bug-regex18.c
|
||||||
|
===================================================================
|
||||||
|
--- glibc-2.22-193-g315267a.orig/posix/bug-regex18.c
|
||||||
|
+++ glibc-2.22-193-g315267a/posix/bug-regex18.c
|
||||||
|
@@ -23,6 +23,7 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <locale.h>
|
||||||
|
+#include <libc-internal.h>
|
||||||
|
|
||||||
|
/* Tests supposed to match. */
|
||||||
|
struct
|
||||||
|
@@ -80,6 +81,14 @@ main (void)
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ DIAG_PUSH_NEEDS_COMMENT
|
||||||
|
+#if __GNUC_PREREQ (5, 0)
|
||||||
|
+ /* GCC 5.0 warns about array subscript being above array bounds,
|
||||||
|
+ but that's not entirely possible since n is limited to
|
||||||
|
+ static nmatch which is limited to at most 5 (see tests above).
|
||||||
|
+ This is likely PR/59124 which is still not fixed. */
|
||||||
|
+ DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Warray-bounds")
|
||||||
|
+#endif
|
||||||
|
for (n = 0; n < tests[i].nmatch; ++n)
|
||||||
|
if (rm[n].rm_so != tests[i].rm[n].rm_so
|
||||||
|
|| rm[n].rm_eo != tests[i].rm[n].rm_eo)
|
||||||
|
@@ -91,6 +100,7 @@ main (void)
|
||||||
|
ret = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
+ DIAG_POP_NEEDS_COMMENT
|
||||||
|
|
||||||
|
regfree (&re);
|
||||||
|
}
|
||||||
|
Index: glibc-2.22-193-g315267a/posix/bug-regex30.c
|
||||||
|
===================================================================
|
||||||
|
--- glibc-2.22-193-g315267a.orig/posix/bug-regex30.c
|
||||||
|
+++ glibc-2.22-193-g315267a/posix/bug-regex30.c
|
||||||
|
@@ -23,6 +23,7 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <locale.h>
|
||||||
|
+#include <libc-internal.h>
|
||||||
|
|
||||||
|
/* Tests supposed to match. */
|
||||||
|
struct
|
||||||
|
@@ -80,6 +81,14 @@ do_test (void)
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ DIAG_PUSH_NEEDS_COMMENT
|
||||||
|
+#if __GNUC_PREREQ (5, 0)
|
||||||
|
+ /* GCC 5.0 warns about array subscript being above array bounds,
|
||||||
|
+ but that's not entirely possible since n is limited to
|
||||||
|
+ static nmatch which is limited to at most 5 (see tests above).
|
||||||
|
+ This is likely PR/59124 which is still not fixed. */
|
||||||
|
+ DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Warray-bounds")
|
||||||
|
+#endif
|
||||||
|
for (n = 0; n < tests[i].nmatch; ++n)
|
||||||
|
if (rm[n].rm_so != tests[i].rm[n].rm_so
|
||||||
|
|| rm[n].rm_eo != tests[i].rm[n].rm_eo)
|
||||||
|
@@ -91,6 +100,7 @@ do_test (void)
|
||||||
|
ret = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
+ DIAG_POP_NEEDS_COMMENT
|
||||||
|
|
||||||
|
regfree (&re);
|
||||||
|
}
|
270
glibc-c-utf8-locale.patch
Normal file
270
glibc-c-utf8-locale.patch
Normal file
|
@ -0,0 +1,270 @@
|
||||||
|
From 2eda7b462b415105f5a05c1323372d4e39d46439 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mike FABIAN <mfabian@redhat.com>
|
||||||
|
Date: Mon, 10 Aug 2015 15:58:12 +0200
|
||||||
|
Subject: [PATCH] Add a C.UTF-8 locale
|
||||||
|
|
||||||
|
---
|
||||||
|
localedata/SUPPORTED | 1 +
|
||||||
|
localedata/locales/C | 238 +++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
2 files changed, 239 insertions(+)
|
||||||
|
create mode 100644 localedata/locales/C
|
||||||
|
|
||||||
|
diff --git a/localedata/SUPPORTED b/localedata/SUPPORTED
|
||||||
|
index 8ca023e..2a78391 100644
|
||||||
|
--- a/localedata/SUPPORTED
|
||||||
|
+++ b/localedata/SUPPORTED
|
||||||
|
@@ -1,6 +1,7 @@
|
||||||
|
# This file names the currently supported and somewhat tested locales.
|
||||||
|
# If you have any additions please file a glibc bug report.
|
||||||
|
SUPPORTED-LOCALES=\
|
||||||
|
+C.UTF-8/UTF-8 \
|
||||||
|
aa_DJ.UTF-8/UTF-8 \
|
||||||
|
aa_DJ/ISO-8859-1 \
|
||||||
|
aa_ER/UTF-8 \
|
||||||
|
diff --git a/localedata/locales/C b/localedata/locales/C
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..fdf460e
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/localedata/locales/C
|
||||||
|
@@ -0,0 +1,238 @@
|
||||||
|
+escape_char /
|
||||||
|
+comment_char %
|
||||||
|
+% Locale for C locale in UTF-8
|
||||||
|
+
|
||||||
|
+LC_IDENTIFICATION
|
||||||
|
+title "C locale"
|
||||||
|
+source ""
|
||||||
|
+address ""
|
||||||
|
+contact ""
|
||||||
|
+email "mfabian@redhat.com"
|
||||||
|
+tel ""
|
||||||
|
+fax ""
|
||||||
|
+language "C"
|
||||||
|
+territory ""
|
||||||
|
+revision "1.0"
|
||||||
|
+date "2015-08-10"
|
||||||
|
+%
|
||||||
|
+category "i18n:2012";LC_IDENTIFICATION
|
||||||
|
+category "i18n:2012";LC_CTYPE
|
||||||
|
+category "i18n:2012";LC_COLLATE
|
||||||
|
+category "i18n:2012";LC_TIME
|
||||||
|
+category "i18n:2012";LC_NUMERIC
|
||||||
|
+category "i18n:2012";LC_MONETARY
|
||||||
|
+category "i18n:2012";LC_MESSAGES
|
||||||
|
+category "i18n:2012";LC_PAPER
|
||||||
|
+category "i18n:2012";LC_NAME
|
||||||
|
+category "i18n:2012";LC_ADDRESS
|
||||||
|
+category "i18n:2012";LC_TELEPHONE
|
||||||
|
+category "i18n:2012";LC_MEASUREMENT
|
||||||
|
+END LC_IDENTIFICATION
|
||||||
|
+
|
||||||
|
+LC_CTYPE
|
||||||
|
+copy "i18n"
|
||||||
|
+
|
||||||
|
+translit_start
|
||||||
|
+include "translit_combining";""
|
||||||
|
+translit_end
|
||||||
|
+
|
||||||
|
+END LC_CTYPE
|
||||||
|
+
|
||||||
|
+LC_COLLATE
|
||||||
|
+order_start forward
|
||||||
|
+<U0000>
|
||||||
|
+..
|
||||||
|
+<UFFFF>
|
||||||
|
+<U10000>
|
||||||
|
+..
|
||||||
|
+<U1FFFF>
|
||||||
|
+<U20000>
|
||||||
|
+..
|
||||||
|
+<U2FFFF>
|
||||||
|
+<UE0000>
|
||||||
|
+..
|
||||||
|
+<UEFFFF>
|
||||||
|
+<UF0000>
|
||||||
|
+..
|
||||||
|
+<UFFFFF>
|
||||||
|
+<U100000>
|
||||||
|
+..
|
||||||
|
+<U10FFFF>
|
||||||
|
+UNDEFINED
|
||||||
|
+order_end
|
||||||
|
+END LC_COLLATE
|
||||||
|
+
|
||||||
|
+LC_MONETARY
|
||||||
|
+% This is the 14652 i18n fdcc-set definition for
|
||||||
|
+% the LC_MONETARY category
|
||||||
|
+% (except for the int_curr_symbol and currency_symbol, they are empty in
|
||||||
|
+% the 14652 i18n fdcc-set definition and also empty in
|
||||||
|
+% glibc/locale/C-monetary.c. But localedef complains in that case).
|
||||||
|
+%
|
||||||
|
+% Using "USD" for int_curr_symbol. But maybe "XXX" would be better?
|
||||||
|
+% XXX is "No currency" (https://en.wikipedia.org/wiki/ISO_4217)
|
||||||
|
+int_curr_symbol "<U0055><U0053><U0044><U0020>"
|
||||||
|
+% Using "$" for currency_symbol. But maybe <U00A4> would be better?
|
||||||
|
+% U+00A4 is the "generic currency symbol"
|
||||||
|
+% (https://en.wikipedia.org/wiki/Currency_sign_%28typography%29)
|
||||||
|
+currency_symbol "<U0024>"
|
||||||
|
+mon_decimal_point "<U002E>"
|
||||||
|
+mon_thousands_sep ""
|
||||||
|
+mon_grouping -1
|
||||||
|
+positive_sign ""
|
||||||
|
+negative_sign "<U002D>"
|
||||||
|
+int_frac_digits -1
|
||||||
|
+frac_digits -1
|
||||||
|
+p_cs_precedes -1
|
||||||
|
+int_p_sep_by_space -1
|
||||||
|
+p_sep_by_space -1
|
||||||
|
+n_cs_precedes -1
|
||||||
|
+int_n_sep_by_space -1
|
||||||
|
+n_sep_by_space -1
|
||||||
|
+p_sign_posn -1
|
||||||
|
+n_sign_posn -1
|
||||||
|
+%
|
||||||
|
+END LC_MONETARY
|
||||||
|
+
|
||||||
|
+LC_NUMERIC
|
||||||
|
+% This is the POSIX Locale definition for
|
||||||
|
+% the LC_NUMERIC category.
|
||||||
|
+%
|
||||||
|
+decimal_point "<U002E>"
|
||||||
|
+thousands_sep ""
|
||||||
|
+grouping -1
|
||||||
|
+END LC_NUMERIC
|
||||||
|
+
|
||||||
|
+LC_TIME
|
||||||
|
+% This is the POSIX Locale definition for
|
||||||
|
+% the LC_TIME category.
|
||||||
|
+%
|
||||||
|
+% Abbreviated weekday names (%a)
|
||||||
|
+abday "<U0053><U0075><U006E>";"<U004D><U006F><U006E>";/
|
||||||
|
+ "<U0054><U0075><U0065>";"<U0057><U0065><U0064>";/
|
||||||
|
+ "<U0054><U0068><U0075>";"<U0046><U0072><U0069>";/
|
||||||
|
+ "<U0053><U0061><U0074>"
|
||||||
|
+
|
||||||
|
+% Full weekday names (%A)
|
||||||
|
+day "<U0053><U0075><U006E><U0064><U0061><U0079>";/
|
||||||
|
+ "<U004D><U006F><U006E><U0064><U0061><U0079>";/
|
||||||
|
+ "<U0054><U0075><U0065><U0073><U0064><U0061><U0079>";/
|
||||||
|
+ "<U0057><U0065><U0064><U006E><U0065><U0073><U0064><U0061><U0079>";/
|
||||||
|
+ "<U0054><U0068><U0075><U0072><U0073><U0064><U0061><U0079>";/
|
||||||
|
+ "<U0046><U0072><U0069><U0064><U0061><U0079>";/
|
||||||
|
+ "<U0053><U0061><U0074><U0075><U0072><U0064><U0061><U0079>"
|
||||||
|
+
|
||||||
|
+% Abbreviated month names (%b)
|
||||||
|
+abmon "<U004A><U0061><U006E>";"<U0046><U0065><U0062>";/
|
||||||
|
+ "<U004D><U0061><U0072>";"<U0041><U0070><U0072>";/
|
||||||
|
+ "<U004D><U0061><U0079>";"<U004A><U0075><U006E>";/
|
||||||
|
+ "<U004A><U0075><U006C>";"<U0041><U0075><U0067>";/
|
||||||
|
+ "<U0053><U0065><U0070>";"<U004F><U0063><U0074>";/
|
||||||
|
+ "<U004E><U006F><U0076>";"<U0044><U0065><U0063>"
|
||||||
|
+
|
||||||
|
+% Full month names (%B)
|
||||||
|
+mon "<U004A><U0061><U006E><U0075><U0061><U0072><U0079>";/
|
||||||
|
+ "<U0046><U0065><U0062><U0072><U0075><U0061><U0072><U0079>";/
|
||||||
|
+ "<U004D><U0061><U0072><U0063><U0068>";/
|
||||||
|
+ "<U0041><U0070><U0072><U0069><U006C>";/
|
||||||
|
+ "<U004D><U0061><U0079>";/
|
||||||
|
+ "<U004A><U0075><U006E><U0065>";/
|
||||||
|
+ "<U004A><U0075><U006C><U0079>";/
|
||||||
|
+ "<U0041><U0075><U0067><U0075><U0073><U0074>";/
|
||||||
|
+ "<U0053><U0065><U0070><U0074><U0065><U006D><U0062><U0065><U0072>";/
|
||||||
|
+ "<U004F><U0063><U0074><U006F><U0062><U0065><U0072>";/
|
||||||
|
+ "<U004E><U006F><U0076><U0065><U006D><U0062><U0065><U0072>";/
|
||||||
|
+ "<U0044><U0065><U0063><U0065><U006D><U0062><U0065><U0072>"
|
||||||
|
+
|
||||||
|
+% Week description, consists of three fields:
|
||||||
|
+% 1. Number of days in a week.
|
||||||
|
+% 2. Gregorian date that is a first weekday (19971130 for Sunday, 19971201 for Monday).
|
||||||
|
+% 3. The weekday number to be contained in the first week of the year.
|
||||||
|
+%
|
||||||
|
+% ISO 8601 conforming applications should use the values 7, 19971201 (a
|
||||||
|
+% Monday), and 4 (Thursday), respectively.
|
||||||
|
+week 7;19971201;4
|
||||||
|
+first_weekday 1
|
||||||
|
+first_workday 1
|
||||||
|
+
|
||||||
|
+% Appropriate date and time representation (%c)
|
||||||
|
+% "%a %b %e %H:%M:%S %Y"
|
||||||
|
+d_t_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065><U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0059>"
|
||||||
|
+
|
||||||
|
+% Appropriate date representation (%x)
|
||||||
|
+% "%m/%d/%y"
|
||||||
|
+d_fmt "<U0025><U006D><U002F><U0025><U0064><U002F><U0025><U0079>"
|
||||||
|
+
|
||||||
|
+% Appropriate time representation (%X)
|
||||||
|
+% "%H:%M:%S"
|
||||||
|
+t_fmt "<U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053>"
|
||||||
|
+
|
||||||
|
+% Appropriate AM/PM time representation (%r)
|
||||||
|
+% "%I:%M:%S %p"
|
||||||
|
+t_fmt_ampm "<U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0070>"
|
||||||
|
+
|
||||||
|
+% Equivalent of AM/PM (%p) "AM"/"PM"
|
||||||
|
+%
|
||||||
|
+am_pm "<U0041><U004D>";"<U0050><U004D>"
|
||||||
|
+
|
||||||
|
+% Appropriate date representation (date(1)) "%a %b %e %H:%M:%S %Z %Y"
|
||||||
|
+date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065><U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U005A><U0020><U0025><U0059>"
|
||||||
|
+END LC_TIME
|
||||||
|
+
|
||||||
|
+LC_MESSAGES
|
||||||
|
+% This is the POSIX Locale definition for
|
||||||
|
+% the LC_NUMERIC category.
|
||||||
|
+%
|
||||||
|
+yesexpr "<U005E><U005B><U0079><U0059><U005D>"
|
||||||
|
+noexpr "<U005E><U005B><U006E><U004E><U005D>"
|
||||||
|
+yesstr "<U0059><U0065><U0073>"
|
||||||
|
+nostr "<U004E><U006F>"
|
||||||
|
+END LC_MESSAGES
|
||||||
|
+
|
||||||
|
+LC_PAPER
|
||||||
|
+% This is the ISO/IEC 14652 "i18n" definition for
|
||||||
|
+% the LC_PAPER category.
|
||||||
|
+% (A4 paper, this is also used in the built in C/POSIX
|
||||||
|
+% locale in glibc/locale/C-paper.c)
|
||||||
|
+height 297
|
||||||
|
+width 210
|
||||||
|
+END LC_PAPER
|
||||||
|
+
|
||||||
|
+LC_NAME
|
||||||
|
+% This is the ISO/IEC 14652 "i18n" definition for
|
||||||
|
+% the LC_NAME category.
|
||||||
|
+% "%p%t%g%t%m%t%f"
|
||||||
|
+% (also used in the built in C/POSIX locale in glibc/locale/C-name.c)
|
||||||
|
+name_fmt "<U0025><U0070><U0025><U0074><U0025><U0067><U0025><U0074>/
|
||||||
|
+<U0025><U006D><U0025><U0074><U0025><U0066>"
|
||||||
|
+END LC_NAME
|
||||||
|
+
|
||||||
|
+LC_ADDRESS
|
||||||
|
+% This is the ISO/IEC 14652 "i18n" definition for
|
||||||
|
+% the LC_ADDRESS category.
|
||||||
|
+% "%a%N%f%N%d%N%b%N%s %h %e %r%N%C-%z %T%N%c%N"
|
||||||
|
+% (also used in the built in C/POSIX locale in glibc/locale/C-address.c)
|
||||||
|
+postal_fmt "<U0025><U0061><U0025><U004E><U0025><U0066><U0025><U004E>/
|
||||||
|
+<U0025><U0064><U0025><U004E><U0025><U0062><U0025><U004E><U0025><U0073>/
|
||||||
|
+<U0020><U0025><U0068><U0020><U0025><U0065><U0020><U0025><U0072><U0025>/
|
||||||
|
+<U004E><U0025><U0043><U002D><U0025><U007A><U0020><U0025><U0054><U0025>/
|
||||||
|
+<U004E><U0025><U0063><U0025><U004E>"
|
||||||
|
+END LC_ADDRESS
|
||||||
|
+
|
||||||
|
+LC_TELEPHONE
|
||||||
|
+% This is the ISO/IEC 14652 "i18n" definition for
|
||||||
|
+% the LC_TELEPHONE category.
|
||||||
|
+% "+%c %a %l"
|
||||||
|
+tel_int_fmt "<U002B><U0025><U0063><U0020><U0025><U0061><U0020><U0025>/
|
||||||
|
+<U006C>"
|
||||||
|
+% (also used in the built in C/POSIX locale in glibc/locale/C-telephone.c)
|
||||||
|
+END LC_TELEPHONE
|
||||||
|
+
|
||||||
|
+LC_MEASUREMENT
|
||||||
|
+% This is the ISO/IEC 14652 "i18n" definition for
|
||||||
|
+% the LC_MEASUREMENT category.
|
||||||
|
+% (same as in the built in C/POSIX locale in glibc/locale/C-measurement.c)
|
||||||
|
+%metric
|
||||||
|
+measurement 1
|
||||||
|
+END LC_MEASUREMENT
|
||||||
|
+
|
||||||
|
--
|
||||||
|
2.4.3
|
||||||
|
|
32
glibc-dns-host-gcc5.patch
Normal file
32
glibc-dns-host-gcc5.patch
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
Index: glibc-2.23-276-gb65b205/resolv/nss_dns/dns-host.c
|
||||||
|
===================================================================
|
||||||
|
--- glibc-2.23-276-gb65b205.orig/resolv/nss_dns/dns-host.c
|
||||||
|
+++ glibc-2.23-276-gb65b205/resolv/nss_dns/dns-host.c
|
||||||
|
@@ -78,6 +78,7 @@
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <string.h>
|
||||||
|
+#include <libc-internal.h>
|
||||||
|
|
||||||
|
#include "nsswitch.h"
|
||||||
|
|
||||||
|
@@ -566,10 +567,19 @@ addrsort (char **ap, int num)
|
||||||
|
num = MAX_NR_ADDRS;
|
||||||
|
for (i = 0; i < num; i++, p++)
|
||||||
|
{
|
||||||
|
+ DIAG_PUSH_NEEDS_COMMENT
|
||||||
|
+#if __GNUC_PREREQ (5, 0)
|
||||||
|
+ /* GCC 5.0 warns about array subscript being above array bounds,
|
||||||
|
+ but that's not entirely possible since i is limited to
|
||||||
|
+ _res.nsort which is limited to MAXRESOLVSORT. This
|
||||||
|
+ is likely PR/59124 which is still not fixed. */
|
||||||
|
+ DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Warray-bounds")
|
||||||
|
+#endif
|
||||||
|
for (j = 0 ; (unsigned)j < _res.nsort; j++)
|
||||||
|
if (_res.sort_list[j].addr.s_addr ==
|
||||||
|
(((struct in_addr *)(*p))->s_addr & _res.sort_list[j].mask))
|
||||||
|
break;
|
||||||
|
+ DIAG_POP_NEEDS_COMMENT
|
||||||
|
aval[i] = j;
|
||||||
|
if (needsort == 0 && i > 0 && j < aval[i-1])
|
||||||
|
needsort = i;
|
289
glibc-dso_deps.patch
Normal file
289
glibc-dso_deps.patch
Normal file
|
@ -0,0 +1,289 @@
|
||||||
|
--- glibc-2.21/elf/dl-deps.c.dsodeps~ 2015-02-06 07:40:18.000000000 +0100
|
||||||
|
+++ glibc-2.21/elf/dl-deps.c 2015-02-07 14:32:43.667285775 +0100
|
||||||
|
@@ -152,6 +152,56 @@ preload (struct list *known, unsigned in
|
||||||
|
map->l_reserved = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
+static int compare (struct link_map *a, struct link_map *b)
|
||||||
|
+{
|
||||||
|
+ struct link_map **r, **s;
|
||||||
|
+ /* Check if must swap */
|
||||||
|
+ if ((r = b->l_initfini))
|
||||||
|
+ {
|
||||||
|
+ while (*r)
|
||||||
|
+ if (*r++ == a)
|
||||||
|
+ return 1;
|
||||||
|
+ }
|
||||||
|
+ /* Check if must *not* swap */
|
||||||
|
+ if ((r = a->l_initfini))
|
||||||
|
+ {
|
||||||
|
+ while (*r)
|
||||||
|
+ if (*r++ == b)
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ /* No direct dependency information */
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+static void
|
||||||
|
+sort (struct link_map **maps, size_t nmaps)
|
||||||
|
+{
|
||||||
|
+ unsigned int i, k;
|
||||||
|
+ struct link_map *t;
|
||||||
|
+
|
||||||
|
+ /* We can skip looking for the binary itself which is at the front
|
||||||
|
+ of the search list for the main namespace. */
|
||||||
|
+ for (i = 1; i < nmaps; ++i)
|
||||||
|
+ {
|
||||||
|
+ /* Find the last object in the list for which the current one is
|
||||||
|
+ a dependency and move the current object behind the object
|
||||||
|
+ with the dependency. */
|
||||||
|
+ for (k = i + 1; k < nmaps; ++k)
|
||||||
|
+ {
|
||||||
|
+ if (compare(maps[i], maps[k]) > 0)
|
||||||
|
+ {
|
||||||
|
+ /* Move the current object to the back past the last
|
||||||
|
+ object with it as the dependency. */
|
||||||
|
+ t = maps[i];
|
||||||
|
+ maps[i] = maps[k];
|
||||||
|
+ maps[k] = t;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
void
|
||||||
|
internal_function
|
||||||
|
_dl_map_object_deps (struct link_map *map,
|
||||||
|
@@ -611,61 +661,7 @@ Filters not supported with LD_TRACE_PREL
|
||||||
|
memcpy (l_initfini, map->l_searchlist.r_list,
|
||||||
|
nlist * sizeof (struct link_map *));
|
||||||
|
if (__glibc_likely (nlist > 1))
|
||||||
|
- {
|
||||||
|
- /* We can skip looking for the binary itself which is at the front
|
||||||
|
- of the search list. */
|
||||||
|
- i = 1;
|
||||||
|
- uint16_t seen[nlist];
|
||||||
|
- memset (seen, 0, nlist * sizeof (seen[0]));
|
||||||
|
- while (1)
|
||||||
|
- {
|
||||||
|
- /* Keep track of which object we looked at this round. */
|
||||||
|
- ++seen[i];
|
||||||
|
- struct link_map *thisp = l_initfini[i];
|
||||||
|
-
|
||||||
|
- /* Find the last object in the list for which the current one is
|
||||||
|
- a dependency and move the current object behind the object
|
||||||
|
- with the dependency. */
|
||||||
|
- unsigned int k = nlist - 1;
|
||||||
|
- while (k > i)
|
||||||
|
- {
|
||||||
|
- struct link_map **runp = l_initfini[k]->l_initfini;
|
||||||
|
- if (runp != NULL)
|
||||||
|
- /* Look through the dependencies of the object. */
|
||||||
|
- while (*runp != NULL)
|
||||||
|
- if (__glibc_unlikely (*runp++ == thisp))
|
||||||
|
- {
|
||||||
|
- /* Move the current object to the back past the last
|
||||||
|
- object with it as the dependency. */
|
||||||
|
- memmove (&l_initfini[i], &l_initfini[i + 1],
|
||||||
|
- (k - i) * sizeof (l_initfini[0]));
|
||||||
|
- l_initfini[k] = thisp;
|
||||||
|
-
|
||||||
|
- if (seen[i + 1] > nlist - i)
|
||||||
|
- {
|
||||||
|
- ++i;
|
||||||
|
- goto next_clear;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- uint16_t this_seen = seen[i];
|
||||||
|
- memmove (&seen[i], &seen[i + 1],
|
||||||
|
- (k - i) * sizeof (seen[0]));
|
||||||
|
- seen[k] = this_seen;
|
||||||
|
-
|
||||||
|
- goto next;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- --k;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- if (++i == nlist)
|
||||||
|
- break;
|
||||||
|
- next_clear:
|
||||||
|
- memset (&seen[i], 0, (nlist - i) * sizeof (seen[0]));
|
||||||
|
-
|
||||||
|
- next:;
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
+ sort (l_initfini, nlist);
|
||||||
|
|
||||||
|
/* Terminate the list of dependencies. */
|
||||||
|
l_initfini[nlist] = NULL;
|
||||||
|
--- glibc-2.21/elf/dl-fini.c.dsodeps~ 2015-02-06 07:40:18.000000000 +0100
|
||||||
|
+++ glibc-2.21/elf/dl-fini.c 2015-02-07 14:31:26.369897612 +0100
|
||||||
|
@@ -26,101 +26,83 @@
|
||||||
|
typedef void (*fini_t) (void);
|
||||||
|
|
||||||
|
|
||||||
|
+static int compare (struct link_map *a, struct link_map *b)
|
||||||
|
+{
|
||||||
|
+ struct link_map **r;
|
||||||
|
+ /* Check if must swap */
|
||||||
|
+ if ((r = b->l_initfini))
|
||||||
|
+ {
|
||||||
|
+ while (*r)
|
||||||
|
+ if (*r++ == a)
|
||||||
|
+ return 1;
|
||||||
|
+ }
|
||||||
|
+ /* Check if must *not* swap */
|
||||||
|
+ if ((r = a->l_initfini))
|
||||||
|
+ {
|
||||||
|
+ while (*r)
|
||||||
|
+ if (*r++ == b)
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ if (b->l_reldeps && a->l_initfini)
|
||||||
|
+ {
|
||||||
|
+ unsigned int m = b->l_reldeps->act;
|
||||||
|
+ struct link_map **relmaps = &b->l_reldeps->list[0];
|
||||||
|
+
|
||||||
|
+ /* Look through the relocation dependencies of the object. */
|
||||||
|
+ while (m--)
|
||||||
|
+ if (relmaps[m] == a)
|
||||||
|
+ {
|
||||||
|
+ /* If a cycle exists with a link time dependency,
|
||||||
|
+ preserve the latter. */
|
||||||
|
+ for (r = a->l_initfini; *r; ++r)
|
||||||
|
+ if (*r == b)
|
||||||
|
+ return -1;
|
||||||
|
+ return 1;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ /* No direct dependency information */
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
void
|
||||||
|
internal_function
|
||||||
|
_dl_sort_fini (struct link_map **maps, size_t nmaps, char *used, Lmid_t ns)
|
||||||
|
{
|
||||||
|
- /* A list of one element need not be sorted. */
|
||||||
|
- if (nmaps == 1)
|
||||||
|
- return;
|
||||||
|
-
|
||||||
|
- /* We can skip looking for the binary itself which is at the front
|
||||||
|
- of the search list for the main namespace. */
|
||||||
|
- unsigned int i = ns == LM_ID_BASE;
|
||||||
|
- uint16_t seen[nmaps];
|
||||||
|
- memset (seen, 0, nmaps * sizeof (seen[0]));
|
||||||
|
- while (1)
|
||||||
|
+ unsigned int i, k;
|
||||||
|
+ struct link_map *t;
|
||||||
|
+
|
||||||
|
+ /* We can skip looking for the binary itself which is at the front
|
||||||
|
+ of the search list for the main namespace. */
|
||||||
|
+ for (i = ns == LM_ID_BASE; i < nmaps; ++i)
|
||||||
|
{
|
||||||
|
- /* Keep track of which object we looked at this round. */
|
||||||
|
- ++seen[i];
|
||||||
|
- struct link_map *thisp = maps[i];
|
||||||
|
+ t = maps[i];
|
||||||
|
|
||||||
|
/* Do not handle ld.so in secondary namespaces and object which
|
||||||
|
are not removed. */
|
||||||
|
- if (thisp != thisp->l_real || thisp->l_idx == -1)
|
||||||
|
- goto skip;
|
||||||
|
+ if (t != t->l_real || t->l_idx == -1)
|
||||||
|
+ continue;
|
||||||
|
|
||||||
|
/* Find the last object in the list for which the current one is
|
||||||
|
a dependency and move the current object behind the object
|
||||||
|
with the dependency. */
|
||||||
|
- unsigned int k = nmaps - 1;
|
||||||
|
- while (k > i)
|
||||||
|
- {
|
||||||
|
- struct link_map **runp = maps[k]->l_initfini;
|
||||||
|
- if (runp != NULL)
|
||||||
|
- /* Look through the dependencies of the object. */
|
||||||
|
- while (*runp != NULL)
|
||||||
|
- if (__glibc_unlikely (*runp++ == thisp))
|
||||||
|
- {
|
||||||
|
- move:
|
||||||
|
- /* Move the current object to the back past the last
|
||||||
|
- object with it as the dependency. */
|
||||||
|
- memmove (&maps[i], &maps[i + 1],
|
||||||
|
- (k - i) * sizeof (maps[0]));
|
||||||
|
- maps[k] = thisp;
|
||||||
|
-
|
||||||
|
- if (used != NULL)
|
||||||
|
- {
|
||||||
|
- char here_used = used[i];
|
||||||
|
- memmove (&used[i], &used[i + 1],
|
||||||
|
- (k - i) * sizeof (used[0]));
|
||||||
|
- used[k] = here_used;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- if (seen[i + 1] > nmaps - i)
|
||||||
|
- {
|
||||||
|
- ++i;
|
||||||
|
- goto next_clear;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- uint16_t this_seen = seen[i];
|
||||||
|
- memmove (&seen[i], &seen[i + 1], (k - i) * sizeof (seen[0]));
|
||||||
|
- seen[k] = this_seen;
|
||||||
|
-
|
||||||
|
- goto next;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- if (__glibc_unlikely (maps[k]->l_reldeps != NULL))
|
||||||
|
+ for (k = i + 1; k < nmaps; ++k)
|
||||||
|
+ {
|
||||||
|
+ if (compare(maps[i], maps[k]) > 0)
|
||||||
|
{
|
||||||
|
- unsigned int m = maps[k]->l_reldeps->act;
|
||||||
|
- struct link_map **relmaps = &maps[k]->l_reldeps->list[0];
|
||||||
|
-
|
||||||
|
- /* Look through the relocation dependencies of the object. */
|
||||||
|
- while (m-- > 0)
|
||||||
|
- if (__glibc_unlikely (relmaps[m] == thisp))
|
||||||
|
- {
|
||||||
|
- /* If a cycle exists with a link time dependency,
|
||||||
|
- preserve the latter. */
|
||||||
|
- struct link_map **runp = thisp->l_initfini;
|
||||||
|
- if (runp != NULL)
|
||||||
|
- while (*runp != NULL)
|
||||||
|
- if (__glibc_unlikely (*runp++ == maps[k]))
|
||||||
|
- goto ignore;
|
||||||
|
- goto move;
|
||||||
|
- }
|
||||||
|
- ignore:;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- --k;
|
||||||
|
+ /* Move the current object to the back past the last
|
||||||
|
+ object with it as the dependency. */
|
||||||
|
+ t = maps[i];
|
||||||
|
+ maps[i] = maps[k];
|
||||||
|
+ maps[k] = t;
|
||||||
|
+ if (used)
|
||||||
|
+ {
|
||||||
|
+ char c = used[i];
|
||||||
|
+ used[i] = used[k];
|
||||||
|
+ used[k] = c;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
-
|
||||||
|
- skip:
|
||||||
|
- if (++i == nmaps)
|
||||||
|
- break;
|
||||||
|
- next_clear:
|
||||||
|
- memset (&seen[i], 0, (nmaps - i) * sizeof (seen[0]));
|
||||||
|
-
|
||||||
|
- next:;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
17
glibc-gcc-PR69537.patch
Normal file
17
glibc-gcc-PR69537.patch
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
Work around incorrect -Wmaybe-uninitialized warning due to this GCC bug:
|
||||||
|
|
||||||
|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69537
|
||||||
|
|
||||||
|
Index: glibc-2.22-709-g8a71d2e/nis/ypclnt.c
|
||||||
|
===================================================================
|
||||||
|
--- glibc-2.22-709-g8a71d2e.orig/nis/ypclnt.c
|
||||||
|
+++ glibc-2.22-709-g8a71d2e/nis/ypclnt.c
|
||||||
|
@@ -584,7 +584,7 @@ yp_master (const char *indomain, const c
|
||||||
|
{
|
||||||
|
ypreq_nokey req;
|
||||||
|
ypresp_master resp;
|
||||||
|
- enum clnt_stat result;
|
||||||
|
+ int result;
|
||||||
|
|
||||||
|
if (indomain == NULL || indomain[0] == '\0' ||
|
||||||
|
inmap == NULL || inmap[0] == '\0')
|
32
glibc-gethnamaddr-gcc5.patch
Normal file
32
glibc-gethnamaddr-gcc5.patch
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
Index: glibc-2.23-276-gb65b205/resolv/gethnamaddr.c
|
||||||
|
===================================================================
|
||||||
|
--- glibc-2.23-276-gb65b205.orig/resolv/gethnamaddr.c
|
||||||
|
+++ glibc-2.23-276-gb65b205/resolv/gethnamaddr.c
|
||||||
|
@@ -68,6 +68,7 @@
|
||||||
|
#include <errno.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
+#include <libc-internal.h>
|
||||||
|
|
||||||
|
#define MAXALIASES 35
|
||||||
|
#define MAXADDRS 35
|
||||||
|
@@ -864,10 +865,19 @@ addrsort (char **ap, int num)
|
||||||
|
|
||||||
|
p = ap;
|
||||||
|
for (i = 0; i < num; i++, p++) {
|
||||||
|
+ DIAG_PUSH_NEEDS_COMMENT
|
||||||
|
+#if __GNUC_PREREQ (5, 0)
|
||||||
|
+ /* GCC 5.0 warns about array subscript being above array bounds,
|
||||||
|
+ but that's not entirely possible since i is limited to
|
||||||
|
+ _res.nsort which is limited to MAXRESOLVSORT. This
|
||||||
|
+ is likely PR/59124 which is still not fixed. */
|
||||||
|
+ DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Warray-bounds")
|
||||||
|
+#endif
|
||||||
|
for (j = 0 ; (unsigned)j < _res.nsort; j++)
|
||||||
|
if (_res.sort_list[j].addr.s_addr ==
|
||||||
|
(((struct in_addr *)(*p))->s_addr & _res.sort_list[j].mask))
|
||||||
|
break;
|
||||||
|
+ DIAG_POP_NEEDS_COMMENT
|
||||||
|
aval[i] = j;
|
||||||
|
if (needsort == 0 && i > 0 && j < aval[i-1])
|
||||||
|
needsort = i;
|
72
glibc-ld-ctype-gcc5.patch
Normal file
72
glibc-ld-ctype-gcc5.patch
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
Index: glibc-2.22-193-g315267a/locale/programs/ld-ctype.c
|
||||||
|
===================================================================
|
||||||
|
--- glibc-2.22-193-g315267a.orig/locale/programs/ld-ctype.c
|
||||||
|
+++ glibc-2.22-193-g315267a/locale/programs/ld-ctype.c
|
||||||
|
@@ -31,6 +31,7 @@
|
||||||
|
#include <wctype.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <sys/uio.h>
|
||||||
|
+#include <libc-internal.h>
|
||||||
|
|
||||||
|
#include "localedef.h"
|
||||||
|
#include "charmap.h"
|
||||||
|
@@ -2534,9 +2535,19 @@ with character code range values one mus
|
||||||
|
{
|
||||||
|
size_t cnt;
|
||||||
|
|
||||||
|
+ DIAG_PUSH_NEEDS_COMMENT
|
||||||
|
+#if __GNUC_PREREQ (5, 0)
|
||||||
|
+ /* GCC 5.0 warns about array subscript being above array bounds,
|
||||||
|
+ but that's not possible since ctype_map_new prevents
|
||||||
|
+ map_collection_nr from being greater than MAX_NR_CHARMP which
|
||||||
|
+ is the size of mapnames. This is likely PR/59124 which is still
|
||||||
|
+ not fixed. */
|
||||||
|
+ DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Warray-bounds")
|
||||||
|
+#endif
|
||||||
|
for (cnt = 2; cnt < ctype->map_collection_nr; ++cnt)
|
||||||
|
if (strcmp (now->val.str.startmb, ctype->mapnames[cnt]) == 0)
|
||||||
|
break;
|
||||||
|
+ DIAG_POP_NEEDS_COMMENT
|
||||||
|
|
||||||
|
if (cnt < ctype->map_collection_nr)
|
||||||
|
free (now->val.str.startmb);
|
||||||
|
@@ -2807,9 +2818,19 @@ previous definition was here")));
|
||||||
|
|
||||||
|
/* This could mean one of several things. First test whether
|
||||||
|
it's a character class name. */
|
||||||
|
+ DIAG_PUSH_NEEDS_COMMENT
|
||||||
|
+#if __GNUC_PREREQ (5, 0)
|
||||||
|
+ /* GCC 5.0 warns about array subscript being above array bounds,
|
||||||
|
+ but that's not possible since ctype_class_new prevents
|
||||||
|
+ nr_charclass from being greater than MAX_NR_CHARCLASS which
|
||||||
|
+ is the size of classnames. This is likely PR/59124 which is still
|
||||||
|
+ not fixed. */
|
||||||
|
+ DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Warray-bounds")
|
||||||
|
+#endif
|
||||||
|
for (cnt = 0; cnt < ctype->nr_charclass; ++cnt)
|
||||||
|
if (strcmp (now->val.str.startmb, ctype->classnames[cnt]) == 0)
|
||||||
|
break;
|
||||||
|
+ DIAG_POP_NEEDS_COMMENT
|
||||||
|
if (cnt < ctype->nr_charclass)
|
||||||
|
{
|
||||||
|
class_bit = _ISwbit (cnt);
|
||||||
|
@@ -2817,9 +2838,19 @@ previous definition was here")));
|
||||||
|
free (now->val.str.startmb);
|
||||||
|
goto read_charclass;
|
||||||
|
}
|
||||||
|
+ DIAG_PUSH_NEEDS_COMMENT
|
||||||
|
+#if __GNUC_PREREQ (5, 0)
|
||||||
|
+ /* GCC 5.0 warns about array subscript being above array bounds,
|
||||||
|
+ but that's not possible since ctype_map_new prevents
|
||||||
|
+ map_collection_nr from being greater than MAX_NR_CHARMP which
|
||||||
|
+ is the size of mapnames. This is likely PR/59124 which is still
|
||||||
|
+ not fixed. */
|
||||||
|
+ DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Warray-bounds")
|
||||||
|
+#endif
|
||||||
|
for (cnt = 0; cnt < ctype->map_collection_nr; ++cnt)
|
||||||
|
if (strcmp (now->val.str.startmb, ctype->mapnames[cnt]) == 0)
|
||||||
|
break;
|
||||||
|
+ DIAG_POP_NEEDS_COMMENT
|
||||||
|
if (cnt < ctype->map_collection_nr)
|
||||||
|
{
|
||||||
|
mapidx = cnt;
|
29
glibc-res-hconf-gcc5.patch
Normal file
29
glibc-res-hconf-gcc5.patch
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
Index: glibc-2.22-386-g95e8397/resolv/res_hconf.c
|
||||||
|
===================================================================
|
||||||
|
--- glibc-2.22-386-g95e8397.orig/resolv/res_hconf.c
|
||||||
|
+++ glibc-2.22-386-g95e8397/resolv/res_hconf.c
|
||||||
|
@@ -46,6 +46,7 @@
|
||||||
|
#include "res_hconf.h"
|
||||||
|
#include <wchar.h>
|
||||||
|
#include <atomic.h>
|
||||||
|
+#include <libc-internal.h>
|
||||||
|
|
||||||
|
#if IS_IN (libc)
|
||||||
|
# define fgets_unlocked __fgets_unlocked
|
||||||
|
@@ -577,7 +578,16 @@ _res_hconf_trim_domain (char *hostname)
|
||||||
|
|
||||||
|
for (i = 0; i < _res_hconf.num_trimdomains; ++i)
|
||||||
|
{
|
||||||
|
+ DIAG_PUSH_NEEDS_COMMENT
|
||||||
|
+#if __GNUC_PREREQ (5, 0)
|
||||||
|
+ /* GCC 5.0 warns about array subscript being above array bounds,
|
||||||
|
+ but that's not entirely possible since i is limited to
|
||||||
|
+ num_trimdomains which is limited to <= TRIMDOMAINS_MAX. This
|
||||||
|
+ is likely PR/59124 which is still not fixed. */
|
||||||
|
+ DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Warray-bounds")
|
||||||
|
+#endif
|
||||||
|
const char *trim = _res_hconf.trimdomain[i];
|
||||||
|
+ DIAG_POP_NEEDS_COMMENT
|
||||||
|
|
||||||
|
trim_len = strlen (trim);
|
||||||
|
if (hostname_len > trim_len
|
19
glibc-rh1009145.patch
Normal file
19
glibc-rh1009145.patch
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
--- glibc-2.18-151-g303e567.orig/elf/ldconfig.c 2013-09-25 14:01:01.522446341 -0400
|
||||||
|
+++ glibc-2.18-151-g303e567/elf/ldconfig.c 2013-09-25 14:06:31.094218857 -0400
|
||||||
|
@@ -959,6 +959,16 @@
|
||||||
|
|| dlib_ptr->flag == FLAG_ELF_LIBC6)
|
||||||
|
&& flag == FLAG_ELF)
|
||||||
|
dlib_ptr->flag = flag;
|
||||||
|
+#ifdef __arm__
|
||||||
|
+ /* In Fedora 20 binutils regressed temporarily and failed to
|
||||||
|
+ mark hard ABI objects with the correct flag. Therefore we
|
||||||
|
+ must accept unmarked objects that were previously marked
|
||||||
|
+ hard ABI. We can remove this check once the entire distribution
|
||||||
|
+ has been rebuilt. */
|
||||||
|
+ else if (dlib_ptr->flag & FLAG_ARM_LIBHF &&
|
||||||
|
+ (flag == FLAG_ELF_LIBC6))
|
||||||
|
+ ;
|
||||||
|
+#endif
|
||||||
|
else
|
||||||
|
error (0, 0, _("libraries %s and %s in directory %s have same soname but different type."),
|
||||||
|
dlib_ptr->name, direntry->d_name,
|
90
glibc-rh1013801.patch
Normal file
90
glibc-rh1013801.patch
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
#
|
||||||
|
# Posted upstream:
|
||||||
|
# https://sourceware.org/ml/libc-alpha/2013-10/msg00065.html
|
||||||
|
#
|
||||||
|
# This is related to bug 1013801 in that it fixes the problem
|
||||||
|
# by modifying the runtime. In bug 1013801 we have libselinux
|
||||||
|
# using pthread_atfork which pulls in libpthread, but we don't
|
||||||
|
# want that, we want libpthread to be pulled in only when
|
||||||
|
# actually needed by the application. This patch makes it
|
||||||
|
# possible to avoid requiring libpthread and still use
|
||||||
|
# pthread_atfork.
|
||||||
|
#
|
||||||
|
# The general idea for the design is in the leading comment
|
||||||
|
# in the source code.
|
||||||
|
#
|
||||||
|
diff --git a/nptl/sysdeps/unix/sysv/linux/Makefile b/nptl/sysdeps/unix/sysv/linux/Makefile
|
||||||
|
index 6078e2d..36fd50b 100644
|
||||||
|
--- a/nptl/Makefile
|
||||||
|
+++ b/nptl/Makefile
|
||||||
|
@@ -18,7 +18,9 @@
|
||||||
|
|
||||||
|
routines = alloca_cutoff forward libc-lowlevellock libc-cancellation \
|
||||||
|
libc-cleanup libc_pthread_init libc_multiple_threads \
|
||||||
|
- register-atfork unregister-atfork
|
||||||
|
+ register-atfork unregister-atfork libc_pthread_atfork
|
||||||
|
+
|
||||||
|
+static-only-routines += libc_pthread_atfork
|
||||||
|
shared-only-routines = forward
|
||||||
|
|
||||||
|
libpthread-routines = nptl-init vars events version pt-interp \
|
||||||
|
diff --git a/nptl/libc_pthread_atfork.c b/nptl/libc_pthread_atfork.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..667049a
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/nptl/libc_pthread_atfork.c
|
||||||
|
@@ -0,0 +1,54 @@
|
||||||
|
+/* Copyright (C) 2013 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+ Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <http://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+/* The standard design pattern for making it optional to link against
|
||||||
|
+ libpthread is to mark the function weak, test if the function
|
||||||
|
+ address is non-zero and call the function, otherwise use a fallback.
|
||||||
|
+ The problem with pthread_atfork is that there is no viable
|
||||||
|
+ fallback. If you need to do something during fork it has to be done
|
||||||
|
+ via pthread_atfork. This makes having libpthread optional and using
|
||||||
|
+ pthread_atfork impossible. We make it possible by providing
|
||||||
|
+ pthread_atfork in libc_nonshared.a. The real work of pthread_atfork
|
||||||
|
+ is done by __register_atfork which is already provided in
|
||||||
|
+ libc_nonshared.a. It's included in libc_nonshared.a because
|
||||||
|
+ __dso_handle has to be unique to each DSO such that unloading the DSO
|
||||||
|
+ can unregister the atfork handlers. We build pthread_atfork again
|
||||||
|
+ under a different file name and include it into libc_nonshared.a and
|
||||||
|
+ libc.a. We keep pthread_atfork in libpthread_nonshared.a and
|
||||||
|
+ libpthread.a for compatibility and completeness.
|
||||||
|
+
|
||||||
|
+ Applications that can't rely on a new glibc should use the following
|
||||||
|
+ code to optionally include libpthread and still register a function
|
||||||
|
+ via pthread_atfork i.e. use __register_atfork directly:
|
||||||
|
+
|
||||||
|
+ extern void *__dso_handle __attribute__ ((__weak__, __visibility__ ("hidden")));
|
||||||
|
+ extern int __register_atfork (void (*) (void), void (*) (void), void (*) (void), void *);
|
||||||
|
+
|
||||||
|
+ static int __app_atfork (void (*prepare) (void), void (*parent) (void), void (*child) (void))
|
||||||
|
+ {
|
||||||
|
+ return __register_atfork (prepare, parent, child,
|
||||||
|
+ &__dso_handle == NULL ? NULL : __dso_handle);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ This code requires glibc 2.3.2 or newer. Previous to 2.3.2 no such
|
||||||
|
+ interfaces exist and at that point is is impossible to have an
|
||||||
|
+ optional libpthread and call pthread_atfork.
|
||||||
|
+
|
||||||
|
+ This code adds no more ABI requirements than already exist since
|
||||||
|
+ __dso_handle and __register_atfork are already part of the ABI. */
|
||||||
|
+#include <pthread_atfork.c>
|
29
glibc-rh1070416.patch
Normal file
29
glibc-rh1070416.patch
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
--- a/nscd/nscd.service
|
||||||
|
+++ b/nscd/nscd.service
|
||||||
|
@@ -2,6 +2,7 @@
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=Name Service Cache Daemon
|
||||||
|
+After=syslog.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=forking
|
||||||
|
@@ -17,3 +18,4 @@
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
+Also=nscd.socket
|
||||||
|
diff --git a/nscd/nscd.socket b/nscd/nscd.socket
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..7e512d5
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/nscd/nscd.socket
|
||||||
|
@@ -0,0 +1,8 @@
|
||||||
|
+[Unit]
|
||||||
|
+Description=Name Service Cache Daemon Socket
|
||||||
|
+
|
||||||
|
+[Socket]
|
||||||
|
+ListenDatagram=/var/run/nscd/socket
|
||||||
|
+
|
||||||
|
+[Install]
|
||||||
|
+WantedBy=sockets.target
|
1946
glibc-rh1315108.patch
Normal file
1946
glibc-rh1315108.patch
Normal file
File diff suppressed because it is too large
Load diff
54
glibc-rh1315476-1.patch
Normal file
54
glibc-rh1315476-1.patch
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
commit a4551b7f6ce08317220a8cd79cd3d02a03648752
|
||||||
|
Author: Florian Weimer <fweimer@redhat.com>
|
||||||
|
Date: Wed Jul 13 11:50:04 2016 +0200
|
||||||
|
|
||||||
|
sln: Preprocessor cleanups
|
||||||
|
|
||||||
|
diff --git a/elf/sln.c b/elf/sln.c
|
||||||
|
index f52cb9f..fa4ccec 100644
|
||||||
|
--- a/elf/sln.c
|
||||||
|
+++ b/elf/sln.c
|
||||||
|
@@ -16,10 +16,6 @@
|
||||||
|
License along with the GNU C Library; if not, see
|
||||||
|
<http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
-#ifdef HAVE_CONFIG_H
|
||||||
|
-# include "config.h"
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
#include <error.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <libintl.h>
|
||||||
|
@@ -37,10 +33,6 @@
|
||||||
|
|
||||||
|
#define PACKAGE _libc_intl_domainname
|
||||||
|
|
||||||
|
-#if !defined S_ISDIR && defined S_IFDIR
|
||||||
|
-#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
static int makesymlink (const char *src, const char *dest);
|
||||||
|
static int makesymlinks (const char *file);
|
||||||
|
static void usage (void);
|
||||||
|
@@ -89,9 +81,6 @@ usage (void)
|
||||||
|
static int
|
||||||
|
makesymlinks (const char *file)
|
||||||
|
{
|
||||||
|
-#ifndef PATH_MAX
|
||||||
|
-#define PATH_MAX 4095
|
||||||
|
-#endif
|
||||||
|
char *buffer = NULL;
|
||||||
|
size_t bufferlen = 0;
|
||||||
|
int ret;
|
||||||
|
@@ -190,11 +179,7 @@ makesymlink (const char *src, const char *dest)
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
-#ifdef S_ISLNK
|
||||||
|
if (symlink (src, dest) == 0)
|
||||||
|
-#else
|
||||||
|
- if (link (src, dest) == 0)
|
||||||
|
-#endif
|
||||||
|
{
|
||||||
|
/* Destination must exist by now. */
|
||||||
|
if (access (dest, F_OK))
|
164
glibc-rh1315476-2.patch
Normal file
164
glibc-rh1315476-2.patch
Normal file
|
@ -0,0 +1,164 @@
|
||||||
|
commit 9f9503b56a8c7566c91d486a67be5d41792a87ca
|
||||||
|
Author: Florian Weimer <fweimer@redhat.com>
|
||||||
|
Date: Wed Jul 13 14:06:00 2016 +0200
|
||||||
|
|
||||||
|
sln: Install as a hard link to ldconfig
|
||||||
|
|
||||||
|
Implementing and sln and ldconfig with the same binary saves
|
||||||
|
around 850 KiB from a glibc installation.
|
||||||
|
|
||||||
|
The sln program is implicitly tested during the build, so no test
|
||||||
|
case is needed.
|
||||||
|
|
||||||
|
diff --git a/elf/Makefile b/elf/Makefile
|
||||||
|
index 593403c..d90f21a 100644
|
||||||
|
--- a/elf/Makefile
|
||||||
|
+++ b/elf/Makefile
|
||||||
|
@@ -70,12 +70,8 @@ install-others = $(inst_rtlddir)/$(rtld-installed-name)
|
||||||
|
install-bin-script = ldd
|
||||||
|
endif
|
||||||
|
|
||||||
|
-others = sprof sln
|
||||||
|
+others = sprof
|
||||||
|
install-bin = sprof
|
||||||
|
-others-static = sln
|
||||||
|
-install-rootsbin = sln
|
||||||
|
-sln-modules := static-stubs
|
||||||
|
-extra-objs += $(sln-modules:=.o)
|
||||||
|
|
||||||
|
ifeq (yes,$(use-ldconfig))
|
||||||
|
ifeq (yes,$(build-shared))
|
||||||
|
@@ -83,8 +79,16 @@ others-static += ldconfig
|
||||||
|
others += ldconfig
|
||||||
|
install-rootsbin += ldconfig
|
||||||
|
|
||||||
|
-ldconfig-modules := cache readlib xmalloc xstrdup chroot_canon static-stubs
|
||||||
|
+ldconfig-modules := cache readlib xmalloc xstrdup chroot_canon static-stubs sln
|
||||||
|
extra-objs += $(ldconfig-modules:=.o)
|
||||||
|
+
|
||||||
|
+# Install sln as a hard link to ldconfig.
|
||||||
|
+install-others-programs += $(inst_rootsbindir)/sln
|
||||||
|
+others: $(objpfx)sln
|
||||||
|
+$(objpfx)sln: $(objpfx)ldconfig
|
||||||
|
+ ln -f $< $@
|
||||||
|
+$(inst_rootsbindir)/sln: $(inst_rootsbindir)/ldconfig
|
||||||
|
+ ln -f $< $@
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
@@ -466,8 +470,6 @@ $(objpfx)ldd: ldd.bash.in $(common-objpfx)soversions.mk \
|
||||||
|
|
||||||
|
$(objpfx)sprof: $(libdl)
|
||||||
|
|
||||||
|
-$(objpfx)sln: $(sln-modules:%=$(objpfx)%.o)
|
||||||
|
-
|
||||||
|
$(objpfx)ldconfig: $(ldconfig-modules:%=$(objpfx)%.o)
|
||||||
|
|
||||||
|
SYSCONF-FLAGS := -D'SYSCONFDIR="$(sysconfdir)"'
|
||||||
|
diff --git a/elf/ldconfig.c b/elf/ldconfig.c
|
||||||
|
index 467ca82..972737c 100644
|
||||||
|
--- a/elf/ldconfig.c
|
||||||
|
+++ b/elf/ldconfig.c
|
||||||
|
@@ -44,6 +44,8 @@
|
||||||
|
|
||||||
|
#include <dl-procinfo.h>
|
||||||
|
|
||||||
|
+#include "sln.h"
|
||||||
|
+
|
||||||
|
#ifdef _DL_FIRST_PLATFORM
|
||||||
|
# define _DL_FIRST_EXTRA (_DL_FIRST_PLATFORM + _DL_PLATFORMS_COUNT)
|
||||||
|
#else
|
||||||
|
@@ -1275,6 +1277,9 @@ main (int argc, char **argv)
|
||||||
|
/* Set the text message domain. */
|
||||||
|
textdomain (_libc_intl_domainname);
|
||||||
|
|
||||||
|
+ if (run_sln (argv[0]))
|
||||||
|
+ return sln_main (argc, argv);
|
||||||
|
+
|
||||||
|
/* Parse and process arguments. */
|
||||||
|
int remaining;
|
||||||
|
argp_parse (&argp, argc, argv, 0, &remaining, NULL);
|
||||||
|
diff --git a/elf/sln.c b/elf/sln.c
|
||||||
|
index fa4ccec..c6889d7 100644
|
||||||
|
--- a/elf/sln.c
|
||||||
|
+++ b/elf/sln.c
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-/* `sln' program to create symbolic links between files.
|
||||||
|
+/* sln helper to create symbolic links between files, invoked from ldconfig.
|
||||||
|
Copyright (C) 1998-2016 Free Software Foundation, Inc.
|
||||||
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
|
@@ -31,21 +31,29 @@
|
||||||
|
|
||||||
|
#include "../version.h"
|
||||||
|
|
||||||
|
-#define PACKAGE _libc_intl_domainname
|
||||||
|
+#include "sln.h"
|
||||||
|
|
||||||
|
static int makesymlink (const char *src, const char *dest);
|
||||||
|
static int makesymlinks (const char *file);
|
||||||
|
static void usage (void);
|
||||||
|
|
||||||
|
-int
|
||||||
|
-main (int argc, char **argv)
|
||||||
|
+/* Check if we have to run sln. */
|
||||||
|
+bool
|
||||||
|
+run_sln (const char *argv0)
|
||||||
|
{
|
||||||
|
- /* Set locale via LC_ALL. */
|
||||||
|
- setlocale (LC_ALL, "");
|
||||||
|
-
|
||||||
|
- /* Set the text message domain. */
|
||||||
|
- textdomain (PACKAGE);
|
||||||
|
+ const char *slash = strrchr (argv0, '/');
|
||||||
|
+ const char *progname;
|
||||||
|
+ if (slash == NULL)
|
||||||
|
+ progname = argv0;
|
||||||
|
+ else
|
||||||
|
+ progname = slash + 1;
|
||||||
|
+ return strcmp (progname, "sln") == 0;
|
||||||
|
+}
|
||||||
|
|
||||||
|
+/* Invoked from ldconfig. */
|
||||||
|
+int
|
||||||
|
+sln_main (int argc, char **argv)
|
||||||
|
+{
|
||||||
|
switch (argc)
|
||||||
|
{
|
||||||
|
case 2:
|
||||||
|
diff --git a/elf/sln.h b/elf/sln.h
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..a3a16ab
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/elf/sln.h
|
||||||
|
@@ -0,0 +1,30 @@
|
||||||
|
+/* Interface of the sln command-line tool.
|
||||||
|
+ Copyright (C) 2016 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <http://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#ifndef SLN_H
|
||||||
|
+#define SLN_H
|
||||||
|
+
|
||||||
|
+#include <stdbool.h>
|
||||||
|
+
|
||||||
|
+/* Return true if main should invoke sln_main. */
|
||||||
|
+bool run_sln (const char *argv0);
|
||||||
|
+
|
||||||
|
+/* Main routine of the sln command. */
|
||||||
|
+int sln_main (int argc, char **argv);
|
||||||
|
+
|
||||||
|
+#endif /* SLN_H */
|
113
glibc-rh1324623.patch
Normal file
113
glibc-rh1324623.patch
Normal file
|
@ -0,0 +1,113 @@
|
||||||
|
This patch creates a crypt-glibc subdirectory which builds the
|
||||||
|
libgcrypt files, but this time against the glibc sources.
|
||||||
|
|
||||||
|
The default subdirs list does not include this subdirectory because
|
||||||
|
the file names conflict with the crypt directory. The spec file does
|
||||||
|
not use the install target to install the built libcrypt.so file,
|
||||||
|
either.
|
||||||
|
|
||||||
|
Index: b/crypt-glibc/Makefile
|
||||||
|
===================================================================
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/crypt-glibc/Makefile
|
||||||
|
@@ -0,0 +1,60 @@
|
||||||
|
+# Build libcrypt against internal cryptographic algorithms.
|
||||||
|
+# Copyright (C) 1996-2016 Free Software Foundation, Inc.
|
||||||
|
+# This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+# The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+# modify it under the terms of the GNU Lesser General Public
|
||||||
|
+# License as published by the Free Software Foundation; either
|
||||||
|
+# version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+# The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+# Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+# You should have received a copy of the GNU Lesser General Public
|
||||||
|
+# License along with the GNU C Library; if not, see
|
||||||
|
+# <http://www.gnu.org/licenses/>.
|
||||||
|
+
|
||||||
|
+#
|
||||||
|
+# Sub-makefile for crypt() portion of the library.
|
||||||
|
+#
|
||||||
|
+subdir := crypt-glibc
|
||||||
|
+
|
||||||
|
+include ../Makeconfig
|
||||||
|
+
|
||||||
|
+extra-libs := libcrypt
|
||||||
|
+extra-libs-others := $(extra-libs)
|
||||||
|
+
|
||||||
|
+# Use the sources in the crypt subdirectory.
|
||||||
|
+vpath %.c ../crypt
|
||||||
|
+
|
||||||
|
+libcrypt-routines := \
|
||||||
|
+ crypt-entry md5-crypt sha256-crypt sha512-crypt crypt crypt_util
|
||||||
|
+
|
||||||
|
+tests := cert md5c-test sha256c-test sha512c-test badsalttest
|
||||||
|
+
|
||||||
|
+libcrypt-routines += md5 sha256 sha512
|
||||||
|
+
|
||||||
|
+tests += md5test sha256test sha512test
|
||||||
|
+
|
||||||
|
+# The test md5test-giant uses up to 400 MB of RSS and runs on a fast
|
||||||
|
+# machine over a minute.
|
||||||
|
+xtests = md5test-giant
|
||||||
|
+
|
||||||
|
+include ../Rules
|
||||||
|
+
|
||||||
|
+md5-routines := md5 $(filter md5%,$(libcrypt-sysdep_routines))
|
||||||
|
+sha256-routines := sha256 $(filter sha256%,$(libcrypt-sysdep_routines))
|
||||||
|
+sha512-routines := sha512 $(filter sha512%,$(libcrypt-sysdep_routines))
|
||||||
|
+
|
||||||
|
+$(objpfx)md5test: $(patsubst %, $(objpfx)%.o,$(md5-routines))
|
||||||
|
+$(objpfx)md5test-giant: $(patsubst %, $(objpfx)%.o,$(md5-routines))
|
||||||
|
+$(objpfx)sha256test: $(patsubst %, $(objpfx)%.o,$(sha256-routines))
|
||||||
|
+$(objpfx)sha512test: $(patsubst %, $(objpfx)%.o,$(sha512-routines))
|
||||||
|
+
|
||||||
|
+ifeq (yes,$(build-shared))
|
||||||
|
+$(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.so
|
||||||
|
+else
|
||||||
|
+$(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.a
|
||||||
|
+endif
|
||||||
|
Index: b/crypt/md5.c
|
||||||
|
===================================================================
|
||||||
|
--- a/crypt/md5.c
|
||||||
|
+++ b/crypt/md5.c
|
||||||
|
@@ -270,4 +270,4 @@ md5_process_bytes (const void *buffer, s
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-#include <md5-block.c>
|
||||||
|
+#include "md5-block.c"
|
||||||
|
Index: b/crypt/sha256.c
|
||||||
|
===================================================================
|
||||||
|
--- a/crypt/sha256.c
|
||||||
|
+++ b/crypt/sha256.c
|
||||||
|
@@ -212,4 +212,4 @@ __sha256_process_bytes (const void *buff
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-#include <sha256-block.c>
|
||||||
|
+#include "sha256-block.c"
|
||||||
|
Index: b/crypt/sha512.c
|
||||||
|
===================================================================
|
||||||
|
--- a/crypt/sha512.c
|
||||||
|
+++ b/crypt/sha512.c
|
||||||
|
@@ -235,4 +235,4 @@ __sha512_process_bytes (const void *buff
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-#include <sha512-block.c>
|
||||||
|
+#include "sha512-block.c"
|
||||||
|
Index: b/crypt-glibc/Versions
|
||||||
|
===================================================================
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/crypt-glibc/Versions
|
||||||
|
@@ -0,0 +1,5 @@
|
||||||
|
+libcrypt {
|
||||||
|
+ GLIBC_2.0 {
|
||||||
|
+ crypt; crypt_r; encrypt; encrypt_r; fcrypt; setkey; setkey_r;
|
||||||
|
+ }
|
||||||
|
+}
|
176
glibc-rh1335011.patch
Normal file
176
glibc-rh1335011.patch
Normal file
|
@ -0,0 +1,176 @@
|
||||||
|
Revert these two upstream commits, to unbreak ASAN:
|
||||||
|
|
||||||
|
commit e91bd7465816f474617dcb4bbfe72f3594c5783c
|
||||||
|
Author: Adhemerval Zanella <adhemerval.zanella@linaro.com>
|
||||||
|
Date: Thu Mar 31 10:51:51 2016 -0300
|
||||||
|
|
||||||
|
Fix tst-dlsym-error build
|
||||||
|
|
||||||
|
This patch fixes the new test tst-dlsym-error build on aarch64
|
||||||
|
(and possible other architectures as well) due missing strchrnul
|
||||||
|
definition.
|
||||||
|
|
||||||
|
* elf/tst-dlsym-error.c: Include <string.h> for strchrnul.
|
||||||
|
|
||||||
|
commit 7d45c163d00c88d5875a112343c4ea3e61349e6b
|
||||||
|
Author: Florian Weimer <fweimer@redhat.com>
|
||||||
|
Date: Thu Mar 31 11:26:55 2016 +0200
|
||||||
|
|
||||||
|
Report dlsym, dlvsym lookup errors using dlerror [BZ #19509]
|
||||||
|
|
||||||
|
* elf/dl-lookup.c (_dl_lookup_symbol_x): Report error even if
|
||||||
|
skip_map != NULL.
|
||||||
|
* elf/tst-dlsym-error.c: New file.
|
||||||
|
* elf/Makefile (tests): Add tst-dlsym-error.
|
||||||
|
(tst-dlsym-error): Link against libdl.
|
||||||
|
|
||||||
|
Index: b/elf/Makefile
|
||||||
|
===================================================================
|
||||||
|
--- a/elf/Makefile
|
||||||
|
+++ b/elf/Makefile
|
||||||
|
@@ -149,7 +149,7 @@ tests += loadtest restest1 preloadtest l
|
||||||
|
tst-nodelete) \
|
||||||
|
tst-initorder tst-initorder2 tst-relsort1 tst-null-argv \
|
||||||
|
tst-ptrguard1 tst-tlsalign tst-tlsalign-extern tst-nodelete-opened \
|
||||||
|
- tst-nodelete2 tst-audit11 tst-audit12 tst-dlsym-error
|
||||||
|
+ tst-nodelete2 tst-audit11 tst-audit12
|
||||||
|
# reldep9
|
||||||
|
ifeq ($(build-hardcoded-path-in-tests),yes)
|
||||||
|
tests += tst-dlopen-aout
|
||||||
|
@@ -1258,5 +1258,3 @@ $(objpfx)tst-prelink-cmp.out: tst-prelin
|
||||||
|
$(objpfx)tst-ldconfig-X.out : tst-ldconfig-X.sh $(objpfx)ldconfig
|
||||||
|
$(SHELL) $< '$(common-objpfx)' '$(test-wrapper)' '$(test-wrapper-env)' > $@; \
|
||||||
|
$(evaluate-test)
|
||||||
|
-
|
||||||
|
-$(objpfx)tst-dlsym-error: $(libdl)
|
||||||
|
Index: b/elf/dl-lookup.c
|
||||||
|
===================================================================
|
||||||
|
--- a/elf/dl-lookup.c
|
||||||
|
+++ b/elf/dl-lookup.c
|
||||||
|
@@ -858,6 +858,7 @@ _dl_lookup_symbol_x (const char *undef_n
|
||||||
|
if (__glibc_unlikely (current_value.s == NULL))
|
||||||
|
{
|
||||||
|
if ((*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK)
|
||||||
|
+ && skip_map == NULL
|
||||||
|
&& !(GLRO(dl_debug_mask) & DL_DEBUG_UNUSED))
|
||||||
|
{
|
||||||
|
/* We could find no value for a strong reference. */
|
||||||
|
Index: b/elf/tst-dlsym-error.c
|
||||||
|
===================================================================
|
||||||
|
--- a/elf/tst-dlsym-error.c
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,114 +0,0 @@
|
||||||
|
-/* Test error reporting for dlsym, dlvsym failures.
|
||||||
|
- Copyright (C) 2016 Free Software Foundation, Inc.
|
||||||
|
- This file is part of the GNU C Library.
|
||||||
|
-
|
||||||
|
- The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
- modify it under the terms of the GNU Lesser General Public
|
||||||
|
- License as published by the Free Software Foundation; either
|
||||||
|
- version 2.1 of the License, or (at your option) any later version.
|
||||||
|
-
|
||||||
|
- The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
- Lesser General Public License for more details.
|
||||||
|
-
|
||||||
|
- You should have received a copy of the GNU Lesser General Public
|
||||||
|
- License along with the GNU C Library; if not, see
|
||||||
|
- <http://www.gnu.org/licenses/>. */
|
||||||
|
-
|
||||||
|
-#include <dlfcn.h>
|
||||||
|
-#include <gnu/lib-names.h>
|
||||||
|
-#include <stdio.h>
|
||||||
|
-#include <stdlib.h>
|
||||||
|
-#include <string.h>
|
||||||
|
-
|
||||||
|
-/* Used to disambiguate symbol names. */
|
||||||
|
-static int counter;
|
||||||
|
-
|
||||||
|
-static void
|
||||||
|
-test_one (void *handle, const char *name, void *(func) (void *, const char *),
|
||||||
|
- const char *suffix)
|
||||||
|
-{
|
||||||
|
- ++counter;
|
||||||
|
- char symbol[32];
|
||||||
|
- snprintf (symbol, sizeof (symbol), "no_such_symbol_%d", counter);
|
||||||
|
- char *expected_message;
|
||||||
|
- if (asprintf (&expected_message, ": undefined symbol: %s%s",
|
||||||
|
- symbol, suffix) < 0)
|
||||||
|
- {
|
||||||
|
- printf ("error: asprintf: %m\n");
|
||||||
|
- abort ();
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- void *addr = func (handle, symbol);
|
||||||
|
- if (addr != NULL)
|
||||||
|
- {
|
||||||
|
- printf ("error: %s: found symbol \"no_such_symbol\"\n", name);
|
||||||
|
- abort ();
|
||||||
|
- }
|
||||||
|
- const char *message = dlerror ();
|
||||||
|
- if (message == NULL)
|
||||||
|
- {
|
||||||
|
- printf ("error: %s: missing error message\n", name);
|
||||||
|
- abort ();
|
||||||
|
- }
|
||||||
|
- const char *message_without_path = strchrnul (message, ':');
|
||||||
|
- if (strcmp (message_without_path, expected_message) != 0)
|
||||||
|
- {
|
||||||
|
- printf ("error: %s: unexpected error message: %s\n", name, message);
|
||||||
|
- abort ();
|
||||||
|
- }
|
||||||
|
- free (expected_message);
|
||||||
|
-
|
||||||
|
- message = dlerror ();
|
||||||
|
- if (message != NULL)
|
||||||
|
- {
|
||||||
|
- printf ("error: %s: unexpected error message: %s\n", name, message);
|
||||||
|
- abort ();
|
||||||
|
- }
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-static void
|
||||||
|
-test_handles (const char *name, void *(func) (void *, const char *),
|
||||||
|
- const char *suffix)
|
||||||
|
-{
|
||||||
|
- test_one (RTLD_DEFAULT, name, func, suffix);
|
||||||
|
- test_one (RTLD_NEXT, name, func, suffix);
|
||||||
|
-
|
||||||
|
- void *handle = dlopen (LIBC_SO, RTLD_LAZY);
|
||||||
|
- if (handle == NULL)
|
||||||
|
- {
|
||||||
|
- printf ("error: cannot dlopen %s: %s\n", LIBC_SO, dlerror ());
|
||||||
|
- abort ();
|
||||||
|
- }
|
||||||
|
- test_one (handle, name, func, suffix);
|
||||||
|
- dlclose (handle);
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-static void *
|
||||||
|
-dlvsym_no_such_version (void *handle, const char *name)
|
||||||
|
-{
|
||||||
|
- return dlvsym (handle, name, "NO_SUCH_VERSION");
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-static void *
|
||||||
|
-dlvsym_glibc_private (void *handle, const char *name)
|
||||||
|
-{
|
||||||
|
- return dlvsym (handle, name, "GLIBC_PRIVATE");
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-static int
|
||||||
|
-do_test (void)
|
||||||
|
-{
|
||||||
|
- test_handles ("dlsym", dlsym, "");
|
||||||
|
- test_handles ("dlvsym", dlvsym_no_such_version,
|
||||||
|
- ", version NO_SUCH_VERSION");
|
||||||
|
- test_handles ("dlvsym", dlvsym_glibc_private,
|
||||||
|
- ", version GLIBC_PRIVATE");
|
||||||
|
-
|
||||||
|
- return 0;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-#define TEST_FUNCTION do_test ()
|
||||||
|
-#include "../test-skeleton.c"
|
11569
glibc-rh1351108-update-to-unicode-9.0.0.patch
Normal file
11569
glibc-rh1351108-update-to-unicode-9.0.0.patch
Normal file
File diff suppressed because it is too large
Load diff
41
glibc.spec
41
glibc.spec
|
@ -125,6 +125,17 @@ Patch23: glibc-fedora-manual-dircategory.patch
|
||||||
Patch24: glibc-fedora-nis-rh188246.patch
|
Patch24: glibc-fedora-nis-rh188246.patch
|
||||||
Patch25: glibc-fedora-nptl-linklibc.patch
|
Patch25: glibc-fedora-nptl-linklibc.patch
|
||||||
|
|
||||||
|
Patch26: glibc-2.20-i586-hptiming.patch
|
||||||
|
Patch27: glibc-2.22-blacklist-CPUs-from-lock-elision.patch
|
||||||
|
Patch28: glibc-bug-regex-gcc5.patch
|
||||||
|
Patch29: glibc-c-utf8-locale.patch
|
||||||
|
Patch30: glibc-dns-host-gcc5.patch
|
||||||
|
Patch31: glibc-dso_deps.patch
|
||||||
|
Patch32: glibc-gcc-PR69537.patch
|
||||||
|
Patch33: glibc-gethnamaddr-gcc5.patch
|
||||||
|
Patch34: glibc-ld-ctype-gcc5.patch
|
||||||
|
Patch35: glibc-res-hconf-gcc5.patch
|
||||||
|
|
||||||
#
|
#
|
||||||
# Patches from upstream
|
# Patches from upstream
|
||||||
#
|
#
|
||||||
|
@ -147,6 +158,16 @@ Patch43: glibc-rh827510.patch
|
||||||
Patch44: glibc-rh819430.patch
|
Patch44: glibc-rh819430.patch
|
||||||
Patch45: glibc-rh952799.patch
|
Patch45: glibc-rh952799.patch
|
||||||
|
|
||||||
|
Patch46: glibc-rh1009145.patch
|
||||||
|
Patch47: glibc-rh1013801.patch
|
||||||
|
Patch48: glibc-rh1070416.patch
|
||||||
|
Patch49: glibc-rh1315108.patch
|
||||||
|
Patch50: glibc-rh1315476-1.patch
|
||||||
|
Patch51: glibc-rh1315476-2.patch
|
||||||
|
Patch52: glibc-rh1324623.patch
|
||||||
|
Patch53: glibc-rh1335011.patch
|
||||||
|
Patch54: glibc-rh1351108-update-to-unicode-9.0.0.patch
|
||||||
|
|
||||||
#-----------------------------------------------------------------------
|
#-----------------------------------------------------------------------
|
||||||
# mandriva patches
|
# mandriva patches
|
||||||
Patch100: eglibc-mandriva-localedef-archive-follow-symlinks.patch
|
Patch100: eglibc-mandriva-localedef-archive-follow-symlinks.patch
|
||||||
|
@ -798,12 +819,32 @@ their ~/.profile configuration file.
|
||||||
%patch24 -p1
|
%patch24 -p1
|
||||||
%patch25 -p1
|
%patch25 -p1
|
||||||
|
|
||||||
|
%patch26 -p1
|
||||||
|
%patch27 -p1
|
||||||
|
%patch28 -p1
|
||||||
|
%patch29 -p1
|
||||||
|
%patch30 -p1
|
||||||
|
%patch31 -p1
|
||||||
|
%patch32 -p1
|
||||||
|
%patch33 -p1
|
||||||
|
%patch34 -p1
|
||||||
|
%patch35 -p1
|
||||||
|
|
||||||
%patch40 -p1
|
%patch40 -p1
|
||||||
%patch41 -p1
|
%patch41 -p1
|
||||||
%patch42 -p1
|
%patch42 -p1
|
||||||
%patch43 -p1
|
%patch43 -p1
|
||||||
%patch44 -p1
|
%patch44 -p1
|
||||||
%patch45 -p1
|
%patch45 -p1
|
||||||
|
%patch46 -p1
|
||||||
|
%patch47 -p1
|
||||||
|
%patch48 -p1
|
||||||
|
%patch49 -p1
|
||||||
|
%patch50 -p1
|
||||||
|
%patch51 -p1
|
||||||
|
%patch52 -p1
|
||||||
|
%patch53 -p1
|
||||||
|
%patch54 -p1
|
||||||
|
|
||||||
%patch100 -p1
|
%patch100 -p1
|
||||||
%patch101 -p1
|
%patch101 -p1
|
||||||
|
|
Loading…
Add table
Reference in a new issue