From 11a08e7f9f6660363429c3f20edc835ab9c6e78a Mon Sep 17 00:00:00 2001 From: Stefan Fiedler Date: Fri, 23 Nov 2007 08:44:28 +0000 Subject: [PATCH] Stefan Fiedler: glibc27: add patch that fixes build for i586 targets [2007111508432317550] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@8886 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- .../glibc27/glibc-2.7-i586-mem_chk.patch.x86 | 130 ++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 package/base/glibc/glibc27/glibc-2.7-i586-mem_chk.patch.x86 diff --git a/package/base/glibc/glibc27/glibc-2.7-i586-mem_chk.patch.x86 b/package/base/glibc/glibc27/glibc-2.7-i586-mem_chk.patch.x86 new file mode 100644 index 000000000..1d7431488 --- /dev/null +++ b/package/base/glibc/glibc27/glibc-2.7-i586-mem_chk.patch.x86 @@ -0,0 +1,130 @@ +Copied from http://forums.gentoo.org/viewtopic-p-4476881.html + +================================================================ +@ -0,0 +1,117 @@ +diff -urN glibc-2.7.orig/sysdeps/i386/i586/memcpy_chk.S +libc-2.7/sysdeps/i386/i586/memcpy_chk.S +--- glibc-2.7.orig/sysdeps/i386/i586/memcpy_chk.S 1970-01-01 +1:00:00.000000000 +0100 ++++ glibc-2.7/sysdeps/i386/i586/memcpy_chk.S 2005-05-14 19:52:13.000000000 +0200 +@@ -0,0 +1,35 @@ ++/* Checking memcpy for i686. ++ Copyright (C) 2004 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 ++ 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 ++#include "asm-syntax.h" ++ ++#ifndef PIC ++ /* For libc.so this is defined in memcpy.S. ++ For libc.a, this is a separate source to avoid ++ memcpy bringing in __chk_fail and all routines ++ it calls. */ ++ .text ++ENTRY (__memcpy_chk) ++ movl 12(%esp), %eax ++ cmpl %eax, 16(%esp) ++ jb __chk_fail ++ jmp memcpy ++END (__memcpy_chk) ++#endif +diff -urN glibc-2.7.orig/sysdeps/i386/i586/mempcpy_chk.S +libc-2.7/sysdeps/i386/i586/mempcpy_chk.S +--- glibc-2.7.orig/sysdeps/i386/i586/mempcpy_chk.S 1970-01-01 +1:00:00.000000000 +0100 ++++ glibc-2.7/sysdeps/i386/i586/mempcpy_chk.S 2004-10-18 06:17:11.000000000 +0200 +@@ -0,0 +1,35 @@ ++/* Checking mempcpy for x86-64. ++ Copyright (C) 2004 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 ++ 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 ++#include "asm-syntax.h" ++ ++#ifndef PIC ++ /* For libc.so this is defined in mempcpy.S. ++ For libc.a, this is a separate source to avoid ++ mempcpy bringing in __chk_fail and all routines ++ it calls. */ ++ .text ++ENTRY (__mempcpy_chk) ++ movl 12(%esp), %eax ++ cmpl %eax, 16(%esp) ++ jb __chk_fail ++ jmp mempcpy ++END (__mempcpy_chk) ++#endif +diff -urN glibc-2.7.orig/sysdeps/i386/i586/memset_chk.S +libc-2.7/sysdeps/i386/i586/memset_chk.S +--- glibc-2.7.orig/sysdeps/i386/i586/memset_chk.S 1970-01-01 +1:00:00.000000000 +0100 ++++ glibc-2.7/sysdeps/i386/i586/memset_chk.S 2005-03-01 01:13:36.000000000 +0100 +@@ -0,0 +1,35 @@ ++/* Checking memset for i686. ++ Copyright (C) 2004, 2005 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 ++ 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 ++#include "asm-syntax.h" ++ ++#ifndef PIC ++ /* For libc.so this is defined in memset.S. ++ For libc.a, this is a separate source to avoid ++ memset bringing in __chk_fail and all routines ++ it calls. */ ++ .text ++ENTRY (__memset_chk) ++ movl 12(%esp), %eax ++ cmpl %eax, 16(%esp) ++ jb __chk_fail ++ jmp memset ++END (__memset_chk) ++#endif