$OpenBSD: patch-src_arm_sysv_S,v 1.2 2009/10/05 20:50:07 jasper Exp $ As our as(1) is too old, and cannot deal with UNWIND. This patch fixes build on arm. It's taken from FreeBSD and can be removed when binutils is updated. --- src/arm/sysv.S.orig Mon Jun 29 13:08:57 2009 +++ src/arm/sysv.S Mon Jun 29 13:11:11 2009 @@ -83,13 +83,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 @@ -101,7 +94,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: @@ -112,7 +104,6 @@ _L__\name: .align 0 .arm ENTRY(\name) - UNWIND .fnstart .endm #endif @@ -145,11 +136,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 @@ -219,7 +207,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) /* @@ -231,12 +218,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 @@ -291,7 +275,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__