From 89e8e0c9a2519c72e12a28b50d7f4a7088251760 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nagy=20K=C3=A1roly=20G=C3=A1brl?= Date: Sat, 20 Feb 2016 19:49:44 +0000 Subject: [PATCH] glibc: Updated (2.16.0 -> 2.23) --- base/glibc/allow_Os.patch | 37 - base/glibc/any-cc-as-ld-ok.patch.toolchain | 38 +- base/glibc/fl_wrapper_testfix.patch | 27 - .../glibc-2.16.0-0000-upstream-fixes.patch | 1101 ----------------- .../glibc-2.16.0-ldd-rewrite-multilib-1.patch | 23 - base/glibc/glibc-2.16.0-res_query_fix-1.patch | 75 -- base/glibc/glibc-2.23-fhs-1.patch | 88 ++ .../glibc-avoid-libgcc_eh-and-libgcc_s.patch | 359 ------ base/glibc/glibc.conf | 39 +- base/glibc/glibc.desc | 7 +- base/glibc/ldconfig-glob.patch | 1 + base/glibc/make-install-lib-all.patch | 40 - base/glibc/make_shlib_link.patch | 41 - base/glibc/new_make.patch | 27 - .../no-binutils-powerpc.patch.cross.disabled | 34 - base/glibc/no_timezone.patch | 15 +- base/glibc/ugly-no-nptl.patch | 40 - 17 files changed, 126 insertions(+), 1866 deletions(-) delete mode 100644 base/glibc/allow_Os.patch delete mode 100644 base/glibc/fl_wrapper_testfix.patch delete mode 100644 base/glibc/glibc-2.16.0-0000-upstream-fixes.patch delete mode 100644 base/glibc/glibc-2.16.0-ldd-rewrite-multilib-1.patch delete mode 100644 base/glibc/glibc-2.16.0-res_query_fix-1.patch create mode 100644 base/glibc/glibc-2.23-fhs-1.patch delete mode 100644 base/glibc/glibc-avoid-libgcc_eh-and-libgcc_s.patch delete mode 100644 base/glibc/make-install-lib-all.patch delete mode 100644 base/glibc/make_shlib_link.patch delete mode 100644 base/glibc/new_make.patch delete mode 100644 base/glibc/no-binutils-powerpc.patch.cross.disabled delete mode 100644 base/glibc/ugly-no-nptl.patch diff --git a/base/glibc/allow_Os.patch b/base/glibc/allow_Os.patch deleted file mode 100644 index a703c802b..000000000 --- a/base/glibc/allow_Os.patch +++ /dev/null @@ -1,37 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../glibc/allow_Os.patch -# Copyright (C) 2009 The OpenSDE Project -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- - -http://sourceware.org/bugzilla/show_bug.cgi?id=5203 - -objdir-x86_64-unknown-linux-gnu/libc_pic.os: In function `faccessat': -(.text+0x7fad9): undefined reference to `fstatat64' -collect2: ld returned 1 exit status - ---- ./io/sys/stat.h.orig 2009-09-30 19:04:20.000000000 +0200 -+++ ./io/sys/stat.h 2009-09-30 19:06:15.000000000 +0200 -@@ -444,7 +444,11 @@ - __mode_t __mode, __dev_t *__dev) - __THROW __nonnull ((3, 5)); - --#if defined __GNUC__ && __GNUC__ >= 2 && defined __USE_EXTERN_INLINES -+#if defined __GNUC__ && __GNUC__ >= 2 -+# ifndef __extern_inline -+# define __extern_inline extern inline -+# endif -+ - /* Inlined versions of the real stat and mknod functions. */ - - __extern_inline int diff --git a/base/glibc/any-cc-as-ld-ok.patch.toolchain b/base/glibc/any-cc-as-ld-ok.patch.toolchain index 26b9e6b81..12725e8a4 100644 --- a/base/glibc/any-cc-as-ld-ok.patch.toolchain +++ b/base/glibc/any-cc-as-ld-ok.patch.toolchain @@ -2,8 +2,7 @@ # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: package/.../glibc/any-cc-as-ld-ok.patch.toolchain -# Copyright (C) 2010 - 2012 The OpenSDE Project -# Copyright (C) 2004 - 2006 The T2 SDE Project +# Copyright (C) 2016 The OpenSDE Project # # More information can be found in the files COPYING and README. # @@ -15,28 +14,24 @@ # version. # --- SDE-COPYRIGHT-NOTE-END --- -At toolchain stage we only install glibc headers, so any version of gcc, as -and ld are ok for us. - ---- glibc-2.16.0/configure.orig 2012-06-30 21:12:34.000000000 +0200 -+++ glibc-2.16.0/configure 2012-08-05 01:35:35.047013403 +0200 -@@ -4653,9 +4653,9 @@ +--- glibc-2.23/configure.orig 2016-02-18 17:54:00.000000000 +0000 ++++ glibc-2.23/configure 2016-02-20 12:58:15.710489911 +0000 +@@ -4422,9 +4422,8 @@ ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*) +- 2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*) + *) ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; -+ XXX) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5 -@@ -4716,9 +4716,9 @@ +@@ -4485,9 +4484,9 @@ ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU ld.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*) +- 2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*) + *) ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; @@ -44,15 +39,12 @@ and ld are ok for us. esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5 -@@ -4782,9 +4782,9 @@ - ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 4.[3-9].* | 4.[1-9][0-9].* | [5-9].* ) -+ *) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; -- *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; -+ XXX) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; +@@ -4830,7 +4829,7 @@ + main () + { - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5 +-#if !defined __GNUC__ || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) ++#if !defined __GNUC__ || __GNUC__ < 4 + #error insufficient compiler + #endif + ; diff --git a/base/glibc/fl_wrapper_testfix.patch b/base/glibc/fl_wrapper_testfix.patch deleted file mode 100644 index 99f32d916..000000000 --- a/base/glibc/fl_wrapper_testfix.patch +++ /dev/null @@ -1,27 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../glibc/fl_wrapper_testfix.patch -# Copyright (C) 2004 - 2006 The T2 SDE Project -# Copyright (C) 1998 - 2003 Clifford Wolf -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- - ---- ./scripts/test-installation.pl.gv Fri Nov 15 13:20:48 2002 -+++ ./scripts/test-installation.pl Fri Nov 15 13:21:07 2002 -@@ -156,6 +156,7 @@ - open LDD, "ldd /tmp/test-prg$$ |" - or die ("Couldn't execute ldd"); - while () { -+ next if (/fl_wrapper/); - if (/^\s*lib/) { - ($name, $version1, $version2) = - /^\s*lib(\w*)\.so\.([0-9\.]*)\s*=>.*\.so\.([0-9\.]*)/; diff --git a/base/glibc/glibc-2.16.0-0000-upstream-fixes.patch b/base/glibc/glibc-2.16.0-0000-upstream-fixes.patch deleted file mode 100644 index 5942a5e55..000000000 --- a/base/glibc/glibc-2.16.0-0000-upstream-fixes.patch +++ /dev/null @@ -1,1101 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../glibc/glibc-2.16.0-0000-upstream-fixes.patch -# Copyright (C) 2013 The OpenSDE Project -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- - -From 33c9f2211ca7b23299e016ee246e2d2c6cc6e831 Mon Sep 17 00:00:00 2001 -From: Mike Frysinger -Date: Tue, 3 Jul 2012 15:22:05 -0400 -Subject: [PATCH] sunrpc: fix rpc bootstrap builds - -If you build & install glibc w/rpc disabled, you no longer have headers in -/usr/include/rpc/ (this is expected). But if you try to build glibc w/rpc -enabled, this gets into a bad state due to the new rpc helpers that get -cross-compiled: - -$ make -... -x86_64-pc-linux-gnu-gcc -m32 -D_RPC_THREAD_SAFE_ -D_GNU_SOURCE -DIS_IN_build \ - -include $objdir/config.h rpc_clntout.c -o $objdir/sunrpc/cross-rpc_clntout.o \ - -MMD -MP -MF $objdir/sunrpc/cross-rpc_clntout.o.dt -MT $objdir/sunrpc/cross-rpc_clntout.o -c -rpc_clntout.c:34:23: fatal error: rpc/types.h: No such file or directory -compilation terminated. -make: *** [$objdir/sunrpc/cross-rpc_clntout.o] Error 1 - -Signed-off-by: Mike Frysinger - -(cherry picked from commit fb21f89b75d0152aa42efb6b620843799a4cd76b) ---- - sunrpc/rpc_clntout.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/sunrpc/rpc_clntout.c b/sunrpc/rpc_clntout.c -index ec040c7..ce4d2a4 100644 ---- a/sunrpc/rpc_clntout.c -+++ b/sunrpc/rpc_clntout.c -@@ -31,7 +31,7 @@ - */ - #include - #include --#include -+#include "rpc/types.h" - #include "rpc_parse.h" - #include "rpc_util.h" - #include "proto.h" --- -1.7.2.3 - - -From 76adf226534522267a38cf4b7d293706279d5cd2 Mon Sep 17 00:00:00 2001 -From: Liubov Dmitrieva -Date: Wed, 15 Aug 2012 21:06:55 +0200 -Subject: [PATCH] Fix segmentation fault in strncasecmp for i686 - -2012-08-15 Liubov Dmitrieva - - [BZ #14195] - * sysdeps/i386/i686/multiarch/strcmp-sssse3.S: Fix - segmentation fault for a case of two empty input strings. - * string/test-strncasecmp.c (check1): Renamed to... - (bz12205): ...this. - (bz14195): Add new testcase for two empty input strings and N > 0. - (test_main): Call new testcase, adapt for renamed function. -(cherry picked from commit b3f479a85a3e191befbe821d787d7f71c0f64e79) ---- - string/test-strncasecmp.c | 18 ++++++++++++++---- - sysdeps/i386/i686/multiarch/strcmp-ssse3.S | 2 +- - 2 files changed, 15 insertions(+), 5 deletions(-) - -diff --git a/string/test-strncasecmp.c b/string/test-strncasecmp.c -index 6c17530..acfe668 100644 ---- a/string/test-strncasecmp.c -+++ b/string/test-strncasecmp.c -@@ -1,5 +1,5 @@ - /* Test and measure strncasecmp functions. -- Copyright (C) 1999, 2002, 2003, 2005, 2010 Free Software Foundation, Inc. -+ Copyright (C) 1999-2012 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Written by Jakub Jelinek , 1999. - -@@ -251,9 +251,9 @@ do_random_tests (void) - } - } - -- -+/* Regression test for BZ #12205 */ - static void --check1 (void) -+bz12205 (void) - { - static char cp [4096+16] __attribute__ ((aligned(4096))); - static char gotrel[4096] __attribute__ ((aligned(4096))); -@@ -270,6 +270,15 @@ check1 (void) - check_result (impl, s1, s2, n, exp_result); - } - -+/* Regression test for BZ #14195 */ -+static void -+bz14195 (void) -+{ -+ const char *empty_string = ""; -+ FOR_EACH_IMPL (impl, 0) -+ check_result (impl, empty_string, "", 5, 0); -+} -+ - int - test_main (void) - { -@@ -277,7 +286,8 @@ test_main (void) - - test_init (); - -- check1 (); -+ bz12205 (); -+ bz14195 (); - - printf ("%23s", ""); - FOR_EACH_IMPL (impl, 0) -diff --git a/sysdeps/i386/i686/multiarch/strcmp-ssse3.S b/sysdeps/i386/i686/multiarch/strcmp-ssse3.S -index 5e6321e..9735ad0 100644 ---- a/sysdeps/i386/i686/multiarch/strcmp-ssse3.S -+++ b/sysdeps/i386/i686/multiarch/strcmp-ssse3.S -@@ -2445,7 +2445,7 @@ L(less16bytes_sncmp): - # endif - jne L(neq_sncmp) - test %cl, %cl -- je L(eq) -+ je L(eq_sncmp) - - cmp $1, REM - je L(eq_sncmp) --- -1.7.2.3 - - -From a01a14d518c2b32cdb0d21942b2d34da33692409 Mon Sep 17 00:00:00 2001 -From: Joseph Myers -Date: Mon, 27 Aug 2012 15:59:24 +0000 -Subject: [PATCH] Fix strtod integer/buffer overflow (bug 14459). - -(cherry picked from commit d6e70f4368533224e66d10b7f2126b899a3fd5e4) ---- - stdlib/Makefile | 3 +- - stdlib/strtod_l.c | 142 ++++++++++++++++++++++++++++++++--------- - stdlib/tst-strtod-overflow.c | 48 ++++++++++++++ - 3 files changed, 161 insertions(+), 32 deletions(-) - create mode 100644 stdlib/tst-strtod-overflow.c - -diff --git a/stdlib/Makefile b/stdlib/Makefile -index f7811c5..79c9acb 100644 ---- a/stdlib/Makefile -+++ b/stdlib/Makefile -@@ -68,7 +68,8 @@ tests := tst-strtol tst-strtod testmb testrand testsort testdiv \ - tst-atof1 tst-atof2 tst-strtod2 tst-strtod3 tst-rand48-2 \ - tst-makecontext tst-strtod4 tst-strtod5 tst-qsort2 \ - tst-makecontext2 tst-strtod6 tst-unsetenv1 \ -- tst-makecontext3 bug-getcontext bug-fmtmsg1 -+ tst-makecontext3 bug-getcontext bug-fmtmsg1 \ -+ tst-strtod-overflow - - include ../Makeconfig - -diff --git a/stdlib/strtod_l.c b/stdlib/strtod_l.c -index 2166a08..a8a7ea8 100644 ---- a/stdlib/strtod_l.c -+++ b/stdlib/strtod_l.c -@@ -60,6 +60,7 @@ extern unsigned long long int ____strtoull_l_internal (const char *, char **, - #include - #include - #include -+#include - - /* The gmp headers need some configuration frobs. */ - #define HAVE_ALLOCA 1 -@@ -72,7 +73,6 @@ extern unsigned long long int ____strtoull_l_internal (const char *, char **, - #include "longlong.h" - #include "fpioconst.h" - --#define NDEBUG 1 - #include - - -@@ -174,19 +174,19 @@ extern const mp_limb_t _tens_in_limb[MAX_DIG_PER_LIMB + 1]; - /* Return a floating point number of the needed type according to the given - multi-precision number after possible rounding. */ - static FLOAT --round_and_return (mp_limb_t *retval, int exponent, int negative, -+round_and_return (mp_limb_t *retval, intmax_t exponent, int negative, - mp_limb_t round_limb, mp_size_t round_bit, int more_bits) - { - if (exponent < MIN_EXP - 1) - { -- mp_size_t shift = MIN_EXP - 1 - exponent; -- -- if (shift > MANT_DIG) -+ if (exponent < MIN_EXP - 1 - MANT_DIG) - { - __set_errno (ERANGE); - return 0.0; - } - -+ mp_size_t shift = MIN_EXP - 1 - exponent; -+ - more_bits |= (round_limb & ((((mp_limb_t) 1) << round_bit) - 1)) != 0; - if (shift == MANT_DIG) - /* This is a special case to handle the very seldom case where -@@ -233,6 +233,9 @@ round_and_return (mp_limb_t *retval, int exponent, int negative, - __set_errno (ERANGE); - } - -+ if (exponent > MAX_EXP) -+ goto overflow; -+ - if ((round_limb & (((mp_limb_t) 1) << round_bit)) != 0 - && (more_bits || (retval[0] & 1) != 0 - || (round_limb & ((((mp_limb_t) 1) << round_bit) - 1)) != 0)) -@@ -258,6 +261,7 @@ round_and_return (mp_limb_t *retval, int exponent, int negative, - } - - if (exponent > MAX_EXP) -+ overflow: - return negative ? -FLOAT_HUGE_VAL : FLOAT_HUGE_VAL; - - return MPN2FLOAT (retval, exponent, negative); -@@ -271,7 +275,7 @@ round_and_return (mp_limb_t *retval, int exponent, int negative, - factor for the resulting number (see code) multiply by it. */ - static const STRING_TYPE * - str_to_mpn (const STRING_TYPE *str, int digcnt, mp_limb_t *n, mp_size_t *nsize, -- int *exponent -+ intmax_t *exponent - #ifndef USE_WIDE_CHAR - , const char *decimal, size_t decimal_len, const char *thousands - #endif -@@ -301,6 +305,7 @@ str_to_mpn (const STRING_TYPE *str, int digcnt, mp_limb_t *n, mp_size_t *nsize, - cy += __mpn_add_1 (n, n, *nsize, low); - if (cy != 0) - { -+ assert (*nsize < MPNSIZE); - n[*nsize] = cy; - ++(*nsize); - } -@@ -335,7 +340,7 @@ str_to_mpn (const STRING_TYPE *str, int digcnt, mp_limb_t *n, mp_size_t *nsize, - } - while (--digcnt > 0); - -- if (*exponent > 0 && cnt + *exponent <= MAX_DIG_PER_LIMB) -+ if (*exponent > 0 && *exponent <= MAX_DIG_PER_LIMB - cnt) - { - low *= _tens_in_limb[*exponent]; - start = _tens_in_limb[cnt + *exponent]; -@@ -355,7 +360,10 @@ str_to_mpn (const STRING_TYPE *str, int digcnt, mp_limb_t *n, mp_size_t *nsize, - cy = __mpn_mul_1 (n, n, *nsize, start); - cy += __mpn_add_1 (n, n, *nsize, low); - if (cy != 0) -- n[(*nsize)++] = cy; -+ { -+ assert (*nsize < MPNSIZE); -+ n[(*nsize)++] = cy; -+ } - } - - return str; -@@ -413,7 +421,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc) - { - int negative; /* The sign of the number. */ - MPN_VAR (num); /* MP representation of the number. */ -- int exponent; /* Exponent of the number. */ -+ intmax_t exponent; /* Exponent of the number. */ - - /* Numbers starting `0X' or `0x' have to be processed with base 16. */ - int base = 10; -@@ -435,7 +443,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc) - /* Points at the character following the integer and fractional digits. */ - const STRING_TYPE *expp; - /* Total number of digit and number of digits in integer part. */ -- int dig_no, int_no, lead_zero; -+ size_t dig_no, int_no, lead_zero; - /* Contains the last character read. */ - CHAR_TYPE c; - -@@ -767,7 +775,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc) - are all or any is really a fractional digit will be decided - later. */ - int_no = dig_no; -- lead_zero = int_no == 0 ? -1 : 0; -+ lead_zero = int_no == 0 ? (size_t) -1 : 0; - - /* Read the fractional digits. A special case are the 'american - style' numbers like `16.' i.e. with decimal point but without -@@ -789,12 +797,13 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc) - (base == 16 && ({ CHAR_TYPE lo = TOLOWER (c); - lo >= L_('a') && lo <= L_('f'); }))) - { -- if (c != L_('0') && lead_zero == -1) -+ if (c != L_('0') && lead_zero == (size_t) -1) - lead_zero = dig_no - int_no; - ++dig_no; - c = *++cp; - } - } -+ assert (dig_no <= (uintmax_t) INTMAX_MAX); - - /* Remember start of exponent (if any). */ - expp = cp; -@@ -817,24 +826,80 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc) - - if (c >= L_('0') && c <= L_('9')) - { -- int exp_limit; -+ intmax_t exp_limit; - - /* Get the exponent limit. */ - if (base == 16) -- exp_limit = (exp_negative ? -- -MIN_EXP + MANT_DIG + 4 * int_no : -- MAX_EXP - 4 * int_no + 4 * lead_zero + 3); -+ { -+ if (exp_negative) -+ { -+ assert (int_no <= (uintmax_t) (INTMAX_MAX -+ + MIN_EXP - MANT_DIG) / 4); -+ exp_limit = -MIN_EXP + MANT_DIG + 4 * (intmax_t) int_no; -+ } -+ else -+ { -+ if (int_no) -+ { -+ assert (lead_zero == 0 -+ && int_no <= (uintmax_t) INTMAX_MAX / 4); -+ exp_limit = MAX_EXP - 4 * (intmax_t) int_no + 3; -+ } -+ else if (lead_zero == (size_t) -1) -+ { -+ /* The number is zero and this limit is -+ arbitrary. */ -+ exp_limit = MAX_EXP + 3; -+ } -+ else -+ { -+ assert (lead_zero -+ <= (uintmax_t) (INTMAX_MAX - MAX_EXP - 3) / 4); -+ exp_limit = (MAX_EXP -+ + 4 * (intmax_t) lead_zero -+ + 3); -+ } -+ } -+ } - else -- exp_limit = (exp_negative ? -- -MIN_10_EXP + MANT_DIG + int_no : -- MAX_10_EXP - int_no + lead_zero + 1); -+ { -+ if (exp_negative) -+ { -+ assert (int_no -+ <= (uintmax_t) (INTMAX_MAX + MIN_10_EXP - MANT_DIG)); -+ exp_limit = -MIN_10_EXP + MANT_DIG + (intmax_t) int_no; -+ } -+ else -+ { -+ if (int_no) -+ { -+ assert (lead_zero == 0 -+ && int_no <= (uintmax_t) INTMAX_MAX); -+ exp_limit = MAX_10_EXP - (intmax_t) int_no + 1; -+ } -+ else if (lead_zero == (size_t) -1) -+ { -+ /* The number is zero and this limit is -+ arbitrary. */ -+ exp_limit = MAX_10_EXP + 1; -+ } -+ else -+ { -+ assert (lead_zero -+ <= (uintmax_t) (INTMAX_MAX - MAX_10_EXP - 1)); -+ exp_limit = MAX_10_EXP + (intmax_t) lead_zero + 1; -+ } -+ } -+ } -+ -+ if (exp_limit < 0) -+ exp_limit = 0; - - do - { -- exponent *= 10; -- exponent += c - L_('0'); -- -- if (__builtin_expect (exponent > exp_limit, 0)) -+ if (__builtin_expect ((exponent > exp_limit / 10 -+ || (exponent == exp_limit / 10 -+ && c - L_('0') > exp_limit % 10)), 0)) - /* The exponent is too large/small to represent a valid - number. */ - { -@@ -843,7 +908,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc) - /* We have to take care for special situation: a joker - might have written "0.0e100000" which is in fact - zero. */ -- if (lead_zero == -1) -+ if (lead_zero == (size_t) -1) - result = negative ? -0.0 : 0.0; - else - { -@@ -862,6 +927,9 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc) - /* NOTREACHED */ - } - -+ exponent *= 10; -+ exponent += c - L_('0'); -+ - c = *++cp; - } - while (c >= L_('0') && c <= L_('9')); -@@ -930,7 +998,14 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc) - } - #endif - startp += lead_zero + decimal_len; -- exponent -= base == 16 ? 4 * lead_zero : lead_zero; -+ assert (lead_zero <= (base == 16 -+ ? (uintmax_t) INTMAX_MAX / 4 -+ : (uintmax_t) INTMAX_MAX)); -+ assert (lead_zero <= (base == 16 -+ ? ((uintmax_t) exponent -+ - (uintmax_t) INTMAX_MIN) / 4 -+ : ((uintmax_t) exponent - (uintmax_t) INTMAX_MIN))); -+ exponent -= base == 16 ? 4 * (intmax_t) lead_zero : (intmax_t) lead_zero; - dig_no -= lead_zero; - } - -@@ -972,7 +1047,10 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc) - } - - /* Adjust the exponent for the bits we are shifting in. */ -- exponent += bits - 1 + (int_no - 1) * 4; -+ assert (int_no <= (uintmax_t) (exponent < 0 -+ ? (INTMAX_MAX - bits + 1) / 4 -+ : (INTMAX_MAX - exponent - bits + 1) / 4)); -+ exponent += bits - 1 + ((intmax_t) int_no - 1) * 4; - - while (--dig_no > 0 && idx >= 0) - { -@@ -1024,13 +1102,15 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc) - really integer digits or belong to the fractional part; i.e. we normalize - 123e-2 to 1.23. */ - { -- register int incr = (exponent < 0 ? MAX (-int_no, exponent) -- : MIN (dig_no - int_no, exponent)); -+ register intmax_t incr = (exponent < 0 -+ ? MAX (-(intmax_t) int_no, exponent) -+ : MIN ((intmax_t) dig_no - (intmax_t) int_no, -+ exponent)); - int_no += incr; - exponent -= incr; - } - -- if (__builtin_expect (int_no + exponent > MAX_10_EXP + 1, 0)) -+ if (__builtin_expect (exponent > MAX_10_EXP + 1 - (intmax_t) int_no, 0)) - { - __set_errno (ERANGE); - return negative ? -FLOAT_HUGE_VAL : FLOAT_HUGE_VAL; -@@ -1215,7 +1295,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc) - digits we should have enough bits for the result. The remaining - decimal digits give us the information that more bits are following. - This can be used while rounding. (Two added as a safety margin.) */ -- if (dig_no - int_no > (MANT_DIG - bits + 2) / 3 + 2) -+ if ((intmax_t) dig_no > (intmax_t) int_no + (MANT_DIG - bits + 2) / 3 + 2) - { - dig_no = int_no + (MANT_DIG - bits + 2) / 3 + 2; - more_bits = 1; -@@ -1223,7 +1303,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc) - else - more_bits = 0; - -- neg_exp = dig_no - int_no - exponent; -+ neg_exp = (intmax_t) dig_no - (intmax_t) int_no - exponent; - - /* Construct the denominator. */ - densize = 0; -diff --git a/stdlib/tst-strtod-overflow.c b/stdlib/tst-strtod-overflow.c -new file mode 100644 -index 0000000..668d55b ---- /dev/null -+++ b/stdlib/tst-strtod-overflow.c -@@ -0,0 +1,48 @@ -+/* Test for integer/buffer overflow in strtod. -+ Copyright (C) 2012 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 -+ . */ -+ -+#include -+#include -+#include -+ -+#define EXPONENT "e-2147483649" -+#define SIZE 214748364 -+ -+static int -+do_test (void) -+{ -+ char *p = malloc (1 + SIZE + sizeof (EXPONENT)); -+ if (p == NULL) -+ { -+ puts ("malloc failed, cannot test for overflow"); -+ return 0; -+ } -+ p[0] = '1'; -+ memset (p + 1, '0', SIZE); -+ memcpy (p + 1 + SIZE, EXPONENT, sizeof (EXPONENT)); -+ double d = strtod (p, NULL); -+ if (d != 0) -+ { -+ printf ("strtod returned wrong value: %a\n", d); -+ return 1; -+ } -+ return 0; -+} -+ -+#define TEST_FUNCTION do_test () -+#include "../test-skeleton.c" --- -1.7.2.3 - - -From 39086d7f713d8e54f70362d662a161d783ccd5e6 Mon Sep 17 00:00:00 2001 -From: H.J. Lu -Date: Wed, 29 Aug 2012 06:45:37 -0700 -Subject: [PATCH] Use LD_SO to set $ld_so_name/$ld_so_version - -cherry-pick d22e28b070d3d1572d39a463d711c6f223078552 ---- - Makefile | 2 +- - scripts/test-installation.pl | 7 +++++++ - 2 files changed, 8 insertions(+), 1 deletions(-) - -diff --git a/Makefile b/Makefile -index 89588c1..f993c91 100644 ---- a/Makefile -+++ b/Makefile -@@ -111,7 +111,7 @@ install: - ifneq (no,$(PERL)) - ifeq (/usr,$(prefix)) - ifeq (,$(install_root)) -- CC="$(CC)" $(PERL) scripts/test-installation.pl $(common-objpfx) -+ LD_SO=$(ld.so-version) CC="$(CC)" $(PERL) scripts/test-installation.pl $(common-objpfx) - endif - endif - endif -diff --git a/scripts/test-installation.pl b/scripts/test-installation.pl -index 1b22086..0700770 100755 ---- a/scripts/test-installation.pl -+++ b/scripts/test-installation.pl -@@ -25,6 +25,11 @@ if ($ENV{CC}) { - } else { - $CC= "gcc"; - } -+if ($ENV{LD_SO}) { -+ $LD_SO = $ENV{LD_SO}; -+} else { -+ $LD_SO = ""; -+} - - sub usage { - print "Usage: test-installation [soversions.mk]\n"; -@@ -112,6 +117,8 @@ while () { - $link_libs .= " -l$name"; - $versions{$name} = $version; - } -+ } elsif ($LD_SO ne "") { -+ ($ld_so_name, $ld_so_version) = split ('\.so\.', $LD_SO); - } else { - if (/^ld\.so/) { - ($ld_so_name, $ld_so_version)= /=(.*)\.so\.(.*)$/; --- -1.7.2.3 - - -From ec0f78d65ce08fb4158cc31624c4872c0df9b545 Mon Sep 17 00:00:00 2001 -From: H.J. Lu -Date: Mon, 24 Sep 2012 08:58:04 -0700 -Subject: [PATCH] Properly handle fencepost with MALLOC_ALIGN_MASK - -Cherry-pick commit ced6f16ee919d12725840d43d007f1cfd67118df. ---- - malloc/arena.c | 10 +++++++--- - 1 files changed, 7 insertions(+), 3 deletions(-) - -diff --git a/malloc/arena.c b/malloc/arena.c -index 33c4ff3..71a0dee 100644 ---- a/malloc/arena.c -+++ b/malloc/arena.c -@@ -652,15 +652,19 @@ heap_trim(heap_info *heap, size_t pad) - unsigned long pagesz = GLRO(dl_pagesize); - mchunkptr top_chunk = top(ar_ptr), p, bck, fwd; - heap_info *prev_heap; -- long new_size, top_size, extra; -+ long new_size, top_size, extra, prev_size, misalign; - - /* Can this heap go away completely? */ - while(top_chunk == chunk_at_offset(heap, sizeof(*heap))) { - prev_heap = heap->prev; -- p = chunk_at_offset(prev_heap, prev_heap->size - (MINSIZE-2*SIZE_SZ)); -+ prev_size = prev_heap->size - (MINSIZE-2*SIZE_SZ); -+ p = chunk_at_offset(prev_heap, prev_size); -+ /* fencepost must be properly aligned. */ -+ misalign = ((long) p) & MALLOC_ALIGN_MASK; -+ p = chunk_at_offset(prev_heap, prev_size - misalign); - assert(p->size == (0|PREV_INUSE)); /* must be fencepost */ - p = prev_chunk(p); -- new_size = chunksize(p) + (MINSIZE-2*SIZE_SZ); -+ new_size = chunksize(p) + (MINSIZE-2*SIZE_SZ) + misalign; - assert(new_size>0 && new_size<(long)(2*MINSIZE)); - if(!prev_inuse(p)) - new_size += p->prev_size; --- -1.7.2.3 - - -From d22cf229673050abfdb3be5124bd58eb2fc2b965 Mon Sep 17 00:00:00 2001 -From: Joseph Myers -Date: Tue, 25 Sep 2012 19:38:15 +0000 -Subject: [PATCH] Use size_t instead of int for internal variables in glob (bug 14621). - -(cherry picked from commit b87c4b24d97321ef2f2da357f8fcf11f1f61e3dc) ---- - posix/glob.c | 10 +++++----- - 1 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/posix/glob.c b/posix/glob.c -index 68ea205..87d4f1b 100644 ---- a/posix/glob.c -+++ b/posix/glob.c -@@ -217,7 +217,7 @@ static int collated_compare (const void *, const void *) __THROW; - static const char * - next_brace_sub (const char *cp, int flags) - { -- unsigned int depth = 0; -+ size_t depth = 0; - while (*cp != '\0') - if ((flags & GLOB_NOESCAPE) == 0 && *cp == '\\') - { -@@ -960,7 +960,7 @@ glob (pattern, flags, errfunc, pglob) - && S_ISDIR (st.st_mode)) - : (__stat64 (dirname, &st64) == 0 && S_ISDIR (st64.st_mode))))) - { -- int newcount = pglob->gl_pathc + pglob->gl_offs; -+ size_t newcount = pglob->gl_pathc + pglob->gl_offs; - char **new_gl_pathv; - - if (newcount > UINTPTR_MAX - (1 + 1) -@@ -1059,7 +1059,7 @@ glob (pattern, flags, errfunc, pglob) - appending the results to PGLOB. */ - for (i = 0; i < dirs.gl_pathc; ++i) - { -- int old_pathc; -+ size_t old_pathc; - - #ifdef SHELL - { -@@ -1114,7 +1114,7 @@ glob (pattern, flags, errfunc, pglob) - /* No matches. */ - if (flags & GLOB_NOCHECK) - { -- int newcount = pglob->gl_pathc + pglob->gl_offs; -+ size_t newcount = pglob->gl_pathc + pglob->gl_offs; - char **new_gl_pathv; - - if (newcount > UINTPTR_MAX - 2 -@@ -1158,7 +1158,7 @@ glob (pattern, flags, errfunc, pglob) - } - else - { -- int old_pathc = pglob->gl_pathc; -+ size_t old_pathc = pglob->gl_pathc; - int orig_flags = flags; - - if (meta & 2) --- -1.7.2.3 - - -From 2a9afa3d1bd0aacf4df9106342d973e368e315d5 Mon Sep 17 00:00:00 2001 -From: Jeff Law -Date: Fri, 28 Sep 2012 12:48:42 -0600 -Subject: [PATCH] Don't parse %s format argument as multibyte string - -(cherry picked from commit 715a900c9085907fa749589bf738b192b1a2bda5) - -2012-09-28 Andreas Schwab - - [BZ #6530] - * stdio-common/vfprintf.c (process_string_arg): Revert - 2000-07-22 change. - -2011-09-28 Jonathan Nieder - - * stdio-common/Makefile (tst-sprintf-ENV): Set environment - for testcase. - * stdio-common/tst-sprintf.c: Include - (main): Test sprintf's handling of incomplete multibyte - characters. ---- - stdio-common/Makefile | 1 + - stdio-common/tst-sprintf.c | 13 +++++++++++++ - stdio-common/vfprintf.c | 39 +++------------------------------------ - 3 files changed, 17 insertions(+), 36 deletions(-) - -diff --git a/stdio-common/Makefile b/stdio-common/Makefile -index a29924b..42e45dc 100644 ---- a/stdio-common/Makefile -+++ b/stdio-common/Makefile -@@ -116,6 +116,7 @@ CFLAGS-scanf17.c = -I../libio -I../stdlib -I../wcsmbs -I../time -I../string \ - - # We know the test has a format string problem. - CFLAGS-tst-sprintf.c = -Wno-format -+tst-sprintf-ENV = LOCPATH=$(common-objpfx)localedata - tst-sscanf-ENV = LOCPATH=$(common-objpfx)localedata - tst-swprintf-ENV = LOCPATH=$(common-objpfx)localedata - test-vfprintf-ENV = LOCPATH=$(common-objpfx)localedata -diff --git a/stdio-common/tst-sprintf.c b/stdio-common/tst-sprintf.c -index c04fef1..c4e911f 100644 ---- a/stdio-common/tst-sprintf.c -+++ b/stdio-common/tst-sprintf.c -@@ -1,5 +1,6 @@ - #include - #include -+#include - #include - - -@@ -58,5 +59,17 @@ main (void) - result = 1; - } - -+ if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL) -+ { -+ puts ("cannot set locale"); -+ result = 1; -+ } -+ else if (sprintf (buf, "%.8s\n", "Foo: \277") != 7 -+ || strcmp (buf, "Foo: \277\n") != 0) -+ { -+ printf ("sprintf (buf, \"%%.8s\\n\", \"Foo: \\277\") produced '%s' output\n", buf); -+ result = 1; -+ } -+ - return result; - } -diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c -index d569034..17d3f42 100644 ---- a/stdio-common/vfprintf.c -+++ b/stdio-common/vfprintf.c -@@ -1168,42 +1168,9 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap) - else if (!is_long && spec != L_('S')) \ - { \ - if (prec != -1) \ -- { \ -- /* Search for the end of the string, but don't search past \ -- the length (in bytes) specified by the precision. Also \ -- don't use incomplete characters. */ \ -- if (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MB_CUR_MAX) == 1) \ -- len = __strnlen (string, prec); \ -- else \ -- { \ -- /* In case we have a multibyte character set the \ -- situation is more complicated. We must not copy \ -- bytes at the end which form an incomplete character. */\ -- size_t ignore_size = (unsigned) prec > 1024 ? 1024 : prec;\ -- wchar_t ignore[ignore_size]; \ -- const char *str2 = string; \ -- const char *strend = string + prec; \ -- if (strend < string) \ -- strend = (const char *) UINTPTR_MAX; \ -- \ -- mbstate_t ps; \ -- memset (&ps, '\0', sizeof (ps)); \ -- \ -- while (str2 != NULL && str2 < strend) \ -- if (__mbsnrtowcs (ignore, &str2, strend - str2, \ -- ignore_size, &ps) == (size_t) -1) \ -- { \ -- /* Conversion function has set errno. */ \ -- done = -1; \ -- goto all_done; \ -- } \ -- \ -- if (str2 == NULL) \ -- len = strlen (string); \ -- else \ -- len = str2 - string - (ps.__count & 7); \ -- } \ -- } \ -+ /* Search for the end of the string, but don't search past \ -+ the length (in bytes) specified by the precision. */ \ -+ len = __strnlen (string, prec); \ - else \ - len = strlen (string); \ - } \ --- -1.7.2.3 - - -From 59fca14adeaebea87b8171e35ab41bb8e93008bf Mon Sep 17 00:00:00 2001 -From: H.J. Lu -Date: Tue, 2 Oct 2012 05:05:17 -0700 -Subject: [PATCH] Define HAS_FMA with bit_FMA_Usable - -cherry-pick 0569936773c861c791f10bba5e2f4cac5fbb4e78 ---- - sysdeps/x86_64/multiarch/init-arch.c | 3 +++ - sysdeps/x86_64/multiarch/init-arch.h | 9 +++++++-- - 2 files changed, 10 insertions(+), 2 deletions(-) - -diff --git a/sysdeps/x86_64/multiarch/init-arch.c b/sysdeps/x86_64/multiarch/init-arch.c -index fb44dcf..fed5ab8 100644 ---- a/sysdeps/x86_64/multiarch/init-arch.c -+++ b/sysdeps/x86_64/multiarch/init-arch.c -@@ -156,6 +156,9 @@ __init_cpu_features (void) - /* Determine if AVX is usable. */ - if (CPUID_AVX) - __cpu_features.feature[index_AVX_Usable] |= bit_AVX_Usable; -+ /* Determine if FMA is usable. */ -+ if (CPUID_FMA) -+ __cpu_features.feature[index_FMA_Usable] |= bit_FMA_Usable; - /* Determine if FMA4 is usable. */ - if (CPUID_FMA4) - __cpu_features.feature[index_FMA4_Usable] |= bit_FMA4_Usable; -diff --git a/sysdeps/x86_64/multiarch/init-arch.h b/sysdeps/x86_64/multiarch/init-arch.h -index 45e2651..f33f1c8 100644 ---- a/sysdeps/x86_64/multiarch/init-arch.h -+++ b/sysdeps/x86_64/multiarch/init-arch.h -@@ -22,7 +22,8 @@ - #define bit_Fast_Unaligned_Load (1 << 4) - #define bit_Prefer_PMINUB_for_stringop (1 << 5) - #define bit_AVX_Usable (1 << 6) --#define bit_FMA4_Usable (1 << 7) -+#define bit_FMA_Usable (1 << 7) -+#define bit_FMA4_Usable (1 << 8) - - /* CPUID Feature flags. */ - #define bit_SSE2 (1 << 26) -@@ -56,6 +57,7 @@ - # define index_Fast_Unaligned_Load FEATURE_INDEX_1*FEATURE_SIZE - # define index_Prefer_PMINUB_for_stringop FEATURE_INDEX_1*FEATURE_SIZE - # define index_AVX_Usable FEATURE_INDEX_1*FEATURE_SIZE -+# define index_FMA_Usable FEATURE_INDEX_1*FEATURE_SIZE - # define index_FMA4_Usable FEATURE_INDEX_1*FEATURE_SIZE - - #else /* __ASSEMBLER__ */ -@@ -131,6 +133,8 @@ extern const struct cpu_features *__get_cpu_features (void) - HAS_CPUID_FLAG (COMMON_CPUID_INDEX_1, ecx, bit_OSXSAVE) - # define CPUID_AVX \ - HAS_CPUID_FLAG (COMMON_CPUID_INDEX_1, ecx, bit_AVX) -+# define CPUID_FMA \ -+ HAS_CPUID_FLAG (COMMON_CPUID_INDEX_1, ecx, bit_FMA) - # define CPUID_FMA4 \ - HAS_CPUID_FLAG (COMMON_CPUID_INDEX_80000001, ecx, bit_FMA4) - -@@ -140,7 +144,6 @@ extern const struct cpu_features *__get_cpu_features (void) - # define HAS_SSSE3 HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, bit_SSSE3) - # define HAS_SSE4_1 HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, bit_SSE4_1) - # define HAS_SSE4_2 HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, bit_SSE4_2) --# define HAS_FMA HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, bit_FMA) - - # define index_Fast_Rep_String FEATURE_INDEX_1 - # define index_Fast_Copy_Backward FEATURE_INDEX_1 -@@ -148,6 +151,7 @@ extern const struct cpu_features *__get_cpu_features (void) - # define index_Prefer_SSE_for_memop FEATURE_INDEX_1 - # define index_Fast_Unaligned_Load FEATURE_INDEX_1 - # define index_AVX_Usable FEATURE_INDEX_1 -+# define index_FMA_Usable FEATURE_INDEX_1 - # define index_FMA4_Usable FEATURE_INDEX_1 - - # define HAS_ARCH_FEATURE(name) \ -@@ -159,6 +163,7 @@ extern const struct cpu_features *__get_cpu_features (void) - # define HAS_PREFER_SSE_FOR_MEMOP HAS_ARCH_FEATURE (Prefer_SSE_for_memop) - # define HAS_FAST_UNALIGNED_LOAD HAS_ARCH_FEATURE (Fast_Unaligned_Load) - # define HAS_AVX HAS_ARCH_FEATURE (AVX_Usable) -+# define HAS_FMA HAS_ARCH_FEATURE (FMA_Usable) - # define HAS_FMA4 HAS_ARCH_FEATURE (FMA4_Usable) - - #endif /* __ASSEMBLER__ */ --- -1.7.2.3 - - -From fc81079f382590db35d158ae455cadadbbe0bde3 Mon Sep 17 00:00:00 2001 -From: Andreas Schwab -Date: Tue, 1 May 2012 17:10:10 +0200 -Subject: [PATCH] Fix missing _mcount@GLIBC_2.0 on powerpc32 - -(cherry picked from commit 261f485936b283f4327fc1f2fc8fd1705d805c12) ---- - sysdeps/powerpc/powerpc32/Makefile | 3 ++- - sysdeps/powerpc/powerpc32/compat-ppc-mcount.S | 11 +++++++++++ - sysdeps/powerpc/powerpc32/ppc-mcount.S | 6 +++++- - 3 files changed, 18 insertions(+), 2 deletions(-) - create mode 100644 sysdeps/powerpc/powerpc32/compat-ppc-mcount.S - -diff --git a/sysdeps/powerpc/powerpc32/Makefile b/sysdeps/powerpc/powerpc32/Makefile -index aa2d0b9..64f7900 100644 ---- a/sysdeps/powerpc/powerpc32/Makefile -+++ b/sysdeps/powerpc/powerpc32/Makefile -@@ -6,8 +6,9 @@ sysdep-LDFLAGS += -msoft-float - endif - - ifeq ($(subdir),gmon) --sysdep_routines += ppc-mcount -+sysdep_routines += ppc-mcount compat-ppc-mcount - static-only-routines += ppc-mcount -+shared-only-routines += compat-ppc-mcount - endif - - ifeq ($(subdir),misc) -diff --git a/sysdeps/powerpc/powerpc32/compat-ppc-mcount.S b/sysdeps/powerpc/powerpc32/compat-ppc-mcount.S -new file mode 100644 -index 0000000..2a9cb24 ---- /dev/null -+++ b/sysdeps/powerpc/powerpc32/compat-ppc-mcount.S -@@ -0,0 +1,11 @@ -+#include -+ -+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_15) -+ -+ compat_text_section -+# define _mcount __compat_mcount -+# include "ppc-mcount.S" -+# undef _mcount -+ -+compat_symbol (libc, __compat_mcount, _mcount, GLIBC_2_0) -+#endif -diff --git a/sysdeps/powerpc/powerpc32/ppc-mcount.S b/sysdeps/powerpc/powerpc32/ppc-mcount.S -index 9a3c041..911638b 100644 ---- a/sysdeps/powerpc/powerpc32/ppc-mcount.S -+++ b/sysdeps/powerpc/powerpc32/ppc-mcount.S -@@ -1,5 +1,5 @@ - /* PowerPC-specific implementation of profiling support. -- Copyright (C) 1997, 1999, 2005, 2006 Free Software Foundation, Inc. -+ Copyright (C) 1997-2012 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 -@@ -57,7 +57,11 @@ ENTRY(_mcount) - stw r4, 44(r1) - cfi_offset (lr, -4) - stw r5, 8(r1) -+#ifndef SHARED - bl JUMPTARGET(__mcount_internal) -+#else -+ bl __mcount_internal@local -+#endif - /* Restore the registers... */ - lwz r6, 8(r1) - lwz r0, 44(r1) --- -1.7.2.3 - - -From d126b22311ff50e933ac24560a5bee116468d6b3 Mon Sep 17 00:00:00 2001 -From: H.J. Lu -Date: Wed, 14 Nov 2012 15:44:40 -0800 -Subject: [PATCH] Skip audit if l_reloc_result is NULL - -Cherry-pick commit 2e64d2659d3edaebc792ac596a9863f1626e5c25 ---- - elf/Makefile | 6 +++++- - elf/dl-runtime.c | 22 +++++++++++++++++++++- - elf/tst-audit8.c | 1 + - 3 files changed, 27 insertions(+), 2 deletions(-) - create mode 100644 elf/tst-audit8.c - -diff --git a/elf/Makefile b/elf/Makefile -index 0c26ce5..a621a1c 100644 ---- a/elf/Makefile -+++ b/elf/Makefile -@@ -138,7 +138,7 @@ tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \ - tst-dlmodcount tst-dlopenrpath tst-deep1 \ - tst-dlmopen1 tst-dlmopen2 tst-dlmopen3 \ - unload3 unload4 unload5 unload6 unload7 unload8 tst-global1 order2 \ -- tst-audit1 tst-audit2 \ -+ tst-audit1 tst-audit2 tst-audit8 \ - tst-stackguard1 tst-addr1 tst-thrlock \ - tst-unique1 tst-unique2 tst-unique3 tst-unique4 \ - tst-initorder tst-initorder2 tst-relsort1 -@@ -1024,6 +1024,10 @@ $(objpfx)tst-audit7: $(objpfx)tst-auditmod7a.so - $(objpfx)tst-audit7.out: $(objpfx)tst-auditmod7b.so - tst-audit7-ENV = LD_AUDIT=$(objpfx)tst-auditmod7b.so - -+$(objpfx)tst-audit8: $(common-objpfx)math/libm.so -+$(objpfx)tst-audit8.out: $(objpfx)tst-auditmod1.so -+tst-audit8-ENV = LD_AUDIT=$(objpfx)tst-auditmod1.so -+ - $(objpfx)tst-global1: $(libdl) - $(objpfx)tst-global1.out: $(objpfx)testobj6.so $(objpfx)testobj2.so - -diff --git a/elf/dl-runtime.c b/elf/dl-runtime.c -index fdaa364..009d366 100644 ---- a/elf/dl-runtime.c -+++ b/elf/dl-runtime.c -@@ -1,5 +1,5 @@ - /* On-demand PLT fixup for shared objects. -- Copyright (C) 1995-2009, 2010, 2011 Free Software Foundation, Inc. -+ Copyright (C) 1995-2012 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 -@@ -168,6 +168,26 @@ _dl_profile_fixup ( - { - void (*mcount_fct) (ElfW(Addr), ElfW(Addr)) = INTUSE(_dl_mcount); - -+ if (l->l_reloc_result == NULL) -+ { -+ /* BZ #14843: ELF_DYNAMIC_RELOCATE is called before l_reloc_result -+ is allocated. We will get here if ELF_DYNAMIC_RELOCATE calls a -+ resolver function to resolve an IRELATIVE relocation and that -+ resolver calls a function that is not yet resolved (lazy). For -+ example, the resolver in x86-64 libm.so calls __get_cpu_features -+ defined in libc.so. Skip audit and resolve the external function -+ in this case. */ -+ *framesizep = -1; -+ return _dl_fixup ( -+# ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS -+# ifndef ELF_MACHINE_RUNTIME_FIXUP_PARAMS -+# error Please define ELF_MACHINE_RUNTIME_FIXUP_PARAMS. -+# endif -+ ELF_MACHINE_RUNTIME_FIXUP_PARAMS, -+# endif -+ l, reloc_arg); -+ } -+ - /* This is the address in the array where we store the result of previous - relocations. */ - struct reloc_result *reloc_result = &l->l_reloc_result[reloc_index]; -diff --git a/elf/tst-audit8.c b/elf/tst-audit8.c -new file mode 100644 -index 0000000..63656b4 ---- /dev/null -+++ b/elf/tst-audit8.c -@@ -0,0 +1 @@ -+#include "../io/pwd.c" --- -1.7.2.3 - - -From 914950f767030cf62da1672b9a117b59f5c1da6f Mon Sep 17 00:00:00 2001 -From: Thomas Schwinge -Date: Tue, 20 Nov 2012 19:29:23 +0100 -Subject: [PATCH] sysdeps/sh/dl-machine.h: Define ELF_MACHINE_RUNTIME_FIXUP_PARAMS. - -Cherry-pick commit d072f3f7724d85ceaf230806660235f0cf2f9c3b ---- - sysdeps/sh/dl-machine.h | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/sysdeps/sh/dl-machine.h b/sysdeps/sh/dl-machine.h -index 53656af..1bb5d15 100644 ---- a/sysdeps/sh/dl-machine.h -+++ b/sysdeps/sh/dl-machine.h -@@ -1,6 +1,5 @@ - /* Machine-dependent ELF dynamic relocation inline functions. SH version. -- Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2011 -- Free Software Foundation, Inc. -+ Copyright (C) 1999-2012 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 -@@ -116,6 +115,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) - } - - #define ELF_MACHINE_RUNTIME_FIXUP_ARGS int plt_type -+#define ELF_MACHINE_RUNTIME_FIXUP_PARAMS plt_type - - /* Mask identifying addresses reserved for the user program, - where the dynamic linker should not map anything. */ --- -1.7.2.3 - diff --git a/base/glibc/glibc-2.16.0-ldd-rewrite-multilib-1.patch b/base/glibc/glibc-2.16.0-ldd-rewrite-multilib-1.patch deleted file mode 100644 index 05a5d9aa3..000000000 --- a/base/glibc/glibc-2.16.0-ldd-rewrite-multilib-1.patch +++ /dev/null @@ -1,23 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../glibc/glibc-2.16.0-ldd-rewrite-multilib-1.patch -# Copyright (C) 2010 - 2012 The OpenSDE Project -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- - ---- glibc-2.16.0/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed.orig 2012-06-30 21:12:34.000000000 +0200 -+++ glibc-2.16.0/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed 2012-08-05 01:26:04.355022490 +0200 -@@ -1,3 +1,3 @@ - /LD_TRACE_LOADED_OBJECTS=1/a\ - add_env="$add_env LD_LIBRARY_VERSION=\\$verify_out" --s_^\(RTLDLIST=\)\(.*lib\)\(\|64\|x32\)\(/[^/]*\)\(-x86-64\|-x32\)\(\.so\.[0-9.]*\)[ ]*$_\1"\2\4\6 \264\4-x86-64\6 \2x32\4-x32\6"_ -+s_^\(RTLDLIST=\)\(.*lib\)\(\|64\|x32\)\(/[^/]*\)\(-x86-64\|-x32\)\(\.so\.[0-9.]*\)[ ]*$_\1"\232\4\6 \264\4-x86-64\6 \2x32\4-x32\6"_ diff --git a/base/glibc/glibc-2.16.0-res_query_fix-1.patch b/base/glibc/glibc-2.16.0-res_query_fix-1.patch deleted file mode 100644 index f3885b6de..000000000 --- a/base/glibc/glibc-2.16.0-res_query_fix-1.patch +++ /dev/null @@ -1,75 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../glibc/glibc-2.16.0-res_query_fix-1.patch -# Copyright (C) 2012 The OpenSDE Project -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- - -Submitted By: Bruce Dubbs -Date: 2012-08-27 -Initial Package Version: 2.16.0 -Upstream Status: Not yet applied, but in other distros. -Origin: http://sourceware.org/bugzilla/attachment.cgi?id=5855 -Description: Fixes a problem with name resolution with errors - from some name servers. - ---- a/resolv/res_query.c -+++ a/resolv/res_query.c -@@ -122,6 +122,7 @@ __libc_res_nquery(res_state statp, - int *resplen2) - { - HEADER *hp = (HEADER *) answer; -+ HEADER *hp2; - int n, use_malloc = 0; - u_int oflags = statp->_flags; - -@@ -239,26 +240,25 @@ __libc_res_nquery(res_state statp, - /* __libc_res_nsend might have reallocated the buffer. */ - hp = (HEADER *) *answerp; - -- /* We simplify the following tests by assigning HP to HP2. It -- is easy to verify that this is the same as ignoring all -- tests of HP2. */ -- HEADER *hp2 = answerp2 ? (HEADER *) *answerp2 : hp; -- -- if (n < (int) sizeof (HEADER) && answerp2 != NULL -- && *resplen2 > (int) sizeof (HEADER)) -+ /* We simplify the following tests by assigning HP to HP2 or -+ vice versa. It is easy to verify that this is the same as -+ ignoring all tests of HP or HP2. */ -+ if (answerp2 == NULL || *resplen2 < (int) sizeof (HEADER)) - { -- /* Special case of partial answer. */ -- assert (hp != hp2); -- hp = hp2; -+ hp2 = hp; - } -- else if (answerp2 != NULL && *resplen2 < (int) sizeof (HEADER) -- && n > (int) sizeof (HEADER)) -+ else - { -- /* Special case of partial answer. */ -- assert (hp != hp2); -- hp2 = hp; -+ hp2 = (HEADER *) *answerp2; -+ if (n < (int) sizeof (HEADER)) -+ { -+ hp = hp2; -+ } - } - -+ /* Make sure both hp and hp2 are defined */ -+ assert((hp != NULL) && (hp2 != NULL)); -+ - if ((hp->rcode != NOERROR || ntohs(hp->ancount) == 0) - && (hp2->rcode != NOERROR || ntohs(hp2->ancount) == 0)) { - #ifdef DEBUG diff --git a/base/glibc/glibc-2.23-fhs-1.patch b/base/glibc/glibc-2.23-fhs-1.patch new file mode 100644 index 000000000..5aaa398b6 --- /dev/null +++ b/base/glibc/glibc-2.23-fhs-1.patch @@ -0,0 +1,88 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../glibc/glibc-2.23-fhs-1.patch +# Copyright (C) 2016 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + +Submitted By: Armin K. +Date: 2013-02-11 +Initial Package Version: 2.17 +Upstream Status: Not Applicable +Origin: Self +Description: This patch removes references to /var/db directory which is not part + of FHS and replaces them with more suitable directories in /var + hierarchy - /var/cache/nscd for nscd and /var/lib/nss_db for nss_db. + +--- a/Makeconfig 2012-12-25 04:02:13.000000000 +0100 ++++ b/Makeconfig 2013-02-11 01:32:32.500667439 +0100 +@@ -250,7 +250,7 @@ + + # Directory for the database files and Makefile for nss_db. + ifndef vardbdir +-vardbdir = $(localstatedir)/db ++vardbdir = $(localstatedir)/lib/nss_db + endif + inst_vardbdir = $(install_root)$(vardbdir) + +--- a/nscd/nscd.h 2012-12-25 04:02:13.000000000 +0100 ++++ b/nscd/nscd.h 2013-02-11 01:32:32.500667439 +0100 +@@ -112,11 +112,11 @@ + + + /* Paths of the file for the persistent storage. */ +-#define _PATH_NSCD_PASSWD_DB "/var/db/nscd/passwd" +-#define _PATH_NSCD_GROUP_DB "/var/db/nscd/group" +-#define _PATH_NSCD_HOSTS_DB "/var/db/nscd/hosts" +-#define _PATH_NSCD_SERVICES_DB "/var/db/nscd/services" +-#define _PATH_NSCD_NETGROUP_DB "/var/db/nscd/netgroup" ++#define _PATH_NSCD_PASSWD_DB "/var/cache/nscd/passwd" ++#define _PATH_NSCD_GROUP_DB "/var/cache/nscd/group" ++#define _PATH_NSCD_HOSTS_DB "/var/cache/nscd/hosts" ++#define _PATH_NSCD_SERVICES_DB "/var/cache/nscd/services" ++#define _PATH_NSCD_NETGROUP_DB "/var/cache/nscd/netgroup" + + /* Path used when not using persistent storage. */ + #define _PATH_NSCD_XYZ_DB_TMP "/var/run/nscd/dbXXXXXX" +--- a/nss/db-Makefile 2012-12-25 04:02:13.000000000 +0100 ++++ b/nss/db-Makefile 2013-02-11 01:32:32.500667439 +0100 +@@ -22,7 +22,7 @@ + /etc/rpc /etc/services /etc/shadow /etc/gshadow \ + /etc/netgroup) + +-VAR_DB = /var/db ++VAR_DB = /var/lib/nss_db + + AWK = awk + MAKEDB = makedb --quiet +--- a/sysdeps/generic/paths.h 2012-12-25 04:02:13.000000000 +0100 ++++ b/sysdeps/generic/paths.h 2013-02-11 01:32:32.500667439 +0100 +@@ -68,7 +68,7 @@ + /* Provide trailing slash, since mostly used for building pathnames. */ + #define _PATH_DEV "/dev/" + #define _PATH_TMP "/tmp/" +-#define _PATH_VARDB "/var/db/" ++#define _PATH_VARDB "/var/lib/nss_db/" + #define _PATH_VARRUN "/var/run/" + #define _PATH_VARTMP "/var/tmp/" + +--- a/sysdeps/unix/sysv/linux/paths.h 2012-12-25 04:02:13.000000000 +0100 ++++ b/sysdeps/unix/sysv/linux/paths.h 2013-02-11 01:32:32.504000831 +0100 +@@ -68,7 +68,7 @@ + /* Provide trailing slash, since mostly used for building pathnames. */ + #define _PATH_DEV "/dev/" + #define _PATH_TMP "/tmp/" +-#define _PATH_VARDB "/var/db/" ++#define _PATH_VARDB "/var/lib/nss_db/" + #define _PATH_VARRUN "/var/run/" + #define _PATH_VARTMP "/var/tmp/" + diff --git a/base/glibc/glibc-avoid-libgcc_eh-and-libgcc_s.patch b/base/glibc/glibc-avoid-libgcc_eh-and-libgcc_s.patch deleted file mode 100644 index aa1c4737b..000000000 --- a/base/glibc/glibc-avoid-libgcc_eh-and-libgcc_s.patch +++ /dev/null @@ -1,359 +0,0 @@ -From 95f5a9a866695da4e038aa4e6ccbbfd5d9cf63b7 Mon Sep 17 00:00:00 2001 -From: Joseph Myers -Date: Tue, 3 Jul 2012 19:14:59 +0000 -Subject: [PATCH] Avoid use of libgcc_s and libgcc_eh when building glibc. - ---- - ChangeLog | 47 ++++++++++++++++++++++++++++++ - Makeconfig | 68 ++++++++++++++++++++++++++++++++++++++------ - Rules | 45 ++++++++++++++++++++++------- - elf/Makefile | 6 +++- - elf/static-stubs.c | 46 +++++++++++++++++++++++++++++ - ports/ChangeLog.arm | 7 ++++ - ports/sysdeps/arm/Makefile | 8 +++++ - 7 files changed, 206 insertions(+), 21 deletions(-) - create mode 100644 elf/static-stubs.c - -diff --git a/Makeconfig b/Makeconfig -index 417fa50..859b588 100644 ---- a/Makeconfig -+++ b/Makeconfig -@@ -415,9 +415,9 @@ LDFLAGS.so += $(hashstyle-LDFLAGS) - LDFLAGS-rtld += $(hashstyle-LDFLAGS) - endif - --# Command for linking programs with the C library. -+# Commands for linking programs with the C library. - ifndef +link --+link = $(CC) -nostdlib -nostartfiles -o $@ \ -++link-before-libc = $(CC) -nostdlib -nostartfiles -o $@ \ - $(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \ - $(combreloc-LDFLAGS) $(relro-LDFLAGS) $(hashstyle-LDFLAGS) \ - $(addprefix $(csu-objpfx),$(start-installed-name)) \ -@@ -426,7 +426,10 @@ ifndef +link - $(start-installed-name))\ - $(+preinit) $(link-extra-libs) \ - $(common-objpfx)libc% $(+postinit),$^) \ -- $(link-extra-libs) $(link-libc) $(+postctor) $(+postinit) -+ $(link-extra-libs) -++link-after-libc = $(+postctor) $(+postinit) -++link = $(+link-before-libc) $(link-libc) $(+link-after-libc) -++link-tests = $(+link-before-libc) $(link-libc-tests) $(+link-after-libc) - endif - # Command for linking PIE programs with the C library. - ifndef +link-pie -@@ -443,7 +446,7 @@ ifndef +link-pie - endif - # Command for statically linking programs with the C library. - ifndef +link-static --+link-static = $(CC) -nostdlib -nostartfiles -static -o $@ \ -++link-static-before-libc = $(CC) -nostdlib -nostartfiles -static -o $@ \ - $(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \ - $(addprefix $(csu-objpfx),$(static-start-installed-name)) \ - $(+preinit) $(+prector) \ -@@ -451,7 +454,12 @@ ifndef +link-static - $(start-installed-name))\ - $(+preinit) $(link-extra-libs-static) \ - $(common-objpfx)libc% $(+postinit),$^) \ -- $(link-extra-libs-static) $(link-libc-static) $(+postctor) $(+postinit) -+ $(link-extra-libs-static) $(link-libc-static) -++link-static-after-libc = $(+postctor) $(+postinit) -++link-static = $(+link-static-before-libc) $(link-libc-static) \ -+ $(+link-static-after-libc) -++link-static-tests = $(+link-static-before-libc) $(link-libc-static-tests) \ -+ $(+link-static-after-libc) - endif - # Command for statically linking bounded-pointer programs with the C library. - ifndef +link-bounded -@@ -475,10 +483,12 @@ ifeq (yes,$(build-shared)) - # We need the versioned name of libc.so in the deps of $(others) et al - # so that the symlink to libc.so is created before anything tries to - # run the linked programs. --link-libc = -Wl,-rpath-link=$(rpath-link) \ -+link-libc-before-gnulib = -Wl,-rpath-link=$(rpath-link) \ - $(common-objpfx)libc.so$(libc.so-version) \ - $(common-objpfx)$(patsubst %,$(libtype.oS),c) \ -- $(as-needed) $(common-objpfx)elf/ld.so $(no-as-needed) $(gnulib) -+ $(as-needed) $(common-objpfx)elf/ld.so $(no-as-needed) -+link-libc = $(link-libc-before-gnulib) $(gnulib) -+link-libc-tests = $(link-libc-before-gnulib) $(gnulib-tests) - # This is how to find at build-time things that will be installed there. - rpath-dirs = math elf dlfcn nss nis rt resolv crypt - rpath-link = \ -@@ -488,6 +498,7 @@ else - nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss) - resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv) - link-libc = $(common-objpfx)libc.a $(otherlibs) $(gnulib) $(common-objpfx)libc.a $(gnulib) -+link-libc-tests = $(common-objpfx)libc.a $(otherlibs) $(gnulib-tests) $(common-objpfx)libc.a $(gnulib-tests) - endif - endif - -@@ -513,8 +524,43 @@ endif - - # The static libraries. - link-libc-static = -Wl,--start-group $(common-objpfx)libc.a $(static-gnulib) -Wl,--end-group -+link-libc-static-tests = -Wl,--start-group $(common-objpfx)libc.a $(static-gnulib-tests) -Wl,--end-group - link-libc-bounded = $(common-objpfx)libc_b.a $(gnulib) $(common-objpfx)libc_b.a - -+# How to link against libgcc. Some libgcc functions, such as those -+# for "long long" arithmetic or software floating point, can always be -+# built without use of C library headers and do not have any global -+# state so can safely be linked statically into any executable or -+# shared library requiring them; these functions are in libgcc.a. -+# Other functions, relating to exception handling, may require C -+# library headers to build and it may not be safe to have more than -+# one copy of them in a process; these functions are only in -+# libgcc_s.so and libgcc_eh.a. -+# -+# To avoid circular dependencies when bootstrapping, it is desirable -+# to avoid use of libgcc_s and libgcc_eh in building glibc. Where any -+# glibc functionality (in particular, thread cancellation) requires -+# exception handling, this is implemented through dlopen of libgcc_s -+# to avoid unnecessary dependencies on libgcc_s by programs not using -+# that functionality; executables built with glibc do not use -+# exception handling other than through thread cancellation. -+# -+# Undefined references to functions from libgcc_eh or libgcc_s may -+# arise for code built with -fexceptions. In the case of statically -+# linked programs installed by glibc, unwinding will never actually -+# occur at runtime and the use of elf/static-stubs.c to resolve these -+# references is safe. In the case of statically linked test programs -+# and test programs built with -fexceptions, unwinding may occur in -+# some cases and it is preferable to link with libgcc_eh or libgcc_s -+# so that the testing is as similar as possible to how programs will -+# be built with the installed glibc. -+# -+# Some architectures have architecture-specific systems for exception -+# handling that may involve undefined references to -+# architecture-specific functions. On those architectures, -+# gnulib-arch and static-gnulib-arch may be defined in sysdeps -+# makefiles to use additional libraries for linking executables and -+# shared libraries built by glibc. - ifndef gnulib - ifneq ($(have-cc-with-libunwind),yes) - libunwind = -@@ -522,8 +568,12 @@ else - libunwind = -lunwind - endif - libgcc_eh := -Wl,--as-needed -lgcc_s $(libunwind) -Wl,--no-as-needed --gnulib := -lgcc $(libgcc_eh) --static-gnulib := -lgcc -lgcc_eh $(libunwind) -+gnulib-arch = -+gnulib = -lgcc $(gnulib-arch) -+gnulib-tests := -lgcc $(libgcc_eh) -+static-gnulib-arch = -+static-gnulib = -lgcc $(static-gnulib-arch) -+static-gnulib-tests := -lgcc -lgcc_eh $(libunwind) - libc.so-gnulib := -lgcc - endif - +preinit = $(addprefix $(csu-objpfx),crti.o) -diff --git a/Rules b/Rules -index 3c61a29..17d938e 100644 ---- a/Rules -+++ b/Rules -@@ -1,5 +1,4 @@ --# Copyright (C) 1991-2000,2002,2003,2004,2005,2006,2011 --# Free Software Foundation, Inc. -+# Copyright (C) 1991-2012 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 -@@ -103,29 +102,46 @@ xtests: tests $(xtests:%=$(objpfx)%.out) $(xtests-bp.out) - endif - - ifeq ($(build-programs),yes) --binaries-all = $(others) $(sysdep-others) $(tests) $(xtests) $(test-srcs) --binaries-static = $(others-static) $(tests-static) $(xtests-static) -+binaries-all-notests = $(others) $(sysdep-others) -+binaries-all-tests = $(tests) $(xtests) $(test-srcs) -+binaries-all = $(binaries-all-notests) $(binaries-all-tests) -+binaries-static-notests = $(others-static) -+binaries-static-tests = $(tests-static) $(xtests-static) -+binaries-static = $(binaries-static-notests) $(binaries-static-tests) - ifeq (yesyes,$(have-fpie)$(build-shared)) - binaries-pie = $(others-pie) $(tests-pie) $(xtests-pie) - else - binaries-pie = - endif - else --binaries-all = $(tests) $(xtests) $(test-srcs) -+binaries-all-notests = -+binaries-all-tests = $(tests) $(xtests) $(test-srcs) -+binaries-all = $(binaries-all-tests) -+binaries-static-notests = -+binaries-static-tests = - binaries-static = - binaries-pie = - endif - --binaries-shared = $(filter-out $(binaries-pie) $(binaries-static), \ -- $(binaries-all)) -+binaries-shared-tests = $(filter-out $(binaries-pie) $(binaries-static), \ -+ $(binaries-all-tests)) -+binaries-shared-notests = $(filter-out $(binaries-pie) $(binaries-static), \ -+ $(binaries-all-notests)) - --ifneq "$(strip $(binaries-shared))" "" --$(addprefix $(objpfx),$(binaries-shared)): %: %.o \ -+ifneq "$(strip $(binaries-shared-notests))" "" -+$(addprefix $(objpfx),$(binaries-shared-notests)): %: %.o \ - $(sort $(filter $(common-objpfx)lib%,$(link-libc))) \ - $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit) - $(+link) - endif - -+ifneq "$(strip $(binaries-shared-tests))" "" -+$(addprefix $(objpfx),$(binaries-shared-tests)): %: %.o \ -+ $(sort $(filter $(common-objpfx)lib%,$(link-libc))) \ -+ $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit) -+ $(+link-tests) -+endif -+ - ifneq "$(strip $(binaries-pie))" "" - $(addprefix $(objpfx),$(binaries-pie)): %: %.o \ - $(sort $(filter $(common-objpfx)lib%,$(link-libc))) \ -@@ -133,13 +149,20 @@ $(addprefix $(objpfx),$(binaries-pie)): %: %.o \ - $(+link-pie) - endif - --ifneq "$(strip $(binaries-static))" "" --$(addprefix $(objpfx),$(binaries-static)): %: %.o \ -+ifneq "$(strip $(binaries-static-notests))" "" -+$(addprefix $(objpfx),$(binaries-static-notests)): %: %.o \ - $(sort $(filter $(common-objpfx)lib%,$(link-libc-static))) \ - $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit) - $(+link-static) - endif - -+ifneq "$(strip $(binaries-static-tests))" "" -+$(addprefix $(objpfx),$(binaries-static-tests)): %: %.o \ -+ $(sort $(filter $(common-objpfx)lib%,$(link-libc-static-tests))) \ -+ $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit) -+ $(+link-static-tests) -+endif -+ - ifeq ($(build-bounded),yes) - binaries-bounded = $(addsuffix -bp,$(tests) $(xtests) $(test-srcs)) - $(addprefix $(objpfx),$(binaries-bounded)): %-bp: %.ob \ -diff --git a/elf/Makefile b/elf/Makefile -index 0c26ce5..9054199 100644 ---- a/elf/Makefile -+++ b/elf/Makefile -@@ -71,6 +71,8 @@ others = sprof sln pldd - install-bin = sprof pldd - others-static = sln - install-rootsbin = sln -+sln-modules := static-stubs -+extra-objs += $(sln-modules:=.o) - - ifeq (yes,$(use-ldconfig)) - ifeq (yes,$(build-shared)) -@@ -78,7 +80,7 @@ others-static += ldconfig - others += ldconfig - install-rootsbin += ldconfig - --ldconfig-modules := cache readlib xmalloc xstrdup chroot_canon -+ldconfig-modules := cache readlib xmalloc xstrdup chroot_canon static-stubs - extra-objs += $(ldconfig-modules:=.o) - endif - endif -@@ -411,6 +413,8 @@ $(objpfx)ldd: ldd.bash.in $(common-objpfx)soversions.mk \ - - $(objpfx)sprof: $(libdl) - -+$(objpfx)sln: $(sln-modules:%=$(objpfx)%.o) -+ - $(objpfx)ldconfig: $(ldconfig-modules:%=$(objpfx)%.o) - - $(objpfx)pldd: $(pldd-modules:%=$(objpfx)%.o) -diff --git a/elf/static-stubs.c b/elf/static-stubs.c -new file mode 100644 -index 0000000..6c5eebc ---- /dev/null -+++ b/elf/static-stubs.c -@@ -0,0 +1,46 @@ -+/* Stub implementations of functions to link into statically linked -+ programs without needing libgcc_eh. -+ Copyright (C) 2012 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 -+ . */ -+ -+/* Avoid backtrace (and so _Unwind_Backtrace) dependencies from -+ sysdeps/unix/sysv/linux/libc_fatal.c. */ -+#include -+ -+#include -+#include -+ -+/* These programs do not use thread cancellation, so _Unwind_Resume -+ and the personality routine are never actually called. */ -+ -+void -+_Unwind_Resume (struct _Unwind_Exception *exc __attribute__ ((unused))) -+{ -+ abort (); -+} -+ -+_Unwind_Reason_Code -+__gcc_personality_v0 (int version __attribute__ ((unused)), -+ _Unwind_Action actions __attribute__ ((unused)), -+ _Unwind_Exception_Class exception_class -+ __attribute__ ((unused)), -+ struct _Unwind_Exception *ue_header -+ __attribute__ ((unused)), -+ struct _Unwind_Context *context __attribute__ ((unused))) -+{ -+ abort (); -+} -diff --git a/ports/ChangeLog.arm b/ports/ChangeLog.arm -index c411e1c..71e8b1b 100644 ---- a/ports/ChangeLog.arm -+++ b/ports/ChangeLog.arm -@@ -1,3 +1,10 @@ -+2012-07-03 Joseph Myers -+ -+ * sysdeps/arm/Makefile (gnulib-arch): New variable. -+ (static-gnulib-arch): Likewise. -+ [subdir = elf] ($(objpfx)libgcc-stubs.a): New rule. -+ [subdir = elf] (lib-noranlib): Depend on $(objpfx)libgcc-stubs.a. -+ - 2012-06-12 Joseph Myers - - * sysdeps/unix/sysv/linux/arm/setcontext.S (__startcontext): Use -diff --git a/ports/sysdeps/arm/Makefile b/ports/sysdeps/arm/Makefile -index 5fd5136..3bdb6b3 100644 ---- a/ports/sysdeps/arm/Makefile -+++ b/ports/sysdeps/arm/Makefile -@@ -1,8 +1,16 @@ -+gnulib-arch = $(elfobjdir)/libgcc-stubs.a -+static-gnulib-arch = $(elfobjdir)/libgcc-stubs.a -+ - ifeq ($(subdir),elf) - sysdep-dl-routines += tlsdesc dl-tlsdesc - sysdep_routines += aeabi_unwind_cpp_pr1 find_exidx tlsdesc dl-tlsdesc - sysdep-rtld-routines += aeabi_unwind_cpp_pr1 tlsdesc dl-tlsdesc - shared-only-routines += aeabi_unwind_cpp_pr1 -+ -+$(objpfx)libgcc-stubs.a: $(objpfx)aeabi_unwind_cpp_pr1.os -+ $(build-extra-lib) -+ -+lib-noranlib: $(objpfx)libgcc-stubs.a - endif - - ifeq ($(subdir),csu) --- -1.7.3.4 - diff --git a/base/glibc/glibc.conf b/base/glibc/glibc.conf index 0f4f9cef1..2ed568777 100644 --- a/base/glibc/glibc.conf +++ b/base/glibc/glibc.conf @@ -2,7 +2,7 @@ # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: package/.../glibc/glibc.conf -# Copyright (C) 2006 - 2012 The OpenSDE Project +# Copyright (C) 2006 - 2016 The OpenSDE Project # Copyright (C) 2004 - 2006 The T2 SDE Project # # More information can be found in the files COPYING and README. @@ -34,17 +34,15 @@ else var_append confopt " " "--with-headers=$root/usr/include" fi -# use at least "-O" when build without optimisation for debugging ... -var_insert GCC_WRAPPER_INSERT " " "-O" # glibc does not like -ffast-math var_insert GCC_WRAPPER_REMOVE " " "-ffast-math" -var_append confopt " " "--enable-kernel=2.6.18" +var_append confopt " " "--enable-kernel=2.6.32" # Disable glibc internal debuging but build debuging and profile # code so we can use this glibc to debug other programs. pkg_glibc_preconf(){ - configprefix='CFLAGS="$CFLAGS -g -DNDEBUG=1"' + configprefix='CFLAGS="$CFLAGS -g -DNDEBUG=1 -O2"' configscript="../configure" } hook_add preconf 3 "pkg_glibc_preconf" @@ -65,11 +63,14 @@ if pkginstalled libgd; then fi # --enable-add-ons expects a comma seperated list of add-ons -glibc_addons="ports" +glibc_addons="" + +# enable some generic options +var_append extraconfopt " " "--enable-bind-now" +var_append extraconfopt " " "--enable-stackguard-randomization" +var_append extraconfopt " " "--enable-lock-elision=yes" -# ckeck whether to enable nptl if supported by the architecture if [ $SDECFG_PKG_GLIBC_TLS = 1 ]; then - var_append glibc_addons "," "nptl" var_append extraconfopt " " "--with-tls" var_append extraconfopt " " "--with-__thread" @@ -113,24 +114,10 @@ fi var_append makeopt " " "slibdir=/\$slibdir" var_append makeinstopt " " "slibdir=/\$slibdir install_root=\$root" +var_remove_regex makeopt " " "prefix=.*" +var_remove_regex makeinstopt " " "prefix=.*" glibc_prepatch() { - local tarball= tarname= - local addon= addons="ports" - - ##[ "$SDECFG_PKG_GLIBC_TLS" = 1 ] || var_append addons ' ' 'linuxthreads' - - for addon in $addons; do - tarball=$( match_source_file -p $addon ) - tarname=${tarball##*/}; tarname=${tarname%.tar.*} - - # extract each addon into the definitive folder - mkdir -pv $addon - ln -sv $addon $tarname - tar -v --dereference ${taropt} $tarball - rm $tarname - done - mkdir -p $root$includedir/gnu/ if [ $pkg == glibc ]; then @@ -261,10 +248,6 @@ fi [[ $libdir = *lib64 ]] && slibdir=lib64 || slibdir=lib -#if atstage cross; then -# var_append patchfiles " " $confdir/no_path_in_glibcso.diff -#fi - hook_add prepatch 3 "glibc_prepatch" hook_add postmake 5 "glibc_postmake" diff --git a/base/glibc/glibc.desc b/base/glibc/glibc.desc index 7116777fd..a21694317 100644 --- a/base/glibc/glibc.desc +++ b/base/glibc/glibc.desc @@ -2,7 +2,7 @@ [COPY] This copyright note is auto-generated by ./scripts/Create-CopyPatch. [COPY] [COPY] Filename: package/.../glibc/glibc.desc -[COPY] Copyright (C) 2006 - 2012 The OpenSDE Project +[COPY] Copyright (C) 2006 - 2016 The OpenSDE Project [COPY] Copyright (C) 2004 - 2006 The T2 SDE Project [COPY] Copyright (C) 1998 - 2003 Clifford Wolf [COPY] @@ -33,8 +33,7 @@ [L] GPL [S] Stable -[V] 2.16.0 +[V] 2.23 [P] X 01---5---9 101.600 -[D] 413505592 glibc-2.16.0.tar.bz2 http://ftp.gnu.org/gnu/glibc/ -[D] 2073681237 glibc-ports-2.16.0.tar.bz2 http://ftp.gnu.org/gnu/glibc/ +[D] 337674343 glibc-2.23.tar.gz http://ftp.gnu.org/gnu/glibc/ diff --git a/base/glibc/ldconfig-glob.patch b/base/glibc/ldconfig-glob.patch index ce82ded8e..0ac57b405 100644 --- a/base/glibc/ldconfig-glob.patch +++ b/base/glibc/ldconfig-glob.patch @@ -2,6 +2,7 @@ # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: package/.../glibc/ldconfig-glob.patch +# Copyright (C) 2016 The OpenSDE Project # Copyright (C) 2004 - 2006 The T2 SDE Project # # More information can be found in the files COPYING and README. diff --git a/base/glibc/make-install-lib-all.patch b/base/glibc/make-install-lib-all.patch deleted file mode 100644 index 4128492e5..000000000 --- a/base/glibc/make-install-lib-all.patch +++ /dev/null @@ -1,40 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../glibc/make-install-lib-all.patch -# Copyright (C) 2004 - 2006 The T2 SDE Project -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- -diff -Naur glibc-2.3.4.orig/Makerules glibc-2.3.4/Makerules ---- glibc-2.3.4.orig/Makerules 2004-12-15 20:52:39.000000000 +0200 -+++ glibc-2.3.4/Makerules 2005-02-19 15:16:31.415125176 +0200 -@@ -844,6 +844,13 @@ - installed-libcs := $(foreach o,$(filter-out .os,$(object-suffixes-for-libc)),\ - $(inst_libdir)/$(patsubst %,$(libtype$o),\ - $(libprefix)$(libc-name))) -+ -+install-lib-all: $(inst_slibdir)/libc.so$(libc.so-version) \ -+ $(inst_slibdir)/libc-$(version).so \ -+ $(inst_libdir)/libc.so \ -+ $(inst_libdir)/libc.a \ -+ install-lib -+ - install: $(installed-libcs) - $(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force) - $(make-target-directory) -@@ -867,6 +874,7 @@ - install-lib.so := $(filter %.so,$(install-lib:%_pic.a=%.so)) - install-lib := $(filter-out %.so %_pic.a,$(install-lib)) - -+ - ifeq (yes,$(build-shared)) - # Find which .so's have versions. - versioned := $(strip $(foreach so,$(install-lib.so),\ diff --git a/base/glibc/make_shlib_link.patch b/base/glibc/make_shlib_link.patch deleted file mode 100644 index 81da45737..000000000 --- a/base/glibc/make_shlib_link.patch +++ /dev/null @@ -1,41 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../glibc/make_shlib_link.patch -# Copyright (C) 2004 - 2006 The T2 SDE Project -# Copyright (C) 1998 - 2003 Clifford Wolf -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- - ---- ./Makerules.orig 2002-10-12 11:52:02.000000000 +0200 -+++ ./Makerules 2002-10-12 11:55:26.000000000 +0200 -@@ -820,8 +820,7 @@ - endif - ifndef make-shlib-link - define make-shlib-link --rm -f $@ --$(LN_S) $(&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 3.79* | 3.[89]*) -+ 3.79* | 3.[89]* | 4.*) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - diff --git a/base/glibc/no-binutils-powerpc.patch.cross.disabled b/base/glibc/no-binutils-powerpc.patch.cross.disabled deleted file mode 100644 index 94fdfef85..000000000 --- a/base/glibc/no-binutils-powerpc.patch.cross.disabled +++ /dev/null @@ -1,34 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../glibc/no-binutils-powerpc.patch.cross.disabled -# Copyright (C) 2010 - 2012 The OpenSDE Project -# Copyright (C) 2004 - 2006 The T2 SDE Project -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- - -Of course we have no powerpc as for the initial glibc header -extraction ... - - - Rene Rebe - -diff -ruN glibc-2.11.2-orig/sysdeps/powerpc/configure glibc-2.11.2/sysdeps/powerpc/configure ---- glibc-2.11.2-orig/sysdeps/powerpc/configure 2010-05-19 22:38:20.000000000 +0200 -+++ glibc-2.11.2/sysdeps/powerpc/configure 2010-09-01 20:54:09.720325032 +0200 -@@ -25,7 +25,7 @@ - fi - { $as_echo "$as_me:$LINENO: result: $libc_cv_ppc_machine" >&5 - $as_echo "$libc_cv_ppc_machine" >&6; } --if test $libc_cv_ppc_machine != yes; then -+if false; then - { { $as_echo "$as_me:$LINENO: error: - *** A binutils version which can handle - *** .machine \"altivec\" diff --git a/base/glibc/no_timezone.patch b/base/glibc/no_timezone.patch index 0b9c61f95..ecbc4e953 100644 --- a/base/glibc/no_timezone.patch +++ b/base/glibc/no_timezone.patch @@ -2,7 +2,7 @@ # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: package/.../glibc/no_timezone.patch -# Copyright (C) 2009 The OpenSDE Project +# Copyright (C) 2016 The OpenSDE Project # # More information can be found in the files COPYING and README. # @@ -14,17 +14,18 @@ # version. # --- SDE-COPYRIGHT-NOTE-END --- + zoneinfo from tzdata is prefered because this way is easier to keep the db up to date. ---- glibc-2.10.1/Makeconfig.orig 2009-05-09 23:57:56.000000000 +0200 -+++ glibc-2.10.1/Makeconfig 2009-11-26 22:01:42.000000000 +0100 -@@ -918,7 +918,7 @@ +--- glibc-2.23/Makeconfig.orig 2016-02-25 16:43:20.000000000 +0000 ++++ glibc-2.23/Makeconfig 2016-02-25 16:49:22.522489911 +0000 +@@ -1095,7 +1095,7 @@ stdlib stdio-common libio malloc string wcsmbs time dirent \ grp pwd posix io termios resource misc socket sysvipc gmon \ gnulib iconv iconvdata wctype manual shadow gshadow po argp \ -- crypt nss localedata timezone rt conform debug \ -+ crypt nss localedata rt conform debug \ - $(add-on-subdirs) $(dlfcn) $(binfmt-subdir) +- crypt localedata timezone rt conform debug mathvec \ ++ crypt localedata rt conform debug mathvec \ + $(add-on-subdirs) dlfcn elf ifndef avoid-generated diff --git a/base/glibc/ugly-no-nptl.patch b/base/glibc/ugly-no-nptl.patch deleted file mode 100644 index 7b5cf9ec7..000000000 --- a/base/glibc/ugly-no-nptl.patch +++ /dev/null @@ -1,40 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../glibc/ugly-no-nptl.patch -# Copyright (C) 2004 - 2006 The T2 SDE Project -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- ---- glibc-20050919/nscd/nscd.h.vanilla 2005-11-05 14:47:31.000000000 +0100 -+++ glibc-20050919/nscd/nscd.h 2005-11-05 14:47:17.000000000 +0100 -@@ -25,6 +25,7 @@ - #include - #include - #include -+#include - - /* The declarations for the request and response types are in the file - "nscd-client.h", which should contain everything needed by client ---- glibc-20050919/malloc/memusage.c.vanilla 2005-11-05 13:54:54.000000000 +0100 -+++ glibc-20050919/malloc/memusage.c 2005-11-05 13:56:00.000000000 +0100 -@@ -83,7 +83,12 @@ - static memusage_cntr_t decreasing_mremap; - static memusage_size_t current_heap; - static memusage_size_t peak_use[3]; -+ -+#ifdef HAVE___THREAD - static __thread uintptr_t start_sp; -+#else -+static uintptr_t start_sp; -+#endif - - /* A few macros to make the source more readable. */ - #define peak_heap peak_use[0]