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

[Commits] r22619 - in /fsf/trunk/libc: ./ csu/ ports/ ports/sysdeps/arm/ ports/sysdeps/ia64/ ports/sysdeps/ia64/fpu/ ports/sysdeps/uni...



Author: eglibc
Date: Wed Mar 13 00:01:57 2013
New Revision: 22619

Log:
Import glibc-mainline for 2013-03-13

Added:
    fsf/trunk/libc/sysdeps/init_array/
    fsf/trunk/libc/sysdeps/init_array/crti.S
    fsf/trunk/libc/sysdeps/init_array/crtn.S
    fsf/trunk/libc/sysdeps/init_array/elf-init.c
    fsf/trunk/libc/sysdeps/init_array/gmon-start.c
Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/csu/elf-init.c
    fsf/trunk/libc/csu/gmon-start.c
    fsf/trunk/libc/ports/ChangeLog.arm
    fsf/trunk/libc/ports/ChangeLog.ia64
    fsf/trunk/libc/ports/sysdeps/arm/preconfigure
    fsf/trunk/libc/ports/sysdeps/arm/preconfigure.in
    fsf/trunk/libc/ports/sysdeps/ia64/dl-fptr.h
    fsf/trunk/libc/ports/sysdeps/ia64/dl-machine.h
    fsf/trunk/libc/ports/sysdeps/ia64/entry.h
    fsf/trunk/libc/ports/sysdeps/ia64/fpu/libm_error.c
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/configure
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/configure.in
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/ia64/makecontext.c
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/ia64/sysdep.h

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Wed Mar 13 00:01:57 2013
@@ -1,20 +1,29 @@
-2013-03-13  OndÃÂej BÃÂlka  <neleai@xxxxxxxxx>
+2013-03-12  Roland McGrath  <roland@xxxxxxxxxxxxx>
+
+	* sysdeps/init_array/elf-init.c: New file.
+	* csu/elf-init.c
+	(__libc_csu_init) [!NO_INITFINI]: Conditionalize _init call on this.
+	(__libc_csu_fini) [!NO_INITFINI]: Conditionalize _fini call on this.
+
+	* csu/gmon-start.c [GMON_START_ARRAY_SECTION]: Don't define
+	__gmon_start__ as global, but as static with a .preinit_array pointer.
+	* sysdeps/init_array/gmon-start.c: New file.  Use that.
+	* sysdeps/init_array/crti.S: New file, empty except for comments.
+	* sysdeps/init_array/crtn.S: Likewise.
+
+2013-03-11  OndÃÂej BÃÂlka  <neleai@xxxxxxxxx>
 
 	* sysdeps/x86_64/memset.S: Remove USE_MULTIARCH conditional for
 	definining bcopy.
-
 	* sysdeps/x86_64/multiarch/init-arch.c (__init_cpu_features):
 	Remove Prefer_SSE_for_memop.
 	* sysdeps/x86_64/multiarch/init-arch.h: Remove
 	bit_Prefer_SSE_for_memop, index_Prefer_SSE_for_memop,
 	HAS_PREFER_SSE_FOR_MEMOP.
-
 	* sysdeps/x86_64/multiarch/Makefile (sysdep_routines): Remove
 	memset-x86-64.
-
 	* sysdeps/x86_64/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list):
-	Remove zero, memset ifunc support.
-
+	Remove bzero, memset ifunc support.
 	* sysdeps/x86_64/multiarch/bzero.S: Remove file.
 	* sysdeps/x86_64/multiarch/memset-x86-64.S: Likewise.
 	* sysdeps/x86_64/multiarch/memset.S: Likewise.

Modified: fsf/trunk/libc/csu/elf-init.c
==============================================================================
--- fsf/trunk/libc/csu/elf-init.c (original)
+++ fsf/trunk/libc/csu/elf-init.c Wed Mar 13 00:01:57 2013
@@ -49,10 +49,13 @@
 extern void (*__fini_array_end []) (void) attribute_hidden;
 
 
+#ifndef NO_INITFINI
 /* These function symbols are provided for the .init/.fini section entry
    points automagically by the linker.  */
 extern void _init (void);
 extern void _fini (void);
+#endif
+
 
 /* These functions are passed to __libc_start_main by the startup code.
    These get statically linked into each program.  For dynamically linked
@@ -76,7 +79,9 @@
   }
 #endif
 
+#ifndef NO_INITFINI
   _init ();
+#endif
 
   const size_t size = __init_array_end - __init_array_start;
   for (size_t i = 0; i < size; i++)
@@ -94,6 +99,8 @@
   while (i-- > 0)
     (*__fini_array_start [i]) ();
 
+# ifndef NO_INITFINI
   _fini ();
+# endif
 #endif
 }

Modified: fsf/trunk/libc/csu/gmon-start.c
==============================================================================
--- fsf/trunk/libc/csu/gmon-start.c (original)
+++ fsf/trunk/libc/csu/gmon-start.c Wed Mar 13 00:01:57 2013
@@ -59,10 +59,17 @@
 # endif
 #endif
 
+#ifdef GMON_START_ARRAY_SECTION
+static void __gmon_start__ (void);
+static void (*const gmon_start_initializer) (void)
+  __attribute__ ((used, section (GMON_START_ARRAY_SECTION))) = &__gmon_start__;
+static
+#else
 /* We cannot use the normal constructor mechanism to call
    __gmon_start__ because gcrt1.o appears before crtbegin.o in the link.
    Instead crti.o calls it specially.  */
 extern void __gmon_start__ (void);
+#endif
 
 void
 __gmon_start__ (void)

Modified: fsf/trunk/libc/ports/ChangeLog.arm
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.arm (original)
+++ fsf/trunk/libc/ports/ChangeLog.arm Wed Mar 13 00:01:57 2013
@@ -1,3 +1,12 @@
+2013-03-11  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/arm/preconfigure.in: Add comment about
+	-fno-unwind-tables addition to CFLAGS.
+	* sysdeps/arm/preconfigure: Regenerated.
+	* sysdeps/unix/sysv/linux/arm/configure.in: Add comment about
+	-fno-unwind-tables removal from CFLAGS.
+	* sysdeps/unix/sysv/linux/arm/configure: Regenerated.
+
 2013-03-11  Roland McGrath  <roland@xxxxxxxxxxxxx>
 
 	* sysdeps/arm/bits/setjmp.h: Test [!__ASSEMBLER__] rather than [!_ASM].

Modified: fsf/trunk/libc/ports/ChangeLog.ia64
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.ia64 (original)
+++ fsf/trunk/libc/ports/ChangeLog.ia64 Wed Mar 13 00:01:57 2013
@@ -1,3 +1,45 @@
+2013-03-12  Mike Frysinger  <vapier@xxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/ia64/sysdep.h (INTERNAL_SYSCALL_DECL): Add
+	__attribute__ ((unused)) to err decl.
+	(INTERNAL_SYSCALL_ERROR_P): Add (void)val dummy reference.
+
+2013-03-12  Mike Frysinger  <vapier@xxxxxxxxxx>
+
+	* sysdeps/ia64/fpu/libm_error.c (STATIC): Delete redundant definition.
+	(_DECL_NUM, DECL_FLOAT, DECL_DOUBLE, DECL_LONG_DOUBLE): New defines.
+	(float_inf): Change definition to use DECL_FLOAT.
+	(float_huge, float_zero, float_neg_inf, float_neg_huge,
+	float_neg_zero): Likewise.
+	(double_inf): Change definition to use DECL_DOUBLE.
+	(double_huge, double_zero, double_neg_inf, double_neg_huge,
+	double_neg_zero): Likewise.
+	(long_double_inf): Change definition to use DECL_LONG_DOUBLE.
+	(long_double_huge, long_double_zero, long_double_neg_inf,
+	long_double_neg_huge, long_double_neg_zero): Likewise.
+	(RETVAL_HUGE_VALL): Change from casting a pointer to using the num
+	field of the union.
+	(RETVAL_NEG_HUGE_VALL, RETVAL_HUGEL, RETVAL_NEG_HUGEL,
+	RETVAL_HUGE_VALL, RETVAL_NEG_HUGE_VALL, RETVAL_HUGEL,
+	RETVAL_NEG_HUGEL, RETVAL_HUGE_VALD, RETVAL_NEG_HUGE_VALD,
+	RETVAL_HUGED, RETVAL_NEG_HUGED, RETVAL_HUGE_VALF,
+	RETVAL_NEG_HUGE_VALF, RETVAL_HUGEF, RETVAL_NEG_HUGEF,
+	ZEROL_VALUE, ZEROD_VALUE, ZEROF_VALUE, RETVAL_ZEROL,
+	RETVAL_ZEROD, RETVAL_ZEROF, RETVAL_NEG_ZEROL, RETVAL_NEG_ZEROD,
+	RETVAL_NEG_ZEROF): Likewise.
+
+2013-03-12  Mike Frysinger  <vapier@xxxxxxxxxx>
+
+	* sysdeps/ia64/dl-fptr.h (ELF_PTR_TO_FDESC): New definition.
+	* sysdeps/ia64/dl-machine.h (elf_machine_runtime_setup): Change
+	struct fdesc * casts to use new ELF_PTR_TO_FDESC helper.
+	* sysdeps/ia64/entry.h: Include link.h and dl-fptr.h.
+	(ENTRY_POINT): Change cast to use new ELF_PTR_TO_FDESC helper.
+	* sysdeps/unix/sysv/linux/ia64/makecontext.c: Include link.h and
+	dl-fptr.h.
+	(struct fdesc): Remove structure, now redundant.
+	(makecontext): Change casts to use new ELF_PTR_TO_FDESC helper.
+
 2013-03-11  Andreas Jaeger  <aj@xxxxxxx>
 
 	* sysdeps/unix/sysv/linux/ia64/bits/mman.h: Remove all defines

Modified: fsf/trunk/libc/ports/sysdeps/arm/preconfigure
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/preconfigure (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/preconfigure Wed Mar 13 00:01:57 2013
@@ -5,6 +5,11 @@
 arm*)
   case $config_os in
   linux-gnueabi*)
+    # If the compiler enables unwind tables by default, this causes
+    # problems with undefined symbols in -nostdlib link tests.  To
+    # avoid this, add -fno-unwind-tables here and remove it in
+    # sysdeps/unix/sysv/linux/arm/configure.in after those tests have
+    # been run.
     if  "${CFLAGS+set}" != "set" ; then
       CFLAGS="-g -O2"
     fi

Modified: fsf/trunk/libc/ports/sysdeps/arm/preconfigure.in
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/preconfigure.in (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/preconfigure.in Wed Mar 13 00:01:57 2013
@@ -5,6 +5,11 @@
 arm*)
   case $config_os in
   linux-gnueabi*)
+    # If the compiler enables unwind tables by default, this causes
+    # problems with undefined symbols in -nostdlib link tests.  To
+    # avoid this, add -fno-unwind-tables here and remove it in
+    # sysdeps/unix/sysv/linux/arm/configure.in after those tests have
+    # been run.
     if [ "${CFLAGS+set}" != "set" ]; then
       CFLAGS="-g -O2"
     fi

Modified: fsf/trunk/libc/ports/sysdeps/ia64/dl-fptr.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/ia64/dl-fptr.h (original)
+++ fsf/trunk/libc/ports/sysdeps/ia64/dl-fptr.h Wed Mar 13 00:01:57 2013
@@ -32,4 +32,14 @@
 #define ELF_MACHINE_LOAD_ADDRESS(var, symbol)	\
   asm ("movl %0 = @gprel (" #symbol ");; add %0 = %0, gp" : "=&r" (var));
 
+/* We don't have a gcc helper to extract the plabel info.  */
+#define ELF_PTR_TO_FDESC(ptr) \
+  ({ union { \
+       void *_ptr; \
+       struct fdesc *_fdesc; \
+     } _u; \
+     _u._ptr = ptr; \
+     _u._fdesc; \
+  })
+
 #endif /* !dl_ia64_fptr_h */

Modified: fsf/trunk/libc/ports/sysdeps/ia64/dl-machine.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/ia64/dl-machine.h (original)
+++ fsf/trunk/libc/ports/sysdeps/ia64/dl-machine.h Wed Mar 13 00:01:57 2013
@@ -119,7 +119,7 @@
 
       /* This function will be called to perform the relocation.  */
       if (!profile)
-	doit = (Elf64_Addr) ((struct fdesc *) &_dl_runtime_resolve)->ip;
+	doit = (Elf64_Addr) ELF_PTR_TO_FDESC (&_dl_runtime_resolve)->ip;
       else
 	{
 	  if (GLRO(dl_profile) != NULL
@@ -129,7 +129,7 @@
 		 want profiling and the timers are started.  */
 	      GL(dl_profile_map) = l;
 	    }
-	  doit = (Elf64_Addr) ((struct fdesc *) &_dl_runtime_profile)->ip;
+	  doit = (Elf64_Addr) ELF_PTR_TO_FDESC (&_dl_runtime_profile)->ip;
 	}
 
       reserve[1] = doit;

Modified: fsf/trunk/libc/ports/sysdeps/ia64/entry.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/ia64/entry.h (original)
+++ fsf/trunk/libc/ports/sysdeps/ia64/entry.h Wed Mar 13 00:01:57 2013
@@ -1,10 +1,13 @@
+#include <link.h>
+#include <dl-fptr.h>
+
 #ifndef __ASSEMBLY__
 extern void _start (void);
 #endif
 
 /* The function's entry point is stored in the first word of the
    function descriptor (plabel) of _start().  */
-#define ENTRY_POINT (((long int *) _start)[0])
+#define ENTRY_POINT ELF_PTR_TO_FDESC (_start)->ip
 
 /* We have to provide a special declaration.  */
 #define ENTRY_POINT_DECL(class) class void _start (void);

Modified: fsf/trunk/libc/ports/sysdeps/ia64/fpu/libm_error.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/ia64/fpu/libm_error.c (original)
+++ fsf/trunk/libc/ports/sysdeps/ia64/fpu/libm_error.c Wed Mar 13 00:01:57 2013
@@ -162,80 +162,79 @@
 # endif
 
 
-#define STATIC static
-
-ALIGNIT
-STATIC const char float_inf[4] = {0x00,0x00,0x80,0x7F};
-ALIGNIT
-STATIC const char float_huge[4] = {0xFF,0xFF,0x7F,0x7F};
-ALIGNIT
-STATIC const char float_zero[4] = {0x00,0x00,0x00,0x00};
-ALIGNIT
-STATIC const char float_neg_inf[4] = {0x00,0x00,0x80,0xFF};
-ALIGNIT
-STATIC const char float_neg_huge[4] = {0xFF,0xFF,0x7F,0xFF};
-ALIGNIT
-STATIC const char float_neg_zero[4] = {0x00,0x00,0x00,0x80};
-ALIGNIT
-STATIC const char double_inf[8] = {0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x7F};
+#define _DECL_NUM(type, prefix, var, bytes...)	\
+  ALIGNIT static const union {			\
+    const char _bytes[sizeof (type)];		\
+    const type num;				\
+  } prefix ## var = {				\
+    ._bytes = bytes,				\
+  }
+
+#define DECL_FLOAT(var, bytes...) \
+  _DECL_NUM (float, float_, var, ##bytes)
+
+DECL_FLOAT(inf,      {0x00,0x00,0x80,0x7F});
+DECL_FLOAT(huge,     {0xFF,0xFF,0x7F,0x7F});
+DECL_FLOAT(zero,     {0x00,0x00,0x00,0x00});
+DECL_FLOAT(neg_inf,  {0x00,0x00,0x80,0xFF});
+DECL_FLOAT(neg_huge, {0xFF,0xFF,0x7F,0xFF});
+DECL_FLOAT(neg_zero, {0x00,0x00,0x00,0x80});
+
+#define DECL_DOUBLE(var, bytes...) \
+  _DECL_NUM (double, double_, var, ##bytes)
+
+DECL_DOUBLE(inf,      {0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x7F});
 #ifndef _LIBC
-ALIGNIT
-STATIC const char double_huge[8] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xEF,0x7F};
+DECL_DOUBLE(huge,     {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xEF,0x7F});
 #endif
-ALIGNIT
-STATIC const char double_zero[8] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
-ALIGNIT
-STATIC const char double_neg_inf[8] = {0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0xFF};
+DECL_DOUBLE(zero,     {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00});
+DECL_DOUBLE(neg_inf,  {0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0xFF});
 #ifndef _LIBC
-ALIGNIT
-STATIC const char double_neg_huge[8] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xEF,0xFF};
+DECL_DOUBLE(neg_huge, {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xEF,0xFF});
 #endif
-ALIGNIT
-STATIC const char double_neg_zero[8] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80};
-ALIGNIT
-STATIC const char long_double_inf[16] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xFF,0x7F,0x00,0x00,0x00,0x00,0x00,0x00};
-ALIGNIT
+DECL_DOUBLE(neg_zero, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80});
+
+#define DECL_LONG_DOUBLE(var, bytes...) \
+  _DECL_NUM (long double, long_double_, var, ##bytes)
+
+DECL_LONG_DOUBLE(inf,      {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xFF,0x7F,0x00,0x00,0x00,0x00,0x00,0x00});
 #ifndef _LIBC
-STATIC const char long_double_huge[16] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x7F,0x00,0x00,0x00,0x00,0x00,0x00};
+DECL_LONG_DOUBLE(huge,     {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x7F,0x00,0x00,0x00,0x00,0x00,0x00});
 #endif
-ALIGNIT
-STATIC const char long_double_zero[16] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
-ALIGNIT
-STATIC const char long_double_neg_inf[16] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00};
-ALIGNIT
+DECL_LONG_DOUBLE(zero,     {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00});
+DECL_LONG_DOUBLE(neg_inf,  {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00});
 #ifndef _LIBC
-STATIC const char long_double_neg_huge[16] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFF,0x00,0x00,0x00,0x00,0x00,0x00};
+DECL_LONG_DOUBLE(neg_huge, {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFF,0x00,0x00,0x00,0x00,0x00,0x00});
 #endif
-ALIGNIT
-STATIC const char long_double_neg_zero[16] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00};
-
-
-#define RETVAL_HUGE_VALL *(long double *)retval =  *(long double *)long_double_inf
-#define RETVAL_NEG_HUGE_VALL *(long double *)retval = *(long double *)long_double_neg_inf
-#define RETVAL_HUGEL *(long double *)retval = (long double)*(float *)float_huge
-#define RETVAL_NEG_HUGEL *(long double *)retval =(long double)*(float*)float_neg_huge
-
-#define RETVAL_HUGE_VALD *(double *)retval = *(double *) double_inf
-#define RETVAL_NEG_HUGE_VALD *(double *)retval = *(double *) double_neg_inf
-#define RETVAL_HUGED *(double *)retval = (double) *(float *)float_huge
-#define RETVAL_NEG_HUGED *(double *)retval = (double) *(float *) float_neg_huge
-
-#define RETVAL_HUGE_VALF *(float *)retval =  *(float *) float_inf
-#define RETVAL_NEG_HUGE_VALF *(float *)retval = *(float *) float_neg_inf
-#define RETVAL_HUGEF *(float *)retval = *(float *) float_huge
-#define RETVAL_NEG_HUGEF *(float *)retval = *(float *) float_neg_huge
-
-#define ZEROL_VALUE *(long double *)long_double_zero
-#define ZEROD_VALUE *(double *)double_zero
-#define ZEROF_VALUE *(float *)float_zero
-
-#define RETVAL_ZEROL *(long double *)retval = *(long double *)long_double_zero
-#define RETVAL_ZEROD *(double *)retval = *(double *)double_zero
-#define RETVAL_ZEROF *(float *)retval = *(float *)float_zero
-
-#define RETVAL_NEG_ZEROL *(long double *)retval = *(long double *)long_double_neg_zero
-#define RETVAL_NEG_ZEROD *(double *)retval = *(double *)double_neg_zero
-#define RETVAL_NEG_ZEROF *(float *)retval = *(float *)float_neg_zero
+DECL_LONG_DOUBLE(neg_zero, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00});
+
+
+#define RETVAL_HUGE_VALL *(long double *)retval =  long_double_inf.num
+#define RETVAL_NEG_HUGE_VALL *(long double *)retval = long_double_neg_inf.num
+#define RETVAL_HUGEL *(long double *)retval = (long double)float_huge.num
+#define RETVAL_NEG_HUGEL *(long double *)retval = (long double)float_neg_huge.num
+
+#define RETVAL_HUGE_VALD *(double *)retval = double_inf.num
+#define RETVAL_NEG_HUGE_VALD *(double *)retval = double_neg_inf.num
+#define RETVAL_HUGED *(double *)retval = (double)float_huge.num
+#define RETVAL_NEG_HUGED *(double *)retval = (double)float_neg_huge.num
+
+#define RETVAL_HUGE_VALF *(float *)retval =  float_inf.num
+#define RETVAL_NEG_HUGE_VALF *(float *)retval = float_neg_inf.num
+#define RETVAL_HUGEF *(float *)retval = float_huge.num
+#define RETVAL_NEG_HUGEF *(float *)retval = float_neg_huge.num
+
+#define ZEROL_VALUE long_double_zero.num
+#define ZEROD_VALUE double_zero.num
+#define ZEROF_VALUE float_zero.num
+
+#define RETVAL_ZEROL *(long double *)retval = long_double_zero.num
+#define RETVAL_ZEROD *(double *)retval = double_zero.num
+#define RETVAL_ZEROF *(float *)retval = float_zero.num
+
+#define RETVAL_NEG_ZEROL *(long double *)retval = long_double_neg_zero.num
+#define RETVAL_NEG_ZEROD *(double *)retval = double_neg_zero.num
+#define RETVAL_NEG_ZEROF *(float *)retval = float_neg_zero.num
 
 #define RETVAL_ONEL *(long double *)retval = (long double) 1.0
 #define RETVAL_ONED *(double *)retval = 1.0

Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/configure
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/configure (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/configure Wed Mar 13 00:01:57 2013
@@ -2,4 +2,5 @@
  # Local configure fragment for sysdeps/unix/sysv/linux/arm.
 
 libc_cv_gcc_unwind_find_fde=no
+# Remove -fno-unwind-tables that was added in sysdeps/arm/preconfigure.in.
 CFLAGS=${CFLAGS% -fno-unwind-tables}

Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/configure.in
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/configure.in (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/configure.in Wed Mar 13 00:01:57 2013
@@ -2,4 +2,5 @@
 # Local configure fragment for sysdeps/unix/sysv/linux/arm.
 
 libc_cv_gcc_unwind_find_fde=no
+# Remove -fno-unwind-tables that was added in sysdeps/arm/preconfigure.in.
 CFLAGS=${CFLAGS% -fno-unwind-tables}

Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/ia64/makecontext.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/ia64/makecontext.c (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/ia64/makecontext.c Wed Mar 13 00:01:57 2013
@@ -22,13 +22,9 @@
 #include <stdlib.h>
 #include <ucontext.h>
 #include <sys/rse.h>
+#include <link.h>
+#include <dl-fptr.h>
 
-
-struct fdesc
-  {
-    unsigned long ip;
-    unsigned long gp;
-  };
 
 #define PUSH(val)				\
 do {						\
@@ -65,16 +61,16 @@
     }
 
   /* set the entry point and global pointer: */
-  sc->sc_br[0] = ((struct fdesc *) &__start_context)->ip;
-  sc->sc_br[1] = ((struct fdesc *) func)->ip;
-  sc->sc_gr[1] = ((struct fdesc *) func)->gp;
+  sc->sc_br[0] = ELF_PTR_TO_FDESC (&__start_context)->ip;
+  sc->sc_br[1] = ELF_PTR_TO_FDESC (func)->ip;
+  sc->sc_gr[1] = ELF_PTR_TO_FDESC (func)->gp;
 
   /* set up the call frame: */
   sc->sc_ar_pfs = ((sc->sc_ar_pfs & ~0x3fffffffffUL)
 		   | (argc + 2) | ((argc + 2) << 7));
   rbs = (unsigned long *) stack_start;
   PUSH((long) ucp->uc_link);
-  PUSH(((struct fdesc *) &__start_context)->gp);
+  PUSH(ELF_PTR_TO_FDESC (&__start_context)->gp);
   va_start (ap, argc);
   for (i = 0; i < argc; ++i)
     PUSH(va_arg (ap, long));

Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/ia64/sysdep.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/ia64/sysdep.h (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/ia64/sysdep.h Wed Mar 13 00:01:57 2013
@@ -252,7 +252,7 @@
     _retval; })
 
 #undef INTERNAL_SYSCALL_DECL
-#define INTERNAL_SYSCALL_DECL(err) long int err
+#define INTERNAL_SYSCALL_DECL(err) long int err __attribute__ ((unused))
 
 #undef INTERNAL_SYSCALL
 #define INTERNAL_SYSCALL_NCS(name, err, nr, args...)	\
@@ -264,7 +264,10 @@
   INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, ##args)
 
 #undef INTERNAL_SYSCALL_ERROR_P
-#define INTERNAL_SYSCALL_ERROR_P(val, err)	(err == -1)
+#define INTERNAL_SYSCALL_ERROR_P(val, err)		\
+  ({ (void) (val);					\
+     (err == -1);					\
+  })
 
 #undef INTERNAL_SYSCALL_ERRNO
 #define INTERNAL_SYSCALL_ERRNO(val, err)	(val)

Added: fsf/trunk/libc/sysdeps/init_array/crti.S
==============================================================================
--- fsf/trunk/libc/sysdeps/init_array/crti.S (added)
+++ fsf/trunk/libc/sysdeps/init_array/crti.S Wed Mar 13 00:01:57 2013
@@ -1,0 +1,13 @@
+/* Dummy crti file.
+
+   In this configuration, crti.o and crtn.o are both empty because the
+   .init_array/.fini_array sections are used exclusively.
+
+   Older ports cannot use this because even if the linker used to
+   build libc itself has .init_array support, we don't want to produce
+   a crt[in].o that presume a linker that new will be used to link
+   other things later.
+
+   But new configurations without compatibility concerns for
+   toolchains without .init_array support can use this to avoid the
+   superfluous .init and .fini boilerplate code.  */

Added: fsf/trunk/libc/sysdeps/init_array/crtn.S
==============================================================================
--- fsf/trunk/libc/sysdeps/init_array/crtn.S (added)
+++ fsf/trunk/libc/sysdeps/init_array/crtn.S Wed Mar 13 00:01:57 2013
@@ -1,0 +1,13 @@
+/* Dummy crtn file.
+
+   In this configuration, crti.o and crtn.o are both empty because the
+   .init_array/.fini_array sections are used exclusively.
+
+   Older ports cannot use this because even if the linker used to
+   build libc itself has .init_array support, we don't want to produce
+   a crt[in].o that presume a linker that new will be used to link
+   other things later.
+
+   But new configurations without compatibility concerns for
+   toolchains without .init_array support can use this to avoid the
+   superfluous .init and .fini boilerplate code.  */

Added: fsf/trunk/libc/sysdeps/init_array/elf-init.c
==============================================================================
--- fsf/trunk/libc/sysdeps/init_array/elf-init.c (added)
+++ fsf/trunk/libc/sysdeps/init_array/elf-init.c Wed Mar 13 00:01:57 2013
@@ -1,0 +1,37 @@
+/* Startup support for ELF initializers/finalizers in the main executable.
+   Copyright (C) 2013 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.
+
+   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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#define NO_INITFINI
+#include <csu/elf-init.c>

Added: fsf/trunk/libc/sysdeps/init_array/gmon-start.c
==============================================================================
--- fsf/trunk/libc/sysdeps/init_array/gmon-start.c (added)
+++ fsf/trunk/libc/sysdeps/init_array/gmon-start.c Wed Mar 13 00:01:57 2013
@@ -1,0 +1,41 @@
+/* gmon startup hook using .preinit_array.
+   Copyright (C) 2013 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.
+
+   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, see
+   <http://www.gnu.org/licenses/>.  */
+
+/* Instead of defining __gmon_start__ globally in gcrt1.o, we make it
+   static and just put a pointer to it into the .preinit_array section.  */
+
+#define GMON_START_ARRAY_SECTION	".preinit_array"
+
+#include <csu/gmon-start.c>

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