Skip to content

Commit f01e5d6

Browse files
committed
release: revert to libffi 3.3 for some versions of windows builds
1 parent c79775b commit f01e5d6

File tree

1 file changed

+45
-15
lines changed

1 file changed

+45
-15
lines changed

contrib/release/build.sh

Lines changed: 45 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -777,30 +777,60 @@ linux*)
777777
;;
778778
esac
779779

780+
# libffi-3.2.1
781+
# mingw-w64-gcc-5.2
782+
# mingw-w64-gcc-8.1
783+
784+
# libffi-3.3
785+
# winlibs-gcc-9.3.0
786+
787+
# libffi-3.4.4
788+
# mingw-w64-gcc-11.2.0
789+
# mingw-w64-gcc-12.2.0
790+
# mingw-w64-gcc-13.2.0
791+
792+
if [ -z "$libffi_version" ]; then
793+
case "$target" in
794+
win32-mingworg)
795+
libffi_version="3.3"
796+
libffi_dir="https://github.com/libffi/libffi/releases/download/v${libffi_version}"
797+
;;
798+
esac
799+
fi
800+
801+
if [ -z "$libffi_version" ]; then
802+
case "$named_recipe" in
803+
# older mingw-w64 packages are distributed with headers for libffi-3.2.1
804+
# but libffi-3.3 below should work for them also
805+
#-mingw-w64-gcc-5.2.0|-gcc-5.2.0|-mingw-w64-gcc-8.1.0|-gcc-8.1.0)
806+
# # libffi sources https://github.com/libffi/libffi/releases/download/v3.3/libffi-3.2.1.tar.gz.
807+
# libffi_version="3.2.1"
808+
# libffi_dir="https://github.com/libffi/libffi/releases/download/v${libffi_version}"
809+
# ;;
810+
-mingw-w64-gcc-5.2.0|-gcc-5.2.0)
811+
# - https://github.com/libffi/libffi/releases/download/v3.3/libffi-3.3.tar.gz.
812+
libffi_version="3.3"
813+
libffi_dir="https://github.com/libffi/libffi/releases/download/v${libffi_version}"
814+
;;
815+
*)
816+
# - https://github.com/libffi/libffi/releases/download/v3.4.4/libffi-3.4.4.tar.gz
817+
libffi_version="3.4.4"
818+
libffi_dir="https://github.com/libffi/libffi/releases/download/v${libffi_version}"
819+
;;
820+
esac
821+
fi
822+
780823
case $fbtarget in
781824
win32)
782-
# libffi sources https://github.com/libffi/libffi/releases/download/v3.3/libffi-3.3.tar.gz.
783-
libffi_title=libffi-3.3
825+
libffi_title=libffi-${libffi_version}
784826
libffi_package="${libffi_title}.tar.gz"
785-
download "$libffi_package" "ftp://sourceware.org/pub/libffi/$libffi_package"
827+
download "$libffi_package" "${libffi_dir}/$libffi_package"
786828
echo "extracting $libffi_package"
787829
tar xf "../input/$libffi_package"
788830
;;
789-
790831
win64)
791-
# libffi sources:
792-
# - ftp://sourceware.org/pub/libffi/libffi-3.4.3.tar.gz
793-
# - https://github.com/libffi/libffi/releases/download/v3.4.4/libffi-3.4.4.tar.gz
794-
libffi_version=3.4.4
795832
libffi_title=libffi-${libffi_version}
796833
libffi_package="${libffi_title}.tar.gz"
797-
798-
# sourware:
799-
# libffi_dir="ftp://sourceware.org/pub/libffi/"
800-
801-
# github:
802-
libffi_dir="https://github.com/libffi/libffi/releases/download/v${libffi_version}/"
803-
804834
download "$libffi_package" "${libffi_dir}${libffi_package}"
805835
echo "extracting ${libffi_package}"
806836
tar xf "../input/${libffi_package}"

0 commit comments

Comments
 (0)