[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commits] r20070 - in /fsf/trunk/libc: ./ elf/ ports/ ports/sysdeps/arm/ ports/sysdeps/unix/sysv/linux/arm/ ports/sysdeps/unix/sysv/li...



Author: eglibc
Date: Fri Aug 10 00:01:39 2012
New Revision: 20070

Log:
Import glibc-mainline for 2012-08-10

Added:
    fsf/trunk/libc/ports/sysdeps/arm/arm-features.h
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/arm-features.h
Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/NEWS
    fsf/trunk/libc/elf/elf.h
    fsf/trunk/libc/ports/ChangeLog.arm
    fsf/trunk/libc/ports/ChangeLog.mips
    fsf/trunk/libc/ports/sysdeps/arm/__longjmp.S
    fsf/trunk/libc/ports/sysdeps/arm/fclrexcpt.c
    fsf/trunk/libc/ports/sysdeps/arm/fedisblxcpt.c
    fsf/trunk/libc/ports/sysdeps/arm/feenablxcpt.c
    fsf/trunk/libc/ports/sysdeps/arm/fegetenv.c
    fsf/trunk/libc/ports/sysdeps/arm/fegetexcept.c
    fsf/trunk/libc/ports/sysdeps/arm/fegetround.c
    fsf/trunk/libc/ports/sysdeps/arm/feholdexcpt.c
    fsf/trunk/libc/ports/sysdeps/arm/fesetenv.c
    fsf/trunk/libc/ports/sysdeps/arm/fesetround.c
    fsf/trunk/libc/ports/sysdeps/arm/feupdateenv.c
    fsf/trunk/libc/ports/sysdeps/arm/fgetexcptflg.c
    fsf/trunk/libc/ports/sysdeps/arm/fraiseexcpt.c
    fsf/trunk/libc/ports/sysdeps/arm/fsetexcptflg.c
    fsf/trunk/libc/ports/sysdeps/arm/ftestexcept.c
    fsf/trunk/libc/ports/sysdeps/arm/setfpucw.c
    fsf/trunk/libc/ports/sysdeps/arm/setjmp.S
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/getcontext.S
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/setcontext.S
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/kernel-features.h
    fsf/trunk/libc/sysdeps/i386/i686/multiarch/strstr-c.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/time.c
    fsf/trunk/libc/sysdeps/x86_64/multiarch/memmove.c
    fsf/trunk/libc/sysdeps/x86_64/multiarch/strstr-c.c

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Fri Aug 10 00:01:39 2012
@@ -1,3 +1,49 @@
+2012-08-09  H.J. Lu  <hongjiu.lu@xxxxxxxxx>
+
+	[BZ #14166]
+	* sysdeps/i386/i686/multiarch/strstr-c.c (strstr): Redefined
+	to __redirect_strstr.
+	(__strstr_sse42): Use typeof __redirect_strstr.
+	(__strstr_ia32): Likewise.
+	(__libc_strstr): New prototype.
+	(strstr): Renamed to ...
+	(__libc_strstr): This.
+	(strstr): New strong alias of __libc_strstr.
+	* sysdeps/x86_64/multiarch/strstr-c.c: Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/time.c (time): Redefined to
+	__redirect_time.
+	Include <time.h>.
+	(__libc_time): New prototype.
+	(time_ifunc): Replace time with __libc_time.
+	(time): New strong alias and hidden definition of __libc_time.
+	(__GI_time): Remove strong alias.
+	* sysdeps/x86_64/multiarch/memmove.c: Don't include <string.h>.
+	Include <stddef.h>.
+	(memmove): Redefined to __redirect_memmove.
+	(__memmove_sse2): Use typeof __redirect_memmove.
+	(__memmove_ssse3): Likewise.
+	(__memmove_ssse3_back): Likewise.
+	(__libc_memmove): New prototype.
+	(memmove): Renamed to ...
+	(__libc_memmove): This.
+	(memmove): New strong alias of __libc_memmove.
+
+2012-08-08  Mark Salter  <msalter@xxxxxxxxxx>
+
+	* elf/elf.h
+	(R_MN10300_TLS_GD): Define.
+	(R_MN10300_TLS_LD): Likewise.
+	(R_MN10300_TLS_LDO): Likewise.
+	(R_MN10300_TLS_GOTIE): Likewise.
+	(R_MN10300_TLS_IE): Likewise.
+	(R_MN10300_TLS_LE): Likewise.
+	(R_MN10300_TLS_DTPMOD): Likewise.
+	(R_MN10300_TLS_DTPOFF): Likewise.
+	(R_MN10300_TLS_TPOFF): Likewise.
+	(R_MN10300_SYM_DIFF): Likewise.
+	(R_MN10300_ALIGN): Likewise.
+	(R_MN10300_NUM): Update.
+
 2012-08-08  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 
 	* sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_TGKILL):

Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Fri Aug 10 00:01:39 2012
@@ -9,8 +9,8 @@
 
 * The following bugs are resolved with this release:
 
-  6778, 6808, 13717, 14042, 14150, 14151, 14154, 14157, 14173, 14283, 14298,
-  14307, 14328, 14331, 14336, 14337, 14347, 14349
+  6778, 6808, 13717, 14042, 14166, 14150, 14151, 14154, 14157, 14173, 14283,
+  14298, 14307, 14328, 14331, 14336, 14337, 14347, 14349
 
 * Support for STT_GNU_IFUNC symbols added for s390 and s390x.
   Optimized versions of memcpy, memset, and memcmp added for System z10 and

Modified: fsf/trunk/libc/elf/elf.h
==============================================================================
--- fsf/trunk/libc/elf/elf.h (original)
+++ fsf/trunk/libc/elf/elf.h Fri Aug 10 00:01:39 2012
@@ -2734,8 +2734,23 @@
 #define R_MN10300_GLOB_DAT	21	/* Create GOT entry.  */
 #define R_MN10300_JMP_SLOT	22	/* Create PLT entry.  */
 #define R_MN10300_RELATIVE	23	/* Adjust by program base.  */
-
-#define R_MN10300_NUM		24
+#define R_MN10300_TLS_GD	24	/* 32-bit offset for global dynamic.  */
+#define R_MN10300_TLS_LD	25	/* 32-bit offset for local dynamic.  */
+#define R_MN10300_TLS_LDO	26	/* Module-relative offset.  */
+#define R_MN10300_TLS_GOTIE	27	/* GOT offset for static TLS block
+					   offset.  */
+#define R_MN10300_TLS_IE	28	/* GOT address for static TLS block
+					   offset.  */
+#define R_MN10300_TLS_LE	29	/* Offset relative to static TLS
+					   block.  */
+#define R_MN10300_TLS_DTPMOD	30	/* ID of module containing symbol.  */
+#define R_MN10300_TLS_DTPOFF	31	/* Offset in module TLS block.  */
+#define R_MN10300_TLS_TPOFF	32	/* Offset in static TLS block.  */
+#define R_MN10300_SYM_DIFF	33	/* Adjustment for next reloc as needed
+					   by linker relaxation.  */
+#define R_MN10300_ALIGN		34	/* Alignment requirement for linker
+					   relaxation.  */
+#define R_MN10300_NUM		35
 
 
 /* M32R relocs.  */

Modified: fsf/trunk/libc/ports/ChangeLog.arm
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.arm (original)
+++ fsf/trunk/libc/ports/ChangeLog.arm Fri Aug 10 00:01:39 2012
@@ -1,3 +1,36 @@
+2012-08-09  Roland McGrath  <roland@xxxxxxxxxxxxx>
+
+	* sysdeps/arm/arm-features.h: Document ARM_ASSUME_NO_IWMMXT.
+	* sysdeps/arm/setjmp.S: Include <arm-features.h>.
+	[!ARM_ASSUME_NO_IWMMXT || __SOFTFP__]: Conditionalize hwcap
+	fetching bits on this.
+	[!ARM_ASSUME_NO_IWMMXT]: Conditionalize iWMMXt register use on this.
+	* sysdeps/arm/__longjmp.S: Likewise.
+
+	* sysdeps/arm/__longjmp.S: Use .Lxxx rather than Lxxx for local labels.
+	[__SOFTFP__]: Conditionalize HWCAP_ARM_VFP check on this.
+	* sysdeps/arm/setjmp.S: Likewise.
+	* sysdeps/unix/sysv/linux/arm/getcontext.S: Likewise.
+	* sysdeps/unix/sysv/linux/arm/setcontext.S: Likewise.
+
+	* sysdeps/arm/arm-features.h: New file.
+	* sysdeps/unix/sysv/linux/arm/arm-features.h: New file.
+	* sysdeps/arm/fclrexcpt.c: Use ARM_HAVE_VFP instead of hwcap bits.
+	* sysdeps/arm/fedisblxcpt.c: Likewise.
+	* sysdeps/arm/feenablxcpt.c: Likewise.
+	* sysdeps/arm/fegetenv.c: Likewise.
+	* sysdeps/arm/fegetexcept.c: Likewise.
+	* sysdeps/arm/fegetround.c: Likewise.
+	* sysdeps/arm/feholdexcpt.c: Likewise.
+	* sysdeps/arm/fesetenv.c: Likewise.
+	* sysdeps/arm/fesetround.c: Likewise.
+	* sysdeps/arm/feupdateenv.c: Likewise.
+	* sysdeps/arm/fgetexcptflg.c: Likewise.
+	* sysdeps/arm/fraiseexcpt.c: Likewise.
+	* sysdeps/arm/fsetexcptflg.c: Likewise.
+	* sysdeps/arm/ftestexcept.c: Likewise.
+	* sysdeps/arm/setfpucw.c: Likewise.
+
 2012-08-08  Roland McGrath  <roland@xxxxxxxxxxxxx>
 
 	* sysdeps/arm/sotruss-lib.c: New file.

Modified: fsf/trunk/libc/ports/ChangeLog.mips
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.mips (original)
+++ fsf/trunk/libc/ports/ChangeLog.mips Fri Aug 10 00:01:39 2012
@@ -1,3 +1,8 @@
+2012-08-09  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/mips/kernel-features.h
+	(__ASSUME_UTIMES): Define.
+
 2012-08-07  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 
 	* sysdeps/unix/sysv/linux/mips/configure.in (arch_minimum_kernel):

Modified: fsf/trunk/libc/ports/sysdeps/arm/__longjmp.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/__longjmp.S (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/__longjmp.S Fri Aug 10 00:01:39 2012
@@ -1,6 +1,5 @@
 /* longjmp for ARM.
-   Copyright (C) 1997, 1998, 2005, 2006, 2009, 2010
-     Free Software Foundation, Inc.
+   Copyright (C) 1997-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -22,6 +21,7 @@
 #define _ASM
 #include <bits/setjmp.h>
 #include <rtld-global-offsets.h>
+#include <arm-features.h>
 
 /* __longjmp(jmpbuf, val) */
 
@@ -47,27 +47,35 @@
 	cfi_restore (sp)
 	cfi_restore (lr)
 
-#ifdef IS_IN_rtld
-  	ldr	a2, 1f
-	ldr	a3, Lrtld_local_ro
+#if !defined ARM_ASSUME_NO_IWMMXT || defined __SOFTFP__
+# define NEED_HWCAP 1
+#endif
+
+#ifdef NEED_HWCAP
+# ifdef IS_IN_rtld
+	ldr	a2, 1f
+	ldr	a3, .Lrtld_local_ro
 0:	add	a2, pc, a2
 	add	a2, a2, a3
 	ldr	a2, [a2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
-#else
-#ifdef PIC
-  	ldr	a2, 1f
-	ldr	a3, Lrtld_global_ro
+# else
+#  ifdef PIC
+	ldr	a2, 1f
+	ldr	a3, .Lrtld_global_ro
 0:	add	a2, pc, a2
 	ldr	a2, [a2, a3]
 	ldr	a2, [a2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
-#else
-	ldr	a2, Lhwcap
+#  else
+	ldr	a2, .Lhwcap
 	ldr	a2, [a2, #0]
-#endif
+#  endif
+# endif
 #endif
 
+#ifdef __SOFTFP__
 	tst	a2, #HWCAP_ARM_VFP
-	beq	Lno_vfp
+	beq	.Lno_vfp
+#endif
 
 	/* Restore the VFP registers.  */
 	/* Following instruction is vldmia ip!, {d8-d15}.  */
@@ -76,10 +84,11 @@
 	ldr     a3, [ip], #4
 	/* Following instruction is fmxr fpscr, a3.  */
 	mcr	p10, 7, a3, cr1, cr0, 0
-Lno_vfp:
+.Lno_vfp:
 
+#ifndef ARM_ASSUME_NO_IWMMXT
 	tst	a2, #HWCAP_ARM_IWMMXT
-	beq	Lno_iwmmxt
+	beq	.Lno_iwmmxt
 
 	/* Restore the call-preserved iWMMXt registers.  */
 	/* Following instructions are wldrd wr10, [ip], #8 (etc.)  */
@@ -89,23 +98,26 @@
 	ldcl	p1, cr13, [r12], #8
 	ldcl	p1, cr14, [r12], #8
 	ldcl	p1, cr15, [r12], #8
-Lno_iwmmxt:
+.Lno_iwmmxt:
+#endif
 
 	DO_RET(lr)
 
-#ifdef IS_IN_rtld
+#ifdef NEED_HWCAP
+# ifdef IS_IN_rtld
 1:	.long	_GLOBAL_OFFSET_TABLE_ - 0b - 8
-Lrtld_local_ro:
+.Lrtld_local_ro:
 	.long	C_SYMBOL_NAME(_rtld_local_ro)(GOTOFF)
-#else
-#ifdef PIC
+# else
+#  ifdef PIC
 1:	.long	_GLOBAL_OFFSET_TABLE_ - 0b - 8
-Lrtld_global_ro:
+.Lrtld_global_ro:
 	.long	C_SYMBOL_NAME(_rtld_global_ro)(GOT)
-#else
-Lhwcap:
+#  else
+.Lhwcap:
 	.long	C_SYMBOL_NAME(_dl_hwcap)
-#endif
+#  endif
+# endif
 #endif
 
 END (__longjmp)

Added: fsf/trunk/libc/ports/sysdeps/arm/arm-features.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/arm-features.h (added)
+++ fsf/trunk/libc/ports/sysdeps/arm/arm-features.h Fri Aug 10 00:01:39 2012
@@ -1,0 +1,39 @@
+/* Macros to test for CPU features on ARM.  Generic ARM version.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library.  If not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _ARM_ARM_FEATURES_H
+#define _ARM_ARM_FEATURES_H 1
+
+/* An OS-specific arm-features.h file should define ARM_HAVE_VFP to
+   an appropriate expression for testing at runtime whether the VFP
+   hardware is present.  We'll then redefine it to a constant if we
+   know at compile time that we can assume VFP.  */
+
+#ifndef __SOFTFP__
+/* The compiler is generating VFP instructions, so we're already
+   assuming the hardware exists.  */
+# undef ARM_HAVE_VFP
+# define ARM_HAVE_VFP	1
+#endif
+
+/* An OS-specific arm-features.h file may define ARM_ASSUME_NO_IWMMXT
+   to indicate at compile time that iWMMXt hardware is never present
+   at runtime (or that we never care about its state) and so need not
+   be checked for.  */
+
+#endif  /* arm-features.h */

Modified: fsf/trunk/libc/ports/sysdeps/arm/fclrexcpt.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/fclrexcpt.c (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/fclrexcpt.c Fri Aug 10 00:01:39 2012
@@ -1,5 +1,5 @@
 /* Clear given exceptions in current floating-point environment.
-   Copyright (C) 1997,98,99,2000,01,05,11 Free Software Foundation, Inc.
+   Copyright (C) 1997-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -18,16 +18,13 @@
 
 #include <fenv.h>
 #include <fpu_control.h>
+#include <arm-features.h>
 
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
 
 int
 __feclearexcept (int excepts)
 {
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+  if (ARM_HAVE_VFP)
     {
       unsigned long int temp;
 

Modified: fsf/trunk/libc/ports/sysdeps/arm/fedisblxcpt.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/fedisblxcpt.c (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/fedisblxcpt.c Fri Aug 10 00:01:39 2012
@@ -1,5 +1,5 @@
 /* Disable floating-point exceptions.
-   Copyright (C) 2001, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2001-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Philip Blundell <philb@xxxxxxx>, 2001.
 
@@ -19,16 +19,13 @@
 
 #include <fenv.h>
 #include <fpu_control.h>
+#include <arm-features.h>
 
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
 
 int
 fedisableexcept (int excepts)
 {
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+  if (ARM_HAVE_VFP)
     {
       unsigned long int new_exc, old_exc;
 

Modified: fsf/trunk/libc/ports/sysdeps/arm/feenablxcpt.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/feenablxcpt.c (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/feenablxcpt.c Fri Aug 10 00:01:39 2012
@@ -1,5 +1,5 @@
 /* Enable floating-point exceptions.
-   Copyright (C) 2001, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2001-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Philip Blundell <philb@xxxxxxx>, 2001.
 
@@ -19,16 +19,13 @@
 
 #include <fenv.h>
 #include <fpu_control.h>
+#include <arm-features.h>
 
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
 
 int
 feenableexcept (int excepts)
 {
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+  if (ARM_HAVE_VFP)
     {
       unsigned long int new_exc, old_exc;
 

Modified: fsf/trunk/libc/ports/sysdeps/arm/fegetenv.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/fegetenv.c (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/fegetenv.c Fri Aug 10 00:01:39 2012
@@ -1,5 +1,5 @@
 /* Store current floating-point environment.
-   Copyright (C) 1997,98,99,2000,01,05,10 Free Software Foundation, Inc.
+   Copyright (C) 1997-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -18,16 +18,13 @@
 
 #include <fenv.h>
 #include <fpu_control.h>
+#include <arm-features.h>
 
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
 
 int
 __fegetenv (fenv_t *envp)
 {
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+  if (ARM_HAVE_VFP)
     {
       unsigned long int temp;
       _FPU_GETCW (temp);

Modified: fsf/trunk/libc/ports/sysdeps/arm/fegetexcept.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/fegetexcept.c (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/fegetexcept.c Fri Aug 10 00:01:39 2012
@@ -1,5 +1,5 @@
 /* Get floating-point exceptions.
-   Copyright (C) 2001, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2001-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Philip Blundell <philb@xxxxxxx>, 2001
 
@@ -19,16 +19,13 @@
 
 #include <fenv.h>
 #include <fpu_control.h>
+#include <arm-features.h>
 
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
 
 int
 fegetexcept (void)
 {
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+  if (ARM_HAVE_VFP)
     {
       unsigned long temp;
 

Modified: fsf/trunk/libc/ports/sysdeps/arm/fegetround.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/fegetround.c (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/fegetround.c Fri Aug 10 00:01:39 2012
@@ -1,5 +1,5 @@
 /* Return current rounding direction.
-   Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2004-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -18,16 +18,13 @@
 
 #include <fenv.h>
 #include <fpu_control.h>
+#include <arm-features.h>
 
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
 
 int
 fegetround (void)
 {
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+  if (ARM_HAVE_VFP)
     {
       unsigned int temp;
 

Modified: fsf/trunk/libc/ports/sysdeps/arm/feholdexcpt.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/feholdexcpt.c (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/feholdexcpt.c Fri Aug 10 00:01:39 2012
@@ -1,5 +1,5 @@
 /* Store current floating-point environment and clear exceptions.
-   Copyright (C) 1997, 1998, 1999, 2005 Free Software Foundation, Inc.
+   Copyright (C) 1997-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -18,16 +18,13 @@
 
 #include <fenv.h>
 #include <fpu_control.h>
+#include <arm-features.h>
 
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
 
 int
 feholdexcept (fenv_t *envp)
 {
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+  if (ARM_HAVE_VFP)
     {
       unsigned long int temp;
 

Modified: fsf/trunk/libc/ports/sysdeps/arm/fesetenv.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/fesetenv.c (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/fesetenv.c Fri Aug 10 00:01:39 2012
@@ -1,5 +1,5 @@
 /* Install given floating-point environment.
-   Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2004-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -18,16 +18,13 @@
 
 #include <fenv.h>
 #include <fpu_control.h>
+#include <arm-features.h>
 
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
 
 int
 __fesetenv (const fenv_t *envp)
 {
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+  if (ARM_HAVE_VFP)
     {
       unsigned int temp;
 

Modified: fsf/trunk/libc/ports/sysdeps/arm/fesetround.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/fesetround.c (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/fesetround.c Fri Aug 10 00:01:39 2012
@@ -1,5 +1,5 @@
 /* Set current rounding direction.
-   Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2004-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -18,16 +18,13 @@
 
 #include <fenv.h>
 #include <fpu_control.h>
+#include <arm-features.h>
 
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
 
 int
 fesetround (int round)
 {
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+  if (ARM_HAVE_VFP)
     {
       fpu_control_t temp;
 

Modified: fsf/trunk/libc/ports/sysdeps/arm/feupdateenv.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/feupdateenv.c (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/feupdateenv.c Fri Aug 10 00:01:39 2012
@@ -1,5 +1,5 @@
 /* Install given floating-point environment and raise exceptions.
-   Copyright (C) 1997, 1999, 2000, 2008, 2010 Free Software Foundation, Inc.
+   Copyright (C) 1997-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
 
@@ -19,16 +19,13 @@
 
 #include <fenv.h>
 #include <fpu_control.h>
+#include <arm-features.h>
 
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
 
 int
 __feupdateenv (const fenv_t *envp)
 {
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+  if (ARM_HAVE_VFP)
     {
       unsigned int temp;
 

Modified: fsf/trunk/libc/ports/sysdeps/arm/fgetexcptflg.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/fgetexcptflg.c (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/fgetexcptflg.c Fri Aug 10 00:01:39 2012
@@ -1,5 +1,5 @@
 /* Store current representation for exceptions.
-   Copyright (C) 1997, 1999, 2000, 2008 Free Software Foundation, Inc.
+   Copyright (C) 1997-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
 
@@ -19,16 +19,13 @@
 
 #include <fenv.h>
 #include <fpu_control.h>
+#include <arm-features.h>
 
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
 
 int
 __fegetexceptflag (fexcept_t *flagp, int excepts)
 {
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+  if (ARM_HAVE_VFP)
     {
       unsigned long temp;
 

Modified: fsf/trunk/libc/ports/sysdeps/arm/fraiseexcpt.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/fraiseexcpt.c (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/fraiseexcpt.c Fri Aug 10 00:01:39 2012
@@ -1,5 +1,5 @@
 /* Raise given exceptions.
-   Copyright (C) 2004, 2005, 2011 Free Software Foundation, Inc.
+   Copyright (C) 2004-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -19,16 +19,13 @@
 #include <fpu_control.h>
 #include <fenv.h>
 #include <float.h>
+#include <arm-features.h>
 
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
 
 int
 feraiseexcept (int excepts)
 {
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+  if (ARM_HAVE_VFP)
     {
       int fpscr;
       const float fp_zero = 0.0, fp_one = 1.0, fp_max = FLT_MAX,

Modified: fsf/trunk/libc/ports/sysdeps/arm/fsetexcptflg.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/fsetexcptflg.c (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/fsetexcptflg.c Fri Aug 10 00:01:39 2012
@@ -1,5 +1,5 @@
 /* Set floating-point environment exception handling.
-   Copyright (C) 1997,98,99,2000,01,05,08,11 Free Software Foundation, Inc.
+   Copyright (C) 1997-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -19,16 +19,13 @@
 #include <fenv.h>
 #include <math.h>
 #include <fpu_control.h>
+#include <arm-features.h>
 
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
 
 int
 __fesetexceptflag (const fexcept_t *flagp, int excepts)
 {
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+  if (ARM_HAVE_VFP)
     {
       fexcept_t temp;
 

Modified: fsf/trunk/libc/ports/sysdeps/arm/ftestexcept.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/ftestexcept.c (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/ftestexcept.c Fri Aug 10 00:01:39 2012
@@ -1,5 +1,5 @@
 /* Test exception in current environment.
-   Copyright (C) 1997, 1998, 2005, 2010 Free Software Foundation, Inc.
+   Copyright (C) 1997-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -18,16 +18,13 @@
 
 #include <fenv.h>
 #include <fpu_control.h>
+#include <arm-features.h>
 
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
 
 int
 fetestexcept (int excepts)
 {
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+  if (ARM_HAVE_VFP)
     {
       fexcept_t temp;
 

Modified: fsf/trunk/libc/ports/sysdeps/arm/setfpucw.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/setfpucw.c (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/setfpucw.c Fri Aug 10 00:01:39 2012
@@ -1,5 +1,5 @@
 /* Set the FPU control word.
-   Copyright (C) 1996, 1997, 1999, 2005 Free Software Foundation, Inc.
+   Copyright (C) 1996-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -18,16 +18,13 @@
 
 #include <math.h>
 #include <fpu_control.h>
+#include <arm-features.h>
 
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
 
 void
 __setfpucw (fpu_control_t set)
 {
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+  if (ARM_HAVE_VFP)
     {
       fpu_control_t cw;
 

Modified: fsf/trunk/libc/ports/sysdeps/arm/setjmp.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/setjmp.S (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/setjmp.S Fri Aug 10 00:01:39 2012
@@ -1,5 +1,5 @@
 /* setjmp for ARM.
-   Copyright (C) 1997, 1998, 2005, 2006, 2008 Free Software Foundation, Inc.
+   Copyright (C) 1997-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -21,6 +21,7 @@
 #define _ASM
 #include <bits/setjmp.h>
 #include <rtld-global-offsets.h>
+#include <arm-features.h>
 
 ENTRY (__sigsetjmp)
 	mov	ip, r0
@@ -28,28 +29,36 @@
 	/* Save registers */
 	stmia	ip!, {v1-v6, sl, fp, sp, lr}
 
+#if !defined ARM_ASSUME_NO_IWMMXT || defined __SOFTFP__
+# define NEED_HWCAP 1
+#endif
+
+#ifdef NEED_HWCAP
 	/* Check if we have a VFP unit.  */
-#ifdef IS_IN_rtld
+# ifdef IS_IN_rtld
 	ldr	a3, 1f
-	ldr	a4, Lrtld_local_ro
+	ldr	a4, .Lrtld_local_ro
 0:	add	a3, pc, a3
 	add	a3, a3, a4
 	ldr	a3, [a3, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
-#else
-#ifdef PIC
+# else
+#  ifdef PIC
 	ldr	a3, 1f
-	ldr	a4, Lrtld_global_ro
+	ldr	a4, .Lrtld_global_ro
 0:	add	a3, pc, a3
 	ldr	a3, [a3, a4]
 	ldr	a3, [a3, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
-#else
-	ldr	a3, Lhwcap
+#  else
+	ldr	a3, .Lhwcap
 	ldr	a3, [a3, #0]
-#endif
+#  endif
+# endif
 #endif
 
+#ifdef __SOFTFP__
 	tst	a3, #HWCAP_ARM_VFP
-	beq	Lno_vfp
+	beq	.Lno_vfp
+#endif
 
 	/* Store the VFP registers.
 	   Don't use VFP instructions directly because this code
@@ -60,10 +69,11 @@
 	/* Following instruction is vmrs a4, fpscr.  */
 	mrc	p10, 7, a4, cr1, cr0, 0
 	str	a4, [ip], #4
-Lno_vfp:
+.Lno_vfp:
 
+#ifndef ARM_ASSUME_NO_IWMMXT
 	tst	a3, #HWCAP_ARM_IWMMXT
-	beq	Lno_iwmmxt
+	beq	.Lno_iwmmxt
 
 	/* Save the call-preserved iWMMXt registers.  */
 	/* Following instructions are wstrd wr10, [ip], #8 (etc.)  */
@@ -73,24 +83,27 @@
 	stcl	p1, cr13, [r12], #8
 	stcl	p1, cr14, [r12], #8
 	stcl	p1, cr15, [r12], #8
-Lno_iwmmxt:
+.Lno_iwmmxt:
+#endif
 
 	/* Make a tail call to __sigjmp_save; it takes the same args.  */
 	B	PLTJMP(C_SYMBOL_NAME(__sigjmp_save))
 
-#ifdef IS_IN_rtld
+#ifdef NEED_HWCAP
+# ifdef IS_IN_rtld
 1:	.long	_GLOBAL_OFFSET_TABLE_ - 0b - 8
-Lrtld_local_ro:
+.Lrtld_local_ro:
 	.long	C_SYMBOL_NAME(_rtld_local_ro)(GOTOFF)
-#else
-#ifdef PIC
+# else
+#  ifdef PIC
 1:	.long	_GLOBAL_OFFSET_TABLE_ - 0b - 8
-Lrtld_global_ro:
+.Lrtld_global_ro:
 	.long	C_SYMBOL_NAME(_rtld_global_ro)(GOT)
-#else
-Lhwcap:
+#  else
+.Lhwcap:
 	.long	C_SYMBOL_NAME(_dl_hwcap)
-#endif
+#  endif
+# endif
 #endif
 
 END (__sigsetjmp)

Added: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/arm-features.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/arm-features.h (added)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/arm-features.h Fri Aug 10 00:01:39 2012
@@ -1,0 +1,30 @@
+/* Macros to test for CPU features on ARM.  Linux version.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library.  If not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _LINUX_ARM_FEATURES_H
+#define _LINUX_ARM_FEATURES_H 1
+
+#ifndef __ASSEMBLER__
+# include <ldsodefs.h>
+
+# define ARM_HAVE_VFP	(GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+#endif
+
+#include_next <arm-features.h>
+
+#endif  /* arm-features.h */

Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/getcontext.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/getcontext.S (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/getcontext.S Fri Aug 10 00:01:39 2012
@@ -41,54 +41,56 @@
 
 	/* Save ucontext_t * across the next call.  */
 	mov	r4, r0
-	
+
 	/* __sigprocmask(SIG_BLOCK, NULL, &(ucontext->uc_sigmask)) */
 	mov     r0, #SIG_BLOCK
 	mov     r1, #0
 	add     r2, r4, #UCONTEXT_SIGMASK
 	bl      PLTJMP(__sigprocmask)
-	
+
 	/* Store FP regs.  Much of the FP code is copied from arm/setjmp.S.  */
 
 #ifdef PIC
-        ldr     r2, 1f
-        ldr     r1, Lrtld_global_ro
+	ldr     r2, 1f
+	ldr     r1, .Lrtld_global_ro
 0:      add     r2, pc, r2
-        ldr     r2, [r2, r1]
-        ldr     r2, [r2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
+	ldr     r2, [r2, r1]
+	ldr     r2, [r2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
 #else
-        ldr     r2, Lhwcap
-        ldr     r2, [r2, #0]
+	ldr     r2, .Lhwcap
+	ldr     r2, [r2, #0]
 #endif
 
 	add	r0, r4, #UCONTEXT_REGSPACE
 
-        tst     r2, #HWCAP_ARM_VFP
-        beq     Lno_vfp
+#ifdef __SOFTFP__
+	tst     r2, #HWCAP_ARM_VFP
+	beq     .Lno_vfp
+#endif
 
-        /* Store the VFP registers.
-           Don't use VFP instructions directly because this code
-           is used in non-VFP multilibs.  */
-        /* Following instruction is vstmia r0!, {d8-d15}.  */
-        stc     p11, cr8, [r0], #64
-        /* Store the floating-point status register.  */
-        /* Following instruction is vmrs r1, fpscr.  */
-        mrc     p10, 7, r1, cr1, cr0, 0
-        str     r1, [r0], #4
-Lno_vfp:
+	/* Store the VFP registers.
+	   Don't use VFP instructions directly because this code
+	   is used in non-VFP multilibs.  */
+	/* Following instruction is vstmia r0!, {d8-d15}.  */
+	stc     p11, cr8, [r0], #64
+	/* Store the floating-point status register.  */
+	/* Following instruction is vmrs r1, fpscr.  */
+	mrc     p10, 7, r1, cr1, cr0, 0
+	str     r1, [r0], #4
+.Lno_vfp:
 
-        tst     r2, #HWCAP_ARM_IWMMXT
-        beq     Lno_iwmmxt
+	tst     r2, #HWCAP_ARM_IWMMXT
+	beq     .Lno_iwmmxt
 
-        /* Save the call-preserved iWMMXt registers.  */
-        /* Following instructions are wstrd wr10, [r0], #8 (etc.)  */
-        stcl    p1, cr10, [r0], #8
-        stcl    p1, cr11, [r0], #8
-        stcl    p1, cr12, [r0], #8
-        stcl    p1, cr13, [r0], #8
-        stcl    p1, cr14, [r0], #8
-        stcl    p1, cr15, [r0], #8
-Lno_iwmmxt:
+	/* Save the call-preserved iWMMXt registers.  */
+	/* Following instructions are wstrd wr10, [r0], #8 (etc.)  */
+	stcl    p1, cr10, [r0], #8
+	stcl    p1, cr11, [r0], #8
+	stcl    p1, cr12, [r0], #8
+	stcl    p1, cr13, [r0], #8
+	stcl    p1, cr14, [r0], #8
+	stcl    p1, cr15, [r0], #8
+.Lno_iwmmxt:
 
 	/* Restore the clobbered R4 and LR.  */
 	ldr	r14, [r4, #MCONTEXT_ARM_LR]
@@ -102,11 +104,11 @@
 
 #ifdef PIC
 1:      .long   _GLOBAL_OFFSET_TABLE_ - 0b - 8
-Lrtld_global_ro:
-        .long   C_SYMBOL_NAME(_rtld_global_ro)(GOT)
+.Lrtld_global_ro:
+	.long   C_SYMBOL_NAME(_rtld_global_ro)(GOT)
 #else
-Lhwcap:
-        .long   C_SYMBOL_NAME(_dl_hwcap)
+.Lhwcap:
+	.long   C_SYMBOL_NAME(_dl_hwcap)
 #endif
 
 

Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/setcontext.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/setcontext.S (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/setcontext.S Fri Aug 10 00:01:39 2012
@@ -29,40 +29,42 @@
 	mov	r4, r0
 	add	r0, r0, #UCONTEXT_REGSPACE
 
-        /* Restore the VFP registers.  Copied from arm/__longjmp.S.  */
+	/* Restore the VFP registers.  Copied from arm/__longjmp.S.  */
 #ifdef PIC
-        ldr     r2, 1f
-        ldr     r1, Lrtld_global_ro
+	ldr     r2, 1f
+	ldr     r1, .Lrtld_global_ro
 0:      add     r2, pc, r2
-        ldr     r2, [r2, r1]
-        ldr     r2, [r2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
+	ldr     r2, [r2, r1]
+	ldr     r2, [r2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
 #else
-        ldr     r2, Lhwcap
-        ldr     r2, [r2, #0]
+	ldr     r2, .Lhwcap
+	ldr     r2, [r2, #0]
 #endif
 
-        tst     r2, #HWCAP_ARM_VFP
-        beq     Lno_vfp_sc
+#ifdef __SOFTFP__
+	tst     r2, #HWCAP_ARM_VFP
+	beq     .Lno_vfp_sc
+#endif
 
-        /* Following instruction is vldmia r0!, {d8-d15}.  */
-        ldc     p11, cr8, [r0], #64
-        /* Restore the floating-point status register.  */
-        ldr     r1, [r0], #4
-        /* Following instruction is fmxr fpscr, r1.  */
-        mcr     p10, 7, r1, cr1, cr0, 0
-Lno_vfp_sc:
-        tst     r2, #HWCAP_ARM_IWMMXT
-        beq     Lno_iwmmxt_sc
+	/* Following instruction is vldmia r0!, {d8-d15}.  */
+	ldc     p11, cr8, [r0], #64
+	/* Restore the floating-point status register.  */
+	ldr     r1, [r0], #4
+	/* Following instruction is fmxr fpscr, r1.  */
+	mcr     p10, 7, r1, cr1, cr0, 0
+.Lno_vfp_sc:
+	tst     r2, #HWCAP_ARM_IWMMXT
+	beq     .Lno_iwmmxt_sc
 
-        /* Restore the call-preserved iWMMXt registers.  */
-        /* Following instructions are wldrd wr10, [r0], #8 (etc.)  */
-        ldcl    p1, cr10, [r0], #8
-        ldcl    p1, cr11, [r0], #8
-        ldcl    p1, cr12, [r0], #8
-        ldcl    p1, cr13, [r0], #8
-        ldcl    p1, cr14, [r0], #8
-        ldcl    p1, cr15, [r0], #8
-Lno_iwmmxt_sc:
+	/* Restore the call-preserved iWMMXt registers.  */
+	/* Following instructions are wldrd wr10, [r0], #8 (etc.)  */
+	ldcl    p1, cr10, [r0], #8
+	ldcl    p1, cr11, [r0], #8
+	ldcl    p1, cr12, [r0], #8
+	ldcl    p1, cr13, [r0], #8
+	ldcl    p1, cr14, [r0], #8
+	ldcl    p1, cr15, [r0], #8
+.Lno_iwmmxt_sc:
 
 	/* Now bring back the signal status.  */
 	mov	r0, #SIG_SETMASK
@@ -70,12 +72,12 @@
 	mov	r2, #0
 	bl	PLTJMP(__sigprocmask)
 
-        /* Loading r0-r3 makes makecontext easier.  */
-        add     r14, r4, #MCONTEXT_ARM_R0
-        ldmia   r14, {r0-r12}
-        ldr     r13, [r14, #(MCONTEXT_ARM_SP - MCONTEXT_ARM_R0)]
-        add     r14, r14, #(MCONTEXT_ARM_LR - MCONTEXT_ARM_R0)
-        ldmia   r14, {r14, pc}
+	/* Loading r0-r3 makes makecontext easier.  */
+	add     r14, r4, #MCONTEXT_ARM_R0
+	ldmia   r14, {r0-r12}
+	ldr     r13, [r14, #(MCONTEXT_ARM_SP - MCONTEXT_ARM_R0)]
+	add     r14, r14, #(MCONTEXT_ARM_LR - MCONTEXT_ARM_R0)
+	ldmia   r14, {r14, pc}
 
 END(setcontext)
 weak_alias(__setcontext, setcontext)
@@ -83,19 +85,18 @@
 	/* Called when a makecontext() context returns.  Start the
 	   context in R4 or fall through to exit().  */
 ENTRY(__startcontext)
-        movs    r0, r4
-        bne     PLTJMP(__setcontext)
+	movs    r0, r4
+	bne     PLTJMP(__setcontext)
 
-        @ New context was 0 - exit
-        b       PLTJMP(HIDDEN_JUMPTARGET(_exit))
+	@ New context was 0 - exit
+	b       PLTJMP(HIDDEN_JUMPTARGET(_exit))
 END(__startcontext)
 
 #ifdef PIC
 1:      .long   _GLOBAL_OFFSET_TABLE_ - 0b - 8
-Lrtld_global_ro:
-        .long   C_SYMBOL_NAME(_rtld_global_ro)(GOT)
+.Lrtld_global_ro:
+	.long   C_SYMBOL_NAME(_rtld_global_ro)(GOT)
 #else
-Lhwcap:
-        .long   C_SYMBOL_NAME(_dl_hwcap)
+.Lhwcap:
+	.long   C_SYMBOL_NAME(_dl_hwcap)
 #endif
-

Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/kernel-features.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/kernel-features.h (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/kernel-features.h Fri Aug 10 00:01:39 2012
@@ -22,6 +22,9 @@
 /* MIPS platforms had IPC64 all along.  */
 #define __ASSUME_IPC64		1
 
+/* MIPS had the utimes syscall by 2.6.0.  */
+#define __ASSUME_UTIMES		1
+
 /* Support for the eventfd2 and signalfd4 syscalls was added in 2.6.27.  */
 #if __LINUX_KERNEL_VERSION >= 0x02061c
 # define __ASSUME_EVENTFD2	1

Modified: fsf/trunk/libc/sysdeps/i386/i686/multiarch/strstr-c.c
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/i686/multiarch/strstr-c.c (original)
+++ fsf/trunk/libc/sysdeps/i386/i686/multiarch/strstr-c.c Fri Aug 10 00:01:39 2012
@@ -7,9 +7,20 @@
   __hidden_ver1 (__strstr_ia32, __GI_strstr, __strstr_ia32);
 #endif
 
+/* Redefine strstr so that the compiler won't complain about the type
+   mismatch with the IFUNC selector in strong_alias, below.  */
+#undef strstr
+#define strstr __redirect_strstr
+
 #include "string/strstr.c"
 
-extern char *__strstr_sse42 (const char *, const char *) attribute_hidden;
-extern __typeof (__strstr_ia32) __strstr_ia32 attribute_hidden;
+extern __typeof (__redirect_strstr) __strstr_sse42 attribute_hidden;
+extern __typeof (__redirect_strstr) __strstr_ia32 attribute_hidden;
 
-libc_ifunc (strstr, HAS_SSE4_2 ? __strstr_sse42 : __strstr_ia32);
+/* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle
+   ifunc symbol properly.  */
+extern __typeof (__redirect_strstr) __libc_strstr;
+libc_ifunc (__libc_strstr, HAS_SSE4_2 ? __strstr_sse42 : __strstr_ia32)
+
+#undef strstr
+strong_alias (__libc_strstr, strstr)

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/time.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/time.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/time.c Fri Aug 10 00:01:39 2012
@@ -16,11 +16,20 @@
    <http://www.gnu.org/licenses/>.  */
 
 #ifdef SHARED
+/* Redefine time so that the compiler won't complain about the type
+   mismatch with the IFUNC selector in strong_alias, below.  */
+#undef time
+#define time __redirect_time
+#include <time.h>
+
 #include <dl-vdso.h>
 
 #define VSYSCALL_ADDR_vtime	0xffffffffff600400
 
-void *time_ifunc (void) __asm__ ("time");
+/* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle
+   ifunc symbol properly.  */
+extern __typeof (__redirect_time) __libc_time;
+void *time_ifunc (void) __asm__ ("__libc_time");
 
 void *
 time_ifunc (void)
@@ -30,7 +39,11 @@
   /* If the vDSO is not available we fall back on the old vsyscall.  */
   return _dl_vdso_vsym ("__vdso_time", &linux26) ?: (void *) VSYSCALL_ADDR_vtime;
 }
-__asm (".type time, %gnu_indirect_function");
+__asm (".type __libc_time, %gnu_indirect_function");
+
+#undef time
+strong_alias (__libc_time, time)
+libc_hidden_ver (__libc_time, time)
 
 #else
 
@@ -45,5 +58,3 @@
 }
 
 #endif
-
-strong_alias (time, __GI_time)

Modified: fsf/trunk/libc/sysdeps/x86_64/multiarch/memmove.c
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/multiarch/memmove.c (original)
+++ fsf/trunk/libc/sysdeps/x86_64/multiarch/memmove.c Fri Aug 10 00:01:39 2012
@@ -17,7 +17,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <string.h>
+#include <stddef.h>
 
 #ifndef NOT_IN_libc
 #include <shlib-compat.h>
@@ -29,20 +29,31 @@
 # define libc_hidden_builtin_def(name) \
   __hidden_ver1 (__memmove_sse2, __GI_memmove, __memmove_sse2);
 #endif
+
+/* Redefine memmove so that the compiler won't complain about the type
+   mismatch with the IFUNC selector in strong_alias, below.  */
+#undef memmove
+#define memmove __redirect_memmove
 #endif
-
-extern __typeof (memmove) __memmove_sse2 attribute_hidden;
-extern __typeof (memmove) __memmove_ssse3 attribute_hidden;
-extern __typeof (memmove) __memmove_ssse3_back attribute_hidden;
 
 #include "string/memmove.c"
 
 #ifndef NOT_IN_libc
-libc_ifunc (memmove,
+extern __typeof (__redirect_memmove) __memmove_sse2 attribute_hidden;
+extern __typeof (__redirect_memmove) __memmove_ssse3 attribute_hidden;
+extern __typeof (__redirect_memmove) __memmove_ssse3_back attribute_hidden;
+
+/* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle
+   ifunc symbol properly.  */
+extern __typeof (__redirect_memmove) __libc_memmove;
+libc_ifunc (__libc_memmove,
 	    HAS_SSSE3
 	    ? (HAS_FAST_COPY_BACKWARD
 	       ? __memmove_ssse3_back : __memmove_ssse3)
-	    : __memmove_sse2);
+	    : __memmove_sse2)
+
+#undef memmove
+strong_alias (__libc_memmove, memmove)
 
 #if SHLIB_COMPAT (libc, GLIBC_2_2_5, GLIBC_2_14)
 compat_symbol (libc, memmove, memcpy, GLIBC_2_2_5);

Modified: fsf/trunk/libc/sysdeps/x86_64/multiarch/strstr-c.c
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/multiarch/strstr-c.c (original)
+++ fsf/trunk/libc/sysdeps/x86_64/multiarch/strstr-c.c Fri Aug 10 00:01:39 2012
@@ -7,9 +7,20 @@
   __hidden_ver1 (__strstr_sse2, __GI_strstr, __strstr_sse2);
 #endif
 
+/* Redefine strstr so that the compiler won't complain about the type
+   mismatch with the IFUNC selector in strong_alias, below.  */
+#undef strstr
+#define strstr __redirect_strstr
+
 #include "string/strstr.c"
 
-extern char *__strstr_sse42 (const char *, const char *) attribute_hidden;
-extern __typeof (__strstr_sse2) __strstr_sse2 attribute_hidden;
+extern __typeof (__redirect_strstr) __strstr_sse42 attribute_hidden;
+extern __typeof (__redirect_strstr) __strstr_sse2 attribute_hidden;
 
-libc_ifunc (strstr, HAS_SSE4_2 ? __strstr_sse42 : __strstr_sse2);
+/* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle
+   ifunc symbol properly.  */
+extern __typeof (__redirect_strstr) __libc_strstr;
+libc_ifunc (__libc_strstr, HAS_SSE4_2 ? __strstr_sse42 : __strstr_sse2)
+
+#undef strstr
+strong_alias (__libc_strstr, strstr)

_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits