From cca8463eb26fd4acc357c6cd9f06a7cb1105224d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Wed, 9 Nov 2022 00:40:16 +0000 Subject: [PATCH] [Libffi] Upgrade to v3.4.4 (#5834) * [Libffi] Upgrade to v3.4.4 * [Libffi] Require GCC 6, needed for generating assembly for 32-bit Win --- L/Libffi/build_tarballs.jl | 24 +++++++------- .../patches/0001-libdir-no-touchy.patch | 31 ------------------- 2 files changed, 12 insertions(+), 43 deletions(-) delete mode 100644 L/Libffi/bundled/patches/0001-libdir-no-touchy.patch diff --git a/L/Libffi/build_tarballs.jl b/L/Libffi/build_tarballs.jl index 00f559a08f6..d43559d6f79 100644 --- a/L/Libffi/build_tarballs.jl +++ b/L/Libffi/build_tarballs.jl @@ -1,32 +1,32 @@ using BinaryBuilder name = "Libffi" -version = v"3.2.1" - +upstream_version = "3.4.4" +version = VersionNumber(upstream_version) # Collection of sources required to build libffi sources = [ - ArchiveSource("https://sourceware.org/pub/libffi/libffi-$(version).tar.gz", - "d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37"), - DirectorySource("./bundled"), + ArchiveSource("https://github.com/libffi/libffi/releases/download/v$(upstream_version)/libffi-$(upstream_version).tar.gz", + "d66c56ad259a82cf2a9dfc408b32bf5da52371500b84745f7fb8b645712df676"), ] -version = v"3.2.2" # <-- this is a lie, we need to bump the version to require julia v1.6 - # Bash recipe for building across all platforms script = raw""" cd $WORKSPACE/srcdir/libffi-*/ -atomic_patch -p1 ../patches/* update_configure_scripts -autoreconf -f -i -./configure --prefix=${prefix} --build=${MACHTYPE} --host=${target} --disable-static --enable-shared +./configure --prefix=${prefix} \ + --build=${MACHTYPE} \ + --host=${target} \ + --disable-static \ + --enable-shared \ + --disable-multi-os-directory make -j${nproc} make install """ # These are the platforms we will build for by default, unless further # platforms are passed in on the command line -platforms = supported_platforms(; experimental=true) +platforms = supported_platforms() # The products that we will ensure are always built products = [ @@ -38,4 +38,4 @@ dependencies = Dependency[ ] # Build the tarballs, and possibly a `build.jl` as well. -build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat="1.6") +build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat="1.6", preferred_gcc_version=v"6") diff --git a/L/Libffi/bundled/patches/0001-libdir-no-touchy.patch b/L/Libffi/bundled/patches/0001-libdir-no-touchy.patch deleted file mode 100644 index 52f9be08580..00000000000 --- a/L/Libffi/bundled/patches/0001-libdir-no-touchy.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- libffi-3.2.1-orig/configure.ac 2021-11-18 00:13:42.753131022 -0500 -+++ libffi-3.2.1/configure.ac 2021-11-18 00:14:43.014058771 -0500 -@@ -590,26 +590,7 @@ - AC_DEFINE(USING_PURIFY, 1, [Define this if you are using Purify and want to suppress spurious messages.]) - fi) - --# These variables are only ever used when we cross-build to X86_WIN32. --# And we only support this with GCC, so... --if test "x$GCC" = "xyes"; then -- if test -n "$with_cross_host" && -- test x"$with_cross_host" != x"no"; then -- toolexecdir="${exec_prefix}"/'$(target_alias)' -- toolexeclibdir="${toolexecdir}"/lib -- else -- toolexecdir="${libdir}"/gcc-lib/'$(target_alias)' -- toolexeclibdir="${libdir}" -- fi -- multi_os_directory=`$CC $CFLAGS -print-multi-os-directory` -- case $multi_os_directory in -- .) ;; # Avoid trailing /. -- ../*) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;; -- esac -- AC_SUBST(toolexecdir) --else -- toolexeclibdir="${libdir}" --fi -+toolexeclibdir="${libdir}" - AC_SUBST(toolexeclibdir) - - AC_CONFIG_COMMANDS(include, [test -d include || mkdir include]) -