This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch gentoo/2.20 created. glibc-2.20-17-g2a9897d


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, gentoo/2.20 has been created
        at  2a9897ddc3f05aa3a52aeb35ea15530ef3584147 (commit)

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2a9897ddc3f05aa3a52aeb35ea15530ef3584147

commit 2a9897ddc3f05aa3a52aeb35ea15530ef3584147
Author: Kevin F. Quinn <kevquinn@gentoo.org>
Date:   Tue Sep 9 17:41:57 2014 -0400

    disable PIE when checking for PIC default
    
    When the compiler builds PIEs by default, the configure PIC check is
    confused into thinking PIC code is default.  The end result is that
    we end up with only PIC being produced.
    
    Run the configure check with -fno-PIE so that we produce PIC & non-PIC
    (PIE) objects like normal.
    
    2014-09-09  Kevin F. Quinn  <kevquinn@gentoo.org>
    
    	* configure.ac (libc_cv_pic_default): Pass -fno-PIE.
    	* configure: Regenerated.

diff --git a/configure b/configure
index 86ba307..5e7e8c3 100755
--- a/configure
+++ b/configure
@@ -7156,7 +7156,7 @@ cat > conftest.c <<EOF
 # error PIC is default.
 #endif
 EOF
-if eval "${CC-cc} -S conftest.c 2>&5 1>&5"; then
+if eval "${CC-cc} -fno-PIE -S conftest.c 2>&5 1>&5"; then
   libc_cv_pic_default=no
 fi
 rm -f conftest.*
diff --git a/configure.ac b/configure.ac
index 2553399..e4f99b5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2019,7 +2019,7 @@ cat > conftest.c <<EOF
 # error PIC is default.
 #endif
 EOF
-if eval "${CC-cc} -S conftest.c 2>&AS_MESSAGE_LOG_FD 1>&AS_MESSAGE_LOG_FD"; then
+if eval "${CC-cc} -fno-PIE -S conftest.c 2>&AS_MESSAGE_LOG_FD 1>&AS_MESSAGE_LOG_FD"; then
   libc_cv_pic_default=no
 fi
 rm -f conftest.*])

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=27b390b9b65ce97b034bbfff11d2b01c3af98180

commit 27b390b9b65ce97b034bbfff11d2b01c3af98180
Author: John David Anglin <dave.anglin@bell.net>
Date:   Sun Aug 10 10:00:23 2014 -0400

    hppa: fix __O_SYNC to match the kernel

diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
index f596d5f..24b564c 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
@@ -27,7 +27,7 @@
 #define O_NONBLOCK	00200004 /* HPUX has separate NDELAY & NONBLOCK */
 #define __O_DSYNC	01000000
 #define __O_RSYNC	02000000 /* HPUX only */
-#define __O_SYNC	01000000
+#define __O_SYNC	00100000
 #define O_SYNC		(__O_SYNC|__O_DSYNC)
 
 #define O_BLKSEEK	00000100 /* HPUX only */

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=986ae1d6ff82013ae0002745fb1a6b1aeb317b9f

commit 986ae1d6ff82013ae0002745fb1a6b1aeb317b9f
Author: John David Anglin <dave.anglin@bell.net>
Date:   Sun Aug 10 09:54:53 2014 -0400

    hppa: fix pthread spinlock

diff --git a/sysdeps/hppa/nptl/pthread_spin_init.c b/sysdeps/hppa/nptl/pthread_spin_init.c
index c83669e..b0ff789 100644
--- a/sysdeps/hppa/nptl/pthread_spin_init.c
+++ b/sysdeps/hppa/nptl/pthread_spin_init.c
@@ -20,9 +20,9 @@
 int
 pthread_spin_init (pthread_spinlock_t *lock, int pshared)
 {
-  int tmp = 0;
-  /* This should be a memory barrier to newer compilers */
-  __asm__ __volatile__ ("stw,ma %1,0(%0)"
-                        : : "r" (lock), "r" (tmp) : "memory");
+  /* The LWS-CAS operation on hppa is a synthetic atomic operation
+     that doesn't provide the type of coherency that we need. Therefore
+     we force that coherency by using LWS-CAS again.  */
+  atomic_exchange_rel (lock, 0);
   return 0;
 }
diff --git a/sysdeps/hppa/nptl/pthread_spin_unlock.c b/sysdeps/hppa/nptl/pthread_spin_unlock.c
index 5a8aed8..7a4a996 100644
--- a/sysdeps/hppa/nptl/pthread_spin_unlock.c
+++ b/sysdeps/hppa/nptl/pthread_spin_unlock.c
@@ -20,9 +20,9 @@
 int
 pthread_spin_unlock (pthread_spinlock_t *lock)
 {
-  int tmp = 0;
-  /* This should be a memory barrier to newer compilers */
-  __asm__ __volatile__ ("stw,ma %1,0(%0)"
-                        : : "r" (lock), "r" (tmp) : "memory");
+  /* The LWS-CAS operation on hppa is a synthetic atomic operation
+     that doesn't provide the type of coherency that we need. Therefore
+     we force that coherency by using LWS-CAS again.  */
+  atomic_exchange_rel (lock, 0);
   return 0;
 }

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=da5ccc63a9a6f28d0fcbe5b8da626357872dbe4a

commit da5ccc63a9a6f28d0fcbe5b8da626357872dbe4a
Author: John David Anglin <dave.anglin@bell.net>
Date:   Sun Aug 10 09:41:27 2014 -0400

    hppa: fix bug in floating point exception support

diff --git a/sysdeps/hppa/fpu/feholdexcpt.c b/sysdeps/hppa/fpu/feholdexcpt.c
index 9995ea0..d95c0f1 100644
--- a/sysdeps/hppa/fpu/feholdexcpt.c
+++ b/sysdeps/hppa/fpu/feholdexcpt.c
@@ -29,8 +29,8 @@ feholdexcept (fenv_t *envp)
   /* Store the environment.  */
   bufptr = clear.buf;
   __asm__ (
-	   "fstd,ma %%fr0,8(%1)\n"
-	   : "=m" (clear), "+r" (bufptr) : : "%r0");
+	   "fstd %%fr0,0(%1)\n"
+	   : "=m" (clear) : "r" (bufptr) : "%r0");
   memcpy (envp, &clear.env, sizeof (fenv_t));
 
   /* Clear exception queues */
@@ -44,7 +44,7 @@ feholdexcept (fenv_t *envp)
      Thus we start bufptr at the end and work backwards */
   bufptr = (unsigned long long *)((unsigned int)(clear.buf) + sizeof(unsigned int)*4);
   __asm__ (
-	   "fldd,mb -8(%0),%%fr0\n"
+	   "fldd 0(%0),%%fr0\n"
 	   : : "r" (bufptr), "m" (clear) : "%r0");
 
   return 0;
diff --git a/sysdeps/hppa/fpu/fesetenv.c b/sysdeps/hppa/fpu/fesetenv.c
index c967bd5..6ebceef 100644
--- a/sysdeps/hppa/fpu/fesetenv.c
+++ b/sysdeps/hppa/fpu/fesetenv.c
@@ -33,7 +33,7 @@ fesetenv (const fenv_t *envp)
      we want to use from the environment specified by the parameter.  */
   bufptr = temp.buf;
   __asm__ (
-	   "fstd,ma %%fr0,8(%1)\n"
+	   "fstd %%fr0,0(%1)\n"
 	   : "=m" (temp) : "r" (bufptr) : "%r0");
 
   temp.env.__status_word &= ~(FE_ALL_EXCEPT
@@ -54,7 +54,7 @@ fesetenv (const fenv_t *envp)
      we take advantage of that to load in reverse order so fr0
      is loaded last and T-Bit is enabled. */
   __asm__ (
-	   "fldd,mb -8(%1),%%fr0\n"
+	   "fldd 0(%1),%%fr0\n"
 	   : : "m" (temp), "r" (bufptr) : "%r0" );
 
   /* Success.  */

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=79cc73de96414b0831d3a9f47e5d3f260e6fa951

commit 79cc73de96414b0831d3a9f47e5d3f260e6fa951
Author: John David Anglin <dave.anglin@bell.net>
Date:   Sun Aug 10 09:39:25 2014 -0400

    hppa: fix build problems with atomic code
    
    Specifically:
    ../sysdeps/unix/sysv/linux/hppa/bits/atomic.h:68:6: error:
    	canâ??t find a register in class â??R1_REGSâ?? while reloading â??asmâ??

diff --git a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h
index e55e91b..c9d1c82 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h
@@ -61,42 +61,46 @@ typedef uintmax_t uatomic_max_t;
 
 #if __ASSUME_LWS_CAS
 /* The only basic operation needed is compare and exchange.  */
+static int __attribute__((noinline))
+__atomic_compare_and_exchange_val_acq (int mem, int newval, int oldval)
+{
+  volatile int lws_errno;
+  volatile int lws_ret;
+  asm volatile(
+	"0:					\n\t"
+	"copy	%2, %%r26			\n\t"
+	"copy	%3, %%r25			\n\t"
+	"copy	%4, %%r24			\n\t"
+	"ble	" _LWS "(%%sr2, %%r0)		\n\t"
+	"ldi	" _LWS_CAS ", %%r20		\n\t"
+	"ldi	" _ASM_EAGAIN ", %%r24		\n\t"
+	"cmpb,=,n %%r24, %%r21, 0b		\n\t"
+	"nop					\n\t"
+	"ldi	" _ASM_EDEADLOCK ", %%r25	\n\t"
+	"cmpb,=,n %%r25, %%r21, 0b		\n\t"
+	"nop					\n\t"
+	"stw	%%r28, %0			\n\t"
+	"stw	%%r21, %1			\n\t"
+	: "=m" (lws_ret), "=m" (lws_errno)
+	: "r" (mem), "r" (oldval), "r" (newval)
+	: _LWS_CLOBBER
+   );
+
+  if (lws_errno == -EFAULT || lws_errno == -ENOSYS)
+    ABORT_INSTRUCTION;
+
+  return lws_ret;
+}
 # define atomic_compare_and_exchange_val_acq(mem, newval, oldval)	\
-  ({									\
-     volatile int lws_errno;						\
-     volatile int lws_ret;						\
-     asm volatile(							\
-	"0:					\n\t"			\
-	"copy	%2, %%r26			\n\t"			\
-	"copy	%3, %%r25			\n\t"			\
-	"copy	%4, %%r24			\n\t"			\
-	"ble	" _LWS "(%%sr2, %%r0)		\n\t"			\
-	"ldi	" _LWS_CAS ", %%r20		\n\t"			\
-	"ldi	" _ASM_EAGAIN ", %%r24		\n\t"			\
-	"cmpb,=,n %%r24, %%r21, 0b		\n\t"			\
-	"nop					\n\t"			\
-	"ldi	" _ASM_EDEADLOCK ", %%r25	\n\t"			\
-	"cmpb,=,n %%r25, %%r21, 0b		\n\t"			\
-	"nop					\n\t"			\
-	"stw	%%r28, %0			\n\t"			\
-	"stw	%%r21, %1			\n\t"			\
-	: "=m" (lws_ret), "=m" (lws_errno)				\
-        : "r" (mem), "r" (oldval), "r" (newval)				\
-	: _LWS_CLOBBER							\
-     );									\
-									\
-     if(lws_errno == -EFAULT || lws_errno == -ENOSYS)			\
-	ABORT_INSTRUCTION;						\
-									\
-     lws_ret;								\
-   })
+   ((__typeof__(oldval))						\
+    __atomic_compare_and_exchange_val_acq ((int)mem, (int)newval, (int)oldval))
 
 # define atomic_compare_and_exchange_bool_acq(mem, newval, oldval)	\
   ({									\
-     int ret;								\
+     __typeof__(oldval) ret;						\
      ret = atomic_compare_and_exchange_val_acq(mem, newval, oldval);	\
      /* Return 1 if it was already acquired.  */			\
-     (ret != (int)oldval);						\
+     (ret != oldval);						\
    })
 #else
 # error __ASSUME_LWS_CAS is required to build glibc.

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=881368725f8940951fbc1b65c42a4a000b103139

commit 881368725f8940951fbc1b65c42a4a000b103139
Author: John David Anglin <dave.anglin@bell.net>
Date:   Sun Aug 10 09:36:50 2014 -0400

    hppa: name setjmp union
    
    Some of the C++ tests want this, and this is what all other arches
    have done, so do it on hppa too.
    
    2013-07-07  John David Anglin  <dave.anglin@bell.net>
    
    	* ports/sysdeps/hppa/bits/setjmp.h: Name anonymous union.

diff --git a/sysdeps/hppa/bits/setjmp.h b/sysdeps/hppa/bits/setjmp.h
index 9a404e7..de05899 100644
--- a/sysdeps/hppa/bits/setjmp.h
+++ b/sysdeps/hppa/bits/setjmp.h
@@ -38,7 +38,7 @@
    * 10 x 64-bit fprs in this order:
      - fr12-fr21 (callee saves)
    Note: We have 8 bytes of free space for future uses.  */
-typedef union
+typedef union __jmp_buf_internal
   {
     struct __jmp_buf_internal_tag
       {

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5f825bd3c37b691b58d2b34ba4a8780f86adca41

commit 5f825bd3c37b691b58d2b34ba4a8780f86adca41
Author: David Lamparter <equinox-gentoo@diac24.net>
Date:   Fri Aug 16 15:06:34 2013 -0400

    arm: fix PIC vs SHARED typos
    
    the logic in setjmp/__longjmp incorrectly tie to "PIC" to figure out
    whether the code is going into a shared library when it should be using
    "SHARED".  otherwise, building static PIC code goes wrong.
    
    https://bugs.gentoo.org/336914
    http://sourceware.org/ml/libc-ports/2011-09/msg00018.html
    
    2011-09-19  David Lamparter  <equinox-gentoo@diac24.net>
    
    	* sysdeps/arm/setjmp.S: Change PIC to SHARED.
    	* sysdeps/arm/__longjmp.S: Likewise

diff --git a/sysdeps/arm/__longjmp.S b/sysdeps/arm/__longjmp.S
index 27d1b71..351fc62 100644
--- a/sysdeps/arm/__longjmp.S
+++ b/sysdeps/arm/__longjmp.S
@@ -83,7 +83,7 @@ ENTRY (__longjmp)
 	add	a4, a4, a3
 	ldr	a4, [a4, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
 # else
-#  ifdef PIC
+#  ifdef SHARED
 	ldr	a4, 1f
 	ldr	a3, .Lrtld_global_ro
 0:	add	a4, pc, a4
@@ -144,7 +144,7 @@ ENTRY (__longjmp)
 .Lrtld_local_ro:
 	.long	C_SYMBOL_NAME(_rtld_local_ro)(GOTOFF)
 # else
-#  ifdef PIC
+#  ifdef SHARED
 1:	.long	_GLOBAL_OFFSET_TABLE_ - 0b - PC_OFS
 .Lrtld_global_ro:
 	.long	C_SYMBOL_NAME(_rtld_global_ro)(GOT)
diff --git a/sysdeps/arm/setjmp.S b/sysdeps/arm/setjmp.S
index 17a16c9..cf4ff86 100644
--- a/sysdeps/arm/setjmp.S
+++ b/sysdeps/arm/setjmp.S
@@ -64,7 +64,7 @@ ENTRY (__sigsetjmp)
 	add	a3, a3, a4
 	ldr	a3, [a3, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
 # else
-#  ifdef PIC
+#  ifdef SHARED
 	ldr	a3, 1f
 	ldr	a4, .Lrtld_global_ro
 0:	add	a3, pc, a3
@@ -120,7 +120,7 @@ ENTRY (__sigsetjmp)
 .Lrtld_local_ro:
 	.long	C_SYMBOL_NAME(_rtld_local_ro)(GOTOFF)
 # else
-#  ifdef PIC
+#  ifdef SHARED
 1:	.long	_GLOBAL_OFFSET_TABLE_ - 0b - PC_OFS
 .Lrtld_global_ro:
 	.long	C_SYMBOL_NAME(_rtld_global_ro)(GOT)

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ce60218546697b3dd940f4014917d23e0a52e70e

commit ce60218546697b3dd940f4014917d23e0a52e70e
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Fri Aug 16 15:05:26 2013 -0400

    gentoo: disable building in timezone subdir
    
    We've split this out into the package sys-libs/timezone-data

diff --git a/Makeconfig b/Makeconfig
index d01ee2d..fad5777 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -1064,7 +1064,7 @@ all-subdirs = csu assert ctype locale intl catgets math setjmp signal	    \
 	      stdlib stdio-common libio malloc string wcsmbs time dirent    \
 	      grp pwd posix io termios resource misc socket sysvipc gmon    \
 	      gnulib iconv iconvdata wctype manual shadow gshadow po argp   \
-	      crypt localedata timezone rt conform debug		    \
+	      crypt localedata rt conform debug		    \
 	      $(add-on-subdirs) dlfcn elf
 
 ifndef avoid-generated

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=03b75822d13c07ae619b32901636ce00a0c9368e

commit 03b75822d13c07ae619b32901636ce00a0c9368e
Author: Stephanie J. Lockwood-Childs <wormo@gentoo.org>
Date:   Fri Aug 16 15:03:41 2013 -0400

    gentoo: support running tests under sandbox
    
    when glibc runs its tests, it does so by invoking the local library loader.
    in Gentoo, we build/run inside of our "sandbox" which itself is linked against
    libdl (so that it can load libraries and pull out symbols).  the trouble
    is that when you upgrade from an older glibc to the new one, often times
    internal symbols change name or abi.  this is normally OK as you cannot use
    libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so
    we always say "keep all of the glibc libraries from the same build".  but
    when glibc runs its tests, it uses dynamic paths to point to its new local
    copies of libraries.  if the test doesnt use libdl, then glibc doesnt add
    its path, and when sandbox triggers the loading of libdl, glibc does so
    from the host system system.  this gets us into the case of all libraries
    are from the locally compiled version of glibc except for libdl.so.
    
    http://bugs.gentoo.org/56898

diff --git a/Makeconfig b/Makeconfig
index cef0f06..d01ee2d 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -616,7 +616,7 @@ comma = ,
 sysdep-library-path = \
 $(subst $(empty) ,:,$(strip $(patsubst -Wl$(comma)-rpath-link=%, %,\
 				       $(filter -Wl$(comma)-rpath-link=%,\
-						$(sysdep-LDFLAGS)))))
+						$(sysdep-LDFLAGS)))) $(common-objpfx)/dlfcn)
 # $(run-via-rtld-prefix) is a command that, when prepended to the name
 # of a program built with the newly built library, produces a command
 # that, executed on the host for which the library is built, runs that
diff --git a/iconvdata/run-iconv-test.sh b/iconvdata/run-iconv-test.sh
index 5dfb69f..669c2e4 100755
--- a/iconvdata/run-iconv-test.sh
+++ b/iconvdata/run-iconv-test.sh
@@ -31,7 +31,7 @@ temp2=$codir/iconvdata/iconv-test.yyy
 trap "rm -f $temp1 $temp2" 1 2 3 15
 
 # We have to have some directories in the library path.
-LIBPATH=$codir:$codir/iconvdata
+LIBPATH=$codir:$codir/iconvdata:$codir/dlfcn
 
 # How the start the iconv(1) program.
 ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \
diff --git a/nptl/tst-tls6.sh b/nptl/tst-tls6.sh
index 846c321..dae9278 100755
--- a/nptl/tst-tls6.sh
+++ b/nptl/tst-tls6.sh
@@ -26,7 +26,7 @@ run_program_env=$1; shift
 logfile=$common_objpfx/nptl/tst-tls6.out
 
 # We have to find libc and nptl
-library_path=${common_objpfx}:${common_objpfx}nptl
+library_path=${common_objpfx}:${common_objpfx}nptl:${common_objpfx}/dlfcn
 tst_tls5="${test_via_rtld_prefix} ${common_objpfx}/nptl/tst-tls5"
 
 > $logfile

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f08c8d9be762cb18a0fc26e98795bde2b785f67e

commit f08c8d9be762cb18a0fc26e98795bde2b785f67e
Author: Carlos O'Donell <carlos@systemhalted.org>
Date:   Fri Aug 16 15:00:53 2013 -0400

    nptl: handle EAGAIN with some futex operations
    
    https://bugs.gentoo.org/452184

diff --git a/nptl/pthread_mutex_trylock.c b/nptl/pthread_mutex_trylock.c
index 0867b06..f10ca58 100644
--- a/nptl/pthread_mutex_trylock.c
+++ b/nptl/pthread_mutex_trylock.c
@@ -261,7 +261,8 @@ __pthread_mutex_trylock (mutex)
 							  private), 0, 0);
 
 	    if (INTERNAL_SYSCALL_ERROR_P (e, __err)
-		&& INTERNAL_SYSCALL_ERRNO (e, __err) == EWOULDBLOCK)
+		&& ((INTERNAL_SYSCALL_ERRNO (e, __err) == EWOULDBLOCK)
+		    || (INTERNAL_SYSCALL_ERRNO (e, __err) == EAGAIN)))
 	      {
 		THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL);
 
diff --git a/nptl/sem_timedwait.c b/nptl/sem_timedwait.c
index 7dfe51d..f96f625 100644
--- a/nptl/sem_timedwait.c
+++ b/nptl/sem_timedwait.c
@@ -94,7 +94,7 @@ sem_timedwait (sem_t *sem, const struct timespec *abstime)
       rt.tv_sec = sec;
       rt.tv_nsec = nsec;
       err = do_futex_timed_wait(isem, &rt);
-      if (err != 0 && err != -EWOULDBLOCK)
+      if (err != 0 && err != -EWOULDBLOCK && err != -EAGAIN)
 	{
 	  __set_errno (-err);
 	  err = -1;
diff --git a/nptl/sem_wait.c b/nptl/sem_wait.c
index b12babb..4b9856c 100644
--- a/nptl/sem_wait.c
+++ b/nptl/sem_wait.c
@@ -68,7 +68,7 @@ __new_sem_wait (sem_t *sem)
   while (1)
     {
       err = do_futex_wait(isem);
-      if (err != 0 && err != -EWOULDBLOCK)
+      if (err != 0 && err != -EWOULDBLOCK && err != -EAGAIN)
 	{
 	  __set_errno (-err);
 	  err = -1;
@@ -113,7 +113,7 @@ __old_sem_wait (sem_t *sem)
       /* Disable asynchronous cancellation.  */
       __pthread_disable_asynccancel (oldtype);
     }
-  while (err == 0 || err == -EWOULDBLOCK);
+  while (err == 0 || err == -EWOULDBLOCK || err == -EAGAIN);
 
   __set_errno (-err);
   return -1;
diff --git a/sunrpc/clnt_udp.c b/sunrpc/clnt_udp.c
index 6ffa5f2..b6638bb 100644
--- a/sunrpc/clnt_udp.c
+++ b/sunrpc/clnt_udp.c
@@ -463,7 +463,7 @@ send_again:
       while (inlen < 0 && errno == EINTR);
       if (inlen < 0)
 	{
-	  if (errno == EWOULDBLOCK)
+	  if (errno == EWOULDBLOCK || errno == EAGAIN)
 	    continue;
 	  cu->cu_error.re_errno = errno;
 	  return (cu->cu_error.re_status = RPC_CANTRECV);
diff --git a/sysdeps/nptl/aio_misc.h b/sysdeps/nptl/aio_misc.h
index c3de84b..a419ee0 100644
--- a/sysdeps/nptl/aio_misc.h
+++ b/sysdeps/nptl/aio_misc.h
@@ -50,7 +50,7 @@
 	  {								      \
 	    status = lll_futex_timed_wait (futexaddr, oldval, timeout,	      \
 					   LLL_PRIVATE);		      \
-	    if (status != -EWOULDBLOCK)					      \
+	    if (status != -EWOULDBLOCK && status != -EAGAIN)		      \
 	      break;							      \
 									      \
 	    oldval = *futexaddr;					      \
@@ -65,7 +65,7 @@
 	else if (status == -ETIMEDOUT)					      \
 	  result = EAGAIN;						      \
 	else								      \
-	  assert (status == 0 || status == -EWOULDBLOCK);		      \
+	  assert (status == 0 || status == -EWOULDBLOCK || status == -EAGAIN);\
 									      \
 	pthread_mutex_lock (&__aio_requests_mutex);			      \
       }									      \
diff --git a/sysdeps/nptl/gai_misc.h b/sysdeps/nptl/gai_misc.h
index 942f2b1..fc66256 100644
--- a/sysdeps/nptl/gai_misc.h
+++ b/sysdeps/nptl/gai_misc.h
@@ -51,7 +51,7 @@
 	  {								      \
 	    status = lll_futex_timed_wait (futexaddr, oldval, timeout,	      \
 					   LLL_PRIVATE);		      \
-	    if (status != -EWOULDBLOCK)					      \
+	    if (status != -EWOULDBLOCK && status != -EAGAIN)		      \
 	      break;							      \
 									      \
 	    oldval = *futexaddr;					      \
@@ -66,7 +66,7 @@
 	else if (status == -ETIMEDOUT)					      \
 	  result = EAGAIN;						      \
 	else								      \
-	  assert (status == 0 || status == -EWOULDBLOCK);		      \
+	  assert (status == 0 || status == -EWOULDBLOCK || status == -EAGAIN);\
 									      \
 	pthread_mutex_lock (&__gai_requests_mutex);			      \
       }									      \

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2bba691b99e07fbcb52434f40f6e9ba217b592a3

commit 2bba691b99e07fbcb52434f40f6e9ba217b592a3
Author: Guy Martin <gmsoft@tuxicoman.be>
Date:   Fri Aug 16 15:00:05 2013 -0400

    rtld: do not ignore arch-specific CFLAGS
    
    https://bugs.gentoo.org/452184
    http://sourceware.org/bugzilla/show_bug.cgi?id=15005
    http://sourceware.org/ml/libc-alpha/2013-01/msg00247.html

diff --git a/elf/Makefile b/elf/Makefile
index 25012cc..3036b9b 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -433,7 +433,7 @@ CFLAGS-ldconfig.c = $(SYSCONF-FLAGS) -D'LIBDIR="$(libdir)"' \
 		    -D'SLIBDIR="$(slibdir)"' -DIS_IN_ldconfig=1
 CFLAGS-dl-cache.c = $(SYSCONF-FLAGS)
 CFLAGS-cache.c = $(SYSCONF-FLAGS)
-CFLAGS-rtld.c = $(SYSCONF-FLAGS)
+CFLAGS-rtld.c += $(SYSCONF-FLAGS)
 
 CPPFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\
 		     -DNOT_IN_libc=1 -DIS_IN_rtld=1 -DIN_LIB=rtld)

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=09a117e5705032119f2be33539c4cfc6a92bca49

commit 09a117e5705032119f2be33539c4cfc6a92bca49
Author: Carlos O'Donell <carlos@systemhalted.org>
Date:   Fri Aug 16 14:57:59 2013 -0400

    nptl: support thread stacks that grow up
    
    http://bugs.gentoo.org/301642

diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c
index d95ffe9..563e185 100644
--- a/nptl/allocatestack.c
+++ b/nptl/allocatestack.c
@@ -372,6 +372,15 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
   if (__glibc_unlikely (attr->flags & ATTR_FLAG_STACKADDR))
     {
       uintptr_t adj;
+#if _STACK_GROWS_DOWN
+      char * stackaddr = (char *) attr->stackaddr;
+#else
+      /* Assume the same layout as the _STACK_GROWS_DOWN case,
+	 with struct pthread at the top of the stack block.
+	 Later we adjust the guard location and stack address
+	 to match the _STACK_GROWS_UP case.  */
+      char * stackaddr = (char *) attr->stackaddr + attr->stacksize;
+#endif
 
       /* If the user also specified the size of the stack make sure it
 	 is large enough.  */
@@ -381,11 +390,11 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
 
       /* Adjust stack size for alignment of the TLS block.  */
 #if TLS_TCB_AT_TP
-      adj = ((uintptr_t) attr->stackaddr - TLS_TCB_SIZE)
+      adj = ((uintptr_t) stackaddr - TLS_TCB_SIZE)
 	    & __static_tls_align_m1;
       assert (size > adj + TLS_TCB_SIZE);
 #elif TLS_DTV_AT_TP
-      adj = ((uintptr_t) attr->stackaddr - __static_tls_size)
+      adj = ((uintptr_t) stackaddr - __static_tls_size)
 	    & __static_tls_align_m1;
       assert (size > adj);
 #endif
@@ -395,10 +404,10 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
 	 the stack.  It is the user's responsibility to do this if it
 	 is wanted.  */
 #if TLS_TCB_AT_TP
-      pd = (struct pthread *) ((uintptr_t) attr->stackaddr
+      pd = (struct pthread *) ((uintptr_t) stackaddr
 			       - TLS_TCB_SIZE - adj);
 #elif TLS_DTV_AT_TP
-      pd = (struct pthread *) (((uintptr_t) attr->stackaddr
+      pd = (struct pthread *) (((uintptr_t) stackaddr
 				- __static_tls_size - adj)
 			       - TLS_PRE_TCB_SIZE);
 #endif
@@ -410,7 +419,7 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
       pd->specific[0] = pd->specific_1stblock;
 
       /* Remember the stack-related values.  */
-      pd->stackblock = (char *) attr->stackaddr - size;
+      pd->stackblock = (char *) stackaddr - size;
       pd->stackblock_size = size;
 
       /* This is a user-provided stack.  It will not be queued in the
@@ -636,7 +645,7 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
 	  char *guard = mem + (((size - guardsize) / 2) & ~pagesize_m1);
 #elif _STACK_GROWS_DOWN
 	  char *guard = mem;
-# elif _STACK_GROWS_UP
+#elif _STACK_GROWS_UP
 	  char *guard = (char *) (((uintptr_t) pd - guardsize) & ~pagesize_m1);
 #endif
 	  if (mprotect (guard, guardsize, PROT_NONE) != 0)
@@ -732,7 +741,6 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
   *stack = stacktop;
 #elif _STACK_GROWS_UP
   *stack = pd->stackblock;
-  assert (*stack > 0);
 #endif
 
   return 0;
diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c
index b9af010..cbacecc 100644
--- a/nptl/pthread_create.c
+++ b/nptl/pthread_create.c
@@ -403,12 +403,25 @@ start_thread (void *arg)
 #ifdef _STACK_GROWS_DOWN
   char *sp = CURRENT_STACK_FRAME;
   size_t freesize = (sp - (char *) pd->stackblock) & ~pagesize_m1;
-#else
-# error "to do"
-#endif
   assert (freesize < pd->stackblock_size);
   if (freesize > PTHREAD_STACK_MIN)
     __madvise (pd->stackblock, freesize - PTHREAD_STACK_MIN, MADV_DONTNEED);
+#else
+  /* Page aligned start of memory to free (higher than or equal
+     to current sp plus the minimum stack size).  */
+  void *freeblock = (void*)((size_t)(CURRENT_STACK_FRAME
+				     + PTHREAD_STACK_MIN
+				     + pagesize_m1)
+				    & ~pagesize_m1);
+  char *free_end = (char *) (((uintptr_t) pd - pd->guardsize) & ~pagesize_m1);
+  /* Is there any space to free?  */
+  if (free_end > (char *)freeblock)
+    {
+      size_t freesize = (size_t)(free_end - (char *)freeblock);
+      assert (freesize < pd->stackblock_size);
+      __madvise (freeblock, freesize, MADV_DONTNEED);
+    }
+#endif
 
   /* If the thread is detached free the TCB.  */
   if (IS_DETACHED (pd))
diff --git a/nptl/pthread_getattr_np.c b/nptl/pthread_getattr_np.c
index 21110c3..623b840 100644
--- a/nptl/pthread_getattr_np.c
+++ b/nptl/pthread_getattr_np.c
@@ -60,7 +60,11 @@ pthread_getattr_np (thread_id, attr)
   if (__glibc_likely (thread->stackblock != NULL))
     {
       iattr->stacksize = thread->stackblock_size;
+#ifdef _STACK_GROWS_DOWN
       iattr->stackaddr = (char *) thread->stackblock + iattr->stacksize;
+#else
+      iattr->stackaddr = (char *) thread->stackblock;
+#endif
     }
   else
     {
@@ -129,12 +133,17 @@ pthread_getattr_np (thread_id, attr)
 		         stack extension request.  */
 		      iattr->stacksize = (iattr->stacksize
 					  & -(intptr_t) GLRO(dl_pagesize));
-
+#if _STACK_GROWS_DOWN
 		      /* The limit might be too high.  */
 		      if ((size_t) iattr->stacksize
 			  > (size_t) iattr->stackaddr - last_to)
 			iattr->stacksize = (size_t) iattr->stackaddr - last_to;
-
+#else
+		      /* The limit might be too high.  */
+		      if ((size_t) iattr->stacksize
+			  > to - (size_t) iattr->stackaddr)
+			iattr->stacksize = to - (size_t) iattr->stackaddr;
+#endif
 		      /* We succeed and no need to look further.  */
 		      ret = 0;
 		      break;

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e02c03979ed18465da97e11b270884d98e0c529d

commit e02c03979ed18465da97e11b270884d98e0c529d
Author: Thorsten Kukuk <kukuk@suse.de>
Date:   Fri Aug 16 14:54:23 2013 -0400

    reload /etc/resolv.conf when it has changed
    
    if /etc/resolv.conf is updated, then make sure applications
    already running get the updated information.
    
    ripped from SuSE
    
    http://bugs.gentoo.org/177416

diff --git a/resolv/res_libc.c b/resolv/res_libc.c
index ee3fa21..f30b3a9 100644
--- a/resolv/res_libc.c
+++ b/resolv/res_libc.c
@@ -22,6 +22,7 @@
 #include <arpa/nameser.h>
 #include <resolv.h>
 #include <bits/libc-lock.h>
+#include <sys/stat.h>
 
 
 /* The following bit is copied from res_data.c (where it is #ifdef'ed
@@ -95,6 +96,20 @@ int
 __res_maybe_init (res_state resp, int preinit)
 {
 	if (resp->options & RES_INIT) {
+		static time_t last_mtime, last_check;
+		time_t now;
+		struct stat statbuf;
+
+		time (&now);
+		if (now != last_check) {
+			last_check = now;
+			if (stat (_PATH_RESCONF, &statbuf) == 0 && last_mtime != statbuf.st_mtime) {
+				last_mtime = statbuf.st_mtime;
+				atomicinclock (lock);
+				atomicinc (__res_initstamp);
+				atomicincunlock (lock);
+			}
+		}
 		if (__res_initstamp != resp->_u._ext.initstamp) {
 			if (resp->nscount > 0)
 				__res_iclose (resp, true);

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dc04b5c29884c0a820bcc562373cb4499ce996d2

commit dc04b5c29884c0a820bcc562373cb4499ce996d2
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri Aug 16 14:52:25 2013 -0400

    Fix localedef segfault when run under exec-shield, PaX or similar
    
    http://bugs.debian.org/198099
    http://bugs.debian.org/231438

diff --git a/locale/programs/3level.h b/locale/programs/3level.h
index c83cdf2..1d4553e 100644
--- a/locale/programs/3level.h
+++ b/locale/programs/3level.h
@@ -204,6 +204,42 @@ CONCAT(TABLE,_iterate) (struct TABLE *t,
 	}
     }
 }
+
+/* GCC ATM seems to do a poor job with pointers to nested functions passed
+   to inlined functions.  Help it a little bit with this hack.  */
+#define wchead_table_iterate(tp, fn) \
+do									      \
+  {									      \
+    struct wchead_table *t = (tp);					      \
+    uint32_t index1;							      \
+    for (index1 = 0; index1 < t->level1_size; index1++)			      \
+      {									      \
+	uint32_t lookup1 = t->level1[index1];				      \
+	if (lookup1 != ((uint32_t) ~0))					      \
+	  {								      \
+	    uint32_t lookup1_shifted = lookup1 << t->q;			      \
+	    uint32_t index2;						      \
+	    for (index2 = 0; index2 < (1 << t->q); index2++)		      \
+	      {								      \
+		uint32_t lookup2 = t->level2[index2 + lookup1_shifted];	      \
+		if (lookup2 != ((uint32_t) ~0))				      \
+		  {							      \
+		    uint32_t lookup2_shifted = lookup2 << t->p;		      \
+		    uint32_t index3;					      \
+		    for (index3 = 0; index3 < (1 << t->p); index3++)	      \
+		      {							      \
+			struct element_t *lookup3			      \
+			  = t->level3[index3 + lookup2_shifted];	      \
+			if (lookup3 != NULL)				      \
+			  fn ((((index1 << t->q) + index2) << t->p) + index3, \
+			      lookup3);					      \
+		      }							      \
+		  }							      \
+	      }								      \
+	  }								      \
+      }									      \
+  } while (0)
+
 #endif
 
 #ifndef NO_ADD_LOCALE

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=55dc55bc458566a1de1ef4006257ebb2528f404e

commit 55dc55bc458566a1de1ef4006257ebb2528f404e
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Sat May 4 14:12:58 2013 -0400

    make fortify logic checks less angry
    
    the fortify/optimization check does not play well with our default gcc specs
    
    http://sourceware.org/ml/libc-alpha/2012-06/msg00068.html

diff --git a/include/features.h b/include/features.h
index ddb883a..a8bcf62 100644
--- a/include/features.h
+++ b/include/features.h
@@ -323,10 +323,11 @@
 # define __USE_REENTRANT	1
 #endif
 
+#if !defined __OPTIMIZE__ || __OPTIMIZE__ <= 0
+# undef _FORTIFY_SOURCE
+#endif
 #if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0
-# if !defined __OPTIMIZE__ || __OPTIMIZE__ <= 0
-#  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
-# elif !__GNUC_PREREQ (4, 1)
+# if !__GNUC_PREREQ (4, 1)
 #  warning _FORTIFY_SOURCE requires GCC 4.1 or later
 # elif _FORTIFY_SOURCE > 1
 #  define __USE_FORTIFY_LEVEL 2

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=84d20d3d7c273f6cd09c48fac362183b4640d19f

commit 84d20d3d7c273f6cd09c48fac362183b4640d19f
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Sat May 4 14:10:41 2013 -0400

    workaround crash when handling signals in static PIEs
    
    work around ... not entirely sure what is going on here.
    
    2011-03-01	squeezy  <vina@mailserver.eu>
    
    	* sysdeps/unix/sysv/linux/x86_64/sigaction.c fix the __restore_rt symbol
    
    http://bugs.gentoo.org/283470

diff --git a/sysdeps/unix/sysv/linux/x86_64/sigaction.c b/sysdeps/unix/sysv/linux/x86_64/sigaction.c
index 53a8134..2181f4b 100644
--- a/sysdeps/unix/sysv/linux/x86_64/sigaction.c
+++ b/sysdeps/unix/sysv/linux/x86_64/sigaction.c
@@ -37,7 +37,7 @@
 
 /* Using the hidden attribute here does not change the code but it
    helps to avoid warnings.  */
-extern void restore_rt (void) asm ("__restore_rt") attribute_hidden;
+extern void restore_rt (void) asm ("__restore_rt") __attribute__((__visibility__("hidden")));
 
 
 /* If ACT is not NULL, change the action for SIG to *ACT.

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4cc4f2bb67e11fc34f2174e02885c68efbea19e8

commit 4cc4f2bb67e11fc34f2174e02885c68efbea19e8
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Sat May 4 14:07:11 2013 -0400

    disable ldconfig during install
    
    do not bother running ldconfig on DESTDIR.  it wants to write the temp cache
    file outside of the chroot.  doesnt matter anyways as we wont use the cache
    results (portage will rebuild cache), so running ldconfig is simply a waste
    of time.
    
    http://sourceware.org/ml/libc-alpha/2012-08/msg00118.html
    https://bugs.gentoo.org/431038

diff --git a/Makefile b/Makefile
index 51ff5ca..0c5e32f 100644
--- a/Makefile
+++ b/Makefile
@@ -105,6 +105,7 @@ install-symbolic-link: subdir_install
 	rm -f $(symbolic-link-list)
 
 install:
+dont-bother-with-destdir:
 	-test ! -x $(elf-objpfx)ldconfig || LC_ALL=C \
 	  $(elf-objpfx)ldconfig $(addprefix -r ,$(install_root)) \
 				$(slibdir) $(libdir)

-----------------------------------------------------------------------


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]