Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to devel-glibc-2.15 grimoire by Sukneet Basuta (8cfc7a35f3152230a4fe626f350ce197b39230f6)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Sukneet Basuta <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to devel-glibc-2.15 grimoire by Sukneet Basuta (8cfc7a35f3152230a4fe626f350ce197b39230f6)
  • Date: Sat, 14 Jul 2012 01:55:10 -0500

GIT changes to devel-glibc-2.15 grimoire by Sukneet Basuta
<sukneet AT sourcemage.org>:

dev/null |binary
libs/glibc/BUILD | 12 -
libs/glibc/HISTORY | 10 +
libs/glibc/PRE_BUILD | 23 +--
libs/glibc/config.h.patch | 8 -
libs/glibc/fix-res_query-assert.patch | 51 ++++++
libs/glibc/glibc-2.3-20050725.tar.bz2.sig | 0
libs/glibc/revert-c5a0802a.patch | 226
++++++++++++++++++++++++++++++
8 files changed, 300 insertions(+), 30 deletions(-)

New commits:
commit 8cfc7a35f3152230a4fe626f350ce197b39230f6
Author: Sukneet Basuta <sukneet AT sourcemage.org>
Commit: Sukneet Basuta <sukneet AT sourcemage.org>

glibc: specify libdir so libs install to /usr/lib on all archs

* PRE_BUILD: remove fixing ieee754 function names. This broke the build
on my box.
Re-enable libgd detection. Commented out for now in case it
is still broken on someone's box
Added patch to fix res_query assertion and another to fix
various hangs
* fix-res_query-assert.patch: added, fix assertion in res_query
* revert-c5a0802a.patch: added, revert to fix various hangs

removed unused files

diff --git a/libs/glibc/BUILD b/libs/glibc/BUILD
index 33f4735..0815da9 100755
--- a/libs/glibc/BUILD
+++ b/libs/glibc/BUILD
@@ -4,14 +4,6 @@ make_single &&
sedit "s/lib64/lib/" sysdeps/unix/sysv/linux/x86_64/ldconfig.h &&
sedit "s/264/2/" sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed &&

-# this causes configure to be run again where it fails for some people on
PIII and for me on Alpha
-# the error is about no working grep found...
-if [[ ${SMGL_COMPAT_ARCHS[1]} == x86_64 ]]; then
-# install x86_64 libraries to lib instead of lib64
-sedit "s/| x86_64//" sysdeps/unix/sysv/linux/configure &&
-sedit "s/| x86_64//" sysdeps/unix/sysv/linux/configure.in
-fi &&
-
#
# bug#5570 ccache sometimes has trouble correctly recognising minor
differences
# in configurations and doesn't force recompile when it should. This stops
it from
@@ -139,8 +131,6 @@ ln -s /usr/include/sys/capability.h
$SOURCE_DIRECTORY/nscd/sys/capability.h &&
#
cd $SOURCE_DIRECTORY.bld &&

-OPTS="--enable-obsolete-rpc $OPTS" &&
-
#
# Configure glibc to use the sanitised headers
# http://bugs.sourcemage.org/show_bug.cgi?id=7560
@@ -148,6 +138,7 @@ OPTS="--enable-obsolete-rpc $OPTS" &&
$SOURCE_DIRECTORY/configure --host=$HOST \
--build=$BUILD \
--prefix=/usr \
+ --libdir=/usr/lib \
--infodir=/usr/share/info \
--mandir=/usr/share/man \
--sysconfdir=/etc \
@@ -156,5 +147,6 @@ $SOURCE_DIRECTORY/configure --host=$HOST
\
--disable-profile \
--with-headers=$GLIBC_HEADERS_DIR/usr/include \
--disable-multi-arch \
+ --enable-obsolete-rpc \
$OPTS &&
make
diff --git a/libs/glibc/HISTORY b/libs/glibc/HISTORY
index 4ee6340..87db3f8 100644
--- a/libs/glibc/HISTORY
+++ b/libs/glibc/HISTORY
@@ -1,3 +1,13 @@
+2012-07-14 Sukneet Basuta <sukneet AT sourcemage.org>
+ * BUILD: specify libdir so libs install to /usr/lib on all archs
+ * PRE_BUILD: remove fixing ieee754 function names. This would break
the
+ build on my box.
+ Re-enable libgd detection
+ Added patch to fix res_query assertion and another to fix various
hangs
+ * fix-res_query-assert.patch: added, fix assertion in res_query
+ * revert-c5a0802a.patch: added, revert to fix various hangs
+ * removed unused files
+
2012-07-10 Sukneet Basuta <sukneet AT sourcemage.org>
* PRE_BUILD: apply as_fn_executable_p.patch
* as_fn_executable_p.patch: add as_fn_executable_p() to configure
diff --git a/libs/glibc/PRE_BUILD b/libs/glibc/PRE_BUILD
index f4b8c85..0e7cd49 100755
--- a/libs/glibc/PRE_BUILD
+++ b/libs/glibc/PRE_BUILD
@@ -90,22 +90,21 @@ rm -rf $GLIBC_HEADERS_DIR/include/drm &&
#
# Now fixup the normal glibc
#
-cd $SOURCE_DIRECTORY &&
-patch -p0 < $SPELL_DIRECTORY/Makefile.patch &&
-patch -p1 < $SPELL_DIRECTORY/as-test-x.patch &&
+cd $SOURCE_DIRECTORY &&
+patch -p0 < $SPELL_DIRECTORY/Makefile.patch &&
+patch -p1 < $SPELL_DIRECTORY/as-test-x.patch &&
# no idea why or how this is missing from configure
-patch -p0 < $SPELL_DIRECTORY/as_fn_executable_p.patch &&
+patch -p0 < $SPELL_DIRECTORY/as_fn_executable_p.patch &&
+
+# http://sourceware.org/bugzilla/show_bug.cgi?id=13013
+patch -p1 < $SPELL_DIRECTORY/fix-res_query-assert.patch &&
+
+# https://bugzilla.redhat.com/show_bug.cgi?id=552960
+patch -p1 < $SPELL_DIRECTORY/revert-c5a0802a.patch &&

# disabled libgd detection/building memusagestat for now until a better
# fix has been found, bug #8277
-sedit 's/LIBGD=yes/LIBGD=no/' $SOURCE_DIRECTORY/configure &&
-
-# Correct function names
-sed -i "s:__floor:s__floor:g" sysdeps/ieee754/dbl-64/s_floor.c &&
-sed -i "s:__floor:s__floor:g" sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c &&
-sed -i "s:__floorf:s__floorf:g" sysdeps/ieee754/flt-32/s_floorf.c &&
-sed -i "s:__rint:s__rint:g" sysdeps/ieee754/dbl-64/wordsize-64/s_rint.c &&
-sed -i "s:__rintf:s__rintf:g" sysdeps/ieee754/flt-32/s_rintf.c &&
+#sedit 's/LIBGD=yes/LIBGD=no/' $SOURCE_DIRECTORY/configure &&

#
# Create the build directory
diff --git a/libs/glibc/config.h.patch b/libs/glibc/config.h.patch
deleted file mode 100644
index 2055042..0000000
--- a/libs/glibc/config.h.patch
+++ /dev/null
@@ -1,8 +0,0 @@
---- a/usr/include/linux/config.h 2004-11-29 21:24:16.893466608 -0800
-+++ b/usr/include/linux/config.h 2004-11-29 21:24:46.574954336 -0800
-@@ -1,3 +1,3 @@
--#error "Compilation aborted. Please read the FAQ for linux-libc-headers
package."
--#error "(can be found at
http://ep09.pld-linux.org/~mmazur/linux-libc-headers/doc/)"
-+#warning "Compilation would have been aborted. Please read the FAQ for
linux-libc-headers package."
-+#warning "(can be found at
http://ep09.pld-linux.org/~mmazur/linux-libc-headers/doc/)"
-
diff --git a/libs/glibc/fix-res_query-assert.patch
b/libs/glibc/fix-res_query-assert.patch
new file mode 100644
index 0000000..522c16f
--- /dev/null
+++ b/libs/glibc/fix-res_query-assert.patch
@@ -0,0 +1,51 @@
+--- a/resolv/res_query.c
++++ a/resolv/res_query.c
+@@ -122,6 +122,7 @@ __libc_res_nquery(res_state statp,
+ int *resplen2)
+ {
+ HEADER *hp = (HEADER *) answer;
++ HEADER *hp2;
+ int n, use_malloc = 0;
+ u_int oflags = statp->_flags;
+
+@@ -239,26 +240,25 @@ __libc_res_nquery(res_state statp,
+ /* __libc_res_nsend might have reallocated the buffer. */
+ hp = (HEADER *) *answerp;
+
+- /* We simplify the following tests by assigning HP to HP2. It
+- is easy to verify that this is the same as ignoring all
+- tests of HP2. */
+- HEADER *hp2 = answerp2 ? (HEADER *) *answerp2 : hp;
+-
+- if (n < (int) sizeof (HEADER) && answerp2 != NULL
+- && *resplen2 > (int) sizeof (HEADER))
++ /* We simplify the following tests by assigning HP to HP2 or
++ vice versa. It is easy to verify that this is the same as
++ ignoring all tests of HP or HP2. */
++ if (answerp2 == NULL || *resplen2 < (int) sizeof (HEADER))
+ {
+- /* Special case of partial answer. */
+- assert (hp != hp2);
+- hp = hp2;
++ hp2 = hp;
+ }
+- else if (answerp2 != NULL && *resplen2 < (int) sizeof (HEADER)
+- && n > (int) sizeof (HEADER))
++ else
+ {
+- /* Special case of partial answer. */
+- assert (hp != hp2);
+- hp2 = hp;
++ hp2 = (HEADER *) *answerp2;
++ if (n < (int) sizeof (HEADER))
++ {
++ hp = hp2;
++ }
+ }
+
++ /* Make sure both hp and hp2 are defined */
++ assert((hp != NULL) && (hp2 != NULL));
++
+ if ((hp->rcode != NOERROR || ntohs(hp->ancount) == 0)
+ && (hp2->rcode != NOERROR || ntohs(hp2->ancount) == 0)) {
+ #ifdef DEBUG
diff --git a/libs/glibc/glibc-2.3-20050725.tar.bz2.sig
b/libs/glibc/glibc-2.3-20050725.tar.bz2.sig
deleted file mode 100644
index 93072c5..0000000
Binary files a/libs/glibc/glibc-2.3-20050725.tar.bz2.sig and /dev/null differ
diff --git a/libs/glibc/revert-c5a0802a.patch
b/libs/glibc/revert-c5a0802a.patch
new file mode 100644
index 0000000..ad4413a
--- /dev/null
+++ b/libs/glibc/revert-c5a0802a.patch
@@ -0,0 +1,226 @@
+diff -rup a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
+--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2011-12-22 18:04:12.937212834 +0000
++++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2011-12-22 18:04:42.104222278 +0000
+@@ -137,7 +137,6 @@ __pthread_cond_wait:
+ cmpl $PI_BIT, %eax
+ jne 18f
+
+-90:
+ movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %ecx
+ movl %ebp, %edx
+ xorl %esi, %esi
+@@ -151,9 +150,6 @@ __pthread_cond_wait:
+ sete 16(%esp)
+ je 19f
+
+- cmpl $-EAGAIN, %eax
+- je 91f
+-
+ /* Normal and PI futexes dont mix. Use normal futex functions only
+ if the kernel does not support the PI futex functions. */
+ cmpl $-ENOSYS, %eax
+@@ -398,78 +394,6 @@ __pthread_cond_wait:
+ #endif
+ call __lll_unlock_wake
+ jmp 11b
+-
+-91:
+-.LcleanupSTART2:
+- /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to
+- call it again. */
+-
+- /* Get internal lock. */
+- movl $1, %edx
+- xorl %eax, %eax
+- LOCK
+-#if cond_lock == 0
+- cmpxchgl %edx, (%ebx)
+-#else
+- cmpxchgl %edx, cond_lock(%ebx)
+-#endif
+- jz 92f
+-
+-#if cond_lock == 0
+- movl %ebx, %edx
+-#else
+- leal cond_lock(%ebx), %edx
+-#endif
+-#if (LLL_SHARED-LLL_PRIVATE) > 255
+- xorl %ecx, %ecx
+-#endif
+- cmpl $-1, dep_mutex(%ebx)
+- setne %cl
+- subl $1, %ecx
+- andl $(LLL_SHARED-LLL_PRIVATE), %ecx
+-#if LLL_PRIVATE != 0
+- addl $LLL_PRIVATE, %ecx
+-#endif
+- call __lll_lock_wait
+-
+-92:
+- /* Increment the cond_futex value again, so it can be used as a new
+- expected value. */
+- addl $1, cond_futex(%ebx)
+- movl cond_futex(%ebx), %ebp
+-
+- /* Unlock. */
+- LOCK
+-#if cond_lock == 0
+- subl $1, (%ebx)
+-#else
+- subl $1, cond_lock(%ebx)
+-#endif
+- je 93f
+-#if cond_lock == 0
+- movl %ebx, %eax
+-#else
+- leal cond_lock(%ebx), %eax
+-#endif
+-#if (LLL_SHARED-LLL_PRIVATE) > 255
+- xorl %ecx, %ecx
+-#endif
+- cmpl $-1, dep_mutex(%ebx)
+- setne %cl
+- subl $1, %ecx
+- andl $(LLL_SHARED-LLL_PRIVATE), %ecx
+-#if LLL_PRIVATE != 0
+- addl $LLL_PRIVATE, %ecx
+-#endif
+- call __lll_unlock_wake
+-
+-93:
+- /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
+- xorl %ecx, %ecx
+- movl dep_mutex(%ebx), %edi
+- jmp 90b
+-.LcleanupEND2:
+-
+ .size __pthread_cond_wait, .-__pthread_cond_wait
+ versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
+ GLIBC_2_3_2)
+@@ -642,10 +566,6 @@ __condvar_w_cleanup:
+ .long .LcleanupEND-.Lsub_cond_futex
+ .long __condvar_w_cleanup-.LSTARTCODE
+ .uleb128 0
+- .long .LcleanupSTART2-.LSTARTCODE
+- .long .LcleanupEND2-.LcleanupSTART2
+- .long __condvar_w_cleanup-.LSTARTCODE
+- .uleb128 0
+ .long .LcallUR-.LSTARTCODE
+ .long .LENDCODE-.LcallUR
+ .long 0
+Only in b/nptl/sysdeps/unix/sysv/linux/i386/i486: pthread_cond_wait.S.orig
+diff -rup a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
+--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2011-12-22
18:04:12.941212837 +0000
++++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2011-12-22
18:05:05.155229737 +0000
+@@ -23,7 +23,6 @@
+ #include <lowlevelcond.h>
+ #include <tcb-offsets.h>
+ #include <pthread-pi-defines.h>
+-#include <pthread-errnos.h>
+ #include <stap-probe.h>
+
+ #include <kernel-features.h>
+@@ -137,14 +136,11 @@ __pthread_cond_wait:
+ cmpl $PI_BIT, %eax
+ jne 61f
+
+-90:
+ movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %esi
+ movl $SYS_futex, %eax
+ syscall
+
+ movl $1, %r8d
+- cmpq $-EAGAIN, %rax
+- je 91f
+ #ifdef __ASSUME_REQUEUE_PI
+ jmp 62f
+ #else
+@@ -331,70 +327,6 @@ __pthread_cond_wait:
+
+ 13: movq %r10, %rax
+ jmp 14b
+-
+-91:
+-.LcleanupSTART2:
+- /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to
+- call it again. */
+- movq 8(%rsp), %rdi
+-
+- /* Get internal lock. */
+- movl $1, %esi
+- xorl %eax, %eax
+- LOCK
+-#if cond_lock == 0
+- cmpxchgl %esi, (%rdi)
+-#else
+- cmpxchgl %esi, cond_lock(%rdi)
+-#endif
+- jz 92f
+-
+-#if cond_lock != 0
+- addq $cond_lock, %rdi
+-#endif
+- LP_OP(cmp) $-1, dep_mutex-cond_lock(%rdi)
+- movl $LLL_PRIVATE, %eax
+- movl $LLL_SHARED, %esi
+- cmovne %eax, %esi
+- callq __lll_lock_wait
+-#if cond_lock != 0
+- subq $cond_lock, %rdi
+-#endif
+-92:
+- /* Increment the cond_futex value again, so it can be used as a new
+- expected value. */
+- incl cond_futex(%rdi)
+- movl cond_futex(%rdi), %edx
+-
+- /* Release internal lock. */
+- LOCK
+-#if cond_lock == 0
+- decl (%rdi)
+-#else
+- decl cond_lock(%rdi)
+-#endif
+- jz 93f
+-
+-#if cond_lock != 0
+- addq $cond_lock, %rdi
+-#endif
+- LP_OP(cmp) $-1, dep_mutex-cond_lock(%rdi)
+- movl $LLL_PRIVATE, %eax
+- movl $LLL_SHARED, %esi
+- cmovne %eax, %esi
+- /* The call preserves %rdx. */
+- callq __lll_unlock_wake
+-#if cond_lock != 0
+- subq $cond_lock, %rdi
+-#endif
+-93:
+- /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
+- xorq %r10, %r10
+- mov dep_mutex(%rdi), %R8_LP
+- leaq cond_futex(%rdi), %rdi
+- jmp 90b
+-.LcleanupEND2:
+-
+ .size __pthread_cond_wait, .-__pthread_cond_wait
+ versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
+ GLIBC_2_3_2)
+@@ -547,15 +479,11 @@ __condvar_cleanup1:
+ .uleb128 .LcleanupSTART-.LSTARTCODE
+ .uleb128 .LcleanupEND-.LcleanupSTART
+ .uleb128 __condvar_cleanup1-.LSTARTCODE
+- .uleb128 0
+- .uleb128 .LcleanupSTART2-.LSTARTCODE
+- .uleb128 .LcleanupEND2-.LcleanupSTART2
+- .uleb128 __condvar_cleanup1-.LSTARTCODE
+- .uleb128 0
++ .uleb128 0
+ .uleb128 .LcallUR-.LSTARTCODE
+ .uleb128 .LENDCODE-.LcallUR
+ .uleb128 0
+- .uleb128 0
++ .uleb128 0
+ .Lcstend:
+



  • [SM-Commit] GIT changes to devel-glibc-2.15 grimoire by Sukneet Basuta (8cfc7a35f3152230a4fe626f350ce197b39230f6), Sukneet Basuta, 07/14/2012

Archive powered by MHonArc 2.6.24.

Top of Page