The patch allowed the build to continue.

Packages so far:
op1bsd63snap$ pkg_info
autoconf-2.69p2     automatically configure source code on many Un*x platforms
bison-3.0.4p0       GNU parser generator
bzip2-1.0.6p8       block-sorting file compressor, unencumbered
gettext-0.19.8.1p1  GNU gettext runtime libraries and programs
help2man-1.47.5     generates simple manual pages from program output
libiconv-1.14p3     character set conversion library
libsigsegv-2.12     library for handling page faults in user mode
m4-1.4.18           GNU m4
metaauto-1.0p1      wrapper for gnu auto*
pcre-8.41           perl-compatible regular expression library
xz-5.2.3p0          LZMA compression and decompression tools
op1bsd63snap$ pkg_info
autoconf-2.69p2     automatically configure source code on many Un*x platforms
bison-3.0.4p0       GNU parser generator
bzip2-1.0.6p8       block-sorting file compressor, unencumbered
gettext-0.19.8.1p1  GNU gettext runtime libraries and programs
help2man-1.47.5     generates simple manual pages from program output
libiconv-1.14p3     character set conversion library
libsigsegv-2.12     library for handling page faults in user mode
m4-1.4.18           GNU m4
metaauto-1.0p1      wrapper for gnu auto*
pcre-8.41           perl-compatible regular expression library
sqlite3-3.22.0p0    embedded SQL implementation
xz-5.2.3p0          LZMA compression and decompression tools
op1bsd63snap$ pkg_info
autoconf-2.69p2     automatically configure source code on many Un*x platforms
bison-3.0.4p0       GNU parser generator
bzip2-1.0.6p8       block-sorting file compressor, unencumbered
gettext-0.19.8.1p1  GNU gettext runtime libraries and programs
help2man-1.47.5     generates simple manual pages from program output
libffi-3.2.1p4      Foreign Function Interface
libiconv-1.14p3     character set conversion library
libsigsegv-2.12     library for handling page faults in user mode
m4-1.4.18           GNU m4
metaauto-1.0p1      wrapper for gnu auto*
pcre-8.41           perl-compatible regular expression library
sqlite3-3.22.0p0    embedded SQL implementation
xz-5.2.3p0          LZMA compression and decompression tools
op1bsd63snap$

-----Original Message-----
From: owner-po...@openbsd.org <owner-po...@openbsd.org> On Behalf Of Stuart 
Henderson
Sent: April 13, 2018 2:45 PM
To: s_g...@telus.net
Cc: 'Peter Hessler' <phess...@openbsd.org>; ports@openbsd.org; Jasper Lievisse 
Adriaanse <jas...@humppa.nl>
Subject: Re: php on arm

On 2018/04/13 14:22, s_g...@telus.net wrote:
> cc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -I. 
> -I../include -Iinclude -I../src -O2 -pipe -MT src/arm/sysv.lo -MD -MP 
> -MF src/arm/.deps/sysv.Tpo -c ../src/arm/sysv.S -fPIC -DPIC -o 
> src/arm/.libs/sysv.o
> ../src/arm/sysv.S:363:2: error: invalid instruction, did you mean: fldmiax?
>  fldmiadgt ip, {d0-d7}
>  ^
> ../src/arm/sysv.S:412:2: error: invalid instruction, did you mean: fstmiax?
>  fstmiadeq r2, {d0-d3}
>  ^
> /tmp/sysv-897c4d.s:263:2: error: invalid instruction  fstmfdd sp!, 
> {d0-d7}  ^
> /tmp/sysv-897c4d.s:313:2: error: invalid instruction, did you mean: fldmiax?
>  fldmiad sp, {d0-d1}
>  ^
> /tmp/sysv-897c4d.s:316:2: error: invalid instruction, did you mean: fldmiax?
>  fldmiad sp, {d0-d3}
>  ^
> Error while executing cc -DHAVE_CONFIG_H -I. -I.. -I. -I../include 
> -Iinclude -I../src -I. -I../include -Iinclude -I../src -O2 -pipe -MT 
> src/arm/sysv.lo -MD -MP -MF src/arm/.deps/sysv.Tpo -c 
> ../src/arm/sysv.S -fPIC -DPIC -o src/arm/.libs/sysv.o
> *** Error 2 in arm-unknown-openbsd6.3 (Makefile:1337 
> 'src/arm/sysv.lo')
> *** Error 1 in arm-unknown-openbsd6.3 (Makefile:1621 'all-recursive')
> *** Error 1 in arm-unknown-openbsd6.3 (Makefile:730 'all')
> *** Error 1 in /usr/ports/pobj/libffi-3.2.1/libffi-3.2.1 (Makefile:616 
> 'all')

Please apply this diff to ports/devel/libffi, clean and retry and report back 
whether you're able to successfully build libffi.
(Don't wait until you have other pieces for php built before letting us know 
about libffi, please).

jasper, ok with you if it works? (there is finally a 3.3.0 rc now but probably 
better to avoid going down that route for now just to fix this :)



Index: patches/patch-src_arm_sysv_S
===================================================================
RCS file: /cvs/ports/devel/libffi/patches/patch-src_arm_sysv_S,v
retrieving revision 1.7
diff -u -p -r1.7 patch-src_arm_sysv_S
--- patches/patch-src_arm_sysv_S        22 Jan 2018 06:28:00 -0000      1.7
+++ patches/patch-src_arm_sysv_S        13 Apr 2018 21:41:29 -0000
@@ -1,10 +1,24 @@
-$OpenBSD: patch-src_arm_sysv_S,v 1.7 2018/01/22 06:28:00 bcallah Exp $
+$OpenBSD$
 
+From FreeBSD, see also
 https://github.com/libffi/libffi/issues/162
+https://github.com/libffi/libffi/issues/191
+
+This code is completely different in the 3.3 branch so can probably 
+just be removed straight off when a release has been from there.
 
 Index: src/arm/sysv.S
 --- src/arm/sysv.S.orig
 +++ src/arm/sysv.S
+@@ -360,7 +360,7 @@ ARM_FUNC_START(ffi_call_VFP)
+       cmp     r0, #3
+       sub     ip, fp, #64
+       flddle  d0, [ip]
+-      fldmiadgt       ip, {d0-d7}
++      vldmiagt        ip, {d0-d7}
+ 
+ LSYM(Lbase_args):
+       @ move first 4 parameters in registers
 @@ -396,7 +396,7 @@ LSYM(Lbase_args):
        beq     LSYM(Lepilogue_vfp)
  
@@ -14,3 +28,34 @@ Index: src/arm/sysv.S
        beq     LSYM(Lepilogue_vfp)
  
        cmp     r3, #FFI_TYPE_FLOAT
+@@ -409,7 +409,7 @@ LSYM(Lbase_args):
+ 
+       cmp     r3, #FFI_TYPE_STRUCT_VFP_FLOAT
+       cmpne   r3, #FFI_TYPE_STRUCT_VFP_DOUBLE
+-      fstmiadeq       r2, {d0-d3}
++      vstmiaeq        r2, {d0-d3}
+ 
+ LSYM(Lepilogue_vfp):
+       RETLDM  "r0-r3,fp"
+@@ -420,7 +420,7 @@ LSYM(Lepilogue_vfp):
+ 
+ 
+ ARM_FUNC_START(ffi_closure_VFP)
+-      fstmfdd sp!, {d0-d7}
++      vstmdb  sp!, {d0-d7}
+       @ r0-r3, then d0-d7
+       UNWIND .pad #80
+       add     ip, sp, #80
+@@ -470,10 +470,10 @@ ARM_FUNC_START(ffi_closure_VFP)
+       ldmia   sp, {r0, r1}
+       b       .Lclosure_epilogue_vfp
+ .Lretfloat_struct_vfp:
+-      fldmiad sp, {d0-d1}
++      vldmia  sp, {d0-d1}
+       b       .Lclosure_epilogue_vfp
+ .Lretdouble_struct_vfp:
+-      fldmiad sp, {d0-d3}
++      vldmia  sp, {d0-d3}
+       b       .Lclosure_epilogue_vfp
+ 
+ .ffi_closure_VFP_end:


Reply via email to