patches/glibc/ports-2.12.1/120-i386-x86_64-revert-clone-cfi.patch
author Michael Hope <michael.hope@linaro.org>
Wed Oct 19 15:27:32 2011 +1300 (2011-10-19)
changeset 2739 f320e22f2cba
permissions -rw-r--r--
arch: add softfp support

Some architectures support a mixed hard/soft floating point, where
the compiler emits hardware floating point instructions, but passes
the operands in core (aka integer) registers.

For example, ARM supports this mode (to come in the next changeset).

Add support for softfp cross compilers to the GCC and GLIBC
configuration. Needed for Ubuntu and other distros that are softfp.

Signed-off-by: Michael Hope <michael.hope@linaro.org>
[yann.morin.1998@anciens.enib.fr: split the original patch]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
yann@2437
     1
revert cfi additions to clone on i386/x86_64 to workaround problems in
yann@2437
     2
gcc's unwinder code.  this is not a bug in glibc, it triggers problems
yann@2437
     3
elsewhere.  this cfi code does not gain us a whole lot anyways.
yann@2437
     4
yann@2437
     5
http://gcc.gnu.org/ml/gcc/2006-12/msg00293.html
yann@2437
     6
yann@2437
     7
Index: sysdeps/unix/sysv/linux/i386/clone.S
yann@2437
     8
===================================================================
yann@2437
     9
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/i386/clone.S,v
yann@2437
    10
retrieving revision 1.27
yann@2437
    11
retrieving revision 1.26
yann@2437
    12
diff -u -p -r1.27 -r1.26
yann@2437
    13
yann@2437
    14
diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/i386/clone.S glibc-2.12.1/sysdeps/unix/sysv/linux/i386/clone.S
yann@2437
    15
--- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/i386/clone.S	2006-12-04 00:12:36.000000000 +0100
yann@2437
    16
+++ glibc-2.12.1/sysdeps/unix/sysv/linux/i386/clone.S	2009-11-13 00:49:45.000000000 +0100
yann@2437
    17
@@ -120,9 +120,6 @@
yann@2437
    18
 	ret
yann@2437
    19
 
yann@2437
    20
 L(thread_start):
yann@2437
    21
-	cfi_startproc;
yann@2437
    22
-	/* Clearing frame pointer is insufficient, use CFI.  */
yann@2437
    23
-	cfi_undefined (eip);
yann@2437
    24
 	/* Note: %esi is zero.  */
yann@2437
    25
 	movl	%esi,%ebp	/* terminate the stack frame */
yann@2437
    26
 #ifdef RESET_PID
yann@2437
    27
@@ -155,7 +152,6 @@
yann@2437
    28
 	jmp	L(haspid)
yann@2437
    29
 	.previous
yann@2437
    30
 #endif
yann@2437
    31
-	cfi_endproc;
yann@2437
    32
 
yann@2437
    33
 	cfi_startproc
yann@2437
    34
 PSEUDO_END (BP_SYM (__clone))
yann@2437
    35
diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/x86_64/clone.S glibc-2.12.1/sysdeps/unix/sysv/linux/x86_64/clone.S
yann@2437
    36
--- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/x86_64/clone.S	2006-12-04 00:12:36.000000000 +0100
yann@2437
    37
+++ glibc-2.12.1/sysdeps/unix/sysv/linux/x86_64/clone.S	2009-11-13 00:49:45.000000000 +0100
yann@2437
    38
@@ -89,9 +89,6 @@
yann@2437
    39
 	ret
yann@2437
    40
 
yann@2437
    41
 L(thread_start):
yann@2437
    42
-	cfi_startproc;
yann@2437
    43
-	/* Clearing frame pointer is insufficient, use CFI.  */
yann@2437
    44
-	cfi_undefined (rip);
yann@2437
    45
 	/* Clear the frame pointer.  The ABI suggests this be done, to mark
yann@2437
    46
 	   the outermost frame obviously.  */
yann@2437
    47
 	xorl	%ebp, %ebp
yann@2437
    48
@@ -116,7 +113,6 @@
yann@2437
    49
 	/* Call exit with return value from function call. */
yann@2437
    50
 	movq	%rax, %rdi
yann@2437
    51
 	call	HIDDEN_JUMPTARGET (_exit)
yann@2437
    52
-	cfi_endproc;
yann@2437
    53
 
yann@2437
    54
 	cfi_startproc;
yann@2437
    55
 PSEUDO_END (BP_SYM (__clone))