aboutsummaryrefslogtreecommitdiff
path: root/libffi
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2021-03-28 14:48:17 +0100
committerIain Sandoe <iain@sandoe.co.uk>2023-10-22 19:30:02 +0100
commit6a6d3817afa02bbcd2388c8e005da6faf88932f1 (patch)
treef5997d899baddd1788da7a28f48bfbaa278355f9 /libffi
parent829b0c4cbabbe5056b79a8a1ec4cd9e9d928a5fb (diff)
downloadgcc-6a6d3817afa02bbcd2388c8e005da6faf88932f1.zip
gcc-6a6d3817afa02bbcd2388c8e005da6faf88932f1.tar.gz
gcc-6a6d3817afa02bbcd2388c8e005da6faf88932f1.tar.bz2
Config,Darwin: Allow for configuring Darwin to use embedded runpath.
Recent Darwin versions place contraints on the use of run paths specified in environment variables. This breaks some assumptions in the GCC build. This change allows the user to configure a Darwin build to use '@rpath/libraryname.dylib' in library names and then to add an embedded runpath to executables (and libraries with dependents). The embedded runpath is added by default unless the user adds '-nodefaultrpaths' to the link line. For an installed compiler, it means that any executable built with that compiler will reference the runtimes installed with the compiler (equivalent to hard-coding the library path into the name of the library). During build-time configurations any "-B" entries will be added to the runpath thus the newly-built libraries will be found by exes. Since the install name is set in libtool, that decision needs to be available here (but might also cause dependent ones in Makefiles, so we need to export a conditional). This facility is not available for Darwin 8 or earlier, however the existing environment variable runpath does work there. We default this on for systems where the external DYLD_LIBRARY_PATH does not work and off for Darwin 8 or earlier. For systems that can use either method, if the value is unset, we use the default (which is currently DYLD_LIBRARY_PATH). ChangeLog: * configure: Regenerate. * configure.ac: Do not add default runpaths to GCC exes when we are building -static-libstdc++/-static-libgcc (the default). * libtool.m4: Add 'enable-darwin-at-runpath'. Act on the enable flag to alter Darwin libraries to use @rpath names. gcc/ChangeLog: * aclocal.m4: Regenerate. * configure: Regenerate. * configure.ac: Handle Darwin rpaths. * config/darwin.h: Handle Darwin rpaths. * config/darwin.opt: Handle Darwin rpaths. * Makefile.in: Handle Darwin rpaths. gcc/ada/ChangeLog: * gcc-interface/Makefile.in: Handle Darwin rpaths. gcc/jit/ChangeLog: * Make-lang.in: Handle Darwin rpaths. libatomic/ChangeLog: * Makefile.am: Handle Darwin rpaths. * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac: Handle Darwin rpaths. libbacktrace/ChangeLog: * configure: Regenerate. * configure.ac: Handle Darwin rpaths. libcc1/ChangeLog: * configure: Regenerate. libffi/ChangeLog: * Makefile.am: Handle Darwin rpaths. * Makefile.in: Regenerate. * configure: Regenerate. libgcc/ChangeLog: * config/t-slibgcc-darwin: Generate libgcc_s with an @rpath name. * config.host: Handle Darwin rpaths. libgfortran/ChangeLog: * Makefile.am: Handle Darwin rpaths. * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac: Handle Darwin rpaths libgm2/ChangeLog: * Makefile.am: Handle Darwin rpaths. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * configure.ac: Handle Darwin rpaths. * libm2cor/Makefile.am: Handle Darwin rpaths. * libm2cor/Makefile.in: Regenerate. * libm2iso/Makefile.am: Handle Darwin rpaths. * libm2iso/Makefile.in: Regenerate. * libm2log/Makefile.am: Handle Darwin rpaths. * libm2log/Makefile.in: Regenerate. * libm2min/Makefile.am: Handle Darwin rpaths. * libm2min/Makefile.in: Regenerate. * libm2pim/Makefile.am: Handle Darwin rpaths. * libm2pim/Makefile.in: Regenerate. libgomp/ChangeLog: * Makefile.am: Handle Darwin rpaths. * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac: Handle Darwin rpaths libitm/ChangeLog: * Makefile.am: Handle Darwin rpaths. * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac: Handle Darwin rpaths. libobjc/ChangeLog: * configure: Regenerate. * configure.ac: Handle Darwin rpaths. libphobos/ChangeLog: * configure: Regenerate. * configure.ac: Handle Darwin rpaths. * libdruntime/Makefile.am: Handle Darwin rpaths. * libdruntime/Makefile.in: Regenerate. * src/Makefile.am: Handle Darwin rpaths. * src/Makefile.in: Regenerate. libquadmath/ChangeLog: * Makefile.am: Handle Darwin rpaths. * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac: Handle Darwin rpaths. libsanitizer/ChangeLog: * asan/Makefile.am: Handle Darwin rpaths. * asan/Makefile.in: Regenerate. * configure: Regenerate. * hwasan/Makefile.am: Handle Darwin rpaths. * hwasan/Makefile.in: Regenerate. * lsan/Makefile.am: Handle Darwin rpaths. * lsan/Makefile.in: Regenerate. * tsan/Makefile.am: Handle Darwin rpaths. * tsan/Makefile.in: Regenerate. * ubsan/Makefile.am: Handle Darwin rpaths. * ubsan/Makefile.in: Regenerate. libssp/ChangeLog: * Makefile.am: Handle Darwin rpaths. * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac: Handle Darwin rpaths. libstdc++-v3/ChangeLog: * configure: Regenerate. * configure.ac: Handle Darwin rpaths. * src/Makefile.am: Handle Darwin rpaths. * src/Makefile.in: Regenerate. libvtv/ChangeLog: * configure: Regenerate. * configure.ac: Handle Darwin rpaths. lto-plugin/ChangeLog: * configure: Regenerate. * configure.ac: Handle Darwin rpaths. zlib/ChangeLog: * configure: Regenerate. * configure.ac: Handle Darwin rpaths.
Diffstat (limited to 'libffi')
-rw-r--r--libffi/Makefile.am7
-rw-r--r--libffi/Makefile.in6
-rwxr-xr-xlibffi/configure132
-rw-r--r--libffi/configure.ac1
-rw-r--r--libffi/doc/version.texi4
5 files changed, 138 insertions, 12 deletions
diff --git a/libffi/Makefile.am b/libffi/Makefile.am
index 2259ddb..2c5b74d 100644
--- a/libffi/Makefile.am
+++ b/libffi/Makefile.am
@@ -214,7 +214,12 @@ libffi.map: $(top_srcdir)/libffi.map.in
$(COMPILE) -D$(TARGET) -DGENERATE_LIBFFI_MAP \
-E -x assembler-with-cpp -o $@ $(top_srcdir)/libffi.map.in
-libffi_la_LDFLAGS = -no-undefined $(libffi_version_info) $(libffi_version_script) $(LTLDFLAGS) $(AM_LTLDFLAGS)
+if ENABLE_DARWIN_AT_RPATH
+libffi_darwin_rpath = -Wl,-rpath,@loader_path
+endif
+libffi_la_LDFLAGS = -no-undefined $(libffi_version_info) \
+ $(libffi_version_script) $(LTLDFLAGS) $(AM_LTLDFLAGS) \
+ $(libffi_darwin_rpath)
libffi_la_DEPENDENCIES = $(libffi_la_LIBADD) $(libffi_version_dep)
AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
diff --git a/libffi/Makefile.in b/libffi/Makefile.in
index 1d936b5..71469f7 100644
--- a/libffi/Makefile.in
+++ b/libffi/Makefile.in
@@ -597,7 +597,11 @@ AM_CFLAGS = -Wall -g -fexceptions $(CET_FLAGS) $(am__append_2)
@LIBFFI_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBFFI_BUILD_VERSIONED_SHLIB_TRUE@libffi_version_dep = libffi.map
@LIBFFI_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBFFI_BUILD_VERSIONED_SHLIB_TRUE@libffi_version_dep = libffi.map-sun
libffi_version_info = -version-info `grep -v '^\#' $(srcdir)/libtool-version`
-libffi_la_LDFLAGS = -no-undefined $(libffi_version_info) $(libffi_version_script) $(LTLDFLAGS) $(AM_LTLDFLAGS)
+@ENABLE_DARWIN_AT_RPATH_TRUE@libffi_darwin_rpath = -Wl,-rpath,@loader_path
+libffi_la_LDFLAGS = -no-undefined $(libffi_version_info) \
+ $(libffi_version_script) $(LTLDFLAGS) $(AM_LTLDFLAGS) \
+ $(libffi_darwin_rpath)
+
libffi_la_DEPENDENCIES = $(libffi_la_LIBADD) $(libffi_version_dep)
AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
AM_CCASFLAGS = $(AM_CPPFLAGS) $(CET_FLAGS)
diff --git a/libffi/configure b/libffi/configure
index 9eac9c9..2905455 100755
--- a/libffi/configure
+++ b/libffi/configure
@@ -667,6 +667,8 @@ MAINT
MAINTAINER_MODE_FALSE
MAINTAINER_MODE_TRUE
READELF
+ENABLE_DARWIN_AT_RPATH_FALSE
+ENABLE_DARWIN_AT_RPATH_TRUE
CXXCPP
CPP
OTOOL64
@@ -810,6 +812,7 @@ with_pic
enable_fast_install
with_gnu_ld
enable_libtool_lock
+enable_darwin_at_rpath
enable_maintainer_mode
enable_pax_emutramp
enable_debug
@@ -1465,6 +1468,9 @@ Optional Features:
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
+ --enable-darwin-at-rpath
+ install libraries with @rpath/library-name, requires
+ rpaths to be added to executables
--enable-maintainer-mode
enable make rules and dependencies not useful (and
sometimes confusing) to the casual installer
@@ -7835,7 +7841,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
# darwin 5.x (macOS 10.1) onwards we only need to adjust when the
# deployment target is forced to an earlier version.
case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in
- UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*)
+ UNSET,*-darwin[89]*|UNSET,*-darwin[12][0-9]*)
;;
10.[012][,.]*)
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
@@ -9809,6 +9815,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
darwin* | rhapsody*)
+
+ # Publish an arg to allow the user to select that Darwin host (and target)
+ # libraries should be given install-names like @rpath/libfoo.dylib. This
+ # requires that the user of the library then adds an 'rpath' to the DSO that
+ # needs access.
+ # NOTE: there are defaults below, for systems that support rpaths. The person
+ # configuring can override the defaults for any system version that supports
+ # them - they are, however, forced off for system versions without support.
+ # Check whether --enable-darwin-at-rpath was given.
+if test "${enable_darwin_at_rpath+set}" = set; then :
+ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then
+ # This is not supported before macOS 10.5 / Darwin9.
+ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in
+ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5
+$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;}
+ enable_darwin_at_rpath=no
+ ;;
+ esac
+ fi
+else
+ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in
+ # As above, before 10.5 / Darwin9 this does not work.
+ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*)
+ enable_darwin_at_rpath=no
+ ;;
+
+ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use
+ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key
+ # system executables (e.g. /bin/sh). Force rpaths on for these systems.
+ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5
+$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;}
+ enable_darwin_at_rpath=yes
+ ;;
+ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can
+ # work with either DYLD_LIBRARY_PATH or embedded rpaths.
+
+ esac
+
+fi
+
+
archive_cmds_need_lc=no
hardcode_direct=no
hardcode_automatic=yes
@@ -9826,9 +9875,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
esac
if test "$_lt_dar_can_shared" = "yes"; then
output_verbose_link_cmd=func_echo_all
- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ _lt_install_name='\$rpath/\$soname'
+ if test "x$enable_darwin_at_rpath" = "xyes"; then
+ _lt_install_name='@rpath/\$soname'
+ fi
+ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}"
module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}"
module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
else
@@ -11634,7 +11687,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11637 "configure"
+#line 11690 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11740,7 +11793,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11743 "configure"
+#line 11796 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12616,6 +12669,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
darwin* | rhapsody*)
+
+ # Publish an arg to allow the user to select that Darwin host (and target)
+ # libraries should be given install-names like @rpath/libfoo.dylib. This
+ # requires that the user of the library then adds an 'rpath' to the DSO that
+ # needs access.
+ # NOTE: there are defaults below, for systems that support rpaths. The person
+ # configuring can override the defaults for any system version that supports
+ # them - they are, however, forced off for system versions without support.
+ # Check whether --enable-darwin-at-rpath was given.
+if test "${enable_darwin_at_rpath+set}" = set; then :
+ enableval=$enable_darwin_at_rpath; if test "x$enable_darwin_at_rpath" = "xyes"; then
+ # This is not supported before macOS 10.5 / Darwin9.
+ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in
+ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&5
+$as_echo "$as_me: WARNING: Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)" >&2;}
+ enable_darwin_at_rpath=no
+ ;;
+ esac
+ fi
+else
+ case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in
+ # As above, before 10.5 / Darwin9 this does not work.
+ UNSET,darwin[4-8]*|UNSET,rhapsody*|10.[0-4][,.]*)
+ enable_darwin_at_rpath=no
+ ;;
+
+ # We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use
+ # of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key
+ # system executables (e.g. /bin/sh). Force rpaths on for these systems.
+ UNSET,darwin1[5-9]*|UNSET,darwin2*|10.1[1-9][,.]*|1[1-9].*[,.]* )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&5
+$as_echo "$as_me: @rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)" >&6;}
+ enable_darwin_at_rpath=yes
+ ;;
+ # NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can
+ # work with either DYLD_LIBRARY_PATH or embedded rpaths.
+
+ esac
+
+fi
+
+
archive_cmds_need_lc_CXX=no
hardcode_direct_CXX=no
hardcode_automatic_CXX=yes
@@ -12633,12 +12729,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
esac
if test "$_lt_dar_can_shared" = "yes"; then
output_verbose_link_cmd=func_echo_all
- archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ _lt_install_name='\$rpath/\$soname'
+ if test "x$enable_darwin_at_rpath" = "xyes"; then
+ _lt_install_name='@rpath/\$soname'
+ fi
+ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}"
module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
- archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}"
module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
if test "$lt_cv_apple_cc_single_mod" != "yes"; then
- archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+ _lt_install_name='\$rpath/\$soname'
+ if test "x$enable_darwin_at_rpath" = "xyes"; then
+ _lt_install_name='@rpath/\$soname'
+ fi
+ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring${_lt_dsymutil}"
archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
fi
@@ -15008,6 +15112,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# Only expand once:
+ if test x$enable_darwin_at_rpath = xyes; then
+ ENABLE_DARWIN_AT_RPATH_TRUE=
+ ENABLE_DARWIN_AT_RPATH_FALSE='#'
+else
+ ENABLE_DARWIN_AT_RPATH_TRUE='#'
+ ENABLE_DARWIN_AT_RPATH_FALSE=
+fi
+
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}readelf", so it can be a program name with args.
@@ -17153,6 +17265,10 @@ if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then
as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then
+ as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
diff --git a/libffi/configure.ac b/libffi/configure.ac
index 014d89d..716f20a 100644
--- a/libffi/configure.ac
+++ b/libffi/configure.ac
@@ -55,6 +55,7 @@ AC_SUBST(CET_FLAGS)
AM_PROG_AS
AM_PROG_CC_C_O
AC_PROG_LIBTOOL
+AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes])
AC_CHECK_TOOL(READELF, readelf)
diff --git a/libffi/doc/version.texi b/libffi/doc/version.texi
index f2b741e..6261b21 100644
--- a/libffi/doc/version.texi
+++ b/libffi/doc/version.texi
@@ -1,4 +1,4 @@
-@set UPDATED 27 June 2021
-@set UPDATED-MONTH June 2021
+@set UPDATED 31 August 2022
+@set UPDATED-MONTH August 2022
@set EDITION 3.4.2
@set VERSION 3.4.2