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

Allan McRae allan at archlinux.org
Thu Jan 26 00:13:54 UTC 2012


    Date: Wednesday, January 25, 2012 @ 19:13:54
  Author: allan
Revision: 147651

upgpkg: glibc 2.15-4

fix Xen AVX issue, more extreme fix for multi-arch math issues, add regex fix

Added:
  glibc/trunk/glibc-2.15-regex.patch
  glibc/trunk/glibc-2.15-strcmp-disable-avx.patch
Modified:
  glibc/trunk/PKGBUILD
Deleted:
  glibc/trunk/glibc-2.15-math64crash.patch

-------------------------------------+
 PKGBUILD                            |   24 +++-
 glibc-2.15-math64crash.patch        |  184 ----------------------------------
 glibc-2.15-regex.patch              |   16 ++
 glibc-2.15-strcmp-disable-avx.patch |   48 ++++++++
 4 files changed, 81 insertions(+), 191 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2012-01-26 00:01:59 UTC (rev 147650)
+++ PKGBUILD	2012-01-26 00:13:54 UTC (rev 147651)
@@ -6,7 +6,7 @@
 
 pkgname=glibc
 pkgver=2.15
-pkgrel=3
+pkgrel=4
 _glibcdate=20111227
 pkgdesc="GNU C Library"
 arch=('i686' 'x86_64')
@@ -29,9 +29,10 @@
         glibc-2.14-revert-4768ae77.patch
         glibc-2.14-reexport-rpc-interface.patch
         glibc-2.14-reinstall-nis-rpc-headers.patch
+        glibc-2.15-regex.patch
         glibc-2.15-lddebug-scopes.patch
         glibc-2.15-revert-c5a0802a.patch
-        glibc-2.15-math64crash.patch
+        glibc-2.15-strcmp-disable-avx.patch
         nscd
         locale.gen.txt
         locale-gen)
@@ -44,9 +45,10 @@
          '7da8c554a3b591c7401d7023b1928afc'
          'c5de2a946215d647c8af5432ec4b0da0'
          '55febbb72139ac7b65757df085024b83'
+         'b3526cbd5e29773560dba725db99af5a'
          '3c219ddfb619b6df903cac4cc42c611d'
          '7ae3e426251ae33e73dbad71f9c91378'
-         'dc7550e659ddd685bd78a930d15a01f2'
+         '7a44dd821835e4984aa75ad44fad3baf'
          'b587ee3a70c9b3713099295609afde49'
          '07ac979b6ab5eeb778d55f041529d623'
          '476e9113489f93b348b21e144b6a8fcf')
@@ -94,6 +96,10 @@
   # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=bdd816a3 (only fedora branch...)
   patch -Np1 -i ${srcdir}/glibc-2.14-reinstall-nis-rpc-headers.patch
 
+  # Fix up regcomp/regexec
+  # http://sourceware.org/git/?p=glibc.git;a=commit;h=2ba92745
+  patch -Np1 -i ${srcdir}/glibc-2.15-regex.patch
+
   # propriety nvidia crash - https://bugzilla.redhat.com/show_bug.cgi?id=737223 
   # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=0c95ab64  (only fedora branch...)
   patch -Np1 -i ${srcdir}/glibc-2.15-lddebug-scopes.patch
@@ -102,10 +108,14 @@
   # https://bugzilla.redhat.com/show_bug.cgi?id=769421
   patch -Np1 -i ${srcdir}/glibc-2.15-revert-c5a0802a.patch
 
-  # revert optimized math routines that can cause crashes (FS#27736, FS#27743)
-  # obviously not a real fix...
-  patch -Np1 -i ${srcdir}/glibc-2.15-math64crash.patch
+  # Disable AVX in strcmp as this breaks Xen
+  # http://sourceware.org/bugzilla/show_bug.cgi?id=13583
+  patch -Np1 -i ${srcdir}/glibc-2.15-strcmp-disable-avx.patch
 
+  # "revert" optimized math routines that can cause crashes (FS#27736, FS#27743)
+  # http://sourceware.org/bugzilla/show_bug.cgi?id=13618
+  rm sysdeps/x86_64/fpu/multiarch/*
+
   install -dm755 ${pkgdir}/etc
   touch ${pkgdir}/etc/ld.so.conf
 
@@ -132,7 +142,7 @@
       --with-tls --with-__thread \
       --enable-bind-now --without-gd \
       --without-cvs --disable-profile \
-      --enable-multi-arch
+      --enable-multi-arch      
 
   # build libraries with hardening disabled
   echo "build-programs=no" >> configparms

Deleted: glibc-2.15-math64crash.patch
===================================================================
--- glibc-2.15-math64crash.patch	2012-01-26 00:01:59 UTC (rev 147650)
+++ glibc-2.15-math64crash.patch	2012-01-26 00:13:54 UTC (rev 147651)
@@ -1,184 +0,0 @@
-diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
-index be68903..a032da8 100644
---- a/sysdeps/x86_64/fpu/multiarch/Makefile
-+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
-@@ -1,5 +1,5 @@
- ifeq ($(subdir),math)
--libm-sysdep_routines += s_floor-c s_ceil-c s_floorf-c s_ceilf-c \
-+libm-sysdep_routines += s_floorf-c s_ceilf-c \
- 			s_rint-c s_rintf-c s_nearbyint-c s_nearbyintf-c
- 
- ifeq ($(have-mfma4),yes)
-diff --git a/sysdeps/x86_64/fpu/multiarch/s_ceil-c.c b/sysdeps/x86_64/fpu/multiarch/s_ceil-c.c
-deleted file mode 100644
-index 6a5ea3f..0000000
---- a/sysdeps/x86_64/fpu/multiarch/s_ceil-c.c
-+++ /dev/null
-@@ -1,2 +0,0 @@
--#define __ceil __ceil_c
--#include <sysdeps/ieee754/dbl-64/wordsize-64/s_ceil.c>
-diff --git a/sysdeps/x86_64/fpu/multiarch/s_ceil.S b/sysdeps/x86_64/fpu/multiarch/s_ceil.S
-deleted file mode 100644
-index d0f8da3..0000000
---- a/sysdeps/x86_64/fpu/multiarch/s_ceil.S
-+++ /dev/null
-@@ -1,40 +0,0 @@
--/* Copyright (C) 2011 Free Software Foundation, Inc.
--   This file is part of the GNU C Library.
--   Contributed by Ulrich Drepper <drepper at gmail.come>, 2011.
--
--   The GNU C Library is free software; you can redistribute it and/or
--   modify it under the terms of the GNU Lesser General Public
--   License as published by the Free Software Foundation; either
--   version 2.1 of the License, or (at your option) any later version.
--
--   The GNU C Library is distributed in the hope that it will be useful,
--   but WITHOUT ANY WARRANTY; without even the implied warranty of
--   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
--   Lesser General Public License for more details.
--
--   You should have received a copy of the GNU Lesser General Public
--   License along with the GNU C Library; if not, write to the Free
--   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
--   02111-1307 USA.  */
--
--#include <machine/asm.h>
--#include <init-arch.h>
--
--
--ENTRY(__ceil)
--	.type	__ceil, @gnu_indirect_function
--	call	__get_cpu_features at plt
--	movq	%rax, %rdx
--	leaq	__ceil_sse41(%rip), %rax
--	testl	$bit_SSE4_1, CPUID_OFFSET+index_SSE4_1(%rdx)
--	jnz	2f
--	leaq	__ceil_c(%rip), %rax
--2:	ret
--END(__ceil)
--weak_alias (__ceil, ceil)
--
--
--ENTRY(__ceil_sse41)
--	roundsd	$2, %xmm0, %xmm0
--	ret
--END(__ceil_sse41)
-diff --git a/sysdeps/x86_64/fpu/multiarch/s_floor-c.c b/sysdeps/x86_64/fpu/multiarch/s_floor-c.c
-deleted file mode 100644
-index 68733b6..0000000
---- a/sysdeps/x86_64/fpu/multiarch/s_floor-c.c
-+++ /dev/null
-@@ -1,3 +0,0 @@
--#undef __floor
--#define __floor __floor_c
--#include <sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c>
-diff --git a/sysdeps/x86_64/fpu/multiarch/s_floor.S b/sysdeps/x86_64/fpu/multiarch/s_floor.S
-deleted file mode 100644
-index 514ea95..0000000
---- a/sysdeps/x86_64/fpu/multiarch/s_floor.S
-+++ /dev/null
-@@ -1,40 +0,0 @@
--/* Copyright (C) 2011 Free Software Foundation, Inc.
--   This file is part of the GNU C Library.
--   Contributed by Ulrich Drepper <drepper at gmail.come>, 2011.
--
--   The GNU C Library is free software; you can redistribute it and/or
--   modify it under the terms of the GNU Lesser General Public
--   License as published by the Free Software Foundation; either
--   version 2.1 of the License, or (at your option) any later version.
--
--   The GNU C Library is distributed in the hope that it will be useful,
--   but WITHOUT ANY WARRANTY; without even the implied warranty of
--   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
--   Lesser General Public License for more details.
--
--   You should have received a copy of the GNU Lesser General Public
--   License along with the GNU C Library; if not, write to the Free
--   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
--   02111-1307 USA.  */
--
--#include <machine/asm.h>
--#include <init-arch.h>
--
--
--ENTRY(__floor)
--	.type	__floor, @gnu_indirect_function
--	call	__get_cpu_features at plt
--	movq	%rax, %rdx
--	leaq	__floor_sse41(%rip), %rax
--	testl	$bit_SSE4_1, CPUID_OFFSET+index_SSE4_1(%rdx)
--	jnz	2f
--	leaq	__floor_c(%rip), %rax
--2:	ret
--END(__floor)
--weak_alias (__floor, floor)
--
--
--ENTRY(__floor_sse41)
--	roundsd	$1, %xmm0, %xmm0
--	ret
--END(__floor_sse41)
-diff --git a/sysdeps/x86_64/fpu/multiarch/s_sin.c b/sysdeps/x86_64/fpu/multiarch/s_sin.c
-deleted file mode 100644
-index 1ba9dbc..0000000
---- a/sysdeps/x86_64/fpu/multiarch/s_sin.c
-+++ /dev/null
-@@ -1,31 +0,0 @@
--#if defined HAVE_FMA4_SUPPORT || defined HAVE_AVX_SUPPORT
--# include <init-arch.h>
--# include <math.h>
--# undef NAN
--
--extern double __cos_sse2 (double);
--extern double __sin_sse2 (double);
--extern double __cos_avx (double);
--extern double __sin_avx (double);
--# ifdef HAVE_FMA4_SUPPORT
--extern double __cos_fma4 (double);
--extern double __sin_fma4 (double);
--# else
--#  undef HAS_FMA4
--#  define HAS_FMA4 0
--#  define __cos_fma4 ((void *) 0)
--#  define __sin_fma4 ((void *) 0)
--# endif
--
--libm_ifunc (__cos, HAS_FMA4 ? __cos_fma4 : HAS_AVX ? __cos_avx : __cos_sse2);
--weak_alias (__cos, cos)
--
--libm_ifunc (__sin, HAS_FMA4 ? __sin_fma4 : HAS_AVX ? __sin_avx : __sin_sse2);
--weak_alias (__sin, sin)
--
--# define __cos __cos_sse2
--# define __sin __sin_sse2
--#endif
--
--
--#include <sysdeps/ieee754/dbl-64/s_sin.c>
-diff --git a/sysdeps/x86_64/fpu/multiarch/s_tan.c b/sysdeps/x86_64/fpu/multiarch/s_tan.c
-deleted file mode 100644
-index 8f6601e..0000000
---- a/sysdeps/x86_64/fpu/multiarch/s_tan.c
-+++ /dev/null
-@@ -1,21 +0,0 @@
--#if defined HAVE_FMA4_SUPPORT || defined HAVE_AVX_SUPPORT
--# include <init-arch.h>
--# include <math.h>
--
--extern double __tan_sse2 (double);
--extern double __tan_avx (double);
--# ifdef HAVE_FMA4_SUPPORT
--extern double __tan_fma4 (double);
--# else
--#  undef HAS_FMA4
--#  define HAS_FMA4 0
--#  define __tan_fma4 ((void *) 0)
--# endif
--
--libm_ifunc (tan, HAS_FMA4 ? __tan_fma4 : HAS_AVX ? __tan_avx : __tan_sse2);
--
--# define tan __tan_sse2
--#endif
--
--
--#include <sysdeps/ieee754/dbl-64/s_tan.c>

Added: glibc-2.15-regex.patch
===================================================================
--- glibc-2.15-regex.patch	                        (rev 0)
+++ glibc-2.15-regex.patch	2012-01-26 00:13:54 UTC (rev 147651)
@@ -0,0 +1,16 @@
+diff --git a/posix/regex_internal.c b/posix/regex_internal.c
+index bc19243..124f8cc 100644
+--- a/posix/regex_internal.c
++++ b/posix/regex_internal.c
+@@ -868,7 +868,7 @@ re_string_peek_byte_case (const re_string_t *pstr, int idx)
+ }
+ 
+ static unsigned char
+-internal_function __attribute ((pure))
++internal_function
+ re_string_fetch_byte_case (re_string_t *pstr)
+ {
+   if (BE (!pstr->mbs_allocated, 1))
+-- 
+1.7.3.4
+

Added: glibc-2.15-strcmp-disable-avx.patch
===================================================================
--- glibc-2.15-strcmp-disable-avx.patch	                        (rev 0)
+++ glibc-2.15-strcmp-disable-avx.patch	2012-01-26 00:13:54 UTC (rev 147651)
@@ -0,0 +1,48 @@
+diff --git a/sysdeps/x86_64/multiarch/strcmp.S b/sysdeps/x86_64/multiarch/strcmp.S
+index f93c83d..d8aa889 100644
+--- a/sysdeps/x86_64/multiarch/strcmp.S
++++ b/sysdeps/x86_64/multiarch/strcmp.S
+@@ -105,11 +105,6 @@ ENTRY(__strcasecmp)
+ 	jne	1f
+ 	call	__init_cpu_features
+ 1:
+-#  ifdef HAVE_AVX_SUPPORT
+-	leaq	__strcasecmp_avx(%rip), %rax
+-	testl	$bit_AVX, __cpu_features+CPUID_OFFSET+index_AVX(%rip)
+-	jnz	2f
+-#  endif
+ 	leaq	__strcasecmp_sse42(%rip), %rax
+ 	testl	$bit_SSE4_2, __cpu_features+CPUID_OFFSET+index_SSE4_2(%rip)
+ 	jnz	2f
+@@ -128,11 +123,6 @@ ENTRY(__strncasecmp)
+ 	jne	1f
+ 	call	__init_cpu_features
+ 1:
+-#  ifdef HAVE_AVX_SUPPORT
+-	leaq	__strncasecmp_avx(%rip), %rax
+-	testl	$bit_AVX, __cpu_features+CPUID_OFFSET+index_AVX(%rip)
+-	jnz	2f
+-#  endif
+ 	leaq	__strncasecmp_sse42(%rip), %rax
+ 	testl	$bit_SSE4_2, __cpu_features+CPUID_OFFSET+index_SSE4_2(%rip)
+ 	jnz	2f
+@@ -152,19 +142,6 @@ weak_alias (__strncasecmp, strncasecmp)
+ # include "strcmp-sse42.S"
+ 
+ 
+-# ifdef HAVE_AVX_SUPPORT
+-#  if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+-#   define LABEL(l) .L##l##_avx
+-#   define GLABEL(l) l##_avx
+-#   define USE_AVX 1
+-#   undef STRCMP_SSE42
+-#   define STRCMP_SSE42 STRCMP_AVX
+-#   define SECTION avx
+-#   include "strcmp-sse42.S"
+-#  endif
+-# endif
+-
+-
+ # undef ENTRY
+ # define ENTRY(name) \
+ 	.type STRCMP_SSE2, @function; \




More information about the arch-commits mailing list