[arch-commits] Commit in glibc/trunk (4 files)

Allan McRae allan at archlinux.org
Thu Mar 29 05:42:39 UTC 2012


    Date: Thursday, March 29, 2012 @ 01:42:38
  Author: allan
Revision: 154484

upgpkg: glibc 2.15-10

switch a couple of patches to those applied upstream

Added:
  glibc/trunk/glibc-2.15-confstr-local-buffer-extent.patch
Modified:
  glibc/trunk/PKGBUILD
  glibc/trunk/glibc-__i686.patch
Deleted:
  glibc/trunk/glibc-2.15-confstr-strdup.patch

----------------------------------------------+
 PKGBUILD                                     |   18 -
 glibc-2.15-confstr-local-buffer-extent.patch |  297 +++++++++++++++++++++++++
 glibc-2.15-confstr-strdup.patch              |   31 --
 glibc-__i686.patch                           |   44 ++-
 4 files changed, 338 insertions(+), 52 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2012-03-29 03:43:53 UTC (rev 154483)
+++ PKGBUILD	2012-03-29 05:42:38 UTC (rev 154484)
@@ -6,7 +6,7 @@
 
 pkgname=glibc
 pkgver=2.15
-pkgrel=9
+pkgrel=10
 _glibcdate=20111227
 pkgdesc="GNU C Library"
 arch=('i686' 'x86_64')
@@ -49,14 +49,14 @@
         glibc-2.15-non-signalling-comparisons.patch
         glibc-2.15-rintf-rounding.patch
         glibc-2.15-nearbyintf-rounding.patch
-        glibc-2.15-confstr-strdup.patch
+        glibc-2.15-confstr-local-buffer-extent.patch
         nscd
         locale.gen.txt
         locale-gen)
 md5sums=('6ffdf5832192b92f98bdd125317c0dfc'
          '7ef69c530a15106de93e4de2df2d393e'
          'b6c619e5cf91829a15ce34dccef676d5'
-         '40cd342e21f71f5e49e32622b25acc52'
+         'addfddd648a4bf832eb126aba944ebae'
          'e60e33591c9ec1447e4cddadcbb9cf3a'
          '6970bcfeb3bf88913436d5112d16f588'
          'c5de2a946215d647c8af5432ec4b0da0'
@@ -82,7 +82,7 @@
          'c483504cf404ed0b44480af627813a97'
          '1419d61fd1dbc6cdc48bb59da86fa66f'
          '7ff501435078b1a2622124fbeaafc921'
-         '41f94da2f8db856b091a2d670d68eee3'
+         '8d1023a51e0932681b46440d5f8551ee'
          'b587ee3a70c9b3713099295609afde49'
          '07ac979b6ab5eeb778d55f041529d623'
          '476e9113489f93b348b21e144b6a8fcf')
@@ -108,8 +108,7 @@
   patch -p1 -i ${srcdir}/glibc-2.15-do-not-install-timezone-files-2.patch
 
   # undefine __i686
-  # http://sourceware.org/ml/libc-alpha/2009-07/msg00072.html
-  # fix in http://sourceware.org/git/?p=glibc.git;a=commit;h=d4a54ac6 requires additional backporting...
+  # http://sourceware.org/glibc/wiki/Release/2.15#Build_Failures
   patch -p1 -i ${srcdir}/glibc-__i686.patch
 
   # http://www.exploit-db.com/exploits/15274/
@@ -214,8 +213,10 @@
   # http://sourceware.org/git/?p=glibc.git;a=commit;h=6cbeae47
   patch -p1 -i ${srcdir}/glibc-2.15-nearbyintf-rounding.patch
 
-  # fix varaible scope issue exposed with gcc-4.7 and -O2
-  patch -p1 -i ${srcdir}/glibc-2.15-confstr-strdup.patch
+  # fix varaible scope issue in confstr
+  # http://sourceware.org/git/?p=glibc.git;a=commit;h=ac4c54f0
+  # http://sourceware.org/git/?p=glibc.git;a=commit;h=d6a403f9
+  patch -p1 -i ${srcdir}/glibc-2.15-confstr-local-buffer-extent.patch
 
   install -dm755 ${pkgdir}/etc
   touch ${pkgdir}/etc/ld.so.conf
@@ -226,6 +227,7 @@
 
   if [[ ${CARCH} = "i686" ]]; then
     # Hack to fix NPTL issues with Xen, only required on 32bit platforms
+    # TODO: make separate glibc-xen package for i686
     export CFLAGS="${CFLAGS} -mno-tls-direct-seg-refs"
   fi
 

Added: glibc-2.15-confstr-local-buffer-extent.patch
===================================================================
--- glibc-2.15-confstr-local-buffer-extent.patch	                        (rev 0)
+++ glibc-2.15-confstr-local-buffer-extent.patch	2012-03-29 05:42:38 UTC (rev 154484)
@@ -0,0 +1,297 @@
+diff --git a/posix/confstr.c b/posix/confstr.c
+index 3c9566d..cad6561 100644
+--- a/posix/confstr.c
++++ b/posix/confstr.c
+@@ -35,6 +34,10 @@ confstr (name, buf, len)
+   const char *string = "";
+   size_t string_len = 1;
+ 
++  /* Note that this buffer must be large enough for the longest strings
++     used below.  */
++  char restenvs[4 * sizeof "POSIX_V7_LPBIG_OFFBIG"];
++
+   switch (name)
+     {
+     case _CS_PATH:
+@@ -53,59 +56,55 @@ confstr (name, buf, len)
+ 	 wint_t types are no greater than the width of type long.
+ 
+ 	 Currently this means all environment which the system allows.  */
+-      {
+-	char restenvs[4 * sizeof "POSIX_V7_LPBIG_OFFBIG"];
+-
+-	string_len = 0;
++      string_len = 0;
+ #ifndef _POSIX_V7_ILP32_OFF32
+-	if (__sysconf (_SC_V7_ILP32_OFF32) > 0)
++      if (__sysconf (_SC_V7_ILP32_OFF32) > 0)
+ #endif
+ #if !defined _POSIX_V7_ILP32_OFF32 || _POSIX_V7_ILP32_OFF32 > 0
+-	  {
+-	    memcpy (restenvs + string_len, "POSIX_V7_ILP32_OFF32",
+-		    sizeof "POSIX_V7_ILP32_OFF32" - 1);
+-	    string_len += sizeof "POSIX_V7_ILP32_OFF32" - 1;
+-	  }
++	{
++	  memcpy (restenvs + string_len, "POSIX_V7_ILP32_OFF32",
++		  sizeof "POSIX_V7_ILP32_OFF32" - 1);
++	  string_len += sizeof "POSIX_V7_ILP32_OFF32" - 1;
++	}
+ #endif
+ #ifndef _POSIX_V7_ILP32_OFFBIG
+-	if (__sysconf (_SC_V7_ILP32_OFFBIG) > 0)
++      if (__sysconf (_SC_V7_ILP32_OFFBIG) > 0)
+ #endif
+ #if !defined _POSIX_V7_ILP32_OFFBIG || _POSIX_V7_ILP32_OFFBIG > 0
+-	  {
+-	    if (string_len)
+-	      restenvs[string_len++] = '\n';
+-	    memcpy (restenvs + string_len, "POSIX_V7_ILP32_OFFBIG",
+-		    sizeof "POSIX_V7_ILP32_OFFBIG" - 1);
+-	    string_len += sizeof "POSIX_V7_ILP32_OFFBIG" - 1;
+-	  }
++	{
++	  if (string_len)
++	    restenvs[string_len++] = '\n';
++	  memcpy (restenvs + string_len, "POSIX_V7_ILP32_OFFBIG",
++		  sizeof "POSIX_V7_ILP32_OFFBIG" - 1);
++	  string_len += sizeof "POSIX_V7_ILP32_OFFBIG" - 1;
++	}
+ #endif
+ #ifndef _POSIX_V7_LP64_OFF64
+-	if (__sysconf (_SC_V7_LP64_OFF64) > 0)
++      if (__sysconf (_SC_V7_LP64_OFF64) > 0)
+ #endif
+ #if !defined _POSIX_V7_LP64_OFF64 || _POSIX_V7_LP64_OFF64 > 0
+-	  {
+-	    if (string_len)
+-	      restenvs[string_len++] = '\n';
+-	    memcpy (restenvs + string_len, "POSIX_V7_LP64_OFF64",
+-		    sizeof "POSIX_V7_LP64_OFF64" - 1);
+-	    string_len += sizeof "POSIX_V7_LP64_OFF64" - 1;
+-	  }
++	{
++	  if (string_len)
++	    restenvs[string_len++] = '\n';
++	  memcpy (restenvs + string_len, "POSIX_V7_LP64_OFF64",
++		  sizeof "POSIX_V7_LP64_OFF64" - 1);
++	  string_len += sizeof "POSIX_V7_LP64_OFF64" - 1;
++	}
+ #endif
+ #ifndef _POSIX_V7_LPBIG_OFFBIG
+-	if (__sysconf (_SC_V7_LPBIG_OFFBIG) > 0)
++      if (__sysconf (_SC_V7_LPBIG_OFFBIG) > 0)
+ #endif
+ #if !defined _POSIX_V7_LPBIG_OFFBIG || _POSIX_V7_LPBIG_OFFBIG > 0
+-	  {
+-	    if (string_len)
+-	      restenvs[string_len++] = '\n';
+-	    memcpy (restenvs + string_len, "POSIX_V7_LPBIG_OFFBIG",
+-		    sizeof "POSIX_V7_LPBIG_OFFBIG" - 1);
+-	    string_len += sizeof "POSIX_V7_LPBIG_OFFBIG" - 1;
+-	  }
+-#endif
+-	restenvs[string_len++] = '\0';
+-	string = restenvs;
+-      }
++	{
++	  if (string_len)
++	    restenvs[string_len++] = '\n';
++	  memcpy (restenvs + string_len, "POSIX_V7_LPBIG_OFFBIG",
++		  sizeof "POSIX_V7_LPBIG_OFFBIG" - 1);
++	  string_len += sizeof "POSIX_V7_LPBIG_OFFBIG" - 1;
++	}
++#endif
++      restenvs[string_len++] = '\0';
++      string = restenvs;
+       break;
+ 
+     case _CS_V6_WIDTH_RESTRICTED_ENVS:
+@@ -116,59 +115,55 @@ confstr (name, buf, len)
+ 	 wint_t types are no greater than the width of type long.
+ 
+ 	 Currently this means all environment which the system allows.  */
+-      {
+-	char restenvs[4 * sizeof "POSIX_V6_LPBIG_OFFBIG"];
+-
+-	string_len = 0;
++      string_len = 0;
+ #ifndef _POSIX_V6_ILP32_OFF32
+-	if (__sysconf (_SC_V6_ILP32_OFF32) > 0)
++      if (__sysconf (_SC_V6_ILP32_OFF32) > 0)
+ #endif
+ #if !defined _POSIX_V6_ILP32_OFF32 || _POSIX_V6_ILP32_OFF32 > 0
+-	  {
+-	    memcpy (restenvs + string_len, "POSIX_V6_ILP32_OFF32",
+-		    sizeof "POSIX_V6_ILP32_OFF32" - 1);
+-	    string_len += sizeof "POSIX_V6_ILP32_OFF32" - 1;
+-	  }
++	{
++	  memcpy (restenvs + string_len, "POSIX_V6_ILP32_OFF32",
++		  sizeof "POSIX_V6_ILP32_OFF32" - 1);
++	  string_len += sizeof "POSIX_V6_ILP32_OFF32" - 1;
++	}
+ #endif
+ #ifndef _POSIX_V6_ILP32_OFFBIG
+-	if (__sysconf (_SC_V6_ILP32_OFFBIG) > 0)
++      if (__sysconf (_SC_V6_ILP32_OFFBIG) > 0)
+ #endif
+ #if !defined _POSIX_V6_ILP32_OFFBIG || _POSIX_V6_ILP32_OFFBIG > 0
+-	  {
+-	    if (string_len)
+-	      restenvs[string_len++] = '\n';
+-	    memcpy (restenvs + string_len, "POSIX_V6_ILP32_OFFBIG",
+-		    sizeof "POSIX_V6_ILP32_OFFBIG" - 1);
+-	    string_len += sizeof "POSIX_V6_ILP32_OFFBIG" - 1;
+-	  }
++	{
++	  if (string_len)
++	    restenvs[string_len++] = '\n';
++	  memcpy (restenvs + string_len, "POSIX_V6_ILP32_OFFBIG",
++		  sizeof "POSIX_V6_ILP32_OFFBIG" - 1);
++	  string_len += sizeof "POSIX_V6_ILP32_OFFBIG" - 1;
++	}
+ #endif
+ #ifndef _POSIX_V6_LP64_OFF64
+-	if (__sysconf (_SC_V6_LP64_OFF64) > 0)
++      if (__sysconf (_SC_V6_LP64_OFF64) > 0)
+ #endif
+ #if !defined _POSIX_V6_LP64_OFF64 || _POSIX_V6_LP64_OFF64 > 0
+-	  {
+-	    if (string_len)
+-	      restenvs[string_len++] = '\n';
+-	    memcpy (restenvs + string_len, "POSIX_V6_LP64_OFF64",
+-		    sizeof "POSIX_V6_LP64_OFF64" - 1);
+-	    string_len += sizeof "POSIX_V6_LP64_OFF64" - 1;
+-	  }
++	{
++	  if (string_len)
++	    restenvs[string_len++] = '\n';
++	  memcpy (restenvs + string_len, "POSIX_V6_LP64_OFF64",
++		  sizeof "POSIX_V6_LP64_OFF64" - 1);
++	  string_len += sizeof "POSIX_V6_LP64_OFF64" - 1;
++	}
+ #endif
+ #ifndef _POSIX_V6_LPBIG_OFFBIG
+-	if (__sysconf (_SC_V6_LPBIG_OFFBIG) > 0)
++      if (__sysconf (_SC_V6_LPBIG_OFFBIG) > 0)
+ #endif
+ #if !defined _POSIX_V6_LPBIG_OFFBIG || _POSIX_V6_LPBIG_OFFBIG > 0
+-	  {
+-	    if (string_len)
+-	      restenvs[string_len++] = '\n';
+-	    memcpy (restenvs + string_len, "POSIX_V6_LPBIG_OFFBIG",
+-		    sizeof "POSIX_V6_LPBIG_OFFBIG" - 1);
+-	    string_len += sizeof "POSIX_V6_LPBIG_OFFBIG" - 1;
+-	  }
+-#endif
+-	restenvs[string_len++] = '\0';
+-	string = restenvs;
+-      }
++	{
++	  if (string_len)
++	    restenvs[string_len++] = '\n';
++	  memcpy (restenvs + string_len, "POSIX_V6_LPBIG_OFFBIG",
++		  sizeof "POSIX_V6_LPBIG_OFFBIG" - 1);
++	  string_len += sizeof "POSIX_V6_LPBIG_OFFBIG" - 1;
++	}
++#endif
++      restenvs[string_len++] = '\0';
++      string = restenvs;
+       break;
+ 
+     case _CS_V5_WIDTH_RESTRICTED_ENVS:
+@@ -179,59 +174,55 @@ confstr (name, buf, len)
+ 	 wint_t types are no greater than the width of type long.
+ 
+ 	 Currently this means all environment which the system allows.  */
+-      {
+-	char restenvs[4 * sizeof "XBS5_LPBIG_OFFBIG"];
+-
+-	string_len = 0;
++      string_len = 0;
+ #ifndef _XBS5_ILP32_OFF32
+-	if (__sysconf (_SC_XBS5_ILP32_OFF32) > 0)
++      if (__sysconf (_SC_XBS5_ILP32_OFF32) > 0)
+ #endif
+ #if !defined _XBS5_ILP32_OFF32 || _XBS5_ILP32_OFF32 > 0
+-	  {
+-	    memcpy (restenvs + string_len, "XBS5_ILP32_OFF32",
+-		    sizeof "XBS5_ILP32_OFF32" - 1);
+-	    string_len += sizeof "XBS5_ILP32_OFF32" - 1;
+-	  }
++	{
++	  memcpy (restenvs + string_len, "XBS5_ILP32_OFF32",
++		  sizeof "XBS5_ILP32_OFF32" - 1);
++	  string_len += sizeof "XBS5_ILP32_OFF32" - 1;
++	}
+ #endif
+ #ifndef _XBS5_ILP32_OFFBIG
+-	if (__sysconf (_SC_XBS5_ILP32_OFFBIG) > 0)
++      if (__sysconf (_SC_XBS5_ILP32_OFFBIG) > 0)
+ #endif
+ #if !defined _XBS5_ILP32_OFFBIG || _XBS5_ILP32_OFFBIG > 0
+-	  {
+-	    if (string_len)
+-	      restenvs[string_len++] = '\n';
+-	    memcpy (restenvs + string_len, "XBS5_ILP32_OFFBIG",
+-		    sizeof "XBS5_ILP32_OFFBIG" - 1);
+-	    string_len += sizeof "XBS5_ILP32_OFFBIG" - 1;
+-	  }
++	{
++	  if (string_len)
++	    restenvs[string_len++] = '\n';
++	  memcpy (restenvs + string_len, "XBS5_ILP32_OFFBIG",
++		  sizeof "XBS5_ILP32_OFFBIG" - 1);
++	  string_len += sizeof "XBS5_ILP32_OFFBIG" - 1;
++	}
+ #endif
+ #ifndef _XBS5_LP64_OFF64
+-	if (__sysconf (_SC_XBS5_LP64_OFF64) > 0)
++      if (__sysconf (_SC_XBS5_LP64_OFF64) > 0)
+ #endif
+ #if !defined _XBS5_LP64_OFF64 || _XBS5_LP64_OFF64 > 0
+-	  {
+-	    if (string_len)
+-	      restenvs[string_len++] = '\n';
+-	    memcpy (restenvs + string_len, "XBS5_LP64_OFF64",
+-		    sizeof "XBS5_LP64_OFF64" - 1);
+-	    string_len += sizeof "XBS5_LP64_OFF64" - 1;
+-	  }
++	{
++	  if (string_len)
++	    restenvs[string_len++] = '\n';
++	  memcpy (restenvs + string_len, "XBS5_LP64_OFF64",
++		  sizeof "XBS5_LP64_OFF64" - 1);
++	  string_len += sizeof "XBS5_LP64_OFF64" - 1;
++	}
+ #endif
+ #ifndef _XBS5_LPBIG_OFFBIG
+-	if (__sysconf (_SC_XBS5_LPBIG_OFFBIG) > 0)
++      if (__sysconf (_SC_XBS5_LPBIG_OFFBIG) > 0)
+ #endif
+ #if !defined _XBS5_LPBIG_OFFBIG || _XBS5_LPBIG_OFFBIG > 0
+-	  {
+-	    if (string_len)
+-	      restenvs[string_len++] = '\n';
+-	    memcpy (restenvs + string_len, "XBS5_LPBIG_OFFBIG",
+-		    sizeof "XBS5_LPBIG_OFFBIG" - 1);
+-	    string_len += sizeof "XBS5_LPBIG_OFFBIG" - 1;
+-	  }
+-#endif
+-	restenvs[string_len++] = '\0';
+-	string = restenvs;
+-      }
++	{
++	  if (string_len)
++	    restenvs[string_len++] = '\n';
++	  memcpy (restenvs + string_len, "XBS5_LPBIG_OFFBIG",
++		  sizeof "XBS5_LPBIG_OFFBIG" - 1);
++	  string_len += sizeof "XBS5_LPBIG_OFFBIG" - 1;
++	}
++#endif
++      restenvs[string_len++] = '\0';
++      string = restenvs;
+       break;
+ 
+     case _CS_XBS5_ILP32_OFF32_CFLAGS:

Deleted: glibc-2.15-confstr-strdup.patch
===================================================================
--- glibc-2.15-confstr-strdup.patch	2012-03-29 03:43:53 UTC (rev 154483)
+++ glibc-2.15-confstr-strdup.patch	2012-03-29 05:42:38 UTC (rev 154484)
@@ -1,31 +0,0 @@
-diff --git a/posix/confstr.c b/posix/confstr.c
-index 3c9566d..3ba9e5a 100644
---- a/posix/confstr.c
-+++ b/posix/confstr.c
-@@ -104,7 +104,7 @@ confstr (name, buf, len)
- 	  }
- #endif
- 	restenvs[string_len++] = '\0';
--	string = restenvs;
-+	string = strdup(restenvs);
-       }
-       break;
- 
-@@ -167,7 +167,7 @@ confstr (name, buf, len)
- 	  }
- #endif
- 	restenvs[string_len++] = '\0';
--	string = restenvs;
-+	string = strdup(restenvs);
-       }
-       break;
- 
-@@ -230,7 +230,7 @@ confstr (name, buf, len)
- 	  }
- #endif
- 	restenvs[string_len++] = '\0';
--	string = restenvs;
-+	string = strdup(restenvs);
-       }
-       break;
- 

Modified: glibc-__i686.patch
===================================================================
--- glibc-__i686.patch	2012-03-29 03:43:53 UTC (rev 154483)
+++ glibc-__i686.patch	2012-03-29 05:42:38 UTC (rev 154484)
@@ -1,13 +1,31 @@
-diff -Naur glibc-old//sysdeps/i386/Makefile glibc//sysdeps/i386/Makefile
---- glibc-old//sysdeps/i386/Makefile	2010-03-18 11:52:30.000000000 +1000
-+++ glibc//sysdeps/i386/Makefile	2010-04-16 15:05:50.000000000 +1000
-@@ -1,6 +1,7 @@
- # The mpn functions need a #define for asm syntax flavor.
--# Every i386 port in use uses gas syntax (I think).
--asm-CPPFLAGS += -DGAS_SYNTAX
-+# Every i386 port in use uses gas syntax (I think).  Don't replace
-+# __i686 in __i686.get_pc_thunk.bx.
-+asm-CPPFLAGS += -DGAS_SYNTAX  -U __i686
- 
- # The i386 `long double' is a distinct type we support.
- long-double-fcts = yes
+diff --git a/nptl/sysdeps/pthread/pt-initfini.c b/nptl/sysdeps/pthread/pt-initfini.c
+index 9c00dc0..f5d4df8 100644
+--- a/nptl/sysdeps/pthread/pt-initfini.c
++++ b/nptl/sysdeps/pthread/pt-initfini.c
+@@ -45,6 +45,11 @@
+ /* Embed an #include to pull in the alignment and .end directives. */
+ asm ("\n#include \"defs.h\"");
+
++asm ("\n#if defined __i686 && defined __ASSEMBLER__");
++asm ("\n#undef __i686");
++asm ("\n#define __i686 __i686");
++asm ("\n#endif");
++
+ /* The initial common code ends here. */
+ asm ("\n/*@HEADER_ENDS*/");
+
+diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h
+index 64ef400..726b1df 100644
+--- a/sysdeps/unix/sysv/linux/i386/sysdep.h
++++ b/sysdeps/unix/sysv/linux/i386/sysdep.h
+@@ -29,6 +29,10 @@
+ #include <dl-sysdep.h>
+ #include <tls.h>
+
++#if defined __i686 && defined __ASSEMBLER__
++#undef __i686
++#define __i686 __i686
++#endif
+
+ /* For Linux we can use the system call table in the header file
+        /usr/include/asm/unistd.h




More information about the arch-commits mailing list