Skip to content

Commit 636ba17

Browse files
committed
deps: update libffi to 3.4.4
1 parent 9c279e4 commit 636ba17

File tree

412 files changed

+19350
-36929
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

412 files changed

+19350
-36929
lines changed

deps/libffi/.appveyor.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
shallow_clone: true
2+
3+
# We're currently only testing libffi built with Microsoft's
4+
# tools.
5+
# This matrix should be expanded to include at least:
6+
# 32- and 64-bit gcc/cygwin
7+
# 32- and 64-bit gcc/mingw
8+
# 32- and 64-bit clang/mingw
9+
# and perhaps more.
10+
11+
image: Visual Studio 2017
12+
platform:
13+
- x64
14+
- x86
15+
- arm
16+
- arm64
17+
18+
configuration:
19+
- Debug
20+
- Release
21+
22+
environment:
23+
global:
24+
CYG_ROOT: C:/cygwin64
25+
CYG_CACHE: C:/cygwin64/var/cache/setup
26+
CYG_MIRROR: http://mirrors.kernel.org/sourceware/cygwin/
27+
VSVER: 15
28+
matrix:
29+
- SHARED_ARG: "--enable-shared --disable-static"
30+
- SHARED_ARG: "--enable-static --disable-shared"
31+
32+
install:
33+
- ps: >-
34+
If ($env:Platform -Match "x86") {
35+
$env:VCVARS_PLATFORM="x86"
36+
$env:BUILD="i686-pc-cygwin"
37+
$env:HOST="i686-pc-cygwin"
38+
$env:MSVCC="/cygdrive/c/projects/libffi/msvcc.sh"
39+
$env:SRC_ARCHITECTURE="x86"
40+
} ElseIf ($env:Platform -Match "arm64") {
41+
$env:VCVARS_PLATFORM="x86_arm64"
42+
$env:BUILD="i686-pc-cygwin"
43+
$env:HOST="aarch64-w64-cygwin"
44+
$env:MSVCC="/cygdrive/c/projects/libffi/msvcc.sh -marm64"
45+
$env:SRC_ARCHITECTURE="aarch64"
46+
} ElseIf ($env:Platform -Match "arm") {
47+
$env:VCVARS_PLATFORM="x86_arm"
48+
$env:BUILD="i686-pc-cygwin"
49+
$env:HOST="arm-w32-cygwin"
50+
$env:MSVCC="/cygdrive/c/projects/libffi/msvcc.sh -marm"
51+
$env:SRC_ARCHITECTURE="arm"
52+
} Else {
53+
$env:VCVARS_PLATFORM="amd64"
54+
$env:BUILD="x86_64-w64-cygwin"
55+
$env:HOST="x86_64-w64-cygwin"
56+
$env:MSVCC="/cygdrive/c/projects/libffi/msvcc.sh -m64"
57+
$env:SRC_ARCHITECTURE="x86"
58+
}
59+
If ($env:Configuration -Match "Debug") {
60+
$env:DEBUG_ARG="--enable-debug"
61+
} Else {
62+
$env:DEBUG_ARG="--disable-debug"
63+
}
64+
- 'appveyor DownloadFile https://cygwin.com/setup-x86_64.exe -FileName setup.exe'
65+
- 'setup.exe -qgnNdO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_CACHE%" -P dejagnu -P autoconf -P automake -P libtool'
66+
- '%CYG_ROOT%/bin/bash -lc "cygcheck -dc cygwin"'
67+
- echo call VsDevCmd to set VS150COMNTOOLS
68+
- call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat"
69+
- ps: $env:VSCOMNTOOLS=(Get-Content ("env:VS" + "$env:VSVER" + "0COMNTOOLS"))
70+
- echo "Using Visual Studio %VSVER%.0 at %VSCOMNTOOLS%"
71+
- call "%VSCOMNTOOLS%..\..\vc\Auxiliary\Build\vcvarsall.bat" %VCVARS_PLATFORM%
72+
73+
build_script:
74+
- c:\cygwin64\bin\sh -lc "(cd $OLDPWD; ./autogen.sh)"
75+
- c:\cygwin64\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 $DEBUG_ARG $SHARED_ARG)"
76+
- c:\cygwin64\bin\sh -lc "(cd $OLDPWD; cp src/%SRC_ARCHITECTURE%/ffitarget.h include)"
77+
- c:\cygwin64\bin\sh -lc "(cd $OLDPWD; make)"
78+
- c:\cygwin64\bin\sh -lc "(cd $OLDPWD; cp $HOST/.libs/libffi.lib $HOST/testsuite/libffi-8.lib || true)"
79+
- c:\cygwin64\bin\sh -lc "(cd $OLDPWD; cp `find . -name 'libffi-?.dll'` $HOST/testsuite/ || true)"
80+
- c:\cygwin64\bin\sh -lc "(cd $OLDPWD; TERM=none make check RUNTESTFLAGS='-v -v -v -v --target '$HOST DEJAGNU=$PWD/.appveyor/site.exp SITEDIR=$PWD/.appveyor)"
81+
82+
83+
on_finish:
84+
- c:\cygwin64\bin\sh -lc "(cd $OLDPWD; cat `find ./ -name libffi.log`)"

deps/libffi/.appveyor/site.exp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright (C) 2021 Anthony Green
2+
3+
lappend boards_dir $::env(SITEDIR)
4+
5+
verbose "Global Config File: target_triplet is $target_triplet" 1
6+
global target_list
7+
8+
case "$target_triplet" in {
9+
{ "aarch*cygwin*" } {
10+
set target_list "unix-noexec"
11+
}
12+
{ "arm*cygwin*" } {
13+
set target_list "unix-noexec"
14+
}
15+
}
16+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
load_generic_config "remote"
2+
3+
proc noexec_load { dest prog args } {
4+
return "unsupported"
5+
}
6+
7+
set_board_info protocol "noexec"

deps/libffi/.ci/ar-lib

Lines changed: 270 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,270 @@
1+
#! /bin/sh
2+
# Wrapper for Microsoft lib.exe
3+
4+
me=ar-lib
5+
scriptversion=2012-03-01.08; # UTC
6+
7+
# Copyright (C) 2010-2018 Free Software Foundation, Inc.
8+
# Written by Peter Rosin <peda@lysator.liu.se>.
9+
#
10+
# This program is free software; you can redistribute it and/or modify
11+
# it under the terms of the GNU General Public License as published by
12+
# the Free Software Foundation; either version 2, or (at your option)
13+
# any later version.
14+
#
15+
# This program is distributed in the hope that it will be useful,
16+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18+
# GNU General Public License for more details.
19+
#
20+
# You should have received a copy of the GNU General Public License
21+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
22+
23+
# As a special exception to the GNU General Public License, if you
24+
# distribute this file as part of a program that contains a
25+
# configuration script generated by Autoconf, you may include it under
26+
# the same distribution terms that you use for the rest of that program.
27+
28+
# This file is maintained in Automake, please report
29+
# bugs to <bug-automake@gnu.org> or send patches to
30+
# <automake-patches@gnu.org>.
31+
32+
33+
# func_error message
34+
func_error ()
35+
{
36+
echo "$me: $1" 1>&2
37+
exit 1
38+
}
39+
40+
file_conv=
41+
42+
# func_file_conv build_file
43+
# Convert a $build file to $host form and store it in $file
44+
# Currently only supports Windows hosts.
45+
func_file_conv ()
46+
{
47+
file=$1
48+
case $file in
49+
/ | /[!/]*) # absolute file, and not a UNC file
50+
if test -z "$file_conv"; then
51+
# lazily determine how to convert abs files
52+
case `uname -s` in
53+
MINGW*)
54+
file_conv=mingw
55+
;;
56+
CYGWIN*)
57+
file_conv=cygwin
58+
;;
59+
*)
60+
file_conv=wine
61+
;;
62+
esac
63+
fi
64+
case $file_conv in
65+
mingw)
66+
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
67+
;;
68+
cygwin)
69+
file=`cygpath -m "$file" || echo "$file"`
70+
;;
71+
wine)
72+
file=`winepath -w "$file" || echo "$file"`
73+
;;
74+
esac
75+
;;
76+
esac
77+
}
78+
79+
# func_at_file at_file operation archive
80+
# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE
81+
# for each of them.
82+
# When interpreting the content of the @FILE, do NOT use func_file_conv,
83+
# since the user would need to supply preconverted file names to
84+
# binutils ar, at least for MinGW.
85+
func_at_file ()
86+
{
87+
operation=$2
88+
archive=$3
89+
at_file_contents=`cat "$1"`
90+
eval set x "$at_file_contents"
91+
shift
92+
93+
for member
94+
do
95+
$AR -NOLOGO $operation:"$member" "$archive" || exit $?
96+
done
97+
}
98+
99+
case $1 in
100+
'')
101+
func_error "no command. Try '$0 --help' for more information."
102+
;;
103+
-h | --h*)
104+
cat <<EOF
105+
Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...]
106+
107+
Members may be specified in a file named with @FILE.
108+
EOF
109+
exit $?
110+
;;
111+
-v | --v*)
112+
echo "$me, version $scriptversion"
113+
exit $?
114+
;;
115+
esac
116+
117+
if test $# -lt 3; then
118+
func_error "you must specify a program, an action and an archive"
119+
fi
120+
121+
AR=$1
122+
shift
123+
while :
124+
do
125+
if test $# -lt 2; then
126+
func_error "you must specify a program, an action and an archive"
127+
fi
128+
case $1 in
129+
-lib | -LIB \
130+
| -ltcg | -LTCG \
131+
| -machine* | -MACHINE* \
132+
| -subsystem* | -SUBSYSTEM* \
133+
| -verbose | -VERBOSE \
134+
| -wx* | -WX* )
135+
AR="$AR $1"
136+
shift
137+
;;
138+
*)
139+
action=$1
140+
shift
141+
break
142+
;;
143+
esac
144+
done
145+
orig_archive=$1
146+
shift
147+
func_file_conv "$orig_archive"
148+
archive=$file
149+
150+
# strip leading dash in $action
151+
action=${action#-}
152+
153+
delete=
154+
extract=
155+
list=
156+
quick=
157+
replace=
158+
index=
159+
create=
160+
161+
while test -n "$action"
162+
do
163+
case $action in
164+
d*) delete=yes ;;
165+
x*) extract=yes ;;
166+
t*) list=yes ;;
167+
q*) quick=yes ;;
168+
r*) replace=yes ;;
169+
s*) index=yes ;;
170+
S*) ;; # the index is always updated implicitly
171+
c*) create=yes ;;
172+
u*) ;; # TODO: don't ignore the update modifier
173+
v*) ;; # TODO: don't ignore the verbose modifier
174+
*)
175+
func_error "unknown action specified"
176+
;;
177+
esac
178+
action=${action#?}
179+
done
180+
181+
case $delete$extract$list$quick$replace,$index in
182+
yes,* | ,yes)
183+
;;
184+
yesyes*)
185+
func_error "more than one action specified"
186+
;;
187+
*)
188+
func_error "no action specified"
189+
;;
190+
esac
191+
192+
if test -n "$delete"; then
193+
if test ! -f "$orig_archive"; then
194+
func_error "archive not found"
195+
fi
196+
for member
197+
do
198+
case $1 in
199+
@*)
200+
func_at_file "${1#@}" -REMOVE "$archive"
201+
;;
202+
*)
203+
func_file_conv "$1"
204+
$AR -NOLOGO -REMOVE:"$file" "$archive" || exit $?
205+
;;
206+
esac
207+
done
208+
209+
elif test -n "$extract"; then
210+
if test ! -f "$orig_archive"; then
211+
func_error "archive not found"
212+
fi
213+
if test $# -gt 0; then
214+
for member
215+
do
216+
case $1 in
217+
@*)
218+
func_at_file "${1#@}" -EXTRACT "$archive"
219+
;;
220+
*)
221+
func_file_conv "$1"
222+
$AR -NOLOGO -EXTRACT:"$file" "$archive" || exit $?
223+
;;
224+
esac
225+
done
226+
else
227+
$AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member
228+
do
229+
$AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
230+
done
231+
fi
232+
233+
elif test -n "$quick$replace"; then
234+
if test ! -f "$orig_archive"; then
235+
if test -z "$create"; then
236+
echo "$me: creating $orig_archive"
237+
fi
238+
orig_archive=
239+
else
240+
orig_archive=$archive
241+
fi
242+
243+
for member
244+
do
245+
case $1 in
246+
@*)
247+
func_file_conv "${1#@}"
248+
set x "$@" "@$file"
249+
;;
250+
*)
251+
func_file_conv "$1"
252+
set x "$@" "$file"
253+
;;
254+
esac
255+
shift
256+
shift
257+
done
258+
259+
if test -n "$orig_archive"; then
260+
$AR -NOLOGO -OUT:"$archive" "$orig_archive" "$@" || exit $?
261+
else
262+
$AR -NOLOGO -OUT:"$archive" "$@" || exit $?
263+
fi
264+
265+
elif test -n "$list"; then
266+
if test ! -f "$orig_archive"; then
267+
func_error "archive not found"
268+
fi
269+
$AR -NOLOGO -LIST "$archive" || exit $?
270+
fi

0 commit comments

Comments
 (0)