Author: aurel32
Date: 2011-12-13 22:40:39 +0000 (Tue, 13 Dec 2011)
New Revision: 5081

Added:
   glibc-package/trunk/debian/rules.d/stage1.mk
Removed:
   glibc-package/trunk/debian/patches/amd64/cvs-pthread_cond_wait.diff
Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/series
Log:
  * patches/amd64/cvs-pthread_cond_wait.diff: remove as it seems to cause
    some issue with some kernels.  Closes: #651746.



Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog        2011-12-13 22:32:25 UTC (rev 
5080)
+++ glibc-package/trunk/debian/changelog        2011-12-13 22:40:39 UTC (rev 
5081)
@@ -3,6 +3,8 @@
   [ Aurelien Jarno ]
   * patches/arm/cvs-syscall-mcount.diff: new patch from upstream to fix
     build on armel.
+  * patches/amd64/cvs-pthread_cond_wait.diff: remove as it seems to cause
+    some issue with some kernels.  Closes: #651746.
 
   [ Samuel Thibault ]
   * patches/hurd-i386/submitted-mach-nanosleep.diff: New patch from Pino to

Deleted: glibc-package/trunk/debian/patches/amd64/cvs-pthread_cond_wait.diff
===================================================================
--- glibc-package/trunk/debian/patches/amd64/cvs-pthread_cond_wait.diff 
2011-12-13 22:32:25 UTC (rev 5080)
+++ glibc-package/trunk/debian/patches/amd64/cvs-pthread_cond_wait.diff 
2011-12-13 22:40:39 UTC (rev 5081)
@@ -1,121 +0,0 @@
-2011-11-28  Andreas Schwab  <[email protected]>
-
-       * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Handle
-       EAGAIN from FUTEX_WAIT_REQUEUE_PI.
-
-diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 
b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
-index 7535baa..d837d15 100644
---- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
-+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
-@@ -23,6 +23,7 @@
- #include <lowlevelcond.h>
- #include <tcb-offsets.h>
- #include <pthread-pi-defines.h>
-+#include <pthread-errnos.h>
- 
- #include <kernel-features.h>
- 
-@@ -133,11 +134,14 @@ __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
-@@ -324,6 +328,70 @@ __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
-+      cmpq    $-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
-+      cmpq    $-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
-+      movq    dep_mutex(%rdi), %r8
-+      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)
-@@ -476,11 +544,15 @@ __condvar_cleanup1:
-       .uleb128 .LcleanupSTART-.LSTARTCODE
-       .uleb128 .LcleanupEND-.LcleanupSTART
-       .uleb128 __condvar_cleanup1-.LSTARTCODE
--      .uleb128  0
-+      .uleb128 0
-+      .uleb128 .LcleanupSTART2-.LSTARTCODE
-+      .uleb128 .LcleanupEND2-.LcleanupSTART2
-+      .uleb128 __condvar_cleanup1-.LSTARTCODE
-+      .uleb128 0
-       .uleb128 .LcallUR-.LSTARTCODE
-       .uleb128 .LENDCODE-.LcallUR
-       .uleb128 0
--      .uleb128  0
-+      .uleb128 0
- .Lcstend:
- 
- 

Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series   2011-12-13 22:32:25 UTC (rev 
5080)
+++ glibc-package/trunk/debian/patches/series   2011-12-13 22:40:39 UTC (rev 
5081)
@@ -76,7 +76,6 @@
 amd64/cvs-pthread-stack-alignment.diff
 amd64/cvs-avx-detection.diff
 amd64/cvs-dl_trampoline-cfi.diff
-amd64/cvs-pthread_cond_wait.diff
 
 arm/local-atomic.diff
 arm/local-eabi-wchar.diff

Added: glibc-package/trunk/debian/rules.d/stage1.mk
===================================================================
--- glibc-package/trunk/debian/rules.d/stage1.mk                                
(rev 0)
+++ glibc-package/trunk/debian/rules.d/stage1.mk        2011-12-13 22:40:39 UTC 
(rev 5081)
@@ -0,0 +1,71 @@
+## This reuses various macros from the debian/rules.d/build.mk file
+
+ifeq ($(DEB_STAGE),stage1)
+
+override EGLIBC_PASSES = libc
+override DEB_ARCH_REGULAR_PACKAGES = $(libc)-dev
+override DEB_INDEP_REGULAR_PACKAGES =
+override DEB_UDEB_PACKAGES =
+
+## Development libraries we need to fake
+stage1_libfake.so :=           \
+       libc.so
+
+stage1_libfake.a :=            \
+       libanl.a                \
+       libBrokenLocale.a       \
+       libbsd-compat.a         \
+       libc.a                  \
+       libc_nonshared.a        \
+       libcrypt.a              \
+       libdl.a                 \
+       libg.a                  \
+       libieee.a               \
+       libm.a                  \
+       libmcheck.a             \
+       libnsl.a                \
+       libpthread.a            \
+       libpthread_nonshared.a  \
+       libresolv.a             \
+       librpcsvc.a             \
+       librt.a                 \
+       libutil.a               \
+
+$(stamp)build_libc: $(stamp)configure_libc
+       @echo Building $(curpass)
+       @## Build the crtX.o init routines
+       $(call logme, -a $(log_build), $(MAKE) -C $(DEB_BUILDDIR) $(NJOBS) 
csu/subdir_lib)
+       $(call logme, -a $(log_build), $(AR) qcs $(DEB_BUILDDIR)/libfake.a)
+       $(call logme, -a $(log_build), $(CC) -nostdlib -nostartfiles -shared \
+                               -o $(DEB_BUILDDIR)/libfake.so 
$(DEB_BUILDDIR)/libfake.a)
+       $(call logme, -a $(log_build), echo "---------------" ; echo -n "Build 
ended: " ; date --rfc-2822)
+       touch $@
+
+$(stamp)check_libc: $(stamp)build_libc
+       @echo Nothing to test for $(curpass)
+       touch $@
+
+$(stamp)install_libc: DESTDIR=$(CURDIR)/debian/tmp-$(curpass)
+$(stamp)install_libc: $(stamp)check_libc
+       @echo Installing $(curpass)
+       rm -rf $(CURDIR)/debian/tmp-$(curpass)
+       ## These libc/ld-linux binaries are total garbage, but they allow
+       ## a subsequent stage2 GCC build to succeed.
+       install -d $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)
+       for lib_a in $(stage1_libfake.a); do \
+               install -T $(DEB_BUILDDIR)/libfake.a 
$(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/$$lib_a; \
+       done
+       for lib_so in $(stage1_libfake.so); do \
+               install -T $(DEB_BUILDDIR)/libfake.so 
$(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/$$lib_so; \
+       done
+       $(MAKE) -C $(DEB_BUILDDIR) install_root=$(DESTDIR) 
install-bootstrap-headers=yes \
+               csu/subdir_install install-headers
+       mkdir -p $(DESTDIR)/usr/include/$(DEB_HOST_MULTIARCH)
+       mv $(DESTDIR)/usr/include/bits          
$(DESTDIR)/usr/include/$(DEB_HOST_MULTIARCH)
+       mv $(DESTDIR)/usr/include/gnu           
$(DESTDIR)/usr/include/$(DEB_HOST_MULTIARCH)
+       mv $(DESTDIR)/usr/include/sys           
$(DESTDIR)/usr/include/$(DEB_HOST_MULTIARCH)
+       mv $(DESTDIR)/usr/include/fpu_control.h 
$(DESTDIR)/usr/include/$(DEB_HOST_MULTIARCH)
+       $(call xx,extra_install)
+       touch $@
+
+endif


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]

Reply via email to