[prev in list] [next in list] [prev in thread] [next in thread] 

List:       meego-commits
Subject:    [meego-commits] 22051: Changes to Trunk/glibc
From:       Ulf Hofemeier <no_reply () build ! meego ! com>
Date:       2011-06-30 23:35:27
Message-ID: 20110630233527.5BFC910A1ED () mail ! meego ! com
[Download RAW message or body]

Hi,
I have made the following changes to glibc in project Trunk. Please review and accept \
ASAP.

Thank You,
Ulf Hofemeier

[This message was auto-generated]

---

Request #22051:

  submit:   Trunk:Testing/glibc(r2) -> Trunk/glibc


Message:
    * Thu Jun 23 2011 Carsten Munk <carsten@maemo.org> - 2.13
- New gcc atomics for ARM breaks some configure tests (gzip, m4)
  when running inside qemu-arm.  Needed to make glibc 2.13 work 
  properly on MeeGo 1.3. 
* Wed Jun 22 2011 Chris Ferron <chris.e.ferron@linux.intel.com> - 2.13  
- removed util-linux-ng as it has been replaced by util-linux  
* Sat Jun 18 2011 Anas Nashif <anas.nashif@intel.com> - 2.13
- Workaround to avoid problems with new debuginfo in upcoming rpm
* Fri May 27 2011 Chris Ferron <chris.e.ferron@linux.intel.com> - 2.13
- removed chkconfig and init for nscd. We should not use nscd or init scripts
* Mon May 23 2011 Junfeng Dong <junfeng.dong@intel.com> - 2.13
- Build the only needed locale archive to reduce the size.
* Wed May 18 2011 Junfeng Dong <junfeng.dong@intel.com> - 2.13
- Remove dependence on basesystem.
* Thu Mar 10 2011 Junfeng Dong <junfeng.dong@intel.com> - 2.13
- Update to 2.13.

State:   new          2011-06-30T16:34:55 ulf
Comment: None



changes files:
--------------
--- glibc.changes
+++ glibc.changes
@@ -0,0 +1,23 @@
+* Thu Jun 23 2011 Carsten Munk <carsten@maemo.org> - 2.13
+- New gcc atomics for ARM breaks some configure tests (gzip, m4)
+  when running inside qemu-arm.  Needed to make glibc 2.13 work 
+  properly on MeeGo 1.3. 
+
+* Wed Jun 22 2011 Chris Ferron <chris.e.ferron@linux.intel.com> - 2.13  
+- removed util-linux-ng as it has been replaced by util-linux  
+
+* Sat Jun 18 2011 Anas Nashif <anas.nashif@intel.com> - 2.13
+- Workaround to avoid problems with new debuginfo in upcoming rpm
+
+* Fri May 27 2011 Chris Ferron <chris.e.ferron@linux.intel.com> - 2.13
+- removed chkconfig and init for nscd. We should not use nscd or init scripts
+
+* Mon May 23 2011 Junfeng Dong <junfeng.dong@intel.com> - 2.13
+- Build the only needed locale archive to reduce the size.
+
+* Wed May 18 2011 Junfeng Dong <junfeng.dong@intel.com> - 2.13
+- Remove dependence on basesystem.
+
+* Thu Mar 10 2011 Junfeng Dong <junfeng.dong@intel.com> - 2.13
+- Update to 2.13.
+
@@ -93,3289 +115,0 @@
-* Wed Jul 16 2008 Jakub Jelinek <jakub@redhat.com> 2.8-8
-- another nscd fix
-- fix unbuffered vfprintf (#455360)
-
-* Tue Jul  8 2008 Jakub Jelinek <jakub@redhat.com> 2.8-7
-- assorted nscd fixes (#450704, #445656, #449358)
-- misc fixes (BZ#3406, BZ#6461, BZ#6472, BZ#6612, BZ#6657, BZ#6723, BZ#6719)
-- fix *scanf in -std=c99 mode
-- add lt translations
-- some SPARC fixes
-- fix regexp.h (#446406)
-- fix powerpc {,l}lround{,f} assembly from clobbering %cr[34]
-  registers (#450790)
-
-* Mon May 26 2008 Tom "spot" Callaway <tcallawa@redhat.com> 2.8-6
-- disable async-unwind-tables for soinit.c and sofini.c
-- re-enable fasynchronous-unwind-tables 
-
-* Sun May 18 2008 Tom "spot" Callaway <tcallawa@redhat.com> 2.8-5
-- fasynchronous-unwind-tables causes failures on sparc arches, dont use it
-
-* Fri May 16 2008 Tom "spot" Callaway <tcallawa@redhat.com> 2.8-4
-- sparc64 gets unhappy unless the -mcpu= flag is in the GCC invocation,
-  not just in BuildFlags. This is probably a compiler issue (-m64 
-  should infer -mcpu=ultrasparc), but to get things building, we'll 
-  work around it like this for now.
-
-* Mon May  5 2008 Jakub Jelinek <jakub@redhat.com> 2.8-3
-- don't run telinit u in %post if both /dev/initctl and
-  /sbin/initctl exist (#444978)
-- workaround GCC ppc64 miscompilation of c{log{,10},acosh,atan}l
-  (#444996)
-
-* Wed Apr 30 2008 Jakub Jelinek <jakub@redhat.com> 2.8-2
-- fix nscd races during GC (BZ#5381)
-- rebuilt with fixed GCC to fix regex miscompilation on power6
-- SPARC fixes
-
-* Sat Apr 12 2008 Jakub Jelinek <jakub@redhat.com> 2.8-1
-- 2.8 release
-
-* Fri Apr 11 2008 Jakub Jelinek <jakub@redhat.com> 2.7.90-16
-- update to trunk
-  - misc fixes (BZ#4997, BZ#5741)
-  - make sure all users of __libc_setlocale_lock know it is
-    now a rwlock
-  - fix ppc/ppc64 compatibility _sys_errlist and _sys_siglist
-    symbols
-
-* Thu Apr 10 2008 Jakub Jelinek <jakub@redhat.com> 2.7.90-15
-- update to trunk
-  - misc fixes (BZ#4314, BZ#4407, BZ#5209, BZ#5436, BZ#5768, BZ#5998,
-		BZ#6024)
-- restart sshd in %post when upstart is used - it doesn't have
-  /dev/initctl (#441763)
-- disable assert checking again
-
-* Tue Apr  8 2008 Jakub Jelinek <jakub@redhat.com> 2.7.90-14
-- update to trunk
-  - misc fixes (BZ#5443, BZ#5475, BZ#5478, BZ#5939, BZ#5979, BZ#5995,
-		BZ#6004, BZ#6007, BZ#6020, BZ#6021, BZ#6042)
-  - change mtrace to keep perl 5.10 quiet (#441082)
-  - don't share conversion state between mbtowc and wctomb (#438687)
-  - if st_blksize is too large and malloc fails, retry with smaller
-    buffer in opendir (#430768)
-  - correct *printf overflow test (#358111)
-
-* Fri Mar 28 2008 Jakub Jelinek <jakub@redhat.com> 2.7.90-13
-- update to trunk
-  - don't define ARG_MAX in <limits.h>, as it is no longer
-    constant - use sysconf (_SC_ARG_MAX) to get the current
-    argument size limit
-  - fix build on sparc64
-- only service sshd condrestart if /etc/rc.d/init.d/sshd exists
-  (#428859)
-
-* Wed Mar 26 2008 Jakub Jelinek <jakub@redhat.com> 2.7.90-12
-- update to trunk
-  - new CLONE_* flags in <sched.h> (#438542)
-  - nis+ errno clobbering fix (#437945)
-  - fix adjtime (#437974)
-
-* Fri Mar 14 2008 Jakub Jelinek <jakub@redhat.com> 2.7.90-11
-- update to trunk
-- remove <stropts.h>, define _XOPEN_STREAMS -1 (#436349)
-
-* Wed Mar  5 2008 Jakub Jelinek <jakub@redhat.com> 2.7.90-8
-- update to trunk
-  - {,v}{as,d}printf and obstack_{,v}printf fortification (#435905)
-  - fix getnameinfo/gethostbyaddr (#428067, BZ#5790)
-  - fix yp_order (#435519, BZ#5854)
-  - misc fixes (BZ#5779, BZ#5736, BZ#5627, BZ#5818, BZ#5012)
-- merge review cleanup (Tom Callaway, #225806)
-
-* Sat Feb 16 2008 Jakub Jelinek <jakub@redhat.com> 2.7.90-7
-- update to trunk
-  - make NI_MAXHOST and NI_MAXSERV available even in BSDish
-    namespaces (BZ#5737)
-  - timerfd_* syscalls
-
-* Fri Feb  1 2008 Jakub Jelinek <jakub@redhat.com> 2.7.90-6
-- fix build
-
-* Thu Jan 31 2008 Jakub Jelinek <jakub@redhat.com> 2.7.90-5
-- update to trunk
-- rebuild with gcc 4.3
-
-* Fri Jan 11 2008 Jakub Jelinek <jakub@redhat.com> 2.7.90-4
-- update to trunk
-  - misc fixes (BZ#5541, BZ#5545, BZ#5553, BZ#5112, BZ#5520)
-  - getaddrinfo fixes
-  - signalize EOVERFLOW from sem_post instead of overflowing
-    the counter
-  - fix i?86 makecontext
-  - fix iconv for iso-2022-jp//translit (#397021)
-
-* Thu Jan  3 2008 Jakub Jelinek <jakub@redhat.com> 2.7.90-3
-- update to trunk
-  - fix recognition of interface family (#425768)
-  - add __THROW to __ctype_{b,tolower,toupper}_loc prototypes
-
-* Thu Dec 27 2007 Jakub Jelinek <jakub@redhat.com> 2.7.90-2
-- update to trunk
-  - nsswitch fix (#425768)
-- temporarily enable assert checking
-
-* Wed Dec 12 2007 Jakub Jelinek <jakub@redhat.com> 2.7.90-1
-- update to trunk
-  - fix __USE_STRING_INLINES on i?86 (#408731, #371711)
-  - fix *scanf (#388751)
-
-* Wed Oct 17 2007 Jakub Jelinek <jakub@redhat.com> 2.7-1
-- glibc 2.7 release
-- fix tzfile.c for times after last transition (#333561)
-- fix sem_post@GLIBC_2.0 on i?86
-- appease valgrind in libpthread.so initialization
-- misc fixes (BZ#3425, BZ#5184, BZ#5186)
-
-* Mon Oct 15 2007 Jakub Jelinek <jakub@redhat.com> 2.6.90-21
-- fix getgr{name,gid}{,_r} with nscd
-
-* Sun Oct 14 2007 Jakub Jelinek <jakub@redhat.com> 2.6.90-20
-- install <bits/error.h> (#330031)
-- disable -D_FORTIFY_SOURCE{,=2} support (with a warning) for
-  GCC 3.4.x and earlier(#327641)
-- pl_PL locale changes (BZ#4098, #242296)
-- misc fixes (BZ#1140, BZ#3195, BZ#3242, BZ#4359)
-
-* Thu Oct 11 2007 Jakub Jelinek <jakub@redhat.com> 2.6.90-19
-- fix <netinet/tcp.h>
-- simple preprocessor in localedef, fix de_DE collation with it
-
-* Wed Oct 10 2007 Jakub Jelinek <jakub@redhat.com> 2.6.90-18
-- add signalfd, eventfd, eventfd_read, eventfd_write
-- qsort speedups
-- workaround for cpuid bugs (#324081)
-- make sure gettext's conversion_lock is initialized even if
-  program isn't linked against libpthread.so.0, only dlopens it (#321761)
-- misc fixes (BZ#5112, BZ#5113, BZ#5104, BZ#5063, BZ#5010, BZ#4407,
-  BZ#3924, BZ#5103, BZ#2633, BZ#181, BZ#73, #321901)
-
-* Wed Oct  3 2007 Jakub Jelinek <jakub@redhat.com> 2.6.90-17
-- fix {,v}swprintf with -D_FORTIFY_SOURCE=1 -mlong-double-64 on ppc*/s390*/sparc*
-- strcoll fixes
-- misc fixes (BZ#645, BZ#5071)
-- locale fixes (BZ#4941, #299321, #203364, #196711, #236212)
-
-* Sat Sep 29 2007 Jakub Jelinek <jakub@redhat.com> 2.6.90-16
-- misc fixes (BZ#4963, BZ#4972, BZ#5028, BZ#5043, BZ#5058)
-- improve -D_FORTIFY_SOURCE{,=2} diagnostic through warning/error
-  attributes
-- fix wcscpy, wcpcpy, fgetws, fgetws_unlocked, swprintf and vswprintf
-  fortification inlines
-- fix a scalability issue with lazy binding in heavily multithreaded
-  programs
-
-* Thu Sep 20 2007 Jakub Jelinek <jakub@redhat.com> 2.6.90-15
-- $5$ (SHA-256) and $6$ (SHA-512) support in crypt
-  (#228697, #249477, #173834)
-
-* Tue Sep 18 2007 Jakub Jelinek <jakub@redhat.com> 2.6.90-14
-- -D_FORTIFY_SOURCE{,=2} support for C++
-- fortification of fread{,_unlocked}
-- support *scanf m allocation modifier (%ms, %mls, %mc, ...)
-- in -std=c99 or -D_XOPEN_SOURCE=600 mode don't recognize
-  %as, %aS and %a[ as a GNU extension for *scanf
-- fix splice, vmsplice, tee return value, make them cancellation
-  points
-- mq_open checking
-- use inline function rather than function-like macro
-  for open{,at}{,64} checking
-- IFA_F_OPTIMISTIC handling in getaddrinfo (#259681)
-- fix an ABBA deadlock in ld.so (#284171)
-- remove sparc{32,64} unwind info from _start and clone
-
-* Mon Aug 27 2007 Jakub Jelinek <jakub@redhat.com> 2.6.90-13
-- fix personality on x86_64/ppc/ppc64 (#256281)
-
-* Sat Aug 25 2007 Jakub Jelinek <jakub@redhat.com> 2.6.90-12
-- readd x86_64 gettimeofday stuff, initialize it earlier
-- nis_list fix (#254115)
-- workaround for bugs in ia64 silly /emul/ia32-linux hack (#253961)
-- misc fixes (BZ#3924, BZ#4566, BZ#4582, BZ#4588, BZ#4726, BZ#4946,
-  BZ#4905, BZ#4814, BZ#4925, BZ#4936, BZ#4896, BZ#4937, BZ#3842,
-  BZ#4554, BZ#4557, BZ#4938)
-
-* Fri Aug 17 2007 Jakub Jelinek <jakub@redhat.com> 2.6.90-11
-- remove __strtold_internal and __wcstold_internal from ppc*/s390*/sparc*
-  *-ldbl.h headers
-- temporarily backout x86_64 gettimeofday.S changes (#252453)
-- some further sparc, sparc64 and alpha fixes
-
-* Wed Aug 15 2007 Jakub Jelinek <jakub@redhat.com> 2.6.90-10
-- don't open /etc/ld.so.{cache,preload} with O_NOATIME (#252146)
-- s390{,x}, alpha and sparc fixes
-- sparcv9 is no longer an aux arch, as we expect
-  to not build sparc.rpm glibc any longer, only sparcv9.rpm,
-  sparc64.rpm and new two aux arches sparcv9v.rpm and sparc64v.rpm
-
-* Tue Aug 14 2007 Jakub Jelinek <jakub@redhat.com> 2.6.90-9
-- private futex even for mutexes and condvars
-- some further O_CLOEXEC changes
-- use vDSO on x86_64 if available
-- ia64 build fixes (#251983)
-
-* Fri Aug 10 2007 Roland McGrath <roland@redhat.com> 2.6.90-8
-- update to trunk
-  - fix missing strtold_l export on ppc64
-
-* Thu Aug  9 2007 Roland McGrath <roland@redhat.com> 2.6.90-6
-- update to trunk
-  - fix local PLT regressions
-- spec file revamp for new find-debuginfo.sh
-
-* Sun Aug  5 2007 Jakub Jelinek <jakub@redhat.com> 2.6.90-4
-- fix librt.so and librtkaio.so on ppc32, so that it is not using
-  bss PLT
-
-* Sat Aug  4 2007 Jakub Jelinek <jakub@redhat.com> 2.6.90-3
-- fix open{,at}{,64} macro for -pedantic (#250897)
-- add transliteration for l with stroke (#250492)
-- fix strtod ("-0", NULL)
-- update License tag
-
-* Wed Aug  1 2007 Jakub Jelinek <jakub@redhat.com> 2.6.90-2
-- make aux-cache purely optional performance optimization in ldconfig,
-  don't issue any errors if it can't be created (#250430)
-- remove override_headers hack, BuildRequire >= 2.6.22 kernel-headers
-  and rely on its content
-
-* Tue Jul 31 2007 Jakub Jelinek <jakub@redhat.com> 2.6.90-1
-- update to trunk
-  - private futex optimizations
-  - open{,at}{,64} argument checking
-- ldconfig speedups
-
-* Sun Jul  8 2007 Jakub Jelinek <jakub@redhat.com> 2.6-4
-- filter <built-in> pseudo-files from debuginfo source lists (#245714)
-- fix sscanf when errno is EINTR before the call (BZ#4745)
-- save/restore errno around reading /etc/default/nss (BZ#4702)
-- fix LD_HWCAP_MASK handling
-- disable workaround for #210748, instead backport
-  ld.so locking fixes from the trunk (#235026)
-- new x86_64 memcpy
-- don't write uninitialized padding bytes to nscd socket
-- fix dl{,v}sym, dl_iterate_phdr and dlopen if some library is
-  mapped into ld.so's inter-segment hole on x86_64 (#245035, #244545)
-- fix LD_AUDIT=a:b program (#180432)
-- don't crash on pseudo-zero long double values passed to
-  *printf on i?86/x86_64/ia64 (BZ#4586)
-- fix *printf %La and strtold with some hexadecimal floating point
-  constants on ppc/ppc64
-- fix nextafterl on ppc/ppc64
-- fix sem_timedwait on i?86 and x86_64
-
-* Thu May 24 2007 Jakub Jelinek <jakub@redhat.com> 2.6-3
-- don't use %%config(missingok) for locale-archive.tmpl,
-  instead of removing it altogether truncate it to zero
-  size (#240697)
-- add a workaround for #210748
-
-* Mon May 21 2007 Jakub Jelinek <jakub@redhat.com> 2.6-2
-- restore malloc_set_state backwards compatibility (#239344)
-- fix epoll_pwait (BZ#4525)
-- fix printf with unknown format spec or positional arguments
-  and large width and/or precision (BZ#4514)
-- robust mutexes fix (BZ#4512)
-
-* Tue May 15 2007 Roland McGrath <roland@redhat.com> 2.6-1
-- glibc 2.6 release
-
-* Fri May 11 2007 Jakub Jelinek <jakub@redhat.com> 2.5.90-24
-- utimensat, futimens and lutimes support
-
-* Thu May 10 2007 Jakub Jelinek <jakub@redhat.com> 2.5.90-23
-- use madvise MADV_DONTNEED in malloc
-- fix ia64 feraiseexcept
-- fix s390{,x} feholdexcept (BZ#3427)
-- ppc fenv fixes
-- make fdatasync a cancellation point (BZ#4465)
-- fix *printf for huge precisions with wide char code and multi-byte
-  strings
-- fix dladdr (#232224, BZ#4131)
-
-* Fri May  4 2007 Jakub Jelinek <jakub@redhat.com> 2.5.90-22
-- add transliteration for <U2044> (BZ#3213)
-- fix *scanf with %f on hexadecimal floats without exponent (BZ#4342)
-- fix *printf with very large precisions for %s (#238406, BZ#4438)
-- fix inet_ntop size checking for AF_INET (BZ#4439)
-- for *printf %e avoid 1.000e-00, for exponent 0 always use + sign (#238431)
-- fix a regression introduced in #223467 changes
-- gethostby*_r alignment fixes (BZ#4381)
-- fix ifaddrs error handling
-
-* Mon Apr 16 2007 Jakub Jelinek <jakub@redhat.com> 2.5.90-21
-- don't include individual locale files in glibc-common,
-  rather include prepared locale-archive template and let
-  build-locale-archive create locale-archive from the template
-  and any user supplied /usr/lib/locale/*_* directories,
-  then unlink the locale-archive template - this should save
-  > 80MB of glibc-common occupied disk space
-- fix _XOPEN_VERSION (BZ#4364)
-- fix printf with %g and values tiny bit smaller than 1.e-4 (#235864,
-  BZ#4362)
-- fix NIS+ __nisfind_server (#235229)
-
-* Sat Mar 31 2007 Jakub Jelinek <jakub@redhat.com> 2.5.90-20
-- assorted NIS+ speedups (#223467)
-- fix HAVE_LIBCAP configure detection (#178934)
-- remove %{_prefix}/sbin/rpcinfo from glibc-common (#228894)
-- nexttoward*/nextafter* fixes (BZ#3306)
-- feholdexcept/feupdateenv fixes (BZ#3427)
-- speed up fnmatch with two or more * in the pattern
-
-* Sat Mar 17 2007 Jakub Jelinek <jakub@redhat.com> 2.5.90-19
-- fix power6 libm compat symbols on ppc32 (#232633)
-- fix child refcntr in NPTL fork (#230198)
-- fix ifaddrs with many net devices on > 4KB page size arches (#230151)
-- fix pthread_mutex_timedlock on x86_64 (#228103)
-- various fixes (BZ#3919, BZ#4101, BZ#4130, BZ#4181, BZ#4069, BZ#3458)
-
-* Wed Feb 21 2007 Jakub Jelinek <jakub@redhat.com> 2.5.90-18
-- fix nftw with FTW_CHDIR on / (BZ#4076)
-- nscd fixes (BZ#4074)
-- fix fmod{,f,l} on i?86 (BZ#3325)
-- support localized digits for fp values in *scanf (BZ#2211)
-- namespaces fixes (BZ#2633)
-- fix euidaccess (BZ#3842)
-- glob fixes (BZ#3996)
-- assorted locale data fixes (BZ#1430, BZ#672, BZ#58, BZ#3156,
-  BZ#2692, BZ#2648, BZ#3363, BZ#3334, BZ#3326, BZ#3322, BZ#3995,
-  BZ#3885, BZ#3884, BZ#3851)
-
-* Sun Feb 11 2007 Jakub Jelinek <jakub@redhat.com> 2.5.90-17
-- RFC2671 support in resolver (#205842)
-- fix strptime (BZ#3944)
-- fix regcomp with REG_NEWLINE (BZ#3957)
-- fix pthread_mutex_timedlock on x86_64 (#228103)
-
-* Fri Feb  2 2007 Jakub Jelinek <jakub@redhat.com> 2.5.90-16
-- add strerror_l
-- fix application crashes when doing NSS lookups through nscd
-  mmapped databases and nscd decides to start garbage collection
-  during the lookups (#219145, #225315)
-- fix %0lld printing of 0LL on 32-bit architectures (BZ#3902)
-- ignore errors from install-info in glibc-devel scriptlets
-  (#223691)
-
-* Wed Jan 17 2007 Jakub Jelinek <jakub@redhat.com> 2.5.90-15
-- fix NIS getservbyname when proto is NULL
-- fix nss_compat +group handling (#220658)
-- cache services in nscd
-- fix double free in fts_close (#222089)
-- fix vfork+execvp memory leak (#221187)
-- soft-fp fixes (BZ#2749)
-- further strtod fixes (BZ#3855)
-- make sure pthread_kill doesn't return EINVAL even if
-  the target thread exits in between pthread_kill ESRCH check
-  and the actual tgkill syscall (#220420)
-- fix ABBA deadlock possibility in ld.so scope locking code
-
-* Tue Dec 19 2006 Jakub Jelinek <jakub@redhat.com> 2.5.90-14
-- fix {j,m}rand48{,_r} on 64-bit arches (BZ#3747)
-- handle power6x AT_PLATFORM (#216970)
-- fix a race condition in getXXbyYY_r (#219145)
-- fix tst-pselect testcase
-
-* Thu Dec 14 2006 Jakub Jelinek <jakub@redhat.com> 2.5.90-13
-- fix setcontext on ppc32 (#219107)
-- fix wide stdio after setvbuf (#217064, BZ#2337)
-- handle relatime mount option in statvfs
-- revert i?86/x86_64 clone CFI temporarily
-
-* Sun Dec 10 2006 Jakub Jelinek <jakub@redhat.com> 2.5.90-12
-- fix hasmntopt (#218802)
-- fix setusershell and getusershell (#218782)
-- strtod fixes (BZ#3664, BZ#3673, BZ#3674)
-- fix memusage with realloc (x, 0)
-
-* Tue Dec  5 2006 Jakub Jelinek <jakub@redhat.com> 2.5.90-11
-- allow suid apps to setenv NIS_PATH and influence through that
-  nis_list and nis_lookup (#209155)
-- fix ttyname and ttyname_r with invalid file descriptor (#218276)
-- cs_CZ LC_TIME fixes (#218438)
-- fix build with 2.6.19+ headers (#217723)
-
-* Fri Dec  1 2006 Jakub Jelinek <jakub@redhat.com> 2.5.90-10
-- fix x86-64 restore_rt unwind info
-
-* Thu Nov 30 2006 Jakub Jelinek <jakub@redhat.com> 2.5.90-9
-- fix last svc_run change (#217850)
-- on ppc64 build __libc_start_main without unwind info,
-  as it breaks MD_FROB_UPDATE_CONTEXT (#217729, #217775; in the
-  future that could be fixable just by providing .cfi_undefined r2
-  in __libc_start_main instead)
-- add unwind info for x86-64 restore_rt signal return landing pad
-  (#217087)
-- add power6x subdir to /%{_lib}/ and /%{_lib}/rtkaio/,
-  link all libs from ../power6/* into them
-
-* Tue Nov 28 2006 Jakub Jelinek <jakub@redhat.com> 2.5.90-8
-- fix svc_run (#216834, BZ#3559)
-- add -fasynchronous-unwind-tables to CFLAGS (#216518)
-- make sure there is consistent timestamp for /etc/ld.so.conf,
-  /etc/localtime and /etc/rpc between multilib glibc rpms
-
-* Mon Nov 20 2006 Jakub Jelinek <jakub@redhat.com> 2.5.90-7
-- handle IPv6 addresses in /etc/hosts that are mappable to
-  IPv4 addresses in IPv4 host lookups (#215283)
-- fix :include: /etc/alias handling (#215572)
-- handle new tzdata format to cope with year > 2037 transitions
-  on 64-bit architectures
-
-* Fri Nov 10 2006 Jakub Jelinek <jakub@redhat.com> 2.5.90-6
-- fix strxfrm fix
-- fix i?86 floor and ceil inlines (BZ#3451)
-
-* Thu Nov  9 2006 Jakub Jelinek <jakub@redhat.com> 2.5.90-5
-- fix sysconf (_SC_LEVEL{2,3}_CACHE_SIZE) on Intel Core Duo
-  CPUs
-- fix libthread_db.so on TLS_DTV_AT_TP architectures
-- fix --inhibit-rpath (#214569)
-- fix _r_debug content when prelinked ld.so executes
-  a program as its argument
-- fix strxfrm
-- powerpc-cpu add-on updates
-
-* Fri Nov  3 2006 Jakub Jelinek <jakub@redhat.com> 2.5.90-4
-- fix atexit backwards compatibility (#213388)
-- add mai_IN locale (#213415)
-- remove bogus %{_libdir}/librt.so.1 symlink (#213555)
-- fix memusage (#213656)
-- change libc.info category (#209493)
-
-* Sun Oct 29 2006 Jakub Jelinek <jakub@redhat.com> 2.5.90-3
-- fix suid/sgid binaries on i?86/x86_64 (#212723)
-
-* Fri Oct 27 2006 Jakub Jelinek <jakub@redhat.com> 2.5.90-2
-- fix ia64 build
-- don't call _dl_close outside of dl_load_lock critical section
-  if dlopen failed (BZ#3426)
-- add rtld scope locking (#211133)
-
-* Wed Oct 25 2006 Jakub Jelinek <jakub@redhat.com> 2.5.90-1
-- fix i?86 6 argument syscalls (e.g. splice)
-- fix rtld minimal realloc (BZ#3352)
-- fix RFC3484 getaddrinfo sorting according to rules 4 and 7 (BZ#3369)
-- fix xdrmem_setpos (#211452)
-- bump __GLIBC_MINOR__
-- increase PTHREAD_STACK_MIN on ppc{,64} to 128K to allow
-  64K pagesize kernels (#209877)
-- speed up initgroups on NIS+ (#208203)
-
-* Mon Oct  2 2006 Jakub Jelinek <jakub@redhat.com> 2.5-2
-- fix nscd database growing (#207928)
-- bypass prelinking when LD_DYNAMIC_WEAK=1 is in the environment
-
-* Fri Sep 29 2006 Jakub Jelinek <jakub@redhat.com> 2.5-1
-- glibc 2.5 release
-
-* Wed Sep 27 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-36
-- rebuilt with gcc-4.1.1-26 to fix unwind info
-
-* Mon Sep 25 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-35
-- fix glob with large number of matches (BZ#3253)
-- fix fchownat on kernels that don't support that syscall (BZ#3252)
-- fix lrintl on s390{,64}
-
-* Sat Sep 23 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-34
-- fix ppc{32,64} longjmp (BZ#3225)
-- fix user visible spelling errors (BZ#3137)
-- fix l{,l}rint{,f,l} around zero (BZ#2592)
-- avoid stack trampoline in s390{,x} makecontext
-
-* Tue Sep 15 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-33
-- fix dlclose (#206639)
-- don't load platform optimized libraries if kernel doesn't set
-  AT_PLATFORM
-- fix ppc{32,64} libSegFault.so
-- use -mtune=generic even for glibc-devel.i386 (#206437)
-- fix /%{_lib}/librt.so.1 symlink
-
-* Fri Sep 15 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-32
-- on ppc* use just AT_PLATFORM and altivec AT_HWCAP bit for library selection
-- fix lrintl and lroundl on ppc{,64}
-- use hidden visibility on fstatat{,64} and mknodat in libc_nonshared.a
-
-* Sun Sep 10 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-31
-- fix pthread_cond_{,timed}wait cancellation (BZ#3123)
-- fix lrint on ppc32 (BZ#3155)
-- fix malloc allocating more than half of address space (BZ#2775)
-- fix mktime on 32-bit arches a few years after 2038 (BZ#2821)
-
-* Thu Sep  7 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-30
-- add librtkaio, to use it add /%{lib}/rtkaio to your
-  LD_LIBRARY_PATH or /etc/ld.so.conf
-- fix or_IN February name (#204730)
-- fix pthread_create called from cancellation handlers (BZ#3124)
-- fix regex case insensitive searches with characters where upper
-  and lower case multibyte representations have different length
-  (e.g. I and dotless i, #202991)
-
-* Tue Sep  5 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-29
-- randomize resolver query ids before use instead after use (#205113)
-- fix resolver symver checking with DT_GNU_HASH (#204909)
-- put .hash section in glibc libraries at the end of RO segment
-  when .gnu.hash is present
-
-* Thu Aug 31 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-28
-- another malloc doubly linked list corruption problem fix (#204653)
-
-* Thu Aug 31 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-27
-- allow $LIB and $PLATFORM in dlopen parameters even in suid/sgid (#204399)
-- handle $LIB/$PLATFORM in LD_LIBRARY_PATH
-- fix splice prototype (#204530)
-
-* Mon Aug 28 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-26
-- real fix for the doubly linked list corruption problem
-- try harder in realloc to allocate memory (BZ#2684)
-- fix getnameinfo error reporting (#204122)
-- make localedef more robust on invalid input (#203728)
-
-* Fri Aug 25 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-25
-- temporarily back out code to limit number of unsorted block
-  sort iterations (#203735, #204027)
-- handle PLT symbols in dladdr properly (BZ#2683)
-- avoid malloc infinite looping for allocations larger than
-  the system can allocate (#203915)
-
-* Tue Aug 22 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-23
-- malloc fixes, especially for 32-bit arches (#202309)
-- further *_IN locale fixes (#200230)
-- fix get{serv,rpc}ent{,_r} if NIS map is empty (#203237)
-- fix /usr/bin/iconv (#203400)
-
-* Fri Aug 18 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-22
-- rebuilt with latest binutils to pick up 64K -z commonpagesize
-  on ppc/ppc64 (#203001)
-
-* Tue Aug 15 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-21
-- if some test gets stuck, kill the tee process after make check
-  finishes
-- build with -mtune=generic on i686 and x86_64
-
-* Tue Aug 15 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-20
-- PTHREAD_PRIO_PROTECT support
-- fix errno if nice() fails (#201826)
-
-* Thu Aug 10 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-19
-- adaptive malloc brk/mmap threshold
-- fix fchownat to use kernel syscall (if available) on many arches (#201870)
-- only define O_DIRECT with -D_GNU_SOURCE on ia64 to match all
-  other arches (#201748)
-
-* Mon Aug  7 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-18
-- NIS+ fixes
-- fix memusage and xtrace scripts (#200736)
-- redirect /sbin/service sshd condrestart std{out,err} to /dev/null
-  when executed from glibc_post_upgrade
-
-* Wed Aug  2 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-17
-- typo fix for the dladdr patch
-- build i?86 glibc with -mno-tls-direct-seg-refs (#200469)
-
-* Wed Aug  2 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-16
-- fix dladdr on binaries/libraries with only DT_GNU_HASH and no
-  DT_HASH (#200635)
-- fix early timeout of initgroups data in nscd (#173019)
-- add am/pm display to es_PE and es_NI locales (#167101)
-- fix nss_compat failures when nis/nis+ unavailable (#192072)
-
-* Mon Jul 31 2006 Roland McGrath <roland@redhat.com> 2.4.90-15
-- fix missing destructor calls in dlclose (#197932)
-- enable transliteration support in all locales (#196713)
-- disallow RTLD_GLOBAL flag for dlmopen in secondary namespaces (#197462)
-- PI mutex support
-
-* Tue Jul 10 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-13
-- DT_GNU_HASH support
-
-* Fri Jun 30 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-12
-- buildrequire gettext
-- enable fstatat64/newfstatat syscalls even on ppc*/s390*/ia64 (#196494)
-- fix out of memory behavior in gettext (#194321)
-- fix regex on multi-byte non-UTF-8 charsets (#193873)
-- minor NIS+ fixes (#190803)
-- don't use cancellable calls in posix_spawn* and only set{u,g}id
-  current thread if requested (#193631)
-
-* Wed May 31 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-11
-- don't exit from nscd -i <database> before the database is
-  actually invalidated, add locking to prune_cache (#191464)
-- build glibc-devel.i386 static libraries with
-  -mno-tls-direct-seg-refs -DNO_TLS_DIRECT_SEG_REFS
-- RFC3542 support (advanced API for IPv6; #191001, BZ##2693)
-
-* Wed May 24 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-10
-- on i686 make glibc owner of /lib/i686 directory (#192597)
-- search parent NIS+ domains (#190803)
-
-* Sun May 21 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-9
-- update from CVS
-  - big NIS+ changes
-
-* Fri May 19 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-8
-- update from CVS
-  - fix nss_compat when SETENT_BATCH_READ=TRUE is in /etc/default/nss
-  - fix RFC3484 precedence table for site-local and ULA addresses (#188364)
-  - fix a sunrpc memory leak
-
-* Thu May 11 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-7
-- update from CVS
-  - fix tcgetattr (#177965)
-  - fix <sys/queue.h> (#191264)
-
-* Fri May  5 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-6
-- update from CVS
-- rebuilt using fixed rpm
-
-* Fri May  5 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-5
-- update from CVS
-  - some NIS+ fixes
-  - allow overriding rfc3484 address sorting tables for getaddrinfo
-    through /etc/gai.conf (sample config file included in %%doc directory)
-
-* Mon May  1 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-4
-- update from CVS
-  - SETENT_BATCH_READ /etc/default/nss option for speeding up
-    some usages of NIS+ (#188246)
-  - move debug state change notification (#179208)
-  - fix ldd script if one of the dynamic linkers is not installed (#190259)
-
-* Thu Apr 27 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-3
-- update from CVS
-  - fix a typo in nscd.conf (#190085)
-  - fix handling of SIGHUP in nscd when some caches are disabled (#189978)
-  - make nscd paranoia mode working with non-root server-user (#189779)
-
-* Wed Apr 26 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-2
-- update from CVS
-  - fix getaddrinfo (#190002)
-  - add auto-propagate nscd.conf options (#177154)
-  - fix nscd auditing (#169148)
-
-* Tue Apr 25 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-1
-- update from CVS
-
-* Mon Apr 24 2006 Jakub Jelinek <jakub@redhat.com> 2.4-6
-- update from CVS
-  - NIS+ fixes
-  - don't segfault on too large argp key values (#189545)
-  - getaddrinfo fixes for RFC3484 (#188364)
-
-* Tue Mar 28 2006 Jakub Jelinek <jakub@redhat.com> 2.4-5
-- update from CVS
-  - pshared robust mutex support
-  - fix btowc and bwtoc in C++ (#186410)
-  - fix NIS+ (#186592)
-  - don't declare __wcsto*l_internal for non-GCC or if not -O1+ (#185667)
-- don't mention nscd failures on 2.0 kernels (#185335)
-
-* Tue Mar  7 2006 Roland McGrath <roland@redhat.com> 2.4-4
-- back up %%{ix86} gdb conflicts to < 6.3.0.0-1.111
-
-* Tue Mar  7 2006 Jakub Jelinek <jakub@redhat.com> 2.4-3
-- really fix rintl on ppc64
-
-* Tue Mar  7 2006 Jakub Jelinek <jakub@redhat.com> 2.4-2
-- accurate unwind info for lowlevellock.h stubs on %%{ix86}
-- fix ppc/ppc64 ceill, floorl, rintl, roundl and truncl (BZ#2423)
-
-* Mon Mar  6 2006 Jakub Jelinek <jakub@redhat.com> 2.4-1
-- update from CVS
-  - glibc 2.4 release
-
-* Mon Mar  6 2006 Jakub Jelinek <jakub@redhat.com> 2.3.91-2
-- update from CVS
-  - fix sYSMALLOc for MALLOC_ALIGNMENT > 2 * SIZE_SZ (#183895)
-  - revert ppc32 malloc alignment patch, it breaks malloc_set_state
-    and needs some further thoughts and time (#183894)
-- provide accurate unwind info for lowlevellock.h stubs on x86_64
-
-* Thu Mar  2 2006 Jakub Jelinek <jakub@redhat.com> 2.3.91-1
-- update from CVS
-  - fixes for various arches
-- ensure malloc returns pointers aligned to at least
-  MIN (2 * sizeof (size_t), __alignof__ (long double))
-  (only on ppc32 this has not been the case lately with addition
-   of 128-bit long double, #182742)
-
-* Wed Mar  1 2006 Jakub Jelinek <jakub@redhat.com> 2.3.90-39
-- update from CVS
-
-* Fri Feb 17 2006 Jakub Jelinek <jakub@redhat.com> 2.3.90-38
-- update from CVS
-  - robust mutexes rewrite
-
-* Mon Feb 13 2006 Jakub Jelinek <jakub@redhat.com> 2.3.90-37
-- update from CVS
-  - *at fixes
-  - unshare syscall wrapper
-
-* Sat Feb  4 2006 Jakub Jelinek <jakub@redhat.com> 2.3.90-36
-- update from CVS
-  - fix frequency setting for ITIMER_PROF (#179938, BZ#2268)
-  - fix powerpc inline fegetround ()
-  - fix nptl_db (#179946)
-
-* Fri Feb  3 2006 Jakub Jelinek <jakub@redhat.com> 2.3.90-35
-- update from CVS
-  - handle futimesat (fd, NULL, tvp) as futimes (fd, tvp)
-- fix <stdlib.h> q{e,f,g}cvt{,_r} for -mlong-double-64
-
-* Thu Feb  2 2006 Jakub Jelinek <jakub@redhat.com> 2.3.90-34
-- fix <math.h> with C++ and -mlong-double-64 (#179742)
-- add nexttowardl redirect for -mlong-double-64
-
-* Thu Feb  2 2006 Jakub Jelinek <jakub@redhat.com> 2.3.90-33
-- update from CVS
-  - long double support fixes
-
-* Wed Feb  1 2006 Jakub Jelinek <jakub@redhat.com> 2.3.90-32
-- update from CVS
-  - 128-bit long double fixes for ppc{,64}, s390{,x} and sparc{,v9},
-    alpha 128-bit long double support
-- add inotify syscall numbers to the override <asm/unistd.h> headers
-  (#179366)
-
-* Mon Jan 30 2006 Jakub Jelinek <jakub@redhat.com> 2.3.90-31
-- update from CVS
-  - 128-bit long double on ppc, ppc64, s390, s390x and sparc{,v9}
-- add some new syscall numbers to the override <asm/unistd.h>
-  headers
-
-* Mon Jan  9 2006 Jakub Jelinek <jakub@redhat.com> 2.3.90-30
-- update from CVS
-  - <pthread.h> initializer fixes for -std=c{8,9}9 on 32-bit
-    arches
-- avoid writable .rodata (#177121)
-
-* Fri Jan  6 2006 Jakub Jelinek <jakub@redhat.com> 2.3.90-29
-- update from CVS
-  - make pthread_mutex_t an unnamed union again, as it affects
-    libstdc++ ABI mangling
-
-* Fri Jan  6 2006 Jakub Jelinek <jakub@redhat.com> 2.3.90-28
-- update from CVS
-  - make aio_suspend interruptible by signals (#171968)
-
-* Fri Jan  6 2006 Jakub Jelinek <jakub@redhat.com> 2.3.90-27
-- only rely on d_type in 32-bit getdents on s390 for 2.6.11+
-
-* Wed Jan  4 2006 Jakub Jelinek <jakub@redhat.com> 2.3.90-26
-- update from CVS
-  - for newly linked lio_listio* callers, send per request
-    notifications (#170116)
-  - fixup nscd -S option removal changes (#176860)
-  - remove nonnull attribute from ctermid (#176753)
-  - fix PTHREAD_*_INITIALIZER{,_NP} on 64-bit arches
-  - SPARC NPTL support for pre-v9 CPUs
-- drop support for 2.4.xx and < 2.6.9 kernels
-
-* Mon Jan  2 2006 Jakub Jelinek <jakub@redhat.com> 2.3.90-25
-- update from CVS
-  - s390{,x} and sparc{,64} pointer mangling fixes
-- install a sanitized LinuxThreads <bits/libc-lock.h>
-
-* Mon Jan  2 2006 Jakub Jelinek <jakub@redhat.com> 2.3.90-24
-- update from CVS
-  - nscd audit changes (#174422)
-  - ppc{32,64} vDSO support and ppc32 hp-timing
-
-* Tue Dec 27 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-23
-- update from CVS
-  - robust mutexes
-- fix transliteration segfaults (#176573, #176583)
-- ignore prelink temporaries in ldconfig (#176570)
-
-* Wed Dec 21 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-22
-- update from CVS
-  - minor fts fixes
-- revert broken _Pragma () workaround
-- fix ldconfig on bi-arch architectures (#176316)
-
-* Tue Dec 20 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-21
-- update from CVS
-  - fix pointer (de)mangling in gconv_cache.c
-
-* Tue Dec 20 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-20
-- update from CVS
-  - time ((void *) 1) should segfault, not return -EFAULT (#174856, BZ#1952)
-  - fix errlist generation
-- update ulps for GCC 4.1 on IA-64
-
-* Mon Dec 19 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-19
-- update from CVS
-  - sysdeps/generic reorg
-  - setjmp/longjmp jump pointer mangling
-- rebuilt with GCC 4.1-RH prerelease, worked around broken _Pragma ()
-  handling in it
-- remove glibc-profile subpackage
-- use non-PLT calls for malloc/free/realloc/memalign invocations in
-  mtrace and mcheck hooks (#175261)
-- setjmp/longjmp jump pointer mangling on ppc{,64}/ia64/s390{,x}
-
-* Sat Nov 19 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-18
-- update from CVS
-  - change <sys/stat.h> for broken apps that #define const /**/,
-    handle non-GCC compilers
-  - fix ppc{32,64} strncmp (BZ#1877, #173643, IT#83510)
-  - provide shmatt_t typedef in ia64 <sys/shm.h (#173680)
-  - support 2nd arg to futimesat being NULL (#173581)
-
-* Wed Nov 16 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-17
-- update from CVS
-  - fix <sys/stat.h> in C++
-  - {fstat,fchown,rename,unlink}at fixes
-  - epoll_wait is now a cancellation point
-
-* Tue Nov 15 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-16
-- update from CVS
-- make sure waitid syscall is used on ppc*/s390*
-
-* Thu Oct 20 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-15
-- update from CVS
-  - be permissive in %n check because of kernel bug #165351 (#171240)
-  - don't misalign stack in pthread_once on x86_64 (#170786, IT#81521)
-  - many locale fixes
-
-* Mon Oct 10 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-14
-- update from CVS
-  - fix malloc bug after fork introduced in the last update
-  - fix getent hosts IP for IPv4 IPs (#169831)
-
-* Mon Oct  3 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-13
-- update from CVS
-  - fix setuid etc. hangs if some thread exits during the call (#167766)
-  - fix innetgr memory leak (#169051)
-  - support > 2GB nscd log files (#168851)
-  - too many other changes to list here
-- include errno in nscd message if audit_open failed (#169148)
-
-* Mon Sep 12 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-12
-- update from CVS
-  - netgrp handling fixes (#167728)
-  - fix memory leak in setlocale (BZ#1318)
-  - fix hwcaps computation
-  - several regex portability improvements (#167019)
-  - hypotf fix
-  - fix *printf return code if underlying write fails (BZ#1146)
-  - PPC64 dl{,v}sym fixes for new ABI .opd symbols
-- fix calloc with MALLOC_PERTURB_ in environment on 64-bit architectures
-  (#166719)
-- source /etc/sysconfig/nscd (if it exists) in /etc/rc.d/init.d/nscd
-  (#167083)
-- add %%triggerin for tzdata to glibc-common, so that tzdata updates
-  update /etc/localtime and /var/spool/postfix/etc/localtime if they
-  exist (#167787)
-
-* Mon Aug 29 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-11
-- FUTEX_WAKE_OP support to speed up pthread_cond_signal
-
-* Wed Aug 24 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-10
-- update from CVS
-  - fix growing of nscd persistent database (BZ#1204)
-  - fix _FORTIFY_SOURCE mbstowcs and wcstombs if destination size
-    is known at compile time, but length argument is not
-
-* Mon Aug 22 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-9
-- update from CVS
-  - fix resolving over TCP (#161181, #165802)
-  - on ia64 don't abort on unhandled math function exception codes
-    (#165693)
-
-* Mon Aug  8 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-8
-- update from CVS
-  - nscd persistent database verifier (#164001)
-  - cleanup _FORTIFY_SOURCE bits/*.h headers (#165000)
-  - handle EINTR in sigwait properly
-- make sure poor man's stack guard randomization keeps first
-  byte 0 even on big-endian 32-bit arches
-- fix {elf,nptl}/tst-stackguard1
-- obsolete linuxthreads-devel in glibc-devel
-
-* Fri Jul 29 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-7
-- update from CVS
-- do some poor man's stack guard randomization even without
-  the costly --enable-stackguard-randomization
-- rebuilt with new GCC to make it use -msecure-plt on PPC32
-
-* Mon Jul 25 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-6
-- update from CVS
-  - fix execvp if PATH is not in environment and the call is going
-    to fail (BZ#1125)
-  - another bits/wchar2.h fix (#163990)
-
-* Fri Jul 22 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-5
-- update from CVS
-  - fix stubs.h generation
-- don't use _G_va_list in bits/wchar2.h
-
-* Fri Jul 22 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-4
-- update from CVS
-  - make sure bits/wchar2.h header is installed
-  - fix __getgroups_chk return type
-
-* Thu Jul 21 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-3
-- update from CVS
-  - make sure nscd cmsg buffers aren't misaligned, handle EINTR from
-    poll when contacting nscd more gracefully
-  - remove malloc attribute from posix_memalign
-  - correctly size nscd buffer for grpcache key (#163538)
-  - fix atan2f
-  - fix error memory leaks
-  - some more _FORTIFY_SOURCE protection
-
-* Fri Jul  8 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-2
-- update from CVS
-  - ia64 stack protector support
-  - handle DNS referral results as server errors (#162625)
-  - ctan{,h}{,f,l} fixes (#160759)
-  - pass argc, argv and envp also to executable's *ni_array
-    functions (BZ#974)
-  - add ellipsis to clone prototype (#161593)
-  - fix glibc-profile (#162601)
-  - nss_compat fixes
-- use sysdeps/generic version of <bits/stdio-lock.h> in installed
-  headers instead of NPTL version (#162634)
-
-* Mon Jun 27 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-1
-- update from CVS
-  - stack protector support
-  - fix xdr_{,u_}{longlong_t,hyper} on 64-bit arches (#161583)
-- enable @GLIBC_2.4 symbols
-- remove linuxthreads
-
-* Mon Jun 20 2005 Jakub Jelinek <jakub@redhat.com> 2.3.5-11
-- update from CVS
-  - PPC32 -msecure-plt support
-  - support classes keyword in /etc/hesiod.conf (#150350)
-  - add RLIMIT_NICE and RLIMIT_RTPRIO to <sys/resources.h> (#157049)
-  - decrease number of .plt relocations in libc.so
-  - use -laudit in nscd (#159217)
-  - handle big amounts of networking interfaces in getifaddrs/if_nameindex
-    (#159399)
-  - fix pa_IN locale's am_pm (#158715, BZ#622)
-  - fix debugging of PIEs
-
-* Mon May 30 2005 Jakub Jelinek <jakub@redhat.com> 2.3.5-10
-- fix LD_ASSUME_KERNEL (since 2.3.5-8 GLRO(dl_osversion)
-  has been always overwritten with the version of currently
-  running kernel)
-- remove linuxthreads man pages other than those covered in
-  3p section, as 3p man pages are far better quality and describe
-  POSIX behaviour that NPTL implements (#159084)
-
-* Tue May 24 2005 Jakub Jelinek <jakub@redhat.com> 2.3.5-9
-- update from CVS
-  - increase bindresvport's LOWPORT to 512, apparently some
-    broken daemons don't think 0 .. 511 ports are reserved
-
-* Mon May 23 2005 Jakub Jelinek <jakub@redhat.com> 2.3.5-8
-- update from CVS
-  - fix kernel version check in ld.so
-- fix sendfile{,64} prototypes (BZ#961)
-- try more ports in bindresvport if all 600..1023 are
-  used, don't use priviledged ports when talking to portmap
-  (#141773)
-
-* Fri May 20 2005 Jakub Jelinek <jakub@redhat.com> 2.3.5-7
-- update from CVS
-  - make regexec thread safe (BZ#934)
-- fix statically linked programs on i?86, x86_64, s390* and
-  sparc* (#158027)
-- fix IBM939 iconv module (BZ#955)
-
-* Wed May  4 2005 Jakub Jelinek <jakub@redhat.com> 2.3.5-6
-- update from CVS
-  - fix cancellation on i?86
-  - add call frame information to i?86 assembly
-
-* Tue May  3 2005 Jakub Jelinek <jakub@redhat.com> 2.3.5-5
-- update from CVS
-  - add some more UTF-8 locales (#156115)
-- clean up /lib64/tls instead of /lib/tls on x86-64, s390x and
-  ppc64 in glibc_post_upgrade (#156656)
-- fix posix_fallocate{,64} (#156289)
-
-* Thu Apr 28 2005 Jakub Jelinek <jakub@redhat.com> 2.3.5-4
-- update from CVS
-  - fix nscd cache pruning (#150748)
-
-* Wed Apr 27 2005 Jakub Jelinek <jakub@redhat.com> 2.3.5-3
-- update from CVS
-  - fix linuxthreads clocks
-- put xen libs into the glibc-2*.i686 package instead of a separate one
-- fix librt.so symlink in linuxthreads-devel
-- do not include linuxthreads-devel on %{auxarches},
-  just on the base architectures
-
-* Wed Apr 27 2005 Jakub Jelinek <jakub@redhat.com> 2.3.5-2
-- update from CVS
-  - with MALLOC_CHECK_=N N>0 (#153003)
-  - fix recursive dlclose (#154641)
-  - handle %z in strptime (#154804)
-  - automatically append /%{_lib}/obsolete/linuxthreads/
-    to standard library search path if LD_ASSUME_KERNEL=N N <= 2.4.19
-    or for glibc 2.0 binaries (or broken ones that don't use errno/h_errno
-    properly).  Warning: all those will stop working when LinuxThreads
-    is finally nuked, which is not very far away
-  - remove nonnull attribute from acct prototype (BZ#877)
-  - kernel CPU clocks support
-  - fix *scanf in locales with multi-byte decimal point
-
-* Wed Apr 27 2005 Roland McGrath <roland@redhat.com>
-- glibc-xen subpackage for i686
-
-* Fri Apr 15 2005 Roland McGrath <roland@redhat.com> 2.3.5-1
-- update from CVS
-  - fix execvp regression (BZ#851)
-  - ia64 libm updates
-  - sparc updates
-  - fix initstate{,_r}/strfry (#154504)
-  - grok PT_NOTE in vDSO for kernel version and extra hwcap dirs,
-    support "hwcap" keyword in ld.so.conf files
-
-* Tue Apr  4 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-21
-- update from CVS
-  - fix xdr_rmtcall_args on 64-bit arches (#151686)
-- fix <pthread.h> and <bits/libc-lock.h> with -std=c89 -fexceptions (#153774)
-
-* Mon Apr  4 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-20
-- move LinuxThreads libraries to /%{_lib}/obsolete/linuxthreads/
-  and NPTL libraries to /%{_lib}.  To run a program against LinuxThreads,
-  LD_ASSUME_KERNEL=2.4.xx LD_LIBRARY_PATH=/%{_lib}/obsolete/linuxthreads/
-  is now needed
-- bzip2 ChangeLog* files instead of gzipping them
-
-* Sat Apr  2 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-19
-- update from CVS
-  - fix nextafterl and several other libm routines on ia64
-  - fix initgroups (BZ#661)
-- kill nptl-devel subpackage, add linuxthreads-devel,
-  compile and link by default against NPTL and only with
-  -I/usr/include/linuxthreads -L/usr/%{_lib}/linuxthreads
-  against LinuxThreads
-- package /usr/lib/debug/%{_lib}/tls/i{5,6}86 symlinks in
-  i386 glibc-debuginfo
-- limit number of ChangeLog* files in glibc-common %%doc
-  to last 2.5 years of changes only to save space
-
-* Fri Mar 25 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-18
-- fix build on 64-bit arches with new GCC
-
-* Thu Mar 24 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-17
-- update from CVS
-  - fix LD_AUDIT in LinuxThreads ld.so
-  - fix calloc with M_PERTURB
-  - fix error handling in pthread_create with PTHREAD_EXPLICIT_SCHED
-    on ppc*/ia64/alpha/mips (BZ#801)
-  - fix a typo in WINDOWS-31J charmap (#151739)
-  - fix NIS ypprot_err (#151469)
-
-* Sun Mar 20 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-16
-- fix pread with -D_FILE_OFFSET_BITS=64 (#151573)
-
-* Sat Mar 19 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-15
-- update from CVS
-  - better fix for the dlclose bug (#145810, #150414)
-  - fix regex crash on case insensitive search in zh_CN locale
-    (#151215)
-  - fix malloc_trim (BZ#779)
-  - with -D_FORTIFY_SOURCE=*, avoid defining read and a bunch of others
-    as function-like macros, there are too many broken programs
-    out there
-- add %%dir %{_prefix}/%{_lib}/gconv to glibc's file list (#151372)
-
-* Sun Mar  6 2005 Roland McGrath <roland@redhat.com> 2.3.4-14
-- fix bits/socket2.h macro typos
-
-* Sat Mar  5 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-12
-- fix tst-chk{2,3}
-- fix up AS_NEEDED directive in /usr/%{_lib}/libc.so
-- BuildReq binutils >= 2.15.94.0.2-1 for AS_NEEDED, in
-  glibc-devel Conflict with binutils < 2.15.94.0.2-1
-
-* Thu Mar  3 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-11
-- update from CVS
-  - fix execvp (#149290)
-  - fix dlclose (#145810)
-  - clear padding in gconv-modules.cache (#146614, BZ#776)
-- rebuilt with GCC4
-- changed __GLIBC_MINOR__ for now back to 3
-- back out the newly added GLIBC_2.4 *_chk routines, instead
-  do the checking in macros
-
-* Sat Feb 12 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-10
-- hopefully fix interaction with prelink (#147655)
-
-* Fri Feb 11 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-9
-- update from CVS
-  - bi-arch <gnu/stubs.h> (BZ#715)
-
-* Fri Feb 11 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-8
-- update from CVS
-  - bi-arch <gnu/lib-names.h> (BZ#632)
-  - fix libdl on s390 and maybe other platforms
-  - fix initstate{,_r} (BZ#710)
-  - fix <gnu/stubs.h> generation (BZ#157)
-- define CMSPAR in bits/termios.h (#147533)
-
-* Tue Feb  8 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-7
-- update from CVS
-  - fix TLS handling in linuxthreads
-
-* Tue Feb  8 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-6
-- update from CVS
-  - ld.so auditing
-  - fix segfault if chrooted app attempts to dlopen a library
-    and no standard library directory exists at all (#147067, #144303)
-  - fix initgroups when nscd is running, but has group caching disabled
-    (#146588)
-  - fix pthread_key_{create,destroy} in LinuxThreads when pthread_create
-    has not been called yet (#146710)
-  - fix ppc64 swapcontext and setcontext (#146736, BZ#700)
-  - service nscd cosmetic fixes (#146776)
-  - fix IA-32 and x86-64 stack alignment in DSO constructors (#145689)
-  - fix zdump -v segfaults on x86-64 (#146210)
-  - avoid calling sigaction (SIGPIPE, ...) inside syslog (#146021, IT#56686)
-  - fix errno values for futimes (BZ#633)
-  - unconditionally include <features.h> in malloc.h (BZ#650)
-  - change regex \B handling to match old GNU regex as well as perl/grep's dfa
-    (from empty string inside of word to empty string not at a word boundary,
-     BZ#693)
-  - slightly optimize i686 TLS accesses, use direct TLS %gs access in sem_*
-    and allow building -mno-tls-direct-seg-refs glibc that is free of direct TLS
-    %gs access with negative offsets
-  - fix addseverity
-  - fix fmemopen
-  - fix rewinddir
-  - increase svc{tcp,unix}_create listen backlog
-
-* Thu Jan  6 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-5
-- update from CVS
-  - add some warn_unused_result marking
-  - make ftruncate available even for just -D_POSIX_C_SOURCE=200112L
-    (BZ#640)
-
-* Thu Jan  6 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-4
-- update from CVS
-  - fix IA-32 stack alignment for LinuxThreads thread functions
-    and functions passed to clone(2) directly
-  - fix ecvt{,_r} on denormals (#143279)
-  - fix __tls_get_addr typo
-  - fix rounding in IA-64 alarm (#143710)
-  - don't reinitialize __environ in __libc_start_main, so that
-    effects of setenv/putenv done in DSO initializers are preserved
-    (#144037, IT#57403)
-  - fix fmemopen
-  - fix vDSO l_map_end and l_text_end values
-  - IA64 libm update (#142494)
-- fix ppc rint/ceil etc. (BZ#602)
-
-* Tue Dec 21 2004 Jakub Jelinek <jakub@redhat.com> 2.3.4-3
-- rebuilt
-
-* Mon Dec 20 2004 Jakub Jelinek <jakub@redhat.com> 2.3.4-2
-- work around rpm bug some more, this time by copying
-  iconvconfig to iconvconfig.%%{_target_cpu}.
-
-* Mon Dec 20 2004 Jakub Jelinek <jakub@redhat.com> 2.3.4-1
-- update from CVS
-  - glibc 2.3.4 release
-  - add -o and --nostdlib options to iconvconfig
-- if /sbin/ldconfig doesn't exist when running
-  glibc_post_upgrade.%%{_target_cpu}, just don't attempt to run it.
-  This can happen during first install of bi-arch glibc and the
-  other arch glibc's %post wil run /sbin/ldconfig (#143326)
-- use -o and --nostdlib options to create all needed
-  gconv-modules.cache files on bi-arch setups
-
-* Sun Dec 19 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-99
-- rebuilt
-
-* Sat Dec 18 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-98
-- add .%%{_target_cpu} to glibc_post_upgrade, only run telinit u
-  if /sbin/init is the same ELF class and machine as
-  glibc_post_upgrade.%%{_target_cpu} and similarly with
-  condrestarting sshd (#143046)
-
-* Fri Dec 17 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-97
-- update from CVS
-  - fix ppc64 getcontext and swapcontext (BZ#610)
-  - sparc/sparc64 fixes
-
-* Wed Dec 15 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-96
-- update from CVS
-  - fix i686 __USE_STRING_INLINES strncat
-  - make sure ppc/ppc64 maintain correct stack alignment
-    across clone
-
-* Wed Dec 15 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-95
-- export nis_domain_of_r from libnsl.so again which was
-  unintentionally lost
-
-* Wed Dec 15 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-93
-- update from CVS
-  - ppc/ppc64 clone without CLONE_THREAD getpid () adjustement
-  - fix MALLOC_CHECK_={1,2,3} for non-contiguous main arena
-    (BZ#457)
-  - fix sysconf (_POSIX_V6_*) for other ABI environments in
-    bi-arch setups
-- s390/s390x clone without CLONE_THREAD getpid () adjustement
-
-* Tue Dec 14 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-92
-- update from CVS
-- fix %{_prefix}/libexec/getconf filenames generation
-
-* Tue Dec 14 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-91
-- update from CVS
-  - double buffer size in getXXbyYY or getXXent on ERANGE
-    instead of adding BUFLEN (#142617)
-  - avoid busy loop in malloc if another thread is doing fork
-    (#142214)
-  - some more realloc corruption checks
-  - fix getconf _POSIX_V6_WIDTH_RESTRICTED_ENVS output,
-    tweak %{_prefix}/libexec/getconf/ filenames
-
-* Fri Dec 10 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-90
-- update from CVS
-  - regex speedups
-  - use | cat in ldd if running under bash3+ to allow running
-    it on binaries that are not through SELinux allowed to access
-    console or tty
-- add __NR_waitid defines for alpha and ia64
-
-* Wed Dec  8 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-89
-- update from CVS
-  - fix clone2 on ia64
-  - avoid tst-timer5 failing with linuxthreads implementation
-- if __libc_enable_secure, disallow mode != normal
-- change ldd script to imply -r when -u is used, properly
-  propagate return value and handle suid binaries
-
-* Tue Dec  7 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-88
-- update from CVS
-  - disregard LD_SHOW_AUXV and LD_DYNAMIC_WEAK if __libc_enable_secure
-  - disregard LD_DEBUG if __libc_enable_secure in normal mode
-    if /suid-debug doesn't exist
-  - fix fseekpos after ungetc
-  - avoid reading bytes before start of buffers in regex's
-    check_dst_limits_calc_pos_1 (#142060)
-  - make getpid () working with clone/clone2 without CLONE_THREAD
-    (so far on i386/x86_64/ia64 only)
-- move %{_prefix}/libexec/getconf/* to glibc from glibc-common
-- make %{_prefix}/libexec/getconf directory owned by glibc package
-
-* Fri Dec  3 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-87
-- update from CVS
-  - build libpthread_nonshared.a objects with -fPIC on s390/s390x
-  - fix mktime with < 0 or > 59 tm_sec on entry
-  - remove nonnull attribute for realpath
-  - add $(make-target-directory) for errlist-compat.c rule
-    (hopefully fix #141404)
-- add testcase for ungetc bug
-- define _POSIX_{,THREAD_}CPUTIME to 0 on all Linux arches
-
-* Tue Nov 30 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-86
-- update from CVS
-  - some posix_opt.h fixes
-- fix strtold use of unitialized memory (#141000)
-- some more bugfixes for bugs detected by valgrind
-- rebuilt with GCC >= 3.4.3-5 to avoid packed stack layout
-  on s390{,x} (#139678)
-
-* Fri Nov 26 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-85
-- update from CVS
-  - support -v specification in getconf
-  - fix sysconf (_SC_LFS64_CFLAGS) etc.
-  - avoid thread stack aliasing issues on EM64T (#140803)
-- move %{_prefix}/include/nptl headers from nptl-devel
-  to glibc-headers, so that even NPTL specific programs
-  can be built bi-arch without problems
-
-* Wed Nov 24 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-84
-- update from CVS
-  - fix memory leak in getaddrinfo if using nscd (#139559)
-  - handle large lines in /etc/hosts and /etc/networks
-    (#140378)
-  - add nonnull attributes to selected dirent.h and dlfcn.h
-    functions
-
-* Sun Nov 21 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-83
-- update from CVS
-  - add deprecated and/or nonnull attribute to some signal.h
-    functions
-  - speed up tzset () by only using stat instead of open/fstat
-    when calling tzset for the second and following time if
-    /etc/localtime has not changed
-- fix tgamma (BZ #552)
-
-* Sat Nov 20 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-82
-- update from CVS
-  - some malloc () checking
-  - libpthread.a object dependency cleanups (#115157)
-  - <bits/socket.h> fix for -std=c89 -pedantic-errors (#140132)
-
-* Fri Nov 19 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-81
-- don't use chunksize in <= 2 * SIZE_SZ free () checks
-
-* Fri Nov 19 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-80
-- update from CVS
-  - with -D_FORTIFY_SOURCE=2, prevent missing %N$ formats
-  - for -D_FORTIFY_SOURCE=2 and %n in writable format string,
-    issue special error message instead of using the buffer overflow
-    detected one
-  - speedup regex searching with REG_NOSUB, add RE_NO_SUB,
-    speedup searching with nested subexps (BZ #544)
-  - block SIGCANCEL in NPTL timer_* helper thread
-- further free () checking
-
-* Tue Nov 16 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-79
-- update from CVS
-- fix free () checking
-- move /etc/default/nss into glibc-common (hopefully fix #132392)
-
-* Mon Nov 15 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-78
-- update from CVS
-  - fix LD_DEBUG=statistics
-  - issue error message before aborting in __chk_fail ()
-- some more free () checking
-
-* Fri Nov 12 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-77
-- update from CVS
-  - speedup regex on palindromes (BZ #429)
-  - fix NPTL set{,e,re,res}[ug]id, so that even if making process
-    less priviledged all threads change their credentials successfully
-
-* Wed Nov 10 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-76
-- update from CVS
-  - fix regcomp crash (#138439)
-  - fix ftell{,o,o64} (#137885)
-  - robustification of nscd to cope with corrupt databases (#137140)
-  - fix NPTL with pthread_exit immediately after pthread_create (BZ #530)
-  - some regex optimizations
-
-* Tue Nov  2 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-75
-- update from CVS
-  - mktime cleanups (BZ #487, #473)
-  - unique comments in free(3) check error messages
-- adjust some x86_64 headers for -m32 (#129712)
-- object size checking support even with GCC-3.4.2-RH >= 3.4.2-8
-
-* Wed Oct 27 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-74
-- fix <netinet/udp.h> header
-- fix globfree (#137176)
-- fix exiting if there are dlmopened libraries in namespaces
-  other than main one not closed yet
-- export again _res_opcodes and __p_{class,type}_syms from
-  libresolv.so that were lost in -69
-
-* Thu Oct 21 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-73
-- remove setaltroot and key{_add,_request,ctl} also from Versions
-- back out _sys_errlist changes
-
-* Thu Oct 21 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-72
-- back out setaltroot and key{_add,_request,ctl} addition
-- fix severe x86-64 symbol versioning regressions that breaks
-  e.g. java binaries
-
-* Wed Oct 20 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-71
-- update from CVS
-  - fix minor catchsegv temp file handling vulnerability
-    (CAN-2004-0968, #136319)
-  - add 4 new errno codes
-  - setaltroot, key{_add,_request,ctl} syscalls on some arches
-  - export _dl_debug_state@GLIBC_PRIVATE from ld.so again for
-    gdb purpose
-  - use inet_pton to decide what is address and what is hostname
-    in getent (#135422)
-  - change dladdr/dladdr1, so that dli_saddr is the same kind
-    of value as dlsym/dlvsym return (makes difference on ia64/hppa only)
-  - fix catchsegv script so that it works with both 32-bit and 64-bit
-    programs on multi-arch platforms
-
-* Tue Oct 19 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-70
-- update from CVS
-- require newer selinux-policy (#135978)
-- add %%dir for /var/run/nscd and /var/db/nscd and %%ghost
-  files in it
-- conflict with gcc4 4.0.0-0.6 and earlier (needs __builtin_object_size)
-
-* Mon Oct 18 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-69
-- update from CVS
-  - object size checking support (-D_FORTIFY_SOURCE={1,2})
-
-* Thu Oct 14 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-68
-- update from CVS
-  - support for namespaces in the dynamic linker
-  - fix dlclose (BZ #77)
-  - libSegFault.so uses now backtrace() to work on IA-64, x86-64
-    and s390 (#130254)
-
-* Tue Oct 12 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-67
-- update from CVS
-  - use non-blocking sockets in resolver (#135234)
-  - reset pd->res options on thread exit, so that threads
-    reusing cached stacks get resolver state properly initialized
-    (BZ #434)
-
-* Wed Oct  6 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-66
-- update from CVS
-- avoid using perl in the spec file, buildrequire sed >= 3.95
-  (#127671)
-- export TIMEOUTFACTOR=16
-- fix _JMPBUF_CFA_UNWINDS_ADJ on s390{,x}
-
-* Tue Oct  5 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-65
-- update from CVS
-  - define _POSIX_THREAD_PROCESS_SHARED and _POSIX_CLOCK_SELECTION
-    to -1 in LinuxThreads
-  - define _POSIX_CPUTIME and _POSIX_THREAD_CPUTIME to 0
-    on i?86/ia64 and make sure sysconf (_SC_{,THREAD_}CPUTIME)
-    returns correct value
-- if _POSIX_CLOCK_SELECTION == -1 in nscd, still try
-  sysconf (_SC_CLOCK_SELECTION) and if it returns true,
-  dlopen libpthread.so and dlsym pthread_condattr_setclock
-- build nscd with -z relro and -z now
-
-* Mon Oct  4 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-64
-- update from CVS
-  - stop using __builtin_expect in assert and assert_perror
-    (#127606)
-  - try to avoid too much VA fragmentation with malloc
-    on flexmap layout (#118574)
-  - nscd robustification
-  - change valloc to use debugging hooks (#134385)
-- make glibc_post_upgrade more verbose on errors (Fergal Daly,
-  #125700)
-
-* Fri Oct  1 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-63
-- update from CVS
-  - fix __nscd_getgrouplist
-  - fix a typo in x86_64 pthread_mutex_timedwait fix
-
-* Fri Oct  1 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-62
-- update from CVS
-  - fix NPTL pthread_mutex_timedwait on i386/x86_64 (BZ #417)
-
-* Thu Sep 30 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-61
-- update from CVS
-  - some nscd fixes (#134193)
-  - cache initgroups in nscd (#132850)
-  - reread /etc/localtime in tzset () even if just mtime changed
-    (#133481)
-  - fix glob (#126460)
-  - another get_myaddress fix
-
-* Wed Sep 29 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-60
-- update from CVS
-  - fix get_myaddress (#133982)
-  - remove nonnull attribute from second utime argument (#133866)
-  - handle SIGSETXID the same way as SIGCANCEL in
-    sigaction/pthread_kill/sigwait/sigwaitinfo etc.
-  - add __extension__ to long long types in NPTL <bits/pthreadtypes.h>
-
-* Mon Sep 27 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-59
-- update from CVS
-  - fix BZ #151, #362, #381, #407
-  - fdim fix for +inf/+inf (BZ #376)
-
-* Sun Sep 26 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-58
-- update from CVS
-  - vasprintf fix (BZ #346)
-  - gettext locking (BZ #322)
-- change linuxthreads useldt.h inclusion login again, the last
-  one failed all linuxthreads FLOATING_STACKS tests
-
-* Sat Sep 25 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-57
-- update from CVS
-  - fix setuid in LD_ASSUME_KERNEL=2.2.5 libc (#133558)
-  - fix nis locking (#132204)
-  - RTLD_DEEPBIND support
-  - fix pthread_create bugs (BZ #401, #405)
-
-* Wed Sep 22 2004 Roland McGrath <roland@redhat.com> 2.3.3-56
-- migrated CVS to fedora-branch in sources.redhat.com glibc repository
-  - source tarballs renamed
-  - redhat/ moved to fedora/, some old cruft removed
-- update from trunk
-  - some __nonnull annotations
-
-* Wed Sep 22 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-55
-- update from CVS
-  - set{re,e,res}[ug]id now affect the whole process in NPTL
-  - return EAGAIN instead of ENOMEM when not enough memory
-    in pthread_create
-
-* Fri Sep 17 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-54
-- update from CVS
-  - nscd getaddrinfo caching
-
-* Tue Sep 14 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-53
-- restore temporarily old definition of __P()/__PMT()
-  for third party apps
-
-* Tue Sep 14 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-52
-- update from CVS
-  - nscd bi-arch fix
-  - remove all uses of __P()/__PMT() from glibc headers
-- update and reenable nscd SELinux patch
-- remove libnss1* and libnss*.so.1 compatibility NSS modules
-  on IA-32, SPARC and Alpha
-
-* Fri Sep 10 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-51
-- update from CVS
-  - disable one of the malloc double free checks for non-contiguous
-    arenas where it doesn't have to be true even for non-broken
-    apps
-
-* Thu Sep  9 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-50
-- update from CVS
-  - pwd/grp/host loops with nscd speed up by sharing the
-    nscd cache r/o with applications
-  - inexpensive double free check in free(3)
-  - make NPTL pthread.h initializers usable even from C++
-    (BZ #375)
-- use atomic instructions even in i386 nscd on i486+ CPUs
-  (conditionally)
-
-* Sat Sep  3 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-49
-- update from CVS
-- fix linuxthreads tst-cancel{[45],-static}
-
-* Fri Sep  3 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-48
-- update from CVS
-  - fix pthread_cond_destroy (BZ #342)
-  - fix fnmatch without FNM_NOESCAPE (BZ #361)
-  - fix ppc32 setcontext (BZ #357)
-- add NPTL support for i386 glibc (only if run on i486 or higher CPU)
-- add __NR_waitid defines for i386, x86_64 and sparc*
-
-* Tue Aug 31 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-47
-- update from CVS
-  - persistent nscd caching
-  - ppc64 32-bit atomicity fix
-  - fix x86-64 nptl-devel headers for -m32 compilation
-- %%ghost /etc/ld.so.cache (#130597)
-- edit /etc/ld.so.conf in glibc_post_upgrade if
-  include ld.so.conf.d/*.conf line is missing (#120588)
-- ugly hacks for the IA-64 /emul braindamage (#124996, #128267)
-
-* Sat Aug 21 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-46
-- update from CVS
-
-* Thu Aug 19 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-45
-- update from CVS
-  - fix nss_compat's initgroups handling (#130363)
-  - fix getaddrinfo ai_canonname setting
-
-* Thu Aug 19 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-44
-- update from CVS
-  - add ip6-dotint resolv.conf option, make
-    no-ip6-dotint the default
-- BuildPrereq libselinux-devel (#129946)
-- on ppc64, build without dot symbols
-
-* Thu Aug 12 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-43
-- update from CVS
-  - remove debugging printout (#129747)
-  - make <sys/shm.h> usable in C++ (IT#45148)
-- update RLIMIT_* constants in <bits/resource.h>, make
-  <sys/resource.h> POSIX compliant (#129740)
-
-* Wed Aug 11 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-42
-- fix last tzset () fixes, disable rereading of /etc/localtime
-  every time for now
-- really enable SELinux support for NSCD
-
-* Wed Aug 11 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-41
-- update from CVS
-  - fread_unlocked/fwrite_unlocked macro fixes (BZ #309, #316)
-  - tzset () fixes (BZ #154)
-- speed up pthread_rwlock_unlock on arches other than i386 and
-  x86_64 (#129455)
-- fix compilation with -ansi (resp. -std=c89 or -std=c99) and
-  -D_XOPEN_SOURCE=[56]00 but no -D_POSIX_SOURCE* or -D_POSIX_C_SOURCE*
-  (BZ #284)
-- add SELinux support for NSCD
-
-* Fri Aug  6 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-40
-- update from CVS
-  - change res_init to force all threads to re-initialize
-    resolver before they use it next time (#125712)
-  - various getaddrinfo and related fixes (BZ #295, #296)
-  - fix IBM{932,943} iconv modules (#128674)
-  - some nscd fixes (e.g. BZ #292)
-  - RFC 3678 support (Multicast Source Filters)
-- handle /lib/i686/librtkaio-* in i386 glibc_post_upgrade
-  the same as /lib/i686/librt-*
-
-* Fri Jul 23 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-39
-- update from CVS
-  - conformance related changes in headers
-- remove -finline-limit=2000 for GCC 3.4.x+
-
-* Thu Jul 22 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-38
-- update from CVS
-  - fix res_init leaks
-  - fix newlocale races
-  - fix ppc64 setjmp
-- fix strtold (BZ #274)
-
-* Fri Jul 16 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-37
-- update from CVS
-  - allow pthread_cancel in DSO destructors run at exit time
-- fix pow{f,,l} on IA-32 and powl on x86-64
-- allow PIEs on IA-32 to have main in a shared library they depend on
-
-* Mon Jul  5 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-36
-- s390* .plt slot reduction
-- fix pthread_rwlock_timedrdlock on x86_64
-
-* Wed Jun 30 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-35
-- tweak spec file for the libpthread-0.61.so -> libpthread-2.3.3.so
-  NPTL changes
-
-* Wed Jun 30 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-34
-- update from CVS
-  - if_nameindex using preferably netlink
-  - printf_parsemb initialization fix
-  - NPTL version is now the same as glibc version
-
-* Mon Jun 28 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-33
-- update from CVS
-  - reread resolv.conf for nscd --invalidate=hosts
-  - fix F_GETLK/F_SETLK/F_SETLKW constants on x86_64 for
-    -m32 -D_FILE_OFFSET_BITS=64 compilations
-  - avoid calling non-existing fcntl64 syscall on ppc64
-
-* Mon Jun 14 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-32
-- update from CVS
-  - FUTEX_CMP_REQUEUE support (fix pthread_cond_* deadlocks)
-  - fix backtrace in statically linked programs
-- rebuilt with GCC 3.4, adjusted ulps and i386 <bits/string.h>
-
-* Fri May 28 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-31
-- update from CVS
-- <bits/string2.h> and <bits/mathinline.h> changes for GCC 3.{2,4,5}+
-- make c_stubs buildable even with GCC 3.2.x (#123042)
-
-* Fri May 21 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-30
-- fix pthread_cond_wait on architectures other than IA-32 and
-  x86_64
-
-* Thu May 20 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-29
-- use lib64 instead of lib on ia64 if %%{_lib} is defined to lib64
-
-* Wed May 19 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-28
-- update from CVS
-  - FUTEX_REQUEUE fixes (#115349)
-  - SPARC GCC 3.4 build fix
-  - fix handling of undefined TLS symbols on IA32 (RELA only),
-    SPARC and SH
-  - regex translate fix
-  - speed up sprintf
-  - x86_64 makecontext alignment fix
-  - make POSIX sigpause the default sigpause, unless BSD sigpause
-    requested
-
-* Tue May 11 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-27
-- remove /lib64/tls/librtkaio-2.3.[23].so in glibc_post_upgrade
-  on x86-64, s390x and ppc64 instead of /lib/tls/librtkaio-2.3.[23].so
-- build mq_{send,receive} with -fexceptions
-
-* Fri May  7 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-26
-- update from CVS
-  - fix <tgmath.h>
-  - fix memory leaks in nis, getifaddrs, etc. caused by incorrect
-    use of realloc
-- remove /lib/{tls,i686}/librtkaio-2.3.[23].so in glibc_post_upgrade
-  and rerun ldconfig if needed, otherwise after glibc upgrade librt.so.1
-  might be a stale symlink
-
-* Wed May  5 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-25
-- update from CVS
-- disable FUTEX_REQUEUE (work around #115349)
-- mq for sparc/sparc64/ia64
-
-* Tue May  4 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-24
-- update from CVS
-  - define S_ISSOCK in -D_XOPEN_SOURCE=600 and S_I[FS]SOCK
-    plus F_[SG]ETOWN also in -D_XOPEN_SOURCE=500 (both
-    included already in XNS5)
-  - reorder dlopen checks, so that dlopening ET_REL objects
-    complains about != ET_DYN != ET_EXEC, not about phentsize
-    (#121606)
-  - fix strpbrk macro for GCC 3.4+ (BZ #130)
-  - fix <sys/sysctl.h> (BZ #140)
-  - sched_[gs]etaffinity documentation fix (BZ #131)
-  - fix sparc64 build (BZ #139)
-  - change linuxthreads back to use non-cancellable writes
-    to manager pipes etc.
-  - fix sem_timedwait return value in linuxthreads (BZ #133)
-  - ia64 unnecessary PLT relocs removal
-
-* Thu Apr 22 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-23
-- update from CVS
-  - fix *scanf
-  - fix shm_unlink, sem_unlink and mq_unlink errno values
-  - avoid memory leaks in error
-  - execstack fixes on s390
-
-* Mon Apr 19 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-22
-- update from CVS
-  - mq and timer fixes
-- rebuilt with binutils >= 2.15.90.0.3-2 to fix IA-64 statically
-  linked binaries
-- fix linuxthreads librt.so on s390{,x}, so it is no longer DT_TEXTREL
-
-* Sat Apr 17 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-21
-- disable rtkaio
-- update from CVS
-  - POSIX message passing support
-  - fixed SIGEV_THREAD support for POSIX timers
-  - fix free on non-malloced memory in syslog
-  - fix ffsl on some 64-bit arches
-  - fix sched_setaffinity on x86-64, ia64
-  - fix ppc64 umount
-  - NETID_AUTHORITATIVE, SERVICES_AUTHORITATIVE support
-  - various NIS speedups
-  - fix fwrite with > 2GB sizes on 64-bit arches
-  - fix pthread_getattr_np guardsize reporting in NPTL
-- report PLT relocations in ld.so and libc.so during the build
-
-* Fri Mar 25 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-20
-- update from CVS
-  - change NPTL PTHREAD_MUTEX_ADAPTIVE_NP mutexes to spin on SMP
-  - strtol speed optimization
-  - don't try to use certainly unimplemented syscalls on ppc64
-- kill -debug subpackage, move the libs to glibc-debuginfo{,-common}
-  into /usr/lib/debug/usr/%{_lib}/ directory
-- fix c_stubs with gcc 3.4
-- move all the up to 3 builds into %%build scriptlet and
-  leave only installation in the %%install scriptlet
-
-* Mon Mar 22 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-19
-- update from CVS
-  - affinity API changes
-
-* Thu Mar 18 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-18
-- update from CVS
-  - fix ia64 iopl (#118591)
-  - add support for /etc/ld.so.conf.d/*.conf
-  - fix x86-64 LD_DEBUG=statistics
-- fix hwcap handling when using ld.so.cache (#118518)
-
-* Mon Mar 15 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-17
-- update from CVS
-  - implement non-_l function on top of _l functions
-
-* Thu Mar 11 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-16
-- update from CVS
-- fix s390{,x} TLS handling
-
-* Wed Mar 10 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-15
-- update from CVS
-  - special section for compatibility code
-  - make getpid () work even in vfork () child
-- configure with --enable-bind-now to avoid lazy binding in ld.so
-  and libc.so
-
-* Fri Mar  5 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-14
-- update from CVS
-  - fix iconv -c (#117021)
-  - fix PIEs on sparc/sparc64
-  - fix posix_fadvise on 64-bit architectures
-- add locale-archive as %%ghost file (#117014)
-
-* Mon Mar  1 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-13
-- update from CVS
-
-* Fri Feb 27 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-12
-- update from CVS
-
-* Fri Feb 27 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-11
-- update from CVS
-  - fix ld.so when vDSO is randomized
-
-* Fri Feb 20 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-10
-- update from CVS
-
-* Fri Feb 20 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-9
-- update from CVS
-
-* Tue Feb 10 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-8
-- update from CVS
-
-* Tue Jan 27 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-7
-- update from CVS
-  - dl_iterate_phdr extension to signal number of added/removed
-    libraries
-- fix PT_GNU_RELRO support on ppc* with prelinking
-
-* Fri Jan 23 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-6
-- rebuilt with fixed GCC on IA-64
-
-* Thu Jan 22 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-5
-- fix PT_GNU_RELRO support
-
-* Wed Jan 21 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-4
-- update from CVS
-  - some further regex speedups
-  - fix re.translate handling in regex (#112869)
-  - change regfree to match old regex behaviour (what is freed
-    and clearing of freed pointers)
-  - fix accesses to unitialized memory in regex (#113507, #113425,
-    #113421)
-  - PT_GNU_RELRO support
-
-* Tue Dec 30 2003 Jakub Jelinek <jakub@redhat.com> 2.3.3-3
-- update from CVS
-  - fix pmap_set fd and memory leak (#112726)
-- fix backreference handling in regex
-- rebuilt under glibc without the above bug to fix
-  libc.so linker script (#112738)
-
-* Mon Dec 29 2003 Jakub Jelinek <jakub@redhat.com> 2.3.3-2
-- update from CVS
-  - faster getpid () in NPTL builds
-  - fix to make pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, )
-    really disable cancellation (#112512)
-  - more regex fixes and speedups
-  - fix nextafter*/nexttoward*
-  - handle 6th syscall(3) argument on AMD64
-  - handle memalign/posix_memalign in mtrace
-  - fix linuxthreads memory leak (#112208)
-  - remove throw () from cancellation points in linuxthreads (#112602)
-  - fix NPTL unregister_atfork
-  - fix unwinding through alternate signal stacks
-
-* Mon Dec  1 2003 Jakub Jelinek <jakub@redhat.com> 2.3.3-1
-- update from CVS
-  - 2.3.3 release
-  - lots of regex fixes and speedups (#110401)
-  - fix atan2
-  - fix pshared condvars in NPTL
-  - fix pthread_attr_destroy for attributes created with
-    pthread_attr_init@GLIBC_2.0
-- for the time being, include both nb_NO* and no_NO* as locales
-  so that the distribution can catch up with the no_NO->nb_NO
-  transition
-- add BuildPrereq texinfo (#110252)
-
-* Tue Nov 18 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-102
-- update from CVS
-  - fix getifaddrs (CAN-2003-0859)
-  - fix ftw fd leak
-  - fix linuxthreads sigaction (#108634)
-  - fix glibc 2.0 stdio compatibility
-  - fix uselocale (LC_GLOBAL_LOCALE)
-  - speed up stdio locking in non-threaded programs on IA-32
-  - try to maintain correct order of cleanups between those
-    registered with __attribute__((cleanup))
-    and with LinuxThreads style pthread_cleanup_push/pop (#108631)
-  - fix segfault in regex (#109606)
-  - fix RE_ICASE multi-byte handling in regex
-  - fix pthread_exit in libpthread.a (#109790)
-  - FTW_ACTIONRETVAL support
-  - lots of regex fixes and speedups
-  - fix ceill/floorl on AMD64
-
-* Mon Oct 27 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-101
-- update from CVS
-  - fix ld.so --verify (and ldd)
-
-* Mon Oct 27 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-100
-- update from CVS
-  - fix sprof (#103727)
-  - avoid infinite loops in {,f}statvfs{,64} with hosed mounts file
-  - prevent dlopening of executables
-  - fix glob with GLOB_BRACE and without GLOB_NOESCAPE
-  - fix locale printing of word values on 64-bit big-endian arches
-    (#107846)
-  - fix getnameinfo and getaddrinfo with reverse IPv6 lookups
-    (#101261)
-
-* Wed Oct 22 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-99
-- update from CVS
-  - dl_iterate_phdr in libc.a on arches other than IA-64
-  - LD_DEBUG=statistics prints number of relative relocations
-  - fix hwcap computation
-- NPTL is now part of upstream glibc CVS
-- include {st,xh,zu}_ZA{,.UTF-8} locales
-
-* Sat Oct  4 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-98
-- update from CVS
-  - fix close, pause and fsync (#105348)
-  - fix pthread_once on IA-32
-- implement backtrace () on IA-64, handle -fomit-frame-pointer
-  in AMD64 backtrace () (#90402)
-
-* Tue Sep 30 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-97
-- update from CVS
-  - fix <sys/sysmacros.h> with C++ or -ansi or -pedantic C
-  - fix mknod/ustat return value when given bogus device number (#105768)
-
-* Fri Sep 26 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-96
-- rebuilt
-
-* Fri Sep 26 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-95
-- fix IA-64 getcontext
-
-* Thu Sep 25 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-94
-- update from CVS
-- fix syslog with non-C non-en_* locales (#61296, #104979)
-- filter GLIBC_PRIVATE symbols from glibc provides
-- fix NIS+
-
-* Thu Sep 25 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-93
-- update from CVS
-- assume 2.4.21 kernel features on RHEL/ppc*, so that
-  {make,set,get,swap}context works
-- backout execstack support for RHEL
-- build rtkaio on amd64 too
-
-* Wed Sep 24 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-92
-- update from CVS
-  - execstack/noexecstack support
-  - build nscd as PIE
-- move __libc_stack_end back to @GLIBC_2.1
-- build against elfutils >= 0.86 to fix stripping on s390x
-
-* Mon Sep 22 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-91
-- rebuilt
-
-* Mon Sep 22 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-90
-- update from CVS
-  - NPTL locking change (#102682)
-- don't jump around lock on amd64
-
-* Thu Sep 18 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-89
-- fix open_memstream/syslog (#104661)
-
-* Thu Sep 18 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-88
-- update from CVS
-  - retrieve affinity in pthread_getattr_np
-  - fix pthread_attr_[gs]etaffinity_np
-  - handle hex and octal in wordexp
-
-* Wed Sep 17 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-87
-- update from CVS
-  - truncate instead of round in utimes when utimes syscall is not available
-  - don't align stack in every glibc function unnecessarily on IA-32
-  - make sure threads have their stack 16 byte aligned on IA-32
-  - move sched_[sg]etaffinity to GLIBC_2.3.3 symbol version (#103231)
-  - fix pthread_getattr_np for the initial thread (#102683)
-  - avoid linuxthreads signal race (#104368)
-- ensure all gzip invocations are done with -n option
-
-* Fri Sep 12 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-86
-- update from CVS
-- avoid linking in libgcc_eh.a unnecessarily
-- change ssize_t back to long int on s390 -m31, unless
-  gcc 2.95.x is used
-
-* Wed Sep 10 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-85
-- update from CVS
-  - fix IA-64 memccpy (#104114)
-
-* Tue Sep  9 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-84
-- update from CVS
-  - undo broken amd64 signal context changes
-
-* Tue Sep  9 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-83
-- update from CVS
-- change *nlink_t, *ssize_t and *intptr_t types on s390 -m31 to
-  {unsigned,} int
-- change *u_quad_t, *quad_t, *qaddr_t, *dev_t, *ino64_t, *loff_t,
-  *off64_t, *rlim64_t, *blkcnt64_t, *fsblkcnt64_t, *fsfilcnt64_t
-  on 64-bit arches from {unsigned,} long long int {,*} to
-  {unsigned,} long int {,*} to restore binary compatibility
-  for C++ functions using these types as arguments
-
-* Sun Sep  7 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-82
-- rebuilt
-
-* Sat Sep  6 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-81
-- update from CVS
-  - fix tc[gs]etattr/cf[gs]et[io]speed on ppc (#102732)
-  - libio fixes
-
-* Thu Sep  4 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-80
-- update from CVS
-  - fix IA-64 cancellation when mixing __attribute__((cleanup ()))
-    and old-style pthread_cleanup_push cleanups
-
-* Tue Sep  2 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-79
-- updated from CVS
-  - lots of cancellation fixes
-  - fix posix_fadvise* on ppc32
-  - TLS layout fix
-  - optimize stdio cleanups (#103354)
-  - sparcv9 NPTL
-  - include sigset, sighold, sigrelse, sigpause and sigignore prototypes
-    in signal.h even if -D_XOPEN_SOURCE_EXTENDED (#103269)
-  - fix svc_getreqset on 64-bit big-endian arches
-  - return ENOSYS in linuxthreads pthread_barrierattr_setpshared for
-    PTHREAD_PROCESS_SHARED
-  - add pthread_cond_timedwait stubs to libc.so (#102709)
-- split glibc-devel into glibc-devel and glibc-headers to ensure
-  amd64 /usr/include always wins on amd64/i386 bi-arch installs
-- increase PTHREAD_STACK_MIN on alpha, ia64 and sparc*
-- get rid of __syscall_* prototypes and stubs in sysdeps/unix/sysv/linux
-- run make check also with linuxthreads (on IA-32 non-FLOATING_STACKS)
-  ld.so and NPTL (on IA-32 also FLOATING_STACKS linuxthreads) libraries
-  and tests
-
-* Tue Aug 25 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-78
-- include dl-osinfo.h only in glibc-debuginfo-2*.rpm, not
-  in glibc-debuginfo-common*
-
-* Mon Aug 25 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-77
-- update from CVS
-  - fix glibc 2.0 libio compatibility (#101385)
-  - fix ldconfig with /usr/lib/lib*.so symlinks (#102853)
-  - fix assert.h (#102916, #103017)
-  - make ld.so.cache identical between IA-32 and AMD64 (#102887)
-  - fix static linking of large IA-64 binaries (#102586)
-- avoid using floating point regs in lazy binding code on ppc64 (#102763)
-
-* Fri Aug 22 2003 Roland McGrath <roland@redhat.com> 2.3.2-76
-- add td_thr_tls_get_addr changes missed in initial nptl_db rewrite
-
-* Sun Aug 17 2003 Roland McGrath <roland@redhat.com> 2.3.2-74
-- nptl_db rewrite not yet in CVS
-
-* Thu Aug 14 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-72
-- update from CVS
-  - fix rtkaio aio_fsync{,64}
-  - update rtkaio for !BROKEN_THREAD_SIGNALS
-  - fix assert macro when used on pointers
-
-* Wed Aug 13 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-71
-- update from CVS
-
-* Tue Aug 12 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-70
-- update from CVS
-- disable CLONE_STOPPED for now until it is resolved
-- strip crt files
-- fix libio on arches with no < GLIBC_2.2 support (#102102, #102105)
-- fix glibc-debuginfo to include all nptl and nptl_db sources
-
-* Thu Aug  7 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-69
-- update from CVS
-  - fix pthread_create@GLIBC_2.0 (#101767)
-- __ASSUME_CLONE_STOPPED on all arches but s390* in RHEL
-
-* Sun Aug  3 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-68
-- update from CVS
-  - only use CLONE_STOPPED if kernel supports it, fix setting of thread
-    explicit scheduling (#101457)
-
-* Fri Aug  1 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-67
-- update from CVS
-  - fix utimes and futimes if kernel doesn't support utimes syscall
-  - fix s390 ssize_t type
-  - fix dlerror when called before any dlopen/dlsym
-  - update IA-64 bits/sigcontext.h (#101344)
-  - various warning fixes
-  - fix pthread.h comment typos (#101363)
-
-* Wed Jul 30 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-66
-- update from CVS
-- fix dlopen of libraries using TLS IE/LE models
-
-* Tue Jul 29 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-65
-- update from CVS
-  - fix timer_create
-  - use __extension__ before long long typedefs in <bits/types.h> (#100718)
-
-* Mon Jul 28 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-64
-- update from CVS
-  - fix wcpncpy (#99462)
-  - export _res@GLIBC_2.0 even from NPTL libc.so (__res_state ()
-    unlike __errno_location () or __h_errno_location () was introduced
-    in glibc 2.2)
-  - fix zic bug on 64-bit platforms
-  - some TLS handling fixes
-  - make ldconfig look into alternate ABI dirs by default (#99402)
-- move %{_datadir}/zoneinfo to tzdata package, so that it can be
-  errataed separately from glibc
-- new add-on - rtkaio
-- prereq libgcc, as glibc now relies on libgcc_s.so.1 for pthread_cancel
-
-* Tue Jul 15 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-63
-- fix thread cancellation on ppc64
-
-* Sat Jul 12 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-62
-- update from CVS
-  - fix thread cancellation on ppc32, s390 and s390x
-
-* Thu Jul 10 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-61
-- update from CVS
-  - build libc_nonshared.a with -fPIC instead of -fpic
-- fix ppc64 PIE support
-- add cfi directives to NPTL sysdep-cancel.h on ppc/ppc64/s390/s390x
-
-* Tue Jul  8 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-60
-- update from CVS
-
-* Thu Jul  3 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-59
-- update from CVS
-- on IA-64 use different symbols for cancellation portion of syscall
-  handlers to make gdb happier
-
-* Thu Jun 26 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-58
-- update from CVS
-  - nss_compat supporting LDAP etc.
-
-* Tue Jun 24 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-57
-- update from CVS
-
-* Thu Jun 19 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-56
-- fix condvars and semaphores in ppc* NPTL
-- fix test-skeleton.c reporting of timed-out tests (#91269)
-- increase timeouts for tests during make check
-
-* Wed Jun 18 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-55
-- make ldconfig default to both /lib+/usr/lib and /lib64+/usr/lib64
-  on bi-ABI architectures (#97557)
-- disable FUTEX_REQUEUE on ppc* temporarily
-
-* Wed Jun 18 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-54
-- update from CVS
-- fix glibc_post_upgrade on ppc
-
-* Tue Jun 17 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-53
-- update from CVS
-- fix localedef (#90659)
-- tweak linuxthreads for librt cancellation
-
-* Mon Jun 16 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-52
-- update from CVS
-
-* Thu Jun 12 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-51
-- update from CVS
-- fix <gnu/stubs.h> (#97169)
-
-* Wed Jun 11 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-50
-- update from CVS
-
-* Tue Jun 10 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-49
-- update from CVS
-  - fix pthread_cond_signal on IA-32 (#92080, #92253)
-  - fix setegid (#91567)
-- don't prelink -R libc.so on any architecture, it prohibits
-  address randomization
-
-* Fri Jun  5 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-48
-- update from CVS
-  - fix IA-64 NPTL build
-
-* Thu Jun  5 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-47
-- update from CVS
-- PT_GNU_STACK segment in binaries/executables and .note.GNU-stack
-  section in *.[oa]
-
-* Sun Jun  1 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-46
-- update from CVS
-- enable NPTL on AMD64
-- avoid using trampolines in localedef
-
-* Fri May 29 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-45
-- enable NPTL on IA-64
-
-* Fri May 29 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-44
-- update from CVS
-- enable NPTL on s390 and s390x
-- make __init_array_start etc. symbols in elf-init.oS hidden undefined
-
-* Thu May 29 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-43
-- update from CVS
-
-* Fri May 23 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-42
-- update from CVS
-
-* Tue May 20 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-41
-- update from CVS
-- use NPTL libs if uname -r contains nptl substring or is >= 2.5.69
-  or set_tid_address syscall is available instead of checking
-  AT_SYSINFO dynamic tag
-
-* Thu May 15 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-40
-- update from CVS
-
-* Wed May 14 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-39
-- update from CVS
-  - fix for prelinking of libraries with no dependencies
-
-* Tue May 13 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-38
-- update from CVS
-- enable NPTL on ppc and ppc64
-
-* Tue May  6 2003 Matt Wilson <msw@redhat.com> 2.3.2-37
-- rebuild
-
-* Sun May  4 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-36
-- update from CVS
-
-* Sat May  3 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-35
-- update from CVS
-  - make -jN build fixes
-
-* Fri May  2 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-34
-- update from CVS
-- avoid using trampolines in iconvconfig for now
-
-* Sat Apr 26 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-33
-- update from CVS
-
-* Fri Apr 25 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-32
-- update from CVS
-- more ppc TLS fixes
-
-* Wed Apr 23 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-31
-- update from CVS
-  - nscd fixes
-  - fix Bahrain spelling (#56298)
-  - fix Ukrainian collation (#83973)
-  - accept trailing spaces in /etc/ld.so.conf (#86032)
-  - perror fix (#85994)
-  - fix localedef (#88978)
-  - fix getifaddrs (#89026)
-  - fix strxfrm (#88409)
-- fix ppc TLS
-- fix getaddrinfo (#89448)
-- don't print warning about errno, h_errno or _res if
-  LD_ASSUME_KERNEL=2.4.1 or earlier
-
-* Tue Apr 15 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-30
-- update from CVS
-- fix prelink on ppc32
-- add TLS support on ppc32 and ppc64
-- make sure on -m64 arches all helper binaries are built with this
-  option
-
-* Mon Apr 14 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-29
-- update from CVS
-  - fix strxfrm (#88409)
-- use -m64 -mno-minimal-toc on ppc64
-- conflict with kernels < 2.4.20 on ppc64 and < 2.4.0 on x86_64
-- link glibc_post_upgrade against newly built libc.a
-
-* Sun Apr 13 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-28
-- update from CVS
-  - fix NPTL pthread_detach and already terminated, but not yet
-    joined thread (#88219)
-  - fix bug-regex4 testcase (#88118)
-  - reenable prelink support broken in 2.3.2-13
-  - fix register_printf_function (#88052)
-  - fix double free with fopen using ccs= (#88056)
-  - fix potential access below $esp in {set,swap}context (#88093)
-  - fix buffer underrun in gencat -H (#88099)
-  - avoid using unitialized variable in tst-tgmath (#88101)
-  - fix gammal (#88104)
-  - fix iconv -c
-  - fix xdr_string (PR libc/4999)
-  - fix /usr/lib/nptl/librt.so symlink
-  - avoid running NPTL cleanups twice in some cases
-  - unblock __pthread_signal_cancel in linuxthreads, so that
-    linuxthreads threaded programs work correctly if spawned
-    from NPTL threaded programs
-  - fix sysconf _SC_{NPROCESSORS_{CONF,ONLN},{,AV}PHYS_PAGES}
-- remove /lib/i686 directory before running ldconfig in glibc post
-  during i686 -> i386 glibc "upgrades" (#88456)
-
-* Wed Apr  2 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-22
-- update from CVS
-  - add pthread_atfork to libpthread.a
-
-* Tue Apr  1 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-21
-- update from CVS
-- make sure linuxthreads pthread_mutex_lock etc. is not a cancellation
-  point
-
-* Sat Mar 29 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-20
-- update from CVS
-- if kernel >= 2.4.1 doesn't support NPTL, fall back to
-  /lib/i686 libs on i686, not stright to /lib
-
-* Fri Mar 28 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-19
-- update from CVS
-  - timers fixes
-
-* Thu Mar 27 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-18
-- update from CVS
-- fix NPTL pthread_cond_timedwait
-- fix sysconf (_SC_MONOTONIC_CLOCK)
-- use /%%{_lib}/tls instead of /lib/tls on x86-64
-- add /%{_lib}/tls/librt*so* and /%{_lib}/i686/librt*so*
-- display content of .out files for all make check failures
-
-* Wed Mar 26 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-17
-- update from CVS
-  - kernel POSIX timers support
-
-* Sat Mar 22 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-16
-- update from CVS
-  - export __fork from glibc again
-- fix glibc-compat build in NPTL
-- fix c_stubs
-- fix some more atomic.h problems
-- don't check abi in glibc-compat libs
-
-* Fri Mar 21 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-15
-- update from CVS
-- build glibc-compat (for glibc 2.0 compatibility) and c_stubs add-ons
-- condrestart sshd in glibc_post_upgrade so that the user can
-  log in remotely and handle the rest (#86339)
-- fix a typo in glibc_post_upgrade on sparc
-
-* Tue Mar 18 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-14
-- update from CVS
-- change i686/athlon libc.so.6 base to 0x00e80000
-
-* Mon Mar 17 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-13
-- update from CVS
-  - hopefully last fix for condvar problems
-
-* Fri Mar 14 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-12
-- fix bits/syscall.h creation on x86-64
-
-* Thu Mar 13 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-11
-- update from CVS
-
-* Wed Mar 12 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-10
-- update from CVS
-
-* Tue Mar 11 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-9
-- update from CVS
-- fix glibc-debug description (#85111)
-- make librt.so a symlink again, not linker script
-
-* Tue Mar  4 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-8
-- update from CVS
-- remove the workarounds for broken software accessing GLIBC_PRIVATE
-  symbols
-
-* Mon Mar  3 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-7
-- update from CVS
-
-* Sun Mar  2 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-6
-- fix TLS IE/LE model handling in dlopened libraries
-  on TCB_AT_TP arches
-
-* Thu Feb 25 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-5
-- update from CVS
-
-* Tue Feb 25 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-4
-- update from CVS
-
-* Mon Feb 24 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-3
-- update from CVS
-- only warn about errno, h_errno or _res for binaries, never
-  libraries
-- rebuilt with gcc-3.2.2-4 to use direct %gs TLS access insn sequences
-
-* Sun Feb 23 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-2
-- update from CVS
-
-* Sat Feb 22 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-1
-- update from CVS
-
-* Thu Feb 20 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-51
-- update from CVS
-
-* Wed Feb 19 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-50
-- update from CVS
-
-* Wed Feb 19 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-49
-- update from CVS
-- remove nisplus and nis from the default nsswitch.conf (#67401, #9952)
-
-* Tue Feb 18 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-48
-- update from CVS
-
-* Sat Feb 15 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-47
-- update from CVS
-
-* Fri Feb 14 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-46
-- update from CVS
-  - pthread_cond* NPTL fixes, new NPTL testcases
-
-* Thu Feb 13 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-45
-- update from CVS
-- include also linuxthreads FLOATING_STACKS libs on i686 and athlon:
-  LD_ASSUME_KERNEL=2.2.5 to LD_ASSUME_KERNEL=2.4.0 is non-FLOATING_STACKS lt,
-  LD_ASSUME_KERNEL=2.4.1 to LD_ASSUME_KERNEL=2.4.19 is FLOATING_STACKS lt,
-  later is NPTL
-- enable TLS on alpha/alphaev6
-- add BuildPreReq: /usr/bin/readlink
-
-* Tue Feb 11 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-44
-- update from CVS
-  - pthread_once fix
-
-* Mon Feb 10 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-43
-- update from CVS
-- vfork fix on s390
-- rebuilt with binutils 2.13.90.0.18-5 so that accesses to errno
-  don't bind locally (#83325)
-
-* Thu Feb 06 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-42
-- update from CVS
-- fix pthread_create after vfork+exec in linuxthreads
-
-* Wed Feb 05 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-41
-- update from CVS
-
-* Thu Jan 30 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-40
-- update from CVS
-
-* Wed Jan 29 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-39
-- update from CVS
-- enable TLS on s390{,x} and sparc{,v9}
-
-* Fri Jan 17 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-38
-- update from CVS
-- initialize __environ in glibc_post_upgrade to empty array,
-  so that it is not NULL
-- compat symlink for s390x /lib/ld64.so.1
-- enable glibc-profile on x86-64
-- only include libNoVersion.so on IA-32, Alpha and Sparc 32-bit
-
-* Thu Jan 16 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-37
-- update from CVS
-  - nscd fixes, *scanf fix
-- fix %%nptlarches noarch build (#81909)
-- IA-64 TLS fixes
-
-* Tue Jan 14 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-36
-- update from CVS
-- rework -debuginfo subpackage, add -debuginfo-common
-  subpackage on IA-32, Alpha and Sparc (ie. auxiliary arches)
-- fix vfork in libc.a on PPC32, Alpha, Sparc
-- fix libio locks in linuxthreads libc.so if libpthread.so
-  is dlopened later (#81374)
-
-* Mon Jan 13 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-35
-- update from CVS
-  - dlclose bugfixes
-- fix NPTL libpthread.a
-- fix glibc_post_upgrade on several arches
-
-* Sat Jan 11 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-34
-- update from CVS
-- TLS support on IA-64
-
-* Wed Jan  8 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-33
-- fix vfork in linuxthreads (#81377, #81363)
-
-* Tue Jan  7 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-32
-- update from CVS
-- don't use TLS libs if kernel doesn't set AT_SYSINFO
-  (#80921, #81212)
-- add ntp_adjtime on alpha (#79996)
-- fix nptl_db (#81116)
-
-* Sun Jan  5 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-31
-- update from CVS
-- support all architectures again
-
-* Fri Jan  3 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-30
-- fix condvar compatibility wrappers
-- add ugly hack to use non-TLS libs if a binary is seen
-  to have errno, h_errno or _res symbols in .dynsym
-
-* Fri Jan  3 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-29
-- update from CVS
-  - fixes for new condvar
-
-* Thu Jan  2 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-28
-- new NPTL condvar implementation plus related linuxthreads
-  symbol versioning updates
-
-* Thu Jan  2 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-27
-- update from CVS
-- fix #include <sys/stat.h> with -D_BSD_SOURCE or without
-  feature set macros
-- make *sigaction, sigwait and raise the same between
-  -lpthread -lc and -lc -lpthread in linuxthreads builds
-
-* Tue Dec 31 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-26
-- fix dlclose
-
-* Sun Dec 29 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-25
-- enable sysenter by default for now
-- fix endless loop in ldconfig
-
-* Sat Dec 28 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-24
-- update from CVS
-
-* Fri Dec 27 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-23
-- update from CVS
-  - fix ptmalloc_init after clearenv (#80370)
-
-* Sun Dec 22 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-22
-- update from CVS
-- add IA-64 back
-- move TLS libraries from /lib/i686 to /lib/tls
-
-* Thu Dec 19 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-21
-- system(3) fix for linuxthreads
-- don't segfault in pthread_attr_init from libc.so
-- add cancellation tests from nptl to linuxthreads
-
-* Wed Dec 18 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-20
-- fix up lists of exported symbols + their versions
-  from the libraries
-
-* Wed Dec 18 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-19
-- fix --with-tls --enable-kernel=2.2.5 libc on IA-32
-
-* Wed Dec 18 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-18
-- update from CVS
-  - fix NPTL hanging mozilla
-  - initialize malloc in mALLOPt (fixes problems with squid, #79957)
-  - make linuxthreads work with dl_dynamic_weak 0
-  - clear dl_dynamic_weak everywhere
-
-* Tue Dec 17 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-17
-- update from CVS
-  - NPTL socket fixes, flockfile/ftrylockfile/funlockfile fix
-  - kill -debug sub-package, rename -debug-static to -debug
-  - clear dl_dynamic_weak for NPTL
-
-* Mon Dec 16 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-16
-- fix <bits/mathinline.h> and <bits/nan.h> for C++
-- automatically generate NPTL libpthread wrappers
-
-* Mon Dec 16 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-15
-- update from CVS
-  - all functions which need cancellation should now be cancellable
-    both in libpthread.so and libc.so
-  - removed @@GLIBC_2.3.2 cancellation wrappers
-
-* Fri Dec 13 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-14
-- update from CVS
-  - replace __libc_lock_needed@GOTOFF(%ebx) with
-    %gs:offsetof(tcbhead_t, multiple_threads)
-  - start of new NPTL cancellation wrappers
-
-* Thu Dec 12 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-13
-- update from CVS
-- use inline locks in malloc
-
-* Tue Dec 10 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-12
-- update from CVS
-  - support LD_ASSUME_KERNEL=2.2.5 in statically linked programs
-
-* Mon Dec  9 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-11
-- update from CVS
-- rebuilt with gcc-3.2.1-2
-
-* Fri Dec  6 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-10
-- update from CVS
-- non-nptl --with-tls --without-__thread FLOATING_STACKS libpthread
-  should work now
-- faster libc locking when using nptl
-- add OUTPUT_FORMAT to linker scripts
-- fix x86_64 sendfile (#79111)
-
-* Wed Dec  4 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-9
-- update from CVS
-  - RUSCII support (#78906)
-- for nptl builds add BuildRequires
-- fix byteswap.h for non-gcc (#77689)
-- add nptl-devel package
-
-* Tue Dec  3 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-8
-- update from CVS
-  - make --enable-kernel=2.2.5 --with-tls --without-__thread
-    ld.so load nptl and other --with-__thread libs
-- disable nptl by default for now
-
-* Wed Nov 27 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-7
-- update from CVS
-- restructured redhat/Makefile and spec, so that src.rpm contains
-  glibc-<date>.tar.bz2, glibc-redhat-<date>.tar.bz2 and glibc-redhat.patch
-- added nptl
-
-* Fri Nov  8 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-6
-- update from CVS
-  - even more regex fixes
-- run sed testsuite to check glibc regex
-
-* Thu Oct 24 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-5
-- fix LD_DEBUG=statistics and LD_TRACE_PRELINKING in programs
-  using libpthread.so.
-
-* Thu Oct 24 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-4
-- update from CVS
-  - fixed %a and %A in *printf (#75821)
-  - fix re_comp memory leaking (#76594)
-
-* Tue Oct 22 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-3
-- update from CVS
-  - some more regex fixes
-- fix libpthread.a (#76484)
-- fix locale-archive enlarging
-
-* Fri Oct 18 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-2
-- update from CVS
-  - don't need to use 128K of stacks for DNS lookups
-  - regex fixes
-  - updated timezone data e.g. for this year's Brasil DST
-    changes
-  - expand ${LIB} in RPATH/RUNPATH/dlopen filenames
-
-* Fri Oct 11 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-1
-- update to 2.3.1 final
-  - support really low thread stack sizes (#74073)
-- tzdata update
-
-* Wed Oct  9 2002 Jakub Jelinek <jakub@redhat.com> 2.3-2
-- update from CVS
-  - handle low stack limits
-  - move s390x into */lib64
-
-* Thu Oct  3 2002 Jakub Jelinek <jakub@redhat.com> 2.3-1
-- update to 2.3 final
-  - fix freopen on libstdc++ <= 2.96 stdin/stdout/stderr (#74800)
-
-* Sun Sep 29 2002 Jakub Jelinek <jakub@redhat.com> 2.2.94-3
-- don't prelink -r libc.so on ppc/x86-64/sparc*, it doesn't
-  speed things up, because they are neither REL arches, nor
-  ELF_MACHINE_REL_RELATIVE
-- fix sparc64 build
-
-* Sun Sep 29 2002 Jakub Jelinek <jakub@redhat.com> 2.2.94-2
-- update from CVS
-
-* Sat Sep 28 2002 Jakub Jelinek <jakub@redhat.com> 2.2.94-1
-- update from CVS
-- prelink on ppc and x86-64 too
-- don't remove ppc memset
-- instead of listing on which arches to remove glibc-compat
-  list where it should stay
-
-* Fri Sep  6 2002 Jakub Jelinek <jakub@redhat.com> 2.2.93-5
-- fix wcsmbs functions with invalid character sets (or malloc
-  failures)
-- make sure __ctype_b etc. compat vars are updated even if
-  they are copy relocs in the main program
-
-* Thu Sep  5 2002 Jakub Jelinek <jakub@redhat.com> 2.2.93-4
-- fix /lib/libnss1_dns.so.1 (missing __set_h_errno definition
-  leading to unresolved __set_h_errno symbol)
-
-* Wed Sep  4 2002 Jakub Jelinek <jakub@redhat.com> 2.2.93-3
-- security fix - increase dns-network.c MAXPACKET to at least
-  65536 to avoid buffer overrun. Likewise glibc-compat
-  dns-{host,network}.c.
-
-* Tue Sep  3 2002 Jakub Jelinek <jakub@redhat.com> 2.2.93-2
-- temporarily add back __ctype_b, __ctype_tolower and __ctype_toupper to
-  libc.a and export them as @@GLIBC_2.0 symbols, not @GLIBC_2.0
-  from libc.so - we have still lots of .a libraries referencing
-  __ctype_{b,tolower,toupper} out there...
-
-* Tue Sep  3 2002 Jakub Jelinek <jakub@redhat.com> 2.2.93-1
-- update from CVS
-  - 2.2.93 release
-  - use double instead of single indirection in isXXX macros
-  - per-locale wcsmbs conversion state
-
-* Sat Aug 31 2002 Jakub Jelinek <jakub@redhat.com> 2.2.92-2
-- update from CVS
-  - fix newlocale/duplocale/uselocale
-- disable profile on x86_64 for now
-
-* Sat Aug 31 2002 Jakub Jelinek <jakub@redhat.com> 2.2.92-1
-- update from CVS
-  - 2.2.92 release
-  - fix gettext after uselocale
-  - fix locales in statically linked threaded programs
-  - fix NSS
-
-* Thu Aug 29 2002 Jakub Jelinek <jakub@redhat.com> 2.2.91-1
-- update from CVS
-  - 2.2.91 release
-  - fix fd leaks in locale-archive reader (#72043)
-- handle EROFS in build-locale-archive gracefully (#71665)
-
-* Wed Aug 28 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-27
-- update from CVS
-  - fix re_match (#72312)
-- support more than 1024 threads
-
-* Fri Aug 23 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-26
-- update from CVS
-  - fix i386 build
-
-* Thu Aug 22 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-25
-- update from CVS
-  - fix locale-archive loading hang on some (non-primary) locales
-    (#72122, #71878)
-  - fix umount problems with locale-archives when /usr is a separate
-    partition (#72043)
-- add LICENSES file
-
-* Fri Aug 16 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-24
-- update from CVS
-  - only mmap up to 2MB of locale-archive on 32-bit machines
-    initially
-  - fix fseek past end + fread segfault with mmaped stdio
-- include <sys/debugreg.h> which is mistakenly not included
-  in glibc-devel on IA-32
-
-* Fri Aug 16 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-23
-- don't return normalized locale name in setlocale when using
-  locale-archive
-
-* Thu Aug 15 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-22
-- update from CVS
-  - optimize for primary system locale
-- localedef fixes (#71552, #67705)
-
-* Wed Aug 14 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-21
-- fix path to locale-archive in libc reader
-- build locale archive at glibc-common %post time
-- export __strtold_internal and __wcstold_internal on Alpha again
-- workaround some localedata problems
-
-* Tue Aug 13 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-20
-- update from CVS
-- patch out set_thread_area for now
-
-* Fri Aug  9 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-19
-- update from CVS
-- GB18030 patch from Yu Shao
-- applied Debian patch for getaddrinfo IPv4 vs. IPv6
-- fix regcomp (#71039)
-
-* Sun Aug  4 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-18
-- update from CVS
-- use /usr/sbin/prelink, not prelink (#70376)
-
-* Thu Jul 25 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-17
-- update from CVS
-
-* Thu Jul 25 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-16
-- update from CVS
-  - ungetc fix (#69586)
-  - fseek errno fix (#69589)
-  - change *etrlimit prototypes for C++ (#68588)
-- use --without-tls instead of --disable-tls
-
-* Thu Jul 11 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-15
-- set nscd user's shell to /sbin/nologin (#68369)
-- fix glibc-compat buffer overflows (security)
-- buildrequire prelink, don't build glibc's own copy of it (#67567)
-- update from CVS
-  - regex fix (#67734)
-  - fix unused warnings (#67706)
-  - fix freopen with mmap stdio (#67552)
-  - fix realloc (#68499)
-
-* Tue Jun 25 2002 Bill Nottingham <notting@redhat.com> 2.2.90-14
-- update from CVS
-  - fix argp on long words
-  - update atime in libio
-
-* Sat Jun 22 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-13
-- update from CVS
-  - a thread race fix
-  - fix readdir on invalid dirp
-
-* Wed Jun 19 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-12
-- update from CVS
-  - don't use __thread in headers
-- fix system(3) in threaded apps
-- update prelink, so that it is possible to prelink -u libc.so.6.1
-  on Alpha
-
-* Fri Jun  7 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-11
-- update from CVS
-  - fix __moddi3 (#65612, #65695)
-  - fix ether_line (#64427)
-- fix setvbuf with mmap stdio (#65864)
-- --disable-tls for now, waiting for kernel
-- avoid duplication of __divtf3 etc. on IA-64
-- make sure get*ent_r and _IO_wfile_jumps are exported (#62278)
-
-* Tue May 21 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-10
-- update from CVS
-  - fix Alpha pthread bug with gcc 3.1
-
-* Fri Apr 19 2002 Jakub Jelinek <jakub@redhat.com> 2.2.5-35
-- fix nice
-
-* Mon Apr 15 2002 Jakub Jelinek <jakub@redhat.com> 2.2.5-34
-- add relocation dependencies even for weak symbols (#63422)
-- stricter check_fds check for suid/sgid binaries
-- run make check at %%install time
-
-* Sat Apr 13 2002 Jakub Jelinek <jakub@redhat.com> 2.2.5-33
-- handle Dec 31 1969 in mktime for timezones west of GMT (#63369)
-- back out do-lookup.h change (#63261, #63305)
-- use "memory" clobber instead all the fancy stuff in i386/i686/bits/string.h
-  since lots of compilers break on it
-- fix sparc build with gcc 3.1
-- fix spec file for athlon
-
-* Tue Apr  9 2002 Jakub Jelinek <jakub@redhat.com> 2.2.5-32
-- fix debugging of threaded apps (#62804)
-- fix DST for Estonia (#61494)
-- document that pthread_mutexattr_?etkind_np are deprecated
-  and pthread_mutexattr_?ettype should be used instead in man
-  pages (#61485)
-- fix libSegFault.so undefined externals
-
-* Fri Apr  5 2002 Jakub Jelinek <jakub@redhat.com> 2.2.5-31
-- temporarily disable prelinking ld.so, as some statically linked
-  binaries linked against debugging versions of old glibcs die on it
-  (#62352)
-- fix <semaphore.h> for -std=c99 (#62516)
-- fix ether_ntohost segfault (#62397)
-- remove in glibc_post_upgrade on i386 all /lib/i686/libc-*.so,
-  /lib/i686/libm-*.so and /lib/i686/libpthread-*.so, not just current
-  version (#61633)
-- prelink -r on alpha too
-
-* Thu Mar 28 2002 Jakub Jelinek <jakub@redhat.com> 2.2.5-30
-- update GB18030 iconv module (Yu Shao)
-
-* Tue Mar 26 2002 Jakub Jelinek <jakub@redhat.com> 2.2.5-29
-- features.h fix
-
-* Tue Mar 26 2002 Jakub Jelinek <jakub@redhat.com> 2.2.5-28
-- update from CVS
-  - fix nscd with huge groups
-  - fix nis to not close fds it shouldn't
-- rebuilt against newer glibc-kernheaders to use the correct
-  PATH_MAX
-- handle .athlon.rpm glibc the same way as .i686.rpm
-- add a couple of .ISO-8859-15 locales (#61922)
-- readd temporarily currencies which were superceeded by Euro
-  into the list of accepted currencies by localedef to make
-  standard conformance testsuites happy
-- temporarily moved __libc_waitpid back to make Sun JDK happy
-- use old malloc code
-- prelink i686/athlon ld.so and prelink -r i686/athlon libc.so
-
-* Thu Mar 14 2002 Jakub Jelinek <jakub@redhat.com> 2.2.5-27
-- update from CVS
-  - fix DST handling for southern hemisphere (#60747)
-  - fix daylight setting for tzset (#59951)
-  - fix ftime (#60350)
-  - fix nice return value
-  - fix a malloc segfault
-- temporarily moved __libc_wait, __libc_fork and __libc_stack_end
-  back to what they used to be exported at
-- censorship (#60758)
-
-* Thu Feb 28 2002 Jakub Jelinek <jakub@redhat.com> 2.2.5-26
-- update from CVS
-- use __attribute__((visibility(...))) if supported, use _rtld_local
-  for ld.so only objects
-- provide libc's own __{,u}{div,mod}di3
-
-* Wed Feb 27 2002 Jakub Jelinek <jakub@redhat.com> 2.2.5-25
-- switch back to 2.2.5, mmap stdio needs work
-
-* Mon Feb 25 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-8
-- fix two other mmap stdio bugs (#60228)
-
-* Thu Feb 21 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-7
-- fix yet another mmap stdio bug (#60145)
-
-* Tue Feb 19 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-6
-- fix mmap stdio bug (seen on ld as File truncated error, #60043)
-- apply Andreas Schwab's fix for pthread sigwait
-- remove /lib/i686/ libraries in glibc_post_upgrade when
-  performing i386 glibc install
-
-* Thu Feb 14 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-5
-- update to CVS
-- added glibc-utils subpackage
-- disable autoreq in glibc-debug
-- readd %%lang() to locale files
-
-* Fri Feb  7 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-4
-- update to CVS
-- move glibc private symbols to GLIBC_PRIVATE symbol version
-
-* Wed Jan  9 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-3
-- fix a sqrt bug on alpha which caused SHN_UNDEF $__full_ieee754_sqrt..ng
-  symbol in libm
-
-* Tue Jan  8 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-2
-- add debug-static package
-
-* Mon Dec 31 2001 Jakub Jelinek <jakub@redhat.com> 2.2.90-1
-- update from CVS
-- remove -D__USE_STRING_INLINES
-- add debug subpackage to trim glibc and glibc-devel size
-
-* Wed Oct  3 2001 Jakub Jelinek <jakub@redhat.com> 2.2.4-19
-- fix strsep
-
-* Fri Sep 28 2001 Jakub Jelinek <jakub@redhat.com> 2.2.4-18
-- fix a ld.so bug with duplicate searchlists in l_scope
-- fix erfcl(-inf)
-- turn /usr/lib/librt.so into linker script
-
-* Wed Sep 26 2001 Jakub Jelinek <jakub@redhat.com> 2.2.4-17
-- fix a ld.so lookup bug after lots of dlopen calls
-- fix CMSG_DATA for non-gcc non-ISOC99 compilers (#53984)
-- prelinking support for Sparc64
-
-* Fri Sep 21 2001 Jakub Jelinek <jakub@redhat.com> 2.2.4-16
-- update from CVS to fix DT_SYMBOLIC
-- prelinking support for Alpha and Sparc
-
-* Tue Sep 18 2001 Jakub Jelinek <jakub@redhat.com> 2.2.4-15
-- update from CVS
-  - linuxthreads now retries if -1/EINTR is returned from
-    reading or writing to thread manager pipe (#43742)
-- use DT_FILTER in librt.so (#53394)
-  - update glibc prelink patch so that it handles filters
-- fix timer_* with SIGEV_NONE (#53494)
-- make glibc_post_upgrade work on PPC (patch from Franz Sirl)
-
-* Mon Sep 10 2001 Jakub Jelinek <jakub@redhat.com> 2.2.4-14
-- fix build on sparc32
-- 2.2.4-13 build for some reason missed some locales
-  on alpha/ia64
-
-* Mon Sep  3 2001 Jakub Jelinek <jakub@redhat.com> 2.2.4-13
-- fix iconvconfig
-
-* Mon Sep  3 2001 Jakub Jelinek <jakub@redhat.com> 2.2.4-12
-- add fam to /etc/rpc (#52863)
-- fix <inttypes.h> for C++ (#52960)
-- fix perror
-
-* Mon Aug 27 2001 Jakub Jelinek <jakub@redhat.com> 2.2.4-11
-- fix strnlen(x, -1)
-
-* Mon Aug 27 2001 Jakub Jelinek <jakub@redhat.com> 2.2.4-10
-- doh, <bits/libc-lock.h> should only define __libc_rwlock_t
-  if __USE_UNIX98.
-
-* Mon Aug 27 2001 Jakub Jelinek <jakub@redhat.com> 2.2.4-9
-- fix bits/libc-lock.h so that gcc can compile
-- fix s390 build
-
-* Fri Aug 24 2001 Jakub Jelinek <jakub@redhat.com> 2.2.4-8
-- kill stale library symlinks in ldconfig (#52350)
-- fix inttypes.h for G++ < 3.0
-- use DT_REL*COUNT
-
-* Wed Aug 22 2001 Jakub Jelinek <jakub@redhat.com> 2.2.4-7
-- fix strnlen on IA-64 (#50077)
-
-* Thu Aug 16 2001 Jakub Jelinek <jakub@redhat.com> 2.2.4-6
-- glibc 2.2.4 final
-- fix -lpthread -static (#51672)
-
-* Fri Aug 10 2001 Jakub Jelinek <jakub@redhat.com> 2.2.4-5
-- doh, include libio/tst-swscanf.c
-
-* Fri Aug 10 2001 Jakub Jelinek <jakub@redhat.com> 2.2.4-4
-- don't crash on catclose(-1)
-- fix wscanf %[] handling
-- fix return value from swprintf
-- handle year + %U/%W week + week day in strptime
-
-* Thu Aug  9 2001 Jakub Jelinek <jakub@redhat.com> 2.2.4-3
-- update from CVS to
-  - fix strcoll (#50548)
-  - fix seekdir (#51132)
-  - fix memusage (#50606)
-- don't make gconv-modules.cache %%config file, just don't verify
-  its content.
-
-* Mon Aug  6 2001 Jakub Jelinek <jakub@redhat.com>
-- fix strtod and *scanf (#50723, #50724)
-
-* Sat Aug  4 2001 Jakub Jelinek <jakub@redhat.com>
-- update from CVS
-  - fix iconv cache handling
-- glibc should not own %{_infodir}, %{_mandir} nor %{_mandir}/man3 (#50673)
-- add gconv-modules.cache as emtpy config file (#50699)
-- only run iconvconfig if /usr is mounted read-write (#50667)
-
-* Wed Jul 25 2001 Jakub Jelinek <jakub@redhat.com>
-- move iconvconfig from glibc-common into glibc subpackage,
-  call it from glibc_post_upgrade instead of common's post.
-
-* Tue Jul 24 2001 Jakub Jelinek <jakub@redhat.com>
-- turn off debugging printouts in iconvconfig
-
-* Tue Jul 24 2001 Jakub Jelinek <jakub@redhat.com>
-- update from CVS
-  - fix IA-32 makecontext
-  - make fflush(0) thread-safe (#46446)
-
-* Mon Jul 23 2001 Jakub Jelinek <jakub@redhat.com>
-- adjust prelinking DT_* and SHT_* values in elf.h
-- update from CVS
-  - iconv cache
-  - make iconv work in SUID/SGID programs (#34611)
-
-* Fri Jul 20 2001 Jakub Jelinek <jakub@redhat.com>
-- update from CVS
-  - kill non-pic code in libm.so
-  - fix getdate
-  - fix some locales (#49402)
-- rebuilt with binutils-2.11.90.0.8-5 to place .interp section
-  properly in libBrokenLocale.so, libNoVersion.so and libanl.so
-- add floating stacks on IA-64, Alpha, Sparc (#49308)
-
-* Mon Jul 16 2001 Jakub Jelinek <jakub@redhat.com>
-- make /lib/i686 directory owned by glibc*.i686.rpm
-
-* Mon Jul  9 2001 Jakub Jelinek <jakub@redhat.com>
-- remove rquota.[hx] headers which are now provided by quota (#47141)
-- add prelinking patch
-
-* Thu Jul  5 2001 Jakub Jelinek <jakub@redhat.com>
-- require sh-utils for nscd
-
-* Mon Jun 25 2001 Jakub Jelinek <jakub@redhat.com>
-- update from CVS (#43681, #43350, #44663, #45685)
-- fix ro_RO bug (#44644)
-
-* Wed Jun  6 2001 Jakub Jelinek <jakub@redhat.com>
-- fix a bunch of math bugs (#43210, #43345, #43346, #43347, #43348, #43355)
-- make rpc headers -ansi compilable (#42390)
-- remove alphaev6 optimized memcpy, since there are still far too many
-  broken apps which call memcpy where they should call memmove
-- update from CVS to (among other things):
-  - fix tanhl bug (#43352)
-
-* Tue May 22 2001 Jakub Jelinek <jakub@redhat.com>
-- fix #include <signal.h> with -D_XOPEN_SOURCE=500 on ia64 (#35968)
-- fix a dlclose reldeps handling bug
-- some more profiling fixes
-- fix tgmath.h
-
-* Thu May 17 2001 Jakub Jelinek <jakub@redhat.com>
-- make ldconfig more quiet
-- fix LD_PROFILE on i686 (#41030)
-
-* Wed May 16 2001 Jakub Jelinek <jakub@redhat.com>
-- fix the hardlink program, so that it really catches all files with
-  identical content
-- add a s390x clone fix
-
-* Wed May 16 2001 Jakub Jelinek <jakub@redhat.com>
-- fix rpc for non-threaded apps using svc_fdset and similar variables (#40409)
-- fix nss compatibility DSO versions for alphaev6
-- add a hardlink program instead of the shell 3x for plus cmp -s/link
-  which takes a lot of time during build
-- rework BuildPreReq and Conflicts with gcc, so that
-  it applies only where it has to
-
-* Fri May 11 2001 Jakub Jelinek <jakub@redhat.com>
-- fix locale name of ja_JP in UTF-8 (#39783)
-- fix re_search_2 (#40244)
-- fix memusage script (#39138, #39823)
-- fix dlsym(RTLD_NEXT, ) from main program (#39803)
-- fix xtrace script (#39609)
-- make glibc conflict with glibc-devel 2.2.2 and below (to make sure
-  libc_nonshared.a has atexit)
-- fix getconf LFS_CFLAGS on 64bitters
-- recompile with gcc-2.96-84 or above to fix binary compatibility problem
-  with __frame_state_for function (#37933)
-
-* Fri Apr 27 2001 Jakub Jelinek <jakub@redhat.com>
-- glibc 2.2.3 release
-  - fix strcoll (#36539)
-- add BuildPreReqs (#36378)
-
-* Wed Apr 25 2001 Jakub Jelinek <jakub@redhat.com>
-- update from CVS
-
-* Fri Apr 20 2001 Jakub Jelinek <jakub@redhat.com>
-- update from CVS
-  - fix sparc64, ia64
-  - fix some locale syntax errors (#35982)
-
-* Wed Apr 18 2001 Jakub Jelinek <jakub@redhat.com>
-- update from CVS
-
-* Wed Apr 11 2001 Jakub Jelinek <jakub@redhat.com>
-- update from CVS
-
-* Fri Apr  6 2001 Jakub Jelinek <jakub@redhat.com>
-- support even 2.4.0 kernels on ia64, sparc64 and s390x
-- include UTF-8 locales
-- make gconv-modules %%config(noreplace)
-
-* Fri Mar 23 2001 Jakub Jelinek <jakub@redhat.com>
-- back out sunrpc changes
-
-* Wed Mar 21 2001 Jakub Jelinek <jakub@redhat.com>
-- update from CVS
-  - fix ia64 build
-  - fix pthread_getattr_np
-
-* Fri Mar 16 2001 Jakub Jelinek <jakub@redhat.com>
-- update from CVS
-  - run atexit() registered functions at dlclose time if they are in shared
-    libraries (#28625)
-  - add pthread_getattr_np API to make JVM folks happy
-
-* Wed Mar 14 2001 Jakub Jelinek <jakub@redhat.com>
-- require 2.4.1 instead of 2.4.0 on platforms where it required 2.4 kernel
-- fix ldd behaviour on unresolved symbols
-- remove nonsensical ldconfig warning, update osversion for the most
-  recent library with the same soname in the same directory instead (#31703)
-- apply selected patches from CVS
-- s390x spec file changes from Florian La Roche
-
-* Wed Mar  7 2001 Jakub Jelinek <jakub@redhat.com>
-- fix gencat (#30894)
-- fix ldconfig changes from yesterday, fix LD_ASSUME_KERNEL handling
-
-* Tue Mar  6 2001 Jakub Jelinek <jakub@redhat.com>
-- update from CVS
-- make pthread_attr_setstacksize consistent before and after pthread manager
-  is started (#28194)
-- pass back struct sigcontext from pthread signal wrapper (on ia32 only so
-  far, #28493)
-- on i686 ship both --enable-kernel 2.2.5 and 2.4.0 libc/libm/libpthread,
-  make ld.so pick the right one
-
-* Sat Feb 17 2001 Preston Brown <pbrown@redhat.com>
-- glib-common doesn't require glibc, until we can figure out how to get out of \
                dependency hell.
-
-* Sat Feb 17 2001 Jakub Jelinek <jakub@redhat.com>
-- make glibc require particular version of glibc-common
-  and glibc-common prerequire glibc.
-
-* Fri Feb 16 2001 Jakub Jelinek <jakub@redhat.com>
-- glibc 2.2.2 release
-  - fix regex REG_ICASE bug seen in ksymoops
-
-* Sat Feb 10 2001 Jakub Jelinek <jakub@redhat.com>
-- fix regexec leaking memory (#26864)
-
-* Fri Feb  9 2001 Jakub Jelinek <jakub@redhat.com>
-- update from CVS
-  - fix ia64 build with gnupro
-  - make regex 64bit clean
-  - fix tgmath make check failures on alpha
-
-* Tue Feb  6 2001 Jakub Jelinek <jakub@redhat.com>
-- update again for ia64 DF_1_INITFIRST
-
-* Fri Feb  2 2001 Jakub Jelinek <jakub@redhat.com>
-- update from CVS
-  - fix getaddrinfo (#25437)
-  - support DF_1_INITFIRST (#25029)
-
-* Wed Jan 24 2001 Jakub Jelinek <jakub@redhat.com>
-- build all auxiliary arches with --enablekernel 2.4.0, those wanting
-  to run 2.2 kernels can downgrade to the base architecture glibc.
-
-* Sat Jan 20 2001 Jakub Jelinek <jakub@redhat.com>
-- remove %%lang() flags from %%{_prefix}/lib/locale files temporarily
-
-* Sun Jan 14 2001 Jakub Jelinek <jakub@redhat.com>
-- update to 2.2.1 final
-  - fix a pthread_kill_other_threads_np breakage (#23966)
-  - make static binaries using dlopen work on ia64 again
-- fix a typo in glibc-common group
-
-* Wed Jan 10 2001 Bernhard Rosenkraenzer <bero@redhat.com>
-- devel requires glibc = %%{version}
-- noreplace /etc/nscd.conf
-
-* Wed Jan 10 2001 Jakub Jelinek <jakub@redhat.com>
-- some more security fixes:
-  - don't look up LD_PRELOAD libs in cache for SUID apps
-    (because that bypasses SUID bit checking on the library)
-  - place output files for profiling SUID apps into /var/profile,
-    use O_NOFOLLOW for them
-  - add checks for $MEMUSAGE_OUTPUT and $SEGFAULT_OUTPUT_NAME
-- hardlink identical locale files together
-- add %%lang() tags to locale stuff
-- remove ko_KR.utf8 for now, it is provided by locale-utf8 package
-
-* Mon Jan  8 2001 Jakub Jelinek <jakub@redhat.com>
-- add glibc-common subpackage
-- fix alphaev6 memcpy (#22494)
-- fix sys/cdefs.h (#22908)
-- don't define stdin/stdout/stderr as macros for -traditional (#22913)
-- work around a bug in IBM JDK (#22932, #23012)
-- fix pmap_unset when network is down (#23176)
-- move nscd in rc.d before netfs on shutdown
-- fix $RESOLV_HOST_CONF in SUID apps (#23562)
-
-* Fri Dec 15 2000 Jakub Jelinek <jakub@redhat.com>
-- fix ftw and nftw
-
-* Wed Dec 13 2000 Jakub Jelinek <jakub@redhat.com>
-- fix fcvt (#22184)
-- ldd /lib/ld-linux.so.2 is not crashing any longer again (#22197)
-- fix gencat
-
-* Mon Dec 11 2000 Jakub Jelinek <jakub@redhat.com>
-- fix alpha htonl and alphaev6 stpcpy
-
-* Sat Dec  9 2000 Jakub Jelinek <jakub@redhat.com>
-- update to CVS to:
-  - fix getnameinfo (#21934)
-  - don't stomp on memory in rpath handling (#21544)
-  - fix setlocale (#21507)
-- fix libNoVersion.so.1 loading code (#21579)
-- use auxarches define in spec file for auxiliary
-  architectures (#21219)
-- remove /usr/share directory from filelist (#21218)
-
-* Sun Nov 19 2000 Jakub Jelinek <jakub@redhat.com>
-- update to CVS to fix getaddrinfo
-
-* Fri Nov 17 2000 Jakub Jelinek <jakub@redhat.com>
-- update to CVS to fix freopen
-- remove all alpha workarounds, not needed anymore
-
-* Wed Nov 15 2000 Jakub Jelinek <jakub@redhat.com>
-- fix dladdr bug on alpha/sparc32/sparc64
-- fix Makefiles so that they run static tests properly
-
-* Tue Nov 14 2000 Jakub Jelinek <jakub@redhat.com>
-- update to CVS to fix ldconfig
-
-* Thu Nov  9 2000 Jakub Jelinek <jakub@redhat.com>
-- update to glibc 2.2 release
-
-* Mon Nov  6 2000 Jakub Jelinek <jakub@redhat.com>
-- update to CVS to:
-  - export __sysconf@@GLIBC_2.2 (#20417)
-
-* Fri Nov  3 2000 Jakub Jelinek <jakub@redhat.com>
-- merge to 2.1.97
-
-* Mon Oct 30 2000 Jakub Jelinek <jakub@redhat.com>
-- update to CVS, including:
-  - fix WORD_BIT/LONG_BIT definition in limits.h (#19088)
-  - fix hesiod (#19375)
-  - set LC_MESSAGES in zic/zdump for proper error message output (#19495)
-  - fix LFS fcntl when used with non-LFS aware kernels (#19730)
-
-* Thu Oct 19 2000 Jakub Jelinek <jakub@redhat.com>
-- fix alpha semctl (#19199)
-- update to CVS, including:
-  - fix glibc headers for Compaq non-gcc compilers
-  - fix locale alias handling code (#18832)
-  - fix rexec on little endian machines (#18886)
-- started writing changelog again
-
-* Thu Aug 10 2000 Adrian Havill <havill@redhat.com>
-- added ja ujis alias for backwards compatibility

old:
----
  Correct-unwind-info-in-strcmp-sse4.S.patch
  Fix-bugs-in-x86-32-strcmp-sse4.S-and-strcmp-ssse3.S.patch
  Update-xmm3-when-exit-from-loop.patch
  cve-2010-0296-mount-DoS.patch
  cve-2010-3856.patch
  glibc-2.11-12-g24c0bf7-fedora.tar.bz2
  glibc-2.11-12-g24c0bf7.tar.bz2
  glibc-arm-local-hwcap-updates.patch
  glibc-arm-no-hwcap.patch
  glibc-atom-memory-string-opt-tillto-20100226.patch
  glibc-ports-2.11.tar.bz2
  nis_shadow.diff
  prelink-causes-zypper-ref-to-die.patch

new:
----
  glibc-2.13-fedora.tar.bz2
  glibc-2.13-locale.patch
  glibc-2.13.tar.bz2
  glibc-arm-atomics-disable-qemu.patch
  glibc-ports-2.13.tar.bz2

spec files:
-----------
--- glibc.spec
+++ glibc.spec
@@ -1,5 +1,7 @@
-%define glibcsrcdir glibc-2.11-12-g24c0bf7
-%define glibcversion 2.11.90
+# temporary needed for debuginfo change in rpm package
+%define _unpackaged_files_terminate_build 0
+%define glibcsrcdir glibc-2.13
+%define glibcversion 2.13
 ### glibc.spec.in follows:
 %define run_glibc_tests 0
 %define multiarcharches %{ix86} x86_64
@@ -9,7 +11,7 @@
 
 Summary: The GNU libc libraries
 Name: glibc
-Version: 2.11.90
+Version: 2.13
 Release: 12
 # GPLv2+ is used in a bunch of programs, LGPLv2+ is used for libraries.
 # Things that are linked directly into dynamically linked programs
@@ -19,33 +21,25 @@
 License: LGPLv2+ and LGPLv2+ with exceptions and GPLv2+
 Group: System/Libraries
 URL: http://sources.redhat.com/glibc/
-Source0: glibc-2.11-12-g24c0bf7.tar.bz2
+Source0: glibc-2.13.tar.bz2
 Source1: %{glibcsrcdir}-fedora.tar.bz2
-Source2: glibc-ports-2.11.tar.bz2
+Source2: glibc-ports-2.13.tar.bz2
 Patch0: %{name}-fedora.patch
-Patch2: glibc-atom-memory-string-opt-tillto-20100226.patch
-Patch3: nis_shadow.diff
 
-Patch4: tzdata-update.c.arm.patch
-Patch5: glibc-arm-alignment-fix.patch
-
-Patch6: Correct-unwind-info-in-strcmp-sse4.S.patch
-Patch7: Update-xmm3-when-exit-from-loop.patch
-Patch8: prelink-causes-zypper-ref-to-die.patch
-Patch9: Fix-bugs-in-x86-32-strcmp-sse4.S-and-strcmp-ssse3.S.patch
-Patch10: cve-2010-0296-mount-DoS.patch
-Patch11: glibc-arm-runfast.patch
-Patch12: glibc-arm-local-hwcap-updates.patch
-Patch13: glibc-arm-no-hwcap.patch
-Patch14: cve-2010-3847.patch
-Patch15: cve-2010-3856.patch
+Patch1: tzdata-update.c.arm.patch
+Patch2: glibc-arm-alignment-fix.patch
+Patch3: glibc-arm-runfast.patch
+
+# Meego: Build the only needed locale-archive.
+Patch8: glibc-2.13-locale.patch
+Patch9: glibc-arm-atomics-disable-qemu.patch
 
 Provides: ldconfig
 # The dynamic linker supports DT_GNU_HASH
 Provides: rtld(GNU_HASH)
 Requires: glibc-common = %{version}-%{release}
 # Require libgcc in case some program calls pthread_cancel in its %%post
-Requires(pre): basesystem, libgcc
+Requires(pre): libgcc
 # This is for building auxiliary programs like memusage, nscd
 # For initial glibc bootstraps it can be commented out
 #BuildRequires: gd-devel libpng-devel zlib-devel texinfo
@@ -152,7 +146,7 @@
 %package -n nscd
 Summary: A Name Service Caching Daemon (nscd)
 Group: System/Daemons
-Requires(pre): /sbin/chkconfig, /usr/sbin/useradd, /usr/sbin/userdel, sh-utils
+Requires(pre): /usr/sbin/useradd, /usr/sbin/userdel, sh-utils
 
 %description -n nscd
 Nscd caches name service lookups and can dramatically improve
@@ -174,31 +168,18 @@
 %prep
 %setup -q -n %{glibcsrcdir} %{?glibc_release_unpack} -b1 -a2
 %{?glibc_release_setup}
-mv glibc-ports-2.11 ports
+mv glibc-ports-2.13 ports
 
 %patch0 -E -p1
-%patch2 -p1
-%patch3 -p1
 
 %ifarch %{arm}
-%patch4 -p1
-%patch5 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
 %endif
 
-%patch6 -p1
-%patch7 -p1
 %patch8 -p1
 %patch9 -p1
-%patch10 -p1
-
-%ifarch %{arm}
-%patch11 -p1
-%patch12 -p0
-%patch13 -p1
-%endif
-
-%patch14 -p1
-%patch15 -p1
 
 cat > find_provides.sh <<EOF
 #!/bin/sh
@@ -317,8 +298,6 @@
 
 # This is for ncsd - in glibc 2.2
 install -m 644 nscd/nscd.conf $RPM_BUILD_ROOT/etc
-mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
-install -m 755 nscd/nscd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/nscd
 
 # Don't include ld.so.cache
 rm -f $RPM_BUILD_ROOT/etc/ld.so.cache
@@ -607,15 +586,6 @@
 /usr/sbin/useradd -M -o -r -d / -s /sbin/nologin \
   -c "NSCD Daemon" -u 28 nscd > /dev/null 2>&1 || :
 
-%post -n nscd
-/sbin/chkconfig --add nscd
-
-%preun -n nscd
-if [ $1 = 0 ] ; then
-  service nscd stop > /dev/null 2>&1
-  /sbin/chkconfig --del nscd
-fi
-
 %postun -n nscd
 if [ $1 = 0 ] ; then
   /usr/sbin/userdel nscd > /dev/null 2>&1 || :
@@ -671,7 +641,6 @@
 %files -f nscd.filelist -n nscd
 %defattr(-,root,root)
 %config(noreplace) /etc/nscd.conf
-%config /etc/rc.d/init.d/nscd
 %dir %attr(0755,root,root) /var/run/nscd
 %dir %attr(0755,root,root) /var/db/nscd
 %attr(0644,root,root) %verify(not md5 size mtime) %ghost \
%config(missingok,noreplace) /var/run/nscd/nscd.pid

other changes:
--------------

++++++ glibc-2.13-fedora.tar.bz2 (new)

++++++ glibc-2.13-locale.patch (new)
--- glibc-2.13-locale.patch
+++ glibc-2.13-locale.patch
+--- glibc-2.13/localedata/SUPPORTED.orig	2011-05-23 16:37:19.189331750 +0800
++++ glibc-2.13/localedata/SUPPORTED	2011-05-23 16:54:11.832044735 +0800
+@@ -1,88 +1,8 @@
+ # This file names the currently supported and somewhat tested locales.
+ # If you have any additions please file a glibc bug report.
+ SUPPORTED-LOCALES=\
+-aa_DJ.UTF-8/UTF-8 \
+-aa_DJ/ISO-8859-1 \
+-aa_ER/UTF-8 \
+-aa_ER@saaho/UTF-8 \
+-aa_ET/UTF-8 \
+-af_ZA.UTF-8/UTF-8 \
+-af_ZA/ISO-8859-1 \
+-am_ET/UTF-8 \
+-an_ES.UTF-8/UTF-8 \
+-an_ES/ISO-8859-15 \
+-ar_AE.UTF-8/UTF-8 \
+-ar_AE/ISO-8859-6 \
+-ar_BH.UTF-8/UTF-8 \
+-ar_BH/ISO-8859-6 \
+-ar_DZ.UTF-8/UTF-8 \
+-ar_DZ/ISO-8859-6 \
+-ar_EG.UTF-8/UTF-8 \
+-ar_EG/ISO-8859-6 \
+-ar_IN/UTF-8 \
+-ar_IQ.UTF-8/UTF-8 \
+-ar_IQ/ISO-8859-6 \
+-ar_JO.UTF-8/UTF-8 \
+-ar_JO/ISO-8859-6 \
+-ar_KW.UTF-8/UTF-8 \
+-ar_KW/ISO-8859-6 \
+-ar_LB.UTF-8/UTF-8 \
+-ar_LB/ISO-8859-6 \
+-ar_LY.UTF-8/UTF-8 \
+-ar_LY/ISO-8859-6 \
+-ar_MA.UTF-8/UTF-8 \
+-ar_MA/ISO-8859-6 \
+-ar_OM.UTF-8/UTF-8 \
+-ar_OM/ISO-8859-6 \
+-ar_QA.UTF-8/UTF-8 \
+-ar_QA/ISO-8859-6 \
+-ar_SA.UTF-8/UTF-8 \
+-ar_SA/ISO-8859-6 \
+-ar_SD.UTF-8/UTF-8 \
+-ar_SD/ISO-8859-6 \
+-ar_SY.UTF-8/UTF-8 \
+-ar_SY/ISO-8859-6 \
+-ar_TN.UTF-8/UTF-8 \
+-ar_TN/ISO-8859-6 \
+-ar_YE.UTF-8/UTF-8 \
+-ar_YE/ISO-8859-6 \
+-az_AZ/UTF-8 \
+-as_IN/UTF-8 \
+-ast_ES.UTF-8/UTF-8 \
+-ast_ES/ISO-8859-15 \
+-be_BY.UTF-8/UTF-8 \
+-be_BY/CP1251 \
+-be_BY@latin/UTF-8 \
+-ber_DZ/UTF-8 \
+-ber_MA/UTF-8 \
+-bg_BG.UTF-8/UTF-8 \
+-bg_BG/CP1251 \
+-bn_BD/UTF-8 \
+-bn_IN/UTF-8 \
+-bo_CN/UTF-8 \
+-bo_IN/UTF-8 \
+-br_FR.UTF-8/UTF-8 \
+-br_FR/ISO-8859-1 \
+-br_FR@euro/ISO-8859-15 \
+-bs_BA.UTF-8/UTF-8 \
+-bs_BA/ISO-8859-2 \
+-byn_ER/UTF-8 \
+-ca_AD.UTF-8/UTF-8 \
+-ca_AD/ISO-8859-15 \
+-ca_ES.UTF-8/UTF-8 \
+-ca_ES/ISO-8859-1 \
+-ca_ES@euro/ISO-8859-15 \
+-ca_FR.UTF-8/UTF-8 \
+-ca_FR/ISO-8859-15 \
+-ca_IT.UTF-8/UTF-8 \
+-ca_IT/ISO-8859-15 \
+-crh_UA/UTF-8 \
+ cs_CZ.UTF-8/UTF-8 \
+ cs_CZ/ISO-8859-2 \
+-csb_PL/UTF-8 \
+-cv_RU/UTF-8 \
+-cy_GB.UTF-8/UTF-8 \
+-cy_GB/ISO-8859-14 \
+ da_DK.UTF-8/UTF-8 \
+ da_DK/ISO-8859-1 \
+ da_DK.ISO-8859-15/ISO-8859-15 \
+@@ -100,8 +20,6 @@
+ de_LU.UTF-8/UTF-8 \
+ de_LU/ISO-8859-1 \
+ de_LU@euro/ISO-8859-15 \
+-dv_MV/UTF-8 \
+-dz_BT/UTF-8 \
+ el_GR.UTF-8/UTF-8 \
+ el_GR/ISO-8859-7 \
+ el_CY.UTF-8/UTF-8 \
+@@ -179,19 +97,10 @@
+ es_UY/ISO-8859-1 \
+ es_VE.UTF-8/UTF-8 \
+ es_VE/ISO-8859-1 \
+-et_EE.UTF-8/UTF-8 \
+-et_EE/ISO-8859-1 \
+-et_EE.ISO-8859-15/ISO-8859-15 \
+-eu_ES.UTF-8/UTF-8 \
+-eu_ES/ISO-8859-1 \
+-eu_ES@euro/ISO-8859-15 \
+-fa_IR/UTF-8 \
+ fi_FI.UTF-8/UTF-8 \
+ fi_FI/ISO-8859-1 \
+ fi_FI@euro/ISO-8859-15 \
+ fil_PH/UTF-8 \
+-fo_FO.UTF-8/UTF-8 \
+-fo_FO/ISO-8859-1 \
+ fr_BE.UTF-8/UTF-8 \
+ fr_BE/ISO-8859-1 \
+ fr_BE@euro/ISO-8859-15 \
+@@ -205,102 +114,17 @@
+ fr_LU.UTF-8/UTF-8 \
+ fr_LU/ISO-8859-1 \
+ fr_LU@euro/ISO-8859-15 \
+-fur_IT/UTF-8 \
+-fy_NL/UTF-8 \
+-fy_DE/UTF-8 \
+-ga_IE.UTF-8/UTF-8 \
+-ga_IE/ISO-8859-1 \
+-ga_IE@euro/ISO-8859-15 \
+-gd_GB.UTF-8/UTF-8 \
+-gd_GB/ISO-8859-15 \
+-gez_ER/UTF-8 \
+-gez_ER@abegede/UTF-8 \
+-gez_ET/UTF-8 \
+-gez_ET@abegede/UTF-8 \
+-gl_ES.UTF-8/UTF-8 \
+-gl_ES/ISO-8859-1 \
+-gl_ES@euro/ISO-8859-15 \
+-gu_IN/UTF-8 \
+-gv_GB.UTF-8/UTF-8 \
+-gv_GB/ISO-8859-1 \
+-ha_NG/UTF-8 \
+-he_IL.UTF-8/UTF-8 \
+-he_IL/ISO-8859-8 \
+-hi_IN/UTF-8 \
+-hne_IN/UTF-8 \
+-hr_HR.UTF-8/UTF-8 \
+-hr_HR/ISO-8859-2 \
+-hsb_DE/ISO-8859-2 \
+-hsb_DE.UTF-8/UTF-8 \
+-ht_HT/UTF-8 \
+ hu_HU.UTF-8/UTF-8 \
+ hu_HU/ISO-8859-2 \
+-hy_AM/UTF-8 \
+-hy_AM.ARMSCII-8/ARMSCII-8 \
+-id_ID.UTF-8/UTF-8 \
+-id_ID/ISO-8859-1 \
+-ig_NG/UTF-8 \
+-ik_CA/UTF-8 \
+-is_IS.UTF-8/UTF-8 \
+-is_IS/ISO-8859-1 \
+ it_CH.UTF-8/UTF-8 \
+ it_CH/ISO-8859-1 \
+ it_IT.UTF-8/UTF-8 \
+ it_IT/ISO-8859-1 \
+ it_IT@euro/ISO-8859-15 \
+-iu_CA/UTF-8 \
+-iw_IL.UTF-8/UTF-8 \
+-iw_IL/ISO-8859-8 \
+ ja_JP.EUC-JP/EUC-JP \
+ ja_JP.UTF-8/UTF-8 \
+-ka_GE.UTF-8/UTF-8 \
+-ka_GE/GEORGIAN-PS \
+-kk_KZ.UTF-8/UTF-8 \
+-kk_KZ/PT154 \
+-kl_GL.UTF-8/UTF-8 \
+-kl_GL/ISO-8859-1 \
+-km_KH/UTF-8 \
+-kn_IN/UTF-8 \
+ ko_KR.EUC-KR/EUC-KR \
+ ko_KR.UTF-8/UTF-8 \
+-kok_IN/UTF-8 \
+-ks_IN/UTF-8 \
+-ks_IN@devanagari/UTF-8 \
+-ku_TR.UTF-8/UTF-8 \
+-ku_TR/ISO-8859-9 \
+-kw_GB.UTF-8/UTF-8 \
+-kw_GB/ISO-8859-1 \
+-ky_KG/UTF-8 \
+-lg_UG.UTF-8/UTF-8 \
+-lg_UG/ISO-8859-10 \
+-li_BE/UTF-8 \
+-li_NL/UTF-8 \
+-lo_LA/UTF-8 \
+-lt_LT.UTF-8/UTF-8 \
+-lt_LT/ISO-8859-13 \
+-lv_LV.UTF-8/UTF-8 \
(146 more lines skipped)

++++++ glibc-2.11-12-g24c0bf7-fedora.tar.bz2 -> glibc-2.13.tar.bz2
2723421 lines of diff (skipped)

++++++ glibc-arm-atomics-disable-qemu.patch (new)
--- glibc-arm-atomics-disable-qemu.patch
+++ glibc-arm-atomics-disable-qemu.patch
+diff -ru glibc-2.13/ports/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h \
glibc-2.13-arm-qemu-atomics/ports/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h +--- \
glibc-2.13/ports/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h	2011-01-25 \
22:00:16.000000000 +0100 ++++ \
glibc-2.13-arm-qemu-atomics/ports/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h	2011-06-23 \
12:44:45.051613056 +0200 +@@ -39,7 +39,7 @@
+ 
+ /* Use the atomic builtins provided by GCC in case the backend provides
+    a pattern to do this efficiently.  */
+-
++#undef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
+ #ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
+ #define atomic_full_barrier() __sync_synchronize ()
+ #elif defined __thumb2__

++++++ glibc-fedora.patch
--- glibc-fedora.patch
+++ glibc-fedora.patch
@@ -1,99 +1,124 @@
---- glibc-2.11-12-g24c0bf7/ChangeLog
-+++ glibc-2.11.90-1/ChangeLog
-@@ -275,22 +275,6 @@ d2009-10-30  Ulrich Drepper  <drepper@redhat.com>
- 	* sysdeps/generic/netinet/ip.h: Define IPTOS_ENC* and IPTOS_DSCP*
- 	macros.  Patch by Philip Prindeville <philipp@redfish-solutions.com>.
- 
--	[BZ #10840]
--	* sysdeps/unix/sysv/linux/kernel-features.h: Define
--	__ASSUME_F_GETOWN_EX.
--	* sysdeps/unix/sysv/linux/fcntl.c: Implement F_GETOWN using F_GETOWN_EX
--	if possible.
--	* sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.
--
--	* sysdeps/unix/sysv/linux/sh/bits/fcntl.h: Define F_OWNER_*
--	and f_owner_ex.
--	* sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Likewise.
--	* sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h: Likewise.
--	* sysdeps/unix/sysv/linux/sparc/bits/fcntl.h: Likewise.
--	* sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: Likewise.
--	* sysdeps/unix/sysv/linux/i386/bits/fcntl.h: Likewise.
--	* sysdeps/unix/sysv/linux/s390/bits/fcntl.h: Likewise.
--
- 	[BZ #10847]
- 	* sysdeps/gnu/getutmp.c: Allow compatibility code to play around with
- 	getutmpx symbol.
-@@ -378,17 +362,6 @@ d2009-10-30  Ulrich Drepper  <drepper@redhat.com>
- 	* locale/C-time.c: Revert week-1stday back to 19971130 and set
- 	first_weekday to 1 and first_workday to 2.
- 
--2009-10-01  Ulrich Drepper  <drepper@redhat.com>
--
--	* sysdeps/unix/sysv/linux/sh/bits/fcntl.h: Define F_SETOWN_EX and
--	F_GETOWN_EX.
--	* sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Likewise.
--	* sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h: Likewise.
--	* sysdeps/unix/sysv/linux/sparc/bits/fcntl.h: Likewise.
--	* sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: Likewise.
--	* sysdeps/unix/sysv/linux/i386/bits/fcntl.h: Likewise.
--	* sysdeps/unix/sysv/linux/s390/bits/fcntl.h: Likewise.
--
- 2009-09-28  Andreas Schwab  <schwab@redhat.com>
+--- glibc-2.13/ChangeLog
++++ glibc-2.13-1/ChangeLog
+@@ -285,6 +285,11 @@
  
- 	* stdio-common/printf_fp.c: Check for and avoid integer overflows.
-@@ -1046,6 +1019,11 @@ d2009-10-30  Ulrich Drepper  <drepper@redhat.com>
- 	* sysdeps/generic/ldsodefs.h (struct rtld_global): The map element in
- 	the unique symbol hash table should not be const.
+ 	* sysdeps/unix/sysv/linux/sys/swap.h (SWAP_FLAG_DISCARD): Define.
  
-+2009-07-22  Jakub Jelinek  <jakub@redhat.com>
++2010-12-13  Andreas Schwab  <schwab@redhat.com>
 +
-+	* Makeconfig (ASFLAGS): Append $(sysdep-ASFLAGS).
-+	* sysdeps/i386/Makefile (sysdep-ASFLAGS): Add -U__i686.
++	* elf/dl-object.c (_dl_new_object): Ignore origin of privileged
++	program.
 +
- 2009-07-21  Ulrich Drepper  <drepper@redhat.com>
+ 2010-11-11  Andreas Schwab  <schwab@redhat.com>
  
- 	* sysdeps/x86_64/multiarch/strstr.c: Minor cleanups.  Remove
-@@ -1311,6 +1289,11 @@ d2009-10-30  Ulrich Drepper  <drepper@redhat.com>
- 	out common code into new function get_common_indeces. Determine
- 	extended family and model for Intel processors.
+ 	* posix/fnmatch_loop.c (NEW_PATTERN): Fix use of alloca.
+@@ -606,6 +611,11 @@
+ 	* string/str-two-way.h (two_way_long_needle): Always clear memory
+ 	when skipping input due to the shift table.
  
-+2009-06-26  Andreas Schwab  <aschwab@redhat.com>
++2010-10-05  Andreas Schwab  <schwab@redhat.com>
 +
-+	* timezone/zic.c (stringzone): Don't try to generate a POSIX TZ
-+	string when the timezone ends in DST.
++	* sysdeps/posix/getaddrinfo.c (gaih_inet): Don't discard result of
++	decoding ACE if AI_CANONIDN.
 +
- 2009-06-26  Ulrich Drepper  <drepper@redhat.com>
+ 2010-10-03  Ulrich Drepper  <drepper@gmail.com>
  
- 	* resolv/resolv.h: Define RES_SNGLKUPREOP.
-@@ -10004,6 +9987,10 @@ d2009-10-30  Ulrich Drepper  <drepper@redhat.com>
- 	[BZ #4368]
- 	* stdlib/stdlib.h: Remove obsolete part of comment for realpath.
+ 	[BZ #12005]
+@@ -648,6 +658,34 @@
+ 	* sysdeps/unix/sysv/linux/internal_statvfs.c (INTERNAL_STATVFS):
+ 	Mask out sign-bit copies when constructing f_fsid.
  
-+2007-04-16  Jakub Jelinek  <jakub@redhat.com>
++2010-09-28  Andreas Schwab  <schwab@redhat.com>
 +
-+	* locale/programs/locarchive.c (add_alias, insert_name): Remove static.
++	* elf/rtld.c (dl_main): Move setting of GLRO(dl_init_all_dirs)
++	before performing relro protection.
 +
- 2007-04-16  Ulrich Drepper  <drepper@redhat.com>
++2010-09-27  Andreas Schwab  <schwab@redhat.com>
++
++	* include/link.h (struct link_map): Add l_free_initfini.
++	* elf/dl-deps.c (_dl_map_object_deps): Set it when assigning
++	l_initfini.
++	* elf/rtld.c (dl_main): Clear it on all objects loaded on startup.
++	* elf/dl-libc.c (free_mem): Free l_initfini if l_free_initfini is
++	set.
++
++	[BZ #11561]
++	* posix/regcomp.c (parse_bracket_exp): When looking up collating
++	elements compare against the byte sequence of it, not its name.
++
++	[BZ #6530]
++	* stdio-common/vfprintf.c (process_string_arg): Revert 2000-07-22
++	change.
++
++	* nss/nss_files/files-XXX.c (internal_getent): Declare linebuflen
++	as size_t.
++
++	* sysdeps/i386/i686/multiarch/strspn.S (ENTRY): Add missing
++	backslash.
++
+ 2010-09-24  Petr Baudis <pasky@suse.cz>
  
- 	[BZ #4364]
-@@ -11261,6 +11248,15 @@ d2009-10-30  Ulrich Drepper  <drepper@redhat.com>
- 	separators also if no non-zero digits found.
- 	* stdlib/Makefile (tests): Add tst-strtod3.
+ 	* debug/stack_chk_fail_local.c: Add missing licence exception.
+@@ -1439,6 +1477,32 @@
+ 	call returning > 0 value.
+ 	* sysdeps/unix/sysv/linux/getlogin.c (getlogin): Likewise.
  
-+2006-12-10  Jakub Jelinek  <jakub@redhat.com>
++2010-07-01  Andreas Schwab  <schwab@redhat.com>
 +
-+	* sysdeps/unix/sysv/linux/netlinkaccess.h: Include linux/if_addr.h
-+	if IFA_MAX is not defined.
-+	(IFA_RTA, IFA_PAYLOAD, IFLA_RTA, IFLA_PAYLOAD): Define if not
-+	defined.
-+	* sysdeps/unix/sysv/linux/check_pf.c: Include netlinkaccess.h
-+	instead of asm/types.h, linux/netlink.h and linux/rtnetlink.h.
++	* include/sys/resource.h (__getrlimit): Add hidden proto.
++	* sysdeps/unix/sysv/linux/i386/getrlimit.c: Add libc_hidden_weak.
++	* sysdeps/mach/hurd/getrlimit.c: Add libc_hidden_def.
++	* resource/getrlimit.c: Likewise.
 +
- 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
++2010-06-28  Andreas Schwab  <schwab@redhat.com>
++
++	* allocatestack.c (setxid_mark_thread): Ensure that the exiting
++	thread is woken up.
++
++	* elf/Makefile: Add rules to build and run unload8 test.
++	* elf/unload8.c: New file.
++	* elf/unload8mod1.c: New file.
++	* elf/unload8mod1x.c: New file.
++	* elf/unload8mod2.c: New file.
++	* elf/unload8mod3.c: New file.
++
++	* elf/dl-close.c (_dl_close_worker): Reset private search list if
++	it wasn't used.
++
++2010-06-21  Andreas Schwab  <schwab@redhat.com>
++
++	* sysdeps/i386/i686/Makefile: Don't pass -mtune to assembler.
++
+ 2010-06-07  Andreas Schwab  <schwab@redhat.com>
  
- 	[BZ #3632]
---- glibc-2.11-12-g24c0bf7/ChangeLog.15
-+++ glibc-2.11.90-1/ChangeLog.15
+ 	* dlfcn/Makefile: Remove explicit dependencies on libc.so and
+@@ -1491,6 +1555,24 @@
+ 	* hurd/hurd/fd.h (__file_name_lookup_at): Update comment.
+ 	* sysdeps/mach/hurd/linkat.c (linkat): Pass O_NOLINK in FLAGS.
+ 
++2010-06-11  Andreas Schwab  <schwab@redhat.com>
++
++	* elf/rtld.c (_dl_starting_up): Always define.
++	(dl_main): Always set _dl_starting_up.
++	* elf/dl-support.c (_dl_starting_up): Always define.
++	* elf/dl-init.c (_dl_init): Always clear _dl_starting_up.
++
++2010-06-10  Andreas Schwab  <schwab@redhat.com>
++
++	* sysdeps/unix/sysv/linux/getpagesize.c: Don't assume AT_PAGESIZE
++	is always available.
++
++	* sysdeps/unix/sysv/linux/i386/Versions: Export __uname under
++	GLIBC_PRIVATE.
++	* nptl/Versions: Export __getrlimit under GLIBC_PRIVATE.
++	* sysdeps/unix/sysv/linux/i386/smp.h: Call __uname instead of uname.
++	* nptl/nptl-init.c: Call __getrlimit instead of getrlimit.
++
+ 2010-05-28  Luis Machado  <luisgpm@br.ibm.com>
+ 
(2249 more lines skipped)

++++++ glibc-ports-2.11.tar.bz2 -> glibc-ports-2.13.tar.bz2
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,11 @@
+2010-04-14  Joseph Myers  <joseph@codesourcery.com>
+
+	* libc-abis: Remove.
+
+2010-04-06  Joseph Myers  <joseph@codesourcery.com>
+
+	* libc-abis: New.
+
 2006-03-06  Roland McGrath  <roland@redhat.com>
 
 	* Makefile (%.bz2, %.gz): New pattern rules.
--- ChangeLog.alpha
+++ ChangeLog.alpha
@@ -1,3 +1,180 @@
+2010-09-26  Michael Cree  <mcree@orcon.net.nz>
+
+	* sysdeps/alpha/memchr.c: Include <bp-sym.h>
+	(__memchr): Add casts for integer arithmetic on pointers.
+
+2010-09-23  Richard Henderson  <rth@redhat.com>
+
+	[BZ #12019]
+	* sysdeps/alpha/alphaev6/memchr.S: Remove.
+	* sysdeps/alpha/memchr.S: Remove.
+	* sysdeps/alpha/memchr.c: New.
+
+2010-09-23  Richard Henderson  <rth@redhat.com>
+
+	[BZ #1864]
+	* sysdeps/unix/sysv/linux/alpha/fstatfs64.c: New.
+	* sysdeps/unix/sysv/linux/alpha/fstatvfs.c: New.
+	* sysdeps/unix/sysv/linux/alpha/fstatvfs64.c: New.
+	* sysdeps/unix/sysv/linux/alpha/internal_statvfs64.c: New.
+	* sysdeps/unix/sysv/linux/alpha/statfs64.c: New.
+	* sysdeps/unix/sysv/linux/alpha/statvfs.c: New.
+	* sysdeps/unix/sysv/linux/alpha/statvfs64.c: New.
+	* sysdeps/unix/sysv/linux/alpha/syscalls.list (fstatfs, statfs):
+	Define without 64-bit aliases.
+
+2010-05-03  Aurelien Jarno  <aurelien@aurel32.net>
+ 
+	* sysdeps/alpha/memchr.S: Use prefetch load.
+	* sysdeps/alpha/alphaev6/memchr.S: Likewise.
+
+2010-05-03  Aurelien Jarno  <aurelien@aurel32.net>
+
+ 	[BZ #6827]
+	* sysdeps/alpha/dl-machine.h: Add dl-procinfo support.
+	* sysdeps/alpha/dl-procinfo.c: New.
+	* sysdeps/alpha/dl-procinfo.h: New.
+
+2010-05-03  Aurelien Jarno  <aurelien@aurel32.net>
+
+	[BZ #5350]
+	* sysdeps/alpha/fpu/s_ceil.c: Fix corner cases.
+	* sysdeps/alpha/fpu/s_ceilf.c: Likewise.
+	* sysdeps/alpha/fpu/s_floor.c: Likewise.
+	* sysdeps/alpha/fpu/s_floorf.c: Likewise.
+	* sysdeps/alpha/fpu/s_rint.c: Likewise.
+	* sysdeps/alpha/fpu/s_rintf.c: Likewise.
+
+2010-05-03  GOTO Masanori  <gotom@debian.or.jp>
+
+	[BZ #1026]
+	* sysdeps/unix/sysv/linux/alpha/kernel-features.h: Define
+	__ASSUME_STAT64_SYSCALL.
+	* sysdeps/unix/sysv/linux/alpha/fxstat.c: Check
+	__ASSUME_STAT64_SYSCALL.
+	* sysdeps/unix/sysv/linux/alpha/fxstatat.c: Likewise.
+	* sysdeps/unix/sysv/linux/alpha/lxstat.c: Likewise.
+	* sysdeps/unix/sysv/linux/alpha/xstat.c: Likewise.
+	* sysdeps/unix/sysv/linux/alpha/xstatconv.c: Don't define
+	__libc_missing_axp_stat64 when it's not	needed.
+	* sysdeps/unix/sysv/linux/alpha/xstatconv.h: Likewise.
+
+2010-03-30  Richard Henderson  <rth@redhat.com>
+
+	* sysdeps/unix/sysv/linux/alpha/bits/socket.h (MSG_WAITFORONE): New.
+
+2010-03-30  Matt Turner  <mattst88@gmail.com>
+
+	* sysdeps/unix/sysv/linux/alpha/kernel-features.h: New.
+
+2010-03-26  Richard Henderson  <rth@redhat.com>
+
+	* sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S: New.
+
+2010-03-26  Richard Henderson  <rth@redhat.com>
+
+	* sysdeps/unix/sysv/linux/alpha/Versions: Update errlist-compat
+	for GLIBC_2.12.
+
+2010-03-26  Richard Henderson  <rth@redhat.com>
+
+	* sysdeps/alpha/fpu/fegetenv.c: Add hidden alias.
+
+2010-03-26  Richard Henderson  <rth@redhat.com>
+
+	* sysdeps/unix/sysv/linux/alpha/dl-auxv.h (__libc_alpha_cache_shape):
+	Define extern here; move definition...
+	* sysdeps/unix/sysv/linux/alpha/dl-sysdep.c: ... here.
+
+2010-03-26  Richard Henderson  <rth@redhat.com>
+
+	* sysdeps/unix/sysv/linux/alpha/sys/user.h: Don't include asm/page.h.
+	(PAGE_SHIFT, PAGE_SIZE, PAGE_MASK): Define.
+
+2010-03-26  Richard Henderson  <rth@redhat.com>
+
+	* sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (F_SETOWN_EX,
+	F_GETOWN_EX, F_OWNER_TID, F_OWNER_PID, F_OWNER_PGRP,
+	F_OWNER_GID, struct f_owner_ex): Define.
+	(F_SETOWN, F_GETOWN): Define with XPG7.
+
+2010-03-26  Richard Henderson  <rth@redhat.com>
+
+	* sysdeps/unix/alpha/sysdep.h (PTR_MANGLE): Define for !PIC too.
+	(PTR_DEMANGLE): Likewise.
+
+2010-03-26  Richard Henderson  <rth@redhat.com>
+
+	* sysdeps/unix/alpha/sysdep.h (INTERNAL_SYSCALL_ERROR_P,
+	INTERNAL_SYSCALL_ERRNO): "Use" the "other" variable in each macro.
+
+2010-03-26  Richard Henderson  <rth@redhat.com>
+
+	* sysdep/unix/sysv/linux/alpha/creat.c: New.
+
+2010-03-26  Richard Henderson  <rth@redhat.com>
+
+	* sysdep/alpha/elf/configure.in (libc_cv_alpha_hidden_gprel)
+	Adjust the test for gcc 4.5.
+	* sysdep/alpha/elf/configure: Rebuild.
+
+2010-03-26  Richard Henderson  <rth@redhat.com>
+
+	* sysdeps/alpha/bits/atomic.h (__arch_exchange_8_int,
+	__arch_exchange_16_int, __arch_exchange_32_int,
+	__arch_exchange_64_int, __arch_exchange_and_add_32_int,
+	__arch_exchange_and_add_64_int): Use __typeof to get the
+	return type correct without warning.
+
+2010-03-23  Matt Turner  <mattst88@gmail.com>
+            Aurelien Jarno  <aurelien@aurel32.net>
+
+	* sysdeps/unix/sysv/linux/alpha/bits/socket.h: New file.
+
+2010-01-12  Matt Turner  <mattst88@gmail.com>
+
+	* sysdeps/unix/sysv/linux/alpha/bits/stat.h: Fix double-inclusion
+	problem.
+
+2010-01-12  Matt Turner  <mattst88@gmail.com>
+
+	* sysdeps/unix/sysv/linux/alpha/bits/sigaction.h: Define
+	SA_RESTART, SA_NODEFER and SA_RESETHAND if __USE_XOPEN2K8.
+
+2010-01-12  Matt Turner  <mattst88@gmail.com>
+
+	* sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Define O_DIRECTORY,
+	O_NOFOLLOW, O_CLOEXEC, F_DUPFD_CLOEXEC, F_SETOWN, and F_GETOWN for
+	XPG7.
+	* sysdeps/unix/sysv/linux/alpha/bits/stat.h: Enable using from
+	fcntl.h.
+
+2010-01-12  Matt Turner  <mattst88@gmail.com>
+
+	* sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Redefine O_SYNC and
+	O_DSYNC to match 2.6.33+ kernels.
+
+2009-12-02  Mike Frysinger <vapier@gentoo.org>
+
+	* sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c: Fix typo in
+	include timer_gettime.c -> timer_settime.c.
+
+2009-11-23  Matt Turner  <mattst88@gmail.com>
+
+	* sysdeps/unix/sysv/linux/alpha/bits/stat.h: Use struct timespec
+	for timestamps also if __USE_XOPEN2K8.
+
+2009-11-23  Matt Turner  <mattst88@gmail.com>
+
+	* sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Change misleading
+	names of parameters of sync_file_range.
+
+2009-11-23  Matt Turner  <mattst88@gmail.com>
+
+	[BZ #10972]
+	* sysdeps/unix/sysv/linux/alpha/bits/mman.h: Add new MADV_*
+	constants from recent kernels.
+
 2009-11-10  Matt Turner  <mattst88@gmail.com>
 
 	[BZ #10609]
--- ChangeLog.arm
+++ ChangeLog.arm
@@ -1,3 +1,184 @@
+2011-01-25  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/arm/bits/mman.h (MADV_HUGEPAGE,
+	MADV_NOHUGEPAGE): Define.
+
+2011-01-07  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/arm/eabi/fclrexcpt.c (__feclearexcept): Return zero if
+	unsupported but nothing needs to be done.
+	* sysdeps/arm/eabi/fraiseexcpt.c (feraiseexcept): Likewise.
+	* sysdeps/arm/eabi/fsetexcptflg.c (__fesetexceptflag): Likewise.
+
+2010-12-21  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/arm/stackinfo.h: Define DEFAULT_STACK_PERMS with PF_X.
+
+2010-11-24  Ken Werner  <ken.werner@de.ibm.com>
+
+	* sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h (atomic_full_barrier,
+	__arch_compare_and_exchange_val_32_acq): Use the atomic builtins
+	provided by GCC if __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 is defined.
+
+2010-11-22  Andreas Schwab  <schwab@redhat.com>
+
+	* sysdeps/arm/preconfigure: Only modify CFLAGS when configuring
+	for arm-linux*eabi.
+
+2010-10-19  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/arm/bits/mathdef.h (FP_FAST_FMA, FP_FAST_FMAF,
+	FP_FAST_FMAL): Define if associated GCC macros are defined.
+
+2010-10-11  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/arm/eabi/feupdateenv.c (feupdateenv): Add
+	libm_hidden_ver.
+	* sysdeps/arm/eabi/ftestexcept.c (fetestexcept): Add
+	libm_hidden_def.
+	* sysdeps/arm/fpu/ftestexcept.c (fetestexcept): Likewise.
+
+2010-09-30  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/arm/syscalls.list: Add entry for
+	fanotify_mark syscall.
+
+2010-08-13  Alexander Kanevskiy  <kad@kad.name>
+
+	* sysdeps/unix/sysv/linux/arm/dl-procinfo.c (_dl_arm_cap_flags):
+	Change "fast-mult" to "fastmult".  Add new HWCAP names.
+	* sysdeps/unix/sysv/linux/arm/dl-procinfo.h (_DL_HWCAP_COUNT):
+	Change to 15.
+	(HWCAP_IMPORTANT): Change to (HWCAP_ARM_VFP | HWCAP_ARM_NEON).
+	* sysdeps/unix/sysv/linux/arm/sysdep.h (HWCAP_ARM_CRUNCH,
+	HWCAP_ARM_THUMBEE, HWCAP_ARM_NEON, HWCAP_ARM_VFPv3,
+	HWCAP_ARM_VFPv3D16): Define.
+
+2010-08-12  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/arm/syscalls.list: Add entry for
+	prlimit64 syscall.
+
+2010-06-14  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/arm/bits/fcntl.h (F_SETPIPE_SZ,
+	F_GETPIPE_SZ): Define.
+
+2010-05-21  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/arm/eabi/internal_recvmmsg.S: New.
+
+2010-04-08  Daniel Jacobowitz  <dan@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S: New file.
+	* sysdeps/unix/sysv/linux/arm/eabi/sysdep.h [__thumb__]
+	(INTERNAL_SYSCALL_RAW): Rewrite to use __libc_do_syscall.
+	* sysdeps/unix/sysv/linux/arm/eabi/Makefile: Add libc-do-syscall
+	to libraries and tests that require it.
+	* sysdeps/unix/sysv/linux/arm/eabi/nptl/aio_misc.h: Delete.
+
+2010-03-30  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/arm/dl-machine.h (VALID_ELF_ABIVERSION, VALID_ELF_OSABI,
+	VALID_ELF_HEADER): Remove.
+	* sysdeps/unix/sysv/linux/arm/ldsodefs.h: New.
+
+2010-03-26  Thomas Schwinge  <thomas@codesourcery.com>
+
+	* sysdeps/arm/configure.in: New file.
+	* sysdeps/arm/configure: Generate.
+	* sysdeps/arm/sysdep.h (ENTRY, END): Add CFI statements.
+	* sysdeps/unix/arm/sysdep.S (__syscall_error): Likewise.
+	* sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h
+	(PSEUDO, DOCARGS_0, RESTORE_LR_0, DOCARGS_1, UNDOCARGS_1, DOCARGS_2)
+	(UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3, DOCARGS_4, UNDOCARGS_4)
+	(DOCARGS_5, UNDOCARGS_5, RESTORE_LR_5, DOCARGS_6, UNDOCARGS_6):
+	Likewise.
+	[__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
+	* sysdeps/unix/sysv/linux/arm/eabi/sysdep.h (DO_CALL): Likewise.
+	* sysdeps/unix/sysv/linux/arm/sysdep.h
+	(POP_PC, SYSCALL_ERROR_HANDLER (__local_syscall_error))
+	(DOARGS_5, UNDOARGS_5, DOARGS_6, UNDOARGS_6, DOARGS_7, UNDOARGS_7):
+	Likewise.
+	* sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
+	(__default_sa_restorer_v1, __default_sa_restorer_v2)
+	(__default_rt_sa_restorer_v1, __default_rt_sa_restorer_v2): Add END
+	statements.
+	* sysdeps/unix/sysv/linux/arm/eabi/syscall.S (syscall): Add CFI
+	statements.
+	* sysdeps/arm/memcpy.S (memcpy): Add CFI statements.
+	* sysdeps/arm/memmove.S (memmove): Likewise.
+	* sysdeps/unix/sysv/linux/arm/eabi/mmap64.S (__mmap64): Add CFI
+	statements.
+	* sysdeps/unix/sysv/linux/arm/mmap.S (__mmap): Likewise.
+	* sysdeps/arm/eabi/arm-mcount.S (__gnu_mcount_nc, _mcount): Add CFI
+	statements.
+	* sysdeps/arm/sysdep.h (CALL_MCOUNT): Likewise.
+	* sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
+	(_Unwind_Resume): Add CFI statements.
+	* sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c
+	(_Unwind_Resume): Likewise.
+	* sysdeps/arm/dl-trampoline.S (_dl_runtime_resolve)
+	(_dl_runtime_profile) <CFI>: Only emit .debug_frame.
+	* sysdeps/arm/eabi/__longjmp.S (__longjmp): Add CFI statements.
+	* sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S (CALL_FAIL)
+	(CHECK_SP): Likewise
+	* sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S (SAVE_PID): Add CFI
+	statements.
+	* sysdeps/unix/sysv/linux/arm/nptl/vfork.S (SAVE_PID): Likewise.
+	* sysdeps/unix/sysv/linux/arm/clone.S (__clone): Add CFI statements.
+	* sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S (cfi_startproc):
+	Redefine for signal frames.
+	(__default_sa_restorer_v1, __default_sa_restorer_v2)
+	(__default_rt_sa_restorer_v1, __default_rt_sa_restorer_v2): Add CFI
+	statements.
+
+2010-02-10  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/arm/eabi/fegetenv.c, sysdeps/arm/fpu/fegetenv.c: Add
+	hidden alias.
+
+2010-01-10  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Define O_DIRECTORY,
+	O_NOFOLLOW, O_CLOEXEC, F_DUPFD_CLOEXEC, F_SETOWN, and F_GETOWN for
+	XPG7.
+
+2009-12-16  Thomas Schwinge  <thomas@codesourcery.com>
+
+	* sysdeps/arm/eabi/Makefile [gmon] (sysdep_routines): Add arm-mcount.
+	* sysdeps/arm/eabi/machine-gmon.h (mcount_internal): Define to
+	`__mcount_internal'.
+	(MCOUNT (__gnu_mcount_nc), OLD_MCOUNT (_mcount), mcount): Move to...
+	* sysdeps/arm/eabi/arm-mcount.S: ... this new file as __gnu_mcount_nc,
+	_mcount, and mcount, respectively.
+
+2009-12-15  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Redefine O_SYNC and
+	O_DSYNC to match 2.6.33+ kernels.
+
+2009-11-19  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Introduce new symbol
+	F_OWNER_PGRP and mark F_OWNER_GID obsolete.
+
+2009-11-19  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_PSELECT,
+	__ASSUME_PPOLL): Don't undefine for kernel 2.6.32 and later.
+
+2009-11-18  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Change misleading
+	names of parameters of sync_file_range.
+
+2009-11-17  Joseph Myers  <joseph@codesourcery.com>
+
+	[BZ #10972]
+	* sysdeps/unix/sysv/linux/arm/bits/mman.h: Add new MADV_*
+	constants from recent kernels.
+
 2009-11-14  Joseph Myers  <joseph@codesourcery.com>
 
 	* sysdeps/unix/sysv/linux/arm/bits/fcntl.h (F_SETOWN_EX,
--- ChangeLog.hppa
+++ ChangeLog.hppa
@@ -1,3 +1,84 @@
+2010-06-24  Carlos O'Donell  <carlos@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S: Only create stack 
+	frame around call to SYSCALL_ERROR_HANDLER. Do not restore %rp 
+	from the stack frame on successfull return.
+
+2010-06-23  Carlos O'Donell  <carlos@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/hppa/getcontext.S (__getcontext_ret):
+	Document that this function is a non-standard calling ABI.
+	Document register usage.
+	(__getcontext): Use normal %sp without adjustment. Use named
+	resgister %sp. 
+	* sysdeps/unix/sysv/linux/hppa/makecontext.c: Remove FRAME_SIZE.
+	Define FRAME_SIZE_UL, FRAME_SIZE_BYTES, ARGS.
+	(__makecontext): Create and setup a stack frame. 
+	* sysdeps/unix/sysv/linux/hppa/setcontext.S (__setcontext):
+	Use named register %sp. Do not use oSS_SP. 
+
+2010-06-07  Andreas Schwab  <schwab@redhat.com>
+
+	* sysdeps/unix/sysv/linux/hppa/nptl/pthread.h: Update to agree
+	with generic file.
+
+2010-03-30  Carlos O'Donell <carlos@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/hppa/bits/socket.h: Define
+	MSG_WAITFORONE.
+
+2010-02-17  Matt Turner  <mattst88@gmail.com>
+
+	* sysdeps/unix/sysv/linux/hppa/bits/socket.h: Actually fix
+	SOCK_CLOEXEC to match O_CLOEXEC.
+
+2010-02-02  Carlos O'Donell  <carlos@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/hppa/bits/mman.h: Define
+	MADV_MERGEABLE and MADV_UNMERGEABLE.
+
+2010-02-02  Carlos O'Donell  <carlos@codesourcery.com>
+
+	* sysdeps/hppa/nptl/tls.h (__set_cr27): Clobber
+	link register r31.
+
+2010-02-02  Carlos O'Donell  <carlos@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/hppa/makecontext.c (__makecontext):
+	Support more than 8 arguments.
+
+2010-02-01  Kyle McMartin  <kyle@redhat.com>
+
+	* sysdeps/unix/sysv/linux/hppa/bits/socket.h: Fix value of
+	SOCK_CLOEXEC to match O_CLOEXEC.
+
+2010-02-01  Carlos O'Donell  <carlos@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/hppa/Versions: Bump
+	errlist-compat to 257 for GLIBC_2.12.
+	* sysdeps/unix/sysv/linux/hppa/bits/errno.h
+	(EOWNERDEAD): Define if not already defined.
+	(ENOTRECOVERABLE): Likewise.
+	(ERFKILL): Likewise.
+
+2009-11-29  Carlos O'Donell  <carlos@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/hppa/bits/fcntl.h:
+	Rearrange file to reduce future maintenance.
+	[__USE_GNU]: Update F_GETOWN_EX, and F_SETOWN_EX.
+	Define f_owner_ex an __pid_type.
+
+2009-11-25  Carlos O'Donell  <carlos@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h:
+	Use correct alignment for pthread_mutex_t, pthread_cond_t,
+	and pthread_rwlock_t.
+
+2009-11-22  Carlos O'Donell  <carlos@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Avoid warnings
+	by casting oldval to int.
+
 2009-11-15  Carlos O'Donell  <carlos@codesourcery.com>
 
 	[BZ #6676]
@@ -7,7 +88,7 @@
 
 2009-11-15  Carlos O'Donell  <carlos@codesourcery.com>
 
-	* sysdeps/unix/sysv/linux/hppa/Versions (libc): Add 
+	* sysdeps/unix/sysv/linux/hppa/Versions (libc): Add
 	fallocate64@@GLIBC_2.11.
 	* sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
 	[__USE_GNU]: Define F_GETOWN_EX, and F_SETOWN_EX.
@@ -15,7 +96,7 @@
 	[__USE_FILE_OFFSET64 && __REDIRECT]: Define __REDIRECT.
 	[__USE_FILE_OFFSET64 && !__REDIRECT]: Define fallocate as
 	fallocate64.
-	[__USE_LARGEFILE64]: define fallocate64. 	
+	[__USE_LARGEFILE64]: define fallocate64.
 
 2009-11-15  Carlos O'Donell  <carlos@codesourcery.com>
 
@@ -51,10 +132,10 @@
 	* sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c: Remove.
 
 2009-09-08  Carlos O'Donell  <carlos@codesourcery.com>
- 
+
 	sysdeps/unix/sysv/linux/hppa/
 	* internaltypes.h: New file.
- 
+
 	sysdeps/unix/sysv/linux/hppa/nptl/
 	* pthreadP.h: New file.
 	* pthread.h: New file.
@@ -102,7 +183,7 @@
 
 2009-02-25  Carlos O'Donell  <carlos@codesourcery.com>
 
-	* sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Define 
+	* sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Define
 	FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME,
 	and FUTEX_BITSET_MATCH_ANY.
 
@@ -116,7 +197,7 @@
 
 2009-02-13  Khem Raj  <raj.khem@gmail.com>
 
-	* sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c 
+	* sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c
 	(libgcc_s_handle): New variable.
 	(pthread_cancel_init): Depend in libgcc_s_handle for decision to
 	load DSO.  Assign last.
@@ -144,9 +225,9 @@
 	    Carlos O'Donell  <carlos@systemhalted.org>
 
 	[BZ #6037]
-	* sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Check for -11 
+	* sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Check for -11
 	(-EAGAIN) instead of 11. Loop again when the kernel
-	returns -45 (-EDEADLOCK). Add back memory clobber. 
+	returns -45 (-EDEADLOCK). Add back memory clobber.
 	Do not initialize lws_ret and lws_errno.
 
 2008-06-17  Guy Martin  <gmsoft@tuxicoman.be>
@@ -180,7 +261,7 @@
 	    Guy Martin <gmsoft@tuxicoman.be>
 
 	[BZ #5923]
-	* sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Pass 
+	* sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Pass
 	timespec and futexp.
 
 2008-02-22  Carlos O'Donell  <carlos@codesourcery.com>
@@ -328,7 +409,7 @@
 
 2007-05-17  Carlos O'Donell  <carlos@systemhalted.org>
 
-	* sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h 
+	* sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h
 	(SEM_VALUE_MAX): Remove.
 
 2007-05-17  Carlos O'Donell  <carlos@systemhalted.org>
@@ -338,14 +419,14 @@
 	(INLINE_SYSCALL): Use PIC_REG_DEF, PIC_REG_USE.
 	(INTERNAL_SYSCALL): Likewise.
 	(INTERNAL_SYSCALL_NCS): Likewise.
-	* sysdeps/unix/sysv/linux/hppa/sysdep.c (syscall): Use 
+	* sysdeps/unix/sysv/linux/hppa/sysdep.c (syscall): Use
 	PIC_REG_DEF, PIC_REG_USE.
 
 2007-05-01  Carlos O'Donell  <carlos@systemhalted.org>
 
 	* sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h
-	[__USE_XOPEN2K]: Define pthread_rwlock_t and 
-	pthread_rwlockattr_t. 
+	[__USE_XOPEN2K]: Define pthread_rwlock_t and
+	pthread_rwlockattr_t.
 
 2007-02-02  Carlos O'Donell  <carlos@systemhalted.org>
 
@@ -379,18 +460,18 @@
 2006-09-20  Carlos O'Donell  <carlos@systemhalted.org>
 
 	* sysdeps/unix/sysv/linux/hppa/bits/fcntl.h (splice): Add offin
-	and offout arguments to the prototype. 
+	and offout arguments to the prototype.
 
 2006-09-15  Carlos O'Donell  <carlos@systemhalted.org>
 
 	* sysdeps/hppa/nptl/tcb-offsets.sym: Define TID_THREAD_OFFSET.
-	* sysdeps/unix/sysv/linux/hppa/clone.S: Handle RESET_PID, and 
+	* sysdeps/unix/sysv/linux/hppa/clone.S: Handle RESET_PID, and
 	restore r19 before call to _exit.
 	* sysdeps/unix/sysv/linux/hppa/nptl/clone.S: New file.
 
 2006-09-13  Carlos O'Donell  <carlos@systemhalted.org>
 
-	* sysdeps/hppa/dl-machine.h (RTLD_START): Comment the use of 
+	* sysdeps/hppa/dl-machine.h (RTLD_START): Comment the use of
 	_dl_fini_plabel.
 	* sysdeps/hppa/elf/start.S: Correctly pass r23 to argument 6 of
 	__libc_start_main. Comment the order of arguments at entry and
@@ -410,7 +491,7 @@
 	as -EAGAIN.
 	* sysdeps/unix/sysv/linux/hppa/bits/mman.h: Adjust definitions to
 	match required standards.
-	* sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h 
+	* sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
 	(lll_futex_wait): Return __ret.
 	(lll_futex_timed_wait): Likewise.
 	(lll_futex_wake): Likewise.
@@ -433,7 +514,7 @@
 
 2006-07-24  Carlos O'Donell  <carlos@systemhalted.org>
 
-	* sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h: 
+	* sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h:
 	__SIZEOF_PTHREAD_COND_T is 64 bytes. Remove __PAD_ATOMIC_LOCK_T.
 
 2006-07-18  Carlos O'Donell  <carlos@systemhalted.org>
@@ -459,7 +540,7 @@
 
 	* sysdeps/unix/sysv/linux/hppa/xstat.c: New file.
 	* sysdeps/unix/sysv/linux/hppa/lxstat.c: Likewise.
-	* sysdeps/unix/sysv/linux/hppa/fxstat.c: Likewise. 
+	* sysdeps/unix/sysv/linux/hppa/fxstat.c: Likewise.
 	* sysdeps/unix/sysv/linux/hppa/fxstatat.c: Likewise.
 
 2006-07-13  Carlos O'Donell  <carlos@systemhalted.org>
@@ -488,12 +569,12 @@
 
 2006-06-08  Carlos O'Donell  <carlos@systemhalted.org>
 
-	* sysdeps/unix/sysv/linux/hppa/Versions: new errlist compat entry 
+	* sysdeps/unix/sysv/linux/hppa/Versions: new errlist compat entry
 	for up to 256 errnos
 
 2006-06-08  Carlos O'Donell  <carlos@systemhalted.org>
 
-	* sysdeps/hppa/hppa1.1/Implies: Remove ieee754/ldbl-128. 
+	* sysdeps/hppa/hppa1.1/Implies: Remove ieee754/ldbl-128.
 	* sysdeps/unix/sysv/linux/hppa/kernel-features.h
 	[__LINUX_KERNEL_VERSION >= 0x020609]: Define __ASSUME_LWS_CAS.
 	* sysdeps/unix/sysv/linux/hppa/bits/atomic.h: New file.
@@ -591,9 +672,9 @@
 
 2006-04-19  Carlos O'Donell  <carlos@systemhalted.org>
 
-	* sysdeps/unix/sysv/linux/hppa/bits/mman.h [__USE_GNU]: 
+	* sysdeps/unix/sysv/linux/hppa/bits/mman.h [__USE_GNU]:
 	Define MMAP_FIXED.
-	* sysdeps/unix/sysv/linux/hppa/bits/fcntl.h [__USE_GNU]: 
+	* sysdeps/unix/sysv/linux/hppa/bits/fcntl.h [__USE_GNU]:
 	Define SYNC_FILE_RANGE_WAIT_BEFORE, SYNC_FILE_RANGE_WRITE,
 	SYNC_FILE_RANGE_WAIT_AFTER, sync_file_range, splice, tee.
 
--- ChangeLog.m68k
+++ ChangeLog.m68k
@@ -1,3 +1,205 @@
+2011-01-18  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* sysdeps/unix/sysv/linux/m68k/bits/mman.h (MADV_HUGEPAGE)
+	(MADV_NOHUGEPAGE): Define.
+
+2011-01-10  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h (sem_t):
+	Force alignment.
+
+2010-12-26  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* sysdeps/m68k/stackinfo.h (DEFAULT_STACK_PERMS): Define.
+
+2010-11-05  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* sysdeps/unix/sysv/linux/m68k/fchownat.c: Include
+	i386/fchownat.c.
+
+2010-10-11  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* sysdeps/m68k/m680x0/fpu/bits/mathinline.h: Remove fma inlines.
+
+	* sysdeps/m68k/fpu/feupdateenv.c (feupdateenv): Add
+	libm_hidden_ver.
+	* sysdeps/m68k/fpu/ftestexcept.c (feupdateenv): Add
+	libm_hidden_def.
+
+2010-08-25  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h
+	(SYSCALL_ERROR_LOAD_GOT): Use & instead of #.
+
+2010-08-17  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* sysdeps/unix/sysv/linux/m68k/syscalls.list: Remove
+	fanotify_init.
+
+2010-08-14  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* sysdeps/unix/sysv/linux/m68k/syscalls.list: Add prlimit64,
+	fanotify_init, fanotify_mask.
+
+2010-08-02  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* sysdeps/m68k/coldfire/sysdep.h: New file.
+	(PCREL_OP): Define.
+	* sysdeps/m68k/m680x0/sysdep.h: New file.
+	(PCREL_OP): Define.
+	* sysdeps/m68k/sysdep.h (PCREL_OP): Don't define here.
+	* sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h: New file.
+	(SYSCALL_ERROR_LOAD_GOT): Define.
+	* sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h: New file.
+	(SYSCALL_ERROR_LOAD_GOT): Define.
+	* sysdeps/unix/sysv/linux/m68k/sysdep.h: Don't include subordinate
+	sysdep files.
+	(SYSCALL_ERROR_HANDLER) [PIC && USE___THREAD]: Use
+	SYSCALL_ERROR_LOAD_GOT.
+
+2010-06-24  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/m68k/bits/fcntl.h (F_SETPIPE_SZ,
+	F_GETPIPE_SZ): Define.
+
+2010-06-13  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* sysdeps/m68k/m680x0/fpu/bits/mathinline.h: Mark all functions as
+	non-throwing.
+
+	* sysdeps/unix/sysv/linux/m68k/sys/user.h (NBPG, UPAGES)
+	(HOST_TEXT_START_ADDR, HOST_STACK_END_ADDR): Define.
+
+2010-06-11  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h: Force
+	alignment of futex variables.
+
+2010-05-22  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* data/c++-types-m68k-linux-gnu.data: New file.
+	* data/localplt-m68k-linux-gnu.data: New file.
+
+2010-03-13  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* sysdeps/m68k/m680x0/fpu/s_ccosh.c: Use signbit macro.
+	* sysdeps/m68k/m680x0/fpu/s_ccos.c: Likewise.
+
+	* sysdeps/m68k/m680x0/fpu/bits/mathinline.h (__signbit)
+	(__signbitf, __signbitl): Always define as inline.
+
+	* sysdeps/unix/sysv/linux/m68k/sysdep.h (SYSCALL_ERROR_HANDLER):
+	Add variant for USE__THREAD.
+
+2010-03-12  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h: Don't include
+	<sysdep.h>.
+
+	* sysdeps/unix/sysv/linux/m68k/m68k-helpers.S: Renamed ...
+	* sysdeps/unix/sysv/linux/m68k/coldfire/m68k-helpers.S: ... to
+	this.
+	* sysdeps/unix/sysv/linux/m68k/m680x0/m68k-helpers.S: New file.
+
+2010-03-09  Maxim Kuvyrkov  <maxim@codesourcery.com>
+
+	NPTL support for m68k/ColdFire
+	* sysdeps/unix/sysv/linux/m68k/sysdep.h (tls.h): Include.
+	(INTERNAL_SYSCALL): Convert to INTERNAL_SYSCALL_NCS.
+	(PTR_MANGLE, PTR_DEMANGLE): Define.
+	(NEED_STATIC_SYSINFO_DSO): Define.
+	* sysdeps/unix/sysv/linux/m68k/clone.S: Support RESET_PID.
+	* sysdeps/unix/sysv/linux/m68k/m68k-helpers.S: New.
+	* sysdeps/unix/sysv/linux/m68k/Makefile: Add new files to lists.
+	* sysdeps/unix/sysv/linux/m68k/vfork.S: Add SAVE_PID/RESTORE_PID.
+	* sysdeps/unix/sysv/linux/m68k/m68k-vdso.c: New.
+	* sysdeps/unix/sysv/linux/m68k/libc-m68k-vdso.c: New.
+	* sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h: New.
+	* sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h: New.
+	* sysdeps/unix/sysv/linux/m68k/Versions: Add symbols for NPTL support.
+	* sysdeps/unix/sysv/linux/m68k/init-first.c: New.
+	* sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h: New.
+	* sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h: New.
+	* sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h: New.
+	* sysdeps/unix/sysv/linux/m68k/nptl/clone.S: New.
+	* sysdeps/unix/sysv/linux/m68k/nptl/fork.c: New.
+	* sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h: New.
+	* sysdeps/unix/sysv/linux/m68k/nptl/vfork.S: New.
+	* sysdeps/unix/sysv/linux/m68k/nptl/pt-vfork.S: New.
+	* sysdeps/unix/sysv/linux/m68k/nptl/createthread.c: New.
+	* sysdeps/unix/sysv/linux/m68k/nptl/pthread_once.c: New.
+	* sysdeps/unix/sysv/linux/m68k/socket.S: Update cancelation code.
+	* sysdeps/m68k/dl-tls.h: New.
+	* sysdeps/m68k/libc-tls.c: New.
+	* sysdeps/m68k/tls-macros.h: New.
+	* sysdeps/m68k/dl-machine.h (RTLD_START): Terminate stack frame to
+	generate better backtraces.
+	(elf_machine_type_class, elf_machine_rela): Handle TLS relocations.
+	* sysdeps/m68k/dl-machine.h: Handle TLS relocations.
+	* sysdeps/m68k/nptl/tcb-offsets.sym: New.
+	* sysdeps/m68k/nptl/pthread_spin_trylock.c: New.
+	* sysdeps/m68k/nptl/tls.h: New.
+	* sysdeps/m68k/nptl/pthread_spin_lock.c: New.
+	* sysdeps/m68k/nptl/pthreaddef.h: New.
+	* sysdeps/m68k/nptl/Makefile: New.
+
+	* sysdeps/unix/sysv/linux/m68k/bits/sigcontext.h: Remove.
+	* sysdeps/unix/sysv/linux/m68k/register-dump.h: Update.
+
+	* sysdeps/unix/sysv/linux/m68k/bits/siginfo.h: Remove.
+
+	* sysdeps/m68k/jmpbuf-unwind.h (_JMPBUF_CFA_UNWINDS_ADJ)
+	(_jmpbuf_sp, _JMPBUF_UNWINDS_ADJ, __libc_unwind_longjmp): Define.
+
+2010-02-10  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/m68k/fpu/fegetenv.c: Add hidden alias.
+
+2010-01-11  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/m68k/bits/stat.h: Fix double-inclusion
+	problem.
+
+2010-01-10  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Define O_DIRECTORY,
+	O_NOFOLLOW, O_CLOEXEC, F_DUPFD_CLOEXEC, F_SETOWN, and F_GETOWN for
+	XPG7.
+	* sysdeps/unix/sysv/linux/m68k/bits/stat.h: Enable using from
+	fcntl.h.
+
+2009-12-16  Joseph Myers  <joseph@codesourcery.com>
+
+	[BZ #11093]
+	* sysdeps/unix/sysv/linux/m68k/bits/poll.h: Define POLLRDNORM,
+	POLLRDBAND, POLLWRNORM, and POLLWRBAND also for POSIX 2008.
+
+2009-12-16  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Redefine O_SYNC and
+	O_DSYNC to match 2.6.33+ kernels.
+
+2009-11-23  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* sysdeps/unix/sysv/linux/m68k/bits/stat.h: Use struct timespec
+	for timestamps also if __USE_XOPEN2K8.
+
+2009-11-19  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Introduce new symbol
+	F_OWNER_PGRP and mark F_OWNER_GID obsolete.
+
+2009-11-18  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Change misleading
+	names of parameters of sync_file_range.
+
+2009-11-17  Joseph Myers  <joseph@codesourcery.com>
+
+	[BZ #10972]
+	* sysdeps/unix/sysv/linux/m68k/bits/mman.h: Add new MADV_*
+	constants from recent kernels.
+
 2009-11-15  Andreas Schwab  <schwab@linux-m68k.org>
 
 	* sysdeps/m68k/libgcc_s.h: New file.
--- ChangeLog.mips
+++ ChangeLog.mips
@@ -1,3 +1,206 @@
+2011-01-25  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/mips/bits/mman.h (MADV_HUGEPAGE,
+	MADV_NOHUGEPAGE): Define.
+
+2011-01-25  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/mips/bits/socket.h (AF_CAIF, AF_ALG,
+	PF_CAIF, PF_ALG): Define.
+
+2010-12-30  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/mips/init-first.c: Don't call __libc_global_ctors if
+	NO_CTORS_DTORS_SECTIONS is defined.
+	* sysdeps/mach/hurd/mips/init-first.c: Likewise.
+
+2010-12-21  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/mips/stackinfo.h: Define DEFAULT_STACK_PERMS with PF_X.
+
+2010-12-06  Matt Turner  <mattst88@gmail.com>
+
+	* sysdeps/unix/sysv/linux/mips/getpagesize.c: Delete file.
+
+2010-12-06  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/mips/configure.in (arch_minimum_kernel):
+	Change to 2.4.1.
+	* sysdeps/unix/sysv/linux/mips/configure: Regenerate.
+
+2010-10-21  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/mips/mips32/syscalls.list,
+	sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list,
+	sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list: Add entries
+	for fanotify_mark.
+
+2010-10-11  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/mips/fpu/feupdateenv.c (feupdateenv): Add
+	libm_hidden_def.
+	* sysdeps/mips/fpu/ftestexcept.c (fetestexcept): Likewise.
+
+2010-08-13  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/mips/kernel-features.h
+	(__ASSUME_GETDENTS64_SYSCALL): Undefine for n32 ABI before 2.6.35.
+
+2010-08-13  Chandrakala Chavva  <cchavva@caviumnetworks.com>
+
+	* sysdeps/unix/mips/mips64/n64/sysdep.h (PSEUDO): Add 'nop' in
+	jump delay slot.
+	* sysdeps/unix/mips/mips64/n32/sysdep.h (PSEUDO): Ditto.
+
+2010-08-13  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/mips/bits/termios.h (EXTPROC): Define.
+
+2010-08-12  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/mips/bits/statfs.h (struct statfs,
+	struct statfs64): Add f_flags field.
+
+2010-08-12  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/mips/sys/inotify.h (IN_EXCL_UNLINK):
+	Define.
+
+2010-08-12  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/mips/bits/resource.h: Declare prlimit
+	and prlimit64.
+	* sysdeps/unix/sysv/linux/mips/mips32/syscalls.list,
+	sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list: New files.
+	* sysdeps/unix/sysv/linux/mips/n32/syscalls.list: Add entry for
+	prlimit64 syscall.
+
+2010-06-14  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/mips/bits/fcntl.h (F_SETPIPE_SZ,
+	F_GETPIPE_SZ): Define.
+
+2010-05-21  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/mips/mips32/recvmmsg.c,
+	sysdeps/unix/sysv/linux/mips/mips32/internal_recvmmsg.S: New.
+
+2010-04-14  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/mips/libc-abis: New.
+
+2010-04-06  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/mips/dl-machine.h (VALID_ELF_ABIVERSION,
+	VALID_ELF_OSABI, VALID_ELF_HEADER): Remove.
+	* sysdeps/unix/sysv/linux/mips/ldsodefs.h (VALID_ELF_ABIVERSION):
+	Define.
+
+2010-03-30  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/mips/bits/socket.h: Define
+	MSG_WAITFORONE.
+
+2010-03-24  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/mips/dl-lookup.c: Update from generic version.
+
+2010-03-23  Mischa Jonker  <mischa.jonker@viragelogic.com>
+
+	[BZ #11291]
+	* sysdeps/mips/bits/atomic.h
+	(__arch_compare_and_exchange_xxx_32_int,
+	__arch_compare_and_exchange_xxx_64_int,
+	__arch_exchange_xxx_32_int, __arch_exchange_xxx_64_int,
+	__arch_exchange_and_add_32_int, __arch_exchange_and_add_64_int):
+	Specify *mem as asm output as well as input.
+
+2010-02-10  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/mips/fpu/fegetenv.c: Add hidden alias.
+
+2010-01-28  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/mips/dl-trampoline.c (_dl_runtime_resolve,
+	_dl_runtime_pltresolve): Calculate offset from start of function
+	to .cpload instead of hardcoding instruction size.
+
+2010-01-11  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/mips/bits/stat.h: Fix double-inclusion
+	problem.
+
+2010-01-11  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/mips/bits/sigaction.h: Define
+	SA_RESTART, SA_NODEFER and SA_RESETHAND if __USE_XOPEN2K8.
+
+2010-01-10  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Define O_DIRECTORY,
+	O_NOFOLLOW, O_CLOEXEC, F_DUPFD_CLOEXEC, F_SETOWN, and F_GETOWN for
+	XPG7.
+	* sysdeps/unix/sysv/linux/mips/bits/stat.h: Enable using from
+	fcntl.h.
+
+2009-12-16  Joseph Myers  <joseph@codesourcery.com>
+
+	[BZ #11093]
+	* sysdeps/unix/sysv/linux/mips/bits/poll.h: Define POLLRDNORM,
+	POLLRDBAND, POLLWRNORM, and POLLWRBAND also for POSIX 2008.
+
+2009-12-16  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/mips/dl-lookup.c: Update from generic version.
+
+2009-12-15  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Redefine O_SYNC and
+	O_DSYNC to match 2.6.33+ kernels.
+
+2009-12-09  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/mips/bits/socket.h: Define mmsghdr and
+	declare recvmmsg.
+
+2009-12-01  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list
+	(posix_fadvise): Remove.
+	* sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise.c,
+	sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c,
+	sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c: New.
+
+2009-12-01  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/mips/dl-lookup.c: Update from generic version.
+
+2009-11-23  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/mips/bits/stat.h: Use struct timespec
+	for timestamps also if __USE_XOPEN2K8.
+
+2009-11-19  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Introduce new symbol
+	F_OWNER_PGRP and mark F_OWNER_GID obsolete.
+
+2009-11-18  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Change misleading
+	names of parameters of sync_file_range.
+
+2009-11-17  Joseph Myers  <joseph@codesourcery.com>
+
+	[BZ #10972]
+	* sysdeps/unix/sysv/linux/mips/bits/mman.h: Add new MADV_*
+	constants from recent kernels.
+
+2009-11-17  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/mips/bits/errno.h (ERFKILL): Define if
+	not already defined.
+
 2009-11-14  Joseph Myers  <joseph@codesourcery.com>
 
 	* sysdeps/unix/sysv/linux/mips/bits/fcntl.h (F_SETOWN_EX,
--- ChangeLog.powerpc
+++ ChangeLog.powerpc
@@ -1,3 +1,34 @@
+2010-09-03  Luis Machado  <luisgpm@br.ibm.com>
+
+	* sysdeps/powerpc/dl-procinfo.c: New file.
+	* sysdeps/powerpc/dl-procinfo.h: New file.
+	* sysdeps/powerpc/powerpc32/405/memcmp.S: New file.
+	* sysdeps/powerpc/powerpc32/405/memcpy.S: New file.
+	* sysdeps/powerpc/powerpc32/405/memset.S: New file.
+	* sysdeps/powerpc/powerpc32/405/strcmp.S: New file.
+	* sysdeps/powerpc/powerpc32/405/strcpy.S: New file.
+	* sysdeps/powerpc/powerpc32/405/strlen.S: New file.
+	* sysdeps/powerpc/powerpc32/405/strncmp.S: New file.
+	* sysdeps/powerpc/powerpc32/440/Implies: New file.
+	* sysdeps/powerpc/powerpc32/464/Implies: New file.
+	* sysdeps/powerpc/powerpc32/476/Implies: New file.
+	* sysdeps/powerpc/powerpc32/Makefile: New file.
+	* sysdeps/unix/sysv/linux/powerpc/powerpc32/405/Implies: New file.
+	* sysdeps/unix/sysv/linux/powerpc/powerpc32/440/Implies: New file.
+	* sysdeps/unix/sysv/linux/powerpc/powerpc32/464/Implies: New file.
+	* sysdeps/unix/sysv/linux/powerpc/powerpc32/476/Implies: New file.
+
+2010-10-11  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/powerpc/nofpu/feupdateenv.c (feupdateenv): Add
+	libm_hidden_ver.
+	* sysdeps/powerpc/nofpu/ftestexcept.c (fetestexcept): Add
+	libm_hidden_def.
+
+2010-02-10  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/powerpc/nofpu/fegetenv.c: Add hidden alias.
+
 2008-08-19  Joseph Myers  <joseph@codesourcery.com>
 
 	* sysdeps/powerpc/nofpu/shlib-versions: New.
--- data/c++-types-m68k-linux-gnu.data
+++ data/c++-types-m68k-linux-gnu.data
+blkcnt64_t:x
+blkcnt_t:l
+blksize_t:l
+caddr_t:Pc
+clockid_t:i
+clock_t:l
+daddr_t:i
+dev_t:y
+fd_mask:l
+fsblkcnt64_t:y
+fsblkcnt_t:m
+fsfilcnt64_t:y
+fsfilcnt_t:m
+fsid_t:8__fsid_t
+gid_t:j
+id_t:j
+ino64_t:y
+ino_t:m
+int16_t:s
+int32_t:i
+int64_t:x
+int8_t:a
+intptr_t:i
+key_t:i
+loff_t:x
+mode_t:j
+nlink_t:j
+off64_t:x
+off_t:l
+pid_t:i
+pthread_attr_t:14pthread_attr_t
+pthread_barrier_t:17pthread_barrier_t
+pthread_barrierattr_t:21pthread_barrierattr_t
+pthread_cond_t:14pthread_cond_t
+pthread_condattr_t:18pthread_condattr_t
+pthread_key_t:j
+pthread_mutex_t:15pthread_mutex_t
+pthread_mutexattr_t:19pthread_mutexattr_t
+pthread_once_t:i
+pthread_rwlock_t:16pthread_rwlock_t
+pthread_rwlockattr_t:20pthread_rwlockattr_t
+pthread_spinlock_t:i
+pthread_t:m
+quad_t:x
+register_t:i
+rlim64_t:y
+rlim_t:m
+sigset_t:10__sigset_t
+size_t:j
+socklen_t:j
+ssize_t:i
+suseconds_t:l
+time_t:l
+u_char:h
+uid_t:j
+uint:j
+u_int:j
+u_int16_t:t
+u_int32_t:j
+u_int64_t:y
+u_int8_t:h
+ulong:m
+u_long:m
+u_quad_t:y
+useconds_t:j
+ushort:t
+u_short:t
--- data/localplt-m68k-linux-gnu.data
+++ data/localplt-m68k-linux-gnu.data
+libc.so: _Unwind_Find_FDE
+libc.so: __m68k_read_tp
+libc.so: calloc
+libc.so: free
+libc.so: malloc
+libc.so: memalign
+libc.so: realloc
+libm.so: matherr
--- sysdeps/alpha/alphaev6/memchr.S
+++ sysdeps/alpha/alphaev6/memchr.S
-/* Copyright (C) 2000, 2003 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by David Mosberger (davidm@cs.arizona.edu).
-   EV6 optimized by Rick Gorton <rick.gorton@alpha-processor.com>.
-
-   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, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#include <sysdep.h>
-
-	.arch ev6
-        .set noreorder
-        .set noat
-
-ENTRY(__memchr)
-#ifdef PROF
-	ldgp	gp, 0(pv)
-	lda	AT, _mcount
-	jsr	AT, (AT), _mcount
-	.prologue 1
-#else
-	.prologue 0
-#endif
-
-	# Hack -- if someone passes in (size_t)-1, hoping to just
-	# search til the end of the address space, we will overflow
-	# below when we find the address of the last byte.  Given
-	# that we will never have a 56-bit address space, cropping
-	# the length is the easiest way to avoid trouble.
-	zap	$18, 0x80, $5	# U : Bound length
-	beq	$18, $not_found	# U :
-        ldq_u   $1, 0($16)	# L : load first quadword Latency=3
-	and	$17, 0xff, $17	# E : L L U U : 00000000000000ch
-
-	insbl	$17, 1, $2	# U : 000000000000ch00
-	cmpult	$18, 9, $4	# E : small (< 1 quad) string?
-	or	$2, $17, $17	# E : 000000000000chch
-        lda     $3, -1($31)	# E : U L L U
-
-	sll	$17, 16, $2	# U : 00000000chch0000
-	addq	$16, $5, $5	# E : Max search address
-	or	$2, $17, $17	# E : 00000000chchchch
-	sll	$17, 32, $2	# U : U L L U : chchchch00000000
-
-	or	$2, $17, $17	# E : chchchchchchchch
-	extql	$1, $16, $7	# U : $7 is upper bits
-	beq	$4, $first_quad	# U :
-	ldq_u	$6, -1($5)	# L : L U U L : eight or less bytes to search Latency=3
-
-	extqh	$6, $16, $6	# U : 2 cycle stall for $6
-	mov	$16, $0		# E :
-	nop			# E :
-	or	$7, $6, $1	# E : L U L U $1 = quadword starting at $16
-
-	# Deal with the case where at most 8 bytes remain to be searched
-	# in $1.  E.g.:
-	#	$18 = 6
-	#	$1 = ????c6c5c4c3c2c1
-$last_quad:
-	negq	$18, $6		# E :
-        xor	$17, $1, $1	# E :
-	srl	$3, $6, $6	# U : $6 = mask of $18 bits set
-        cmpbge  $31, $1, $2	# E : L U L U
-
-	nop
-	nop
-	and	$2, $6, $2	# E :
-        beq     $2, $not_found	# U : U L U L
-
-$found_it:
-#if defined(__alpha_fix__) && defined(__alpha_cix__)
-	/*
-	 * Since we are guaranteed to have set one of the bits, we don't
-	 * have to worry about coming back with a 0x40 out of cttz...
-	 */
-	cttz	$2, $3		# U0 :
-	addq	$0, $3, $0	# E : All done
-	nop			# E :
-	ret			# L0 : L U L U
-#else
-	/*
-	 * Slow and clunky.  It can probably be improved.
-	 * An exercise left for others.
-	 */
-        negq    $2, $3		# E :
-        and     $2, $3, $2	# E :
-        and     $2, 0x0f, $1	# E :
-        addq    $0, 4, $3	# E :
-
-        cmoveq  $1, $3, $0	# E : Latency 2, extra map cycle
-	nop			# E : keep with cmov
-        and     $2, 0x33, $1	# E :
-        addq    $0, 2, $3	# E : U L U L : 2 cycle stall on $0
-
-        cmoveq  $1, $3, $0	# E : Latency 2, extra map cycle
-	nop			# E : keep with cmov
-        and     $2, 0x55, $1	# E :
-        addq    $0, 1, $3	# E : U L U L : 2 cycle stall on $0
-
-        cmoveq  $1, $3, $0	# E : Latency 2, extra map cycle
-	nop
-	nop
-	ret			# L0 : L U L U
-#endif
-
-	# Deal with the case where $18 > 8 bytes remain to be
-	# searched.  $16 may not be aligned.
-	.align 4
-$first_quad:
-	andnot	$16, 0x7, $0	# E :
-        insqh   $3, $16, $2	# U : $2 = 0000ffffffffffff ($16<0:2> ff)
-        xor	$1, $17, $1	# E :
-	or	$1, $2, $1	# E : U L U L $1 = ====ffffffffffff
-
-        cmpbge  $31, $1, $2	# E :
-        bne     $2, $found_it	# U :
-	# At least one byte left to process.
-	ldq	$1, 8($0)	# L :
-	subq	$5, 1, $18	# E : U L U L
-
-	addq	$0, 8, $0	# E :
-	# Make $18 point to last quad to be accessed (the
-	# last quad may or may not be partial).
-	andnot	$18, 0x7, $18	# E :
-	cmpult	$0, $18, $2	# E :
-	beq	$2, $final	# U : U L U L
-
-	# At least two quads remain to be accessed.
-
-	subq	$18, $0, $4	# E : $4 <- nr quads to be processed
-	and	$4, 8, $4	# E : odd number of quads?
-	bne	$4, $odd_quad_count # U :
-	# At least three quads remain to be accessed
-	mov	$1, $4		# E : L U L U : move prefetched value to correct reg
-
-	.align	4
-$unrolled_loop:
-	ldq	$1, 8($0)	# L : prefetch $1
-	xor	$17, $4, $2	# E :
-	cmpbge	$31, $2, $2	# E :
-	bne	$2, $found_it	# U : U L U L
-
-	addq	$0, 8, $0	# E :
-	nop			# E :
-	nop			# E :
-	nop			# E :
-
-$odd_quad_count:
-	xor	$17, $1, $2	# E :
-	ldq	$4, 8($0)	# L : prefetch $4
-	cmpbge	$31, $2, $2	# E :
-	addq	$0, 8, $6	# E :
-
-	bne	$2, $found_it	# U :
-	cmpult	$6, $18, $6	# E :
-	addq	$0, 8, $0	# E :
-	nop			# E :
-
-	bne	$6, $unrolled_loop # U :
-	mov	$4, $1		# E : move prefetched value into $1
-	nop			# E :
-	nop			# E :
-
-$final:	subq	$5, $0, $18	# E : $18 <- number of bytes left to do
-	nop			# E :
-	nop			# E :
-	bne	$18, $last_quad	# U :
-
-$not_found:
-	mov	$31, $0		# E :
-	nop			# E :
-	nop			# E :
-	ret			# L0 :
-
-	END(__memchr)
-
-weak_alias (__memchr, memchr)
-#if !__BOUNDED_POINTERS__
-weak_alias (__memchr, __ubp_memchr)
-#endif
-libc_hidden_builtin_def (memchr)
--- sysdeps/alpha/bits/atomic.h
+++ sysdeps/alpha/bits/atomic.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2010 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
@@ -221,7 +221,7 @@
 
 #define __arch_exchange_8_int(mem, value, mb1, mb2)			\
 ({									\
-  unsigned long __ret, __tmp, __addr64, __sval;				\
+  unsigned long __tmp, __addr64, __sval; __typeof(*mem) __ret;		\
   __asm__ __volatile__ (						\
 		mb1							\
 	"	andnot	%[__addr8],7,%[__addr64]\n"			\
@@ -244,7 +244,7 @@
 
 #define __arch_exchange_16_int(mem, value, mb1, mb2)			\
 ({									\
-  unsigned long __ret, __tmp, __addr64, __sval;				\
+  unsigned long __tmp, __addr64, __sval; __typeof(*mem) __ret;		\
   __asm__ __volatile__ (						\
 		mb1							\
 	"	andnot	%[__addr16],7,%[__addr64]\n"			\
@@ -267,7 +267,7 @@
 
 #define __arch_exchange_32_int(mem, value, mb1, mb2)			\
 ({									\
-  signed int __ret, __tmp;						\
+  signed int __tmp; __typeof(*mem) __ret;				\
   __asm__ __volatile__ (						\
 		mb1							\
 	"1:	ldl_l	%[__ret],%[__mem]\n"				\
@@ -284,7 +284,7 @@
 
 #define __arch_exchange_64_int(mem, value, mb1, mb2)			\
 ({									\
-  unsigned long __ret, __tmp;						\
+  unsigned long __tmp; __typeof(*mem) __ret;				\
   __asm__ __volatile__ (						\
 		mb1							\
 	"1:	ldq_l	%[__ret],%[__mem]\n"				\
@@ -316,7 +316,7 @@
 
 #define __arch_exchange_and_add_32_int(mem, value, mb1, mb2)		\
 ({									\
-  signed int __ret, __tmp;						\
+  signed int __tmp; __typeof(*mem) __ret;				\
   __asm__ __volatile__ (						\
 		mb1							\
 	"1:	ldl_l	%[__ret],%[__mem]\n"				\
@@ -333,7 +333,7 @@
 
 #define __arch_exchange_and_add_64_int(mem, value, mb1, mb2)		\
 ({									\
-  unsigned long __ret, __tmp;						\
+  unsigned long __tmp; __typeof(*mem) __ret;				\
   __asm__ __volatile__ (						\
 		mb1							\
 	"1:	ldq_l	%[__ret],%[__mem]\n"				\
--- sysdeps/alpha/dl-machine.h
+++ sysdeps/alpha/dl-machine.h
@@ -249,6 +249,18 @@
 /* The alpha never uses Elf64_Rel relocations.  */
 #define ELF_MACHINE_NO_REL 1
 
+/* We define an initialization functions.  This is called very early in
+ *    _dl_sysdep_start.  */
+#define DL_PLATFORM_INIT dl_platform_init ()
+
+static inline void __attribute__ ((unused))
+dl_platform_init (void)
+{
+	if (GLRO(dl_platform) != NULL && *GLRO(dl_platform) == '\0')
+	/* Avoid an empty string which would disturb us.  */
+		GLRO(dl_platform) = NULL;
+}
+
 /* Fix up the instructions of a PLT entry to invoke the function
    rather than the dynamic linker.  */
 static inline Elf64_Addr
--- sysdeps/alpha/dl-procinfo.c
+++ sysdeps/alpha/dl-procinfo.c
+/* Data for Alpha version of processor capability information.
+   Copyright (C) 2008 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Aurelien Jarno <aurelien@aurel32.net>, 2008.
+
+   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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+/* This information must be kept in sync with the _DL_PLATFORM_COUNT
+   definitions in procinfo.h.
+
+   If anything should be added here check whether the size of each string
+   is still ok with the given array size.
+
+   All the #ifdefs in the definitions are quite irritating but
+   necessary if we want to avoid duplicating the information.  There
+   are three different modes:
+
+   - PROCINFO_DECL is defined.  This means we are only interested in
+     declarations.
+
+   - PROCINFO_DECL is not defined:
+
+     + if SHARED is defined the file is included in an array
+       initializer.  The .element = { ... } syntax is needed.
+
+     + if SHARED is not defined a normal array initialization is
+       needed.
+  */
+
+#ifndef PROCINFO_CLASS
+#define PROCINFO_CLASS
+#endif
+
+#if !defined PROCINFO_DECL && defined SHARED
+  ._dl_alpha_platforms
+#else
+PROCINFO_CLASS const char _dl_alpha_platforms[5][5]
+#endif
+#ifndef PROCINFO_DECL
+= {
+    "ev4", "ev5", "ev56", "ev6", "ev67"
+  }
+#endif
+#if !defined SHARED || defined PROCINFO_DECL
+;
+#else
+,
+#endif
+
+#undef PROCINFO_DECL
+#undef PROCINFO_CLASS
--- sysdeps/alpha/dl-procinfo.h
+++ sysdeps/alpha/dl-procinfo.h
+/* Alpha version of processor capability information handling macros.
+   Copyright (C) 2008 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Aurelien Jarno <aurelien@aurel32.net>, 2008.
+
+   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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#ifndef _DL_PROCINFO_H
+#define _DL_PROCINFO_H	1
+
+#include <ldsodefs.h>
+
+
+/* Mask to filter out platforms.  */
+#define _DL_HWCAP_PLATFORM    (-1ULL)
+
+#define _DL_PLATFORMS_COUNT   5
+
+static inline const char *
+__attribute__ ((unused))
+_dl_platform_string (int idx)
+{
+  return GLRO(dl_alpha_platforms)[idx];
+};
+
+static inline int
+__attribute__ ((unused, always_inline))
+_dl_string_platform (const char *str)
+{
+  int i;
+
+  if (str != NULL)
+    for (i = 0; i < _DL_PLATFORMS_COUNT; ++i)
+      {
+        if (strcmp (str, _dl_platform_string (i)) == 0)
+          return i;
+      }
+  return -1;
+};
+
+/* We cannot provide a general printing function.  */
+#define _dl_procinfo(word) -1
+
+/* There are no hardware capabilities defined.  */
+#define _dl_hwcap_string(idx) ""
+
+/* By default there is no important hardware capability.  */
+#define HWCAP_IMPORTANT (0)
+
+/* We don't have any hardware capabilities.  */
+#define _DL_HWCAP_COUNT	0
+
+#define _dl_string_hwcap(str) (-1)
+
+#endif /* dl-procinfo.h */
--- sysdeps/alpha/elf/configure
+++ sysdeps/alpha/elf/configure
@@ -4,10 +4,10 @@
 if test "$usetls" != no; then
 # Check for support of thread-local storage handling in assembler and
 # linker.
-echo "$as_me:$LINENO: checking for Alpha TLS support" >&5
-echo $ECHO_N "checking for Alpha TLS support... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for Alpha TLS support" >&5
+$as_echo_n "checking for Alpha TLS support... " >&6; }
 if test "${libc_cv_alpha_tls+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   cat > conftest.s <<\EOF
 	.section ".tdata", "awT", @progbits
@@ -47,7 +47,7 @@
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   libc_cv_alpha_tls=yes
 else
@@ -55,8 +55,8 @@
 fi
 rm -f conftest*
 fi
-echo "$as_me:$LINENO: result: $libc_cv_alpha_tls" >&5
-echo "${ECHO_T}$libc_cv_alpha_tls" >&6
+{ $as_echo "$as_me:$LINENO: result: $libc_cv_alpha_tls" >&5
+$as_echo "$libc_cv_alpha_tls" >&6; }
 if test $libc_cv_alpha_tls = yes; then
   cat >>confdefs.h <<\_ACEOF
 #define HAVE_TLS_SUPPORT 1
@@ -65,19 +65,15 @@
 fi
 fi
 
-echo "$as_me:$LINENO: checking for GP relative module local relocs" >&5
-echo $ECHO_N "checking for GP relative module local relocs... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for GP relative module local relocs" >&5
+$as_echo_n "checking for GP relative module local relocs... " >&6; }
 if test "${libc_cv_alpha_hidden_gprel+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   cat > conftest.c <<\EOF
-static int bar;
+static volatile int bar;
 int baz __attribute__((visibility("hidden")));
-
-int foo (void)
-{
-  return bar + baz;
-}
+int f(void) { return bar + baz; }
 EOF
 
 libc_cv_alpha_hidden_gprel=no
@@ -85,7 +81,7 @@
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   if grep -q 'bar.*!gprel' conftest.s \
      && grep -q 'baz.*!gprel' conftest.s \
@@ -96,8 +92,8 @@
 fi
 rm -f conftest*
 fi
-echo "$as_me:$LINENO: result: $libc_cv_alpha_hidden_gprel" >&5
-echo "${ECHO_T}$libc_cv_alpha_hidden_gprel" >&6
+{ $as_echo "$as_me:$LINENO: result: $libc_cv_alpha_hidden_gprel" >&5
+$as_echo "$libc_cv_alpha_hidden_gprel" >&6; }
 if test $libc_cv_alpha_hidden_gprel = yes; then
   cat >>confdefs.h <<\_ACEOF
 #define PI_STATIC_AND_HIDDEN 1
--- sysdeps/alpha/elf/configure.in
+++ sysdeps/alpha/elf/configure.in
@@ -53,13 +53,9 @@
 
 AC_CACHE_CHECK(for GP relative module local relocs, libc_cv_alpha_hidden_gprel, [dnl
 cat > conftest.c <<\EOF
-static int bar;
+static volatile int bar;
 int baz __attribute__((visibility("hidden")));
-
-int foo (void)
-{
-  return bar + baz;
-}
+int f(void) { return bar + baz; }
 EOF
 dnl
 
--- sysdeps/alpha/fpu/fegetenv.c
+++ sysdeps/alpha/fpu/fegetenv.c
@@ -1,5 +1,5 @@
 /* Store current floating-point environment.
-   Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc.
+   Copyright (C) 1997,99,2000,2001,2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson <rth@tamu.edu>, 1997
 
@@ -45,3 +45,4 @@
 #endif
 
 versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2);
+libm_hidden_ver(__fegetenv, fegetenv)
--- sysdeps/alpha/fpu/s_ceil.c
+++ sysdeps/alpha/fpu/s_ceil.c
@@ -27,20 +27,25 @@
 double
 __ceil (double x)
 {
-  double two52 = copysign (0x1.0p52, x);
-  double r, tmp;
-  
-  __asm (
+  if (isless (fabs (x), 9007199254740992.0))	/* 1 << DBL_MANT_DIG */
+    {
+      double tmp1, new_x;
+
+      new_x = -x;
+      __asm (
 #ifdef _IEEE_FP_INEXACT
-	 "addt/suim %2, %3, %1\n\tsubt/suim %1, %3, %0"
+	     "cvttq/svim %2,%1\n\t"
 #else
-	 "addt/sum %2, %3, %1\n\tsubt/sum %1, %3, %0"
+	     "cvttq/svm %2,%1\n\t"
 #endif
-	 : "=&f"(r), "=&f"(tmp)
-	 : "f"(-x), "f"(-two52));
+	     "cvtqt/m %1,%0\n\t"
+	     : "=f"(new_x), "=&f"(tmp1)
+	     : "f"(new_x));
 
-  /* Fix up the negation we did above, as well as handling -0 properly. */
-  return copysign (r, x);
+      /* Fix up the negation we did above, as well as handling -0 properly. */
+      x = copysign(new_x, x);
+    }
+  return x;
 }
 
 weak_alias (__ceil, ceil)
--- sysdeps/alpha/fpu/s_ceilf.c
+++ sysdeps/alpha/fpu/s_ceilf.c
@@ -26,20 +26,30 @@
 float
 __ceilf (float x)
 {
-  float two23 = copysignf (0x1.0p23, x);
-  float r, tmp;
-  
-  __asm (
+  if (isless (fabsf (x), 16777216.0f))	/* 1 << FLT_MANT_DIG */
+    {
+      /* Note that Alpha S_Floating is stored in registers in a
+	 restricted T_Floating format, so we don't even need to
+	 convert back to S_Floating in the end.  The initial
+	 conversion to T_Floating is needed to handle denormals.  */
+
+      float tmp1, tmp2, new_x;
+
+      new_x = -x;
+      __asm ("cvtst/s %3,%2\n\t"
 #ifdef _IEEE_FP_INEXACT
-	 "adds/suim %2, %3, %1\n\tsubs/suim %1, %3, %0"
+	     "cvttq/svim %2,%1\n\t"
 #else
-	 "adds/sum %2, %3, %1\n\tsubs/sum %1, %3, %0"
+	     "cvttq/svm %2,%1\n\t"
 #endif
-	 : "=&f"(r), "=&f"(tmp)
-	 : "f"(-x), "f"(-two23));
+	     "cvtqt/m %1,%0\n\t"
+	     : "=f"(new_x), "=&f"(tmp1), "=&f"(tmp2)
+	     : "f"(new_x));
 
-  /* Fix up the negation we did above, as well as handling -0 properly. */
-  return copysignf (r, x);
+      /* Fix up the negation we did above, as well as handling -0 properly. */
+      x = copysignf(new_x, x);
+    }
+  return x;
 }
 
 weak_alias (__ceilf, ceilf)
--- sysdeps/alpha/fpu/s_floor.c
+++ sysdeps/alpha/fpu/s_floor.c
@@ -21,26 +21,32 @@
 #include <math_ldbl_opt.h>
 
 
-/* Use the -inf rounding mode conversion instructions to implement floor.  */
+/* Use the -inf rounding mode conversion instructions to implement
+   floor.  We note when the exponent is large enough that the value
+   must be integral, as this avoids unpleasant integer overflows.  */
 
 double
 __floor (double x)
 {
-  double two52 = copysign (0x1.0p52, x);
-  double r, tmp;
-  
-  __asm (
+  if (isless (fabs (x), 9007199254740992.0))	/* 1 << DBL_MANT_DIG */
+    {
+      double tmp1, new_x;
+
+      __asm (
 #ifdef _IEEE_FP_INEXACT
-	 "addt/suim %2, %3, %1\n\tsubt/suim %1, %3, %0"
+	     "cvttq/svim %2,%1\n\t"
 #else
-	 "addt/sum %2, %3, %1\n\tsubt/sum %1, %3, %0"
+	     "cvttq/svm %2,%1\n\t"
 #endif
-	 : "=&f"(r), "=&f"(tmp)
-	 : "f"(x), "f"(two52));
+	     "cvtqt/m %1,%0\n\t"
+	     : "=f"(new_x), "=&f"(tmp1)
+	     : "f"(x));
 
-  /* floor(-0) == -0, and in general we'll always have the same
-     sign as our input.  */
-  return copysign (r, x);
+      /* floor(-0) == -0, and in general we'll always have the same
+	 sign as our input.  */
+      x = copysign(new_x, x);
+    }
+  return x;
 }
 
 weak_alias (__floor, floor)
--- sysdeps/alpha/fpu/s_floorf.c
+++ sysdeps/alpha/fpu/s_floorf.c
@@ -20,26 +20,37 @@
 #include <math.h>
 
 
-/* Use the -inf rounding mode conversion instructions to implement floor.  */
+/* Use the -inf rounding mode conversion instructions to implement
+   floor.  We note when the exponent is large enough that the value
+   must be integral, as this avoids unpleasant integer overflows.  */
 
 float
 __floorf (float x)
 {
-  float two23 = copysignf (0x1.0p23, x);
-  float r, tmp;
-  
-  __asm (
+  if (isless (fabsf (x), 16777216.0f))	/* 1 << FLT_MANT_DIG */
+    {
+      /* Note that Alpha S_Floating is stored in registers in a
+	 restricted T_Floating format, so we don't even need to
+	 convert back to S_Floating in the end.  The initial
+	 conversion to T_Floating is needed to handle denormals.  */
+
+      float tmp1, tmp2, new_x;
+
+      __asm ("cvtst/s %3,%2\n\t"
 #ifdef _IEEE_FP_INEXACT
-	 "adds/suim %2, %3, %1\n\tsubs/suim %1, %3, %0"
+	     "cvttq/svim %2,%1\n\t"
 #else
-	 "adds/sum %2, %3, %1\n\tsubs/sum %1, %3, %0"
+	     "cvttq/svm %2,%1\n\t"
 #endif
-	 : "=&f"(r), "=&f"(tmp)
-	 : "f"(x), "f"(two23));
+	     "cvtqt/m %1,%0\n\t"
+	     : "=f"(new_x), "=&f"(tmp1), "=&f"(tmp2)
+	     : "f"(x));
 
-  /* floor(-0) == -0, and in general we'll always have the same
-     sign as our input.  */
-  return copysignf (r, x);
+      /* floor(-0) == -0, and in general we'll always have the same
+	 sign as our input.  */
+      x = copysignf(new_x, x);
+    }
+  return x;
 }
 
 weak_alias (__floorf, floorf)
--- sysdeps/alpha/fpu/s_rint.c
+++ sysdeps/alpha/fpu/s_rint.c
@@ -24,15 +24,24 @@
 double
 __rint (double x)
 {
-  double two52 = copysign (0x1.0p52, x);
-  double r;
-  
-  r = x + two52;
-  r = r - two52;
+  if (isless (fabs (x), 9007199254740992.0))	/* 1 << DBL_MANT_DIG */
+    {
+      double tmp1, new_x;
+      __asm (
+#ifdef _IEEE_FP_INEXACT
+	     "cvttq/svid %2,%1\n\t"
+#else
+	     "cvttq/svd %2,%1\n\t"
+#endif
+	     "cvtqt/d %1,%0\n\t"
+	     : "=f"(new_x), "=&f"(tmp1)
+	     : "f"(x));
 
-  /* rint(-0.1) == -0, and in general we'll always have the same sign
-     as our input.  */
-  return copysign (r, x);
+      /* rint(-0.1) == -0, and in general we'll always have the same
+	 sign as our input.  */
+      x = copysign(new_x, x);
+    }
+  return x;
 }
 
 weak_alias (__rint, rint)
--- sysdeps/alpha/fpu/s_rintf.c
+++ sysdeps/alpha/fpu/s_rintf.c
@@ -23,15 +23,30 @@
 float
 __rintf (float x)
 {
-  float two23 = copysignf (0x1.0p23, x);
-  float r;
+  if (isless (fabsf (x), 16777216.0f))	/* 1 << FLT_MANT_DIG */
+    {
+      /* Note that Alpha S_Floating is stored in registers in a
+	 restricted T_Floating format, so we don't even need to
+	 convert back to S_Floating in the end.  The initial
+	 conversion to T_Floating is needed to handle denormals.  */
 
-  r = x + two23;
-  r = r - two23;
+      float tmp1, tmp2, new_x;
 
-  /* rint(-0.1) == -0, and in general we'll always have the same sign
-     as our input.  */
-  return copysign (r, x);
+      __asm ("cvtst/s %3,%2\n\t"
+#ifdef _IEEE_FP_INEXACT
+	     "cvttq/svid %2,%1\n\t"
+#else
+	     "cvttq/svd %2,%1\n\t"
+#endif
+	     "cvtqt/d %1,%0\n\t"
+	     : "=f"(new_x), "=&f"(tmp1), "=&f"(tmp2)
+	     : "f"(x));
+
+      /* rint(-0.1) == -0, and in general we'll always have the same
+	 sign as our input.  */
+      x = copysignf(new_x, x);
+    }
+  return x;
 }
 
 weak_alias (__rintf, rintf)
--- sysdeps/alpha/memchr.S
+++ sysdeps/alpha/memchr.S
-/* Copyright (C) 1996, 2000, 2003 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by David Mosberger (davidm@cs.arizona.edu).
-
-   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, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-/* Finds characters in a memory area.  Optimized for the Alpha:
-
-      - memory accessed as aligned quadwords only
-      - uses cmpbge to compare 8 bytes in parallel
-      - does binary search to find 0 byte in last
-        quadword (HAKMEM needed 12 instructions to
-        do this instead of the 9 instructions that
-        binary search needs).
-
-For correctness consider that:
-
-      - only minimum number of quadwords may be accessed
-      - the third argument is an unsigned long
-*/
-
-#include <sysdep.h>
-
-        .set noreorder
-        .set noat
-
-ENTRY(__memchr)
-#ifdef PROF
-	ldgp	gp, 0(pv)
-	lda	AT, _mcount
-	jsr	AT, (AT), _mcount
-	.prologue 1
-#else
-	.prologue 0
-#endif
-
-	# Hack -- if someone passes in (size_t)-1, hoping to just
-	# search til the end of the address space, we will overflow
-	# below when we find the address of the last byte.  Given
-	# that we will never have a 56-bit address space, cropping
-	# the length is the easiest way to avoid trouble.
-	zap	a2, 0x80, t4	#-e0	:
-
-	beq	a2, $not_found	# .. e1 :
-        ldq_u   t0, 0(a0)       # e1	: load first quadword
-	insbl	a1, 1, t1	# .. e0 : t1 = 000000000000ch00
-	and	a1, 0xff, a1	#-e0    : a1 = 00000000000000ch
-	cmpult	a2, 9, t3	# .. e1 :
-	or	t1, a1, a1	# e0    : a1 = 000000000000chch
-        lda     t2, -1(zero)	# .. e1 :
-	sll	a1, 16, t1	#-e0    : t1 = 00000000chch0000
-	addq	a0, t4, t4	# .. e1 :
-	or	t1, a1, a1	# e1    : a1 = 00000000chchchch
-	unop			#	:
-	sll	a1, 32, t1	#-e0    : t1 = chchchch00000000
-	or	t1, a1, a1	# e1	: a1 = chchchchchchchch
-	extql	t0, a0, t6	# e0    :
-	beq	t3, $first_quad	# .. e1 :
-
-	ldq_u	t5, -1(t4)	#-e1	: eight or less bytes to search
-	extqh	t5, a0, t5	# .. e0 :
-	mov	a0, v0		# e0	:
-	or	t6, t5, t0	# .. e1 : t0 = quadword starting at a0
-
-	# Deal with the case where at most 8 bytes remain to be searched
-	# in t0.  E.g.:
-	#	a2 = 6
-	#	t0 = ????c6c5c4c3c2c1
-$last_quad:
-	negq	a2, t5		#-e0	:
-        xor	a1, t0, t0	# .. e1 :
-	srl	t2, t5, t5	# e0    : t5 = mask of a2 bits set
-        cmpbge  zero, t0, t1	# .. e1 :
-	and	t1, t5, t1	#-e0	:
-        beq     t1, $not_found	# .. e1 :
-
-$found_it:
-	# Now, determine which byte matched:
-        negq    t1, t2		# e0	:
-        and     t1, t2, t1	# e1	:
-
-        and     t1, 0x0f, t0	#-e0	:
-        addq    v0, 4, t2	# .. e1 :
-        cmoveq  t0, t2, v0	# e0	:
-
-        addq    v0, 2, t2	# .. e1 :
-        and     t1, 0x33, t0	#-e0	:
-        cmoveq  t0, t2, v0	# .. e1 :
-
-        and     t1, 0x55, t0	# e0	:
-        addq    v0, 1, t2	# .. e1 :
-        cmoveq  t0, t2, v0	#-e0	:
-
-$done:	ret			# .. e1 :
-
-	# Deal with the case where a2 > 8 bytes remain to be
-	# searched.  a0 may not be aligned.
-	.align 4
-$first_quad:
-	andnot	a0, 0x7, v0	#-e1	:
-        insqh   t2, a0, t1	# .. e0	: t1 = 0000ffffffffffff (a0<0:2> ff)
-        xor	t0, a1, t0	# e0	:
-	or	t0, t1, t0	# e1	: t0 = ====ffffffffffff
-        cmpbge  zero, t0, t1	#-e0	:
-        bne     t1, $found_it	# .. e1 :
-
-	# At least one byte left to process.
-
-	ldq	t0, 8(v0)	# e0	:
-	subq	t4, 1, a2	# .. e1 :
-	addq	v0, 8, v0	#-e0	:
-
-	# Make a2 point to last quad to be accessed (the
-	# last quad may or may not be partial).
-
-	andnot	a2, 0x7, a2	# .. e1 :
-	cmpult	v0, a2, t1	# e0	:
-	beq	t1, $final	# .. e1 :
-
-	# At least two quads remain to be accessed.
-
-	subq	a2, v0, t3	#-e0	: t3 <- nr quads to be processed
-	and	t3, 8, t3	# e1	: odd number of quads?
-	bne	t3, $odd_quad_count # e1 :
-
-	# At least three quads remain to be accessed
-
-	mov	t0, t3		# e0	: move prefetched value to correct reg
-
-	.align	4
-$unrolled_loop:
-	ldq	t0, 8(v0)	#-e0	: prefetch t0
-	xor	a1, t3, t1	# .. e1 :
-	cmpbge	zero, t1, t1	# e0	:
-	bne	t1, $found_it	# .. e1 :
-
-	addq	v0, 8, v0	#-e0	:
-$odd_quad_count:
-	xor	a1, t0, t1	# .. e1 :
-	ldq	t3, 8(v0)	# e0	: prefetch t3
-	cmpbge	zero, t1, t1	# .. e1 :
-	addq	v0, 8, t5	#-e0	:
-	bne	t1, $found_it	# .. e1	:
-
-	cmpult	t5, a2, t5	# e0	:
-	addq	v0, 8, v0	# .. e1 :
-	bne	t5, $unrolled_loop #-e1 :
-
-	mov	t3, t0		# e0	: move prefetched value into t0
-$final:	subq	t4, v0, a2	# .. e1	: a2 <- number of bytes left to do
-	bne	a2, $last_quad	# e1	:
-
-$not_found:
-	mov	zero, v0	#-e0	:
-	ret			# .. e1 :
-
-        END(__memchr)
-
-weak_alias (__memchr, memchr)
-#if !__BOUNDED_POINTERS__
-weak_alias (__memchr, __ubp_memchr)
-#endif
-libc_hidden_builtin_def (memchr)
--- sysdeps/alpha/memchr.c
+++ sysdeps/alpha/memchr.c
+/* Copyright (C) 2010 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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <string.h>
+#include <bp-sym.h>
+
+typedef unsigned long word;
+
+static inline word
+ldq_u(const void *s)
+{
+  return *(const word *)((word)s & -8);
+}
+
+#define unlikely(X)	__builtin_expect ((X), 0)
+#define prefetch(X)	__builtin_prefetch ((void *)(X), 0)
+
+#define cmpbeq0(X)	__builtin_alpha_cmpbge(0, (X))
+#define find(X, Y)	cmpbeq0 ((X) ^ (Y))
+
+/* Search no more than N bytes of S for C.  */
+
+void *
+__memchr (const void *s, int xc, size_t n)
+{
+  const word *s_align;
+  word t, current, found, mask, offset;
+
+  if (unlikely (n == 0))
+    return 0;
+
+  current = ldq_u (s);
+
+  /* Replicate low byte of XC into all bytes of C.  */
+  t = xc & 0xff;			/* 0000000c */
+  t = (t << 8) | t;			/* 000000cc */
+  t = (t << 16) | t;			/* 0000cccc */
+  const word c = (t << 32) | t;		/* cccccccc */
+
+  /* Align the source, and decrement the count by the number
+     of bytes searched in the first word.  */
+  s_align = (const word *)((word)s & -8);
+  n += ((word)s & 7);
+
+  /* Deal with misalignment in the first word for the comparison.  */
+  mask = (1ul << ((word)s & 7)) - 1;
+
+  /* If the entire string fits within one word, we may need masking
+     at both the front and the back of the string.  */
+  if (unlikely (n <= 8))
+    {
+      mask |= -1ul << n;
+      goto last_quad;
+    }
+
+  found = find (current, c) & ~mask;
+  if (unlikely (found))
+    goto found_it;
+
+  s_align++;
+  n -= 8;
+
+  /* If the block is sufficiently large, align to cacheline and prefetch.  */
+  if (unlikely (n >= 256))
+    {
+      /* Prefetch 3 cache lines beyond the one we're working on.  */
+      prefetch (s_align + 8);
+      prefetch (s_align + 16);
+      prefetch (s_align + 24);
+
+      while ((word)s_align & 63)
+	{
+	  current = *s_align;
+	  found = find (current, c);
+	  if (found)
+	    goto found_it;
+	  s_align++;
+	  n -= 8;
+	}
+
+	/* Within each cacheline, advance the load for the next word
+	   before the test for the previous word is complete.  This
+	   allows us to hide the 3 cycle L1 cache load latency.  We
+	   only perform this advance load within a cacheline to prevent
+	   reading across page boundary.  */
+#define CACHELINE_LOOP				\
+	do {					\
+	  word i, next = s_align[0];		\
+	  for (i = 0; i < 7; ++i)		\
+	    {					\
+	      current = next;			\
+	      next = s_align[1];		\
+	      found = find (current, c);	\
+	      if (unlikely (found))		\
+		goto found_it;			\
+	      s_align++;			\
+	    }					\
+	  current = next;			\
+	  found = find (current, c);		\
+	  if (unlikely (found))			\
+	    goto found_it;			\
+	  s_align++;				\
+	  n -= 64;				\
+	} while (0)
+      
+      /* While there's still lots more data to potentially be read,
+	 continue issuing prefetches for the 4th cacheline out.  */
+      while (n >= 256)
+	{
+	  prefetch (s_align + 24);
+	  CACHELINE_LOOP;
+	}
+
+      /* Up to 3 cache lines remaining.  Continue issuing advanced
+	 loads, but stop prefetching.  */
+      while (n >= 64)
+	CACHELINE_LOOP;
+
+      /* We may have exhausted the buffer.  */
+      if (n == 0)
+	return NULL;
+    }
+
+  /* Quadword aligned loop.  */
+  current = *s_align;
+  while (n > 8)
+    {
+      found = find (current, c);
+      if (unlikely (found))
+	goto found_it;
+      current = *++s_align;
+      n -= 8;
+    }
+
+  /* The last word may need masking at the tail of the compare.  */
+  mask = -1ul << n;
+ last_quad:
+  found = find (current, c) & ~mask;
+  if (found == 0)
+    return NULL;
+
+ found_it:
+#ifdef __alpha_cix__
+  offset = __builtin_alpha_cttz (found);
+#else
+  /* Extract LSB.  */
+  found &= -found;
+
+  /* Binary search for the LSB.  */
+  offset  = (found & 0x0f ? 0 : 4);
+  offset += (found & 0x33 ? 0 : 2);
+  offset += (found & 0x55 ? 0 : 1);
+#endif
+
+  return (void *)((word)s_align + offset);
+}
+
+#ifdef weak_alias
+weak_alias (__memchr, BP_SYM (memchr))
+#endif
+libc_hidden_builtin_def (memchr)
--- sysdeps/arm/bits/mathdef.h
+++ sysdeps/arm/bits/mathdef.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000, 2004, 2006, 2007
+/* Copyright (C) 1999, 2000, 2004, 2006, 2007, 2010
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -34,6 +34,20 @@
 # define FP_ILOGB0	(-2147483647)
 # define FP_ILOGBNAN	(2147483647)
 
+/* The GCC 4.6 compiler will define __FP_FAST_FMA{,F,L} if the fma{,f,l}
+   builtins are supported.  */
+# if __FP_FAST_FMA
+#  define FP_FAST_FMA 1
+# endif
+
+# if __FP_FAST_FMAF
+#  define FP_FAST_FMAF 1
+# endif
+
+# if __FP_FAST_FMAL
+#  define FP_FAST_FMAL 1
+# endif
+
 #endif	/* ISO C99 */
 
 #ifndef __NO_LONG_DOUBLE_MATH
--- sysdeps/arm/configure
+++ sysdeps/arm/configure
+# This file is generated from configure.in by Autoconf.  DO NOT EDIT!
+ # Local configure fragment for sysdeps/arm.
+
+{ $as_echo "$as_me:$LINENO: checking whether the CFI directive .cfi_sections is \
supported" >&5 +$as_echo_n "checking whether the CFI directive .cfi_sections is \
supported... " >&6; } +if test "${libc_cv_asm_cfi_directive_sections+set}" = set; \
then +  $as_echo_n "(cached) " >&6
+else
+  cat > conftest.s <<EOF
+	.text
+	.cfi_sections .debug_frame, .eh_frame
+	.cfi_startproc
+	.cfi_endproc
+EOF
+  if { ac_try='${CC-cc} $ASFLAGS -c conftest.s 1>&5'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+    libc_cv_asm_cfi_directive_sections=yes
+  else
+    libc_cv_asm_cfi_directive_sections=no
+  fi
+  rm -f conftest*
+fi
+{ $as_echo "$as_me:$LINENO: result: $libc_cv_asm_cfi_directive_sections" >&5
+$as_echo "$libc_cv_asm_cfi_directive_sections" >&6; }
+if test $libc_cv_asm_cfi_directive_sections != yes; then
+  { { $as_echo "$as_me:$LINENO: error: need .cfi_sections in this configuration" >&5
+$as_echo "$as_me: error: need .cfi_sections in this configuration" >&2;}
+   { (exit 1); exit 1; }; }
+fi
--- sysdeps/arm/configure.in
+++ sysdeps/arm/configure.in
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local configure fragment for sysdeps/arm.
+
+AC_CACHE_CHECK([whether the CFI directive .cfi_sections is supported],
+  [libc_cv_asm_cfi_directive_sections],
+  [cat > conftest.s <<EOF
+	.text
+	.cfi_sections .debug_frame, .eh_frame
+	.cfi_startproc
+	.cfi_endproc
+EOF
+  if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
+    libc_cv_asm_cfi_directive_sections=yes
+  else
+    libc_cv_asm_cfi_directive_sections=no
+  fi
+  rm -f conftest*])
+if test $libc_cv_asm_cfi_directive_sections != yes; then
+  AC_MSG_ERROR([need .cfi_sections in this configuration])
+fi
--- sysdeps/arm/dl-machine.h
+++ sysdeps/arm/dl-machine.h
@@ -1,6 +1,6 @@
 /* Machine-dependent ELF dynamic relocation inline functions.  ARM version.
-   Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005
-	Free Software Foundation, Inc.
+   Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,
+	2006, 2009, 2010 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,14 +26,6 @@
 #include <sys/param.h>
 #include <tls.h>
 
-#define VALID_ELF_ABIVERSION(ver)	(ver == 0)
-#define VALID_ELF_OSABI(osabi) \
-  (osabi == ELFOSABI_SYSV || osabi == ELFOSABI_ARM)
-#define VALID_ELF_HEADER(hdr,exp,size) \
-  memcmp (hdr,exp,size-2) == 0 \
-  && VALID_ELF_OSABI (hdr[EI_OSABI]) \
-  && VALID_ELF_ABIVERSION (hdr[EI_ABIVERSION])
-
 #define CLEAR_CACHE(BEG,END)						\
   INTERNAL_SYSCALL_ARM (cacheflush, , 3, (BEG), (END), 0)
 
--- sysdeps/arm/dl-trampoline.S
+++ sysdeps/arm/dl-trampoline.S
@@ -1,5 +1,5 @@
 /* PLT trampolines.  ARM version.
-   Copyright (C) 2005 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2010 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
@@ -29,6 +29,7 @@
 	.text
 	.globl _dl_runtime_resolve
 	.type _dl_runtime_resolve, #function
+	.cfi_sections .debug_frame
 	cfi_startproc
 	.align 2
 _dl_runtime_resolve:
@@ -77,6 +78,7 @@
 #ifndef PROF
 	.globl _dl_runtime_profile
 	.type _dl_runtime_profile, #function
+	.cfi_sections .debug_frame
 	cfi_startproc
 	.align 2
 _dl_runtime_profile:
--- sysdeps/arm/eabi/Makefile
+++ sysdeps/arm/eabi/Makefile
@@ -12,6 +12,10 @@
 gen-as-const-headers += rtld-global-offsets.sym
 endif
 
+ifeq ($(subdir),gmon)
+sysdep_routines += arm-mcount
+endif
+
 ifeq ($(subdir),debug)
 CFLAGS-backtrace.c += -funwind-tables
 endif
--- sysdeps/arm/eabi/__longjmp.S
+++ sysdeps/arm/eabi/__longjmp.S
@@ -1,5 +1,6 @@
 /* longjmp for ARM.
-   Copyright (C) 1997, 1998, 2005, 2006, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 2005, 2006, 2009, 2010
+     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
@@ -31,10 +32,21 @@
 	moveq	r0, #1		/* can't let setjmp() return zero! */
 
 #ifdef CHECK_SP
-	ldr	r4, [ip, #32]
+	ldr	r4, [ip, #32]	/* jmpbuf's sp */
+	cfi_undefined (r4)
 	CHECK_SP (r4)
 #endif
 	LOADREGS(ia, ip!, {v1-v6, sl, fp, sp, lr})
+	cfi_restore (v1)
+	cfi_restore (v2)
+	cfi_restore (v3)
+	cfi_restore (v4)
+	cfi_restore (v5)
+	cfi_restore (v6)
+	cfi_restore (sl)
+	cfi_restore (fp)
+	cfi_restore (sp)
+	cfi_restore (lr)
 
 #ifdef IS_IN_rtld
   	ldr	a2, 1f
--- sysdeps/arm/eabi/arm-mcount.S
+++ sysdeps/arm/eabi/arm-mcount.S
+/* Implementation of profiling support.  ARM EABI version.
+   Copyright (C) 2008, 2009, 2010 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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+/* Don't call mcount when calling mcount...  */
+#undef PROF
+
+#include <sysdep.h>
+
+
+#ifdef __thumb2__
+	.thumb
+	.syntax unified
+#endif
+
+
+/* Use an assembly stub with a special ABI.  The calling lr has been
+   pushed to the stack (which will be misaligned).  We should preserve
+   all registers except ip and pop a word off the stack.
+
+   NOTE: This assumes mcount_internal does not clobber any non-core
+   (coprocessor) registers.  Currently this is true, but may require
+   additional attention in the future.
+
+   The calling sequence looks something like:
+func:
+   push {lr}
+   bl __gnu_mount_nc
+   <function body>
+*/
+
+ENTRY(__gnu_mcount_nc)
+	push {r0, r1, r2, r3, lr}
+	cfi_adjust_cfa_offset (20)
+	cfi_rel_offset (r0, 0)
+	cfi_rel_offset (r1, 4)
+	cfi_rel_offset (r2, 8)
+	cfi_rel_offset (r3, 12)
+	cfi_rel_offset (lr, 16)
+	bic r1, lr, #1
+	ldr r0, [sp, #20]
+	bl __mcount_internal
+	pop {r0, r1, r2, r3, ip, lr}
+	cfi_adjust_cfa_offset (-24)
+	cfi_restore (r0)
+	cfi_restore (r1)
+	cfi_restore (r2)
+	cfi_restore (r3)
+	cfi_register (lr, ip)
+	bx ip
+END(__gnu_mcount_nc)
+
+
+/* Provide old mcount for backwards compatibility.  This requires
+   code be compiled with APCS frame pointers.  */
+
+ENTRY(_mcount)
+	stmdb sp!, {r0, r1, r2, r3, fp, lr}
+	cfi_adjust_cfa_offset (24)
+	cfi_rel_offset (r0, 0)
+	cfi_rel_offset (r1, 4)
+	cfi_rel_offset (r2, 8)
+	cfi_rel_offset (r3, 12)
+	cfi_rel_offset (fp, 16)
+	cfi_rel_offset (lr, 20)
+#ifdef __thumb2__
+	movs r0, fp
+	ittt ne
+	ldrne r0, [r0, #-4]
+#else
+	movs fp, fp
+	ldrne r0, [fp, #-4]
+#endif
+	movnes r1, lr
+	blne __mcount_internal
+#ifdef __thumb2__
+	ldmia sp!, {r0, r1, r2, r3, fp, pc}
+#else
+	ldmia sp!, {r0, r1, r2, r3, fp, lr}
+	cfi_adjust_cfa_offset (-24)
+	cfi_restore (r0)
+	cfi_restore (r1)
+	cfi_restore (r2)
+	cfi_restore (r3)
+	cfi_restore (fp)
+	cfi_restore (lr)
+	bx lr
+#endif
+END(_mcount)
+
+/* The canonical name for the function is `_mcount' in both C and asm,
+   but some old asm code might assume it's `mcount'.  */
+#undef mcount
+weak_alias (_mcount, mcount)
--- sysdeps/arm/eabi/fclrexcpt.c
+++ sysdeps/arm/eabi/fclrexcpt.c
@@ -1,5 +1,5 @@
 /* Clear given exceptions in current floating-point environment.
-   Copyright (C) 1997,98,99,2000,01,05 Free Software Foundation, Inc.
+   Copyright (C) 1997,98,99,2000,01,05,11 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
@@ -48,8 +48,8 @@
       return 0;
     }
 
-  /* Unsupported, so fail.  */
-  return 1;
+  /* Unsupported, so fail unless nothing needs to be done.  */
+  return (excepts != 0);
 }
 
 #include <shlib-compat.h>
--- sysdeps/arm/eabi/fegetenv.c
+++ sysdeps/arm/eabi/fegetenv.c
@@ -1,5 +1,5 @@
 /* Store current floating-point environment.
-   Copyright (C) 1997,98,99,2000,01,05 Free Software Foundation, Inc.
+   Copyright (C) 1997,98,99,2000,01,05,10 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
@@ -48,4 +48,5 @@
 compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1);
 #endif
 
+libm_hidden_ver (__fegetenv, fegetenv)
 versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2);
--- sysdeps/arm/eabi/feupdateenv.c
+++ sysdeps/arm/eabi/feupdateenv.c
@@ -1,5 +1,5 @@
 /* Install given floating-point environment and raise exceptions.
-   Copyright (C) 1997, 1999, 2000, 2008 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1999, 2000, 2008, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -56,4 +56,5 @@
 compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1);
 #endif
 
+libm_hidden_ver (__feupdateenv, feupdateenv)
 versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2);
--- sysdeps/arm/eabi/fraiseexcpt.c
+++ sysdeps/arm/eabi/fraiseexcpt.c
@@ -1,5 +1,5 @@
 /* Raise given exceptions.
-   Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005, 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
@@ -103,8 +103,8 @@
       return 0;
     }
 
-  /* Unsupported, so fail.  */
-  return 1;
+  /* Unsupported, so fail unless nothing needs to be done.  */
+  return (excepts != 0);
 }
 
 libm_hidden_def (feraiseexcept)
--- sysdeps/arm/eabi/fsetexcptflg.c
+++ sysdeps/arm/eabi/fsetexcptflg.c
@@ -1,5 +1,5 @@
 /* Set floating-point environment exception handling.
-   Copyright (C) 1997,98,99,2000,01,05,08 Free Software Foundation, Inc.
+   Copyright (C) 1997,98,99,2000,01,05,08,11 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
@@ -47,8 +47,8 @@
       return 0;
     }
 
-  /* Unsupported, so fail.  */
-  return 1;
+  /* Unsupported, so fail unless nothing needs to be done.  */
+  return (excepts != 0);
 }
 
 #include <shlib-compat.h>
--- sysdeps/arm/eabi/ftestexcept.c
+++ sysdeps/arm/eabi/ftestexcept.c
@@ -1,5 +1,5 @@
 /* Test exception in current environment.
-   Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 2005, 2010 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
@@ -41,3 +41,4 @@
   /* Unsupported, return 0.  */
   return 0;
 }
+libm_hidden_def (fetestexcept)
--- sysdeps/arm/eabi/machine-gmon.h
+++ sysdeps/arm/eabi/machine-gmon.h
@@ -1,5 +1,5 @@
 /* Machine-dependent definitions for profiling support.  ARM EABI version.
-   Copyright (C) 2008 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2009 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
@@ -17,83 +17,18 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#include <sysdep.h>
+
 /* GCC for the ARM cannot compile __builtin_return_address(N) for N != 0, 
    so we must use an assembly stub.  */
 
-#include <sysdep.h>
-static void mcount_internal (u_long frompc, u_long selfpc) __attribute_used__;
+/* We must not pollute the global namespace.  */
+#define mcount_internal __mcount_internal
 
+extern void mcount_internal (u_long frompc, u_long selfpc) internal_function;
 #define _MCOUNT_DECL(frompc, selfpc) \
-static void mcount_internal (u_long frompc, u_long selfpc)
+  void internal_function mcount_internal (u_long frompc, u_long selfpc)
 
-/* Use an assembly stub with a special ABI.  The calling lr has been
-   pushed to the stack (which will be misaligned).  We should preserve
-   all registers except ip and pop a word off the stack.
-
-   NOTE: This assumes mcount_internal does not clobber any non-core
-   (coprocessor) registers.  Currently this is true, but may require
-   additional attention in the future.
-
-   The calling sequence looks something like:
-func:
-   push {lr}
-   bl __gnu_mount_nc
-   <function body>
- */
-
-
-#define MCOUNT								\
-void __attribute__((__naked__)) __gnu_mcount_nc(void)			\
-{									\
-    asm ("push {r0, r1, r2, r3, lr}\n\t"				\
-	 "bic r1, lr, #1\n\t"						\
-	 "ldr r0, [sp, #20]\n\t"					\
-	 "bl mcount_internal\n\t"					\
-	 "pop {r0, r1, r2, r3, ip, lr}\n\t"				\
-	 "bx ip");							\
-}									\
-OLD_MCOUNT
-
-/* Provide old mcount for backwards compatibility.  This requires
-   code be compiled with APCS frame pointers.  */
-
-#ifndef NO_UNDERSCORES
-/* The asm symbols for C functions are `_function'.
-   The canonical name for the counter function is `mcount', no _.  */
-void _mcount (void) asm ("mcount");
-#else
-/* The canonical name for the function is `_mcount' in both C and asm,
-   but some old asm code might assume it's `mcount'.  */
-void _mcount (void);
-weak_alias (_mcount, mcount)
-#endif
-
-#ifdef __thumb2__
-
-#define OLD_MCOUNT							\
-void __attribute__((__naked__)) _mcount (void)				\
-{									\
-  __asm__("push		{r0, r1, r2, r3, fp, lr};"			\
-	  "movs		r0, fp;"					\
-	  "ittt		ne;"						\
-	  "ldrne	r0, [r0, #-4];"					\
-	  "movsne	r1, lr;"					\
-	  "blne		mcount_internal;"				\
-	  "pop		{r0, r1, r2, r3, fp, pc}");			\
-}
-
-#else
-
-#define OLD_MCOUNT							\
-void __attribute__((__naked__)) _mcount (void)				\
-{									\
-  __asm__("stmdb	sp!, {r0, r1, r2, r3, fp, lr};"			\
-	  "movs		fp, fp;"					\
-	  "ldrne	r0, [fp, #-4];"					\
-	  "movnes	r1, lr;"					\
-	  "blne		mcount_internal;"				\
-	  "ldmia	sp!, {r0, r1, r2, r3, fp, lr};"			\
-	  "bx		lr");						\
-}
 
-#endif
+/* Define MCOUNT as empty since we have the implementation in another file.  */
+#define MCOUNT
--- sysdeps/arm/fpu/fegetenv.c
+++ sysdeps/arm/fpu/fegetenv.c
@@ -1,5 +1,5 @@
 /* Store current floating-point environment.
-   Copyright (C) 1997,98,99,2000,01 Free Software Foundation, Inc.
+   Copyright (C) 1997,98,99,2000,01,10 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
@@ -37,4 +37,5 @@
 compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1);
 #endif
 
+libm_hidden_ver (__fegetenv, fegetenv)
 versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2);
--- sysdeps/arm/fpu/ftestexcept.c
+++ sysdeps/arm/fpu/ftestexcept.c
@@ -1,5 +1,5 @@
 /* Test exception in current environment.
-   Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 2010 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
@@ -30,3 +30,4 @@
 
   return temp & excepts & FE_ALL_EXCEPT;
 }
+libm_hidden_def (fetestexcept)
--- sysdeps/arm/memcpy.S
+++ sysdeps/arm/memcpy.S
@@ -58,6 +58,11 @@
 ENTRY(memcpy)
 
 		stmfd	sp!, {r0, r4, lr}
+		cfi_adjust_cfa_offset (12)
+		cfi_rel_offset (r4, 4)
+		cfi_rel_offset (lr, 8)
+
+		cfi_remember_state
 
 		subs	r2, r2, #4
 		blt	8f
@@ -69,6 +74,11 @@
 
 1:		subs	r2, r2, #(28)
 		stmfd	sp!, {r5 - r8}
+		cfi_adjust_cfa_offset (16)
+		cfi_rel_offset (r5, 0)
+		cfi_rel_offset (r6, 4)
+		cfi_rel_offset (r7, 8)
+		cfi_rel_offset (r8, 12)
 		blt	5f
 
 	CALGN(	ands	ip, r1, #31		)
@@ -121,6 +131,11 @@
 	CALGN(	bcs	2b			)
 
 7:		ldmfd	sp!, {r5 - r8}
+		cfi_adjust_cfa_offset (-16)
+		cfi_restore (r5)
+		cfi_restore (r6)
+		cfi_restore (r7)
+		cfi_restore (r8)
 
 8:		movs	r2, r2, lsl #31
 		ldrneb	r3, [r1], #1
@@ -132,11 +147,16 @@
 
 #if defined (__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__)
 		ldmfd	sp!, {r0, r4, lr}
+		cfi_adjust_cfa_offset (-12)
+		cfi_restore (r4)
+		cfi_restore (lr)
 		bx      lr
 #else
 		ldmfd	sp!, {r0, r4, pc}
 #endif
 
+		cfi_restore_state
+
 9:		rsb	ip, ip, #4
 		cmp	ip, #2
 		ldrgtb	r3, [r1], #1
@@ -169,6 +189,12 @@
 	CALGN(	bcc	15f			)
 
 11:		stmfd	sp!, {r5 - r9}
+		cfi_adjust_cfa_offset (20)
+		cfi_rel_offset (r5, 0)
+		cfi_rel_offset (r6, 4)
+		cfi_rel_offset (r7, 8)
+		cfi_rel_offset (r8, 12)
+		cfi_rel_offset (r9, 16)
 
 	PLD(	pld	[r1, #0]		)
 	PLD(	subs	r2, r2, #96		)
@@ -203,6 +229,12 @@
 	PLD(	bge	13b			)
 
 		ldmfd	sp!, {r5 - r9}
+		cfi_adjust_cfa_offset (-20)
+		cfi_restore (r5)
+		cfi_restore (r6)
+		cfi_restore (r7)
+		cfi_restore (r8)
+		cfi_restore (r9)
 
 14:		ands	ip, r2, #28
 		beq	16f
--- sysdeps/arm/memmove.S
+++ sysdeps/arm/memmove.S
@@ -73,6 +73,12 @@
 #endif
 
 		stmfd	sp!, {r0, r4, lr}
+		cfi_adjust_cfa_offset (12)
+		cfi_rel_offset (r4, 4)
+		cfi_rel_offset (lr, 8)
+
+		cfi_remember_state
+
 		add	r1, r1, r2
 		add	r0, r0, r2
 		subs	r2, r2, #4
@@ -85,6 +91,11 @@
 
 1:		subs	r2, r2, #(28)
 		stmfd	sp!, {r5 - r8}
+		cfi_adjust_cfa_offset (16)
+		cfi_rel_offset (r5, 0)
+		cfi_rel_offset (r6, 4)
+		cfi_rel_offset (r7, 8)
+		cfi_rel_offset (r8, 12)
 		blt	5f
 
 	CALGN(	ands	ip, r1, #31		)
@@ -136,6 +147,11 @@
 	CALGN(	bcs	2b			)
 
 7:		ldmfd	sp!, {r5 - r8}
+		cfi_adjust_cfa_offset (-16)
+		cfi_restore (r5)
+		cfi_restore (r6)
+		cfi_restore (r7)
+		cfi_restore (r8)
 
 8:		movs	r2, r2, lsl #31
 		ldrneb	r3, [r1, #-1]!
@@ -144,13 +160,19 @@
 		strneb	r3, [r0, #-1]!
 		strcsb	r4, [r0, #-1]!
 		strcsb	ip, [r0, #-1]
+
 #if defined (__ARM_ARCH_4T__) && defined (__THUMB_INTERWORK__)
 		ldmfd	sp!, {r0, r4, lr}
+		cfi_adjust_cfa_offset (-12)
+		cfi_restore (r4)
+		cfi_restore (lr)
 		bx      lr
 #else
 		ldmfd	sp!, {r0, r4, pc}
 #endif
 
+		cfi_restore_state
+
 9:		cmp	ip, #2
 		ldrgtb	r3, [r1, #-1]!
 		ldrgeb	r4, [r1, #-1]!
@@ -182,6 +204,12 @@
 	CALGN(	bcc	15f			)
 
 11:		stmfd	sp!, {r5 - r9}
+		cfi_adjust_cfa_offset (20)
+		cfi_rel_offset (r5, 0)
+		cfi_rel_offset (r6, 4)
+		cfi_rel_offset (r7, 8)
+		cfi_rel_offset (r8, 12)
+		cfi_rel_offset (r9, 16)
 
 	PLD(	pld	[r1, #-4]		)
 	PLD(	subs	r2, r2, #96		)
@@ -216,6 +244,12 @@
 	PLD(	bge	13b			)
 
 		ldmfd	sp!, {r5 - r9}
+		cfi_adjust_cfa_offset (-20)
+		cfi_restore (r5)
+		cfi_restore (r6)
+		cfi_restore (r7)
+		cfi_restore (r8)
+		cfi_restore (r9)
 
 14:		ands	ip, r2, #28
 		beq	16f
--- sysdeps/arm/preconfigure
+++ sysdeps/arm/preconfigure
@@ -4,6 +4,10 @@
 	case $config_os in
 	linux-gnueabi)
 		machine=arm/eabi/$machine
+		if [ "${CFLAGS+set}" != "set" ]; then
+		  CFLAGS="-g -O2"
+		fi
+		CFLAGS="$CFLAGS -fno-unwind-tables"
 		;;
 	*)
 		machine=arm/$machine
@@ -11,7 +15,3 @@
 	esac
 	;;
 esac
-if [ "${CFLAGS+set}" != "set" ]; then
-  CFLAGS="-g -O2"
-fi
-CFLAGS="$CFLAGS -fno-unwind-tables"
--- sysdeps/arm/stackinfo.h
+++ sysdeps/arm/stackinfo.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2010 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
@@ -22,7 +22,13 @@
 #ifndef _STACKINFO_H
 #define _STACKINFO_H	1
 
+#include <elf.h>
+
 /* On Arm the stack grows down.  */
 #define _STACK_GROWS_DOWN	1
 
+/* Default to an executable stack.  PF_X can be overridden if PT_GNU_STACK is
+ * present, but it is presumed absent.  */
+#define DEFAULT_STACK_PERMS (PF_R|PF_W|PF_X)
+
 #endif	/* stackinfo.h */
--- sysdeps/arm/sysdep.h
+++ sysdeps/arm/sysdep.h
@@ -1,5 +1,5 @@
 /* Assembler macros for ARM.
-   Copyright (C) 1997, 1998, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 2003, 2009, 2010 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
@@ -81,18 +81,25 @@
   ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),function)			      \
   .align ALIGNARG(4);							      \
   C_LABEL(name)								      \
+  .cfi_sections .debug_frame;						      \
+  cfi_startproc;							      \
   CALL_MCOUNT
 
 #undef	END
 #define END(name)							      \
+  cfi_endproc;								      \
   ASM_SIZE_DIRECTIVE(name)
 
 /* If compiled for profiling, call `mcount' at the start of each function.  */
 #ifdef	PROF
-#define CALL_MCOUNT			\
-	str	lr,[sp, #-4]!	;	\
-	bl	PLTJMP(mcount)	;	\
-	ldr	lr, [sp], #4	;
+#define CALL_MCOUNT \
+  str	lr,[sp, #-4]!; \
+  cfi_adjust_cfa_offset (4); \
+  cfi_rel_offset (lr, 0); \
+  bl PLTJMP(mcount); \
+  ldr lr, [sp], #4; \
+  cfi_adjust_cfa_offset (-4); \
+  cfi_restore (lr)
 #else
 #define CALL_MCOUNT		/* Do nothing.  */
 #endif
--- sysdeps/hppa/nptl/tls.h
+++ sysdeps/hppa/nptl/tls.h
@@ -1,5 +1,5 @@
 /* Definition for thread-local data handling.  NPTL/hppa version.
-   Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007, 2010 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
@@ -140,11 +140,13 @@
   return (struct pthread *) cr27;
 }
 
+/* We write to cr27, clobber r26 as the input argument, and clobber
+   r31 as the link register.  */
 static inline void __set_cr27(struct pthread *cr27)
 {
   asm ( "ble	0xe0(%%sr2, %%r0)\n\t"
 	"copy	%0, %%r26"
-	: : "r" (cr27) : "r26" );
+	: : "r" (cr27) : "r26", "r31" );
 }
 
 /* Get and set the global scope generation counter in struct pthread.  */
--- sysdeps/m68k/coldfire/sysdep.h
+++ sysdeps/m68k/coldfire/sysdep.h
+/* Assembler macros for Coldfire.
+   Copyright (C) 1998, 2003, 2010 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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <sysdeps/m68k/sysdep.h>
+
+#ifdef __ASSEMBLER__
+
+/* Perform operation OP with PC-relative SRC as the first operand and
+   DST as the second.  TMP is available as a temporary if needed.  */
+# define PCREL_OP(OP, SRC, DST, TMP) \
+  move.l &SRC - ., TMP; OP (-8, %pc, TMP), DST
+
+#else
+
+/* As above, but PC is the spelling of the PC register.  We need this
+   so that the macro can be used in both normal and extended asms.  */
+# define PCREL_OP(OP, SRC, DST, TMP, PC) \
+  "move.l #" SRC " - ., " TMP "\n\t" OP " (-8, " PC ", " TMP "), " DST
+
+#endif	/* __ASSEMBLER__ */
--- sysdeps/m68k/dl-machine.h
+++ sysdeps/m68k/dl-machine.h
@@ -1,5 +1,6 @@
 /* Machine-dependent ELF dynamic relocation inline functions.  m68k version.
-   Copyright (C) 1996-2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 1996-2001, 2002, 2003, 2004, 2005, 2010
+   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
@@ -24,6 +25,7 @@
 
 #include <sys/param.h>
 #include <sysdep.h>
+#include <dl-tls.h>
 
 /* Return nonzero iff ELF header is compatible with the running host.  */
 static inline int
@@ -121,6 +123,7 @@
 	.globl _start\n\
 	.type _start,@function\n\
 _start:\n\
+	sub.l %fp, %fp\n\
 	move.l %sp, -(%sp)\n\
 	jbsr _dl_start\n\
 	addq.l #4, %sp\n\
@@ -159,12 +162,16 @@
 	.size _dl_start_user, . - _dl_start_user\n\
 	.previous");
 
-/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
-   PLT entries should not be allowed to define the value.
+/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry or
+   TLS variable, so undefined references should not be allowed to
+   define the value.
    ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
    of the main executable's symbols, as for a COPY reloc.  */
 #define elf_machine_type_class(type) \
-  ((((type) == R_68K_JMP_SLOT) * ELF_RTYPE_CLASS_PLT)	\
+  ((((type) == R_68K_JMP_SLOT	     \
+     || (type) == R_68K_TLS_DTPMOD32 \
+     || (type) == R_68K_TLS_DTPREL32 \
+     || (type) == R_68K_TLS_TPREL32) * ELF_RTYPE_CLASS_PLT)	\
    | (((type) == R_68K_COPY) * ELF_RTYPE_CLASS_COPY))
 
 /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries.  */
@@ -262,6 +269,25 @@
 	case R_68K_PC32:
 	  *reloc_addr = value + reloc->r_addend - (Elf32_Addr) reloc_addr;
 	  break;
+#if defined USE_TLS && !defined RTLD_BOOTSTRAP
+	case R_68K_TLS_DTPMOD32:
+	  /* Get the information from the link map returned by the
+	     resolv function.  */
+	  if (sym_map != NULL)
+	    *reloc_addr = sym_map->l_tls_modid;
+	  break;
+	case R_68K_TLS_DTPREL32:
+	  if (sym != NULL)
+	    *reloc_addr = TLS_DTPREL_VALUE (sym, reloc);
+	  break;
+	case R_68K_TLS_TPREL32:
+	  if (sym != NULL)
+	    {
+	      CHECK_STATIC_TLS (map, sym_map);
+	      *reloc_addr = TLS_TPREL_VALUE (sym_map, sym, reloc);
+	    }
+	  break;
+#endif /* defined USE_TLS && !defined RTLD_BOOTSTRAP */
 	case R_68K_NONE:		/* Alright, Wilbur.  */
 	  break;
 	default:
--- sysdeps/m68k/dl-tls.h
+++ sysdeps/m68k/dl-tls.h
+/* Thread-local storage handling in the ELF dynamic linker.  M68K version.
+   Copyright (C) 2010 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
+
+   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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+
+/* Type used for the representation of TLS information in the GOT.  */
+typedef struct
+{
+  unsigned long int ti_module;
+  unsigned long int ti_offset;
+} tls_index;
+
+/* The thread pointer points 0x7000 past the first static TLS block.  */
+#define TLS_TP_OFFSET		0x7000
+
+/* Dynamic thread vector pointers point 0x8000 past the start of each
+   TLS block.  */
+#define TLS_DTV_OFFSET		0x8000
+
+/* Compute the value for a TPREL reloc.  */
+#define TLS_TPREL_VALUE(sym_map, sym, reloc)				\
+  ((sym_map)->l_tls_offset + (sym)->st_value + (reloc)->r_addend	\
+   - TLS_TP_OFFSET)
+
+/* Compute the value for a DTPREL reloc.  */
+#define TLS_DTPREL_VALUE(sym, reloc)				\
+  ((sym)->st_value + (reloc)->r_addend - TLS_DTV_OFFSET)
+
+extern void *__tls_get_addr (tls_index *ti);
+
+#define GET_ADDR_OFFSET	        (ti->ti_offset + TLS_DTV_OFFSET)
+#define __TLS_GET_ADDR(__ti)	(__tls_get_addr (__ti) - TLS_DTV_OFFSET)
--- sysdeps/m68k/fpu/fegetenv.c
+++ sysdeps/m68k/fpu/fegetenv.c
@@ -1,5 +1,5 @@
 /* Store current floating-point environment.
-   Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc.
+   Copyright (C) 1997,99,2000,01,10 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
 
@@ -41,4 +41,5 @@
 compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1);
 #endif
 
+libm_hidden_ver (__fegetenv, fegetenv)
 versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2);
--- sysdeps/m68k/fpu/feupdateenv.c
+++ sysdeps/m68k/fpu/feupdateenv.c
@@ -1,5 +1,5 @@
 /* Install given floating-point environment and raise exceptions.
-   Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc.
+   Copyright (C) 1997,1999-2001,2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
 
@@ -47,4 +47,5 @@
 compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1);
 #endif
 
+libm_hidden_ver (__feupdateenv, feupdateenv)
 versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2);
--- sysdeps/m68k/fpu/ftestexcept.c
+++ sysdeps/m68k/fpu/ftestexcept.c
@@ -1,5 +1,5 @@
 /* Test exception in current environment.
-   Copyright (C) 1997 Free Software Foundation, Inc.
+   Copyright (C) 1997, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
 
@@ -30,3 +30,4 @@
 
   return fpsr & excepts & FE_ALL_EXCEPT;
 }
+libm_hidden_def (fetestexcept)
--- sysdeps/m68k/jmpbuf-unwind.h
+++ sysdeps/m68k/jmpbuf-unwind.h
@@ -1,5 +1,5 @@
 /* Examine __jmp_buf for unwinding frames.  m68k version.
-   Copyright (C) 2006 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2010 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
@@ -18,8 +18,29 @@
    02111-1307 USA.  */
 
 #include <setjmp.h>
+#include <stdint.h>
+#include <unwind.h>
 
 /* Test if longjmp to JMPBUF would unwind the frame
    containing a local variable at ADDRESS.  */
 #define _JMPBUF_UNWINDS(jmpbuf, address, demangle)		\
   ((void *) (address) < (void *) demangle ((jmpbuf)->__sp))
+
+#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
+  _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
+
+static inline uintptr_t __attribute__ ((unused))
+_jmpbuf_sp (__jmp_buf regs)
+{
+  uintptr_t sp = regs[0].__sp;
+#ifdef PTR_DEMANGLE
+  PTR_DEMANGLE (sp);
+#endif
+  return sp;
+}
+
+#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
+  ((uintptr_t) (_address) - (_adj) < _jmpbuf_sp (_jmpbuf) - (_adj))
+
+/* We use the normal longjmp for unwinding.  */
+#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
--- sysdeps/m68k/libc-tls.c
+++ sysdeps/m68k/libc-tls.c
+/* Thread-local storage handling in the ELF dynamic linker.  m68k version.
+   Copyright (C) 2010 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
+
+   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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <csu/libc-tls.c>
+#include <dl-tls.h>
+
+#if USE_TLS
+
+/* On M68K, linker optimizations are not required, so __tls_get_addr
+   can be called even in statically linked binaries.  In this case module
+   must be always 1 and PT_TLS segment exist in the binary, otherwise it
+   would not link.  */
+
+void *
+__tls_get_addr (tls_index *ti)
+{
+  dtv_t *dtv = THREAD_DTV ();
+  return (char *) dtv[1].pointer.val + GET_ADDR_OFFSET;
+}
+
+#endif
--- sysdeps/m68k/m680x0/fpu/bits/mathinline.h
+++ sysdeps/m68k/m680x0/fpu/bits/mathinline.h
@@ -1,5 +1,5 @@
 /* Definitions of inline math functions implemented by the m68881/2.
-   Copyright (C) 1991,92,93,94,96,97,98,99,2000,2002, 2003, 2004, 2008
+   Copyright (C) 1991,92,93,94,96,97,98,99,2000,2002, 2003, 2004, 2008, 2010
      Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -85,6 +85,26 @@
 	       : "=dm" (__result) : "f" (x), "f" (y));	\
       __result != 0; })
 # endif /* GCC 3.1 */
+
+/* Test for negative number.  Used in the signbit() macro.  */
+__MATH_INLINE int
+__NTH (__signbitf (float __x))
+{
+  __extension__ union { float __f; int __i; } __u = { __f: __x };
+  return __u.__i < 0;
+}
+__MATH_INLINE int
+__NTH (__signbit (double __x))
+{
+  __extension__ union { double __d; int __i[2]; } __u = { __d: __x };
+  return __u.__i[0] < 0;
+}
+__MATH_INLINE int
+__NTH (__signbitl (long double __x))
+{
+  __extension__ union { long double __d; int __i[3]; } __u = { __d: __x };
+  return __u.__i[0] < 0;
+}
 #endif
 
 
@@ -106,7 +126,7 @@
 /* Define a const math function.  */
 #define __m81_defun(rettype, func, args)				      \
   __m81_inline rettype __attribute__((__const__))			      \
-  __m81_u(func) args
+  __NTH (__m81_u(func) args)
 
 /* Define the three variants of a math function that has a direct
    implementation in the m68k fpu.  FUNC is the name for C (which will be
@@ -281,17 +301,7 @@
 #ifdef __USE_ISOC99
 
 # define __inline_functions(float_type, s)				  \
-__m81_defun (int, __CONCAT(__signbit,s), (float_type __value))	  	  \
-{									  \
-  /* There is no branch-condition for the sign bit, so we must extract	  \
-     and examine the condition codes manually.  */			  \
-  unsigned long int __fpsr;						  \
-  __asm ("ftst%.x %1\n"							  \
-	 "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value));	  \
-  return (__fpsr >> 27) & 1;						  \
-}									  \
-									  \
-  __m81_defun (float_type, __CONCAT(__scalbln,s),			  \
+__m81_defun (float_type, __CONCAT(__scalbln,s),			  \
 	     (float_type __x, long int __n))				  \
 {									  \
   return __CONCAT(__scalbn,s) (__x, __n);				  \
@@ -316,13 +326,6 @@
   long int __result;							  \
   __asm ("fmove%.l %1, %0" : "=dm" (__result) : "f" (__x));		  \
   return __result;							  \
-}									  \
-									  \
-__m81_inline float_type							  \
-__m81_u(__CONCAT(__fma,s))(float_type __x, float_type __y,		  \
-			   float_type __z)				  \
-{									  \
-  return (__x * __y) + __z;						  \
 }
 
 __inline_functions (double,)
@@ -336,8 +339,8 @@
 
 # define __inline_functions(float_type, s)				\
 __m81_inline void							\
-__m81_u(__CONCAT(__sincos,s))(float_type __x, float_type *__sinx,	\
-			      float_type *__cosx)			\
+__NTH (__m81_u(__CONCAT(__sincos,s))(float_type __x, float_type *__sinx, \
+				     float_type *__cosx))		\
 {									\
   __asm ("fsincos%.x %2,%1:%0"						\
 	 : "=f" (*__sinx), "=f" (*__cosx) : "f" (__x));			\
@@ -358,13 +361,13 @@
    NAME, to make token pasting work correctly with -traditional.  */
 # define __inline_forward_c(rettype, name, args1, args2)	\
 __MATH_INLINE rettype __attribute__((__const__))		\
-  name args1							\
+__NTH (name args1)						\
 {								\
   return __CONCAT(__,name) args2;				\
 }
 
 # define __inline_forward(rettype, name, args1, args2)	\
-__MATH_INLINE rettype name args1			\
+__MATH_INLINE rettype __NTH (name args1)		\
 {							\
   return __CONCAT(__,name) args2;			\
 }
@@ -387,8 +390,6 @@
 __inline_forward_c(double,scalbln, (double __x, long int __n), (__x, __n))
 __inline_forward_c(double,nearbyint, (double __value), (__value))
 __inline_forward_c(long int,lrint, (double __value), (__value))
-__inline_forward_c(double,fma, (double __x, double __y, double __z),
-		   (__x, __y, __z))
 # endif
 # ifdef __USE_GNU
 __inline_forward(void,sincos, (double __x, double *__sinx, double *__cosx),
@@ -409,8 +410,6 @@
 __inline_forward_c(float,scalblnf, (float __x, long int __n), (__x, __n))
 __inline_forward_c(float,nearbyintf, (float __value), (__value))
 __inline_forward_c(long int,lrintf, (float __value), (__value))
-__inline_forward_c(float,fmaf, (float __x, float __y, float __z),
-		   (__x, __y, __z))
 # endif
 # ifdef __USE_GNU
 __inline_forward(void,sincosf, (float __x, float *__sinx, float *__cosx),
@@ -430,9 +429,6 @@
 		   (__x, __n))
 __inline_forward_c(long double,nearbyintl, (long double __value), (__value))
 __inline_forward_c(long int,lrintl, (long double __value), (__value))
-__inline_forward_c(long double,fmal,
-		   (long double __x, long double __y, long double __z),
-		   (__x, __y, __z))
 # endif
 # ifdef __USE_GNU
 __inline_forward(void,sincosl,
--- sysdeps/m68k/m680x0/fpu/s_ccos.c
+++ sysdeps/m68k/m680x0/fpu/s_ccos.c
@@ -1,5 +1,5 @@
 /* Complex cosine function.  m68k fpu version
-   Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1999, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
 
@@ -48,7 +48,7 @@
 	     : "f" (__real__ x));
       __real__ retval = cos_rx * m81(__ieee754_cosh) (__imag__ x);
       if (rx_cond & __M81_COND_ZERO)
-	__imag__ retval = (m81(__signbit) (__imag__ x)
+	__imag__ retval = (signbit (__imag__ x)
 			   ? __real__ x : -__real__ x);
       else
 	__imag__ retval = -sin_rx * m81(__ieee754_sinh) (__imag__ x);
--- sysdeps/m68k/m680x0/fpu/s_ccosh.c
+++ sysdeps/m68k/m680x0/fpu/s_ccosh.c
@@ -1,5 +1,5 @@
 /* Complex cosine hyperbole function.  m68k fpu version
-   Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1999, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
 
@@ -48,7 +48,7 @@
 	     : "f" (__imag__ x));
       __real__ retval = cos_ix * m81(__ieee754_cosh) (__real__ x);
       if (ix_cond & __M81_COND_ZERO)
-	__imag__ retval = (m81(__signbit) (__real__ x)
+	__imag__ retval = (signbit (__real__ x)
 			   ? -__imag__ x : __imag__ x);
       else
 	__imag__ retval = sin_ix * m81(__ieee754_sinh) (__real__ x);
--- sysdeps/m68k/m680x0/sysdep.h
+++ sysdeps/m68k/m680x0/sysdep.h
+/* Assembler macros for m680x0.
+   Copyright (C) 2010 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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <sysdeps/m68k/sysdep.h>
+
+#ifdef __ASSEMBLER__
+
+/* Perform operation OP with PC-relative SRC as the first operand and
+   DST as the second.  TMP is available as a temporary if needed.  */
+#define PCREL_OP(OP, SRC, DST, TMP) \
+  OP SRC(%pc), DST
+
+#else
+
+/* As above, but PC is the spelling of the PC register.  We need this
+   so that the macro can be used in both normal and extended asms.  */
+#define PCREL_OP(OP, SRC, DST, TMP, PC) \
+  OP " " SRC "(" PC "), " DST
+
+#endif	/* __ASSEMBLER__ */
--- sysdeps/m68k/nptl
+++ sysdeps/m68k/nptl
+(directory)
--- sysdeps/m68k/nptl/Makefile
+++ sysdeps/m68k/nptl/Makefile
+# Copyright (C) 2010 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+# Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
+#
+# 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, write to the Free
+# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA.
+
+ifeq ($(subdir),csu)
+gen-as-const-headers += tcb-offsets.sym
+endif
--- sysdeps/m68k/nptl/pthread_spin_lock.c
+++ sysdeps/m68k/nptl/pthread_spin_lock.c
+/* Copyright (C) 2010 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
+
+   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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <atomic.h>
+#include "pthreadP.h"
+
+int
+pthread_spin_lock (pthread_spinlock_t *lock)
+{
+  while (atomic_compare_and_exchange_val_acq(lock, 1, 0) != 0)
+   while (*lock != 0)
+    ;
+
+  return 0;
+}
--- sysdeps/m68k/nptl/pthread_spin_trylock.c
+++ sysdeps/m68k/nptl/pthread_spin_trylock.c
+/* Copyright (C) 2010 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
+
+   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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <errno.h>
+#include <atomic.h>
+#include "pthreadP.h"
+
+int
+pthread_spin_trylock (pthread_spinlock_t *lock)
+{
+  return atomic_compare_and_exchange_val_acq(lock, 1, 0) ? EBUSY : 0;
+}
--- sysdeps/m68k/nptl/pthreaddef.h
+++ sysdeps/m68k/nptl/pthreaddef.h
+/* Copyright (C) 2010 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
+
+   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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+/* Default stack size.  */
+#define ARCH_STACK_DEFAULT_SIZE	(2 * 1024 * 1024)
+
+/* Required stack pointer alignment at beginning.  */
+#define STACK_ALIGN		16
+
+/* Minimal stack size after allocating thread descriptor and guard size.  */
+#define MINIMAL_REST_STACK	2048
+
+/* Alignment requirement for TCB.  */
+#define TCB_ALIGNMENT		16
+
+
+/* Location of current stack frame.  */
+#define CURRENT_STACK_FRAME	__builtin_frame_address (0)
+
+
+/* XXX Until we have a better place keep the definitions here.  */
+#define __exit_thread_inline(val) \
+  INLINE_SYSCALL (exit, 1, (val))
--- sysdeps/m68k/nptl/tcb-offsets.sym
+++ sysdeps/m68k/nptl/tcb-offsets.sym
+#include <sysdep.h>
+#include <tls.h>
+
+--
+
+-- Derive offsets relative to the thread register.
+#define thread_offsetof(mem)	(long)(offsetof(struct pthread, mem) - TLS_TCB_OFFSET - \
TLS_PRE_TCB_SIZE) +
+MULTIPLE_THREADS_OFFSET		thread_offsetof (header.multiple_threads)
+PID_OFFSET			thread_offsetof (pid)
+TID_OFFSET			thread_offsetof (tid)
--- sysdeps/m68k/nptl/tls.h
+++ sysdeps/m68k/nptl/tls.h
+/* Definition for thread-local data handling.  NPTL/m68k version.
+   Copyright (C) 2010 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
+
+   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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#ifndef _TLS_H
+#define _TLS_H	1
+
+#include <dl-sysdep.h>
+
+#ifndef __ASSEMBLER__
+# include <stdbool.h>
+# include <stddef.h>
+# include <stdint.h>
+
+/* Type for the dtv.  */
+typedef union dtv
+{
+  size_t counter;
+  struct
+  {
+    void *val;
+    bool is_static;
+  } pointer;
+} dtv_t;
+
+#else /* __ASSEMBLER__ */
+# include <tcb-offsets.h>
+#endif /* __ASSEMBLER__ */
+
+/* Signal that TLS support is available.  */
+#define USE_TLS	1
+
+#ifndef __ASSEMBLER__
+
+/* Get system call information.  */
+# include <sysdep.h>
+
+/* The TP points to the start of the thread blocks.  */
+# define TLS_DTV_AT_TP	1
+
+/* Get the thread descriptor definition.  */
+# include <nptl/descr.h>
+
+typedef struct
+{
+  dtv_t *dtv;
+  void *private;
+} tcbhead_t;
+
+/* This is the size of the initial TCB.  Because our TCB is before the thread
+   pointer, we don't need this.  */
+# define TLS_INIT_TCB_SIZE	0
+
+/* Alignment requirements for the initial TCB.  */
+# define TLS_INIT_TCB_ALIGN	__alignof__ (struct pthread)
+
+/* This is the size of the TCB.  Because our TCB is before the thread
+   pointer, we don't need this.  */
+# define TLS_TCB_SIZE		0
+
+/* Alignment requirements for the TCB.  */
+# define TLS_TCB_ALIGN		__alignof__ (struct pthread)
+
+/* This is the size we need before TCB - actually, it includes the TCB.  */
+# define TLS_PRE_TCB_SIZE						\
+  (sizeof (struct pthread)						\
+   + ((sizeof (tcbhead_t) + TLS_TCB_ALIGN - 1) & ~(TLS_TCB_ALIGN - 1)))
+
+/* The thread pointer (TP) points to the end of the
+   TCB + 0x7000, as for PowerPC and MIPS.  This implies that TCB address is
+   TP - 0x7000.  As we define TLS_DTV_AT_TP we can
+   assume that the pthread struct is allocated immediately ahead of the
+   TCB.  This implies that the pthread_descr address is
+   TP - (TLS_PRE_TCB_SIZE + 0x7000).  */
+# define TLS_TCB_OFFSET	0x7000
+
+/* Install the dtv pointer.  The pointer passed is to the element with
+   index -1 which contain the length.  */
+# define INSTALL_DTV(tcbp, dtvp) \
+  ((tcbhead_t *) (tcbp))[-1].dtv = dtvp + 1
+
+/* Install new dtv for current thread.  */
+# define INSTALL_NEW_DTV(dtv) \
+  (THREAD_DTV () = (dtv))
+
+/* Return dtv of given thread descriptor.  */
+# define GET_DTV(tcbp) \
+  (((tcbhead_t *) (tcbp))[-1].dtv)
+
+/* Code to initially initialize the thread pointer.  This might need
+   special attention since 'errno' is not yet available and if the
+   operation can cause a failure 'errno' must not be touched.  */
+# define TLS_INIT_TP(tcbp, secondcall)					\
+  ({									\
+    INTERNAL_SYSCALL_DECL (err);					\
+    int _sys_result;							\
+									\
+    _sys_result = INTERNAL_SYSCALL (set_thread_area, err, 1,		\
+				    ((void *) (tcbp)) + TLS_TCB_OFFSET); \
+    INTERNAL_SYSCALL_ERROR_P (_sys_result, err) ? "unknown error" : NULL; })
+
+extern void * __m68k_read_tp (void);
+
+/* Return the address of the dtv for the current thread.  */
+# define THREAD_DTV() \
+  (((tcbhead_t *) (__m68k_read_tp () - TLS_TCB_OFFSET))[-1].dtv)
+
+/* Return the thread descriptor for the current thread.  */
+# define THREAD_SELF \
+  ((struct pthread *) (__m68k_read_tp () - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE))
+
+/* Magic for libthread_db to know how to do THREAD_SELF.  */
+# define DB_THREAD_SELF \
+  CONST_THREAD_AREA (32, TLS_TCB_OFFSET + TLS_PRE_TCB_SIZE)
+
+/* Access to data in the thread descriptor is easy.  */
+# define THREAD_GETMEM(descr, member) \
+  descr->member
+# define THREAD_GETMEM_NC(descr, member, idx) \
+  descr->member[idx]
+# define THREAD_SETMEM(descr, member, value) \
+  descr->member = (value)
+# define THREAD_SETMEM_NC(descr, member, idx, value) \
+  descr->member[idx] = (value)
+
+/* l_tls_offset == 0 is perfectly valid on M68K, so we have to use some
+   different value to mean unset l_tls_offset.  */
+# define NO_TLS_OFFSET		-1
+
+/* Get and set the global scope generation counter in struct pthread.  */
+#define THREAD_GSCOPE_FLAG_UNUSED 0
+#define THREAD_GSCOPE_FLAG_USED   1
+#define THREAD_GSCOPE_FLAG_WAIT   2
+#define THREAD_GSCOPE_RESET_FLAG()					\
+  do									\
+    { int __res								\
+	= atomic_exchange_rel (&THREAD_SELF->header.gscope_flag,	\
+			       THREAD_GSCOPE_FLAG_UNUSED);		\
+      if (__res == THREAD_GSCOPE_FLAG_WAIT)				\
+	lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \
+    }									\
+  while (0)
+#define THREAD_GSCOPE_SET_FLAG()					\
+  do									\
+    {									\
+      THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED;	\
+      atomic_write_barrier ();						\
+    }									\
+  while (0)
+#define THREAD_GSCOPE_WAIT() \
+  GL(dl_wait_lookup_done) ()
+
+#endif /* __ASSEMBLER__ */
+
+#endif	/* tls.h */
--- sysdeps/m68k/stackinfo.h
+++ sysdeps/m68k/stackinfo.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2010 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
@@ -22,7 +22,13 @@
 #ifndef _STACKINFO_H
 #define _STACKINFO_H	1
 
+#include <elf.h>
+
 /* On m68k the stack grows down.  */
 #define _STACK_GROWS_DOWN	1
 
+/* Default to an executable stack.  PF_X can be overridden if PT_GNU_STACK
+   is present, but it is presumed absent.  */
+#define DEFAULT_STACK_PERMS (PF_R|PF_W|PF_X)
+
 #endif	/* stackinfo.h */
--- sysdeps/m68k/sysdep.h
+++ sysdeps/m68k/sysdep.h
@@ -1,5 +1,5 @@
 /* Assembler macros for m68k.
-   Copyright (C) 1998, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1998, 2003, 2010 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
@@ -97,26 +97,4 @@
 #  define JUMPTARGET(name)	name
 # endif
 
-/* Perform operation OP with PC-relative SRC as the first operand and
-   DST as the second.  TMP is available as a temporary if needed.  */
-#ifdef __mcoldfire__
-#define PCREL_OP(OP, SRC, DST, TMP) \
-  move.l &SRC - ., TMP; OP (-8, %pc, TMP), DST
-#else
-#define PCREL_OP(OP, SRC, DST, TMP) \
-  OP SRC(%pc), DST
-#endif
-
-#else
-
-/* As above, but PC is the spelling of the PC register.  We need this
-   so that the macro can be used in both normal and extended asms.  */
-#ifdef __mcoldfire__
-#define PCREL_OP(OP, SRC, DST, TMP, PC) \
-  "move.l #" SRC " - ., " TMP "\n\t" OP " (-8, " PC ", " TMP "), " DST
-#else
-#define PCREL_OP(OP, SRC, DST, TMP, PC) \
-  OP " " SRC "(" PC "), " DST
-#endif
-
 #endif	/* __ASSEMBLER__ */
--- sysdeps/m68k/tls-macros.h
+++ sysdeps/m68k/tls-macros.h
+/* Macros for accessing thread-local storage.  m68k version.
+   Copyright (C) 2010 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
+
+   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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#define TLS_GD(x)							\
+  ({									\
+    void *__result;							\
+    extern void *__tls_get_addr (void *);				\
+									\
+    asm ("movel #_GLOBAL_OFFSET_TABLE_@GOTPC, %0\n\t"			\
+	 "lea (-6, %%pc, %0), %0\n\t"					\
+	 "lea " #x "@TLSGD(%0), %0"					\
+	 : "=&a" (__result));						\
+    (int *) __tls_get_addr (__result); })
+
+#define TLS_LD(x)							\
+  ({									\
+    char *__tp;								\
+    int __offset;							\
+    extern void *__tls_get_addr (void *);				\
+									\
+    asm ("movel #_GLOBAL_OFFSET_TABLE_@GOTPC, %0\n\t"			\
+	 "lea (-6, %%pc, %0), %0\n\t"					\
+	 "lea " #x "@TLSLDM(%0), %0"					\
+	 : "=&a" (__tp));						\
+    __tp = (char *) __tls_get_addr (__tp);				\
+    asm ("movel #" #x "@TLSLDO, %0"					\
+	 : "=a" (__offset));						\
+    (int *) (__tp + __offset); })
+
+#define TLS_IE(x)							\
+  ({									\
+    char *__tp;								\
+    int __offset;							\
+    extern void * __m68k_read_tp (void);				\
+									\
+    __tp = (char *) __m68k_read_tp ();					\
+    asm ("movel #_GLOBAL_OFFSET_TABLE_@GOTPC, %0\n\t"			\
+	 "lea (-6, %%pc, %0), %0\n\t"					\
+	 "movel " #x "@TLSIE(%0), %0"					\
+	 : "=&a" (__offset));						\
+    (int *) (__tp + __offset); })
+
+#define TLS_LE(x)							\
+  ({									\
+    char *__tp;								\
+    int __offset;							\
+    extern void * __m68k_read_tp (void);				\
+									\
+    __tp = (char *) __m68k_read_tp ();					\
+    asm ("movel #" #x "@TLSLE, %0"					\
+	 : "=a" (__offset));						\
+    (int *) (__tp + __offset); })
+
--- sysdeps/mach/hurd/mips/init-first.c
+++ sysdeps/mach/hurd/mips/init-first.c
@@ -1,5 +1,5 @@
 /* Initialization code run first thing by the ELF startup code.  For Mips/Hurd.
-   Copyright (C) 1996,1997,1998,2000,01,02,03 Free Software Foundation, Inc.
+   Copyright (C) 1996,1997,1998,2000,01,02,03,10 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
@@ -119,7 +119,7 @@
   __getopt_clean_environment (envp);
 #endif
 
-#ifdef SHARED
+#if defined SHARED && !defined NO_CTORS_DTORS_SECTIONS
   __libc_global_ctors ();
 #endif
 
--- sysdeps/mips/bits/atomic.h
+++ sysdeps/mips/bits/atomic.h
@@ -69,16 +69,16 @@
      MIPS_PUSH_MIPS2							      \
      rel	"\n"							      \
      "1:\t"								      \
-     "ll	%0,%4\n\t"						      \
+     "ll	%0,%5\n\t"						      \
      "move	%1,$0\n\t"						      \
-     "bne	%0,%2,2f\n\t"						      \
-     "move	%1,%3\n\t"						      \
-     "sc	%1,%4\n\t"						      \
+     "bne	%0,%3,2f\n\t"						      \
+     "move	%1,%4\n\t"						      \
+     "sc	%1,%2\n\t"						      \
      "beqz	%1,1b\n"						      \
      acq	"\n\t"							      \
      ".set	pop\n"							      \
      "2:\n\t"								      \
-	      : "=&r" (__prev), "=&r" (__cmp)				      \
+	      : "=&r" (__prev), "=&r" (__cmp), "=m" (*mem)		      \
 	      : "r" (oldval), "r" (newval), "m" (*mem)			      \
 	      : "memory")
 
@@ -93,16 +93,16 @@
      MIPS_PUSH_MIPS2							      \
      rel	"\n"							      \
      "1:\t"								      \
-     "lld	%0,%4\n\t"						      \
+     "lld	%0,%5\n\t"						      \
      "move	%1,$0\n\t"						      \
-     "bne	%0,%2,2f\n\t"						      \
-     "move	%1,%3\n\t"						      \
-     "scd	%1,%4\n\t"						      \
+     "bne	%0,%3,2f\n\t"						      \
+     "move	%1,%4\n\t"						      \
+     "scd	%1,%2\n\t"						      \
      "beqz	%1,1b\n"						      \
      acq	"\n\t"							      \
      ".set	pop\n"							      \
      "2:\n\t"								      \
-	      : "=&r" (__prev), "=&r" (__cmp)				      \
+	      : "=&r" (__prev), "=&r" (__cmp), "=m" (*mem)		      \
 	      : "r" (oldval), "r" (newval), "m" (*mem)			      \
 	      : "memory")
 #endif
@@ -189,14 +189,14 @@
      MIPS_PUSH_MIPS2							      \
      rel	"\n"							      \
      "1:\t"								      \
-     "ll	%0,%3\n\t"						      \
-     "move	%1,%2\n\t"						      \
-     "sc	%1,%3\n\t"						      \
+     "ll	%0,%4\n\t"						      \
+     "move	%1,%3\n\t"						      \
+     "sc	%1,%2\n\t"						      \
      "beqz	%1,1b\n"						      \
      acq	"\n\t"							      \
      ".set	pop\n"							      \
      "2:\n\t"								      \
-	      : "=&r" (__prev), "=&r" (__cmp)				      \
+	      : "=&r" (__prev), "=&r" (__cmp), "=m" (*mem)		      \
 	      : "r" (newval), "m" (*mem)				      \
 	      : "memory");						      \
   __prev; })
@@ -213,14 +213,14 @@
      MIPS_PUSH_MIPS2							      \
      rel	"\n"							      \
      "1:\n"								      \
-     "lld	%0,%3\n\t"						      \
-     "move	%1,%2\n\t"						      \
-     "scd	%1,%3\n\t"						      \
+     "lld	%0,%4\n\t"						      \
+     "move	%1,%3\n\t"						      \
+     "scd	%1,%2\n\t"						      \
      "beqz	%1,1b\n"						      \
      acq	"\n\t"							      \
      ".set	pop\n"							      \
      "2:\n\t"								      \
-	      : "=&r" (__prev), "=&r" (__cmp)				      \
+	      : "=&r" (__prev), "=&r" (__cmp), "=m" (*mem)		      \
 	      : "r" (newval), "m" (*mem)				      \
 	      : "memory");						      \
   __prev; })
@@ -248,14 +248,14 @@
      MIPS_PUSH_MIPS2							      \
      rel	"\n"							      \
      "1:\t"								      \
-     "ll	%0,%3\n\t"						      \
-     "addu	%1,%0,%2\n\t"						      \
-     "sc	%1,%3\n\t"						      \
+     "ll	%0,%4\n\t"						      \
+     "addu	%1,%0,%3\n\t"						      \
+     "sc	%1,%2\n\t"						      \
      "beqz	%1,1b\n"						      \
      acq	"\n\t"							      \
      ".set	pop\n"							      \
      "2:\n\t"								      \
-	      : "=&r" (__prev), "=&r" (__cmp)				      \
+	      : "=&r" (__prev), "=&r" (__cmp), "=m" (*mem)		      \
 	      : "r" (value), "m" (*mem)					      \
 	      : "memory");						      \
   __prev; })
@@ -272,14 +272,14 @@
      MIPS_PUSH_MIPS2							      \
      rel	"\n"							      \
      "1:\t"								      \
-     "lld	%0,%3\n\t"						      \
-     "daddu	%1,%0,%2\n\t"						      \
-     "scd	%1,%3\n\t"						      \
+     "lld	%0,%4\n\t"						      \
+     "daddu	%1,%0,%3\n\t"						      \
+     "scd	%1,%2\n\t"						      \
      "beqz	%1,1b\n"						      \
      acq	"\n\t"							      \
      ".set	pop\n"							      \
      "2:\n\t"								      \
-	      : "=&r" (__prev), "=&r" (__cmp)				      \
+	      : "=&r" (__prev), "=&r" (__cmp), "=m" (*mem)		      \
 	      : "r" (value), "m" (*mem)					      \
 	      : "memory");						      \
   __prev; })
--- sysdeps/mips/dl-lookup.c
+++ sysdeps/mips/dl-lookup.c
@@ -1,6 +1,7 @@
 /* Look up a symbol in the loaded objects.
    MIPS/Linux version - special handling of non-PIC undefined symbol rules.
-   Copyright (C) 1995-2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1995-2005, 2006, 2007, 2009, 2010
+   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
@@ -329,16 +330,16 @@
 		 definition we have to use it.  */
 	      void enter (struct unique_sym *table, size_t size,
 			  unsigned int hash, const char *name,
-			  const ElfW(Sym) *sym, const struct link_map *map)
+			  const ElfW(Sym) *sym, struct link_map *map)
 	      {
 		size_t idx = hash % size;
 		size_t hash2 = 1 + hash % (size - 2);
 		while (1)
 		  {
-		    if (table[idx].hashval == 0)
+		    if (table[idx].name == NULL)
 		      {
 			table[idx].hashval = hash;
-			table[idx].name = strtab + sym->st_name;
+			table[idx].name = name;
 			if ((type_class & ELF_RTYPE_CLASS_COPY) != 0)
 			  {
 			    table[idx].sym = ref;
@@ -348,7 +349,13 @@
 			  {
 			    table[idx].sym = sym;
 			    table[idx].map = map;
+
+			    if (map->l_type == lt_loaded)
+			      /* Make sure we don't unload this object by
+				 setting the appropriate flag.  */
+			      map->l_flags_1 |= DF_1_NODELETE;
 			  }
+
 			return;
 		      }
 
@@ -380,8 +387,7 @@
 			  return 1;
 			}
 
-		      if (entries[idx].hashval == 0
-			  && entries[idx].name == NULL)
+		      if (entries[idx].name == NULL)
 			break;
 
 		      idx += hash2;
@@ -389,10 +395,14 @@
 			idx -= size;
 		    }
 
-		  if (size * 3 <= tab->n_elements)
+		  if (size * 3 <= tab->n_elements * 4)
 		    {
 		      /* Expand the table.  */
-		      size_t newsize = _dl_higher_prime_number (size);
+#ifdef RTLD_CHECK_FOREIGN_CALL
+		      /* This must not happen during runtime relocations.  */
+		      assert (!RTLD_CHECK_FOREIGN_CALL);
+#endif
+		      size_t newsize = _dl_higher_prime_number (size + 1);
 		      struct unique_sym *newentries
 			= calloc (sizeof (struct unique_sym), newsize);
 		      if (newentries == NULL)
@@ -403,19 +413,39 @@
 			}
 
 		      for (idx = 0; idx < size; ++idx)
-			if (entries[idx].hashval != 0)
+			if (entries[idx].name != NULL)
 			  enter (newentries, newsize, entries[idx].hashval,
 				 entries[idx].name, entries[idx].sym,
 				 entries[idx].map);
 
 		      tab->free (entries);
 		      tab->size = newsize;
+		      size = newsize;
 		      entries = tab->entries = newentries;
 		      tab->free = free;
 		    }
 		}
 	      else
 		{
+#ifdef RTLD_CHECK_FOREIGN_CALL
+		  /* This must not happen during runtime relocations.  */
+		  assert (!RTLD_CHECK_FOREIGN_CALL);
+#endif
+
+#ifdef SHARED
+		  /* If tab->entries is NULL, but tab->size is not, it means
+		     this is the second, conflict finding, lookup for
+		     LD_TRACE_PRELINKING in _dl_debug_bindings.  Don't
+		     allocate anything and don't enter anything into the
+		     hash table.  */
+		  if (__builtin_expect (tab->size, 0))
+		    {
+		      assert (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK);
+		      __rtld_lock_unlock_recursive (tab->lock);
+		      goto success;
+		    }
+#endif
+
 #define INITIAL_NUNIQUE_SYM_TABLE 31
 		  size = INITIAL_NUNIQUE_SYM_TABLE;
 		  entries = calloc (sizeof (struct unique_sym), size);
@@ -427,7 +457,8 @@
 		  tab->free = free;
 		}
 
-	      enter (entries, size, new_hash, strtab + sym->st_name, sym, map);
+	      enter (entries, size, new_hash, strtab + sym->st_name, sym,
+		     (struct link_map *) map);
 	      ++tab->n_elements;
 
 	      __rtld_lock_unlock_recursive (tab->lock);
@@ -610,6 +641,10 @@
 	  unsigned int max
 	    = undef_map->l_reldepsmax ? undef_map->l_reldepsmax * 2 : 10;
 
+#ifdef RTLD_PREPARE_FOREIGN_CALL
+	  RTLD_PREPARE_FOREIGN_CALL;
+#endif
+
 	  newp = malloc (sizeof (*newp) + max * sizeof (struct link_map *));
 	  if (newp == NULL)
 	    {
@@ -774,7 +809,7 @@
   if (__builtin_expect (protected != 0, 0))
     {
       /* It is very tricky.  We need to figure out what value to
-         return for the protected symbol.  */
+	 return for the protected symbol.  */
       if (type_class == ELF_RTYPE_CLASS_PLT)
 	{
 	  if (current_value.s != NULL && current_value.m != undef_map)
@@ -819,7 +854,8 @@
 				  version, type_class, flags, skip_map);
 
   /* The object is used.  */
-  current_value.m->l_used = 1;
+  if (__builtin_expect (current_value.m->l_used == 0, 0))
+    current_value.m->l_used = 1;
 
   if (__builtin_expect (GLRO(dl_debug_mask)
 			& (DL_DEBUG_BINDINGS|DL_DEBUG_PRELINK), 0))
@@ -841,7 +877,7 @@
   Elf_Symndx nchain;
 
   if (__builtin_expect (map->l_info[DT_ADDRTAGIDX (DT_GNU_HASH) + DT_NUM
-  				    + DT_THISPROCNUM + DT_VERSIONTAGNUM
+				    + DT_THISPROCNUM + DT_VERSIONTAGNUM
 				    + DT_EXTRANUM + DT_VALNUM] != NULL, 1))
     {
       Elf32_Word *hash32
@@ -913,13 +949,48 @@
 	{
 	  const uint_fast32_t new_hash = dl_new_hash (undef_name);
 	  unsigned long int old_hash = 0xffffffff;
+	  struct unique_sym *saved_entries
+	    = GL(dl_ns)[LM_ID_BASE]._ns_unique_sym_table.entries;
 
+	  GL(dl_ns)[LM_ID_BASE]._ns_unique_sym_table.entries = NULL;
 	  do_lookup_x (undef_name, new_hash, &old_hash, *ref, &val,
 		       undef_map->l_local_scope[0], 0, version, 0, NULL,
 		       type_class, undef_map);
-
 	  if (val.s != value->s || val.m != value->m)
 	    conflict = 1;
+	  else if (__builtin_expect (undef_map->l_symbolic_in_local_scope, 0)
+		   && val.s
+		   && __builtin_expect (ELFW(ST_BIND) (val.s->st_info),
+					STB_GLOBAL) == STB_GNU_UNIQUE)
+	    {
+	      /* If it is STB_GNU_UNIQUE and undef_map's l_local_scope
+		 contains any DT_SYMBOLIC libraries, unfortunately there
+		 can be conflicts even if the above is equal.  As symbol
+		 resolution goes from the last library to the first and
+		 if a STB_GNU_UNIQUE symbol is found in some late DT_SYMBOLIC
+		 library, it would be the one that is looked up.  */
+	      struct sym_val val2 = { NULL, NULL };
+	      size_t n;
+	      struct r_scope_elem *scope = undef_map->l_local_scope[0];
+
+	      for (n = 0; n < scope->r_nlist; n++)
+		if (scope->r_list[n] == val.m)
+		  break;
+
+	      for (n++; n < scope->r_nlist; n++)
+		if (scope->r_list[n]->l_info[DT_SYMBOLIC] != NULL
+		    && do_lookup_x (undef_name, new_hash, &old_hash, *ref,
+				    &val2,
+				    &scope->r_list[n]->l_symbolic_searchlist,
+				    0, version, 0, NULL, type_class,
+				    undef_map) > 0)
+		  {
+		    conflict = 1;
+		    val = val2;
+		    break;
+		  }
+	    }
+	  GL(dl_ns)[LM_ID_BASE]._ns_unique_sym_table.entries = saved_entries;
 	}
 
       if (value->s)
--- sysdeps/mips/dl-machine.h
+++ sysdeps/mips/dl-machine.h
@@ -75,15 +75,6 @@
        (ElfW(Addr)) (r); \
    } while (0)
 
-/* Allow ABIVERSION == 1, meaning PLTs and copy relocations are
-   required.  */
-#define VALID_ELF_ABIVERSION(ver)	(ver == 0 || ver == 2)
-#define VALID_ELF_OSABI(osabi)		(osabi == ELFOSABI_SYSV)
-#define VALID_ELF_HEADER(hdr,exp,size) \
-  memcmp (hdr,exp,size-2) == 0 \
-  && VALID_ELF_OSABI (hdr[EI_OSABI]) \
-  && VALID_ELF_ABIVERSION (hdr[EI_ABIVERSION])
-
 /* Return nonzero iff ELF header is compatible with the running host.  */
 static inline int __attribute_used__
 elf_machine_matches_host (const ElfW(Ehdr) *ehdr)
--- sysdeps/mips/dl-trampoline.c
+++ sysdeps/mips/dl-trampoline.c
@@ -278,13 +278,13 @@
 	.frame	$29, " STRINGXP(ELF_DL_FRAME_SIZE) ", $31\n\
 	.set noreorder\n\
 	# Save GP.\n\
-	move	$3, $28\n\
+1:	move	$3, $28\n\
 	# Save arguments and sp value in stack.\n\
 	" STRINGXP(PTR_SUBIU) "  $29, " STRINGXP(ELF_DL_FRAME_SIZE) "\n\
 	# Modify t9 ($25) so as to point .cpload instruction.\n\
-	" IFABIO32(STRINGXP(PTR_ADDIU) "	$25, 12\n") "\
+	" IFABIO32(STRINGXP(PTR_ADDIU) "	$25, (2f-1b)\n") "\
 	# Compute GP.\n\
-	" STRINGXP(SETUP_GP) "\n\
+2:	" STRINGXP(SETUP_GP) "\n\
 	" STRINGXV(SETUP_GP64 (0, _dl_runtime_resolve)) "\n\
 	.set reorder\n\
 	# Save slot call pc.\n\
@@ -334,13 +334,13 @@
 	.frame	$29, " STRINGXP(ELF_DL_PLT_FRAME_SIZE) ", $31\n\
 	.set noreorder\n\
 	# Save arguments and sp value in stack.\n\
-	" STRINGXP(PTR_SUBIU) "	$29, " STRINGXP(ELF_DL_PLT_FRAME_SIZE) "\n\
+1:	" STRINGXP(PTR_SUBIU) "	$29, " STRINGXP(ELF_DL_PLT_FRAME_SIZE) "\n\
 	" IFABIO32(STRINGXP(PTR_L) "	$13, " STRINGXP(PTRSIZE) "($28)") "\n\
 	" IFNEWABI(STRINGXP(PTR_L) "	$13, " STRINGXP(PTRSIZE) "($14)") "\n\
 	# Modify t9 ($25) so as to point .cpload instruction.\n\
-	" IFABIO32(STRINGXP(PTR_ADDIU) "	$25, 12\n") "\
+	" IFABIO32(STRINGXP(PTR_ADDIU) "	$25, (2f-1b)\n") "\
 	# Compute GP.\n\
-	" STRINGXP(SETUP_GP) "\n\
+2:	" STRINGXP(SETUP_GP) "\n\
 	" STRINGXV(SETUP_GP64 (0, _dl_runtime_pltresolve)) "\n\
 	.set reorder\n\
 	" IFABIO32(STRINGXP(CPRESTORE(32))) "\n\
--- sysdeps/mips/fpu/fegetenv.c
+++ sysdeps/mips/fpu/fegetenv.c
@@ -1,5 +1,5 @@
 /* Store current floating-point environment.
-   Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000, 2002, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Jaeger <aj@suse.de>, 1998.
 
@@ -29,3 +29,4 @@
   /* Success.  */
   return 0;
 }
+libm_hidden_def (fegetenv)
--- sysdeps/mips/fpu/feupdateenv.c
+++ sysdeps/mips/fpu/feupdateenv.c
@@ -1,5 +1,5 @@
 /* Install given floating-point environment and raise exceptions.
-   Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000, 2002, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Jaeger <aj@suse.de>, 1998.
 
@@ -41,3 +41,4 @@
   /* Success.  */
   return 0;
 }
+libm_hidden_def (feupdateenv)
--- sysdeps/mips/fpu/ftestexcept.c
+++ sysdeps/mips/fpu/ftestexcept.c
@@ -1,5 +1,5 @@
 /* Test exception in current environment.
-   Copyright (C) 1998 Free Software Foundation, Inc.
+   Copyright (C) 1998, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
 
@@ -31,3 +31,4 @@
 
   return cw & excepts & FE_ALL_EXCEPT;
 }
+libm_hidden_def (fetestexcept)
--- sysdeps/mips/init-first.c
+++ sysdeps/mips/init-first.c
@@ -1,5 +1,5 @@
 /* Initialization code run first thing by the ELF startup code.  For mips/Unix.
-   Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 2010 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
@@ -50,7 +50,9 @@
 {
   init (&argc);
 
+#ifndef NO_CTORS_DTORS_SECTIONS
   __libc_global_ctors ();
+#endif
 }
 #endif
 
--- sysdeps/mips/stackinfo.h
+++ sysdeps/mips/stackinfo.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2010 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
@@ -22,7 +22,13 @@
 #ifndef _STACKINFO_H
 #define _STACKINFO_H	1
 
+#include <elf.h>
+
 /* On MIPS the stack grows down.  */
 #define _STACK_GROWS_DOWN	1
 
+/* Default to an executable stack.  PF_X can be overridden if PT_GNU_STACK is
+ * present, but it is presumed absent.  */
+#define DEFAULT_STACK_PERMS (PF_R|PF_W|PF_X)
+
 #endif	/* stackinfo.h */
--- sysdeps/powerpc/dl-procinfo.c
+++ sysdeps/powerpc/dl-procinfo.c
+/* Data for processor capability information.  PowerPC version.
+   Copyright (C) 2005, 2006, 2008 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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+/* This information must be kept in sync with the _DL_HWCAP_COUNT and
+   _DL_PLATFORM_COUNT definitions in procinfo.h.
+
+   If anything should be added here check whether the size of each string
+   is still ok with the given array size.
+
+   All the #ifdefs in the definitions are quite irritating but
+   necessary if we want to avoid duplicating the information.  There
+   are three different modes:
+
+   - PROCINFO_DECL is defined.  This means we are only interested in
+     declarations.
+
+   - PROCINFO_DECL is not defined:
+
+     + if SHARED is defined the file is included in an array
+       initializer.  The .element = { ... } syntax is needed.
+
+     + if SHARED is not defined a normal array initialization is
+       needed.
+  */
+
+#ifndef PROCINFO_CLASS
+# define PROCINFO_CLASS
+#endif
+
+#if !defined PROCINFO_DECL && defined SHARED
+  ._dl_powerpc_cap_flags
+#else
+PROCINFO_CLASS const char _dl_powerpc_cap_flags[25][10]
+#endif
+#ifndef PROCINFO_DECL
+= {
+    "vsx",
+    "arch_2_06", "power6x", "dfp", "pa6t",
+    "arch_2_05", "ic_snoop", "smt", "booke",
+    "cellbe", "power5+", "power5", "power4",
+    "notb", "efpdouble", "efpsingle", "spe",
+    "ucache", "4xxmac", "mmu", "fpu",
+    "altivec", "ppc601", "ppc64", "ppc32",
+  }
+#endif
+#if !defined SHARED || defined PROCINFO_DECL
+;
+#else
+,
+#endif
+
+#if !defined PROCINFO_DECL && defined SHARED
+  ._dl_powerpc_platforms
+#else
+PROCINFO_CLASS const char _dl_powerpc_platforms[12][12]
+#endif
+#ifndef PROCINFO_DECL
+= {
+    [PPC_PLATFORM_POWER4] = "power4",
+    [PPC_PLATFORM_PPC970] = "ppc970",
+    [PPC_PLATFORM_POWER5] = "power5",
+    [PPC_PLATFORM_POWER5_PLUS] = "power5+",
+    [PPC_PLATFORM_POWER6] = "power6",
+    [PPC_PLATFORM_CELL_BE] = "ppc-cell-be",
+    [PPC_PLATFORM_POWER6X] = "power6x",
+    [PPC_PLATFORM_POWER7] = "power7",
+    [PPC_PLATFORM_PPC405] = "ppc405",
+    [PPC_PLATFORM_PPC440] = "ppc440",
+    [PPC_PLATFORM_PPC464] = "ppc464",
+    [PPC_PLATFORM_PPC476] = "ppc476"
+  }
+#endif
+#if !defined SHARED || defined PROCINFO_DECL
+;
+#else
+,
+#endif
+
+#undef PROCINFO_DECL
+#undef PROCINFO_CLASS
--- sysdeps/powerpc/dl-procinfo.h
+++ sysdeps/powerpc/dl-procinfo.h
+/* Processor capability information handling macros.  PowerPC version.
+   Copyright (C) 2005, 2006, 2008 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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#ifndef _DL_PROCINFO_H
+#define _DL_PROCINFO_H 1
+
+#include <ldsodefs.h>
+#include <sysdep.h>            /* This defines the PPC_FEATURE_* macros.  */
+
+/* There are 25 bits used, but they are bits 7..31.  */
+#define _DL_HWCAP_FIRST                7
+#define _DL_HWCAP_COUNT                32
+
+/* These bits influence library search.  */
+#define HWCAP_IMPORTANT                (PPC_FEATURE_HAS_ALTIVEC \
+                               + PPC_FEATURE_HAS_DFP)
+
+#define _DL_PLATFORMS_COUNT    12
+
+#define _DL_FIRST_PLATFORM     32
+/* Mask to filter out platforms.  */
+#define _DL_HWCAP_PLATFORM      (((1ULL << _DL_PLATFORMS_COUNT) - 1) \
+                               << _DL_FIRST_PLATFORM)
+
+/* Platform bits (relative to _DL_FIRST_PLATFORM).  */
+#define PPC_PLATFORM_POWER4          0
+#define PPC_PLATFORM_PPC970          1
+#define PPC_PLATFORM_POWER5          2
+#define PPC_PLATFORM_POWER5_PLUS      3
+#define PPC_PLATFORM_POWER6          4
+#define PPC_PLATFORM_CELL_BE         5
+#define PPC_PLATFORM_POWER6X         6
+#define PPC_PLATFORM_POWER7          7
+#define PPC_PLATFORM_PPC405          8
+#define PPC_PLATFORM_PPC440          9
+#define PPC_PLATFORM_PPC464          10
+#define PPC_PLATFORM_PPC476          11
+
+static inline const char *
+__attribute__ ((unused))
+_dl_hwcap_string (int idx)
+{
+  return GLRO(dl_powerpc_cap_flags)[idx - _DL_HWCAP_FIRST];
+}
+
+static inline const char *
+__attribute__ ((unused))
+_dl_platform_string (int idx)
+{
+  return GLRO(dl_powerpc_platforms)[idx - _DL_FIRST_PLATFORM];
+}
+
+static inline int
+__attribute__ ((unused))
+_dl_string_hwcap (const char *str)
+{
+  for (int i = _DL_HWCAP_FIRST; i < _DL_HWCAP_COUNT; ++i)
+    if (strcmp (str, _dl_hwcap_string (i)) == 0)
+      return i;
+  return -1;
+}
+
+static inline int
+__attribute__ ((unused, always_inline))
+_dl_string_platform (const char *str)
+{
+  if (str == NULL)
+    return -1;
+
+  if (strncmp (str, GLRO(dl_powerpc_platforms)[PPC_PLATFORM_POWER4], 5) == 0)
+    {
+      int ret;
+      str += 5;
+      switch (*str)
+       {
+       case '4':
+         ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER4;
+         break;
+       case '5':
+         ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER5;
+         if (str[1] == '+')
+           {
+             ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER5_PLUS;
+             ++str;
+           }
+         break;
+       case '6':
+         ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER6;
+         if (str[1] == 'x')
+           {
+             ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER6X;
+             ++str;
+           }
+         break;
+       case '7':
+         ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER7;
+         break;
+       default:
+         return -1;
+       }
+      if (str[1] == '\0')
+       return ret;
+    }
+  else if (strncmp (str, GLRO(dl_powerpc_platforms)[PPC_PLATFORM_PPC970],
+                   3) == 0)
+    {
+      if (strcmp (str + 3, GLRO(dl_powerpc_platforms)[PPC_PLATFORM_PPC970]
+                          + 3) == 0)
+       return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPC970;
+      else if (strcmp (str + 3,
+                      GLRO(dl_powerpc_platforms)[PPC_PLATFORM_CELL_BE] + 3)
+              == 0)
+       return _DL_FIRST_PLATFORM + PPC_PLATFORM_CELL_BE;
+      else if (strcmp (str + 3,
+                      GLRO(dl_powerpc_platforms)[PPC_PLATFORM_PPC405] + 3)
+              == 0)
+       return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPC405;
+      else if (strcmp (str + 3,
+                      GLRO(dl_powerpc_platforms)[PPC_PLATFORM_PPC440] + 3)
+              == 0)
+       return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPC440;
+      else if (strcmp (str + 3,
+                      GLRO(dl_powerpc_platforms)[PPC_PLATFORM_PPC464] + 3)
+              == 0)
+       return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPC464;
+      else if (strcmp (str + 3,
+                      GLRO(dl_powerpc_platforms)[PPC_PLATFORM_PPC476] + 3)
+              == 0)
+       return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPC476;
+    }
+
+  return -1;
+}
+
+#ifdef IS_IN_rtld
+static inline int
+__attribute__ ((unused))
+_dl_procinfo (int word)
+{
+  _dl_printf ("AT_HWCAP:       ");
+
+  for (int i = _DL_HWCAP_FIRST; i < _DL_HWCAP_COUNT; ++i)
+    if (word & (1 << i))
+      _dl_printf (" %s", _dl_hwcap_string (i));
+
+  _dl_printf ("\n");
+
+  return 0;
+}
+#endif
+
+#endif /* dl-procinfo.h */
--- sysdeps/powerpc/nofpu/fegetenv.c
+++ sysdeps/powerpc/nofpu/fegetenv.c
@@ -1,6 +1,6 @@
 /* Store current floating-point environment (soft-float edition).
    Copyright (C) 2002 Free Software Foundation, Inc.
-   Contributed by Aldy Hernandez <aldyh@redhat.com>, 2002.
+   Contributed by Aldy Hernandez <aldyh@redhat.com>, 2002, 2010.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -46,4 +46,5 @@
 compat_symbol (libm, BP_SYM (__old_fegetenv), BP_SYM (fegetenv), GLIBC_2_1);
 #endif
 
+libm_hidden_ver (__fegetenv, fegetenv)
 versioned_symbol (libm, BP_SYM (__fegetenv), BP_SYM (fegetenv), GLIBC_2_2);
--- sysdeps/powerpc/nofpu/feupdateenv.c
+++ sysdeps/powerpc/nofpu/feupdateenv.c
@@ -1,6 +1,6 @@
 /* Install given floating-point environment and raise exceptions
    (soft-float edition).
-   Copyright (C) 2002 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2010 Free Software Foundation, Inc.
    Contributed by Aldy Hernandez <aldyh@redhat.com>, 2002.
    This file is part of the GNU C Library.
 
@@ -49,4 +49,5 @@
 compat_symbol (libm, BP_SYM (__old_feupdateenv), BP_SYM (feupdateenv), GLIBC_2_1);
 #endif
 
+libm_hidden_ver (__feupdateenv, feupdateenv)
 versioned_symbol (libm, BP_SYM (__feupdateenv), BP_SYM (feupdateenv), GLIBC_2_2);
--- sysdeps/powerpc/nofpu/ftestexcept.c
+++ sysdeps/powerpc/nofpu/ftestexcept.c
@@ -1,5 +1,5 @@
 /* Test floating-point exceptions (soft-float edition).
-   Copyright (C) 2002 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2010 Free Software Foundation, Inc.
    Contributed by Aldy Hernandez <aldyh@redhat.com>, 2002.
    This file is part of the GNU C Library.
 
@@ -26,3 +26,4 @@
 {
   return __sim_exceptions & x;
 }
+libm_hidden_def (fetestexcept)
--- sysdeps/powerpc/powerpc32
+++ sysdeps/powerpc/powerpc32
+(directory)
--- sysdeps/powerpc/powerpc32/405
+++ sysdeps/powerpc/powerpc32/405
+(directory)
--- sysdeps/powerpc/powerpc32/405/memcmp.S
+++ sysdeps/powerpc/powerpc32/405/memcmp.S
+/* Optimized memcmp implementation for PowerPC476.
+   Copyright (C) 2010 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, write to the Free
+   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA
+   02110-1301 USA.  */
+
+#include <sysdep.h>
+#include <bp-sym.h>
+#include <bp-asm.h>
+
+/* memcmp
+
+       r3:source1 address, return equality
+       r4:source2 address
+       r5:byte count
+
+       Check 2 words from src1 and src2. If unequal jump to end and
+       return src1 > src2 or src1 < src2.
+       If count = zero check bytes before zero counter and then jump to end and
+       return src1 > src2, src1 < src2 or src1 = src2.
+       If src1 = src2 and no null, repeat. */
+
+EALIGN (BP_SYM (memcmp), 5, 0)
+       srwi.   r6,r5,5
+       beq     L(preword2_count_loop)
+       mtctr   r6
+       clrlwi  r5,r5,27
+
+L(word8_compare_loop):
+       lwz     r10,0(r3)
+       lwz     r6,4(r3)
+       lwz     r8,0(r4)
+       lwz     r9,4(r4)
+       cmplw   cr5,r8,r10
+       cmplw   cr1,r9,r6
+       bne     cr5,L(st2)
+       bne     cr1,L(st1)
+       lwz     r10,8(r3)
+       lwz     r6,12(r3)
+       lwz     r8,8(r4)
+       lwz     r9,12(r4)
+       cmplw   cr5,r8,r10
+       cmplw   cr1,r9,r6
+       bne     cr5,L(st2)
+       bne     cr1,L(st1)
+       lwz     r10,16(r3)
+       lwz     r6,20(r3)
+       lwz     r8,16(r4)
+       lwz     r9,20(r4)
+       cmplw   cr5,r8,r10
+       cmplw   cr1,r9,r6
+       bne     cr5,L(st2)
+       bne     cr1,L(st1)
+       lwz     r10,24(r3)
+       lwz     r6,28(r3)
+       addi    r3,r3,0x20
+       lwz     r8,24(r4)
+       lwz     r9,28(r4)
+       addi    r4,r4,0x20
+       cmplw   cr5,r8,r10
+       cmplw   cr1,r9,r6
+       bne     cr5,L(st2)
+       bne     cr1,L(st1)
+       bdnz    L(word8_compare_loop)
+
+L(preword2_count_loop):
+       srwi.   r6,r5,3
+       beq     L(prebyte_count_loop)
+       mtctr   r6
+       clrlwi  r5,r5,29
+
+L(word2_count_loop):
+       lwz     r10,0(r3)
+       lwz     r6,4(r3)
+       addi    r3,r3,0x08
+       lwz     r8,0(r4)
+       lwz     r9,4(r4)
+       addi    r4,r4,0x08
+       cmplw   cr5,r8,r10
+       cmplw   cr1,r9,r6
+       bne     cr5,L(st2)
+       bne     cr1,L(st1)
+       bdnz    L(word2_count_loop)
+
+L(prebyte_count_loop):
+       addi    r5,r5,1
+       mtctr   r5
+       bdz     L(end_memcmp)
+
+L(byte_count_loop):
+       lbz     r6,0(r3)
+       addi    r3,r3,0x01
+       lbz     r8,0(r4)
+       addi    r4,r4,0x01
+       cmplw   cr5,r8,r6
+       bne     cr5,L(st2)
+       bdnz    L(byte_count_loop)
+
+L(end_memcmp):
+       addi    r3,r0,0
+       blr
+
+L(l_r):
+       addi    r3,r0,1
+       blr
+
+L(st1):
+       blt     cr1,L(l_r)
+       addi    r3,r0,-1
+       blr
+
+L(st2):
+       blt     cr5,L(l_r)
+       addi    r3,r0,-1
+       blr
+END (BP_SYM (memcmp))
+libc_hidden_builtin_def (memcmp)
+weak_alias (memcmp,bcmp)
--- sysdeps/powerpc/powerpc32/405/memcpy.S
+++ sysdeps/powerpc/powerpc32/405/memcpy.S
+/* Optimized memcpy implementation for PowerPC476.
+   Copyright (C) 2010 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, write to the Free
+   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA
+   02110-1301 USA.  */
+
+#include <sysdep.h>
+#include <bp-sym.h>
+#include <bp-asm.h>
+
+/* memcpy
+
+       r0:return address
+       r3:destination address
+       r4:source address
+       r5:byte count
+
+       Save return address in r0.
+       If destinationn and source are unaligned and copy count is greater than 256
+       then copy 0-3 bytes to make destination aligned.
+       If 32 or more bytes to copy we use 32 byte copy loop.
+       Finaly we copy 0-31 extra bytes. */
+
+EALIGN (BP_SYM (memcpy), 5, 0)
+/* Check if bytes to copy are greater than 256 and if
+       source and destination are unaligned */
+       cmpwi   r5,0x0100
+       addi    r0,r3,0
+       ble     L(string_count_loop)
+       neg     r6,r3
+       clrlwi. r6,r6,30
+       beq     L(string_count_loop)
+       neg     r6,r4
+       clrlwi. r6,r6,30
+       beq     L(string_count_loop)
+       mtctr   r6
+       subf    r5,r6,r5
+
+L(unaligned_bytecopy_loop): /* Align destination by coping 0-3 bytes */
+       lbz     r8,0x0(r4)
+       addi    r4,r4,1
+       stb     r8,0x0(r3)
+       addi    r3,r3,1
+       bdnz    L(unaligned_bytecopy_loop)
+       srwi.   r7,r5,5
+       beq     L(preword2_count_loop)
+       mtctr   r7
+
+L(word8_count_loop_no_dcbt): /* Copy 32 bytes at a time */
+       lwz     r6,0(r4)
+       lwz     r7,4(r4)
+       lwz     r8,8(r4)
+       lwz     r9,12(r4)
+       subi    r5,r5,0x20
+       stw     r6,0(r3)
+       stw     r7,4(r3)
+       stw     r8,8(r3)
+       stw     r9,12(r3)
+       lwz     r6,16(r4)
+       lwz     r7,20(r4)
+       lwz     r8,24(r4)
+       lwz     r9,28(r4)
+       addi    r4,r4,0x20
+       stw     r6,16(r3)
+       stw     r7,20(r3)
+       stw     r8,24(r3)
+       stw     r9,28(r3)
+       addi    r3,r3,0x20
+       bdnz    L(word8_count_loop_no_dcbt)
+
+L(preword2_count_loop): /* Copy remaining 0-31 bytes */
+       clrlwi. r12,r5,27
+       beq     L(end_memcpy)
+       mtxer   r12
+       lswx    r5,0,r4
+       stswx   r5,0,r3
+       mr       r3,r0
+       blr
+
+L(string_count_loop): /* Copy odd 0-31 bytes */
+       clrlwi. r12,r5,28
+       add     r3,r3,r5
+       add     r4,r4,r5
+       beq     L(pre_string_copy)
+       mtxer   r12
+       subf    r4,r12,r4
+       subf    r3,r12,r3
+       lswx    r6,0,r4
+       stswx   r6,0,r3
+
+L(pre_string_copy): /* Check how many 32 byte chunck to copy */
+       srwi.   r7,r5,4
+       beq     L(end_memcpy)
+       mtctr   r7
+
+L(word4_count_loop_no_dcbt): /* Copy 32 bytes at a time */
+       lwz     r6,-4(r4)
+       lwz     r7,-8(r4)
+       lwz     r8,-12(r4)
+       lwzu    r9,-16(r4)
+       stw     r6,-4(r3)
+       stw     r7,-8(r3)
+       stw     r8,-12(r3)
+       stwu    r9,-16(r3)
+       bdz     L(end_memcpy)
+       lwz     r6,-4(r4)
+       lwz     r7,-8(r4)
+       lwz     r8,-12(r4)
+       lwzu    r9,-16(r4)
+       stw     r6,-4(r3)
+       stw     r7,-8(r3)
+       stw     r8,-12(r3)
+       stwu    r9,-16(r3)
+       bdnz    L(word4_count_loop_no_dcbt)
+
+L(end_memcpy):
+       mr       r3,r0
+       blr
+END (BP_SYM (memcpy))
+libc_hidden_builtin_def (memcpy)
--- sysdeps/powerpc/powerpc32/405/memset.S
+++ sysdeps/powerpc/powerpc32/405/memset.S
+/* Optimized memset implementation for PowerPC476.
+   Copyright (C) 2010 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, write to the Free
+   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA
+   02110-1301 USA.  */
+
+#include <sysdep.h>
+#include <bp-sym.h>
+#include <bp-asm.h>
+
+/* memset
+
+       r3:destination address and return address
+       r4:source integer to copy
+       r5:byte count
+       r11:sources integer to copy in all 32 bits of reg
+       r12:temp return address
+
+       Save return address in r12
+       If destinationn is unaligned and count is greater tha 255 bytes
+       set 0-3 bytes to make destination aligned
+       If count is greater tha 255 bytes and setting zero to memory
+       use dbcz to set memeory when we can
+       otherwsie do the follwoing
+       If 16 or more words to set we use 16 word copy loop.
+       Finaly we set 0-15 extra bytes with string store. */
+
+EALIGN (BP_SYM (memset), 5, 0)
+       rlwinm  r11,r4,0,24,31
+       rlwimi  r11,r4,8,16,23
+       rlwimi  r11,r11,16,0,15
+       addi    r12,r3,0
+       cmpwi   r5,0x00FF
+       ble     L(preword8_count_loop)
+       cmpwi   r4,0x00
+       beq     L(use_dcbz)
+       neg     r6,r3
+       clrlwi. r6,r6,30
+       beq     L(preword8_count_loop)
+       addi    r8,0,1
+       mtctr   r6
+       subi    r3,r3,1
+
+L(unaligned_bytecopy_loop):
+       stbu    r11,0x1(r3)
+       subf.   r5,r8,r5
+       beq     L(end_memset)
+       bdnz    L(unaligned_bytecopy_loop)
+       addi    r3,r3,1
+
+L(preword8_count_loop):
+       srwi.   r6,r5,4
+       beq     L(preword2_count_loop)
+       mtctr   r6
+       addi    r3,r3,-4
+       mr      r8,r11
+       mr      r9,r11
+       mr      r10,r11
+
+L(word8_count_loop_no_dcbt):
+       stwu    r8,4(r3)
+       stwu    r9,4(r3)
+       subi    r5,r5,0x10
+       stwu    r10,4(r3)
+       stwu    r11,4(r3)
+       bdnz    L(word8_count_loop_no_dcbt)
+       addi    r3,r3,4
+
+L(preword2_count_loop):
+       clrlwi. r7,r5,28
+       beq     L(end_memset)
+       mr      r8,r11
+       mr      r9,r11
+       mr      r10,r11
+       mtxer   r7
+       stswx   r8,0,r3
+
+L(end_memset):
+       addi    r3,r12,0
+       blr
+
+L(use_dcbz):
+       neg     r6,r3
+       clrlwi. r7,r6,28
+       beq     L(skip_string_loop)
+       mr      r8,r11
+       mr      r9,r11
+       mr      r10,r11
+       subf    r5,r7,r5
+       mtxer   r7
+       stswx   r8,0,r3
+       add     r3,r3,r7
+
+L(skip_string_loop):
+       clrlwi  r8,r6,25
+       srwi.   r8,r8,4
+       beq     L(dcbz_pre_loop)
+       mtctr   r8
+
+L(word_loop):
+       stw     r11,0(r3)
+       subi    r5,r5,0x10
+       stw     r11,4(r3)
+       stw     r11,8(r3)
+       stw     r11,12(r3)
+       addi    r3,r3,0x10
+       bdnz    L(word_loop)
+
+L(dcbz_pre_loop):
+       srwi    r6,r5,7
+       mtctr   r6
+       addi    r7,0,0
+
+L(dcbz_loop):
+       dcbz    r3,r7
+       addi    r3,r3,0x80
+       subi    r5,r5,0x80
+       bdnz    L(dcbz_loop)
+       srwi.   r6,r5,4
+       beq     L(postword2_count_loop)
+       mtctr   r6
+
+L(postword8_count_loop):
+       stw     r11,0(r3)
+       subi    r5,r5,0x10
+       stw     r11,4(r3)
+       stw     r11,8(r3)
+       stw     r11,12(r3)
+       addi    r3,r3,0x10
+       bdnz    L(postword8_count_loop)
+
+L(postword2_count_loop):
+       clrlwi. r7,r5,28
+       beq     L(end_memset)
+       mr      r8,r11
+       mr      r9,r11
+       mr      r10,r11
+       mtxer   r7
+       stswx   r8,0,r3
+       b       L(end_memset)
+END (BP_SYM (memset))
+libc_hidden_builtin_def (memset)
--- sysdeps/powerpc/powerpc32/405/strcmp.S
+++ sysdeps/powerpc/powerpc32/405/strcmp.S
+/* Optimized strcmp implementation for PowerPC476.
+   Copyright (C) 2010 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, write to the Free
+   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA
+   02110-1301 USA.  */
+
+#include <sysdep.h>
+#include <bp-sym.h>
+#include <bp-asm.h>
+
+/* strcmp
+
+       Register Use
+       r0:temp return equality
+       r3:source1 address, return equality
+       r4:source2 address
+
+       Implementation description
+       Check 2 words from src1 and src2. If unequal jump to end and
+       return src1 > src2 or src1 < src2.
+       If null check bytes before null and then jump to end and
+       return src1 > src2, src1 < src2 or src1 = src2.
+       If src1 = src2 and no null, repeat. */
+
+EALIGN (BP_SYM(strcmp),5,0)
+       neg     r7,r3
+       clrlwi  r7,r7,20
+       neg     r8,r4
+       clrlwi  r8,r8,20
+       srwi.   r7,r7,5
+       beq     L(byte_loop)
+       srwi.   r8,r8,5
+       beq     L(byte_loop)
+       cmplw   r7,r8
+       mtctr   r7
+       ble     L(big_loop)
+       mtctr   r8
+
+L(big_loop):
+       lwz     r5,0(r3)
+       lwz     r6,4(r3)
+       lwz     r8,0(r4)
+       lwz     r9,4(r4)
+       dlmzb.  r12,r5,r6
+       bne     L(end_check)
+       cmplw   r5,r8
+       bne     L(st1)
+       cmplw   r6,r9
+       bne     L(st1)
+       lwz     r5,8(r3)
+       lwz     r6,12(r3)
+       lwz     r8,8(r4)
+       lwz     r9,12(r4)
+       dlmzb.  r12,r5,r6
+       bne     L(end_check)
+       cmplw   r5,r8
+       bne     L(st1)
+       cmplw   r6,r9
+       bne     L(st1)
+       lwz     r5,16(r3)
+       lwz     r6,20(r3)
+       lwz     r8,16(r4)
+       lwz     r9,20(r4)
+       dlmzb.  r12,r5,r6
+       bne     L(end_check)
+       cmplw   r5,r8
+       bne     L(st1)
+       cmplw   r6,r9
+       bne     L(st1)
+       lwz     r5,24(r3)
+       lwz     r6,28(r3)
+       addi    r3,r3,0x20
+       lwz     r8,24(r4)
+       lwz     r9,28(r4)
+       addi    r4,r4,0x20
+       dlmzb.  r12,r5,r6
+       bne     L(end_check)
+       cmplw   r5,r8
+       bne     L(st1)
+       cmplw   r6,r9
+       bne     L(st1)
+       bdnz    L(big_loop)
+       b       L(byte_loop)
+
+L(end_check):
+       subfic  r12,r12,4
+       blt     L(end_check2)
+       rlwinm  r12,r12,3,0,31
+       srw     r5,r5,r12
+       srw     r8,r8,r12
+       cmplw   r5,r8
+       bne     L(st1)
+       b       L(end_strcmp)
+
+L(end_check2):
+       addi    r12,r12,4
+       cmplw   r5,r8
+       rlwinm  r12,r12,3,0,31
+       bne     L(st1)
+       srw     r6,r6,r12
+       srw     r9,r9,r12
+       cmplw   r6,r9
+       bne     L(st1)
+
+L(end_strcmp):
+       addi    r3,r0,0
+       blr
+
+L(st1):
+       mfcr    r3
+       blr
+
+L(byte_loop):
+       lbz     r5,0(r3)
+       addi    r3,r3,1
+       lbz     r6,0(r4)
+       addi    r4,r4,1
+       cmplw   r5,r6
+       bne     L(st1)
+       cmpwi   r5,0
+       beq     L(end_strcmp)
+       b       L(byte_loop)
+END (BP_SYM (strcmp))
+libc_hidden_builtin_def (strcmp)
--- sysdeps/powerpc/powerpc32/405/strcpy.S
+++ sysdeps/powerpc/powerpc32/405/strcpy.S
+/* Optimized strcpy implementation for PowerPC476.
+   Copyright (C) 2010 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, write to the Free
+   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA
+   02110-1301 USA.  */
+
+#include <sysdep.h>
+#include <bp-sym.h>
+#include <bp-asm.h>
+
+/* strcpy
+
+       Register Use
+       r3:destination and return address
+       r4:source address
+       r10:temp destination address
+
+       Implementation description
+       Loop by checking 2 words at a time, with dlmzb. Check if there is a null
+       in the 2 words. If there is a null jump to end checking to determine
+       where in the last 8 bytes it is. Copy the appropriate bytes of the last
+       8 according to the null position. */
+
+EALIGN (BP_SYM (strcpy), 5, 0)
+       neg     r7,r4
+       subi    r4,r4,1
+       clrlwi. r8,r7,29
+       subi    r10,r3,1
+       beq     L(pre_word8_loop)
+       mtctr   r8
+
+L(loop):
+       lbzu    r5,0x01(r4)
+       cmpi    cr5,r5,0x0
+       stbu    r5,0x01(r10)
+       beq     cr5,L(end_strcpy)
+       bdnz    L(loop)
+
+L(pre_word8_loop):
+       subi    r4,r4,3
+       subi    r10,r10,3
+
+L(word8_loop):
+       lwzu    r5,0x04(r4)
+       lwzu    r6,0x04(r4)
+       dlmzb.  r11,r5,r6
+       bne     L(byte_copy)
+       stwu    r5,0x04(r10)
+       stwu    r6,0x04(r10)
+       lwzu    r5,0x04(r4)
+       lwzu    r6,0x04(r4)
+       dlmzb.  r11,r5,r6
+       bne     L(byte_copy)
+       stwu    r5,0x04(r10)
+       stwu    r6,0x04(r10)
+       lwzu    r5,0x04(r4)
+       lwzu    r6,0x04(r4)
+       dlmzb.  r11,r5,r6
+       bne     L(byte_copy)
+       stwu    r5,0x04(r10)
+       stwu    r6,0x04(r10)
+       lwzu    r5,0x04(r4)
+       lwzu    r6,0x04(r4)
+       dlmzb.  r11,r5,r6
+       bne     L(byte_copy)
+       stwu    r5,0x04(r10)
+       stwu    r6,0x04(r10)
+       b       L(word8_loop)
+
+L(last_bytes_copy):
+       stwu    r5,0x04(r10)
+       subi    r11,r11,4
+       mtctr   r11
+       addi    r10,r10,3
+       subi    r4,r4,1
+
+L(last_bytes_copy_loop):
+       lbzu    r5,0x01(r4)
+       stbu    r5,0x01(r10)
+       bdnz    L(last_bytes_copy_loop)
+       blr
+
+L(byte_copy):
+       blt     L(last_bytes_copy)
+       mtctr   r11
+       addi    r10,r10,3
+       subi    r4,r4,5
+
+L(last_bytes_copy_loop2):
+       lbzu    r5,0x01(r4)
+       stbu    r5,0x01(r10)
+       bdnz    L(last_bytes_copy_loop2)
+
+L(end_strcpy):
+       blr
+END (BP_SYM (strcpy))
+libc_hidden_builtin_def (strcpy)
--- sysdeps/powerpc/powerpc32/405/strlen.S
+++ sysdeps/powerpc/powerpc32/405/strlen.S
+/* Optimized strlen implementation for PowerPC476.
+   Copyright (C) 2010 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, write to the Free
+   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA
+   02110-1301 USA.  */
+
+#include <sysdep.h>
+#include <bp-sym.h>
+#include <bp-asm.h>
+
+/* strlen
+
+       Register Use
+       r3:source address and return length of string
+       r4:byte counter
+
+       Implementation description
+       Load 2 words at a time and count bytes, if we find null we subtract one from
+       the count and return the count value. We need to subtract one because
+       we don't count the null character as a byte. */
+
+EALIGN (BP_SYM (strlen),5,0)
+       neg     r7,r3
+       clrlwi. r8,r7,29
+       addi    r4,0,0
+       beq     L(byte_count_loop)
+       mtctr   r8
+
+L(loop):
+       lbz     r5,0(r3)
+       cmpi    cr5,r5,0x0
+       addi    r3,r3,0x1
+       addi    r4,r4,0x1
+       beq     cr5,L(end_strlen)
+       bdnz    L(loop)
+
+L(byte_count_loop):
+       lwz     r5,0(r3)
+       lwz     r6,4(r3)
+       dlmzb.  r12,r5,r6
+       add     r4,r4,r12
+       bne     L(end_strlen)
+       lwz     r5,8(r3)
+       lwz     r6,12(r3)
+       dlmzb.  r12,r5,r6
+       add     r4,r4,r12
+       bne     L(end_strlen)
+       lwz     r5,16(r3)
+       lwz     r6,20(r3)
+       dlmzb.  r12,r5,r6
+       add     r4,r4,r12
+       bne     L(end_strlen)
+       lwz     r5,24(r3)
+       lwz     r6,28(r3)
+       addi    r3,r3,0x20
+       dlmzb.  r12,r5,r6
+       add     r4,r4,r12
+       bne     L(end_strlen)
+       b       L(byte_count_loop)
+
+L(end_strlen):
+       addi    r3,r4,-1
+       blr
+END (BP_SYM (strlen))
+libc_hidden_builtin_def (strlen)
--- sysdeps/powerpc/powerpc32/405/strncmp.S
+++ sysdeps/powerpc/powerpc32/405/strncmp.S
+/* Optimized strncmp implementation for PowerPC476.
+   Copyright (C) 2010 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, write to the Free
+   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA
+   02110-1301 USA.  */
+
+#include <sysdep.h>
+#include <bp-sym.h>
+#include <bp-asm.h>
+
+/* strncmp
+
+       Register Use
+       r0:temp return equality
+       r3:source1 address, return equality
+       r4:source2 address
+       r5:byte count
+
+       Implementation description
+       Touch in 3 lines of D-cache.
+       If source1 or source2 is unaligned copy 0-3 bytes to make source1 aligned
+       Check 2 words from src1 and src2. If unequal jump to end and
+       return src1 > src2 or src1 < src2.
+       If null check bytes before null and then jump to end and
+       return src1 > src2, src1 < src2 or src1 = src2.
+       If count = zero check bytes before zero counter and then jump to end and
+       return src1 > src2, src1 < src2 or src1 = src2.
+       If src1 = src2 and no null, repeat. */
+
+EALIGN (BP_SYM(strncmp),5,0)
+       neg     r7,r3
+       clrlwi  r7,r7,20
+       neg     r8,r4
+       clrlwi  r8,r8,20
+       srwi.   r7,r7,3
+       beq     L(prebyte_count_loop)
+       srwi.   r8,r8,3
+       beq     L(prebyte_count_loop)
+       cmplw   r7,r8
+       mtctr   r7
+       ble     L(preword2_count_loop)
+       mtctr   r8
+
+L(preword2_count_loop):
+       srwi.   r6,r5,3
+       beq     L(prebyte_count_loop)
+       mfctr   r7
+       cmplw   r6,r7
+       bgt     L(set_count_loop)
+       mtctr   r6
+       clrlwi  r5,r5,29
+
+L(word2_count_loop):
+       lwz     r10,0(r3)
+       lwz     r6,4(r3)
+       addi    r3,r3,0x08
+       lwz     r8,0(r4)
+       lwz     r9,4(r4)
+       addi    r4,r4,0x08
+       dlmzb.  r12,r10,r6
+       bne     L(end_check)
+       cmplw   r10,r8
+       bne     L(st1)
+       cmplw   r6,r9
+       bne     L(st1)
+       bdnz    L(word2_count_loop)
+
+L(prebyte_count_loop):
+       addi    r5,r5,1
+       mtctr   r5
+       bdz     L(end_strncmp)
+
+L(byte_count_loop):
+       lbz     r6,0(r3)
+       addi    r3,r3,1
+       lbz     r7,0(r4)
+       addi    r4,r4,1
+       cmplw   r6,r7
+       bne     L(st1)
+       cmpwi   r6,0
+       beq     L(end_strncmp)
+       bdnz    L(byte_count_loop)
+       b       L(end_strncmp)
+
+L(set_count_loop):
+       slwi    r7,r7,3
+       subf    r5,r7,r5
+       b       L(word2_count_loop)
+
+L(end_check):
+       subfic  r12,r12,4
+       blt     L(end_check2)
+       rlwinm  r12,r12,3,0,31
+       srw     r10,r10,r12
+       srw     r8,r8,r12
+       cmplw   r10,r8
+       bne     L(st1)
+       b       L(end_strncmp)
+
+L(end_check2):
+       addi    r12,r12,4
+       cmplw   r10,r8
+       rlwinm  r12,r12,3,0,31
+       bne     L(st1)
+       srw     r6,r6,r12
+       srw     r9,r9,r12
+       cmplw   r6,r9
+       bne     L(st1)
+
+L(end_strncmp):
+       addi    r3,r0,0
+       blr
+
+L(st1):
+       mfcr    r3
+       blr
+END (BP_SYM (strncmp))
+libc_hidden_builtin_def (strncmp)
--- sysdeps/powerpc/powerpc32/440
+++ sysdeps/powerpc/powerpc32/440
+(directory)
--- sysdeps/powerpc/powerpc32/440/Implies
+++ sysdeps/powerpc/powerpc32/440/Implies
+powerpc/powerpc32/405/fpu
+powerpc/powerpc32/405
--- sysdeps/powerpc/powerpc32/464
+++ sysdeps/powerpc/powerpc32/464
+(directory)
--- sysdeps/powerpc/powerpc32/464/Implies
+++ sysdeps/powerpc/powerpc32/464/Implies
+powerpc/powerpc32/440/fpu
+powerpc/powerpc32/440
--- sysdeps/powerpc/powerpc32/476
+++ sysdeps/powerpc/powerpc32/476
+(directory)
--- sysdeps/powerpc/powerpc32/476/Implies
+++ sysdeps/powerpc/powerpc32/476/Implies
+powerpc/powerpc32/464/fpu
+powerpc/powerpc32/464
--- sysdeps/powerpc/powerpc32/Makefile
+++ sysdeps/powerpc/powerpc32/Makefile
+# Some Powerpc32 variants assume soft-fp is the default even though there is
+# an fp variant so provide -mhard-float if --with-fp is explicitly passed.
+
+ifeq ($(with-fp),yes)
++cflags += -mhard-float
+ASFLAGS += -mhard-float
+sysdep-LDFLAGS += -mhard-float
+endif
--- sysdeps/unix/alpha/sysdep.h
+++ sysdeps/unix/alpha/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1996, 2000, 2003, 2004, 2006
+/* Copyright (C) 1992, 1995, 1996, 2000, 2003, 2004, 2006, 2010
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Brendan Kehoe (brendan@zen.org).
@@ -191,8 +191,10 @@
 })
 
 #define INTERNAL_SYSCALL_DECL(err)		long int err
-#define INTERNAL_SYSCALL_ERROR_P(val, err)	err
-#define INTERNAL_SYSCALL_ERRNO(val, err)	val
+/* Make sure and "use" the variable that we're not returning,
+   in order to suppress unused variable warnings.  */
+#define INTERNAL_SYSCALL_ERROR_P(val, err)	((void)val, err)
+#define INTERNAL_SYSCALL_ERRNO(val, err)	((void)err, val)
 
 #define inline_syscall_clobbers				\
 	"$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8",	\
@@ -428,11 +430,21 @@
 #  define PTR_DEMANGLE(dst, tmp)   PTR_MANGLE(dst, dst, tmp)
 #  define PTR_DEMANGLE2(dst, tmp)  PTR_MANGLE2(dst, dst, tmp)
 # else
-extern uintptr_t __pointer_chk_guard attribute_relro;
+extern const uintptr_t __pointer_chk_guard attribute_relro;
 #  define PTR_MANGLE(var)	\
-	(var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard)
+	(var) = (__typeof(var)) ((uintptr_t) (var) ^ __pointer_chk_guard)
 #  define PTR_DEMANGLE(var)  PTR_MANGLE(var)
 # endif
+#else
+/* There exists generic C code that assumes that PTR_MANGLE is always
+   defined.  When generating code for the static libc, we don't have
+   __pointer_chk_guard defined.  Nor is there any place that would
+   initialize it if it were defined, so there's little point in doing
+   anything more than nothing.  */
+# ifndef __ASSEMBLER__
+#  define PTR_MANGLE(var)
+#  define PTR_DEMANGLE(var)
+# endif
 #endif
 
 #endif /* ASSEMBLER */
--- sysdeps/unix/arm/sysdep.S
+++ sysdeps/unix/arm/sysdep.S
@@ -1,5 +1,5 @@
 /* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2002, 2003,
-   2004, 2005
+   2004, 2005, 2009
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -44,6 +44,7 @@
 
 #if USE___THREAD
 	mov ip, lr
+	cfi_register (lr, ip)
 	mov r1, r0
 
 	mov r0, #0xffff0fff
@@ -66,9 +67,13 @@
 1:	.word C_SYMBOL_NAME(rtld_errno) - 0b - 8
 #elif defined(_LIBC_REENTRANT)
 	str lr, [sp, #-4]!
+	cfi_adjust_cfa_offset (4)
+	cfi_rel_offset (lr, 0)
 	str r0, [sp, #-4]!
+	cfi_adjust_cfa_offset (4)
 	bl PLTJMP(C_SYMBOL_NAME(__errno_location))
 	ldr r1, [sp], #4
+	cfi_adjust_cfa_offset (-4)
 	str r1, [r0]
 	mvn r0, $0
 	ldr pc, [sp], #4	
--- sysdeps/unix/mips/mips64/n32/sysdep.h
+++ sysdeps/unix/mips/mips64/n32/sysdep.h
@@ -45,6 +45,7 @@
   .set noreorder;							      \
   .align 2;								      \
   99: j __syscall_error;						      \
+  nop;                                                                        \
   ENTRY(name)								      \
   .set noreorder;							      \
   li v0, SYS_ify(syscall_name);						      \
--- sysdeps/unix/mips/mips64/n64/sysdep.h
+++ sysdeps/unix/mips/mips64/n64/sysdep.h
@@ -45,6 +45,7 @@
   .set noreorder;							      \
   .align 2;								      \
   99: j __syscall_error;						      \
+  nop;                                                                        \
   ENTRY(name)								      \
   .set noreorder;							      \
   li v0, SYS_ify(syscall_name);						      \
--- sysdeps/unix/sysv/linux/alpha/Versions
+++ sysdeps/unix/sysv/linux/alpha/Versions
@@ -77,6 +77,10 @@
     #errlist-compat	138
     _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
   }
+  GLIBC_2.12 {
+    #errlist-compat	139
+    _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
+  }
   GLIBC_PRIVATE {
     __libc_alpha_cache_shape;
   }
--- sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S
+++ sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S
+/* Copyright (C) 1992, 1994, 1997, 2006, 2010 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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <sysdep.h>
+#include <jmpbuf-offsets.h>
+
+
+	.section .rodata.str1.1,"aMS",@progbits,1
+	.type   longjmp_msg,@object
+longjmp_msg:
+	.string "longjmp causes uninitialized stack frame"
+	.size   longjmp_msg, .-longjmp_msg
+
+
+/* Jump to the position specified by ENV, causing the
+   setjmp call there to return VAL, or 1 if VAL is 0.
+   void __longjmp (__jmp_buf env, int val).  */
+	.text
+	.align	4
+	.globl	____longjmp_chk
+	.type	____longjmp_chk, @function
+	.usepv	____longjmp_chk, std
+
+	cfi_startproc
+____longjmp_chk:
+	ldgp    gp, 0(pv)
+#ifdef PROF
+	.set noat
+	lda     AT, _mcount
+	jsr     AT, (AT), _mcount
+	.set at
+#endif
+
+	ldq     s2, JB_PC*8(a0)
+	mov	a0, s0
+	ldq     fp, JB_FP*8(a0)
+	mov     a1, s1
+	ldq     s3, JB_SP*8(a0)
+	cmoveq  s1, 1, s1
+
+#ifdef PTR_DEMANGLE
+	PTR_DEMANGLE(s2, t1)
+	PTR_DEMANGLE2(s3, t1)
+	PTR_DEMANGLE2(fp, t1)
+#endif
+	cmpule	t0, sp, t1
+	bne	t1, .Lfail
+
+	.align	4
+.Lok:
+	mov	s0, a0
+	mov	s1, v0
+	mov	s3, t0
+	mov	s2, ra
+	cfi_remember_state
+	cfi_def_cfa(a0, 0)
+	cfi_register(sp, t0)
+	cfi_offset(s0, JB_S0*8)
+	cfi_offset(s1, JB_S1*8)
+	cfi_offset(s2, JB_S2*8)
+	cfi_offset(s3, JB_S3*8)
+	cfi_offset(s4, JB_S4*8)
+	cfi_offset(s5, JB_S5*8)
+	cfi_offset(s3, JB_S3*8)
+	cfi_offset($f2, JB_F2*8)
+	cfi_offset($f3, JB_F3*8)
+	cfi_offset($f4, JB_F4*8)
+	cfi_offset($f5, JB_F5*8)
+	cfi_offset($f6, JB_F6*8)
+	cfi_offset($f7, JB_F7*8)
+	cfi_offset($f8, JB_F8*8)
+	cfi_offset($f9, JB_F9*8)
+	ldq	s0, JB_S0*8(a0)
+	ldq	s1, JB_S1*8(a0)
+	ldq	s2, JB_S2*8(a0)
+	ldq	s3, JB_S3*8(a0)
+	ldq	s4, JB_S4*8(a0)
+	ldq	s5, JB_S5*8(a0)
+	ldt     $f2, JB_F2*8(a0)
+	ldt     $f3, JB_F3*8(a0)
+	ldt     $f4, JB_F4*8(a0)
+	ldt     $f5, JB_F5*8(a0)
+	ldt     $f6, JB_F6*8(a0)
+	ldt     $f7, JB_F7*8(a0)
+	ldt     $f8, JB_F8*8(a0)
+	ldt     $f9, JB_F9*8(a0)
+	mov     t0, sp
+	ret
+
+	.align	4
+.Lfail:
+	cfi_restore_state
+	lda	v0, __NR_sigaltstack
+	lda	a0, 0
+	lda	a1, -32(sp)
+	lda	sp, -32(sp)
+	cfi_adjust_cfa_offset(32)
+	callsys
+	ldq	t0, 0(sp)	/* ss_sp */
+	ldl	t1, 8(sp)	/* ss_flags */
+	ldq	t2, 16(sp)	/* ss_size */
+	lda	sp, 32(sp)
+	cfi_adjust_cfa_offset(-32)
+
+	/* Without working sigaltstack we cannot perform the test.  */
+	bne	a3, .Lok
+
+	addq	t0, t2, t0	/* t0 = ss_sp + ss_size */
+	subq	t0, s3, t0	/* t0 = (ss_sp + ss_size) - new_sp */
+	cmpule	t2, t0, t0	/* t0 = (t0 >= ss_size) */
+	and	t0, t1, t0	/* t0 = (t0 >= ss_size) & (ss_flags & SS_ONSTACK) */
+	bne	t0, .Lok
+
+	ldah	a0, longjmp_msg(gp)	!gprelhigh
+	lda	a0, longjmp_msg(a0)	!gprellow
+#ifdef PIC
+	jsr	ra, HIDDEN_JUMPTARGET(__fortify_fail)
+#else
+	bsr	ra, HIDDEN_JUMPTARGET(__fortify_fail)	!samegp
+#endif
+	bugchk
+
+	cfi_endproc
+	.size	____longjmp_chk, .-____longjmp_chk
--- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for Linux.
-   Copyright (C) 1995-2000,2004,2005,2006,2007 Free Software Foundation, Inc.
+   Copyright (C) 1995-2000,2004,2005,2006,2007,2010 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
@@ -41,16 +41,18 @@
 #define O_NONBLOCK	 00004
 #define O_APPEND	 00010
 #define O_NDELAY	O_NONBLOCK
-#define O_SYNC		040000
+#define O_SYNC		020040000
 #define O_FSYNC		O_SYNC
 #define O_ASYNC		020000	/* fcntl, for BSD compatibility */
 
-#ifdef __USE_GNU
+#ifdef __USE_XOPEN2K8
 # define O_DIRECTORY	0100000	/* Must be a directory.  */
 # define O_NOFOLLOW	0200000	/* Do not follow links.  */
+# define O_CLOEXEC	010000000 /* Set close_on_exec.  */
+#endif
+#ifdef __USE_GNU
 # define O_DIRECT	02000000 /* Direct disk access.  */
 # define O_NOATIME	04000000 /* Do not set atime.  */
-# define O_CLOEXEC      010000000 /* Set close_on_exec.  */
 #endif
 
 #ifdef __USE_LARGEFILE64
@@ -62,7 +64,7 @@
    We define the symbols here but let them do the same as O_SYNC since
    this is a superset.  */
 #if defined __USE_POSIX199309 || defined __USE_UNIX98
-# define O_DSYNC	O_SYNC	/* Synchronize data.  */
+# define O_DSYNC	040000	/* Synchronize data.  */
 # define O_RSYNC	O_SYNC	/* Synchronize read operations.  */
 #endif
 
@@ -79,7 +81,7 @@
 #define F_SETLK64	F_SETLK	/* Set record locking info (non-blocking).  */
 #define F_SETLKW64	F_SETLKW /* Set record locking info (blocking).  */
 
-#if defined __USE_BSD || defined __USE_UNIX98
+#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8
 # define F_SETOWN	5	/* Get owner of socket (receiver of SIGIO).  */
 # define F_GETOWN	6	/* Set owner of socket (receiver of SIGIO).  */
 #endif
@@ -87,12 +89,16 @@
 #ifdef __USE_GNU
 # define F_SETSIG	10	/* Set number of signal to be sent.  */
 # define F_GETSIG	11	/* Get number of signal to be sent.  */
+# define F_SETOWN_EX	15	/* Get owner (thread receiving SIGIO).  */
+# define F_GETOWN_EX	16	/* Set owner (thread receiving SIGIO).  */
 #endif
 
 #ifdef __USE_GNU
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
+#endif
+#ifdef __USE_XOPEN2K8
 # define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
 				   close-on-exit set.  */
 #endif
@@ -157,6 +163,23 @@
   };
 #endif
 
+#ifdef __USE_GNU
+/* Owner types.  */
+enum __pid_type
+  {
+    F_OWNER_TID = 0,		/* Kernel thread.  */
+    F_OWNER_PID,		/* Process.  */
+    F_OWNER_PGRP,		/* Process group.  */
+    F_OWNER_GID = F_OWNER_PGRP	/* Alternative, obsolete name.  */
+  };
+
+/* Structure to use with F_GETOWN_EX and F_SETOWN_EX.  */
+struct f_owner_ex
+  {
+    enum __pid_type type;	/* Owner type of ID.  */
+    __pid_t pid;		/* ID of owner.  */
+  };
+#endif
 
 /* Define some more compatibility macros to be backward compatible with
    BSD systems which did not managed to hide these kernel macros.  */
@@ -210,7 +233,7 @@
 
 
 /* Selective file content synch'ing.  */
-extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
 			    unsigned int __flags);
 
 
--- sysdeps/unix/sysv/linux/alpha/bits/mman.h
+++ sysdeps/unix/sysv/linux/alpha/bits/mman.h
@@ -1,5 +1,6 @@
 /* Definitions for POSIX memory map interface.  Linux/Alpha version.
-   Copyright (C) 1997, 1998, 2000, 2003, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 2000, 2003, 2006, 2009
+   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
@@ -91,14 +92,17 @@
 
 /* Advice to `madvise'.  */
 #ifdef __USE_BSD
-# define MADV_NORMAL     0	/* No further special treatment.  */
-# define MADV_RANDOM     1	/* Expect random page references.  */
-# define MADV_SEQUENTIAL 2	/* Expect sequential page references.  */
-# define MADV_WILLNEED   3	/* Will need these pages.  */
-# define MADV_DONTNEED   6	/* Don't need these pages.  */
-# define MADV_REMOVE	 9	/* Remove these pages and resources.  */
-# define MADV_DONTFORK	 10	/* Do not inherit across fork.  */
-# define MADV_DOFORK	 11	/* Do inherit across fork.  */
+# define MADV_NORMAL      0  /* No further special treatment.  */
+# define MADV_RANDOM      1  /* Expect random page references.  */
+# define MADV_SEQUENTIAL  2  /* Expect sequential page references.  */
+# define MADV_WILLNEED    3  /* Will need these pages.  */
+# define MADV_DONTNEED    6  /* Don't need these pages.  */
+# define MADV_REMOVE      9  /* Remove these pages and resources.  */
+# define MADV_DONTFORK    10 /* Do not inherit across fork.  */
+# define MADV_DOFORK      11 /* Do inherit across fork.  */
+# define MADV_MERGEABLE   12 /* KSM may merge identical pages.  */
+# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages.  */
+# define MADV_HWPOISON   100 /* Poison a page for testing.  */
 #endif
 
 /* The POSIX people had to invent similar names for the same things.  */
--- sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
+++ sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
@@ -1,5 +1,5 @@
 /* The proper definitions for Linux/Alpha sigaction.
-   Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1999, 2000, 2010 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
@@ -54,6 +54,8 @@
 				    three arguments instead of one.  */
 #if defined __USE_UNIX98 || defined __USE_MISC
 # define SA_ONSTACK   0x00000001 /* Use signal stack by using `sa_restorer'. */
+#endif
+#if defined __USE_UNIX98 || defined __USE_MISC || defined __USE_XOPEN2K8
 # define SA_RESTART   0x00000002 /* Restart syscall on signal return.  */
 # define SA_NODEFER   0x00000008 /* Don't automatically block the signal
 				    when its handler is being executed.  */
--- sysdeps/unix/sysv/linux/alpha/bits/socket.h
+++ sysdeps/unix/sysv/linux/alpha/bits/socket.h
+/* System-specific socket constants and types.  Linux version.
+   Copyright (C) 1991, 1992, 1994-2001, 2004, 2006, 2007, 2008, 2009, 2010
+   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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#ifndef __BITS_SOCKET_H
+#define __BITS_SOCKET_H
+
+#ifndef _SYS_SOCKET_H
+# error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
+#endif
+
+#define	__need_size_t
+#include <stddef.h>
+
+#include <sys/types.h>
+
+/* Type for length arguments in socket calls.  */
+#ifndef __socklen_t_defined
+typedef __socklen_t socklen_t;
+# define __socklen_t_defined
+#endif
+
+/* Types of sockets.  */
+enum __socket_type
+{
+  SOCK_STREAM = 1,		/* Sequenced, reliable, connection-based
+				   byte streams.  */
+#define SOCK_STREAM SOCK_STREAM
+  SOCK_DGRAM = 2,		/* Connectionless, unreliable datagrams
+				   of fixed maximum length.  */
+#define SOCK_DGRAM SOCK_DGRAM
+  SOCK_RAW = 3,			/* Raw protocol interface.  */
+#define SOCK_RAW SOCK_RAW
+  SOCK_RDM = 4,			/* Reliably-delivered messages.  */
+#define SOCK_RDM SOCK_RDM
+  SOCK_SEQPACKET = 5,		/* Sequenced, reliable, connection-based,
+				   datagrams of fixed maximum length.  */
+#define SOCK_SEQPACKET SOCK_SEQPACKET
+  SOCK_DCCP = 6,		/* Datagram Congestion Control Protocol.  */
+#define SOCK_DCCP SOCK_DCCP
+  SOCK_PACKET = 10,		/* Linux specific way of getting packets
+				   at the dev level.  For writing rarp and
+				   other similar things on the user level. */
+#define SOCK_PACKET SOCK_PACKET
+
+  /* Flags to be ORed into the type parameter of socket and socketpair and
+     used for the flags parameter of paccept.  */
+
+  SOCK_CLOEXEC = 010000000,	/* Atomically set close-on-exec flag for the
+				   new descriptor(s).  */
+#define SOCK_CLOEXEC SOCK_CLOEXEC
+  SOCK_NONBLOCK = 0x40000000	/* Atomically mark descriptor(s) as
+				   non-blocking.  */
+#define SOCK_NONBLOCK SOCK_NONBLOCK
+};
+
+/* Protocol families.  */
+#define	PF_UNSPEC	0	/* Unspecified.  */
+#define	PF_LOCAL	1	/* Local to host (pipes and file-domain).  */
+#define	PF_UNIX		PF_LOCAL /* POSIX name for PF_LOCAL.  */
+#define	PF_FILE		PF_LOCAL /* Another non-standard name for PF_LOCAL.  */
+#define	PF_INET		2	/* IP protocol family.  */
+#define	PF_AX25		3	/* Amateur Radio AX.25.  */
+#define	PF_IPX		4	/* Novell Internet Protocol.  */
+#define	PF_APPLETALK	5	/* Appletalk DDP.  */
+#define	PF_NETROM	6	/* Amateur radio NetROM.  */
+#define	PF_BRIDGE	7	/* Multiprotocol bridge.  */
+#define	PF_ATMPVC	8	/* ATM PVCs.  */
+#define	PF_X25		9	/* Reserved for X.25 project.  */
+#define	PF_INET6	10	/* IP version 6.  */
+#define	PF_ROSE		11	/* Amateur Radio X.25 PLP.  */
+#define	PF_DECnet	12	/* Reserved for DECnet project.  */
+#define	PF_NETBEUI	13	/* Reserved for 802.2LLC project.  */
+#define	PF_SECURITY	14	/* Security callback pseudo AF.  */
+#define	PF_KEY		15	/* PF_KEY key management API.  */
+#define	PF_NETLINK	16
+#define	PF_ROUTE	PF_NETLINK /* Alias to emulate 4.4BSD.  */
+#define	PF_PACKET	17	/* Packet family.  */
+#define	PF_ASH		18	/* Ash.  */
+#define	PF_ECONET	19	/* Acorn Econet.  */
+#define	PF_ATMSVC	20	/* ATM SVCs.  */
+#define PF_RDS		21	/* RDS sockets.  */
+#define	PF_SNA		22	/* Linux SNA Project */
+#define	PF_IRDA		23	/* IRDA sockets.  */
+#define	PF_PPPOX	24	/* PPPoX sockets.  */
+#define	PF_WANPIPE	25	/* Wanpipe API sockets.  */
+#define PF_LLC		26	/* Linux LLC.  */
+#define PF_CAN		29	/* Controller Area Network.  */
+#define PF_TIPC		30	/* TIPC sockets.  */
+#define	PF_BLUETOOTH	31	/* Bluetooth sockets.  */
+#define	PF_IUCV		32	/* IUCV sockets.  */
+#define PF_RXRPC	33	/* RxRPC sockets.  */
+#define PF_ISDN		34	/* mISDN sockets.  */
+#define PF_PHONET	35	/* Phonet sockets.  */
+#define PF_IEEE802154	36	/* IEEE 802.15.4 sockets.  */
+#define	PF_MAX		37	/* For now..  */
+
+/* Address families.  */
+#define	AF_UNSPEC	PF_UNSPEC
+#define	AF_LOCAL	PF_LOCAL
+#define	AF_UNIX		PF_UNIX
+#define	AF_FILE		PF_FILE
+#define	AF_INET		PF_INET
+#define	AF_AX25		PF_AX25
+#define	AF_IPX		PF_IPX
+#define	AF_APPLETALK	PF_APPLETALK
+#define	AF_NETROM	PF_NETROM
+#define	AF_BRIDGE	PF_BRIDGE
+#define	AF_ATMPVC	PF_ATMPVC
+#define	AF_X25		PF_X25
+#define	AF_INET6	PF_INET6
+#define	AF_ROSE		PF_ROSE
+#define	AF_DECnet	PF_DECnet
+#define	AF_NETBEUI	PF_NETBEUI
+#define	AF_SECURITY	PF_SECURITY
+#define	AF_KEY		PF_KEY
+#define	AF_NETLINK	PF_NETLINK
+#define	AF_ROUTE	PF_ROUTE
+#define	AF_PACKET	PF_PACKET
+#define	AF_ASH		PF_ASH
+#define	AF_ECONET	PF_ECONET
+#define	AF_ATMSVC	PF_ATMSVC
+#define AF_RDS		PF_RDS
+#define	AF_SNA		PF_SNA
+#define	AF_IRDA		PF_IRDA
+#define	AF_PPPOX	PF_PPPOX
+#define	AF_WANPIPE	PF_WANPIPE
+#define AF_LLC		PF_LLC
+#define AF_CAN		PF_CAN
+#define AF_TIPC		PF_TIPC
+#define	AF_BLUETOOTH	PF_BLUETOOTH
+#define	AF_IUCV		PF_IUCV
+#define AF_RXRPC	PF_RXRPC
+#define AF_ISDN		PF_ISDN
+#define AF_PHONET	PF_PHONET
+#define AF_IEEE802154	PF_IEEE802154
+#define	AF_MAX		PF_MAX
+
+/* Socket level values.  Others are defined in the appropriate headers.
+
+   XXX These definitions also should go into the appropriate headers as
+   far as they are available.  */
+#define SOL_RAW		255
+#define SOL_DECNET      261
+#define SOL_X25         262
+#define SOL_PACKET	263
+#define SOL_ATM		264	/* ATM layer (cell level).  */
+#define SOL_AAL		265	/* ATM Adaption Layer (packet level).  */
+#define SOL_IRDA	266
+
+/* Maximum queue length specifiable by listen.  */
+#define SOMAXCONN	128
+
+/* Get the definition of the macro to define the common sockaddr members.  */
+#include <bits/sockaddr.h>
+
+/* Structure describing a generic socket address.  */
+struct sockaddr
+  {
+    __SOCKADDR_COMMON (sa_);	/* Common data: address family and length.  */
+    char sa_data[14];		/* Address data.  */
+  };
+
+
+/* Structure large enough to hold any socket address (with the historical
+   exception of AF_UNIX).  We reserve 128 bytes.  */
+#define __ss_aligntype	unsigned long int
+#define _SS_SIZE	128
+#define _SS_PADSIZE	(_SS_SIZE - (2 * sizeof (__ss_aligntype)))
+
+struct sockaddr_storage
+  {
+    __SOCKADDR_COMMON (ss_);	/* Address family, etc.  */
+    __ss_aligntype __ss_align;	/* Force desired alignment.  */
+    char __ss_padding[_SS_PADSIZE];
+  };
+
+
+/* Bits in the FLAGS argument to `send', `recv', et al.  */
+enum
+  {
+    MSG_OOB		= 0x01,	/* Process out-of-band data.  */
+#define MSG_OOB		MSG_OOB
+    MSG_PEEK		= 0x02,	/* Peek at incoming messages.  */
+#define MSG_PEEK	MSG_PEEK
+    MSG_DONTROUTE	= 0x04,	/* Don't use local routing.  */
+#define MSG_DONTROUTE	MSG_DONTROUTE
+#ifdef __USE_GNU
+    /* DECnet uses a different name.  */
+    MSG_TRYHARD		= MSG_DONTROUTE,
+# define MSG_TRYHARD	MSG_DONTROUTE
+#endif
+    MSG_CTRUNC		= 0x08,	/* Control data lost before delivery.  */
+#define MSG_CTRUNC	MSG_CTRUNC
+    MSG_PROXY		= 0x10,	/* Supply or ask second address.  */
+#define MSG_PROXY	MSG_PROXY
+    MSG_TRUNC		= 0x20,
+#define	MSG_TRUNC	MSG_TRUNC
+    MSG_DONTWAIT	= 0x40, /* Nonblocking IO.  */
+#define	MSG_DONTWAIT	MSG_DONTWAIT
+    MSG_EOR		= 0x80, /* End of record.  */
+#define	MSG_EOR		MSG_EOR
+    MSG_WAITALL		= 0x100, /* Wait for a full request.  */
+#define	MSG_WAITALL	MSG_WAITALL
+    MSG_FIN		= 0x200,
+#define	MSG_FIN		MSG_FIN
+    MSG_SYN		= 0x400,
+#define	MSG_SYN		MSG_SYN
+    MSG_CONFIRM		= 0x800, /* Confirm path validity.  */
+#define	MSG_CONFIRM	MSG_CONFIRM
+    MSG_RST		= 0x1000,
+#define	MSG_RST		MSG_RST
+    MSG_ERRQUEUE	= 0x2000, /* Fetch message from error queue.  */
+#define	MSG_ERRQUEUE	MSG_ERRQUEUE
+    MSG_NOSIGNAL	= 0x4000, /* Do not generate SIGPIPE.  */
+#define	MSG_NOSIGNAL	MSG_NOSIGNAL
+    MSG_MORE		= 0x8000,  /* Sender will send more.  */
+#define	MSG_MORE	MSG_MORE
+    MSG_WAITFORONE	= 0x10000, /* Wait for at least one packet to return.*/
+#define MSG_WAITFORONE	MSG_WAITFORONE
+
+    MSG_CMSG_CLOEXEC	= 0x40000000	/* Set close_on_exit for file
+					   descriptor received through
+					   SCM_RIGHTS.  */
+#define MSG_CMSG_CLOEXEC MSG_CMSG_CLOEXEC
+  };
+
+
+/* Structure describing messages sent by
+   `sendmsg' and received by `recvmsg'.  */
+struct msghdr
+  {
+    void *msg_name;		/* Address to send to/receive from.  */
+    socklen_t msg_namelen;	/* Length of address data.  */
+
+    struct iovec *msg_iov;	/* Vector of data to send/receive into.  */
+    size_t msg_iovlen;		/* Number of elements in the vector.  */
+
+    void *msg_control;		/* Ancillary data (eg BSD filedesc passing). */
+    size_t msg_controllen;	/* Ancillary data buffer length.
+				   !! The type should be socklen_t but the
+				   definition of the kernel is incompatible
+				   with this.  */
+
+    int msg_flags;		/* Flags on received message.  */
+  };
+
+#ifdef __USE_GNU
+/* For `recvmmsg'.  */
+struct mmsghdr
+  {
+    struct msghdr msg_hdr;	/* Actual message header.  */
+    unsigned int msg_len;	/* Number of received bytes for the entry.  */
+  };
+#endif
+
+/* Structure used for storage of ancillary data object information.  */
+struct cmsghdr
+  {
+    size_t cmsg_len;		/* Length of data in cmsg_data plus length
+				   of cmsghdr structure.
+				   !! The type should be socklen_t but the
+				   definition of the kernel is incompatible
+				   with this.  */
+    int cmsg_level;		/* Originating protocol.  */
+    int cmsg_type;		/* Protocol specific type.  */
+#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
+    __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data.  */
+#endif
+  };
+
+/* Ancillary data object manipulation macros.  */
+#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
+# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data)
+#else
+# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1))
+#endif
+#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg)
+#define CMSG_FIRSTHDR(mhdr) \
+  ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr)		      \
+   ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0)
+#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \
+			 & (size_t) ~(sizeof (size_t) - 1))
+#define CMSG_SPACE(len) (CMSG_ALIGN (len) \
+			 + CMSG_ALIGN (sizeof (struct cmsghdr)))
+#define CMSG_LEN(len)   (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
+
+extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
+				      struct cmsghdr *__cmsg) __THROW;
+#ifdef __USE_EXTERN_INLINES
+# ifndef _EXTERN_INLINE
+#  define _EXTERN_INLINE __extern_inline
+# endif
+_EXTERN_INLINE struct cmsghdr *
+__NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
+{
+  if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
+    /* The kernel header does this so there may be a reason.  */
+    return 0;
+
+  __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
+			       + CMSG_ALIGN (__cmsg->cmsg_len));
+  if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control
+					+ __mhdr->msg_controllen)
+      || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
+	  > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
+    /* No more entries.  */
+    return 0;
+  return __cmsg;
+}
+#endif	/* Use `extern inline'.  */
+
+/* Socket level message types.  This must match the definitions in
+   <linux/socket.h>.  */
+enum
+  {
+    SCM_RIGHTS = 0x01		/* Transfer file descriptors.  */
+#define SCM_RIGHTS SCM_RIGHTS
+#ifdef __USE_GNU
+    , SCM_CREDENTIALS = 0x02	/* Credentials passing.  */
+# define SCM_CREDENTIALS SCM_CREDENTIALS
+#endif
+  };
+
+#ifdef __USE_GNU
+/* User visible structure for SCM_CREDENTIALS message */
+struct ucred
+{
+  pid_t pid;			/* PID of sending process.  */
+  uid_t uid;			/* UID of sending process.  */
+  gid_t gid;			/* GID of sending process.  */
+};
+#endif
+
+/* Ugly workaround for unclean kernel headers.  */
+#if !defined __USE_MISC && !defined __USE_GNU
+# ifndef FIOGETOWN
+#  define __SYS_SOCKET_H_undef_FIOGETOWN
+# endif
+# ifndef FIOSETOWN
+#  define __SYS_SOCKET_H_undef_FIOSETOWN
+# endif
+# ifndef SIOCATMARK
+#  define __SYS_SOCKET_H_undef_SIOCATMARK
+# endif
+# ifndef SIOCGPGRP
+#  define __SYS_SOCKET_H_undef_SIOCGPGRP
+# endif
+# ifndef SIOCGSTAMP
+#  define __SYS_SOCKET_H_undef_SIOCGSTAMP
+# endif
+# ifndef SIOCGSTAMPNS
+#  define __SYS_SOCKET_H_undef_SIOCGSTAMPNS
+# endif
+# ifndef SIOCSPGRP
+#  define __SYS_SOCKET_H_undef_SIOCSPGRP
+# endif
+#endif
+
+/* Get socket manipulation related informations from kernel headers.  */
+#include <asm/socket.h>
+
+#if !defined __USE_MISC && !defined __USE_GNU
+# ifdef __SYS_SOCKET_H_undef_FIOGETOWN
+#  undef __SYS_SOCKET_H_undef_FIOGETOWN
+#  undef FIOGETOWN
+# endif
+# ifdef __SYS_SOCKET_H_undef_FIOSETOWN
+#  undef __SYS_SOCKET_H_undef_FIOSETOWN
+#  undef FIOSETOWN
+# endif
+# ifdef __SYS_SOCKET_H_undef_SIOCATMARK
+#  undef __SYS_SOCKET_H_undef_SIOCATMARK
+#  undef SIOCATMARK
+# endif
+# ifdef __SYS_SOCKET_H_undef_SIOCGPGRP
+#  undef __SYS_SOCKET_H_undef_SIOCGPGRP
+#  undef SIOCGPGRP
+# endif
+# ifdef __SYS_SOCKET_H_undef_SIOCGSTAMP
+#  undef __SYS_SOCKET_H_undef_SIOCGSTAMP
+#  undef SIOCGSTAMP
+# endif
+# ifdef __SYS_SOCKET_H_undef_SIOCGSTAMPNS
+#  undef __SYS_SOCKET_H_undef_SIOCGSTAMPNS
+#  undef SIOCGSTAMPNS
+# endif
+# ifdef __SYS_SOCKET_H_undef_SIOCSPGRP
+#  undef __SYS_SOCKET_H_undef_SIOCSPGRP
+#  undef SIOCSPGRP
+# endif
+#endif
+
+/* Structure used to manipulate the SO_LINGER option.  */
+struct linger
+  {
+    int l_onoff;		/* Nonzero to linger on close.  */
+    int l_linger;		/* Time to linger.  */
+  };
+
+
+__BEGIN_DECLS
+
+/* Receive a message as described by MESSAGE from socket FD.
+   Returns the number of bytes read or -1 for errors.
+
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
+extern int recvmmsg (int __fd, struct mmsghdr *__vmessages,
+		     unsigned int __vlen, int __flags,
+		     __const struct timespec *__tmo);
+
+__END_DECLS
+
+#endif	/* bits/socket.h */
--- sysdeps/unix/sysv/linux/alpha/bits/stat.h
+++ sysdeps/unix/sysv/linux/alpha/bits/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996,1997,1998,1999,2000,2001,2004
+/* Copyright (C) 1996,1997,1998,1999,2000,2001,2004,2010
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -17,10 +17,13 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#ifndef _SYS_STAT_H
+#if !defined _SYS_STAT_H && !defined _FCNTL_H
 # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
 #endif
 
+#ifndef _BITS_STAT_H
+#define _BITS_STAT_H	1
+
 /* Versions of the `struct stat' data structure.  */
 #define _STAT_VER_KERNEL	0
 #define _STAT_VER_GLIBC2	1
@@ -41,7 +44,7 @@
 
    Use neat tidy anonymous unions and structures when possible.  */
 
-#ifdef __USE_MISC
+#if defined __USE_MISC || defined __USE_XOPEN2K8
 # if __GNUC_PREREQ(3,3)
 #  define __ST_TIME(X)				\
 	__extension__ union {			\
@@ -155,3 +158,5 @@
 # define UTIME_NOW	((1l << 30) - 1l)
 # define UTIME_OMIT	((1l << 30) - 2l)
 #endif
+
+#endif /* bits/stat.h */
--- sysdeps/unix/sysv/linux/alpha/creat.c
+++ sysdeps/unix/sysv/linux/alpha/creat.c
+/* sysdeps/unix/sysv/linux/wordsize-64/syscalls.list defines creat and
+   creat64 for most linux targets, but on alpha creat is not a syscall.
+   If we do nothing, we'll wind up with creat64 being undefined, because
+   the syscalls.list assumes the creat->creat64 alias was created.  We
+   could have overridden that with a create64.c, but we might as well do
+   the right thing and set up creat64 as an alias.  */
+#include <io/creat.c>
+weak_alias(__libc_creat, creat64)
--- sysdeps/unix/sysv/linux/alpha/dl-auxv.h
+++ sysdeps/unix/sysv/linux/alpha/dl-auxv.h
@@ -19,7 +19,7 @@
 
 /* Scan the Aux Vector for the cache shape entries.  */
 
-long __libc_alpha_cache_shape[4] = { -2, -2, -2, -2 };
+extern long __libc_alpha_cache_shape[4];
 
 #define DL_PLATFORM_AUXV				\
       case AT_L1I_CACHESHAPE:				\
--- sysdeps/unix/sysv/linux/alpha/dl-sysdep.c
+++ sysdeps/unix/sysv/linux/alpha/dl-sysdep.c
@@ -1,2 +1,5 @@
 #include "dl-auxv.h"
+
+long __libc_alpha_cache_shape[4] = { -2, -2, -2, -2 };
+
 #include <sysdeps/unix/sysv/linux/dl-sysdep.c>
--- sysdeps/unix/sysv/linux/alpha/fstatfs64.c
+++ sysdeps/unix/sysv/linux/alpha/fstatfs64.c
+#include <sysdeps/unix/sysv/linux/fstatfs64.c>
--- sysdeps/unix/sysv/linux/alpha/fstatvfs.c
+++ sysdeps/unix/sysv/linux/alpha/fstatvfs.c
+#include <sysdeps/unix/sysv/linux/fstatvfs.c>
--- sysdeps/unix/sysv/linux/alpha/fstatvfs64.c
+++ sysdeps/unix/sysv/linux/alpha/fstatvfs64.c
+#include <sysdeps/unix/sysv/linux/fstatvfs64.c>
--- sysdeps/unix/sysv/linux/alpha/fxstat.c
+++ sysdeps/unix/sysv/linux/alpha/fxstat.c
@@ -35,27 +35,39 @@
 __fxstat (int vers, int fd, struct stat *buf)
 {
   INTERNAL_SYSCALL_DECL (err);
-  int result, errno_out;
+  int result;
   struct kernel_stat kbuf;
 
+#if __ASSUME_STAT64_SYSCALL > 0
+  if (vers == _STAT_VER_KERNEL64)
+    {
+      result = INTERNAL_SYSCALL (fstat64, err, 2, fd, buf);
+      if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+	return result;
+      __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
+      return -1;
+    }
+#elif defined __NR_fstat64
   if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
     {
+      int errno_out;
       result = INTERNAL_SYSCALL (fstat64, err, 2, fd, buf);
       if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
 	return result;
       errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
       if (errno_out != ENOSYS)
-	goto fail;
+	{
+	  __set_errno (errno_out);
+	  return -1;
+	}
       __libc_missing_axp_stat64 = 1;
     }
+#endif
 
   result = INTERNAL_SYSCALL (fstat, err, 2, fd, &kbuf);
   if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
     return __xstat_conv (vers, &kbuf, buf);
-  errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
-  
- fail:
-  __set_errno (errno_out);
+  __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
   return -1;
 }
 hidden_def (__fxstat)
--- sysdeps/unix/sysv/linux/alpha/fxstatat.c
+++ sysdeps/unix/sysv/linux/alpha/fxstatat.c
@@ -71,6 +71,20 @@
   int result, errno_out;
   struct kernel_stat kst;
 
+#if __ASSUME_STAT64_SYSCALL > 0
+  if (vers == _STAT_VER_KERNEL64)
+    {
+      if (flag & AT_SYMLINK_NOFOLLOW)
+	result = INTERNAL_SYSCALL (lstat64, err, 2, file, st);
+      else
+	result = INTERNAL_SYSCALL (stat64, err, 2, file, st);
+
+      if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+	return result;
+      errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
+      goto fail;
+    }
+#elif defined __NR_stat64
   if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
     {
       if (flag & AT_SYMLINK_NOFOLLOW)
@@ -85,6 +99,7 @@
 	goto fail;
       __libc_missing_axp_stat64 = 1;
     }
+#endif
 
   if (flag & AT_SYMLINK_NOFOLLOW)
     result = INTERNAL_SYSCALL (lstat, err, 2, file, &kst);
--- sysdeps/unix/sysv/linux/alpha/internal_statvfs64.c
+++ sysdeps/unix/sysv/linux/alpha/internal_statvfs64.c
+#include <sysdeps/unix/sysv/linux/internal_statvfs64.c>
--- sysdeps/unix/sysv/linux/alpha/kernel-features.h
+++ sysdeps/unix/sysv/linux/alpha/kernel-features.h
+/* Set flags signalling availability of kernel features based on given
+   kernel version number.
+   Copyright (C) 2010 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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+/* alpha switched to a 64-bit timeval sometime before 2.2.0.  */
+#if __LINUX_KERNEL_VERSION >= 131584
+# define __ASSUME_TIMEVAL64	1
+#endif
+
+/* The tgkill syscall was introduced for alpha 2.6.0-test1 which unfortunately
+   cannot be distinguished from 2.6.0.  */
+#if __LINUX_KERNEL_VERSION >= 132609
+# define __ASSUME_TGKILL	1
+#endif
+
+/* Starting with version 2.6.4, the stat64 syscalls are available.  */
+#if __LINUX_KERNEL_VERSION >= 0x020604 && defined __alpha__
+# define __ASSUME_STAT64_SYSCALL   1
+#endif
+
+#define __ASSUME_UTIMES	1
+
+/* Starting with version 2.6.9, SSI_IEEE_RAISE_EXCEPTION exists.  */
+#if __LINUX_KERNEL_VERSION >= 0x020609
+# define __ASSUME_IEEE_RAISE_EXCEPTION	1
+#endif
+
+/* Support for the O_CLOEXEC flag was added for alpha in 2.6.23.  */
+#if __LINUX_KERNEL_VERSION >= 0x020617
+# define __ASSUME_O_CLOEXEC    1
+#endif
+
+/* Support for various CLOEXEC and NONBLOCK flags was added for alpha after
+   2.6.33-rc1.  */
+#if __LINUX_KERNEL_VERSION >= 0x020621
+# define __ASSUME_SOCK_CLOEXEC  1
+# define __ASSUME_IN_NONBLOCK   1
+#endif
+
+/* Support for the pipe2, eventfd2, signalfd4 syscalls was added for alpha 
+   after 2.6.33-rc1.  */
+#if __LINUX_KERNEL_VERSION >= 0x020621
+# define __ASSUME_PIPE2     1
+# define __ASSUME_EVENTFD2  1
+# define __ASSUME_SIGNALFD4 1
+#endif
+
+/* Support for accept4 was added for alpha after 2.6.33-rc1.  */
+#if __LINUX_KERNEL_VERSION >= 0x020621
+# define __ASSUME_ACCEPT4      1
+#endif
+
+#include_next <kernel-features.h>
+
+#undef __ASSUME_ST_INO_64_BIT
+
+/* pselect/ppoll were introduced on alpha just after 2.6.22-rc1.  */
+#if __LINUX_KERNEL_VERSION < 0x020617
+# undef __ASSUME_PSELECT
+# undef __ASSUME_PPOLL
+#endif
+
+/* The *at syscalls were introduced on alpha just after 2.6.22-rc1.  */
+#if __LINUX_KERNEL_VERSION < 0x020617
+# undef __ASSUME_ATFCTS
+#endif
+
+/* Support for inter-process robust mutexes was added on alpha just
+   after 2.6.22-rc1.  */
+#if __LINUX_KERNEL_VERSION < 0x020617
+# undef __ASSUME_SET_ROBUST_LIST
+#endif
+
+/* Support for utimensat was added on alpha after 2.6.22-rc1.  */
+#if __LINUX_KERNEL_VERSION < 0x020617
+# undef __ASSUME_UTIMENSAT
+#endif
+
+/* Support for fallocate was added for alpha after 2.6.33-rc1.  */
+#if __LINUX_KERNEL_VERSION < 0x020621
+# undef __ASSUME_FALLOCATE
+#endif
--- sysdeps/unix/sysv/linux/alpha/lxstat.c
+++ sysdeps/unix/sysv/linux/alpha/lxstat.c
@@ -35,27 +35,39 @@
 __lxstat (int vers, const char *name, struct stat *buf)
 {
   INTERNAL_SYSCALL_DECL (err);
-  int result, errno_out;
+  int result;
   struct kernel_stat kbuf;
 
+#if __ASSUME_STAT64_SYSCALL > 0
+  if (vers == _STAT_VER_KERNEL64)
+    {
+      result = INTERNAL_SYSCALL (lstat64, err, 2, name, buf);
+      if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+	return result;
+      __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
+      return -1;
+    }
+#elif defined __NR_lstat64
   if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
     {
+      int errno_out;
       result = INTERNAL_SYSCALL (lstat64, err, 2, name, buf);
       if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
 	return result;
       errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
       if (errno_out != ENOSYS)
-	goto fail;
+	{
+	  __set_errno (errno_out);
+	  return -1;
+	}
       __libc_missing_axp_stat64 = 1;
     }
+#endif
 
   result = INTERNAL_SYSCALL (lstat, err, 2, name, &kbuf);
   if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
     return __xstat_conv (vers, &kbuf, buf);
-  errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
-  
- fail:
-  __set_errno (errno_out);
+  __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
   return -1;
 }
 hidden_def (__lxstat)
--- sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c
+++ sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c
@@ -1 +1 @@
-#include <nptl/sysdeps/unix/sysv/linux/x86_64/timer_gettime.c>
+#include <nptl/sysdeps/unix/sysv/linux/x86_64/timer_settime.c>
--- sysdeps/unix/sysv/linux/alpha/statfs64.c
+++ sysdeps/unix/sysv/linux/alpha/statfs64.c
+#include <sysdeps/unix/sysv/linux/statfs64.c>
--- sysdeps/unix/sysv/linux/alpha/statvfs.c
+++ sysdeps/unix/sysv/linux/alpha/statvfs.c
+#include <sysdeps/unix/sysv/linux/statvfs.c>
--- sysdeps/unix/sysv/linux/alpha/statvfs64.c
+++ sysdeps/unix/sysv/linux/alpha/statvfs64.c
+#include <sysdeps/unix/sysv/linux/statvfs64.c>
--- sysdeps/unix/sysv/linux/alpha/sys/user.h
+++ sysdeps/unix/sysv/linux/alpha/sys/user.h
@@ -23,7 +23,6 @@
    only. Don't read too much into it. Don't use it for anything other
    than gdb/strace unless you know what you are doing. */
 
-#include <asm/page.h>
 #include <asm/reg.h>
 
 struct user
@@ -41,6 +40,9 @@
   char u_comm[32];				/* user command name */
 };
 
+#define PAGE_SHIFT		13
+#define PAGE_SIZE		(1UL << PAGE_SHIFT)
+#define PAGE_MASK		(~(PAGE_SIZE-1))
 #define NBPG			PAGE_SIZE
 #define UPAGES			1
 #define HOST_TEXT_START_ADDR	(u.start_code)
--- sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -53,3 +53,8 @@
 osf_utimes	-	osf_utimes	2	__utimes_tv32  utimes@GLIBC_2.0
 osf_getrusage	-	osf_getrusage	2	__getrusage_tv32  getrusage@GLIBC_2.0
 osf_wait4	-	osf_wait4	2	__wait4_tv32  wait4@GLIBC_2.0
+
+# avoid 64-bit aliases on 32-bit statfs syscalls
+fstatfs		-	fstatfs		i:ip	__fstatfs	fstatfs
+statfs		-	statfs		i:sp	__statfs	statfs
+
--- sysdeps/unix/sysv/linux/alpha/xstat.c
+++ sysdeps/unix/sysv/linux/alpha/xstat.c
@@ -35,27 +35,39 @@
 __xstat (int vers, const char *name, struct stat *buf)
 {
   INTERNAL_SYSCALL_DECL (err);
-  int result, errno_out;
+  int result;
   struct kernel_stat kbuf;
 
+#if __ASSUME_STAT64_SYSCALL > 0
+  if (vers == _STAT_VER_KERNEL64)
+    {
+      result = INTERNAL_SYSCALL (stat64, err, 2, name, buf);
+      if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+	return result;
+      __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
+      return -1;
+    }
+#elif defined __NR_stat64
   if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
     {
+      int errno_out;
       result = INTERNAL_SYSCALL (stat64, err, 2, name, buf);
       if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
 	return result;
       errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
       if (errno_out != ENOSYS)
-	goto fail;
+	{
+	  __set_errno (errno_out);
+	  return -1;
+	}
       __libc_missing_axp_stat64 = 1;
     }
+#endif
 
   result = INTERNAL_SYSCALL (stat, err, 2, name, &kbuf);
   if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
     return __xstat_conv (vers, &kbuf, buf);
-  errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
-  
- fail:
-  __set_errno (errno_out);
+  __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
   return -1;
 }
 hidden_def (__xstat)
--- sysdeps/unix/sysv/linux/alpha/xstatconv.c
+++ sysdeps/unix/sysv/linux/alpha/xstatconv.c
@@ -22,9 +22,14 @@
 #include <sys/stat.h>
 #include <kernel_stat.h>
 #include <xstatconv.h>
+#include <sys/syscall.h>
 
 
+#ifdef __NR_stat64
+# if __ASSUME_STAT64_SYSCALL == 0
 int __libc_missing_axp_stat64;
+# endif
+#endif
 
 int
 __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
--- sysdeps/unix/sysv/linux/alpha/xstatconv.h
+++ sysdeps/unix/sysv/linux/alpha/xstatconv.h
@@ -18,7 +18,12 @@
    02111-1307 USA.  */
 
 #include <kernel-features.h>
+#include <sys/syscall.h>
 
+#ifdef __NR_stat64
+# if __ASSUME_STAT64_SYSCALL == 0
 extern int __libc_missing_axp_stat64 attribute_hidden;
+# endif
+#endif
 extern int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
   attribute_hidden;
--- sysdeps/unix/sysv/linux/arm/bits/fcntl.h
+++ sysdeps/unix/sysv/linux/arm/bits/fcntl.h
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for Linux.
-   Copyright (C) 1995-1998, 2000, 2004, 2006, 2007, 2009
+   Copyright (C) 1995-1998, 2000, 2004, 2006, 2007, 2009, 2010
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -41,23 +41,25 @@
 #define O_APPEND	  02000
 #define O_NONBLOCK	  04000
 #define O_NDELAY	O_NONBLOCK
-#define O_SYNC		 010000
+#define O_SYNC	       04010000
 #define O_FSYNC		 O_SYNC
 #define O_ASYNC		 020000
 
-#ifdef __USE_GNU
+#ifdef __USE_XOPEN2K8
 # define O_DIRECTORY	 040000	/* Must be a directory.	 */
 # define O_NOFOLLOW	0100000	/* Do not follow links.	 */
+# define O_CLOEXEC     02000000 /* Set close_on_exec.  */
+#endif
+#ifdef __USE_GNU
 # define O_DIRECT	0200000	/* Direct disk access.	*/
 # define O_NOATIME     01000000 /* Do not set atime.  */
-# define O_CLOEXEC     02000000 /* Set close_on_exec.  */
 #endif
 
 /* For now Linux has synchronisity options for data and read operations.
    We define the symbols here but let them do the same as O_SYNC since
    this is a superset.	*/
 #if defined __USE_POSIX199309 || defined __USE_UNIX98
-# define O_DSYNC	O_SYNC	/* Synchronize data.  */
+# define O_DSYNC	010000	/* Synchronize data.  */
 # define O_RSYNC	O_SYNC	/* Synchronize read operations.	 */
 #endif
 
@@ -84,7 +86,7 @@
 #define F_SETLK64	13	/* Set record locking info (non-blocking).  */
 #define F_SETLKW64	14	/* Set record locking info (blocking).	*/
 
-#if defined __USE_BSD || defined __USE_UNIX98
+#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8
 # define F_SETOWN	8	/* Get owner (process receiving SIGIO).  */
 # define F_GETOWN	9	/* Set owner (process receiving SIGIO).  */
 #endif
@@ -100,6 +102,10 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
+# define F_SETPIPE_SZ	1031	/* Set pipe page size array.  */
+# define F_GETPIPE_SZ	1032	/* Set pipe page size array.  */
+#endif
+#ifdef __USE_XOPEN2K8
 # define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
 				   close-on-exit set.  */
 #endif
@@ -172,9 +178,10 @@
 /* Owner types.  */
 enum __pid_type
   {
-    F_OWNER_TID = 0,	/* Kernel thread.  */
-    F_OWNER_PID,	/* Process.  */
-    F_OWNER_GID		/* Process group.  */
+    F_OWNER_TID = 0,		/* Kernel thread.  */
+    F_OWNER_PID,		/* Process.  */
+    F_OWNER_PGRP,		/* Process group.  */
+    F_OWNER_GID = F_OWNER_PGRP	/* Alternative, obsolete name.  */
   };
 
 /* Structure to use with F_GETOWN_EX and F_SETOWN_EX.  */
@@ -237,7 +244,7 @@
 
 
 /* Selective file content synch'ing.  */
-extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
 			    unsigned int __flags);
 
 
--- sysdeps/unix/sysv/linux/arm/bits/mman.h
+++ sysdeps/unix/sysv/linux/arm/bits/mman.h
@@ -1,5 +1,6 @@
 /* Definitions for POSIX memory map interface.  Linux/ARM version.
-   Copyright (C) 1997, 2000, 2003, 2005, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1997, 2000, 2003, 2005, 2006, 2009, 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
@@ -83,14 +84,19 @@
 
 /* Advice to `madvise'.  */
 #ifdef __USE_BSD
-# define MADV_NORMAL	 0	/* No further special treatment.  */
-# define MADV_RANDOM	 1	/* Expect random page references.  */
-# define MADV_SEQUENTIAL 2	/* Expect sequential page references.  */
-# define MADV_WILLNEED	 3	/* Will need these pages.  */
-# define MADV_DONTNEED	 4	/* Don't need these pages.  */
-# define MADV_REMOVE	 9	/* Remove these pages and resources.  */
-# define MADV_DONTFORK	 10	/* Do not inherit across fork.  */
-# define MADV_DOFORK	 11	/* Do inherit across fork.  */
+# define MADV_NORMAL	  0	/* No further special treatment.  */
+# define MADV_RANDOM	  1	/* Expect random page references.  */
+# define MADV_SEQUENTIAL  2	/* Expect sequential page references.  */
+# define MADV_WILLNEED	  3	/* Will need these pages.  */
+# define MADV_DONTNEED	  4	/* Don't need these pages.  */
+# define MADV_REMOVE	  9	/* Remove these pages and resources.  */
+# define MADV_DONTFORK	  10	/* Do not inherit across fork.  */
+# define MADV_DOFORK	  11	/* Do inherit across fork.  */
+# define MADV_MERGEABLE	  12	/* KSM may merge identical pages.  */
+# define MADV_UNMERGEABLE 13	/* KSM may not merge identical pages.  */
+# define MADV_HUGEPAGE	  14	/* Worth backing with hugepages.  */
+# define MADV_NOHUGEPAGE  15	/* Not worth backing with hugepages.  */
+# define MADV_HWPOISON	  100	/* Poison a page for testing.  */
 #endif
 
 /* The POSIX people had to invent similar names for the same things.  */
--- sysdeps/unix/sysv/linux/arm/clone.S
+++ sysdeps/unix/sysv/linux/arm/clone.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 1999, 2002, 2005, 2008, 2009
+/* Copyright (C) 1996, 1997, 1998, 1999, 2002, 2005, 2008, 2009, 2010
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Pat Beirne <patb@corelcomputer.com>
@@ -52,8 +52,13 @@
 	@ new sp is already in r1
 #ifdef __ARM_EABI__
 	stmfd	sp!, {r4, r7}
+	cfi_adjust_cfa_offset (8)
+	cfi_rel_offset (r4, 0)
+	cfi_rel_offset (r7, 4)
 #else
 	str	r4, [sp, #-8]!
+	cfi_adjust_cfa_offset (8)
+	cfi_rel_offset (r4, 0)
 #endif
 	ldr	r2, [sp, #8]
 	ldr	r3, [sp, #12]
@@ -64,6 +69,7 @@
 #else
 	swi	SYS_ify(clone)
 #endif
+	cfi_endproc
 	cmp	r0, #0
 	beq	1f
 #ifdef __ARM_EABI__
@@ -74,6 +80,8 @@
 	blt	PLTJMP(C_SYMBOL_NAME(__syscall_error))
 	RETINSTR(, lr)
 
+	cfi_startproc
+	cfi_undefined (lr)
 1:
 #ifdef RESET_PID
 	tst	ip, #CLONE_THREAD
--- sysdeps/unix/sysv/linux/arm/dl-procinfo.c
+++ sysdeps/unix/sysv/linux/arm/dl-procinfo.c
@@ -47,12 +47,12 @@
 #if !defined PROCINFO_DECL && defined SHARED
   ._dl_arm_cap_flags
 #else
-PROCINFO_CLASS const char _dl_arm_cap_flags[10][10]
+PROCINFO_CLASS const char _dl_arm_cap_flags[15][10]
 #endif
 #ifndef PROCINFO_DECL
 = {
-    "swp", "half", "thumb", "26bit", "fast-mult", "fpa", "vfp", "edsp",
-    "java", "iwmmxt",
+    "swp", "half", "thumb", "26bit", "fastmult", "fpa", "vfp", "edsp",
+    "java", "iwmmxt", "crunch", "thumbee", "neon", "vfpv3", "vfpv3d16",
   }
 #endif
 #if !defined SHARED || defined PROCINFO_DECL
--- sysdeps/unix/sysv/linux/arm/dl-procinfo.h
+++ sysdeps/unix/sysv/linux/arm/dl-procinfo.h
@@ -24,7 +24,7 @@
 #include <ldsodefs.h>
 #include <sysdep.h>
 
-#define _DL_HWCAP_COUNT 10
+#define _DL_HWCAP_COUNT 15
 
 /* The kernel provides platform data but it is not interesting.  */
 #define _DL_HWCAP_PLATFORM 	0
@@ -54,7 +54,7 @@
   return GLRO(dl_arm_cap_flags)[idx];
 };
 
-#define HWCAP_IMPORTANT		(HWCAP_ARM_HALF | HWCAP_ARM_FAST_MULT)
+#define HWCAP_IMPORTANT		(HWCAP_ARM_VFP | HWCAP_ARM_NEON)
 
 static inline int
 __attribute__ ((unused))
--- sysdeps/unix/sysv/linux/arm/eabi/Makefile
+++ sysdeps/unix/sysv/linux/arm/eabi/Makefile
@@ -7,3 +7,34 @@
 # unwind tables for __libc_start_main.
 CFLAGS-libc-start.c += -fexceptions
 endif
+
+# Add a syscall function to each library that needs one.
+
+ifeq ($(subdir),rt)
+librt-sysdep_routines += libc-do-syscall
+librt-shared-only-routines += libc-do-syscall
+endif
+
+ifeq ($(subdir),nptl)
+libpthread-sysdep_routines += libc-do-syscall
+libpthread-shared-only-routines += libc-do-syscall
+endif
+
+ifeq ($(subdir),resolv)
+libanl-sysdep_routines += libc-do-syscall
+libanl-shared-only-routines += libc-do-syscall
+endif
+
+ifeq ($(subdir),csu)
+sysdep_routines += libc-do-syscall
+endif
+
+ifeq ($(subdir),nscd)
+nscd-modules += libc-do-syscall
+endif
+
+ifeq ($(subdir),posix)
+LDFLAGS-tst-rfc3484 += $(common-objpfx)csu/libc-do-syscall.o
+LDFLAGS-tst-rfc3484-2 += $(common-objpfx)csu/libc-do-syscall.o
+LDFLAGS-tst-rfc3484-3 += $(common-objpfx)csu/libc-do-syscall.o
+endif
--- sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S
+++ sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S
@@ -30,6 +30,7 @@
 #ifdef PIC
 # define CALL_FAIL						\
 	ldr	sl, .L_GOT;					\
+	cfi_undefined (sl);					\
 .L_GOT_OFF:							\
 	add	sl, pc, sl;					\
 	ldr	r0, .Lstr;					\
@@ -48,12 +49,17 @@
 #endif
 
 #define CHECK_SP(reg)				\
+	cfi_remember_state;			\
 	cmp	sp, reg;			\
 	bls	.Lok;				\
 	mov	r5, r0;				\
+	cfi_undefined (r5);			\
 	mov	r7, #SYS_ify(sigaltstack);	\
+	cfi_undefined (r7);			\
 	mov	r0, #0;				\
-	sub	sp, sp, #16;			\
+	sub	sp, sp, #16; /* >= sizeof (stack_t) */ \
+	cfi_adjust_cfa_offset (16);		\
+	cfi_remember_state;			\
 	mov	r1, sp;				\
 	swi	#0;				\
 	cmp	r0, #0;				\
@@ -69,8 +75,10 @@
 	bhi	.Lok2;				\
 .Lfail:						\
 	CALL_FAIL				\
+	cfi_restore_state;			\
 .Lok2:						\
 	mov	r0, r5;				\
+	cfi_restore_state;			\
 .Lok:
 
 #include <__longjmp.S>
--- sysdeps/unix/sysv/linux/arm/eabi/internal_recvmmsg.S
+++ sysdeps/unix/sysv/linux/arm/eabi/internal_recvmmsg.S
+/* Tag_ABI_align8_preserved: This code preserves 8-byte
+   alignment in any callee.  */
+	.eabi_attribute 25, 1
+/* Tag_ABI_align8_needed: This code may require 8-byte alignment from
+   the caller.  */
+	.eabi_attribute 24, 1
--- sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S
+++ sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S
+/* Copyright (C) 2010 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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <sysdep.h>
+
+/* Out-of-line syscall stub.  We expect the system call number in ip
+   and return the raw result in r0.  No registers are clobbered.
+   We could avoid using the stack for this, but the goal is accurate
+   unwind information - and while there is a reserved prefix in the
+   ARM unwind tables for register to register moves, the actual opcodes
+   are not defined.  */
+
+	.thumb
+	.syntax unified
+	.hidden __libc_do_syscall
+
+ENTRY (__libc_do_syscall)
+	.fnstart
+	push	{r7, lr}
+	.save	{r7, lr}
+	cfi_adjust_cfa_offset (8)
+	cfi_rel_offset (r7, 0)
+	cfi_rel_offset (lr, 4)
+	mov	r7, ip
+	swi	0x0
+	pop	{r7, pc}
+	.fnend
+END (__libc_do_syscall)
--- sysdeps/unix/sysv/linux/arm/eabi/mmap64.S
+++ sysdeps/unix/sysv/linux/arm/eabi/mmap64.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2003, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2003, 2005, 2009 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
@@ -34,8 +34,13 @@
 ENTRY (__mmap64)
 	ldr	ip, [sp, $LOW_OFFSET]
 	str	r5, [sp, #-4]!
+	cfi_adjust_cfa_offset (4)
+	cfi_rel_offset (r5, 0)
 	ldr	r5, [sp, $HIGH_OFFSET]
 	str	r4, [sp, #-4]!
+	cfi_adjust_cfa_offset (4)
+	cfi_rel_offset (r4, 0)
+	cfi_remember_state
 	movs	r4, ip, lsl $20		@ check that offset is page-aligned
 	mov	ip, ip, lsr $12
 	moveqs	r4, r5, lsr $12		@ check for overflow
@@ -45,11 +50,19 @@
 	DO_CALL (mmap2, 0)
 	cmn	r0, $4096
 	ldmfd	sp!, {r4, r5}
+	cfi_adjust_cfa_offset (-8)
+	cfi_restore (r4)
+	cfi_restore (r5)
 	RETINSTR(cc, lr)
 	b	PLTJMP(syscall_error)
+
+	cfi_restore_state
 .Linval:
 	mov	r0, $-EINVAL
 	ldmfd	sp!, {r4, r5}
+	cfi_adjust_cfa_offset (-8)
+	cfi_restore (r4)
+	cfi_restore (r5)
 	b	PLTJMP(syscall_error)
 PSEUDO_END (__mmap64)
 
--- sysdeps/unix/sysv/linux/arm/eabi/nptl/aio_misc.h
+++ sysdeps/unix/sysv/linux/arm/eabi/nptl/aio_misc.h
-/* Copyright (C) 2008 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, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#include_next <aio_misc.h>
-
-#ifdef __thumb2__
-
-#include <errno.h>
-
-/* The Thumb-2 definition of INTERNAL_SYSCALL_RAW has to hide the use
-   of r7 from the compiler because it cannot handle asm clobbering the
-   hard frame pointer.  In aio_suspend, GCC does not eliminate the
-   hard frame pointer because the function uses variable-length
-   arrays, so it generates unwind information using r7 as virtual
-   stack pointer.  During system calls, when r7 has been saved on the
-   stack, this means the unwind information is invalid.  Without extra
-   unwind directives, which would need to cause unwind information for
-   the asm to be generated separately from that for the parts of the
-   function before and after the asm (with three index table entries),
-   it is not possible to represent any temporary change to the virtual
-   stack pointer.  Instead, we move the problematic system calls out
-   of line into a function that does not require a frame pointer.  */
-
-static __attribute_noinline__ void
-aio_misc_wait (int *resultp,
-	       volatile int *futexp,
-	       const struct timespec *timeout,
-	       int cancel)
-{
-  AIO_MISC_WAIT (*resultp, *futexp, timeout, cancel);
-}
-
-#undef AIO_MISC_WAIT
-#define AIO_MISC_WAIT(result, futex, timeout, cancel)	\
-  aio_misc_wait (&result, &futex, timeout, cancel)
-
-#endif
--- sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h
+++ sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2005, 2009 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
@@ -36,17 +36,22 @@
   .type __##syscall_name##_nocancel,%function;				\
   .globl __##syscall_name##_nocancel;					\
   __##syscall_name##_nocancel:						\
+    .cfi_sections .debug_frame;						\
+    cfi_startproc;							\
     DO_CALL (syscall_name, args);					\
     PSEUDO_RET;								\
+    cfi_endproc;							\
   .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel;	\
   ENTRY (name);								\
     SINGLE_THREAD_P;							\
     DOARGS_##args;							\
     bne .Lpseudo_cancel;						\
+    cfi_remember_state;							\
     DO_CALL (syscall_name, 0);						\
     UNDOARGS_##args;							\
     cmn r0, $4096;							\
     PSEUDO_RET;								\
+    cfi_restore_state;							\
   .Lpseudo_cancel:							\
     .fnstart;								\
     DOCARGS_##args;	/* save syscall args etc. around CENABLE.  */	\
@@ -62,41 +67,127 @@
     mov r0, r7;		/* retrieve return value.  */			\
     RESTORE_LR_##args;							\
     UNDOARGS_##args;							\
-    cmn r0, $4096;
+    cmn r0, $4096
 
 /* DOARGS pushes four bytes on the stack for five arguments, eight bytes for
    six arguments, and nothing for fewer.  In order to preserve doubleword
    alignment, sometimes we must save an extra register.  */
 
-# define RESTART_UNWIND .fnend; .fnstart; .save {r7, lr}
-
-# define DOCARGS_0	stmfd sp!, {r7, lr}; .save {r7, lr}
+# define RESTART_UNWIND \
+  .fnend; \
+  .fnstart; \
+  .save {r7, lr}
+
+# define DOCARGS_0 \
+  stmfd sp!, {r7, lr}; \
+  cfi_adjust_cfa_offset (8); \
+  cfi_rel_offset (r7, 0); \
+  cfi_rel_offset (lr, 4); \
+  .save {r7, lr}
 # define UNDOCARGS_0
-# define RESTORE_LR_0	ldmfd sp!, {r7, lr};
-
-# define DOCARGS_1	stmfd sp!, {r0, r1, r7, lr}; .save {r7, lr}; .pad #8
-# define UNDOCARGS_1	ldr r0, [sp], #8; RESTART_UNWIND
-# define RESTORE_LR_1	RESTORE_LR_0
-
-# define DOCARGS_2	stmfd sp!, {r0, r1, r7, lr}; .save {r7, lr}; .pad #8
-# define UNDOCARGS_2	ldmfd sp!, {r0, r1}; RESTART_UNWIND
-# define RESTORE_LR_2	RESTORE_LR_0
-
-# define DOCARGS_3	stmfd sp!, {r0, r1, r2, r3, r7, lr}; .save {r7, lr}; .pad #16
-# define UNDOCARGS_3	ldmfd sp!, {r0, r1, r2, r3}; RESTART_UNWIND
-# define RESTORE_LR_3	RESTORE_LR_0
-
-# define DOCARGS_4	stmfd sp!, {r0, r1, r2, r3, r7, lr}; .save {r7, lr}; .pad #16
-# define UNDOCARGS_4	ldmfd sp!, {r0, r1, r2, r3}; RESTART_UNWIND
-# define RESTORE_LR_4	RESTORE_LR_0
-
-# define DOCARGS_5	.save {r4}; stmfd sp!, {r0, r1, r2, r3, r4, r7, lr}; .save {r7, \
                lr}; .pad #20
-# define UNDOCARGS_5	ldmfd sp!, {r0, r1, r2, r3}; .fnend; .fnstart; .save {r4}; \
                .save {r7, lr}; .pad #4
-# define RESTORE_LR_5	ldmfd sp!, {r4, r7, lr}
-
-# define DOCARGS_6	.save {r4, r5}; stmfd sp!, {r0, r1, r2, r3, r7, lr}; .save {r7, \
                lr}; .pad #16
-# define UNDOCARGS_6	ldmfd sp!, {r0, r1, r2, r3}; .fnend; .fnstart; .save {r4, r5}; \
                .save {r7, lr}
-# define RESTORE_LR_6	RESTORE_LR_0
+# define RESTORE_LR_0 \
+  ldmfd sp!, {r7, lr}; \
+  cfi_adjust_cfa_offset (-8); \
+  cfi_restore (r7); \
+  cfi_restore (lr)
+
+# define DOCARGS_1 \
+  stmfd sp!, {r0, r1, r7, lr}; \
+  cfi_adjust_cfa_offset (16); \
+  cfi_rel_offset (r7, 8); \
+  cfi_rel_offset (lr, 12); \
+  .save {r7, lr}; \
+  .pad #8
+# define UNDOCARGS_1 \
+  ldr r0, [sp], #8; \
+  cfi_adjust_cfa_offset (-8); \
+  RESTART_UNWIND
+# define RESTORE_LR_1 \
+  RESTORE_LR_0
+
+# define DOCARGS_2 \
+  stmfd sp!, {r0, r1, r7, lr}; \
+  cfi_adjust_cfa_offset (16); \
+  cfi_rel_offset (r7, 8); \
+  cfi_rel_offset (lr, 12); \
+  .save {r7, lr}; \
+  .pad #8
+# define UNDOCARGS_2 \
+  ldmfd sp!, {r0, r1}; \
+  cfi_adjust_cfa_offset (-8); \
+  RESTART_UNWIND
+# define RESTORE_LR_2 \
+  RESTORE_LR_0
+
+# define DOCARGS_3 \
+  stmfd sp!, {r0, r1, r2, r3, r7, lr}; \
+  cfi_adjust_cfa_offset (24); \
+  cfi_rel_offset (r7, 16); \
+  cfi_rel_offset (lr, 20); \
+  .save {r7, lr}; \
+  .pad #16
+# define UNDOCARGS_3 \
+  ldmfd sp!, {r0, r1, r2, r3}; \
+  cfi_adjust_cfa_offset (-16); \
+  RESTART_UNWIND
+# define RESTORE_LR_3 \
+  RESTORE_LR_0
+
+# define DOCARGS_4 \
+  stmfd sp!, {r0, r1, r2, r3, r7, lr}; \
+  cfi_adjust_cfa_offset (24); \
+  cfi_rel_offset (r7, 16); \
+  cfi_rel_offset (lr, 20); \
+  .save {r7, lr}; \
+  .pad #16
+# define UNDOCARGS_4 \
+  ldmfd sp!, {r0, r1, r2, r3}; \
+  cfi_adjust_cfa_offset (-16); \
+  RESTART_UNWIND
+# define RESTORE_LR_4 \
+  RESTORE_LR_0
+
+/* r4 is only stmfd'ed for correct stack alignment.  */
+# define DOCARGS_5 \
+  .save {r4}; \
+  stmfd sp!, {r0, r1, r2, r3, r4, r7, lr}; \
+  cfi_adjust_cfa_offset (28); \
+  cfi_rel_offset (r7, 20); \
+  cfi_rel_offset (lr, 24); \
+  .save {r7, lr}; \
+  .pad #20
+# define UNDOCARGS_5 \
+  ldmfd sp!, {r0, r1, r2, r3}; \
+  cfi_adjust_cfa_offset (-16); \
+  .fnend; \
+  .fnstart; \
+  .save {r4}; \
+  .save {r7, lr}; \
+  .pad #4
+# define RESTORE_LR_5 \
+  ldmfd sp!, {r4, r7, lr}; \
+  cfi_adjust_cfa_offset (-12); \
+  /* r4 will be marked as restored later.  */ \
+  cfi_restore (r7); \
+  cfi_restore (lr)
+
+# define DOCARGS_6 \
+  .save {r4, r5}; \
+  stmfd sp!, {r0, r1, r2, r3, r7, lr}; \
+  cfi_adjust_cfa_offset (24); \
+  cfi_rel_offset (r7, 16); \
+  cfi_rel_offset (lr, 20); \
+  .save {r7, lr}; \
+  .pad #16
+# define UNDOCARGS_6 \
+  ldmfd sp!, {r0, r1, r2, r3}; \
+  cfi_adjust_cfa_offset (-16); \
+  .fnend; \
+  .fnstart; \
+  .save {r4, r5}; \
+  .save {r7, lr}
+# define RESTORE_LR_6 \
+  RESTORE_LR_0
 
 # ifdef IS_IN_libpthread
 #  define CENABLE	bl PLTJMP(__pthread_enable_asynccancel)
@@ -136,9 +227,13 @@
 #   define PSEUDO_PROLOGUE
 #   define SINGLE_THREAD_P						\
   stmfd	sp!, {r0, lr};							\
+  cfi_adjust_cfa_offset (8);						\
+  cfi_rel_offset (lr, 4);						\
   bl	__aeabi_read_tp;						\
   ldr	ip, [r0, #MULTIPLE_THREADS_OFFSET];				\
   ldmfd	sp!, {r0, lr};							\
+  cfi_adjust_cfa_offset (-8);						\
+  cfi_restore (lr);							\
   teq	ip, #0
 #   define SINGLE_THREAD_P_PIC(x) SINGLE_THREAD_P
 #  endif
--- sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
+++ sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2005, 2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek <jakub@redhat.com>.
 
@@ -89,7 +89,15 @@
 "	.globl	_Unwind_Resume\n"
 "	.type	_Unwind_Resume, %function\n"
 "_Unwind_Resume:\n"
+"	.cfi_sections .debug_frame\n"
+"	" CFI_STARTPROC "\n"
 "	stmfd	sp!, {r4, r5, r6, lr}\n"
+"	" CFI_ADJUST_CFA_OFFSET (16)" \n"
+"	" CFI_REL_OFFSET (r4, 0) "\n"
+"	" CFI_REL_OFFSET (r5, 4) "\n"
+"	" CFI_REL_OFFSET (r6, 8) "\n"
+"	" CFI_REL_OFFSET (lr, 12) "\n"
+"	" CFI_REMEMBER_STATE "\n"
 "	ldr	r4, 1f\n"
 "	ldr	r5, 2f\n"
 "3:	add	r4, pc, r4\n"
@@ -99,10 +107,17 @@
 "	beq	4f\n"
 "5:	mov	r0, r6\n"
 "	ldmfd	sp!, {r4, r5, r6, lr}\n"
+"	" CFI_ADJUST_CFA_OFFSET (-16) "\n"
+"	" CFI_RESTORE (r4) "\n"
+"	" CFI_RESTORE (r5) "\n"
+"	" CFI_RESTORE (r6) "\n"
+"	" CFI_RESTORE (lr) "\n"
 "	bx	r3\n"
+"	" CFI_RESTORE_STATE "\n"
 "4:	bl	pthread_cancel_init\n"
 "	ldr	r3, [r4, r5]\n"
 "	b	5b\n"
+"	" CFI_ENDPROC "\n"
 "	.align 2\n"
 #ifdef __thumb2__
 "1:	.word	_GLOBAL_OFFSET_TABLE_ - 3b - 4\n"
--- sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c
+++ sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2005, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek <jakub@redhat.com>.
 
@@ -52,7 +52,15 @@
 "	.globl	_Unwind_Resume\n"
 "	.type	_Unwind_Resume, %function\n"
 "_Unwind_Resume:\n"
+"	.cfi_sections .debug_frame\n"
+"	" CFI_STARTPROC "\n"
 "	stmfd	sp!, {r4, r5, r6, lr}\n"
+"	" CFI_ADJUST_CFA_OFFSET (16)" \n"
+"	" CFI_REL_OFFSET (r4, 0) "\n"
+"	" CFI_REL_OFFSET (r5, 4) "\n"
+"	" CFI_REL_OFFSET (r6, 8) "\n"
+"	" CFI_REL_OFFSET (lr, 12) "\n"
+"	" CFI_REMEMBER_STATE "\n"
 "	ldr	r4, 1f\n"
 "	ldr	r5, 2f\n"
 "3:	add	r4, pc, r4\n"
@@ -62,10 +70,17 @@
 "	beq	4f\n"
 "5:	mov	r0, r6\n"
 "	ldmfd	sp!, {r4, r5, r6, lr}\n"
+"	" CFI_ADJUST_CFA_OFFSET (-16) "\n"
+"	" CFI_RESTORE (r4) "\n"
+"	" CFI_RESTORE (r5) "\n"
+"	" CFI_RESTORE (r6) "\n"
+"	" CFI_RESTORE (lr) "\n"
 "	bx	r3\n"
+"	" CFI_RESTORE_STATE "\n"
 "4:	bl	init\n"
 "	ldr	r3, [r4, r5]\n"
 "	b	5b\n"
+"	" CFI_ENDPROC "\n"
 "	.align 2\n"
 #ifdef __thumb2__
 "1:	.word	_GLOBAL_OFFSET_TABLE_ - 3b - 4\n"
--- sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
+++ sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2005, 2009, 2010 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
@@ -34,46 +34,89 @@
    Because the signal frame layout changed in 2.6.18, we provide two
    copies of these functions with different unwind information.  */
 
+/* Used in ENTRY.  */
+#undef cfi_startproc
+#define cfi_startproc \
+	.cfi_startproc simple; \
+	.cfi_signal_frame
+
+/* The CFA is not computed / used correctly here; this is neither trivial to
+   do, nor is it needed.  */
+#define CFI \
+	cfi_def_cfa (sp, 0); \
+	cfi_offset (r0, OFFSET + 0 * 4); \
+	cfi_offset (r1, OFFSET + 1 * 4); \
+	cfi_offset (r2, OFFSET + 2 * 4); \
+	cfi_offset (r3, OFFSET + 3 * 4); \
+	cfi_offset (r4, OFFSET + 4 * 4); \
+	cfi_offset (r5, OFFSET + 5 * 4); \
+	cfi_offset (r6, OFFSET + 6 * 4); \
+	cfi_offset (r7, OFFSET + 7 * 4); \
+	cfi_offset (r8, OFFSET + 8 * 4); \
+	cfi_offset (r9, OFFSET + 9 * 4); \
+	cfi_offset (r10, OFFSET + 10 * 4); \
+	cfi_offset (r11, OFFSET + 11 * 4); \
+	cfi_offset (r12, OFFSET + 12 * 4); \
+	cfi_offset (r13, OFFSET + 13 * 4); \
+	cfi_offset (r14, OFFSET + 14 * 4); \
+	cfi_offset (r15, OFFSET + 15 * 4)
+
 #ifndef __ASSUME_SIGFRAME_V2
+#define OFFSET 12
 	.fnstart
 	.save {r0-r15}
-	.pad #12
+	.pad #OFFSET
 	nop
 ENTRY(__default_sa_restorer_v1)
+	CFI
 	mov	r7, $SYS_ify(sigreturn)
 	swi	0x0
 	.fnend
-#endif
+END(__default_sa_restorer_v1)
+#undef OFFSET
+#endif /* __ASSUME_SIGFRAME_V2 */
 
+#define OFFSET 32
 	.fnstart
 	.save {r0-r15}
-	.pad #32
+	.pad #OFFSET
 	nop
 ENTRY(__default_sa_restorer_v2)
+	CFI
 	mov	r7, $SYS_ify(sigreturn)
 	swi	0x0
 	.fnend
+END(__default_sa_restorer_v2)
+#undef OFFSET
 
 #ifdef __NR_rt_sigreturn
 
 #ifndef __ASSUME_SIGFRAME_V2
+#define OFFSET 168
 	.fnstart
 	.save {r0-r15}
-	.pad #168
+	.pad #OFFSET
 	nop
 ENTRY(__default_rt_sa_restorer_v1)
+	CFI
 	mov	r7, $SYS_ify(rt_sigreturn)
 	swi	0x0
 	.fnend
-#endif
+END(__default_rt_sa_restorer_v1)
+#undef OFFSET
+#endif /* __ASSUME_SIGFRAME_V2 */
 
+#define OFFSET 160
 	.fnstart
 	.save {r0-r15}
-	.pad #160
+	.pad #OFFSET
 	nop
 ENTRY(__default_rt_sa_restorer_v2)
+	CFI
 	mov	r7, $SYS_ify(rt_sigreturn)
 	swi	0x0
 	.fnend
+END(__default_rt_sa_restorer_v2)
+#undef OFFSET
 
-#endif
+#endif /* __NR_rt_sigreturn */
--- sysdeps/unix/sysv/linux/arm/eabi/syscall.S
+++ sysdeps/unix/sysv/linux/arm/eabi/syscall.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2009 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
@@ -25,6 +25,11 @@
 ENTRY (syscall)
 	mov	ip, sp
 	stmfd	sp!, {r4, r5, r6, r7}
+	cfi_adjust_cfa_offset (16)
+	cfi_rel_offset (r4, 0)
+	cfi_rel_offset (r5, 4)
+	cfi_rel_offset (r6, 8)
+	cfi_rel_offset (r7, 12)
 	mov	r7, r0
 	mov	r0, r1
 	mov	r1, r2
@@ -32,6 +37,11 @@
 	ldmfd	ip, {r3, r4, r5, r6}
 	swi	0x0
 	ldmfd	sp!, {r4, r5, r6, r7}
+	cfi_adjust_cfa_offset (-16)
+	cfi_restore (r4)
+	cfi_restore (r5)
+	cfi_restore (r6)
+	cfi_restore (r7)
 	cmn	r0, #4096
 	RETINSTR(cc, lr)
 	b	PLTJMP(syscall_error)
--- sysdeps/unix/sysv/linux/arm/eabi/sysdep.h
+++ sysdeps/unix/sysv/linux/arm/eabi/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006, 2007
+/* Copyright (C) 2005, 2006, 2007, 2009
    Free Software Foundation, Inc.
 
    This file is part of the GNU C Library.
@@ -44,29 +44,34 @@
    argument; otherwise the (optional) compatibility code for APCS binaries
    may be invoked.  */
 
-#ifdef __thumb__
-/* Hide the use of r7 from the compiler, this would be a lot
-   easier but for the fact that the syscalls can exceed 255.
-   For the moment the LOAD_ARGS_7 is sacrificed.
+#if defined(__thumb__)
+/* We can not expose the use of r7 to the compiler.  GCC (as
+   of 4.5) uses r7 as the hard frame pointer for Thumb - although
+   for Thumb-2 it isn't obviously a better choice than r11.
+   And GCC does not support asms that conflict with the frame
+   pointer.
+
+   This would be easier if syscall numbers never exceeded 255,
+   but they do.  For the moment the LOAD_ARGS_7 is sacrificed.
    We can't use push/pop inside the asm because that breaks
-   unwinding (ie. thread cancellation).  */
+   unwinding (i.e. thread cancellation) for this frame.  We can't
+   locally save and restore r7, because we do not know if this
+   function uses r7 or if it is our caller's r7; if it is our caller's,
+   then unwinding will fail higher up the stack.  So we move the
+   syscall out of line and provide its own unwind information.  */
 #undef LOAD_ARGS_7
 #undef INTERNAL_SYSCALL_RAW
 #define INTERNAL_SYSCALL_RAW(name, err, nr, args...)		\
   ({								\
-      int _sys_buf[2];						\
       register int _a1 asm ("a1");				\
-      register int *_r6 asm ("r6") = _sys_buf;			\
-      *_r6 = name;						\
+      int _nametmp = name;					\
       LOAD_ARGS_##nr (args)					\
-      asm volatile ("str        r7, [r6, #4]\n\t"		\
-                    "ldr      r7, [r6]\n\t"			\
-                    "swi      0       @ syscall " #name "\n\t"	\
-                    "ldr      r7, [r6, #4]"			\
-                   : "=r" (_a1)					\
-                    : "r" (_r6) ASM_ARGS_##nr			\
-                    : "memory");				\
-       _a1; })
+      register int _name asm ("ip") = _nametmp;			\
+      asm volatile ("bl      __libc_do_syscall"			\
+                    : "=r" (_a1)				\
+                    : "r" (_name) ASM_ARGS_##nr			\
+                    : "memory", "lr");				\
+      _a1; })
 #else /* ARM */
 #undef INTERNAL_SYSCALL_RAW
 #define INTERNAL_SYSCALL_RAW(name, err, nr, args...)		\
@@ -100,11 +105,13 @@
 
 #undef	DO_CALL
 #define DO_CALL(syscall_name, args)		\
-    DOARGS_##args				\
+    DOARGS_##args;				\
     mov ip, r7;					\
+    cfi_register (r7, ip);			\
     ldr r7, =SYS_ify (syscall_name);		\
     swi 0x0;					\
     mov r7, ip;					\
+    cfi_restore (r7);				\
     UNDOARGS_##args
 
 #endif /* _LINUX_ARM_EABI_SYSDEP_H */
--- sysdeps/unix/sysv/linux/arm/kernel-features.h
+++ sysdeps/unix/sysv/linux/arm/kernel-features.h
@@ -59,6 +59,8 @@
 
 #include_next <kernel-features.h>
 
-/* These syscalls are not implemented yet for ARM.  */
-#undef __ASSUME_PSELECT
-#undef __ASSUME_PPOLL
+/* Support for pselect6, ppoll and epoll_pwait was added in 2.6.32.  */
+#if __LINUX_KERNEL_VERSION < 0x020620
+# undef __ASSUME_PSELECT
+# undef __ASSUME_PPOLL
+#endif
--- sysdeps/unix/sysv/linux/arm/ldsodefs.h
+++ sysdeps/unix/sysv/linux/arm/ldsodefs.h
+/* Run-time dynamic linker data structures for loaded ELF shared objects.
+   Copyright (C) 2010 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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#ifndef _ARM_LINUX_LDSODEFS_H
+#define _ARM_LINUX_LDSODEFS_H 1
+
+#include_next <ldsodefs.h>
+
+#undef VALID_ELF_HEADER
+#undef VALID_ELF_OSABI
+
+#ifdef __ARM_EABI__
+#define EXTRA_OSABI ELFOSABI_ARM_AEABI
+#else
+#define EXTRA_OSABI ELFOSABI_ARM
+#endif
+
+#define VALID_ELF_HEADER(hdr,exp,size)		\
+  (memcmp (hdr, exp, size) == 0			\
+   || memcmp (hdr, expected2, size) == 0	\
+   || memcmp (hdr, expected3, size) == 0)
+#define VALID_ELF_OSABI(osabi)		(osabi == ELFOSABI_SYSV		\
+					 || osabi == EXTRA_OSABI	\
+					 || osabi == ELFOSABI_LINUX)
+#define MORE_ELF_HEADER_DATA				\
+  static const unsigned char expected2[EI_PAD] =	\
+  {							\
+    [EI_MAG0] = ELFMAG0,				\
+    [EI_MAG1] = ELFMAG1,				\
+    [EI_MAG2] = ELFMAG2,				\
+    [EI_MAG3] = ELFMAG3,				\
+    [EI_CLASS] = ELFW(CLASS),				\
+    [EI_DATA] = byteorder,				\
+    [EI_VERSION] = EV_CURRENT,				\
+    [EI_OSABI] = ELFOSABI_LINUX				\
+  };							\
+  static const unsigned char expected3[EI_PAD] =	\
+  {							\
+    [EI_MAG0] = ELFMAG0,				\
+    [EI_MAG1] = ELFMAG1,				\
+    [EI_MAG2] = ELFMAG2,				\
+    [EI_MAG3] = ELFMAG3,				\
+    [EI_CLASS] = ELFW(CLASS),				\
+    [EI_DATA] = byteorder,				\
+    [EI_VERSION] = EV_CURRENT,				\
+    [EI_OSABI] = EXTRA_OSABI				\
+  }
+
+#endif
--- sysdeps/unix/sysv/linux/arm/mmap.S
+++ sysdeps/unix/sysv/linux/arm/mmap.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000, 2003, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000, 2003, 2005, 2009 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
@@ -33,8 +33,13 @@
 
 	/* shuffle args */
 	str	r5, [sp, #-4]!
+	cfi_adjust_cfa_offset (4)
+	cfi_rel_offset (r5, 0)
 	ldr	r5, [sp, #8]
 	str	r4, [sp, #-4]!
+	cfi_adjust_cfa_offset (4)
+	cfi_rel_offset (r4, 0)
+	cfi_remember_state
 	ldr	r4, [sp, #8]
 
 	/* convert offset to pages */
@@ -48,12 +53,17 @@
 	/* restore registers */
 2:
 	ldr	r4, [sp], #4
+	cfi_adjust_cfa_offset (-4)
+	cfi_restore (r4)
 	ldr	r5, [sp], #4
+	cfi_adjust_cfa_offset (-4)
+	cfi_restore (r5)
 
 	cmn	r0, $4096
 	RETINSTR(cc, lr)
 	b	PLTJMP(syscall_error)
 
+	cfi_restore_state
 .Linval:
 	mov	r0, #-EINVAL
 	b	2b
@@ -74,6 +84,7 @@
 
 	/* store args on the stack */
 	stmdb	sp!, {a1-a4}
+	cfi_adjust_cfa_offset (16)
 
 	/* do the syscall */
 	mov	a1, sp
@@ -81,6 +92,7 @@
 
 	/* pop args off the stack. */
 	add	sp, sp, #16
+	cfi_adjust_cfa_offset (-16)
 
 	cmn	r0, $4096
 	RETINSTR(cc, lr)
--- sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h
+++ sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h
@@ -37,7 +37,12 @@
 
 void __arm_link_error (void);
 
-#ifdef __thumb2__
+/* Use the atomic builtins provided by GCC in case the backend provides
+   a pattern to do this efficiently.  */
+
+#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
+#define atomic_full_barrier() __sync_synchronize ()
+#elif defined __thumb2__
 #define atomic_full_barrier() \
      __asm__ __volatile__						      \
 	     ("movw\tip, #0x0fa0\n\t"					      \
@@ -64,11 +69,15 @@
 #define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \
   ({ __arm_link_error (); oldval; })
 
+#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
+#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
+  __sync_val_compare_and_swap ((mem), (oldval), (newval))
+
 /* It doesn't matter what register is used for a_oldval2, but we must
    specify one to work around GCC PR rtl-optimization/21223.  Otherwise
    it may cause a_oldval or a_tmp to be moved to a different register.  */
 
-#ifdef __thumb2__
+#elif defined __thumb2__
 /* Thumb-2 has ldrex/strex.  However it does not have barrier instructions,
    so we still need to use the kernel helper.  */
 #define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
--- sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S
+++ sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2010 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
@@ -21,10 +21,14 @@
 /* Save the PID value.  */
 #define SAVE_PID \
 	str	lr, [sp, #-4]!;		/* Save LR.  */			\
+	cfi_adjust_cfa_offset (4);					\
+	cfi_rel_offset (lr, 0);						\
 	mov	r0, #0xffff0fff;	/* Point to the high page.  */	\
 	mov	lr, pc;			/* Save our return address.  */	\
 	sub	pc, r0, #31;		/* Jump to the TLS entry.  */	\
 	ldr	lr, [sp], #4;		/* Restore LR.  */		\
+	cfi_adjust_cfa_offset (-4);					\
+	cfi_restore (lr);						\
 	mov	r2, r0;			/* Save the TLS addr in r2.  */	\
 	ldr	r3, [r2, #PID_OFFSET];	/* Load the saved PID.  */	\
 	rsb	r0, r3, #0;		/* Negate it.  */		\
--- sysdeps/unix/sysv/linux/arm/nptl/vfork.S
+++ sysdeps/unix/sysv/linux/arm/nptl/vfork.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2010 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
@@ -21,10 +21,14 @@
 /* Save the PID value.  */
 #define SAVE_PID \
 	str	lr, [sp, #-4]!;		/* Save LR.  */			\
+	cfi_adjust_cfa_offset (4);					\
+	cfi_rel_offset (lr, 0);						\
 	mov	r0, #0xffff0fff;	/* Point to the high page.  */	\
 	mov	lr, pc;			/* Save our return address.  */	\
 	sub	pc, r0, #31;		/* Jump to the TLS entry.  */	\
 	ldr	lr, [sp], #4;		/* Restore LR.  */		\
+	cfi_adjust_cfa_offset (-4);					\
+	cfi_restore (lr);						\
 	mov	r2, r0;			/* Save the TLS addr in r2.  */	\
 	ldr	r3, [r2, #PID_OFFSET];	/* Load the saved PID.  */	\
 	rsbs	r0, r3, #0;		/* Negate it.  */		\
--- sysdeps/unix/sysv/linux/arm/syscalls.list
+++ sysdeps/unix/sysv/linux/arm/syscalls.list
@@ -3,3 +3,7 @@
 syscall		-	syscall		7	syscall
 oldgetrlimit	EXTRA	getrlimit	i:ip	__old_getrlimit	getrlimit@GLIBC_2.0
 oldsetrlimit	EXTRA	setrlimit	i:ip	__old_setrlimit	setrlimit@GLIBC_2.0
+
+prlimit64	EXTRA	prlimit64	i:iipp	prlimit64
+
+fanotify_mark	EXTRA	fanotify_mark	i:iiiiis	fanotify_mark
--- sysdeps/unix/sysv/linux/arm/sysdep.h
+++ sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -55,6 +55,11 @@
 #define HWCAP_ARM_EDSP		128
 #define HWCAP_ARM_JAVA		256
 #define HWCAP_ARM_IWMMXT	512
+#define HWCAP_ARM_CRUNCH	1024
+#define HWCAP_ARM_THUMBEE	2048
+#define HWCAP_ARM_NEON		4096
+#define HWCAP_ARM_VFPv3		8192
+#define HWCAP_ARM_VFPv3D16	16384
 
 #ifdef __ASSEMBLER__
 
@@ -84,7 +89,7 @@
 
 #undef	PSEUDO_END
 #define	PSEUDO_END(name)						      \
-  SYSCALL_ERROR_HANDLER							      \
+  SYSCALL_ERROR_HANDLER;						      \
   END (name)
 
 #undef	PSEUDO_NOERRNO
@@ -129,17 +134,26 @@
        DO_RET(lr);						\
 1:     .word C_SYMBOL_NAME(rtld_errno) - 0b - 8;
 # else
-#if defined(__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__)
-#define POP_PC  ldr     lr, [sp], #4; bx lr
-#else
-#define POP_PC  ldr     pc, [sp], #4
-#endif
+#  if defined(__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__)
+#   define POP_PC \
+  ldr lr, [sp], #4; \
+  cfi_adjust_cfa_offset (-4); \
+  cfi_restore (lr); \
+  bx lr
+#  else
+#   define POP_PC  \
+  ldr pc, [sp], #4
+#  endif
 #  define SYSCALL_ERROR_HANDLER					\
 __local_syscall_error:						\
 	str	lr, [sp, #-4]!;					\
+	cfi_adjust_cfa_offset (4);				\
+	cfi_rel_offset (lr, 0);					\
 	str	r0, [sp, #-4]!;					\
+	cfi_adjust_cfa_offset (4);				\
 	bl	PLTJMP(C_SYMBOL_NAME(__errno_location)); 	\
 	ldr	r1, [sp], #4;					\
+	cfi_adjust_cfa_offset (-4);				\
 	rsb	r1, r1, #0;					\
 	str	r1, [r0];					\
 	mvn	r0, #0;						\
@@ -179,7 +193,7 @@
 
 #undef	DO_CALL
 #define DO_CALL(syscall_name, args)		\
-    DOARGS_##args				\
+    DOARGS_##args;				\
     swi SYS_ify (syscall_name); 		\
     UNDOARGS_##args
 
@@ -188,18 +202,47 @@
 #define DOARGS_2 /* nothing */
 #define DOARGS_3 /* nothing */
 #define DOARGS_4 /* nothing */
-#define DOARGS_5 str r4, [sp, $-4]!; ldr r4, [sp, $4];
-#define DOARGS_6 mov ip, sp; stmfd sp!, {r4, r5}; ldmia ip, {r4, r5};
-#define DOARGS_7 mov ip, sp; stmfd sp!, {r4, r5, r6}; ldmia ip, {r4, r5, r6};
+#define DOARGS_5 \
+  str r4, [sp, $-4]!; \
+  cfi_adjust_cfa_offset (4); \
+  cfi_rel_offset (r4, 0); \
+  ldr r4, [sp, $4]
+#define DOARGS_6 \
+  mov ip, sp; \
+  stmfd sp!, {r4, r5}; \
+  cfi_adjust_cfa_offset (8); \
+  cfi_rel_offset (r4, 0); \
+  cfi_rel_offset (r5, 4); \
+  ldmia ip, {r4, r5}
+#define DOARGS_7 \
+  mov ip, sp; \
+  stmfd sp!, {r4, r5, r6}; \
+  cfi_adjust_cfa_offset (12); \
+  cfi_rel_offset (r4, 0); \
+  cfi_rel_offset (r5, 4); \
+  cfi_rel_offset (r6, 8); \
+  ldmia ip, {r4, r5, r6}
 
 #define UNDOARGS_0 /* nothing */
 #define UNDOARGS_1 /* nothing */
 #define UNDOARGS_2 /* nothing */
 #define UNDOARGS_3 /* nothing */
 #define UNDOARGS_4 /* nothing */
-#define UNDOARGS_5 ldr r4, [sp], $4;
-#define UNDOARGS_6 ldmfd sp!, {r4, r5};
-#define UNDOARGS_7 ldmfd sp!, {r4, r5, r6};
+#define UNDOARGS_5 \
+  ldr r4, [sp], $4; \
+  cfi_adjust_cfa_offset (-4); \
+  cfi_restore (r4)
+#define UNDOARGS_6 \
+  ldmfd sp!, {r4, r5}; \
+  cfi_adjust_cfa_offset (-8); \
+  cfi_restore (r4); \
+  cfi_restore (r5)
+#define UNDOARGS_7 \
+  ldmfd sp!, {r4, r5, r6}; \
+  cfi_adjust_cfa_offset (-12); \
+  cfi_restore (r4); \
+  cfi_restore (r5); \
+  cfi_restore (r6)
 
 #else /* not __ASSEMBLER__ */
 
--- sysdeps/unix/sysv/linux/hppa/Versions
+++ sysdeps/unix/sysv/linux/hppa/Versions
@@ -23,6 +23,10 @@
   GLIBC_2.11 {
     fallocate64;
   }
+  GLIBC_2.12 {
+    #errlist-compat	257
+    _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
+  }
 }
 librt {
   GLIBC_2.3 {
--- sysdeps/unix/sysv/linux/hppa/bits/atomic.h
+++ sysdeps/unix/sysv/linux/hppa/bits/atomic.h
@@ -98,7 +98,7 @@
      int ret;								\
      ret = atomic_compare_and_exchange_val_acq(mem, newval, oldval);	\
      /* Return 1 if it was already acquired.  */			\
-     (ret != oldval);							\
+     (ret != (int)oldval);						\
    })
 #else
 # error __ASSUME_LWS_CAS is required to build glibc.
--- sysdeps/unix/sysv/linux/hppa/bits/errno.h
+++ sysdeps/unix/sysv/linux/hppa/bits/errno.h
@@ -30,6 +30,18 @@
 #  define ECANCELED	ECANCELLED
 # endif
 
+# ifndef EOWNERDEAD
+#  define EOWNERDEAD		254
+# endif
+
+# ifndef ENOTRECOVERABLE 
+#  define ENOTRECOVERABLE	255
+# endif
+
+# ifndef ERFKILL
+#  define ERFKILL		256 
+# endif
+
 # ifndef __ASSEMBLER__
 /* Function to get address of global `errno' variable.  */
 extern int *__errno_location (void) __THROW __attribute__ ((__const__));
--- sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
+++ sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
@@ -1,6 +1,6 @@
 /* O_*, F_*, FD_* bit values for Linux/HPPA.
    Copyright (C) 1995,1996,1997,1998,1999,2000,2002,2004
-	Free Software Foundation, Inc.
+   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
@@ -18,7 +18,7 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#ifndef _FCNTL_H
+#ifndef	_FCNTL_H
 # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
 #endif
 
@@ -27,23 +27,24 @@
 # include <bits/uio.h>
 #endif
 
+
 /* open/fcntl - O_SYNC is only implemented on blocks devices and on files
    located on an ext2 file system */
-#define O_RDONLY	00000000
-#define O_WRONLY	00000001
-#define O_RDWR		00000002
-#define O_ACCMODE	00000003
-#define O_APPEND	00000010
-#define O_BLKSEEK	00000100 /* HPUX only */
+#define O_ACCMODE	   0003
+#define O_RDONLY	     00
+#define O_WRONLY	     01
+#define O_RDWR		     02
 #define O_CREAT		00000400 /* not fcntl */
-#define O_TRUNC		00001000 /* not fcntl */
 #define O_EXCL		00002000 /* not fcntl */
-#define O_ASYNC		00020000
-#define O_SYNC		00100000
+#define O_NOCTTY	00400000 /* not fcntl */
+#define O_TRUNC		00001000 /* not fcntl */
+#define O_APPEND	00000010
 #define O_NONBLOCK	00200004 /* HPUX has separate NDELAY & NONBLOCK */
 #define O_NDELAY	O_NONBLOCK
-#define O_NOCTTY	00400000 /* not fcntl */
-
+#define O_SYNC		00100000
+#define O_FSYNC		 O_SYNC
+#define O_ASYNC		 020000
+#define O_BLKSEEK	00000100 /* HPUX only */
 
 #ifdef __USE_GNU
 # define O_DIRECT	000040000 /* Direct disk access.  */
@@ -53,15 +54,18 @@
 # define O_CLOEXEC	010000000 /* Set close_on_exec.  */
 #endif
 
-#ifdef __USE_LARGEFILE64
-# define O_LARGEFILE	00004000
-#endif
-
+/* For now Linux has synchronisity options for data and read operations.
+   We define the symbols here but let them do the same as O_SYNC since
+   this is a superset.	*/
 #if defined __USE_POSIX199309 || defined __USE_UNIX98
 # define O_DSYNC		01000000 /* HPUX only */
 # define O_RSYNC		02000000 /* HPUX only */
 #endif
 
+#ifdef __USE_LARGEFILE64
+# define O_LARGEFILE	00004000
+#endif
+
 /* Values for the second argument to `fcntl'.  */
 #define F_DUPFD		0	/* Duplicate file descriptor.  */
 #define F_GETFD		1	/* Get file descriptor flags.  */
@@ -70,11 +74,11 @@
 #define F_SETFL		4	/* Set file status flags.  */
 #ifndef __USE_FILE_OFFSET64
 # define F_GETLK	5	/* Get record locking info.  */
-# define F_SETLK	6    	/* Set record locking info (non-blocking).  */
-# define F_SETLKW	7	/* Set record locking info (blocking).  */
+# define F_SETLK	6	/* Set record locking info (non-blocking).  */
+# define F_SETLKW	7	/* Set record locking info (blocking).	*/
 #else
-# define F_GETLK	F_GETLK64 /* Get record locking info.  */
-# define F_SETLK	F_SETLK64 /* Set record locking info (non-blocking). */
+# define F_GETLK	F_GETLK64  /* Get record locking info.	*/
+# define F_SETLK	F_SETLK64  /* Set record locking info (non-blocking).*/
 # define F_SETLKW	F_SETLKW64 /* Set record locking info (blocking).  */
 #endif
 #define F_GETLK64	8	/* Get record locking info.  */
@@ -89,19 +93,19 @@
 #ifdef __USE_GNU
 # define F_SETSIG	13	/* Set number of signal to be sent.  */
 # define F_GETSIG	14	/* Get number of signal to be sent.  */
-# define F_GETOWN_EX	15
-# define F_SETOWN_EX	16
+# define F_SETOWN_EX	15	/* Get owner (thread receiving SIGIO).  */
+# define F_GETOWN_EX	16	/* Set owner (thread receiving SIGIO).  */
 #endif
 
 #ifdef __USE_GNU
-# define F_SETLEASE     1024    /* Set a lease.  */
-# define F_GETLEASE     1025    /* Enquire what lease is active.  */
-# define F_NOTIFY       1026    /* Request notfications on a directory.  */
+# define F_SETLEASE	1024	/* Set a lease.	 */
+# define F_GETLEASE	1025	/* Enquire what lease is active.  */
+# define F_NOTIFY	1026	/* Request notfications on a directory.	 */
 # define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
 				   close-on-exit set.  */
 #endif
 
-/* for F_[GET|SET]FL */
+/* For F_[GET|SET]FD.  */
 #define FD_CLOEXEC	1	/* actually anything with low bit set goes */
 
 /* For posix fcntl() and `l_type' field of a `struct flock' for lockf().  */
@@ -109,12 +113,12 @@
 #define F_WRLCK		2	/* Write lock.  */
 #define F_UNLCK		3	/* Remove lock.  */
 
-/* for old implementation of bsd flock () */
+/* For old implementation of bsd flock().  */
 #define F_EXLCK		4	/* or 3 */
 #define F_SHLCK		8	/* or 4 */
 
 #ifdef __USE_BSD
-/* operations for bsd flock(), also used by the kernel implementation */
+/* Operations for bsd flock(), also used by the kernel implementation.	*/
 # define LOCK_SH	1	/* shared lock */
 # define LOCK_EX	2	/* exclusive lock */
 # define LOCK_NB	4	/* or'd with one of the above to prevent
@@ -123,19 +127,26 @@
 #endif
 
 #ifdef __USE_GNU
+# define LOCK_MAND	32	/* This is a mandatory flock:	*/
+# define LOCK_READ	64	/* ... which allows concurrent read operations.	 */
+# define LOCK_WRITE	128	/* ... which allows concurrent write operations.  */
+# define LOCK_RW	192	/* ... Which allows concurrent read & write operations.	 */
+#endif
+
+#ifdef __USE_GNU
 /* Types of directory notifications that may be requested with F_NOTIFY.  */
-# define DN_ACCESS      0x00000001      /* File accessed.  */
-# define DN_MODIFY      0x00000002      /* File modified.  */
-# define DN_CREATE      0x00000004      /* File created.  */
-# define DN_DELETE      0x00000008      /* File removed.  */
-# define DN_RENAME      0x00000010      /* File renamed.  */
-# define DN_ATTRIB      0x00000020      /* File changed attibutes.  */
-# define DN_MULTISHOT   0x80000000      /* Don't remove notifier.  */
+# define DN_ACCESS	0x00000001	/* File accessed.  */
+# define DN_MODIFY	0x00000002	/* File modified.  */
+# define DN_CREATE	0x00000004	/* File created.  */
+# define DN_DELETE	0x00000008	/* File removed.  */
+# define DN_RENAME	0x00000010	/* File renamed.  */
+# define DN_ATTRIB	0x00000020	/* File changed attibutes.  */
+# define DN_MULTISHOT	0x80000000	/* Don't remove notifier.  */
 #endif
 
 struct flock
   {
-    short int l_type;	/* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK.  */
+    short int l_type;	/* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK.	*/
     short int l_whence;	/* Where `l_start' is relative to (like `lseek').  */
 #ifndef __USE_FILE_OFFSET64
     __off_t l_start;	/* Offset where the lock begins.  */
@@ -150,7 +161,7 @@
 #ifdef __USE_LARGEFILE64
 struct flock64
   {
-    short int l_type;	/* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK.  */
+    short int l_type;	/* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK.	*/
     short int l_whence;	/* Where `l_start' is relative to (like `lseek').  */
     __off64_t l_start;	/* Offset where the lock begins.  */
     __off64_t l_len;	/* Size of the locked area; zero means until EOF.  */
@@ -158,6 +169,24 @@
   };
 #endif
 
+#ifdef __USE_GNU
+/* Owner types.  */
+enum __pid_type
+  {
+    F_OWNER_TID = 0,		/* Kernel thread.  */
+    F_OWNER_PID,		/* Process.  */
+    F_OWNER_PGRP,		/* Process group.  */
+    F_OWNER_GID = F_OWNER_PGRP	/* Alternative, obsolete name.  */
+  };
+
+/* Structure to use with F_GETOWN_EX and F_SETOWN_EX.  */
+struct f_owner_ex
+  {
+    enum __pid_type type;	/* Owner type of ID.  */
+    __pid_t pid;		/* ID of owner.  */
+  };
+#endif
+
 /* Define some more compatibility macros to be backward compatible with
    BSD systems which did not managed to hide these kernel macros.  */
 #ifdef	__USE_BSD
@@ -172,13 +201,15 @@
 #ifdef __USE_XOPEN2K
 # define POSIX_FADV_NORMAL	0 /* No further special treatment.  */
 # define POSIX_FADV_RANDOM	1 /* Expect random page references.  */
-# define POSIX_FADV_SEQUENTIAL	2 /* Expect sequential page references.  */
+# define POSIX_FADV_SEQUENTIAL	2 /* Expect sequential page references.	 */
 # define POSIX_FADV_WILLNEED	3 /* Will need these pages.  */
 # define POSIX_FADV_DONTNEED	4 /* Don't need these pages.  */
 # define POSIX_FADV_NOREUSE	5 /* Data will be accessed once.  */
 #endif
 
+
 #ifdef __USE_GNU
+/* Flags for SYNC_FILE_RANGE.  */
 # define SYNC_FILE_RANGE_WAIT_BEFORE	1 /* Wait upon writeout of all pages
 					     in the range before performing the
 					     write.  */
@@ -206,16 +237,18 @@
 extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
     __THROW;
 
+
 /* Selective file content synch'ing.  */
-extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
 			    unsigned int __flags);
 
+
 /* Splice address range into a pipe.  */
-extern ssize_t vmsplice (int __fdout, const struct iovec *__iov, 
+extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
 			 size_t __count, unsigned int __flags);
 
 /* Splice two files together.  */
-extern ssize_t splice (int __fdin, __off64_t *offin, int __fdout, 
+extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
 		       __off64_t *__offout, size_t __len,
 		       unsigned int __flags);
 
@@ -241,5 +274,5 @@
 # endif
 
 #endif
-    
+
 __END_DECLS
--- sysdeps/unix/sysv/linux/hppa/bits/mman.h
+++ sysdeps/unix/sysv/linux/hppa/bits/mman.h
@@ -86,6 +86,8 @@
 # define MADV_REMOVE	  9	/* Remove these pages and resources.  */
 # define MADV_DONTFORK	 10	/* Do not inherit across fork.  */
 # define MADV_DOFORK	 11	/* Do inherit across fork.  */
+# define MADV_MERGEABLE   65	/* KSM may merge identical pages */
+# define MADV_UNMERGEABLE 66	/* KSM may not merge identical pages */
 #endif
 
 /* The range 12-64 is reserved for page size specification. */
--- sysdeps/unix/sysv/linux/hppa/bits/socket.h
+++ sysdeps/unix/sysv/linux/hppa/bits/socket.h
@@ -1,6 +1,6 @@
 /* System-specific socket constants and types.  Linux version.
-   Copyright (C) 1991, 1992, 1994-2001, 2004, 2006, 2007, 2008, 2009
-   Free Software Foundation, Inc.
+   Copyright (C) 1991, 1992, 1994-2001, 2004, 2006, 2007, 2008, 2009,
+   2010 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
@@ -62,7 +62,7 @@
   /* Flags to be ORed into the type parameter of socket and socketpair and
      used for the flags parameter of paccept.  */
 
-  SOCK_CLOEXEC = 02000000,	/* Atomically set close-on-exec flag for the
+  SOCK_CLOEXEC = 010000000,	/* Atomically set close-on-exec flag for the
 				   new descriptor(s).  */
 #define SOCK_CLOEXEC SOCK_CLOEXEC
 #undef SOCK_NONBLOCK
@@ -233,6 +233,8 @@
 #define	MSG_NOSIGNAL	MSG_NOSIGNAL
     MSG_MORE		= 0x8000,  /* Sender will send more.  */
 #define	MSG_MORE	MSG_MORE
+    MSG_WAITFORONE     = 0x10000, /* Wait for at least one packet to return.*/
+#define MSG_WAITFORONE MSG_WAITFORONE
 
     MSG_CMSG_CLOEXEC	= 0x40000000	/* Set close_on_exit for file
                                            descriptor received through
--- sysdeps/unix/sysv/linux/hppa/getcontext.S
+++ sysdeps/unix/sysv/linux/hppa/getcontext.S
@@ -23,17 +23,21 @@
 #include "ucontext_i.h"
 
 
-	/* Trampoline function.  */
+	/* Trampoline function. Non-standard calling ABI.  */
 	/* Can not use ENTRY(__getcontext_ret) here.  */
 	.type	__getcontext_ret, @function
 	.hidden	__getcontext_ret
 __getcontext_ret:
 	.proc
 	.callinfo FRAME=0,NO_CALLS
+	/* r26-r23 contain original r3-r6, but because setcontext
+	   does not reload r3-r6 (it's using them as temporaries)
+	   we must save them elsewhere and swap them back in.  */
 	copy	%r23, %r3
 	copy	%r24, %r4
 	copy	%r25, %r5
 	copy	%r26, %r6
+	/* r20 contains original return pointer.  */
 	bv	0(%r20)
 	copy	%r0, %ret0
 	.procend
@@ -72,13 +76,12 @@
 	stw	%r27, oR27(%r26)
 	stw	%r28, oR28(%r26)
 	stw	%r29, oR29(%r26)
-	ldo	-64(%sp), %r1	/* Calculate %sp in %r1.  */
-	stw	%r1, oR30(%r26)	/* Save new %sp.  */
+	stw	%sp, oR30(%r26)
 	stw	%r31, oR31(%r26)
 
 	stw	%r0, oUC_FLAGS(%r26)
 	/* stw	%r0, oUC_LINK(%r26) - Do not overwrite.  */
-	stw	%r1, oSS_SP(%r26)
+	stw	%sp, oSS_SP(%r26)
 	stw	%r0, oSS_FLAGS(%r26)
 	stw	%r0, oSS_SIZE(%r26)
 
@@ -127,9 +130,9 @@
 	fstds	 %fr31, 0(%r1)
 
 	/* Prologue */
-	stwm	%r4, 64(%r30)
+	stwm	%r4, 64(%sp)
 #ifdef PIC
-	stw	%r19, -32(%r30)
+	stw	%r19, -32(%sp)
 #endif
 
 	/* Set up the trampoline registers.
@@ -152,12 +155,12 @@
 	ldi	SIG_BLOCK, %r26
 
 	/* Epilogue */
-	ldw	-84(%r30), %r2
+	ldw	-84(%sp), %r2
 #ifdef PIC
-	ldw	-96(%r30), %r19
+	ldw	-96(%sp), %r19
 #endif
 	bv	%r0(%r2)
-	ldwm	-64(%r30), %r4
+	ldwm	-64(%sp), %r4
 END(__getcontext)
 
 weak_alias (__getcontext, getcontext)
--- sysdeps/unix/sysv/linux/hppa/makecontext.c
+++ sysdeps/unix/sysv/linux/hppa/makecontext.c
@@ -1,5 +1,5 @@
 /* Create new context.
-   Copyright (C) 2008 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Helge Deller <deller@gmx.de>, 2008.
 
@@ -25,55 +25,77 @@
 #include <sysdep.h>
 #include <ucontext.h>
 
-/* XXX: This implementation only handles integer arguments.  */
+/* POSIX only supports integer arguments.  */
+
+/* Stack must be 64-byte aligned at all times.  */
+#define STACK_ALIGN 64
+/* Size of frame marker in unsigned long words.  */
+#define FRAME_SIZE_UL 8 
+/* Size of frame marker in bytes.  */
+#define FRAME_SIZE_BYTES (8 * sizeof(unsigned long)) 
+/* Size of X arguments in bytes.  */
+#define ARGS(x) (x * sizeof(unsigned long))
 
 void
 __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
 {
-  unsigned int *sp;
+  unsigned long *sp, *osp;
   va_list ap;
   int i;
 
-  if (argc > 8)
+  /* Create a 64-byte aligned frame to store args. Use ss_sp if 
+     it is available, otherwise be robust and use the currently
+     saved stack pointer.  */
+  if (ucp->uc_stack.ss_sp && ucp->uc_stack.ss_size)
+    osp = (unsigned long *)ucp->uc_stack.ss_sp;
+  else
+    osp = (unsigned long *)ucp->uc_mcontext.sc_gr[30];
+
+  sp = (unsigned long *)((((unsigned long) osp) 
+			   + FRAME_SIZE_BYTES + ARGS(argc) + STACK_ALIGN) 
+			 & ~(STACK_ALIGN - 1));
+
+  /* Use new frame.  */
+  ucp->uc_mcontext.sc_gr[30] = ((unsigned long) sp);
+
+  /* Finish frame setup.  */
+  if (ucp->uc_link)
     {
-      fprintf (stderr, _("\
-makecontext: does not know how to handle more than 8 arguments\n"));
-      exit (-1);
+      /* Returning to the next context and next frame.  */
+      sp[-4/sizeof(unsigned long)] = ucp->uc_link->uc_mcontext.sc_gr[30];
+      sp[-20/sizeof(unsigned long)] = ucp->uc_link->uc_mcontext.sc_gr[2];
+    }
+  else
+    {
+      /* This is the main context. No frame marker, and no return address.  */
+      sp[-4/sizeof(unsigned long)] = 0x0;
+      sp[-20/sizeof(unsigned long)] = 0x0;
     }
-
-  /* Get stack pointer.  */
-  sp = (unsigned int *) ucp->uc_stack.ss_sp;
 
   /* Store address to jump to.  */
   ucp->uc_mcontext.sc_gr[2] = (unsigned long) func;
 
+  /* Process arguments.  */
   va_start (ap, argc);
-  /* Handle arguments.  */
   for (i = 0; i < argc; ++i)
-    switch (i)
-      {
-      case 0:
-      case 1:
-      case 2:
-      case 3:
-      	ucp->uc_mcontext.sc_gr[26-i] = va_arg (ap, int);
-	break;
-      case 4:
-      case 5:
-      case 6:
-      case 7:
-	if (sizeof(unsigned long) == 4) {
-		/* 32bit: put arg7-arg4 on stack.  */
-		sp[7-i] = va_arg (ap, int);
-	} else {
-		/* 64bit: r19-r22 are arg7-arg4.  */
-		ucp->uc_mcontext.sc_gr[22+4-i] = va_arg (ap, int);
+    {
+      if (i < 4)
+	{
+	  ucp->uc_mcontext.sc_gr[26-i] = va_arg (ap, int);
+	  continue;
 	}
-	break;
-      }
-  va_end (ap);
-
-}
 
+      if ((i < 8) && (sizeof(unsigned long) == 8))
+	{
+	  /* 64bit: r19-r22 are arg7-arg4.  */
+	  ucp->uc_mcontext.sc_gr[22+4-i] = va_arg (ap, int);
+	  continue;
+	} 
 
+      /* All other arguments go on the stack.  */
+      sp[-1 * (FRAME_SIZE_UL + 1 + i)] = va_arg (ap, int);
+    }
+  va_end (ap); 
+}
 weak_alias(__makecontext, makecontext)
+
--- sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
+++ sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
@@ -64,7 +64,7 @@
 {
   struct __pthread_mutex_s
   {
-    int __lock;
+    int __lock __attribute__ ((aligned(16)));
     unsigned int __count;
     int __owner;
     /* KIND must stay at this position in the structure to maintain
@@ -113,7 +113,7 @@
        start of the 4-word lock structure, the next four words
        are set all to 1 by the Linuxthreads 
        PTHREAD_COND_INITIALIZER.  */
-    int __lock;
+    int __lock __attribute__ ((aligned(16)));
     /* Tracks the initialization of this structure:
        0  initialized with NPTL PTHREAD_COND_INITIALIZER.
        1  initialized with Linuxthreads PTHREAD_COND_INITIALIZER.
@@ -161,7 +161,7 @@
        start of the 4-word 16-byte aligned lock structure. The
        next four words are all set to 1 by the Linuxthreads
        PTHREAD_RWLOCK_INITIALIZER. We ignore them in NPTL.  */
-    int __compat_padding[4];
+    int __compat_padding[4] __attribute__ ((aligned(16)));
     int __lock;
     unsigned int __nr_readers;
     unsigned int __readers_wakeup;
--- sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S
+++ sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2010 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
@@ -50,10 +50,9 @@
 
 	/* r26, r25, r24, r23 are free since vfork has no arguments */
 ENTRY(__vfork)
-	/* Prologue */
-	stwm	%r3, 64(%sp)
-	stw	%sp, -4(%sp)
-	stw	%r19, -32(%sp)
+	/* We must not create a frame. When the child unwinds to call 
+	   exec it will clobber the same frame that the parent
+	   needs to unwind.  */
 
 	/* Save the PIC register. */
 #ifdef PIC
@@ -75,12 +74,20 @@
 	comclr,>>= %r1,%ret0,%r0        /* Note: unsigned compare. */
 	b,n	.Lerror
 
-	/* Return, no need to restore the PIC register. */
-	ldw	-84(%sp), %rp
-	bv	%r0(%rp)
-	ldwm	-64(%sp), %r3
+	/* Return, and DO NOT restore rp. The child may have called
+	   functions that updated the frame's rp. This works because
+	   the kernel ensures rp is preserved across the vfork 
+	   syscall.  */
+	bv,n	%r0(%rp)
 
 .Lerror:
+	/* Now we need a stack to call a function. We are assured
+	   that there is no child now, so it's safe to create
+	   a frame.  */
+	stw	%rp, -20(%sp)
+	stwm	%r3, 64(%sp)
+	stw	%sp, -4(%sp)
+
 	sub	%r0,%ret0,%r3
 	SYSCALL_ERROR_HANDLER
 	/* Restore the PIC register (in delay slot) on error */
--- sysdeps/unix/sysv/linux/hppa/nptl/pthread.h
+++ sysdeps/unix/sysv/linux/hppa/nptl/pthread.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+/* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -25,8 +25,6 @@
 #include <sched.h>
 #include <time.h>
 
-#define __need_sigset_t
-#include <signal.h>
 #include <bits/pthreadtypes.h>
 #include <bits/setjmp.h>
 #include <bits/wordsize.h>
@@ -49,7 +47,7 @@
   PTHREAD_MUTEX_RECURSIVE_NP,
   PTHREAD_MUTEX_ERRORCHECK_NP,
   PTHREAD_MUTEX_ADAPTIVE_NP
-#ifdef __USE_UNIX98
+#if defined __USE_UNIX98 || defined __USE_XOPEN2K8
   ,
   PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP,
   PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP,
@@ -427,6 +425,18 @@
      __THROW;
 
 
+#ifdef __USE_GNU
+/* Get thread name visible in the kernel and its interfaces.  */
+extern int pthread_getname_np (pthread_t __target_thread, char *__buf,
+			       size_t __buflen)
+     __THROW __nonnull ((2));
+
+/* Set thread name visible in the kernel and its interfaces.  */
+extern int pthread_setname_np (pthread_t __target_thread, __const char *__name)
+     __THROW __nonnull ((2));
+#endif
+
+
 #ifdef __USE_UNIX98
 /* Determine level of concurrency.  */
 extern int pthread_getconcurrency (void) __THROW;
@@ -739,8 +749,8 @@
 #ifdef __USE_XOPEN2K
 /* Wait until lock becomes available, or specified time passes. */
 extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
-                                    __const struct timespec *__restrict
-                                    __abstime) __THROW __nonnull ((1, 2));
+				    __const struct timespec *__restrict
+				    __abstime) __THROW __nonnull ((1, 2));
 #endif
 
 /* Unlock a mutex.  */
@@ -748,7 +758,6 @@
      __THROW __nonnull ((1));
 
 
-#ifdef __USE_UNIX98
 /* Get the priority ceiling of MUTEX.  */
 extern int pthread_mutex_getprioceiling (__const pthread_mutex_t *
 					 __restrict __mutex,
@@ -761,12 +770,11 @@
 					 int __prioceiling,
 					 int *__restrict __old_ceiling)
      __THROW __nonnull ((1, 3));
-#endif
 
 
 #ifdef __USE_XOPEN2K8
 /* Declare the state protected by MUTEX as consistent.  */
-extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex)
+extern int pthread_mutex_consistent (pthread_mutex_t *__mutex)
      __THROW __nonnull ((1));
 # ifdef __USE_GNU
 extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex)
@@ -797,7 +805,7 @@
 					 int __pshared)
      __THROW __nonnull ((1));
 
-#ifdef __USE_UNIX98
+#if defined __USE_UNIX98 || defined __USE_XOPEN2K8
 /* Return in *KIND the mutex kind attribute in *ATTR.  */
 extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict
 				      __attr, int *__restrict __kind)
@@ -808,6 +816,7 @@
    PTHREAD_MUTEX_DEFAULT).  */
 extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind)
      __THROW __nonnull ((1));
+#endif
 
 /* Return in *PROTOCOL the mutex protocol attribute in *ATTR.  */
 extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t *
@@ -831,7 +840,6 @@
 extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr,
 					     int __prioceiling)
      __THROW __nonnull ((1));
-#endif
 
 #ifdef __USE_XOPEN2K
 /* Get the robustness flag of the mutex attribute ATTR.  */
@@ -990,13 +998,13 @@
 
 /* Get the process-shared flag of the condition variable attribute ATTR.  */
 extern int pthread_condattr_getpshared (__const pthread_condattr_t *
-                                        __restrict __attr,
-                                        int *__restrict __pshared)
+					__restrict __attr,
+					int *__restrict __pshared)
      __THROW __nonnull ((1, 2));
 
 /* Set the process-shared flag of the condition variable attribute ATTR.  */
 extern int pthread_condattr_setpshared (pthread_condattr_t *__attr,
-                                        int __pshared) __THROW __nonnull ((1));
+					int __pshared) __THROW __nonnull ((1));
 
 #ifdef __USE_XOPEN2K
 /* Get the clock selected for the conditon variable attribute ATTR.  */
@@ -1071,7 +1079,7 @@
 
 /* Set the process-shared flag of the barrier attribute ATTR.  */
 extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr,
-                                           int __pshared)
+					   int __pshared)
      __THROW __nonnull ((1));
 #endif
 
@@ -1136,11 +1144,11 @@
 
 #endif	/* pthread.h */
 
-#ifndef _PTHREAD_H_HPPA_ 
+#ifndef _PTHREAD_H_HPPA_
 #define _PTHREAD_H_HPPA_ 1
 
 /* The pthread_cond_t initializer is compatible only with NPTL. We do not
-   want to be forwards compatible, we eventually want to drop the code 
+   want to be forwards compatible, we eventually want to drop the code
    that has to clear the old LT initializer.  */
 #undef PTHREAD_COND_INITIALIZER
 #define PTHREAD_COND_INITIALIZER { { 0, 0, 0, (void *) 0, 0, 0, 0, 0, 0 } }
@@ -1173,6 +1181,5 @@
   { { { 0, 0, 0, 0 }, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,\  0, 0, 0 } }
 #endif  /* Unix98 or XOpen2K */
- 
-#endif
 
+#endif
--- sysdeps/unix/sysv/linux/hppa/setcontext.S
+++ sysdeps/unix/sysv/linux/hppa/setcontext.S
@@ -25,9 +25,9 @@
 
 ENTRY(__setcontext)
 	/* Prologue */
-	stwm	%r3, 64(%r30)
+	stwm	%r3, 64(%sp)
 #ifdef PIC
-	stw	%r19, -32(%r30)
+	stw	%r19, -32(%sp)
 #endif
 
 	/* Save ucp.  */
@@ -78,7 +78,7 @@
 	ldw	oR27(%r3), %r27
 	ldw	oR28(%r3), %r28
 	ldw	oR29(%r3), %r29
-	ldw	oR30(%r3), %r30
+	ldw	oR30(%r3), %sp
 	/* ldw	oR31(%r3), %r31 - dyncall scratch register */
 
 	/* Restore floating-point registers.  */
@@ -116,9 +116,13 @@
 	fldds,mb -8(%r22), %fr1
 	fldds,mb -8(%r22), %fr0
 
-	/* Calculate new stack pointer.  */
-	ldw	oSS_SP(%r3), %sp
-	ldo	64(%sp), %sp
+	/* Do not load oSS_SP into %sp. The value of oSS_SP indicates
+	   the start of the user allocated stack, but not the sp that
+	   should be used by the new context. In fact makecontext 
+	   will create a frame, and adjust sp as required. We do not
+	   support calling getcontext and modifying ss_sp without
+	   a call to makecontext to synchronize ss_sp into the machine
+	   context.  */
 
 	/* Call external function.  */
 	copy	%r2, %r22
--- sysdeps/unix/sysv/linux/m68k/Makefile
+++ sysdeps/unix/sysv/linux/m68k/Makefile
@@ -2,12 +2,18 @@
 
 m68k-syntax-flag = -DMOTOROLA_SYNTAX
 
+ifeq ($(subdir),csu)
+sysdep_routines += m68k-helpers
+endif
+
 ifeq ($(subdir),misc)
 sysdep_routines += mremap
 sysdep_headers += sys/reg.h
 endif
 
 ifeq ($(subdir),elf)
+sysdep_routines += dl-vdso libc-m68k-vdso
+sysdep-rtld-routines += m68k-vdso
 sysdep-others += lddlibc4
 install-bin += lddlibc4
 endif
--- sysdeps/unix/sysv/linux/m68k/Versions
+++ sysdeps/unix/sysv/linux/m68k/Versions
@@ -32,4 +32,18 @@
   GLIBC_2.11 {
     fallocate64;
   }
+  GLIBC_2.12 {
+    __m68k_read_tp;
+  }
+  GLIBC_PRIVATE {
+    __vdso_atomic_cmpxchg_32; __vdso_atomic_barrier;
+  }
+}
+
+ld {
+  GLIBC_PRIVATE {
+    __rtld___vdso_read_tp;
+    __rtld___vdso_atomic_cmpxchg_32;
+    __rtld___vdso_atomic_barrier;
+  }
 }
--- sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
+++ sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for Linux.
-   Copyright (C) 2000, 2004, 2008, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2004, 2008, 2009, 2010 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
@@ -40,23 +40,25 @@
 #define O_APPEND	  02000
 #define O_NONBLOCK	  04000
 #define O_NDELAY	O_NONBLOCK
-#define O_SYNC		 010000
+#define O_SYNC	       04010000
 #define O_FSYNC		 O_SYNC
 #define O_ASYNC		 020000
 
-#ifdef __USE_GNU
+#ifdef __USE_XOPEN2K8
 # define O_DIRECTORY	 040000	/* Must be a directory.	 */
 # define O_NOFOLLOW	0100000	/* Do not follow links.	 */
+# define O_CLOEXEC     02000000 /* Set close_on_exec.  */
+#endif
+#ifdef __USE_GNU
 # define O_DIRECT	0200000	/* Direct disk access.	*/
 # define O_NOATIME	01000000 /* Do not set atime.  */
-# define O_CLOEXEC     02000000 /* Set close_on_exec.  */
 #endif
 
 /* For now Linux has synchronisity options for data and read operations.
    We define the symbols here but let them do the same as O_SYNC since
    this is a superset.	*/
 #if defined __USE_POSIX199309 || defined __USE_UNIX98
-# define O_DSYNC	O_SYNC	/* Synchronize data.  */
+# define O_DSYNC	010000	/* Synchronize data.  */
 # define O_RSYNC	O_SYNC	/* Synchronize read operations.	 */
 #endif
 
@@ -83,7 +85,7 @@
 #define F_SETLK64	13	/* Set record locking info (non-blocking).  */
 #define F_SETLKW64	14	/* Set record locking info (blocking).	*/
 
-#if defined __USE_BSD || defined __USE_UNIX98
+#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8
 # define F_SETOWN	8	/* Get owner of socket (receiver of SIGIO).  */
 # define F_GETOWN	9	/* Set owner of socket (receiver of SIGIO).  */
 #endif
@@ -99,6 +101,10 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
+# define F_SETPIPE_SZ	1031	/* Set pipe page size array.  */
+# define F_GETPIPE_SZ	1032	/* Set pipe page size array.  */
+#endif
+#ifdef __USE_XOPEN2K8
 # define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
 				   close-on-exit set.  */
 #endif
@@ -171,9 +177,10 @@
 /* Owner types.  */
 enum __pid_type
   {
-    F_OWNER_TID = 0,	/* Kernel thread.  */
-    F_OWNER_PID,	/* Process.  */
-    F_OWNER_GID		/* Process group.  */
+    F_OWNER_TID = 0,		/* Kernel thread.  */
+    F_OWNER_PID,		/* Process.  */
+    F_OWNER_PGRP,		/* Process group.  */
+    F_OWNER_GID = F_OWNER_PGRP	/* Alternative, obsolete name.  */
   };
 
 /* Structure to use with F_GETOWN_EX and F_SETOWN_EX.  */
@@ -236,7 +243,7 @@
 
 
 /* Selective file content synch'ing.  */
-extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
 			    unsigned int __flags);
 
 
--- sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h
+++ sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h
+/* Resolve function pointers to VDSO functions.
+   Copyright (C) 2010 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
+
+   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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+
+#ifndef _M68K_VDSO_H
+#define _M68K_VDSO_H
+
+#ifdef SHARED
+
+# ifdef IS_IN_rtld
+# define M68K_VDSO_SYMBOL(name) __rtld_##name
+# define STR_M68K_VDSO_SYMBOL(name) "__rtld_" #name
+# else
+# define M68K_VDSO_SYMBOL(name) name
+# define STR_M68K_VDSO_SYMBOL(name) #name
+# endif
+
+# ifndef __ASSEMBLER__
+
+/* We define __rtld_* copies for rtld.
+   We need them visible in libc to initialize.  */
+#  if defined IS_IN_rtld || !defined NOT_IN_libc
+extern void *__rtld___vdso_read_tp;
+extern void *__rtld___vdso_atomic_cmpxchg_32;
+extern void *__rtld___vdso_atomic_barrier;
+
+/* These stubs are meant to be invoked only from the assembly.  */
+extern void __vdso_read_tp_stub (void);
+extern void __vdso_atomic_cmpxchg_32_stub (void);
+extern void __vdso_atomic_barrier_stub (void);
+#  endif /* IS_IN_rtld || !NOT_IN_libc */
+
+/* RTLD should only use its own copies.  */
+#  ifndef IS_IN_rtld
+extern void *__vdso_read_tp;
+extern void *__vdso_atomic_cmpxchg_32;
+extern void *__vdso_atomic_barrier;
+#  endif /* !IS_IN_rtld */
+
+# endif /* !__ASSEMBLER__ */
+
+#endif /* SHARED */
+
+#endif /* _M68K_VDSO_H */
--- sysdeps/unix/sysv/linux/m68k/bits/mman.h
+++ sysdeps/unix/sysv/linux/m68k/bits/mman.h
@@ -1,5 +1,6 @@
 /* Definitions for POSIX memory map interface.  Linux/m68k version.
-   Copyright (C) 1997, 2000, 2003, 2005, 2008 Free Software Foundation, Inc.
+   Copyright (C) 1997, 2000, 2003, 2005, 2008, 2009, 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
@@ -83,14 +84,19 @@
 
 /* Advice to `madvise'.  */
 #ifdef __USE_BSD
-# define MADV_NORMAL	 0	/* No further special treatment.  */
-# define MADV_RANDOM	 1	/* Expect random page references.  */
-# define MADV_SEQUENTIAL 2	/* Expect sequential page references.  */
-# define MADV_WILLNEED	 3	/* Will need these pages.  */
-# define MADV_DONTNEED	 4	/* Don't need these pages.  */
-# define MADV_REMOVE	 9	/* Remove these pages and resources.  */
-# define MADV_DONTFORK	 10	/* Do not inherit across fork.  */
-# define MADV_DOFORK	 11	/* Do inherit across fork.  */
+# define MADV_NORMAL	  0	/* No further special treatment.  */
+# define MADV_RANDOM	  1	/* Expect random page references.  */
+# define MADV_SEQUENTIAL  2	/* Expect sequential page references.  */
+# define MADV_WILLNEED	  3	/* Will need these pages.  */
+# define MADV_DONTNEED	  4	/* Don't need these pages.  */
+# define MADV_REMOVE	  9	/* Remove these pages and resources.  */
+# define MADV_DONTFORK	  10	/* Do not inherit across fork.  */
+# define MADV_DOFORK	  11	/* Do inherit across fork.  */
+# define MADV_MERGEABLE	  12	/* KSM may merge identical pages.  */
+# define MADV_UNMERGEABLE 13	/* KSM may not merge identical pages.  */
+# define MADV_HUGEPAGE	  14	/* Worth backing with hugepages.  */
+# define MADV_NOHUGEPAGE  15	/* Not worth backing with hugepages.  */
+# define MADV_HWPOISON	  100	/* Poison a page for testing.  */
 #endif
 
 /* The POSIX people had to invent similar names for the same things.  */
--- sysdeps/unix/sysv/linux/m68k/bits/poll.h
+++ sysdeps/unix/sysv/linux/m68k/bits/poll.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 2001, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 2001, 2008, 2009 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
@@ -27,7 +27,7 @@
 #define POLLPRI		0x002		/* There is urgent data to read.  */
 #define POLLOUT		0x004		/* Writing now will not block.  */
 
-#ifdef __USE_XOPEN
+#if defined __USE_XOPEN || defined __USE_XOPEN2K8
 /* These values are defined in XPG4.2.  */
 # define POLLRDNORM	0x040		/* Normal data may be read.  */
 # define POLLRDBAND	0x080		/* Priority data may be read.  */
--- sysdeps/unix/sysv/linux/m68k/bits/sigcontext.h
+++ sysdeps/unix/sysv/linux/m68k/bits/sigcontext.h
-/* Copyright (C) 2006 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, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
-# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
-#endif
-
-#ifndef _BITS_SIGCONTEXT_H
-#define _BITS_SIGCONTEXT_H 1
-
-struct sigcontext {
-  unsigned long sc_mask;
-  unsigned long sc_usp;
-  unsigned long sc_d0;
-  unsigned long sc_d1;
-#ifdef __mcoldfire__
-  unsigned long sc_d2;
-  unsigned long sc_d3;
-  unsigned long sc_d4;
-  unsigned long sc_d5;
-  unsigned long sc_d6;
-  unsigned long sc_d7;
-#endif
-  unsigned long sc_a0;
-  unsigned long sc_a1;
-#ifdef __mcoldfire__
-  unsigned long sc_a2;
-  unsigned long sc_a3;
-  unsigned long sc_a4;
-  unsigned long sc_a5;
-  unsigned long sc_a6;
-#endif
-  unsigned short sc_sr;
-  unsigned long sc_pc;
-  unsigned short sc_formatvec;
-#ifdef __mcoldfire__
-  unsigned long sc_fpregs[8][2];
-  unsigned long sc_fpcntl[3];
-  unsigned char sc_fpstate[16];
-#else
-  unsigned long sc_fpregs[2*3];
-  unsigned long sc_fpcntl[3];
-  unsigned char sc_fpstate[216];
-#endif
-};
-
-#endif
--- sysdeps/unix/sysv/linux/m68k/bits/siginfo.h
+++ sysdeps/unix/sysv/linux/m68k/bits/siginfo.h
-/* siginfo_t, sigevent and constants.  m68k linux version.
-   Copyright (C) 1997-2002, 2003 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, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#if !defined _SIGNAL_H && !defined __need_siginfo_t \
-    && !defined __need_sigevent_t
-# error "Never include this file directly.  Use <signal.h> instead"
-#endif
-
-#include <bits/wordsize.h>
-
-#if (!defined __have_sigval_t \
-     && (defined _SIGNAL_H || defined __need_siginfo_t \
-	 || defined __need_sigevent_t))
-# define __have_sigval_t	1
-
-/* Type for data associated with a signal.  */
-typedef union sigval
-  {
-    int sival_int;
-    void *sival_ptr;
-  } sigval_t;
-#endif
-
-#if (!defined __have_siginfo_t \
-     && (defined _SIGNAL_H || defined __need_siginfo_t))
-# define __have_siginfo_t	1
-
-# define __SI_MAX_SIZE     128
-# if __WORDSIZE == 64
-#  define __SI_PAD_SIZE     ((__SI_MAX_SIZE / sizeof (int)) - 4)
-# else
-#  define __SI_PAD_SIZE     ((__SI_MAX_SIZE / sizeof (int)) - 3)
-# endif
-
-typedef struct siginfo
-  {
-    int si_signo;		/* Signal number.  */
-    int si_errno;		/* If non-zero, an errno value associated with
-				   this signal, as defined in <errno.h>.  */
-    int si_code;		/* Signal code.  */
-
-    union
-      {
-	int _pad[__SI_PAD_SIZE];
-
-	 /* kill().  */
-	struct
-	  {
-	    __pid_t si_pid;	/* Sending process ID.  */
-	    unsigned short __pad; /* 16-bit version of si_uid.  */
-	    __uid_t si_uid;	/* Real user ID of sending process.  */
-	  } _kill;
-
-	/* POSIX.1b timers.  */
-	struct
-	  {
-	    int si_tid;		/* Timer ID.  */
-	    int si_overrun;	/* Overrun count.  */
-	    sigval_t si_sigval;	/* Signal value.  */
-	  } _timer;
-
-	/* POSIX.1b signals.  */
-	struct
-	  {
-	    __pid_t si_pid;	/* Sending process ID.  */
-	    unsigned short __pad; /* 16-bit version of si_uid.  */
-	    sigval_t si_sigval;	/* Signal value.  */
-	    __uid_t si_uid;	/* Real user ID of sending process.  */
-	  } _rt;
-
-	/* SIGCHLD.  */
-	struct
-	  {
-	    __pid_t si_pid;	/* Which child.  */
-	    unsigned short __pad; /* 16-bit version of si_uid.  */
-	    int si_status;	/* Exit value or signal.  */
-	    __clock_t si_utime;
-	    __clock_t si_stime;
-	    __uid_t si_uid;	/* Real user ID of sending process.  */
-	  } _sigchld;
-
-	/* SIGILL, SIGFPE, SIGSEGV, SIGBUS.  */
-	struct
-	  {
-	    void *si_addr;	/* Faulting insn/memory ref.  */
-	  } _sigfault;
-
-	/* SIGPOLL.  */
-	struct
-	  {
-	    long int si_band;	/* Band event for SIGPOLL.  */
-	    int si_fd;
-	  } _sigpoll;
-      } _sifields;
-  } siginfo_t;
-
-
-/* X/Open requires some more fields with fixed names.  */
-# define si_pid		_sifields._kill.si_pid
-# define si_uid		_sifields._kill.si_uid
-# define si_timerid	_sifields._timer.si_tid
-# define si_overrun	_sifields._timer.si_overrun
-# define si_status	_sifields._sigchld.si_status
-# define si_utime	_sifields._sigchld.si_utime
-# define si_stime	_sifields._sigchld.si_stime
-# define si_value	_sifields._rt.si_sigval
-# define si_int		_sifields._rt.si_sigval.sival_int
-# define si_ptr		_sifields._rt.si_sigval.sival_ptr
-# define si_addr	_sifields._sigfault.si_addr
-# define si_band	_sifields._sigpoll.si_band
-# define si_fd		_sifields._sigpoll.si_fd
-
-
-/* Values for `si_code'.  Positive values are reserved for kernel-generated
-   signals.  */
-enum
-{
-  SI_ASYNCNL = -60,		/* Sent by asynch name lookup completion.  */
-# define SI_ASYNCNL	SI_ASYNCNL
-  SI_TKILL = -6,		/* Sent by tkill.  */
-# define SI_TKILL	SI_TKILL
-  SI_SIGIO,			/* Sent by queued SIGIO. */
-# define SI_SIGIO	SI_SIGIO
-  SI_ASYNCIO,			/* Sent by AIO completion.  */
-# define SI_ASYNCIO	SI_ASYNCIO
-  SI_MESGQ,			/* Sent by real time mesq state change.  */
-# define SI_MESGQ	SI_MESGQ
-  SI_TIMER,			/* Sent by timer expiration.  */
-# define SI_TIMER	SI_TIMER
-  SI_QUEUE,			/* Sent by sigqueue.  */
-# define SI_QUEUE	SI_QUEUE
-  SI_USER,			/* Sent by kill, sigsend, raise.  */
-# define SI_USER	SI_USER
-  SI_KERNEL = 0x80		/* Send by kernel.  */
-#define SI_KERNEL	SI_KERNEL
-};
-
-
-/* `si_code' values for SIGILL signal.  */
-enum
-{
-  ILL_ILLOPC = 1,		/* Illegal opcode.  */
-# define ILL_ILLOPC	ILL_ILLOPC
-  ILL_ILLOPN,			/* Illegal operand.  */
-# define ILL_ILLOPN	ILL_ILLOPN
-  ILL_ILLADR,			/* Illegal addressing mode.  */
-# define ILL_ILLADR	ILL_ILLADR
-  ILL_ILLTRP,			/* Illegal trap. */
-# define ILL_ILLTRP	ILL_ILLTRP
-  ILL_PRVOPC,			/* Privileged opcode.  */
-# define ILL_PRVOPC	ILL_PRVOPC
-  ILL_PRVREG,			/* Privileged register.  */
-# define ILL_PRVREG	ILL_PRVREG
-  ILL_COPROC,			/* Coprocessor error.  */
-# define ILL_COPROC	ILL_COPROC
-  ILL_BADSTK			/* Internal stack error.  */
-# define ILL_BADSTK	ILL_BADSTK
-};
-
-/* `si_code' values for SIGFPE signal.  */
-enum
-{
-  FPE_INTDIV = 1,		/* Integer divide by zero.  */
-# define FPE_INTDIV	FPE_INTDIV
-  FPE_INTOVF,			/* Integer overflow.  */
-# define FPE_INTOVF	FPE_INTOVF
-  FPE_FLTDIV,			/* Floating point divide by zero.  */
-# define FPE_FLTDIV	FPE_FLTDIV
-  FPE_FLTOVF,			/* Floating point overflow.  */
-# define FPE_FLTOVF	FPE_FLTOVF
-  FPE_FLTUND,			/* Floating point underflow.  */
-# define FPE_FLTUND	FPE_FLTUND
-  FPE_FLTRES,			/* Floating point inexact result.  */
-# define FPE_FLTRES	FPE_FLTRES
-  FPE_FLTINV,			/* Floating point invalid operation.  */
-# define FPE_FLTINV	FPE_FLTINV
-  FPE_FLTSUB			/* Subscript out of range.  */
-# define FPE_FLTSUB	FPE_FLTSUB
-};
-
-/* `si_code' values for SIGSEGV signal.  */
-enum
-{
-  SEGV_MAPERR = 1,		/* Address not mapped to object.  */
-# define SEGV_MAPERR	SEGV_MAPERR
-  SEGV_ACCERR			/* Invalid permissions for mapped object.  */
-# define SEGV_ACCERR	SEGV_ACCERR
-};
-
-/* `si_code' values for SIGBUS signal.  */
-enum
-{
-  BUS_ADRALN = 1,		/* Invalid address alignment.  */
-# define BUS_ADRALN	BUS_ADRALN
-  BUS_ADRERR,			/* Non-existant physical address.  */
-# define BUS_ADRERR	BUS_ADRERR
-  BUS_OBJERR			/* Object specific hardware error.  */
-# define BUS_OBJERR	BUS_OBJERR
-};
-
-/* `si_code' values for SIGTRAP signal.  */
-enum
-{
-  TRAP_BRKPT = 1,		/* Process breakpoint.  */
-# define TRAP_BRKPT	TRAP_BRKPT
-  TRAP_TRACE			/* Process trace trap.  */
-# define TRAP_TRACE	TRAP_TRACE
-};
-
-/* `si_code' values for SIGCHLD signal.  */
-enum
-{
-  CLD_EXITED = 1,		/* Child has exited.  */
-# define CLD_EXITED	CLD_EXITED
-  CLD_KILLED,			/* Child was killed.  */
-# define CLD_KILLED	CLD_KILLED
-  CLD_DUMPED,			/* Child terminated abnormally.  */
-# define CLD_DUMPED	CLD_DUMPED
-  CLD_TRAPPED,			/* Traced child has trapped.  */
-# define CLD_TRAPPED	CLD_TRAPPED
-  CLD_STOPPED,			/* Child has stopped.  */
-# define CLD_STOPPED	CLD_STOPPED
-  CLD_CONTINUED			/* Stopped child has continued.  */
-# define CLD_CONTINUED	CLD_CONTINUED
-};
-
-/* `si_code' values for SIGPOLL signal.  */
-enum
-{
-  POLL_IN = 1,			/* Data input available.  */
-# define POLL_IN	POLL_IN
-  POLL_OUT,			/* Output buffers available.  */
-# define POLL_OUT	POLL_OUT
-  POLL_MSG,			/* Input message available.   */
-# define POLL_MSG	POLL_MSG
-  POLL_ERR,			/* I/O error.  */
-# define POLL_ERR	POLL_ERR
-  POLL_PRI,			/* High priority input available.  */
-# define POLL_PRI	POLL_PRI
-  POLL_HUP			/* Device disconnected.  */
-# define POLL_HUP	POLL_HUP
-};
-
-# undef __need_siginfo_t
-#endif	/* !have siginfo_t && (have _SIGNAL_H || need siginfo_t).  */
-
-
-#if (defined _SIGNAL_H || defined __need_sigevent_t) \
-    && !defined __have_sigevent_t
-# define __have_sigevent_t	1
-
-/* Structure to transport application-defined values with signals.  */
-# define __SIGEV_MAX_SIZE	64
-# if __WORDSIZE == 64
-#  define __SIGEV_PAD_SIZE	((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
-# else
-#  define __SIGEV_PAD_SIZE	((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
-# endif
-
-typedef struct sigevent
-  {
-    sigval_t sigev_value;
-    int sigev_signo;
-    int sigev_notify;
-
-    union
-      {
-	int _pad[__SIGEV_PAD_SIZE];
-
-	/* When SIGEV_SIGNAL and SIGEV_THREAD_ID set, LWP ID of the
-	   thread to receive the signal.  */
-	__pid_t _tid;
-
-	struct
-	  {
-	    void (*_function) (sigval_t);	/* Function to start.  */
-	    void *_attribute;			/* Really pthread_attr_t.  */
-	  } _sigev_thread;
-      } _sigev_un;
-  } sigevent_t;
-
-/* POSIX names to access some of the members.  */
-# define sigev_notify_function   _sigev_un._sigev_thread._function
-# define sigev_notify_attributes _sigev_un._sigev_thread._attribute
-
-/* `sigev_notify' values.  */
-enum
-{
-  SIGEV_SIGNAL = 0,		/* Notify via signal.  */
-# define SIGEV_SIGNAL	SIGEV_SIGNAL
-  SIGEV_NONE,			/* Other notification: meaningless.  */
-# define SIGEV_NONE	SIGEV_NONE
-  SIGEV_THREAD,			/* Deliver via thread creation.  */
-# define SIGEV_THREAD	SIGEV_THREAD
-
-  SIGEV_THREAD_ID = 4		/* Send signal to specific thread.  */
-#define SIGEV_THREAD_ID	SIGEV_THREAD_ID
-};
-
-#endif	/* have _SIGNAL_H.  */
--- sysdeps/unix/sysv/linux/m68k/bits/stat.h
+++ sysdeps/unix/sysv/linux/m68k/bits/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992,95,96,97,98,99,2000,2001,2002,2008,2009
+/* Copyright (C) 1992,95,96,97,98,99,2000,2001,2002,2008,2009,2010
      Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -17,10 +17,13 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#ifndef _SYS_STAT_H
+#if !defined _SYS_STAT_H && !defined _FCNTL_H
 # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
 #endif
 
+#ifndef _BITS_STAT_H
+#define _BITS_STAT_H	1
+
 /* Versions of the `struct stat' data structure.  */
 #define _STAT_VER_LINUX_OLD	1
 #define _STAT_VER_KERNEL	1
@@ -61,7 +64,7 @@
 #else
     __blkcnt64_t st_blocks;		/* Number 512-byte blocks allocated. */
 #endif
-#ifdef __USE_MISC
+#if defined __USE_MISC || defined __USE_XOPEN2K8
     /* Nanosecond resolution timestamps are stored in a format
        equivalent to 'struct timespec'.  This is the type used
        whenever possible but the Unix namespace rules do not allow the
@@ -107,7 +110,7 @@
     __blksize_t st_blksize;		/* Optimal block size for I/O.  */
 
     __blkcnt64_t st_blocks;		/* Number 512-byte blocks allocated. */
-#ifdef __USE_MISC
+# if defined __USE_MISC || defined __USE_XOPEN2K8
     /* Nanosecond resolution timestamps are stored in a format
        equivalent to 'struct timespec'.  This is the type used
        whenever possible but the Unix namespace rules do not allow the
@@ -117,14 +120,14 @@
     struct timespec st_atim;		/* Time of last access.  */
     struct timespec st_mtim;		/* Time of last modification.  */
     struct timespec st_ctim;		/* Time of last status change.  */
-#else
+# else
     __time_t st_atime;			/* Time of last access.  */
     unsigned long int st_atimensec;	/* Nscecs of last access.  */
     __time_t st_mtime;			/* Time of last modification.  */
     unsigned long int st_mtimensec;	/* Nsecs of last modification.  */
     __time_t st_ctime;			/* Time of last status change.  */
     unsigned long int st_ctimensec;	/* Nsecs of last status change.  */
-#endif
+# endif
     __ino64_t st_ino;			/* File serial number.		*/
   };
 #endif
@@ -167,3 +170,5 @@
 # define UTIME_NOW	((1l << 30) - 1l)
 # define UTIME_OMIT	((1l << 30) - 2l)
 #endif
+
+#endif	/* bits/stat.h */
--- sysdeps/unix/sysv/linux/m68k/clone.S
+++ sysdeps/unix/sysv/linux/m68k/clone.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996,97,98,2002 Free Software Foundation, Inc.
+/* Copyright (C) 1996,97,98,2002,2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Schwab (schwab@issan.informatik.uni-dortmund.de)
 
@@ -17,14 +17,21 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-/* clone is even more special than fork as it mucks with stacks
+/* clone() is even more special than fork() as it mucks with stacks
    and invokes a function in the right context after its all over.  */
 
 #include <sysdep.h>
 #define _ERRNO_H	1
 #include <bits/errno.h>
+#ifdef RESET_PID
+#include <tls.h>
+#endif
+
+#define CLONE_VM      0x00000100
+#define CLONE_THREAD  0x00010000
 
-/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg); */
+/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg,
+	     void *parent_tidptr, void *tls, void *child_tidptr) */
 
         .text
 ENTRY (__clone)
@@ -42,7 +49,17 @@
 	movel	16(%sp), -(%a1)
 
 	/* Do the system call */
-	movel	12(%sp), %d1		/* get flags */
+	movel	12+0(%sp), %d1		/* get flags */
+	movel	%d3, -(%a1)             /* save %d3 and get parent_tidptr */
+	movel	%d3, -(%sp)
+	movel	20+4(%sp), %d3
+	movel	%d4, -(%a1)		/* save %d4 and get child_tidptr */
+	movel	%d4, -(%sp)
+	movel	28+8(%sp), %d4
+	movel	%d5, -(%a1)             /* save %d5 and get tls */
+	movel	%d5, -(%sp)
+	movel	24+12(%sp), %d5
+	/* save %d2 and get stack pointer */
 #ifdef __mcoldfire__
 	movel	%d2, -(%a1)
 	movel	%d2, -(%sp)
@@ -57,6 +74,9 @@
 #else
 	exg	%d2, %a1		/* restore %d2 */
 #endif
+	movel	(%sp)+, %d5             /* restore %d5, %d4 and %d3 */
+	movel	(%sp)+, %d4
+	movel	(%sp)+, %d3
 
 	tstl	%d0
 	jmi	SYSCALL_ERROR_LABEL
@@ -65,11 +85,35 @@
 	rts
 
 thread_start:
+	cfi_startproc
+	cfi_undefined (pc)	/* Mark end of stack */
 	subl	%fp, %fp	/* terminate the stack frame */
+#ifdef RESET_PID
+	/* Check and see if we need to reset the PID.  */
+	movel	%d1, %a1
+	andl	#CLONE_THREAD, %d1
+	jne	donepid
+	movel	%a1, %d1
+	movel	#-1, %d0
+	andl	#CLONE_VM, %d1
+	jne	gotpid
+	movel	#SYS_ify (getpid), %d0
+	trap	#0
+gotpid:
+	movel	%a0, -(%sp)
+	movel	%d0, -(%sp)
+	bsrl	__m68k_read_tp@PLTPC
+	movel	(%sp)+, %d0
+	movel	%d0, PID_OFFSET(%a0)
+	movel	%d0, TID_OFFSET(%a0)
+	movel	(%sp)+, %a0
+donepid:
+#endif
 	jsr	(%a0)
 	movel	%d0, %d1
 	movel	#SYS_ify (exit), %d0
 	trap	#0
+	cfi_endproc
 
 PSEUDO_END (__clone)
 
--- sysdeps/unix/sysv/linux/m68k/coldfire
+++ sysdeps/unix/sysv/linux/m68k/coldfire
+(directory)
--- sysdeps/unix/sysv/linux/m68k/coldfire/m68k-helpers.S
+++ sysdeps/unix/sysv/linux/m68k/coldfire/m68k-helpers.S
+/* Copyright (C) 2010 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
+
+   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.
+
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file with other
+   programs, and to distribute those programs without any restriction
+   coming from the use of this file. (The GNU Lesser General Public
+   License restrictions do apply in other respects; for example, they
+   cover modification of the file, and distribution when not linked
+   into another program.)
+
+   Note that people who make modified versions of this file are not
+   obligated to grant this special exception for their modified
+   versions; it is their choice whether to do so. The GNU Lesser
+   General Public License gives permission to release a modified
+   version without this exception; this exception also makes it
+   possible to release a modified version which carries forward this
+   exception.
+
+   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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <sysdep.h>
+#include <bits/m68k-vdso.h>
+
+	.text
+
+	.hidden __vdso_read_tp_stub
+ENTRY (__vdso_read_tp_stub)
+	cfi_startproc
+	move.l	#__NR_get_thread_area, %d0
+	trap	#0
+	move.l	%d0, %a0
+	rts
+	cfi_endproc
+END (__vdso_read_tp_stub)
+
+# ifdef SHARED
+/* GCC will emit calls to this routine.  Linux has an
+   equivalent helper function (which clobbers fewer registers than
+   a normal function call) in a vdso; tail call to the
+   helper.  */
+# ifdef IS_IN_rtld
+/* rtld gets a hidden copy of __m68k_read_tp.  */
+	.hidden __m68k_read_tp
+# endif
+ENTRY (__m68k_read_tp)
+	cfi_startproc
+	move.l	#_GLOBAL_OFFSET_TABLE_@GOTPC, %a0
+	lea	(-6, %pc, %a0), %a0
+	move.l	M68K_VDSO_SYMBOL (__vdso_read_tp)@GOT(%a0), %a0
+	move.l	(%a0), %a0
+	jmp	(%a0)
+	cfi_endproc
+END (__m68k_read_tp)
+
+/* The following two stubs are for macros in atomic.h, they can't
+   clobber anything.  */
+
+	.hidden __vdso_atomic_cmpxchg_32_stub
+ENTRY (__vdso_atomic_cmpxchg_32_stub)
+	cfi_startproc
+	move.l	%d2, -(%sp)
+	cfi_adjust_cfa_offset (4)
+	cfi_rel_offset (%d2, 0)
+	move.l	%d0, %d2
+	move.l	#SYS_ify (atomic_cmpxchg_32), %d0
+	trap	#0
+	move.l	(%sp)+, %d2
+	cfi_adjust_cfa_offset (-4)
+	cfi_restore (%d2)
+	rts
+	cfi_endproc
+END (__vdso_atomic_cmpxchg_32_stub)
+
+	.hidden __vdso_atomic_barrier_stub
+ENTRY (__vdso_atomic_barrier_stub)
+	cfi_startproc
+	move.l	%d0, -(%sp)
+	cfi_adjust_cfa_offset (4)
+	move.l	#SYS_ify (atomic_barrier), %d0
+	trap	#0
+	move.l	(%sp)+, %d0
+	cfi_adjust_cfa_offset (-4)
+	rts
+	cfi_endproc
+END (__vdso_atomic_barrier_stub)
+# else /* !SHARED */
+/* If the vDSO is not available, use a syscall to get TP.  */
+	strong_alias (__vdso_read_tp_stub, __m68k_read_tp)
+# endif /* SHARED */
--- sysdeps/unix/sysv/linux/m68k/coldfire/nptl
+++ sysdeps/unix/sysv/linux/m68k/coldfire/nptl
+(directory)
--- sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits
+++ sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits
+(directory)
--- sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h
+++ sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h
+/* Copyright (C) 2010 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
+
+   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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#ifndef _BITS_ATOMIC_H
+#define _BITS_ATOMIC_H	1
+
+#include <stdint.h>
+#include <sysdep.h>
+#include <bits/m68k-vdso.h>
+
+/* Coldfire has no atomic compare-and-exchange operation, but the
+   kernel provides userspace atomicity operations.  Use them.  */
+
+typedef int32_t atomic32_t;
+typedef uint32_t uatomic32_t;
+typedef int_fast32_t atomic_fast32_t;
+typedef uint_fast32_t uatomic_fast32_t;
+
+typedef intptr_t atomicptr_t;
+typedef uintptr_t uatomicptr_t;
+typedef intmax_t atomic_max_t;
+typedef uintmax_t uatomic_max_t;
+
+/* The only basic operation needed is compare and exchange.  */
+/* For ColdFire we'll have to trap into the kernel mode anyway,
+   so trap from the library rather then from the kernel wrapper.  */
+#ifdef SHARED
+# define atomic_compare_and_exchange_val_acq(mem, newval, oldval)	\
+  ({									\
+    /* Use temporary variables to workaround call-clobberness of */	\
+    /* the registers.  */						\
+    __typeof (mem) _mem = mem;						\
+    __typeof (oldval) _oldval = oldval;					\
+    __typeof (newval) _newval = newval;					\
+    register __typeof (mem) _a0 asm ("a0") = _mem;			\
+    register __typeof (oldval) _d0 asm ("d0") = _oldval;		\
+    register __typeof (newval) _d1 asm ("d1") = _newval;		\
+    void *tmp;								\
+									\
+    asm ("movel #_GLOBAL_OFFSET_TABLE_@GOTPC, %2\n\t"			\
+	 "lea (-6, %%pc, %2), %2\n\t"					\
+	 "movel " STR_M68K_VDSO_SYMBOL (__vdso_atomic_cmpxchg_32)	\
+	 "@GOT(%2), %2\n\t"						\
+	 "movel (%2), %2\n\t"						\
+	 "jsr (%2)\n\t"							\
+	 : "+d" (_d0), "+m" (*_a0), "=&a" (tmp)				\
+	 : "a" (_a0), "d" (_d1));					\
+    _d0;								\
+  })
+#else
+# define atomic_compare_and_exchange_val_acq(mem, newval, oldval)	\
+  ({									\
+    /* Use temporary variables to workaround call-clobberness of */	\
+    /* the registers.  */						\
+    __typeof (mem) _mem = mem;						\
+    __typeof (oldval) _oldval = oldval;					\
+    __typeof (newval) _newval = newval;					\
+    register __typeof (oldval) _d0 asm ("d0")				\
+      = SYS_ify (atomic_cmpxchg_32);					\
+    register __typeof (mem) _a0 asm ("a0") = _mem;			\
+    register __typeof (oldval) _d2 asm ("d2") = _oldval;		\
+    register __typeof (newval) _d1 asm ("d1") = _newval;		\
+									\
+    asm ("trap #0"							\
+	 : "+d" (_d0), "+m" (*_a0)					\
+	 : "a" (_a0), "d" (_d2), "d" (_d1));				\
+    _d0;								\
+  })
+#endif
+
+#ifdef SHARED
+# define atomic_full_barrier()					 \
+  ({								 \
+    void *tmp;							 \
+								 \
+    asm ("movel #_GLOBAL_OFFSET_TABLE_@GOTPC, %0\n\t"		 \
+	 "lea (-6, %pc, %0), %0\n\t"				 \
+	 "movel " STR_M68K_VDSO_SYMBOL (__vdso_atomic_barrier)	 \
+	 "@GOT(%0), %0\n\t"					 \
+	 "movel (%0), %0\n\t"					 \
+	 "jsr (%0)\n\t"						 \
+	 : "=&a" (tmp));					 \
+  })
+#else
+# define atomic_full_barrier()				\
+  (INTERNAL_SYSCALL (atomic_barrier, , 0), (void) 0)
+#endif
+
+#endif
--- sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h
+++ sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h
+/* Copyright (C) 2010 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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#ifndef _LINUX_M68K_COLDFIRE_SYSDEP_H
+#define _LINUX_M68K_COLDFIRE_SYSDEP_H 1
+
+#include <sysdeps/unix/sysdep.h>
+#include <sysdeps/m68k/coldfire/sysdep.h>
+#include <sysdeps/unix/sysv/linux/m68k/sysdep.h>
+
+#define SYSCALL_ERROR_LOAD_GOT(reg)					      \
+    move.l &_GLOBAL_OFFSET_TABLE_@GOTPC, reg;				      \
+    lea (-6, %pc, reg), reg
+
+#endif
--- sysdeps/unix/sysv/linux/m68k/fchownat.c
+++ sysdeps/unix/sysv/linux/m68k/fchownat.c
@@ -1,128 +1 @@
-/* Copyright (C) 2005, 2006, 2009 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, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#include <errno.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-#include <bp-checks.h>
-
-#include <linux/posix_types.h>
-#include <kernel-features.h>
-
-#ifdef __NR_chown32
-# if __ASSUME_32BITUIDS == 0
-/* This variable is shared with all files that need to check for 32bit
-   uids.  */
-extern int __libc_missing_32bit_uids;
-# endif
-#endif /* __NR_chown32 */
-
-int
-fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag)
-{
-  if (flag & ~AT_SYMLINK_NOFOLLOW)
-    {
-      __set_errno (EINVAL);
-      return -1;
-    }
-
-  char *buf = NULL;
-
-  if (fd != AT_FDCWD && file[0] != '/')
-    {
-      size_t filelen = strlen (file);
-      if (__builtin_expect (filelen == 0, 0))
-	{
-	  __set_errno (ENOENT);
-	  return -1;
-	}
-
-      static const char procfd[] = "/proc/self/fd/%d/%s";
-      /* Buffer for the path name we are going to use.  It consists of
-	 - the string /proc/self/fd/
-	 - the file descriptor number
-	 - the file name provided.
-	 The final NUL is included in the sizeof.   A bit of overhead
-	 due to the format elements compensates for possible negative
-	 numbers.  */
-      size_t buflen = sizeof (procfd) + sizeof (int) * 3 + filelen;
-      buf = alloca (buflen);
-
-      __snprintf (buf, buflen, procfd, fd, file);
-      file = buf;
-    }
-
-  int result;
-  INTERNAL_SYSCALL_DECL (err);
-
-#if __ASSUME_32BITUIDS > 0
-  if (flag & AT_SYMLINK_NOFOLLOW)
-    result = INTERNAL_SYSCALL (lchown32, err, 3, CHECK_STRING (file), owner,
-			       group);
-  else
-    result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner,
-			       group);
-#else
-# ifdef __NR_chown32
-  if (__libc_missing_32bit_uids <= 0)
-    {
-      if (flag & AT_SYMLINK_NOFOLLOW)
-	result = INTERNAL_SYSCALL (lchown32, err, 3, CHECK_STRING (file),
-				   owner, group);
-      else
-	result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner,
-				   group);
-
-      if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
-	return result;
-      if (INTERNAL_SYSCALL_ERRNO (result, err) != ENOSYS)
-	goto fail;
-
-      __libc_missing_32bit_uids = 1;
-    }
-# endif /* __NR_chown32 */
-
-  if (((owner + 1) > (gid_t) ((__kernel_uid_t) -1U))
-      || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U)))
-    {
-      __set_errno (EINVAL);
-      return -1;
-    }
-
-  if (flag & AT_SYMLINK_NOFOLLOW)
-    result = INTERNAL_SYSCALL (lchown, err, 3, CHECK_STRING (file), owner,
-			       group);
-  else
-    result = INTERNAL_SYSCALL (chown, err, 3, CHECK_STRING (file), owner,
-			       group);
-#endif
-
-  if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0))
-    {
-    fail:
-      __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf);
-      result = -1;
-    }
-
-  return result;
-}
+#include <sysdeps/unix/sysv/linux/i386/fchownat.c>
--- sysdeps/unix/sysv/linux/m68k/init-first.c
+++ sysdeps/unix/sysv/linux/m68k/init-first.c
+/* Copyright (C) 2010 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
+
+   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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+/* Note: linking in vDSO to a static binary requires changes to
+   the main GLIBC proper.  Not yet implemented.  */
+#ifdef SHARED
+
+#include <dl-vdso.h>
+#include <bits/m68k-vdso.h>
+
+static inline void
+_libc_vdso_platform_setup (void)
+{
+  void *p;
+
+  PREPARE_VERSION (linux26, "LINUX_2.6", 61765110);
+
+  /* It may happen that rtld didn't initialize the vDSO, so fallback
+     to the syscall implementations if _dl_vdso_vsym returns NULL.
+     This may happen when a static executable dlopen's a dynamic library.
+     This really is nothing more than a workaround for rtld/csu
+     deficiency.  Ideally, init code would setup the vDSO for static
+     binaries too.  */
+
+  p = _dl_vdso_vsym ("__kernel_read_tp", &linux26);
+  if (p != NULL)
+    {
+      __vdso_read_tp = p;
+      __rtld___vdso_read_tp = p;
+    }
+  else
+    assert (__vdso_read_tp == (void *) __vdso_read_tp_stub);
+
+  p = _dl_vdso_vsym ("__kernel_atomic_cmpxchg_32", &linux26);
+  if (p != NULL)
+    {
+      __vdso_atomic_cmpxchg_32 = p;
+      __rtld___vdso_atomic_cmpxchg_32 = p;
+    }
+  else
+    assert (__vdso_atomic_cmpxchg_32
+	    == (void *) __vdso_atomic_cmpxchg_32_stub);
+
+  p = _dl_vdso_vsym ("__kernel_atomic_barrier", &linux26);
+  if (p != NULL)
+    {
+      __vdso_atomic_barrier = p;
+      __rtld___vdso_atomic_barrier = p;
+    }
+  else
+    assert (__vdso_atomic_barrier == (void *) __vdso_atomic_barrier_stub);
+}
+
+#define VDSO_SETUP _libc_vdso_platform_setup
+
+#endif /* SHARED */
+
+#include <sysdeps/unix/sysv/linux/init-first.c>
--- sysdeps/unix/sysv/linux/m68k/libc-m68k-vdso.c
+++ sysdeps/unix/sysv/linux/m68k/libc-m68k-vdso.c
+#include "m68k-vdso.c"
--- sysdeps/unix/sysv/linux/m68k/m680x0/m68k-helpers.S
+++ sysdeps/unix/sysv/linux/m68k/m680x0/m68k-helpers.S
+/* Copyright (C) 2010 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
+
+   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.
+
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file with other
+   programs, and to distribute those programs without any restriction
+   coming from the use of this file. (The GNU Lesser General Public
+   License restrictions do apply in other respects; for example, they
+   cover modification of the file, and distribution when not linked
+   into another program.)
+
+   Note that people who make modified versions of this file are not
+   obligated to grant this special exception for their modified
+   versions; it is their choice whether to do so. The GNU Lesser
+   General Public License gives permission to release a modified
+   version without this exception; this exception also makes it
+   possible to release a modified version which carries forward this
+   exception.
+
+   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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <sysdep.h>
+#include <bits/m68k-vdso.h>
+
+	.text
+
+	.hidden __vdso_read_tp_stub
+ENTRY (__vdso_read_tp_stub)
+	cfi_startproc
+	move.l	#__NR_get_thread_area, %d0
+	trap	#0
+	move.l	%d0, %a0
+	rts
+	cfi_endproc
+END (__vdso_read_tp_stub)
+
+# ifdef SHARED
+/* GCC will emit calls to this routine.  Linux has an
+   equivalent helper function (which clobbers fewer registers than
+   a normal function call) in a vdso; tail call to the
+   helper.  */
+# ifdef IS_IN_rtld
+/* rtld gets a hidden copy of __m68k_read_tp.  */
+	.hidden __m68k_read_tp
+# endif
+ENTRY (__m68k_read_tp)
+	cfi_startproc
+	lea	_GLOBAL_OFFSET_TABLE_@GOTPC(%pc), %a0
+	move.l	M68K_VDSO_SYMBOL (__vdso_read_tp)@GOT(%a0), %a0
+	jmp	([%a0])
+	cfi_endproc
+END (__m68k_read_tp)
+
+/* The following two stubs are for macros in atomic.h, they can't
+   clobber anything.  */
+
+	.hidden __vdso_atomic_cmpxchg_32_stub
+ENTRY (__vdso_atomic_cmpxchg_32_stub)
+	cfi_startproc
+	move.l	%d2, -(%sp)
+	cfi_adjust_cfa_offset (4)
+	cfi_rel_offset (%d2, 0)
+	move.l	%d0, %d2
+	move.l	#SYS_ify (atomic_cmpxchg_32), %d0
+	trap	#0
+	move.l	(%sp)+, %d2
+	cfi_adjust_cfa_offset (-4)
+	cfi_restore (%d2)
+	rts
+	cfi_endproc
+END (__vdso_atomic_cmpxchg_32_stub)
+
+	.hidden __vdso_atomic_barrier_stub
+ENTRY (__vdso_atomic_barrier_stub)
+	cfi_startproc
+	move.l	%d0, -(%sp)
+	cfi_adjust_cfa_offset (4)
+	move.l	#SYS_ify (atomic_barrier), %d0
+	trap	#0
+	move.l	(%sp)+, %d0
+	cfi_adjust_cfa_offset (-4)
+	rts
+	cfi_endproc
+END (__vdso_atomic_barrier_stub)
+# else /* !SHARED */
+/* If the vDSO is not available, use a syscall to get TP.  */
+	strong_alias (__vdso_read_tp_stub, __m68k_read_tp)
+# endif /* SHARED */
--- sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h
+++ sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h
+/* Copyright (C) 2010 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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#ifndef _LINUX_M68K_M680X0_SYSDEP_H
+#define _LINUX_M68K_M680X0_SYSDEP_H 1
+
+#include <sysdeps/unix/sysdep.h>
+#include <sysdeps/m68k/m680x0/sysdep.h>
+#include <sysdeps/unix/sysv/linux/m68k/sysdep.h>
+
+#define SYSCALL_ERROR_LOAD_GOT(reg)					      \
+    lea (_GLOBAL_OFFSET_TABLE_@GOTPC, %pc), reg
+
+#endif
--- sysdeps/unix/sysv/linux/m68k/m68k-vdso.c
+++ sysdeps/unix/sysv/linux/m68k/m68k-vdso.c
+/* Copyright (C) 2010 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
+
+   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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#ifdef SHARED
+
+#include <bits/m68k-vdso.h>
+
+/* Because these pointers are used from other libraries than libc,
+   they are exported at GLIBC_PRIVATE version.
+   We initialize them to syscall implementation so that they will be ready
+   to use from the very beginning.  */
+void * M68K_VDSO_SYMBOL (__vdso_read_tp)
+= (void *) __vdso_read_tp_stub;
+void * M68K_VDSO_SYMBOL (__vdso_atomic_cmpxchg_32)
+= (void *) __vdso_atomic_cmpxchg_32_stub;
+void * M68K_VDSO_SYMBOL (__vdso_atomic_barrier)
+= (void *) __vdso_atomic_barrier_stub;
+
+#endif /* SHARED */
--- sysdeps/unix/sysv/linux/m68k/nptl
+++ sysdeps/unix/sysv/linux/m68k/nptl
+(directory)
--- sysdeps/unix/sysv/linux/m68k/nptl/bits
+++ sysdeps/unix/sysv/linux/m68k/nptl/bits
+(directory)
--- sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h
+++ sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h
+/* Copyright (C) 2010 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
+
+   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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#ifndef _BITS_PTHREADTYPES_H
+#define _BITS_PTHREADTYPES_H	1
+
+#include <endian.h>
+
+#define __SIZEOF_PTHREAD_ATTR_T 36
+#define __SIZEOF_PTHREAD_MUTEX_T 24
+#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
+#define __SIZEOF_PTHREAD_COND_T 48
+#define __SIZEOF_PTHREAD_CONDATTR_T 4
+#define __SIZEOF_PTHREAD_RWLOCK_T 32
+#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
+#define __SIZEOF_PTHREAD_BARRIER_T 20
+#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
+
+
+/* Thread identifiers.  The structure of the attribute type is
+   deliberately not exposed.  */
+typedef unsigned long int pthread_t;
+
+
+typedef union
+{
+  char __size[__SIZEOF_PTHREAD_ATTR_T];
+  long int __align;
+} pthread_attr_t;
+
+
+typedef struct __pthread_internal_slist
+{
+  struct __pthread_internal_slist *__next;
+} __pthread_slist_t;
+
+
+/* Data structures for mutex handling.  The structure of the attribute
+   type is deliberately not exposed.  */
+typedef union
+{
+  struct __pthread_mutex_s
+  {
+    int __lock __attribute__ ((__aligned__ (4)));
+    unsigned int __count;
+    int __owner;
+    /* KIND must stay at this position in the structure to maintain
+       binary compatibility.  */
+    int __kind;
+    unsigned int __nusers;
+    __extension__ union
+    {
+      int __spins;
+      __pthread_slist_t __list;
+    };
+  } __data;
+  char __size[__SIZEOF_PTHREAD_MUTEX_T];
+  long int __align;
+} pthread_mutex_t;
+
+typedef union
+{
+  char __size[__SIZEOF_PTHREAD_MUTEXATTR_T];
+  int __align;
+} pthread_mutexattr_t;
+
+
+/* Data structure for conditional variable handling.  The structure of
+   the attribute type is deliberately not exposed.  */
+typedef union
+{
+  struct
+  {
+    int __lock __attribute__ ((__aligned__ (4)));
+    unsigned int __futex;
+    __extension__ unsigned long long int __total_seq;
+    __extension__ unsigned long long int __wakeup_seq;
+    __extension__ unsigned long long int __woken_seq;
+    void *__mutex;
+    unsigned int __nwaiters;
+    unsigned int __broadcast_seq;
+  } __data;
+  char __size[__SIZEOF_PTHREAD_COND_T];
+  __extension__ long long int __align;
+} pthread_cond_t;
+
+typedef union
+{
+  char __size[__SIZEOF_PTHREAD_CONDATTR_T];
+  int __align;
+} pthread_condattr_t;
+
+
+/* Keys for thread-specific data */
+typedef unsigned int pthread_key_t;
+
+
+/* Once-only execution */
+typedef int __attribute__ ((__aligned__ (4))) pthread_once_t;
+
+
+#if defined __USE_UNIX98 || defined __USE_XOPEN2K
+/* Data structure for read-write lock variable handling.  The
+   structure of the attribute type is deliberately not exposed.  */
+typedef union
+{
+  struct
+  {
+    int __lock __attribute__ ((__aligned__ (4)));
+    unsigned int __nr_readers;
+    unsigned int __readers_wakeup;
+    unsigned int __writer_wakeup;
+    unsigned int __nr_readers_queued;
+    unsigned int __nr_writers_queued;
+    unsigned char __pad1;
+    unsigned char __pad2;
+    unsigned char __shared;
+    /* FLAGS must stay at this position in the structure to maintain
+       binary compatibility.  */
+    unsigned char __flags;
+    int __writer;
+  } __data;
+  char __size[__SIZEOF_PTHREAD_RWLOCK_T];
+  long int __align;
+} pthread_rwlock_t;
+
+typedef union
+{
+  char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T];
+  long int __align;
+} pthread_rwlockattr_t;
+#endif
+
+
+#ifdef __USE_XOPEN2K
+/* POSIX spinlock data type.  */
+typedef volatile int pthread_spinlock_t;
+
+
+/* POSIX barriers data type.  The structure of the type is
+   deliberately not exposed.  */
+typedef union
+{
+  char __size[__SIZEOF_PTHREAD_BARRIER_T];
+  long int __align __attribute__ ((__aligned__ (4)));
+} pthread_barrier_t;
+
+typedef union
+{
+  char __size[__SIZEOF_PTHREAD_BARRIERATTR_T];
+  int __align;
+} pthread_barrierattr_t;
+#endif
+
+
+#endif	/* bits/pthreadtypes.h */
--- sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h
+++ sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h
+/* Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
+
+   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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#ifndef _SEMAPHORE_H
+# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
+#endif
+
+
+#define __SIZEOF_SEM_T	16
+
+
+/* Value returned if `sem_open' failed.  */
+#define SEM_FAILED      ((sem_t *) 0)
+
+
+typedef union
+{
+  char __size[__SIZEOF_SEM_T];
+  long int __align __attribute__ ((__aligned__ (4)));
+} sem_t;
--- sysdeps/unix/sysv/linux/m68k/nptl/clone.S
+++ sysdeps/unix/sysv/linux/m68k/nptl/clone.S
+#define RESET_PID
+#include "../clone.S"
--- sysdeps/unix/sysv/linux/m68k/nptl/createthread.c
+++ sysdeps/unix/sysv/linux/m68k/nptl/createthread.c
+/* Copyright (C) 2010 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
+
+   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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+/* Value passed to 'clone' for initialization of the thread register.  */
+#define TLS_VALUE ((void *) (pd) \
+		   + TLS_TCB_OFFSET + TLS_PRE_TCB_SIZE)
+
+/* Get the real implementation.	 */
+#include <nptl/sysdeps/pthread/createthread.c>
--- sysdeps/unix/sysv/linux/m68k/nptl/fork.c
+++ sysdeps/unix/sysv/linux/m68k/nptl/fork.c
+/* Copyright (C) 2010 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
+
+   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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <sched.h>
+#include <signal.h>
+#include <sysdep.h>
+#include <tls.h>
+
+#define ARCH_FORK() \
+  INLINE_SYSCALL (clone, 5,						      \
+		  CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID | SIGCHLD, 0,     \
+		  NULL, &THREAD_SELF->tid, NULL)
+
+#include <sysdeps/unix/sysv/linux/fork.c>
--- sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h
+++ sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h
+/* Copyright (C) 2010 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
+
+   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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+/* Borrowed from ARM's version.  */
+
+#ifndef _LOWLEVELLOCK_H
+#define _LOWLEVELLOCK_H	1
+
+#include <time.h>
+#include <sys/param.h>
+#include <bits/pthreadtypes.h>
+#include <atomic.h>
+#include <kernel-features.h>
+
+#define FUTEX_WAIT		0
+#define FUTEX_WAKE		1
+#define FUTEX_REQUEUE		3
+#define FUTEX_CMP_REQUEUE	4
+#define FUTEX_WAKE_OP		5
+#define FUTEX_OP_CLEAR_WAKE_IF_GT_ONE	((4 << 24) | 1)
+#define FUTEX_LOCK_PI		6
+#define FUTEX_UNLOCK_PI		7
+#define FUTEX_TRYLOCK_PI	8
+#define FUTEX_WAIT_BITSET	9
+#define FUTEX_WAKE_BITSET	10
+#define FUTEX_PRIVATE_FLAG	128
+#define FUTEX_CLOCK_REALTIME	256
+
+#define FUTEX_BITSET_MATCH_ANY	0xffffffff
+
+/* Values for 'private' parameter of locking macros.  Yes, the
+   definition seems to be backwards.  But it is not.  The bit will be
+   reversed before passing to the system call.  */
+#define LLL_PRIVATE	0
+#define LLL_SHARED	FUTEX_PRIVATE_FLAG
+
+
+#if !defined NOT_IN_libc || defined IS_IN_rtld
+/* In libc.so or ld.so all futexes are private.  */
+# ifdef __ASSUME_PRIVATE_FUTEX
+#  define __lll_private_flag(fl, private) \
+  ((fl) | FUTEX_PRIVATE_FLAG)
+# else
+#  define __lll_private_flag(fl, private) \
+  ((fl) | THREAD_GETMEM (THREAD_SELF, header.private_futex))
+# endif
+#else
+# ifdef __ASSUME_PRIVATE_FUTEX
+#  define __lll_private_flag(fl, private) \
+  (((fl) | FUTEX_PRIVATE_FLAG) ^ (private))
+# else
+#  define __lll_private_flag(fl, private) \
+  (__builtin_constant_p (private)					      \
+   ? ((private) == 0							      \
+      ? ((fl) | THREAD_GETMEM (THREAD_SELF, header.private_futex))	      \
+      : (fl))								      \
+   : ((fl) | (((private) ^ FUTEX_PRIVATE_FLAG)				      \
+	      & THREAD_GETMEM (THREAD_SELF, header.private_futex))))
+# endif
+#endif
+
+
+#define lll_futex_wait(futexp, val, private) \
+  lll_futex_timed_wait(futexp, val, NULL, private)
+
+#define lll_futex_timed_wait(futexp, val, timespec, private) \
+  ({									      \
+    INTERNAL_SYSCALL_DECL (__err);					      \
+    long int __ret;							      \
+    __ret = INTERNAL_SYSCALL (futex, __err, 4, (futexp),		      \
+			      __lll_private_flag (FUTEX_WAIT, private),	      \
+			      (val), (timespec));			      \
+    __ret;								      \
+  })
+
+#define lll_futex_wake(futexp, nr, private) \
+  ({									      \
+    INTERNAL_SYSCALL_DECL (__err);					      \
+    long int __ret;							      \
+    __ret = INTERNAL_SYSCALL (futex, __err, 4, (futexp),		      \
+			      __lll_private_flag (FUTEX_WAKE, private),	      \
+			      (nr), 0);					      \
+    __ret;								      \
+  })
+
+#define lll_robust_dead(futexv, private) \
+  do									      \
+    {									      \
+      int *__futexp = &(futexv);					      \
+      atomic_or (__futexp, FUTEX_OWNER_DIED);				      \
+      lll_futex_wake (__futexp, 1, private);				      \
+    }									      \
+  while (0)
+
+/* Returns non-zero if error happened, zero if success.  */
+#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val, private) \
+  ({									      \
+    INTERNAL_SYSCALL_DECL (__err);					      \
+    long int __ret;							      \
+    __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp),		      \
+			      __lll_private_flag (FUTEX_CMP_REQUEUE, private),\
+			      (nr_wake), (nr_move), (mutex), (val));	      \
+    INTERNAL_SYSCALL_ERROR_P (__ret, __err);				      \
+  })
+
+/* Returns non-zero if error happened, zero if success.  */
+#define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2, private) \
+  ({									      \
+    INTERNAL_SYSCALL_DECL (__err);					      \
+    long int __ret;							      \
+    __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp),		      \
+			      __lll_private_flag (FUTEX_WAKE_OP, private),    \
+			      (nr_wake), (nr_wake2), (futexp2),		      \
+			      FUTEX_OP_CLEAR_WAKE_IF_GT_ONE);		      \
+    INTERNAL_SYSCALL_ERROR_P (__ret, __err);				      \
+  })
+
+#define lll_trylock(lock)				\
+  atomic_compare_and_exchange_val_acq (&(lock), 1, 0)
+
+#define lll_cond_trylock(lock)				\
+  atomic_compare_and_exchange_val_acq (&(lock), 2, 0)
+
+#define lll_robust_trylock(lock, id)			\
+  atomic_compare_and_exchange_val_acq (&(lock), id, 0)
+
+extern void __lll_lock_wait_private (int *futex) attribute_hidden;
+extern void __lll_lock_wait (int *futex, int private) attribute_hidden;
+extern int __lll_robust_lock_wait (int *futex, int private) attribute_hidden;
+
+#define __lll_lock(futex, private)					      \
+  ((void) ({								      \
+    int *__futex = (futex);						      \
+    if (__builtin_expect (atomic_compare_and_exchange_val_acq (__futex,       \
+								1, 0), 0))    \
+      {									      \
+	if (__builtin_constant_p (private) && (private) == LLL_PRIVATE)	      \
+	  __lll_lock_wait_private (__futex);				      \
+	else								      \
+	  __lll_lock_wait (__futex, private);				      \
+      }									      \
+  }))
+#define lll_lock(futex, private) __lll_lock (&(futex), private)
+
+
+#define __lll_robust_lock(futex, id, private)				      \
+  ({									      \
+    int *__futex = (futex);						      \
+    int __val = 0;							      \
+									      \
+    if (__builtin_expect (atomic_compare_and_exchange_bool_acq (__futex, id,  \
+								0), 0))	      \
+      __val = __lll_robust_lock_wait (__futex, private);		      \
+    __val;								      \
+  })
+#define lll_robust_lock(futex, id, private) \
+  __lll_robust_lock (&(futex), id, private)
+
+
+#define __lll_cond_lock(futex, private)					      \
+  ((void) ({								      \
+    int *__futex = (futex);						      \
+    if (__builtin_expect (atomic_exchange_acq (__futex, 2), 0))		      \
+      __lll_lock_wait (__futex, private);				      \
+  }))
+#define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private)
+
+
+#define lll_robust_cond_lock(futex, id, private) \
+  __lll_robust_lock (&(futex), (id) | FUTEX_WAITERS, private)
+
+
+extern int __lll_timedlock_wait (int *futex, const struct timespec *,
+				 int private) attribute_hidden;
+extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *,
+					int private) attribute_hidden;
+
+#define __lll_timedlock(futex, abstime, private)			      \
+  ({									      \
+     int *__futex = (futex);						      \
+     int __val = 0;							      \
+									      \
+     if (__builtin_expect (atomic_exchange_acq (__futex, 1), 0))	      \
+       __val = __lll_timedlock_wait (__futex, abstime, private);	      \
+     __val;								      \
+  })
+#define lll_timedlock(futex, abstime, private) \
+  __lll_timedlock (&(futex), abstime, private)
+
+
+#define __lll_robust_timedlock(futex, abstime, id, private)		      \
+  ({									      \
+    int *__futex = (futex);						      \
+    int __val = 0;							      \
+									      \
+    if (__builtin_expect (atomic_compare_and_exchange_bool_acq (__futex, id,  \
+								0), 0))	      \
+      __val = __lll_robust_timedlock_wait (__futex, abstime, private);	      \
+    __val;								      \
+  })
+#define lll_robust_timedlock(futex, abstime, id, private) \
+  __lll_robust_timedlock (&(futex), abstime, id, private)
+
+
+#define __lll_unlock(futex, private) \
+  (void)							\
+    ({ int *__futex = (futex);					\
+       int __oldval = atomic_exchange_rel (__futex, 0);		\
+       if (__builtin_expect (__oldval > 1, 0))			\
+	 lll_futex_wake (__futex, 1, private);			\
+    })
+#define lll_unlock(futex, private) __lll_unlock(&(futex), private)
+
+
+#define __lll_robust_unlock(futex, private) \
+  (void)							\
+    ({ int *__futex = (futex);					\
+       int __oldval = atomic_exchange_rel (__futex, 0);		\
+       if (__builtin_expect (__oldval & FUTEX_WAITERS, 0))	\
+	 lll_futex_wake (__futex, 1, private);			\
+    })
+#define lll_robust_unlock(futex, private) \
+  __lll_robust_unlock(&(futex), private)
+
+
+#define lll_islocked(futex) \
+  (futex != 0)
+
+
+/* Our internal lock implementation is identical to the binary-compatible
+   mutex implementation. */
+
+/* Initializers for lock.  */
+#define LLL_LOCK_INITIALIZER		(0)
+#define LLL_LOCK_INITIALIZER_LOCKED	(1)
+
+/* The states of a lock are:
+    0  -  untaken
+    1  -  taken by one user
+   >1  -  taken by more users */
+
+/* The kernel notifies a process which uses CLONE_CLEARTID via futex
+   wakeup when the clone terminates.  The memory location contains the
+   thread ID while the clone is running and is reset to zero
+   afterwards.	*/
+#define lll_wait_tid(tid) \
+  do {							\
+    __typeof (tid) __tid;				\
+    while ((__tid = (tid)) != 0)			\
+      lll_futex_wait (&(tid), __tid, LLL_SHARED);	\
+  } while (0)
+
+extern int __lll_timedwait_tid (int *, const struct timespec *)
+     attribute_hidden;
+
+#define lll_timedwait_tid(tid, abstime) \
+  ({							\
+    int __res = 0;					\
+    if ((tid) != 0)					\
+      __res = __lll_timedwait_tid (&(tid), (abstime));	\
+    __res;						\
+  })
+
+#endif	/* lowlevellock.h */
--- sysdeps/unix/sysv/linux/m68k/nptl/pt-vfork.S
+++ sysdeps/unix/sysv/linux/m68k/nptl/pt-vfork.S
+/* Copyright (C) 2010 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
+
+   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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <tcb-offsets.h>
+
+#define SAVE_PID \
+	bsrl	__m68k_read_tp@PLTPC	; /* Get the thread pointer.  */ \
+	movel	%a0, %a1		; /* Save TP for RESTORE_PID.  */ \
+	movel	PID_OFFSET(%a1), %d0	; /* Get the PID.  */ \
+	movel	%d0, %d1		; /* Save PID for RESTORE_PID.  */ \
+	negl	%d0			; /* Negate the PID.  */ \
+	movel	%d0, PID_OFFSET(%a1)	; /* Store the temporary PID.  */
+
+#define RESTORE_PID \
+	tstl	%d0			; \
+	beq	1f			; /* If we are the parent... */ \
+	movel	%d1, PID_OFFSET(%a1)	; /* Restore the PID.  */ \
+1:
+
+#include <sysdeps/unix/sysv/linux/m68k/vfork.S>
--- sysdeps/unix/sysv/linux/m68k/nptl/pthread_once.c
+++ sysdeps/unix/sysv/linux/m68k/nptl/pthread_once.c
+/* Copyright (C) 2010 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
+
+   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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include "pthreadP.h"
+#include <lowlevellock.h>
+
+unsigned long int __fork_generation attribute_hidden;
+
+static void
+clear_once_control (void *arg)
+{
+  pthread_once_t *once_control = (pthread_once_t *) arg;
+
+  *once_control = 0;
+  lll_futex_wake (once_control, INT_MAX, LLL_PRIVATE);
+}
+
+int
+__pthread_once (pthread_once_t *once_control, void (*init_routine) (void))
+{
+  for (;;)
+    {
+      int oldval;
+      int newval;
+
+      /* Pseudo code:
+	 newval = __fork_generation | 1;
+	 oldval = *once_control;
+	 if ((oldval & 2) == 0)
+	   *once_control = newval;
+	 Do this atomically.
+      */
+      do
+	{
+	  newval = __fork_generation | 1;
+	  oldval = *once_control;
+	  if (oldval & 2)
+	    break;
+	} while (atomic_compare_and_exchange_val_acq (once_control, newval, oldval) != \
oldval); +
+      /* Check if the initializer has already been done.  */
+      if ((oldval & 2) != 0)
+	return 0;
+
+      /* Check if another thread already runs the initializer.	*/
+      if ((oldval & 1) == 0)
+	break;
+
+      /* Check whether the initializer execution was interrupted by a fork.  */
+      if (oldval != newval)
+	break;
+
+      /* Same generation, some other thread was faster. Wait.  */
+      lll_futex_wait (once_control, oldval, LLL_PRIVATE);
+    }
+
+  /* This thread is the first here.  Do the initialization.
+     Register a cleanup handler so that in case the thread gets
+     interrupted the initialization can be restarted.  */
+  pthread_cleanup_push (clear_once_control, once_control);
+
+  init_routine ();
+
+  pthread_cleanup_pop (0);
+
+  /* Say that the initialisation is done.  */
+  *once_control = __fork_generation | 2;
+
+  /* Wake up all other threads.  */
+  lll_futex_wake (once_control, INT_MAX, LLL_PRIVATE);
+
+  return 0;
+}
+weak_alias (__pthread_once, pthread_once)
+strong_alias (__pthread_once, __pthread_once_internal)
--- sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h
+++ sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h
+/* Copyright (C) 2010 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
+
+   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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <sysdep.h>
+#include <tls.h>
+#ifndef __ASSEMBLER__
+# include <nptl/pthreadP.h>
+#endif
+
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
+
+# undef PSEUDO
+# define PSEUDO(name, syscall_name, args)				      \
+  .text;								      \
+  ENTRY (name)								      \
+    SINGLE_THREAD_P;							      \
+    jne .Lpseudo_cancel;						      \
+  .type __##syscall_name##_nocancel,@function;			              \
+  .globl __##syscall_name##_nocancel;				 	      \
+  __##syscall_name##_nocancel:					              \
+    DO_CALL (syscall_name, args);					      \
+    cmp.l &-4095, %d0;							      \
+    jcc SYSCALL_ERROR_LABEL;						      \
+    rts;								      \
+  .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel;	      \
+  .Lpseudo_cancel:							      \
+    cfi_startproc;							      \
+    CENABLE;								      \
+    DOCARGS_##args							      \
+    move.l %d0, -(%sp); /* Save result of CENABLE.  */  		      \
+    cfi_adjust_cfa_offset (4); \
+    move.l &SYS_ify (syscall_name), %d0;				      \
+    trap &0;								      \
+    move.l %d0, %d2;							      \
+    CDISABLE;								      \
+    addq.l &4, %sp; /* Remove result of CENABLE from the stack.  */           \
+    cfi_adjust_cfa_offset (-4); \
+    move.l %d2, %d0;							      \
+    UNDOCARGS_##args							      \
+    cmp.l &-4095, %d0;							      \
+    jcc SYSCALL_ERROR_LABEL;		                                      \
+    cfi_endproc
+
+/* Note: we use D2 to save syscall's return value as D0 will be clobbered in
+   CDISABLE.  */
+# define DOCARGS_0	move.l %d2, -(%sp);		\
+  cfi_adjust_cfa_offset (4); cfi_rel_offset (%d2, 0);
+# define UNDOCARGS_0	move.l (%sp)+, %d2;	\
+  cfi_adjust_cfa_offset (-4); cfi_restore (%d2);
+
+# define DOCARGS_1	_DOCARGS_1 (4); DOCARGS_0
+# define _DOCARGS_1(n)	move.l n(%sp), %d1;
+# define UNDOCARGS_1	UNDOCARGS_0
+
+# define DOCARGS_2	_DOCARGS_2 (8)
+# define _DOCARGS_2(n)	DOCARGS_0 move.l n+4(%sp), %d2; _DOCARGS_1 (n)
+# define UNDOCARGS_2	UNDOCARGS_0
+
+/* TODO: We can optimize DOCARGS_{3, 4} by saving registers to a0 and a1
+   instead of pushing them on stack.  */
+# define DOCARGS_3	_DOCARGS_3 (12)
+# define _DOCARGS_3(n)	move.l %d3, -(%sp);				\
+  cfi_adjust_cfa_offset (4); cfi_rel_offset (%d3, 0);			\
+  move.l n+4(%sp), %d3; _DOCARGS_2 (n)
+# define UNDOCARGS_3	UNDOCARGS_2 move.l (%sp)+, %d3;		\
+  cfi_adjust_cfa_offset (-4); cfi_restore (%d3);
+
+# define DOCARGS_4	_DOCARGS_4 (16)
+# define _DOCARGS_4(n)	move.l %d4, -(%sp);			\
+  cfi_adjust_cfa_offset (4); cfi_rel_offset (%d4, 0);		\
+  move.l n+4(%sp), %d4; _DOCARGS_3 (n)
+# define UNDOCARGS_4	UNDOCARGS_3 move.l (%sp)+, %d4;	\
+  cfi_adjust_cfa_offset (-4); cfi_restore (%d4);
+
+# define DOCARGS_5	_DOCARGS_5 (20)
+# define _DOCARGS_5(n)	move.l %d5, %a1; cfi_register (%d5, a1); \
+  move.l n(%sp), %d5; _DOCARGS_4 (n-4)
+# define UNDOCARGS_5	UNDOCARGS_4 move.l %a1, %d5; cfi_restore (%d5);
+
+# define DOCARGS_6	_DOCARGS_6 (24)
+# define _DOCARGS_6(n)	move.l n(%sp), %a0; _DOCARGS_5 (n-4)
+# define UNDOCARGS_6	UNDOCARGS_5
+
+# ifdef PIC
+#  define PSEUDO_JMP(sym) jbsr sym ## @PLTPC
+# else
+#  define PSEUDO_JMP(sym) jbsr sym
+# endif
+
+# ifdef IS_IN_libpthread
+#  define CENABLE	PSEUDO_JMP (__pthread_enable_asynccancel)
+#  define CDISABLE	PSEUDO_JMP (__pthread_disable_asynccancel)
+# elif !defined NOT_IN_libc
+#  define CENABLE	PSEUDO_JMP (__libc_enable_asynccancel)
+#  define CDISABLE	PSEUDO_JMP (__libc_disable_asynccancel)
+# elif defined IS_IN_librt
+#  define CENABLE	PSEUDO_JMP (__librt_enable_asynccancel)
+#  define CDISABLE	PSEUDO_JMP (__librt_disable_asynccancel)
+# else
+#  error Unsupported library
+# endif
+
+# ifndef __ASSEMBLER__
+#  define SINGLE_THREAD_P						\
+  __builtin_expect (THREAD_GETMEM (THREAD_SELF,				\
+				   header.multiple_threads) == 0, 1)
+# else
+#  define SINGLE_THREAD_P			\
+  PSEUDO_JMP (__m68k_read_tp);		        \
+  tst.l MULTIPLE_THREADS_OFFSET(%a0)
+# endif
+
+#elif !defined __ASSEMBLER__
+
+# define SINGLE_THREAD_P (1)
+# define NO_CANCELLATION (1)
+
+#endif
+
+#ifndef __ASSEMBLER__
+# define RTLD_SINGLE_THREAD_P					  \
+  __builtin_expect (THREAD_GETMEM (THREAD_SELF,			  \
+				   header.multiple_threads) == 0, \
+		    1)
+#endif
--- sysdeps/unix/sysv/linux/m68k/nptl/vfork.S
+++ sysdeps/unix/sysv/linux/m68k/nptl/vfork.S
+/* Copyright (C) 2010 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
+
+   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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <tcb-offsets.h>
+
+#define SAVE_PID \
+	bsrl	__m68k_read_tp@PLTPC	; /* Get the thread pointer.  */ \
+	movel	%a0, %a1		; /* Save TP for RESTORE_PID.  */ \
+	movel	PID_OFFSET(%a1), %d0	; /* Get the PID.  */ \
+	movel	%d0, %d1		; /* Save PID for RESTORE_PID.  */ \
+	negl	%d0			; /* Negate the PID.  */ \
+	bne	1f			; /* If it was zero... */ \
+	movel	#0x80000000, %d0	; /* use 0x80000000 instead.  */ \
+1:	movel	%d0, PID_OFFSET(%a1)	; /* Store the temporary PID.  */
+
+#define RESTORE_PID \
+	tstl	%d0			; \
+	beq	1f			; /* If we are the parent... */ \
+	movel	%d1, PID_OFFSET(%a1)	; /* Restore the PID.  */ \
+1:
+
+#include <sysdeps/unix/sysv/linux/m68k/vfork.S>
--- sysdeps/unix/sysv/linux/m68k/register-dump.h
+++ sysdeps/unix/sysv/linux/m68k/register-dump.h
@@ -40,7 +40,6 @@
 
 */
 
-#ifndef __mcoldfire__
 /* Linux saves only the call-clobbered registers in the sigcontext.  We
    need to use a trampoline that saves the rest so that the C code can
    access them.  We use the sc_fpstate field, since the handler is not
@@ -59,14 +58,17 @@
 	/* Clear the first 4 bytes to make it a null fp state, just\n\
 	   in case the handler does return.  */\n\
 	clr.l (%%a0)+\n\
-	movem.l %%d2-%%d7/%%a2-%%a6,(%%a0)\n\
-	fmovem.x %%fp2-%%fp7,11*4(%%a0)\n\
-	jra real_catch_segfault"
+	movem.l %%d2-%%d7/%%a2-%%a6,(%%a0)\n"
+#ifndef __mcoldfire__
+       "fmovem.x %%fp2-%%fp7,11*4(%%a0)\n"
+#elif defined __mcffpu__
+       "fmovem.d %%fp2-%%fp7,11*4(%%a0)\n"
+#endif
+       "jra real_catch_segfault"
        : : "n" (offsetof (struct sigcontext, sc_fpstate)));
 }
 #define catch_segfault(a,b) \
   __attribute_used__ real_catch_segfault(a,b)
-#endif
 
 static void
 hexvalue (unsigned long int value, char *buf, size_t len)
@@ -104,36 +106,19 @@
   /* Generate strings of register contents.  */
   hexvalue (ctx->sc_d0, regs[0], 8);
   hexvalue (ctx->sc_d1, regs[1], 8);
-#ifdef __mcoldfire__
-  hexvalue (ctx->sc_d2, regs[2], 8);
-  hexvalue (ctx->sc_d3, regs[3], 8);
-  hexvalue (ctx->sc_d4, regs[4], 8);
-  hexvalue (ctx->sc_d5, regs[5], 8);
-  hexvalue (ctx->sc_d6, regs[6], 8);
-  hexvalue (ctx->sc_d7, regs[7], 8);
-#else
   hexvalue (*p++, regs[2], 8);
   hexvalue (*p++, regs[3], 8);
   hexvalue (*p++, regs[4], 8);
   hexvalue (*p++, regs[5], 8);
   hexvalue (*p++, regs[6], 8);
   hexvalue (*p++, regs[7], 8);
-#endif
   hexvalue (ctx->sc_a0, regs[8], 8);
   hexvalue (ctx->sc_a1, regs[9], 8);
-#ifdef __mcoldfire__
-  hexvalue (ctx->sc_a2, regs[10], 8);
-  hexvalue (ctx->sc_a3, regs[11], 8);
-  hexvalue (ctx->sc_a4, regs[12], 8);
-  hexvalue (ctx->sc_a5, regs[13], 8);
-  hexvalue (ctx->sc_a6, regs[14], 8);
-#else
   hexvalue (*p++, regs[10], 8);
   hexvalue (*p++, regs[11], 8);
   hexvalue (*p++, regs[12], 8);
   hexvalue (*p++, regs[13], 8);
   hexvalue (*p++, regs[14], 8);
-#endif
   hexvalue (ctx->sc_usp, regs[15], 8);
   hexvalue (ctx->sc_pc, regs[16], 8);
   hexvalue (ctx->sc_sr, regs[17], 4);
@@ -142,9 +127,6 @@
   for (i = 0; i < 2; i++)
     for (j = 0; j < fpreg_size; j += 8)
       hexvalue (*pfp++, fpregs[i] + j, 8);
-#ifdef __mcoldfire__
-  p = pfp;
-#endif
   for (i = 2; i < 8; i++)
     for (j = 0; j < fpreg_size; j += 8)
       hexvalue (*p++, fpregs[i] + j, 8);
--- sysdeps/unix/sysv/linux/m68k/socket.S
+++ sysdeps/unix/sysv/linux/m68k/socket.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 2010 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
@@ -41,8 +41,11 @@
 
 .globl __socket
 ENTRY (__socket)
-#if defined NEED_CANCELLATION && defined CENABLE
-	SINGLE_THREAD_P (%a0)
+#ifdef NEED_CANCELLATION
+# if !defined CENABLE || !defined CDISABLE
+#  error CENABLE and/or CDISABLE is not defined
+# endif
+	SINGLE_THREAD_P
 	jne 1f
 #endif
 
@@ -69,21 +72,26 @@
 	/* Successful; return the syscall's value.  */
 	rts
 
-#if defined NEED_CANCELLATION && defined CENABLE
-1:	/* Enable asynchronous cancellation.  */
+#ifdef NEED_CANCELLATION
+1:	cfi_startproc
+	/* Enable asynchronous cancellation.  */
 	CENABLE
 
-	/* Save registers.  */
+	/* Save D2.  */
 	move.l %d2, -(%sp)
-	move.l %d0, -(%sp)
+	cfi_adjust_cfa_offset (4)
+	cfi_rel_offset (%d2, 0)
 
-	move.l #SYS_ify (socketcall), %d0 /* System call number in %d0.  */
+	/* Save the result of CENABLE.  */
+	move.l %d0, -(%sp)
+	cfi_adjust_cfa_offset (4)
 
 	/* Use ## so `socket' is a separate token that might be #define'd.  */
 	move.l #P (SOCKOP_,socket), %d1	/* Subcode is first arg to syscall.  */
 	lea 4+8(%sp), %a1		/* Address of args is 2nd arg.  */
 	move.l %a1, %d2
 
+	move.l #SYS_ify (socketcall), %d0 /* System call number in %d0.  */
 	/* Do the system call trap.  */
 	trap #0
 
@@ -91,14 +99,18 @@
 	move.l %d0, %d2
 	CDISABLE
 	addq.l #4, %sp
+	cfi_adjust_cfa_offset (-4)
 	move.l %d2, %d0
 
 	/* Restore registers.  */
 	move.l (%sp)+, %d2
+	cfi_adjust_cfa_offset (-4)
+	cfi_restore (%d2)
 
 	/* %d0 is < 0 if there was an error.  */
 	tst.l %d0
 	jmi SYSCALL_ERROR_LABEL
+	cfi_endproc
 
 	/* Successful; return the syscall's value.  */
 	rts
--- sysdeps/unix/sysv/linux/m68k/sys/user.h
+++ sysdeps/unix/sysv/linux/m68k/sys/user.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2008, 2010 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
@@ -58,4 +58,9 @@
 	char u_comm[32];
 };
 
+#define NBPG 4096
+#define UPAGES 1
+#define HOST_TEXT_START_ADDR u.start_code
+#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
+
 #endif
--- sysdeps/unix/sysv/linux/m68k/syscalls.list
+++ sysdeps/unix/sysv/linux/m68k/syscalls.list
@@ -1,3 +1,5 @@
 # File name	Caller	Syscall name	Args	Strong name	Weak names
 
 cacheflush	EXTRA	cacheflush	i:iiii	__cacheflush	cacheflush
+prlimit64	EXTRA	prlimit64	i:iipp	prlimit64
+fanotify_mark	EXTRA	fanotify_mark	i:iiiiis	fanotify_mark
--- sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1996, 1997, 1998, 2000, 2003, 2004, 2006 Free Software Foundation, \
Inc. +/* Copyright (C) 1996, 1997, 1998, 2000, 2003, 2004, 2006, 2010
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Andreas Schwab, <schwab@issan.informatik.uni-dortmund.de>,
    December 1995.
@@ -18,11 +19,7 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#ifndef _LINUX_M68K_SYSDEP_H
-#define _LINUX_M68K_SYSDEP_H 1
-
-#include <sysdeps/unix/sysdep.h>
-#include <sysdeps/m68k/sysdep.h>
+#include <tls.h>
 
 /* Defines RTLD_PRIVATE_ERRNO.  */
 #include <dl-sysdep.h>
@@ -109,10 +106,27 @@
        a pointer (e.g., mmap).  */					      \
     move.l %d0, %a0;							      \
     rts;
-# else /* !RTLD_PRIVATE_ERRNO */
-/* Store (- %d0) into errno through the GOT.  */
-#  if defined _LIBC_REENTRANT
-#   define SYSCALL_ERROR_HANDLER					      \
+# elif USE___THREAD
+#  ifndef NOT_IN_libc
+#   define SYSCALL_ERROR_ERRNO __libc_errno
+#  else
+#   define SYSCALL_ERROR_ERRNO errno
+#  endif
+#  define SYSCALL_ERROR_HANDLER						      \
+SYSCALL_ERROR_LABEL:							      \
+    neg.l %d0;								      \
+    move.l %d0, -(%sp);							      \
+    jbsr __m68k_read_tp@PLTPC;						      \
+    SYSCALL_ERROR_LOAD_GOT (%a1);					      \
+    add.l (SYSCALL_ERROR_ERRNO@TLSIE, %a1), %a0;			      \
+    move.l (%sp)+, (%a0);						      \
+    move.l &-1, %d0;							      \
+    /* Copy return value to %a0 for syscalls that are declared to return      \
+       a pointer (e.g., mmap).  */					      \
+    move.l %d0, %a0;							      \
+    rts;
+# elif defined _LIBC_REENTRANT
+#  define SYSCALL_ERROR_HANDLER						      \
 SYSCALL_ERROR_LABEL:							      \
     neg.l %d0;								      \
     move.l %d0, -(%sp);							      \
@@ -123,8 +137,9 @@
        a pointer (e.g., mmap).  */					      \
     move.l %d0, %a0;							      \
     rts;
-#  else /* !_LIBC_REENTRANT */
-#   define SYSCALL_ERROR_HANDLER					      \
+# else /* !_LIBC_REENTRANT */
+/* Store (- %d0) into errno through the GOT.  */
+#  define SYSCALL_ERROR_HANDLER						      \
 SYSCALL_ERROR_LABEL:							      \
     move.l (errno@GOTPC, %pc), %a0;					      \
     neg.l %d0;								      \
@@ -134,8 +149,7 @@
        a pointer (e.g., mmap).  */					      \
     move.l %d0, %a0;							      \
     rts;
-#  endif /* _LIBC_REENTRANT */
-# endif /* RTLD_PRIVATE_ERRNO */
+# endif /* _LIBC_REENTRANT */
 #else
 # define SYSCALL_ERROR_HANDLER	/* Nothing here; code in sysdep.S is used.  */
 #endif /* PIC */
@@ -148,9 +162,11 @@
 	arg 3		%d3	     call-saved
 	arg 4		%d4	     call-saved
 	arg 5		%d5	     call-saved
+	arg 6		%a0	     call-clobbered
 
    The stack layout upon entering the function is:
 
+	24(%sp)		Arg# 6
 	20(%sp)		Arg# 5
 	16(%sp)		Arg# 4
 	12(%sp)		Arg# 3
@@ -229,7 +245,7 @@
    normally.  It will never touch errno.  This returns just what the kernel
    gave back.  */
 #undef INTERNAL_SYSCALL
-#define INTERNAL_SYSCALL(name, err, nr, args...)	\
+#define INTERNAL_SYSCALL_NCS(name, err, nr, args...)	\
   ({ unsigned int _sys_result;				\
      {							\
        /* Load argument values in temporary variables
@@ -237,7 +253,7 @@
 	  before the call used registers are set.  */	\
        LOAD_ARGS_##nr (args)				\
        LOAD_REGS_##nr					\
-       register int _d0 asm ("%d0") = __NR_##name;	\
+       register int _d0 asm ("%d0") = name;		\
        asm volatile ("trap #0"				\
 		     : "=d" (_d0)			\
 		     : "0" (_d0) ASM_ARGS_##nr		\
@@ -245,6 +261,8 @@
        _sys_result = _d0;				\
      }							\
      (int) _sys_result; })
+#define INTERNAL_SYSCALL(name, err, nr, args...)	\
+  INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, ##args)
 
 #undef INTERNAL_SYSCALL_ERROR_P
 #define INTERNAL_SYSCALL_ERROR_P(val, err)		\
@@ -300,4 +318,13 @@
 #define ASM_ARGS_6	ASM_ARGS_5, "a" (_a0)
 
 #endif /* not __ASSEMBLER__ */
+
+/* Pointer mangling is not yet supported for M68K.  */
+#define PTR_MANGLE(var) (void) (var)
+#define PTR_DEMANGLE(var) (void) (var)
+
+#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
+/* M68K needs system-supplied DSO to access TLS helpers
+   even when statically linked.  */
+# define NEED_STATIC_SYSINFO_DSO 1
 #endif
--- sysdeps/unix/sysv/linux/m68k/vfork.S
+++ sysdeps/unix/sysv/linux/m68k/vfork.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2002, 2003, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Schwab <schwab@gnu.org>.
 
@@ -22,6 +22,14 @@
 #include <bits/errno.h>
 #include <kernel-features.h>
 
+#ifndef SAVE_PID
+#define SAVE_PID
+#endif
+
+#ifndef RESTORE_PID
+#define RESTORE_PID
+#endif
+
 /* Clone the calling process, but without copying the whole address space.
    The calling process is suspended until the new process exits or is
    replaced by a call to `execve'.  Return -1 for errors, 0 to the new process,
@@ -31,12 +39,20 @@
 
 #ifdef __NR_vfork
 
+	/* SAVE_PID clobbers call-clobbered registers and
+	   saves data in D1 and A1.  */
+
+	SAVE_PID
+
 	/* Pop the return PC value into A0.  */
 	movel	%sp@+, %a0
 
 	/* Stuff the syscall number in D0 and trap into the kernel.  */
 	movel	#SYS_ify (vfork), %d0
 	trap	#0
+
+	RESTORE_PID
+
 	tstl	%d0
 	jmi	.Lerror		/* Branch forward if it failed.  */
 
--- sysdeps/unix/sysv/linux/mips/bits/errno.h
+++ sysdeps/unix/sysv/linux/mips/bits/errno.h
@@ -38,6 +38,10 @@
 #  define ENOTRECOVERABLE	166
 # endif
 
+# ifndef ERFKILL
+#  define ERFKILL		167
+# endif
+
 # ifndef __ASSEMBLER__
 /* Function to get address of global `errno' variable.  */
 extern int *__errno_location (void) __THROW __attribute__ ((__const__));
--- sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -1,6 +1,6 @@
 /* O_*, F_*, FD_* bit values for Linux.
    Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003, 2004, 2006,
-   2007, 2009 Free Software Foundation, Inc.
+   2007, 2009, 2010 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
@@ -36,7 +36,7 @@
 #define O_WRONLY	     01
 #define O_RDWR		     02
 #define O_APPEND	 0x0008
-#define O_SYNC		 0x0010
+#define O_SYNC		 0x4010
 #define O_NONBLOCK	 0x0080
 #define O_NDELAY	O_NONBLOCK
 #define O_CREAT		 0x0100	/* not fcntl */
@@ -46,19 +46,21 @@
 #define O_FSYNC		 O_SYNC
 #define O_ASYNC		 0x1000
 
-#ifdef __USE_GNU
+#ifdef __USE_XOPEN2K8
 # define O_NOFOLLOW	0x20000	/* Do not follow links.	 */
-# define O_DIRECT	0x8000	/* Direct disk access hint.  */
 # define O_DIRECTORY	0x10000	/* Must be a directory.	 */
-# define O_NOATIME	0x40000	/* Do not set atime.  */
 # define O_CLOEXEC     02000000 /* Set close_on_exec.  */
 #endif
+#ifdef __USE_GNU
+# define O_DIRECT	0x8000	/* Direct disk access hint.  */
+# define O_NOATIME	0x40000	/* Do not set atime.  */
+#endif
 
 /* For now Linux has no synchronisity options for data and read operations.
    We define the symbols here but let them do the same as O_SYNC since
    this is a superset.	*/
 #if defined __USE_POSIX199309 || defined __USE_UNIX98
-# define O_DSYNC	O_SYNC	/* Synchronize data.  */
+# define O_DSYNC	0x0010	/* Synchronize data.  */
 # define O_RSYNC	O_SYNC	/* Synchronize read operations.	 */
 #endif
 
@@ -86,7 +88,7 @@
 #define F_SETLK64	34	/* Set record locking info (non-blocking).  */
 #define F_SETLKW64	35	/* Set record locking info (blocking).	*/
 
-#if defined __USE_BSD || defined __USE_UNIX98
+#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8
 # define F_SETOWN	24	/* Get owner (process receiving SIGIO).  */
 # define F_GETOWN	23	/* Set owner (process receiving SIGIO).  */
 #endif
@@ -102,6 +104,10 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
+# define F_SETPIPE_SZ	1031	/* Set pipe page size array.  */
+# define F_GETPIPE_SZ	1032	/* Set pipe page size array.  */
+#endif
+#ifdef __USE_XOPEN2K8
 # define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
 				   close-on-exit set.  */
 #endif
@@ -185,9 +191,10 @@
 /* Owner types.  */
 enum __pid_type
   {
-    F_OWNER_TID = 0,	/* Kernel thread.  */
-    F_OWNER_PID,	/* Process.  */
-    F_OWNER_GID		/* Process group.  */
+    F_OWNER_TID = 0,		/* Kernel thread.  */
+    F_OWNER_PID,		/* Process.  */
+    F_OWNER_PGRP,		/* Process group.  */
+    F_OWNER_GID = F_OWNER_PGRP	/* Alternative, obsolete name.  */
   };
 
 /* Structure to use with F_GETOWN_EX and F_SETOWN_EX.  */
@@ -250,7 +257,7 @@
 
 
 /* Selective file content synch'ing.  */
-extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
 			    unsigned int __flags);
 
 
--- sysdeps/unix/sysv/linux/mips/bits/mman.h
+++ sysdeps/unix/sysv/linux/mips/bits/mman.h
@@ -1,5 +1,5 @@
 /* Definitions for POSIX memory map interface.  Linux/MIPS version.
-   Copyright (C) 1997, 2000, 2003, 2004, 2005, 2006
+   Copyright (C) 1997, 2000, 2003, 2004, 2005, 2006, 2009, 2011
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -86,14 +86,19 @@
 
 /* Advice to `madvise'.  */
 #ifdef __USE_BSD
-# define MADV_NORMAL	 0	/* No further special treatment.  */
-# define MADV_RANDOM	 1	/* Expect random page references.  */
-# define MADV_SEQUENTIAL 2	/* Expect sequential page references.  */
-# define MADV_WILLNEED	 3	/* Will need these pages.  */
-# define MADV_DONTNEED	 4	/* Don't need these pages.  */
-# define MADV_REMOVE	 9	/* Remove these pages and resources.  */
-# define MADV_DONTFORK	 10	/* Do not inherit across fork.  */
-# define MADV_DOFORK	 11	/* Do inherit across fork.  */
+# define MADV_NORMAL	  0	/* No further special treatment.  */
+# define MADV_RANDOM	  1	/* Expect random page references.  */
+# define MADV_SEQUENTIAL  2	/* Expect sequential page references.  */
+# define MADV_WILLNEED	  3	/* Will need these pages.  */
+# define MADV_DONTNEED	  4	/* Don't need these pages.  */
+# define MADV_REMOVE	  9	/* Remove these pages and resources.  */
+# define MADV_DONTFORK	  10	/* Do not inherit across fork.  */
+# define MADV_DOFORK	  11	/* Do inherit across fork.  */
+# define MADV_MERGEABLE	  12	/* KSM may merge identical pages.  */
+# define MADV_UNMERGEABLE 13	/* KSM may not merge identical pages.  */
+# define MADV_HUGEPAGE	  14	/* Worth backing with hugepages.  */
+# define MADV_NOHUGEPAGE  15	/* Not worth backing with hugepages.  */
+# define MADV_HWPOISON	  100	/* Poison a page for testing.  */
 #endif
 
 /* The POSIX people had to invent similar names for the same things.  */
--- sysdeps/unix/sysv/linux/mips/bits/poll.h
+++ sysdeps/unix/sysv/linux/mips/bits/poll.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 2001, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 2001, 2006, 2009 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
@@ -27,7 +27,7 @@
 #define POLLPRI		0x002		/* There is urgent data to read.  */
 #define POLLOUT		0x004		/* Writing now will not block.  */
 
-#ifdef __USE_XOPEN
+#if defined __USE_XOPEN || defined __USE_XOPEN2K8
 /* These values are defined in XPG4.2.  */
 # define POLLRDNORM	0x040		/* Normal data may be read.  */
 # define POLLRDBAND	0x080		/* Priority data may be read.  */
--- sysdeps/unix/sysv/linux/mips/bits/resource.h
+++ sysdeps/unix/sysv/linux/mips/bits/resource.h
@@ -1,6 +1,6 @@
 /* Bit values & structures for resource limits.  Linux/MIPS version.
    Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004, 2005, 2006, 2008,
-   2009 Free Software Foundation, Inc.
+   2009, 2010 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
@@ -240,3 +240,31 @@
   PRIO_USER = 2			/* WHO is a user ID.  */
 #define PRIO_USER PRIO_USER
 };
+
+
+__BEGIN_DECLS
+
+#ifdef __USE_GNU
+/* Modify and return resource limits of a process atomically.  */
+# ifndef __USE_FILE_OFFSET64
+extern int prlimit (__pid_t __pid, enum __rlimit_resource __resource,
+		    __const struct rlimit *__new_limit,
+		    struct rlimit *__old_limit) __THROW;
+# else
+#  ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (prlimit, (__pid_t __pid,
+				     enum __rlimit_resource __resource,
+				     __const struct rlimit *__new_limit,
+				     struct rlimit *__old_limit), prlimit64);
+#  else
+#   define prlimit prlimit64
+#  endif
+# endif
+# ifdef __USE_LARGEFILE64
+extern int prlimit64 (__pid_t __pid, enum __rlimit_resource __resource,
+		      __const struct rlimit64 *__new_limit,
+		      struct rlimit64 *__old_limit) __THROW;
+# endif
+#endif
+
+__END_DECLS
--- sysdeps/unix/sysv/linux/mips/bits/sigaction.h
+++ sysdeps/unix/sysv/linux/mips/bits/sigaction.h
@@ -1,5 +1,5 @@
 /* The proper definitions for Linux/MIPS's sigaction.
-   Copyright (C) 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2003
+   Copyright (C) 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2003, 2010
 	Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -64,6 +64,8 @@
 				    three arguments instead of one.  */
 #if defined __USE_UNIX98 || defined __USE_MISC
 # define SA_ONSTACK   0x08000000 /* Use signal stack by using `sa_restorer'. */
+#endif
+#if defined __USE_UNIX98 || defined __USE_MISC || defined __USE_XOPEN2K8
 # define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler.  */
 # define SA_RESTART   0x10000000 /* Restart syscall on signal return.  */
 # define SA_NODEFER   0x40000000 /* Don't automatically block the signal when
--- sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -1,6 +1,6 @@
 /* System-specific socket constants and types.  Linux/MIPS version.
    Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004, 2005, 2006, 2007, 2008,
-   2009 Free Software Foundation, Inc.
+   2009, 2010, 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
@@ -109,7 +109,9 @@
 #define PF_ISDN		34	/* mISDN sockets.  */
 #define PF_PHONET	35	/* Phonet sockets.  */
 #define PF_IEEE802154	36	/* IEEE 802.15.4 sockets.  */
-#define	PF_MAX		37	/* For now..  */
+#define PF_CAIF		37	/* CAIF sockets.  */
+#define PF_ALG		38	/* Algorithm sockets.  */
+#define	PF_MAX		39	/* For now..  */
 
 /* Address families.  */
 #define	AF_UNSPEC	PF_UNSPEC
@@ -150,6 +152,8 @@
 #define AF_ISDN		PF_ISDN
 #define AF_PHONET	PF_PHONET
 #define AF_IEEE802154	PF_IEEE802154
+#define AF_CAIF		PF_CAIF
+#define AF_ALG		PF_ALG
 #define	AF_MAX		PF_MAX
 
 /* Socket level values.  Others are defined in the appropriate headers.
@@ -232,10 +236,12 @@
 #define	MSG_NOSIGNAL	MSG_NOSIGNAL
     MSG_MORE		= 0x8000,  /* Sender will send more.  */
 #define	MSG_MORE	MSG_MORE
+    MSG_WAITFORONE	= 0x10000, /* Wait for at least one packet to return.*/
+#define MSG_WAITFORONE	MSG_WAITFORONE
 
     MSG_CMSG_CLOEXEC	= 0x40000000	/* Set close_on_exit for file
-                                           descriptor received through
-                                           SCM_RIGHTS.  */
+					   descriptor received through
+					   SCM_RIGHTS.  */
 #define MSG_CMSG_CLOEXEC MSG_CMSG_CLOEXEC
   };
 
@@ -256,6 +262,15 @@
     int msg_flags;		/* Flags on received message.  */
   };
 
+#ifdef __USE_GNU
+/* For `recvmmsg'.  */
+struct mmsghdr
+  {
+    struct msghdr msg_hdr;	/* Actual message header.  */
+    unsigned int msg_len;	/* Number of received bytes for the entry.  */
+  };
+#endif
+
 /* Structure used for storage of ancillary data object information.  */
 struct cmsghdr
   {
@@ -397,4 +412,18 @@
     int l_linger;		/* Time to linger.  */
   };
 
+
+__BEGIN_DECLS
+
+/* Receive a message as described by MESSAGE from socket FD.
+   Returns the number of bytes read or -1 for errors.
+
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
+extern int recvmmsg (int __fd, struct mmsghdr *__vmessages,
+		     unsigned int __vlen, int __flags,
+		     __const struct timespec *__tmo);
+
+__END_DECLS
+
 #endif	/* bits/socket.h */
--- sysdeps/unix/sysv/linux/mips/bits/stat.h
+++ sysdeps/unix/sysv/linux/mips/bits/stat.h
@@ -1,5 +1,5 @@
 /* Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004,
-	2007, 2009 Free Software Foundation, Inc.
+	2007, 2009, 2010 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
@@ -17,10 +17,13 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#ifndef _SYS_STAT_H
+#if !defined _SYS_STAT_H && !defined _FCNTL_H
 # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
 #endif
 
+#ifndef _BITS_STAT_H
+#define _BITS_STAT_H	1
+
 #include <sgidefs.h>
 
 /* Versions of the `struct stat' data structure.  */
@@ -61,7 +64,7 @@
     long int st_pad2[3];
     __off64_t st_size;		/* Size of file, in bytes.  */
 #endif
-#ifdef __USE_MISC
+#if defined __USE_MISC || defined __USE_XOPEN2K8
     /* Nanosecond resolution timestamps are stored in a format
        equivalent to 'struct timespec'.  This is the type used
        whenever possible but the Unix namespace rules do not allow the
@@ -105,7 +108,7 @@
     unsigned long int st_rdev;	/* Device number, if device.  */
     long int st_pad2[3];
     __off64_t st_size;		/* Size of file, in bytes.  */
-#ifdef __USE_MISC
+# if defined __USE_MISC || defined __USE_XOPEN2K8
     /* Nanosecond resolution timestamps are stored in a format
        equivalent to 'struct timespec'.  This is the type used
        whenever possible but the Unix namespace rules do not allow the
@@ -115,14 +118,14 @@
     struct timespec st_atim;            /* Time of last access.  */
     struct timespec st_mtim;            /* Time of last modification.  */
     struct timespec st_ctim;            /* Time of last status change.  */
-#else
+# else
     __time_t st_atime;		/* Time of last access.  */
     long int __reserved0;
     __time_t st_mtime;		/* Time of last modification.  */
     long int __reserved1;
     __time_t st_ctime;		/* Time of last status change.  */
     long int __reserved2;
-#endif
+# endif
     __blksize_t st_blksize;	/* Optimal block size for I/O.  */
     long int st_pad3;
     __blkcnt64_t st_blocks;	/* Number of 512-byte blocks allocated.  */
@@ -152,7 +155,7 @@
     unsigned int st_pad2[3];	/* Reserved for st_rdev expansion  */
     __off64_t st_size;
 #endif
-#ifdef __USE_MISC
+#if defined __USE_MISC || defined __USE_XOPEN2K8
     /* Nanosecond resolution timestamps are stored in a format
        equivalent to 'struct timespec'.  This is the type used
        whenever possible but the Unix namespace rules do not allow the
@@ -196,7 +199,7 @@
     __dev_t st_rdev;
     unsigned int st_pad2[3];	/* Reserved for st_rdev expansion  */
     __off64_t st_size;
-#ifdef __USE_MISC
+# if defined __USE_MISC || defined __USE_XOPEN2K8
     /* Nanosecond resolution timestamps are stored in a format
        equivalent to 'struct timespec'.  This is the type used
        whenever possible but the Unix namespace rules do not allow the
@@ -206,14 +209,14 @@
     struct timespec st_atim;            /* Time of last access.  */
     struct timespec st_mtim;            /* Time of last modification.  */
     struct timespec st_ctim;            /* Time of last status change.  */
-#else
+# else
     __time_t st_atime;
     int __reserved0;
     __time_t st_mtime;
     int __reserved1;
     __time_t st_ctime;
     int __reserved2;
-#endif
+# endif
     __blksize_t st_blksize;
     unsigned int st_pad3;
     __blkcnt64_t st_blocks;
@@ -258,3 +261,5 @@
 # define UTIME_NOW	((1l << 30) - 1l)
 # define UTIME_OMIT	((1l << 30) - 2l)
 #endif
+
+#endif	/* bits/stat.h */
--- sysdeps/unix/sysv/linux/mips/bits/statfs.h
+++ sysdeps/unix/sysv/linux/mips/bits/statfs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 2000, 2010 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
@@ -45,7 +45,8 @@
 	/* Linux specials */
     __fsid_t f_fsid;
     long int f_namelen;
-    long int f_spare[6];
+    long int f_flags;
+    long int f_spare[5];
   };
 
 #ifdef __USE_LARGEFILE64
@@ -64,7 +65,8 @@
 	/* Linux specials */
     __fsid_t f_fsid;
     long int f_namelen;
-    long int f_spare[6];
+    long int f_flags;
+    long int f_spare[5];
   };
 #endif
 
--- sysdeps/unix/sysv/linux/mips/bits/termios.h
+++ sysdeps/unix/sysv/linux/mips/bits/termios.h
@@ -1,5 +1,5 @@
 /* termios type and macro definitions.  Linux/MIPS version.
-   Copyright (C) 1993, 94, 95, 96, 97, 99 Free Software Foundation, Inc.
+   Copyright (C) 1993, 94, 95, 96, 97, 99, 2010 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
@@ -194,6 +194,9 @@
 #endif
 #define TOSTOP	0100000		/* Send SIGTTOU for background output.  */
 #define ITOSTOP	TOSTOP
+#ifdef __USE_BSD
+# define EXTPROC 0200000
+#endif
 
 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
 #define TIOCSER_TEMT    0x01	/* Transmitter physically empty */
--- sysdeps/unix/sysv/linux/mips/configure
+++ sysdeps/unix/sysv/linux/mips/configure
@@ -107,6 +107,6 @@
 esac
 
 if test -z "$arch_minimum_kernel"; then
-  arch_minimum_kernel=2.4.0
+  arch_minimum_kernel=2.4.1
   libc_cv_gcc_unwind_find_fde=yes
 fi
--- sysdeps/unix/sysv/linux/mips/configure.in
+++ sysdeps/unix/sysv/linux/mips/configure.in
@@ -107,6 +107,6 @@
 esac
 
 if test -z "$arch_minimum_kernel"; then
-  arch_minimum_kernel=2.4.0
+  arch_minimum_kernel=2.4.1
   libc_cv_gcc_unwind_find_fde=yes
 fi
--- sysdeps/unix/sysv/linux/mips/getpagesize.c
+++ sysdeps/unix/sysv/linux/mips/getpagesize.c
-#include <sysdeps/unix/sysv/linux/ia64/getpagesize.c>
--- sysdeps/unix/sysv/linux/mips/kernel-features.h
+++ sysdeps/unix/sysv/linux/mips/kernel-features.h
@@ -38,3 +38,9 @@
 #endif
 
 #include_next <kernel-features.h>
+
+/* The n32 syscall ABI did not have a getdents64 syscall until
+   2.6.35.  */
+#if _MIPS_SIM == _ABIN32 && __LINUX_KERNEL_VERSION < 0x020623
+# undef __ASSUME_GETDENTS64_SYSCALL
+#endif
--- sysdeps/unix/sysv/linux/mips/ldsodefs.h
+++ sysdeps/unix/sysv/linux/mips/ldsodefs.h
@@ -30,4 +30,12 @@
 #undef DL_STATIC_INIT
 #define DL_STATIC_INIT(map) _dl_static_init (map)
 
+/* Allow ABIVERSION == 1, meaning PLTs and copy relocations are
+   required, with ELFOSABI_SYSV.  */
+#undef VALID_ELF_ABIVERSION
+#define VALID_ELF_ABIVERSION(osabi,ver)			\
+  (ver == 0						\
+   || (osabi == ELFOSABI_SYSV && ver < 2)		\
+   || (osabi == ELFOSABI_LINUX && ver < LIBC_ABI_MAX))
+
 #endif /* ldsodefs.h */
--- sysdeps/unix/sysv/linux/mips/libc-abis
+++ sysdeps/unix/sysv/linux/mips/libc-abis
+# See the copy of this file in libc for detailed explanations.  This
+# copy needs to include all libc definitions applicable to MIPS; only
+# one copy will be used.
+#
+# Feature Name	Configuration
+# ------------	-------------
+#
+# MIPS PLTs.
+MIPS_PLT	mips*-*-linux*
+#
+# Unique symbol definitions for C++.
+# Architecture independent, all ELF targets (== all targets)
+UNIQUE
--- sysdeps/unix/sysv/linux/mips/mips32/internal_recvmmsg.S
+++ sysdeps/unix/sysv/linux/mips/mips32/internal_recvmmsg.S
+/* MIPS does not have socket.S and the socketcall syscall should
+   generally be avoided, though it exists.  */
--- sysdeps/unix/sysv/linux/mips/mips32/recvmmsg.c
+++ sysdeps/unix/sysv/linux/mips/mips32/recvmmsg.c
+/* Copyright (C) 2010 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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+/* Avoid recvmmsg.c trying to use a definition based on the socketcall
+   syscall and internal_recvmmsg.S.  */
+
+#include <errno.h>
+#include <sys/socket.h>
+
+#include <sysdep-cancel.h>
+#include <sys/syscall.h>
+#include <kernel-features.h>
+
+#undef __NR_socketcall
+
+#include <sysdeps/unix/sysv/linux/recvmmsg.c>
--- sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise.c
+++ sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise.c
+/* Copyright (C) 2003, 2004, 2009 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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <sysdep.h>
+
+/* Advice the system about the expected behaviour of the application with
+   respect to the file associated with FD.  */
+
+int
+posix_fadvise (int fd, off_t offset, off_t len, int advise)
+{
+#ifdef __NR_fadvise64
+  INTERNAL_SYSCALL_DECL (err);
+  int ret = INTERNAL_SYSCALL (fadvise64, err, 4, fd, offset, len, advise);
+  if (INTERNAL_SYSCALL_ERROR_P (ret, err))
+    return INTERNAL_SYSCALL_ERRNO (ret, err);
+  return 0;
+#else
+  return ENOSYS;
+#endif
+}
--- sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list
+++ sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list
@@ -2,6 +2,9 @@
 
 readahead	-	readahead	i:iii	__readahead	readahead
 sync_file_range	-	sync_file_range	i:iiii	sync_file_range
-posix_fadvise	-	fadvise64	i:iiii	posix_fadvise
 ftruncate	-	ftruncate	i:ii	__ftruncate	ftruncate ftruncate64 __ftruncate64
 truncate	-	truncate	i:si	truncate	truncate64
+
+prlimit64	EXTRA	prlimit64	i:iipp	prlimit64
+
+fanotify_mark	EXTRA	fanotify_mark	i:iiiis	fanotify_mark
--- sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c
+++ sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c
+#include <sysdeps/unix/sysv/linux/wordsize-64/posix_fadvise.c>
--- sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c
+++ sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c
+/* posix_fadvise64 is in posix_fadvise.c */
--- sysdeps/unix/sysv/linux/mips/sys/inotify.h
+++ sysdeps/unix/sysv/linux/mips/sys/inotify.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006, 2008, 2009, 2010 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
@@ -72,6 +72,8 @@
 #define IN_ONLYDIR	 0x01000000	/* Only watch the path if it is a
 					   directory.  */
 #define IN_DONT_FOLLOW	 0x02000000	/* Do not follow a sym link.  */
+#define IN_EXCL_UNLINK	 0x04000000	/* Exclude events on unlinked
+					   objects.  */
 #define IN_MASK_ADD	 0x20000000	/* Add to the mask of an already
 					   existing watch.  */
 #define IN_ISDIR	 0x40000000	/* Event occurred against dir.  */
--- sysdeps/unix/sysv/linux/powerpc/powerpc32/405
+++ sysdeps/unix/sysv/linux/powerpc/powerpc32/405
+(directory)
--- sysdeps/unix/sysv/linux/powerpc/powerpc32/405/Implies
+++ sysdeps/unix/sysv/linux/powerpc/powerpc32/405/Implies
+powerpc/powerpc32/405/fpu
+powerpc/powerpc32/405
--- sysdeps/unix/sysv/linux/powerpc/powerpc32/440
+++ sysdeps/unix/sysv/linux/powerpc/powerpc32/440
+(directory)
--- sysdeps/unix/sysv/linux/powerpc/powerpc32/440/Implies
+++ sysdeps/unix/sysv/linux/powerpc/powerpc32/440/Implies
+powerpc/powerpc32/440/fpu
+powerpc/powerpc32/440
--- sysdeps/unix/sysv/linux/powerpc/powerpc32/464
+++ sysdeps/unix/sysv/linux/powerpc/powerpc32/464
+(directory)
--- sysdeps/unix/sysv/linux/powerpc/powerpc32/464/Implies
+++ sysdeps/unix/sysv/linux/powerpc/powerpc32/464/Implies
+powerpc/powerpc32/464/fpu
+powerpc/powerpc32/464
--- sysdeps/unix/sysv/linux/powerpc/powerpc32/476
+++ sysdeps/unix/sysv/linux/powerpc/powerpc32/476
+(directory)
--- sysdeps/unix/sysv/linux/powerpc/powerpc32/476/Implies
+++ sysdeps/unix/sysv/linux/powerpc/powerpc32/476/Implies
+powerpc/powerpc32/476/fpu
+powerpc/powerpc32/476

++++++ deleted files:
--- Correct-unwind-info-in-strcmp-sse4.S.patch
--- Fix-bugs-in-x86-32-strcmp-sse4.S-and-strcmp-ssse3.S.patch
--- Update-xmm3-when-exit-from-loop.patch
--- cve-2010-0296-mount-DoS.patch
--- cve-2010-3856.patch
--- glibc-2.11-12-g24c0bf7.tar.bz2
--- glibc-arm-local-hwcap-updates.patch
--- glibc-arm-no-hwcap.patch
--- glibc-atom-memory-string-opt-tillto-20100226.patch
--- nis_shadow.diff
--- prelink-causes-zypper-ref-to-die.patch

_______________________________________________
MeeGo-commits mailing list
MeeGo-commits@meego.com
http://lists.meego.com/listinfo/meego-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic