mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
deps: update libffi to 3.6.0
PR-URL: https://github.com/nodejs/node/pull/64040 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: René <contact.9a5d6388@renegade334.me.uk> Reviewed-By: Paolo Insogna <paolo@cowtech.it>
This commit is contained in:
1 parent
9a3393d14f
commit
9761385dbd
331 files changed
+110226
-2492
No files matched your search
Vendored
+17499
File diff suppressed because it is too large.
Load diff
Vendored
+5
-4
@@ -63,7 +63,7 @@ noinst_HEADERS = src/aarch64/ffitarget.h src/aarch64/internal.h \
|
||||
src/or1k/ffitarget.h src/pa/ffitarget.h \
|
||||
src/powerpc/ffitarget.h src/powerpc/asm.h \
|
||||
src/powerpc/ffi_powerpc.h src/powerpc/internal.h \
|
||||
src/riscv/ffitarget.h \
|
||||
src/riscv/ffitarget.h src/riscv/internal.h \
|
||||
src/s390/ffitarget.h src/s390/internal.h src/sh/ffitarget.h \
|
||||
src/sh64/ffitarget.h src/sparc/ffitarget.h \
|
||||
src/sparc/internal.h src/tile/ffitarget.h src/vax/ffitarget.h \
|
||||
@@ -71,7 +71,7 @@ noinst_HEADERS = src/aarch64/ffitarget.h src/aarch64/internal.h \
|
||||
src/x86/ffitarget.h src/x86/internal.h src/x86/internal64.h \
|
||||
src/x86/asmnames.h src/xtensa/ffitarget.h src/dlmalloc.c \
|
||||
src/kvx/ffitarget.h src/kvx/asm.h \
|
||||
src/loongarch64/ffitarget.h
|
||||
src/loongarch/ffitarget.h
|
||||
|
||||
EXTRA_libffi_la_SOURCES = src/aarch64/ffi.c src/aarch64/sysv.S \
|
||||
src/aarch64/win64_armasm.S src/alpha/ffi.c src/alpha/osf.S \
|
||||
@@ -102,7 +102,7 @@ EXTRA_libffi_la_SOURCES = src/aarch64/ffi.c src/aarch64/sysv.S \
|
||||
src/x86/ffiw64.c src/x86/win64.S src/x86/ffi64.c \
|
||||
src/x86/unix64.S src/x86/sysv_intel.S src/x86/win64_intel.S \
|
||||
src/xtensa/ffi.c src/xtensa/sysv.S src/kvx/ffi.c \
|
||||
src/kvx/sysv.S src/loongarch64/ffi.c src/loongarch64/sysv.S
|
||||
src/kvx/sysv.S src/loongarch/ffi.c src/loongarch/sysv.S
|
||||
|
||||
TARGET_OBJ = @TARGET_OBJ@
|
||||
libffi_la_LIBADD = $(TARGET_OBJ)
|
||||
@@ -156,7 +156,8 @@ AM_CCASFLAGS = '$(AM_CPPFLAGS)'
|
||||
dist-hook:
|
||||
d=`(cd $(distdir); pwd)`; (cd doc; make pdf; cp *.pdf $$d/doc)
|
||||
if [ -d $(top_srcdir)/.git ] ; then (cd $(top_srcdir); git log --no-decorate) ; else echo 'See git log for history.' ; fi > $(distdir)/ChangeLog
|
||||
s=`awk '/was released on/{ print NR; exit}' $(top_srcdir)/README.md`; tail -n +$$(($$s-1)) $(top_srcdir)/README.md > $(distdir)/README.md
|
||||
s=`awk '/was released on/{ print NR; exit}' $(top_srcdir)/README.md`; \
|
||||
if [ -n "$$s" ]; then tail -n +$$(($$s-1)) $(top_srcdir)/README.md; else cat $(top_srcdir)/README.md; fi > $(distdir)/README.md
|
||||
|
||||
# target overrides
|
||||
-include $(tmake_file)
|
||||
Vendored
+2115
File diff suppressed because it is too large.
Load diff
Vendored
+29
-11
@@ -1,7 +1,5 @@
|
||||
Status
|
||||
======
|
||||
|
||||
libffi-3.5.2 was released on August 2, 2025.
|
||||
libffi-3.6.0 was released on June 20, 2026.
|
||||
|
||||
|
||||
What is libffi?
|
||||
@@ -63,6 +61,7 @@ tested:
|
||||
| HPPA64 | HPUX | GCC |
|
||||
| KVX | Linux | GCC |
|
||||
| IA-64 | Linux | GCC |
|
||||
| LoongArch32 | Linux | GCC |
|
||||
| LoongArch64 | Linux | GCC |
|
||||
| M68K | FreeMiNT | GCC |
|
||||
| M68K | Linux | GCC |
|
||||
@@ -135,11 +134,9 @@ First you must configure the distribution for your particular
|
||||
system. Go to the directory you wish to build libffi in and run the
|
||||
"configure" program found in the root directory of the libffi source
|
||||
distribution. Note that building libffi requires a C99 compatible
|
||||
compiler.
|
||||
|
||||
If you're building libffi directly from git hosted sources, configure
|
||||
won't exist yet; run ./autogen.sh first. This will require that you
|
||||
install autoconf, automake, libtool and texinfo.
|
||||
compiler. If you're building libffi directly from git hosted sources,
|
||||
configure won't exist yet; run ./autogen.sh first. This will require
|
||||
that you install autoconf, automake, libtool and texinfo.
|
||||
|
||||
You may want to tell configure where to install the libffi library and
|
||||
header files. To do that, use the ``--prefix`` configure switch. Libffi
|
||||
@@ -204,6 +201,27 @@ History
|
||||
|
||||
See the git log for details at http://github.com/libffi/libffi.
|
||||
|
||||
3.6.0 Jun-20-2026
|
||||
Add LoongArch32 support.
|
||||
Add RISC-V static trampoline support.
|
||||
Add aarch64 GCS (Guarded Control Stack) support.
|
||||
Add aarch64 feature build attribute support.
|
||||
Add ppc64le ELFv2 complex type support.
|
||||
Add conditional target support for __int128.
|
||||
Add x86_64 IEEE binary128 long double support (e.g. x86_64 Android).
|
||||
Update bundled dlmalloc to upstream 2.8.6.
|
||||
Fix closures using FFI_REGISTER ABI.
|
||||
Fix SH linker errors with __USER_LABEL_PREFIX__.
|
||||
Fix compilation for ARM Windows targets.
|
||||
Fix compilation for Cortex-A53.
|
||||
Fix test compilation for some Android platforms.
|
||||
Fix x86 ASAN compatibility for win64.
|
||||
Fix clang -Werror-semi builds on riscv, or1k, loongarch.
|
||||
Fix NULL deref in dlmalloc sys_trim on heap corruption.
|
||||
Fix ThreadSanitizer data race in dlmalloc mparams init (#873).
|
||||
Define WIN32_LEAN_AND_MEAN before including windows.h.
|
||||
Fix comments that trip up some toolchains.
|
||||
|
||||
3.5.2 Aug-2-2025
|
||||
Add wasm64 support.
|
||||
Add DragonFly BSD support.
|
||||
@@ -512,8 +530,9 @@ developers:
|
||||
frv Anthony Green
|
||||
ia64 Hans Boehm
|
||||
kvx Yann Sionneau
|
||||
loongarch64 Cheng Lulu, Xi Ruoyao, Xu Hao,
|
||||
Zhang Wenlong, Pan Xuefeng
|
||||
loongarch Cheng Lulu, Xi Ruoyao, Xu Hao,
|
||||
Zhang Wenlong, Pan Xuefeng,
|
||||
Meng Qinggang
|
||||
m32r Kazuhiro Inaoka
|
||||
m68k Andreas Schwab
|
||||
m88k Miod Vallat
|
||||
@@ -522,7 +541,6 @@ developers:
|
||||
mips Anthony Green, Casey Marshall
|
||||
mips64 David Daney
|
||||
moxie Anthony Green
|
||||
nios ii Sandra Loosemore
|
||||
openrisc Sebastian Macke
|
||||
pa Randolph Chung, Dave Anglin, Andreas Tobler
|
||||
pa64 Dave Anglin
|
||||
|
||||
Vendored
+2134
File diff suppressed because it is too large.
Load diff
Vendored
-2
@@ -1,2 +0,0 @@
|
||||
#!/bin/sh
|
||||
exec autoreconf -v -i
|
||||
+348
@@ -0,0 +1,348 @@
|
||||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand '-c -o'.
|
||||
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
|
||||
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
nl='
|
||||
'
|
||||
|
||||
# We need space, tab and new line, in precisely that order. Quoting is
|
||||
# there to prevent tools from complaining about whitespace usage.
|
||||
IFS=" "" $nl"
|
||||
|
||||
file_conv=
|
||||
|
||||
# func_file_conv build_file lazy
|
||||
# Convert a $build file to $host form and store it in $file
|
||||
# Currently only supports Windows hosts. If the determined conversion
|
||||
# type is listed in (the comma separated) LAZY, no conversion will
|
||||
# take place.
|
||||
func_file_conv ()
|
||||
{
|
||||
file=$1
|
||||
case $file in
|
||||
/ | /[!/]*) # absolute file, and not a UNC file
|
||||
if test -z "$file_conv"; then
|
||||
# lazily determine how to convert abs files
|
||||
case `uname -s` in
|
||||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN* | MSYS*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
file_conv=wine
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
case $file_conv/,$2, in
|
||||
*,$file_conv,*)
|
||||
;;
|
||||
mingw/*)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin/* | msys/*)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine/*)
|
||||
file=`winepath -w "$file" || echo "$file"`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# func_cl_dashL linkdir
|
||||
# Make cl look for libraries in LINKDIR
|
||||
func_cl_dashL ()
|
||||
{
|
||||
func_file_conv "$1"
|
||||
if test -z "$lib_path"; then
|
||||
lib_path=$file
|
||||
else
|
||||
lib_path="$lib_path;$file"
|
||||
fi
|
||||
linker_opts="$linker_opts -LIBPATH:$file"
|
||||
}
|
||||
|
||||
# func_cl_dashl library
|
||||
# Do a library search-path lookup for cl
|
||||
func_cl_dashl ()
|
||||
{
|
||||
lib=$1
|
||||
found=no
|
||||
save_IFS=$IFS
|
||||
IFS=';'
|
||||
for dir in $lib_path $LIB
|
||||
do
|
||||
IFS=$save_IFS
|
||||
if $shared && test -f "$dir/$lib.dll.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.dll.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/$lib.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/lib$lib.a"; then
|
||||
found=yes
|
||||
lib=$dir/lib$lib.a
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS=$save_IFS
|
||||
|
||||
if test "$found" != yes; then
|
||||
lib=$lib.lib
|
||||
fi
|
||||
}
|
||||
|
||||
# func_cl_wrapper cl arg...
|
||||
# Adjust compile command to suit cl
|
||||
func_cl_wrapper ()
|
||||
{
|
||||
# Assume a capable shell
|
||||
lib_path=
|
||||
shared=:
|
||||
linker_opts=
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.[oO][bB][jJ])
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fo"$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fe"$file"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
-I)
|
||||
eat=1
|
||||
func_file_conv "$2" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-I*)
|
||||
func_file_conv "${1#-I}" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-l)
|
||||
eat=1
|
||||
func_cl_dashl "$2"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-l*)
|
||||
func_cl_dashl "${1#-l}"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-L)
|
||||
eat=1
|
||||
func_cl_dashL "$2"
|
||||
;;
|
||||
-L*)
|
||||
func_cl_dashL "${1#-L}"
|
||||
;;
|
||||
-static)
|
||||
shared=false
|
||||
;;
|
||||
-Wl,*)
|
||||
arg=${1#-Wl,}
|
||||
save_ifs="$IFS"; IFS=','
|
||||
for flag in $arg; do
|
||||
IFS="$save_ifs"
|
||||
linker_opts="$linker_opts $flag"
|
||||
done
|
||||
IFS="$save_ifs"
|
||||
;;
|
||||
-Xlinker)
|
||||
eat=1
|
||||
linker_opts="$linker_opts $2"
|
||||
;;
|
||||
-*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
|
||||
func_file_conv "$1"
|
||||
set x "$@" -Tp"$file"
|
||||
shift
|
||||
;;
|
||||
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
|
||||
func_file_conv "$1" mingw
|
||||
set x "$@" "$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
if test -n "$linker_opts"; then
|
||||
linker_opts="-link$linker_opts"
|
||||
fi
|
||||
exec "$@" $linker_opts
|
||||
exit 1
|
||||
}
|
||||
|
||||
eat=
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Wrapper for compilers which do not understand '-c -o'.
|
||||
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||
arguments, and rename the output as expected.
|
||||
|
||||
If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file 'INSTALL'.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "compile $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
|
||||
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
|
||||
func_cl_wrapper "$@" # Doesn't return...
|
||||
;;
|
||||
esac
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
# So we strip '-o arg' only if arg is an object.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.obj)
|
||||
ofile=$2
|
||||
;;
|
||||
*)
|
||||
set x "$@" -o "$2"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no '-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# '.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$@"
|
||||
ret=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
||||
elif test -f "${cofile}bj"; then
|
||||
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir "$lockdir"
|
||||
exit $ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
+22
-80
@@ -1,10 +1,10 @@
|
||||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright 1992-2024 Free Software Foundation, Inc.
|
||||
# Copyright 1992-2022 Free Software Foundation, Inc.
|
||||
|
||||
# shellcheck disable=SC2006,SC2268 # see below for rationale
|
||||
|
||||
timestamp='2024-01-01'
|
||||
timestamp='2022-01-09'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@@ -47,7 +47,7 @@ me=`echo "$0" | sed -e 's,.*/,,'`
|
||||
usage="\
|
||||
Usage: $0 [OPTION]
|
||||
|
||||
Output the configuration name of the system '$me' is run on.
|
||||
Output the configuration name of the system \`$me' is run on.
|
||||
|
||||
Options:
|
||||
-h, --help print this help, then exit
|
||||
@@ -60,13 +60,13 @@ version="\
|
||||
GNU config.guess ($timestamp)
|
||||
|
||||
Originally written by Per Bothner.
|
||||
Copyright 1992-2024 Free Software Foundation, Inc.
|
||||
Copyright 1992-2022 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
|
||||
help="
|
||||
Try '$me --help' for more information."
|
||||
Try \`$me --help' for more information."
|
||||
|
||||
# Parse command line
|
||||
while test $# -gt 0 ; do
|
||||
@@ -102,8 +102,8 @@ GUESS=
|
||||
# temporary files to be created and, as you can see below, it is a
|
||||
# headache to deal with in a portable fashion.
|
||||
|
||||
# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still
|
||||
# use 'HOST_CC' if defined, but it is deprecated.
|
||||
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
|
||||
# use `HOST_CC' if defined, but it is deprecated.
|
||||
|
||||
# Portable tmp directory creation inspired by the Autoconf team.
|
||||
|
||||
@@ -155,9 +155,6 @@ Linux|GNU|GNU/*)
|
||||
|
||||
set_cc_for_build
|
||||
cat <<-EOF > "$dummy.c"
|
||||
#if defined(__ANDROID__)
|
||||
LIBC=android
|
||||
#else
|
||||
#include <features.h>
|
||||
#if defined(__UCLIBC__)
|
||||
LIBC=uclibc
|
||||
@@ -165,8 +162,6 @@ Linux|GNU|GNU/*)
|
||||
LIBC=dietlibc
|
||||
#elif defined(__GLIBC__)
|
||||
LIBC=gnu
|
||||
#elif defined(__LLVM_LIBC__)
|
||||
LIBC=llvm
|
||||
#else
|
||||
#include <stdarg.h>
|
||||
/* First heuristic to detect musl libc. */
|
||||
@@ -174,7 +169,6 @@ Linux|GNU|GNU/*)
|
||||
LIBC=musl
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
|
||||
eval "$cc_set_libc"
|
||||
@@ -465,7 +459,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
|
||||
UNAME_RELEASE=`uname -v`
|
||||
;;
|
||||
esac
|
||||
# Japanese Language versions have a version number like '4.1.3-JL'.
|
||||
# Japanese Language versions have a version number like `4.1.3-JL'.
|
||||
SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
|
||||
GUESS=sparc-sun-sunos$SUN_REL
|
||||
;;
|
||||
@@ -910,7 +904,7 @@ EOF
|
||||
fi
|
||||
;;
|
||||
*:FreeBSD:*:*)
|
||||
UNAME_PROCESSOR=`uname -p`
|
||||
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
||||
case $UNAME_PROCESSOR in
|
||||
amd64)
|
||||
UNAME_PROCESSOR=x86_64 ;;
|
||||
@@ -972,37 +966,11 @@ EOF
|
||||
GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
|
||||
GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
|
||||
;;
|
||||
x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*)
|
||||
GUESS="$UNAME_MACHINE-pc-managarm-mlibc"
|
||||
;;
|
||||
*:[Mm]anagarm:*:*)
|
||||
GUESS="$UNAME_MACHINE-unknown-managarm-mlibc"
|
||||
;;
|
||||
*:Minix:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-minix
|
||||
;;
|
||||
aarch64:Linux:*:*)
|
||||
set_cc_for_build
|
||||
CPU=$UNAME_MACHINE
|
||||
LIBCABI=$LIBC
|
||||
if test "$CC_FOR_BUILD" != no_compiler_found; then
|
||||
ABI=64
|
||||
sed 's/^ //' << EOF > "$dummy.c"
|
||||
#ifdef __ARM_EABI__
|
||||
#ifdef __ARM_PCS_VFP
|
||||
ABI=eabihf
|
||||
#else
|
||||
ABI=eabi
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
|
||||
eval "$cc_set_abi"
|
||||
case $ABI in
|
||||
eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;;
|
||||
esac
|
||||
fi
|
||||
GUESS=$CPU-unknown-linux-$LIBCABI
|
||||
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
||||
;;
|
||||
aarch64_be:Linux:*:*)
|
||||
UNAME_MACHINE=aarch64_be
|
||||
@@ -1068,16 +1036,7 @@ EOF
|
||||
k1om:Linux:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
||||
;;
|
||||
kvx:Linux:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
||||
;;
|
||||
kvx:cos:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-cos
|
||||
;;
|
||||
kvx:mbr:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-mbr
|
||||
;;
|
||||
loongarch32:Linux:*:* | loongarch64:Linux:*:*)
|
||||
loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
||||
;;
|
||||
m32r*:Linux:*:*)
|
||||
@@ -1192,27 +1151,16 @@ EOF
|
||||
;;
|
||||
x86_64:Linux:*:*)
|
||||
set_cc_for_build
|
||||
CPU=$UNAME_MACHINE
|
||||
LIBCABI=$LIBC
|
||||
if test "$CC_FOR_BUILD" != no_compiler_found; then
|
||||
ABI=64
|
||||
sed 's/^ //' << EOF > "$dummy.c"
|
||||
#ifdef __i386__
|
||||
ABI=x86
|
||||
#else
|
||||
#ifdef __ILP32__
|
||||
ABI=x32
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
|
||||
eval "$cc_set_abi"
|
||||
case $ABI in
|
||||
x86) CPU=i686 ;;
|
||||
x32) LIBCABI=${LIBC}x32 ;;
|
||||
esac
|
||||
if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
|
||||
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
grep IS_X32 >/dev/null
|
||||
then
|
||||
LIBCABI=${LIBC}x32
|
||||
fi
|
||||
fi
|
||||
GUESS=$CPU-pc-linux-$LIBCABI
|
||||
GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI
|
||||
;;
|
||||
xtensa*:Linux:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
||||
@@ -1232,7 +1180,7 @@ EOF
|
||||
GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
|
||||
;;
|
||||
i*86:OS/2:*:*)
|
||||
# If we were able to find 'uname', then EMX Unix compatibility
|
||||
# If we were able to find `uname', then EMX Unix compatibility
|
||||
# is probably installed.
|
||||
GUESS=$UNAME_MACHINE-pc-os2-emx
|
||||
;;
|
||||
@@ -1373,7 +1321,7 @@ EOF
|
||||
GUESS=ns32k-sni-sysv
|
||||
fi
|
||||
;;
|
||||
PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort
|
||||
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
|
||||
# says <Richard.M.Bartel@ccMail.Census.GOV>
|
||||
GUESS=i586-unisys-sysv4
|
||||
;;
|
||||
@@ -1419,11 +1367,8 @@ EOF
|
||||
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
|
||||
GUESS=i586-pc-haiku
|
||||
;;
|
||||
ppc:Haiku:*:*) # Haiku running on Apple PowerPC
|
||||
GUESS=powerpc-apple-haiku
|
||||
;;
|
||||
*:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat)
|
||||
GUESS=$UNAME_MACHINE-unknown-haiku
|
||||
x86_64:Haiku:*:*)
|
||||
GUESS=x86_64-unknown-haiku
|
||||
;;
|
||||
SX-4:SUPER-UX:*:*)
|
||||
GUESS=sx4-nec-superux$UNAME_RELEASE
|
||||
@@ -1595,9 +1540,6 @@ EOF
|
||||
*:Unleashed:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
|
||||
;;
|
||||
*:Ironclad:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-ironclad
|
||||
;;
|
||||
esac
|
||||
|
||||
# Do we have a guess based on uname results?
|
||||
|
||||
Vendored
+80
-163
@@ -1,10 +1,10 @@
|
||||
#! /bin/sh
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright 1992-2024 Free Software Foundation, Inc.
|
||||
# Copyright 1992-2022 Free Software Foundation, Inc.
|
||||
|
||||
# shellcheck disable=SC2006,SC2268 # see below for rationale
|
||||
|
||||
timestamp='2024-01-01'
|
||||
timestamp='2022-01-03'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@@ -76,13 +76,13 @@ Report bugs and patches to <config-patches@gnu.org>."
|
||||
version="\
|
||||
GNU config.sub ($timestamp)
|
||||
|
||||
Copyright 1992-2024 Free Software Foundation, Inc.
|
||||
Copyright 1992-2022 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
|
||||
help="
|
||||
Try '$me --help' for more information."
|
||||
Try \`$me --help' for more information."
|
||||
|
||||
# Parse command line
|
||||
while test $# -gt 0 ; do
|
||||
@@ -130,7 +130,7 @@ IFS=$saved_IFS
|
||||
# Separate into logical components for further validation
|
||||
case $1 in
|
||||
*-*-*-*-*)
|
||||
echo "Invalid configuration '$1': more than four components" >&2
|
||||
echo Invalid configuration \`"$1"\': more than four components >&2
|
||||
exit 1
|
||||
;;
|
||||
*-*-*-*)
|
||||
@@ -145,8 +145,7 @@ case $1 in
|
||||
nto-qnx* | linux-* | uclinux-uclibc* \
|
||||
| uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
|
||||
| netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
|
||||
| storm-chaos* | os2-emx* | rtmk-nova* | managarm-* \
|
||||
| windows-* )
|
||||
| storm-chaos* | os2-emx* | rtmk-nova*)
|
||||
basic_machine=$field1
|
||||
basic_os=$maybe_os
|
||||
;;
|
||||
@@ -944,7 +943,7 @@ $basic_machine
|
||||
EOF
|
||||
IFS=$saved_IFS
|
||||
;;
|
||||
# We use 'pc' rather than 'unknown'
|
||||
# We use `pc' rather than `unknown'
|
||||
# because (1) that's what they normally are, and
|
||||
# (2) the word "unknown" tends to confuse beginning users.
|
||||
i*86 | x86_64)
|
||||
@@ -1076,7 +1075,7 @@ case $cpu-$vendor in
|
||||
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
|
||||
cpu=i586
|
||||
;;
|
||||
pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*)
|
||||
pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
|
||||
cpu=i686
|
||||
;;
|
||||
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
|
||||
@@ -1127,7 +1126,7 @@ case $cpu-$vendor in
|
||||
xscale-* | xscalee[bl]-*)
|
||||
cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
|
||||
;;
|
||||
arm64-* | arm64_32-* | aarch64le-*)
|
||||
arm64-* | aarch64le-*)
|
||||
cpu=aarch64
|
||||
;;
|
||||
|
||||
@@ -1181,7 +1180,7 @@ case $cpu-$vendor in
|
||||
case $cpu in
|
||||
1750a | 580 \
|
||||
| a29k \
|
||||
| aarch64 | aarch64_be | aarch64c | arm64ec \
|
||||
| aarch64 | aarch64_be \
|
||||
| abacus \
|
||||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
|
||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
|
||||
@@ -1200,29 +1199,50 @@ case $cpu-$vendor in
|
||||
| d10v | d30v | dlx | dsp16xx \
|
||||
| e2k | elxsi | epiphany \
|
||||
| f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
|
||||
| javascript \
|
||||
| h8300 | h8500 \
|
||||
| hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||
| hexagon \
|
||||
| i370 | i*86 | i860 | i960 | ia16 | ia64 \
|
||||
| ip2k | iq2000 \
|
||||
| k1om \
|
||||
| kvx \
|
||||
| le32 | le64 \
|
||||
| lm32 \
|
||||
| loongarch32 | loongarch64 \
|
||||
| loongarch32 | loongarch64 | loongarchx32 \
|
||||
| m32c | m32r | m32rle \
|
||||
| m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
|
||||
| m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
|
||||
| m88110 | m88k | maxq | mb | mcore | mep | metag \
|
||||
| microblaze | microblazeel \
|
||||
| mips* \
|
||||
| mips | mipsbe | mipseb | mipsel | mipsle \
|
||||
| mips16 \
|
||||
| mips64 | mips64eb | mips64el \
|
||||
| mips64octeon | mips64octeonel \
|
||||
| mips64orion | mips64orionel \
|
||||
| mips64r5900 | mips64r5900el \
|
||||
| mips64vr | mips64vrel \
|
||||
| mips64vr4100 | mips64vr4100el \
|
||||
| mips64vr4300 | mips64vr4300el \
|
||||
| mips64vr5000 | mips64vr5000el \
|
||||
| mips64vr5900 | mips64vr5900el \
|
||||
| mipsisa32 | mipsisa32el \
|
||||
| mipsisa32r2 | mipsisa32r2el \
|
||||
| mipsisa32r3 | mipsisa32r3el \
|
||||
| mipsisa32r5 | mipsisa32r5el \
|
||||
| mipsisa32r6 | mipsisa32r6el \
|
||||
| mipsisa64 | mipsisa64el \
|
||||
| mipsisa64r2 | mipsisa64r2el \
|
||||
| mipsisa64r3 | mipsisa64r3el \
|
||||
| mipsisa64r5 | mipsisa64r5el \
|
||||
| mipsisa64r6 | mipsisa64r6el \
|
||||
| mipsisa64sb1 | mipsisa64sb1el \
|
||||
| mipsisa64sr71k | mipsisa64sr71kel \
|
||||
| mipsr5900 | mipsr5900el \
|
||||
| mipstx39 | mipstx39el \
|
||||
| mmix \
|
||||
| mn10200 | mn10300 \
|
||||
| moxie \
|
||||
| mt \
|
||||
| msp430 \
|
||||
| nanomips* \
|
||||
| nds32 | nds32le | nds32be \
|
||||
| nfp \
|
||||
| nios | nios2 | nios2eb | nios2el \
|
||||
@@ -1254,7 +1274,6 @@ case $cpu-$vendor in
|
||||
| ubicom32 \
|
||||
| v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
|
||||
| vax \
|
||||
| vc4 \
|
||||
| visium \
|
||||
| w65 \
|
||||
| wasm32 | wasm64 \
|
||||
@@ -1266,7 +1285,7 @@ case $cpu-$vendor in
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2
|
||||
echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -1287,12 +1306,11 @@ esac
|
||||
|
||||
# Decode manufacturer-specific aliases for certain operating systems.
|
||||
|
||||
if test x"$basic_os" != x
|
||||
if test x$basic_os != x
|
||||
then
|
||||
|
||||
# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
|
||||
# set os.
|
||||
obj=
|
||||
case $basic_os in
|
||||
gnu/linux*)
|
||||
kernel=linux
|
||||
@@ -1323,10 +1341,6 @@ EOF
|
||||
kernel=linux
|
||||
os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
|
||||
;;
|
||||
managarm*)
|
||||
kernel=managarm
|
||||
os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'`
|
||||
;;
|
||||
*)
|
||||
kernel=
|
||||
os=$basic_os
|
||||
@@ -1492,16 +1506,10 @@ case $os in
|
||||
os=eabi
|
||||
;;
|
||||
*)
|
||||
os=
|
||||
obj=elf
|
||||
os=elf
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
aout* | coff* | elf* | pe*)
|
||||
# These are machine code file formats, not OSes
|
||||
obj=$os
|
||||
os=
|
||||
;;
|
||||
*)
|
||||
# No normalization, but not necessarily accepted, that comes below.
|
||||
;;
|
||||
@@ -1520,15 +1528,12 @@ else
|
||||
# system, and we'll never get to this point.
|
||||
|
||||
kernel=
|
||||
obj=
|
||||
case $cpu-$vendor in
|
||||
score-*)
|
||||
os=
|
||||
obj=elf
|
||||
os=elf
|
||||
;;
|
||||
spu-*)
|
||||
os=
|
||||
obj=elf
|
||||
os=elf
|
||||
;;
|
||||
*-acorn)
|
||||
os=riscix1.2
|
||||
@@ -1538,35 +1543,28 @@ case $cpu-$vendor in
|
||||
os=gnu
|
||||
;;
|
||||
arm*-semi)
|
||||
os=
|
||||
obj=aout
|
||||
os=aout
|
||||
;;
|
||||
c4x-* | tic4x-*)
|
||||
os=
|
||||
obj=coff
|
||||
os=coff
|
||||
;;
|
||||
c8051-*)
|
||||
os=
|
||||
obj=elf
|
||||
os=elf
|
||||
;;
|
||||
clipper-intergraph)
|
||||
os=clix
|
||||
;;
|
||||
hexagon-*)
|
||||
os=
|
||||
obj=elf
|
||||
os=elf
|
||||
;;
|
||||
tic54x-*)
|
||||
os=
|
||||
obj=coff
|
||||
os=coff
|
||||
;;
|
||||
tic55x-*)
|
||||
os=
|
||||
obj=coff
|
||||
os=coff
|
||||
;;
|
||||
tic6x-*)
|
||||
os=
|
||||
obj=coff
|
||||
os=coff
|
||||
;;
|
||||
# This must come before the *-dec entry.
|
||||
pdp10-*)
|
||||
@@ -1588,24 +1586,19 @@ case $cpu-$vendor in
|
||||
os=sunos3
|
||||
;;
|
||||
m68*-cisco)
|
||||
os=
|
||||
obj=aout
|
||||
os=aout
|
||||
;;
|
||||
mep-*)
|
||||
os=
|
||||
obj=elf
|
||||
os=elf
|
||||
;;
|
||||
mips*-cisco)
|
||||
os=
|
||||
obj=elf
|
||||
os=elf
|
||||
;;
|
||||
mips*-*|nanomips*-*)
|
||||
os=
|
||||
obj=elf
|
||||
mips*-*)
|
||||
os=elf
|
||||
;;
|
||||
or32-*)
|
||||
os=
|
||||
obj=coff
|
||||
os=coff
|
||||
;;
|
||||
*-tti) # must be before sparc entry or we get the wrong os.
|
||||
os=sysv3
|
||||
@@ -1614,8 +1607,7 @@ case $cpu-$vendor in
|
||||
os=sunos4.1.1
|
||||
;;
|
||||
pru-*)
|
||||
os=
|
||||
obj=elf
|
||||
os=elf
|
||||
;;
|
||||
*-be)
|
||||
os=beos
|
||||
@@ -1696,12 +1688,10 @@ case $cpu-$vendor in
|
||||
os=uxpv
|
||||
;;
|
||||
*-rom68k)
|
||||
os=
|
||||
obj=coff
|
||||
os=coff
|
||||
;;
|
||||
*-*bug)
|
||||
os=
|
||||
obj=coff
|
||||
os=coff
|
||||
;;
|
||||
*-apple)
|
||||
os=macos
|
||||
@@ -1719,11 +1709,10 @@ esac
|
||||
|
||||
fi
|
||||
|
||||
# Now, validate our (potentially fixed-up) individual pieces (OS, OBJ).
|
||||
|
||||
# Now, validate our (potentially fixed-up) OS.
|
||||
case $os in
|
||||
# Sometimes we do "kernel-libc", so those need to count as OSes.
|
||||
llvm* | musl* | newlib* | relibc* | uclibc*)
|
||||
musl* | newlib* | relibc* | uclibc*)
|
||||
;;
|
||||
# Likewise for "kernel-abi"
|
||||
eabi* | gnueabi*)
|
||||
@@ -1731,9 +1720,6 @@ case $os in
|
||||
# VxWorks passes extra cpu info in the 4th filed.
|
||||
simlinux | simwindows | spe)
|
||||
;;
|
||||
# See `case $cpu-$os` validation below
|
||||
ghcjs)
|
||||
;;
|
||||
# Now accept the basic system types.
|
||||
# The portable systems comes first.
|
||||
# Each alternative MUST end in a * to match a version number.
|
||||
@@ -1742,7 +1728,7 @@ case $os in
|
||||
| hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
|
||||
| sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
|
||||
| hiux* | abug | nacl* | netware* | windows* \
|
||||
| os9* | macos* | osx* | ios* | tvos* | watchos* \
|
||||
| os9* | macos* | osx* | ios* \
|
||||
| mpw* | magic* | mmixware* | mon960* | lnews* \
|
||||
| amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
|
||||
| aos* | aros* | cloudabi* | sortix* | twizzler* \
|
||||
@@ -1751,11 +1737,11 @@ case $os in
|
||||
| mirbsd* | netbsd* | dicos* | openedition* | ose* \
|
||||
| bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
|
||||
| ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
|
||||
| bosx* | nextstep* | cxux* | oabi* \
|
||||
| ptx* | ecoff* | winnt* | domain* | vsta* \
|
||||
| bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
|
||||
| ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
|
||||
| udi* | lites* | ieee* | go32* | aux* | hcos* \
|
||||
| chorusrdb* | cegcc* | glidix* | serenity* \
|
||||
| cygwin* | msys* | moss* | proelf* | rtems* \
|
||||
| cygwin* | msys* | pe* | moss* | proelf* | rtems* \
|
||||
| midipix* | mingw32* | mingw64* | mint* \
|
||||
| uxpv* | beos* | mpeix* | udk* | moxiebox* \
|
||||
| interix* | uwin* | mks* | rhapsody* | darwin* \
|
||||
@@ -1768,118 +1754,49 @@ case $os in
|
||||
| onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
|
||||
| midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
|
||||
| nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
|
||||
| fiwix* | mlibc* | cos* | mbr* | ironclad* )
|
||||
| fiwix* )
|
||||
;;
|
||||
# This one is extra strict with allowed versions
|
||||
sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
|
||||
# Don't forget version if it is 3.2v4 or newer.
|
||||
;;
|
||||
# This refers to builds using the UEFI calling convention
|
||||
# (which depends on the architecture) and PE file format.
|
||||
# Note that this is both a different calling convention and
|
||||
# different file format than that of GNU-EFI
|
||||
# (x86_64-w64-mingw32).
|
||||
uefi)
|
||||
;;
|
||||
none)
|
||||
;;
|
||||
kernel* | msvc* )
|
||||
# Restricted further below
|
||||
;;
|
||||
'')
|
||||
if test x"$obj" = x
|
||||
then
|
||||
echo "Invalid configuration '$1': Blank OS only allowed with explicit machine code file format" 1>&2
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
case $obj in
|
||||
aout* | coff* | elf* | pe*)
|
||||
;;
|
||||
'')
|
||||
# empty is fine
|
||||
;;
|
||||
*)
|
||||
echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# Here we handle the constraint that a (synthetic) cpu and os are
|
||||
# valid only in combination with each other and nowhere else.
|
||||
case $cpu-$os in
|
||||
# The "javascript-unknown-ghcjs" triple is used by GHC; we
|
||||
# accept it here in order to tolerate that, but reject any
|
||||
# variations.
|
||||
javascript-ghcjs)
|
||||
;;
|
||||
javascript-* | *-ghcjs)
|
||||
echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2
|
||||
echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# As a final step for OS-related things, validate the OS-kernel combination
|
||||
# (given a valid OS), if there is a kernel.
|
||||
case $kernel-$os-$obj in
|
||||
linux-gnu*- | linux-android*- | linux-dietlibc*- | linux-llvm*- \
|
||||
| linux-mlibc*- | linux-musl*- | linux-newlib*- \
|
||||
| linux-relibc*- | linux-uclibc*- )
|
||||
case $kernel-$os in
|
||||
linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
|
||||
| linux-musl* | linux-relibc* | linux-uclibc* )
|
||||
;;
|
||||
uclinux-uclibc*- )
|
||||
uclinux-uclibc* )
|
||||
;;
|
||||
managarm-mlibc*- | managarm-kernel*- )
|
||||
;;
|
||||
windows*-msvc*-)
|
||||
;;
|
||||
-dietlibc*- | -llvm*- | -mlibc*- | -musl*- | -newlib*- | -relibc*- \
|
||||
| -uclibc*- )
|
||||
-dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* )
|
||||
# These are just libc implementations, not actual OSes, and thus
|
||||
# require a kernel.
|
||||
echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2
|
||||
echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
|
||||
exit 1
|
||||
;;
|
||||
-kernel*- )
|
||||
echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2
|
||||
exit 1
|
||||
kfreebsd*-gnu* | kopensolaris*-gnu*)
|
||||
;;
|
||||
*-kernel*- )
|
||||
echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2
|
||||
exit 1
|
||||
vxworks-simlinux | vxworks-simwindows | vxworks-spe)
|
||||
;;
|
||||
*-msvc*- )
|
||||
echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2
|
||||
exit 1
|
||||
nto-qnx*)
|
||||
;;
|
||||
kfreebsd*-gnu*- | kopensolaris*-gnu*-)
|
||||
os2-emx)
|
||||
;;
|
||||
vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-)
|
||||
*-eabi* | *-gnueabi*)
|
||||
;;
|
||||
nto-qnx*-)
|
||||
;;
|
||||
os2-emx-)
|
||||
;;
|
||||
ios*-simulator* | tvos*-simulator* | watchos*-simulator*)
|
||||
;;
|
||||
*-eabi*- | *-gnueabi*-)
|
||||
;;
|
||||
none--*)
|
||||
# None (no kernel, i.e. freestanding / bare metal),
|
||||
# can be paired with an machine code file format
|
||||
;;
|
||||
-*-)
|
||||
-*)
|
||||
# Blank kernel with real OS is always fine.
|
||||
;;
|
||||
--*)
|
||||
# Blank kernel and OS with real machine code file format is always fine.
|
||||
;;
|
||||
*-*-*)
|
||||
echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2
|
||||
*-*)
|
||||
echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -1962,7 +1879,7 @@ case $vendor in
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}"
|
||||
echo "$cpu-$vendor-${kernel:+$kernel-}$os"
|
||||
exit
|
||||
|
||||
# Local variables:
|
||||
|
||||
+22861
File diff suppressed because it is too large.
Load diff
Vendored
+14
-2
@@ -2,7 +2,7 @@ dnl Process this with autoconf to create configure
|
||||
|
||||
AC_PREREQ([2.68])
|
||||
|
||||
AC_INIT([libffi],[3.5.2],[http://github.com/libffi/libffi/issues])
|
||||
AC_INIT([libffi],[3.6.0],[http://github.com/libffi/libffi/issues])
|
||||
AC_CONFIG_HEADERS([fficonfig.h])
|
||||
|
||||
FFI_VERSION_STRING="3.5.2"
|
||||
@@ -119,6 +119,10 @@ fi
|
||||
AC_SUBST(HAVE_LONG_DOUBLE)
|
||||
AC_SUBST(HAVE_LONG_DOUBLE_VARIANT)
|
||||
|
||||
AC_CHECK_TYPE(__int128_t,
|
||||
AC_DEFINE(HAVE_INT128, 1,
|
||||
[Define if __int128_t and __uint128_t are supported.]))
|
||||
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
GCC_AS_CFI_PSEUDO_OP
|
||||
@@ -190,6 +194,13 @@ case "$TARGET" in
|
||||
fi
|
||||
CFLAGS="$CFLAGS -sMEMORY64=$WASM64_MEMORY64"
|
||||
;;
|
||||
LOONGARCH64)
|
||||
CFLAGS="$CFLAGS -mcmodel=medium"
|
||||
;;
|
||||
LOONGARCH32)
|
||||
# No special for LoongArch32 now.
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
AC_CACHE_CHECK([whether compiler supports pointer authentication],
|
||||
@@ -392,7 +403,8 @@ case "$target" in
|
||||
fi
|
||||
;;
|
||||
*arm*-*-linux-* | aarch64*-*-linux-* | i*86-*-linux-* | x86_64-*-linux-* \
|
||||
| loongarch*-*-linux-* | s390x*-linux-* | powerpc*-linux-*)
|
||||
| loongarch*-*-linux-* | s390x*-linux-* | powerpc*-linux-* \
|
||||
| riscv*-linux-*)
|
||||
AC_DEFINE(FFI_EXEC_STATIC_TRAMP, 1,
|
||||
[Define this if you want statically defined trampolines])
|
||||
;;
|
||||
|
||||
Vendored
+7
-2
@@ -141,8 +141,13 @@ case "${host}" in
|
||||
SOURCES="ffi.c sysv.S"
|
||||
;;
|
||||
|
||||
loongarch64-*-*)
|
||||
TARGET=LOONGARCH64; TARGETDIR=loongarch64
|
||||
loongarch*-*-*)
|
||||
if test $ac_cv_sizeof_size_t = 4; then
|
||||
TARGET=LOONGARCH32
|
||||
else
|
||||
TARGET=LOONGARCH64
|
||||
fi
|
||||
TARGETDIR=loongarch
|
||||
SOURCES="ffi.c sysv.S"
|
||||
;;
|
||||
|
||||
|
||||
+791
@@ -0,0 +1,791 @@
|
||||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
|
||||
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||
as side-effects.
|
||||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by 'PROGRAMS ARGS'.
|
||||
object Object file output by 'PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputting dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
# Get the directory component of the given path, and save it in the
|
||||
# global variables '$dir'. Note that this directory component will
|
||||
# be either empty or ending with a '/' character. This is deliberate.
|
||||
set_dir_from ()
|
||||
{
|
||||
case $1 in
|
||||
*/*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
|
||||
*) dir=;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Get the suffix-stripped basename of the given path, and save it the
|
||||
# global variable '$base'.
|
||||
set_base_from ()
|
||||
{
|
||||
base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
|
||||
}
|
||||
|
||||
# If no dependency file was actually created by the compiler invocation,
|
||||
# we still have to create a dummy depfile, to avoid errors with the
|
||||
# Makefile "include basename.Plo" scheme.
|
||||
make_dummy_depfile ()
|
||||
{
|
||||
echo "#dummy" > "$depfile"
|
||||
}
|
||||
|
||||
# Factor out some common post-processing of the generated depfile.
|
||||
# Requires the auxiliary global variable '$tmpdepfile' to be set.
|
||||
aix_post_process_depfile ()
|
||||
{
|
||||
# If the compiler actually managed to produce a dependency file,
|
||||
# post-process it.
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form 'foo.o: dependency.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# $object: dependency.h
|
||||
# and one to simply output
|
||||
# dependency.h:
|
||||
# which is needed to avoid the deleted-header problem.
|
||||
{ sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
|
||||
sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
|
||||
} > "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
}
|
||||
|
||||
# A tabulation character.
|
||||
tab=' '
|
||||
# A newline character.
|
||||
nl='
|
||||
'
|
||||
# Character ranges might be problematic outside the C locale.
|
||||
# These definitions help.
|
||||
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
lower=abcdefghijklmnopqrstuvwxyz
|
||||
digits=0123456789
|
||||
alpha=${upper}${lower}
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||
depfile=${depfile-`echo "$object" |
|
||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Avoid interferences from the environment.
|
||||
gccflag= dashmflag=
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
cygpath_u="cygpath -u -f -"
|
||||
if test "$depmode" = msvcmsys; then
|
||||
# This is just like msvisualcpp but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvisualcpp
|
||||
fi
|
||||
|
||||
if test "$depmode" = msvc7msys; then
|
||||
# This is just like msvc7 but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvc7
|
||||
fi
|
||||
|
||||
if test "$depmode" = xlc; then
|
||||
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
|
||||
gccflag=-qmakedep=gcc,-MF
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
||||
## the command line argument order; so add the flags where they
|
||||
## appear in depend2.am. Note that the slowdown incurred here
|
||||
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
||||
*) set fnord "$@" "$arg" ;;
|
||||
esac
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
done
|
||||
"$@"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
|
||||
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
|
||||
## (see the conditional assignment to $gccflag above).
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say). Also, it might not be
|
||||
## supported by the other compilers which use the 'gcc' depmode.
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The second -e expression handles DOS-style file names with drive
|
||||
# letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the "deleted header file" problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
## Some versions of gcc put a space before the ':'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well. hp depmode also adds that space, but also prefixes the VPATH
|
||||
## to the object. Take care to not repeat it in the output.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like '#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
|
||||
| tr "$nl" ' ' >> "$depfile"
|
||||
echo >> "$depfile"
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> "$depfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
xlc)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts '$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$base.u
|
||||
tmpdepfile3=$dir.libs/$base.u
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$dir$base.u
|
||||
tmpdepfile3=$dir$base.u
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
tcc)
|
||||
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
|
||||
# FIXME: That version still under development at the moment of writing.
|
||||
# Make that this statement remains true also for stable, released
|
||||
# versions.
|
||||
# It will wrap lines (doesn't matter whether long or short) with a
|
||||
# trailing '\', as in:
|
||||
#
|
||||
# foo.o : \
|
||||
# foo.c \
|
||||
# foo.h \
|
||||
#
|
||||
# It will put a trailing '\' even on the last line, and will use leading
|
||||
# spaces rather than leading tabs (at least since its commit 0394caf7
|
||||
# "Emit spaces for -MD").
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
|
||||
# We have to change lines of the first kind to '$object: \'.
|
||||
sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
|
||||
# And for each line of the second kind, we have to emit a 'dep.h:'
|
||||
# dummy dependency, to avoid the deleted-header problem.
|
||||
sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
## The order of this option in the case statement is important, since the
|
||||
## shell code in configure will try each of these formats in the order
|
||||
## listed in this file. A plain '-MD' option would be understood by many
|
||||
## compilers, so we must ensure this comes after the gcc and icc options.
|
||||
pgcc)
|
||||
# Portland's C compiler understands '-MD'.
|
||||
# Will always output deps to 'file.d' where file is the root name of the
|
||||
# source file under compilation, even if file resides in a subdirectory.
|
||||
# The object file name does not affect the name of the '.d' file.
|
||||
# pgcc 10.2 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using '\' :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
set_dir_from "$object"
|
||||
# Use the source, not the object, to determine the base name, since
|
||||
# that's sadly what pgcc will do too.
|
||||
set_base_from "$source"
|
||||
tmpdepfile=$base.d
|
||||
|
||||
# For projects that build the same source file twice into different object
|
||||
# files, the pgcc approach of using the *source* file root name can cause
|
||||
# problems in parallel builds. Use a locking strategy to avoid stomping on
|
||||
# the same $tmpdepfile.
|
||||
lockdir=$base.d-lock
|
||||
trap "
|
||||
echo '$0: caught signal, cleaning up...' >&2
|
||||
rmdir '$lockdir'
|
||||
exit 1
|
||||
" 1 2 13 15
|
||||
numtries=100
|
||||
i=$numtries
|
||||
while test $i -gt 0; do
|
||||
# mkdir is a portable test-and-set.
|
||||
if mkdir "$lockdir" 2>/dev/null; then
|
||||
# This process acquired the lock.
|
||||
"$@" -MD
|
||||
stat=$?
|
||||
# Release the lock.
|
||||
rmdir "$lockdir"
|
||||
break
|
||||
else
|
||||
# If the lock is being held by a different process, wait
|
||||
# until the winning process is done or we timeout.
|
||||
while test -d "$lockdir" && test $i -gt 0; do
|
||||
sleep 1
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
fi
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
trap - 1 2 13 15
|
||||
if test $i -le 0; then
|
||||
echo "$0: failed to acquire lock after $numtries attempts" >&2
|
||||
echo "$0: check lockdir '$lockdir'" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp2)
|
||||
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||
# compilers, which have integrated preprocessors. The correct option
|
||||
# to use with these is +Maked; it writes dependencies to a file named
|
||||
# 'foo.d', which lands next to the object file, wherever that
|
||||
# happens to be.
|
||||
# Much of this is similar to the tru64 case; see comments there.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir.libs/$base.d
|
||||
"$@" -Wc,+Maked
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
"$@" +Maked
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add 'dependent.h:' lines.
|
||||
sed -ne '2,${
|
||||
s/^ *//
|
||||
s/ \\*$//
|
||||
s/$/:/
|
||||
p
|
||||
}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in 'foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# Libtool generates 2 separate objects for the 2 libraries. These
|
||||
# two compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
|
||||
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
# Same post-processing that is required for AIX mode.
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
msvc7)
|
||||
if test "$libtool" = yes; then
|
||||
showIncludes=-Wc,-showIncludes
|
||||
else
|
||||
showIncludes=-showIncludes
|
||||
fi
|
||||
"$@" $showIncludes > "$tmpdepfile"
|
||||
stat=$?
|
||||
grep -v '^Note: including file: ' "$tmpdepfile"
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The first sed program below extracts the file names and escapes
|
||||
# backslashes for cygpath. The second sed program outputs the file
|
||||
# name when reading, but also accumulates all include files in the
|
||||
# hold buffer in order to output them again at the end. This only
|
||||
# works with sed implementations that can handle large buffers.
|
||||
sed < "$tmpdepfile" -n '
|
||||
/^Note: including file: *\(.*\)/ {
|
||||
s//\1/
|
||||
s/\\/\\\\/g
|
||||
p
|
||||
}' | $cygpath_u | sort -u | sed -n '
|
||||
s/ /\\ /g
|
||||
s/\(.*\)/'"$tab"'\1 \\/p
|
||||
s/.\(.*\) \\/\1:/
|
||||
H
|
||||
$ {
|
||||
s/.*/'"$tab"'/
|
||||
G
|
||||
p
|
||||
}' >> "$depfile"
|
||||
echo >> "$depfile" # make sure the fragment doesn't end with a backslash
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvc7msys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for ':'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this sed invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no eat=no
|
||||
for arg
|
||||
do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
if test $eat = yes; then
|
||||
eat=no
|
||||
continue
|
||||
fi
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-arch)
|
||||
eat=yes ;;
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix=`echo "$object" | sed 's/^.*\././'`
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
# makedepend may prepend the VPATH from the source file name to the object.
|
||||
# No need to regex-escape $object, excess matching of '.' is harmless.
|
||||
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process the last invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed '1,2d' "$tmpdepfile" \
|
||||
| tr ' ' "$nl" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E \
|
||||
| sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
| sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E 2>/dev/null |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
|
||||
echo "$tab" >> "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvcmsys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
Vendored
+822
@@ -0,0 +1,822 @@
|
||||
# Makefile.in generated by automake 1.16.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = doc
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/asmcfi.m4 \
|
||||
$(top_srcdir)/m4/ax_cc_maxopt.m4 \
|
||||
$(top_srcdir)/m4/ax_cflags_warn_all.m4 \
|
||||
$(top_srcdir)/m4/ax_check_compile_flag.m4 \
|
||||
$(top_srcdir)/m4/ax_compiler_vendor.m4 \
|
||||
$(top_srcdir)/m4/ax_configure_args.m4 \
|
||||
$(top_srcdir)/m4/ax_enable_builddir.m4 \
|
||||
$(top_srcdir)/m4/ax_gcc_archflag.m4 \
|
||||
$(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \
|
||||
$(top_srcdir)/m4/ax_prepend_flag.m4 \
|
||||
$(top_srcdir)/m4/ax_require_defined.m4 \
|
||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
||||
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
||||
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/version.texi \
|
||||
$(srcdir)/stamp-vti $(am__DIST_COMMON)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/fficonfig.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
AM_V_DVIPS = $(am__v_DVIPS_@AM_V@)
|
||||
am__v_DVIPS_ = $(am__v_DVIPS_@AM_DEFAULT_V@)
|
||||
am__v_DVIPS_0 = @echo " DVIPS " $@;
|
||||
am__v_DVIPS_1 =
|
||||
AM_V_MAKEINFO = $(am__v_MAKEINFO_@AM_V@)
|
||||
am__v_MAKEINFO_ = $(am__v_MAKEINFO_@AM_DEFAULT_V@)
|
||||
am__v_MAKEINFO_0 = @echo " MAKEINFO" $@;
|
||||
am__v_MAKEINFO_1 =
|
||||
AM_V_INFOHTML = $(am__v_INFOHTML_@AM_V@)
|
||||
am__v_INFOHTML_ = $(am__v_INFOHTML_@AM_DEFAULT_V@)
|
||||
am__v_INFOHTML_0 = @echo " INFOHTML" $@;
|
||||
am__v_INFOHTML_1 =
|
||||
AM_V_TEXI2DVI = $(am__v_TEXI2DVI_@AM_V@)
|
||||
am__v_TEXI2DVI_ = $(am__v_TEXI2DVI_@AM_DEFAULT_V@)
|
||||
am__v_TEXI2DVI_0 = @echo " TEXI2DVI" $@;
|
||||
am__v_TEXI2DVI_1 =
|
||||
AM_V_TEXI2PDF = $(am__v_TEXI2PDF_@AM_V@)
|
||||
am__v_TEXI2PDF_ = $(am__v_TEXI2PDF_@AM_DEFAULT_V@)
|
||||
am__v_TEXI2PDF_0 = @echo " TEXI2PDF" $@;
|
||||
am__v_TEXI2PDF_1 =
|
||||
AM_V_texinfo = $(am__v_texinfo_@AM_V@)
|
||||
am__v_texinfo_ = $(am__v_texinfo_@AM_DEFAULT_V@)
|
||||
am__v_texinfo_0 = -q
|
||||
am__v_texinfo_1 =
|
||||
AM_V_texidevnull = $(am__v_texidevnull_@AM_V@)
|
||||
am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@)
|
||||
am__v_texidevnull_0 = > /dev/null
|
||||
am__v_texidevnull_1 =
|
||||
INFO_DEPS = $(srcdir)/libffi.info
|
||||
am__TEXINFO_TEX_DIR = $(srcdir)
|
||||
DVIS = libffi.dvi
|
||||
PDFS = libffi.pdf
|
||||
PSS = libffi.ps
|
||||
HTMLS = libffi.html
|
||||
TEXINFOS = libffi.texi
|
||||
TEXI2DVI = texi2dvi
|
||||
TEXI2PDF = $(TEXI2DVI) --pdf --batch
|
||||
MAKEINFOHTML = $(MAKEINFO) --html
|
||||
AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
|
||||
DVIPS = dvips
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__installdirs = "$(DESTDIR)$(infodir)"
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in mdate-sh texinfo.tex
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AM_LTLDFLAGS = @AM_LTLDFLAGS@
|
||||
AM_RUNTESTFLAGS = @AM_RUNTESTFLAGS@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCAS = @CCAS@
|
||||
CCASDEPMODE = @CCASDEPMODE@
|
||||
CCASFLAGS = @CCASFLAGS@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CSCOPE = @CSCOPE@
|
||||
CTAGS = @CTAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
ETAGS = @ETAGS@
|
||||
EXEEXT = @EXEEXT@
|
||||
FFI_EXEC_TRAMPOLINE_TABLE = @FFI_EXEC_TRAMPOLINE_TABLE@
|
||||
FFI_VERSION_NUMBER = @FFI_VERSION_NUMBER@
|
||||
FFI_VERSION_STRING = @FFI_VERSION_STRING@
|
||||
FGREP = @FGREP@
|
||||
FILECMD = @FILECMD@
|
||||
GREP = @GREP@
|
||||
HAVE_LONG_DOUBLE = @HAVE_LONG_DOUBLE@
|
||||
HAVE_LONG_DOUBLE_VARIANT = @HAVE_LONG_DOUBLE_VARIANT@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OPT_LDFLAGS = @OPT_LDFLAGS@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PRTDIAG = @PRTDIAG@
|
||||
RANLIB = @RANLIB@
|
||||
READELF = @READELF@
|
||||
SECTION_LDFLAGS = @SECTION_LDFLAGS@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
TARGET = @TARGET@
|
||||
TARGETDIR = @TARGETDIR@
|
||||
TARGET_OBJ = @TARGET_OBJ@
|
||||
VERSION = @VERSION@
|
||||
WASM64_MEMORY64 = @WASM64_MEMORY64@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
ac_ct_READELF = @ac_ct_READELF@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
ax_enable_builddir_sed = @ax_enable_builddir_sed@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
runstatedir = @runstatedir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sys_symbol_underscore = @sys_symbol_underscore@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
tmake_file = @tmake_file@
|
||||
toolexecdir = @toolexecdir@
|
||||
toolexeclibdir = @toolexeclibdir@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
info_TEXINFOS = libffi.texi
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .dvi .html .info .pdf .ps .texi
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu doc/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
.texi.info:
|
||||
$(AM_V_MAKEINFO)restore=: && backupdir="$(am__leading_dot)am$$$$" && \
|
||||
am__cwd=`pwd` && $(am__cd) $(srcdir) && \
|
||||
rm -rf $$backupdir && mkdir $$backupdir && \
|
||||
if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
|
||||
for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
|
||||
if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
|
||||
done; \
|
||||
else :; fi && \
|
||||
cd "$$am__cwd"; \
|
||||
if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
|
||||
-o $@ $<; \
|
||||
then \
|
||||
rc=0; \
|
||||
$(am__cd) $(srcdir); \
|
||||
else \
|
||||
rc=$$?; \
|
||||
$(am__cd) $(srcdir) && \
|
||||
$$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
|
||||
fi; \
|
||||
rm -rf $$backupdir; exit $$rc
|
||||
|
||||
.texi.dvi:
|
||||
$(AM_V_TEXI2DVI)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
|
||||
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
|
||||
$(TEXI2DVI) $(AM_V_texinfo) --build-dir=$(@:.dvi=.t2d) -o $@ $(AM_V_texidevnull) \
|
||||
$<
|
||||
|
||||
.texi.pdf:
|
||||
$(AM_V_TEXI2PDF)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
|
||||
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
|
||||
$(TEXI2PDF) $(AM_V_texinfo) --build-dir=$(@:.pdf=.t2p) -o $@ $(AM_V_texidevnull) \
|
||||
$<
|
||||
|
||||
.texi.html:
|
||||
$(AM_V_MAKEINFO)rm -rf $(@:.html=.htp)
|
||||
$(AM_V_at)if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
|
||||
-o $(@:.html=.htp) $<; \
|
||||
then \
|
||||
rm -rf $@ && mv $(@:.html=.htp) $@; \
|
||||
else \
|
||||
rm -rf $(@:.html=.htp); exit 1; \
|
||||
fi
|
||||
$(srcdir)/libffi.info: libffi.texi $(srcdir)/version.texi
|
||||
libffi.dvi: libffi.texi $(srcdir)/version.texi
|
||||
libffi.pdf: libffi.texi $(srcdir)/version.texi
|
||||
libffi.html: libffi.texi $(srcdir)/version.texi
|
||||
$(srcdir)/version.texi: @MAINTAINER_MODE_TRUE@ $(srcdir)/stamp-vti
|
||||
$(srcdir)/stamp-vti: libffi.texi $(top_srcdir)/configure
|
||||
@(dir=.; test -f ./libffi.texi || dir=$(srcdir); \
|
||||
set `$(SHELL) $(srcdir)/mdate-sh $$dir/libffi.texi`; \
|
||||
echo "@set UPDATED $$1 $$2 $$3"; \
|
||||
echo "@set UPDATED-MONTH $$2 $$3"; \
|
||||
echo "@set EDITION $(VERSION)"; \
|
||||
echo "@set VERSION $(VERSION)") > vti.tmp$$$$ && \
|
||||
(cmp -s vti.tmp$$$$ $(srcdir)/version.texi \
|
||||
|| (echo "Updating $(srcdir)/version.texi" && \
|
||||
cp vti.tmp$$$$ $(srcdir)/version.texi.tmp$$$$ && \
|
||||
mv $(srcdir)/version.texi.tmp$$$$ $(srcdir)/version.texi)) && \
|
||||
rm -f vti.tmp$$$$ $(srcdir)/version.texi.$$$$
|
||||
@cp $(srcdir)/version.texi $@
|
||||
|
||||
mostlyclean-vti:
|
||||
-rm -f vti.tmp* $(srcdir)/version.texi.tmp*
|
||||
|
||||
maintainer-clean-vti:
|
||||
@MAINTAINER_MODE_TRUE@ -rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi
|
||||
.dvi.ps:
|
||||
$(AM_V_DVIPS)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
|
||||
$(DVIPS) $(AM_V_texinfo) -o $@ $<
|
||||
|
||||
uninstall-dvi-am:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(DVIS)'; test -n "$(dvidir)" || list=; \
|
||||
for p in $$list; do \
|
||||
$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(dvidir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-html-am:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(HTMLS)'; test -n "$(htmldir)" || list=; \
|
||||
for p in $$list; do \
|
||||
$(am__strip_dir) \
|
||||
echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \
|
||||
rm -rf "$(DESTDIR)$(htmldir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-info-am:
|
||||
@$(PRE_UNINSTALL)
|
||||
@if test -d '$(DESTDIR)$(infodir)' && $(am__can_run_installinfo); then \
|
||||
list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
relfile=`echo "$$file" | sed 's|^.*/||'`; \
|
||||
echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
|
||||
if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
|
||||
then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \
|
||||
done; \
|
||||
else :; fi
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
relfile=`echo "$$file" | sed 's|^.*/||'`; \
|
||||
relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
|
||||
(if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \
|
||||
echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
|
||||
rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
|
||||
else :; fi); \
|
||||
done
|
||||
|
||||
uninstall-pdf-am:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
|
||||
for p in $$list; do \
|
||||
$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(pdfdir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-ps-am:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(PSS)'; test -n "$(psdir)" || list=; \
|
||||
for p in $$list; do \
|
||||
$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(psdir)/$$f"; \
|
||||
done
|
||||
|
||||
dist-info: $(INFO_DEPS)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(INFO_DEPS)'; \
|
||||
for base in $$list; do \
|
||||
case $$base in \
|
||||
$(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
esac; \
|
||||
if test -f $$base; then d=.; else d=$(srcdir); fi; \
|
||||
base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \
|
||||
for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \
|
||||
if test -f $$file; then \
|
||||
relfile=`expr "$$file" : "$$d/\(.*\)"`; \
|
||||
test -f "$(distdir)/$$relfile" || \
|
||||
cp -p $$file "$(distdir)/$$relfile"; \
|
||||
else :; fi; \
|
||||
done; \
|
||||
done
|
||||
|
||||
mostlyclean-aminfo:
|
||||
-rm -rf libffi.t2d libffi.t2p
|
||||
|
||||
clean-aminfo:
|
||||
-test -z "libffi.dvi libffi.pdf libffi.ps libffi.html" \
|
||||
|| rm -rf libffi.dvi libffi.pdf libffi.ps libffi.html
|
||||
|
||||
maintainer-clean-aminfo:
|
||||
@list='$(INFO_DEPS)'; for i in $$list; do \
|
||||
i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
|
||||
echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
|
||||
rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
|
||||
done
|
||||
tags TAGS:
|
||||
|
||||
ctags CTAGS:
|
||||
|
||||
cscope cscopelist:
|
||||
|
||||
distdir: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||
|
||||
distdir-am: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$(top_distdir)" distdir="$(distdir)" \
|
||||
dist-info
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(INFO_DEPS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(infodir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-aminfo clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am: $(DVIS)
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am: $(HTMLS)
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am: $(INFO_DEPS)
|
||||
|
||||
install-data-am: install-info-am
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am: $(DVIS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(DVIS)'; test -n "$(dvidir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(dvidir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(dvidir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \
|
||||
done
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am: $(HTMLS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
$(am__strip_dir) \
|
||||
d2=$$d$$p; \
|
||||
if test -d "$$d2"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
|
||||
echo " $(INSTALL_DATA) '$$d2'/* '$(DESTDIR)$(htmldir)/$$f'"; \
|
||||
$(INSTALL_DATA) "$$d2"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \
|
||||
else \
|
||||
list2="$$list2 $$d2"; \
|
||||
fi; \
|
||||
done; \
|
||||
test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
|
||||
done; }
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am: $(INFO_DEPS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(infodir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(infodir)" || exit 1; \
|
||||
fi; \
|
||||
for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
esac; \
|
||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
||||
file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
|
||||
for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
|
||||
$$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
|
||||
if test -f $$ifile; then \
|
||||
echo "$$ifile"; \
|
||||
else : ; fi; \
|
||||
done; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done
|
||||
@$(POST_INSTALL)
|
||||
@if $(am__can_run_installinfo); then \
|
||||
list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
|
||||
for file in $$list; do \
|
||||
relfile=`echo "$$file" | sed 's|^.*/||'`; \
|
||||
echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
|
||||
install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
|
||||
done; \
|
||||
else : ; fi
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am: $(PDFS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(pdfdir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(pdfdir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am: $(PSS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(PSS)'; test -n "$(psdir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(psdir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(psdir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-aminfo \
|
||||
maintainer-clean-generic maintainer-clean-vti
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-aminfo mostlyclean-generic \
|
||||
mostlyclean-libtool mostlyclean-vti
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am: $(PDFS)
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am: $(PSS)
|
||||
|
||||
uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \
|
||||
uninstall-pdf-am uninstall-ps-am
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-aminfo clean-generic \
|
||||
clean-libtool cscopelist-am ctags-am dist-info distclean \
|
||||
distclean-generic distclean-libtool distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am install-info \
|
||||
install-info-am install-man install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-aminfo maintainer-clean-generic \
|
||||
maintainer-clean-vti mostlyclean mostlyclean-aminfo \
|
||||
mostlyclean-generic mostlyclean-libtool mostlyclean-vti pdf \
|
||||
pdf-am ps ps-am tags-am uninstall uninstall-am \
|
||||
uninstall-dvi-am uninstall-html-am uninstall-info-am \
|
||||
uninstall-pdf-am uninstall-ps-am
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
Vendored
+1090
File diff suppressed because it is too large.
Load diff
Vendored
BIN
Binary file not shown.
Vendored
+7
@@ -840,6 +840,13 @@ corresponding executable address.
|
||||
@defun void ffi_closure_free (void *@var{writable})
|
||||
Free memory allocated using @code{ffi_closure_alloc}. The argument is
|
||||
the writable address that was returned.
|
||||
|
||||
It is not safe to free a closure while it may still be invoked, including
|
||||
from within the closure's own callback (that is, you must not free a closure
|
||||
from the function it dispatches to while that call is in progress). Doing so
|
||||
frees the executable trampoline that is still in use. The caller is
|
||||
responsible for ensuring no thread is, or can begin, calling the closure
|
||||
before it is freed.
|
||||
@end defun
|
||||
|
||||
Once you have allocated the memory for a closure, you must construct a
|
||||
|
||||
+228
@@ -0,0 +1,228 @@
|
||||
#!/bin/sh
|
||||
# Get modification time of a file or directory and pretty-print it.
|
||||
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
|
||||
# Copyright (C) 1995-2021 Free Software Foundation, Inc.
|
||||
# written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
|
||||
emulate sh
|
||||
NULLCMD=:
|
||||
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
|
||||
# is contrary to our usage. Disable this feature.
|
||||
alias -g '${1+"$@"}'='"$@"'
|
||||
setopt NO_GLOB_SUBST
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No file. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: mdate-sh [--help] [--version] FILE
|
||||
|
||||
Pretty-print the modification day of FILE, in the format:
|
||||
1 January 1970
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "mdate-sh $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
error ()
|
||||
{
|
||||
echo "$0: $1" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
# Prevent date giving response in another language.
|
||||
LANG=C
|
||||
export LANG
|
||||
LC_ALL=C
|
||||
export LC_ALL
|
||||
LC_TIME=C
|
||||
export LC_TIME
|
||||
|
||||
# Use UTC to get reproducible result.
|
||||
TZ=UTC0
|
||||
export TZ
|
||||
|
||||
# GNU ls changes its time format in response to the TIME_STYLE
|
||||
# variable. Since we cannot assume 'unset' works, revert this
|
||||
# variable to its documented default.
|
||||
if test "${TIME_STYLE+set}" = set; then
|
||||
TIME_STYLE=posix-long-iso
|
||||
export TIME_STYLE
|
||||
fi
|
||||
|
||||
save_arg1=$1
|
||||
|
||||
# Find out how to get the extended ls output of a file or directory.
|
||||
if ls -L /dev/null 1>/dev/null 2>&1; then
|
||||
ls_command='ls -L -l -d'
|
||||
else
|
||||
ls_command='ls -l -d'
|
||||
fi
|
||||
# Avoid user/group names that might have spaces, when possible.
|
||||
if ls -n /dev/null 1>/dev/null 2>&1; then
|
||||
ls_command="$ls_command -n"
|
||||
fi
|
||||
|
||||
# A 'ls -l' line looks as follows on OS/2.
|
||||
# drwxrwx--- 0 Aug 11 2001 foo
|
||||
# This differs from Unix, which adds ownership information.
|
||||
# drwxrwx--- 2 root root 4096 Aug 11 2001 foo
|
||||
#
|
||||
# To find the date, we split the line on spaces and iterate on words
|
||||
# until we find a month. This cannot work with files whose owner is a
|
||||
# user named "Jan", or "Feb", etc. However, it's unlikely that '/'
|
||||
# will be owned by a user whose name is a month. So we first look at
|
||||
# the extended ls output of the root directory to decide how many
|
||||
# words should be skipped to get the date.
|
||||
|
||||
# On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below.
|
||||
set x`$ls_command /`
|
||||
|
||||
# Find which argument is the month.
|
||||
month=
|
||||
command=
|
||||
until test $month
|
||||
do
|
||||
test $# -gt 0 || error "failed parsing '$ls_command /' output"
|
||||
shift
|
||||
# Add another shift to the command.
|
||||
command="$command shift;"
|
||||
case $1 in
|
||||
Jan) month=January; nummonth=1;;
|
||||
Feb) month=February; nummonth=2;;
|
||||
Mar) month=March; nummonth=3;;
|
||||
Apr) month=April; nummonth=4;;
|
||||
May) month=May; nummonth=5;;
|
||||
Jun) month=June; nummonth=6;;
|
||||
Jul) month=July; nummonth=7;;
|
||||
Aug) month=August; nummonth=8;;
|
||||
Sep) month=September; nummonth=9;;
|
||||
Oct) month=October; nummonth=10;;
|
||||
Nov) month=November; nummonth=11;;
|
||||
Dec) month=December; nummonth=12;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -n "$month" || error "failed parsing '$ls_command /' output"
|
||||
|
||||
# Get the extended ls output of the file or directory.
|
||||
set dummy x`eval "$ls_command \"\\\$save_arg1\""`
|
||||
|
||||
# Remove all preceding arguments
|
||||
eval $command
|
||||
|
||||
# Because of the dummy argument above, month is in $2.
|
||||
#
|
||||
# On a POSIX system, we should have
|
||||
#
|
||||
# $# = 5
|
||||
# $1 = file size
|
||||
# $2 = month
|
||||
# $3 = day
|
||||
# $4 = year or time
|
||||
# $5 = filename
|
||||
#
|
||||
# On Darwin 7.7.0 and 7.6.0, we have
|
||||
#
|
||||
# $# = 4
|
||||
# $1 = day
|
||||
# $2 = month
|
||||
# $3 = year or time
|
||||
# $4 = filename
|
||||
|
||||
# Get the month.
|
||||
case $2 in
|
||||
Jan) month=January; nummonth=1;;
|
||||
Feb) month=February; nummonth=2;;
|
||||
Mar) month=March; nummonth=3;;
|
||||
Apr) month=April; nummonth=4;;
|
||||
May) month=May; nummonth=5;;
|
||||
Jun) month=June; nummonth=6;;
|
||||
Jul) month=July; nummonth=7;;
|
||||
Aug) month=August; nummonth=8;;
|
||||
Sep) month=September; nummonth=9;;
|
||||
Oct) month=October; nummonth=10;;
|
||||
Nov) month=November; nummonth=11;;
|
||||
Dec) month=December; nummonth=12;;
|
||||
esac
|
||||
|
||||
case $3 in
|
||||
???*) day=$1;;
|
||||
*) day=$3; shift;;
|
||||
esac
|
||||
|
||||
# Here we have to deal with the problem that the ls output gives either
|
||||
# the time of day or the year.
|
||||
case $3 in
|
||||
*:*) set `date`; eval year=\$$#
|
||||
case $2 in
|
||||
Jan) nummonthtod=1;;
|
||||
Feb) nummonthtod=2;;
|
||||
Mar) nummonthtod=3;;
|
||||
Apr) nummonthtod=4;;
|
||||
May) nummonthtod=5;;
|
||||
Jun) nummonthtod=6;;
|
||||
Jul) nummonthtod=7;;
|
||||
Aug) nummonthtod=8;;
|
||||
Sep) nummonthtod=9;;
|
||||
Oct) nummonthtod=10;;
|
||||
Nov) nummonthtod=11;;
|
||||
Dec) nummonthtod=12;;
|
||||
esac
|
||||
# For the first six month of the year the time notation can also
|
||||
# be used for files modified in the last year.
|
||||
if (expr $nummonth \> $nummonthtod) > /dev/null;
|
||||
then
|
||||
year=`expr $year - 1`
|
||||
fi;;
|
||||
*) year=$3;;
|
||||
esac
|
||||
|
||||
# The result.
|
||||
echo $day $month $year
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
@set UPDATED 20 June 2026
|
||||
@set UPDATED-MONTH June 2026
|
||||
@set EDITION 3.6.0
|
||||
@set VERSION 3.6.0
|
||||
+11612
File diff suppressed because it is too large.
Load diff
Vendored
+4
-4
@@ -1,4 +1,4 @@
|
||||
@set UPDATED 2 August 2025
|
||||
@set UPDATED-MONTH August 2025
|
||||
@set EDITION 3.5.2
|
||||
@set VERSION 3.5.2
|
||||
@set UPDATED 20 June 2026
|
||||
@set UPDATED-MONTH June 2026
|
||||
@set EDITION 3.6.0
|
||||
@set VERSION 3.6.0
|
||||
Vendored
+191
@@ -0,0 +1,191 @@
|
||||
/* fficonfig.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define if building universal (internal helper macro) */
|
||||
#undef AC_APPLE_UNIVERSAL_BUILD
|
||||
|
||||
/* Define to the flags needed for the .section .eh_frame directive. */
|
||||
#undef EH_FRAME_FLAGS
|
||||
|
||||
/* Define this if you want extra debugging. */
|
||||
#undef FFI_DEBUG
|
||||
|
||||
/* Define this if you want statically defined trampolines */
|
||||
#undef FFI_EXEC_STATIC_TRAMP
|
||||
|
||||
/* Cannot use PROT_EXEC on this target, so, we revert to alternative means */
|
||||
#undef FFI_EXEC_TRAMPOLINE_TABLE
|
||||
|
||||
/* Define this if you want to enable pax emulated trampolines (experimental)
|
||||
*/
|
||||
#undef FFI_MMAP_EXEC_EMUTRAMP_PAX
|
||||
|
||||
/* Cannot use malloc on this target, so, we revert to alternative means */
|
||||
#undef FFI_MMAP_EXEC_WRIT
|
||||
|
||||
/* Define this if you do not want support for the raw API. */
|
||||
#undef FFI_NO_RAW_API
|
||||
|
||||
/* Define this if you do not want support for aggregate types. */
|
||||
#undef FFI_NO_STRUCTS
|
||||
|
||||
/* Define to 1 if you have the <alloca.h> header file. */
|
||||
#undef HAVE_ALLOCA_H
|
||||
|
||||
/* Define if your compiler supports pointer authentication. */
|
||||
#undef HAVE_ARM64E_PTRAUTH
|
||||
|
||||
/* Define if your assembler supports .cfi_* directives. */
|
||||
#undef HAVE_AS_CFI_PSEUDO_OP
|
||||
|
||||
/* Define if your assembler supports .register. */
|
||||
#undef HAVE_AS_REGISTER_PSEUDO_OP
|
||||
|
||||
/* Define if the compiler uses zarch features. */
|
||||
#undef HAVE_AS_S390_ZARCH
|
||||
|
||||
/* Define if your assembler and linker support unaligned PC relative relocs.
|
||||
*/
|
||||
#undef HAVE_AS_SPARC_UA_PCREL
|
||||
|
||||
/* Define if your assembler supports unwind section type. */
|
||||
#undef HAVE_AS_X86_64_UNWIND_SECTION_TYPE
|
||||
|
||||
/* Define if your assembler supports PC relative relocs. */
|
||||
#undef HAVE_AS_X86_PCREL
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define if __attribute__((visibility("hidden"))) is supported. */
|
||||
#undef HAVE_HIDDEN_VISIBILITY_ATTRIBUTE
|
||||
|
||||
/* Define if __int128_t and __uint128_t are supported. */
|
||||
#undef HAVE_INT128
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define if you have the long double type and it is bigger than a double */
|
||||
#undef HAVE_LONG_DOUBLE
|
||||
|
||||
/* Define if you support more than one size of the long double type */
|
||||
#undef HAVE_LONG_DOUBLE_VARIANT
|
||||
|
||||
/* Define to 1 if you have the `memcpy' function. */
|
||||
#undef HAVE_MEMCPY
|
||||
|
||||
/* Define to 1 if you have the `memfd_create' function. */
|
||||
#undef HAVE_MEMFD_CREATE
|
||||
|
||||
/* Define if .eh_frame sections should be read-only. */
|
||||
#undef HAVE_RO_EH_FRAME
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdio.h> header file. */
|
||||
#undef HAVE_STDIO_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <sys/memfd.h> header file. */
|
||||
#undef HAVE_SYS_MEMFD_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to 1 if GNU symbol versioning is used for libatomic. */
|
||||
#undef LIBFFI_GNU_SYMBOL_VERSIONING
|
||||
|
||||
/* Define to the sub-directory where libtool stores uninstalled libraries. */
|
||||
#undef LT_OBJDIR
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#undef PACKAGE_URL
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* The size of `double', as computed by sizeof. */
|
||||
#undef SIZEOF_DOUBLE
|
||||
|
||||
/* The size of `long double', as computed by sizeof. */
|
||||
#undef SIZEOF_LONG_DOUBLE
|
||||
|
||||
/* The size of `size_t', as computed by sizeof. */
|
||||
#undef SIZEOF_SIZE_T
|
||||
|
||||
/* Define to 1 if all of the C90 standard headers exist (not just the ones
|
||||
required in a freestanding environment). This macro is provided for
|
||||
backward compatibility; new code need not use it. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define if symbols are underscored. */
|
||||
#undef SYMBOL_UNDERSCORE
|
||||
|
||||
/* Define this if you are using Purify and want to suppress spurious messages.
|
||||
*/
|
||||
#undef USING_PURIFY
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
||||
significant byte first (like Motorola and SPARC, unlike Intel). */
|
||||
#if defined AC_APPLE_UNIVERSAL_BUILD
|
||||
# if defined __BIG_ENDIAN__
|
||||
# define WORDS_BIGENDIAN 1
|
||||
# endif
|
||||
#else
|
||||
# ifndef WORDS_BIGENDIAN
|
||||
# undef WORDS_BIGENDIAN
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAVE_HIDDEN_VISIBILITY_ATTRIBUTE
|
||||
#ifdef LIBFFI_ASM
|
||||
#ifdef __APPLE__
|
||||
#define FFI_HIDDEN(name) .private_extern name
|
||||
#else
|
||||
#define FFI_HIDDEN(name) .hidden name
|
||||
#endif
|
||||
#else
|
||||
#define FFI_HIDDEN __attribute__ ((visibility ("hidden")))
|
||||
#endif
|
||||
#else
|
||||
#ifdef LIBFFI_ASM
|
||||
#define FFI_HIDDEN(name)
|
||||
#else
|
||||
#define FFI_HIDDEN
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Vendored
+3
-3
@@ -7,8 +7,8 @@ import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
LIBFFI_VERSION = '3.5.2'
|
||||
LIBFFI_VERSION_NUMBER = '30502'
|
||||
LIBFFI_VERSION = '3.6.0'
|
||||
LIBFFI_VERSION_NUMBER = '30600'
|
||||
|
||||
def normalize_arch(target_arch):
|
||||
aliases = {
|
||||
@@ -45,7 +45,7 @@ def get_target(os_name, target_arch):
|
||||
return ('RISCV', 'riscv')
|
||||
|
||||
if target_arch == 'loong64':
|
||||
return ('LOONGARCH64', 'loongarch64')
|
||||
return ('LOONGARCH64', 'loongarch')
|
||||
|
||||
if target_arch in ('mips', 'mipsel', 'mips64el'):
|
||||
if os_name in ('freebsd', 'linux', 'openbsd'):
|
||||
|
||||
Vendored
+613
@@ -0,0 +1,613 @@
|
||||
# Makefile.in generated by automake 1.16.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = include
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/asmcfi.m4 \
|
||||
$(top_srcdir)/m4/ax_cc_maxopt.m4 \
|
||||
$(top_srcdir)/m4/ax_cflags_warn_all.m4 \
|
||||
$(top_srcdir)/m4/ax_check_compile_flag.m4 \
|
||||
$(top_srcdir)/m4/ax_compiler_vendor.m4 \
|
||||
$(top_srcdir)/m4/ax_configure_args.m4 \
|
||||
$(top_srcdir)/m4/ax_enable_builddir.m4 \
|
||||
$(top_srcdir)/m4/ax_gcc_archflag.m4 \
|
||||
$(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \
|
||||
$(top_srcdir)/m4/ax_prepend_flag.m4 \
|
||||
$(top_srcdir)/m4/ax_require_defined.m4 \
|
||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
||||
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
||||
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
|
||||
$(am__DIST_COMMON)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/fficonfig.h
|
||||
CONFIG_CLEAN_FILES = ffi.h
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
am__installdirs = "$(DESTDIR)$(includedir)"
|
||||
HEADERS = $(nodist_include_HEADERS) $(noinst_HEADERS)
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/ffi.h.in
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AM_LTLDFLAGS = @AM_LTLDFLAGS@
|
||||
AM_RUNTESTFLAGS = @AM_RUNTESTFLAGS@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCAS = @CCAS@
|
||||
CCASDEPMODE = @CCASDEPMODE@
|
||||
CCASFLAGS = @CCASFLAGS@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CSCOPE = @CSCOPE@
|
||||
CTAGS = @CTAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
ETAGS = @ETAGS@
|
||||
EXEEXT = @EXEEXT@
|
||||
FFI_EXEC_TRAMPOLINE_TABLE = @FFI_EXEC_TRAMPOLINE_TABLE@
|
||||
FFI_VERSION_NUMBER = @FFI_VERSION_NUMBER@
|
||||
FFI_VERSION_STRING = @FFI_VERSION_STRING@
|
||||
FGREP = @FGREP@
|
||||
FILECMD = @FILECMD@
|
||||
GREP = @GREP@
|
||||
HAVE_LONG_DOUBLE = @HAVE_LONG_DOUBLE@
|
||||
HAVE_LONG_DOUBLE_VARIANT = @HAVE_LONG_DOUBLE_VARIANT@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OPT_LDFLAGS = @OPT_LDFLAGS@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PRTDIAG = @PRTDIAG@
|
||||
RANLIB = @RANLIB@
|
||||
READELF = @READELF@
|
||||
SECTION_LDFLAGS = @SECTION_LDFLAGS@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
TARGET = @TARGET@
|
||||
TARGETDIR = @TARGETDIR@
|
||||
TARGET_OBJ = @TARGET_OBJ@
|
||||
VERSION = @VERSION@
|
||||
WASM64_MEMORY64 = @WASM64_MEMORY64@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
ac_ct_READELF = @ac_ct_READELF@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
ax_enable_builddir_sed = @ax_enable_builddir_sed@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
runstatedir = @runstatedir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sys_symbol_underscore = @sys_symbol_underscore@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
tmake_file = @tmake_file@
|
||||
toolexecdir = @toolexecdir@
|
||||
toolexeclibdir = @toolexeclibdir@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
DISTCLEANFILES = ffitarget.h
|
||||
noinst_HEADERS = ffi_common.h ffi_cfi.h tramp.h
|
||||
EXTRA_DIST = ffi.h.in
|
||||
nodist_include_HEADERS = ffi.h ffitarget.h
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign include/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
ffi.h: $(top_builddir)/config.status $(srcdir)/ffi.h.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
install-nodist_includeHEADERS: $(nodist_include_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
|
||||
$(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
|
||||
done
|
||||
|
||||
uninstall-nodist_includeHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
|
||||
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-am
|
||||
TAGS: tags
|
||||
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: ctags-am
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscopelist: cscopelist-am
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
distdir: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||
|
||||
distdir-am: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(HEADERS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(includedir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-nodist_includeHEADERS
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-nodist_includeHEADERS
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool cscopelist-am ctags ctags-am distclean \
|
||||
distclean-generic distclean-libtool distclean-tags distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man \
|
||||
install-nodist_includeHEADERS install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
|
||||
uninstall-am uninstall-nodist_includeHEADERS
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
Vendored
+13
-1
@@ -77,9 +77,11 @@ extern "C" {
|
||||
#define FFI_TYPE_STRUCT 13
|
||||
#define FFI_TYPE_POINTER 14
|
||||
#define FFI_TYPE_COMPLEX 15
|
||||
#define FFI_TYPE_UINT128 16
|
||||
#define FFI_TYPE_SINT128 17
|
||||
|
||||
/* This should always refer to the last type code (for sanity checks). */
|
||||
#define FFI_TYPE_LAST FFI_TYPE_COMPLEX
|
||||
#define FFI_TYPE_LAST FFI_TYPE_SINT128
|
||||
|
||||
#include <ffitarget.h>
|
||||
|
||||
@@ -227,6 +229,11 @@ FFI_EXTERN ffi_type ffi_type_complex_float;
|
||||
FFI_EXTERN ffi_type ffi_type_complex_double;
|
||||
FFI_EXTERN ffi_type ffi_type_complex_longdouble;
|
||||
#endif
|
||||
|
||||
#ifdef FFI_TARGET_HAS_INT128
|
||||
FFI_EXTERN ffi_type ffi_type_uint128;
|
||||
FFI_EXTERN ffi_type ffi_type_sint128;
|
||||
#endif
|
||||
#endif /* LIBFFI_HIDE_BASIC_TYPES */
|
||||
|
||||
typedef enum {
|
||||
@@ -344,6 +351,11 @@ typedef struct {
|
||||
void *trampoline_table;
|
||||
void *trampoline_table_entry;
|
||||
#else
|
||||
/* Anonymous unions are C11 (a GNU extension in C99); __extension__ keeps
|
||||
the field names without tripping -Wpedantic under -std=c99 (#795). */
|
||||
#ifdef __GNUC__
|
||||
__extension__
|
||||
#endif
|
||||
union {
|
||||
char tramp[FFI_TRAMPOLINE_SIZE];
|
||||
void *ftramp;
|
||||
|
||||
+541
@@ -0,0 +1,541 @@
|
||||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2020-11-14.01; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# 'make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
|
||||
tab=' '
|
||||
nl='
|
||||
'
|
||||
IFS=" $tab$nl"
|
||||
|
||||
# Set DOITPROG to "echo" to test this script.
|
||||
|
||||
doit=${DOITPROG-}
|
||||
doit_exec=${doit:-exec}
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
chgrpprog=${CHGRPPROG-chgrp}
|
||||
chmodprog=${CHMODPROG-chmod}
|
||||
chownprog=${CHOWNPROG-chown}
|
||||
cmpprog=${CMPPROG-cmp}
|
||||
cpprog=${CPPROG-cp}
|
||||
mkdirprog=${MKDIRPROG-mkdir}
|
||||
mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
# Create dirs (including intermediate dirs) using mode 755.
|
||||
# This is like GNU 'install' as of coreutils 8.32 (2020).
|
||||
mkdir_umask=22
|
||||
|
||||
backupsuffix=
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
mvcmd=$mvprog
|
||||
rmcmd="$rmprog -f"
|
||||
stripcmd=
|
||||
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
is_target_a_directory=possibly
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-p pass -p to $cpprog.
|
||||
-s $stripprog installed files.
|
||||
-S SUFFIX attempt to back up existing files, with suffix SUFFIX.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
|
||||
By default, rm is invoked with -f; when overridden with RMPROG,
|
||||
it's up to you to specify -f if you want it.
|
||||
|
||||
If -S is not specified, no backups are attempted.
|
||||
|
||||
Email bug reports to bug-automake@gnu.org.
|
||||
Automake home page: https://www.gnu.org/software/automake/
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) ;;
|
||||
|
||||
-C) copy_on_change=true;;
|
||||
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-p) cpprog="$cpprog -p";;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-S) backupsuffix="$2"
|
||||
shift;;
|
||||
|
||||
-t)
|
||||
is_target_a_directory=always
|
||||
dst_arg=$2
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-T) is_target_a_directory=never;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# We allow the use of options -d and -T together, by making -d
|
||||
# take the precedence; this is for compatibility with GNU install.
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
if test -n "$dst_arg"; then
|
||||
echo "$0: target directory not allowed when installing a directory." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dst_arg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dst_arg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call 'install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
if test $# -gt 1 || test "$is_target_a_directory" = always; then
|
||||
if test ! -d "$dst_arg"; then
|
||||
echo "$0: $dst_arg: Is not a directory." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
do_exit='(exit $ret); exit $ret'
|
||||
trap "ret=129; $do_exit" 1
|
||||
trap "ret=130; $do_exit" 2
|
||||
trap "ret=141; $do_exit" 13
|
||||
trap "ret=143; $do_exit" 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $src in
|
||||
-* | [=\(\)!]) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
# Don't chown directories that already exist.
|
||||
if test $dstdir_status = 0; then
|
||||
chowncmd=""
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dst_arg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
dst=$dst_arg
|
||||
|
||||
# If destination is a directory, append the input filename.
|
||||
if test -d "$dst"; then
|
||||
if test "$is_target_a_directory" = never; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dstbase=`basename "$src"`
|
||||
case $dst in
|
||||
*/) dst=$dst$dstbase;;
|
||||
*) dst=$dst/$dstbase;;
|
||||
esac
|
||||
dstdir_status=0
|
||||
else
|
||||
dstdir=`dirname "$dst"`
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
case $dstdir in
|
||||
*/) dstdirslash=$dstdir;;
|
||||
*) dstdirslash=$dstdir/;;
|
||||
esac
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
# The $RANDOM variable is not portable (e.g., dash). Use it
|
||||
# here however when possible just to lower collision chance.
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
|
||||
trap '
|
||||
ret=$?
|
||||
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
|
||||
exit $ret
|
||||
' 0
|
||||
|
||||
# Because "mkdir -p" follows existing symlinks and we likely work
|
||||
# directly in world-writeable /tmp, make sure that the '$tmpdir'
|
||||
# directory is successfully created first before we actually test
|
||||
# 'mkdir -p'.
|
||||
if (umask $mkdir_umask &&
|
||||
$mkdirprog $mkdir_mode "$tmpdir" &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
test_tmpdir="$tmpdir/a"
|
||||
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
[-=\(\)!]*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test X"$d" = X && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=${dstdirslash}_inst.$$_
|
||||
rmtmp=${dstdirslash}_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask &&
|
||||
{ test -z "$stripcmd" || {
|
||||
# Create $dsttmp read-write so that cp doesn't create it read-only,
|
||||
# which would cause strip to fail.
|
||||
if test -z "$doit"; then
|
||||
: >"$dsttmp" # No need to fork-exec 'touch'.
|
||||
else
|
||||
$doit touch "$dsttmp"
|
||||
fi
|
||||
}
|
||||
} &&
|
||||
$doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
set +f &&
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# If $backupsuffix is set, and the file being installed
|
||||
# already exists, attempt a backup. Don't worry if it fails,
|
||||
# e.g., if mv doesn't support -f.
|
||||
if test -n "$backupsuffix" && test -f "$dst"; then
|
||||
$doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
|
||||
fi
|
||||
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
Vendored
+3
-3
@@ -92,8 +92,8 @@
|
||||
['target_arch == "loong64"', {
|
||||
'variables': {
|
||||
'libffi_arch_sources': [
|
||||
'src/loongarch64/ffi.c',
|
||||
'src/loongarch64/sysv.S',
|
||||
'src/loongarch/ffi.c',
|
||||
'src/loongarch/sysv.S',
|
||||
],
|
||||
},
|
||||
}],
|
||||
@@ -180,7 +180,7 @@
|
||||
'include/ffi.h.in',
|
||||
'src/aarch64/ffitarget.h',
|
||||
'src/arm/ffitarget.h',
|
||||
'src/loongarch64/ffitarget.h',
|
||||
'src/loongarch/ffitarget.h',
|
||||
'src/mips/ffitarget.h',
|
||||
'src/powerpc/ffitarget.h',
|
||||
'src/riscv/ffitarget.h',
|
||||
|
||||
Vendored
+8
@@ -91,3 +91,11 @@ LIBFFI_GO_CLOSURE_8.0 {
|
||||
ffi_prep_go_closure;
|
||||
} LIBFFI_CLOSURE_8.0;
|
||||
#endif
|
||||
|
||||
#ifdef FFI_TARGET_HAS_INT128
|
||||
LIBFFI_INT128_8.3 {
|
||||
global:
|
||||
ffi_type_sint128;
|
||||
ffi_type_uint128;
|
||||
} LIBFFI_BASE_8.1;
|
||||
#endif
|
||||
Vendored
+1
-1
@@ -26,4 +26,4 @@
|
||||
# release, then set age to 0.
|
||||
#
|
||||
# CURRENT:REVISION:AGE
|
||||
10:0:2
|
||||
11:1:3
|
||||
+11436
File diff suppressed because it is too large.
Load diff
Vendored
-50
@@ -1,50 +0,0 @@
|
||||
# ===========================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_append_flag.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# FLAG is appended to the FLAGS-VARIABLE shell variable, with a space
|
||||
# added in between.
|
||||
#
|
||||
# If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
|
||||
# CFLAGS) is used. FLAGS-VARIABLE is not changed if it already contains
|
||||
# FLAG. If FLAGS-VARIABLE is unset in the shell, it is set to exactly
|
||||
# FLAG.
|
||||
#
|
||||
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
||||
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 8
|
||||
|
||||
AC_DEFUN([AX_APPEND_FLAG],
|
||||
[dnl
|
||||
AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_SET_IF
|
||||
AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])
|
||||
AS_VAR_SET_IF(FLAGS,[
|
||||
AS_CASE([" AS_VAR_GET(FLAGS) "],
|
||||
[*" $1 "*], [AC_RUN_LOG([: FLAGS already contains $1])],
|
||||
[
|
||||
AS_VAR_APPEND(FLAGS,[" $1"])
|
||||
AC_RUN_LOG([: FLAGS="$FLAGS"])
|
||||
])
|
||||
],
|
||||
[
|
||||
AS_VAR_SET(FLAGS,[$1])
|
||||
AC_RUN_LOG([: FLAGS="$FLAGS"])
|
||||
])
|
||||
AS_VAR_POPDEF([FLAGS])dnl
|
||||
])dnl AX_APPEND_FLAG
|
||||
+8427
File diff suppressed because it is too large.
Load diff
+437
@@ -0,0 +1,437 @@
|
||||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free
|
||||
# Software Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 8 ltoptions.m4
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
|
||||
|
||||
|
||||
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
|
||||
# ------------------------------------------
|
||||
m4_define([_LT_MANGLE_OPTION],
|
||||
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
|
||||
|
||||
|
||||
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
|
||||
# ---------------------------------------
|
||||
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
|
||||
# matching handler defined, dispatch to it. Other OPTION-NAMEs are
|
||||
# saved as a flag.
|
||||
m4_define([_LT_SET_OPTION],
|
||||
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
|
||||
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
|
||||
_LT_MANGLE_DEFUN([$1], [$2]),
|
||||
[m4_warning([Unknown $1 option '$2'])])[]dnl
|
||||
])
|
||||
|
||||
|
||||
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
|
||||
# ------------------------------------------------------------
|
||||
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
|
||||
m4_define([_LT_IF_OPTION],
|
||||
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
|
||||
|
||||
|
||||
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
|
||||
# -------------------------------------------------------
|
||||
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
|
||||
# are set.
|
||||
m4_define([_LT_UNLESS_OPTIONS],
|
||||
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
|
||||
[m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
|
||||
[m4_define([$0_found])])])[]dnl
|
||||
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
|
||||
])[]dnl
|
||||
])
|
||||
|
||||
|
||||
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
|
||||
# ----------------------------------------
|
||||
# OPTION-LIST is a space-separated list of Libtool options associated
|
||||
# with MACRO-NAME. If any OPTION has a matching handler declared with
|
||||
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
|
||||
# the unknown option and exit.
|
||||
m4_defun([_LT_SET_OPTIONS],
|
||||
[# Set options
|
||||
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
|
||||
[_LT_SET_OPTION([$1], _LT_Option)])
|
||||
|
||||
m4_if([$1],[LT_INIT],[
|
||||
dnl
|
||||
dnl Simply set some default values (i.e off) if boolean options were not
|
||||
dnl specified:
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
|
||||
])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
|
||||
])
|
||||
dnl
|
||||
dnl If no reference was made to various pairs of opposing options, then
|
||||
dnl we run the default mode handler for the pair. For example, if neither
|
||||
dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
|
||||
dnl archives by default:
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
|
||||
[_LT_ENABLE_FAST_INSTALL])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
|
||||
[_LT_WITH_AIX_SONAME([aix])])
|
||||
])
|
||||
])# _LT_SET_OPTIONS
|
||||
|
||||
|
||||
## --------------------------------- ##
|
||||
## Macros to handle LT_INIT options. ##
|
||||
## --------------------------------- ##
|
||||
|
||||
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
|
||||
# -----------------------------------------
|
||||
m4_define([_LT_MANGLE_DEFUN],
|
||||
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
|
||||
|
||||
|
||||
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
|
||||
# -----------------------------------------------
|
||||
m4_define([LT_OPTION_DEFINE],
|
||||
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
|
||||
])# LT_OPTION_DEFINE
|
||||
|
||||
|
||||
# dlopen
|
||||
# ------
|
||||
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
|
||||
])
|
||||
|
||||
AU_DEFUN([AC_LIBTOOL_DLOPEN],
|
||||
[_LT_SET_OPTION([LT_INIT], [dlopen])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the 'dlopen' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
|
||||
|
||||
|
||||
# win32-dll
|
||||
# ---------
|
||||
# Declare package support for building win32 dll's.
|
||||
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
|
||||
[enable_win32_dll=yes
|
||||
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
|
||||
AC_CHECK_TOOL(AS, as, false)
|
||||
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
||||
;;
|
||||
esac
|
||||
|
||||
test -z "$AS" && AS=as
|
||||
_LT_DECL([], [AS], [1], [Assembler program])dnl
|
||||
|
||||
test -z "$DLLTOOL" && DLLTOOL=dlltool
|
||||
_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
|
||||
|
||||
test -z "$OBJDUMP" && OBJDUMP=objdump
|
||||
_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
|
||||
])# win32-dll
|
||||
|
||||
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
|
||||
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
_LT_SET_OPTION([LT_INIT], [win32-dll])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the 'win32-dll' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
|
||||
|
||||
|
||||
# _LT_ENABLE_SHARED([DEFAULT])
|
||||
# ----------------------------
|
||||
# implement the --enable-shared flag, and supports the 'shared' and
|
||||
# 'disable-shared' LT_INIT options.
|
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||
m4_define([_LT_ENABLE_SHARED],
|
||||
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([shared],
|
||||
[AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
|
||||
[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_shared=yes ;;
|
||||
no) enable_shared=no ;;
|
||||
*)
|
||||
enable_shared=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for pkg in $enableval; do
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_shared=yes
|
||||
fi
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
|
||||
|
||||
_LT_DECL([build_libtool_libs], [enable_shared], [0],
|
||||
[Whether or not to build shared libraries])
|
||||
])# _LT_ENABLE_SHARED
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
|
||||
|
||||
# Old names:
|
||||
AC_DEFUN([AC_ENABLE_SHARED],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_DISABLE_SHARED],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-shared])
|
||||
])
|
||||
|
||||
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
|
||||
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
|
||||
|
||||
|
||||
|
||||
# _LT_ENABLE_STATIC([DEFAULT])
|
||||
# ----------------------------
|
||||
# implement the --enable-static flag, and support the 'static' and
|
||||
# 'disable-static' LT_INIT options.
|
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||
m4_define([_LT_ENABLE_STATIC],
|
||||
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([static],
|
||||
[AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
|
||||
[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_static=yes ;;
|
||||
no) enable_static=no ;;
|
||||
*)
|
||||
enable_static=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for pkg in $enableval; do
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_static=yes
|
||||
fi
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
|
||||
|
||||
_LT_DECL([build_old_libs], [enable_static], [0],
|
||||
[Whether or not to build static libraries])
|
||||
])# _LT_ENABLE_STATIC
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
|
||||
|
||||
# Old names:
|
||||
AC_DEFUN([AC_ENABLE_STATIC],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_DISABLE_STATIC],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-static])
|
||||
])
|
||||
|
||||
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
|
||||
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
|
||||
|
||||
|
||||
|
||||
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
|
||||
# ----------------------------------
|
||||
# implement the --enable-fast-install flag, and support the 'fast-install'
|
||||
# and 'disable-fast-install' LT_INIT options.
|
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||
m4_define([_LT_ENABLE_FAST_INSTALL],
|
||||
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([fast-install],
|
||||
[AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
|
||||
[optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_fast_install=yes ;;
|
||||
no) enable_fast_install=no ;;
|
||||
*)
|
||||
enable_fast_install=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for pkg in $enableval; do
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_fast_install=yes
|
||||
fi
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
|
||||
|
||||
_LT_DECL([fast_install], [enable_fast_install], [0],
|
||||
[Whether or not to optimize for fast installation])dnl
|
||||
])# _LT_ENABLE_FAST_INSTALL
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
|
||||
|
||||
# Old names:
|
||||
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||
the 'fast-install' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||
the 'disable-fast-install' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
|
||||
|
||||
|
||||
# _LT_WITH_AIX_SONAME([DEFAULT])
|
||||
# ----------------------------------
|
||||
# implement the --with-aix-soname flag, and support the `aix-soname=aix'
|
||||
# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
|
||||
# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
|
||||
m4_define([_LT_WITH_AIX_SONAME],
|
||||
[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
|
||||
shared_archive_member_spec=
|
||||
case $host,$enable_shared in
|
||||
power*-*-aix[[5-9]]*,yes)
|
||||
AC_MSG_CHECKING([which variant of shared library versioning to provide])
|
||||
AC_ARG_WITH([aix-soname],
|
||||
[AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
|
||||
[shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
|
||||
[case $withval in
|
||||
aix|svr4|both)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([Unknown argument to --with-aix-soname])
|
||||
;;
|
||||
esac
|
||||
lt_cv_with_aix_soname=$with_aix_soname],
|
||||
[AC_CACHE_VAL([lt_cv_with_aix_soname],
|
||||
[lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
|
||||
with_aix_soname=$lt_cv_with_aix_soname])
|
||||
AC_MSG_RESULT([$with_aix_soname])
|
||||
if test aix != "$with_aix_soname"; then
|
||||
# For the AIX way of multilib, we name the shared archive member
|
||||
# based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
|
||||
# and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
|
||||
# Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
|
||||
# the AIX toolchain works better with OBJECT_MODE set (default 32).
|
||||
if test 64 = "${OBJECT_MODE-32}"; then
|
||||
shared_archive_member_spec=shr_64
|
||||
else
|
||||
shared_archive_member_spec=shr
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
with_aix_soname=aix
|
||||
;;
|
||||
esac
|
||||
|
||||
_LT_DECL([], [shared_archive_member_spec], [0],
|
||||
[Shared archive member basename, for filename based shared library versioning on AIX])dnl
|
||||
])# _LT_WITH_AIX_SONAME
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
|
||||
|
||||
|
||||
# _LT_WITH_PIC([MODE])
|
||||
# --------------------
|
||||
# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
|
||||
# LT_INIT options.
|
||||
# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
|
||||
m4_define([_LT_WITH_PIC],
|
||||
[AC_ARG_WITH([pic],
|
||||
[AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
|
||||
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
|
||||
[lt_p=${PACKAGE-default}
|
||||
case $withval in
|
||||
yes|no) pic_mode=$withval ;;
|
||||
*)
|
||||
pic_mode=default
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for lt_pkg in $withval; do
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$lt_pkg" = "X$lt_p"; then
|
||||
pic_mode=yes
|
||||
fi
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[pic_mode=m4_default([$1], [default])])
|
||||
|
||||
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
|
||||
])# _LT_WITH_PIC
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
|
||||
|
||||
# Old name:
|
||||
AU_DEFUN([AC_LIBTOOL_PICMODE],
|
||||
[_LT_SET_OPTION([LT_INIT], [pic-only])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the 'pic-only' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
|
||||
|
||||
## ----------------- ##
|
||||
## LTDL_INIT Options ##
|
||||
## ----------------- ##
|
||||
|
||||
m4_define([_LTDL_MODE], [])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
|
||||
[m4_define([_LTDL_MODE], [nonrecursive])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
|
||||
[m4_define([_LTDL_MODE], [recursive])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
|
||||
[m4_define([_LTDL_MODE], [subproject])])
|
||||
|
||||
m4_define([_LTDL_TYPE], [])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [installable],
|
||||
[m4_define([_LTDL_TYPE], [installable])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
|
||||
[m4_define([_LTDL_TYPE], [convenience])])
|
||||
+124
@@ -0,0 +1,124 @@
|
||||
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 6 ltsugar.m4
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
|
||||
|
||||
|
||||
# lt_join(SEP, ARG1, [ARG2...])
|
||||
# -----------------------------
|
||||
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
|
||||
# associated separator.
|
||||
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
|
||||
# versions in m4sugar had bugs.
|
||||
m4_define([lt_join],
|
||||
[m4_if([$#], [1], [],
|
||||
[$#], [2], [[$2]],
|
||||
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
|
||||
m4_define([_lt_join],
|
||||
[m4_if([$#$2], [2], [],
|
||||
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
|
||||
|
||||
|
||||
# lt_car(LIST)
|
||||
# lt_cdr(LIST)
|
||||
# ------------
|
||||
# Manipulate m4 lists.
|
||||
# These macros are necessary as long as will still need to support
|
||||
# Autoconf-2.59, which quotes differently.
|
||||
m4_define([lt_car], [[$1]])
|
||||
m4_define([lt_cdr],
|
||||
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
|
||||
[$#], 1, [],
|
||||
[m4_dquote(m4_shift($@))])])
|
||||
m4_define([lt_unquote], $1)
|
||||
|
||||
|
||||
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
|
||||
# ------------------------------------------
|
||||
# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
|
||||
# Note that neither SEPARATOR nor STRING are expanded; they are appended
|
||||
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
|
||||
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
|
||||
# than defined and empty).
|
||||
#
|
||||
# This macro is needed until we can rely on Autoconf 2.62, since earlier
|
||||
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
|
||||
m4_define([lt_append],
|
||||
[m4_define([$1],
|
||||
m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
|
||||
|
||||
|
||||
|
||||
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
|
||||
# ----------------------------------------------------------
|
||||
# Produce a SEP delimited list of all paired combinations of elements of
|
||||
# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
|
||||
# has the form PREFIXmINFIXSUFFIXn.
|
||||
# Needed until we can rely on m4_combine added in Autoconf 2.62.
|
||||
m4_define([lt_combine],
|
||||
[m4_if(m4_eval([$# > 3]), [1],
|
||||
[m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
|
||||
[[m4_foreach([_Lt_prefix], [$2],
|
||||
[m4_foreach([_Lt_suffix],
|
||||
]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
|
||||
[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
|
||||
|
||||
|
||||
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
|
||||
# -----------------------------------------------------------------------
|
||||
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
|
||||
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
|
||||
m4_define([lt_if_append_uniq],
|
||||
[m4_ifdef([$1],
|
||||
[m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
|
||||
[lt_append([$1], [$2], [$3])$4],
|
||||
[$5])],
|
||||
[lt_append([$1], [$2], [$3])$4])])
|
||||
|
||||
|
||||
# lt_dict_add(DICT, KEY, VALUE)
|
||||
# -----------------------------
|
||||
m4_define([lt_dict_add],
|
||||
[m4_define([$1($2)], [$3])])
|
||||
|
||||
|
||||
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
|
||||
# --------------------------------------------
|
||||
m4_define([lt_dict_add_subkey],
|
||||
[m4_define([$1($2:$3)], [$4])])
|
||||
|
||||
|
||||
# lt_dict_fetch(DICT, KEY, [SUBKEY])
|
||||
# ----------------------------------
|
||||
m4_define([lt_dict_fetch],
|
||||
[m4_ifval([$3],
|
||||
m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
|
||||
m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
|
||||
|
||||
|
||||
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
|
||||
# -----------------------------------------------------------------
|
||||
m4_define([lt_if_dict_fetch],
|
||||
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
|
||||
[$5],
|
||||
[$6])])
|
||||
|
||||
|
||||
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
|
||||
# --------------------------------------------------------------
|
||||
m4_define([lt_dict_filter],
|
||||
[m4_if([$5], [], [],
|
||||
[lt_join(m4_quote(m4_default([$4], [[, ]])),
|
||||
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
|
||||
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
|
||||
])
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
# ltversion.m4 -- version numbers -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation,
|
||||
# Inc.
|
||||
# Written by Scott James Remnant, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# @configure_input@
|
||||
|
||||
# serial 4245 ltversion.m4
|
||||
# This file is part of GNU Libtool
|
||||
|
||||
m4_define([LT_PACKAGE_VERSION], [2.4.7])
|
||||
m4_define([LT_PACKAGE_REVISION], [2.4.7])
|
||||
|
||||
AC_DEFUN([LTVERSION_VERSION],
|
||||
[macro_version='2.4.7'
|
||||
macro_revision='2.4.7'
|
||||
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
|
||||
_LT_DECL(, macro_revision, 0)
|
||||
])
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free
|
||||
# Software Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 5 lt~obsolete.m4
|
||||
|
||||
# These exist entirely to fool aclocal when bootstrapping libtool.
|
||||
#
|
||||
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
|
||||
# which have later been changed to m4_define as they aren't part of the
|
||||
# exported API, or moved to Autoconf or Automake where they belong.
|
||||
#
|
||||
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
|
||||
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
|
||||
# using a macro with the same name in our local m4/libtool.m4 it'll
|
||||
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
|
||||
# and doesn't know about Autoconf macros at all.)
|
||||
#
|
||||
# So we provide this file, which has a silly filename so it's always
|
||||
# included after everything else. This provides aclocal with the
|
||||
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
|
||||
# because those macros already exist, or will be overwritten later.
|
||||
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
|
||||
#
|
||||
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
|
||||
# Yes, that means every name once taken will need to remain here until
|
||||
# we give up compatibility with versions before 1.7, at which point
|
||||
# we need to keep only those names which we still refer to.
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
|
||||
|
||||
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
|
||||
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
|
||||
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
|
||||
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
|
||||
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
|
||||
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
|
||||
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
|
||||
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
|
||||
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
|
||||
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
|
||||
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
|
||||
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
|
||||
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
|
||||
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
|
||||
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
|
||||
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
|
||||
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
|
||||
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
|
||||
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
|
||||
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
|
||||
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
|
||||
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
|
||||
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
|
||||
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
|
||||
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
|
||||
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
|
||||
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
|
||||
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
|
||||
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
|
||||
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
|
||||
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
|
||||
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
|
||||
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
|
||||
m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
|
||||
m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
|
||||
m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
|
||||
m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
|
||||
m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
|
||||
m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
|
||||
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
|
||||
Vendored
+569
@@ -0,0 +1,569 @@
|
||||
# Makefile.in generated by automake 1.16.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = man
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/asmcfi.m4 \
|
||||
$(top_srcdir)/m4/ax_cc_maxopt.m4 \
|
||||
$(top_srcdir)/m4/ax_cflags_warn_all.m4 \
|
||||
$(top_srcdir)/m4/ax_check_compile_flag.m4 \
|
||||
$(top_srcdir)/m4/ax_compiler_vendor.m4 \
|
||||
$(top_srcdir)/m4/ax_configure_args.m4 \
|
||||
$(top_srcdir)/m4/ax_enable_builddir.m4 \
|
||||
$(top_srcdir)/m4/ax_gcc_archflag.m4 \
|
||||
$(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \
|
||||
$(top_srcdir)/m4/ax_prepend_flag.m4 \
|
||||
$(top_srcdir)/m4/ax_require_defined.m4 \
|
||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
||||
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
||||
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/fficonfig.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
man3dir = $(mandir)/man3
|
||||
am__installdirs = "$(DESTDIR)$(man3dir)"
|
||||
NROFF = nroff
|
||||
MANS = $(man_MANS)
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AM_LTLDFLAGS = @AM_LTLDFLAGS@
|
||||
AM_RUNTESTFLAGS = @AM_RUNTESTFLAGS@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCAS = @CCAS@
|
||||
CCASDEPMODE = @CCASDEPMODE@
|
||||
CCASFLAGS = @CCASFLAGS@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CSCOPE = @CSCOPE@
|
||||
CTAGS = @CTAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
ETAGS = @ETAGS@
|
||||
EXEEXT = @EXEEXT@
|
||||
FFI_EXEC_TRAMPOLINE_TABLE = @FFI_EXEC_TRAMPOLINE_TABLE@
|
||||
FFI_VERSION_NUMBER = @FFI_VERSION_NUMBER@
|
||||
FFI_VERSION_STRING = @FFI_VERSION_STRING@
|
||||
FGREP = @FGREP@
|
||||
FILECMD = @FILECMD@
|
||||
GREP = @GREP@
|
||||
HAVE_LONG_DOUBLE = @HAVE_LONG_DOUBLE@
|
||||
HAVE_LONG_DOUBLE_VARIANT = @HAVE_LONG_DOUBLE_VARIANT@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OPT_LDFLAGS = @OPT_LDFLAGS@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PRTDIAG = @PRTDIAG@
|
||||
RANLIB = @RANLIB@
|
||||
READELF = @READELF@
|
||||
SECTION_LDFLAGS = @SECTION_LDFLAGS@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
TARGET = @TARGET@
|
||||
TARGETDIR = @TARGETDIR@
|
||||
TARGET_OBJ = @TARGET_OBJ@
|
||||
VERSION = @VERSION@
|
||||
WASM64_MEMORY64 = @WASM64_MEMORY64@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
ac_ct_READELF = @ac_ct_READELF@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
ax_enable_builddir_sed = @ax_enable_builddir_sed@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
runstatedir = @runstatedir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sys_symbol_underscore = @sys_symbol_underscore@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
tmake_file = @tmake_file@
|
||||
toolexecdir = @toolexecdir@
|
||||
toolexeclibdir = @toolexeclibdir@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
EXTRA_DIST = ffi.3 ffi_call.3 ffi_prep_cif.3 ffi_prep_cif_var.3
|
||||
man_MANS = ffi.3 ffi_call.3 ffi_prep_cif.3 ffi_prep_cif_var.3
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign man/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
install-man3: $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list1=''; \
|
||||
list2='$(man_MANS)'; \
|
||||
test -n "$(man3dir)" \
|
||||
&& test -n "`echo $$list1$$list2`" \
|
||||
|| exit 0; \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(man3dir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(man3dir)" || exit 1; \
|
||||
{ for i in $$list1; do echo "$$i"; done; \
|
||||
if test -n "$$list2"; then \
|
||||
for i in $$list2; do echo "$$i"; done \
|
||||
| sed -n '/\.3[a-z]*$$/p'; \
|
||||
fi; \
|
||||
} | while read p; do \
|
||||
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; echo "$$p"; \
|
||||
done | \
|
||||
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
|
||||
sed 'N;N;s,\n, ,g' | { \
|
||||
list=; while read file base inst; do \
|
||||
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
|
||||
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \
|
||||
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \
|
||||
fi; \
|
||||
done; \
|
||||
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \
|
||||
done; }
|
||||
|
||||
uninstall-man3:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list=''; test -n "$(man3dir)" || exit 0; \
|
||||
files=`{ for i in $$list; do echo "$$i"; done; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
|
||||
sed -n '/\.3[a-z]*$$/p'; \
|
||||
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
||||
dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir)
|
||||
tags TAGS:
|
||||
|
||||
ctags CTAGS:
|
||||
|
||||
cscope cscopelist:
|
||||
|
||||
distdir: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||
|
||||
distdir-am: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(MANS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(man3dir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-man
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man: install-man3
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-man
|
||||
|
||||
uninstall-man: uninstall-man3
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||
cscopelist-am ctags-am distclean distclean-generic \
|
||||
distclean-libtool distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-man3 install-pdf install-pdf-am install-ps \
|
||||
install-ps-am install-strip installcheck installcheck-am \
|
||||
installdirs maintainer-clean maintainer-clean-generic \
|
||||
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
|
||||
ps ps-am tags-am uninstall uninstall-am uninstall-man \
|
||||
uninstall-man3
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
+215
@@ -0,0 +1,215 @@
|
||||
#! /bin/sh
|
||||
# Common wrapper for a few potentially missing GNU programs.
|
||||
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
|
||||
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
|
||||
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
|
||||
--is-lightweight)
|
||||
# Used by our autoconf macros to check whether the available missing
|
||||
# script is modern enough.
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--run)
|
||||
# Back-compat with the calling convention used by older automake.
|
||||
shift
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
|
||||
to PROGRAM being missing or too old.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal autoconf autoheader autom4te automake makeinfo
|
||||
bison yacc flex lex help2man
|
||||
|
||||
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
|
||||
'g' are ignored when checking the name.
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: unknown '$1' option"
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# Run the given program, remember its exit status.
|
||||
"$@"; st=$?
|
||||
|
||||
# If it succeeded, we are done.
|
||||
test $st -eq 0 && exit 0
|
||||
|
||||
# Also exit now if we it failed (or wasn't found), and '--version' was
|
||||
# passed; such an option is passed most likely to detect whether the
|
||||
# program is present and works.
|
||||
case $2 in --version|--help) exit $st;; esac
|
||||
|
||||
# Exit code 63 means version mismatch. This often happens when the user
|
||||
# tries to use an ancient version of a tool on a file that requires a
|
||||
# minimum version.
|
||||
if test $st -eq 63; then
|
||||
msg="probably too old"
|
||||
elif test $st -eq 127; then
|
||||
# Program was missing.
|
||||
msg="missing on your system"
|
||||
else
|
||||
# Program was found and executed, but failed. Give up.
|
||||
exit $st
|
||||
fi
|
||||
|
||||
perl_URL=https://www.perl.org/
|
||||
flex_URL=https://github.com/westes/flex
|
||||
gnu_software_URL=https://www.gnu.org/software
|
||||
|
||||
program_details ()
|
||||
{
|
||||
case $1 in
|
||||
aclocal|automake)
|
||||
echo "The '$1' program is part of the GNU Automake package:"
|
||||
echo "<$gnu_software_URL/automake>"
|
||||
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/autoconf>"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
autoconf|autom4te|autoheader)
|
||||
echo "The '$1' program is part of the GNU Autoconf package:"
|
||||
echo "<$gnu_software_URL/autoconf/>"
|
||||
echo "It also requires GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
give_advice ()
|
||||
{
|
||||
# Normalize program name to check for.
|
||||
normalized_program=`echo "$1" | sed '
|
||||
s/^gnu-//; t
|
||||
s/^gnu//; t
|
||||
s/^g//; t'`
|
||||
|
||||
printf '%s\n' "'$1' is $msg."
|
||||
|
||||
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
|
||||
case $normalized_program in
|
||||
autoconf*)
|
||||
echo "You should only need it if you modified 'configure.ac',"
|
||||
echo "or m4 files included by it."
|
||||
program_details 'autoconf'
|
||||
;;
|
||||
autoheader*)
|
||||
echo "You should only need it if you modified 'acconfig.h' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'autoheader'
|
||||
;;
|
||||
automake*)
|
||||
echo "You should only need it if you modified 'Makefile.am' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'automake'
|
||||
;;
|
||||
aclocal*)
|
||||
echo "You should only need it if you modified 'acinclude.m4' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'aclocal'
|
||||
;;
|
||||
autom4te*)
|
||||
echo "You might have modified some maintainer files that require"
|
||||
echo "the 'autom4te' program to be rebuilt."
|
||||
program_details 'autom4te'
|
||||
;;
|
||||
bison*|yacc*)
|
||||
echo "You should only need it if you modified a '.y' file."
|
||||
echo "You may want to install the GNU Bison package:"
|
||||
echo "<$gnu_software_URL/bison/>"
|
||||
;;
|
||||
lex*|flex*)
|
||||
echo "You should only need it if you modified a '.l' file."
|
||||
echo "You may want to install the Fast Lexical Analyzer package:"
|
||||
echo "<$flex_URL>"
|
||||
;;
|
||||
help2man*)
|
||||
echo "You should only need it if you modified a dependency" \
|
||||
"of a man page."
|
||||
echo "You may want to install the GNU Help2man package:"
|
||||
echo "<$gnu_software_URL/help2man/>"
|
||||
;;
|
||||
makeinfo*)
|
||||
echo "You should only need it if you modified a '.texi' file, or"
|
||||
echo "any other file indirectly affecting the aspect of the manual."
|
||||
echo "You might want to install the Texinfo package:"
|
||||
echo "<$gnu_software_URL/texinfo/>"
|
||||
echo "The spurious makeinfo call might also be the consequence of"
|
||||
echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
|
||||
echo "want to install GNU make:"
|
||||
echo "<$gnu_software_URL/make/>"
|
||||
;;
|
||||
*)
|
||||
echo "You might have modified some files without having the proper"
|
||||
echo "tools for further handling them. Check the 'README' file, it"
|
||||
echo "often tells you about the needed prerequisites for installing"
|
||||
echo "this package. You may also peek at any GNU archive site, in"
|
||||
echo "case some other package contains this missing '$1' program."
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
give_advice "$1" | sed -e '1s/^/WARNING: /' \
|
||||
-e '2,$s/^/ /' >&2
|
||||
|
||||
# Propagate the correct exit status (expected to be 127 for a program
|
||||
# not found, 63 for a program that failed due to version mismatch).
|
||||
exit $st
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
Vendored
+50
-7
@@ -28,6 +28,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
#include <ffi_common.h>
|
||||
#include "internal.h"
|
||||
#ifdef _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h> /* FlushInstructionCache */
|
||||
#endif
|
||||
#include <tramp.h>
|
||||
@@ -387,7 +388,7 @@ extend_hfa_type (void *dest, void *src, int h)
|
||||
void *x0;
|
||||
|
||||
#define BTI_J "hint #36"
|
||||
asm volatile (
|
||||
__asm__ volatile (
|
||||
"adr %0, 0f\n"
|
||||
" add %0, %0, %1\n"
|
||||
" br %0\n"
|
||||
@@ -467,18 +468,18 @@ compress_hfa_type (void *dest, void *reg, int h)
|
||||
*(float *)dest = *(float *)reg;
|
||||
break;
|
||||
case AARCH64_RET_S2:
|
||||
asm ("ldp q16, q17, [%1]\n\t"
|
||||
__asm__ ("ldp q16, q17, [%1]\n\t"
|
||||
"st2 { v16.s, v17.s }[0], [%0]"
|
||||
: : "r"(dest), "r"(reg) : "memory", "v16", "v17");
|
||||
break;
|
||||
case AARCH64_RET_S3:
|
||||
asm ("ldp q16, q17, [%1]\n\t"
|
||||
__asm__ ("ldp q16, q17, [%1]\n\t"
|
||||
"ldr q18, [%1, #32]\n\t"
|
||||
"st3 { v16.s, v17.s, v18.s }[0], [%0]"
|
||||
: : "r"(dest), "r"(reg) : "memory", "v16", "v17", "v18");
|
||||
break;
|
||||
case AARCH64_RET_S4:
|
||||
asm ("ldp q16, q17, [%1]\n\t"
|
||||
__asm__ ("ldp q16, q17, [%1]\n\t"
|
||||
"ldp q18, q19, [%1, #32]\n\t"
|
||||
"st4 { v16.s, v17.s, v18.s, v19.s }[0], [%0]"
|
||||
: : "r"(dest), "r"(reg) : "memory", "v16", "v17", "v18", "v19");
|
||||
@@ -495,18 +496,18 @@ compress_hfa_type (void *dest, void *reg, int h)
|
||||
*(double *)dest = *(double *)reg;
|
||||
break;
|
||||
case AARCH64_RET_D2:
|
||||
asm ("ldp q16, q17, [%1]\n\t"
|
||||
__asm__ ("ldp q16, q17, [%1]\n\t"
|
||||
"st2 { v16.d, v17.d }[0], [%0]"
|
||||
: : "r"(dest), "r"(reg) : "memory", "v16", "v17");
|
||||
break;
|
||||
case AARCH64_RET_D3:
|
||||
asm ("ldp q16, q17, [%1]\n\t"
|
||||
__asm__ ("ldp q16, q17, [%1]\n\t"
|
||||
"ldr q18, [%1, #32]\n\t"
|
||||
"st3 { v16.d, v17.d, v18.d }[0], [%0]"
|
||||
: : "r"(dest), "r"(reg) : "memory", "v16", "v17", "v18");
|
||||
break;
|
||||
case AARCH64_RET_D4:
|
||||
asm ("ldp q16, q17, [%1]\n\t"
|
||||
__asm__ ("ldp q16, q17, [%1]\n\t"
|
||||
"ldp q18, q19, [%1, #32]\n\t"
|
||||
"st4 { v16.d, v17.d, v18.d, v19.d }[0], [%0]"
|
||||
: : "r"(dest), "r"(reg) : "memory", "v16", "v17", "v18", "v19");
|
||||
@@ -537,6 +538,32 @@ allocate_int_to_reg_or_stack (struct call_context *context,
|
||||
return allocate_to_stack (state, stack, size, size);
|
||||
}
|
||||
|
||||
static void *
|
||||
allocate_int128_to_reg_or_stack (struct call_context *context,
|
||||
struct arg_state *state, void *stack)
|
||||
{
|
||||
unsigned ngrn = state->ngrn;
|
||||
void *ret;
|
||||
|
||||
/* The normal AArch64 ABI requires even Xreg; Darwin does not. */
|
||||
#ifndef __APPLE__
|
||||
ngrn += ngrn & 1;
|
||||
#endif
|
||||
|
||||
if (ngrn < N_X_ARG_REG)
|
||||
{
|
||||
ret = &context->x[ngrn];
|
||||
ngrn += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = allocate_to_stack (state, stack, 16, 16);
|
||||
ngrn = N_X_ARG_REG;
|
||||
}
|
||||
state->ngrn = ngrn;
|
||||
return ret;
|
||||
}
|
||||
|
||||
ffi_status FFI_HIDDEN
|
||||
ffi_prep_cif_machdep (ffi_cif *cif)
|
||||
{
|
||||
@@ -576,6 +603,11 @@ ffi_prep_cif_machdep (ffi_cif *cif)
|
||||
flags = (sizeof(void *) == 4 ? AARCH64_RET_UINT32 : AARCH64_RET_INT64);
|
||||
break;
|
||||
|
||||
case FFI_TYPE_UINT128:
|
||||
case FFI_TYPE_SINT128:
|
||||
flags = AARCH64_RET_INT128;
|
||||
break;
|
||||
|
||||
case FFI_TYPE_FLOAT:
|
||||
case FFI_TYPE_DOUBLE:
|
||||
case FFI_TYPE_LONGDOUBLE:
|
||||
@@ -741,6 +773,12 @@ ffi_call_int (ffi_cif *cif, void (*fn)(void), void *orig_rvalue,
|
||||
}
|
||||
break;
|
||||
|
||||
case FFI_TYPE_UINT128:
|
||||
case FFI_TYPE_SINT128:
|
||||
dest = allocate_int128_to_reg_or_stack (context, &state, stack);
|
||||
memcpy (dest, a, 16);
|
||||
break;
|
||||
|
||||
case FFI_TYPE_FLOAT:
|
||||
case FFI_TYPE_DOUBLE:
|
||||
case FFI_TYPE_LONGDOUBLE:
|
||||
@@ -1023,6 +1061,11 @@ ffi_closure_SYSV_inner (ffi_cif *cif,
|
||||
avalue[i] = allocate_int_to_reg_or_stack (context, &state, stack, s);
|
||||
break;
|
||||
|
||||
case FFI_TYPE_UINT128:
|
||||
case FFI_TYPE_SINT128:
|
||||
avalue[i] = allocate_int128_to_reg_or_stack (context, &state, stack);
|
||||
break;
|
||||
|
||||
case FFI_TYPE_FLOAT:
|
||||
case FFI_TYPE_DOUBLE:
|
||||
case FFI_TYPE_LONGDOUBLE:
|
||||
|
||||
Vendored
+2
@@ -94,4 +94,6 @@ typedef enum ffi_abi
|
||||
#define FFI_TARGET_HAS_COMPLEX_TYPE
|
||||
#endif
|
||||
|
||||
#define FFI_TARGET_HAS_INT128 1
|
||||
|
||||
#endif
|
||||
Vendored
+3
-3
@@ -91,10 +91,10 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
#define SIGN_LR_LINUX_ONLY
|
||||
#define BRANCH_TO_REG braaz
|
||||
#define PAC_CFI_WINDOW_SAVE
|
||||
#define GNU_PROPERTY_AARCH64_POINTER_AUTH 0
|
||||
#define AARCH64_POINTER_AUTH 0
|
||||
/* Linux PAC Support */
|
||||
#elif defined(__ARM_FEATURE_PAC_DEFAULT)
|
||||
#define GNU_PROPERTY_AARCH64_POINTER_AUTH (1 << 1)
|
||||
#define AARCH64_POINTER_AUTH (1 << 1)
|
||||
#define PAC_CFI_WINDOW_SAVE cfi_window_save
|
||||
#define TMP_REG x9
|
||||
#define BRANCH_TO_REG br
|
||||
@@ -141,6 +141,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
#define SIGN_LR_LINUX_ONLY
|
||||
#define BRANCH_TO_REG br
|
||||
#define PAC_CFI_WINDOW_SAVE
|
||||
#define GNU_PROPERTY_AARCH64_POINTER_AUTH 0
|
||||
#define AARCH64_POINTER_AUTH 0
|
||||
#endif /* HAVE_ARM64E_PTRAUTH */
|
||||
#endif /* LIBFFI_ASM */
|
||||
Vendored
+45
-14
@@ -70,10 +70,16 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
* The ELF Notes section needs to indicate if BTI is supported, as the first ELF loaded that doesn't
|
||||
* declare this support disables it for memory region containing the loaded library.
|
||||
*/
|
||||
# define GNU_PROPERTY_AARCH64_BTI (1 << 0) /* Has Branch Target Identification */
|
||||
# define AARCH64_BTI (1 << 0) /* Has Branch Target Identification */
|
||||
.text
|
||||
.align 4
|
||||
|
||||
#if defined(__ARM_FEATURE_GCS_DEFAULT) && __ARM_FEATURE_GCS_DEFAULT == 1
|
||||
#define AARCH64_GCS (1<<2)
|
||||
#else
|
||||
#define AARCH64_GCS 0 /* No GCS */
|
||||
#endif
|
||||
|
||||
/* ffi_call_SYSV
|
||||
extern void ffi_call_SYSV (void *stack, void *frame,
|
||||
void (*fn)(void), void *rvalue,
|
||||
@@ -681,19 +687,44 @@ CNAME(ffi_go_closure_SYSV):
|
||||
#endif /* FFI_CLOSURES */
|
||||
#endif /* __arm64__ */
|
||||
|
||||
#define GNU_PROPERTY(value) \
|
||||
.pushsection .note.gnu.property, "a"; \
|
||||
.balign 8; \
|
||||
.long 4; \
|
||||
.long 0x10; \
|
||||
.long 0x5; \
|
||||
.asciz "GNU"; \
|
||||
.long 0xc0000000; /* GNU_PROPERTY_AARCH64_FEATURE_1_AND */ \
|
||||
.long 4; \
|
||||
.long value; \
|
||||
.long 0; \
|
||||
.popsection;
|
||||
|
||||
#ifdef __ARM_BUILDATTR64_FV
|
||||
/* Add AArch64 feature bits build attributes. */
|
||||
# define FEATURE_1_AND_MARK(value) \
|
||||
.aeabi_subsection aeabi_feature_and_bits, optional, ULEB128; \
|
||||
.if ((value) & AARCH64_BTI); \
|
||||
.aeabi_attribute Tag_Feature_BTI, 1; \
|
||||
.else; \
|
||||
.aeabi_attribute Tag_Feature_BTI, 0; \
|
||||
.endif; \
|
||||
.if ((value) & AARCH64_POINTER_AUTH); \
|
||||
.aeabi_attribute Tag_Feature_PAC, 1; \
|
||||
.else; \
|
||||
.aeabi_attribute Tag_Feature_PAC, 0; \
|
||||
.endif; \
|
||||
.if ((value) & AARCH64_GCS); \
|
||||
.aeabi_attribute Tag_Feature_GCS, 1; \
|
||||
.else; \
|
||||
.aeabi_attribute Tag_Feature_GCS, 0; \
|
||||
.endif;
|
||||
#else
|
||||
/* Add a NT_GNU_PROPERTY_TYPE_0 note. */
|
||||
# define FEATURE_1_AND_MARK(value) GNU_PROPERTY (value)
|
||||
#endif /* __ARM_BUILDATTR64_FV */
|
||||
|
||||
#if defined __ELF__ && defined __linux__
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
|
||||
.pushsection .note.gnu.property, "a";
|
||||
.balign 8;
|
||||
.long 4;
|
||||
.long 0x10;
|
||||
.long 0x5;
|
||||
.asciz "GNU";
|
||||
.long 0xc0000000; /* GNU_PROPERTY_AARCH64_FEATURE_1_AND */
|
||||
.long 4;
|
||||
.long GNU_PROPERTY_AARCH64_BTI | GNU_PROPERTY_AARCH64_POINTER_AUTH;
|
||||
.long 0;
|
||||
.popsection;
|
||||
FEATURE_1_AND_MARK(AARCH64_BTI | AARCH64_POINTER_AUTH | AARCH64_GCS)
|
||||
#endif
|
||||
|
||||
Vendored
+11
-3
@@ -52,14 +52,14 @@ extern void ffi_go_closure_osf(void) FFI_HIDDEN;
|
||||
static inline UINT64 lds(void *ptr)
|
||||
{
|
||||
UINT64 ret;
|
||||
asm("lds %0,%1" : "=f"(ret) : "m"(*(UINT32 *)ptr));
|
||||
__asm__("lds %0,%1" : "=f"(ret) : "m"(*(UINT32 *)ptr));
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* And the reverse. */
|
||||
static inline void sts(void *ptr, UINT64 val)
|
||||
{
|
||||
asm("sts %1,%0" : "=m"(*(UINT32 *)ptr) : "f"(val));
|
||||
__asm__("sts %1,%0" : "=m"(*(UINT32 *)ptr) : "f"(val));
|
||||
}
|
||||
|
||||
ffi_status FFI_HIDDEN
|
||||
@@ -95,6 +95,8 @@ ffi_prep_cif_machdep(ffi_cif *cif)
|
||||
bytes += 8;
|
||||
break;
|
||||
|
||||
case FFI_TYPE_SINT128:
|
||||
case FFI_TYPE_UINT128:
|
||||
case FFI_TYPE_VOID:
|
||||
case FFI_TYPE_STRUCT:
|
||||
/* Passed by value in N slots. */
|
||||
@@ -149,6 +151,8 @@ ffi_prep_cif_machdep(ffi_cif *cif)
|
||||
case FFI_TYPE_POINTER:
|
||||
flags = ALPHA_FLAGS(ALPHA_ST_INT, ALPHA_LD_INT64);
|
||||
break;
|
||||
case FFI_TYPE_SINT128:
|
||||
case FFI_TYPE_UINT128:
|
||||
case FFI_TYPE_LONGDOUBLE:
|
||||
case FFI_TYPE_STRUCT:
|
||||
/* Passed in memory, with a hidden pointer. */
|
||||
@@ -281,6 +285,8 @@ ffi_call_int (ffi_cif *cif, void (*fn)(void), void *rvalue,
|
||||
argp[argn++] = (unsigned long)valp;
|
||||
break;
|
||||
|
||||
case FFI_TYPE_SINT128:
|
||||
case FFI_TYPE_UINT128:
|
||||
case FFI_TYPE_VOID:
|
||||
case FFI_TYPE_STRUCT:
|
||||
size = ty->size;
|
||||
@@ -351,7 +357,7 @@ ffi_prep_closure_loc (ffi_closure* closure,
|
||||
instead, since both Compaq as and gas can handle it.
|
||||
|
||||
0x86 is PAL_imb in Tru64 UNIX <alpha/pal.h>. */
|
||||
asm volatile ("call_pal 0x86" : : : "memory");
|
||||
__asm__ volatile ("call_pal 0x86" : : : "memory");
|
||||
|
||||
return FFI_OK;
|
||||
}
|
||||
@@ -418,6 +424,8 @@ ffi_closure_osf_inner (ffi_cif *cif,
|
||||
argn += 1;
|
||||
break;
|
||||
|
||||
case FFI_TYPE_SINT128:
|
||||
case FFI_TYPE_UINT128:
|
||||
case FFI_TYPE_VOID:
|
||||
case FFI_TYPE_STRUCT:
|
||||
size = ty->size;
|
||||
|
||||
Vendored
+1
@@ -46,6 +46,7 @@ typedef enum ffi_abi {
|
||||
|
||||
#define FFI_TARGET_SPECIFIC_STACK_SPACE_ALLOCATION
|
||||
#define FFI_TARGET_HAS_COMPLEX_TYPE
|
||||
#define FFI_TARGET_HAS_INT128
|
||||
|
||||
/* ---- Definitions for closures ----------------------------------------- */
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -120,7 +120,7 @@
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef __clang__
|
||||
#ifdef __ELF__
|
||||
/* We require interworking on LDM, which implies ARMv5T,
|
||||
which implies the existance of BLX. */
|
||||
.arch armv5t
|
||||
|
||||
Vendored
+3
-5
@@ -393,11 +393,9 @@ ffi_closure_free (void *ptr)
|
||||
|
||||
#define USE_LOCKS 1
|
||||
#define USE_DL_PREFIX 1
|
||||
#ifdef __GNUC__
|
||||
#ifndef USE_BUILTIN_FFS
|
||||
#define USE_BUILTIN_FFS 1
|
||||
#endif
|
||||
#endif
|
||||
/* dlmalloc's bit-index macros use __builtin_clz/__builtin_ctz directly on any
|
||||
GNU-compatible compiler, so USE_BUILTIN_FFS (and pulling in <strings.h> for
|
||||
ffs()) is no longer needed (libffi #754). */
|
||||
|
||||
/* We need to use mmap, not sbrk. */
|
||||
#define HAVE_MORECORE 0
|
||||
|
||||
Vendored
+2052
-781
File diff suppressed because it is too large.
Load diff
Vendored
+2
-2
@@ -240,8 +240,8 @@ void ffi_closure_eabi (unsigned arg1, unsigned arg2, unsigned arg3,
|
||||
/* Functions return 4-byte or smaller results in gr8. 8-byte
|
||||
values also use gr9. We fill the both, even for small return
|
||||
values, just to avoid a branch. */
|
||||
asm ("ldi @(%0, #0), gr8" : : "r" (&rvalue));
|
||||
asm ("ldi @(%0, #0), gr9" : : "r" (&((int *) &rvalue)[1]));
|
||||
__asm__ ("ldi @(%0, #0), gr8" : : "r" (&rvalue));
|
||||
__asm__ ("ldi @(%0, #0), gr9" : : "r" (&((int *) &rvalue)[1]));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+2
-2
@@ -84,7 +84,7 @@ endian_adjust (void *addr, size_t len)
|
||||
#define stf_spill(addr, value)
|
||||
#else
|
||||
#define stf_spill(addr, value) \
|
||||
asm ("stf.spill %0 = %1%P0" : "=m" (*addr) : "f"(value));
|
||||
__asm__ ("stf.spill %0 = %1%P0" : "=m" (*addr) : "f"(value));
|
||||
#endif
|
||||
|
||||
/* Load a value from ADDR, which is in the current cpu implementation's
|
||||
@@ -94,7 +94,7 @@ endian_adjust (void *addr, size_t len)
|
||||
#define ldf_fill(result, addr)
|
||||
#else
|
||||
#define ldf_fill(result, addr) \
|
||||
asm ("ldf.fill %0 = %1%P1" : "=f"(result) : "m"(*addr));
|
||||
__asm__ ("ldf.fill %0 = %1%P1" : "=f"(result) : "m"(*addr));
|
||||
#endif
|
||||
|
||||
/* Return the size of the C type associated with with TYPE. Which will
|
||||
|
||||
@@ -70,9 +70,9 @@ typedef struct call_builder
|
||||
call_context *aregs;
|
||||
int used_integer;
|
||||
int used_float;
|
||||
size_t *used_stack;
|
||||
size_t *stack;
|
||||
size_t next_struct_area;
|
||||
size_t *used_stack; /* Stack pointer. */
|
||||
size_t *stack; /* Place for arguments pass by reference. */
|
||||
size_t next_struct_area; /* Offset for arguments pass by reference. */
|
||||
} call_builder;
|
||||
|
||||
/* Integer (not pointer) less than ABI GRLEN. */
|
||||
@@ -450,13 +450,17 @@ static void
|
||||
ffi_call_int (ffi_cif *cif, void (*fn) (void), void *rvalue, void **avalue,
|
||||
void *closure)
|
||||
{
|
||||
size_t arg_bytes = FFI_ALIGN (cif->bytes, STKALIGN);
|
||||
|
||||
/* This is a conservative estimate, assuming a complex return value and
|
||||
that all remaining arguments are long long / __int128 */
|
||||
size_t arg_bytes = cif->bytes;
|
||||
size_t extra_bytes = cif->nargs <= 3 ? 0 :
|
||||
FFI_ALIGN(2 * sizeof(size_t) * (cif->nargs - 3), STKALIGN);
|
||||
|
||||
size_t rval_bytes = 0;
|
||||
if (rvalue == NULL && cif->rtype->size > 2 * __SIZEOF_POINTER__)
|
||||
rval_bytes = FFI_ALIGN (cif->rtype->size, STKALIGN);
|
||||
size_t alloc_size = arg_bytes + rval_bytes + sizeof (call_context);
|
||||
size_t alloc_size = arg_bytes + extra_bytes + rval_bytes + sizeof (call_context);
|
||||
|
||||
/* The assembly code will deallocate all stack data at lower addresses
|
||||
than the argument region, so we need to allocate the frame and the
|
||||
@@ -475,9 +479,9 @@ ffi_call_int (ffi_cif *cif, void (*fn) (void), void *rvalue, void **avalue,
|
||||
|
||||
call_builder cb;
|
||||
cb.used_float = cb.used_integer = 0;
|
||||
cb.aregs = (call_context *) (alloc_base + arg_bytes + rval_bytes);
|
||||
cb.used_stack = (void *) alloc_base;
|
||||
cb.stack = (void *) alloc_base;
|
||||
cb.aregs = (call_context *) (alloc_base + arg_bytes + extra_bytes + rval_bytes);
|
||||
cb.used_stack = (size_t *)((char *) alloc_base);
|
||||
cb.stack = (size_t *)((char *) alloc_base + extra_bytes + rval_bytes);
|
||||
cb.next_struct_area = arg_bytes;
|
||||
|
||||
int return_by_ref = passed_by_ref (&cb, cif->rtype, 0);
|
||||
+26
-11
@@ -50,25 +50,40 @@ typedef enum ffi_abi
|
||||
FFI_LP64S,
|
||||
FFI_LP64F,
|
||||
FFI_LP64D,
|
||||
FFI_ILP32S,
|
||||
FFI_ILP32F,
|
||||
FFI_ILP32D,
|
||||
FFI_LAST_ABI,
|
||||
|
||||
#if defined(__loongarch64)
|
||||
#if defined(__loongarch_soft_float)
|
||||
FFI_DEFAULT_ABI = FFI_LP64S
|
||||
#elif defined(__loongarch_single_float)
|
||||
FFI_DEFAULT_ABI = FFI_LP64F
|
||||
#elif defined(__loongarch_double_float)
|
||||
FFI_DEFAULT_ABI = FFI_LP64D
|
||||
#if __loongarch_grlen == 64
|
||||
#if defined(__loongarch_soft_float)
|
||||
FFI_DEFAULT_ABI = FFI_LP64S
|
||||
#elif defined(__loongarch_single_float)
|
||||
FFI_DEFAULT_ABI = FFI_LP64F
|
||||
#elif defined(__loongarch_double_float)
|
||||
FFI_DEFAULT_ABI = FFI_LP64D
|
||||
#else
|
||||
#error unsupported LoongArch floating-point ABI
|
||||
#endif
|
||||
#elif __loongarch_grlen == 32
|
||||
#if defined(__loongarch_soft_float)
|
||||
FFI_DEFAULT_ABI = FFI_ILP32S
|
||||
#elif defined(__loongarch_single_float)
|
||||
FFI_DEFAULT_ABI = FFI_ILP32F
|
||||
#elif defined(__loongarch_double_float)
|
||||
FFI_DEFAULT_ABI = FFI_ILP32D
|
||||
#else
|
||||
#error unsupported LoongArch floating-point ABI
|
||||
#endif
|
||||
#else
|
||||
#error unsupported LoongArch floating-point ABI
|
||||
#endif
|
||||
#else
|
||||
#error unsupported LoongArch base architecture
|
||||
#error unsupported LoongArch base architecture
|
||||
#endif
|
||||
} ffi_abi;
|
||||
|
||||
#endif /* LIBFFI_ASM */
|
||||
|
||||
#define FFI_TARGET_HAS_INT128
|
||||
|
||||
/* ---- Definitions for closures ----------------------------------------- */
|
||||
|
||||
#define FFI_CLOSURES 1
|
||||
@@ -35,10 +35,12 @@
|
||||
# define PTRS 8
|
||||
# define LARG ld.d
|
||||
# define SARG st.d
|
||||
# define ADDI addi.d
|
||||
#else
|
||||
# define PTRS 4
|
||||
# define LARG ld.w
|
||||
# define SARG st.w
|
||||
# define ADDI addi.w
|
||||
#endif
|
||||
|
||||
#if defined(__loongarch_single_float)
|
||||
@@ -89,17 +91,17 @@ ffi_call_asm:
|
||||
we preserve the call_context so that it can be read back in the
|
||||
caller. */
|
||||
|
||||
.cfi_def_cfa 5, FRAME_LEN # Interim CFA based on a1.
|
||||
.cfi_def_cfa 5, FRAME_LEN /* Interim CFA based on a1. */
|
||||
SARG $fp, $a1, FRAME_LEN - 2*PTRS
|
||||
.cfi_offset 22, -2*PTRS
|
||||
SARG $ra, $a1, FRAME_LEN - 1*PTRS
|
||||
.cfi_offset 1, -1*PTRS
|
||||
|
||||
addi.d $fp, $a1, FRAME_LEN
|
||||
ADDI $fp, $a1, FRAME_LEN
|
||||
move $sp, $a0
|
||||
.cfi_def_cfa 22, 0 # Our frame is fully set up.
|
||||
.cfi_def_cfa 22, 0 /* Our frame is fully set up. */
|
||||
|
||||
# Load arguments.
|
||||
/* Load arguments. */
|
||||
move $t1, $a2
|
||||
move $t2, $a3
|
||||
|
||||
@@ -136,7 +138,7 @@ ffi_call_asm:
|
||||
SARG $a1, $fp, -FRAME_LEN+8*FLTS+1*PTRS
|
||||
|
||||
/* Restore and return. */
|
||||
addi.d $sp, $fp, -FRAME_LEN
|
||||
ADDI $sp, $fp, -FRAME_LEN
|
||||
.cfi_def_cfa 3, FRAME_LEN
|
||||
LARG $ra, $fp, -1*PTRS
|
||||
.cfi_restore 1
|
||||
@@ -159,7 +161,7 @@ ffi_call_asm:
|
||||
|
||||
ffi_closure_asm:
|
||||
.cfi_startproc
|
||||
addi.d $sp, $sp, -FRAME_LEN
|
||||
ADDI $sp, $sp, -FRAME_LEN
|
||||
.cfi_def_cfa_offset FRAME_LEN
|
||||
|
||||
/* Make a frame. */
|
||||
@@ -167,7 +169,7 @@ ffi_closure_asm:
|
||||
.cfi_offset 22, -2*PTRS
|
||||
SARG $ra, $sp, FRAME_LEN - 1*PTRS
|
||||
.cfi_offset 1, -1*PTRS
|
||||
addi.d $fp, $sp, FRAME_LEN
|
||||
ADDI $fp, $sp, FRAME_LEN
|
||||
|
||||
/* Save arguments. */
|
||||
#if FLTS
|
||||
@@ -194,7 +196,7 @@ ffi_closure_asm:
|
||||
LARG $a0, $t0, FFI_TRAMPOLINE_SIZE+0*PTRS
|
||||
LARG $a1, $t0, FFI_TRAMPOLINE_SIZE+1*PTRS
|
||||
LARG $a2, $t0, FFI_TRAMPOLINE_SIZE+2*PTRS
|
||||
addi.d $a3, $sp, FRAME_LEN
|
||||
ADDI $a3, $sp, FRAME_LEN
|
||||
move $a4, $sp
|
||||
|
||||
bl ffi_closure_inner
|
||||
@@ -213,7 +215,7 @@ ffi_closure_asm:
|
||||
.cfi_restore 1
|
||||
LARG $fp, $sp, FRAME_LEN-2*PTRS
|
||||
.cfi_restore 22
|
||||
addi.d $sp, $sp, FRAME_LEN
|
||||
ADDI $sp, $sp, FRAME_LEN
|
||||
.cfi_def_cfa_offset 0
|
||||
jr $ra
|
||||
.cfi_endproc
|
||||
@@ -241,8 +243,8 @@ trampoline_code_table:
|
||||
|
||||
.rept 65536 / 16
|
||||
pcaddu12i $t1, 16 # 65536 >> 12
|
||||
ld.d $t0, $t1, 0
|
||||
ld.d $t1, $t1, 8
|
||||
LARG $t0, $t1, 0
|
||||
LARG $t1, $t1, PTRS
|
||||
jirl $zero, $t1, 0
|
||||
.endr
|
||||
.size trampoline_code_table, .-trampoline_code_table
|
||||
@@ -262,7 +264,7 @@ trampoline_code_table:
|
||||
|
||||
ffi_go_closure_asm:
|
||||
.cfi_startproc
|
||||
addi.d $sp, $sp, -FRAME_LEN
|
||||
ADDI $sp, $sp, -FRAME_LEN
|
||||
.cfi_def_cfa_offset FRAME_LEN
|
||||
|
||||
/* Make a frame. */
|
||||
@@ -270,7 +272,7 @@ ffi_go_closure_asm:
|
||||
.cfi_offset 22, -2*PTRS
|
||||
SARG $ra, $sp, FRAME_LEN - 1*PTRS
|
||||
.cfi_offset 1, -1*PTRS
|
||||
addi.d $fp, $sp, FRAME_LEN
|
||||
ADDI $fp, $sp, FRAME_LEN
|
||||
|
||||
/* Save arguments. */
|
||||
#if FLTS
|
||||
@@ -297,7 +299,7 @@ ffi_go_closure_asm:
|
||||
LARG $a0, $t2, 1*PTRS
|
||||
LARG $a1, $t2, 2*PTRS
|
||||
move $a2, $t2
|
||||
addi.d $a3, $sp, FRAME_LEN
|
||||
ADDI $a3, $sp, FRAME_LEN
|
||||
move $a4, $sp
|
||||
|
||||
bl ffi_closure_inner
|
||||
@@ -316,7 +318,7 @@ ffi_go_closure_asm:
|
||||
.cfi_restore 1
|
||||
LARG $fp, $sp, FRAME_LEN-2*PTRS
|
||||
.cfi_restore 22
|
||||
addi.d $sp, $sp, FRAME_LEN
|
||||
ADDI $sp, $sp, FRAME_LEN
|
||||
.cfi_def_cfa_offset 0
|
||||
jr $ra
|
||||
.cfi_endproc
|
||||
Vendored
+1
-1
@@ -275,7 +275,7 @@ void ffi_closure_eabi (unsigned arg1, unsigned arg2, unsigned arg3,
|
||||
/* Allocate space for the return value and call the function. */
|
||||
long long rvalue;
|
||||
(closure->fun) (cif, &rvalue, avalue, closure->user_data);
|
||||
asm ("mov $r12, %0\n ld.l $r0, ($r12)\n ldo.l $r1, 4($r12)" : : "r" (&rvalue));
|
||||
__asm__ ("mov $r12, %0\n ld.l $r0, ($r12)\n ldo.l $r1, 4($r12)" : : "r" (&rvalue));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -269,7 +269,7 @@ void ffi_closure_SYSV(unsigned long r3, unsigned long r4, unsigned long r5,
|
||||
long long rvalue;
|
||||
(closure->fun) (cif, &rvalue, avalue, closure->user_data);
|
||||
if (cif->rtype)
|
||||
asm ("l.ori r12, %0, 0x0\n l.lwz r11, 0(r12)\n l.lwz r12, 4(r12)" : : "r" (&rvalue));
|
||||
__asm__ ("l.ori r12, %0, 0x0\n l.lwz r11, 0(r12)\n l.lwz r12, 4(r12)" : : "r" (&rvalue));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -429,7 +429,7 @@ ffi_status ffi_closure_inner_pa32(ffi_closure *closure, UINT32 *stack)
|
||||
char *tmp;
|
||||
int i, avn;
|
||||
unsigned int slot = FIRST_ARG_SLOT;
|
||||
register UINT32 r28 asm("r28");
|
||||
register UINT32 r28 __asm__("r28");
|
||||
|
||||
cif = closure->cif;
|
||||
|
||||
|
||||
Vendored
-614
@@ -1,614 +0,0 @@
|
||||
/* -----------------------------------------------------------------------
|
||||
ffi64.c - (c) 2022 John David Anglin <dave.anglin@bell.net>
|
||||
|
||||
HPPA Foreign Function Interface
|
||||
PA 64-Bit ABI support
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
``Software''), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
----------------------------------------------------------------------- */
|
||||
|
||||
#include <ffi.h>
|
||||
#include <ffi_common.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define ROUND_UP(v, a) (((size_t)(v) + (a) - 1) & ~((a) - 1))
|
||||
|
||||
#define FIRST_ARG_SLOT 0
|
||||
#define DEBUG_LEVEL 0
|
||||
|
||||
#define fldw(addr, fpreg) \
|
||||
__asm__ volatile ("fldw 4(%0), %%" #fpreg "R" : : "r"(addr) : #fpreg)
|
||||
#define fstw(fpreg, addr) \
|
||||
__asm__ volatile ("fstw %%" #fpreg "R, 4(%0)" : : "r"(addr))
|
||||
#define fldd(addr, fpreg) \
|
||||
__asm__ volatile ("fldd 0(%0), %%" #fpreg "L" : : "r"(addr) : #fpreg)
|
||||
#define fstd(fpreg, addr) \
|
||||
__asm__ volatile ("fstd %%" #fpreg "L, 0(%0)" : : "r"(addr))
|
||||
|
||||
#define debug(lvl, x...) do { if (lvl <= DEBUG_LEVEL) { printf(x); } } while (0)
|
||||
|
||||
static inline int ffi_struct_type(ffi_type *t)
|
||||
{
|
||||
int sz = t->size;
|
||||
|
||||
/* Small structure results are returned in registers 28 and 29,
|
||||
larger ones are in a buffer allocated by the callee. The
|
||||
address of the buffer is passed in r28. The buffer is supposed
|
||||
to be aligned on a 16-byte boundary. Register return values are
|
||||
padded on the right. The pad bits on the right are undefined. */
|
||||
|
||||
if (sz <= 16)
|
||||
return -sz;
|
||||
else
|
||||
return FFI_TYPE_STRUCT;
|
||||
}
|
||||
|
||||
/* PA has a downward growing stack, which looks like this. Stack
|
||||
arguments are offset from the argument ponter (AP) in r29.
|
||||
|
||||
Offset
|
||||
[ Fixed args ]
|
||||
AP-64 arg word 0 (r26, fr4)
|
||||
AP-56 arg word 1 (r25, fr5)
|
||||
AP-48 arg word 2 (r24, fr6)
|
||||
AP-40 arg word 3 (r23, fr7)
|
||||
AP-32 arg word 4 (r22, fr8)
|
||||
AP-24 arg word 5 (r21, fr9)
|
||||
AP-16 arg word 6 (r20, fr10)
|
||||
AP-8 arg word 7 (r19, fr11)
|
||||
[ Variable args; AP = SP-16 if there are no variable args ]
|
||||
AP stack arg 0
|
||||
AP+8 stack arg 1
|
||||
...
|
||||
[ Frame marker ]
|
||||
SP-16 RP
|
||||
SP-8 previous SP
|
||||
|
||||
The first eight argument words on the stack are reserved for use by
|
||||
the callee. Instead, the general and floating registers replace
|
||||
the first four argument slots. Non FP arguments are passed solely
|
||||
in the general registers. Single and double FP arguments are passed
|
||||
in both general and floating registers when using libffi.
|
||||
|
||||
The registers are allocated in the same manner as stack slots.
|
||||
This allows the callee to save its arguments on the stack if
|
||||
necessary:
|
||||
|
||||
arg word 0 -> gr26 or fr4L or fr4R
|
||||
arg word 1 -> gr25 or fr5L or fr5R
|
||||
arg word 2 -> gr24 or fr6L or fr6R
|
||||
arg word 3 -> gr23 or fr7L or fr7R
|
||||
...
|
||||
|
||||
Single Single-precision floating-point parameters, when passed in
|
||||
floating-point registers, are passed in the right halves of the
|
||||
floating point registers; the left halves are unused.
|
||||
|
||||
Quad-precision floating-point parameters within the first 64 bytes of
|
||||
the parameter list are always passed in general registers.
|
||||
|
||||
The rest of the arguments are passed on the stack starting at AP.
|
||||
|
||||
This means we can have holes either in the register allocation,
|
||||
or in the stack. */
|
||||
|
||||
/* ffi_prep_args is called by the assembly routine once stack space
|
||||
has been allocated for the function's arguments
|
||||
|
||||
The following code will put everything into the stack frame
|
||||
(which was allocated by the asm routine), and on return
|
||||
the asm routine will load the arguments that should be
|
||||
passed by register into the appropriate registers
|
||||
|
||||
NOTE: We load floating point args in this function... that means we
|
||||
assume gcc will not mess with fp regs in here. */
|
||||
|
||||
void ffi_prep_args_pa64(UINT64 *stack, extended_cif *ecif, unsigned bytes)
|
||||
{
|
||||
register unsigned int i;
|
||||
register ffi_type **p_arg;
|
||||
register void **p_argv;
|
||||
unsigned int slot = FIRST_ARG_SLOT;
|
||||
size_t len;
|
||||
|
||||
debug(1, "%s: stack = %p, ecif = %p, bytes = %u\n", __FUNCTION__, stack,
|
||||
ecif, bytes);
|
||||
|
||||
p_arg = ecif->cif->arg_types;
|
||||
p_argv = ecif->avalue;
|
||||
|
||||
for (i = 0; i < ecif->cif->nargs; i++)
|
||||
{
|
||||
int type = (*p_arg)->type;
|
||||
|
||||
len = (*p_arg)->size;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case FFI_TYPE_SINT8:
|
||||
*(SINT64 *)(stack + slot) = *(SINT8 *)(*p_argv);
|
||||
break;
|
||||
|
||||
case FFI_TYPE_UINT8:
|
||||
*(UINT64 *)(stack + slot) = *(UINT8 *)(*p_argv);
|
||||
break;
|
||||
|
||||
case FFI_TYPE_SINT16:
|
||||
*(SINT64 *)(stack + slot) = *(SINT16 *)(*p_argv);
|
||||
break;
|
||||
|
||||
case FFI_TYPE_UINT16:
|
||||
*(UINT64 *)(stack + slot) = *(UINT16 *)(*p_argv);
|
||||
break;
|
||||
|
||||
case FFI_TYPE_SINT32:
|
||||
*(SINT64 *)(stack + slot) = *(SINT32 *)(*p_argv);
|
||||
break;
|
||||
|
||||
case FFI_TYPE_UINT32:
|
||||
*(UINT64 *)(stack + slot) = *(UINT32 *)(*p_argv);
|
||||
break;
|
||||
|
||||
case FFI_TYPE_UINT64:
|
||||
case FFI_TYPE_SINT64:
|
||||
case FFI_TYPE_POINTER:
|
||||
debug(3, "Storing UINT64 %lu in slot %u\n", *(UINT64 *)(*p_argv),
|
||||
slot);
|
||||
*(UINT64 *)(stack + slot) = *(UINT64 *)(*p_argv);
|
||||
break;
|
||||
|
||||
case FFI_TYPE_FLOAT:
|
||||
/* First 8 args go in fr4L - fr11L. */
|
||||
debug(3, "Storing UINT32(float) in slot %u\n", slot);
|
||||
*(UINT64 *)(stack + slot) = *(UINT32 *)(*p_argv);
|
||||
switch (slot - FIRST_ARG_SLOT)
|
||||
{
|
||||
/* First 4 args go in fr4L - fr7L. */
|
||||
case 0: fldw(stack + slot, fr4); break;
|
||||
case 1: fldw(stack + slot, fr5); break;
|
||||
case 2: fldw(stack + slot, fr6); break;
|
||||
case 3: fldw(stack + slot, fr7); break;
|
||||
case 4: fldw(stack + slot, fr8); break;
|
||||
case 5: fldw(stack + slot, fr9); break;
|
||||
case 6: fldw(stack + slot, fr10); break;
|
||||
case 7: fldw(stack + slot, fr11); break;
|
||||
}
|
||||
break;
|
||||
|
||||
case FFI_TYPE_DOUBLE:
|
||||
debug(3, "Storing UINT64(double) at slot %u\n", slot);
|
||||
*(UINT64 *)(stack + slot) = *(UINT64 *)(*p_argv);
|
||||
switch (slot - FIRST_ARG_SLOT)
|
||||
{
|
||||
/* First 8 args go in fr4 to fr11. */
|
||||
case 0: fldd(stack + slot, fr4); break;
|
||||
case 1: fldd(stack + slot, fr5); break;
|
||||
case 2: fldd(stack + slot, fr6); break;
|
||||
case 3: fldd(stack + slot, fr7); break;
|
||||
case 4: fldd(stack + slot, fr8); break;
|
||||
case 5: fldd(stack + slot, fr9); break;
|
||||
case 6: fldd(stack + slot, fr10); break;
|
||||
case 7: fldd(stack + slot, fr11); break;
|
||||
}
|
||||
break;
|
||||
|
||||
#ifdef PA64_HPUX
|
||||
case FFI_TYPE_LONGDOUBLE:
|
||||
/* Align slot to a 16-byte boundary. */
|
||||
slot += (slot & 1);
|
||||
*(UINT64 *)(stack + slot) = *(UINT64 *)(*p_argv);
|
||||
*(UINT64 *)(stack + slot + 1) = *(UINT64 *)(*p_argv + 8);
|
||||
break;
|
||||
#endif
|
||||
|
||||
case FFI_TYPE_STRUCT:
|
||||
/* Structs larger than 8 bytes are aligned on a 16-byte boundary. */
|
||||
if (len > 8)
|
||||
slot += (slot & 1);
|
||||
memcpy((char *)(stack + slot), (char *)*p_argv, len);
|
||||
break;
|
||||
|
||||
default:
|
||||
FFI_ASSERT(0);
|
||||
}
|
||||
|
||||
slot += ROUND_UP (len, 8) >> 3;
|
||||
p_arg++;
|
||||
p_argv++;
|
||||
}
|
||||
|
||||
FFI_ASSERT(slot * 8 <= bytes);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static void ffi_size_stack_pa64(ffi_cif *cif)
|
||||
{
|
||||
ffi_type **ptr;
|
||||
int i;
|
||||
int z = 0; /* # stack slots */
|
||||
|
||||
for (ptr = cif->arg_types, i = 0; i < cif->nargs; ptr++, i++)
|
||||
{
|
||||
int type = (*ptr)->type;
|
||||
int size = (*ptr)->size;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
#ifdef PA64_HPUX
|
||||
case FFI_TYPE_LONGDOUBLE:
|
||||
z += 2 + (z & 1);
|
||||
break;
|
||||
#endif
|
||||
|
||||
case FFI_TYPE_STRUCT:
|
||||
if (size > 8)
|
||||
z += (z & 1);
|
||||
z += ROUND_UP (size, 8) >> 3;
|
||||
break;
|
||||
|
||||
default: /* 64-bit values */
|
||||
z++;
|
||||
}
|
||||
}
|
||||
|
||||
/* We need a minimum of 8 argument slots. Stack must be 16-byte
|
||||
aligned. */
|
||||
if (z <= 8)
|
||||
z = 8;
|
||||
else
|
||||
z += (z & 1);
|
||||
|
||||
/* Add 16 bytes for frame marker. */
|
||||
cif->bytes = z * 8 + 64;
|
||||
debug(3, "Calculated stack size is %u bytes\n", cif->bytes);
|
||||
}
|
||||
|
||||
/* Perform machine dependent cif processing. */
|
||||
ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
|
||||
{
|
||||
/* Set the return type flag for jump table. */
|
||||
switch (cif->rtype->type)
|
||||
{
|
||||
case FFI_TYPE_COMPLEX:
|
||||
case FFI_TYPE_STRUCT:
|
||||
/* For the return type we have to check the size of the structures.
|
||||
If the size is smaller or equal 8 bytes, the result is given back
|
||||
in one register. If the size is smaller or equal 16 bytes than we
|
||||
return the result in two registers. If the size is bigger than
|
||||
16 bytes, the return is in a buffer allocated by the caller. */
|
||||
cif->flags = ffi_struct_type(cif->rtype);
|
||||
break;
|
||||
|
||||
default:
|
||||
cif->flags = (unsigned) cif->rtype->type;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Lucky us, because of the unique PA ABI we get to do our
|
||||
own stack sizing. */
|
||||
switch (cif->abi)
|
||||
{
|
||||
case FFI_PA64:
|
||||
ffi_size_stack_pa64(cif);
|
||||
break;
|
||||
|
||||
default:
|
||||
FFI_ASSERT(0);
|
||||
break;
|
||||
}
|
||||
|
||||
return FFI_OK;
|
||||
}
|
||||
|
||||
extern void ffi_call_pa64(void (*)(UINT64 *, extended_cif *, unsigned),
|
||||
extended_cif *, unsigned, unsigned, unsigned *,
|
||||
void (*fn)(void));
|
||||
|
||||
void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
|
||||
{
|
||||
extended_cif ecif;
|
||||
|
||||
ecif.cif = cif;
|
||||
ecif.avalue = avalue;
|
||||
|
||||
/* If the return value is a struct and we don't have a return
|
||||
value address then we need to make one. */
|
||||
|
||||
if (rvalue == NULL
|
||||
&& (cif->rtype->type == FFI_TYPE_STRUCT
|
||||
|| cif->rtype->type == FFI_TYPE_COMPLEX)
|
||||
&& cif->rtype->size > 16)
|
||||
ecif.rvalue = alloca(ROUND_UP (cif->rtype->size, 16));
|
||||
else
|
||||
ecif.rvalue = rvalue;
|
||||
|
||||
|
||||
switch (cif->abi)
|
||||
{
|
||||
case FFI_PA64:
|
||||
debug(3, "Calling ffi_call_pa64: ecif=%p, bytes=%u, flags=%u, rvalue=%p, fn=%p\n", &ecif, cif->bytes, cif->flags, ecif.rvalue, (void *)fn);
|
||||
ffi_call_pa64(ffi_prep_args_pa64, &ecif, cif->bytes,
|
||||
cif->flags, ecif.rvalue, fn);
|
||||
break;
|
||||
|
||||
default:
|
||||
FFI_ASSERT(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#if FFI_CLOSURES
|
||||
/* This is more-or-less an inverse of ffi_call -- we have arguments on
|
||||
the stack, and we need to fill them into a cif structure and invoke
|
||||
the user function. This really ought to be in asm to make sure
|
||||
the compiler doesn't do things we don't expect. */
|
||||
ffi_status ffi_closure_inner_pa64(ffi_closure *closure, UINT64 *stack)
|
||||
{
|
||||
ffi_cif *cif;
|
||||
void **avalue;
|
||||
void *rvalue;
|
||||
/* Functions can return up to 128-bits in registers. Return address
|
||||
must be double word aligned. */
|
||||
union { long double rld; UINT64 ret[2]; } u;
|
||||
ffi_type **p_arg;
|
||||
char *tmp;
|
||||
int i, avn;
|
||||
unsigned int slot = FIRST_ARG_SLOT;
|
||||
register UINT64 r28 asm("r28");
|
||||
|
||||
cif = closure->cif;
|
||||
|
||||
/* If returning via structure, callee will write to our pointer. */
|
||||
if (cif->flags == FFI_TYPE_STRUCT)
|
||||
rvalue = (void *)r28;
|
||||
else
|
||||
rvalue = &u;
|
||||
|
||||
avalue = (void **)alloca(cif->nargs * FFI_SIZEOF_ARG);
|
||||
avn = cif->nargs;
|
||||
p_arg = cif->arg_types;
|
||||
|
||||
for (i = 0; i < avn; i++)
|
||||
{
|
||||
int type = (*p_arg)->type;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case FFI_TYPE_SINT8:
|
||||
case FFI_TYPE_UINT8:
|
||||
avalue[i] = (void *)(stack + slot) + 7;
|
||||
break;
|
||||
|
||||
case FFI_TYPE_SINT16:
|
||||
case FFI_TYPE_UINT16:
|
||||
avalue[i] = (void *)(stack + slot) + 6;
|
||||
break;
|
||||
|
||||
case FFI_TYPE_SINT32:
|
||||
case FFI_TYPE_UINT32:
|
||||
avalue[i] = (void *)(stack + slot) + 4;
|
||||
break;
|
||||
|
||||
case FFI_TYPE_POINTER:
|
||||
case FFI_TYPE_SINT64:
|
||||
case FFI_TYPE_UINT64:
|
||||
avalue[i] = (void *)(stack + slot);
|
||||
break;
|
||||
|
||||
case FFI_TYPE_FLOAT:
|
||||
/* The closure call is indirect. In Linux, floating point
|
||||
arguments in indirect calls with a prototype are passed
|
||||
in the floating point registers instead of the general
|
||||
registers. So, we need to replace what was previously
|
||||
stored in the current slot with the value in the
|
||||
corresponding floating point register. */
|
||||
switch (slot + FIRST_ARG_SLOT)
|
||||
{
|
||||
case 0: fstw(fr4, (void *)(stack + slot)); break;
|
||||
case 1: fstw(fr5, (void *)(stack + slot)); break;
|
||||
case 2: fstw(fr6, (void *)(stack + slot)); break;
|
||||
case 3: fstw(fr7, (void *)(stack + slot)); break;
|
||||
case 4: fstw(fr8, (void *)(stack + slot)); break;
|
||||
case 5: fstw(fr9, (void *)(stack + slot)); break;
|
||||
case 6: fstw(fr10, (void *)(stack + slot)); break;
|
||||
case 7: fstw(fr11, (void *)(stack + slot)); break;
|
||||
}
|
||||
avalue[i] = (void *)(stack + slot) + 4;
|
||||
break;
|
||||
|
||||
case FFI_TYPE_DOUBLE:
|
||||
/* See previous comment for FFI_TYPE_FLOAT. */
|
||||
switch (slot + FIRST_ARG_SLOT)
|
||||
{
|
||||
case 0: fstd(fr4, (void *)(stack + slot)); break;
|
||||
case 1: fstd(fr5, (void *)(stack + slot)); break;
|
||||
case 2: fstd(fr6, (void *)(stack + slot)); break;
|
||||
case 3: fstd(fr7, (void *)(stack + slot)); break;
|
||||
case 4: fstd(fr8, (void *)(stack + slot)); break;
|
||||
case 5: fstd(fr9, (void *)(stack + slot)); break;
|
||||
case 6: fstd(fr10, (void *)(stack + slot)); break;
|
||||
case 7: fstd(fr11, (void *)(stack + slot)); break;
|
||||
}
|
||||
avalue[i] = (void *)(stack + slot);
|
||||
break;
|
||||
|
||||
#ifdef PA64_HPUX
|
||||
case FFI_TYPE_LONGDOUBLE:
|
||||
/* Long doubles are treated like a big structure. */
|
||||
slot += (slot & 1);
|
||||
avalue[i] = (void *)(stack + slot);
|
||||
break;
|
||||
#endif
|
||||
|
||||
case FFI_TYPE_STRUCT:
|
||||
/* All structs are passed in registers. Structs larger
|
||||
than 8 bytes are aligned on a 16-byte boundary. */
|
||||
if((*p_arg)->size > 8)
|
||||
slot += (slot & 1);
|
||||
avalue[i] = (void *) (stack + slot);
|
||||
break;
|
||||
|
||||
default:
|
||||
FFI_ASSERT(0);
|
||||
}
|
||||
|
||||
slot += (ROUND_UP ((*p_arg)->size, 8) >> 3);
|
||||
p_arg++;
|
||||
}
|
||||
|
||||
/* Invoke the closure. */
|
||||
(closure->fun) (cif, rvalue, avalue, closure->user_data);
|
||||
|
||||
debug(3, "after calling function, ret[0] = %16lx, ret[1] = %16lx\n", u.ret[0],
|
||||
u.ret[1]);
|
||||
|
||||
/* Store the result using the lower 2 bytes of the flags. */
|
||||
switch (cif->flags)
|
||||
{
|
||||
case FFI_TYPE_UINT8:
|
||||
*(stack + FIRST_ARG_SLOT) = (UINT8)u.ret[0];
|
||||
break;
|
||||
case FFI_TYPE_SINT8:
|
||||
*(stack + FIRST_ARG_SLOT) = (SINT8)u.ret[0];
|
||||
break;
|
||||
case FFI_TYPE_UINT16:
|
||||
*(stack + FIRST_ARG_SLOT) = (UINT16)u.ret[0];
|
||||
break;
|
||||
case FFI_TYPE_SINT16:
|
||||
*(stack + FIRST_ARG_SLOT) = (SINT16)u.ret[0];
|
||||
break;
|
||||
case FFI_TYPE_INT:
|
||||
case FFI_TYPE_SINT32:
|
||||
*(stack + FIRST_ARG_SLOT) = (SINT32)u.ret[0];
|
||||
break;
|
||||
case FFI_TYPE_UINT32:
|
||||
*(stack - FIRST_ARG_SLOT) = (UINT32)u.ret[0];
|
||||
break;
|
||||
case FFI_TYPE_SINT64:
|
||||
case FFI_TYPE_UINT64:
|
||||
case FFI_TYPE_POINTER:
|
||||
*(stack - FIRST_ARG_SLOT) = u.ret[0];
|
||||
break;
|
||||
|
||||
case FFI_TYPE_LONGDOUBLE:
|
||||
*(stack + FIRST_ARG_SLOT) = u.ret[0];
|
||||
*(stack + FIRST_ARG_SLOT + 1) = u.ret[1];
|
||||
break;
|
||||
|
||||
case FFI_TYPE_DOUBLE:
|
||||
fldd(rvalue, fr4);
|
||||
break;
|
||||
|
||||
case FFI_TYPE_FLOAT:
|
||||
/* Adjust for address adjustment in fldw macro. */
|
||||
fldw(rvalue - 4, fr4);
|
||||
break;
|
||||
|
||||
case FFI_TYPE_STRUCT:
|
||||
/* Don't need a return value, done by caller. */
|
||||
break;
|
||||
|
||||
case -1:
|
||||
case -2:
|
||||
case -3:
|
||||
case -4:
|
||||
case -5:
|
||||
case -6:
|
||||
case -7:
|
||||
case -8:
|
||||
case -9:
|
||||
case -10:
|
||||
case -11:
|
||||
case -12:
|
||||
case -13:
|
||||
case -14:
|
||||
case -15:
|
||||
case -16:
|
||||
tmp = (void*)(stack + FIRST_ARG_SLOT);
|
||||
memcpy((void*)tmp, &u, cif->rtype->size);
|
||||
break;
|
||||
|
||||
case FFI_TYPE_VOID:
|
||||
break;
|
||||
|
||||
default:
|
||||
debug(0, "assert with cif->flags: %d\n",cif->flags);
|
||||
FFI_ASSERT(0);
|
||||
break;
|
||||
}
|
||||
return FFI_OK;
|
||||
}
|
||||
|
||||
/* Fill in a closure to refer to the specified fun and user_data.
|
||||
cif specifies the argument and result types for fun.
|
||||
The cif must already be prep'ed. */
|
||||
|
||||
extern void ffi_closure_pa64(void);
|
||||
|
||||
ffi_status
|
||||
ffi_prep_closure_loc (ffi_closure* closure,
|
||||
ffi_cif* cif,
|
||||
void (*fun)(ffi_cif*,void*,void**,void*),
|
||||
void *user_data,
|
||||
void *codeloc)
|
||||
{
|
||||
/* The layout of a function descriptor. */
|
||||
struct pa64_fd
|
||||
{
|
||||
UINT64 tmp1;
|
||||
UINT64 tmp2;
|
||||
UINT64 code_pointer;
|
||||
UINT64 gp;
|
||||
};
|
||||
|
||||
struct ffi_pa64_trampoline_struct
|
||||
{
|
||||
UINT64 real_gp; /* Real gp value. */
|
||||
UINT64 tmp2;
|
||||
UINT64 code_pointer; /* Pointer to ffi_closure_unix. */
|
||||
UINT64 fake_gp; /* Pointer to closure, installed as gp. */
|
||||
};
|
||||
|
||||
struct ffi_pa64_trampoline_struct *tramp;
|
||||
struct pa64_fd *fd;
|
||||
|
||||
if (cif->abi != FFI_PA64)
|
||||
return FFI_BAD_ABI;
|
||||
|
||||
/* Get function descriptor address for ffi_closure_pa64. */
|
||||
fd = (struct pa64_fd *)((UINT64)ffi_closure_pa64);
|
||||
|
||||
/* Setup trampoline. */
|
||||
tramp = (struct ffi_pa64_trampoline_struct *)closure->tramp;
|
||||
tramp->code_pointer = fd->code_pointer;
|
||||
tramp->fake_gp = (UINT64)codeloc;
|
||||
tramp->real_gp = fd->gp;
|
||||
|
||||
closure->cif = cif;
|
||||
closure->user_data = user_data;
|
||||
closure->fun = fun;
|
||||
|
||||
return FFI_OK;
|
||||
}
|
||||
#endif
|
||||
+105
-153
@@ -174,12 +174,12 @@ LCFI..1:
|
||||
|
||||
/* look up the proper starting point in table */
|
||||
/* by using return type as offset */
|
||||
lhz r3, 10(r3) /* load type from return type */
|
||||
ld r4, LC..60(2) /* get address of jump table */
|
||||
sldi r3, r3, 4 /* now multiply return type by 16 */
|
||||
ld r0, 240+16(r1) /* load return address */
|
||||
add r3, r3, r4 /* add contents of table to table address */
|
||||
mtctr r3
|
||||
mtlr r0
|
||||
bctr /* jump to it */
|
||||
|
||||
/* Each fragment must be exactly 16 bytes long (4 instructions).
|
||||
@@ -187,96 +187,78 @@ LCFI..1:
|
||||
.align 4
|
||||
|
||||
L..60:
|
||||
/* case FFI_TYPE_VOID */
|
||||
mtlr r0
|
||||
/* case PPC_LD_NONE */
|
||||
addi r1, r1, 240
|
||||
blr
|
||||
nop
|
||||
nop
|
||||
|
||||
/* case PPC_LD_R3 */
|
||||
ld r3, 112+0(r1)
|
||||
addi r1, r1, 240
|
||||
blr
|
||||
nop
|
||||
|
||||
/* case FFI_TYPE_INT */
|
||||
lwa r3, 112+4(r1)
|
||||
mtlr r0
|
||||
/* case PPC_LD_R3R4 */
|
||||
ld r3, 112+0(r1)
|
||||
ld r4, 112+8(r1)
|
||||
addi r1, r1, 240
|
||||
blr
|
||||
|
||||
/* case FFI_TYPE_FLOAT */
|
||||
/* case PPC_LD_F32 */
|
||||
lfs f1, 112+0(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 240
|
||||
blr
|
||||
|
||||
/* case FFI_TYPE_DOUBLE */
|
||||
lfd f1, 112+0(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 240
|
||||
blr
|
||||
|
||||
/* case FFI_TYPE_LONGDOUBLE */
|
||||
lfd f1, 112+0(r1)
|
||||
mtlr r0
|
||||
lfd f2, 112+8(r1)
|
||||
b L..finish
|
||||
|
||||
/* case FFI_TYPE_UINT8 */
|
||||
lbz r3, 112+7(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 240
|
||||
blr
|
||||
|
||||
/* case FFI_TYPE_SINT8 */
|
||||
lbz r3, 112+7(r1)
|
||||
mtlr r0
|
||||
extsb r3, r3
|
||||
b L..finish
|
||||
|
||||
/* case FFI_TYPE_UINT16 */
|
||||
lhz r3, 112+6(r1)
|
||||
mtlr r0
|
||||
L..finish:
|
||||
addi r1, r1, 240
|
||||
blr
|
||||
|
||||
/* case FFI_TYPE_SINT16 */
|
||||
lha r3, 112+6(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 240
|
||||
blr
|
||||
|
||||
/* case FFI_TYPE_UINT32 */
|
||||
lwz r3, 112+4(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 240
|
||||
blr
|
||||
|
||||
/* case FFI_TYPE_SINT32 */
|
||||
lwa r3, 112+4(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 240
|
||||
blr
|
||||
|
||||
/* case FFI_TYPE_UINT64 */
|
||||
ld r3, 112+0(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 240
|
||||
blr
|
||||
|
||||
/* case FFI_TYPE_SINT64 */
|
||||
ld r3, 112+0(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 240
|
||||
blr
|
||||
|
||||
/* case FFI_TYPE_STRUCT */
|
||||
mtlr r0
|
||||
addi r1, r1, 240
|
||||
blr
|
||||
nop
|
||||
|
||||
/* case FFI_TYPE_POINTER */
|
||||
ld r3, 112+0(r1)
|
||||
mtlr r0
|
||||
/* case PPC_LD_F64 */
|
||||
lfd f1, 112+0(r1)
|
||||
addi r1, r1, 240
|
||||
blr
|
||||
nop
|
||||
|
||||
/* case PPC_LD_F128 */
|
||||
lfd f1, 112+0(r1)
|
||||
lfd f2, 112+8(r1)
|
||||
addi r1, r1, 240
|
||||
blr
|
||||
|
||||
/* case PPC_LD_U8 */
|
||||
lbz r3, 112+7(r1)
|
||||
addi r1, r1, 240
|
||||
blr
|
||||
nop
|
||||
|
||||
/* case PPC_LD_S8 */
|
||||
lbz r3, 112+7(r1)
|
||||
extsb r3, r3
|
||||
addi r1, r1, 240
|
||||
blr
|
||||
|
||||
/* case PPC_LD_U16 */
|
||||
lhz r3, 112+6(r1)
|
||||
addi r1, r1, 240
|
||||
blr
|
||||
nop
|
||||
|
||||
/* case PPC_LD_S16 */
|
||||
lha r3, 112+6(r1)
|
||||
addi r1, r1, 240
|
||||
blr
|
||||
nop
|
||||
|
||||
/* case PPC_LD_U32 */
|
||||
lwz r3, 112+4(r1)
|
||||
addi r1, r1, 240
|
||||
blr
|
||||
nop
|
||||
|
||||
/* case PPC_LD_S32 */
|
||||
lwa r3, 112+4(r1)
|
||||
addi r1, r1, 240
|
||||
blr
|
||||
nop
|
||||
|
||||
LFE..0:
|
||||
|
||||
#else /* ! __64BIT__ */
|
||||
@@ -355,12 +337,12 @@ LCFI..1:
|
||||
|
||||
/* look up the proper starting point in table */
|
||||
/* by using return type as offset */
|
||||
lhz r3, 6(r3) /* load type from return type */
|
||||
lwz r4, LC..60(2) /* get address of jump table */
|
||||
slwi r3, r3, 4 /* now multiply return type by 16 */
|
||||
lwz r0, 176+8(r1) /* load return address */
|
||||
add r3, r3, r4 /* add contents of table to table address */
|
||||
mtctr r3
|
||||
mtlr r0
|
||||
bctr /* jump to it */
|
||||
|
||||
/* Each fragment must be exactly 16 bytes long (4 instructions).
|
||||
@@ -368,96 +350,66 @@ LCFI..1:
|
||||
.align 4
|
||||
|
||||
L..60:
|
||||
/* case FFI_TYPE_VOID */
|
||||
mtlr r0
|
||||
/* case PPC_LD_NONE */
|
||||
addi r1, r1, 176
|
||||
blr
|
||||
nop
|
||||
nop
|
||||
|
||||
/* case PPC_LD_R3 */
|
||||
lwz r3, 56+0(r1)
|
||||
addi r1, r1, 176
|
||||
blr
|
||||
nop
|
||||
|
||||
/* case FFI_TYPE_INT */
|
||||
/* case PPC_LD_R3R4 */
|
||||
lwz r3, 56+0(r1)
|
||||
mtlr r0
|
||||
lwz r4, 56+4(r1)
|
||||
addi r1, r1, 176
|
||||
blr
|
||||
|
||||
/* case FFI_TYPE_FLOAT */
|
||||
/* case PPC_LD_F32 */
|
||||
lfs f1, 56+0(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 176
|
||||
blr
|
||||
|
||||
/* case FFI_TYPE_DOUBLE */
|
||||
lfd f1, 56+0(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 176
|
||||
blr
|
||||
|
||||
/* case FFI_TYPE_LONGDOUBLE */
|
||||
lfd f1, 56+0(r1)
|
||||
mtlr r0
|
||||
lfd f2, 56+8(r1)
|
||||
b L..finish
|
||||
|
||||
/* case FFI_TYPE_UINT8 */
|
||||
lbz r3, 56+3(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 176
|
||||
blr
|
||||
|
||||
/* case FFI_TYPE_SINT8 */
|
||||
lbz r3, 56+3(r1)
|
||||
mtlr r0
|
||||
extsb r3, r3
|
||||
b L..finish
|
||||
|
||||
/* case FFI_TYPE_UINT16 */
|
||||
lhz r3, 56+2(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 176
|
||||
blr
|
||||
|
||||
/* case FFI_TYPE_SINT16 */
|
||||
lha r3, 56+2(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 176
|
||||
blr
|
||||
|
||||
/* case FFI_TYPE_UINT32 */
|
||||
lwz r3, 56+0(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 176
|
||||
blr
|
||||
|
||||
/* case FFI_TYPE_SINT32 */
|
||||
lwz r3, 56+0(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 176
|
||||
blr
|
||||
|
||||
/* case FFI_TYPE_UINT64 */
|
||||
lwz r3, 56+0(r1)
|
||||
mtlr r0
|
||||
lwz r4, 56+4(r1)
|
||||
b L..finish
|
||||
|
||||
/* case FFI_TYPE_SINT64 */
|
||||
lwz r3, 56+0(r1)
|
||||
mtlr r0
|
||||
lwz r4, 56+4(r1)
|
||||
b L..finish
|
||||
|
||||
/* case FFI_TYPE_STRUCT */
|
||||
mtlr r0
|
||||
addi r1, r1, 176
|
||||
blr
|
||||
nop
|
||||
|
||||
/* case FFI_TYPE_POINTER */
|
||||
lwz r3, 56+0(r1)
|
||||
mtlr r0
|
||||
L..finish:
|
||||
/* case PPC_LD_F64 */
|
||||
lfd f1, 56+0(r1)
|
||||
addi r1, r1, 176
|
||||
blr
|
||||
nop
|
||||
|
||||
/* case PPC_LD_F128 */
|
||||
lfd f1, 56+0(r1)
|
||||
lfd f2, 56+8(r1)
|
||||
addi r1, r1, 176
|
||||
blr
|
||||
|
||||
/* case PPC_LD_U8 */
|
||||
lbz r3, 56+3(r1)
|
||||
addi r1, r1, 176
|
||||
blr
|
||||
nop
|
||||
|
||||
/* case PPC_LD_S8 */
|
||||
lbz r3, 56+3(r1)
|
||||
extsb r3, r3
|
||||
addi r1, r1, 176
|
||||
blr
|
||||
|
||||
/* case PPC_LD_U16 */
|
||||
lhz r3, 56+2(r1)
|
||||
addi r1, r1, 176
|
||||
blr
|
||||
nop
|
||||
|
||||
/* case PPC_LD_S16 */
|
||||
lha r3, 56+2(r1)
|
||||
addi r1, r1, 176
|
||||
blr
|
||||
nop
|
||||
|
||||
LFE..0:
|
||||
#endif
|
||||
.ef __LINE__
|
||||
|
||||
Vendored
+20
@@ -114,6 +114,26 @@ ffi_call_int (ffi_cif *cif,
|
||||
if (rvalue && ecif.rvalue == smst_buffer)
|
||||
{
|
||||
unsigned int rsize = cif->rtype->size;
|
||||
#ifdef FFI_TARGET_HAS_COMPLEX_TYPE
|
||||
/* Integer-typed _Complex: the .Lsmall_struct return path stored
|
||||
r3 at buffer offset 0 and r4 at offset 8. Extract one inner-
|
||||
sized half from each slot — right-justified on BE, low-address
|
||||
on LE — and lay them out as the natural packed complex value
|
||||
the caller expects (real@0, imag@hsize). */
|
||||
if (cif->rtype->type == FFI_TYPE_COMPLEX
|
||||
&& (cif->flags & (FLAG_RETURNS_FP | FLAG_RETURNS_VEC)) == 0)
|
||||
{
|
||||
size_t hsize = cif->rtype->elements[0]->size;
|
||||
#ifndef __LITTLE_ENDIAN__
|
||||
size_t off = 8 - hsize;
|
||||
#else
|
||||
size_t off = 0;
|
||||
#endif
|
||||
memcpy ((char *) rvalue, (char *) smst_buffer + off, hsize);
|
||||
memcpy ((char *) rvalue + hsize, (char *) smst_buffer + 8 + off, hsize);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#ifndef __LITTLE_ENDIAN__
|
||||
/* The SYSV ABI returns a structure of up to 4 bytes in size
|
||||
left-padded in r3. */
|
||||
|
||||
Vendored
+41
-1
@@ -32,6 +32,13 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
struct ffi_aix_trampoline_struct {
|
||||
void * code_pointer; /* Pointer to ffi_closure_ASM */
|
||||
void * toc; /* TOC */
|
||||
void * static_chain; /* Pointer to closure */
|
||||
};
|
||||
|
||||
extern void ffi_closure_ASM (void);
|
||||
|
||||
#if defined (FFI_GO_CLOSURES)
|
||||
@@ -1442,7 +1449,40 @@ ffi_closure_helper_common (ffi_cif* cif,
|
||||
(fun) (cif, rvalue, avalue, user_data);
|
||||
|
||||
/* Tell ffi_closure_ASM to perform return type promotions. */
|
||||
return cif->rtype;
|
||||
switch (cif->rtype->type)
|
||||
{
|
||||
case FFI_TYPE_VOID:
|
||||
case FFI_TYPE_STRUCT:
|
||||
return PPC_LD_NONE;
|
||||
case FFI_TYPE_FLOAT:
|
||||
return PPC_LD_F32;
|
||||
case FFI_TYPE_DOUBLE:
|
||||
return PPC_LD_F64;
|
||||
#if FFI_TYPE_DOUBLE != FFI_TYPE_LONGDOUBLE
|
||||
case FFI_TYPE_LONGDOUBLE:
|
||||
return PPC_LD_F128;
|
||||
#endif
|
||||
case FFI_TYPE_UINT8:
|
||||
return PPC_LD_U8;
|
||||
case FFI_TYPE_SINT8:
|
||||
return PPC_LD_S8;
|
||||
case FFI_TYPE_UINT16:
|
||||
return PPC_LD_U16;
|
||||
case FFI_TYPE_SINT16:
|
||||
return PPC_LD_S16;
|
||||
case FFI_TYPE_UINT32:
|
||||
return PPC_LD_U32;
|
||||
case FFI_TYPE_INT:
|
||||
case FFI_TYPE_SINT32:
|
||||
return PPC_LD_S32;
|
||||
case FFI_TYPE_POINTER:
|
||||
return PPC_LD_PTR;
|
||||
case FFI_TYPE_UINT64:
|
||||
case FFI_TYPE_SINT64:
|
||||
return PPC_LD_I64;
|
||||
default:
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
ffi_type *
|
||||
|
||||
+405
-15
@@ -30,6 +30,7 @@
|
||||
|
||||
#include "ffi.h"
|
||||
#include <tramp.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef POWERPC64
|
||||
#include "ffi_common.h"
|
||||
@@ -95,6 +96,26 @@ discover_homogeneous_aggregate (ffi_abi abi,
|
||||
*elnum = 1;
|
||||
return (int) t->type;
|
||||
|
||||
#ifdef FFI_TARGET_HAS_COMPLEX_TYPE
|
||||
case FFI_TYPE_COMPLEX:
|
||||
/* Count complex of an FP base as two elements of that base, so a
|
||||
struct containing complex members is recognised as an HFA. This
|
||||
only affects FFI_TYPE_COMPLEX *inside* structs; the top-level
|
||||
complex arg path has its own case in the cif/args/closure loops
|
||||
and never reaches the FFI_TYPE_STRUCT branches. */
|
||||
{
|
||||
unsigned int inner_elnum = 0;
|
||||
unsigned int inner
|
||||
= discover_homogeneous_aggregate (abi, t->elements[0], &inner_elnum);
|
||||
if (inner == FFI_TYPE_FLOAT || inner == FFI_TYPE_DOUBLE)
|
||||
{
|
||||
*elnum = 2 * inner_elnum;
|
||||
return inner;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
case FFI_TYPE_STRUCT:;
|
||||
{
|
||||
unsigned int base_elt = 0, total_elnum = 0;
|
||||
@@ -195,9 +216,6 @@ homogeneous:
|
||||
flags |= FLAG_RETURNS_FP;
|
||||
break;
|
||||
|
||||
case FFI_TYPE_UINT128:
|
||||
flags |= FLAG_RETURNS_128BITS;
|
||||
/* Fall through. */
|
||||
case FFI_TYPE_UINT64:
|
||||
case FFI_TYPE_SINT64:
|
||||
case FFI_TYPE_POINTER:
|
||||
@@ -226,6 +244,46 @@ homogeneous:
|
||||
flags |= FLAG_RETURNS_NOTHING;
|
||||
break;
|
||||
|
||||
#ifdef FFI_TARGET_HAS_COMPLEX_TYPE
|
||||
case FFI_TYPE_COMPLEX:
|
||||
rtype = cif->rtype->elements[0]->type;
|
||||
switch (rtype)
|
||||
{
|
||||
case FFI_TYPE_FLOAT:
|
||||
case FFI_TYPE_DOUBLE:
|
||||
/* float/double _Complex are returned in (f1, f2), matching
|
||||
the assembly path for a 2-element FP HFA. */
|
||||
flags |= FLAG_RETURNS_SMST;
|
||||
goto homogeneous;
|
||||
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
|
||||
case FFI_TYPE_LONGDOUBLE:
|
||||
/* Only the 64-bit long double case is wired up; IBM-128 and
|
||||
IEEE-binary128 _Complex are left as a follow-up. */
|
||||
if ((cif->abi & (FFI_LINUX_LONG_DOUBLE_128
|
||||
| FFI_LINUX_LONG_DOUBLE_IEEE128)) != 0)
|
||||
return FFI_BAD_TYPEDEF;
|
||||
flags |= FLAG_RETURNS_SMST;
|
||||
rtype = FFI_TYPE_DOUBLE;
|
||||
goto homogeneous;
|
||||
#endif
|
||||
case FFI_TYPE_INT:
|
||||
case FFI_TYPE_SINT8: case FFI_TYPE_UINT8:
|
||||
case FFI_TYPE_SINT16: case FFI_TYPE_UINT16:
|
||||
case FFI_TYPE_SINT32: case FFI_TYPE_UINT32:
|
||||
case FFI_TYPE_SINT64: case FFI_TYPE_UINT64:
|
||||
case FFI_TYPE_POINTER:
|
||||
/* Integer-typed _Complex: real returned in r3, imag in r4.
|
||||
Take the .Lsmall_struct return path (FLAG_RETURNS_SMST
|
||||
without FP/VEC) and let the bounce-buffer logic in
|
||||
ffi_call_int repack the two halves. */
|
||||
flags |= FLAG_RETURNS_SMST;
|
||||
break;
|
||||
default:
|
||||
return FFI_BAD_TYPEDEF;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
/* Returns 32-bit integer, or similar. Nothing to do here. */
|
||||
break;
|
||||
@@ -315,6 +373,51 @@ homogeneous:
|
||||
if (intarg_count > NUM_GPR_ARG_REGISTERS64)
|
||||
flags |= FLAG_ARG_NEEDS_PSAVE;
|
||||
break;
|
||||
|
||||
#ifdef FFI_TARGET_HAS_COMPLEX_TYPE
|
||||
case FFI_TYPE_COMPLEX:
|
||||
/* Each half of a _Complex argument is passed independently: an FP
|
||||
half in its own FPR (and its own GPR shadow slot); an integer
|
||||
half in its own GPR slot. This matches GCC's split_complex_arg
|
||||
under ELFv2, and is what differentiates _Complex from a
|
||||
same-sized struct{T;T;} which uses fewer GPR shadow slots. */
|
||||
elt = (*ptr)->elements[0]->type;
|
||||
switch (elt)
|
||||
{
|
||||
case FFI_TYPE_FLOAT:
|
||||
case FFI_TYPE_DOUBLE:
|
||||
fparg_count += 2;
|
||||
intarg_count += 2;
|
||||
if (fparg_count > NUM_FPR_ARG_REGISTERS64)
|
||||
flags |= FLAG_ARG_NEEDS_PSAVE;
|
||||
break;
|
||||
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
|
||||
case FFI_TYPE_LONGDOUBLE:
|
||||
if ((cif->abi & (FFI_LINUX_LONG_DOUBLE_128
|
||||
| FFI_LINUX_LONG_DOUBLE_IEEE128)) != 0)
|
||||
return FFI_BAD_TYPEDEF;
|
||||
fparg_count += 2;
|
||||
intarg_count += 2;
|
||||
if (fparg_count > NUM_FPR_ARG_REGISTERS64)
|
||||
flags |= FLAG_ARG_NEEDS_PSAVE;
|
||||
break;
|
||||
#endif
|
||||
case FFI_TYPE_INT:
|
||||
case FFI_TYPE_SINT8: case FFI_TYPE_UINT8:
|
||||
case FFI_TYPE_SINT16: case FFI_TYPE_UINT16:
|
||||
case FFI_TYPE_SINT32: case FFI_TYPE_UINT32:
|
||||
case FFI_TYPE_SINT64: case FFI_TYPE_UINT64:
|
||||
case FFI_TYPE_POINTER:
|
||||
intarg_count += 2;
|
||||
break;
|
||||
default:
|
||||
return FFI_BAD_TYPEDEF;
|
||||
}
|
||||
if (intarg_count > NUM_GPR_ARG_REGISTERS64)
|
||||
flags |= FLAG_ARG_NEEDS_PSAVE;
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
FFI_ASSERT (0);
|
||||
}
|
||||
@@ -648,6 +751,98 @@ ffi_prep_args64 (extended_cif *ecif, unsigned long *const stack)
|
||||
FFI_ASSERT (flags & FLAG_FP_ARGUMENTS);
|
||||
break;
|
||||
|
||||
#ifdef FFI_TARGET_HAS_COMPLEX_TYPE
|
||||
case FFI_TYPE_COMPLEX:
|
||||
elt = (*ptr)->elements[0]->type;
|
||||
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
|
||||
/* 64-bit long double is equivalent to double; the IBM-128 and
|
||||
IEEE-binary128 variants were rejected in prep_cif. */
|
||||
if (elt == FFI_TYPE_LONGDOUBLE)
|
||||
elt = FFI_TYPE_DOUBLE;
|
||||
#endif
|
||||
if (elt == FFI_TYPE_FLOAT)
|
||||
{
|
||||
float *cval = (float *) *p_argv.v;
|
||||
unsigned int j;
|
||||
for (j = 0; j < 2; j++)
|
||||
{
|
||||
double_tmp = cval[j];
|
||||
if (fparg_count < NUM_FPR_ARG_REGISTERS64 && i < nfixedargs)
|
||||
*fpr_base.d++ = double_tmp;
|
||||
else
|
||||
{
|
||||
# ifndef __LITTLE_ENDIAN__
|
||||
next_arg.f[1] = (float) double_tmp;
|
||||
# else
|
||||
next_arg.f[0] = (float) double_tmp;
|
||||
# endif
|
||||
}
|
||||
if (++next_arg.ul == gpr_end.ul)
|
||||
next_arg.ul = rest.ul;
|
||||
fparg_count++;
|
||||
}
|
||||
FFI_ASSERT (flags & FLAG_FP_ARGUMENTS);
|
||||
}
|
||||
else if (elt == FFI_TYPE_DOUBLE)
|
||||
{
|
||||
double *cval = (double *) *p_argv.v;
|
||||
unsigned int j;
|
||||
for (j = 0; j < 2; j++)
|
||||
{
|
||||
double_tmp = cval[j];
|
||||
if (fparg_count < NUM_FPR_ARG_REGISTERS64 && i < nfixedargs)
|
||||
*fpr_base.d++ = double_tmp;
|
||||
else
|
||||
*next_arg.d = double_tmp;
|
||||
if (++next_arg.ul == gpr_end.ul)
|
||||
next_arg.ul = rest.ul;
|
||||
fparg_count++;
|
||||
}
|
||||
FFI_ASSERT (flags & FLAG_FP_ARGUMENTS);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Integer-typed _Complex: each half consumes one GPR slot,
|
||||
sign-/zero-extended to a doubleword. */
|
||||
char *cval = (char *) *p_argv.v;
|
||||
size_t hsize = (*ptr)->elements[0]->size;
|
||||
unsigned int j;
|
||||
for (j = 0; j < 2; j++)
|
||||
{
|
||||
char *half = cval + j * hsize;
|
||||
unsigned long gprvalue;
|
||||
switch (elt)
|
||||
{
|
||||
case FFI_TYPE_UINT8:
|
||||
gprvalue = *(unsigned char *) half; break;
|
||||
case FFI_TYPE_SINT8:
|
||||
gprvalue = (unsigned long) (long) *(signed char *) half;
|
||||
break;
|
||||
case FFI_TYPE_UINT16:
|
||||
gprvalue = *(unsigned short *) half; break;
|
||||
case FFI_TYPE_SINT16:
|
||||
gprvalue = (unsigned long) (long) *(signed short *) half;
|
||||
break;
|
||||
case FFI_TYPE_UINT32:
|
||||
gprvalue = *(unsigned int *) half; break;
|
||||
case FFI_TYPE_INT:
|
||||
case FFI_TYPE_SINT32:
|
||||
gprvalue = (unsigned long) (long) *(signed int *) half;
|
||||
break;
|
||||
case FFI_TYPE_SINT64:
|
||||
case FFI_TYPE_UINT64:
|
||||
case FFI_TYPE_POINTER:
|
||||
default:
|
||||
gprvalue = *(unsigned long *) half; break;
|
||||
}
|
||||
*next_arg.ul++ = gprvalue;
|
||||
if (next_arg.ul == gpr_end.ul)
|
||||
next_arg.ul = rest.ul;
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
case FFI_TYPE_STRUCT:
|
||||
if ((ecif->cif->abi & FFI_LINUX_STRUCT_ALIGN) != 0)
|
||||
{
|
||||
@@ -1132,6 +1327,79 @@ ffi_closure_helper_LINUX64 (ffi_cif *cif,
|
||||
pst++;
|
||||
break;
|
||||
|
||||
#ifdef FFI_TARGET_HAS_COMPLEX_TYPE
|
||||
case FFI_TYPE_COMPLEX:
|
||||
/* Reassemble each _Complex argument from successive registers (or
|
||||
parameter-save slots when registers are exhausted) into a
|
||||
contiguous in-memory value for the closure. */
|
||||
{
|
||||
unsigned int j;
|
||||
elt = arg_types[i]->elements[0]->type;
|
||||
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
|
||||
if (elt == FFI_TYPE_LONGDOUBLE)
|
||||
elt = FFI_TYPE_DOUBLE;
|
||||
#endif
|
||||
if (elt == FFI_TYPE_FLOAT)
|
||||
{
|
||||
float *cval = alloca (2 * sizeof (float));
|
||||
for (j = 0; j < 2; j++)
|
||||
{
|
||||
if (pfr < end_pfr && i < nfixedargs)
|
||||
{
|
||||
cval[j] = (float) pfr->d;
|
||||
pfr++;
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifndef __LITTLE_ENDIAN__
|
||||
cval[j] = ((float *) pst)[1];
|
||||
#else
|
||||
cval[j] = ((float *) pst)[0];
|
||||
#endif
|
||||
}
|
||||
pst++;
|
||||
}
|
||||
avalue[i] = cval;
|
||||
}
|
||||
else if (elt == FFI_TYPE_DOUBLE)
|
||||
{
|
||||
double *cval = alloca (2 * sizeof (double));
|
||||
for (j = 0; j < 2; j++)
|
||||
{
|
||||
if (pfr < end_pfr && i < nfixedargs)
|
||||
{
|
||||
cval[j] = pfr->d;
|
||||
pfr++;
|
||||
}
|
||||
else
|
||||
cval[j] = *(double *) pst;
|
||||
pst++;
|
||||
}
|
||||
avalue[i] = cval;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Integer-typed _Complex: each half lives in its own GPR
|
||||
slot, right-justified on BE, low-address on LE. */
|
||||
size_t hsize = arg_types[i]->elements[0]->size;
|
||||
char *cval = alloca (2 * hsize);
|
||||
for (j = 0; j < 2; j++)
|
||||
{
|
||||
char *src;
|
||||
#ifndef __LITTLE_ENDIAN__
|
||||
src = (char *) pst + (8 - hsize);
|
||||
#else
|
||||
src = (char *) pst;
|
||||
#endif
|
||||
memcpy (cval + j * hsize, src, hsize);
|
||||
pst++;
|
||||
}
|
||||
avalue[i] = cval;
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
FFI_ASSERT (0);
|
||||
}
|
||||
@@ -1142,19 +1410,141 @@ ffi_closure_helper_LINUX64 (ffi_cif *cif,
|
||||
(*fun) (cif, rvalue, avalue, user_data);
|
||||
|
||||
/* Tell ffi_closure_LINUX64 how to perform return type promotions. */
|
||||
if ((cif->flags & FLAG_RETURNS_SMST) != 0)
|
||||
switch (cif->rtype->type)
|
||||
{
|
||||
if ((cif->flags & (FLAG_RETURNS_FP | FLAG_RETURNS_VEC)) == 0)
|
||||
return FFI_V2_TYPE_SMALL_STRUCT + cif->rtype->size - 1;
|
||||
else if ((cif->flags & FLAG_RETURNS_VEC) != 0)
|
||||
return FFI_V2_TYPE_VECTOR_HOMOG;
|
||||
else if ((cif->flags & FLAG_RETURNS_64BITS) != 0)
|
||||
return FFI_V2_TYPE_DOUBLE_HOMOG;
|
||||
else
|
||||
return FFI_V2_TYPE_FLOAT_HOMOG;
|
||||
case FFI_TYPE_VOID:
|
||||
return PPC_LD_NONE;
|
||||
case FFI_TYPE_FLOAT:
|
||||
return PPC_LD_F32;
|
||||
case FFI_TYPE_DOUBLE:
|
||||
return PPC_LD_F64;
|
||||
#if FFI_TYPE_DOUBLE != FFI_TYPE_LONGDOUBLE
|
||||
case FFI_TYPE_LONGDOUBLE:
|
||||
if ((cif->flags & FLAG_RETURNS_VEC) != 0)
|
||||
return PPC64_LD_VECTOR;
|
||||
return PPC_LD_F128;
|
||||
#endif
|
||||
case FFI_TYPE_UINT8:
|
||||
return PPC_LD_U8;
|
||||
case FFI_TYPE_SINT8:
|
||||
return PPC_LD_S8;
|
||||
case FFI_TYPE_UINT16:
|
||||
return PPC_LD_U16;
|
||||
case FFI_TYPE_SINT16:
|
||||
return PPC_LD_S16;
|
||||
case FFI_TYPE_UINT32:
|
||||
return PPC_LD_U32;
|
||||
case FFI_TYPE_INT:
|
||||
case FFI_TYPE_SINT32:
|
||||
return PPC_LD_S32;
|
||||
case FFI_TYPE_POINTER:
|
||||
return PPC_LD_PTR;
|
||||
case FFI_TYPE_UINT64:
|
||||
case FFI_TYPE_SINT64:
|
||||
return PPC_LD_I64;
|
||||
#ifdef FFI_TARGET_HAS_COMPLEX_TYPE
|
||||
case FFI_TYPE_COMPLEX:
|
||||
{
|
||||
int inner = cif->rtype->elements[0]->type;
|
||||
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
|
||||
if (inner == FFI_TYPE_LONGDOUBLE)
|
||||
inner = FFI_TYPE_DOUBLE;
|
||||
#endif
|
||||
if (inner == FFI_TYPE_FLOAT)
|
||||
return PPC64_LD_FLOAT_HOMOG;
|
||||
if (inner == FFI_TYPE_DOUBLE)
|
||||
return PPC64_LD_DOUBLE_HOMOG;
|
||||
/* Integer-typed _Complex: the user wrote the natural packed
|
||||
complex layout into rvalue (real@0, imag@hsize). Repack into
|
||||
two sign-/zero-extended doublewords so the closure assembly
|
||||
can do `ld r3, 0(rvalue); ld r4, 8(rvalue)` and the GCC caller
|
||||
recovers real in r3 and imag in r4. The RETVAL stack area is
|
||||
large enough (64 or 128 bytes) to hold the 16-byte repack. */
|
||||
{
|
||||
char *rv = rvalue;
|
||||
unsigned long re, im;
|
||||
switch (inner)
|
||||
{
|
||||
case FFI_TYPE_UINT8:
|
||||
re = ((unsigned char *) rv)[0];
|
||||
im = ((unsigned char *) rv)[1];
|
||||
break;
|
||||
case FFI_TYPE_SINT8:
|
||||
re = (unsigned long) (long) ((signed char *) rv)[0];
|
||||
im = (unsigned long) (long) ((signed char *) rv)[1];
|
||||
break;
|
||||
case FFI_TYPE_UINT16:
|
||||
re = ((unsigned short *) rv)[0];
|
||||
im = ((unsigned short *) rv)[1];
|
||||
break;
|
||||
case FFI_TYPE_SINT16:
|
||||
re = (unsigned long) (long) ((signed short *) rv)[0];
|
||||
im = (unsigned long) (long) ((signed short *) rv)[1];
|
||||
break;
|
||||
case FFI_TYPE_UINT32:
|
||||
re = ((unsigned int *) rv)[0];
|
||||
im = ((unsigned int *) rv)[1];
|
||||
break;
|
||||
case FFI_TYPE_INT:
|
||||
case FFI_TYPE_SINT32:
|
||||
re = (unsigned long) (long) ((signed int *) rv)[0];
|
||||
im = (unsigned long) (long) ((signed int *) rv)[1];
|
||||
break;
|
||||
case FFI_TYPE_SINT64:
|
||||
case FFI_TYPE_UINT64:
|
||||
case FFI_TYPE_POINTER:
|
||||
default:
|
||||
re = ((unsigned long *) rv)[0];
|
||||
im = ((unsigned long *) rv)[1];
|
||||
break;
|
||||
}
|
||||
((unsigned long *) rv)[0] = re;
|
||||
((unsigned long *) rv)[1] = im;
|
||||
return PPC_LD_R3R4;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
case FFI_TYPE_STRUCT:
|
||||
if ((cif->flags & FLAG_RETURNS_SMST) != 0)
|
||||
{
|
||||
if ((cif->flags & (FLAG_RETURNS_FP | FLAG_RETURNS_VEC)) == 0)
|
||||
{
|
||||
/* A struct smaller than a dword is returned in the low bits
|
||||
of r3 right justified. Larger structs are passed left
|
||||
justified in r3 and r4. The return value area on the
|
||||
stack will have the structs as they are usually stored
|
||||
in memory. */
|
||||
switch (cif->rtype->size)
|
||||
{
|
||||
case 0:
|
||||
return PPC_LD_NONE;
|
||||
case 1:
|
||||
return PPC_LD_U8;
|
||||
case 2:
|
||||
return PPC_LD_U16;
|
||||
case 3:
|
||||
return PPC64_LD_STRUCT_3;
|
||||
case 4:
|
||||
return PPC_LD_U32;
|
||||
case 5:
|
||||
return PPC64_LD_STRUCT_5;
|
||||
case 6:
|
||||
return PPC64_LD_STRUCT_6;
|
||||
case 7:
|
||||
return PPC64_LD_STRUCT_7;
|
||||
case 8 ... 16:
|
||||
return PPC_LD_R3R4;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if ((cif->flags & FLAG_RETURNS_VEC) != 0)
|
||||
return PPC64_LD_VECTOR_HOMOG;
|
||||
if ((cif->flags & FLAG_RETURNS_64BITS) != 0)
|
||||
return PPC64_LD_DOUBLE_HOMOG;
|
||||
return PPC64_LD_FLOAT_HOMOG;
|
||||
}
|
||||
return PPC_LD_NONE;
|
||||
}
|
||||
if ((cif->flags & FLAG_RETURNS_VEC) != 0)
|
||||
return FFI_V2_TYPE_VECTOR;
|
||||
return cif->rtype->type;
|
||||
abort();
|
||||
}
|
||||
#endif
|
||||
+69
@@ -28,6 +28,73 @@
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
----------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Closure jump table indexes
|
||||
*/
|
||||
|
||||
/* Common to ppc32 and ppc64 */
|
||||
#define PPC_LD_NONE 0
|
||||
#define PPC_LD_R3 1
|
||||
#define PPC_LD_R3R4 2
|
||||
#define PPC_LD_F32 3
|
||||
#define PPC_LD_F64 4
|
||||
#define PPC_LD_F128 5
|
||||
#define PPC_LD_U8 6
|
||||
#define PPC_LD_S8 7
|
||||
#define PPC_LD_U16 8
|
||||
#define PPC_LD_S16 9
|
||||
|
||||
#ifndef POWERPC64
|
||||
|
||||
#define PPC_LD_U32 PPC_LD_R3
|
||||
#define PPC_LD_S32 PPC_LD_R3
|
||||
#define PPC_LD_PTR PPC_LD_R3
|
||||
#define PPC_LD_I64 PPC_LD_R3R4
|
||||
|
||||
/* Needed for soft-float long-double. */
|
||||
#define PPC32_LD_R3R6 10
|
||||
|
||||
/* Needed for FFI_SYSV small structure returns. */
|
||||
#ifdef __LITTLE_ENDIAN__
|
||||
#define PPC32_SYSV_LD_STRUCT_3 PPC32_LD_R3
|
||||
#define PPC32_SYSV_LD_STRUCT_5 PPC32_LD_R3R4
|
||||
#define PPC32_SYSV_LD_STRUCT_6 PPC32_LD_R3R4
|
||||
#define PPC32_SYSV_LD_STRUCT_7 PPC32_LD_R3R4
|
||||
#else
|
||||
#define PPC32_SYSV_LD_STRUCT_3 11
|
||||
#define PPC32_SYSV_LD_STRUCT_5 12
|
||||
#define PPC32_SYSV_LD_STRUCT_6 13
|
||||
#define PPC32_SYSV_LD_STRUCT_7 14
|
||||
#endif
|
||||
|
||||
#else /* POWERPC64 */
|
||||
|
||||
#define PPC_LD_U32 10
|
||||
#define PPC_LD_S32 11
|
||||
#define PPC_LD_PTR PPC_LD_R3
|
||||
#define PPC_LD_I64 PPC_LD_R3
|
||||
|
||||
/* Used by ELFv2 for homogenous structure returns. */
|
||||
#define PPC64_LD_VECTOR 12
|
||||
#define PPC64_LD_VECTOR_HOMOG 13
|
||||
#define PPC64_LD_FLOAT_HOMOG 14
|
||||
#define PPC64_LD_DOUBLE_HOMOG 15
|
||||
#ifdef __LITTLE_ENDIAN__
|
||||
#define PPC64_LD_STRUCT_3 PPC_LD_U32
|
||||
#define PPC64_LD_STRUCT_5 PPC_LD_I64
|
||||
#define PPC64_LD_STRUCT_6 PPC_LD_I64
|
||||
#define PPC64_LD_STRUCT_7 PPC_LD_I64
|
||||
#else
|
||||
#define PPC64_LD_STRUCT_3 16
|
||||
#define PPC64_LD_STRUCT_5 17
|
||||
#define PPC64_LD_STRUCT_6 18
|
||||
#define PPC64_LD_STRUCT_7 19
|
||||
#endif
|
||||
|
||||
#endif /* POWERPC64 */
|
||||
|
||||
#ifndef LIBFFI_ASM
|
||||
|
||||
enum {
|
||||
/* The assembly depends on these exact flags. */
|
||||
/* These go in cr7 */
|
||||
@@ -103,3 +170,5 @@ int FFI_HIDDEN ffi_closure_helper_LINUX64 (ffi_cif *,
|
||||
void *, void *,
|
||||
unsigned long *, ffi_dblfl *,
|
||||
float128 *);
|
||||
|
||||
#endif /* !LIBFFI_ASM */
|
||||
Vendored
+59
-8
@@ -30,6 +30,7 @@
|
||||
|
||||
#include "ffi.h"
|
||||
#include <tramp.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifndef POWERPC64
|
||||
#include "ffi_common.h"
|
||||
@@ -921,13 +922,63 @@ ffi_closure_helper_SYSV (ffi_cif *cif,
|
||||
|
||||
/* Tell ffi_closure_SYSV how to perform return type promotions.
|
||||
Because the FFI_SYSV ABI returns the structures <= 8 bytes in
|
||||
r3/r4 we have to tell ffi_closure_SYSV how to treat them. We
|
||||
combine the base type FFI_SYSV_TYPE_SMALL_STRUCT with the size of
|
||||
the struct less one. We never have a struct with size zero.
|
||||
See the comment in ffitarget.h about ordering. */
|
||||
if (rtypenum == FFI_TYPE_STRUCT
|
||||
&& (cif->abi & FFI_SYSV_STRUCT_RET) != 0 && size <= 8)
|
||||
return FFI_SYSV_TYPE_SMALL_STRUCT - 1 + size;
|
||||
return rtypenum;
|
||||
r3/r4 we have to tell ffi_closure_SYSV how to treat them. */
|
||||
switch (rtypenum)
|
||||
{
|
||||
case FFI_TYPE_VOID:
|
||||
return PPC_LD_NONE;
|
||||
case FFI_TYPE_FLOAT:
|
||||
return PPC_LD_F32;
|
||||
case FFI_TYPE_DOUBLE:
|
||||
return PPC_LD_F64;
|
||||
#if FFI_TYPE_DOUBLE != FFI_TYPE_LONGDOUBLE
|
||||
case FFI_TYPE_LONGDOUBLE:
|
||||
return PPC_LD_F128;
|
||||
#endif
|
||||
case FFI_TYPE_UINT8:
|
||||
return PPC_LD_U8;
|
||||
case FFI_TYPE_SINT8:
|
||||
return PPC_LD_S8;
|
||||
case FFI_TYPE_UINT16:
|
||||
return PPC_LD_U16;
|
||||
case FFI_TYPE_SINT16:
|
||||
return PPC_LD_S16;
|
||||
case FFI_TYPE_UINT32:
|
||||
return PPC_LD_U32;
|
||||
case FFI_TYPE_INT:
|
||||
case FFI_TYPE_SINT32:
|
||||
return PPC_LD_S32;
|
||||
case FFI_TYPE_POINTER:
|
||||
return PPC_LD_PTR;
|
||||
case FFI_TYPE_UINT64:
|
||||
case FFI_TYPE_SINT64:
|
||||
return PPC_LD_I64;
|
||||
case FFI_TYPE_UINT128:
|
||||
return PPC32_LD_R3R6;
|
||||
case FFI_TYPE_STRUCT:
|
||||
if (cif->abi & FFI_SYSV_STRUCT_RET)
|
||||
switch (size)
|
||||
{
|
||||
case 1:
|
||||
return PPC_LD_U8;
|
||||
case 2:
|
||||
return PPC_LD_U16;
|
||||
case 3:
|
||||
return PPC32_SYSV_LD_STRUCT_3;
|
||||
case 4:
|
||||
return PPC_LD_U32;
|
||||
case 5:
|
||||
return PPC32_SYSV_LD_STRUCT_5;
|
||||
case 6:
|
||||
return PPC32_SYSV_LD_STRUCT_6;
|
||||
case 7:
|
||||
return PPC32_SYSV_LD_STRUCT_7;
|
||||
case 8:
|
||||
return PPC_LD_I64;
|
||||
}
|
||||
return PPC_LD_NONE;
|
||||
default:
|
||||
abort();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Vendored
+8
-35
@@ -150,33 +150,16 @@ typedef enum ffi_abi {
|
||||
# define FFI_GO_CLOSURES 1
|
||||
#endif
|
||||
|
||||
/* ppc_closure.S and linux64_closure.S expect this. */
|
||||
#define FFI_PPC_TYPE_LAST FFI_TYPE_POINTER
|
||||
|
||||
/* We define additional types below. If generic types are added that
|
||||
must be supported by powerpc libffi then it is likely that
|
||||
FFI_PPC_TYPE_LAST needs increasing *and* the jump tables in
|
||||
ppc_closure.S and linux64_closure.S be extended. */
|
||||
|
||||
#if !(FFI_TYPE_LAST == FFI_PPC_TYPE_LAST \
|
||||
|| (FFI_TYPE_LAST == FFI_TYPE_COMPLEX \
|
||||
&& !defined FFI_TARGET_HAS_COMPLEX_TYPE))
|
||||
# error "You likely have a broken powerpc libffi"
|
||||
/* Complex types are supported on ELFv2 (the only PowerPC64 variant where
|
||||
the assembly and C-side passing/return logic has been wired up). Under
|
||||
ELFv2, float/double _Complex are passed and returned as a 2-element
|
||||
homogeneous floating-point aggregate, but each scalar half consumes a
|
||||
GPR shadow slot of its own — i.e. the same way the underlying C ABI
|
||||
handles them, which is what GCC's split_complex_arg emits. */
|
||||
#if defined(POWERPC64) && _CALL_ELF == 2
|
||||
# define FFI_TARGET_HAS_COMPLEX_TYPE
|
||||
#endif
|
||||
|
||||
/* Needed for soft-float long-double-128 support. */
|
||||
#define FFI_TYPE_UINT128 (FFI_PPC_TYPE_LAST + 1)
|
||||
|
||||
/* Needed for FFI_SYSV small structure returns. */
|
||||
#define FFI_SYSV_TYPE_SMALL_STRUCT (FFI_PPC_TYPE_LAST + 2)
|
||||
|
||||
/* Used by ELFv2 for homogenous structure returns. */
|
||||
#define FFI_V2_TYPE_VECTOR (FFI_PPC_TYPE_LAST + 1)
|
||||
#define FFI_V2_TYPE_VECTOR_HOMOG (FFI_PPC_TYPE_LAST + 2)
|
||||
#define FFI_V2_TYPE_FLOAT_HOMOG (FFI_PPC_TYPE_LAST + 3)
|
||||
#define FFI_V2_TYPE_DOUBLE_HOMOG (FFI_PPC_TYPE_LAST + 4)
|
||||
#define FFI_V2_TYPE_SMALL_STRUCT (FFI_PPC_TYPE_LAST + 5)
|
||||
|
||||
#if _CALL_ELF == 2
|
||||
# define FFI_TRAMPOLINE_SIZE 32
|
||||
#else
|
||||
@@ -191,14 +174,4 @@ typedef enum ffi_abi {
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef LIBFFI_ASM
|
||||
#if defined(POWERPC_DARWIN) || defined(POWERPC_AIX)
|
||||
struct ffi_aix_trampoline_struct {
|
||||
void * code_pointer; /* Pointer to ffi_closure_ASM */
|
||||
void * toc; /* TOC */
|
||||
void * static_chain; /* Pointer to closure */
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+74
-148
@@ -216,187 +216,151 @@ ffi_closure_LINUX64:
|
||||
# look up the proper starting point in table
|
||||
# by using return type as offset
|
||||
ld %r0, STACKFRAME+16(%r1)
|
||||
cmpldi %r3, FFI_V2_TYPE_SMALL_STRUCT
|
||||
bge .Lsmall
|
||||
mflr %r4 # move address of .Lret to r4
|
||||
sldi %r3, %r3, 4 # now multiply return type by 16
|
||||
addi %r4, %r4, .Lret_type0 - .Lret
|
||||
add %r3, %r3, %r4 # add contents of table to table address
|
||||
mtctr %r3
|
||||
mtlr %r0 # restore function return address
|
||||
.cfi_restore 65
|
||||
bctr # jump to it
|
||||
|
||||
# Each of the ret_typeX code fragments has to be exactly 16 bytes long
|
||||
# (4 instructions). For cache effectiveness we align to a 16 byte boundary
|
||||
# first.
|
||||
.align 4
|
||||
# first. Ensure correct spacing and alignment with .org.
|
||||
|
||||
.align 4
|
||||
.Lret_type0:
|
||||
# case FFI_TYPE_VOID
|
||||
mtlr %r0
|
||||
|
||||
.macro E index
|
||||
.align 4
|
||||
.endm
|
||||
|
||||
.macro epilogue
|
||||
addi %r1, %r1, STACKFRAME
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
.cfi_def_cfa_offset STACKFRAME
|
||||
nop
|
||||
# case FFI_TYPE_INT
|
||||
# ifdef __LITTLE_ENDIAN__
|
||||
lwa %r3, RETVAL+0(%r1)
|
||||
# else
|
||||
lwa %r3, RETVAL+4(%r1)
|
||||
# endif
|
||||
mtlr %r0
|
||||
addi %r1, %r1, STACKFRAME
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
.cfi_def_cfa_offset STACKFRAME
|
||||
# case FFI_TYPE_FLOAT
|
||||
.endm
|
||||
|
||||
E PPC_LD_NONE
|
||||
epilogue
|
||||
|
||||
E PPC_LD_R3
|
||||
ld %r3, RETVAL+0(%r1)
|
||||
epilogue
|
||||
|
||||
E PPC_LD_R3R4
|
||||
ld %r3, RETVAL+0(%r1)
|
||||
ld %r4, RETVAL+8(%r1)
|
||||
epilogue
|
||||
|
||||
E PPC_LD_F32
|
||||
lfs %f1, RETVAL+0(%r1)
|
||||
mtlr %r0
|
||||
addi %r1, %r1, STACKFRAME
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
.cfi_def_cfa_offset STACKFRAME
|
||||
# case FFI_TYPE_DOUBLE
|
||||
epilogue
|
||||
|
||||
E PPC_LD_F64
|
||||
lfd %f1, RETVAL+0(%r1)
|
||||
mtlr %r0
|
||||
addi %r1, %r1, STACKFRAME
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
.cfi_def_cfa_offset STACKFRAME
|
||||
# case FFI_TYPE_LONGDOUBLE
|
||||
epilogue
|
||||
|
||||
E PPC_LD_F128
|
||||
lfd %f1, RETVAL+0(%r1)
|
||||
mtlr %r0
|
||||
lfd %f2, RETVAL+8(%r1)
|
||||
b .Lfinish
|
||||
# case FFI_TYPE_UINT8
|
||||
epilogue
|
||||
|
||||
E PPC_LD_U8
|
||||
# ifdef __LITTLE_ENDIAN__
|
||||
lbz %r3, RETVAL+0(%r1)
|
||||
# else
|
||||
lbz %r3, RETVAL+7(%r1)
|
||||
# endif
|
||||
mtlr %r0
|
||||
addi %r1, %r1, STACKFRAME
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
.cfi_def_cfa_offset STACKFRAME
|
||||
# case FFI_TYPE_SINT8
|
||||
epilogue
|
||||
|
||||
E PPC_LD_S8
|
||||
# ifdef __LITTLE_ENDIAN__
|
||||
lbz %r3, RETVAL+0(%r1)
|
||||
# else
|
||||
lbz %r3, RETVAL+7(%r1)
|
||||
# endif
|
||||
extsb %r3,%r3
|
||||
mtlr %r0
|
||||
b .Lfinish
|
||||
# case FFI_TYPE_UINT16
|
||||
epilogue
|
||||
|
||||
E PPC_LD_U16
|
||||
# ifdef __LITTLE_ENDIAN__
|
||||
lhz %r3, RETVAL+0(%r1)
|
||||
# else
|
||||
lhz %r3, RETVAL+6(%r1)
|
||||
# endif
|
||||
mtlr %r0
|
||||
.Lfinish:
|
||||
addi %r1, %r1, STACKFRAME
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
.cfi_def_cfa_offset STACKFRAME
|
||||
# case FFI_TYPE_SINT16
|
||||
epilogue
|
||||
|
||||
E PPC_LD_S16
|
||||
# ifdef __LITTLE_ENDIAN__
|
||||
lha %r3, RETVAL+0(%r1)
|
||||
# else
|
||||
lha %r3, RETVAL+6(%r1)
|
||||
# endif
|
||||
mtlr %r0
|
||||
addi %r1, %r1, STACKFRAME
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
.cfi_def_cfa_offset STACKFRAME
|
||||
# case FFI_TYPE_UINT32
|
||||
epilogue
|
||||
|
||||
E PPC_LD_U32
|
||||
# ifdef __LITTLE_ENDIAN__
|
||||
lwz %r3, RETVAL+0(%r1)
|
||||
# else
|
||||
lwz %r3, RETVAL+4(%r1)
|
||||
# endif
|
||||
mtlr %r0
|
||||
addi %r1, %r1, STACKFRAME
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
.cfi_def_cfa_offset STACKFRAME
|
||||
# case FFI_TYPE_SINT32
|
||||
epilogue
|
||||
|
||||
E PPC_LD_S32
|
||||
# ifdef __LITTLE_ENDIAN__
|
||||
lwa %r3, RETVAL+0(%r1)
|
||||
# else
|
||||
lwa %r3, RETVAL+4(%r1)
|
||||
# endif
|
||||
mtlr %r0
|
||||
addi %r1, %r1, STACKFRAME
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
.cfi_def_cfa_offset STACKFRAME
|
||||
# case FFI_TYPE_UINT64
|
||||
ld %r3, RETVAL+0(%r1)
|
||||
mtlr %r0
|
||||
addi %r1, %r1, STACKFRAME
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
.cfi_def_cfa_offset STACKFRAME
|
||||
# case FFI_TYPE_SINT64
|
||||
ld %r3, RETVAL+0(%r1)
|
||||
mtlr %r0
|
||||
addi %r1, %r1, STACKFRAME
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
.cfi_def_cfa_offset STACKFRAME
|
||||
# case FFI_TYPE_STRUCT
|
||||
mtlr %r0
|
||||
addi %r1, %r1, STACKFRAME
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
.cfi_def_cfa_offset STACKFRAME
|
||||
nop
|
||||
# case FFI_TYPE_POINTER
|
||||
ld %r3, RETVAL+0(%r1)
|
||||
mtlr %r0
|
||||
addi %r1, %r1, STACKFRAME
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
.cfi_def_cfa_offset STACKFRAME
|
||||
# case FFI_V2_TYPE_VECTOR
|
||||
epilogue
|
||||
|
||||
E PPC64_LD_VECTOR
|
||||
addi %r3, %r1, RETVAL
|
||||
lvx %v2, 0, %r3
|
||||
mtlr %r0
|
||||
b .Lfinish
|
||||
# case FFI_V2_TYPE_VECTOR_HOMOG
|
||||
epilogue
|
||||
|
||||
E PPC64_LD_VECTOR_HOMOG
|
||||
addi %r3, %r1, RETVAL
|
||||
lvx %v2, 0, %r3
|
||||
addi %r3, %r3, 16
|
||||
b .Lmorevector
|
||||
# case FFI_V2_TYPE_FLOAT_HOMOG
|
||||
|
||||
E PPC64_LD_FLOAT_HOMOG
|
||||
lfs %f1, RETVAL+0(%r1)
|
||||
lfs %f2, RETVAL+4(%r1)
|
||||
lfs %f3, RETVAL+8(%r1)
|
||||
b .Lmorefloat
|
||||
# case FFI_V2_TYPE_DOUBLE_HOMOG
|
||||
|
||||
E PPC64_LD_DOUBLE_HOMOG
|
||||
lfd %f1, RETVAL+0(%r1)
|
||||
lfd %f2, RETVAL+8(%r1)
|
||||
lfd %f3, RETVAL+16(%r1)
|
||||
b .Lmoredouble
|
||||
|
||||
#ifndef __LITTLE_ENDIAN__
|
||||
E PPC64_LD_STRUCT_3
|
||||
lwz %r3, RETVAL+4(%r1)
|
||||
srd %r3, %r3, 8
|
||||
epilogue
|
||||
#endif
|
||||
|
||||
.Lmoredouble:
|
||||
lfd %f4, RETVAL+24(%r1)
|
||||
mtlr %r0
|
||||
lfd %f5, RETVAL+32(%r1)
|
||||
lfd %f6, RETVAL+40(%r1)
|
||||
lfd %f7, RETVAL+48(%r1)
|
||||
lfd %f8, RETVAL+56(%r1)
|
||||
addi %r1, %r1, STACKFRAME
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
.cfi_def_cfa_offset STACKFRAME
|
||||
epilogue
|
||||
|
||||
.Lmorevector:
|
||||
lvx %v3, 0, %r3
|
||||
addi %r3, %r3, 16
|
||||
lvx %v4, 0, %r3
|
||||
addi %r3, %r3, 16
|
||||
lvx %v5, 0, %r3
|
||||
mtlr %r0
|
||||
addi %r3, %r3, 16
|
||||
lvx %v6, 0, %r3
|
||||
addi %r3, %r3, 16
|
||||
@@ -405,53 +369,15 @@ ffi_closure_LINUX64:
|
||||
lvx %v8, 0, %r3
|
||||
addi %r3, %r3, 16
|
||||
lvx %v9, 0, %r3
|
||||
addi %r1, %r1, STACKFRAME
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
.cfi_def_cfa_offset STACKFRAME
|
||||
epilogue
|
||||
|
||||
.Lmorefloat:
|
||||
lfs %f4, RETVAL+12(%r1)
|
||||
mtlr %r0
|
||||
lfs %f5, RETVAL+16(%r1)
|
||||
lfs %f6, RETVAL+20(%r1)
|
||||
lfs %f7, RETVAL+24(%r1)
|
||||
lfs %f8, RETVAL+28(%r1)
|
||||
addi %r1, %r1, STACKFRAME
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
.cfi_def_cfa_offset STACKFRAME
|
||||
.Lsmall:
|
||||
# ifdef __LITTLE_ENDIAN__
|
||||
ld %r3,RETVAL+0(%r1)
|
||||
mtlr %r0
|
||||
ld %r4,RETVAL+8(%r1)
|
||||
addi %r1, %r1, STACKFRAME
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
# else
|
||||
# A struct smaller than a dword is returned in the low bits of r3
|
||||
# ie. right justified. Larger structs are passed left justified
|
||||
# in r3 and r4. The return value area on the stack will have
|
||||
# the structs as they are usually stored in memory.
|
||||
cmpldi %r3, FFI_V2_TYPE_SMALL_STRUCT + 7 # size 8 bytes?
|
||||
neg %r5, %r3
|
||||
ld %r3,RETVAL+0(%r1)
|
||||
blt .Lsmalldown
|
||||
mtlr %r0
|
||||
ld %r4,RETVAL+8(%r1)
|
||||
addi %r1, %r1, STACKFRAME
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
.cfi_def_cfa_offset STACKFRAME
|
||||
.Lsmalldown:
|
||||
addi %r5, %r5, FFI_V2_TYPE_SMALL_STRUCT + 7
|
||||
mtlr %r0
|
||||
sldi %r5, %r5, 3
|
||||
addi %r1, %r1, STACKFRAME
|
||||
.cfi_def_cfa_offset 0
|
||||
srd %r3, %r3, %r5
|
||||
blr
|
||||
# endif
|
||||
epilogue
|
||||
|
||||
.cfi_endproc
|
||||
# if _CALL_ELF == 2
|
||||
|
||||
+72
-198
@@ -108,263 +108,137 @@ ENTRY(ffi_closure_SYSV)
|
||||
lwz %r0,148(%r1)
|
||||
add %r3,%r3,%r4 # add contents of table to table address
|
||||
mtctr %r3
|
||||
mtlr %r0
|
||||
.cfi_restore 65
|
||||
bctr # jump to it
|
||||
|
||||
# Each of the ret_typeX code fragments has to be exactly 16 bytes long
|
||||
# (4 instructions). For cache effectiveness we align to a 16 byte boundary
|
||||
# first.
|
||||
|
||||
.align 4
|
||||
# case FFI_TYPE_VOID
|
||||
.Lret_type0:
|
||||
mtlr %r0
|
||||
addi %r1,%r1,144
|
||||
|
||||
.macro E index
|
||||
.align 4
|
||||
.endm
|
||||
|
||||
.macro epilogue
|
||||
addi %r1, %r1, 144
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
.cfi_def_cfa_offset 144
|
||||
nop
|
||||
.endm
|
||||
|
||||
# case FFI_TYPE_INT
|
||||
E PPC_LD_NONE
|
||||
epilogue
|
||||
|
||||
E PPC_LD_R3
|
||||
lwz %r3,112+0(%r1)
|
||||
mtlr %r0
|
||||
.Lfinish:
|
||||
addi %r1,%r1,144
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
.cfi_def_cfa_offset 144
|
||||
epilogue
|
||||
|
||||
# case FFI_TYPE_FLOAT
|
||||
#ifndef __NO_FPRS__
|
||||
E PPC_LD_R3R4
|
||||
.Lr3r4:
|
||||
lwz %r3,112+0(%r1)
|
||||
lwz %r4,112+4(%r1)
|
||||
epilogue
|
||||
|
||||
E PPC_LD_F32
|
||||
#ifdef __NO_FPRS__
|
||||
trap
|
||||
#else
|
||||
lfs %f1,112+0(%r1)
|
||||
#else
|
||||
nop
|
||||
epilogue
|
||||
#endif
|
||||
mtlr %r0
|
||||
addi %r1,%r1,144
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
.cfi_def_cfa_offset 144
|
||||
|
||||
# case FFI_TYPE_DOUBLE
|
||||
#ifndef __NO_FPRS__
|
||||
E PPC_LD_F64
|
||||
#ifdef __NO_FPRS__
|
||||
trap
|
||||
#else
|
||||
lfd %f1,112+0(%r1)
|
||||
#else
|
||||
nop
|
||||
epilogue
|
||||
#endif
|
||||
mtlr %r0
|
||||
addi %r1,%r1,144
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
.cfi_def_cfa_offset 144
|
||||
|
||||
# case FFI_TYPE_LONGDOUBLE
|
||||
#ifndef __NO_FPRS__
|
||||
E PPC_LD_F128
|
||||
#ifdef __NO_FPRS__
|
||||
trap
|
||||
#else
|
||||
lfd %f1,112+0(%r1)
|
||||
lfd %f2,112+8(%r1)
|
||||
mtlr %r0
|
||||
b .Lfinish
|
||||
#else
|
||||
mtlr %r0
|
||||
addi %r1,%r1,144
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
.cfi_def_cfa_offset 144
|
||||
nop
|
||||
epilogue
|
||||
#endif
|
||||
|
||||
# case FFI_TYPE_UINT8
|
||||
E PPC_LD_U8
|
||||
#ifdef __LITTLE_ENDIAN__
|
||||
lbz %r3,112+0(%r1)
|
||||
#else
|
||||
lbz %r3,112+3(%r1)
|
||||
#endif
|
||||
mtlr %r0
|
||||
addi %r1,%r1,144
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
.cfi_def_cfa_offset 144
|
||||
epilogue
|
||||
|
||||
# case FFI_TYPE_SINT8
|
||||
E PPC_LD_S8
|
||||
#ifdef __LITTLE_ENDIAN__
|
||||
lbz %r3,112+0(%r1)
|
||||
#else
|
||||
lbz %r3,112+3(%r1)
|
||||
#endif
|
||||
extsb %r3,%r3
|
||||
mtlr %r0
|
||||
b .Lfinish
|
||||
epilogue
|
||||
|
||||
# case FFI_TYPE_UINT16
|
||||
E PPC_LD_U16
|
||||
#ifdef __LITTLE_ENDIAN__
|
||||
lhz %r3,112+0(%r1)
|
||||
#else
|
||||
lhz %r3,112+2(%r1)
|
||||
#endif
|
||||
mtlr %r0
|
||||
addi %r1,%r1,144
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
.cfi_def_cfa_offset 144
|
||||
epilogue
|
||||
|
||||
# case FFI_TYPE_SINT16
|
||||
E PPC_LD_S16
|
||||
#ifdef __LITTLE_ENDIAN__
|
||||
lha %r3,112+0(%r1)
|
||||
#else
|
||||
lha %r3,112+2(%r1)
|
||||
#endif
|
||||
mtlr %r0
|
||||
addi %r1,%r1,144
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
.cfi_def_cfa_offset 144
|
||||
epilogue
|
||||
|
||||
# case FFI_TYPE_UINT32
|
||||
lwz %r3,112+0(%r1)
|
||||
mtlr %r0
|
||||
addi %r1,%r1,144
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
.cfi_def_cfa_offset 144
|
||||
|
||||
# case FFI_TYPE_SINT32
|
||||
lwz %r3,112+0(%r1)
|
||||
mtlr %r0
|
||||
addi %r1,%r1,144
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
.cfi_def_cfa_offset 144
|
||||
|
||||
# case FFI_TYPE_UINT64
|
||||
lwz %r3,112+0(%r1)
|
||||
lwz %r4,112+4(%r1)
|
||||
mtlr %r0
|
||||
b .Lfinish
|
||||
|
||||
# case FFI_TYPE_SINT64
|
||||
lwz %r3,112+0(%r1)
|
||||
lwz %r4,112+4(%r1)
|
||||
mtlr %r0
|
||||
b .Lfinish
|
||||
|
||||
# case FFI_TYPE_STRUCT
|
||||
mtlr %r0
|
||||
addi %r1,%r1,144
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
.cfi_def_cfa_offset 144
|
||||
nop
|
||||
|
||||
# case FFI_TYPE_POINTER
|
||||
lwz %r3,112+0(%r1)
|
||||
mtlr %r0
|
||||
addi %r1,%r1,144
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
.cfi_def_cfa_offset 144
|
||||
|
||||
# case FFI_TYPE_UINT128
|
||||
lwz %r3,112+0(%r1)
|
||||
lwz %r4,112+4(%r1)
|
||||
E PPC32_LD_R3R6
|
||||
lwz %r5,112+8(%r1)
|
||||
b .Luint128
|
||||
|
||||
# The return types below are only used when the ABI type is FFI_SYSV.
|
||||
# case FFI_SYSV_TYPE_SMALL_STRUCT + 1. One byte struct.
|
||||
lbz %r3,112+0(%r1)
|
||||
mtlr %r0
|
||||
addi %r1,%r1,144
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
.cfi_def_cfa_offset 144
|
||||
|
||||
# case FFI_SYSV_TYPE_SMALL_STRUCT + 2. Two byte struct.
|
||||
lhz %r3,112+0(%r1)
|
||||
mtlr %r0
|
||||
addi %r1,%r1,144
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
.cfi_def_cfa_offset 144
|
||||
|
||||
# case FFI_SYSV_TYPE_SMALL_STRUCT + 3. Three byte struct.
|
||||
lwz %r3,112+0(%r1)
|
||||
#ifdef __LITTLE_ENDIAN__
|
||||
mtlr %r0
|
||||
addi %r1,%r1,144
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
.cfi_def_cfa_offset 144
|
||||
#else
|
||||
srwi %r3,%r3,8
|
||||
mtlr %r0
|
||||
b .Lfinish
|
||||
#endif
|
||||
|
||||
# case FFI_SYSV_TYPE_SMALL_STRUCT + 4. Four byte struct.
|
||||
lwz %r3,112+0(%r1)
|
||||
mtlr %r0
|
||||
addi %r1,%r1,144
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
.cfi_def_cfa_offset 144
|
||||
|
||||
# case FFI_SYSV_TYPE_SMALL_STRUCT + 5. Five byte struct.
|
||||
lwz %r3,112+0(%r1)
|
||||
lwz %r4,112+4(%r1)
|
||||
#ifdef __LITTLE_ENDIAN__
|
||||
mtlr %r0
|
||||
b .Lfinish
|
||||
#else
|
||||
li %r5,24
|
||||
b .Lstruct567
|
||||
#endif
|
||||
|
||||
# case FFI_SYSV_TYPE_SMALL_STRUCT + 6. Six byte struct.
|
||||
lwz %r3,112+0(%r1)
|
||||
lwz %r4,112+4(%r1)
|
||||
#ifdef __LITTLE_ENDIAN__
|
||||
mtlr %r0
|
||||
b .Lfinish
|
||||
#else
|
||||
li %r5,16
|
||||
b .Lstruct567
|
||||
#endif
|
||||
|
||||
# case FFI_SYSV_TYPE_SMALL_STRUCT + 7. Seven byte struct.
|
||||
lwz %r3,112+0(%r1)
|
||||
lwz %r4,112+4(%r1)
|
||||
#ifdef __LITTLE_ENDIAN__
|
||||
mtlr %r0
|
||||
b .Lfinish
|
||||
#else
|
||||
li %r5,8
|
||||
b .Lstruct567
|
||||
#endif
|
||||
|
||||
# case FFI_SYSV_TYPE_SMALL_STRUCT + 8. Eight byte struct.
|
||||
lwz %r3,112+0(%r1)
|
||||
lwz %r4,112+4(%r1)
|
||||
mtlr %r0
|
||||
b .Lfinish
|
||||
lwz %r6,112+12(%r1)
|
||||
b .Lr3r4
|
||||
|
||||
#ifndef __LITTLE_ENDIAN__
|
||||
E PPC32_SYSV_LD_STRUCT_3
|
||||
lwz %r3,112+0(%r1)
|
||||
srwi %r3,%r3,8
|
||||
epilogue
|
||||
|
||||
E PPC32_SYSV_LD_STRUCT_5
|
||||
lwz %r3,112+0(%r1)
|
||||
lwz %r4,112+4(%r1)
|
||||
li %r5,24
|
||||
b .Lstruct567
|
||||
|
||||
E PPC32_SYSV_LD_STRUCT_6
|
||||
lwz %r3,112+0(%r1)
|
||||
lwz %r4,112+4(%r1)
|
||||
li %r5,16
|
||||
b .Lstruct567
|
||||
|
||||
E PPC32_SYSV_LD_STRUCT_7
|
||||
lwz %r3,112+0(%r1)
|
||||
lwz %r4,112+4(%r1)
|
||||
li %r5,8
|
||||
nop
|
||||
|
||||
.Lstruct567:
|
||||
subfic %r6,%r5,32
|
||||
srw %r4,%r4,%r5
|
||||
slw %r6,%r3,%r6
|
||||
srw %r3,%r3,%r5
|
||||
or %r4,%r6,%r4
|
||||
mtlr %r0
|
||||
addi %r1,%r1,144
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
.cfi_def_cfa_offset 144
|
||||
epilogue
|
||||
#endif
|
||||
|
||||
.Luint128:
|
||||
lwz %r6,112+12(%r1)
|
||||
mtlr %r0
|
||||
addi %r1,%r1,144
|
||||
.cfi_def_cfa_offset 0
|
||||
blr
|
||||
.cfi_endproc
|
||||
END(ffi_closure_SYSV)
|
||||
|
||||
|
||||
Vendored
+88
-31
@@ -29,16 +29,23 @@
|
||||
|
||||
#include <ffi.h>
|
||||
#include <ffi_common.h>
|
||||
#include "internal.h"
|
||||
#include <tramp.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#if __riscv_float_abi_double
|
||||
#define ABI_FLEN 64
|
||||
#define ABI_FLOAT double
|
||||
typedef union {
|
||||
uint64_t i;
|
||||
double d;
|
||||
} float_reg;
|
||||
#elif __riscv_float_abi_single
|
||||
#define ABI_FLEN 32
|
||||
#define ABI_FLOAT float
|
||||
typedef union {
|
||||
float f;
|
||||
} float_reg;
|
||||
#endif
|
||||
|
||||
#define NARGREG 8
|
||||
@@ -48,7 +55,7 @@
|
||||
typedef struct call_context
|
||||
{
|
||||
#if ABI_FLEN
|
||||
ABI_FLOAT fa[8];
|
||||
float_reg fa[8];
|
||||
#endif
|
||||
size_t a[8];
|
||||
/* used by the assembly code to in-place construct its own stack frame */
|
||||
@@ -127,6 +134,30 @@ static float_struct_info struct_passed_as_elements(call_builder *cb, ffi_type *t
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if ABI_FLEN >= 64
|
||||
/* Float values in wider RISC-V FP registers are NaN-boxed */
|
||||
static void marshal_float(call_builder *cb, void *data) {
|
||||
union {
|
||||
uint32_t i;
|
||||
float f;
|
||||
} value;
|
||||
|
||||
value.f = *(float *)data;
|
||||
cb->aregs->fa[cb->used_float++].i =
|
||||
UINT64_C(0xffffffff00000000) | value.i;
|
||||
}
|
||||
|
||||
static void unmarshal_float(call_builder *cb, void *data) {
|
||||
union {
|
||||
uint32_t i;
|
||||
float f;
|
||||
} value;
|
||||
|
||||
value.i = (uint32_t)cb->aregs->fa[cb->used_float++].i;
|
||||
*(float *)data = value.f;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* allocates a single register, float register, or XLEN-sized stack slot to a datum */
|
||||
@@ -146,17 +177,18 @@ static void marshal_atom(call_builder *cb, int type, void *data) {
|
||||
#endif
|
||||
case FFI_TYPE_POINTER: value = *(size_t *)data; break;
|
||||
|
||||
/* float values may be recoded in an implementation-defined way
|
||||
by hardware conforming to 2.1 or earlier, so use asm to
|
||||
reinterpret floats as doubles */
|
||||
#if ABI_FLEN >= 32
|
||||
#if ABI_FLEN >= 64
|
||||
case FFI_TYPE_FLOAT:
|
||||
asm("" : "=f"(cb->aregs->fa[cb->used_float++]) : "0"(*(float *)data));
|
||||
marshal_float(cb, data);
|
||||
return;
|
||||
#elif ABI_FLEN >= 32
|
||||
case FFI_TYPE_FLOAT:
|
||||
__asm__("" : "=f"(cb->aregs->fa[cb->used_float++].f) : "0"(*(float *)data));
|
||||
return;
|
||||
#endif
|
||||
#if ABI_FLEN >= 64
|
||||
case FFI_TYPE_DOUBLE:
|
||||
asm("" : "=f"(cb->aregs->fa[cb->used_float++]) : "0"(*(double *)data));
|
||||
__asm__("" : "=f"(cb->aregs->fa[cb->used_float++].d) : "0"(*(double *)data));
|
||||
return;
|
||||
#endif
|
||||
default: FFI_ASSERT(0); break;
|
||||
@@ -172,14 +204,18 @@ static void marshal_atom(call_builder *cb, int type, void *data) {
|
||||
static void unmarshal_atom(call_builder *cb, int type, void *data) {
|
||||
size_t value;
|
||||
switch (type) {
|
||||
#if ABI_FLEN >= 32
|
||||
#if ABI_FLEN >= 64
|
||||
case FFI_TYPE_FLOAT:
|
||||
asm("" : "=f"(*(float *)data) : "0"(cb->aregs->fa[cb->used_float++]));
|
||||
unmarshal_float(cb, data);
|
||||
return;
|
||||
#elif ABI_FLEN >= 32
|
||||
case FFI_TYPE_FLOAT:
|
||||
__asm__("" : "=f"(*(float *)data) : "0"(cb->aregs->fa[cb->used_float++].f));
|
||||
return;
|
||||
#endif
|
||||
#if ABI_FLEN >= 64
|
||||
case FFI_TYPE_DOUBLE:
|
||||
asm("" : "=f"(*(double *)data) : "0"(cb->aregs->fa[cb->used_float++]));
|
||||
__asm__("" : "=f"(*(double *)data) : "0"(cb->aregs->fa[cb->used_float++].d));
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
@@ -424,34 +460,44 @@ extern void ffi_closure_asm(void) FFI_HIDDEN;
|
||||
|
||||
ffi_status ffi_prep_closure_loc(ffi_closure *closure, ffi_cif *cif, void (*fun)(ffi_cif*,void*,void**,void*), void *user_data, void *codeloc)
|
||||
{
|
||||
uint32_t *tramp = (uint32_t *) &closure->tramp[0];
|
||||
uint64_t fn = (uint64_t) (uintptr_t) ffi_closure_asm;
|
||||
|
||||
if (cif->abi <= FFI_FIRST_ABI || cif->abi >= FFI_LAST_ABI)
|
||||
return FFI_BAD_ABI;
|
||||
|
||||
/* we will call ffi_closure_inner with codeloc, not closure, but as long
|
||||
as the memory is readable it should work */
|
||||
|
||||
tramp[0] = 0x00000317; /* auipc t1, 0 (i.e. t0 <- codeloc) */
|
||||
#if __SIZEOF_POINTER__ == 8
|
||||
tramp[1] = 0x01033383; /* ld t2, 16(t1) */
|
||||
#else
|
||||
tramp[1] = 0x01032383; /* lw t2, 16(t1) */
|
||||
#ifdef FFI_EXEC_STATIC_TRAMP
|
||||
if (ffi_tramp_is_present (closure))
|
||||
{
|
||||
/* Initialize the static trampoline's parameters. */
|
||||
void (*dest)(void) = ffi_closure_asm;
|
||||
ffi_tramp_set_parms (closure->ftramp, dest, closure);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
tramp[2] = 0x00038067; /* jr t2 */
|
||||
tramp[3] = 0x00000013; /* nop */
|
||||
tramp[4] = fn;
|
||||
tramp[5] = fn >> 32;
|
||||
{
|
||||
uint32_t *tramp = (uint32_t *) &closure->tramp[0];
|
||||
uint64_t fn = (uint64_t) (uintptr_t) ffi_closure_asm;
|
||||
|
||||
/* we will call ffi_closure_inner with codeloc, not closure, but as long
|
||||
as the memory is readable it should work */
|
||||
|
||||
tramp[0] = 0x00000317; /* auipc t1, 0 (i.e. t0 <- codeloc) */
|
||||
#if __SIZEOF_POINTER__ == 8
|
||||
tramp[1] = 0x01033383; /* ld t2, 16(t1) */
|
||||
#else
|
||||
tramp[1] = 0x01032383; /* lw t2, 16(t1) */
|
||||
#endif
|
||||
tramp[2] = 0x00038067; /* jr t2 */
|
||||
tramp[3] = 0x00000013; /* nop */
|
||||
tramp[4] = fn;
|
||||
tramp[5] = fn >> 32;
|
||||
#if !defined(__FreeBSD__)
|
||||
__builtin___clear_cache(codeloc, codeloc + FFI_TRAMPOLINE_SIZE);
|
||||
#endif
|
||||
}
|
||||
|
||||
closure->cif = cif;
|
||||
closure->fun = fun;
|
||||
closure->user_data = user_data;
|
||||
|
||||
#if !defined(__FreeBSD__)
|
||||
__builtin___clear_cache(codeloc, codeloc + FFI_TRAMPOLINE_SIZE);
|
||||
#endif
|
||||
|
||||
return FFI_OK;
|
||||
}
|
||||
|
||||
@@ -512,3 +558,14 @@ ffi_closure_inner (ffi_cif *cif,
|
||||
marshal(&cb, cif->rtype, 0, rvalue);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef FFI_EXEC_STATIC_TRAMP
|
||||
void *
|
||||
ffi_tramp_arch (size_t *tramp_size, size_t *map_size)
|
||||
{
|
||||
extern void *trampoline_code_table;
|
||||
*tramp_size = RISCV_TRAMP_SIZE;
|
||||
*map_size = RISCV_TRAMP_MAP_SIZE;
|
||||
return &trampoline_code_table;
|
||||
}
|
||||
#endif
|
||||
Vendored
+1
@@ -64,6 +64,7 @@ typedef enum ffi_abi {
|
||||
#define FFI_NATIVE_RAW_API 0
|
||||
#define FFI_EXTRA_CIF_FIELDS unsigned riscv_nfixedargs; unsigned riscv_unused
|
||||
#define FFI_TARGET_SPECIFIC_VARIADIC
|
||||
#define FFI_TARGET_HAS_INT128
|
||||
|
||||
#endif
|
||||
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
#ifdef FFI_EXEC_STATIC_TRAMP
|
||||
/* For the trampoline table mapping, a mapping size of 4K (base page size)
|
||||
is chosen. */
|
||||
#define RISCV_TRAMP_MAP_SHIFT 12
|
||||
#define RISCV_TRAMP_MAP_SIZE (1 << RISCV_TRAMP_MAP_SHIFT)
|
||||
#define RISCV_TRAMP_SIZE 16
|
||||
#endif /* FFI_EXEC_STATIC_TRAMP */
|
||||
Vendored
+27
-3
@@ -29,6 +29,7 @@
|
||||
#define LIBFFI_ASM
|
||||
#include <fficonfig.h>
|
||||
#include <ffi.h>
|
||||
#include "internal.h"
|
||||
|
||||
/* Define aliases so that we can handle all ABIs uniformly */
|
||||
|
||||
@@ -86,7 +87,7 @@ ffi_call_asm:
|
||||
preserve the call_context so that it can be read back in the caller.
|
||||
*/
|
||||
|
||||
.cfi_def_cfa 11, FRAME_LEN # interim CFA based on a1
|
||||
.cfi_def_cfa 11, FRAME_LEN /* interim CFA based on a1 */
|
||||
SARG fp, FRAME_LEN - 2*PTRS(a1)
|
||||
.cfi_offset 8, -2*PTRS
|
||||
SARG ra, FRAME_LEN - 1*PTRS(a1)
|
||||
@@ -94,9 +95,9 @@ ffi_call_asm:
|
||||
|
||||
addi fp, a1, FRAME_LEN
|
||||
mv sp, a0
|
||||
.cfi_def_cfa 8, 0 # our frame is fully set up
|
||||
.cfi_def_cfa 8, 0 /* our frame is fully set up */
|
||||
|
||||
# Load arguments
|
||||
/* Load arguments */
|
||||
mv t1, a2
|
||||
mv t2, a3
|
||||
|
||||
@@ -291,3 +292,26 @@ ffi_go_closure_asm:
|
||||
ret
|
||||
.cfi_endproc
|
||||
.size ffi_go_closure_asm, .-ffi_go_closure_asm
|
||||
|
||||
#ifdef FFI_EXEC_STATIC_TRAMP
|
||||
/*
|
||||
trampoline_code_table.
|
||||
*/
|
||||
.globl trampoline_code_table
|
||||
.hidden trampoline_code_table
|
||||
.type trampoline_code_table, @function
|
||||
.align RISCV_TRAMP_MAP_SHIFT
|
||||
trampoline_code_table:
|
||||
.option push
|
||||
# Do not allow the jr insn to be encoded as c.jr for alignment purposes
|
||||
.option norvc
|
||||
.rept RISCV_TRAMP_MAP_SIZE / RISCV_TRAMP_SIZE
|
||||
auipc t2, RISCV_TRAMP_MAP_SIZE >> 12
|
||||
LARG t1, 0(t2)
|
||||
LARG t2, PTRS(t2)
|
||||
jr t2
|
||||
.endr
|
||||
.option pop
|
||||
.size trampoline_code_table,.-trampoline_code_table
|
||||
.align RISCV_TRAMP_MAP_SHIFT
|
||||
#endif /* FFI_EXEC_STATIC_TRAMP */
|
||||
Vendored
+28
-26
@@ -158,9 +158,15 @@ ffi_prep_cif_machdep(ffi_cif *cif)
|
||||
cif->flags = FFI390_RET_VOID;
|
||||
break;
|
||||
|
||||
/* Structures and complex are returned via a hidden pointer. */
|
||||
/* Structures, complex, int128, and long double are
|
||||
returned via a hidden pointer. */
|
||||
case FFI_TYPE_STRUCT:
|
||||
case FFI_TYPE_COMPLEX:
|
||||
case FFI_TYPE_SINT128:
|
||||
case FFI_TYPE_UINT128:
|
||||
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
|
||||
case FFI_TYPE_LONGDOUBLE:
|
||||
#endif
|
||||
cif->flags = FFI390_RET_STRUCT;
|
||||
n_gpr++; /* We need one GPR to pass the pointer. */
|
||||
break;
|
||||
@@ -174,12 +180,6 @@ ffi_prep_cif_machdep(ffi_cif *cif)
|
||||
cif->flags = FFI390_RET_DOUBLE;
|
||||
break;
|
||||
|
||||
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
|
||||
case FFI_TYPE_LONGDOUBLE:
|
||||
cif->flags = FFI390_RET_STRUCT;
|
||||
n_gpr++;
|
||||
break;
|
||||
#endif
|
||||
/* Integer values are returned in gpr 2 (and gpr 3
|
||||
for 64-bit values on 31-bit machines). */
|
||||
case FFI_TYPE_UINT64:
|
||||
@@ -216,24 +216,25 @@ ffi_prep_cif_machdep(ffi_cif *cif)
|
||||
{
|
||||
int type = (*ptr)->type;
|
||||
|
||||
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
|
||||
/* 16-byte long double is passed like a struct. */
|
||||
if (type == FFI_TYPE_LONGDOUBLE)
|
||||
type = FFI_TYPE_STRUCT;
|
||||
#endif
|
||||
|
||||
/* Check how a structure type is passed. */
|
||||
if (type == FFI_TYPE_STRUCT || type == FFI_TYPE_COMPLEX)
|
||||
switch (type)
|
||||
{
|
||||
if (type == FFI_TYPE_COMPLEX)
|
||||
type = FFI_TYPE_POINTER;
|
||||
else
|
||||
type = ffi_check_struct_type (*ptr);
|
||||
case FFI_TYPE_STRUCT:
|
||||
type = ffi_check_struct_type (*ptr);
|
||||
if (type != FFI_TYPE_POINTER)
|
||||
break;
|
||||
/* fall through */
|
||||
|
||||
/* If we pass the struct via pointer, we must reserve space
|
||||
to copy its data for proper call-by-value semantics. */
|
||||
if (type == FFI_TYPE_POINTER)
|
||||
struct_size += ROUND_SIZE ((*ptr)->size);
|
||||
case FFI_TYPE_COMPLEX:
|
||||
case FFI_TYPE_SINT128:
|
||||
case FFI_TYPE_UINT128:
|
||||
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
|
||||
case FFI_TYPE_LONGDOUBLE:
|
||||
#endif
|
||||
type = FFI_TYPE_POINTER;
|
||||
/* If we pass via pointer, we must reserve space to copy
|
||||
its data for proper call-by-value semantics. */
|
||||
struct_size += ROUND_SIZE ((*ptr)->size);
|
||||
break;
|
||||
}
|
||||
|
||||
/* Now handle all primitive int/float data types. */
|
||||
@@ -460,10 +461,11 @@ ffi_call_int(ffi_cif *cif,
|
||||
|
||||
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
|
||||
case FFI_TYPE_LONGDOUBLE:
|
||||
/* 16-byte long double is passed via reference. */
|
||||
#endif
|
||||
case FFI_TYPE_COMPLEX:
|
||||
/* Complex types are passed via reference. */
|
||||
case FFI_TYPE_SINT128:
|
||||
case FFI_TYPE_UINT128:
|
||||
/* Complex, int128 and long double types are passed via reference. */
|
||||
p_struct -= ROUND_SIZE (ty->size);
|
||||
memcpy (p_struct, arg, ty->size);
|
||||
val = (uintptr_t)p_struct;
|
||||
@@ -780,4 +782,4 @@ ffi_tramp_arch (size_t *tramp_size, size_t *map_size)
|
||||
*map_size = FFI390_TRAMP_MAP_SIZE;
|
||||
return &trampoline_code_table;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
Vendored
+1
@@ -54,6 +54,7 @@ typedef enum ffi_abi {
|
||||
|
||||
#define FFI_TARGET_SPECIFIC_STACK_SPACE_ALLOCATION
|
||||
#define FFI_TARGET_HAS_COMPLEX_TYPE
|
||||
#define FFI_TARGET_HAS_INT128
|
||||
|
||||
/* ---- Definitions for closures ----------------------------------------- */
|
||||
|
||||
|
||||
Vendored
+3
-1
@@ -31,7 +31,9 @@
|
||||
#include <machine/asm.h>
|
||||
#else
|
||||
/* XXX these lose for some platforms, I'm sure. */
|
||||
#define CNAME(x) x
|
||||
#define C2(X, Y) X ## Y
|
||||
#define C1(X, Y) C2(X, Y)
|
||||
#define CNAME(x) C1(__USER_LABEL_PREFIX__, x)
|
||||
#define ENTRY(x) .globl CNAME(x); .type CNAME(x),%function; CNAME(x):
|
||||
#endif
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -332,7 +332,7 @@ ffi_prep_closure_loc (ffi_closure *closure,
|
||||
closure->user_data = user_data;
|
||||
|
||||
/* Flush the icache. */
|
||||
asm volatile ("ocbwb %0,0; synco; icbi %1,0; synci" : : "r" (tramp),
|
||||
__asm__ volatile ("ocbwb %0,0; synco; icbi %1,0; synci" : : "r" (tramp),
|
||||
"r"(codeloc));
|
||||
|
||||
return FFI_OK;
|
||||
|
||||
Vendored
+1
-1
@@ -332,7 +332,7 @@ static inline void
|
||||
ffi_flush_icache (void *p)
|
||||
{
|
||||
/* SPARC v8 requires 5 instructions for flush to be visible */
|
||||
asm volatile ("iflush %0; iflush %0+8; nop; nop; nop; nop; nop"
|
||||
__asm__ volatile ("iflush %0; iflush %0+8; nop; nop; nop; nop; nop"
|
||||
: : "r" (p) : "memory");
|
||||
}
|
||||
#else
|
||||
|
||||
Vendored
+1
-1
@@ -469,7 +469,7 @@ ffi_call_go(ffi_cif *cif, void (*fn)(void), void *rvalue,
|
||||
static inline void
|
||||
ffi_flush_icache (void *p)
|
||||
{
|
||||
asm volatile ("flush %0; flush %0+8" : : "r" (p) : "memory");
|
||||
__asm__ volatile ("flush %0; flush %0+8" : : "r" (p) : "memory");
|
||||
}
|
||||
#else
|
||||
extern void ffi_flush_icache (void *) FFI_HIDDEN;
|
||||
|
||||
Vendored
+13
@@ -126,3 +126,16 @@ FFI_COMPLEX_TYPEDEF(float, float, const);
|
||||
FFI_COMPLEX_TYPEDEF(double, double, const);
|
||||
FFI_COMPLEX_TYPEDEF(longdouble, long double, FFI_LDBL_CONST);
|
||||
#endif
|
||||
|
||||
#ifdef FFI_TARGET_HAS_INT128
|
||||
# ifdef HAVE_INT128
|
||||
FFI_TYPEDEF(uint128, __uint128_t, FFI_TYPE_UINT128, const);
|
||||
FFI_TYPEDEF(sint128, __int128_t, FFI_TYPE_SINT128, const);
|
||||
# else
|
||||
/* We don't actually need compiler support for __int128_t, as we don't
|
||||
use the type itself within libffi. Obviously the size is 16; make
|
||||
the conservative assumption that the alignment must also be 16. */
|
||||
const ffi_type ffi_type_uint128 = { 16, 16, FFI_TYPE_UINT128, NULL };
|
||||
const ffi_type ffi_type_sint128 = { 16, 16, FFI_TYPE_SINT128, NULL };
|
||||
# endif
|
||||
#endif /* FFI_TARGET_HAS_INT128 */
|
||||
Vendored
+2
-2
@@ -370,7 +370,7 @@ ffi_call_int (ffi_cif *cif, void (*fn)(void), void *rvalue,
|
||||
size_t za = FFI_ALIGN (z, FFI_SIZEOF_ARG);
|
||||
size_t align = FFI_SIZEOF_ARG;
|
||||
|
||||
/* Issue 434: For thiscall and fastcall, if the paramter passed
|
||||
/* Issue 434: For thiscall and fastcall, if the parameter passed
|
||||
as 64-bit integer or struct, all following integer parameters
|
||||
will be passed on stack. */
|
||||
if ((cabi == FFI_THISCALL || cabi == FFI_FASTCALL)
|
||||
@@ -519,7 +519,7 @@ ffi_closure_inner (struct closure_frame *frame, char *stack)
|
||||
if (t == FFI_TYPE_STRUCT && ty->alignment >= 16)
|
||||
align = 16;
|
||||
|
||||
/* Issue 434: For thiscall and fastcall, if the paramter passed
|
||||
/* Issue 434: For thiscall and fastcall, if the parameter passed
|
||||
as 64-bit integer or struct, all following integer parameters
|
||||
will be passed on stack. */
|
||||
if ((cabi == FFI_THISCALL || cabi == FFI_FASTCALL)
|
||||
|
||||
Vendored
+62
-1
@@ -102,6 +102,20 @@ enum x86_64_reg_class
|
||||
|
||||
#define SSE_CLASS_P(X) ((X) >= X86_64_SSE_CLASS && X <= X86_64_SSEUP_CLASS)
|
||||
|
||||
/* On most x86-64 targets `long double` is the 80-bit x87 type: classified
|
||||
X87/X87UP, passed in memory, returned in st(0). But some targets (notably
|
||||
x86_64 Android, and anything built with -mlong-double-128) make `long double`
|
||||
the IEEE binary128 quad type, which the psABI passes and returns in SSE
|
||||
registers exactly like __float128 (class SSE/SSEUP -> one %xmm register).
|
||||
Detect that at compile time and classify long double accordingly. A mantissa
|
||||
of 113 bits uniquely identifies binary128 (x87 extended is 64). */
|
||||
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE \
|
||||
&& defined(__LDBL_MANT_DIG__) && __LDBL_MANT_DIG__ == 113
|
||||
# define FFI_LONGDOUBLE_BINARY128 1
|
||||
#else
|
||||
# define FFI_LONGDOUBLE_BINARY128 0
|
||||
#endif
|
||||
|
||||
/* x86-64 register passing implementation. See x86-64 ABI for details. Goal
|
||||
of this code is to classify each 8bytes of incoming argument by the register
|
||||
class and assign registers accordingly. */
|
||||
@@ -171,6 +185,8 @@ classify_argument (ffi_type *type, enum x86_64_reg_class classes[],
|
||||
case FFI_TYPE_SINT32:
|
||||
case FFI_TYPE_UINT64:
|
||||
case FFI_TYPE_SINT64:
|
||||
case FFI_TYPE_UINT128:
|
||||
case FFI_TYPE_SINT128:
|
||||
case FFI_TYPE_POINTER:
|
||||
do_integer:
|
||||
{
|
||||
@@ -211,8 +227,14 @@ classify_argument (ffi_type *type, enum x86_64_reg_class classes[],
|
||||
return 1;
|
||||
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
|
||||
case FFI_TYPE_LONGDOUBLE:
|
||||
#if FFI_LONGDOUBLE_BINARY128
|
||||
/* IEEE binary128: one %xmm register, like __float128. */
|
||||
classes[0] = X86_64_SSE_CLASS;
|
||||
classes[1] = X86_64_SSEUP_CLASS;
|
||||
#else
|
||||
classes[0] = X86_64_X87_CLASS;
|
||||
classes[1] = X86_64_X87UP_CLASS;
|
||||
#endif
|
||||
return 2;
|
||||
#endif
|
||||
case FFI_TYPE_STRUCT:
|
||||
@@ -322,6 +344,10 @@ classify_argument (ffi_type *type, enum x86_64_reg_class classes[],
|
||||
case FFI_TYPE_SINT64:
|
||||
goto do_integer;
|
||||
|
||||
case FFI_TYPE_SINT128:
|
||||
case FFI_TYPE_UINT128:
|
||||
return 0;
|
||||
|
||||
case FFI_TYPE_FLOAT:
|
||||
classes[0] = X86_64_SSE_CLASS;
|
||||
if (byte_offset % 8)
|
||||
@@ -335,8 +361,13 @@ classify_argument (ffi_type *type, enum x86_64_reg_class classes[],
|
||||
return 2;
|
||||
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
|
||||
case FFI_TYPE_LONGDOUBLE:
|
||||
#if FFI_LONGDOUBLE_BINARY128
|
||||
/* _Complex binary128 is 32 bytes -> passed/returned in memory. */
|
||||
return 0;
|
||||
#else
|
||||
classes[0] = X86_64_COMPLEX_X87_CLASS;
|
||||
return 1;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -445,6 +476,10 @@ ffi_prep_cif_machdep (ffi_cif *cif)
|
||||
case FFI_TYPE_SINT64:
|
||||
flags = UNIX64_RET_INT64;
|
||||
break;
|
||||
case FFI_TYPE_UINT128:
|
||||
case FFI_TYPE_SINT128:
|
||||
flags = UNIX64_RET_ST_RAX_RDX | (16 << UNIX64_SIZE_SHIFT);
|
||||
break;
|
||||
case FFI_TYPE_POINTER:
|
||||
flags = (sizeof(void *) == 4 ? UNIX64_RET_UINT32 : UNIX64_RET_INT64);
|
||||
break;
|
||||
@@ -456,7 +491,11 @@ ffi_prep_cif_machdep (ffi_cif *cif)
|
||||
break;
|
||||
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
|
||||
case FFI_TYPE_LONGDOUBLE:
|
||||
#if FFI_LONGDOUBLE_BINARY128
|
||||
flags = UNIX64_RET_XMM128; /* returned in %xmm0 (16 bytes) */
|
||||
#else
|
||||
flags = UNIX64_RET_X87;
|
||||
#endif
|
||||
break;
|
||||
#endif
|
||||
case FFI_TYPE_STRUCT:
|
||||
@@ -514,9 +553,20 @@ ffi_prep_cif_machdep (ffi_cif *cif)
|
||||
break;
|
||||
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
|
||||
case FFI_TYPE_LONGDOUBLE:
|
||||
#if FFI_LONGDOUBLE_BINARY128
|
||||
/* _Complex binary128 (32 bytes) is returned in memory. */
|
||||
gprcount++;
|
||||
flags = UNIX64_RET_VOID | UNIX64_FLAG_RET_IN_MEM;
|
||||
#else
|
||||
flags = UNIX64_RET_X87_2;
|
||||
#endif
|
||||
break;
|
||||
#endif
|
||||
case FFI_TYPE_SINT128:
|
||||
case FFI_TYPE_UINT128:
|
||||
gprcount++;
|
||||
flags = UNIX64_RET_VOID | UNIX64_FLAG_RET_IN_MEM;
|
||||
break;
|
||||
default:
|
||||
return FFI_BAD_TYPEDEF;
|
||||
}
|
||||
@@ -633,7 +683,13 @@ ffi_call_int (ffi_cif *cif, void (*fn)(void), void *rvalue,
|
||||
switch (classes[j])
|
||||
{
|
||||
case X86_64_NO_CLASS:
|
||||
break;
|
||||
case X86_64_SSEUP_CLASS:
|
||||
/* The upper 8 bytes of the same %xmm register written by
|
||||
the preceding SSE class (e.g. the high half of a
|
||||
binary128 long double). */
|
||||
memcpy ((char *) ®_args->sse[ssecount - 1] + 8, a,
|
||||
size < 8 ? size : 8);
|
||||
break;
|
||||
case X86_64_INTEGER_CLASS:
|
||||
case X86_64_INTEGERSI_CLASS:
|
||||
@@ -890,7 +946,12 @@ ffi_closure_unix64_inner(ffi_cif *cif,
|
||||
avalue[i] = a;
|
||||
for (j = 0; j < n; j++, a += 8)
|
||||
{
|
||||
if (SSE_CLASS_P (classes[j]))
|
||||
if (classes[j] == X86_64_SSEUP_CLASS)
|
||||
/* The high half of the same %xmm register as the preceding
|
||||
SSE class (e.g. the upper bits of a binary128 long double);
|
||||
it does not consume another register. */
|
||||
memcpy (a, (char *) ®_args->sse[ssecount - 1] + 8, 8);
|
||||
else if (SSE_CLASS_P (classes[j]))
|
||||
memcpy (a, ®_args->sse[ssecount++], 8);
|
||||
else
|
||||
memcpy (a, ®_args->gpr[gprcount++], 8);
|
||||
|
||||
Vendored
+4
-3
@@ -41,9 +41,6 @@
|
||||
|
||||
#if defined (X86_64) && defined (__i386__)
|
||||
#undef X86_64
|
||||
#warning ******************************************************
|
||||
#warning ********** X86 IS DEFINED ****************************
|
||||
#warning ******************************************************
|
||||
#define X86
|
||||
#endif
|
||||
|
||||
@@ -57,6 +54,10 @@
|
||||
#define FFI_TARGET_HAS_COMPLEX_TYPE
|
||||
#endif
|
||||
|
||||
#ifdef X86_64
|
||||
#define FFI_TARGET_HAS_INT128
|
||||
#endif
|
||||
|
||||
/* ---- Generic type definitions ----------------------------------------- */
|
||||
|
||||
#ifndef LIBFFI_ASM
|
||||
|
||||
Vendored
+25
-3
@@ -30,6 +30,7 @@
|
||||
#include <ffi_common.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <tramp.h>
|
||||
|
||||
#ifdef X86_WIN64
|
||||
@@ -115,6 +116,7 @@ EFI64(ffi_prep_cif_machdep)(ffi_cif *cif)
|
||||
#if defined(_MSC_VER)
|
||||
#pragma runtime_checks("s", off)
|
||||
#endif
|
||||
FFI_ASAN_NO_SANITIZE
|
||||
static void
|
||||
ffi_call_int (ffi_cif *cif, void (*fn)(void), void *rvalue,
|
||||
void **avalue, void *closure)
|
||||
@@ -128,13 +130,33 @@ ffi_call_int (ffi_cif *cif, void (*fn)(void), void *rvalue,
|
||||
|
||||
FFI_ASSERT(cif->abi == FFI_GNUW64 || cif->abi == FFI_WIN64);
|
||||
|
||||
/* If we have any large structure arguments, make a copy so we are passing
|
||||
by value. */
|
||||
/* If we have any int128 or irregularly sized structure arguments,
|
||||
make a copy so we are passing by value. */
|
||||
for (i = 0; i < nargs; i++)
|
||||
{
|
||||
ffi_type *at = arg_types[i];
|
||||
int size = at->size;
|
||||
if (at->type == FFI_TYPE_STRUCT && size > 8)
|
||||
bool needcopy = false;
|
||||
|
||||
switch (at->type)
|
||||
{
|
||||
case FFI_TYPE_UINT128:
|
||||
case FFI_TYPE_SINT128:
|
||||
needcopy = true;
|
||||
break;
|
||||
case FFI_TYPE_STRUCT:
|
||||
switch (size)
|
||||
{
|
||||
case 1:
|
||||
case 2:
|
||||
case 4:
|
||||
case 8:
|
||||
break;
|
||||
default:
|
||||
needcopy = true;
|
||||
}
|
||||
}
|
||||
if (needcopy)
|
||||
{
|
||||
char *argcopy = alloca (size);
|
||||
memcpy (argcopy, avalue[i], size);
|
||||
|
||||
Vendored
+2
-1
@@ -14,8 +14,9 @@
|
||||
#define UNIX64_RET_ST_RAX_XMM0 13
|
||||
#define UNIX64_RET_ST_XMM0_XMM1 14
|
||||
#define UNIX64_RET_ST_RAX_RDX 15
|
||||
#define UNIX64_RET_XMM128 16 /* binary128 long double in %xmm0 */
|
||||
|
||||
#define UNIX64_RET_LAST 15
|
||||
#define UNIX64_RET_LAST 16
|
||||
|
||||
#define UNIX64_FLAG_RET_IN_MEM (1 << 10)
|
||||
#define UNIX64_FLAG_XMM_ARGS (1 << 11)
|
||||
|
||||
Vendored
+62
-60
@@ -91,7 +91,7 @@
|
||||
|
||||
ffi_call_i386:
|
||||
L(UW0):
|
||||
# cfi_startproc
|
||||
/* cfi_startproc */
|
||||
_CET_ENDBR
|
||||
#if !HAVE_FASTCALL
|
||||
movl 4(%esp), %ecx
|
||||
@@ -110,8 +110,8 @@ L(UW0):
|
||||
perspective of the unwind info, it hasn't moved. */
|
||||
movl %ecx, %ebp
|
||||
L(UW1):
|
||||
# cfi_def_cfa(%ebp, 8)
|
||||
# cfi_rel_offset(%ebp, 0)
|
||||
/* cfi_def_cfa(%ebp, 8) */
|
||||
/* cfi_rel_offset(%ebp, 0) */
|
||||
|
||||
movl %edx, %esp /* set outgoing argument stack */
|
||||
movl 20+R_EAX*4(%ebp), %eax /* set register arguments */
|
||||
@@ -123,7 +123,7 @@ L(UW1):
|
||||
movl 12(%ebp), %ecx /* load return type code */
|
||||
movl %ebx, 8(%ebp) /* preserve %ebx */
|
||||
L(UW2):
|
||||
# cfi_rel_offset(%ebx, 8)
|
||||
/* cfi_rel_offset(%ebx, 8) */
|
||||
|
||||
andl $X86_RET_TYPE_MASK, %ecx
|
||||
#ifdef __PIC__
|
||||
@@ -175,13 +175,13 @@ L(e1):
|
||||
movl %ebp, %esp
|
||||
popl %ebp
|
||||
L(UW3):
|
||||
# cfi_remember_state
|
||||
# cfi_def_cfa(%esp, 4)
|
||||
# cfi_restore(%ebx)
|
||||
# cfi_restore(%ebp)
|
||||
/* cfi_remember_state */
|
||||
/* cfi_def_cfa(%esp, 4) */
|
||||
/* cfi_restore(%ebx) */
|
||||
/* cfi_restore(%ebp) */
|
||||
ret
|
||||
L(UW4):
|
||||
# cfi_restore_state
|
||||
/* cfi_restore_state */
|
||||
|
||||
E(L(store_table), X86_RET_STRUCTPOP)
|
||||
jmp L(e1)
|
||||
@@ -201,7 +201,7 @@ E(L(store_table), X86_RET_UNUSED15)
|
||||
ud2
|
||||
|
||||
L(UW5):
|
||||
# cfi_endproc
|
||||
/* cfi_endproc */
|
||||
ENDF(ffi_call_i386)
|
||||
|
||||
/* The inner helper is declared as
|
||||
@@ -296,11 +296,11 @@ L(C1(UW,UWN)): \
|
||||
FFI_HIDDEN(C(ffi_go_closure_EAX))
|
||||
C(ffi_go_closure_EAX):
|
||||
L(UW6):
|
||||
# cfi_startproc
|
||||
/* cfi_startproc */
|
||||
_CET_ENDBR
|
||||
subl $closure_FS, %esp
|
||||
L(UW7):
|
||||
# cfi_def_cfa_offset(closure_FS + 4)
|
||||
/* cfi_def_cfa_offset(closure_FS + 4) */
|
||||
FFI_CLOSURE_SAVE_REGS
|
||||
movl 4(%eax), %edx /* copy cif */
|
||||
movl 8(%eax), %ecx /* copy fun */
|
||||
@@ -309,7 +309,7 @@ L(UW7):
|
||||
movl %eax, closure_CF+36(%esp) /* closure is user_data */
|
||||
jmp L(do_closure_i386)
|
||||
L(UW8):
|
||||
# cfi_endproc
|
||||
/* cfi_endproc */
|
||||
ENDF(C(ffi_go_closure_EAX))
|
||||
|
||||
.balign 16
|
||||
@@ -317,11 +317,11 @@ ENDF(C(ffi_go_closure_EAX))
|
||||
FFI_HIDDEN(C(ffi_go_closure_ECX))
|
||||
C(ffi_go_closure_ECX):
|
||||
L(UW9):
|
||||
# cfi_startproc
|
||||
/* cfi_startproc */
|
||||
_CET_ENDBR
|
||||
subl $closure_FS, %esp
|
||||
L(UW10):
|
||||
# cfi_def_cfa_offset(closure_FS + 4)
|
||||
/* cfi_def_cfa_offset(closure_FS + 4) */
|
||||
FFI_CLOSURE_SAVE_REGS
|
||||
movl 4(%ecx), %edx /* copy cif */
|
||||
movl 8(%ecx), %eax /* copy fun */
|
||||
@@ -330,7 +330,7 @@ L(UW10):
|
||||
movl %ecx, closure_CF+36(%esp) /* closure is user_data */
|
||||
jmp L(do_closure_i386)
|
||||
L(UW11):
|
||||
# cfi_endproc
|
||||
/* cfi_endproc */
|
||||
ENDF(C(ffi_go_closure_ECX))
|
||||
|
||||
/* The closure entry points are reached from the ffi_closure trampoline.
|
||||
@@ -342,11 +342,11 @@ ENDF(C(ffi_go_closure_ECX))
|
||||
|
||||
C(ffi_closure_i386):
|
||||
L(UW12):
|
||||
# cfi_startproc
|
||||
/* cfi_startproc */
|
||||
_CET_ENDBR
|
||||
subl $closure_FS, %esp
|
||||
L(UW13):
|
||||
# cfi_def_cfa_offset(closure_FS + 4)
|
||||
/* cfi_def_cfa_offset(closure_FS + 4) */
|
||||
|
||||
FFI_CLOSURE_SAVE_REGS
|
||||
FFI_CLOSURE_COPY_TRAMP_DATA
|
||||
@@ -391,17 +391,17 @@ E(L(load_table2), X86_RET_VOID)
|
||||
L(e2):
|
||||
addl $closure_FS, %esp
|
||||
L(UW16):
|
||||
# cfi_adjust_cfa_offset(-closure_FS)
|
||||
/* cfi_adjust_cfa_offset(-closure_FS) */
|
||||
ret
|
||||
L(UW17):
|
||||
# cfi_adjust_cfa_offset(closure_FS)
|
||||
/* cfi_adjust_cfa_offset(closure_FS) */
|
||||
E(L(load_table2), X86_RET_STRUCTPOP)
|
||||
addl $closure_FS, %esp
|
||||
L(UW18):
|
||||
# cfi_adjust_cfa_offset(-closure_FS)
|
||||
/* cfi_adjust_cfa_offset(-closure_FS) */
|
||||
ret $4
|
||||
L(UW19):
|
||||
# cfi_adjust_cfa_offset(closure_FS)
|
||||
/* cfi_adjust_cfa_offset(closure_FS) */
|
||||
E(L(load_table2), X86_RET_STRUCTARG)
|
||||
jmp L(e2)
|
||||
E(L(load_table2), X86_RET_STRUCT_1B)
|
||||
@@ -418,7 +418,7 @@ E(L(load_table2), X86_RET_UNUSED15)
|
||||
ud2
|
||||
|
||||
L(UW20):
|
||||
# cfi_endproc
|
||||
/* cfi_endproc */
|
||||
ENDF(C(ffi_closure_i386))
|
||||
|
||||
.balign 16
|
||||
@@ -426,11 +426,11 @@ ENDF(C(ffi_closure_i386))
|
||||
FFI_HIDDEN(C(ffi_go_closure_STDCALL))
|
||||
C(ffi_go_closure_STDCALL):
|
||||
L(UW21):
|
||||
# cfi_startproc
|
||||
/* cfi_startproc */
|
||||
_CET_ENDBR
|
||||
subl $closure_FS, %esp
|
||||
L(UW22):
|
||||
# cfi_def_cfa_offset(closure_FS + 4)
|
||||
/* cfi_def_cfa_offset(closure_FS + 4) */
|
||||
FFI_CLOSURE_SAVE_REGS
|
||||
movl 4(%ecx), %edx /* copy cif */
|
||||
movl 8(%ecx), %eax /* copy fun */
|
||||
@@ -439,7 +439,7 @@ L(UW22):
|
||||
movl %ecx, closure_CF+36(%esp) /* closure is user_data */
|
||||
jmp L(do_closure_STDCALL)
|
||||
L(UW23):
|
||||
# cfi_endproc
|
||||
/* cfi_endproc */
|
||||
ENDF(C(ffi_go_closure_STDCALL))
|
||||
|
||||
/* For REGISTER, we have no available parameter registers, and so we
|
||||
@@ -450,20 +450,18 @@ ENDF(C(ffi_go_closure_STDCALL))
|
||||
FFI_HIDDEN(C(ffi_closure_REGISTER))
|
||||
C(ffi_closure_REGISTER):
|
||||
L(UW24):
|
||||
# cfi_startproc
|
||||
# cfi_def_cfa(%esp, 8)
|
||||
# cfi_offset(%eip, -8)
|
||||
/* cfi_startproc */
|
||||
/* cfi_def_cfa(%esp, 8) */
|
||||
/* cfi_offset(%eip, -8) */
|
||||
_CET_ENDBR
|
||||
subl $closure_FS-4, %esp
|
||||
L(UW25):
|
||||
# cfi_def_cfa_offset(closure_FS + 4)
|
||||
/* cfi_def_cfa_offset(closure_FS + 4) */
|
||||
FFI_CLOSURE_SAVE_REGS
|
||||
movl closure_FS-4(%esp), %ecx /* load retaddr */
|
||||
movl closure_FS(%esp), %eax /* load closure */
|
||||
movl %ecx, closure_FS(%esp) /* move retaddr */
|
||||
movl closure_FS-4(%esp), %eax /* load closure */
|
||||
jmp L(do_closure_REGISTER)
|
||||
L(UW26):
|
||||
# cfi_endproc
|
||||
/* cfi_endproc */
|
||||
ENDF(C(ffi_closure_REGISTER))
|
||||
|
||||
/* For STDCALL (and others), we need to pop N bytes of arguments off
|
||||
@@ -475,11 +473,11 @@ ENDF(C(ffi_closure_REGISTER))
|
||||
FFI_HIDDEN(C(ffi_closure_STDCALL))
|
||||
C(ffi_closure_STDCALL):
|
||||
L(UW27):
|
||||
# cfi_startproc
|
||||
/* cfi_startproc */
|
||||
_CET_ENDBR
|
||||
subl $closure_FS, %esp
|
||||
L(UW28):
|
||||
# cfi_def_cfa_offset(closure_FS + 4)
|
||||
/* cfi_def_cfa_offset(closure_FS + 4) */
|
||||
|
||||
FFI_CLOSURE_SAVE_REGS
|
||||
|
||||
@@ -570,7 +568,7 @@ E(L(load_table3), X86_RET_UNUSED15)
|
||||
ud2
|
||||
|
||||
L(UW31):
|
||||
# cfi_endproc
|
||||
/* cfi_endproc */
|
||||
ENDF(C(ffi_closure_STDCALL))
|
||||
|
||||
#if defined(FFI_EXEC_STATIC_TRAMP)
|
||||
@@ -670,14 +668,14 @@ ENDF(C(trampoline_code_table))
|
||||
FFI_HIDDEN(C(ffi_closure_raw_SYSV))
|
||||
C(ffi_closure_raw_SYSV):
|
||||
L(UW32):
|
||||
# cfi_startproc
|
||||
/* cfi_startproc */
|
||||
_CET_ENDBR
|
||||
subl $raw_closure_S_FS, %esp
|
||||
L(UW33):
|
||||
# cfi_def_cfa_offset(raw_closure_S_FS + 4)
|
||||
/* cfi_def_cfa_offset(raw_closure_S_FS + 4) */
|
||||
movl %ebx, raw_closure_S_FS-4(%esp)
|
||||
L(UW34):
|
||||
# cfi_rel_offset(%ebx, raw_closure_S_FS-4)
|
||||
/* cfi_rel_offset(%ebx, raw_closure_S_FS-4) */
|
||||
|
||||
movl FFI_TRAMPOLINE_SIZE+8(%eax), %edx /* load cl->user_data */
|
||||
movl %edx, 12(%esp)
|
||||
@@ -700,7 +698,7 @@ L(pc4):
|
||||
#endif
|
||||
movl raw_closure_S_FS-4(%esp), %ebx
|
||||
L(UW35):
|
||||
# cfi_restore(%ebx)
|
||||
/* cfi_restore(%ebx) */
|
||||
movl 16(%esp), %eax /* Optimistic load */
|
||||
jmp *%ecx
|
||||
|
||||
@@ -737,17 +735,17 @@ E(L(load_table4), X86_RET_VOID)
|
||||
L(e4):
|
||||
addl $raw_closure_S_FS, %esp
|
||||
L(UW36):
|
||||
# cfi_adjust_cfa_offset(-raw_closure_S_FS)
|
||||
/* cfi_adjust_cfa_offset(-raw_closure_S_FS) */
|
||||
ret
|
||||
L(UW37):
|
||||
# cfi_adjust_cfa_offset(raw_closure_S_FS)
|
||||
/* cfi_adjust_cfa_offset(raw_closure_S_FS) */
|
||||
E(L(load_table4), X86_RET_STRUCTPOP)
|
||||
addl $raw_closure_S_FS, %esp
|
||||
L(UW38):
|
||||
# cfi_adjust_cfa_offset(-raw_closure_S_FS)
|
||||
/* cfi_adjust_cfa_offset(-raw_closure_S_FS) */
|
||||
ret $4
|
||||
L(UW39):
|
||||
# cfi_adjust_cfa_offset(raw_closure_S_FS)
|
||||
/* cfi_adjust_cfa_offset(raw_closure_S_FS) */
|
||||
E(L(load_table4), X86_RET_STRUCTARG)
|
||||
jmp L(e4)
|
||||
E(L(load_table4), X86_RET_STRUCT_1B)
|
||||
@@ -764,7 +762,7 @@ E(L(load_table4), X86_RET_UNUSED15)
|
||||
ud2
|
||||
|
||||
L(UW40):
|
||||
# cfi_endproc
|
||||
/* cfi_endproc */
|
||||
ENDF(C(ffi_closure_raw_SYSV))
|
||||
|
||||
#define raw_closure_T_FS (16+16+8)
|
||||
@@ -774,27 +772,27 @@ ENDF(C(ffi_closure_raw_SYSV))
|
||||
FFI_HIDDEN(C(ffi_closure_raw_THISCALL))
|
||||
C(ffi_closure_raw_THISCALL):
|
||||
L(UW41):
|
||||
# cfi_startproc
|
||||
/* cfi_startproc */
|
||||
_CET_ENDBR
|
||||
/* Rearrange the stack such that %ecx is the first argument.
|
||||
This means moving the return address. */
|
||||
popl %edx
|
||||
L(UW42):
|
||||
# cfi_def_cfa_offset(0)
|
||||
# cfi_register(%eip, %edx)
|
||||
/* cfi_def_cfa_offset(0) */
|
||||
/* cfi_register(%eip, %edx) */
|
||||
pushl %ecx
|
||||
L(UW43):
|
||||
# cfi_adjust_cfa_offset(4)
|
||||
/* cfi_adjust_cfa_offset(4) */
|
||||
pushl %edx
|
||||
L(UW44):
|
||||
# cfi_adjust_cfa_offset(4)
|
||||
# cfi_rel_offset(%eip, 0)
|
||||
/* cfi_adjust_cfa_offset(4) */
|
||||
/* cfi_rel_offset(%eip, 0) */
|
||||
subl $raw_closure_T_FS, %esp
|
||||
L(UW45):
|
||||
# cfi_adjust_cfa_offset(raw_closure_T_FS)
|
||||
/* cfi_adjust_cfa_offset(raw_closure_T_FS) */
|
||||
movl %ebx, raw_closure_T_FS-4(%esp)
|
||||
L(UW46):
|
||||
# cfi_rel_offset(%ebx, raw_closure_T_FS-4)
|
||||
/* cfi_rel_offset(%ebx, raw_closure_T_FS-4) */
|
||||
|
||||
movl FFI_TRAMPOLINE_SIZE+8(%eax), %edx /* load cl->user_data */
|
||||
movl %edx, 12(%esp)
|
||||
@@ -817,7 +815,7 @@ L(pc5):
|
||||
#endif
|
||||
movl raw_closure_T_FS-4(%esp), %ebx
|
||||
L(UW47):
|
||||
# cfi_restore(%ebx)
|
||||
/* cfi_restore(%ebx) */
|
||||
movl 16(%esp), %eax /* Optimistic load */
|
||||
jmp *%ecx
|
||||
|
||||
@@ -854,18 +852,18 @@ E(L(load_table5), X86_RET_VOID)
|
||||
L(e5):
|
||||
addl $raw_closure_T_FS, %esp
|
||||
L(UW48):
|
||||
# cfi_adjust_cfa_offset(-raw_closure_T_FS)
|
||||
/* cfi_adjust_cfa_offset(-raw_closure_T_FS) */
|
||||
/* Remove the extra %ecx argument we pushed. */
|
||||
ret $4
|
||||
L(UW49):
|
||||
# cfi_adjust_cfa_offset(raw_closure_T_FS)
|
||||
/* cfi_adjust_cfa_offset(raw_closure_T_FS) */
|
||||
E(L(load_table5), X86_RET_STRUCTPOP)
|
||||
addl $raw_closure_T_FS, %esp
|
||||
L(UW50):
|
||||
# cfi_adjust_cfa_offset(-raw_closure_T_FS)
|
||||
/* cfi_adjust_cfa_offset(-raw_closure_T_FS) */
|
||||
ret $8
|
||||
L(UW51):
|
||||
# cfi_adjust_cfa_offset(raw_closure_T_FS)
|
||||
/* cfi_adjust_cfa_offset(raw_closure_T_FS) */
|
||||
E(L(load_table5), X86_RET_STRUCTARG)
|
||||
jmp L(e5)
|
||||
E(L(load_table5), X86_RET_STRUCT_1B)
|
||||
@@ -882,7 +880,7 @@ E(L(load_table5), X86_RET_UNUSED15)
|
||||
ud2
|
||||
|
||||
L(UW52):
|
||||
# cfi_endproc
|
||||
/* cfi_endproc */
|
||||
ENDF(C(ffi_closure_raw_THISCALL))
|
||||
|
||||
#endif /* !FFI_NO_RAW_API */
|
||||
@@ -961,6 +959,10 @@ ENDF(C(__x86.get_pc_thunk.dx))
|
||||
|
||||
#ifdef HAVE_AS_X86_PCREL
|
||||
# define PCREL(X) X-.
|
||||
#elif defined(__clang__)
|
||||
/* clang's integrated assembler rejects the X@rel variant (#947); the
|
||||
pc-relative label difference works wherever @rel would. */
|
||||
# define PCREL(X) X - .
|
||||
#else
|
||||
# define PCREL(X) X@rel
|
||||
#endif
|
||||
|
||||
Vendored
+5
-3
@@ -394,9 +394,7 @@ L(UW24):
|
||||
L(UW25):
|
||||
/* cfi_def_cfa_offset(closure_FS + 4) */
|
||||
FFI_CLOSURE_SAVE_REGS
|
||||
mov ecx, [esp+closure_FS-4] /* load retaddr */
|
||||
mov eax, [esp+closure_FS] /* load closure */
|
||||
mov [esp+closure_FS], ecx /* move retaddr */
|
||||
mov eax, [esp+closure_FS-4] /* load closure */
|
||||
jmp L(do_closure_REGISTER)
|
||||
L(UW26):
|
||||
/* cfi_endproc */
|
||||
@@ -777,6 +775,10 @@ EHFrame0:
|
||||
|
||||
#ifdef HAVE_AS_X86_PCREL
|
||||
# define PCREL(X) X - .
|
||||
#elif defined(__clang__)
|
||||
/* clang's integrated assembler rejects the X@rel variant (#947); the
|
||||
pc-relative label difference works wherever @rel would. */
|
||||
# define PCREL(X) X - .
|
||||
#else
|
||||
# define PCREL(X) X@rel
|
||||
#endif
|
||||
|
||||
Vendored
+18
@@ -201,6 +201,13 @@ E(L(store_table), UNIX64_RET_ST_XMM0_XMM1)
|
||||
E(L(store_table), UNIX64_RET_ST_RAX_RDX)
|
||||
_CET_ENDBR
|
||||
movq %rdx, 8(%rsi)
|
||||
jmp L(s2)
|
||||
E(L(store_table), UNIX64_RET_XMM128)
|
||||
_CET_ENDBR
|
||||
movups %xmm0, (%rdi)
|
||||
ret
|
||||
|
||||
.balign 8
|
||||
L(s2):
|
||||
movq %rax, (%rsi)
|
||||
shrl $UNIX64_SIZE_SHIFT, %ecx
|
||||
@@ -386,6 +393,13 @@ E(L(load_table), UNIX64_RET_ST_XMM0_XMM1)
|
||||
E(L(load_table), UNIX64_RET_ST_RAX_RDX)
|
||||
_CET_ENDBR
|
||||
movq 8(%rsi), %rdx
|
||||
jmp L(l2)
|
||||
E(L(load_table), UNIX64_RET_XMM128)
|
||||
_CET_ENDBR
|
||||
movups (%rsi), %xmm0
|
||||
ret
|
||||
|
||||
.balign 8
|
||||
L(l2):
|
||||
movq (%rsi), %rax
|
||||
ret
|
||||
@@ -559,6 +573,10 @@ EHFrame0:
|
||||
|
||||
#ifdef HAVE_AS_X86_PCREL
|
||||
# define PCREL(X) X - .
|
||||
#elif defined(__clang__)
|
||||
/* clang's integrated assembler rejects the X@rel variant (#947); the
|
||||
pc-relative label difference works wherever @rel would. */
|
||||
# define PCREL(X) X - .
|
||||
#else
|
||||
# define PCREL(X) X@rel
|
||||
#endif
|
||||
|
||||
Vendored
+6
@@ -145,6 +145,12 @@ E(0b, FFI_TYPE_POINTER)
|
||||
epilogue
|
||||
E(0b, FFI_TYPE_COMPLEX)
|
||||
call PLT(C(abort))
|
||||
E(0b, FFI_TYPE_UINT128)
|
||||
movdqu %xmm0, (%r8)
|
||||
epilogue
|
||||
E(0b, FFI_TYPE_SINT128)
|
||||
movdqu %xmm0, (%r8)
|
||||
epilogue
|
||||
E(0b, FFI_TYPE_SMALL_STRUCT_1B)
|
||||
movb %al, (%r8)
|
||||
epilogue
|
||||
|
||||
Vendored
+7
-1
@@ -146,6 +146,12 @@ E(0b, FFI_TYPE_POINTER)
|
||||
epilogue
|
||||
E(0b, FFI_TYPE_COMPLEX)
|
||||
call PLT(C(abort))
|
||||
E(0b, FFI_TYPE_UINT128)
|
||||
movdqu xmmword ptr [r8], xmm0
|
||||
epilogue
|
||||
E(0b, FFI_TYPE_SINT128)
|
||||
movdqu xmmword ptr [r8], xmm0
|
||||
epilogue
|
||||
E(0b, FFI_TYPE_SMALL_STRUCT_1B)
|
||||
mov byte ptr [r8], al ; movb %al, (%r8)
|
||||
epilogue
|
||||
@@ -235,4 +241,4 @@ ffi_closure_win64_2 LABEL near
|
||||
.section .note.GNU-stack,"",@progbits
|
||||
#endif
|
||||
_text ends
|
||||
end
|
||||
end
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
timestamp
|
||||
Vendored
+89
@@ -0,0 +1,89 @@
|
||||
## Process this file with automake to produce Makefile.in.
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign dejagnu
|
||||
|
||||
EXTRA_DEJAGNU_SITE_CONFIG=../local.exp
|
||||
|
||||
CLEANFILES = *.exe core* *.log *.sum
|
||||
|
||||
EXTRA_DIST = config/default.exp emscripten/build.sh emscripten/conftest.py \
|
||||
emscripten/node-tests.sh emscripten/test.html emscripten/test_libffi.py \
|
||||
emscripten/build-tests.sh lib/libffi.exp lib/target-libpath.exp \
|
||||
lib/wrapper.exp libffi.bhaible/Makefile libffi.bhaible/README \
|
||||
libffi.bhaible/alignof.h libffi.bhaible/bhaible.exp libffi.bhaible/test-call.c \
|
||||
libffi.bhaible/test-callback.c libffi.bhaible/testcases.c libffi.call/align_mixed.c \
|
||||
libffi.call/align_stdcall.c libffi.call/bpo_38748.c libffi.call/call.exp \
|
||||
libffi.call/err_bad_typedef.c libffi.call/ffitest.h libffi.call/float.c \
|
||||
libffi.call/float1.c libffi.call/float2.c libffi.call/float3.c \
|
||||
libffi.call/float4.c libffi.call/float_va.c libffi.call/many.c \
|
||||
libffi.call/many2.c libffi.call/many_double.c libffi.call/many_mixed.c \
|
||||
libffi.call/negint.c libffi.call/offsets.c libffi.call/overread.c \
|
||||
libffi.call/pr1172638.c libffi.call/promotion.c libffi.call/pyobjc_tc.c libffi.call/return_dbl.c \
|
||||
libffi.call/return_dbl1.c libffi.call/return_dbl2.c libffi.call/return_fl.c \
|
||||
libffi.call/return_fl1.c libffi.call/return_fl2.c libffi.call/return_fl3.c \
|
||||
libffi.call/return_ldl.c libffi.call/return_ll.c libffi.call/return_ll1.c \
|
||||
libffi.call/return_sc.c libffi.call/return_sl.c libffi.call/return_uc.c \
|
||||
libffi.call/return_ul.c libffi.call/s55.c libffi.call/strlen.c \
|
||||
libffi.call/strlen2.c libffi.call/strlen3.c libffi.call/strlen4.c \
|
||||
libffi.call/struct1.c libffi.call/struct10.c libffi.call/struct2.c \
|
||||
libffi.call/struct3.c libffi.call/struct4.c libffi.call/struct5.c \
|
||||
libffi.call/struct6.c libffi.call/struct7.c libffi.call/struct8.c \
|
||||
libffi.call/struct9.c libffi.call/struct_by_value_2.c libffi.call/struct_by_value_3.c \
|
||||
libffi.call/struct_by_value_3f.c libffi.call/struct_by_value_4.c libffi.call/struct_by_value_4f.c \
|
||||
libffi.call/struct_by_value_big.c libffi.call/struct_by_value_small.c libffi.call/struct_return_2H.c \
|
||||
libffi.call/struct_int_float.c libffi.call/longjmp.c \
|
||||
libffi.call/struct_return_8H.c libffi.call/uninitialized.c libffi.call/va_1.c \
|
||||
libffi.call/va_2.c libffi.call/va_3.c libffi.call/va_struct1.c \
|
||||
libffi.call/va_struct2.c libffi.call/va_struct3.c libffi.call/callback.c \
|
||||
libffi.call/callback2.c libffi.call/callback3.c libffi.call/callback4.c libffi.call/x32.c \
|
||||
libffi.closures/closure.exp libffi.closures/closure_fn0.c libffi.closures/closure_fn1.c \
|
||||
libffi.closures/closure_fn2.c libffi.closures/closure_fn3.c libffi.closures/closure_fn4.c \
|
||||
libffi.closures/closure_fn5.c libffi.closures/closure_fn6.c libffi.closures/closure_loc_fn0.c \
|
||||
libffi.closures/closure_simple.c libffi.closures/cls_12byte.c libffi.closures/cls_16byte.c \
|
||||
libffi.closures/cls_18byte.c libffi.closures/cls_19byte.c libffi.closures/cls_1_1byte.c \
|
||||
libffi.closures/cls_20byte.c libffi.closures/cls_20byte1.c libffi.closures/cls_24byte.c \
|
||||
libffi.closures/cls_2byte.c libffi.closures/cls_3_1byte.c libffi.closures/cls_3byte1.c \
|
||||
libffi.closures/cls_3byte2.c libffi.closures/cls_3float.c libffi.closures/cls_4_1byte.c \
|
||||
libffi.closures/cls_4byte.c libffi.closures/cls_5_1_byte.c libffi.closures/cls_5byte.c \
|
||||
libffi.closures/cls_64byte.c libffi.closures/cls_6_1_byte.c libffi.closures/cls_6byte.c \
|
||||
libffi.closures/cls_7_1_byte.c libffi.closures/cls_7byte.c libffi.closures/cls_8byte.c \
|
||||
libffi.closures/cls_9byte1.c libffi.closures/cls_9byte2.c libffi.closures/cls_align_double.c \
|
||||
libffi.closures/cls_align_float.c libffi.closures/cls_align_longdouble.c libffi.closures/cls_align_longdouble_split.c \
|
||||
libffi.closures/cls_align_longdouble_split2.c libffi.closures/cls_align_pointer.c libffi.closures/cls_align_sint16.c \
|
||||
libffi.closures/cls_align_sint32.c libffi.closures/cls_align_sint64.c libffi.closures/cls_align_uint16.c \
|
||||
libffi.closures/cls_align_uint32.c libffi.closures/cls_align_uint64.c libffi.closures/cls_dbls_struct.c \
|
||||
libffi.closures/cls_double.c libffi.closures/cls_double_va.c libffi.closures/cls_float.c \
|
||||
libffi.closures/cls_longdouble.c libffi.closures/cls_longdouble_va.c libffi.closures/cls_many_mixed_args.c \
|
||||
libffi.closures/cls_many_mixed_float_double.c libffi.closures/cls_multi_schar.c libffi.closures/cls_multi_sshort.c \
|
||||
libffi.closures/cls_multi_sshortchar.c libffi.closures/cls_multi_uchar.c libffi.closures/cls_multi_ushort.c \
|
||||
libffi.closures/cls_multi_ushortchar.c libffi.closures/cls_pointer.c libffi.closures/cls_pointer_stack.c \
|
||||
libffi.closures/cls_schar.c libffi.closures/cls_sint.c libffi.closures/cls_sshort.c \
|
||||
libffi.closures/cls_struct_va1.c libffi.closures/cls_uchar.c libffi.closures/cls_uint.c \
|
||||
libffi.closures/cls_uint_va.c libffi.closures/cls_ulong_va.c libffi.closures/cls_ulonglong.c \
|
||||
libffi.closures/cls_ushort.c libffi.closures/err_bad_abi.c libffi.closures/ffitest.h \
|
||||
libffi.closures/huge_struct.c libffi.closures/nested_struct.c libffi.closures/nested_struct1.c \
|
||||
libffi.closures/nested_struct10.c libffi.closures/nested_struct11.c libffi.closures/nested_struct12.c \
|
||||
libffi.closures/nested_struct13.c libffi.closures/nested_struct2.c libffi.closures/nested_struct3.c \
|
||||
libffi.closures/nested_struct4.c libffi.closures/nested_struct5.c libffi.closures/nested_struct6.c \
|
||||
libffi.closures/nested_struct7.c libffi.closures/nested_struct8.c libffi.closures/nested_struct9.c \
|
||||
libffi.closures/problem1.c libffi.closures/single_entry_structs1.c libffi.closures/single_entry_structs2.c \
|
||||
libffi.closures/single_entry_structs3.c libffi.closures/stret_large.c libffi.closures/stret_large2.c \
|
||||
libffi.closures/stret_medium.c libffi.closures/stret_medium2.c libffi.closures/testclosure.c \
|
||||
libffi.closures/unwindtest.cc libffi.closures/unwindtest_ffi_call.cc libffi.complex/cls_align_complex.inc \
|
||||
libffi.complex/cls_align_complex_double.c libffi.complex/cls_align_complex_float.c libffi.complex/cls_align_complex_longdouble.c \
|
||||
libffi.complex/cls_complex.inc libffi.complex/cls_complex_double.c libffi.complex/cls_complex_float.c \
|
||||
libffi.complex/cls_complex_longdouble.c libffi.complex/cls_complex_struct.inc libffi.complex/cls_complex_struct_double.c \
|
||||
libffi.complex/cls_complex_struct_float.c libffi.complex/cls_complex_struct_longdouble.c libffi.complex/cls_complex_va.inc \
|
||||
libffi.complex/cls_complex_va_double.c libffi.complex/cls_complex_va_float.c libffi.complex/cls_complex_va_longdouble.c \
|
||||
libffi.complex/complex.exp libffi.complex/complex.inc libffi.complex/complex_defs_double.inc \
|
||||
libffi.complex/complex_defs_float.inc libffi.complex/complex_defs_longdouble.inc libffi.complex/complex_double.c \
|
||||
libffi.complex/complex_float.c libffi.complex/complex_int.c libffi.complex/complex_longdouble.c \
|
||||
libffi.complex/ffitest.h libffi.complex/many_complex.inc libffi.complex/many_complex_double.c \
|
||||
libffi.complex/many_complex_float.c libffi.complex/many_complex_longdouble.c libffi.complex/return_complex.inc \
|
||||
libffi.complex/return_complex1.inc libffi.complex/return_complex1_double.c libffi.complex/return_complex1_float.c \
|
||||
libffi.complex/return_complex1_longdouble.c libffi.complex/return_complex2.inc libffi.complex/return_complex2_double.c \
|
||||
libffi.complex/return_complex2_float.c libffi.complex/return_complex2_longdouble.c libffi.complex/return_complex_double.c \
|
||||
libffi.complex/return_complex_float.c libffi.complex/return_complex_longdouble.c libffi.go/aa-direct.c \
|
||||
libffi.go/closure1.c libffi.go/ffitest.h libffi.go/go.exp \
|
||||
libffi.go/static-chain.h Makefile.am Makefile.in \
|
||||
libffi.threads/ffitest.h libffi.threads/threads.exp libffi.threads/tsan.c
|
||||
Vendored
+622
@@ -0,0 +1,622 @@
|
||||
# Makefile.in generated by automake 1.16.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = testsuite
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/asmcfi.m4 \
|
||||
$(top_srcdir)/m4/ax_cc_maxopt.m4 \
|
||||
$(top_srcdir)/m4/ax_cflags_warn_all.m4 \
|
||||
$(top_srcdir)/m4/ax_check_compile_flag.m4 \
|
||||
$(top_srcdir)/m4/ax_compiler_vendor.m4 \
|
||||
$(top_srcdir)/m4/ax_configure_args.m4 \
|
||||
$(top_srcdir)/m4/ax_enable_builddir.m4 \
|
||||
$(top_srcdir)/m4/ax_gcc_archflag.m4 \
|
||||
$(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \
|
||||
$(top_srcdir)/m4/ax_prepend_flag.m4 \
|
||||
$(top_srcdir)/m4/ax_require_defined.m4 \
|
||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
||||
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
||||
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/fficonfig.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
DEJATOOL = $(PACKAGE)
|
||||
RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
|
||||
EXPECT = expect
|
||||
RUNTEST = runtest
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AM_LTLDFLAGS = @AM_LTLDFLAGS@
|
||||
AM_RUNTESTFLAGS = @AM_RUNTESTFLAGS@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCAS = @CCAS@
|
||||
CCASDEPMODE = @CCASDEPMODE@
|
||||
CCASFLAGS = @CCASFLAGS@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CSCOPE = @CSCOPE@
|
||||
CTAGS = @CTAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
ETAGS = @ETAGS@
|
||||
EXEEXT = @EXEEXT@
|
||||
FFI_EXEC_TRAMPOLINE_TABLE = @FFI_EXEC_TRAMPOLINE_TABLE@
|
||||
FFI_VERSION_NUMBER = @FFI_VERSION_NUMBER@
|
||||
FFI_VERSION_STRING = @FFI_VERSION_STRING@
|
||||
FGREP = @FGREP@
|
||||
FILECMD = @FILECMD@
|
||||
GREP = @GREP@
|
||||
HAVE_LONG_DOUBLE = @HAVE_LONG_DOUBLE@
|
||||
HAVE_LONG_DOUBLE_VARIANT = @HAVE_LONG_DOUBLE_VARIANT@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OPT_LDFLAGS = @OPT_LDFLAGS@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PRTDIAG = @PRTDIAG@
|
||||
RANLIB = @RANLIB@
|
||||
READELF = @READELF@
|
||||
SECTION_LDFLAGS = @SECTION_LDFLAGS@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
TARGET = @TARGET@
|
||||
TARGETDIR = @TARGETDIR@
|
||||
TARGET_OBJ = @TARGET_OBJ@
|
||||
VERSION = @VERSION@
|
||||
WASM64_MEMORY64 = @WASM64_MEMORY64@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
ac_ct_READELF = @ac_ct_READELF@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
ax_enable_builddir_sed = @ax_enable_builddir_sed@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
runstatedir = @runstatedir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sys_symbol_underscore = @sys_symbol_underscore@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
tmake_file = @tmake_file@
|
||||
toolexecdir = @toolexecdir@
|
||||
toolexeclibdir = @toolexeclibdir@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
AUTOMAKE_OPTIONS = foreign dejagnu
|
||||
EXTRA_DEJAGNU_SITE_CONFIG = ../local.exp
|
||||
CLEANFILES = *.exe core* *.log *.sum
|
||||
EXTRA_DIST = config/default.exp emscripten/build.sh emscripten/conftest.py \
|
||||
emscripten/node-tests.sh emscripten/test.html emscripten/test_libffi.py \
|
||||
emscripten/build-tests.sh lib/libffi.exp lib/target-libpath.exp \
|
||||
lib/wrapper.exp libffi.bhaible/Makefile libffi.bhaible/README \
|
||||
libffi.bhaible/alignof.h libffi.bhaible/bhaible.exp libffi.bhaible/test-call.c \
|
||||
libffi.bhaible/test-callback.c libffi.bhaible/testcases.c libffi.call/align_mixed.c \
|
||||
libffi.call/align_stdcall.c libffi.call/bpo_38748.c libffi.call/call.exp \
|
||||
libffi.call/err_bad_typedef.c libffi.call/ffitest.h libffi.call/float.c \
|
||||
libffi.call/float1.c libffi.call/float2.c libffi.call/float3.c \
|
||||
libffi.call/float4.c libffi.call/float_va.c libffi.call/many.c \
|
||||
libffi.call/many2.c libffi.call/many_double.c libffi.call/many_mixed.c \
|
||||
libffi.call/negint.c libffi.call/offsets.c libffi.call/overread.c \
|
||||
libffi.call/pr1172638.c libffi.call/promotion.c libffi.call/pyobjc_tc.c libffi.call/return_dbl.c \
|
||||
libffi.call/return_dbl1.c libffi.call/return_dbl2.c libffi.call/return_fl.c \
|
||||
libffi.call/return_fl1.c libffi.call/return_fl2.c libffi.call/return_fl3.c \
|
||||
libffi.call/return_ldl.c libffi.call/return_ll.c libffi.call/return_ll1.c \
|
||||
libffi.call/return_sc.c libffi.call/return_sl.c libffi.call/return_uc.c \
|
||||
libffi.call/return_ul.c libffi.call/s55.c libffi.call/strlen.c \
|
||||
libffi.call/strlen2.c libffi.call/strlen3.c libffi.call/strlen4.c \
|
||||
libffi.call/struct1.c libffi.call/struct10.c libffi.call/struct2.c \
|
||||
libffi.call/struct3.c libffi.call/struct4.c libffi.call/struct5.c \
|
||||
libffi.call/struct6.c libffi.call/struct7.c libffi.call/struct8.c \
|
||||
libffi.call/struct9.c libffi.call/struct_by_value_2.c libffi.call/struct_by_value_3.c \
|
||||
libffi.call/struct_by_value_3f.c libffi.call/struct_by_value_4.c libffi.call/struct_by_value_4f.c \
|
||||
libffi.call/struct_by_value_big.c libffi.call/struct_by_value_small.c libffi.call/struct_return_2H.c \
|
||||
libffi.call/struct_int_float.c libffi.call/longjmp.c \
|
||||
libffi.call/struct_return_8H.c libffi.call/uninitialized.c libffi.call/va_1.c \
|
||||
libffi.call/va_2.c libffi.call/va_3.c libffi.call/va_struct1.c \
|
||||
libffi.call/va_struct2.c libffi.call/va_struct3.c libffi.call/callback.c \
|
||||
libffi.call/callback2.c libffi.call/callback3.c libffi.call/callback4.c libffi.call/x32.c \
|
||||
libffi.closures/closure.exp libffi.closures/closure_fn0.c libffi.closures/closure_fn1.c \
|
||||
libffi.closures/closure_fn2.c libffi.closures/closure_fn3.c libffi.closures/closure_fn4.c \
|
||||
libffi.closures/closure_fn5.c libffi.closures/closure_fn6.c libffi.closures/closure_loc_fn0.c \
|
||||
libffi.closures/closure_simple.c libffi.closures/cls_12byte.c libffi.closures/cls_16byte.c \
|
||||
libffi.closures/cls_18byte.c libffi.closures/cls_19byte.c libffi.closures/cls_1_1byte.c \
|
||||
libffi.closures/cls_20byte.c libffi.closures/cls_20byte1.c libffi.closures/cls_24byte.c \
|
||||
libffi.closures/cls_2byte.c libffi.closures/cls_3_1byte.c libffi.closures/cls_3byte1.c \
|
||||
libffi.closures/cls_3byte2.c libffi.closures/cls_3float.c libffi.closures/cls_4_1byte.c \
|
||||
libffi.closures/cls_4byte.c libffi.closures/cls_5_1_byte.c libffi.closures/cls_5byte.c \
|
||||
libffi.closures/cls_64byte.c libffi.closures/cls_6_1_byte.c libffi.closures/cls_6byte.c \
|
||||
libffi.closures/cls_7_1_byte.c libffi.closures/cls_7byte.c libffi.closures/cls_8byte.c \
|
||||
libffi.closures/cls_9byte1.c libffi.closures/cls_9byte2.c libffi.closures/cls_align_double.c \
|
||||
libffi.closures/cls_align_float.c libffi.closures/cls_align_longdouble.c libffi.closures/cls_align_longdouble_split.c \
|
||||
libffi.closures/cls_align_longdouble_split2.c libffi.closures/cls_align_pointer.c libffi.closures/cls_align_sint16.c \
|
||||
libffi.closures/cls_align_sint32.c libffi.closures/cls_align_sint64.c libffi.closures/cls_align_uint16.c \
|
||||
libffi.closures/cls_align_uint32.c libffi.closures/cls_align_uint64.c libffi.closures/cls_dbls_struct.c \
|
||||
libffi.closures/cls_double.c libffi.closures/cls_double_va.c libffi.closures/cls_float.c \
|
||||
libffi.closures/cls_longdouble.c libffi.closures/cls_longdouble_va.c libffi.closures/cls_many_mixed_args.c \
|
||||
libffi.closures/cls_many_mixed_float_double.c libffi.closures/cls_multi_schar.c libffi.closures/cls_multi_sshort.c \
|
||||
libffi.closures/cls_multi_sshortchar.c libffi.closures/cls_multi_uchar.c libffi.closures/cls_multi_ushort.c \
|
||||
libffi.closures/cls_multi_ushortchar.c libffi.closures/cls_pointer.c libffi.closures/cls_pointer_stack.c \
|
||||
libffi.closures/cls_schar.c libffi.closures/cls_sint.c libffi.closures/cls_sshort.c \
|
||||
libffi.closures/cls_struct_va1.c libffi.closures/cls_uchar.c libffi.closures/cls_uint.c \
|
||||
libffi.closures/cls_uint_va.c libffi.closures/cls_ulong_va.c libffi.closures/cls_ulonglong.c \
|
||||
libffi.closures/cls_ushort.c libffi.closures/err_bad_abi.c libffi.closures/ffitest.h \
|
||||
libffi.closures/huge_struct.c libffi.closures/nested_struct.c libffi.closures/nested_struct1.c \
|
||||
libffi.closures/nested_struct10.c libffi.closures/nested_struct11.c libffi.closures/nested_struct12.c \
|
||||
libffi.closures/nested_struct13.c libffi.closures/nested_struct2.c libffi.closures/nested_struct3.c \
|
||||
libffi.closures/nested_struct4.c libffi.closures/nested_struct5.c libffi.closures/nested_struct6.c \
|
||||
libffi.closures/nested_struct7.c libffi.closures/nested_struct8.c libffi.closures/nested_struct9.c \
|
||||
libffi.closures/problem1.c libffi.closures/single_entry_structs1.c libffi.closures/single_entry_structs2.c \
|
||||
libffi.closures/single_entry_structs3.c libffi.closures/stret_large.c libffi.closures/stret_large2.c \
|
||||
libffi.closures/stret_medium.c libffi.closures/stret_medium2.c libffi.closures/testclosure.c \
|
||||
libffi.closures/unwindtest.cc libffi.closures/unwindtest_ffi_call.cc libffi.complex/cls_align_complex.inc \
|
||||
libffi.complex/cls_align_complex_double.c libffi.complex/cls_align_complex_float.c libffi.complex/cls_align_complex_longdouble.c \
|
||||
libffi.complex/cls_complex.inc libffi.complex/cls_complex_double.c libffi.complex/cls_complex_float.c \
|
||||
libffi.complex/cls_complex_longdouble.c libffi.complex/cls_complex_struct.inc libffi.complex/cls_complex_struct_double.c \
|
||||
libffi.complex/cls_complex_struct_float.c libffi.complex/cls_complex_struct_longdouble.c libffi.complex/cls_complex_va.inc \
|
||||
libffi.complex/cls_complex_va_double.c libffi.complex/cls_complex_va_float.c libffi.complex/cls_complex_va_longdouble.c \
|
||||
libffi.complex/complex.exp libffi.complex/complex.inc libffi.complex/complex_defs_double.inc \
|
||||
libffi.complex/complex_defs_float.inc libffi.complex/complex_defs_longdouble.inc libffi.complex/complex_double.c \
|
||||
libffi.complex/complex_float.c libffi.complex/complex_int.c libffi.complex/complex_longdouble.c \
|
||||
libffi.complex/ffitest.h libffi.complex/many_complex.inc libffi.complex/many_complex_double.c \
|
||||
libffi.complex/many_complex_float.c libffi.complex/many_complex_longdouble.c libffi.complex/return_complex.inc \
|
||||
libffi.complex/return_complex1.inc libffi.complex/return_complex1_double.c libffi.complex/return_complex1_float.c \
|
||||
libffi.complex/return_complex1_longdouble.c libffi.complex/return_complex2.inc libffi.complex/return_complex2_double.c \
|
||||
libffi.complex/return_complex2_float.c libffi.complex/return_complex2_longdouble.c libffi.complex/return_complex_double.c \
|
||||
libffi.complex/return_complex_float.c libffi.complex/return_complex_longdouble.c libffi.go/aa-direct.c \
|
||||
libffi.go/closure1.c libffi.go/ffitest.h libffi.go/go.exp \
|
||||
libffi.go/static-chain.h Makefile.am Makefile.in \
|
||||
libffi.threads/ffitest.h libffi.threads/threads.exp libffi.threads/tsan.c
|
||||
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign testsuite/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign testsuite/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
tags TAGS:
|
||||
|
||||
ctags CTAGS:
|
||||
|
||||
cscope cscopelist:
|
||||
|
||||
|
||||
check-DEJAGNU: site.exp
|
||||
srcdir='$(srcdir)'; export srcdir; \
|
||||
EXPECT=$(EXPECT); export EXPECT; \
|
||||
if $(SHELL) -c "$(RUNTEST) --version" > /dev/null 2>&1; then \
|
||||
exit_status=0; l='$(DEJATOOL)'; for tool in $$l; do \
|
||||
if $(RUNTEST) $(RUNTESTDEFAULTFLAGS) $(AM_RUNTESTFLAGS) $(RUNTESTFLAGS); \
|
||||
then :; else exit_status=1; fi; \
|
||||
done; \
|
||||
else echo "WARNING: could not find '$(RUNTEST)'" 1>&2; :;\
|
||||
fi; \
|
||||
exit $$exit_status
|
||||
site.exp: Makefile $(EXTRA_DEJAGNU_SITE_CONFIG)
|
||||
@echo 'Making a new site.exp file ...'
|
||||
@echo '## these variables are automatically generated by make ##' >site.tmp
|
||||
@echo '# Do not edit here. If you wish to override these values' >>site.tmp
|
||||
@echo '# edit the last section' >>site.tmp
|
||||
@echo 'set srcdir "$(srcdir)"' >>site.tmp
|
||||
@echo "set objdir \"`pwd`\"" >>site.tmp
|
||||
@echo 'set build_alias "$(build_alias)"' >>site.tmp
|
||||
@echo 'set build_triplet $(build_triplet)' >>site.tmp
|
||||
@echo 'set host_alias "$(host_alias)"' >>site.tmp
|
||||
@echo 'set host_triplet $(host_triplet)' >>site.tmp
|
||||
@echo 'set target_alias "$(target_alias)"' >>site.tmp
|
||||
@echo 'set target_triplet $(target_triplet)' >>site.tmp
|
||||
@list='$(EXTRA_DEJAGNU_SITE_CONFIG)'; for f in $$list; do \
|
||||
echo "## Begin content included from file $$f. Do not modify. ##" \
|
||||
&& cat `test -f "$$f" || echo '$(srcdir)/'`$$f \
|
||||
&& echo "## End content included from file $$f. ##" \
|
||||
|| exit 1; \
|
||||
done >> site.tmp
|
||||
@echo "## End of auto-generated content; you can edit from here. ##" >> site.tmp
|
||||
@if test -f site.exp; then \
|
||||
sed -e '1,/^## End of auto-generated content.*##/d' site.exp >> site.tmp; \
|
||||
fi
|
||||
@-rm -f site.bak
|
||||
@test ! -f site.exp || mv site.exp site.bak
|
||||
@mv site.tmp site.exp
|
||||
|
||||
distclean-DEJAGNU:
|
||||
-rm -f site.exp site.bak
|
||||
-l='$(DEJATOOL)'; for tool in $$l; do \
|
||||
rm -f $$tool.sum $$tool.log; \
|
||||
done
|
||||
distdir: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||
|
||||
distdir-am: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
$(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
|
||||
check: check-am
|
||||
all-am: Makefile
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-DEJAGNU distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: check-am install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-DEJAGNU check-am clean clean-generic \
|
||||
clean-libtool cscopelist-am ctags-am distclean \
|
||||
distclean-DEJAGNU distclean-generic distclean-libtool distdir \
|
||||
dvi dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
|
||||
uninstall-am
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
+1
@@ -0,0 +1 @@
|
||||
load_lib "standard.exp"
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if ! [ -x "$(command -v emcc)" ]; then
|
||||
echo "Error: emcc could not be found." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
cd "$1"
|
||||
shift
|
||||
|
||||
export CFLAGS="-fPIC -O2 -I../../target/include $EXTRA_CFLAGS"
|
||||
export CXXFLAGS="$CFLAGS -sNO_DISABLE_EXCEPTION_CATCHING $EXTRA_CXXFLAGS"
|
||||
export LDFLAGS=" \
|
||||
-L../../target/lib/ -lffi \
|
||||
-sEXPORT_ALL \
|
||||
-sMODULARIZE \
|
||||
-sMAIN_MODULE \
|
||||
-sNO_DISABLE_EXCEPTION_CATCHING \
|
||||
-sWASM_BIGINT \
|
||||
$EXTRA_LD_FLAGS \
|
||||
"
|
||||
|
||||
# Rename main functions to test__filename so we can link them together
|
||||
ls *c | sed 's!\(.*\)\.c!sed -i "s/main/test__\1/g" \0!g' | bash
|
||||
|
||||
# Compile
|
||||
ls *.c | sed 's/\(.*\)\.c/emcc $CFLAGS -c \1.c -o \1.o /g' | bash
|
||||
ls *.cc | sed 's/\(.*\)\.cc/em++ $CXXFLAGS -c \1.cc -o \1.o /g' | bash
|
||||
|
||||
# Link
|
||||
em++ $LDFLAGS *.o -o test.js
|
||||
cp ../emscripten/test.html .
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if ! [ -x "$(command -v emcc)" ]; then
|
||||
echo "Error: emcc could not be found." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
SOURCE_DIR=$PWD
|
||||
|
||||
# Working directories
|
||||
TARGET=$SOURCE_DIR/target
|
||||
mkdir -p "$TARGET"
|
||||
|
||||
# Define default arguments
|
||||
DEBUG=false
|
||||
|
||||
# Parse arguments
|
||||
while [ $# -gt 0 ]; do
|
||||
case $1 in
|
||||
--debug) DEBUG=true ;;
|
||||
*) echo "ERROR: Unknown parameter: $1" >&2; exit 1 ;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# Common compiler flags
|
||||
export CFLAGS="-O3 -fPIC"
|
||||
if [ "$DEBUG" = "true" ]; then export CFLAGS+=" -DDEBUG_F"; fi
|
||||
export CXXFLAGS="$CFLAGS"
|
||||
|
||||
# Build paths
|
||||
export CPATH="$TARGET/include"
|
||||
export PKG_CONFIG_PATH="$TARGET/lib/pkgconfig"
|
||||
export EM_PKG_CONFIG_PATH="$PKG_CONFIG_PATH"
|
||||
|
||||
# Specific variables for cross-compilation
|
||||
export CHOST="${TARGET_HOST}-unknown-linux" # wasm32-unknown-emscripten
|
||||
|
||||
autoreconf -fiv
|
||||
emconfigure ./configure --host=$CHOST --prefix="$TARGET" --enable-static --disable-shared --disable-dependency-tracking \
|
||||
--disable-builddir --disable-multi-os-directory --disable-raw-api --disable-docs ${EXTRA_CONFIGURE_FLAGS}
|
||||
make install
|
||||
cp fficonfig.h target/include/
|
||||
cp include/ffi_common.h target/include/
|
||||
+86
@@ -0,0 +1,86 @@
|
||||
from pathlib import Path
|
||||
from pytest import fixture
|
||||
from pytest_pyodide.server import spawn_web_server
|
||||
from pytest_pyodide import runner
|
||||
|
||||
import logging
|
||||
|
||||
TEST_PATH = Path(__file__).parents[1].resolve()
|
||||
|
||||
|
||||
class BaseRunner(runner._BrowserBaseRunner):
|
||||
def __init__(
|
||||
self,
|
||||
*args,
|
||||
test_dir,
|
||||
**kwargs,
|
||||
):
|
||||
self.test_dir = test_dir
|
||||
super().__init__(
|
||||
*args,
|
||||
**kwargs,
|
||||
load_pyodide=False,
|
||||
)
|
||||
|
||||
def prepare_driver(self):
|
||||
self.base_url = (
|
||||
f"http://{self.server_hostname}:{self.server_port}/{self.test_dir}/"
|
||||
)
|
||||
self.goto(f"{self.base_url}/test.html")
|
||||
|
||||
def javascript_setup(self):
|
||||
self.run_js("globalThis.TestModule = await globalThis.Module();")
|
||||
|
||||
|
||||
class FirefoxRunner(BaseRunner, runner.SeleniumFirefoxRunner):
|
||||
pass
|
||||
|
||||
|
||||
class ChromeRunner(BaseRunner, runner.SeleniumChromeRunner):
|
||||
pass
|
||||
|
||||
|
||||
# TODO: Figure out how to get NodeRunner to work.
|
||||
|
||||
RUNNER_DICT = {x.browser: x for x in [FirefoxRunner, ChromeRunner]}
|
||||
|
||||
|
||||
@fixture(params=list(RUNNER_DICT), scope="class")
|
||||
def selenium_class_scope(request, web_server_main):
|
||||
server_hostname, server_port, server_log = web_server_main
|
||||
assert request.param in RUNNER_DICT
|
||||
|
||||
logger = logging.getLogger('selenium')
|
||||
logger.setLevel(logging.DEBUG)
|
||||
|
||||
cls = RUNNER_DICT[request.param]
|
||||
selenium = cls(
|
||||
test_dir=request.cls.TEST_BUILD_DIR,
|
||||
server_port=server_port,
|
||||
server_hostname=server_hostname,
|
||||
server_log=server_log,
|
||||
)
|
||||
request.cls.call_number = 0
|
||||
try:
|
||||
yield selenium
|
||||
finally:
|
||||
print(selenium.logs)
|
||||
selenium.driver.quit()
|
||||
|
||||
|
||||
@fixture(scope="function")
|
||||
def selenium(selenium_class_scope, request):
|
||||
selenium = selenium_class_scope
|
||||
request.cls.call_number += 1
|
||||
# Refresh page every 50 calls to prevent firefox out of memory errors
|
||||
if request.cls.call_number % 50 == 0:
|
||||
selenium.driver.refresh()
|
||||
selenium.javascript_setup()
|
||||
selenium.clean_logs()
|
||||
yield selenium
|
||||
|
||||
|
||||
@fixture(scope="session")
|
||||
def web_server_main(request):
|
||||
with spawn_web_server(TEST_PATH) as output:
|
||||
yield output
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
if ! [ -x "$(command -v emcc)" ]; then
|
||||
echo "Error: emcc could not be found." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Common compiler flags
|
||||
export CFLAGS="-fPIC $EXTRA_CFLAGS"
|
||||
export CXXFLAGS="$CFLAGS -sNO_DISABLE_EXCEPTION_CATCHING $EXTRA_CXXFLAGS"
|
||||
export LDFLAGS="-sEXPORTED_FUNCTIONS=_main,_malloc,_free -sALLOW_TABLE_GROWTH -sASSERTIONS -sNO_DISABLE_EXCEPTION_CATCHING -sWASM_BIGINT -Wno-main"
|
||||
|
||||
# Specific variables for cross-compilation
|
||||
export CHOST="${TARGET_HOST}-unknown-linux" # wasm32-unknown-emscripten
|
||||
|
||||
autoreconf -fiv
|
||||
emconfigure ./configure --prefix="$(pwd)/target" --host=$CHOST --enable-static --disable-shared \
|
||||
--disable-builddir --disable-multi-os-directory --disable-raw-api --disable-docs ${EXTRA_CONFIGURE_FLAGS} ||
|
||||
(cat config.log && exit 1)
|
||||
make
|
||||
|
||||
EMMAKEN_JUST_CONFIGURE=1 emmake make check \
|
||||
RUNTESTFLAGS="LDFLAGS_FOR_TARGET='$LDFLAGS $EXTRA_TEST_LDFLAGS'" || (cat testsuite/libffi.log && exit 1)
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="test.js"></script>
|
||||
</head>
|
||||
<body></body>
|
||||
</html>
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
import subprocess
|
||||
import pathlib
|
||||
import pytest
|
||||
|
||||
TEST_PATH = pathlib.Path(__file__).parents[1].resolve()
|
||||
|
||||
xfails = {}
|
||||
|
||||
|
||||
def libffi_tests(self, selenium, libffi_test):
|
||||
if libffi_test in xfails:
|
||||
pytest.xfail(f'known failure with code "{xfails[libffi_test]}"')
|
||||
res = selenium.run_js(
|
||||
"""
|
||||
window.TestModule = await Module();
|
||||
"""
|
||||
)
|
||||
selenium.run_js(
|
||||
f"""
|
||||
try {{
|
||||
TestModule._test__{libffi_test}();
|
||||
}} catch(e){{
|
||||
if(e.name !== "ExitStatus"){{
|
||||
throw e;
|
||||
}}
|
||||
if(e.status !== 0){{
|
||||
throw new Error(`Terminated with nonzero status code ${{e.status}}: ` + e.message);
|
||||
}}
|
||||
}}
|
||||
"""
|
||||
)
|
||||
|
||||
|
||||
class TestCall:
|
||||
TEST_BUILD_DIR = "libffi.call.test"
|
||||
test_call = libffi_tests
|
||||
|
||||
|
||||
class TestClosures:
|
||||
TEST_BUILD_DIR = "libffi.closures.test"
|
||||
test_closures = libffi_tests
|
||||
|
||||
|
||||
def pytest_generate_tests(metafunc):
|
||||
test_build_dir = metafunc.cls.TEST_BUILD_DIR
|
||||
test_names = [x.stem for x in (TEST_PATH / test_build_dir).glob("*.o")]
|
||||
metafunc.parametrize("libffi_test", test_names)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
subprocess.call(["build-tests.sh", "libffi.call"])
|
||||
Vendored
+695
@@ -0,0 +1,695 @@
|
||||
# Copyright (C) 2003, 2005, 2008, 2009, 2010, 2011, 2014, 2019, 2022, 2025 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; see the file COPYING3. If not see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
|
||||
proc load_gcc_lib { filename } {
|
||||
global srcdir
|
||||
load_file $srcdir/lib/$filename
|
||||
}
|
||||
|
||||
load_lib dg.exp
|
||||
load_lib libgloss.exp
|
||||
load_gcc_lib target-libpath.exp
|
||||
load_gcc_lib wrapper.exp
|
||||
|
||||
proc check_effective_target_gccbug { } {
|
||||
global has_gccbug
|
||||
return $has_gccbug
|
||||
}
|
||||
|
||||
# Return 1 if the target matches the effective target 'arg', 0 otherwise.
|
||||
# This can be used with any check_* proc that takes no argument and
|
||||
# returns only 1 or 0. It could be used with check_* procs that take
|
||||
# arguments with keywords that pass particular arguments.
|
||||
|
||||
proc is-effective-target { arg } {
|
||||
global et_index
|
||||
set selected 0
|
||||
if { ![info exists et_index] } {
|
||||
# Initialize the effective target index that is used in some
|
||||
# check_effective_target_* procs.
|
||||
set et_index 0
|
||||
}
|
||||
if { [info procs check_effective_target_${arg}] != [list] } {
|
||||
set selected [check_effective_target_${arg}]
|
||||
} else {
|
||||
error "unknown effective target keyword `$arg'"
|
||||
}
|
||||
verbose "is-effective-target: $arg $selected" 2
|
||||
return $selected
|
||||
}
|
||||
|
||||
proc is-effective-target-keyword { arg } {
|
||||
if { [info procs check_effective_target_${arg}] != [list] } {
|
||||
return 1
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
# Intercept the call to the DejaGnu version of dg-process-target to
|
||||
# support use of an effective-target keyword in place of a list of
|
||||
# target triplets to xfail or skip a test.
|
||||
#
|
||||
# The argument to dg-process-target is the keyword "target" or "xfail"
|
||||
# followed by a selector:
|
||||
# target-triplet-1 ...
|
||||
# effective-target-keyword
|
||||
# selector-expression
|
||||
#
|
||||
# For a target list the result is "S" if the target is selected, "N" otherwise.
|
||||
# For an xfail list the result is "F" if the target is affected, "P" otherwise.
|
||||
|
||||
# In contexts that allow either "target" or "xfail" the argument can be
|
||||
# target selector1 xfail selector2
|
||||
# which returns "N" if selector1 is not selected, otherwise the result of
|
||||
# "xfail selector2".
|
||||
#
|
||||
# A selector expression appears within curly braces and uses a single logical
|
||||
# operator: !, &&, or ||. An operand is another selector expression, an
|
||||
# effective-target keyword, or a list of target triplets within quotes or
|
||||
# curly braces.
|
||||
|
||||
if { [info procs saved-dg-process-target] == [list] } {
|
||||
rename dg-process-target saved-dg-process-target
|
||||
|
||||
# Evaluate an operand within a selector expression.
|
||||
proc selector_opd { op } {
|
||||
set selector "target"
|
||||
lappend selector $op
|
||||
set answer [ expr { [dg-process-target $selector] == "S" } ]
|
||||
verbose "selector_opd: `$op' $answer" 2
|
||||
return $answer
|
||||
}
|
||||
|
||||
# Evaluate a target triplet list within a selector expression.
|
||||
# Unlike other operands, this needs to be expanded from a list to
|
||||
# the same string as "target".
|
||||
proc selector_list { op } {
|
||||
set selector "target [join $op]"
|
||||
set answer [ expr { [dg-process-target $selector] == "S" } ]
|
||||
verbose "selector_list: `$op' $answer" 2
|
||||
return $answer
|
||||
}
|
||||
|
||||
# Evaluate a selector expression.
|
||||
proc selector_expression { exp } {
|
||||
if { [llength $exp] == 2 } {
|
||||
if [string match "!" [lindex $exp 0]] {
|
||||
set op1 [lindex $exp 1]
|
||||
set answer [expr { ! [selector_opd $op1] }]
|
||||
} else {
|
||||
# Assume it's a list of target triplets.
|
||||
set answer [selector_list $exp]
|
||||
}
|
||||
} elseif { [llength $exp] == 3 } {
|
||||
set op1 [lindex $exp 0]
|
||||
set opr [lindex $exp 1]
|
||||
set op2 [lindex $exp 2]
|
||||
if [string match "&&" $opr] {
|
||||
set answer [expr { [selector_opd $op1] && [selector_opd $op2] }]
|
||||
} elseif [string match "||" $opr] {
|
||||
set answer [expr { [selector_opd $op1] || [selector_opd $op2] }]
|
||||
} else {
|
||||
# Assume it's a list of target triplets.
|
||||
set answer [selector_list $exp]
|
||||
}
|
||||
} else {
|
||||
# Assume it's a list of target triplets.
|
||||
set answer [selector_list $exp]
|
||||
}
|
||||
|
||||
verbose "selector_expression: `$exp' $answer" 2
|
||||
return $answer
|
||||
}
|
||||
|
||||
# Evaluate "target selector" or "xfail selector".
|
||||
|
||||
proc dg-process-target-1 { args } {
|
||||
verbose "dg-process-target-1: `$args'" 2
|
||||
|
||||
# Extract the 'what' keyword from the argument list.
|
||||
set selector [string trim [lindex $args 0]]
|
||||
if [regexp "^xfail " $selector] {
|
||||
set what "xfail"
|
||||
} elseif [regexp "^target " $selector] {
|
||||
set what "target"
|
||||
} else {
|
||||
error "syntax error in target selector \"$selector\""
|
||||
}
|
||||
|
||||
# Extract the rest of the list, which might be a keyword.
|
||||
regsub "^${what}" $selector "" rest
|
||||
set rest [string trim $rest]
|
||||
|
||||
if [is-effective-target-keyword $rest] {
|
||||
# The selector is an effective target keyword.
|
||||
if [is-effective-target $rest] {
|
||||
return [expr { $what == "xfail" ? "F" : "S" }]
|
||||
} else {
|
||||
return [expr { $what == "xfail" ? "P" : "N" }]
|
||||
}
|
||||
}
|
||||
|
||||
if [string match "{*}" $rest] {
|
||||
if [selector_expression [lindex $rest 0]] {
|
||||
return [expr { $what == "xfail" ? "F" : "S" }]
|
||||
} else {
|
||||
return [expr { $what == "xfail" ? "P" : "N" }]
|
||||
}
|
||||
}
|
||||
|
||||
# The selector is not an effective-target keyword, so process
|
||||
# the list of target triplets.
|
||||
return [saved-dg-process-target $selector]
|
||||
}
|
||||
|
||||
# Intercept calls to the DejaGnu function. In addition to
|
||||
# processing "target selector" or "xfail selector", handle
|
||||
# "target selector1 xfail selector2".
|
||||
|
||||
proc dg-process-target { args } {
|
||||
verbose "replacement dg-process-target: `$args'" 2
|
||||
|
||||
set selector [string trim [lindex $args 0]]
|
||||
|
||||
# If the argument list contains both 'target' and 'xfail',
|
||||
# process 'target' and, if that succeeds, process 'xfail'.
|
||||
if [regexp "^target .* xfail .*" $selector] {
|
||||
set xfail_index [string first "xfail" $selector]
|
||||
set xfail_selector [string range $selector $xfail_index end]
|
||||
set target_selector [string range $selector 0 [expr $xfail_index-1]]
|
||||
set target_selector [string trim $target_selector]
|
||||
if { [dg-process-target-1 $target_selector] == "N" } {
|
||||
return "N"
|
||||
}
|
||||
return [dg-process-target-1 $xfail_selector]
|
||||
|
||||
}
|
||||
return [dg-process-target-1 $selector]
|
||||
}
|
||||
}
|
||||
|
||||
# Define libffi callbacks for dg.exp.
|
||||
|
||||
proc libffi-dg-test-1 { target_compile prog do_what extra_tool_flags } {
|
||||
|
||||
# To get all \n in dg-output test strings to match printf output
|
||||
# in a system that outputs it as \015\012 (i.e. not just \012), we
|
||||
# need to change all \n into \r?\n. As there is no dejagnu flag
|
||||
# or hook to do that, we simply change the text being tested.
|
||||
# Unfortunately, we have to know that the variable is called
|
||||
# dg-output-text and lives in the caller of libffi-dg-test, which
|
||||
# is two calls up. Overriding proc dg-output would be longer and
|
||||
# would necessarily have the same assumption.
|
||||
upvar 2 dg-output-text output_match
|
||||
|
||||
if { [llength $output_match] > 1 } {
|
||||
regsub -all "\n" [lindex $output_match 1] "\r?\n" x
|
||||
set output_match [lreplace $output_match 1 1 $x]
|
||||
}
|
||||
|
||||
if { [ istarget "wasm32-*-*" ] } {
|
||||
# emscripten will get confused if told to build as .exe
|
||||
set exec_suffix ""
|
||||
} else {
|
||||
set exec_suffix ".exe"
|
||||
}
|
||||
|
||||
# Set up the compiler flags, based on what we're going to do.
|
||||
|
||||
set options [list]
|
||||
switch $do_what {
|
||||
"compile" {
|
||||
set compile_type "assembly"
|
||||
set output_file "[file rootname [file tail $prog]].s"
|
||||
}
|
||||
"link" {
|
||||
set compile_type "executable"
|
||||
set output_file "[file rootname [file tail $prog]]$exec_suffix"
|
||||
# The following line is needed for targets like the i960 where
|
||||
# the default output file is b.out. Sigh.
|
||||
}
|
||||
"run" {
|
||||
set compile_type "executable"
|
||||
# FIXME: "./" is to cope with "." not being in $PATH.
|
||||
# Should this be handled elsewhere?
|
||||
# YES.
|
||||
set output_file "./[file rootname [file tail $prog]]$exec_suffix"
|
||||
# This is the only place where we care if an executable was
|
||||
# created or not. If it was, dg.exp will try to run it.
|
||||
remote_file build delete $output_file;
|
||||
}
|
||||
default {
|
||||
perror "$do_what: not a valid dg-do keyword"
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
if { $extra_tool_flags != "" } {
|
||||
lappend options "additional_flags=$extra_tool_flags"
|
||||
}
|
||||
|
||||
set comp_output [libffi_target_compile "$prog" "$output_file" "$compile_type" $options];
|
||||
|
||||
|
||||
return [list $comp_output $output_file]
|
||||
}
|
||||
|
||||
|
||||
proc libffi-dg-test { prog do_what extra_tool_flags } {
|
||||
return [libffi-dg-test-1 target_compile $prog $do_what $extra_tool_flags]
|
||||
}
|
||||
|
||||
proc libffi-dg-prune { target_triplet text } {
|
||||
# We get this with some qemu emulated systems (eg. ppc64le-linux-gnu)
|
||||
regsub -all "(^|\n)\[^\n\]*unable to perform all requested operations" $text "" text
|
||||
# We get this from sparc64 linux systems
|
||||
regsub -all "(^|\n)\[^\n\]*warning: .* has a LOAD segment with RWX permissions" $text "" text
|
||||
# Ignore Emscripten INFO messages
|
||||
regsub -all "(^|\n)(cache|shared):INFO:\[^\n\]*" $text "" text
|
||||
return $text
|
||||
}
|
||||
|
||||
proc libffi-init { args } {
|
||||
global gluefile wrap_flags;
|
||||
global srcdir
|
||||
global blddirffi
|
||||
global objdir
|
||||
global TOOL_OPTIONS
|
||||
global tool
|
||||
global libffi_include
|
||||
global libffi_link_flags
|
||||
global tool_root_dir
|
||||
global ld_library_path
|
||||
global compiler_vendor
|
||||
|
||||
if ![info exists blddirffi] {
|
||||
set blddirffi [pwd]/..
|
||||
}
|
||||
|
||||
verbose "libffi $blddirffi"
|
||||
|
||||
# Which compiler are we building with?
|
||||
if { [string match $compiler_vendor "gnu"] } {
|
||||
set gccdir [lookfor_file $tool_root_dir gcc/libgcc.a]
|
||||
if {$gccdir != ""} {
|
||||
set gccdir [file dirname $gccdir]
|
||||
}
|
||||
verbose "gccdir $gccdir"
|
||||
|
||||
set ld_library_path "."
|
||||
append ld_library_path ":${gccdir}"
|
||||
|
||||
set compiler "${gccdir}/xgcc"
|
||||
if { [is_remote host] == 0 && [which $compiler] != 0 } {
|
||||
foreach i "[exec $compiler --print-multi-lib]" {
|
||||
set mldir ""
|
||||
regexp -- "\[a-z0-9=_/\.-\]*;" $i mldir
|
||||
set mldir [string trimright $mldir "\;@"]
|
||||
if { "$mldir" == "." } {
|
||||
continue
|
||||
}
|
||||
if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.so.*]] >= 1 } {
|
||||
append ld_library_path ":${gccdir}/${mldir}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# add the library path for libffi.
|
||||
append ld_library_path ":${blddirffi}/.libs"
|
||||
|
||||
verbose "ld_library_path: $ld_library_path"
|
||||
|
||||
# Point to the Libffi headers in libffi.
|
||||
set libffi_include "${blddirffi}/include"
|
||||
verbose "libffi_include $libffi_include"
|
||||
|
||||
set libffi_dir "${blddirffi}/.libs"
|
||||
verbose "libffi_dir $libffi_dir"
|
||||
if { $libffi_dir != "" } {
|
||||
set libffi_dir [file dirname ${libffi_dir}]
|
||||
set libffi_link_flags "-L ../.libs"
|
||||
}
|
||||
|
||||
set_ld_library_path_env_vars
|
||||
libffi_maybe_build_wrapper "${objdir}/testglue.o"
|
||||
}
|
||||
|
||||
proc libffi_exit { } {
|
||||
global gluefile;
|
||||
|
||||
if [info exists gluefile] {
|
||||
file_on_build delete $gluefile;
|
||||
unset gluefile;
|
||||
}
|
||||
}
|
||||
|
||||
proc libffi_target_compile { source dest type options } {
|
||||
global gluefile wrap_flags;
|
||||
global srcdir
|
||||
global blddirffi
|
||||
global TOOL_OPTIONS
|
||||
global libffi_link_flags
|
||||
global libffi_include
|
||||
global target_triplet
|
||||
global compiler_vendor
|
||||
|
||||
if { [target_info needs_status_wrapper]!="" && [info exists gluefile] } {
|
||||
lappend options "libs=${gluefile}"
|
||||
lappend options "ldflags=$wrap_flags"
|
||||
}
|
||||
|
||||
# TOOL_OPTIONS must come first, so that it doesn't override testcase
|
||||
# specific options.
|
||||
if [info exists TOOL_OPTIONS] {
|
||||
lappend options "additional_flags=$TOOL_OPTIONS"
|
||||
}
|
||||
|
||||
# Search for include files in build_dir/include, build_dir and source_dir/include.
|
||||
# The .. in the last path is necessary because srcdir points to libffi source/testsuite.
|
||||
lappend options "additional_flags=-I${libffi_include} -I${blddirffi} -I${srcdir}/../include"
|
||||
if { [string match $type "executable"] } {
|
||||
|
||||
lappend options "additional_flags=${libffi_link_flags}"
|
||||
|
||||
# Darwin needs a stack execution allowed flag.
|
||||
if { [istarget "*-*-darwin9*"] || [istarget "*-*-darwin1*"]
|
||||
|| [istarget "*-*-darwin2*"] } {
|
||||
# lappend options "additional_flags=-Wl,-allow_stack_execute"
|
||||
lappend options "additional_flags=-Wno-unused-command-line-argument"
|
||||
lappend options "additional_flags=-Wl,-search_paths_first"
|
||||
}
|
||||
|
||||
# If you're building the compiler with --prefix set to a place
|
||||
# where it's not yet installed, then the linker won't be able to
|
||||
# find the libgcc used by libffi.dylib. We could pass the
|
||||
# -dylib_file option, but that's complicated, and it's much easier
|
||||
# to just make the linker find libgcc using -L options.
|
||||
if { [string match "*-*-darwin*" $target_triplet] } {
|
||||
lappend options "libs= -shared-libgcc"
|
||||
}
|
||||
|
||||
if { [string match "*-*-openbsd*" $target_triplet] } {
|
||||
lappend options "libs= -lpthread"
|
||||
}
|
||||
|
||||
if { [string match "*-*-freebsd*" $target_triplet] } {
|
||||
lappend options "libs= -lpthread"
|
||||
}
|
||||
|
||||
lappend options "libs= -lffi"
|
||||
|
||||
if { [string match "aarch64*-*-linux*" $target_triplet] } {
|
||||
if { ! [string match "*android*" $target_triplet] } {
|
||||
lappend options "libs= -lpthread"
|
||||
}
|
||||
}
|
||||
|
||||
# this may be required for g++, but just confused clang.
|
||||
if { [string match "*.cc" $source] } {
|
||||
lappend options "c++"
|
||||
if { [string match "*-*-darwin*" $target_triplet] } {
|
||||
if { [string match $compiler_vendor "gnu"] } {
|
||||
lappend options "libs= -lc++"
|
||||
}
|
||||
} elseif { [string match "*android*" $target_triplet] } {
|
||||
lappend options "libs= -lc++"
|
||||
}
|
||||
}
|
||||
|
||||
if { [string match "arc*-*-linux*" $target_triplet] } {
|
||||
lappend options "libs= -lpthread"
|
||||
}
|
||||
}
|
||||
|
||||
# emscripten emits this warning while building the feature test
|
||||
# which causes it to be seen as unsupported.
|
||||
if { [string match "wasm32-*" $target_triplet] } {
|
||||
lappend options "additional_flags=-Wno-unused-command-line-argument"
|
||||
lappend options "libs= -lpthread"
|
||||
}
|
||||
|
||||
verbose "options: $options"
|
||||
return [target_compile $source $dest $type $options]
|
||||
}
|
||||
|
||||
# TEST should be a preprocessor condition. Returns true if it holds.
|
||||
proc libffi_feature_test { test } {
|
||||
set src "ffitest[pid].c"
|
||||
|
||||
set f [open $src "w"]
|
||||
puts $f "#include <ffi.h>"
|
||||
puts $f $test
|
||||
puts $f "/* OK */"
|
||||
puts $f "#else"
|
||||
puts $f "# error Failed $test"
|
||||
puts $f "#endif"
|
||||
puts $f "int main() {return 0;}"
|
||||
close $f
|
||||
|
||||
set lines [libffi_target_compile $src $src.i preprocess ""]
|
||||
file delete $src
|
||||
file delete $src.i
|
||||
|
||||
return [string match "" $lines]
|
||||
}
|
||||
|
||||
# Utility routines.
|
||||
|
||||
#
|
||||
# search_for -- looks for a string match in a file
|
||||
#
|
||||
proc search_for { file pattern } {
|
||||
set fd [open $file r]
|
||||
while { [gets $fd cur_line]>=0 } {
|
||||
if [string match "*$pattern*" $cur_line] then {
|
||||
close $fd
|
||||
return 1
|
||||
}
|
||||
}
|
||||
close $fd
|
||||
return 0
|
||||
}
|
||||
|
||||
# Modified dg-runtest that can cycle through a list of optimization options
|
||||
# as c-torture does.
|
||||
proc libffi-dg-runtest { testcases default-extra-flags } {
|
||||
global runtests
|
||||
|
||||
foreach test $testcases {
|
||||
# If we're only testing specific files and this isn't one of
|
||||
# them, skip it.
|
||||
if ![runtest_file_p $runtests $test] {
|
||||
continue
|
||||
}
|
||||
|
||||
# Look for a loop within the source code - if we don't find one,
|
||||
# don't pass -funroll[-all]-loops.
|
||||
global torture_with_loops torture_without_loops
|
||||
if [expr [search_for $test "for*("]+[search_for $test "while*("]] {
|
||||
set option_list $torture_with_loops
|
||||
} else {
|
||||
set option_list $torture_without_loops
|
||||
}
|
||||
|
||||
set nshort [file tail [file dirname $test]]/[file tail $test]
|
||||
|
||||
foreach flags $option_list {
|
||||
verbose "Testing $nshort, $flags" 1
|
||||
dg-test $test $flags ${default-extra-flags}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
proc run-many-tests { testcases extra_flags } {
|
||||
global compiler_vendor
|
||||
global has_gccbug
|
||||
global env
|
||||
switch $compiler_vendor {
|
||||
"clang" {
|
||||
set common "-W -Wall"
|
||||
if [info exists env(LIBFFI_TEST_OPTIMIZATION)] {
|
||||
set optimizations [ list $env(LIBFFI_TEST_OPTIMIZATION) ]
|
||||
} else {
|
||||
set optimizations { "-O0" "-O2" }
|
||||
}
|
||||
}
|
||||
"gnu" {
|
||||
set common "-W -Wall -Wno-psabi -fno-diagnostics-color"
|
||||
if [info exists env(LIBFFI_TEST_OPTIMIZATION)] {
|
||||
set optimizations [ list $env(LIBFFI_TEST_OPTIMIZATION) ]
|
||||
} else {
|
||||
set optimizations { "-O0" "-O2" }
|
||||
}
|
||||
}
|
||||
default {
|
||||
# Assume we are using the vendor compiler.
|
||||
set common ""
|
||||
if [info exists env(LIBFFI_TEST_OPTIMIZATION)] {
|
||||
set optimizations [ list $env(LIBFFI_TEST_OPTIMIZATION) ]
|
||||
} else {
|
||||
set optimizations { "" }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
info exists env(LD_LIBRARY_PATH)
|
||||
|
||||
set targetabis { "" }
|
||||
if [string match $compiler_vendor "gnu"] {
|
||||
if [libffi_feature_test "#ifdef __i386__"] {
|
||||
set targetabis {
|
||||
""
|
||||
"-DABI_NUM=FFI_STDCALL -DABI_ATTR=__STDCALL__"
|
||||
"-DABI_NUM=FFI_THISCALL -DABI_ATTR=__THISCALL__"
|
||||
"-DABI_NUM=FFI_FASTCALL -DABI_ATTR=__FASTCALL__"
|
||||
}
|
||||
} elseif { [istarget "x86_64-*-*"] \
|
||||
&& [libffi_feature_test "#if !defined __ILP32__ \
|
||||
&& !defined __i386__"] } {
|
||||
set targetabis {
|
||||
""
|
||||
"-DABI_NUM=FFI_GNUW64 -DABI_ATTR=__MSABI__"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set common [ concat $common $extra_flags ]
|
||||
foreach test $testcases {
|
||||
set testname [file tail $test]
|
||||
if [search_for $test "ABI_NUM"] {
|
||||
set abis $targetabis
|
||||
} else {
|
||||
set abis { "" }
|
||||
}
|
||||
foreach opt $optimizations {
|
||||
foreach abi $abis {
|
||||
set options [concat $common $opt $abi]
|
||||
set has_gccbug false;
|
||||
if { [string match $compiler_vendor "gnu"] \
|
||||
&& [string match "*MSABI*" $abi] \
|
||||
&& ( ( [string match "*DGTEST=57 *" $common] \
|
||||
&& [string match "*call.c*" $testname] ) \
|
||||
|| ( [string match "*DGTEST=54 *" $common] \
|
||||
&& [string match "*callback*" $testname] ) \
|
||||
|| [string match "*DGTEST=55 *" $common] \
|
||||
|| [string match "*DGTEST=56 *" $common] ) } then {
|
||||
if [libffi_feature_test "#if (__GNUC__ < 9) || ((__GNUC__ == 9) && (__GNUC_MINOR__ < 3))"] {
|
||||
set has_gccbug true;
|
||||
}
|
||||
}
|
||||
verbose "Testing $testname, $options" 1
|
||||
verbose "has_gccbug = $has_gccbug" 1
|
||||
dg-test $test $options ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Like check_conditional_xfail, but callable from a dg test.
|
||||
|
||||
proc dg-xfail-if { args } {
|
||||
set args [lreplace $args 0 0]
|
||||
set selector "target [join [lindex $args 1]]"
|
||||
if { [dg-process-target $selector] == "S" } {
|
||||
global compiler_conditional_xfail_data
|
||||
set compiler_conditional_xfail_data $args
|
||||
}
|
||||
}
|
||||
|
||||
proc check-flags { args } {
|
||||
|
||||
# The args are within another list; pull them out.
|
||||
set args [lindex $args 0]
|
||||
|
||||
# The next two arguments are optional. If they were not specified,
|
||||
# use the defaults.
|
||||
if { [llength $args] == 2 } {
|
||||
lappend $args [list "*"]
|
||||
}
|
||||
if { [llength $args] == 3 } {
|
||||
lappend $args [list ""]
|
||||
}
|
||||
|
||||
# If the option strings are the defaults, or the same as the
|
||||
# defaults, there is no need to call check_conditional_xfail to
|
||||
# compare them to the actual options.
|
||||
if { [string compare [lindex $args 2] "*"] == 0
|
||||
&& [string compare [lindex $args 3] "" ] == 0 } {
|
||||
set result 1
|
||||
} else {
|
||||
# The target list might be an effective-target keyword, so replace
|
||||
# the original list with "*-*-*", since we already know it matches.
|
||||
set result [check_conditional_xfail [lreplace $args 1 1 "*-*-*"]]
|
||||
}
|
||||
|
||||
return $result
|
||||
}
|
||||
|
||||
proc dg-skip-if { args } {
|
||||
# Verify the number of arguments. The last two are optional.
|
||||
set args [lreplace $args 0 0]
|
||||
if { [llength $args] < 2 || [llength $args] > 4 } {
|
||||
error "dg-skip-if 2: need 2, 3, or 4 arguments"
|
||||
}
|
||||
|
||||
# Don't bother if we're already skipping the test.
|
||||
upvar dg-do-what dg-do-what
|
||||
if { [lindex ${dg-do-what} 1] == "N" } {
|
||||
return
|
||||
}
|
||||
|
||||
set selector [list target [lindex $args 1]]
|
||||
if { [dg-process-target $selector] == "S" } {
|
||||
if [check-flags $args] {
|
||||
upvar dg-do-what dg-do-what
|
||||
set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# We need to make sure that additional_files and additional_sources
|
||||
# are both cleared out after every test. It is not enough to clear
|
||||
# them out *before* the next test run because gcc-target-compile gets
|
||||
# run directly from some .exp files (outside of any test). (Those
|
||||
# uses should eventually be eliminated.)
|
||||
|
||||
# Because the DG framework doesn't provide a hook that is run at the
|
||||
# end of a test, we must replace dg-test with a wrapper.
|
||||
|
||||
if { [info procs saved-dg-test] == [list] } {
|
||||
rename dg-test saved-dg-test
|
||||
|
||||
proc dg-test { args } {
|
||||
global additional_files
|
||||
global additional_sources
|
||||
global errorInfo
|
||||
|
||||
if { [ catch { eval saved-dg-test $args } errmsg ] } {
|
||||
set saved_info $errorInfo
|
||||
set additional_files ""
|
||||
set additional_sources ""
|
||||
error $errmsg $saved_info
|
||||
}
|
||||
set additional_files ""
|
||||
set additional_sources ""
|
||||
}
|
||||
}
|
||||
|
||||
# Local Variables:
|
||||
# tcl-indent-level:4
|
||||
# End:
|
||||
+283
@@ -0,0 +1,283 @@
|
||||
# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GCC; see the file COPYING3. If not see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
|
||||
# This file was contributed by John David Anglin (dave.anglin@nrc-cnrc.gc.ca)
|
||||
|
||||
set orig_environment_saved 0
|
||||
set orig_ld_library_path_saved 0
|
||||
set orig_ld_run_path_saved 0
|
||||
set orig_shlib_path_saved 0
|
||||
set orig_ld_libraryn32_path_saved 0
|
||||
set orig_ld_library64_path_saved 0
|
||||
set orig_ld_library_path_32_saved 0
|
||||
set orig_ld_library_path_64_saved 0
|
||||
set orig_dyld_library_path_saved 0
|
||||
set orig_path_saved 0
|
||||
|
||||
#######################################
|
||||
# proc set_ld_library_path_env_vars { }
|
||||
#######################################
|
||||
|
||||
proc set_ld_library_path_env_vars { } {
|
||||
global ld_library_path
|
||||
global orig_environment_saved
|
||||
global orig_ld_library_path_saved
|
||||
global orig_ld_run_path_saved
|
||||
global orig_shlib_path_saved
|
||||
global orig_ld_libraryn32_path_saved
|
||||
global orig_ld_library64_path_saved
|
||||
global orig_ld_library_path_32_saved
|
||||
global orig_ld_library_path_64_saved
|
||||
global orig_dyld_library_path_saved
|
||||
global orig_path_saved
|
||||
global orig_ld_library_path
|
||||
global orig_ld_run_path
|
||||
global orig_shlib_path
|
||||
global orig_ld_libraryn32_path
|
||||
global orig_ld_library64_path
|
||||
global orig_ld_library_path_32
|
||||
global orig_ld_library_path_64
|
||||
global orig_dyld_library_path
|
||||
global orig_path
|
||||
global GCC_EXEC_PREFIX
|
||||
|
||||
# Set the relocated compiler prefix, but only if the user hasn't specified one.
|
||||
if { [info exists GCC_EXEC_PREFIX] && ![info exists env(GCC_EXEC_PREFIX)] } {
|
||||
setenv GCC_EXEC_PREFIX "$GCC_EXEC_PREFIX"
|
||||
}
|
||||
|
||||
# Setting the ld library path causes trouble when testing cross-compilers.
|
||||
if { [is_remote target] } {
|
||||
return
|
||||
}
|
||||
|
||||
if { $orig_environment_saved == 0 } {
|
||||
global env
|
||||
|
||||
set orig_environment_saved 1
|
||||
|
||||
# Save the original environment.
|
||||
if [info exists env(LD_LIBRARY_PATH)] {
|
||||
set orig_ld_library_path "$env(LD_LIBRARY_PATH)"
|
||||
set orig_ld_library_path_saved 1
|
||||
}
|
||||
if [info exists env(LD_RUN_PATH)] {
|
||||
set orig_ld_run_path "$env(LD_RUN_PATH)"
|
||||
set orig_ld_run_path_saved 1
|
||||
}
|
||||
if [info exists env(SHLIB_PATH)] {
|
||||
set orig_shlib_path "$env(SHLIB_PATH)"
|
||||
set orig_shlib_path_saved 1
|
||||
}
|
||||
if [info exists env(LD_LIBRARYN32_PATH)] {
|
||||
set orig_ld_libraryn32_path "$env(LD_LIBRARYN32_PATH)"
|
||||
set orig_ld_libraryn32_path_saved 1
|
||||
}
|
||||
if [info exists env(LD_LIBRARY64_PATH)] {
|
||||
set orig_ld_library64_path "$env(LD_LIBRARY64_PATH)"
|
||||
set orig_ld_library64_path_saved 1
|
||||
}
|
||||
if [info exists env(LD_LIBRARY_PATH_32)] {
|
||||
set orig_ld_library_path_32 "$env(LD_LIBRARY_PATH_32)"
|
||||
set orig_ld_library_path_32_saved 1
|
||||
}
|
||||
if [info exists env(LD_LIBRARY_PATH_64)] {
|
||||
set orig_ld_library_path_64 "$env(LD_LIBRARY_PATH_64)"
|
||||
set orig_ld_library_path_64_saved 1
|
||||
}
|
||||
if [info exists env(DYLD_LIBRARY_PATH)] {
|
||||
set orig_dyld_library_path "$env(DYLD_LIBRARY_PATH)"
|
||||
set orig_dyld_library_path_saved 1
|
||||
}
|
||||
if [info exists env(PATH)] {
|
||||
set orig_path "$env(PATH)"
|
||||
set orig_path_saved 1
|
||||
}
|
||||
}
|
||||
|
||||
# We need to set ld library path in the environment. Currently,
|
||||
# unix.exp doesn't set the environment correctly for all systems.
|
||||
# It only sets SHLIB_PATH and LD_LIBRARY_PATH when it executes a
|
||||
# program. We also need the environment set for compilations, etc.
|
||||
#
|
||||
# On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but
|
||||
# called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH
|
||||
# (for the 64-bit ABI). The same applies to Darwin (DYLD_LIBRARY_PATH),
|
||||
# Solaris 32 bit (LD_LIBRARY_PATH_32), Solaris 64 bit (LD_LIBRARY_PATH_64),
|
||||
# and HP-UX (SHLIB_PATH). In some cases, the variables are independent
|
||||
# of LD_LIBRARY_PATH, and in other cases LD_LIBRARY_PATH is used if the
|
||||
# variable is not defined.
|
||||
#
|
||||
# Doing this is somewhat of a hack as ld_library_path gets repeated in
|
||||
# SHLIB_PATH and LD_LIBRARY_PATH when unix_load sets these variables.
|
||||
if { $orig_ld_library_path_saved } {
|
||||
setenv LD_LIBRARY_PATH "$ld_library_path:$orig_ld_library_path"
|
||||
} else {
|
||||
setenv LD_LIBRARY_PATH "$ld_library_path"
|
||||
}
|
||||
if { $orig_ld_run_path_saved } {
|
||||
setenv LD_RUN_PATH "$ld_library_path:$orig_ld_run_path"
|
||||
} else {
|
||||
setenv LD_RUN_PATH "$ld_library_path"
|
||||
}
|
||||
# The default shared library dynamic path search for 64-bit
|
||||
# HP-UX executables searches LD_LIBRARY_PATH before SHLIB_PATH.
|
||||
# LD_LIBRARY_PATH isn't used for 32-bit executables. Thus, we
|
||||
# set LD_LIBRARY_PATH and SHLIB_PATH as if they were independent.
|
||||
if { $orig_shlib_path_saved } {
|
||||
setenv SHLIB_PATH "$ld_library_path:$orig_shlib_path"
|
||||
} else {
|
||||
setenv SHLIB_PATH "$ld_library_path"
|
||||
}
|
||||
if { $orig_ld_libraryn32_path_saved } {
|
||||
setenv LD_LIBRARYN32_PATH "$ld_library_path:$orig_ld_libraryn32_path"
|
||||
} elseif { $orig_ld_library_path_saved } {
|
||||
setenv LD_LIBRARYN32_PATH "$ld_library_path:$orig_ld_library_path"
|
||||
} else {
|
||||
setenv LD_LIBRARYN32_PATH "$ld_library_path"
|
||||
}
|
||||
if { $orig_ld_library64_path_saved } {
|
||||
setenv LD_LIBRARY64_PATH "$ld_library_path:$orig_ld_library64_path"
|
||||
} elseif { $orig_ld_library_path_saved } {
|
||||
setenv LD_LIBRARY64_PATH "$ld_library_path:$orig_ld_library_path"
|
||||
} else {
|
||||
setenv LD_LIBRARY64_PATH "$ld_library_path"
|
||||
}
|
||||
if { $orig_ld_library_path_32_saved } {
|
||||
setenv LD_LIBRARY_PATH_32 "$ld_library_path:$orig_ld_library_path_32"
|
||||
} elseif { $orig_ld_library_path_saved } {
|
||||
setenv LD_LIBRARY_PATH_32 "$ld_library_path:$orig_ld_library_path"
|
||||
} else {
|
||||
setenv LD_LIBRARY_PATH_32 "$ld_library_path"
|
||||
}
|
||||
if { $orig_ld_library_path_64_saved } {
|
||||
setenv LD_LIBRARY_PATH_64 "$ld_library_path:$orig_ld_library_path_64"
|
||||
} elseif { $orig_ld_library_path_saved } {
|
||||
setenv LD_LIBRARY_PATH_64 "$ld_library_path:$orig_ld_library_path"
|
||||
} else {
|
||||
setenv LD_LIBRARY_PATH_64 "$ld_library_path"
|
||||
}
|
||||
if { $orig_dyld_library_path_saved } {
|
||||
setenv DYLD_LIBRARY_PATH "$ld_library_path:$orig_dyld_library_path"
|
||||
} else {
|
||||
setenv DYLD_LIBRARY_PATH "$ld_library_path"
|
||||
}
|
||||
if { [istarget *-*-cygwin*] || [ istarget *-*-msys* ] || [istarget *-*-mingw*] } {
|
||||
if { $orig_path_saved } {
|
||||
setenv PATH "$ld_library_path:$orig_path"
|
||||
} else {
|
||||
setenv PATH "$ld_library_path"
|
||||
}
|
||||
}
|
||||
|
||||
verbose -log "set_ld_library_path_env_vars: ld_library_path=$ld_library_path"
|
||||
}
|
||||
|
||||
#######################################
|
||||
# proc restore_ld_library_path_env_vars { }
|
||||
#######################################
|
||||
|
||||
proc restore_ld_library_path_env_vars { } {
|
||||
global orig_environment_saved
|
||||
global orig_ld_library_path_saved
|
||||
global orig_ld_run_path_saved
|
||||
global orig_shlib_path_saved
|
||||
global orig_ld_libraryn32_path_saved
|
||||
global orig_ld_library64_path_saved
|
||||
global orig_ld_library_path_32_saved
|
||||
global orig_ld_library_path_64_saved
|
||||
global orig_dyld_library_path_saved
|
||||
global orig_path_saved
|
||||
global orig_ld_library_path
|
||||
global orig_ld_run_path
|
||||
global orig_shlib_path
|
||||
global orig_ld_libraryn32_path
|
||||
global orig_ld_library64_path
|
||||
global orig_ld_library_path_32
|
||||
global orig_ld_library_path_64
|
||||
global orig_dyld_library_path
|
||||
global orig_path
|
||||
|
||||
if { $orig_environment_saved == 0 } {
|
||||
return
|
||||
}
|
||||
|
||||
if { $orig_ld_library_path_saved } {
|
||||
setenv LD_LIBRARY_PATH "$orig_ld_library_path"
|
||||
} elseif [info exists env(LD_LIBRARY_PATH)] {
|
||||
unsetenv LD_LIBRARY_PATH
|
||||
}
|
||||
if { $orig_ld_run_path_saved } {
|
||||
setenv LD_RUN_PATH "$orig_ld_run_path"
|
||||
} elseif [info exists env(LD_RUN_PATH)] {
|
||||
unsetenv LD_RUN_PATH
|
||||
}
|
||||
if { $orig_shlib_path_saved } {
|
||||
setenv SHLIB_PATH "$orig_shlib_path"
|
||||
} elseif [info exists env(SHLIB_PATH)] {
|
||||
unsetenv SHLIB_PATH
|
||||
}
|
||||
if { $orig_ld_libraryn32_path_saved } {
|
||||
setenv LD_LIBRARYN32_PATH "$orig_ld_libraryn32_path"
|
||||
} elseif [info exists env(LD_LIBRARYN32_PATH)] {
|
||||
unsetenv LD_LIBRARYN32_PATH
|
||||
}
|
||||
if { $orig_ld_library64_path_saved } {
|
||||
setenv LD_LIBRARY64_PATH "$orig_ld_library64_path"
|
||||
} elseif [info exists env(LD_LIBRARY64_PATH)] {
|
||||
unsetenv LD_LIBRARY64_PATH
|
||||
}
|
||||
if { $orig_ld_library_path_32_saved } {
|
||||
setenv LD_LIBRARY_PATH_32 "$orig_ld_library_path_32"
|
||||
} elseif [info exists env(LD_LIBRARY_PATH_32)] {
|
||||
unsetenv LD_LIBRARY_PATH_32
|
||||
}
|
||||
if { $orig_ld_library_path_64_saved } {
|
||||
setenv LD_LIBRARY_PATH_64 "$orig_ld_library_path_64"
|
||||
} elseif [info exists env(LD_LIBRARY_PATH_64)] {
|
||||
unsetenv LD_LIBRARY_PATH_64
|
||||
}
|
||||
if { $orig_dyld_library_path_saved } {
|
||||
setenv DYLD_LIBRARY_PATH "$orig_dyld_library_path"
|
||||
} elseif [info exists env(DYLD_LIBRARY_PATH)] {
|
||||
unsetenv DYLD_LIBRARY_PATH
|
||||
}
|
||||
if { $orig_path_saved } {
|
||||
setenv PATH "$orig_path"
|
||||
} elseif [info exists env(PATH)] {
|
||||
unsetenv PATH
|
||||
}
|
||||
}
|
||||
|
||||
#######################################
|
||||
# proc get_shlib_extension { }
|
||||
#######################################
|
||||
|
||||
proc get_shlib_extension { } {
|
||||
global shlib_ext
|
||||
|
||||
if { [ istarget *-*-darwin* ] } {
|
||||
set shlib_ext "dylib"
|
||||
} elseif { [ istarget *-*-cygwin* ] || [ istarget *-*-msys* ] || [ istarget *-*-mingw* ] } {
|
||||
set shlib_ext "dll"
|
||||
} elseif { [ istarget hppa*-*-hpux* ] } {
|
||||
set shlib_ext "sl"
|
||||
} else {
|
||||
set shlib_ext "so"
|
||||
}
|
||||
return $shlib_ext
|
||||
}
|
||||
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
# Copyright (C) 2004, 2007 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GCC; see the file COPYING3. If not see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
|
||||
# This file contains GCC-specifics for status wrappers for test programs.
|
||||
|
||||
# ${tool}_maybe_build_wrapper -- Build wrapper object if the target
|
||||
# needs it. FILENAME is the path to the wrapper file. If there are
|
||||
# additional arguments, they are command-line options to provide to
|
||||
# the compiler when compiling FILENAME.
|
||||
|
||||
proc ${tool}_maybe_build_wrapper { filename args } {
|
||||
global gluefile wrap_flags
|
||||
|
||||
if { [target_info needs_status_wrapper] != "" \
|
||||
&& [target_info needs_status_wrapper] != "0" \
|
||||
&& ![info exists gluefile] } {
|
||||
set saved_wrap_compile_flags [target_info wrap_compile_flags]
|
||||
set flags [join $args " "]
|
||||
# The wrapper code may contain code that gcc objects on. This
|
||||
# became true for dejagnu-1.4.4. The set of warnings and code
|
||||
# that gcc objects on may change, so just make sure -w is always
|
||||
# passed to turn off all warnings.
|
||||
set_currtarget_info wrap_compile_flags \
|
||||
"$saved_wrap_compile_flags -w $flags"
|
||||
set result [build_wrapper $filename]
|
||||
set_currtarget_info wrap_compile_flags "$saved_wrap_compile_flags"
|
||||
if { $result != "" } {
|
||||
set gluefile [lindex $result 0]
|
||||
set wrap_flags [lindex $result 1]
|
||||
}
|
||||
}
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
CC = gcc
|
||||
CFLAGS = -O2 -Wall
|
||||
prefix =
|
||||
includedir = $(prefix)/include
|
||||
libdir = $(prefix)/lib
|
||||
CPPFLAGS = -I$(includedir)
|
||||
LDFLAGS = -L$(libdir) -Wl,-rpath,$(libdir)
|
||||
|
||||
all: check-call check-callback
|
||||
|
||||
test-call: test-call.c testcases.c
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o test-call test-call.c -lffi
|
||||
|
||||
test-callback: test-callback.c testcases.c
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o test-callback test-callback.c -lffi
|
||||
|
||||
check-call: test-call
|
||||
./test-call > test-call.out
|
||||
LC_ALL=C uniq -u < test-call.out > failed-call
|
||||
test '!' -s failed-call
|
||||
|
||||
check-callback: test-callback
|
||||
./test-callback > test-callback.out
|
||||
LC_ALL=C uniq -u < test-callback.out > failed-callback
|
||||
test '!' -s failed-callback
|
||||
|
||||
clean:
|
||||
rm -f test-call test-callback test-call.out test-callback.out failed-call failed-callback
|
||||
Loaded 100 of 331 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user