+++ /dev/null
-commit 6e502e19455c6110dd4487d91b7b7d6d8121f9ba
-Author: Ulrich Drepper <drepper@gmail.com>
-Date: Wed Jun 22 08:32:55 2011 -0400
-
- Clean up after kernel sigcontext header mess
-
-diff --git a/sysdeps/unix/sysv/linux/bits/sigcontext.h b/sysdeps/unix/sysv/linux/bits/sigcontext.h
-index 67dcf94..0f5b607 100644
---- a/sysdeps/unix/sysv/linux/bits/sigcontext.h
-+++ b/sysdeps/unix/sysv/linux/bits/sigcontext.h
-@@ -1,4 +1,4 @@
--/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
-+/* Copyright (C) 1996, 1997, 1998, 2011 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
-@@ -26,4 +26,8 @@
- # define sigcontext_struct sigcontext
-
- # include <asm/sigcontext.h>
-+
-+/* The Linux kernel headers redefine NULL wrongly, so cleanup afterwards. */
-+# define __need_NULL
-+# include <stddef.h>
- #endif
-commit 852eb34d5c56bc75bdd82327fcf310d98655f6b0
-Author: Ulrich Drepper <drepper@gmail.com>
-Date: Wed Jun 22 09:50:39 2011 -0400
-
- Rate limit expensive _SC_NPROCESSORS_ONLN computation
-
-diff --git a/sysdeps/unix/sysv/linux/getsysstats.c b/sysdeps/unix/sysv/linux/getsysstats.c
-index af454b6..a13b6e3 100644
---- a/sysdeps/unix/sysv/linux/getsysstats.c
-+++ b/sysdeps/unix/sysv/linux/getsysstats.c
-@@ -1,5 +1,5 @@
- /* Determine various system internal values, Linux version.
-- Copyright (C) 1996-2003,2006,2007,2009,2010 Free Software Foundation, Inc.
-+ Copyright (C) 1996-2003,2006,2007,2009,2010,2011 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
-
-@@ -35,6 +35,16 @@
-
- #include <atomic.h>
- #include <not-cancel.h>
-+#include <kernel-features.h>
-+
-+#ifndef HAVE_CLOCK_GETTIME_VSYSCALL
-+# undef INTERNAL_VSYSCALL
-+# define INTERNAL_VSYSCALL INTERNAL_SYSCALL
-+# undef INLINE_VSYSCALL
-+# define INLINE_VSYSCALL INLINE_SYSCALL
-+#else
-+# include <bits/libc-vdso.h>
-+#endif
-
-
- /* How we can determine the number of available processors depends on
-@@ -128,6 +138,22 @@ next_line (int fd, char *const buffer, char **cp, char **re,
- int
- __get_nprocs ()
- {
-+ static int cached_result;
-+ static time_t timestamp;
-+
-+#ifdef __ASSUME_POSIX_TIMERS
-+ struct timespec ts;
-+ INTERNAL_SYSCALL_DECL (err);
-+ INTERNAL_VSYSCALL (clock_gettime, err, 2, CLOCK_REALTIME, &ts);
-+#else
-+ struct timeval ts;
-+ gettimeofday (&ts, NULL);
-+#endif
-+ time_t prev = timestamp;
-+ atomic_read_barrier ();
-+ if (ts.tv_sec == prev)
-+ return cached_result;
-+
- /* XXX Here will come a test for the new system call. */
-
- const size_t buffer_size = __libc_use_alloca (8192) ? 8192 : 512;
-@@ -169,6 +195,10 @@ __get_nprocs ()
- }
- }
-
-+ cached_result = result;
-+ atomic_write_barrier ();
-+ timestamp = ts.tv_sec;
-+
- return result;
- }
- weak_alias (__get_nprocs, get_nprocs)
-commit 84e2a551a72c79b020694bb327e33b6d71b09b63
-Author: Ulrich Drepper <drepper@gmail.com>
-Date: Wed Jun 22 10:32:07 2011 -0400
-
- Use a /sys/devices/system/cpu/online for _SC_NPROCESSORS_ONLN implementation
-
-diff --git a/sysdeps/unix/sysv/linux/getsysstats.c b/sysdeps/unix/sysv/linux/getsysstats.c
-index a13b6e3..b74774f 100644
---- a/sysdeps/unix/sysv/linux/getsysstats.c
-+++ b/sysdeps/unix/sysv/linux/getsysstats.c
-@@ -161,20 +161,65 @@ __get_nprocs ()
- char *buffer_end = buffer + buffer_size;
- char *cp = buffer_end;
- char *re = buffer_end;
-- int result = 1;
-
- #ifdef O_CLOEXEC
- const int flags = O_RDONLY | O_CLOEXEC;
- #else
- const int flags = O_RDONLY;
- #endif
-+ int fd = open_not_cancel_2 ("/sys/devices/system/cpu/online", flags);
-+ char *l;
-+ int result = 0;
-+ if (fd != -1)
-+ {
-+ l = next_line (fd, buffer, &cp, &re, buffer_end);
-+ if (l != NULL)
-+ do
-+ {
-+ char *endp;
-+ unsigned long int n = strtoul (l, &endp, 10);
-+ if (l == endp)
-+ {
-+ result = 0;
-+ break;
-+ }
-+
-+ unsigned long int m = n;
-+ if (*endp == '-')
-+ {
-+ l = endp + 1;
-+ m = strtoul (l, &endp, 10);
-+ if (l == endp)
-+ {
-+ result = 0;
-+ break;
-+ }
-+ }
-+
-+ result += m - n + 1;
-+
-+ l = endp;
-+ while (l < re && isspace (*l))
-+ ++l;
-+ }
-+ while (l < re);
-+
-+ close_not_cancel_no_status (fd);
-+
-+ if (result > 0)
-+ goto out;
-+ }
-+
-+ cp = buffer_end;
-+ re = buffer_end;
-+ result = 1;
-+
- /* The /proc/stat format is more uniform, use it by default. */
-- int fd = open_not_cancel_2 ("/proc/stat", flags);
-+ fd = open_not_cancel_2 ("/proc/stat", flags);
- if (fd != -1)
- {
- result = 0;
-
-- char *l;
- while ((l = next_line (fd, buffer, &cp, &re, buffer_end)) != NULL)
- /* The current format of /proc/stat has all the cpu* entries
- at the front. We assume here that stays this way. */
-@@ -195,6 +240,7 @@ __get_nprocs ()
- }
- }
-
-+ out:
- cached_result = result;
- atomic_write_barrier ();
- timestamp = ts.tv_sec;
-commit 2d4fa81e11abc464b5b1f6417525285e84ff787c
-Author: Roland McGrath <roland@hack.frob.com>
-Date: Sat Jun 11 03:41:23 2011 -0700
-
- Consolidate shlib.lds references in new variables.
-
-diff --git a/Makerules b/Makerules
-index 6b4b0e1..d3cb4cc 100644
---- a/Makerules
-+++ b/Makerules
-@@ -514,8 +514,11 @@ $(common-objpfx)shlib.lds: $(common-objpfx)config.make $(..)Makerules
- mv -f $@T $@
- common-generated += shlib.lds
-
-+shlib-lds = $(common-objpfx)shlib.lds
-+shlib-lds-flags = -T $(shlib-lds)
-+
- define build-shlib
--$(build-shlib-helper) -o $@ -T $(common-objpfx)shlib.lds \
-+$(build-shlib-helper) -o $@ $(shlib-lds-flags) \
- $(csu-objpfx)abi-note.o $(build-shlib-objlist)
- endef
- else
-@@ -557,11 +560,11 @@ ifeq (yes,$(elf))
- # binutils only position loadable notes into the first page for binaries,
- # not for shared objects
- define build-module
--$(build-module-helper) -o $@ -T $(common-objpfx)shlib.lds \
-+$(build-module-helper) -o $@ $(shlib-lds-flags) \
- $(csu-objpfx)abi-note.o $(build-module-objlist)
- endef
- define build-module-asneeded
--$(build-module-helper) -o $@ -T $(common-objpfx)shlib.lds \
-+$(build-module-helper) -o $@ $(shlib-lds-flags) \
- $(csu-objpfx)abi-note.o \
- -Wl,--as-needed $(build-module-objlist) -Wl,--no-as-needed
- endef
-@@ -618,7 +621,7 @@ $(common-objpfx)libc.so: $(elfobjdir)/soinit.os \
- $(common-objpfx)libc_pic.os \
- $(elfobjdir)/sofini.os \
- $(elfobjdir)/interp.os $(elfobjdir)/ld.so \
-- $(common-objpfx)shlib.lds
-+ $(shlib-lds)
- $(build-shlib)
- ifeq ($(versioning),yes)
- $(common-objpfx)libc.so: $(common-objpfx)libc.map
-@@ -689,7 +692,7 @@ include $(patsubst %,$(..)extra-modules.mk,$(modules-names))
-
- extra-modules-build := $(filter-out $(modules-names-nobuild),$(modules-names))
- $(extra-modules-build:%=$(objpfx)%.so): $(objpfx)%.so: \
-- $(objpfx)%.os $(common-objpfx)shlib.lds \
-+ $(objpfx)%.os $(shlib-lds) \
- $(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a
- $(build-module)
- endif
-diff --git a/iconvdata/extra-module.mk b/iconvdata/extra-module.mk
-index 163074f..43f4e12 100644
---- a/iconvdata/extra-module.mk
-+++ b/iconvdata/extra-module.mk
-@@ -4,7 +4,7 @@ extra-modules-left := $(strip $(filter-out $(mod),$(extra-modules-left)))
- extra-objs := $(extra-objs) $(patsubst %,%.os,$($(mod)-routines))
-
- $(objpfx)$(mod).so: $(addprefix $(objpfx),$(addsuffix .os,$($(mod)-routines)))\
-- $(common-objpfx)shlib.lds
-+ $(shlib-lds)
- $(build-module-asneeded)
-
- # Depend on libc.so so a DT_NEEDED is generated in the shared objects.
-commit f781ef4015504e8a1da649c266584976238aa079
-Author: Roland McGrath <roland@hack.frob.com>
-Date: Sat Jun 11 04:16:49 2011 -0700
-
- Add --with-default-link configure option.
-
-diff --git a/Makerules b/Makerules
-index d3cb4cc..23d9f1c 100644
---- a/Makerules
-+++ b/Makerules
-@@ -479,6 +479,11 @@ endif
- endif
-
- ifeq (yes,$(elf))
-+ifeq (yes,$(use-default-link))
-+# If the linker is good enough, we can let it use its default linker script.
-+shlib-lds =
-+shlib-lds-flags =
-+else
- # binutils only position loadable notes into the first page for binaries,
- # not for shared objects
- $(common-objpfx)shlib.lds: $(common-objpfx)config.make $(..)Makerules
-@@ -516,6 +521,7 @@ common-generated += shlib.lds
-
- shlib-lds = $(common-objpfx)shlib.lds
- shlib-lds-flags = -T $(shlib-lds)
-+endif
-
- define build-shlib
- $(build-shlib-helper) -o $@ $(shlib-lds-flags) \
-diff --git a/config.make.in b/config.make.in
-index 0656b1b..34842bf 100644
---- a/config.make.in
-+++ b/config.make.in
-@@ -69,6 +69,7 @@ have-cc-with-libunwind = @libc_cv_cc_with_libunwind@
- fno-unit-at-a-time = @fno_unit_at_a_time@
- bind-now = @bindnow@
- have-hash-style = @libc_cv_hashstyle@
-+use-default-link = @use_default_link@
-
- static-libgcc = @libc_cv_gcc_static_libgcc@
-
-diff --git a/configure b/configure
-index 20e7340..e8ad775 100755
---- a/configure
-+++ b/configure
-@@ -696,6 +696,7 @@ force_install
- bindnow
- oldest_abi
- enable_check_abi
-+use_default_link
- with_cvs
- with_fp
- ac_ct_CXX
-@@ -770,6 +771,7 @@ with_selinux
- with_xcoff
- with_cvs
- with_headers
-+with_default_link
- enable_sanity_checks
- enable_check_abi
- enable_shared
-@@ -1464,6 +1466,7 @@ Optional Packages:
- --without-cvs if CVS should not be used
- --with-headers=PATH location of system headers to use (for example
- /usr/src/linux/include) [default=compiler default]
-+ --with-default-link do not use explicit linker scripts [default=no]
- --with-tls enable support for TLS
- --without-__thread do not use TLS features even when supporting them
- --with-cpu=CPU select code for CPU variant
-@@ -3581,6 +3584,16 @@ else
- fi
-
-
-+
-+
-+# Check whether --with-default-link was given.
-+if test "${with_default_link+set}" = set; then :
-+ withval=$with_default_link; use_default_link=$withval
-+else
-+ use_default_link=no
-+fi
-+
-+
- # Check whether --enable-sanity-checks was given.
- if test "${enable_sanity_checks+set}" = set; then :
- enableval=$enable_sanity_checks; enable_sanity=$enableval
-diff --git a/configure.in b/configure.in
-index f2b3921..f34aab3 100644
---- a/configure.in
-+++ b/configure.in
-@@ -114,6 +114,14 @@ AC_ARG_WITH([headers],
- [sysheaders=$withval],
- [sysheaders=''])
-
-+AC_SUBST(use_default_link)
-+AC_ARG_WITH([default-link],
-+ AC_HELP_STRING([--with-default-link],
-+ [do not use explicit linker scripts
-+ @<:@default=no@:>@]),
-+ [use_default_link=$withval],
-+ [use_default_link=no])
-+
- AC_ARG_ENABLE([sanity-checks],
- AC_HELP_STRING([--disable-sanity-checks],
- [really do not use threads (should not be used except in special situations) @<:@default=yes@:>@]),
-commit 5c55070081c27168d27145afdf6a92cd56c9abb3
-Author: Roland McGrath <roland@hack.frob.com>
-Date: Sat Jun 11 00:45:12 2011 -0700
-
- Use linker --print-output-format option if available.
-
-diff --git a/Makerules b/Makerules
-index d70a196..a8b575c 100644
---- a/Makerules
-+++ b/Makerules
-@@ -990,10 +990,14 @@ install: $(inst_slibdir)/libc.so$(libc.so-version)
- $(common-objpfx)format.lds: $(..)scripts/output-format.sed \
- $(common-objpfx)config.make \
- $(common-objpfx)config.h $(..)Makerules
-+ifneq (unknown,$(output-format))
-+ echo > $@.new 'OUTPUT_FORMAT($(output-format))'
-+else
- $(LINK.o) -shared $(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS.so) \
- -x c /dev/null -o $@.so -Wl,--verbose -v 2>&1 \
- | sed -n -f $< > $@.new
- rm -f $@.so
-+endif
- mv -f $@.new $@
- common-generated += format.lds
-
-diff --git a/config.make.in b/config.make.in
-index b73b21e..407ebc1 100644
---- a/config.make.in
-+++ b/config.make.in
-@@ -70,6 +70,7 @@ fno-unit-at-a-time = @fno_unit_at_a_time@
- bind-now = @bindnow@
- have-hash-style = @libc_cv_hashstyle@
- use-default-link = @use_default_link@
-+output-format = @libc_cv_output_format@
-
- static-libgcc = @libc_cv_gcc_static_libgcc@
-
-diff --git a/configure b/configure
-index 2568345..55a4b30 100755
---- a/configure
-+++ b/configure
-@@ -647,6 +647,7 @@ libc_cv_have_initfini
- gnu89_inline
- libc_cv_ssp
- fno_unit_at_a_time
-+libc_cv_output_format
- libc_cv_hashstyle
- libc_cv_fpie
- libc_cv_z_execstack
-@@ -6703,6 +6704,24 @@ $as_echo "$libc_cv_hashstyle" >&6; }
-
- fi
-
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker output format" >&5
-+$as_echo_n "checking linker output format... " >&6; }
-+if ${libc_cv_output_format+:} false; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ if libc_cv_output_format=`
-+${CC-cc} -nostartfiles -nostdlib -Wl,--print-output-format 2>&5`
-+then
-+ :
-+else
-+ libc_cv_output_format=
-+fi
-+test -n "$libc_cv_output_format" || libc_cv_output_format=unknown
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_output_format" >&5
-+$as_echo "$libc_cv_output_format" >&6; }
-+
-+
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fno-toplevel-reorder -fno-section-anchors" >&5
- $as_echo_n "checking for -fno-toplevel-reorder -fno-section-anchors... " >&6; }
- if ${libc_cv_fno_toplevel_reorder+:} false; then :
-diff --git a/configure.in b/configure.in
-index 55e5649..a28cd70 100644
---- a/configure.in
-+++ b/configure.in
-@@ -1803,6 +1803,17 @@ EOF
- AC_SUBST(libc_cv_hashstyle)
- fi
-
-+AC_CACHE_CHECK(linker output format, libc_cv_output_format, [dnl
-+if libc_cv_output_format=`
-+${CC-cc} -nostartfiles -nostdlib -Wl,--print-output-format 2>&AS_MESSAGE_LOG_FD`
-+then
-+ :
-+else
-+ libc_cv_output_format=
-+fi
-+test -n "$libc_cv_output_format" || libc_cv_output_format=unknown])
-+AC_SUBST(libc_cv_output_format)
-+
- AC_CACHE_CHECK(for -fno-toplevel-reorder -fno-section-anchors, libc_cv_fno_toplevel_reorder, [dnl
- cat > conftest.c <<EOF
- int foo;