This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

fix build on Free/OpenBSD arm


hi,

the following patch fixes the build of libffi on at least OpenBSD and
FreeBSD. it was originally submitted by Björn König on:
http://www.freebsd.org/cgi/query-pr.cgi?pr=122398

cheers,
jasper

-- 
"Intelligence should guide our actions, but in harmony with the
  texture of the situation at hand"
        -- Francisco Varela


Fix build on certain arm platforms, such as Free/OpenBSD.

--- src/arm/sysv.S.orig	Sun Oct  4 14:10:33 2009
+++ src/arm/sysv.S	Mon Oct  5 07:19:28 2009
@@ -90,13 +90,6 @@
 # define call_reg(x)	mov	lr, pc ; mov	pc, x
 #endif
 
-/* Conditionally compile unwinder directives.  */
-#ifdef __ARM_EABI__
-#define UNWIND
-#else
-#define UNWIND @
-#endif	
-
 	
 #if defined(__thumb__) && !defined(__THUMB_INTERWORK__)
 .macro	ARM_FUNC_START name
@@ -108,7 +101,6 @@
 	bx	pc
 	nop
 	.arm
-	UNWIND .fnstart
 /* A hook to tell gdb that we've switched to ARM mode.  Also used to call
    directly from other local arm routines.  */
 _L__\name:		
@@ -119,7 +111,6 @@ _L__\name:		
 	.align 0
 	.arm
 	ENTRY(\name)
-	UNWIND .fnstart
 .endm
 #endif
 
@@ -152,11 +143,8 @@ _L__\name:		
 ARM_FUNC_START ffi_call_SYSV
 	@ Save registers
         stmfd	sp!, {r0-r3, fp, lr}
-	UNWIND .save	{r0-r3, fp, lr}
 	mov	fp, sp
 
-	UNWIND .setfp	fp, sp
-
 	@ Make room for all of the new args.
 	sub	sp, fp, r2
 
@@ -226,7 +214,6 @@ LSYM(Lepilogue):
 	RETLDM	"r0-r3,fp"
 
 .ffi_call_SYSV_end:
-	UNWIND .fnend
         .size    CNAME(ffi_call_SYSV),.ffi_call_SYSV_end-CNAME(ffi_call_SYSV)
 
 /*
@@ -238,12 +225,9 @@ LSYM(Lepilogue):
 */
 
 ARM_FUNC_START ffi_closure_SYSV
-	UNWIND .pad #16
 	add	ip, sp, #16
 	stmfd	sp!, {ip, lr}
-	UNWIND .save	{r0, lr}
 	add	r2, sp, #8
-	.pad #16
 	sub	sp, sp, #16
 	str	sp, [sp, #8]
 	add	r1, sp, #8
@@ -298,7 +282,6 @@ ARM_FUNC_START ffi_closure_SYSV
 #endif
 
 .ffi_closure_SYSV_end:
-	UNWIND .fnend
         .size    CNAME(ffi_closure_SYSV),.ffi_closure_SYSV_end-CNAME(ffi_closure_SYSV)
 
 #if defined __ELF__ && defined __linux__


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]