From 6b35b69a287d79e7844bd53e725f632d0dae6def Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Fri, 15 Oct 2010 18:00:12 +0000 Subject: [PATCH] Workaround to overcome the glibc/gcc bug: http://sources.redhat.com/bugzilla/show_bug.cgi?id=12123 I also fixed a wrong comment I had committed in the previous commit. svn path=/nixpkgs/branches/stdenv-updates/; revision=24306 --- pkgs/development/libraries/glibc-2.12/common.nix | 5 ++++- .../glibc-2.12/disable-strstr-sse42.patch | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/libraries/glibc-2.12/disable-strstr-sse42.patch diff --git a/pkgs/development/libraries/glibc-2.12/common.nix b/pkgs/development/libraries/glibc-2.12/common.nix index 4dd157ea95e..dfffafe6edd 100644 --- a/pkgs/development/libraries/glibc-2.12/common.nix +++ b/pkgs/development/libraries/glibc-2.12/common.nix @@ -75,8 +75,11 @@ stdenv.mkDerivation ({ /* Allow nixos and nix handle the locale-archive. */ ./nix-locale-archive.patch - /* Allow nixos and nix handle the locale-archive. */ + /* A fix for a glibc nscd linking bug, reported upstream already.*/ ./nscd-ssp-linking.patch + + /* Workaround for a glibc bug reported upstraem already */ + ./disable-strstr-sse42.patch ]; postPatch = '' diff --git a/pkgs/development/libraries/glibc-2.12/disable-strstr-sse42.patch b/pkgs/development/libraries/glibc-2.12/disable-strstr-sse42.patch new file mode 100644 index 00000000000..0c473305039 --- /dev/null +++ b/pkgs/development/libraries/glibc-2.12/disable-strstr-sse42.patch @@ -0,0 +1,14 @@ +Workaround for http://sources.redhat.com/bugzilla/show_bug.cgi?id=12123 + +diff --git a/sysdeps/i386/i686/multiarch/strstr-c.c b/sysdeps/i386/i686/multiarch/strstr-c.c +index efa9f78..cd34a88 100644 +--- a/sysdeps/i386/i686/multiarch/strstr-c.c ++++ b/sysdeps/i386/i686/multiarch/strstr-c.c +@@ -10,4 +10,6 @@ + extern char *__strstr_sse42 (const char *, const char *) attribute_hidden; + extern __typeof (__strstr_ia32) __strstr_ia32 attribute_hidden; + +-libc_ifunc (strstr, HAS_SSE4_2 ? __strstr_sse42 : __strstr_ia32); ++// Disabled any sse42, due to a bug: ++// http://sources.redhat.com/bugzilla/show_bug.cgi?id=12123 ++libc_ifunc (strstr, __strstr_ia32);