summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xlibs/glibc/DETAILS2
-rw-r--r--libs/glibc/HISTORY7
-rwxr-xr-xlibs/glibc/PRE_BUILD7
-rw-r--r--libs/glibc/fix-res_query-assert.patch51
-rw-r--r--libs/glibc/glibc-2.17-sync-with-linux37.patch130
-rw-r--r--libs/glibc/glibc.gpgbin2284 -> 1740 bytes
-rw-r--r--libs/glibc/revert-c5a0802a.patch226
7 files changed, 140 insertions, 283 deletions
diff --git a/libs/glibc/DETAILS b/libs/glibc/DETAILS
index 256b589d53..4e363322d8 100755
--- a/libs/glibc/DETAILS
+++ b/libs/glibc/DETAILS
@@ -31,7 +31,7 @@ SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-git
SOURCE_URL="git://sourceware.org/git/glibc.git:$SPELL-git"
SOURCE_IGNORE=volatile
else
- VERSION=2.16.0
+ VERSION=2.17
SOURCE=$SPELL-$VERSION.tar.bz2
SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
SOURCE2=$SOURCE.sig
diff --git a/libs/glibc/HISTORY b/libs/glibc/HISTORY
index 226bfde451..535628c920 100644
--- a/libs/glibc/HISTORY
+++ b/libs/glibc/HISTORY
@@ -1,3 +1,10 @@
+2013-01-24 Ladislav Hagara <hgr@vabo.cz>
+ * DETAILS: 2.17
+ * glibc.gpg: 6C2A4AFF removed, 82764ED5 added
+ * PRE_BUILD, fix-res_query-assert.patch, revert-c5a0802a.patch:
+ patches removed
+ * PRE_BUILD, glibc-2.17-sync-with-linux37.patch: patch from Arch added
+
2012-12-02 Vlad Glagolev <stealth@sourcemage.org>
* DETAILS: fixed source urls for GLIBC_SANITIZE_HEADERS=y in 2.6
diff --git a/libs/glibc/PRE_BUILD b/libs/glibc/PRE_BUILD
index 0e7cd49131..99a69d603b 100755
--- a/libs/glibc/PRE_BUILD
+++ b/libs/glibc/PRE_BUILD
@@ -96,11 +96,8 @@ 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 &&
-# 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 &&
+# patch from Arch
+patch -p1 < $SPELL_DIRECTORY/glibc-2.17-sync-with-linux37.patch &&
# disabled libgd detection/building memusagestat for now until a better
# fix has been found, bug #8277
diff --git a/libs/glibc/fix-res_query-assert.patch b/libs/glibc/fix-res_query-assert.patch
deleted file mode 100644
index 522c16f1d9..0000000000
--- a/libs/glibc/fix-res_query-assert.patch
+++ /dev/null
@@ -1,51 +0,0 @@
---- 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.17-sync-with-linux37.patch b/libs/glibc/glibc-2.17-sync-with-linux37.patch
new file mode 100644
index 0000000000..4b9a960af0
--- /dev/null
+++ b/libs/glibc/glibc-2.17-sync-with-linux37.patch
@@ -0,0 +1,130 @@
+diff --git a/sysdeps/gnu/netinet/tcp.h b/sysdeps/gnu/netinet/tcp.h
+index 06e8414..b62a696 100644
+--- a/sysdeps/gnu/netinet/tcp.h
++++ b/sysdeps/gnu/netinet/tcp.h
+@@ -37,20 +37,29 @@
+ /*
+ * User-settable options (used with setsockopt).
+ */
+-#define TCP_NODELAY 1 /* Don't delay send to coalesce packets */
+-#define TCP_MAXSEG 2 /* Set maximum segment size */
+-#define TCP_CORK 3 /* Control sending of partial frames */
+-#define TCP_KEEPIDLE 4 /* Start keeplives after this period */
+-#define TCP_KEEPINTVL 5 /* Interval between keepalives */
+-#define TCP_KEEPCNT 6 /* Number of keepalives before death */
+-#define TCP_SYNCNT 7 /* Number of SYN retransmits */
+-#define TCP_LINGER2 8 /* Life time of orphaned FIN-WAIT-2 state */
+-#define TCP_DEFER_ACCEPT 9 /* Wake up listener only when data arrive */
+-#define TCP_WINDOW_CLAMP 10 /* Bound advertised window */
+-#define TCP_INFO 11 /* Information about this connection. */
+-#define TCP_QUICKACK 12 /* Bock/reenable quick ACKs. */
+-#define TCP_CONGESTION 13 /* Congestion control algorithm. */
+-#define TCP_MD5SIG 14 /* TCP MD5 Signature (RFC2385) */
++#define TCP_NODELAY 1 /* Don't delay send to coalesce packets */
++#define TCP_MAXSEG 2 /* Set maximum segment size */
++#define TCP_CORK 3 /* Control sending of partial frames */
++#define TCP_KEEPIDLE 4 /* Start keeplives after this period */
++#define TCP_KEEPINTVL 5 /* Interval between keepalives */
++#define TCP_KEEPCNT 6 /* Number of keepalives before death */
++#define TCP_SYNCNT 7 /* Number of SYN retransmits */
++#define TCP_LINGER2 8 /* Life time of orphaned FIN-WAIT-2 state */
++#define TCP_DEFER_ACCEPT 9 /* Wake up listener only when data arrive */
++#define TCP_WINDOW_CLAMP 10 /* Bound advertised window */
++#define TCP_INFO 11 /* Information about this connection. */
++#define TCP_QUICKACK 12 /* Bock/reenable quick ACKs. */
++#define TCP_CONGESTION 13 /* Congestion control algorithm. */
++#define TCP_MD5SIG 14 /* TCP MD5 Signature (RFC2385) */
++#define TCP_COOKIE_TRANSACTIONS 15 /* TCP Cookie Transactions */
++#define TCP_THIN_LINEAR_TIMEOUTS 16 /* Use linear timeouts for thin streams*/
++#define TCP_THIN_DUPACK 17 /* Fast retrans. after 1 dupack */
++#define TCP_USER_TIMEOUT 18 /* How long for loss retry before timeout */
++#define TCP_REPAIR 19 /* TCP sock is under repair right now */
++#define TCP_REPAIR_QUEUE 20 /* Set TCP queue to repair */
++#define TCP_QUEUE_SEQ 21 /* Set sequence number of repaired queue. */
++#define TCP_REPAIR_OPTIONS 22 /* Repair TCP connection options */
++#define TCP_FASTOPEN 23 /* Enable FastOpen on listeners */
+
+ #ifdef __USE_MISC
+ # include <sys/types.h>
+@@ -173,7 +182,9 @@ enum
+ # define TCPI_OPT_TIMESTAMPS 1
+ # define TCPI_OPT_SACK 2
+ # define TCPI_OPT_WSCALE 4
+-# define TCPI_OPT_ECN 8
++# define TCPI_OPT_ECN 8 /* ECN was negociated at TCP session init */
++# define TCPI_OPT_ECN_SEEN 16 /* we received at least one packet with ECT */
++# define TCPI_OPT_SYN_DATA 32 /* SYN-ACK acked data in SYN sent or rcvd */
+
+ /* Values for tcpi_state. */
+ enum tcp_ca_state
+@@ -241,6 +252,49 @@ struct tcp_md5sig
+ u_int8_t tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* Key (binary). */
+ };
+
++/* For socket repair options. */
++struct tcp_repair_opt
++{
++ u_int32_t opt_code;
++ u_int32_t opt_val;
++};
++
++/* Queue to repair, for TCP_REPAIR_QUEUE. */
++enum
++{
++ TCP_NO_QUEUE,
++ TCP_RECV_QUEUE,
++ TCP_SEND_QUEUE,
++ TCP_QUEUES_NR,
++};
++
++/* For cookie transactions socket options. */
++#define TCP_COOKIE_MIN 8 /* 64-bits */
++#define TCP_COOKIE_MAX 16 /* 128-bits */
++#define TCP_COOKIE_PAIR_SIZE (2*TCP_COOKIE_MAX)
++
++/* Flags for both getsockopt and setsockopt */
++#define TCP_COOKIE_IN_ALWAYS (1 << 0) /* Discard SYN without cookie */
++#define TCP_COOKIE_OUT_NEVER (1 << 1) /* Prohibit outgoing cookies,
++ * supercedes everything. */
++
++/* Flags for getsockopt */
++#define TCP_S_DATA_IN (1 << 2) /* Was data received? */
++#define TCP_S_DATA_OUT (1 << 3) /* Was data sent? */
++
++#define TCP_MSS_DEFAULT 536U /* IPv4 (RFC1122, RFC2581) */
++#define TCP_MSS_DESIRED 1220U /* IPv6 (tunneled), EDNS0 (RFC3226) */
++
++struct tcp_cookie_transactions
++{
++ u_int16_t tcpct_flags;
++ u_int8_t __tcpct_pad1;
++ u_int8_t tcpct_cookie_desired;
++ u_int16_t tcpct_s_data_desired;
++ u_int16_t tcpct_used;
++ u_int8_t tcpct_value[TCP_MSS_DEFAULT];
++};
++
+ #endif /* Misc. */
+
+ #endif /* netinet/tcp.h */
+diff --git a/sysdeps/unix/sysv/linux/bits/socket.h b/sysdeps/unix/sysv/linux/bits/socket.h
+index df8f167..eadd7d9 100644
+--- a/sysdeps/unix/sysv/linux/bits/socket.h
++++ b/sysdeps/unix/sysv/linux/bits/socket.h
+@@ -1,6 +1,5 @@
+ /* System-specific socket constants and types. Linux version.
+- Copyright (C) 1991, 1992, 1994-2001, 2004, 2006-2010, 2011, 2012
+- Free Software Foundation, Inc.
++ Copyright (C) 1991-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
+@@ -208,6 +207,8 @@ enum
+ #define MSG_MORE MSG_MORE
+ MSG_WAITFORONE = 0x10000, /* Wait for at least one packet to return.*/
+ #define MSG_WAITFORONE MSG_WAITFORONE
++ MSG_FASTOPEN = 0x20000000, /* Send data in TCP SYN. */
++#define MSG_FASTOPEN MSG_FASTOPEN
+
+ MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file
+ descriptor received through
diff --git a/libs/glibc/glibc.gpg b/libs/glibc/glibc.gpg
index 304df4b768..95a2b713af 100644
--- a/libs/glibc/glibc.gpg
+++ b/libs/glibc/glibc.gpg
Binary files differ
diff --git a/libs/glibc/revert-c5a0802a.patch b/libs/glibc/revert-c5a0802a.patch
deleted file mode 100644
index ad4413a542..0000000000
--- a/libs/glibc/revert-c5a0802a.patch
+++ /dev/null
@@ -1,226 +0,0 @@
-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:
-