Skip to content

Commit 42aaded

Browse files
author
Paul Monson
committed
clean up libffi for arm changes
1 parent d160812 commit 42aaded

15 files changed

+414
-1472
lines changed

.appveyor.yml

+21-7
Original file line numberDiff line numberDiff line change
@@ -8,40 +8,54 @@ shallow_clone: true
88
# 32- and 64-bit clang/mingw
99
# and perhaps more.
1010

11-
image: Visual Studio 2013
11+
image: Visual Studio 2017
1212
platform:
1313
- x64
14+
- x86
15+
- arm
1416

1517
environment:
1618
global:
1719
CYG_ROOT: C:/cygwin
1820
CYG_CACHE: C:/cygwin/var/cache/setup
1921
CYG_MIRROR: http://mirrors.kernel.org/sourceware/cygwin/
2022
matrix:
21-
- VSVER: 12
23+
- VSVER: 15
2224

2325
install:
2426
- ps: >-
2527
If ($env:Platform -Match "x86") {
2628
$env:VCVARS_PLATFORM="x86"
27-
$env:BUILD="x86-pc-cygwin"
28-
$env:HOST="x86-pc-windows"
29+
$env:BUILD="i686-pc-cygwin"
30+
$env:HOST="i686-pc-cygwin"
31+
$env:MSVCC="/cygdrive/c/projects/libffi/msvcc.sh"
32+
$env:SRC_ARCHITECTURE="x86"
33+
} ElseIf ($env:Platform -Match "arm") {
34+
$env:VCVARS_PLATFORM="x86_arm"
35+
$env:BUILD="i686-pc-cygwin"
36+
$env:HOST="arm-w32-cygwin"
37+
$env:MSVCC="/cygdrive/c/projects/libffi/msvcc.sh -marm"
38+
$env:SRC_ARCHITECTURE="arm"
2939
} Else {
3040
$env:VCVARS_PLATFORM="amd64"
3141
$env:BUILD="x86_64-w64-cygwin"
3242
$env:HOST="x86_64-w64-cygwin"
43+
$env:ASSEMBLER="/cygdrive/c/projects/libffi/msvcc.sh -m64"
44+
$env:SRC_ARCHITECTURE="x86"
3345
}
3446
- 'appveyor DownloadFile https://cygwin.com/setup-x86.exe -FileName setup.exe'
3547
- 'setup.exe -qnNdO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_CACHE%" -P dejagnu >NUL'
3648
- '%CYG_ROOT%/bin/bash -lc "cygcheck -dc cygwin"'
49+
- echo call VsDevCmd to set VS150COMNTOOLS
50+
- call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat"
3751
- ps: $env:VSCOMNTOOLS=(Get-Content ("env:VS" + "$env:VSVER" + "0COMNTOOLS"))
3852
- echo "Using Visual Studio %VSVER%.0 at %VSCOMNTOOLS%"
39-
- call "%VSCOMNTOOLS%\..\..\VC\vcvarsall.bat" %VCVARS_PLATFORM%
53+
- call "%VSCOMNTOOLS%..\..\vc\Auxiliary\Build\vcvarsall.bat" %VCVARS_PLATFORM%
4054

4155
build_script:
4256
- c:\cygwin\bin\sh -lc "(cd $OLDPWD; ./autogen.sh;)"
43-
- c:\cygwin\bin\sh -lc "(cd $OLDPWD; ./configure CC='/cygdrive/c/projects/libffi/msvcc.sh -m64' CXX='/cygdrive/c/projects/libffi/msvcc.sh -m64' LD='link' CPP='cl -nologo -EP' CXXCPP='cl -nologo -EP' CPPFLAGS='-DFFI_BUILDING_DLL' AR='/cygdrive/c/projects/libffi/.travis/ar-lib lib' NM='dumpbin -symbols' STRIP=':' --build=$BUILD --host=$HOST;)"
44-
- c:\cygwin\bin\sh -lc "(cd $OLDPWD; cp src/x86/ffitarget.h include; make; find .;)"
57+
- c:\cygwin\bin\sh -lc "(cd $OLDPWD; ./configure CC='%MSVCC%' CXX='%MSVCC%' LD='link' CPP='cl -nologo -EP' CXXCPP='cl -nologo -EP' CPPFLAGS='-DFFI_BUILDING_DLL' AR='/cygdrive/c/projects/libffi/.travis/ar-lib lib' NM='dumpbin -symbols' STRIP=':' --build=$BUILD --host=$HOST;)"
58+
- c:\cygwin\bin\sh -lc "(cd $OLDPWD; cp src/%SRC_ARCHITECTURE%/ffitarget.h include; make; find .;)"
4559
- c:\cygwin\bin\sh -lc "(cd $OLDPWD; cp `find . -name 'libffi-?.dll'` $HOST/testsuite/; make check; cat `find ./ -name libffi.log`)"
4660

4761
# FIXME: "make check" currently fails. It just looks like msvcc needs

.gitattributes

-3
This file was deleted.

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,5 @@ src/arm/trampoline.S
3838
**/texinfo.tex
3939

4040
x86_64-w64-cygwin
41-
i686-pc-cygwin
41+
i686-pc-cygwin
42+
arm-w32-cygwin

Makefile.am

+1
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ EXTRA_libffi_la_SOURCES = \
8282
src/alpha/ffi.c src/alpha/osf.S \
8383
src/arc/ffi.c src/arc/arcompact.S \
8484
src/arm/ffi.c src/arm/sysv.S \
85+
src/arm/ffi.c src/arm/sysv_msvc_arm32.S \
8586
src/avr32/ffi.c src/avr32/sysv.S \
8687
src/bfin/ffi.c src/bfin/sysv.S \
8788
src/cris/ffi.c src/cris/sysv.S \

README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ tested:
5656
| ARC | Linux | GCC |
5757
| ARM | Linux | GCC |
5858
| ARM | iOS | GCC |
59+
| ARM | Windows | MSVC |
5960
| AVR32 | Linux | GCC |
6061
| Blackfin | uClinux | GCC |
6162
| HPPA | HPUX | GCC |
@@ -190,13 +191,16 @@ History
190191

191192
See the git log for details at http://github.com/libffi/libffi.
192193

193-
3.3 TBD
194+
3.4 TBD
194195
Add RISC-V support.
195196
New API in support of GO closures.
196197
Default to Microsoft's 64 bit long double ABI with Visual C++.
197198
GNU compiler uses 80 bits (128 in memory) FFI_GNUW64 ABI.
198199
Many new tests cases and bug fixes.
199200

201+
3.3 Mar-05-19
202+
Add Windows 32-bit arm support.
203+
200204
3.2.1 Nov-12-14
201205
Build fix for non-iOS AArch64 targets.
202206

configure.host

+8
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ case "${host}" in
2323
SOURCES="ffi.c arcompact.S"
2424
;;
2525

26+
arm*-*-cygwin* | arm*-*-mingw* | arm*-*-win* )
27+
TARGET=ARM_WIN32; TARGETDIR=arm
28+
MSVC=1
29+
;;
30+
2631
arm*-*-*)
2732
TARGET=ARM; TARGETDIR=arm
2833
SOURCES="ffi.c sysv.S"
@@ -242,6 +247,9 @@ esac
242247

243248
# ... but some of the cases above share configury.
244249
case "${TARGET}" in
250+
ARM_WIN32)
251+
SOURCES="ffi.c sysv_msvc_arm32.S"
252+
;;
245253
MIPS)
246254
SOURCES="ffi.c o32.S n32.S"
247255
;;

0 commit comments

Comments
 (0)