Compare commits
6 Commits
libffi-3.3
...
libffi-3.4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
16fad4855b | ||
|
|
35a5081d07 | ||
|
|
82244f9715 | ||
|
|
d160812995 | ||
|
|
68f488bcf4 | ||
|
|
ed22026f39 |
@@ -1,50 +0,0 @@
|
|||||||
shallow_clone: true
|
|
||||||
|
|
||||||
# We're currently only testing 64-bit libffi built with Microsoft's
|
|
||||||
# tools.
|
|
||||||
# This matrix should be expanded to include at least:
|
|
||||||
# 32- and 64-bit gcc/cygwin
|
|
||||||
# 32- and 64-bit gcc/mingw
|
|
||||||
# 32- and 64-bit clang/mingw
|
|
||||||
# and perhaps more.
|
|
||||||
|
|
||||||
image: Visual Studio 2013
|
|
||||||
platform:
|
|
||||||
- x64
|
|
||||||
|
|
||||||
environment:
|
|
||||||
global:
|
|
||||||
CYG_ROOT: C:/cygwin
|
|
||||||
CYG_CACHE: C:/cygwin/var/cache/setup
|
|
||||||
CYG_MIRROR: http://mirrors.kernel.org/sourceware/cygwin/
|
|
||||||
matrix:
|
|
||||||
- VSVER: 12
|
|
||||||
|
|
||||||
install:
|
|
||||||
- ps: >-
|
|
||||||
If ($env:Platform -Match "x86") {
|
|
||||||
$env:VCVARS_PLATFORM="x86"
|
|
||||||
$env:BUILD="x86-pc-cygwin"
|
|
||||||
$env:HOST="x86-pc-windows"
|
|
||||||
} Else {
|
|
||||||
$env:VCVARS_PLATFORM="amd64"
|
|
||||||
$env:BUILD="x86_64-w64-cygwin"
|
|
||||||
$env:HOST="x86_64-w64-cygwin"
|
|
||||||
}
|
|
||||||
- 'appveyor DownloadFile https://cygwin.com/setup-x86.exe -FileName setup.exe'
|
|
||||||
- 'setup.exe -qnNdO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_CACHE%" -P dejagnu >NUL'
|
|
||||||
- '%CYG_ROOT%/bin/bash -lc "cygcheck -dc cygwin"'
|
|
||||||
- ps: $env:VSCOMNTOOLS=(Get-Content ("env:VS" + "$env:VSVER" + "0COMNTOOLS"))
|
|
||||||
- echo "Using Visual Studio %VSVER%.0 at %VSCOMNTOOLS%"
|
|
||||||
- call "%VSCOMNTOOLS%\..\..\VC\vcvarsall.bat" %VCVARS_PLATFORM%
|
|
||||||
|
|
||||||
build_script:
|
|
||||||
- c:\cygwin\bin\sh -lc "(cd $OLDPWD; ./autogen.sh;)"
|
|
||||||
- c:\cygwin\bin\sh -lc "(cd $OLDPWD; ./configure CC='/cygdrive/c/projects/libffi/msvcc.sh -m64' CXX='/cygdrive/c/projects/libffi/msvcc.sh -m64' LD='link' CPP='cl -nologo -EP' CXXCPP='cl -nologo -EP' CPPFLAGS='-DFFI_BUILDING_DLL' AR='/cygdrive/c/projects/libffi/.travis/ar-lib lib' NM='dumpbin -symbols' STRIP=':' --build=$BUILD --host=$HOST;)"
|
|
||||||
- c:\cygwin\bin\sh -lc "(cd $OLDPWD; cp src/x86/ffitarget.h include; make; find .;)"
|
|
||||||
- c:\cygwin\bin\sh -lc "(cd $OLDPWD; cp `find . -name 'libffi-?.dll'` $HOST/testsuite/; make check; cat `find ./ -name libffi.log`)"
|
|
||||||
|
|
||||||
# FIXME: "make check" currently fails. It just looks like msvcc needs
|
|
||||||
# to learn about -L and -l options. If you add "make check; cat `find
|
|
||||||
# ./ -name libffi.log" to the end of that build command you'll see
|
|
||||||
# what I mean.
|
|
||||||
10
.github/issue_template.md
vendored
10
.github/issue_template.md
vendored
@@ -1,10 +0,0 @@
|
|||||||
## System Details
|
|
||||||
|
|
||||||
<!--- What platform are you working with? eg. the output of config.guess -->
|
|
||||||
<!--- Provide any toolchain details here. eg. compiler version -->
|
|
||||||
|
|
||||||
## Problems Description
|
|
||||||
|
|
||||||
<!--- Provide a description of the problem here -->
|
|
||||||
<!--- If this is a configure-time problem, attach config.log -->
|
|
||||||
<!--- If this is a testsuite problem, attach the relevant log output -->
|
|
||||||
38
.gitignore
vendored
38
.gitignore
vendored
@@ -1,38 +0,0 @@
|
|||||||
.libs
|
|
||||||
.deps
|
|
||||||
*.o
|
|
||||||
*.lo
|
|
||||||
.dirstamp
|
|
||||||
*.la
|
|
||||||
Makefile
|
|
||||||
!testsuite/libffi.bhaible/Makefile
|
|
||||||
Makefile.in
|
|
||||||
aclocal.m4
|
|
||||||
compile
|
|
||||||
!.travis/compile
|
|
||||||
configure
|
|
||||||
depcomp
|
|
||||||
doc/libffi.info
|
|
||||||
*~
|
|
||||||
fficonfig.h.in
|
|
||||||
fficonfig.h
|
|
||||||
include/ffi.h
|
|
||||||
include/ffitarget.h
|
|
||||||
install-sh
|
|
||||||
libffi.pc
|
|
||||||
libtool
|
|
||||||
libtool-ldflags
|
|
||||||
ltmain.sh
|
|
||||||
m4/libtool.m4
|
|
||||||
m4/lt*.m4
|
|
||||||
mdate-sh
|
|
||||||
missing
|
|
||||||
stamp-h1
|
|
||||||
libffi*gz
|
|
||||||
autom4te.cache
|
|
||||||
libffi.xcodeproj/xcuserdata
|
|
||||||
libffi.xcodeproj/project.xcworkspace
|
|
||||||
build_*/
|
|
||||||
darwin_*/
|
|
||||||
src/arm/trampoline.S
|
|
||||||
**/texinfo.tex
|
|
||||||
34
.travis.yml
34
.travis.yml
@@ -1,34 +0,0 @@
|
|||||||
---
|
|
||||||
sudo: required
|
|
||||||
|
|
||||||
language: cpp
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- os: osx
|
|
||||||
env: HOST=arm-apple-darwin
|
|
||||||
- os: linux
|
|
||||||
compiler: gcc
|
|
||||||
env: HOST=i386-pc-linux-gnu MEVAL='export CC="$CC -m32" && CXX="$CXX -m32"'
|
|
||||||
- os: linux
|
|
||||||
compiler: gcc
|
|
||||||
- os: linux
|
|
||||||
compiler: gcc
|
|
||||||
env: CONFIGURE_OPTIONS=--disable-shared
|
|
||||||
- os: linux
|
|
||||||
compiler: clang
|
|
||||||
- os: linux
|
|
||||||
compiler: clang
|
|
||||||
env: CONFIGURE_OPTIONS=--disable-shared
|
|
||||||
- os: linux
|
|
||||||
env: HOST=moxie-elf MEVAL='export PATH=/opt/moxielogic/bin:$PATH && CC=moxie-elf-gcc && CXX=moxie-elf-g++' LDFLAGS=-Tsim.ld RUNTESTFLAGS="--target_board moxie-sim" DEJAGNU="$TRAVIS_BUILD_DIR/.travis/site.exp"
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- if test x"$MEVAL" != x; then eval ${MEVAL}; fi
|
|
||||||
|
|
||||||
install:
|
|
||||||
- ./.travis/install.sh
|
|
||||||
|
|
||||||
script:
|
|
||||||
- if ! test x"$MEVAL" = x; then eval ${MEVAL}; fi
|
|
||||||
- ./.travis/build.sh
|
|
||||||
270
.travis/ar-lib
270
.travis/ar-lib
@@ -1,270 +0,0 @@
|
|||||||
#! /bin/sh
|
|
||||||
# Wrapper for Microsoft lib.exe
|
|
||||||
|
|
||||||
me=ar-lib
|
|
||||||
scriptversion=2012-03-01.08; # UTC
|
|
||||||
|
|
||||||
# Copyright (C) 2010-2018 Free Software Foundation, Inc.
|
|
||||||
# Written by Peter Rosin <peda@lysator.liu.se>.
|
|
||||||
#
|
|
||||||
# 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>.
|
|
||||||
|
|
||||||
|
|
||||||
# func_error message
|
|
||||||
func_error ()
|
|
||||||
{
|
|
||||||
echo "$me: $1" 1>&2
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
file_conv=
|
|
||||||
|
|
||||||
# func_file_conv build_file
|
|
||||||
# Convert a $build file to $host form and store it in $file
|
|
||||||
# Currently only supports Windows hosts.
|
|
||||||
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*)
|
|
||||||
file_conv=cygwin
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
file_conv=wine
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
case $file_conv in
|
|
||||||
mingw)
|
|
||||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
|
||||||
;;
|
|
||||||
cygwin)
|
|
||||||
file=`cygpath -m "$file" || echo "$file"`
|
|
||||||
;;
|
|
||||||
wine)
|
|
||||||
file=`winepath -w "$file" || echo "$file"`
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
# func_at_file at_file operation archive
|
|
||||||
# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE
|
|
||||||
# for each of them.
|
|
||||||
# When interpreting the content of the @FILE, do NOT use func_file_conv,
|
|
||||||
# since the user would need to supply preconverted file names to
|
|
||||||
# binutils ar, at least for MinGW.
|
|
||||||
func_at_file ()
|
|
||||||
{
|
|
||||||
operation=$2
|
|
||||||
archive=$3
|
|
||||||
at_file_contents=`cat "$1"`
|
|
||||||
eval set x "$at_file_contents"
|
|
||||||
shift
|
|
||||||
|
|
||||||
for member
|
|
||||||
do
|
|
||||||
$AR -NOLOGO $operation:"$member" "$archive" || exit $?
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
case $1 in
|
|
||||||
'')
|
|
||||||
func_error "no command. Try '$0 --help' for more information."
|
|
||||||
;;
|
|
||||||
-h | --h*)
|
|
||||||
cat <<EOF
|
|
||||||
Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...]
|
|
||||||
|
|
||||||
Members may be specified in a file named with @FILE.
|
|
||||||
EOF
|
|
||||||
exit $?
|
|
||||||
;;
|
|
||||||
-v | --v*)
|
|
||||||
echo "$me, version $scriptversion"
|
|
||||||
exit $?
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if test $# -lt 3; then
|
|
||||||
func_error "you must specify a program, an action and an archive"
|
|
||||||
fi
|
|
||||||
|
|
||||||
AR=$1
|
|
||||||
shift
|
|
||||||
while :
|
|
||||||
do
|
|
||||||
if test $# -lt 2; then
|
|
||||||
func_error "you must specify a program, an action and an archive"
|
|
||||||
fi
|
|
||||||
case $1 in
|
|
||||||
-lib | -LIB \
|
|
||||||
| -ltcg | -LTCG \
|
|
||||||
| -machine* | -MACHINE* \
|
|
||||||
| -subsystem* | -SUBSYSTEM* \
|
|
||||||
| -verbose | -VERBOSE \
|
|
||||||
| -wx* | -WX* )
|
|
||||||
AR="$AR $1"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
action=$1
|
|
||||||
shift
|
|
||||||
break
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
orig_archive=$1
|
|
||||||
shift
|
|
||||||
func_file_conv "$orig_archive"
|
|
||||||
archive=$file
|
|
||||||
|
|
||||||
# strip leading dash in $action
|
|
||||||
action=${action#-}
|
|
||||||
|
|
||||||
delete=
|
|
||||||
extract=
|
|
||||||
list=
|
|
||||||
quick=
|
|
||||||
replace=
|
|
||||||
index=
|
|
||||||
create=
|
|
||||||
|
|
||||||
while test -n "$action"
|
|
||||||
do
|
|
||||||
case $action in
|
|
||||||
d*) delete=yes ;;
|
|
||||||
x*) extract=yes ;;
|
|
||||||
t*) list=yes ;;
|
|
||||||
q*) quick=yes ;;
|
|
||||||
r*) replace=yes ;;
|
|
||||||
s*) index=yes ;;
|
|
||||||
S*) ;; # the index is always updated implicitly
|
|
||||||
c*) create=yes ;;
|
|
||||||
u*) ;; # TODO: don't ignore the update modifier
|
|
||||||
v*) ;; # TODO: don't ignore the verbose modifier
|
|
||||||
*)
|
|
||||||
func_error "unknown action specified"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
action=${action#?}
|
|
||||||
done
|
|
||||||
|
|
||||||
case $delete$extract$list$quick$replace,$index in
|
|
||||||
yes,* | ,yes)
|
|
||||||
;;
|
|
||||||
yesyes*)
|
|
||||||
func_error "more than one action specified"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
func_error "no action specified"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if test -n "$delete"; then
|
|
||||||
if test ! -f "$orig_archive"; then
|
|
||||||
func_error "archive not found"
|
|
||||||
fi
|
|
||||||
for member
|
|
||||||
do
|
|
||||||
case $1 in
|
|
||||||
@*)
|
|
||||||
func_at_file "${1#@}" -REMOVE "$archive"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
func_file_conv "$1"
|
|
||||||
$AR -NOLOGO -REMOVE:"$file" "$archive" || exit $?
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
elif test -n "$extract"; then
|
|
||||||
if test ! -f "$orig_archive"; then
|
|
||||||
func_error "archive not found"
|
|
||||||
fi
|
|
||||||
if test $# -gt 0; then
|
|
||||||
for member
|
|
||||||
do
|
|
||||||
case $1 in
|
|
||||||
@*)
|
|
||||||
func_at_file "${1#@}" -EXTRACT "$archive"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
func_file_conv "$1"
|
|
||||||
$AR -NOLOGO -EXTRACT:"$file" "$archive" || exit $?
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
else
|
|
||||||
$AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member
|
|
||||||
do
|
|
||||||
$AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
elif test -n "$quick$replace"; then
|
|
||||||
if test ! -f "$orig_archive"; then
|
|
||||||
if test -z "$create"; then
|
|
||||||
echo "$me: creating $orig_archive"
|
|
||||||
fi
|
|
||||||
orig_archive=
|
|
||||||
else
|
|
||||||
orig_archive=$archive
|
|
||||||
fi
|
|
||||||
|
|
||||||
for member
|
|
||||||
do
|
|
||||||
case $1 in
|
|
||||||
@*)
|
|
||||||
func_file_conv "${1#@}"
|
|
||||||
set x "$@" "@$file"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
func_file_conv "$1"
|
|
||||||
set x "$@" "$file"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
shift
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
|
|
||||||
if test -n "$orig_archive"; then
|
|
||||||
$AR -NOLOGO -OUT:"$archive" "$orig_archive" "$@" || exit $?
|
|
||||||
else
|
|
||||||
$AR -NOLOGO -OUT:"$archive" "$@" || exit $?
|
|
||||||
fi
|
|
||||||
|
|
||||||
elif test -n "$list"; then
|
|
||||||
if test ! -f "$orig_archive"; then
|
|
||||||
func_error "archive not found"
|
|
||||||
fi
|
|
||||||
$AR -NOLOGO -LIST "$archive" || exit $?
|
|
||||||
fi
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# exit this script if any commmand fails
|
|
||||||
# set -e
|
|
||||||
|
|
||||||
function build_linux()
|
|
||||||
{
|
|
||||||
./autogen.sh
|
|
||||||
./configure ${HOST+--host=$HOST} ${CONFIGURE_OPTIONS}
|
|
||||||
make
|
|
||||||
make dist
|
|
||||||
make check RUNTESTFLAGS="-a $RUNTESTFLAGS"
|
|
||||||
cat */testsuite/libffi.log
|
|
||||||
}
|
|
||||||
|
|
||||||
function build_ios()
|
|
||||||
{
|
|
||||||
which python
|
|
||||||
# export PYTHON_BIN=/usr/local/bin/python
|
|
||||||
./generate-darwin-source-and-headers.py
|
|
||||||
xcodebuild -showsdks
|
|
||||||
xcodebuild -project libffi.xcodeproj -target "libffi-iOS" -configuration Release -sdk iphoneos10.3
|
|
||||||
find ./
|
|
||||||
}
|
|
||||||
|
|
||||||
./autogen.sh
|
|
||||||
case "$HOST" in
|
|
||||||
arm-apple-darwin*)
|
|
||||||
build_ios
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
build_linux
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -x
|
|
||||||
|
|
||||||
if [[ $TRAVIS_OS_NAME != 'linux' ]]; then
|
|
||||||
brew update
|
|
||||||
# fix an issue with libtool on travis by reinstalling it
|
|
||||||
brew uninstall libtool;
|
|
||||||
brew install libtool dejagnu;
|
|
||||||
else
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install dejagnu texinfo
|
|
||||||
case "$HOST" in
|
|
||||||
i386-pc-linux-gnu)
|
|
||||||
sudo apt-get install gcc-multilib g++-multilib
|
|
||||||
;;
|
|
||||||
moxie-elf)
|
|
||||||
echo 'deb http://repos.moxielogic.org:7114/MoxieLogic moxiedev main' | sudo tee -a /etc/apt/sources.list
|
|
||||||
sudo apt-get update -qq
|
|
||||||
sudo apt-get install -y --allow-unauthenticated moxielogic-moxie-elf-gcc moxielogic-moxie-elf-gcc-c++ moxielogic-moxie-elf-gcc-libstdc++ moxielogic-moxie-elf-gdb-sim
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
# Copyright (C) 2010 Free Software Foundation, Inc.
|
|
||||||
#
|
|
||||||
# This file is part of DejaGnu.
|
|
||||||
#
|
|
||||||
# DejaGnu 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 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# DejaGnu 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 DejaGnu; if not, write to the Free Software Foundation,
|
|
||||||
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
|
|
||||||
# This is a list of toolchains that are supported on this board.
|
|
||||||
set_board_info target_install {moxie-elf}
|
|
||||||
|
|
||||||
# Load the generic configuration for this board. This will define a basic set
|
|
||||||
# of routines needed by the tool to communicate with the board.
|
|
||||||
load_generic_config "sim"
|
|
||||||
|
|
||||||
# basic-sim.exp is a basic description for the standard Cygnus simulator.
|
|
||||||
load_base_board_description "basic-sim"
|
|
||||||
|
|
||||||
# "moxie" is the name of the sim subdir in devo/sim.
|
|
||||||
setup_sim moxie
|
|
||||||
|
|
||||||
# No multilib options needed by default.
|
|
||||||
process_multilib_options ""
|
|
||||||
|
|
||||||
# We only support newlib on this target. We assume that all multilib
|
|
||||||
# options have been specified before we get here.
|
|
||||||
|
|
||||||
set_board_info compiler "[find_gcc]"
|
|
||||||
set_board_info cflags "[libgloss_include_flags] [newlib_include_flags]"
|
|
||||||
set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags]"
|
|
||||||
# No linker script needed.
|
|
||||||
set_board_info ldscript "-Tsim.ld"
|
|
||||||
|
|
||||||
# Configuration settings for testsuites
|
|
||||||
set_board_info noargs 1
|
|
||||||
set_board_info gdb,nosignals 1
|
|
||||||
set_board_info gdb,noresults 1
|
|
||||||
set_board_info gdb,cannot_call_functions 1
|
|
||||||
set_board_info gdb,skip_float_tests 1
|
|
||||||
set_board_info gdb,can_reverse 1
|
|
||||||
set_board_info gdb,use_precord 1
|
|
||||||
|
|
||||||
# More time is needed
|
|
||||||
set_board_info gcc,timeout 800
|
|
||||||
set_board_info gdb,timeout 60
|
|
||||||
|
|
||||||
# Used by a few gcc.c-torture testcases to delimit how large the stack can
|
|
||||||
# be.
|
|
||||||
set_board_info gcc,stack_size 5000
|
|
||||||
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# Copyright (C) 2008, 2010, 2018 Anthony Green
|
|
||||||
|
|
||||||
# Make sure we look in the right place for the board description files.
|
|
||||||
if ![info exists boards_dir] {
|
|
||||||
set boards_dir {}
|
|
||||||
}
|
|
||||||
|
|
||||||
lappend boards_dir $::env(TRAVIS_BUILD_DIR)/.travis
|
|
||||||
|
|
||||||
verbose "Global Config File: target_triplet is $target_triplet" 2
|
|
||||||
global target_list
|
|
||||||
|
|
||||||
case "$target_triplet" in {
|
|
||||||
{ "moxie-elf" } {
|
|
||||||
set target_list "moxie-sim"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
584
ChangeLog.libffi
584
ChangeLog.libffi
@@ -1,584 +0,0 @@
|
|||||||
2011-02-08 Andreas Tobler <andreast@fgznet.ch>
|
|
||||||
|
|
||||||
* testsuite/lib/libffi.exp: Tweak for stand-alone mode.
|
|
||||||
|
|
||||||
2009-12-25 Samuli Suominen <ssuominen@gentoo.org>
|
|
||||||
|
|
||||||
* configure.ac: Undefine _AC_ARG_VAR_PRECIOUS for autoconf 2.64.
|
|
||||||
* configure: Rebuilt.
|
|
||||||
* fficonfig.h.in: Rebuilt.
|
|
||||||
|
|
||||||
2009-06-16 Andrew Haley <aph@redhat.com>
|
|
||||||
|
|
||||||
* testsuite/libffi.call/cls_align_sint64.c,
|
|
||||||
testsuite/libffi.call/cls_align_uint64.c,
|
|
||||||
testsuite/libffi.call/cls_longdouble_va.c,
|
|
||||||
testsuite/libffi.call/cls_ulonglong.c,
|
|
||||||
testsuite/libffi.call/return_ll1.c,
|
|
||||||
testsuite/libffi.call/stret_medium2.c: Fix printf format
|
|
||||||
specifiers.
|
|
||||||
* testsuite/libffi.call/huge_struct.c: Ad x86 XFAILs.
|
|
||||||
* testsuite/libffi.call/float2.c: Fix dg-excess-errors.
|
|
||||||
* testsuite/libffi.call/ffitest.h,
|
|
||||||
testsuite/libffi.special/ffitestcxx.h (PRIdLL, PRIuLL): Define.
|
|
||||||
|
|
||||||
2009-06-12 Andrew Haley <aph@redhat.com>
|
|
||||||
|
|
||||||
* testsuite/libffi.call/cls_align_sint64.c,
|
|
||||||
testsuite/libffi.call/cls_align_uint64.c,
|
|
||||||
testsuite/libffi.call/cls_ulonglong.c,
|
|
||||||
testsuite/libffi.call/return_ll1.c,
|
|
||||||
testsuite/libffi.call/stret_medium2.c: Fix printf format
|
|
||||||
specifiers.
|
|
||||||
testsuite/libffi.special/unwindtest.cc: include stdint.h.
|
|
||||||
|
|
||||||
2009-06-11 Timothy Wall <twall@users.sf.net>
|
|
||||||
|
|
||||||
* Makefile.am,
|
|
||||||
configure.ac,
|
|
||||||
include/ffi.h.in,
|
|
||||||
include/ffi_common.h,
|
|
||||||
src/closures.c,
|
|
||||||
src/dlmalloc.c,
|
|
||||||
src/x86/ffi.c,
|
|
||||||
src/x86/ffitarget.h,
|
|
||||||
src/x86/win64.S (new),
|
|
||||||
README: Added win64 support (mingw or MSVC)
|
|
||||||
* Makefile.in,
|
|
||||||
include/Makefile.in,
|
|
||||||
man/Makefile.in,
|
|
||||||
testsuite/Makefile.in,
|
|
||||||
configure,
|
|
||||||
aclocal.m4: Regenerated
|
|
||||||
* ltcf-c.sh: properly escape cygwin/w32 path
|
|
||||||
* man/ffi_call.3: Clarify size requirements for return value.
|
|
||||||
* src/x86/ffi64.c: Fix filename in comment.
|
|
||||||
* src/x86/win32.S: Remove unused extern.
|
|
||||||
|
|
||||||
* testsuite/libffi.call/closure_fn0.c,
|
|
||||||
testsuite/libffi.call/closure_fn1.c,
|
|
||||||
testsuite/libffi.call/closure_fn2.c,
|
|
||||||
testsuite/libffi.call/closure_fn3.c,
|
|
||||||
testsuite/libffi.call/closure_fn4.c,
|
|
||||||
testsuite/libffi.call/closure_fn5.c,
|
|
||||||
testsuite/libffi.call/closure_fn6.c,
|
|
||||||
testsuite/libffi.call/closure_stdcall.c,
|
|
||||||
testsuite/libffi.call/cls_12byte.c,
|
|
||||||
testsuite/libffi.call/cls_16byte.c,
|
|
||||||
testsuite/libffi.call/cls_18byte.c,
|
|
||||||
testsuite/libffi.call/cls_19byte.c,
|
|
||||||
testsuite/libffi.call/cls_1_1byte.c,
|
|
||||||
testsuite/libffi.call/cls_20byte.c,
|
|
||||||
testsuite/libffi.call/cls_20byte1.c,
|
|
||||||
testsuite/libffi.call/cls_24byte.c,
|
|
||||||
testsuite/libffi.call/cls_2byte.c,
|
|
||||||
testsuite/libffi.call/cls_3_1byte.c,
|
|
||||||
testsuite/libffi.call/cls_3byte1.c,
|
|
||||||
testsuite/libffi.call/cls_3byte2.c,
|
|
||||||
testsuite/libffi.call/cls_4_1byte.c,
|
|
||||||
testsuite/libffi.call/cls_4byte.c,
|
|
||||||
testsuite/libffi.call/cls_5_1_byte.c,
|
|
||||||
testsuite/libffi.call/cls_5byte.c,
|
|
||||||
testsuite/libffi.call/cls_64byte.c,
|
|
||||||
testsuite/libffi.call/cls_6_1_byte.c,
|
|
||||||
testsuite/libffi.call/cls_6byte.c,
|
|
||||||
testsuite/libffi.call/cls_7_1_byte.c,
|
|
||||||
testsuite/libffi.call/cls_7byte.c,
|
|
||||||
testsuite/libffi.call/cls_8byte.c,
|
|
||||||
testsuite/libffi.call/cls_9byte1.c,
|
|
||||||
testsuite/libffi.call/cls_9byte2.c,
|
|
||||||
testsuite/libffi.call/cls_align_double.c,
|
|
||||||
testsuite/libffi.call/cls_align_float.c,
|
|
||||||
testsuite/libffi.call/cls_align_longdouble.c,
|
|
||||||
testsuite/libffi.call/cls_align_longdouble_split.c,
|
|
||||||
testsuite/libffi.call/cls_align_longdouble_split2.c,
|
|
||||||
testsuite/libffi.call/cls_align_pointer.c,
|
|
||||||
testsuite/libffi.call/cls_align_sint16.c,
|
|
||||||
testsuite/libffi.call/cls_align_sint32.c,
|
|
||||||
testsuite/libffi.call/cls_align_sint64.c,
|
|
||||||
testsuite/libffi.call/cls_align_uint16.c,
|
|
||||||
testsuite/libffi.call/cls_align_uint32.c,
|
|
||||||
testsuite/libffi.call/cls_align_uint64.c,
|
|
||||||
testsuite/libffi.call/cls_dbls_struct.c,
|
|
||||||
testsuite/libffi.call/cls_double.c,
|
|
||||||
testsuite/libffi.call/cls_double_va.c,
|
|
||||||
testsuite/libffi.call/cls_float.c,
|
|
||||||
testsuite/libffi.call/cls_longdouble.c,
|
|
||||||
testsuite/libffi.call/cls_longdouble_va.c,
|
|
||||||
testsuite/libffi.call/cls_multi_schar.c,
|
|
||||||
testsuite/libffi.call/cls_multi_sshort.c,
|
|
||||||
testsuite/libffi.call/cls_multi_sshortchar.c,
|
|
||||||
testsuite/libffi.call/cls_multi_uchar.c,
|
|
||||||
testsuite/libffi.call/cls_multi_ushort.c,
|
|
||||||
testsuite/libffi.call/cls_multi_ushortchar.c,
|
|
||||||
testsuite/libffi.call/cls_pointer.c,
|
|
||||||
testsuite/libffi.call/cls_pointer_stack.c,
|
|
||||||
testsuite/libffi.call/cls_schar.c,
|
|
||||||
testsuite/libffi.call/cls_sint.c,
|
|
||||||
testsuite/libffi.call/cls_sshort.c,
|
|
||||||
testsuite/libffi.call/cls_uchar.c,
|
|
||||||
testsuite/libffi.call/cls_uint.c,
|
|
||||||
testsuite/libffi.call/cls_ulonglong.c,
|
|
||||||
testsuite/libffi.call/cls_ushort.c,
|
|
||||||
testsuite/libffi.call/err_bad_abi.c,
|
|
||||||
testsuite/libffi.call/err_bad_typedef.c,
|
|
||||||
testsuite/libffi.call/float2.c,
|
|
||||||
testsuite/libffi.call/huge_struct.c,
|
|
||||||
testsuite/libffi.call/nested_struct.c,
|
|
||||||
testsuite/libffi.call/nested_struct1.c,
|
|
||||||
testsuite/libffi.call/nested_struct10.c,
|
|
||||||
testsuite/libffi.call/nested_struct2.c,
|
|
||||||
testsuite/libffi.call/nested_struct3.c,
|
|
||||||
testsuite/libffi.call/nested_struct4.c,
|
|
||||||
testsuite/libffi.call/nested_struct5.c,
|
|
||||||
testsuite/libffi.call/nested_struct6.c,
|
|
||||||
testsuite/libffi.call/nested_struct7.c,
|
|
||||||
testsuite/libffi.call/nested_struct8.c,
|
|
||||||
testsuite/libffi.call/nested_struct9.c,
|
|
||||||
testsuite/libffi.call/problem1.c,
|
|
||||||
testsuite/libffi.call/return_ldl.c,
|
|
||||||
testsuite/libffi.call/return_ll1.c,
|
|
||||||
testsuite/libffi.call/stret_large.c,
|
|
||||||
testsuite/libffi.call/stret_large2.c,
|
|
||||||
testsuite/libffi.call/stret_medium.c,
|
|
||||||
testsuite/libffi.call/stret_medium2.c,
|
|
||||||
testsuite/libffi.special/unwindtest.cc: use ffi_closure_alloc instead
|
|
||||||
of checking for MMAP. Use intptr_t instead of long casts.
|
|
||||||
|
|
||||||
2009-06-04 Andrew Haley <aph@redhat.com>
|
|
||||||
|
|
||||||
* src/powerpc/ffitarget.h: Fix misapplied merge from gcc.
|
|
||||||
|
|
||||||
2009-06-04 Andrew Haley <aph@redhat.com>
|
|
||||||
|
|
||||||
* src/mips/o32.S,
|
|
||||||
src/mips/n32.S: Fix licence formatting.
|
|
||||||
|
|
||||||
2009-06-04 Andrew Haley <aph@redhat.com>
|
|
||||||
|
|
||||||
* src/x86/darwin.S: Fix licence formatting.
|
|
||||||
src/x86/win32.S: Likewise.
|
|
||||||
src/sh64/sysv.S: Likewise.
|
|
||||||
src/sh/sysv.S: Likewise.
|
|
||||||
|
|
||||||
2009-06-04 Andrew Haley <aph@redhat.com>
|
|
||||||
|
|
||||||
* src/sh64/ffi.c: Remove lint directives. Was missing from merge
|
|
||||||
of Andreas Tobler's patch from 2006-04-22.
|
|
||||||
|
|
||||||
2009-06-04 Andrew Haley <aph@redhat.com>
|
|
||||||
|
|
||||||
* src/sh/ffi.c: Apply missing hunk from Alexandre Oliva's patch of
|
|
||||||
2007-03-07.
|
|
||||||
|
|
||||||
2008-12-26 Timothy Wall <twall@users.sf.net>
|
|
||||||
|
|
||||||
* testsuite/libffi.call/cls_longdouble.c,
|
|
||||||
testsuite/libffi.call/cls_longdouble_va.c,
|
|
||||||
testsuite/libffi.call/cls_align_longdouble.c,
|
|
||||||
testsuite/libffi.call/cls_align_longdouble_split.c,
|
|
||||||
testsuite/libffi.call/cls_align_longdouble_split2.c: mark expected
|
|
||||||
failures on x86_64 cygwin/mingw.
|
|
||||||
|
|
||||||
2008-12-22 Timothy Wall <twall@users.sf.net>
|
|
||||||
|
|
||||||
* testsuite/libffi.call/closure_fn0.c,
|
|
||||||
testsuite/libffi.call/closure_fn1.c,
|
|
||||||
testsuite/libffi.call/closure_fn2.c,
|
|
||||||
testsuite/libffi.call/closure_fn3.c,
|
|
||||||
testsuite/libffi.call/closure_fn4.c,
|
|
||||||
testsuite/libffi.call/closure_fn5.c,
|
|
||||||
testsuite/libffi.call/closure_fn6.c,
|
|
||||||
testsuite/libffi.call/closure_loc_fn0.c,
|
|
||||||
testsuite/libffi.call/closure_stdcall.c,
|
|
||||||
testsuite/libffi.call/cls_align_pointer.c,
|
|
||||||
testsuite/libffi.call/cls_pointer.c,
|
|
||||||
testsuite/libffi.call/cls_pointer_stack.c: use portable cast from
|
|
||||||
pointer to integer (intptr_t).
|
|
||||||
* testsuite/libffi.call/cls_longdouble.c: disable for win64.
|
|
||||||
|
|
||||||
2008-12-19 Anthony Green <green@redhat.com>
|
|
||||||
|
|
||||||
* configure.ac: Bump version to 3.0.8.
|
|
||||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
|
||||||
* libtool-version: Increment revision.
|
|
||||||
* README: Update for new release.
|
|
||||||
|
|
||||||
2008-11-11 Anthony Green <green@redhat.com>
|
|
||||||
|
|
||||||
* configure.ac: Bump version to 3.0.7.
|
|
||||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
|
||||||
* libtool-version: Increment revision.
|
|
||||||
* README: Update for new release.
|
|
||||||
|
|
||||||
2008-08-25 Andreas Tobler <a.tobler@schweiz.org>
|
|
||||||
|
|
||||||
* src/powerpc/ffitarget.h (ffi_abi): Add FFI_LINUX and
|
|
||||||
FFI_LINUX_SOFT_FLOAT to the POWERPC_FREEBSD enum.
|
|
||||||
Add note about flag bits used for FFI_SYSV_TYPE_SMALL_STRUCT.
|
|
||||||
Adjust copyright notice.
|
|
||||||
* src/powerpc/ffi.c: Add two new flags to indicate if we have one
|
|
||||||
register or two register to use for FFI_SYSV structs.
|
|
||||||
(ffi_prep_cif_machdep): Pass the right register flag introduced above.
|
|
||||||
(ffi_closure_helper_SYSV): Fix the return type for
|
|
||||||
FFI_SYSV_TYPE_SMALL_STRUCT. Comment.
|
|
||||||
Adjust copyright notice.
|
|
||||||
|
|
||||||
2008-07-24 Anthony Green <green@redhat.com>
|
|
||||||
|
|
||||||
* testsuite/libffi.call/cls_dbls_struct.c,
|
|
||||||
testsuite/libffi.call/cls_double_va.c,
|
|
||||||
testsuite/libffi.call/cls_longdouble.c,
|
|
||||||
testsuite/libffi.call/cls_longdouble_va.c,
|
|
||||||
testsuite/libffi.call/cls_pointer.c,
|
|
||||||
testsuite/libffi.call/cls_pointer_stack.c,
|
|
||||||
testsuite/libffi.call/err_bad_abi.c: Clean up failures from
|
|
||||||
compiler warnings.
|
|
||||||
|
|
||||||
2008-07-17 Anthony Green <green@redhat.com>
|
|
||||||
|
|
||||||
* configure.ac: Bump version to 3.0.6.
|
|
||||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
|
||||||
* libtool-version: Increment revision. Add documentation.
|
|
||||||
* README: Update for new release.
|
|
||||||
|
|
||||||
2008-07-16 Kaz Kojima <kkojima@gcc.gnu.org>
|
|
||||||
|
|
||||||
* src/sh/ffi.c (ffi_prep_closure_loc): Turn INSN into an unsigned
|
|
||||||
int.
|
|
||||||
|
|
||||||
2008-07-16 Kaz Kojima <kkojima@gcc.gnu.org>
|
|
||||||
|
|
||||||
* src/sh/sysv.S: Add .note.GNU-stack on Linux.
|
|
||||||
* src/sh64/sysv.S: Likewise.
|
|
||||||
|
|
||||||
2008-04-03 Anthony Green <green@redhat.com>
|
|
||||||
|
|
||||||
* libffi.pc.in (Libs): Add -L${libdir}.
|
|
||||||
* configure.ac: Bump version to 3.0.5.
|
|
||||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
|
||||||
* libtool-version: Increment revision.
|
|
||||||
* README: Update for new release.
|
|
||||||
|
|
||||||
2008-04-03 Anthony Green <green@redhat.com>
|
|
||||||
Xerces Ranby <xerxes@zafena.se>
|
|
||||||
|
|
||||||
* include/ffi.h.in: Wrap definition of target architecture to
|
|
||||||
protect from double definitions.
|
|
||||||
|
|
||||||
2008-03-22 Moriyoshi Koizumi <moriyoshi@gmail.com>
|
|
||||||
|
|
||||||
* src/x86/ffi.c (ffi_prep_closure_loc): Fix for bug revealed in
|
|
||||||
closure_loc_fn0.c.
|
|
||||||
* testsuite/libffi.call/closure_loc_fn0.c (closure_loc_test_fn0):
|
|
||||||
New test.
|
|
||||||
|
|
||||||
2008-03-04 Anthony Green <green@redhat.com>
|
|
||||||
Blake Chaffin
|
|
||||||
hos@tamanegi.org
|
|
||||||
|
|
||||||
* testsuite/libffi.call/cls_align_longdouble_split2.c
|
|
||||||
testsuite/libffi.call/cls_align_longdouble_split.c
|
|
||||||
testsuite/libffi.call/cls_dbls_struct.c
|
|
||||||
testsuite/libffi.call/cls_double_va.c
|
|
||||||
testsuite/libffi.call/cls_longdouble.c
|
|
||||||
testsuite/libffi.call/cls_longdouble_va.c
|
|
||||||
testsuite/libffi.call/cls_pointer.c
|
|
||||||
testsuite/libffi.call/cls_pointer_stack.c
|
|
||||||
testsuite/libffi.call/err_bad_abi.c
|
|
||||||
testsuite/libffi.call/err_bad_typedef.c
|
|
||||||
testsuite/libffi.call/huge_struct.c
|
|
||||||
testsuite/libffi.call/stret_large2.c
|
|
||||||
testsuite/libffi.call/stret_large.c
|
|
||||||
testsuite/libffi.call/stret_medium2.c
|
|
||||||
testsuite/libffi.call/stret_medium.c: New tests from Apple.
|
|
||||||
|
|
||||||
2008-02-26 Jakub Jelinek <jakub@redhat.com>
|
|
||||||
Anthony Green <green@redhat.com>
|
|
||||||
|
|
||||||
* src/alpha/osf.S: Add .note.GNU-stack on Linux.
|
|
||||||
* src/s390/sysv.S: Likewise.
|
|
||||||
* src/powerpc/linux64.S: Likewise.
|
|
||||||
* src/powerpc/linux64_closure.S: Likewise.
|
|
||||||
* src/powerpc/ppc_closure.S: Likewise.
|
|
||||||
* src/powerpc/sysv.S: Likewise.
|
|
||||||
* src/x86/unix64.S: Likewise.
|
|
||||||
* src/x86/sysv.S: Likewise.
|
|
||||||
* src/sparc/v8.S: Likewise.
|
|
||||||
* src/sparc/v9.S: Likewise.
|
|
||||||
* src/m68k/sysv.S: Likewise.
|
|
||||||
* src/ia64/unix.S: Likewise.
|
|
||||||
* src/arm/sysv.S: Likewise.
|
|
||||||
|
|
||||||
2008-02-26 Anthony Green <green@redhat.com>
|
|
||||||
Thomas Heller <theller@ctypes.org>
|
|
||||||
|
|
||||||
* src/x86/ffi.c (ffi_closure_SYSV_inner): Change C++ comment to C
|
|
||||||
comment.
|
|
||||||
|
|
||||||
2008-02-26 Anthony Green <green@redhat.org>
|
|
||||||
Thomas Heller <theller@ctypes.org>
|
|
||||||
|
|
||||||
* include/ffi.h.in: Change void (*)() to void (*)(void).
|
|
||||||
|
|
||||||
2008-02-26 Anthony Green <green@redhat.org>
|
|
||||||
Thomas Heller <theller@ctypes.org>
|
|
||||||
|
|
||||||
* src/alpha/ffi.c: Change void (*)() to void (*)(void).
|
|
||||||
src/alpha/osf.S, src/arm/ffi.c, src/frv/ffi.c, src/ia64/ffi.c,
|
|
||||||
src/ia64/unix.S, src/java_raw_api.c, src/m32r/ffi.c,
|
|
||||||
src/mips/ffi.c, src/pa/ffi.c, src/pa/hpux32.S, src/pa/linux.S,
|
|
||||||
src/powerpc/ffi.c, src/powerpc/ffi_darwin.c, src/raw_api.c,
|
|
||||||
src/s390/ffi.c, src/sh/ffi.c, src/sh64/ffi.c, src/sparc/ffi.c,
|
|
||||||
src/x86/ffi.c, src/x86/unix64.S, src/x86/darwin64.S,
|
|
||||||
src/x86/ffi64.c: Ditto.
|
|
||||||
|
|
||||||
2008-02-24 Anthony Green <green@redhat.org>
|
|
||||||
|
|
||||||
* configure.ac: Accept openbsd*, not just openbsd.
|
|
||||||
Bump version to 3.0.4.
|
|
||||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
|
||||||
* libtool-version: Increment revision.
|
|
||||||
* README: Update for new release.
|
|
||||||
|
|
||||||
2008-02-22 Anthony Green <green@redhat.com>
|
|
||||||
|
|
||||||
* README: Clean up list of tested platforms.
|
|
||||||
|
|
||||||
2008-02-22 Anthony Green <green@redhat.com>
|
|
||||||
|
|
||||||
* configure.ac: Bump version to 3.0.3.
|
|
||||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
|
||||||
* libtool-version: Increment revision.
|
|
||||||
* README: Update for new release. Clean up test docs.
|
|
||||||
|
|
||||||
2008-02-22 Bjoern Koenig <bkoenig@alpha-tierchen.de>
|
|
||||||
Andreas Tobler <a.tobler@schweiz.org>
|
|
||||||
|
|
||||||
* configure.ac: Add amd64-*-freebsd* target.
|
|
||||||
* configure: Regenerate.
|
|
||||||
|
|
||||||
2008-02-22 Thomas Heller <theller@ctypes.org>
|
|
||||||
|
|
||||||
* configure.ac: Add x86 OpenBSD support.
|
|
||||||
* configure: Rebuilt.
|
|
||||||
|
|
||||||
2008-02-21 Thomas Heller <theller@ctypes.org>
|
|
||||||
|
|
||||||
* README: Change "make test" to "make check".
|
|
||||||
|
|
||||||
2008-02-21 Anthony Green <green@redhat.com>
|
|
||||||
|
|
||||||
* configure.ac: Bump version to 3.0.2.
|
|
||||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
|
||||||
* libtool-version: Increment revision.
|
|
||||||
* README: Update for new release.
|
|
||||||
|
|
||||||
2008-02-21 Björn König <bkoenig@alpha-tierchen.de>
|
|
||||||
|
|
||||||
* src/x86/freebsd.S: New file.
|
|
||||||
* configure.ac: Add x86 FreeBSD support.
|
|
||||||
* Makefile.am: Ditto.
|
|
||||||
|
|
||||||
2008-02-15 Anthony Green <green@redhat.com>
|
|
||||||
|
|
||||||
* configure.ac: Bump version to 3.0.1.
|
|
||||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
|
||||||
* libtool-version: Increment revision.
|
|
||||||
* README: Update for new release.
|
|
||||||
|
|
||||||
2008-02-15 David Daney <ddaney@avtrex.com>
|
|
||||||
|
|
||||||
* src/mips/ffi.c: Remove extra '>' from include directive.
|
|
||||||
(ffi_prep_closure_loc): Use clear_location instead of tramp.
|
|
||||||
|
|
||||||
2008-02-15 Anthony Green <green@redhat.com>
|
|
||||||
|
|
||||||
* configure.ac: Bump version to 3.0.0.
|
|
||||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
|
||||||
|
|
||||||
2008-02-15 David Daney <ddaney@avtrex.com>
|
|
||||||
|
|
||||||
* src/mips/ffi.c (USE__BUILTIN___CLEAR_CACHE):
|
|
||||||
Define (conditionally), and use it to include cachectl.h.
|
|
||||||
(ffi_prep_closure_loc): Fix cache flushing.
|
|
||||||
* src/mips/ffitarget.h (_ABIN32, _ABI64, _ABIO32): Define.
|
|
||||||
|
|
||||||
2008-02-15 Anthony Green <green@redhat.com>
|
|
||||||
|
|
||||||
* man/ffi_call.3, man/ffi_prep_cif.3, man/ffi.3:
|
|
||||||
Update dates and remove all references to ffi_prep_closure.
|
|
||||||
* configure.ac: Bump version to 2.99.9.
|
|
||||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
|
||||||
|
|
||||||
2008-02-15 Anthony Green <green@redhat.com>
|
|
||||||
|
|
||||||
* man/ffi_prep_closure.3: Delete.
|
|
||||||
* man/Makefile.am (EXTRA_DIST): Remove ffi_prep_closure.3.
|
|
||||||
(man_MANS): Ditto.
|
|
||||||
* man/Makefile.in: Rebuilt.
|
|
||||||
* configure.ac: Bump version to 2.99.8.
|
|
||||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
|
||||||
|
|
||||||
2008-02-14 Anthony Green <green@redhat.com>
|
|
||||||
|
|
||||||
* configure.ac: Bump version to 2.99.7.
|
|
||||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
|
||||||
* include/ffi.h.in LICENSE src/debug.c src/closures.c
|
|
||||||
src/ffitest.c src/s390/sysv.S src/s390/ffitarget.h
|
|
||||||
src/types.c src/m68k/ffitarget.h src/raw_api.c src/frv/ffi.c
|
|
||||||
src/frv/ffitarget.h src/sh/ffi.c src/sh/sysv.S
|
|
||||||
src/sh/ffitarget.h src/powerpc/ffitarget.h src/pa/ffi.c
|
|
||||||
src/pa/ffitarget.h src/pa/linux.S src/java_raw_api.c
|
|
||||||
src/cris/ffitarget.h src/x86/ffi.c src/x86/sysv.S
|
|
||||||
src/x86/unix64.S src/x86/win32.S src/x86/ffitarget.h
|
|
||||||
src/x86/ffi64.c src/x86/darwin.S src/ia64/ffi.c
|
|
||||||
src/ia64/ffitarget.h src/ia64/ia64_flags.h src/ia64/unix.S
|
|
||||||
src/sparc/ffi.c src/sparc/v9.S src/sparc/ffitarget.h
|
|
||||||
src/sparc/v8.S src/alpha/ffi.c src/alpha/ffitarget.h
|
|
||||||
src/alpha/osf.S src/sh64/ffi.c src/sh64/sysv.S
|
|
||||||
src/sh64/ffitarget.h src/mips/ffi.c src/mips/ffitarget.h
|
|
||||||
src/mips/n32.S src/mips/o32.S src/arm/ffi.c src/arm/sysv.S
|
|
||||||
src/arm/ffitarget.h src/prep_cif.c: Update license text.
|
|
||||||
|
|
||||||
2008-02-14 Anthony Green <green@redhat.com>
|
|
||||||
|
|
||||||
* README: Update tested platforms.
|
|
||||||
* configure.ac: Bump version to 2.99.6.
|
|
||||||
* configure: Rebuilt.
|
|
||||||
|
|
||||||
2008-02-14 Anthony Green <green@redhat.com>
|
|
||||||
|
|
||||||
* configure.ac: Bump version to 2.99.5.
|
|
||||||
* configure: Rebuilt.
|
|
||||||
* Makefile.am (EXTRA_DIST): Add darwin64.S
|
|
||||||
* Makefile.in: Rebuilt.
|
|
||||||
* testsuite/lib/libffi-dg.exp: Remove libstdc++ bits from GCC tree.
|
|
||||||
* LICENSE: Update WARRANTY.
|
|
||||||
|
|
||||||
2008-02-14 Anthony Green <green@redhat.com>
|
|
||||||
|
|
||||||
* libffi.pc.in (libdir): Fix libdir definition.
|
|
||||||
* configure.ac: Bump version to 2.99.4.
|
|
||||||
* configure: Rebuilt.
|
|
||||||
|
|
||||||
2008-02-14 Anthony Green <green@redhat.com>
|
|
||||||
|
|
||||||
* README: Update.
|
|
||||||
* libffi.info: New file.
|
|
||||||
* doc/stamp-vti: New file.
|
|
||||||
* configure.ac: Bump version to 2.99.3.
|
|
||||||
* configure: Rebuilt.
|
|
||||||
|
|
||||||
2008-02-14 Anthony Green <green@redhat.com>
|
|
||||||
|
|
||||||
* Makefile.am (SUBDIRS): Add man dir.
|
|
||||||
* Makefile.in: Rebuilt.
|
|
||||||
* configure.ac: Create Makefile.
|
|
||||||
* configure: Rebuilt.
|
|
||||||
* man/ffi_call.3 man/ffi_prep_cif.3 man/ffi_prep_closure.3
|
|
||||||
man/Makefile.am man/Makefile.in: New files.
|
|
||||||
|
|
||||||
2008-02-14 Tom Tromey <tromey@redhat.com>
|
|
||||||
|
|
||||||
* aclocal.m4, Makefile.in, configure, fficonfig.h.in: Rebuilt.
|
|
||||||
* mdate-sh, texinfo.tex: New files.
|
|
||||||
* Makefile.am (info_TEXINFOS): New variable.
|
|
||||||
* doc/libffi.texi: New file.
|
|
||||||
* doc/version.texi: Likewise.
|
|
||||||
|
|
||||||
2008-02-14 Anthony Green <green@redhat.com>
|
|
||||||
|
|
||||||
* Makefile.am (AM_CFLAGS): Don't compile with -D$(TARGET).
|
|
||||||
(lib_LTLIBRARIES): Define.
|
|
||||||
(toolexeclib_LIBRARIES): Undefine.
|
|
||||||
* Makefile.in: Rebuilt.
|
|
||||||
* configure.ac: Reset version to 2.99.1.
|
|
||||||
* configure.in: Rebuilt.
|
|
||||||
|
|
||||||
2008-02-14 Anthony Green <green@redhat.com>
|
|
||||||
|
|
||||||
* libffi.pc.in: Use @PACKAGE_NAME@ and @PACKAGE_VERSION@.
|
|
||||||
* configure.ac: Reset version to 2.99.1.
|
|
||||||
* configure.in: Rebuilt.
|
|
||||||
* Makefile.am (EXTRA_DIST): Add ChangeLog.libffi.
|
|
||||||
* Makefile.in: Rebuilt.
|
|
||||||
* LICENSE: Update copyright notice.
|
|
||||||
|
|
||||||
2008-02-14 Anthony Green <green@redhat.com>
|
|
||||||
|
|
||||||
* include/Makefile.am (nodist_includes_HEADERS): Define. Don't
|
|
||||||
distribute ffitarget.h or ffi.h from the build include dir.
|
|
||||||
* Makefile.in: Rebuilt.
|
|
||||||
|
|
||||||
2008-02-14 Anthony Green <green@redhat.com>
|
|
||||||
|
|
||||||
* include/Makefile.am (includesdir): Install headers under libdir.
|
|
||||||
(pkgconfigdir): Define. Install libffi.pc.
|
|
||||||
* include/Makefile.in: Rebuilt.
|
|
||||||
* libffi.pc.in: Create.
|
|
||||||
* libtool-version: Increment CURRENT
|
|
||||||
* configure.ac: Add libffi.pc.in
|
|
||||||
* configure: Rebuilt.
|
|
||||||
|
|
||||||
2008-02-03 Anthony Green <green@redhat.com>
|
|
||||||
|
|
||||||
* include/Makefile.am (includesdir): Fix header install with
|
|
||||||
DESTDIR.
|
|
||||||
* include/Makefile.in: Rebuilt.
|
|
||||||
|
|
||||||
2008-02-03 Timothy Wall <twall@users.sf.net>
|
|
||||||
|
|
||||||
* src/x86/ffi.c (FFI_INIT_TRAMPOLINE_STDCALL): Calculate jump return
|
|
||||||
offset based on code pointer, not data pointer.
|
|
||||||
|
|
||||||
2008-02-01 Anthony Green <green@redhat.com>
|
|
||||||
|
|
||||||
* include/Makefile.am: Fix header installs.
|
|
||||||
* Makefile.am: Ditto.
|
|
||||||
* include/Makefile.in: Rebuilt.
|
|
||||||
* Makefile.in: Ditto.
|
|
||||||
|
|
||||||
2008-02-01 Anthony Green <green@redhat.com>
|
|
||||||
|
|
||||||
* src/x86/ffi.c (FFI_INIT_TRAMPOLINE_STDCALL,
|
|
||||||
FFI_INIT_TRAMPOLINE): Revert my broken changes to twall's last
|
|
||||||
patch.
|
|
||||||
|
|
||||||
2008-01-31 Anthony Green <green@redhat.com>
|
|
||||||
|
|
||||||
* Makefile.am (EXTRA_DIST): Add missing files.
|
|
||||||
* testsuite/Makefile.am: Ditto.
|
|
||||||
* Makefile.in, testsuite/Makefile.in: Rebuilt.
|
|
||||||
|
|
||||||
2008-01-31 Timothy Wall <twall@users.sf.net>
|
|
||||||
|
|
||||||
* testsuite/libffi.call/closure_stdcall.c: Add test for stdcall
|
|
||||||
closures.
|
|
||||||
* src/x86/ffitarget.h: Increase size of trampoline for stdcall
|
|
||||||
closures.
|
|
||||||
* src/x86/win32.S: Add assembly for stdcall closure.
|
|
||||||
* src/x86/ffi.c: Initialize stdcall closure trampoline.
|
|
||||||
|
|
||||||
2008-01-30 H.J. Lu <hongjiu.lu@intel.com>
|
|
||||||
|
|
||||||
PR libffi/34612
|
|
||||||
* src/x86/sysv.S (ffi_closure_SYSV): Pop 4 byte from stack when
|
|
||||||
returning struct.
|
|
||||||
|
|
||||||
* testsuite/libffi.call/call.exp: Add "-O2 -fomit-frame-pointer"
|
|
||||||
tests.
|
|
||||||
|
|
||||||
2008-01-30 Anthony Green <green@redhat.com>
|
|
||||||
|
|
||||||
* Makefile.am, include/Makefile.am: Move headers to
|
|
||||||
libffi_la_SOURCES for new automake.
|
|
||||||
* Makefile.in, include/Makefile.in: Rebuilt.
|
|
||||||
|
|
||||||
* testsuite/lib/wrapper.exp: Copied from gcc tree to allow for
|
|
||||||
execution outside of gcc tree.
|
|
||||||
* testsuite/lib/target-libpath.exp: Ditto.
|
|
||||||
|
|
||||||
* testsuite/lib/libffi-dg.exp: Many changes to allow for execution
|
|
||||||
outside of gcc tree.
|
|
||||||
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
2004-01-14 Kelley Cook <kcook@gcc.gnu.org>
|
|
||||||
|
|
||||||
* configure.in: Add in AC_PREREQ(2.13)
|
|
||||||
|
|
||||||
2003-02-20 Alexandre Oliva <aoliva@redhat.com>
|
|
||||||
|
|
||||||
* configure.in: Propagate ORIGINAL_LD_FOR_MULTILIBS to
|
|
||||||
config.status.
|
|
||||||
* configure: Rebuilt.
|
|
||||||
|
|
||||||
2002-01-27 Alexandre Oliva <aoliva@redhat.com>
|
|
||||||
|
|
||||||
* configure.in (toolexecdir, toolexeclibdir): Set and AC_SUBST.
|
|
||||||
Remove USE_LIBDIR conditional.
|
|
||||||
* Makefile.am (toolexecdir, toolexeclibdir): Don't override.
|
|
||||||
* Makefile.in, configure: Rebuilt.
|
|
||||||
|
|
||||||
Mon Aug 9 18:33:38 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
|
|
||||||
|
|
||||||
* include/Makefile.in: Rebuilt.
|
|
||||||
* Makefile.in: Rebuilt
|
|
||||||
* Makefile.am (toolexeclibdir): Add $(MULTISUBDIR) even for native
|
|
||||||
builds.
|
|
||||||
Use USE_LIBDIR.
|
|
||||||
|
|
||||||
* configure: Rebuilt.
|
|
||||||
* configure.in (USE_LIBDIR): Define for native builds.
|
|
||||||
Use lowercase in configure --help explanations.
|
|
||||||
|
|
||||||
1999-08-08 Anthony Green <green@cygnus.com>
|
|
||||||
|
|
||||||
* include/ffi.h.in (FFI_FN): Remove `...'.
|
|
||||||
|
|
||||||
1999-08-08 Anthony Green <green@cygnus.com>
|
|
||||||
|
|
||||||
* Makefile.in: Rebuilt.
|
|
||||||
* Makefile.am (AM_CFLAGS): Compile with -fexceptions.
|
|
||||||
|
|
||||||
* src/x86/sysv.S: Add exception handling metadata.
|
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
764
ChangeLog.v1
764
ChangeLog.v1
@@ -1,764 +0,0 @@
|
|||||||
The libffi version 1 ChangeLog archive.
|
|
||||||
|
|
||||||
Version 1 of libffi had per-directory ChangeLogs. Current and future
|
|
||||||
versions have a single ChangeLog file in the root directory. The
|
|
||||||
version 1 ChangeLogs have all been concatenated into this file for
|
|
||||||
future reference only.
|
|
||||||
|
|
||||||
--- libffi ----------------------------------------------------------------
|
|
||||||
|
|
||||||
Mon Oct 5 02:17:50 1998 Anthony Green <green@cygnus.com>
|
|
||||||
|
|
||||||
* configure.in: Boosted rev.
|
|
||||||
* configure, Makefile.in, aclocal.m4: Rebuilt.
|
|
||||||
* README: Boosted rev and updated release notes.
|
|
||||||
|
|
||||||
Mon Oct 5 01:03:03 1998 Anthony Green <green@cygnus.com>
|
|
||||||
|
|
||||||
* configure.in: Boosted rev.
|
|
||||||
* configure, Makefile.in, aclocal.m4: Rebuilt.
|
|
||||||
* README: Boosted rev and updated release notes.
|
|
||||||
|
|
||||||
1998-07-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
|
||||||
|
|
||||||
* m68k/ffi.c (ffi_prep_cif_machdep): Use bitmask for cif->flags.
|
|
||||||
Correctly handle small structures.
|
|
||||||
(ffi_prep_args): Also handle small structures.
|
|
||||||
(ffi_call): Pass size of return type to ffi_call_SYSV.
|
|
||||||
* m68k/sysv.S: Adjust for above changes. Correctly align small
|
|
||||||
structures in the return value.
|
|
||||||
|
|
||||||
* types.c (uint64, sint64) [M68K]: Change alignment to 4.
|
|
||||||
|
|
||||||
Fri Apr 17 17:26:58 1998 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* configure.in: Boosted rev.
|
|
||||||
* configure,Makefile.in,aclocal.m4: Rebuilt.
|
|
||||||
* README: Boosted rev and added release notes.
|
|
||||||
|
|
||||||
Sun Feb 22 00:50:41 1998 Geoff Keating <geoffk@ozemail.com.au>
|
|
||||||
|
|
||||||
* configure.in: Add PowerPC config bits.
|
|
||||||
|
|
||||||
1998-02-14 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
|
||||||
|
|
||||||
* configure.in: Add m68k config bits. Change AC_CANONICAL_SYSTEM
|
|
||||||
to AC_CANONICAL_HOST, this is not a compiler. Use $host instead
|
|
||||||
of $target. Remove AC_CHECK_SIZEOF(char), we already know the
|
|
||||||
result. Fix argument of AC_ARG_ENABLE.
|
|
||||||
* configure, fficonfig.h.in: Rebuilt.
|
|
||||||
|
|
||||||
Tue Feb 10 20:53:40 1998 Richard Henderson <rth@cygnus.com>
|
|
||||||
|
|
||||||
* configure.in: Add Alpha config bits.
|
|
||||||
|
|
||||||
Tue May 13 13:39:20 1997 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* README: Updated dates and reworded Irix comments.
|
|
||||||
|
|
||||||
* configure.in: Removed AC_PROG_RANLIB.
|
|
||||||
|
|
||||||
* Makefile.in, aclocal.m4, config.guess, config.sub, configure,
|
|
||||||
ltmain.sh, */Makefile.in: libtoolized again and rebuilt with
|
|
||||||
automake and autoconf.
|
|
||||||
|
|
||||||
Sat May 10 18:44:50 1997 Tom Tromey <tromey@cygnus.com>
|
|
||||||
|
|
||||||
* configure, aclocal.m4: Rebuilt.
|
|
||||||
* configure.in: Don't compute EXTRADIST; now handled in
|
|
||||||
src/Makefile.in. Removed macros implied by AM_INIT_AUTOMAKE.
|
|
||||||
Don't run AM_MAINTAINER_MODE.
|
|
||||||
|
|
||||||
Thu May 8 14:34:05 1997 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* missing, ltmain.sh, ltconfig.sh: Created. These are new files
|
|
||||||
required by automake and libtool.
|
|
||||||
|
|
||||||
* README: Boosted rev to 1.14. Added notes.
|
|
||||||
|
|
||||||
* acconfig.h: Moved PACKAGE and VERSION for new automake.
|
|
||||||
|
|
||||||
* configure.in: Changes for libtool.
|
|
||||||
|
|
||||||
* Makefile.am (check): make test now make check. Uses libtool now.
|
|
||||||
|
|
||||||
* Makefile.in, configure.in, aclocal.h, fficonfig.h.in: Rebuilt.
|
|
||||||
|
|
||||||
Thu May 1 16:27:07 1997 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* missing: Added file required by new automake.
|
|
||||||
|
|
||||||
Tue Nov 26 14:10:42 1996 Anthony Green <green@csk3.cygnus.com>
|
|
||||||
|
|
||||||
* acconfig.h: Added USING_PURIFY flag. This is defined when
|
|
||||||
--enable-purify-safety was used at configure time.
|
|
||||||
|
|
||||||
* configure.in (allsources): Added --enable-purify-safety switch.
|
|
||||||
(VERSION): Boosted rev to 1.13.
|
|
||||||
* configure: Rebuilt.
|
|
||||||
|
|
||||||
Fri Nov 22 06:46:12 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* configure.in (VERSION): Boosted rev to 1.12.
|
|
||||||
Removed special CFLAGS hack for gcc.
|
|
||||||
* configure: Rebuilt.
|
|
||||||
|
|
||||||
* README: Boosted rev to 1.12. Added notes.
|
|
||||||
|
|
||||||
* Many files: Cygnus Support changed to Cygnus Solutions.
|
|
||||||
|
|
||||||
Wed Oct 30 11:15:25 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* configure.in (VERSION): Boosted rev to 1.11.
|
|
||||||
* configure: Rebuilt.
|
|
||||||
|
|
||||||
* README: Boosted rev to 1.11. Added notes about GNU make.
|
|
||||||
|
|
||||||
Tue Oct 29 12:25:12 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* configure.in: Fixed -Wall trick.
|
|
||||||
(VERSION): Boosted rev.
|
|
||||||
* configure: Rebuilt
|
|
||||||
|
|
||||||
* acconfig.h: Needed for --enable-debug configure switch.
|
|
||||||
|
|
||||||
* README: Boosted rev to 1.09. Added more notes on building
|
|
||||||
libffi, and LCLint.
|
|
||||||
|
|
||||||
* configure.in: Added --enable-debug switch. Boosted rev to
|
|
||||||
1.09.
|
|
||||||
* configure: Rebuilt
|
|
||||||
|
|
||||||
Tue Oct 15 13:11:28 1996 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* configure.in (VERSION): Boosted rev to 1.08
|
|
||||||
* configure: Rebuilt.
|
|
||||||
|
|
||||||
* README: Added n32 bug fix notes.
|
|
||||||
|
|
||||||
* Makefile.am: Added "make lint" production.
|
|
||||||
* Makefile.in: Rebuilt.
|
|
||||||
|
|
||||||
Mon Oct 14 10:54:46 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* README: Added web page reference.
|
|
||||||
|
|
||||||
* configure.in, README: Boosted rev to 1.05
|
|
||||||
* configure: Rebuilt.
|
|
||||||
|
|
||||||
* README: Fixed n32 sample code.
|
|
||||||
|
|
||||||
Fri Oct 11 17:09:28 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* README: Added sparc notes.
|
|
||||||
|
|
||||||
* configure.in, README: Boosted rev to 1.04.
|
|
||||||
* configure: Rebuilt.
|
|
||||||
|
|
||||||
Thu Oct 10 10:31:03 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* configure.in, README: Boosted rev to 1.03.
|
|
||||||
* configure: Rebuilt.
|
|
||||||
|
|
||||||
* README: Added struct notes.
|
|
||||||
|
|
||||||
* Makefile.am (EXTRA_DIST): Added LICENSE to distribution.
|
|
||||||
* Makefile.in: Rebuilt.
|
|
||||||
|
|
||||||
* README: Removed Linux section. No special notes now
|
|
||||||
because aggregates arg/return types work.
|
|
||||||
|
|
||||||
Wed Oct 9 16:16:42 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* README, configure.in (VERSION): Boosted rev to 1.02
|
|
||||||
* configure: Rebuilt.
|
|
||||||
|
|
||||||
Tue Oct 8 11:56:33 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* README (NOTE): Added n32 notes.
|
|
||||||
|
|
||||||
* Makefile.am: Added test production.
|
|
||||||
* Makefile: Rebuilt
|
|
||||||
|
|
||||||
* README: spell checked!
|
|
||||||
|
|
||||||
* configure.in (VERSION): Boosted rev to 1.01
|
|
||||||
* configure: Rebuilt.
|
|
||||||
|
|
||||||
Mon Oct 7 15:50:22 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* configure.in: Added nasty bit to support SGI tools.
|
|
||||||
* configure: Rebuilt.
|
|
||||||
|
|
||||||
* README: Added SGI notes. Added note about automake bug.
|
|
||||||
|
|
||||||
Mon Oct 7 11:00:28 1996 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* README: Rewrote intro, and fixed examples.
|
|
||||||
|
|
||||||
Fri Oct 4 10:19:55 1996 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* configure.in: -D$TARGET is no longer used as a compiler switch.
|
|
||||||
It is now inserted into ffi.h at configure time.
|
|
||||||
* configure: Rebuilt.
|
|
||||||
|
|
||||||
* FFI_ABI and FFI_STATUS are now ffi_abi and ffi_status.
|
|
||||||
|
|
||||||
Thu Oct 3 13:47:34 1996 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* README, LICENSE: Created. Wrote some docs.
|
|
||||||
|
|
||||||
* configure.in: Don't barf on i586-unknown-linuxaout.
|
|
||||||
Added EXTRADIST code for "make dist".
|
|
||||||
* configure: Rebuilt.
|
|
||||||
|
|
||||||
* */Makefile.in: Rebuilt with patched automake.
|
|
||||||
|
|
||||||
Tue Oct 1 17:12:25 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* Makefile.am, aclocal.m4, config.guess, config.sub,
|
|
||||||
configure.in, fficonfig.h.in, install-sh, mkinstalldirs,
|
|
||||||
stamp-h.in: Created
|
|
||||||
* Makefile.in, configure: Generated
|
|
||||||
|
|
||||||
--- libffi/include --------------------------------------------------------
|
|
||||||
|
|
||||||
Tue Feb 24 13:09:36 1998 Anthony Green <green@gerbil.cygnus.com>
|
|
||||||
|
|
||||||
* ffi_mips.h: Updated FFI_TYPE_STRUCT_* values based on
|
|
||||||
ffi.h.in changes. This is a work-around for SGI's "simple"
|
|
||||||
assembler.
|
|
||||||
|
|
||||||
Sun Feb 22 00:51:55 1998 Geoff Keating <geoffk@ozemail.com.au>
|
|
||||||
|
|
||||||
* ffi.h.in: PowerPC support.
|
|
||||||
|
|
||||||
1998-02-14 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
|
||||||
|
|
||||||
* ffi.h.in: Add m68k support.
|
|
||||||
(FFI_TYPE_LONGDOUBLE): Make it a separate value.
|
|
||||||
|
|
||||||
Tue Feb 10 20:55:16 1998 Richard Henderson <rth@cygnus.com>
|
|
||||||
|
|
||||||
* ffi.h.in (SIZEOF_ARG): Use a pointer type by default.
|
|
||||||
|
|
||||||
* ffi.h.in: Alpha support.
|
|
||||||
|
|
||||||
Fri Nov 22 06:48:45 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* ffi.h.in, ffi_common.h: Cygnus Support -> Cygnus Solutions.
|
|
||||||
|
|
||||||
Wed Nov 20 22:31:01 1996 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* ffi.h.in: Added ffi_type_void definition.
|
|
||||||
|
|
||||||
Tue Oct 29 12:22:40 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* Makefile.am (hack_DATA): Always install ffi_mips.h.
|
|
||||||
|
|
||||||
* ffi.h.in: Removed FFI_DEBUG. It's now in the correct
|
|
||||||
place (acconfig.h).
|
|
||||||
Added #include <stddef.h> for size_t definition.
|
|
||||||
|
|
||||||
Tue Oct 15 17:23:35 1996 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* ffi.h.in, ffi_common.h, ffi_mips.h: More clean up.
|
|
||||||
Commented out #define of FFI_DEBUG.
|
|
||||||
|
|
||||||
Tue Oct 15 13:01:06 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* ffi_common.h: Added bool definition.
|
|
||||||
|
|
||||||
* ffi.h.in, ffi_common.h: Clean up based on LCLint output.
|
|
||||||
Added funny /*@...@*/ comments to annotate source.
|
|
||||||
|
|
||||||
Mon Oct 14 12:29:23 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* ffi.h.in: Interface changes based on feedback from Jim
|
|
||||||
Blandy.
|
|
||||||
|
|
||||||
Fri Oct 11 16:49:35 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* ffi.h.in: Small change for sparc support.
|
|
||||||
|
|
||||||
Thu Oct 10 14:53:37 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* ffi_mips.h: Added FFI_TYPE_STRUCT_* definitions for
|
|
||||||
special structure return types.
|
|
||||||
|
|
||||||
Wed Oct 9 13:55:57 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* ffi.h.in: Added SIZEOF_ARG definition for X86
|
|
||||||
|
|
||||||
Tue Oct 8 11:40:36 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* ffi.h.in (FFI_FN): Added macro for eliminating compiler warnings.
|
|
||||||
Use it to case your function pointers to the proper type.
|
|
||||||
|
|
||||||
* ffi_mips.h (SIZEOF_ARG): Added magic to fix type promotion bug.
|
|
||||||
|
|
||||||
* Makefile.am (EXTRA_DIST): Added ffi_mips.h to EXTRA_DIST.
|
|
||||||
* Makefile: Rebuilt.
|
|
||||||
|
|
||||||
* ffi_mips.h: Created. Moved all common mips definitions here.
|
|
||||||
|
|
||||||
Mon Oct 7 10:58:12 1996 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* ffi.h.in: The SGI assember is very picky about parens. Redefined
|
|
||||||
some macros to avoid problems.
|
|
||||||
|
|
||||||
* ffi.h.in: Added FFI_DEFAULT_ABI definitions. Also added
|
|
||||||
externs for pointer, and 64bit integral ffi_types.
|
|
||||||
|
|
||||||
Fri Oct 4 09:51:37 1996 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* ffi.h.in: Added FFI_ABI member to ffi_cif and changed
|
|
||||||
function prototypes accordingly.
|
|
||||||
Added #define @TARGET@. Now programs including ffi.h don't
|
|
||||||
have to specify this themselves.
|
|
||||||
|
|
||||||
Thu Oct 3 15:36:44 1996 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* ffi.h.in: Changed ffi_prep_cif's values from void* to void**
|
|
||||||
|
|
||||||
* Makefile.am (EXTRA_DIST): Added EXTRA_DIST for "make dist"
|
|
||||||
to work.
|
|
||||||
* Makefile.in: Regenerated.
|
|
||||||
|
|
||||||
Wed Oct 2 10:16:59 1996 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* Makefile.am: Created
|
|
||||||
* Makefile.in: Generated
|
|
||||||
|
|
||||||
* ffi_common.h: Added rcsid comment
|
|
||||||
|
|
||||||
Tue Oct 1 17:13:51 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* ffi.h.in, ffi_common.h: Created
|
|
||||||
|
|
||||||
--- libffi/src ------------------------------------------------------------
|
|
||||||
|
|
||||||
Mon Oct 5 02:17:50 1998 Anthony Green <green@cygnus.com>
|
|
||||||
|
|
||||||
* arm/ffi.c, arm/sysv.S: Created.
|
|
||||||
|
|
||||||
* Makefile.am: Added arm files.
|
|
||||||
* Makefile.in: Rebuilt.
|
|
||||||
|
|
||||||
Mon Oct 5 01:41:38 1998 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* Makefile.am (libffi_la_LDFLAGS): Incremented revision.
|
|
||||||
|
|
||||||
Sun Oct 4 16:27:17 1998 Anthony Green <green@cygnus.com>
|
|
||||||
|
|
||||||
* alpha/osf.S (ffi_call_osf): Patch for DU assembler.
|
|
||||||
|
|
||||||
* ffitest.c (main): long long and long double return values work
|
|
||||||
for x86.
|
|
||||||
|
|
||||||
Fri Apr 17 11:50:58 1998 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* Makefile.in: Rebuilt.
|
|
||||||
|
|
||||||
* ffitest.c (main): Floating point tests not executed for systems
|
|
||||||
with broken lond double (SunOS 4 w/ GCC).
|
|
||||||
|
|
||||||
* types.c: Fixed x86 alignment info for long long types.
|
|
||||||
|
|
||||||
Thu Apr 16 07:15:28 1998 Anthony Green <green@ada.cygnus.com>
|
|
||||||
|
|
||||||
* ffitest.c: Added more notes about GCC bugs under Irix 6.
|
|
||||||
|
|
||||||
Wed Apr 15 08:42:22 1998 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* ffitest.c (struct5): New test function.
|
|
||||||
(main): New test with struct5.
|
|
||||||
|
|
||||||
Thu Mar 5 10:48:11 1998 Anthony Green <green@tootie.to.cygnus.com>
|
|
||||||
|
|
||||||
* prep_cif.c (initialize_aggregate): Fix assertion for
|
|
||||||
nested structures.
|
|
||||||
|
|
||||||
Tue Feb 24 16:33:41 1998 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* prep_cif.c (ffi_prep_cif): Added long double support for sparc.
|
|
||||||
|
|
||||||
Sun Feb 22 00:52:18 1998 Geoff Keating <geoffk@ozemail.com.au>
|
|
||||||
|
|
||||||
* powerpc/asm.h: New file.
|
|
||||||
* powerpc/ffi.c: New file.
|
|
||||||
* powerpc/sysv.S: New file.
|
|
||||||
* Makefile.am: PowerPC port.
|
|
||||||
* ffitest.c (main): Allow all tests to run even in presence of gcc
|
|
||||||
bug on PowerPC.
|
|
||||||
|
|
||||||
1998-02-17 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* mips/ffi.c: Fixed comment typo.
|
|
||||||
|
|
||||||
* x86/ffi.c (ffi_prep_cif_machdep), x86/sysv.S (retfloat):
|
|
||||||
Fixed x86 long double return handling.
|
|
||||||
|
|
||||||
* types.c: Fixed x86 long double alignment info.
|
|
||||||
|
|
||||||
1998-02-14 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
|
||||||
|
|
||||||
* types.c: Add m68k support.
|
|
||||||
|
|
||||||
* ffitest.c (floating): Add long double parameter.
|
|
||||||
(return_ll, ldblit): New functions to test long long and long
|
|
||||||
double return value.
|
|
||||||
(main): Fix type error in assignment of ts[1-4]_type.elements.
|
|
||||||
Add tests for long long and long double arguments and return
|
|
||||||
values.
|
|
||||||
|
|
||||||
* prep_cif.c (ffi_prep_cif) [M68K]: Don't allocate argument for
|
|
||||||
struct value pointer.
|
|
||||||
|
|
||||||
* m68k/ffi.c, m68k/sysv.S: New files.
|
|
||||||
* Makefile.am: Add bits for m68k port. Add kludge to work around
|
|
||||||
automake deficiency.
|
|
||||||
(test): Don't require "." in $PATH.
|
|
||||||
* Makefile.in: Rebuilt.
|
|
||||||
|
|
||||||
Wed Feb 11 07:36:50 1998 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* Makefile.in: Rebuilt.
|
|
||||||
|
|
||||||
Tue Feb 10 20:56:00 1998 Richard Henderson <rth@cygnus.com>
|
|
||||||
|
|
||||||
* alpha/ffi.c, alpha/osf.S: New files.
|
|
||||||
* Makefile.am: Alpha port.
|
|
||||||
|
|
||||||
Tue Nov 18 14:12:07 1997 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* mips/ffi.c (ffi_prep_cif_machdep): Initialize rstruct_flag
|
|
||||||
for n32.
|
|
||||||
|
|
||||||
Tue Jun 3 17:18:20 1997 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* ffitest.c (main): Added hack to get structure tests working
|
|
||||||
correctly.
|
|
||||||
|
|
||||||
Sat May 10 19:06:42 1997 Tom Tromey <tromey@cygnus.com>
|
|
||||||
|
|
||||||
* Makefile.in: Rebuilt.
|
|
||||||
* Makefile.am (EXTRA_DIST): Explicitly list all distributable
|
|
||||||
files in subdirs.
|
|
||||||
(VERSION, CC): Removed.
|
|
||||||
|
|
||||||
Thu May 8 17:19:01 1997 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* Makefile.am: Many changes for new automake and libtool.
|
|
||||||
* Makefile.in: Rebuilt.
|
|
||||||
|
|
||||||
Fri Nov 22 06:57:56 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* ffitest.c (main): Fixed test case for non mips machines.
|
|
||||||
|
|
||||||
Wed Nov 20 22:31:59 1996 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* types.c: Added ffi_type_void declaration.
|
|
||||||
|
|
||||||
Tue Oct 29 13:07:19 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* ffitest.c (main): Fixed character constants.
|
|
||||||
(main): Emit warning for structure test 3 failure on Sun.
|
|
||||||
|
|
||||||
* Makefile.am (VPATH): Fixed VPATH def'n so automake won't
|
|
||||||
strip it out.
|
|
||||||
Moved distdir hack from libffi to automake.
|
|
||||||
(ffitest): Added missing -c for $(COMPILE) (change in automake).
|
|
||||||
* Makefile.in: Rebuilt.
|
|
||||||
|
|
||||||
Tue Oct 15 13:08:20 1996 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* Makefile.am: Added "make lint" production.
|
|
||||||
* Makefile.in: Rebuilt.
|
|
||||||
|
|
||||||
* prep_cif.c (STACK_ARG_SIZE): Improved STACK_ARG_SIZE macro.
|
|
||||||
Clean up based on LCLint output. Added funny /*@...@*/ comments to
|
|
||||||
annotate source.
|
|
||||||
|
|
||||||
* ffitest.c, debug.c: Cleaned up code.
|
|
||||||
|
|
||||||
Mon Oct 14 12:26:56 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* ffitest.c: Changes based on interface changes.
|
|
||||||
|
|
||||||
* prep_cif.c (ffi_prep_cif): Cleaned up interface based on
|
|
||||||
feedback from Jim Blandy.
|
|
||||||
|
|
||||||
Fri Oct 11 15:53:18 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* ffitest.c: Reordered tests while porting to sparc.
|
|
||||||
Made changes to handle lame structure passing for sparc.
|
|
||||||
Removed calls to fflush().
|
|
||||||
|
|
||||||
* prep_cif.c (ffi_prep_cif): Added special case for sparc
|
|
||||||
aggregate type arguments.
|
|
||||||
|
|
||||||
Thu Oct 10 09:56:51 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* ffitest.c (main): Added structure passing/returning tests.
|
|
||||||
|
|
||||||
* prep_cif.c (ffi_prep_cif): Perform proper initialization
|
|
||||||
of structure return types if needed.
|
|
||||||
(initialize_aggregate): Bug fix
|
|
||||||
|
|
||||||
Wed Oct 9 16:04:20 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* types.c: Added special definitions for x86 (double doesn't
|
|
||||||
need double word alignment).
|
|
||||||
|
|
||||||
* ffitest.c: Added many tests
|
|
||||||
|
|
||||||
Tue Oct 8 09:19:22 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* prep_cif.c (ffi_prep_cif): Fixed assertion.
|
|
||||||
|
|
||||||
* debug.c (ffi_assert): Must return a non void now.
|
|
||||||
|
|
||||||
* Makefile.am: Added test production.
|
|
||||||
* Makefile: Rebuilt.
|
|
||||||
|
|
||||||
* ffitest.c (main): Created.
|
|
||||||
|
|
||||||
* types.c: Created. Stripped common code out of */ffi.c.
|
|
||||||
|
|
||||||
* prep_cif.c: Added missing stdlib.h include.
|
|
||||||
|
|
||||||
* debug.c (ffi_type_test): Used "a" to eliminate compiler
|
|
||||||
warnings in non-debug builds. Included ffi_common.h.
|
|
||||||
|
|
||||||
Mon Oct 7 15:36:42 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* Makefile.am: Added a rule for .s -> .o
|
|
||||||
This is required by the SGI compiler.
|
|
||||||
* Makefile: Rebuilt.
|
|
||||||
|
|
||||||
Fri Oct 4 09:51:08 1996 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* prep_cif.c (initialize_aggregate): Moved abi specification
|
|
||||||
to ffi_prep_cif().
|
|
||||||
|
|
||||||
Thu Oct 3 15:37:37 1996 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* prep_cif.c (ffi_prep_cif): Changed values from void* to void**.
|
|
||||||
(initialize_aggregate): Fixed aggregate type initialization.
|
|
||||||
|
|
||||||
* Makefile.am (EXTRA_DIST): Added support code for "make dist".
|
|
||||||
* Makefile.in: Regenerated.
|
|
||||||
|
|
||||||
Wed Oct 2 11:41:57 1996 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* debug.c, prep_cif: Created.
|
|
||||||
|
|
||||||
* Makefile.am: Added debug.o and prep_cif.o to OBJ.
|
|
||||||
* Makefile.in: Regenerated.
|
|
||||||
|
|
||||||
* Makefile.am (INCLUDES): Added missing -I../include
|
|
||||||
* Makefile.in: Regenerated.
|
|
||||||
|
|
||||||
Tue Oct 1 17:11:51 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* error.c, Makefile.am: Created.
|
|
||||||
* Makefile.in: Generated.
|
|
||||||
|
|
||||||
--- libffi/src/x86 --------------------------------------------------------
|
|
||||||
|
|
||||||
Sun Oct 4 16:27:17 1998 Anthony Green <green@cygnus.com>
|
|
||||||
|
|
||||||
* sysv.S (retlongdouble): Fixed long long return value support.
|
|
||||||
* ffi.c (ffi_prep_cif_machdep): Ditto.
|
|
||||||
|
|
||||||
Wed May 13 04:30:33 1998 Anthony Green <green@raft.ppp.tsoft.net>
|
|
||||||
|
|
||||||
* ffi.c (ffi_prep_cif_machdep): Fixed long double return value
|
|
||||||
support.
|
|
||||||
|
|
||||||
Wed Apr 15 08:43:20 1998 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* ffi.c (ffi_prep_args): small struct support was missing.
|
|
||||||
|
|
||||||
Thu May 8 16:53:58 1997 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* objects.mak: Removed.
|
|
||||||
|
|
||||||
Mon Dec 2 15:12:58 1996 Tom Tromey <tromey@cygnus.com>
|
|
||||||
|
|
||||||
* sysv.S: Use .balign, for a.out Linux boxes.
|
|
||||||
|
|
||||||
Tue Oct 15 13:06:50 1996 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* ffi.c: Clean up based on LCLint output.
|
|
||||||
Added funny /*@...@*/ comments to annotate source.
|
|
||||||
|
|
||||||
Fri Oct 11 16:43:38 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* ffi.c (ffi_call): Added assertion for bad ABIs.
|
|
||||||
|
|
||||||
Wed Oct 9 13:57:27 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* sysv.S (retdouble): Fixed double return problems.
|
|
||||||
|
|
||||||
* ffi.c (ffi_call): Corrected fn arg definition.
|
|
||||||
(ffi_prep_cif_machdep): Fixed double return problems
|
|
||||||
|
|
||||||
Tue Oct 8 12:12:49 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* ffi.c: Moved ffi_type definitions to types.c.
|
|
||||||
(ffi_prep_args): Fixed type promotion bug.
|
|
||||||
|
|
||||||
Mon Oct 7 15:53:06 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* ffi.c (FFI_*_TYPEDEF): Removed redundant ';'
|
|
||||||
|
|
||||||
Fri Oct 4 09:54:53 1996 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* ffi.c (ffi_call): Removed FFI_ABI arg, and swapped
|
|
||||||
remaining args.
|
|
||||||
|
|
||||||
Wed Oct 2 10:07:05 1996 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* ffi.c, sysv.S, objects.mak: Created.
|
|
||||||
(ffi_prep_cif): cif->rvalue no longer initialized to NULL.
|
|
||||||
(ffi_prep_cif_machdep): Moved machine independent cif processing
|
|
||||||
to src/prep_cif.c. Introduced ffi_prep_cif_machdep().
|
|
||||||
|
|
||||||
--- libffi/src/mips -------------------------------------------------------
|
|
||||||
|
|
||||||
Tue Feb 17 17:18:07 1998 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* o32.S: Fixed typo in comment.
|
|
||||||
|
|
||||||
* ffi.c (ffi_prep_cif_machdep): Fixed argument processing.
|
|
||||||
|
|
||||||
Thu May 8 16:53:58 1997 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* o32.s, n32.s: Wrappers for SGI tool support.
|
|
||||||
|
|
||||||
* objects.mak: Removed.
|
|
||||||
|
|
||||||
Tue Oct 29 14:37:45 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* ffi.c (ffi_prep_args): Changed int z to size_t z.
|
|
||||||
|
|
||||||
Tue Oct 15 13:17:25 1996 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* n32.S: Fixed bad stack munging.
|
|
||||||
|
|
||||||
* ffi.c: Moved prototypes for ffi_call_?32() to here from
|
|
||||||
ffi_mips.h because extended_cif is not defined in ffi_mips.h.
|
|
||||||
|
|
||||||
Mon Oct 14 12:42:02 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* ffi.c: Interface changes based on feedback from Jim Blandy.
|
|
||||||
|
|
||||||
Thu Oct 10 11:22:16 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* n32.S, ffi.c: Lots of changes to support passing and
|
|
||||||
returning structures with the n32 calling convention.
|
|
||||||
|
|
||||||
* n32.S: Fixed fn pointer bug.
|
|
||||||
|
|
||||||
* ffi.c (ffi_prep_cif_machdep): Fix for o32 structure
|
|
||||||
return values.
|
|
||||||
(ffi_prep_args): Fixed n32 structure passing when structures
|
|
||||||
partially fit in registers.
|
|
||||||
|
|
||||||
Wed Oct 9 13:49:25 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* objects.mak: Added n32.o.
|
|
||||||
|
|
||||||
* n32.S: Created.
|
|
||||||
|
|
||||||
* ffi.c (ffi_prep_args): Added magic to support proper
|
|
||||||
n32 processing.
|
|
||||||
|
|
||||||
Tue Oct 8 10:37:35 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* ffi.c: Moved ffi_type definitions to types.c.
|
|
||||||
(ffi_prep_args): Fixed type promotion bug.
|
|
||||||
|
|
||||||
* o32.S: This code is only built for o32 compiles.
|
|
||||||
A lot of the #define cruft has moved to ffi_mips.h.
|
|
||||||
|
|
||||||
* ffi.c (ffi_prep_cif_machdep): Fixed arg flags. Second arg
|
|
||||||
is only processed if the first is either a float or double.
|
|
||||||
|
|
||||||
Mon Oct 7 15:33:59 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* o32.S: Modified to compile under each of o32, n32 and n64.
|
|
||||||
|
|
||||||
* ffi.c (FFI_*_TYPEDEF): Removed redundant ';'
|
|
||||||
|
|
||||||
Fri Oct 4 09:53:25 1996 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* ffi.c (ffi_call): Removed FFI_ABI arg, and swapped
|
|
||||||
remaining args.
|
|
||||||
|
|
||||||
Wed Oct 2 17:41:22 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* o32.S: Removed crufty definitions.
|
|
||||||
|
|
||||||
Wed Oct 2 12:53:42 1996 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* ffi.c (ffi_prep_cif): cif->rvalue no longer initialized to NULL.
|
|
||||||
(ffi_prep_cif_machdep): Moved all machine independent cif processing
|
|
||||||
to src/prep_cif.c. Introduced ffi_prep_cif_machdep. Return types
|
|
||||||
of FFI_TYPE_STRUCT are no different than FFI_TYPE_INT.
|
|
||||||
|
|
||||||
Tue Oct 1 17:11:02 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* ffi.c, o32.S, object.mak: Created
|
|
||||||
|
|
||||||
--- libffi/src/sparc ------------------------------------------------------
|
|
||||||
|
|
||||||
Tue Feb 24 16:33:18 1998 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* ffi.c (ffi_prep_args): Added long double support.
|
|
||||||
|
|
||||||
Thu May 8 16:53:58 1997 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* objects.mak: Removed.
|
|
||||||
|
|
||||||
Thu May 1 16:07:56 1997 Anthony Green <green@hoser.cygnus.com>
|
|
||||||
|
|
||||||
* v8.S: Fixed minor portability problem reported by
|
|
||||||
Russ McManus <mcmanr@eq.gs.com>.
|
|
||||||
|
|
||||||
Tue Nov 26 14:12:43 1996 Anthony Green <green@csk3.cygnus.com>
|
|
||||||
|
|
||||||
* v8.S: Used STACKFRAME define elsewhere.
|
|
||||||
|
|
||||||
* ffi.c (ffi_prep_args): Zero out space when USING_PURIFY
|
|
||||||
is set.
|
|
||||||
(ffi_prep_cif_machdep): Allocate the correct stack frame
|
|
||||||
space for functions with < 6 args.
|
|
||||||
|
|
||||||
Tue Oct 29 15:08:55 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* ffi.c (ffi_prep_args): int z is now size_t z.
|
|
||||||
|
|
||||||
Mon Oct 14 13:31:24 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* v8.S (ffi_call_V8): Gordon rewrites this again. It looks
|
|
||||||
great now.
|
|
||||||
|
|
||||||
* ffi.c (ffi_call): The comment about hijacked registers
|
|
||||||
is no longer valid after gordoni hacked v8.S.
|
|
||||||
|
|
||||||
* v8.S (ffi_call_V8): Rewrote with gordoni. Much simpler.
|
|
||||||
|
|
||||||
* v8.S, ffi.c: ffi_call() had changed to accept more than
|
|
||||||
two args, so v8.S had to change (because it hijacks incoming
|
|
||||||
arg registers).
|
|
||||||
|
|
||||||
* ffi.c: Interface changes based on feedback from Jim Blandy.
|
|
||||||
|
|
||||||
Thu Oct 10 17:48:16 1996 Anthony Green <green@rtl.cygnus.com>
|
|
||||||
|
|
||||||
* ffi.c, v8.S, objects.mak: Created.
|
|
||||||
|
|
||||||
|
|
||||||
2
LICENSE
2
LICENSE
@@ -1,4 +1,4 @@
|
|||||||
libffi - Copyright (c) 1996-2014 Anthony Green, Red Hat, Inc and others.
|
libffi - Copyright (c) 1996-2021 Anthony Green, Red Hat, Inc and others.
|
||||||
See source files for details.
|
See source files for details.
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
The libffi source distribution contains certain code that is not part
|
The libffi source distribution contains certain code that is not part
|
||||||
of libffi, and is only used as tooling to assist with the building and
|
of libffi, and is only used as tooling to assist with the building and
|
||||||
testing of libffi. This includes the msvcc.sh script used to wrap the
|
testing of libffi. This includes the msvcc.sh script used to wrap the
|
||||||
Microsoft compiler with GNU compatible command-line options, and the
|
Microsoft compiler with GNU compatible command-line options,
|
||||||
libffi test code distributed in the testsuite/libffi.bhaible
|
make_sunver.pl, and the libffi test code distributed in the
|
||||||
directory. This code is distributed with libffi for the purpose of
|
testsuite/libffi.bhaible directory. This code is distributed with
|
||||||
convenience only, and libffi is in no way derived from this code.
|
libffi for the purpose of convenience only, and libffi is in no way
|
||||||
|
derived from this code.
|
||||||
|
|
||||||
msvcc.sh an testsuite/libffi.bhaible are both distributed under the
|
msvcc.sh an testsuite/libffi.bhaible are both distributed under the
|
||||||
terms of the GNU GPL version 2, as below.
|
terms of the GNU GPL version 2, as below.
|
||||||
|
|||||||
129
Makefile.am
129
Makefile.am
@@ -14,15 +14,14 @@ if BUILD_DOCS
|
|||||||
SUBDIRS += doc
|
SUBDIRS += doc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
EXTRA_DIST = LICENSE ChangeLog.v1 ChangeLog.libgcj \
|
EXTRA_DIST = LICENSE ChangeLog.old \
|
||||||
ChangeLog.libffi ChangeLog.libffi-3.1 \
|
|
||||||
m4/libtool.m4 m4/lt~obsolete.m4 \
|
m4/libtool.m4 m4/lt~obsolete.m4 \
|
||||||
m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 \
|
m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 \
|
||||||
m4/ltversion.m4 src/debug.c msvcc.sh \
|
m4/ltversion.m4 src/debug.c msvcc.sh \
|
||||||
generate-darwin-source-and-headers.py \
|
generate-darwin-source-and-headers.py \
|
||||||
libffi.xcodeproj/project.pbxproj \
|
libffi.xcodeproj/project.pbxproj \
|
||||||
libtool-ldflags libtool-version configure.host README.md \
|
libtool-ldflags libtool-version configure.host README.md \
|
||||||
libffi.map.in
|
libffi.map.in LICENSE-BUILDTOOLS msvc_build make_sunver.pl
|
||||||
|
|
||||||
# local.exp is generated by configure
|
# local.exp is generated by configure
|
||||||
DISTCLEANFILES = local.exp
|
DISTCLEANFILES = local.exp
|
||||||
@@ -39,80 +38,62 @@ toolexeclib_LTLIBRARIES = libffi.la
|
|||||||
noinst_LTLIBRARIES = libffi_convenience.la
|
noinst_LTLIBRARIES = libffi_convenience.la
|
||||||
|
|
||||||
libffi_la_SOURCES = src/prep_cif.c src/types.c \
|
libffi_la_SOURCES = src/prep_cif.c src/types.c \
|
||||||
src/raw_api.c src/java_raw_api.c src/closures.c
|
src/raw_api.c src/java_raw_api.c src/closures.c \
|
||||||
|
src/tramp.c
|
||||||
|
|
||||||
if FFI_DEBUG
|
if FFI_DEBUG
|
||||||
libffi_la_SOURCES += src/debug.c
|
libffi_la_SOURCES += src/debug.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
noinst_HEADERS = \
|
noinst_HEADERS = src/aarch64/ffitarget.h src/aarch64/internal.h \
|
||||||
src/aarch64/ffitarget.h src/aarch64/internal.h \
|
|
||||||
src/alpha/ffitarget.h src/alpha/internal.h \
|
src/alpha/ffitarget.h src/alpha/internal.h \
|
||||||
src/arc/ffitarget.h \
|
src/arc/ffitarget.h src/arm/ffitarget.h src/arm/internal.h \
|
||||||
src/arm/ffitarget.h src/arm/internal.h \
|
src/avr32/ffitarget.h src/bfin/ffitarget.h \
|
||||||
src/avr32/ffitarget.h \
|
src/cris/ffitarget.h src/csky/ffitarget.h src/frv/ffitarget.h \
|
||||||
src/bfin/ffitarget.h \
|
|
||||||
src/cris/ffitarget.h \
|
|
||||||
src/frv/ffitarget.h \
|
|
||||||
src/ia64/ffitarget.h src/ia64/ia64_flags.h \
|
src/ia64/ffitarget.h src/ia64/ia64_flags.h \
|
||||||
src/m32r/ffitarget.h \
|
src/m32r/ffitarget.h src/m68k/ffitarget.h \
|
||||||
src/m68k/ffitarget.h \
|
src/m88k/ffitarget.h src/metag/ffitarget.h \
|
||||||
src/m88k/ffitarget.h \
|
src/microblaze/ffitarget.h src/mips/ffitarget.h \
|
||||||
src/metag/ffitarget.h \
|
src/moxie/ffitarget.h src/nios2/ffitarget.h \
|
||||||
src/microblaze/ffitarget.h \
|
src/or1k/ffitarget.h src/pa/ffitarget.h \
|
||||||
src/mips/ffitarget.h \
|
src/powerpc/ffitarget.h src/powerpc/asm.h \
|
||||||
src/moxie/ffitarget.h \
|
src/powerpc/ffi_powerpc.h src/riscv/ffitarget.h \
|
||||||
src/nios2/ffitarget.h \
|
src/s390/ffitarget.h src/s390/internal.h src/sh/ffitarget.h \
|
||||||
src/or1k/ffitarget.h \
|
src/sh64/ffitarget.h src/sparc/ffitarget.h \
|
||||||
src/pa/ffitarget.h \
|
src/sparc/internal.h src/tile/ffitarget.h src/vax/ffitarget.h \
|
||||||
src/powerpc/ffitarget.h src/powerpc/asm.h src/powerpc/ffi_powerpc.h \
|
src/x86/ffitarget.h src/x86/internal.h src/x86/internal64.h \
|
||||||
src/riscv/ffitarget.h \
|
src/x86/asmnames.h src/xtensa/ffitarget.h src/dlmalloc.c \
|
||||||
src/s390/ffitarget.h src/s390/internal.h \
|
src/kvx/ffitarget.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 \
|
|
||||||
src/x86/ffitarget.h src/x86/internal.h src/x86/internal64.h src/x86/asmnames.h \
|
|
||||||
src/xtensa/ffitarget.h \
|
|
||||||
src/dlmalloc.c
|
|
||||||
|
|
||||||
EXTRA_libffi_la_SOURCES = \
|
EXTRA_libffi_la_SOURCES = src/aarch64/ffi.c src/aarch64/sysv.S \
|
||||||
src/aarch64/ffi.c src/aarch64/sysv.S \
|
src/aarch64/win64_armasm.S src/alpha/ffi.c src/alpha/osf.S \
|
||||||
src/alpha/ffi.c src/alpha/osf.S \
|
src/arc/ffi.c src/arc/arcompact.S src/arm/ffi.c \
|
||||||
src/arc/ffi.c src/arc/arcompact.S \
|
src/arm/sysv.S src/arm/ffi.c src/arm/sysv_msvc_arm32.S \
|
||||||
src/arm/ffi.c src/arm/sysv.S \
|
src/avr32/ffi.c src/avr32/sysv.S src/bfin/ffi.c \
|
||||||
src/avr32/ffi.c src/avr32/sysv.S \
|
src/bfin/sysv.S src/cris/ffi.c src/cris/sysv.S src/frv/ffi.c \
|
||||||
src/bfin/ffi.c src/bfin/sysv.S \
|
src/csky/ffi.c src/csky/sysv.S src/frv/eabi.S src/ia64/ffi.c \
|
||||||
src/cris/ffi.c src/cris/sysv.S \
|
src/ia64/unix.S src/m32r/ffi.c src/m32r/sysv.S src/m68k/ffi.c \
|
||||||
src/frv/ffi.c src/frv/eabi.S \
|
src/m68k/sysv.S src/m88k/ffi.c src/m88k/obsd.S \
|
||||||
src/ia64/ffi.c src/ia64/unix.S \
|
src/metag/ffi.c src/metag/sysv.S src/microblaze/ffi.c \
|
||||||
src/m32r/ffi.c src/m32r/sysv.S \
|
src/microblaze/sysv.S src/mips/ffi.c src/mips/o32.S \
|
||||||
src/m68k/ffi.c src/m68k/sysv.S \
|
src/mips/n32.S src/moxie/ffi.c src/moxie/eabi.S \
|
||||||
src/m88k/ffi.c src/m88k/obsd.S \
|
src/nios2/ffi.c src/nios2/sysv.S src/or1k/ffi.c \
|
||||||
src/metag/ffi.c src/metag/sysv.S \
|
src/or1k/sysv.S src/pa/ffi.c src/pa/linux.S src/pa/hpux32.S \
|
||||||
src/microblaze/ffi.c src/microblaze/sysv.S \
|
src/powerpc/ffi.c src/powerpc/ffi_sysv.c \
|
||||||
src/mips/ffi.c src/mips/o32.S src/mips/n32.S \
|
src/powerpc/ffi_linux64.c src/powerpc/sysv.S \
|
||||||
src/moxie/ffi.c src/moxie/eabi.S \
|
src/powerpc/linux64.S src/powerpc/linux64_closure.S \
|
||||||
src/nios2/ffi.c src/nios2/sysv.S \
|
src/powerpc/ppc_closure.S src/powerpc/aix.S \
|
||||||
src/or1k/ffi.c src/or1k/sysv.S \
|
src/powerpc/darwin.S src/powerpc/aix_closure.S \
|
||||||
src/pa/ffi.c src/pa/linux.S src/pa/hpux32.S \
|
src/powerpc/darwin_closure.S src/powerpc/ffi_darwin.c \
|
||||||
src/powerpc/ffi.c src/powerpc/ffi_sysv.c src/powerpc/ffi_linux64.c \
|
src/riscv/ffi.c src/riscv/sysv.S src/s390/ffi.c \
|
||||||
src/powerpc/sysv.S src/powerpc/linux64.S \
|
src/s390/sysv.S src/sh/ffi.c src/sh/sysv.S src/sh64/ffi.c \
|
||||||
src/powerpc/linux64_closure.S src/powerpc/ppc_closure.S \
|
src/sh64/sysv.S src/sparc/ffi.c src/sparc/ffi64.c \
|
||||||
src/powerpc/aix.S src/powerpc/darwin.S src/powerpc/aix_closure.S \
|
src/sparc/v8.S src/sparc/v9.S src/tile/ffi.c src/tile/tile.S \
|
||||||
src/powerpc/darwin_closure.S src/powerpc/ffi_darwin.c \
|
src/vax/ffi.c src/vax/elfbsd.S src/x86/ffi.c src/x86/sysv.S \
|
||||||
src/riscv/ffi.c src/riscv/sysv.S \
|
src/x86/ffiw64.c src/x86/win64.S src/x86/ffi64.c \
|
||||||
src/s390/ffi.c src/s390/sysv.S \
|
src/x86/unix64.S src/x86/sysv_intel.S src/x86/win64_intel.S \
|
||||||
src/sh/ffi.c src/sh/sysv.S \
|
src/xtensa/ffi.c src/xtensa/sysv.S src/kvx/ffi.c \
|
||||||
src/sh64/ffi.c src/sh64/sysv.S \
|
src/kvx/sysv.S
|
||||||
src/sparc/ffi.c src/sparc/ffi64.c src/sparc/v8.S src/sparc/v9.S \
|
|
||||||
src/tile/ffi.c src/tile/tile.S \
|
|
||||||
src/vax/ffi.c src/vax/elfbsd.S \
|
|
||||||
src/x86/ffi.c src/x86/sysv.S \
|
|
||||||
src/x86/ffiw64.c src/x86/win64.S \
|
|
||||||
src/x86/ffi64.c src/x86/unix64.S \
|
|
||||||
src/xtensa/ffi.c src/xtensa/sysv.S
|
|
||||||
|
|
||||||
TARGET_OBJ = @TARGET_OBJ@
|
TARGET_OBJ = @TARGET_OBJ@
|
||||||
libffi_la_LIBADD = $(TARGET_OBJ)
|
libffi_la_LIBADD = $(TARGET_OBJ)
|
||||||
@@ -140,9 +121,9 @@ endif
|
|||||||
if LIBFFI_BUILD_VERSIONED_SHLIB_SUN
|
if LIBFFI_BUILD_VERSIONED_SHLIB_SUN
|
||||||
libffi_version_script = -Wl,-M,libffi.map-sun
|
libffi_version_script = -Wl,-M,libffi.map-sun
|
||||||
libffi_version_dep = libffi.map-sun
|
libffi_version_dep = libffi.map-sun
|
||||||
libffi.map-sun : libffi.map $(top_srcdir)/../contrib/make_sunver.pl \
|
libffi.map-sun : libffi.map $(top_srcdir)/make_sunver.pl \
|
||||||
$(libffi_la_OBJECTS) $(libffi_la_LIBADD)
|
$(libffi_la_OBJECTS) $(libffi_la_LIBADD)
|
||||||
perl $(top_srcdir)/../contrib/make_sunver.pl libffi.map \
|
perl $(top_srcdir)/make_sunver.pl libffi.map \
|
||||||
`echo $(libffi_la_OBJECTS) $(libffi_la_LIBADD) | \
|
`echo $(libffi_la_OBJECTS) $(libffi_la_LIBADD) | \
|
||||||
sed 's,\([^/ ]*\)\.l\([ao]\),.libs/\1.\2,g'` \
|
sed 's,\([^/ ]*\)\.l\([ao]\),.libs/\1.\2,g'` \
|
||||||
> $@ || (rm -f $@ ; exit 1)
|
> $@ || (rm -f $@ ; exit 1)
|
||||||
@@ -154,7 +135,8 @@ endif
|
|||||||
libffi_version_info = -version-info `grep -v '^\#' $(srcdir)/libtool-version`
|
libffi_version_info = -version-info `grep -v '^\#' $(srcdir)/libtool-version`
|
||||||
|
|
||||||
libffi.map: $(top_srcdir)/libffi.map.in
|
libffi.map: $(top_srcdir)/libffi.map.in
|
||||||
$(COMPILE) -D$(TARGET) -E -x assembler-with-cpp -o $@ $<
|
$(COMPILE) -D$(TARGET) -DGENERATE_LIBFFI_MAP \
|
||||||
|
-E -x assembler-with-cpp -o $@ $(top_srcdir)/libffi.map.in
|
||||||
|
|
||||||
libffi_la_LDFLAGS = -no-undefined $(libffi_version_info) $(libffi_version_script) $(LTLDFLAGS) $(AM_LTLDFLAGS)
|
libffi_la_LDFLAGS = -no-undefined $(libffi_version_info) $(libffi_version_script) $(LTLDFLAGS) $(AM_LTLDFLAGS)
|
||||||
libffi_la_DEPENDENCIES = $(libffi_la_LIBADD) $(libffi_version_dep)
|
libffi_la_DEPENDENCIES = $(libffi_la_LIBADD) $(libffi_version_dep)
|
||||||
@@ -163,4 +145,7 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
|
|||||||
AM_CCASFLAGS = $(AM_CPPFLAGS)
|
AM_CCASFLAGS = $(AM_CPPFLAGS)
|
||||||
|
|
||||||
dist-hook:
|
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
|
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
|
||||||
|
|
||||||
|
|||||||
2075
Makefile.in
Normal file
2075
Makefile.in
Normal file
File diff suppressed because it is too large
Load Diff
160
README.md
160
README.md
@@ -1,11 +1,6 @@
|
|||||||
Status
|
|
||||||
======
|
|
||||||
|
|
||||||
[](https://travis-ci.org/libffi/libffi)
|
libffi-3.4.1 was released on June 28, 2021. Check the libffi web page
|
||||||
[](https://ci.appveyor.com/project/atgreen/libffi)
|
for updates: <URL:http://sourceware.org/libffi/>.
|
||||||
|
|
||||||
libffi-3.3-rc0 was released on April 2, 2018. Check the libffi web
|
|
||||||
page for updates: <URL:http://sourceware.org/libffi/>.
|
|
||||||
|
|
||||||
|
|
||||||
What is libffi?
|
What is libffi?
|
||||||
@@ -28,7 +23,7 @@ bridge from the interpreter program to compiled code.
|
|||||||
The libffi library provides a portable, high level programming
|
The libffi library provides a portable, high level programming
|
||||||
interface to various calling conventions. This allows a programmer to
|
interface to various calling conventions. This allows a programmer to
|
||||||
call any function specified by a call interface description at run
|
call any function specified by a call interface description at run
|
||||||
time.
|
time.
|
||||||
|
|
||||||
FFI stands for Foreign Function Interface. A foreign function
|
FFI stands for Foreign Function Interface. A foreign function
|
||||||
interface is the popular name for the interface that allows code
|
interface is the popular name for the interface that allows code
|
||||||
@@ -51,14 +46,18 @@ tested:
|
|||||||
| --------------- | ---------------- | ----------------------- |
|
| --------------- | ---------------- | ----------------------- |
|
||||||
| AArch64 (ARM64) | iOS | Clang |
|
| AArch64 (ARM64) | iOS | Clang |
|
||||||
| AArch64 | Linux | GCC |
|
| AArch64 | Linux | GCC |
|
||||||
|
| AArch64 | Windows | MSVC |
|
||||||
| Alpha | Linux | GCC |
|
| Alpha | Linux | GCC |
|
||||||
| Alpha | Tru64 | GCC |
|
| Alpha | Tru64 | GCC |
|
||||||
| ARC | Linux | GCC |
|
| ARC | Linux | GCC |
|
||||||
| ARM | Linux | GCC |
|
| ARM | Linux | GCC |
|
||||||
| ARM | iOS | GCC |
|
| ARM | iOS | GCC |
|
||||||
|
| ARM | Windows | MSVC |
|
||||||
| AVR32 | Linux | GCC |
|
| AVR32 | Linux | GCC |
|
||||||
| Blackfin | uClinux | GCC |
|
| Blackfin | uClinux | GCC |
|
||||||
|
| CSKY | Linux | GCC |
|
||||||
| HPPA | HPUX | GCC |
|
| HPPA | HPUX | GCC |
|
||||||
|
| KVX | Linux | GCC |
|
||||||
| IA-64 | Linux | GCC |
|
| IA-64 | Linux | GCC |
|
||||||
| M68K | FreeMiNT | GCC |
|
| M68K | FreeMiNT | GCC |
|
||||||
| M68K | Linux | GCC |
|
| M68K | Linux | GCC |
|
||||||
@@ -99,7 +98,6 @@ tested:
|
|||||||
| X86 | Interix | GCC |
|
| X86 | Interix | GCC |
|
||||||
| X86 | kFreeBSD | GCC |
|
| X86 | kFreeBSD | GCC |
|
||||||
| X86 | Linux | GCC |
|
| X86 | Linux | GCC |
|
||||||
| X86 | Mac OSX | GCC |
|
|
||||||
| X86 | OpenBSD | GCC |
|
| X86 | OpenBSD | GCC |
|
||||||
| X86 | OS/2 | GCC |
|
| X86 | OS/2 | GCC |
|
||||||
| X86 | Solaris | GCC |
|
| X86 | Solaris | GCC |
|
||||||
@@ -134,15 +132,15 @@ install autoconf, automake and libtool.
|
|||||||
|
|
||||||
You may want to tell configure where to install the libffi library and
|
You may want to tell configure where to install the libffi library and
|
||||||
header files. To do that, use the ``--prefix`` configure switch. Libffi
|
header files. To do that, use the ``--prefix`` configure switch. Libffi
|
||||||
will install under /usr/local by default.
|
will install under /usr/local by default.
|
||||||
|
|
||||||
If you want to enable extra run-time debugging checks use the the
|
If you want to enable extra run-time debugging checks use the the
|
||||||
``--enable-debug`` configure switch. This is useful when your program dies
|
``--enable-debug`` configure switch. This is useful when your program dies
|
||||||
mysteriously while using libffi.
|
mysteriously while using libffi.
|
||||||
|
|
||||||
Another useful configure switch is ``--enable-purify-safety``. Using this
|
Another useful configure switch is ``--enable-purify-safety``. Using this
|
||||||
will add some extra code which will suppress certain warnings when you
|
will add some extra code which will suppress certain warnings when you
|
||||||
are using Purify with libffi. Only use this switch when using
|
are using Purify with libffi. Only use this switch when using
|
||||||
Purify, as it will slow down the library.
|
Purify, as it will slow down the library.
|
||||||
|
|
||||||
If you don't want to build documentation, use the ``--disable-docs``
|
If you don't want to build documentation, use the ``--disable-docs``
|
||||||
@@ -152,7 +150,7 @@ It's also possible to build libffi on Windows platforms with
|
|||||||
Microsoft's Visual C++ compiler. In this case, use the msvcc.sh
|
Microsoft's Visual C++ compiler. In this case, use the msvcc.sh
|
||||||
wrapper script during configuration like so:
|
wrapper script during configuration like so:
|
||||||
|
|
||||||
path/to/configure CC=path/to/msvcc.sh CXX=path/to/msvcc.sh LD=link CPP="cl -nologo -EP"
|
path/to/configure CC=path/to/msvcc.sh CXX=path/to/msvcc.sh LD=link CPP="cl -nologo -EP" CPPFLAGS="-DFFI_BUILDING_DLL"
|
||||||
|
|
||||||
For 64-bit Windows builds, use ``CC="path/to/msvcc.sh -m64"`` and
|
For 64-bit Windows builds, use ``CC="path/to/msvcc.sh -m64"`` and
|
||||||
``CXX="path/to/msvcc.sh -m64"``. You may also need to specify
|
``CXX="path/to/msvcc.sh -m64"``. You may also need to specify
|
||||||
@@ -168,6 +166,11 @@ remove the line in configure that sets 'fix_srcfile_path' to a 'cygpath'
|
|||||||
command. ('cygpath' is not present in MingW, and is not required when
|
command. ('cygpath' is not present in MingW, and is not required when
|
||||||
using MingW-style paths.)
|
using MingW-style paths.)
|
||||||
|
|
||||||
|
To build static library for ARM64 with MSVC using visual studio solution, msvc_build folder have
|
||||||
|
aarch64/Ffi_staticLib.sln
|
||||||
|
required header files in aarch64/aarch64_include/
|
||||||
|
|
||||||
|
|
||||||
SPARC Solaris builds require the use of the GNU assembler and linker.
|
SPARC Solaris builds require the use of the GNU assembler and linker.
|
||||||
Point ``AS`` and ``LD`` environment variables at those tool prior to
|
Point ``AS`` and ``LD`` environment variables at those tool prior to
|
||||||
configuration.
|
configuration.
|
||||||
@@ -190,16 +193,34 @@ History
|
|||||||
|
|
||||||
See the git log for details at http://github.com/libffi/libffi.
|
See the git log for details at http://github.com/libffi/libffi.
|
||||||
|
|
||||||
3.3 TBD
|
3.4.2 Jun-28-21
|
||||||
|
Add static trampoline support for Linux on x86_64 and ARM64.
|
||||||
|
Add support for Alibaba's CSKY architecture.
|
||||||
|
Add support for Kalray's KVX architecture.
|
||||||
|
Add support for Intel Control-flow Enforcement Technology (CET).
|
||||||
|
Add support for ARM Pointer Authentication (PA).
|
||||||
|
Fix 32-bit PPC regression.
|
||||||
|
Fix MIPS soft-float problem.
|
||||||
|
Enable tmpdir override with the $LIBFFI_TMPDIR environment variable.
|
||||||
|
Enable compatibility with MSVC runtime stack checking.
|
||||||
|
Reject float and small integer argument in ffi_prep_cif_var().
|
||||||
|
Callers must promote these types themselves.
|
||||||
|
|
||||||
|
3.3 Nov-23-19
|
||||||
Add RISC-V support.
|
Add RISC-V support.
|
||||||
New API in support of GO closures.
|
New API in support of GO closures.
|
||||||
|
Add IEEE754 binary128 long double support for 64-bit Power
|
||||||
Default to Microsoft's 64 bit long double ABI with Visual C++.
|
Default to Microsoft's 64 bit long double ABI with Visual C++.
|
||||||
GNU compiler uses 80 bits (128 in memory) FFI_GNUW64 ABI.
|
GNU compiler uses 80 bits (128 in memory) FFI_GNUW64 ABI.
|
||||||
Many new tests cases and bug fixes.
|
Add Windows on ARM64 (WOA) support.
|
||||||
|
Add Windows 32-bit ARM support.
|
||||||
|
Raw java (gcj) API deprecated.
|
||||||
|
Add pre-built PDF documentation to source distribution.
|
||||||
|
Many new test cases and bug fixes.
|
||||||
|
|
||||||
3.2.1 Nov-12-14
|
3.2.1 Nov-12-14
|
||||||
Build fix for non-iOS AArch64 targets.
|
Build fix for non-iOS AArch64 targets.
|
||||||
|
|
||||||
3.2 Nov-11-14
|
3.2 Nov-11-14
|
||||||
Add C99 Complex Type support (currently only supported on
|
Add C99 Complex Type support (currently only supported on
|
||||||
s390).
|
s390).
|
||||||
@@ -207,7 +228,7 @@ See the git log for details at http://github.com/libffi/libffi.
|
|||||||
Windows/Linux.
|
Windows/Linux.
|
||||||
Add OpenRISC and Cygwin-64 support.
|
Add OpenRISC and Cygwin-64 support.
|
||||||
Bug fixes.
|
Bug fixes.
|
||||||
|
|
||||||
3.1 May-19-14
|
3.1 May-19-14
|
||||||
Add AArch64 (ARM64) iOS support.
|
Add AArch64 (ARM64) iOS support.
|
||||||
Add Nios II support.
|
Add Nios II support.
|
||||||
@@ -220,7 +241,7 @@ See the git log for details at http://github.com/libffi/libffi.
|
|||||||
failures, and respect the $CC and $CXX environment variables.
|
failures, and respect the $CC and $CXX environment variables.
|
||||||
Archive off the manually maintained ChangeLog in favor of git
|
Archive off the manually maintained ChangeLog in favor of git
|
||||||
log.
|
log.
|
||||||
|
|
||||||
3.0.13 Mar-17-13
|
3.0.13 Mar-17-13
|
||||||
Add Meta support.
|
Add Meta support.
|
||||||
Add missing Moxie bits.
|
Add missing Moxie bits.
|
||||||
@@ -230,7 +251,7 @@ See the git log for details at http://github.com/libffi/libffi.
|
|||||||
Fix the install dir location for some platforms when building
|
Fix the install dir location for some platforms when building
|
||||||
with GCC (OS X, Solaris).
|
with GCC (OS X, Solaris).
|
||||||
Fix Cygwin regression.
|
Fix Cygwin regression.
|
||||||
|
|
||||||
3.0.12 Feb-11-13
|
3.0.12 Feb-11-13
|
||||||
Add Moxie support.
|
Add Moxie support.
|
||||||
Add AArch64 support.
|
Add AArch64 support.
|
||||||
@@ -242,7 +263,7 @@ See the git log for details at http://github.com/libffi/libffi.
|
|||||||
Add support for native vendor compilers on
|
Add support for native vendor compilers on
|
||||||
Solaris and AIX.
|
Solaris and AIX.
|
||||||
Work around LLVM/GCC interoperability issue on x86_64.
|
Work around LLVM/GCC interoperability issue on x86_64.
|
||||||
|
|
||||||
3.0.11 Apr-11-12
|
3.0.11 Apr-11-12
|
||||||
Lots of build fixes.
|
Lots of build fixes.
|
||||||
Add support for variadic functions (ffi_prep_cif_var).
|
Add support for variadic functions (ffi_prep_cif_var).
|
||||||
@@ -253,7 +274,7 @@ See the git log for details at http://github.com/libffi/libffi.
|
|||||||
Integration with iOS' xcode build tools.
|
Integration with iOS' xcode build tools.
|
||||||
Fix Octeon and MC68881 support.
|
Fix Octeon and MC68881 support.
|
||||||
Fix code pessimizations.
|
Fix code pessimizations.
|
||||||
|
|
||||||
3.0.10 Aug-23-11
|
3.0.10 Aug-23-11
|
||||||
Add support for Apple's iOS.
|
Add support for Apple's iOS.
|
||||||
Add support for ARM VFP ABI.
|
Add support for ARM VFP ABI.
|
||||||
@@ -267,128 +288,128 @@ See the git log for details at http://github.com/libffi/libffi.
|
|||||||
Solaris compiler.
|
Solaris compiler.
|
||||||
Testsuite fixes for Tru64 Unix.
|
Testsuite fixes for Tru64 Unix.
|
||||||
Additional platform support.
|
Additional platform support.
|
||||||
|
|
||||||
3.0.9 Dec-31-09
|
3.0.9 Dec-31-09
|
||||||
Add AVR32 and win64 ports. Add ARM softfp support.
|
Add AVR32 and win64 ports. Add ARM softfp support.
|
||||||
Many fixes for AIX, Solaris, HP-UX, *BSD.
|
Many fixes for AIX, Solaris, HP-UX, *BSD.
|
||||||
Several PowerPC and x86-64 bug fixes.
|
Several PowerPC and x86-64 bug fixes.
|
||||||
Build DLL for windows.
|
Build DLL for windows.
|
||||||
|
|
||||||
3.0.8 Dec-19-08
|
3.0.8 Dec-19-08
|
||||||
Add *BSD, BeOS, and PA-Linux support.
|
Add *BSD, BeOS, and PA-Linux support.
|
||||||
|
|
||||||
3.0.7 Nov-11-08
|
3.0.7 Nov-11-08
|
||||||
Fix for ppc FreeBSD.
|
Fix for ppc FreeBSD.
|
||||||
(thanks to Andreas Tobler)
|
(thanks to Andreas Tobler)
|
||||||
|
|
||||||
3.0.6 Jul-17-08
|
3.0.6 Jul-17-08
|
||||||
Fix for closures on sh.
|
Fix for closures on sh.
|
||||||
Mark the sh/sh64 stack as non-executable.
|
Mark the sh/sh64 stack as non-executable.
|
||||||
(both thanks to Kaz Kojima)
|
(both thanks to Kaz Kojima)
|
||||||
|
|
||||||
3.0.5 Apr-3-08
|
3.0.5 Apr-3-08
|
||||||
Fix libffi.pc file.
|
Fix libffi.pc file.
|
||||||
Fix #define ARM for IcedTea users.
|
Fix #define ARM for IcedTea users.
|
||||||
Fix x86 closure bug.
|
Fix x86 closure bug.
|
||||||
|
|
||||||
3.0.4 Feb-24-08
|
3.0.4 Feb-24-08
|
||||||
Fix x86 OpenBSD configury.
|
Fix x86 OpenBSD configury.
|
||||||
|
|
||||||
3.0.3 Feb-22-08
|
3.0.3 Feb-22-08
|
||||||
Enable x86 OpenBSD thanks to Thomas Heller, and
|
Enable x86 OpenBSD thanks to Thomas Heller, and
|
||||||
x86-64 FreeBSD thanks to Björn König and Andreas Tobler.
|
x86-64 FreeBSD thanks to Björn König and Andreas Tobler.
|
||||||
Clean up test instruction in README.
|
Clean up test instruction in README.
|
||||||
|
|
||||||
3.0.2 Feb-21-08
|
3.0.2 Feb-21-08
|
||||||
Improved x86 FreeBSD support.
|
Improved x86 FreeBSD support.
|
||||||
Thanks to Björn König.
|
Thanks to Björn König.
|
||||||
|
|
||||||
3.0.1 Feb-15-08
|
3.0.1 Feb-15-08
|
||||||
Fix instruction cache flushing bug on MIPS.
|
Fix instruction cache flushing bug on MIPS.
|
||||||
Thanks to David Daney.
|
Thanks to David Daney.
|
||||||
|
|
||||||
3.0.0 Feb-15-08
|
3.0.0 Feb-15-08
|
||||||
Many changes, mostly thanks to the GCC project.
|
Many changes, mostly thanks to the GCC project.
|
||||||
Cygnus Solutions is now Red Hat.
|
Cygnus Solutions is now Red Hat.
|
||||||
|
|
||||||
[10 years go by...]
|
[10 years go by...]
|
||||||
|
|
||||||
1.20 Oct-5-98
|
1.20 Oct-5-98
|
||||||
Raffaele Sena produces ARM port.
|
Raffaele Sena produces ARM port.
|
||||||
|
|
||||||
1.19 Oct-5-98
|
1.19 Oct-5-98
|
||||||
Fixed x86 long double and long long return support.
|
Fixed x86 long double and long long return support.
|
||||||
m68k bug fixes from Andreas Schwab.
|
m68k bug fixes from Andreas Schwab.
|
||||||
Patch for DU assembler compatibility for the Alpha from Richard
|
Patch for DU assembler compatibility for the Alpha from Richard
|
||||||
Henderson.
|
Henderson.
|
||||||
|
|
||||||
1.18 Apr-17-98
|
1.18 Apr-17-98
|
||||||
Bug fixes and MIPS configuration changes.
|
Bug fixes and MIPS configuration changes.
|
||||||
|
|
||||||
1.17 Feb-24-98
|
1.17 Feb-24-98
|
||||||
Bug fixes and m68k port from Andreas Schwab. PowerPC port from
|
Bug fixes and m68k port from Andreas Schwab. PowerPC port from
|
||||||
Geoffrey Keating. Various bug x86, Sparc and MIPS bug fixes.
|
Geoffrey Keating. Various bug x86, Sparc and MIPS bug fixes.
|
||||||
|
|
||||||
1.16 Feb-11-98
|
1.16 Feb-11-98
|
||||||
Richard Henderson produces Alpha port.
|
Richard Henderson produces Alpha port.
|
||||||
|
|
||||||
1.15 Dec-4-97
|
1.15 Dec-4-97
|
||||||
Fixed an n32 ABI bug. New libtool, auto* support.
|
Fixed an n32 ABI bug. New libtool, auto* support.
|
||||||
|
|
||||||
1.14 May-13-97
|
1.14 May-13-97
|
||||||
libtool is now used to generate shared and static libraries.
|
libtool is now used to generate shared and static libraries.
|
||||||
Fixed a minor portability problem reported by Russ McManus
|
Fixed a minor portability problem reported by Russ McManus
|
||||||
<mcmanr@eq.gs.com>.
|
<mcmanr@eq.gs.com>.
|
||||||
|
|
||||||
1.13 Dec-2-96
|
1.13 Dec-2-96
|
||||||
Added --enable-purify-safety to keep Purify from complaining
|
Added --enable-purify-safety to keep Purify from complaining
|
||||||
about certain low level code.
|
about certain low level code.
|
||||||
Sparc fix for calling functions with < 6 args.
|
Sparc fix for calling functions with < 6 args.
|
||||||
Linux x86 a.out fix.
|
Linux x86 a.out fix.
|
||||||
|
|
||||||
1.12 Nov-22-96
|
1.12 Nov-22-96
|
||||||
Added missing ffi_type_void, needed for supporting void return
|
Added missing ffi_type_void, needed for supporting void return
|
||||||
types. Fixed test case for non MIPS machines. Cygnus Support
|
types. Fixed test case for non MIPS machines. Cygnus Support
|
||||||
is now Cygnus Solutions.
|
is now Cygnus Solutions.
|
||||||
|
|
||||||
1.11 Oct-30-96
|
1.11 Oct-30-96
|
||||||
Added notes about GNU make.
|
Added notes about GNU make.
|
||||||
|
|
||||||
1.10 Oct-29-96
|
1.10 Oct-29-96
|
||||||
Added configuration fix for non GNU compilers.
|
Added configuration fix for non GNU compilers.
|
||||||
|
|
||||||
1.09 Oct-29-96
|
1.09 Oct-29-96
|
||||||
Added --enable-debug configure switch. Clean-ups based on LCLint
|
Added --enable-debug configure switch. Clean-ups based on LCLint
|
||||||
feedback. ffi_mips.h is always installed. Many configuration
|
feedback. ffi_mips.h is always installed. Many configuration
|
||||||
fixes. Fixed ffitest.c for sparc builds.
|
fixes. Fixed ffitest.c for sparc builds.
|
||||||
|
|
||||||
1.08 Oct-15-96
|
1.08 Oct-15-96
|
||||||
Fixed n32 problem. Many clean-ups.
|
Fixed n32 problem. Many clean-ups.
|
||||||
|
|
||||||
1.07 Oct-14-96
|
1.07 Oct-14-96
|
||||||
Gordon Irlam rewrites v8.S again. Bug fixes.
|
Gordon Irlam rewrites v8.S again. Bug fixes.
|
||||||
|
|
||||||
1.06 Oct-14-96
|
1.06 Oct-14-96
|
||||||
Gordon Irlam improved the sparc port.
|
Gordon Irlam improved the sparc port.
|
||||||
|
|
||||||
1.05 Oct-14-96
|
1.05 Oct-14-96
|
||||||
Interface changes based on feedback.
|
Interface changes based on feedback.
|
||||||
|
|
||||||
1.04 Oct-11-96
|
1.04 Oct-11-96
|
||||||
Sparc port complete (modulo struct passing bug).
|
Sparc port complete (modulo struct passing bug).
|
||||||
|
|
||||||
1.03 Oct-10-96
|
1.03 Oct-10-96
|
||||||
Passing struct args, and returning struct values works for
|
Passing struct args, and returning struct values works for
|
||||||
all architectures/calling conventions. Expanded tests.
|
all architectures/calling conventions. Expanded tests.
|
||||||
|
|
||||||
1.02 Oct-9-96
|
1.02 Oct-9-96
|
||||||
Added SGI n32 support. Fixed bugs in both o32 and Linux support.
|
Added SGI n32 support. Fixed bugs in both o32 and Linux support.
|
||||||
Added "make test".
|
Added "make test".
|
||||||
|
|
||||||
1.01 Oct-8-96
|
1.01 Oct-8-96
|
||||||
Fixed float passing bug in mips version. Restructured some
|
Fixed float passing bug in mips version. Restructured some
|
||||||
of the code. Builds cleanly with SGI tools.
|
of the code. Builds cleanly with SGI tools.
|
||||||
|
|
||||||
1.00 Oct-7-96
|
1.00 Oct-7-96
|
||||||
First release. No public announcement.
|
First release. No public announcement.
|
||||||
|
|
||||||
@@ -412,14 +433,19 @@ developers:
|
|||||||
|
|
||||||
aarch64 Marcus Shawcroft, James Greenhalgh
|
aarch64 Marcus Shawcroft, James Greenhalgh
|
||||||
alpha Richard Henderson
|
alpha Richard Henderson
|
||||||
|
arc Hackers at Synopsis
|
||||||
arm Raffaele Sena
|
arm Raffaele Sena
|
||||||
|
avr32 Bradley Smith
|
||||||
blackfin Alexandre Keunecke I. de Mendonca
|
blackfin Alexandre Keunecke I. de Mendonca
|
||||||
cris Simon Posnjak, Hans-Peter Nilsson
|
cris Simon Posnjak, Hans-Peter Nilsson
|
||||||
|
csky Ma Jun, Zhang Wenmeng
|
||||||
frv Anthony Green
|
frv Anthony Green
|
||||||
ia64 Hans Boehm
|
ia64 Hans Boehm
|
||||||
|
kvx Yann Sionneau
|
||||||
m32r Kazuhiro Inaoka
|
m32r Kazuhiro Inaoka
|
||||||
m68k Andreas Schwab
|
m68k Andreas Schwab
|
||||||
m88k Miod Vallat
|
m88k Miod Vallat
|
||||||
|
metag Hackers at Imagination Technologies
|
||||||
microblaze Nathan Rossi
|
microblaze Nathan Rossi
|
||||||
mips Anthony Green, Casey Marshall
|
mips Anthony Green, Casey Marshall
|
||||||
mips64 David Daney
|
mips64 David Daney
|
||||||
@@ -430,6 +456,7 @@ developers:
|
|||||||
powerpc Geoffrey Keating, Andreas Tobler,
|
powerpc Geoffrey Keating, Andreas Tobler,
|
||||||
David Edelsohn, John Hornkvist
|
David Edelsohn, John Hornkvist
|
||||||
powerpc64 Jakub Jelinek
|
powerpc64 Jakub Jelinek
|
||||||
|
riscv Michael Knyszek, Andrew Waterman, Stef O'Rear
|
||||||
s390 Gerhard Tonn, Ulrich Weigand
|
s390 Gerhard Tonn, Ulrich Weigand
|
||||||
sh Kaz Kojima
|
sh Kaz Kojima
|
||||||
sh64 Kaz Kojima
|
sh64 Kaz Kojima
|
||||||
@@ -456,6 +483,11 @@ Alex Oliva solved the executable page problem for SElinux.
|
|||||||
The list above is almost certainly incomplete and inaccurate. I'm
|
The list above is almost certainly incomplete and inaccurate. I'm
|
||||||
happy to make corrections or additions upon request.
|
happy to make corrections or additions upon request.
|
||||||
|
|
||||||
If you have a problem, or have found a bug, please send a note to the
|
If you have a problem, or have found a bug, please file an issue on
|
||||||
author at green@moxielogic.com, or the project mailing list at
|
our issue tracker at https://github.com/libffi/libffi/issues.
|
||||||
libffi-discuss@sourceware.org.
|
|
||||||
|
The author can be reached at green@moxielogic.com.
|
||||||
|
|
||||||
|
To subscribe/unsubscribe to our mailing lists, visit:
|
||||||
|
https://sourceware.org/mailman/listinfo/libffi-announce
|
||||||
|
https://sourceware.org/mailman/listinfo/libffi-discuss
|
||||||
|
|||||||
2120
aclocal.m4
vendored
Normal file
2120
aclocal.m4
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,2 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
exec autoreconf -v -i
|
|
||||||
11
.travis/compile → compile
Executable file → Normal file
11
.travis/compile → compile
Executable file → Normal file
@@ -1,9 +1,9 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Wrapper for compilers which do not understand '-c -o'.
|
# Wrapper for compilers which do not understand '-c -o'.
|
||||||
|
|
||||||
scriptversion=2018-03-27.18; # UTC
|
scriptversion=2018-03-07.03; # UTC
|
||||||
|
|
||||||
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
|
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
|
||||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
@@ -53,7 +53,7 @@ func_file_conv ()
|
|||||||
MINGW*)
|
MINGW*)
|
||||||
file_conv=mingw
|
file_conv=mingw
|
||||||
;;
|
;;
|
||||||
CYGWIN*)
|
CYGWIN* | MSYS*)
|
||||||
file_conv=cygwin
|
file_conv=cygwin
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@@ -67,7 +67,7 @@ func_file_conv ()
|
|||||||
mingw/*)
|
mingw/*)
|
||||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||||
;;
|
;;
|
||||||
cygwin/*)
|
cygwin/* | msys/*)
|
||||||
file=`cygpath -m "$file" || echo "$file"`
|
file=`cygpath -m "$file" || echo "$file"`
|
||||||
;;
|
;;
|
||||||
wine/*)
|
wine/*)
|
||||||
@@ -187,9 +187,6 @@ func_cl_wrapper ()
|
|||||||
-static)
|
-static)
|
||||||
shared=false
|
shared=false
|
||||||
;;
|
;;
|
||||||
-warn)
|
|
||||||
eat=1
|
|
||||||
;;
|
|
||||||
-Wl,*)
|
-Wl,*)
|
||||||
arg=${1#-Wl,}
|
arg=${1#-Wl,}
|
||||||
save_ifs="$IFS"; IFS=','
|
save_ifs="$IFS"; IFS=','
|
||||||
883
config.guess
vendored
883
config.guess
vendored
File diff suppressed because it is too large
Load Diff
2881
config.sub
vendored
2881
config.sub
vendored
File diff suppressed because it is too large
Load Diff
62
configure.ac
62
configure.ac
@@ -2,7 +2,7 @@ dnl Process this with autoconf to create configure
|
|||||||
|
|
||||||
AC_PREREQ(2.68)
|
AC_PREREQ(2.68)
|
||||||
|
|
||||||
AC_INIT([libffi], [3.3-rc0], [http://github.com/libffi/libffi/issues])
|
AC_INIT([libffi], [3.4.2], [http://github.com/libffi/libffi/issues])
|
||||||
AC_CONFIG_HEADERS([fficonfig.h])
|
AC_CONFIG_HEADERS([fficonfig.h])
|
||||||
|
|
||||||
AC_CANONICAL_SYSTEM
|
AC_CANONICAL_SYSTEM
|
||||||
@@ -41,6 +41,8 @@ AM_PROG_CC_C_O
|
|||||||
AC_PROG_LIBTOOL
|
AC_PROG_LIBTOOL
|
||||||
AC_CONFIG_MACRO_DIR([m4])
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
|
|
||||||
|
AC_CHECK_TOOL(READELF, readelf)
|
||||||
|
|
||||||
# Test for 64-bit build.
|
# Test for 64-bit build.
|
||||||
AC_CHECK_SIZEOF([size_t])
|
AC_CHECK_SIZEOF([size_t])
|
||||||
|
|
||||||
@@ -59,12 +61,16 @@ fi
|
|||||||
cat > local.exp <<EOF
|
cat > local.exp <<EOF
|
||||||
set CC_FOR_TARGET "$CC"
|
set CC_FOR_TARGET "$CC"
|
||||||
set CXX_FOR_TARGET "$CXX"
|
set CXX_FOR_TARGET "$CXX"
|
||||||
|
set compiler_vendor "$ax_cv_c_compiler_vendor"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
AM_MAINTAINER_MODE
|
AM_MAINTAINER_MODE
|
||||||
|
|
||||||
|
AC_CHECK_HEADERS(sys/memfd.h)
|
||||||
|
AC_CHECK_FUNCS([memfd_create])
|
||||||
|
|
||||||
AC_CHECK_HEADERS(sys/mman.h)
|
AC_CHECK_HEADERS(sys/mman.h)
|
||||||
AC_CHECK_FUNCS([mmap mkostemp])
|
AC_CHECK_FUNCS([mmap mkostemp mkstemp])
|
||||||
AC_FUNC_MMAP_BLACKLIST
|
AC_FUNC_MMAP_BLACKLIST
|
||||||
|
|
||||||
dnl The -no-testsuite modules omit the test subdir.
|
dnl The -no-testsuite modules omit the test subdir.
|
||||||
@@ -176,6 +182,28 @@ case "$TARGET" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
AC_CACHE_CHECK([whether compiler supports pointer authentication],
|
||||||
|
libffi_cv_as_ptrauth, [
|
||||||
|
libffi_cv_as_ptrauth=unknown
|
||||||
|
AC_TRY_COMPILE(,[
|
||||||
|
#ifdef __clang__
|
||||||
|
# if __has_feature(ptrauth_calls)
|
||||||
|
# define HAVE_PTRAUTH 1
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_PTRAUTH
|
||||||
|
# error Pointer authentication not supported
|
||||||
|
#endif
|
||||||
|
],
|
||||||
|
[libffi_cv_as_ptrauth=yes],
|
||||||
|
[libffi_cv_as_ptrauth=no])
|
||||||
|
])
|
||||||
|
if test "x$libffi_cv_as_ptrauth" = xyes; then
|
||||||
|
AC_DEFINE(HAVE_PTRAUTH, 1,
|
||||||
|
[Define if your compiler supports pointer authentication.])
|
||||||
|
fi
|
||||||
|
|
||||||
# On PaX enable kernels that have MPROTECT enable we can't use PROT_EXEC.
|
# On PaX enable kernels that have MPROTECT enable we can't use PROT_EXEC.
|
||||||
AC_ARG_ENABLE(pax_emutramp,
|
AC_ARG_ENABLE(pax_emutramp,
|
||||||
[ --enable-pax_emutramp enable pax emulated trampolines, for we can't use PROT_EXEC],
|
[ --enable-pax_emutramp enable pax emulated trampolines, for we can't use PROT_EXEC],
|
||||||
@@ -238,19 +266,15 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$GCC" = "xyes"; then
|
if test "x$GCC" = "xyes"; then
|
||||||
|
AX_CHECK_COMPILE_FLAG(-fno-lto, libffi_cv_no_lto=-fno-lto)
|
||||||
|
|
||||||
AC_CACHE_CHECK([whether .eh_frame section should be read-only],
|
AC_CACHE_CHECK([whether .eh_frame section should be read-only],
|
||||||
libffi_cv_ro_eh_frame, [
|
libffi_cv_ro_eh_frame, [
|
||||||
libffi_cv_ro_eh_frame=no
|
libffi_cv_ro_eh_frame=yes
|
||||||
echo 'extern void foo (void); void bar (void) { foo (); foo (); }' > conftest.c
|
echo 'extern void foo (void); void bar (void) { foo (); foo (); }' > conftest.c
|
||||||
if $CC $CFLAGS -c -fpic -fexceptions -o conftest.o conftest.c > /dev/null 2>&1; then
|
if $CC $CFLAGS -c -fpic -fexceptions $libffi_cv_no_lto -o conftest.o conftest.c > /dev/null 2>&1; then
|
||||||
objdump -h conftest.o > conftest.dump 2>&1
|
if $READELF -WS conftest.o | grep -q -n 'eh_frame .* WA'; then
|
||||||
libffi_eh_frame_line=`grep -n eh_frame conftest.dump | cut -d: -f 1`
|
libffi_cv_ro_eh_frame=no
|
||||||
if test "x$libffi_eh_frame_line" != "x"; then
|
|
||||||
libffi_test_line=`expr $libffi_eh_frame_line + 1`p
|
|
||||||
sed -n $libffi_test_line conftest.dump > conftest.line
|
|
||||||
if grep READONLY conftest.line > /dev/null; then
|
|
||||||
libffi_cv_ro_eh_frame=yes
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
rm -f conftest.*
|
rm -f conftest.*
|
||||||
@@ -342,6 +366,20 @@ AC_ARG_ENABLE(raw-api,
|
|||||||
AC_DEFINE(FFI_NO_RAW_API, 1, [Define this if you do not want support for the raw API.])
|
AC_DEFINE(FFI_NO_RAW_API, 1, [Define this if you do not want support for the raw API.])
|
||||||
fi)
|
fi)
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(exec-static-tramp,
|
||||||
|
[ --disable-exec-static-tramp disable use of static exec trampolines (enabled by default)])
|
||||||
|
|
||||||
|
if test "$enable_exec_static_tramp" != no; then
|
||||||
|
case "$target" in
|
||||||
|
*-cygwin*)
|
||||||
|
;;
|
||||||
|
*arm*-*-linux-* | aarch64*-*-linux-* | i*86-*-linux-* | x86_64-*-linux-*)
|
||||||
|
AC_DEFINE(FFI_EXEC_STATIC_TRAMP, 1,
|
||||||
|
[Define this if you want statically defined trampolines])
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
AC_ARG_ENABLE(purify-safety,
|
AC_ARG_ENABLE(purify-safety,
|
||||||
[ --enable-purify-safety purify-safe mode],
|
[ --enable-purify-safety purify-safe mode],
|
||||||
if test "$enable_purify_safety" = "yes"; then
|
if test "$enable_purify_safety" = "yes"; then
|
||||||
|
|||||||
@@ -6,6 +6,13 @@
|
|||||||
# THIS TABLE IS SORTED. KEEP IT THAT WAY.
|
# THIS TABLE IS SORTED. KEEP IT THAT WAY.
|
||||||
# Most of the time we can define all the variables all at once...
|
# Most of the time we can define all the variables all at once...
|
||||||
case "${host}" in
|
case "${host}" in
|
||||||
|
aarch64*-*-cygwin* | aarch64*-*-mingw* | aarch64*-*-win* )
|
||||||
|
TARGET=ARM_WIN64; TARGETDIR=aarch64
|
||||||
|
if test "${ax_cv_c_compiler_vendor}" = "microsoft"; then
|
||||||
|
MSVC=1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
aarch64*-*-*)
|
aarch64*-*-*)
|
||||||
TARGET=AARCH64; TARGETDIR=aarch64
|
TARGET=AARCH64; TARGETDIR=aarch64
|
||||||
SOURCES="ffi.c sysv.S"
|
SOURCES="ffi.c sysv.S"
|
||||||
@@ -23,6 +30,13 @@ case "${host}" in
|
|||||||
SOURCES="ffi.c arcompact.S"
|
SOURCES="ffi.c arcompact.S"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
arm*-*-cygwin* | arm*-*-mingw* | arm*-*-win* )
|
||||||
|
TARGET=ARM_WIN32; TARGETDIR=arm
|
||||||
|
if test "${ax_cv_c_compiler_vendor}" = "microsoft"; then
|
||||||
|
MSVC=1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
arm*-*-*)
|
arm*-*-*)
|
||||||
TARGET=ARM; TARGETDIR=arm
|
TARGET=ARM; TARGETDIR=arm
|
||||||
SOURCES="ffi.c sysv.S"
|
SOURCES="ffi.c sysv.S"
|
||||||
@@ -43,6 +57,11 @@ case "${host}" in
|
|||||||
SOURCES="ffi.c sysv.S"
|
SOURCES="ffi.c sysv.S"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
csky-*-*)
|
||||||
|
TARGET=CSKY; TARGETDIR=csky
|
||||||
|
SOURCES="ffi.c sysv.S"
|
||||||
|
;;
|
||||||
|
|
||||||
frv-*-*)
|
frv-*-*)
|
||||||
TARGET=FRV; TARGETDIR=frv
|
TARGET=FRV; TARGETDIR=frv
|
||||||
SOURCES="ffi.c eabi.S"
|
SOURCES="ffi.c eabi.S"
|
||||||
@@ -64,7 +83,7 @@ case "${host}" in
|
|||||||
TARGET=X86_FREEBSD; TARGETDIR=x86
|
TARGET=X86_FREEBSD; TARGETDIR=x86
|
||||||
;;
|
;;
|
||||||
|
|
||||||
i?86-*-cygwin* | i?86-*-mingw* | i?86-*-os2* | i?86-*-interix* \
|
i?86-*-cygwin* | i?86-*-mingw* | i?86-*-win* | i?86-*-os2* | i?86-*-interix* \
|
||||||
| x86_64-*-cygwin* | x86_64-*-mingw* | x86_64-*-win* )
|
| x86_64-*-cygwin* | x86_64-*-mingw* | x86_64-*-win* )
|
||||||
TARGETDIR=x86
|
TARGETDIR=x86
|
||||||
if test $ac_cv_sizeof_size_t = 4; then
|
if test $ac_cv_sizeof_size_t = 4; then
|
||||||
@@ -74,12 +93,6 @@ case "${host}" in
|
|||||||
fi
|
fi
|
||||||
if test "${ax_cv_c_compiler_vendor}" = "microsoft"; then
|
if test "${ax_cv_c_compiler_vendor}" = "microsoft"; then
|
||||||
MSVC=1
|
MSVC=1
|
||||||
if test $ac_cv_sizeof_size_t = 4; then
|
|
||||||
# libffi does not support microsoft tools for 32-bit windows
|
|
||||||
# hosts. Try porting src/x86/sysv.S to intel assembly
|
|
||||||
# format.
|
|
||||||
UNSUPPORTED=1
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
# All mingw/cygwin/win32 builds require -no-undefined for sharedlib.
|
# All mingw/cygwin/win32 builds require -no-undefined for sharedlib.
|
||||||
# We must also check with_cross_host to decide if this is a native
|
# We must also check with_cross_host to decide if this is a native
|
||||||
@@ -104,22 +117,14 @@ case "${host}" in
|
|||||||
i?86-*-* | x86_64-*-* | amd64-*)
|
i?86-*-* | x86_64-*-* | amd64-*)
|
||||||
TARGETDIR=x86
|
TARGETDIR=x86
|
||||||
if test $ac_cv_sizeof_size_t = 4; then
|
if test $ac_cv_sizeof_size_t = 4; then
|
||||||
case "$host" in
|
echo 'int foo (void) { return __x86_64__; }' > conftest.c
|
||||||
x86_64-*x32|x86_64-x32-*)
|
if $CC $CFLAGS -Werror -S conftest.c -o conftest.s > /dev/null 2>&1; then
|
||||||
TARGET_X32=yes
|
TARGET_X32=yes
|
||||||
TARGET=X86_64
|
TARGET=X86_64
|
||||||
;;
|
else
|
||||||
*)
|
TARGET=X86;
|
||||||
echo 'int foo (void) { return __x86_64__; }' > conftest.c
|
fi
|
||||||
if $CC $CFLAGS -Werror -S conftest.c -o conftest.s > /dev/null 2>&1; then
|
rm -f conftest.*
|
||||||
TARGET_X32=yes
|
|
||||||
TARGET=X86_64
|
|
||||||
else
|
|
||||||
TARGET=X86;
|
|
||||||
fi
|
|
||||||
rm -f conftest.*
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
else
|
else
|
||||||
TARGET=X86_64;
|
TARGET=X86_64;
|
||||||
fi
|
fi
|
||||||
@@ -130,6 +135,11 @@ case "${host}" in
|
|||||||
SOURCES="ffi.c unix.S"
|
SOURCES="ffi.c unix.S"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
kvx-*-*)
|
||||||
|
TARGET=KVX; TARGETDIR=kvx
|
||||||
|
SOURCES="ffi.c sysv.S"
|
||||||
|
;;
|
||||||
|
|
||||||
m32r*-*-*)
|
m32r*-*-*)
|
||||||
TARGET=M32R; TARGETDIR=m32r
|
TARGET=M32R; TARGETDIR=m32r
|
||||||
SOURCES="ffi.c sysv.S"
|
SOURCES="ffi.c sysv.S"
|
||||||
@@ -163,7 +173,7 @@ case "${host}" in
|
|||||||
mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*)
|
mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*)
|
||||||
TARGET=MIPS; TARGETDIR=mips
|
TARGET=MIPS; TARGETDIR=mips
|
||||||
;;
|
;;
|
||||||
mips*-*linux* | mips*-*-openbsd*)
|
mips*-*linux* | mips*-*-openbsd* | mips*-*-freebsd*)
|
||||||
# Support 128-bit long double for NewABI.
|
# Support 128-bit long double for NewABI.
|
||||||
HAVE_LONG_DOUBLE='defined(__mips64)'
|
HAVE_LONG_DOUBLE='defined(__mips64)'
|
||||||
TARGET=MIPS; TARGETDIR=mips
|
TARGET=MIPS; TARGETDIR=mips
|
||||||
@@ -174,7 +184,7 @@ case "${host}" in
|
|||||||
SOURCES="ffi.c sysv.S"
|
SOURCES="ffi.c sysv.S"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
or1k*-linux*)
|
or1k*-*-*)
|
||||||
TARGET=OR1K; TARGETDIR=or1k
|
TARGET=OR1K; TARGETDIR=or1k
|
||||||
SOURCES="ffi.c sysv.S"
|
SOURCES="ffi.c sysv.S"
|
||||||
;;
|
;;
|
||||||
@@ -186,6 +196,9 @@ case "${host}" in
|
|||||||
powerpc-*-amigaos*)
|
powerpc-*-amigaos*)
|
||||||
TARGET=POWERPC; TARGETDIR=powerpc
|
TARGET=POWERPC; TARGETDIR=powerpc
|
||||||
;;
|
;;
|
||||||
|
powerpc-*-eabi*)
|
||||||
|
TARGET=POWERPC; TARGETDIR=powerpc
|
||||||
|
;;
|
||||||
powerpc-*-beos*)
|
powerpc-*-beos*)
|
||||||
TARGET=POWERPC; TARGETDIR=powerpc
|
TARGET=POWERPC; TARGETDIR=powerpc
|
||||||
;;
|
;;
|
||||||
@@ -199,7 +212,11 @@ case "${host}" in
|
|||||||
TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc
|
TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc
|
||||||
HAVE_LONG_DOUBLE_VARIANT=1
|
HAVE_LONG_DOUBLE_VARIANT=1
|
||||||
;;
|
;;
|
||||||
powerpc64-*-freebsd*)
|
powerpcspe-*-freebsd*)
|
||||||
|
TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc
|
||||||
|
CFLAGS="$CFLAGS -D__NO_FPRS__"
|
||||||
|
;;
|
||||||
|
powerpc64-*-freebsd* | powerpc64le-*-freebsd*)
|
||||||
TARGET=POWERPC; TARGETDIR=powerpc
|
TARGET=POWERPC; TARGETDIR=powerpc
|
||||||
;;
|
;;
|
||||||
powerpc*-*-rtems*)
|
powerpc*-*-rtems*)
|
||||||
@@ -248,6 +265,20 @@ esac
|
|||||||
|
|
||||||
# ... but some of the cases above share configury.
|
# ... but some of the cases above share configury.
|
||||||
case "${TARGET}" in
|
case "${TARGET}" in
|
||||||
|
ARM_WIN32)
|
||||||
|
if test "$MSVC" = 1; then
|
||||||
|
SOURCES="ffi.c sysv_msvc_arm32.S"
|
||||||
|
else
|
||||||
|
SOURCES="ffi.c sysv.S"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
ARM_WIN64)
|
||||||
|
if test "$MSVC" = 1; then
|
||||||
|
SOURCES="ffi.c win64_armasm.S"
|
||||||
|
else
|
||||||
|
SOURCES="ffi.c sysv.S"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
MIPS)
|
MIPS)
|
||||||
SOURCES="ffi.c o32.S n32.S"
|
SOURCES="ffi.c o32.S n32.S"
|
||||||
;;
|
;;
|
||||||
@@ -265,7 +296,11 @@ case "${TARGET}" in
|
|||||||
SOURCES="ffi.c ffi_sysv.c sysv.S ppc_closure.S"
|
SOURCES="ffi.c ffi_sysv.c sysv.S ppc_closure.S"
|
||||||
;;
|
;;
|
||||||
X86 | X86_DARWIN | X86_FREEBSD | X86_WIN32)
|
X86 | X86_DARWIN | X86_FREEBSD | X86_WIN32)
|
||||||
SOURCES="ffi.c sysv.S"
|
if test "$MSVC" = 1; then
|
||||||
|
SOURCES="ffi.c sysv_intel.S"
|
||||||
|
else
|
||||||
|
SOURCES="ffi.c sysv.S"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
X86_64)
|
X86_64)
|
||||||
if test x"$TARGET_X32" = xyes; then
|
if test x"$TARGET_X32" = xyes; then
|
||||||
|
|||||||
791
depcomp
Normal file
791
depcomp
Normal file
@@ -0,0 +1,791 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# depcomp - compile a program generating dependencies as side-effects
|
||||||
|
|
||||||
|
scriptversion=2018-03-07.03; # UTC
|
||||||
|
|
||||||
|
# Copyright (C) 1999-2020 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:
|
||||||
816
doc/Makefile.in
Normal file
816
doc/Makefile.in
Normal file
@@ -0,0 +1,816 @@
|
|||||||
|
# Makefile.in generated by automake 1.16.2 from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
|
# Copyright (C) 1994-2020 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_append_flag.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_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@
|
||||||
|
ALLOCA = @ALLOCA@
|
||||||
|
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@
|
||||||
|
CPP = @CPP@
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
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@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
FFI_EXEC_TRAMPOLINE_TABLE = @FFI_EXEC_TRAMPOLINE_TABLE@
|
||||||
|
FGREP = @FGREP@
|
||||||
|
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@
|
||||||
|
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@
|
||||||
|
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@
|
||||||
|
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:
|
||||||
1062
doc/libffi.info
Normal file
1062
doc/libffi.info
Normal file
File diff suppressed because it is too large
Load Diff
BIN
doc/libffi.pdf
Normal file
BIN
doc/libffi.pdf
Normal file
Binary file not shown.
118
doc/libffi.texi
118
doc/libffi.texi
@@ -1,7 +1,8 @@
|
|||||||
\input texinfo @c -*-texinfo-*-
|
\input texinfo @c -*-texinfo-*-
|
||||||
@c %**start of header
|
@c %**start of header
|
||||||
@setfilename libffi.info
|
@setfilename libffi.info
|
||||||
@settitle libffi
|
@include version.texi
|
||||||
|
@settitle libffi: the portable foreign function interface library
|
||||||
@setchapternewpage off
|
@setchapternewpage off
|
||||||
@c %**end of header
|
@c %**end of header
|
||||||
|
|
||||||
@@ -12,32 +13,43 @@
|
|||||||
@syncodeindex pg cp
|
@syncodeindex pg cp
|
||||||
@syncodeindex tp cp
|
@syncodeindex tp cp
|
||||||
|
|
||||||
@include version.texi
|
|
||||||
|
|
||||||
@copying
|
@copying
|
||||||
|
|
||||||
This manual is for Libffi, a portable foreign-function interface
|
This manual is for libffi, a portable foreign function interface
|
||||||
library.
|
library.
|
||||||
|
|
||||||
Copyright @copyright{} 2008, 2010, 2011 Red Hat, Inc.
|
Copyright @copyright{} 2008--2019, 2021 Anthony Green and Red Hat, Inc.
|
||||||
|
|
||||||
@quotation
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
Permission is granted to copy, distribute and/or modify this document
|
a copy of this software and associated documentation files (the
|
||||||
under the terms of the GNU General Public License as published by the
|
``Software''), to deal in the Software without restriction, including
|
||||||
Free Software Foundation; either version 2, or (at your option) any
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
later version. A copy of the license is included in the
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
section entitled ``GNU General Public License''.
|
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.
|
||||||
|
|
||||||
@end quotation
|
|
||||||
@end copying
|
@end copying
|
||||||
|
|
||||||
@dircategory Development
|
@dircategory Development
|
||||||
@direntry
|
@direntry
|
||||||
* libffi: (libffi). Portable foreign-function interface library.
|
* libffi: (libffi). Portable foreign function interface library.
|
||||||
@end direntry
|
@end direntry
|
||||||
|
|
||||||
@titlepage
|
@titlepage
|
||||||
@title Libffi
|
@title libffi: a foreign function interface library
|
||||||
|
@subtitle For Version @value{VERSION} of libffi
|
||||||
|
@author Anthony Green
|
||||||
@page
|
@page
|
||||||
@vskip 0pt plus 1filll
|
@vskip 0pt plus 1filll
|
||||||
@insertcopying
|
@insertcopying
|
||||||
@@ -53,6 +65,7 @@ section entitled ``GNU General Public License''.
|
|||||||
@menu
|
@menu
|
||||||
* Introduction:: What is libffi?
|
* Introduction:: What is libffi?
|
||||||
* Using libffi:: How to use libffi.
|
* Using libffi:: How to use libffi.
|
||||||
|
* Memory Usage:: Where memory for closures comes from.
|
||||||
* Missing Features:: Things libffi can't do.
|
* Missing Features:: Things libffi can't do.
|
||||||
* Index:: Index.
|
* Index:: Index.
|
||||||
@end menu
|
@end menu
|
||||||
@@ -164,6 +177,11 @@ variadic arguments. It must be greater than zero.
|
|||||||
@var{ntotalargs} the total number of arguments, including variadic
|
@var{ntotalargs} the total number of arguments, including variadic
|
||||||
and fixed arguments. @var{argtypes} must have this many elements.
|
and fixed arguments. @var{argtypes} must have this many elements.
|
||||||
|
|
||||||
|
@code{ffi_prep_cif_var} will return @code{FFI_BAD_ARGTYPE} if any of
|
||||||
|
the variable argument types are @code{ffi_type_float} (promote to
|
||||||
|
@code{ffi_type_double} first), or any integer type small than an int
|
||||||
|
(promote to an int-sized type first).
|
||||||
|
|
||||||
Note that, different cif's must be prepped for calls to the same
|
Note that, different cif's must be prepped for calls to the same
|
||||||
function when different numbers of arguments are passed.
|
function when different numbers of arguments are passed.
|
||||||
|
|
||||||
@@ -237,26 +255,26 @@ int main()
|
|||||||
void *values[1];
|
void *values[1];
|
||||||
char *s;
|
char *s;
|
||||||
ffi_arg rc;
|
ffi_arg rc;
|
||||||
|
|
||||||
/* Initialize the argument info vectors */
|
/* Initialize the argument info vectors */
|
||||||
args[0] = &ffi_type_pointer;
|
args[0] = &ffi_type_pointer;
|
||||||
values[0] = &s;
|
values[0] = &s;
|
||||||
|
|
||||||
/* Initialize the cif */
|
/* Initialize the cif */
|
||||||
if (ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1,
|
if (ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1,
|
||||||
&ffi_type_sint, args) == FFI_OK)
|
&ffi_type_sint, args) == FFI_OK)
|
||||||
@{
|
@{
|
||||||
s = "Hello World!";
|
s = "Hello World!";
|
||||||
ffi_call(&cif, puts, &rc, values);
|
ffi_call(&cif, puts, &rc, values);
|
||||||
/* rc now holds the result of the call to puts */
|
/* rc now holds the result of the call to puts */
|
||||||
|
|
||||||
/* values holds a pointer to the function's arg, so to
|
/* values holds a pointer to the function's arg, so to
|
||||||
call puts() again all we need to do is change the
|
call puts() again all we need to do is change the
|
||||||
value of s */
|
value of s */
|
||||||
s = "This is cool!";
|
s = "This is cool!";
|
||||||
ffi_call(&cif, puts, &rc, values);
|
ffi_call(&cif, puts, &rc, values);
|
||||||
@}
|
@}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@}
|
@}
|
||||||
@end example
|
@end example
|
||||||
@@ -612,7 +630,7 @@ Here is the corresponding code to describe this struct to
|
|||||||
tm_type.size = tm_type.alignment = 0;
|
tm_type.size = tm_type.alignment = 0;
|
||||||
tm_type.type = FFI_TYPE_STRUCT;
|
tm_type.type = FFI_TYPE_STRUCT;
|
||||||
tm_type.elements = &tm_type_elements;
|
tm_type.elements = &tm_type_elements;
|
||||||
|
|
||||||
for (i = 0; i < 9; i++)
|
for (i = 0; i < 9; i++)
|
||||||
tm_type_elements[i] = &ffi_type_sint;
|
tm_type_elements[i] = &ffi_type_sint;
|
||||||
|
|
||||||
@@ -875,7 +893,7 @@ writable and executable addresses.
|
|||||||
@node Closure Example
|
@node Closure Example
|
||||||
@section Closure Example
|
@section Closure Example
|
||||||
|
|
||||||
A trivial example that creates a new @code{puts} by binding
|
A trivial example that creates a new @code{puts} by binding
|
||||||
@code{fputs} with @code{stdout}.
|
@code{fputs} with @code{stdout}.
|
||||||
|
|
||||||
@example
|
@example
|
||||||
@@ -953,6 +971,55 @@ Currently the only affected platform is PowerPC and the only affected
|
|||||||
type is @code{long double}.
|
type is @code{long double}.
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
|
@node Memory Usage
|
||||||
|
@chapter Memory Usage
|
||||||
|
|
||||||
|
Note that memory allocated by @code{ffi_closure_alloc} and freed by
|
||||||
|
@code{ffi_closure_free} does not come from the same general pool of
|
||||||
|
memory that @code{malloc} and @code{free} use. To accomodate security
|
||||||
|
settings, @samp{libffi} may aquire memory, for example, by mapping
|
||||||
|
temporary files into multiple places in the address space (once to
|
||||||
|
write out the closure, a second to execute it). The search follows
|
||||||
|
this list, using the first that works:
|
||||||
|
|
||||||
|
@itemize @bullet
|
||||||
|
|
||||||
|
@item
|
||||||
|
A anonymous mapping (i.e. not file-backed)
|
||||||
|
|
||||||
|
@item
|
||||||
|
@code{memfd_create()}, if the kernel supports it.
|
||||||
|
|
||||||
|
@item
|
||||||
|
A file created in the directory referenced by the environment variable
|
||||||
|
@code{LIBFFI_TMPDIR}.
|
||||||
|
|
||||||
|
@item
|
||||||
|
Likewise for the environment variable @code{TMPDIR}.
|
||||||
|
|
||||||
|
@item
|
||||||
|
A file created in @code{/tmp}.
|
||||||
|
|
||||||
|
@item
|
||||||
|
A file created in @code{/var/tmp}.
|
||||||
|
|
||||||
|
@item
|
||||||
|
A file created in @code{/dev/shm}.
|
||||||
|
|
||||||
|
@item
|
||||||
|
A file created in the user's home directory (@code{$HOME}).
|
||||||
|
|
||||||
|
@item
|
||||||
|
A file created in any directory listed in @code{/etc/mtab}.
|
||||||
|
|
||||||
|
@item
|
||||||
|
A file created in any directory listed in @code{/proc/mounts}.
|
||||||
|
|
||||||
|
@end itemize
|
||||||
|
|
||||||
|
If security settings prohibit using any of these for closures,
|
||||||
|
@code{ffi_closure_alloc} will fail.
|
||||||
|
|
||||||
@node Missing Features
|
@node Missing Features
|
||||||
@chapter Missing Features
|
@chapter Missing Features
|
||||||
|
|
||||||
@@ -974,9 +1041,6 @@ The ``raw'' API is undocumented.
|
|||||||
The Go API is undocumented.
|
The Go API is undocumented.
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
Note that variadic support is very new and tested on a relatively
|
|
||||||
small number of platforms.
|
|
||||||
|
|
||||||
@node Index
|
@node Index
|
||||||
@unnumbered Index
|
@unnumbered Index
|
||||||
|
|
||||||
|
|||||||
228
doc/mdate-sh
Normal file
228
doc/mdate-sh
Normal file
@@ -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-2020 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:
|
||||||
4
doc/stamp-vti
Normal file
4
doc/stamp-vti
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
@set UPDATED 27 June 2021
|
||||||
|
@set UPDATED-MONTH June 2021
|
||||||
|
@set EDITION 3.4.2
|
||||||
|
@set VERSION 3.4.2
|
||||||
11614
doc/texinfo.tex
Normal file
11614
doc/texinfo.tex
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
|||||||
@set UPDATED 2 April 2018
|
@set UPDATED 27 June 2021
|
||||||
@set UPDATED-MONTH April 2018
|
@set UPDATED-MONTH June 2021
|
||||||
@set EDITION 3.3-rc0
|
@set EDITION 3.4.2
|
||||||
@set VERSION 3.3-rc0
|
@set VERSION 3.4.2
|
||||||
|
|||||||
229
fficonfig.h.in
Normal file
229
fficonfig.h.in
Normal file
@@ -0,0 +1,229 @@
|
|||||||
|
/* fficonfig.h.in. Generated from configure.ac by autoheader. */
|
||||||
|
|
||||||
|
/* Define if building universal (internal helper macro) */
|
||||||
|
#undef AC_APPLE_UNIVERSAL_BUILD
|
||||||
|
|
||||||
|
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
|
||||||
|
systems. This function is required for `alloca.c' support on those systems.
|
||||||
|
*/
|
||||||
|
#undef CRAY_STACKSEG_END
|
||||||
|
|
||||||
|
/* Define to 1 if using `alloca.c'. */
|
||||||
|
#undef C_ALLOCA
|
||||||
|
|
||||||
|
/* 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 */
|
||||||
|
#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 `alloca', as a function or macro. */
|
||||||
|
#undef HAVE_ALLOCA
|
||||||
|
|
||||||
|
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
||||||
|
*/
|
||||||
|
#undef HAVE_ALLOCA_H
|
||||||
|
|
||||||
|
/* 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 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 to 1 if you have the <memory.h> header file. */
|
||||||
|
#undef HAVE_MEMORY_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `mkostemp' function. */
|
||||||
|
#undef HAVE_MKOSTEMP
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `mkstemp' function. */
|
||||||
|
#undef HAVE_MKSTEMP
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `mmap' function. */
|
||||||
|
#undef HAVE_MMAP
|
||||||
|
|
||||||
|
/* Define if mmap with MAP_ANON(YMOUS) works. */
|
||||||
|
#undef HAVE_MMAP_ANON
|
||||||
|
|
||||||
|
/* Define if mmap of /dev/zero works. */
|
||||||
|
#undef HAVE_MMAP_DEV_ZERO
|
||||||
|
|
||||||
|
/* Define if read-only mmap of a plain file works. */
|
||||||
|
#undef HAVE_MMAP_FILE
|
||||||
|
|
||||||
|
/* Define if your compiler supports pointer authentication. */
|
||||||
|
#undef HAVE_PTRAUTH
|
||||||
|
|
||||||
|
/* 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 <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/mman.h> header file. */
|
||||||
|
#undef HAVE_SYS_MMAN_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
|
||||||
|
|
||||||
|
/* If using the C implementation of alloca, define if you know the
|
||||||
|
direction of stack growth for your system; otherwise it will be
|
||||||
|
automatically deduced at runtime.
|
||||||
|
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||||
|
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||||
|
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||||
|
#undef STACK_DIRECTION
|
||||||
|
|
||||||
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
|
#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
|
||||||
|
|
||||||
|
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||||
|
#undef size_t
|
||||||
|
|
||||||
|
|
||||||
|
#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
|
||||||
|
|
||||||
@@ -6,15 +6,14 @@ import collections
|
|||||||
import glob
|
import glob
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
|
|
||||||
class Platform(object):
|
class Platform(object):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class simulator_platform(Platform):
|
class simulator_platform(Platform):
|
||||||
directory = 'darwin_ios'
|
|
||||||
sdk = 'iphonesimulator'
|
|
||||||
arch = 'i386'
|
arch = 'i386'
|
||||||
triple = 'i386-apple-darwin11'
|
triple = 'i386-apple-darwin11'
|
||||||
version_min = '-miphoneos-version-min=7.0'
|
|
||||||
|
|
||||||
prefix = "#ifdef __i386__\n\n"
|
prefix = "#ifdef __i386__\n\n"
|
||||||
suffix = "\n\n#endif"
|
suffix = "\n\n#endif"
|
||||||
@@ -23,11 +22,8 @@ class simulator_platform(Platform):
|
|||||||
|
|
||||||
|
|
||||||
class simulator64_platform(Platform):
|
class simulator64_platform(Platform):
|
||||||
directory = 'darwin_ios'
|
|
||||||
sdk = 'iphonesimulator'
|
|
||||||
arch = 'x86_64'
|
arch = 'x86_64'
|
||||||
triple = 'x86_64-apple-darwin13'
|
triple = 'x86_64-apple-darwin13'
|
||||||
version_min = '-miphoneos-version-min=7.0'
|
|
||||||
|
|
||||||
prefix = "#ifdef __x86_64__\n\n"
|
prefix = "#ifdef __x86_64__\n\n"
|
||||||
suffix = "\n\n#endif"
|
suffix = "\n\n#endif"
|
||||||
@@ -36,11 +32,8 @@ class simulator64_platform(Platform):
|
|||||||
|
|
||||||
|
|
||||||
class device_platform(Platform):
|
class device_platform(Platform):
|
||||||
directory = 'darwin_ios'
|
|
||||||
sdk = 'iphoneos'
|
|
||||||
arch = 'armv7'
|
arch = 'armv7'
|
||||||
triple = 'arm-apple-darwin11'
|
triple = 'arm-apple-darwin11'
|
||||||
version_min = '-miphoneos-version-min=7.0'
|
|
||||||
|
|
||||||
prefix = "#ifdef __arm__\n\n"
|
prefix = "#ifdef __arm__\n\n"
|
||||||
suffix = "\n\n#endif"
|
suffix = "\n\n#endif"
|
||||||
@@ -49,11 +42,8 @@ class device_platform(Platform):
|
|||||||
|
|
||||||
|
|
||||||
class device64_platform(Platform):
|
class device64_platform(Platform):
|
||||||
directory = 'darwin_ios'
|
|
||||||
sdk = 'iphoneos'
|
|
||||||
arch = 'arm64'
|
arch = 'arm64'
|
||||||
triple = 'aarch64-apple-darwin13'
|
triple = 'aarch64-apple-darwin13'
|
||||||
version_min = '-miphoneos-version-min=7.0'
|
|
||||||
|
|
||||||
prefix = "#ifdef __arm64__\n\n"
|
prefix = "#ifdef __arm64__\n\n"
|
||||||
suffix = "\n\n#endif"
|
suffix = "\n\n#endif"
|
||||||
@@ -61,6 +51,30 @@ class device64_platform(Platform):
|
|||||||
src_files = ['sysv.S', 'ffi.c', 'internal.h']
|
src_files = ['sysv.S', 'ffi.c', 'internal.h']
|
||||||
|
|
||||||
|
|
||||||
|
class ios_simulator_platform(simulator_platform):
|
||||||
|
directory = 'darwin_ios'
|
||||||
|
sdk = 'iphonesimulator'
|
||||||
|
version_min = '-miphoneos-version-min=7.0'
|
||||||
|
|
||||||
|
|
||||||
|
class ios_simulator64_platform(simulator64_platform):
|
||||||
|
directory = 'darwin_ios'
|
||||||
|
sdk = 'iphonesimulator'
|
||||||
|
version_min = '-miphoneos-version-min=7.0'
|
||||||
|
|
||||||
|
|
||||||
|
class ios_device_platform(device_platform):
|
||||||
|
directory = 'darwin_ios'
|
||||||
|
sdk = 'iphoneos'
|
||||||
|
version_min = '-miphoneos-version-min=7.0'
|
||||||
|
|
||||||
|
|
||||||
|
class ios_device64_platform(device64_platform):
|
||||||
|
directory = 'darwin_ios'
|
||||||
|
sdk = 'iphoneos'
|
||||||
|
version_min = '-miphoneos-version-min=7.0'
|
||||||
|
|
||||||
|
|
||||||
class desktop32_platform(Platform):
|
class desktop32_platform(Platform):
|
||||||
directory = 'darwin_osx'
|
directory = 'darwin_osx'
|
||||||
sdk = 'macosx'
|
sdk = 'macosx'
|
||||||
@@ -87,6 +101,31 @@ class desktop64_platform(Platform):
|
|||||||
src_files = ['unix64.S', 'ffi64.c', 'ffiw64.c', 'win64.S', 'internal64.h', 'asmnames.h']
|
src_files = ['unix64.S', 'ffi64.c', 'ffiw64.c', 'win64.S', 'internal64.h', 'asmnames.h']
|
||||||
|
|
||||||
|
|
||||||
|
class tvos_simulator64_platform(simulator64_platform):
|
||||||
|
directory = 'darwin_tvos'
|
||||||
|
sdk = 'appletvsimulator'
|
||||||
|
version_min = '-mtvos-version-min=9.0'
|
||||||
|
|
||||||
|
|
||||||
|
class tvos_device64_platform(device64_platform):
|
||||||
|
directory = 'darwin_tvos'
|
||||||
|
sdk = 'appletvos'
|
||||||
|
version_min = '-mtvos-version-min=9.0'
|
||||||
|
|
||||||
|
|
||||||
|
class watchos_simulator_platform(simulator_platform):
|
||||||
|
directory = 'darwin_watchos'
|
||||||
|
sdk = 'watchsimulator'
|
||||||
|
version_min = '-mwatchos-version-min=4.0'
|
||||||
|
|
||||||
|
|
||||||
|
class watchos_device_platform(device_platform):
|
||||||
|
directory = 'darwin_watchos'
|
||||||
|
sdk = 'watchos'
|
||||||
|
arch = 'armv7k'
|
||||||
|
version_min = '-mwatchos-version-min=4.0'
|
||||||
|
|
||||||
|
|
||||||
def mkdir_p(path):
|
def mkdir_p(path):
|
||||||
try:
|
try:
|
||||||
os.makedirs(path)
|
os.makedirs(path)
|
||||||
@@ -143,7 +182,7 @@ def build_target(platform, platform_headers):
|
|||||||
mkdir_p(build_dir)
|
mkdir_p(build_dir)
|
||||||
env = dict(CC=xcrun_cmd('clang'),
|
env = dict(CC=xcrun_cmd('clang'),
|
||||||
LD=xcrun_cmd('ld'),
|
LD=xcrun_cmd('ld'),
|
||||||
CFLAGS='%s' % (platform.version_min))
|
CFLAGS='%s -fembed-bitcode' % (platform.version_min))
|
||||||
working_dir = os.getcwd()
|
working_dir = os.getcwd()
|
||||||
try:
|
try:
|
||||||
os.chdir(build_dir)
|
os.chdir(build_dir)
|
||||||
@@ -163,32 +202,47 @@ def build_target(platform, platform_headers):
|
|||||||
platform_headers[filename].add((platform.prefix, platform.arch, platform.suffix))
|
platform_headers[filename].add((platform.prefix, platform.arch, platform.suffix))
|
||||||
|
|
||||||
|
|
||||||
def generate_source_and_headers(generate_osx=True, generate_ios=True):
|
def generate_source_and_headers(
|
||||||
|
generate_osx=True,
|
||||||
|
generate_ios=True,
|
||||||
|
generate_tvos=True,
|
||||||
|
generate_watchos=True,
|
||||||
|
):
|
||||||
copy_files('src', 'darwin_common/src', pattern='*.c')
|
copy_files('src', 'darwin_common/src', pattern='*.c')
|
||||||
copy_files('include', 'darwin_common/include', pattern='*.h')
|
copy_files('include', 'darwin_common/include', pattern='*.h')
|
||||||
|
|
||||||
if generate_ios:
|
if generate_ios:
|
||||||
copy_src_platform_files(simulator_platform)
|
copy_src_platform_files(ios_simulator_platform)
|
||||||
copy_src_platform_files(simulator64_platform)
|
copy_src_platform_files(ios_simulator64_platform)
|
||||||
copy_src_platform_files(device_platform)
|
copy_src_platform_files(ios_device_platform)
|
||||||
copy_src_platform_files(device64_platform)
|
copy_src_platform_files(ios_device64_platform)
|
||||||
if generate_osx:
|
if generate_osx:
|
||||||
copy_src_platform_files(desktop32_platform)
|
|
||||||
copy_src_platform_files(desktop64_platform)
|
copy_src_platform_files(desktop64_platform)
|
||||||
|
if generate_tvos:
|
||||||
|
copy_src_platform_files(tvos_simulator64_platform)
|
||||||
|
copy_src_platform_files(tvos_device64_platform)
|
||||||
|
if generate_watchos:
|
||||||
|
copy_src_platform_files(watchos_simulator_platform)
|
||||||
|
copy_src_platform_files(watchos_device_platform)
|
||||||
|
|
||||||
platform_headers = collections.defaultdict(set)
|
platform_headers = collections.defaultdict(set)
|
||||||
|
|
||||||
if generate_ios:
|
if generate_ios:
|
||||||
build_target(simulator_platform, platform_headers)
|
build_target(ios_simulator_platform, platform_headers)
|
||||||
build_target(simulator64_platform, platform_headers)
|
build_target(ios_simulator64_platform, platform_headers)
|
||||||
build_target(device_platform, platform_headers)
|
build_target(ios_device_platform, platform_headers)
|
||||||
build_target(device64_platform, platform_headers)
|
build_target(ios_device64_platform, platform_headers)
|
||||||
if generate_osx:
|
if generate_osx:
|
||||||
build_target(desktop32_platform, platform_headers)
|
|
||||||
build_target(desktop64_platform, platform_headers)
|
build_target(desktop64_platform, platform_headers)
|
||||||
|
if generate_tvos:
|
||||||
|
build_target(tvos_simulator64_platform, platform_headers)
|
||||||
|
build_target(tvos_device64_platform, platform_headers)
|
||||||
|
if generate_watchos:
|
||||||
|
build_target(watchos_simulator_platform, platform_headers)
|
||||||
|
build_target(watchos_device_platform, platform_headers)
|
||||||
|
|
||||||
mkdir_p('darwin_common/include')
|
mkdir_p('darwin_common/include')
|
||||||
for header_name, tag_tuples in platform_headers.iteritems():
|
for header_name, tag_tuples in platform_headers.items():
|
||||||
basename, suffix = os.path.splitext(header_name)
|
basename, suffix = os.path.splitext(header_name)
|
||||||
with open(os.path.join('darwin_common/include', header_name), 'w') as header:
|
with open(os.path.join('darwin_common/include', header_name), 'w') as header:
|
||||||
for tag_tuple in tag_tuples:
|
for tag_tuple in tag_tuples:
|
||||||
@@ -198,6 +252,13 @@ if __name__ == '__main__':
|
|||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument('--only-ios', action='store_true', default=False)
|
parser.add_argument('--only-ios', action='store_true', default=False)
|
||||||
parser.add_argument('--only-osx', action='store_true', default=False)
|
parser.add_argument('--only-osx', action='store_true', default=False)
|
||||||
|
parser.add_argument('--only-tvos', action='store_true', default=False)
|
||||||
|
parser.add_argument('--only-watchos', action='store_true', default=False)
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
generate_source_and_headers(generate_osx=not args.only_ios, generate_ios=not args.only_osx)
|
generate_source_and_headers(
|
||||||
|
generate_osx=not args.only_ios and not args.only_tvos and not args.only_watchos,
|
||||||
|
generate_ios=not args.only_osx and not args.only_tvos and not args.only_watchos,
|
||||||
|
generate_tvos=not args.only_ios and not args.only_osx and not args.only_watchos,
|
||||||
|
generate_watchos=not args.only_ios and not args.only_osx and not args.only_tvos,
|
||||||
|
)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
AUTOMAKE_OPTIONS=foreign
|
AUTOMAKE_OPTIONS=foreign
|
||||||
|
|
||||||
DISTCLEANFILES=ffitarget.h
|
DISTCLEANFILES=ffitarget.h
|
||||||
noinst_HEADERS=ffi_common.h ffi_cfi.h
|
noinst_HEADERS=ffi_common.h ffi_cfi.h tramp.h
|
||||||
EXTRA_DIST=ffi.h.in
|
EXTRA_DIST=ffi.h.in
|
||||||
|
|
||||||
nodist_include_HEADERS = ffi.h ffitarget.h
|
nodist_include_HEADERS = ffi.h ffitarget.h
|
||||||
|
|||||||
609
include/Makefile.in
Normal file
609
include/Makefile.in
Normal file
@@ -0,0 +1,609 @@
|
|||||||
|
# Makefile.in generated by automake 1.16.2 from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
|
# Copyright (C) 1994-2020 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_append_flag.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_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)`
|
||||||
|
ETAGS = etags
|
||||||
|
CTAGS = ctags
|
||||||
|
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/ffi.h.in
|
||||||
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
|
ALLOCA = @ALLOCA@
|
||||||
|
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@
|
||||||
|
CPP = @CPP@
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
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@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
FFI_EXEC_TRAMPOLINE_TABLE = @FFI_EXEC_TRAMPOLINE_TABLE@
|
||||||
|
FGREP = @FGREP@
|
||||||
|
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@
|
||||||
|
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@
|
||||||
|
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@
|
||||||
|
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:
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
/* -----------------------------------------------------------------*-C-*-
|
/* -----------------------------------------------------------------*-C-*-
|
||||||
libffi @VERSION@ - Copyright (c) 2011, 2014 Anthony Green
|
libffi @VERSION@
|
||||||
- Copyright (c) 1996-2003, 2007, 2008 Red Hat, Inc.
|
- Copyright (c) 2011, 2014, 2019, 2021 Anthony Green
|
||||||
|
- Copyright (c) 1996-2003, 2007, 2008 Red Hat, Inc.
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person
|
Permission is hereby granted, free of charge, to any person
|
||||||
obtaining a copy of this software and associated documentation
|
obtaining a copy of this software and associated documentation
|
||||||
@@ -217,7 +218,8 @@ FFI_EXTERN ffi_type ffi_type_complex_longdouble;
|
|||||||
typedef enum {
|
typedef enum {
|
||||||
FFI_OK = 0,
|
FFI_OK = 0,
|
||||||
FFI_BAD_TYPEDEF,
|
FFI_BAD_TYPEDEF,
|
||||||
FFI_BAD_ABI
|
FFI_BAD_ABI,
|
||||||
|
FFI_BAD_ARGTYPE
|
||||||
} ffi_status;
|
} ffi_status;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@@ -269,7 +271,7 @@ typedef ffi_raw ffi_java_raw;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
FFI_API
|
FFI_API
|
||||||
void ffi_raw_call (ffi_cif *cif,
|
void ffi_raw_call (ffi_cif *cif,
|
||||||
void (*fn)(void),
|
void (*fn)(void),
|
||||||
void *rvalue,
|
void *rvalue,
|
||||||
@@ -283,18 +285,20 @@ FFI_API size_t ffi_raw_size (ffi_cif *cif);
|
|||||||
packing, even on 64-bit machines. I.e. on 64-bit machines longs
|
packing, even on 64-bit machines. I.e. on 64-bit machines longs
|
||||||
and doubles are followed by an empty 64-bit word. */
|
and doubles are followed by an empty 64-bit word. */
|
||||||
|
|
||||||
|
#if !FFI_NATIVE_RAW_API
|
||||||
FFI_API
|
FFI_API
|
||||||
void ffi_java_raw_call (ffi_cif *cif,
|
void ffi_java_raw_call (ffi_cif *cif,
|
||||||
void (*fn)(void),
|
void (*fn)(void),
|
||||||
void *rvalue,
|
void *rvalue,
|
||||||
ffi_java_raw *avalue);
|
ffi_java_raw *avalue) __attribute__((deprecated));
|
||||||
|
#endif
|
||||||
|
|
||||||
FFI_API
|
FFI_API
|
||||||
void ffi_java_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_java_raw *raw);
|
void ffi_java_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_java_raw *raw) __attribute__((deprecated));
|
||||||
FFI_API
|
FFI_API
|
||||||
void ffi_java_raw_to_ptrarray (ffi_cif *cif, ffi_java_raw *raw, void **args);
|
void ffi_java_raw_to_ptrarray (ffi_cif *cif, ffi_java_raw *raw, void **args) __attribute__((deprecated));
|
||||||
FFI_API
|
FFI_API
|
||||||
size_t ffi_java_raw_size (ffi_cif *cif);
|
size_t ffi_java_raw_size (ffi_cif *cif) __attribute__((deprecated));
|
||||||
|
|
||||||
/* ---- Definitions for closures ----------------------------------------- */
|
/* ---- Definitions for closures ----------------------------------------- */
|
||||||
|
|
||||||
@@ -308,7 +312,10 @@ typedef struct {
|
|||||||
void *trampoline_table;
|
void *trampoline_table;
|
||||||
void *trampoline_table_entry;
|
void *trampoline_table_entry;
|
||||||
#else
|
#else
|
||||||
char tramp[FFI_TRAMPOLINE_SIZE];
|
union {
|
||||||
|
char tramp[FFI_TRAMPOLINE_SIZE];
|
||||||
|
void *ftramp;
|
||||||
|
};
|
||||||
#endif
|
#endif
|
||||||
ffi_cif *cif;
|
ffi_cif *cif;
|
||||||
void (*fun)(ffi_cif*,void*,void**,void*);
|
void (*fun)(ffi_cif*,void*,void**,void*);
|
||||||
@@ -328,6 +335,14 @@ typedef struct {
|
|||||||
FFI_API void *ffi_closure_alloc (size_t size, void **code);
|
FFI_API void *ffi_closure_alloc (size_t size, void **code);
|
||||||
FFI_API void ffi_closure_free (void *);
|
FFI_API void ffi_closure_free (void *);
|
||||||
|
|
||||||
|
#if defined(PA_LINUX) || defined(PA_HPUX)
|
||||||
|
#define FFI_CLOSURE_PTR(X) ((void *)((unsigned int)(X) | 2))
|
||||||
|
#define FFI_RESTORE_PTR(X) ((void *)((unsigned int)(X) & ~3))
|
||||||
|
#else
|
||||||
|
#define FFI_CLOSURE_PTR(X) (X)
|
||||||
|
#define FFI_RESTORE_PTR(X) (X)
|
||||||
|
#endif
|
||||||
|
|
||||||
FFI_API ffi_status
|
FFI_API ffi_status
|
||||||
ffi_prep_closure (ffi_closure*,
|
ffi_prep_closure (ffi_closure*,
|
||||||
ffi_cif *,
|
ffi_cif *,
|
||||||
@@ -361,8 +376,8 @@ typedef struct {
|
|||||||
|
|
||||||
#if !FFI_NATIVE_RAW_API
|
#if !FFI_NATIVE_RAW_API
|
||||||
|
|
||||||
/* If this is enabled, then a raw closure has the same layout
|
/* If this is enabled, then a raw closure has the same layout
|
||||||
as a regular closure. We use this to install an intermediate
|
as a regular closure. We use this to install an intermediate
|
||||||
handler to do the transaltion, void** -> ffi_raw*. */
|
handler to do the transaltion, void** -> ffi_raw*. */
|
||||||
|
|
||||||
void (*translate_args)(ffi_cif*,void*,void**,void*);
|
void (*translate_args)(ffi_cif*,void*,void**,void*);
|
||||||
@@ -387,8 +402,8 @@ typedef struct {
|
|||||||
|
|
||||||
#if !FFI_NATIVE_RAW_API
|
#if !FFI_NATIVE_RAW_API
|
||||||
|
|
||||||
/* If this is enabled, then a raw closure has the same layout
|
/* If this is enabled, then a raw closure has the same layout
|
||||||
as a regular closure. We use this to install an intermediate
|
as a regular closure. We use this to install an intermediate
|
||||||
handler to do the translation, void** -> ffi_raw*. */
|
handler to do the translation, void** -> ffi_raw*. */
|
||||||
|
|
||||||
void (*translate_args)(ffi_cif*,void*,void**,void*);
|
void (*translate_args)(ffi_cif*,void*,void**,void*);
|
||||||
@@ -414,18 +429,20 @@ ffi_prep_raw_closure_loc (ffi_raw_closure*,
|
|||||||
void *user_data,
|
void *user_data,
|
||||||
void *codeloc);
|
void *codeloc);
|
||||||
|
|
||||||
|
#if !FFI_NATIVE_RAW_API
|
||||||
FFI_API ffi_status
|
FFI_API ffi_status
|
||||||
ffi_prep_java_raw_closure (ffi_java_raw_closure*,
|
ffi_prep_java_raw_closure (ffi_java_raw_closure*,
|
||||||
ffi_cif *cif,
|
ffi_cif *cif,
|
||||||
void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*),
|
void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*),
|
||||||
void *user_data);
|
void *user_data) __attribute__((deprecated));
|
||||||
|
|
||||||
FFI_API ffi_status
|
FFI_API ffi_status
|
||||||
ffi_prep_java_raw_closure_loc (ffi_java_raw_closure*,
|
ffi_prep_java_raw_closure_loc (ffi_java_raw_closure*,
|
||||||
ffi_cif *cif,
|
ffi_cif *cif,
|
||||||
void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*),
|
void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*),
|
||||||
void *user_data,
|
void *user_data,
|
||||||
void *codeloc);
|
void *codeloc) __attribute__((deprecated));
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* FFI_CLOSURES */
|
#endif /* FFI_CLOSURES */
|
||||||
|
|
||||||
@@ -447,7 +464,7 @@ FFI_API void ffi_call_go (ffi_cif *cif, void (*fn)(void), void *rvalue,
|
|||||||
|
|
||||||
/* ---- Public interface definition -------------------------------------- */
|
/* ---- Public interface definition -------------------------------------- */
|
||||||
|
|
||||||
FFI_API
|
FFI_API
|
||||||
ffi_status ffi_prep_cif(ffi_cif *cif,
|
ffi_status ffi_prep_cif(ffi_cif *cif,
|
||||||
ffi_abi abi,
|
ffi_abi abi,
|
||||||
unsigned int nargs,
|
unsigned int nargs,
|
||||||
@@ -480,18 +497,18 @@ ffi_status ffi_get_struct_offsets (ffi_abi abi, ffi_type *struct_type,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* If these change, update src/mips/ffitarget.h. */
|
/* If these change, update src/mips/ffitarget.h. */
|
||||||
#define FFI_TYPE_VOID 0
|
#define FFI_TYPE_VOID 0
|
||||||
#define FFI_TYPE_INT 1
|
#define FFI_TYPE_INT 1
|
||||||
#define FFI_TYPE_FLOAT 2
|
#define FFI_TYPE_FLOAT 2
|
||||||
#define FFI_TYPE_DOUBLE 3
|
#define FFI_TYPE_DOUBLE 3
|
||||||
#if @HAVE_LONG_DOUBLE@
|
#if @HAVE_LONG_DOUBLE@
|
||||||
#define FFI_TYPE_LONGDOUBLE 4
|
#define FFI_TYPE_LONGDOUBLE 4
|
||||||
#else
|
#else
|
||||||
#define FFI_TYPE_LONGDOUBLE FFI_TYPE_DOUBLE
|
#define FFI_TYPE_LONGDOUBLE FFI_TYPE_DOUBLE
|
||||||
#endif
|
#endif
|
||||||
#define FFI_TYPE_UINT8 5
|
#define FFI_TYPE_UINT8 5
|
||||||
#define FFI_TYPE_SINT8 6
|
#define FFI_TYPE_SINT8 6
|
||||||
#define FFI_TYPE_UINT16 7
|
#define FFI_TYPE_UINT16 7
|
||||||
#define FFI_TYPE_SINT16 8
|
#define FFI_TYPE_SINT16 8
|
||||||
#define FFI_TYPE_UINT32 9
|
#define FFI_TYPE_UINT32 9
|
||||||
#define FFI_TYPE_SINT32 10
|
#define FFI_TYPE_SINT32 10
|
||||||
|
|||||||
@@ -2,6 +2,27 @@
|
|||||||
ffi_cfi.h - Copyright (c) 2014 Red Hat, Inc.
|
ffi_cfi.h - Copyright (c) 2014 Red Hat, Inc.
|
||||||
|
|
||||||
Conditionally assemble cfi directives. Only necessary for building libffi.
|
Conditionally assemble cfi directives. Only necessary for building libffi.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
----------------------------------------------------------------------- */
|
----------------------------------------------------------------------- */
|
||||||
|
|
||||||
#ifndef FFI_CFI_H
|
#ifndef FFI_CFI_H
|
||||||
|
|||||||
@@ -5,6 +5,27 @@
|
|||||||
|
|
||||||
Common internal definitions and macros. Only necessary for building
|
Common internal definitions and macros. Only necessary for building
|
||||||
libffi.
|
libffi.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
----------------------------------------------------------------------- */
|
----------------------------------------------------------------------- */
|
||||||
|
|
||||||
#ifndef FFI_COMMON_H
|
#ifndef FFI_COMMON_H
|
||||||
@@ -99,6 +120,14 @@ ffi_status ffi_prep_cif_core(ffi_cif *cif,
|
|||||||
ffi_type *rtype,
|
ffi_type *rtype,
|
||||||
ffi_type **atypes);
|
ffi_type **atypes);
|
||||||
|
|
||||||
|
/* Translate a data pointer to a code pointer. Needed for closures on
|
||||||
|
some targets. */
|
||||||
|
void *ffi_data_to_code_pointer (void *data) FFI_HIDDEN;
|
||||||
|
|
||||||
|
/* The arch code calls this to determine if a given closure has a
|
||||||
|
static trampoline. */
|
||||||
|
int ffi_tramp_is_present (void *closure) FFI_HIDDEN;
|
||||||
|
|
||||||
/* Extended cif, used in callback from assembly routine */
|
/* Extended cif, used in callback from assembly routine */
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
|||||||
45
include/tramp.h
Normal file
45
include/tramp.h
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
/* -----------------------------------------------------------------------
|
||||||
|
ffi_tramp.h - Copyright (C) 2021 Microsoft, Inc.
|
||||||
|
|
||||||
|
Static trampoline definitions.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
----------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
#ifndef FFI_TRAMP_H
|
||||||
|
#define FFI_TRAMP_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int ffi_tramp_is_supported(void);
|
||||||
|
void *ffi_tramp_alloc (int flags);
|
||||||
|
void ffi_tramp_set_parms (void *tramp, void *data, void *code);
|
||||||
|
void *ffi_tramp_get_addr (void *tramp);
|
||||||
|
void ffi_tramp_free (void *tramp);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* FFI_TRAMP_H */
|
||||||
529
install-sh
Normal file
529
install-sh
Normal file
@@ -0,0 +1,529 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# install - install a program, script, or datafile
|
||||||
|
|
||||||
|
scriptversion=2018-03-11.20; # 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
|
||||||
|
|
||||||
|
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 the last 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.
|
||||||
|
-s $stripprog installed files.
|
||||||
|
-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
|
||||||
|
"
|
||||||
|
|
||||||
|
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;;
|
||||||
|
|
||||||
|
-s) stripcmd=$stripprog;;
|
||||||
|
|
||||||
|
-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=$?
|
||||||
|
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
|
||||||
|
'')
|
||||||
|
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||||
|
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||||
|
umask=`umask`
|
||||||
|
case $stripcmd.$umask in
|
||||||
|
# Optimize common cases.
|
||||||
|
*[2367][2367]) mkdir_umask=$umask;;
|
||||||
|
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||||
|
|
||||||
|
*[0-7])
|
||||||
|
mkdir_umask=`expr $umask + 22 \
|
||||||
|
- $umask % 100 % 40 + $umask % 20 \
|
||||||
|
- $umask % 10 % 4 + $umask % 2
|
||||||
|
`;;
|
||||||
|
*) mkdir_umask=$umask,go-w;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# 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
|
||||||
|
case $umask in
|
||||||
|
*[123567][0-7][0-7])
|
||||||
|
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||||
|
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
# Note that $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' feature.
|
||||||
|
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;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if
|
||||||
|
$posix_mkdir && (
|
||||||
|
umask $mkdir_umask &&
|
||||||
|
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||||
|
)
|
||||||
|
then :
|
||||||
|
else
|
||||||
|
|
||||||
|
# The umask is ridiculous, or 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
|
||||||
|
# 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 -f "$dst" 2>/dev/null ||
|
||||||
|
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||||
|
{ $doit $rmcmd -f "$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:
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
/* These version numbers correspond to the libtool-version abi numbers,
|
/* These version numbers correspond to the libtool-version abi numbers,
|
||||||
not to the libffi release numbers. */
|
not to the libffi release numbers. */
|
||||||
|
|
||||||
LIBFFI_BASE_7.0 {
|
LIBFFI_BASE_8.0 {
|
||||||
global:
|
global:
|
||||||
/* Exported data variables. */
|
/* Exported data variables. */
|
||||||
ffi_type_void;
|
ffi_type_void;
|
||||||
@@ -38,27 +38,23 @@ LIBFFI_BASE_7.0 {
|
|||||||
ffi_java_raw_to_ptrarray;
|
ffi_java_raw_to_ptrarray;
|
||||||
ffi_java_raw_size;
|
ffi_java_raw_size;
|
||||||
|
|
||||||
|
ffi_get_struct_offsets;
|
||||||
local:
|
local:
|
||||||
*;
|
*;
|
||||||
};
|
};
|
||||||
|
|
||||||
LIBFFI_BASE_7.1 {
|
|
||||||
global:
|
|
||||||
ffi_get_struct_offsets;
|
|
||||||
} LIBFFI_BASE_7.0;
|
|
||||||
|
|
||||||
#ifdef FFI_TARGET_HAS_COMPLEX_TYPE
|
#ifdef FFI_TARGET_HAS_COMPLEX_TYPE
|
||||||
LIBFFI_COMPLEX_7.0 {
|
LIBFFI_COMPLEX_8.0 {
|
||||||
global:
|
global:
|
||||||
/* Exported data variables. */
|
/* Exported data variables. */
|
||||||
ffi_type_complex_float;
|
ffi_type_complex_float;
|
||||||
ffi_type_complex_double;
|
ffi_type_complex_double;
|
||||||
ffi_type_complex_longdouble;
|
ffi_type_complex_longdouble;
|
||||||
} LIBFFI_BASE_7.0;
|
} LIBFFI_BASE_8.0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if FFI_CLOSURES
|
#if FFI_CLOSURES
|
||||||
LIBFFI_CLOSURE_7.0 {
|
LIBFFI_CLOSURE_8.0 {
|
||||||
global:
|
global:
|
||||||
ffi_closure_alloc;
|
ffi_closure_alloc;
|
||||||
ffi_closure_free;
|
ffi_closure_free;
|
||||||
@@ -68,13 +64,13 @@ LIBFFI_CLOSURE_7.0 {
|
|||||||
ffi_prep_raw_closure_loc;
|
ffi_prep_raw_closure_loc;
|
||||||
ffi_prep_java_raw_closure;
|
ffi_prep_java_raw_closure;
|
||||||
ffi_prep_java_raw_closure_loc;
|
ffi_prep_java_raw_closure_loc;
|
||||||
} LIBFFI_BASE_7.0;
|
} LIBFFI_BASE_8.0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if FFI_GO_CLOSURES
|
#if FFI_GO_CLOSURES
|
||||||
LIBFFI_GO_CLOSURE_7.0 {
|
LIBFFI_GO_CLOSURE_8.0 {
|
||||||
global:
|
global:
|
||||||
ffi_call_go;
|
ffi_call_go;
|
||||||
ffi_prep_go_closure;
|
ffi_prep_go_closure;
|
||||||
} LIBFFI_CLOSURE_7.0;
|
} LIBFFI_CLOSURE_8.0;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
43B5D3F81D35473200D1E1FD /* ffiw64_x86_64.c in Sources */ = {isa = PBXBuildFile; fileRef = 43B5D3F71D35473200D1E1FD /* ffiw64_x86_64.c */; };
|
43B5D3F81D35473200D1E1FD /* ffiw64_x86_64.c in Sources */ = {isa = PBXBuildFile; fileRef = 43B5D3F71D35473200D1E1FD /* ffiw64_x86_64.c */; };
|
||||||
43B5D3FA1D3547CE00D1E1FD /* win64_x86_64.S in Sources */ = {isa = PBXBuildFile; fileRef = 43B5D3F91D3547CE00D1E1FD /* win64_x86_64.S */; };
|
43B5D3FA1D3547CE00D1E1FD /* win64_x86_64.S in Sources */ = {isa = PBXBuildFile; fileRef = 43B5D3F91D3547CE00D1E1FD /* win64_x86_64.S */; };
|
||||||
43E9A5C71D352C1500926A8F /* sysv_i386.S in Sources */ = {isa = PBXBuildFile; fileRef = 43E9A5C51D352C1500926A8F /* sysv_i386.S */; };
|
|
||||||
43E9A5C81D352C1500926A8F /* unix64_x86_64.S in Sources */ = {isa = PBXBuildFile; fileRef = 43E9A5C61D352C1500926A8F /* unix64_x86_64.S */; };
|
43E9A5C81D352C1500926A8F /* unix64_x86_64.S in Sources */ = {isa = PBXBuildFile; fileRef = 43E9A5C61D352C1500926A8F /* unix64_x86_64.S */; };
|
||||||
DBFA714A187F1D8600A76262 /* ffi.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA713E187F1D8600A76262 /* ffi.h */; };
|
DBFA714A187F1D8600A76262 /* ffi.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA713E187F1D8600A76262 /* ffi.h */; };
|
||||||
DBFA714B187F1D8600A76262 /* ffi_common.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA713F187F1D8600A76262 /* ffi_common.h */; };
|
DBFA714B187F1D8600A76262 /* ffi_common.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA713F187F1D8600A76262 /* ffi_common.h */; };
|
||||||
@@ -28,26 +27,18 @@
|
|||||||
DBFA7179187F1D9B00A76262 /* ffi_armv7.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA716F187F1D9B00A76262 /* ffi_armv7.c */; };
|
DBFA7179187F1D9B00A76262 /* ffi_armv7.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA716F187F1D9B00A76262 /* ffi_armv7.c */; };
|
||||||
DBFA717A187F1D9B00A76262 /* sysv_armv7.S in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7170187F1D9B00A76262 /* sysv_armv7.S */; };
|
DBFA717A187F1D9B00A76262 /* sysv_armv7.S in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7170187F1D9B00A76262 /* sysv_armv7.S */; };
|
||||||
DBFA717E187F1D9B00A76262 /* ffi64_x86_64.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7175187F1D9B00A76262 /* ffi64_x86_64.c */; };
|
DBFA717E187F1D9B00A76262 /* ffi64_x86_64.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7175187F1D9B00A76262 /* ffi64_x86_64.c */; };
|
||||||
DBFA717F187F1D9B00A76262 /* ffi_i386.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7176187F1D9B00A76262 /* ffi_i386.c */; };
|
|
||||||
DBFA718E187F1DA100A76262 /* ffi_i386.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA7182187F1DA100A76262 /* ffi_i386.h */; };
|
|
||||||
DBFA718F187F1DA100A76262 /* ffi_x86_64.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA7183187F1DA100A76262 /* ffi_x86_64.h */; };
|
DBFA718F187F1DA100A76262 /* ffi_x86_64.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA7183187F1DA100A76262 /* ffi_x86_64.h */; };
|
||||||
DBFA7190187F1DA100A76262 /* fficonfig_i386.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA7184187F1DA100A76262 /* fficonfig_i386.h */; };
|
|
||||||
DBFA7191187F1DA100A76262 /* fficonfig_x86_64.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA7185187F1DA100A76262 /* fficonfig_x86_64.h */; };
|
DBFA7191187F1DA100A76262 /* fficonfig_x86_64.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA7185187F1DA100A76262 /* fficonfig_x86_64.h */; };
|
||||||
DBFA7192187F1DA100A76262 /* ffitarget_i386.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA7186187F1DA100A76262 /* ffitarget_i386.h */; };
|
|
||||||
DBFA7193187F1DA100A76262 /* ffitarget_x86_64.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA7187187F1DA100A76262 /* ffitarget_x86_64.h */; };
|
DBFA7193187F1DA100A76262 /* ffitarget_x86_64.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA7187187F1DA100A76262 /* ffitarget_x86_64.h */; };
|
||||||
DBFA7194187F1DA100A76262 /* unix64_x86_64.S in Sources */ = {isa = PBXBuildFile; fileRef = DBFA718A187F1DA100A76262 /* unix64_x86_64.S */; };
|
DBFA7194187F1DA100A76262 /* unix64_x86_64.S in Sources */ = {isa = PBXBuildFile; fileRef = DBFA718A187F1DA100A76262 /* unix64_x86_64.S */; };
|
||||||
DBFA7195187F1DA100A76262 /* sysv_i386.S in Sources */ = {isa = PBXBuildFile; fileRef = DBFA718B187F1DA100A76262 /* sysv_i386.S */; };
|
|
||||||
DBFA7196187F1DA100A76262 /* ffi64_x86_64.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA718C187F1DA100A76262 /* ffi64_x86_64.c */; };
|
DBFA7196187F1DA100A76262 /* ffi64_x86_64.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA718C187F1DA100A76262 /* ffi64_x86_64.c */; };
|
||||||
DBFA7197187F1DA100A76262 /* ffi_i386.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA718D187F1DA100A76262 /* ffi_i386.c */; };
|
|
||||||
FDB52FB31F6144FA00AA92E6 /* unix64_x86_64.S in Sources */ = {isa = PBXBuildFile; fileRef = 43E9A5C61D352C1500926A8F /* unix64_x86_64.S */; };
|
FDB52FB31F6144FA00AA92E6 /* unix64_x86_64.S in Sources */ = {isa = PBXBuildFile; fileRef = 43E9A5C61D352C1500926A8F /* unix64_x86_64.S */; };
|
||||||
FDB52FB41F6144FA00AA92E6 /* sysv_i386.S in Sources */ = {isa = PBXBuildFile; fileRef = 43E9A5C51D352C1500926A8F /* sysv_i386.S */; };
|
|
||||||
FDB52FB51F6144FA00AA92E6 /* ffi64_x86_64.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7175187F1D9B00A76262 /* ffi64_x86_64.c */; };
|
FDB52FB51F6144FA00AA92E6 /* ffi64_x86_64.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7175187F1D9B00A76262 /* ffi64_x86_64.c */; };
|
||||||
FDB52FB61F6144FA00AA92E6 /* ffi_armv7.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA716F187F1D9B00A76262 /* ffi_armv7.c */; };
|
FDB52FB61F6144FA00AA92E6 /* ffi_armv7.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA716F187F1D9B00A76262 /* ffi_armv7.c */; };
|
||||||
FDB52FB71F6144FA00AA92E6 /* closures.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7143187F1D8600A76262 /* closures.c */; };
|
FDB52FB71F6144FA00AA92E6 /* closures.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7143187F1D8600A76262 /* closures.c */; };
|
||||||
FDB52FB81F6144FA00AA92E6 /* sysv_armv7.S in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7170187F1D9B00A76262 /* sysv_armv7.S */; };
|
FDB52FB81F6144FA00AA92E6 /* sysv_armv7.S in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7170187F1D9B00A76262 /* sysv_armv7.S */; };
|
||||||
FDB52FB91F6144FA00AA92E6 /* ffiw64_x86_64.c in Sources */ = {isa = PBXBuildFile; fileRef = 43B5D3F71D35473200D1E1FD /* ffiw64_x86_64.c */; };
|
FDB52FB91F6144FA00AA92E6 /* ffiw64_x86_64.c in Sources */ = {isa = PBXBuildFile; fileRef = 43B5D3F71D35473200D1E1FD /* ffiw64_x86_64.c */; };
|
||||||
FDB52FBA1F6144FA00AA92E6 /* prep_cif.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7147187F1D8600A76262 /* prep_cif.c */; };
|
FDB52FBA1F6144FA00AA92E6 /* prep_cif.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7147187F1D8600A76262 /* prep_cif.c */; };
|
||||||
FDB52FBB1F6144FA00AA92E6 /* ffi_i386.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7176187F1D9B00A76262 /* ffi_i386.c */; };
|
|
||||||
FDB52FBC1F6144FA00AA92E6 /* raw_api.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7148187F1D8600A76262 /* raw_api.c */; };
|
FDB52FBC1F6144FA00AA92E6 /* raw_api.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7148187F1D8600A76262 /* raw_api.c */; };
|
||||||
FDB52FBD1F6144FA00AA92E6 /* sysv_arm64.S in Sources */ = {isa = PBXBuildFile; fileRef = DBFA716D187F1D9B00A76262 /* sysv_arm64.S */; };
|
FDB52FBD1F6144FA00AA92E6 /* sysv_arm64.S in Sources */ = {isa = PBXBuildFile; fileRef = DBFA716D187F1D9B00A76262 /* sysv_arm64.S */; };
|
||||||
FDB52FBE1F6144FA00AA92E6 /* types.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7149187F1D8600A76262 /* types.c */; };
|
FDB52FBE1F6144FA00AA92E6 /* types.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7149187F1D8600A76262 /* types.c */; };
|
||||||
@@ -56,7 +47,6 @@
|
|||||||
FDB52FD01F614A8B00AA92E6 /* ffi.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DBFA713E187F1D8600A76262 /* ffi.h */; };
|
FDB52FD01F614A8B00AA92E6 /* ffi.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DBFA713E187F1D8600A76262 /* ffi.h */; };
|
||||||
FDB52FD11F614AA700AA92E6 /* ffi_arm64.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DBFA715E187F1D9B00A76262 /* ffi_arm64.h */; };
|
FDB52FD11F614AA700AA92E6 /* ffi_arm64.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DBFA715E187F1D9B00A76262 /* ffi_arm64.h */; };
|
||||||
FDB52FD21F614AAB00AA92E6 /* ffi_armv7.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DBFA715F187F1D9B00A76262 /* ffi_armv7.h */; };
|
FDB52FD21F614AAB00AA92E6 /* ffi_armv7.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DBFA715F187F1D9B00A76262 /* ffi_armv7.h */; };
|
||||||
FDB52FD31F614AB000AA92E6 /* ffi_i386.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DBFA7160187F1D9B00A76262 /* ffi_i386.h */; };
|
|
||||||
FDB52FD41F614AB500AA92E6 /* ffi_x86_64.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DBFA7161187F1D9B00A76262 /* ffi_x86_64.h */; };
|
FDB52FD41F614AB500AA92E6 /* ffi_x86_64.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DBFA7161187F1D9B00A76262 /* ffi_x86_64.h */; };
|
||||||
FDB52FD51F614AE200AA92E6 /* ffi.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DBFA713E187F1D8600A76262 /* ffi.h */; };
|
FDB52FD51F614AE200AA92E6 /* ffi.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DBFA713E187F1D8600A76262 /* ffi.h */; };
|
||||||
FDB52FD61F614AEA00AA92E6 /* ffi_arm64.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DBFA715E187F1D9B00A76262 /* ffi_arm64.h */; };
|
FDB52FD61F614AEA00AA92E6 /* ffi_arm64.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DBFA715E187F1D9B00A76262 /* ffi_arm64.h */; };
|
||||||
@@ -64,7 +54,6 @@
|
|||||||
FDB52FD81F614B8700AA92E6 /* ffitarget.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DBFA7141187F1D8600A76262 /* ffitarget.h */; };
|
FDB52FD81F614B8700AA92E6 /* ffitarget.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DBFA7141187F1D8600A76262 /* ffitarget.h */; };
|
||||||
FDB52FD91F614B8E00AA92E6 /* ffitarget_arm64.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DBFA7166187F1D9B00A76262 /* ffitarget_arm64.h */; };
|
FDB52FD91F614B8E00AA92E6 /* ffitarget_arm64.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DBFA7166187F1D9B00A76262 /* ffitarget_arm64.h */; };
|
||||||
FDB52FDA1F614B9300AA92E6 /* ffitarget_armv7.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DBFA7167187F1D9B00A76262 /* ffitarget_armv7.h */; };
|
FDB52FDA1F614B9300AA92E6 /* ffitarget_armv7.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DBFA7167187F1D9B00A76262 /* ffitarget_armv7.h */; };
|
||||||
FDB52FDB1F614B9700AA92E6 /* ffitarget_i386.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DBFA7168187F1D9B00A76262 /* ffitarget_i386.h */; };
|
|
||||||
FDB52FDD1F614BA900AA92E6 /* ffitarget_x86_64.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DBFA7169187F1D9B00A76262 /* ffitarget_x86_64.h */; };
|
FDB52FDD1F614BA900AA92E6 /* ffitarget_x86_64.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DBFA7169187F1D9B00A76262 /* ffitarget_x86_64.h */; };
|
||||||
FDB52FDE1F6155E300AA92E6 /* ffitarget.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DBFA7141187F1D8600A76262 /* ffitarget.h */; };
|
FDB52FDE1F6155E300AA92E6 /* ffitarget.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DBFA7141187F1D8600A76262 /* ffitarget.h */; };
|
||||||
FDB52FDF1F6155EA00AA92E6 /* ffitarget_arm64.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DBFA7166187F1D9B00A76262 /* ffitarget_arm64.h */; };
|
FDB52FDF1F6155EA00AA92E6 /* ffitarget_arm64.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DBFA7166187F1D9B00A76262 /* ffitarget_arm64.h */; };
|
||||||
@@ -76,9 +65,7 @@
|
|||||||
FDDB2F411F5D66E200EF414E /* ffiw64_x86_64.c in Sources */ = {isa = PBXBuildFile; fileRef = FDDB2F3F1F5D666900EF414E /* ffiw64_x86_64.c */; };
|
FDDB2F411F5D66E200EF414E /* ffiw64_x86_64.c in Sources */ = {isa = PBXBuildFile; fileRef = FDDB2F3F1F5D666900EF414E /* ffiw64_x86_64.c */; };
|
||||||
FDDB2F461F5D691E00EF414E /* win64_x86_64.S in Sources */ = {isa = PBXBuildFile; fileRef = FDDB2F441F5D68C900EF414E /* win64_x86_64.S */; };
|
FDDB2F461F5D691E00EF414E /* win64_x86_64.S in Sources */ = {isa = PBXBuildFile; fileRef = FDDB2F441F5D68C900EF414E /* win64_x86_64.S */; };
|
||||||
FDDB2F4A1F5D846400EF414E /* ffi64_x86_64.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA718C187F1DA100A76262 /* ffi64_x86_64.c */; };
|
FDDB2F4A1F5D846400EF414E /* ffi64_x86_64.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA718C187F1DA100A76262 /* ffi64_x86_64.c */; };
|
||||||
FDDB2F4B1F5D846400EF414E /* sysv_i386.S in Sources */ = {isa = PBXBuildFile; fileRef = DBFA718B187F1DA100A76262 /* sysv_i386.S */; };
|
|
||||||
FDDB2F4C1F5D846400EF414E /* prep_cif.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7147187F1D8600A76262 /* prep_cif.c */; };
|
FDDB2F4C1F5D846400EF414E /* prep_cif.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7147187F1D8600A76262 /* prep_cif.c */; };
|
||||||
FDDB2F4D1F5D846400EF414E /* ffi_i386.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA718D187F1DA100A76262 /* ffi_i386.c */; };
|
|
||||||
FDDB2F4E1F5D846400EF414E /* ffiw64_x86_64.c in Sources */ = {isa = PBXBuildFile; fileRef = FDDB2F3F1F5D666900EF414E /* ffiw64_x86_64.c */; };
|
FDDB2F4E1F5D846400EF414E /* ffiw64_x86_64.c in Sources */ = {isa = PBXBuildFile; fileRef = FDDB2F3F1F5D666900EF414E /* ffiw64_x86_64.c */; };
|
||||||
FDDB2F4F1F5D846400EF414E /* types.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7149187F1D8600A76262 /* types.c */; };
|
FDDB2F4F1F5D846400EF414E /* types.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7149187F1D8600A76262 /* types.c */; };
|
||||||
FDDB2F501F5D846400EF414E /* raw_api.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7148187F1D8600A76262 /* raw_api.c */; };
|
FDDB2F501F5D846400EF414E /* raw_api.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7148187F1D8600A76262 /* raw_api.c */; };
|
||||||
@@ -97,12 +84,10 @@
|
|||||||
FDB52FD01F614A8B00AA92E6 /* ffi.h in CopyFiles */,
|
FDB52FD01F614A8B00AA92E6 /* ffi.h in CopyFiles */,
|
||||||
FDB52FD11F614AA700AA92E6 /* ffi_arm64.h in CopyFiles */,
|
FDB52FD11F614AA700AA92E6 /* ffi_arm64.h in CopyFiles */,
|
||||||
FDB52FD21F614AAB00AA92E6 /* ffi_armv7.h in CopyFiles */,
|
FDB52FD21F614AAB00AA92E6 /* ffi_armv7.h in CopyFiles */,
|
||||||
FDB52FD31F614AB000AA92E6 /* ffi_i386.h in CopyFiles */,
|
|
||||||
FDB52FD41F614AB500AA92E6 /* ffi_x86_64.h in CopyFiles */,
|
FDB52FD41F614AB500AA92E6 /* ffi_x86_64.h in CopyFiles */,
|
||||||
FDB52FD81F614B8700AA92E6 /* ffitarget.h in CopyFiles */,
|
FDB52FD81F614B8700AA92E6 /* ffitarget.h in CopyFiles */,
|
||||||
FDB52FD91F614B8E00AA92E6 /* ffitarget_arm64.h in CopyFiles */,
|
FDB52FD91F614B8E00AA92E6 /* ffitarget_arm64.h in CopyFiles */,
|
||||||
FDB52FDA1F614B9300AA92E6 /* ffitarget_armv7.h in CopyFiles */,
|
FDB52FDA1F614B9300AA92E6 /* ffitarget_armv7.h in CopyFiles */,
|
||||||
FDB52FDB1F614B9700AA92E6 /* ffitarget_i386.h in CopyFiles */,
|
|
||||||
FDB52FDD1F614BA900AA92E6 /* ffitarget_x86_64.h in CopyFiles */,
|
FDB52FDD1F614BA900AA92E6 /* ffitarget_x86_64.h in CopyFiles */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
@@ -140,7 +125,6 @@
|
|||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
43B5D3F71D35473200D1E1FD /* ffiw64_x86_64.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ffiw64_x86_64.c; sourceTree = "<group>"; };
|
43B5D3F71D35473200D1E1FD /* ffiw64_x86_64.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ffiw64_x86_64.c; sourceTree = "<group>"; };
|
||||||
43B5D3F91D3547CE00D1E1FD /* win64_x86_64.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = win64_x86_64.S; sourceTree = "<group>"; };
|
43B5D3F91D3547CE00D1E1FD /* win64_x86_64.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = win64_x86_64.S; sourceTree = "<group>"; };
|
||||||
43E9A5C51D352C1500926A8F /* sysv_i386.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = sysv_i386.S; sourceTree = "<group>"; };
|
|
||||||
43E9A5C61D352C1500926A8F /* unix64_x86_64.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = unix64_x86_64.S; sourceTree = "<group>"; };
|
43E9A5C61D352C1500926A8F /* unix64_x86_64.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = unix64_x86_64.S; sourceTree = "<group>"; };
|
||||||
43E9A5DA1D35373600926A8F /* internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = internal.h; sourceTree = "<group>"; };
|
43E9A5DA1D35373600926A8F /* internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = internal.h; sourceTree = "<group>"; };
|
||||||
43E9A5DB1D35374400926A8F /* internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = internal.h; sourceTree = "<group>"; };
|
43E9A5DB1D35374400926A8F /* internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = internal.h; sourceTree = "<group>"; };
|
||||||
@@ -159,32 +143,23 @@
|
|||||||
DBFA7149187F1D8600A76262 /* types.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = types.c; sourceTree = "<group>"; };
|
DBFA7149187F1D8600A76262 /* types.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = types.c; sourceTree = "<group>"; };
|
||||||
DBFA715E187F1D9B00A76262 /* ffi_arm64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ffi_arm64.h; sourceTree = "<group>"; };
|
DBFA715E187F1D9B00A76262 /* ffi_arm64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ffi_arm64.h; sourceTree = "<group>"; };
|
||||||
DBFA715F187F1D9B00A76262 /* ffi_armv7.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ffi_armv7.h; sourceTree = "<group>"; };
|
DBFA715F187F1D9B00A76262 /* ffi_armv7.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ffi_armv7.h; sourceTree = "<group>"; };
|
||||||
DBFA7160187F1D9B00A76262 /* ffi_i386.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ffi_i386.h; sourceTree = "<group>"; };
|
|
||||||
DBFA7161187F1D9B00A76262 /* ffi_x86_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ffi_x86_64.h; sourceTree = "<group>"; };
|
DBFA7161187F1D9B00A76262 /* ffi_x86_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ffi_x86_64.h; sourceTree = "<group>"; };
|
||||||
DBFA7162187F1D9B00A76262 /* fficonfig_arm64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fficonfig_arm64.h; sourceTree = "<group>"; };
|
DBFA7162187F1D9B00A76262 /* fficonfig_arm64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fficonfig_arm64.h; sourceTree = "<group>"; };
|
||||||
DBFA7163187F1D9B00A76262 /* fficonfig_armv7.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fficonfig_armv7.h; sourceTree = "<group>"; };
|
DBFA7163187F1D9B00A76262 /* fficonfig_armv7.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fficonfig_armv7.h; sourceTree = "<group>"; };
|
||||||
DBFA7164187F1D9B00A76262 /* fficonfig_i386.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fficonfig_i386.h; sourceTree = "<group>"; };
|
|
||||||
DBFA7165187F1D9B00A76262 /* fficonfig_x86_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fficonfig_x86_64.h; sourceTree = "<group>"; };
|
DBFA7165187F1D9B00A76262 /* fficonfig_x86_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fficonfig_x86_64.h; sourceTree = "<group>"; };
|
||||||
DBFA7166187F1D9B00A76262 /* ffitarget_arm64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ffitarget_arm64.h; sourceTree = "<group>"; };
|
DBFA7166187F1D9B00A76262 /* ffitarget_arm64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ffitarget_arm64.h; sourceTree = "<group>"; };
|
||||||
DBFA7167187F1D9B00A76262 /* ffitarget_armv7.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ffitarget_armv7.h; sourceTree = "<group>"; };
|
DBFA7167187F1D9B00A76262 /* ffitarget_armv7.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ffitarget_armv7.h; sourceTree = "<group>"; };
|
||||||
DBFA7168187F1D9B00A76262 /* ffitarget_i386.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ffitarget_i386.h; sourceTree = "<group>"; };
|
|
||||||
DBFA7169187F1D9B00A76262 /* ffitarget_x86_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ffitarget_x86_64.h; sourceTree = "<group>"; };
|
DBFA7169187F1D9B00A76262 /* ffitarget_x86_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ffitarget_x86_64.h; sourceTree = "<group>"; };
|
||||||
DBFA716C187F1D9B00A76262 /* ffi_arm64.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.c; path = ffi_arm64.c; sourceTree = "<group>"; };
|
DBFA716C187F1D9B00A76262 /* ffi_arm64.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.c; path = ffi_arm64.c; sourceTree = "<group>"; };
|
||||||
DBFA716D187F1D9B00A76262 /* sysv_arm64.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = sysv_arm64.S; sourceTree = "<group>"; };
|
DBFA716D187F1D9B00A76262 /* sysv_arm64.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = sysv_arm64.S; sourceTree = "<group>"; };
|
||||||
DBFA716F187F1D9B00A76262 /* ffi_armv7.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.c; path = ffi_armv7.c; sourceTree = "<group>"; };
|
DBFA716F187F1D9B00A76262 /* ffi_armv7.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.c; path = ffi_armv7.c; sourceTree = "<group>"; };
|
||||||
DBFA7170187F1D9B00A76262 /* sysv_armv7.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = sysv_armv7.S; sourceTree = "<group>"; };
|
DBFA7170187F1D9B00A76262 /* sysv_armv7.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = sysv_armv7.S; sourceTree = "<group>"; };
|
||||||
DBFA7175187F1D9B00A76262 /* ffi64_x86_64.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ffi64_x86_64.c; sourceTree = "<group>"; };
|
DBFA7175187F1D9B00A76262 /* ffi64_x86_64.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ffi64_x86_64.c; sourceTree = "<group>"; };
|
||||||
DBFA7176187F1D9B00A76262 /* ffi_i386.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ffi_i386.c; sourceTree = "<group>"; };
|
|
||||||
DBFA7182187F1DA100A76262 /* ffi_i386.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ffi_i386.h; sourceTree = "<group>"; };
|
|
||||||
DBFA7183187F1DA100A76262 /* ffi_x86_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ffi_x86_64.h; sourceTree = "<group>"; };
|
DBFA7183187F1DA100A76262 /* ffi_x86_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ffi_x86_64.h; sourceTree = "<group>"; };
|
||||||
DBFA7184187F1DA100A76262 /* fficonfig_i386.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fficonfig_i386.h; sourceTree = "<group>"; };
|
|
||||||
DBFA7185187F1DA100A76262 /* fficonfig_x86_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fficonfig_x86_64.h; sourceTree = "<group>"; };
|
DBFA7185187F1DA100A76262 /* fficonfig_x86_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fficonfig_x86_64.h; sourceTree = "<group>"; };
|
||||||
DBFA7186187F1DA100A76262 /* ffitarget_i386.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ffitarget_i386.h; sourceTree = "<group>"; };
|
|
||||||
DBFA7187187F1DA100A76262 /* ffitarget_x86_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ffitarget_x86_64.h; sourceTree = "<group>"; };
|
DBFA7187187F1DA100A76262 /* ffitarget_x86_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ffitarget_x86_64.h; sourceTree = "<group>"; };
|
||||||
DBFA718A187F1DA100A76262 /* unix64_x86_64.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = unix64_x86_64.S; sourceTree = "<group>"; };
|
DBFA718A187F1DA100A76262 /* unix64_x86_64.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = unix64_x86_64.S; sourceTree = "<group>"; };
|
||||||
DBFA718B187F1DA100A76262 /* sysv_i386.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = sysv_i386.S; sourceTree = "<group>"; };
|
|
||||||
DBFA718C187F1DA100A76262 /* ffi64_x86_64.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.c; path = ffi64_x86_64.c; sourceTree = "<group>"; };
|
DBFA718C187F1DA100A76262 /* ffi64_x86_64.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.c; path = ffi64_x86_64.c; sourceTree = "<group>"; };
|
||||||
DBFA718D187F1DA100A76262 /* ffi_i386.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ffi_i386.c; sourceTree = "<group>"; };
|
|
||||||
FDB52FC51F6144FA00AA92E6 /* libffi.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libffi.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
FDB52FC51F6144FA00AA92E6 /* libffi.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libffi.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
FDDB2F3E1F5D61BC00EF414E /* asmnames.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = asmnames.h; sourceTree = "<group>"; };
|
FDDB2F3E1F5D61BC00EF414E /* asmnames.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = asmnames.h; sourceTree = "<group>"; };
|
||||||
FDDB2F3F1F5D666900EF414E /* ffiw64_x86_64.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ffiw64_x86_64.c; sourceTree = "<group>"; };
|
FDDB2F3F1F5D666900EF414E /* ffiw64_x86_64.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ffiw64_x86_64.c; sourceTree = "<group>"; };
|
||||||
@@ -262,15 +237,12 @@
|
|||||||
children = (
|
children = (
|
||||||
DBFA715E187F1D9B00A76262 /* ffi_arm64.h */,
|
DBFA715E187F1D9B00A76262 /* ffi_arm64.h */,
|
||||||
DBFA715F187F1D9B00A76262 /* ffi_armv7.h */,
|
DBFA715F187F1D9B00A76262 /* ffi_armv7.h */,
|
||||||
DBFA7160187F1D9B00A76262 /* ffi_i386.h */,
|
|
||||||
DBFA7161187F1D9B00A76262 /* ffi_x86_64.h */,
|
DBFA7161187F1D9B00A76262 /* ffi_x86_64.h */,
|
||||||
DBFA7162187F1D9B00A76262 /* fficonfig_arm64.h */,
|
DBFA7162187F1D9B00A76262 /* fficonfig_arm64.h */,
|
||||||
DBFA7163187F1D9B00A76262 /* fficonfig_armv7.h */,
|
DBFA7163187F1D9B00A76262 /* fficonfig_armv7.h */,
|
||||||
DBFA7164187F1D9B00A76262 /* fficonfig_i386.h */,
|
|
||||||
DBFA7165187F1D9B00A76262 /* fficonfig_x86_64.h */,
|
DBFA7165187F1D9B00A76262 /* fficonfig_x86_64.h */,
|
||||||
DBFA7166187F1D9B00A76262 /* ffitarget_arm64.h */,
|
DBFA7166187F1D9B00A76262 /* ffitarget_arm64.h */,
|
||||||
DBFA7167187F1D9B00A76262 /* ffitarget_armv7.h */,
|
DBFA7167187F1D9B00A76262 /* ffitarget_armv7.h */,
|
||||||
DBFA7168187F1D9B00A76262 /* ffitarget_i386.h */,
|
|
||||||
DBFA7169187F1D9B00A76262 /* ffitarget_x86_64.h */,
|
DBFA7169187F1D9B00A76262 /* ffitarget_x86_64.h */,
|
||||||
);
|
);
|
||||||
path = include;
|
path = include;
|
||||||
@@ -313,8 +285,6 @@
|
|||||||
43E9A5DD1D35375400926A8F /* internal64.h */,
|
43E9A5DD1D35375400926A8F /* internal64.h */,
|
||||||
DBFA7175187F1D9B00A76262 /* ffi64_x86_64.c */,
|
DBFA7175187F1D9B00A76262 /* ffi64_x86_64.c */,
|
||||||
43B5D3F71D35473200D1E1FD /* ffiw64_x86_64.c */,
|
43B5D3F71D35473200D1E1FD /* ffiw64_x86_64.c */,
|
||||||
DBFA7176187F1D9B00A76262 /* ffi_i386.c */,
|
|
||||||
43E9A5C51D352C1500926A8F /* sysv_i386.S */,
|
|
||||||
43E9A5C61D352C1500926A8F /* unix64_x86_64.S */,
|
43E9A5C61D352C1500926A8F /* unix64_x86_64.S */,
|
||||||
43B5D3F91D3547CE00D1E1FD /* win64_x86_64.S */,
|
43B5D3F91D3547CE00D1E1FD /* win64_x86_64.S */,
|
||||||
);
|
);
|
||||||
@@ -333,11 +303,8 @@
|
|||||||
DBFA7181187F1DA100A76262 /* include */ = {
|
DBFA7181187F1DA100A76262 /* include */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
DBFA7182187F1DA100A76262 /* ffi_i386.h */,
|
|
||||||
DBFA7183187F1DA100A76262 /* ffi_x86_64.h */,
|
DBFA7183187F1DA100A76262 /* ffi_x86_64.h */,
|
||||||
DBFA7184187F1DA100A76262 /* fficonfig_i386.h */,
|
|
||||||
DBFA7185187F1DA100A76262 /* fficonfig_x86_64.h */,
|
DBFA7185187F1DA100A76262 /* fficonfig_x86_64.h */,
|
||||||
DBFA7186187F1DA100A76262 /* ffitarget_i386.h */,
|
|
||||||
DBFA7187187F1DA100A76262 /* ffitarget_x86_64.h */,
|
DBFA7187187F1DA100A76262 /* ffitarget_x86_64.h */,
|
||||||
);
|
);
|
||||||
path = include;
|
path = include;
|
||||||
@@ -359,8 +326,6 @@
|
|||||||
FDDB2F3E1F5D61BC00EF414E /* asmnames.h */,
|
FDDB2F3E1F5D61BC00EF414E /* asmnames.h */,
|
||||||
DBFA718C187F1DA100A76262 /* ffi64_x86_64.c */,
|
DBFA718C187F1DA100A76262 /* ffi64_x86_64.c */,
|
||||||
FDDB2F3F1F5D666900EF414E /* ffiw64_x86_64.c */,
|
FDDB2F3F1F5D666900EF414E /* ffiw64_x86_64.c */,
|
||||||
DBFA718D187F1DA100A76262 /* ffi_i386.c */,
|
|
||||||
DBFA718B187F1DA100A76262 /* sysv_i386.S */,
|
|
||||||
DBFA718A187F1DA100A76262 /* unix64_x86_64.S */,
|
DBFA718A187F1DA100A76262 /* unix64_x86_64.S */,
|
||||||
FDDB2F441F5D68C900EF414E /* win64_x86_64.S */,
|
FDDB2F441F5D68C900EF414E /* win64_x86_64.S */,
|
||||||
);
|
);
|
||||||
@@ -379,11 +344,8 @@
|
|||||||
DBFA714A187F1D8600A76262 /* ffi.h in Headers */,
|
DBFA714A187F1D8600A76262 /* ffi.h in Headers */,
|
||||||
DBFA718F187F1DA100A76262 /* ffi_x86_64.h in Headers */,
|
DBFA718F187F1DA100A76262 /* ffi_x86_64.h in Headers */,
|
||||||
DBFA7191187F1DA100A76262 /* fficonfig_x86_64.h in Headers */,
|
DBFA7191187F1DA100A76262 /* fficonfig_x86_64.h in Headers */,
|
||||||
DBFA718E187F1DA100A76262 /* ffi_i386.h in Headers */,
|
|
||||||
DBFA7190187F1DA100A76262 /* fficonfig_i386.h in Headers */,
|
|
||||||
DBFA714B187F1D8600A76262 /* ffi_common.h in Headers */,
|
DBFA714B187F1D8600A76262 /* ffi_common.h in Headers */,
|
||||||
DBFA7193187F1DA100A76262 /* ffitarget_x86_64.h in Headers */,
|
DBFA7193187F1DA100A76262 /* ffitarget_x86_64.h in Headers */,
|
||||||
DBFA7192187F1DA100A76262 /* ffitarget_i386.h in Headers */,
|
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
@@ -549,14 +511,12 @@
|
|||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
43E9A5C81D352C1500926A8F /* unix64_x86_64.S in Sources */,
|
43E9A5C81D352C1500926A8F /* unix64_x86_64.S in Sources */,
|
||||||
43E9A5C71D352C1500926A8F /* sysv_i386.S in Sources */,
|
|
||||||
DBFA717E187F1D9B00A76262 /* ffi64_x86_64.c in Sources */,
|
DBFA717E187F1D9B00A76262 /* ffi64_x86_64.c in Sources */,
|
||||||
DBFA7179187F1D9B00A76262 /* ffi_armv7.c in Sources */,
|
DBFA7179187F1D9B00A76262 /* ffi_armv7.c in Sources */,
|
||||||
DBFA714E187F1D8600A76262 /* closures.c in Sources */,
|
DBFA714E187F1D8600A76262 /* closures.c in Sources */,
|
||||||
DBFA717A187F1D9B00A76262 /* sysv_armv7.S in Sources */,
|
DBFA717A187F1D9B00A76262 /* sysv_armv7.S in Sources */,
|
||||||
43B5D3F81D35473200D1E1FD /* ffiw64_x86_64.c in Sources */,
|
43B5D3F81D35473200D1E1FD /* ffiw64_x86_64.c in Sources */,
|
||||||
DBFA7156187F1D8600A76262 /* prep_cif.c in Sources */,
|
DBFA7156187F1D8600A76262 /* prep_cif.c in Sources */,
|
||||||
DBFA717F187F1D9B00A76262 /* ffi_i386.c in Sources */,
|
|
||||||
DBFA7158187F1D8600A76262 /* raw_api.c in Sources */,
|
DBFA7158187F1D8600A76262 /* raw_api.c in Sources */,
|
||||||
DBFA7178187F1D9B00A76262 /* sysv_arm64.S in Sources */,
|
DBFA7178187F1D9B00A76262 /* sysv_arm64.S in Sources */,
|
||||||
DBFA715A187F1D8600A76262 /* types.c in Sources */,
|
DBFA715A187F1D8600A76262 /* types.c in Sources */,
|
||||||
@@ -570,9 +530,7 @@
|
|||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
DBFA7196187F1DA100A76262 /* ffi64_x86_64.c in Sources */,
|
DBFA7196187F1DA100A76262 /* ffi64_x86_64.c in Sources */,
|
||||||
DBFA7195187F1DA100A76262 /* sysv_i386.S in Sources */,
|
|
||||||
DBFA7157187F1D8600A76262 /* prep_cif.c in Sources */,
|
DBFA7157187F1D8600A76262 /* prep_cif.c in Sources */,
|
||||||
DBFA7197187F1DA100A76262 /* ffi_i386.c in Sources */,
|
|
||||||
FDDB2F411F5D66E200EF414E /* ffiw64_x86_64.c in Sources */,
|
FDDB2F411F5D66E200EF414E /* ffiw64_x86_64.c in Sources */,
|
||||||
DBFA715B187F1D8600A76262 /* types.c in Sources */,
|
DBFA715B187F1D8600A76262 /* types.c in Sources */,
|
||||||
DBFA7159187F1D8600A76262 /* raw_api.c in Sources */,
|
DBFA7159187F1D8600A76262 /* raw_api.c in Sources */,
|
||||||
@@ -587,14 +545,12 @@
|
|||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
FDB52FB31F6144FA00AA92E6 /* unix64_x86_64.S in Sources */,
|
FDB52FB31F6144FA00AA92E6 /* unix64_x86_64.S in Sources */,
|
||||||
FDB52FB41F6144FA00AA92E6 /* sysv_i386.S in Sources */,
|
|
||||||
FDB52FB51F6144FA00AA92E6 /* ffi64_x86_64.c in Sources */,
|
FDB52FB51F6144FA00AA92E6 /* ffi64_x86_64.c in Sources */,
|
||||||
FDB52FB61F6144FA00AA92E6 /* ffi_armv7.c in Sources */,
|
FDB52FB61F6144FA00AA92E6 /* ffi_armv7.c in Sources */,
|
||||||
FDB52FB71F6144FA00AA92E6 /* closures.c in Sources */,
|
FDB52FB71F6144FA00AA92E6 /* closures.c in Sources */,
|
||||||
FDB52FB81F6144FA00AA92E6 /* sysv_armv7.S in Sources */,
|
FDB52FB81F6144FA00AA92E6 /* sysv_armv7.S in Sources */,
|
||||||
FDB52FB91F6144FA00AA92E6 /* ffiw64_x86_64.c in Sources */,
|
FDB52FB91F6144FA00AA92E6 /* ffiw64_x86_64.c in Sources */,
|
||||||
FDB52FBA1F6144FA00AA92E6 /* prep_cif.c in Sources */,
|
FDB52FBA1F6144FA00AA92E6 /* prep_cif.c in Sources */,
|
||||||
FDB52FBB1F6144FA00AA92E6 /* ffi_i386.c in Sources */,
|
|
||||||
FDB52FBC1F6144FA00AA92E6 /* raw_api.c in Sources */,
|
FDB52FBC1F6144FA00AA92E6 /* raw_api.c in Sources */,
|
||||||
FDB52FBD1F6144FA00AA92E6 /* sysv_arm64.S in Sources */,
|
FDB52FBD1F6144FA00AA92E6 /* sysv_arm64.S in Sources */,
|
||||||
FDB52FBE1F6144FA00AA92E6 /* types.c in Sources */,
|
FDB52FBE1F6144FA00AA92E6 /* types.c in Sources */,
|
||||||
@@ -608,9 +564,7 @@
|
|||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
FDDB2F4A1F5D846400EF414E /* ffi64_x86_64.c in Sources */,
|
FDDB2F4A1F5D846400EF414E /* ffi64_x86_64.c in Sources */,
|
||||||
FDDB2F4B1F5D846400EF414E /* sysv_i386.S in Sources */,
|
|
||||||
FDDB2F4C1F5D846400EF414E /* prep_cif.c in Sources */,
|
FDDB2F4C1F5D846400EF414E /* prep_cif.c in Sources */,
|
||||||
FDDB2F4D1F5D846400EF414E /* ffi_i386.c in Sources */,
|
|
||||||
FDDB2F4E1F5D846400EF414E /* ffiw64_x86_64.c in Sources */,
|
FDDB2F4E1F5D846400EF414E /* ffiw64_x86_64.c in Sources */,
|
||||||
FDDB2F4F1F5D846400EF414E /* types.c in Sources */,
|
FDDB2F4F1F5D846400EF414E /* types.c in Sources */,
|
||||||
FDDB2F501F5D846400EF414E /* raw_api.c in Sources */,
|
FDDB2F501F5D846400EF414E /* raw_api.c in Sources */,
|
||||||
@@ -712,7 +666,7 @@
|
|||||||
PRODUCT_NAME = ffi;
|
PRODUCT_NAME = ffi;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
VALID_ARCHS = "arm64 armv7 armv7s i386 x86_64";
|
VALID_ARCHS = "arm64 armv7 armv7s x86_64";
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
@@ -746,7 +700,7 @@
|
|||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
VALIDATE_PRODUCT = YES;
|
VALIDATE_PRODUCT = YES;
|
||||||
VALID_ARCHS = "arm64 armv7 armv7s i386 x86_64";
|
VALID_ARCHS = "arm64 armv7 armv7s x86_64";
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -26,4 +26,4 @@
|
|||||||
# release, then set age to 0.
|
# release, then set age to 0.
|
||||||
#
|
#
|
||||||
# CURRENT:REVISION:AGE
|
# CURRENT:REVISION:AGE
|
||||||
8:0:1
|
9:0:1
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ AC_DEFUN([GCC_AS_CFI_PSEUDO_OP],
|
|||||||
[AC_CACHE_CHECK([assembler .cfi pseudo-op support],
|
[AC_CACHE_CHECK([assembler .cfi pseudo-op support],
|
||||||
gcc_cv_as_cfi_pseudo_op, [
|
gcc_cv_as_cfi_pseudo_op, [
|
||||||
gcc_cv_as_cfi_pseudo_op=unknown
|
gcc_cv_as_cfi_pseudo_op=unknown
|
||||||
AC_TRY_COMPILE([asm (".cfi_startproc\n\t.cfi_endproc");],,
|
AC_TRY_COMPILE([asm (".cfi_sections\n\t.cfi_startproc\n\t.cfi_endproc");],,
|
||||||
[gcc_cv_as_cfi_pseudo_op=yes],
|
[gcc_cv_as_cfi_pseudo_op=yes],
|
||||||
[gcc_cv_as_cfi_pseudo_op=no])
|
[gcc_cv_as_cfi_pseudo_op=no])
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -23,33 +23,12 @@
|
|||||||
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
||||||
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify it
|
# Copying and distribution of this file, with or without modification, are
|
||||||
# under the terms of the GNU General Public License as published by the
|
# permitted in any medium without royalty provided the copyright notice
|
||||||
# Free Software Foundation, either version 3 of the License, or (at your
|
# and this notice are preserved. This file is offered as-is, without any
|
||||||
# option) any later version.
|
# warranty.
|
||||||
#
|
|
||||||
# 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, the respective Autoconf Macro's copyright owner
|
|
||||||
# gives unlimited permission to copy, distribute and modify the configure
|
|
||||||
# scripts that are the output of Autoconf when processing the Macro. You
|
|
||||||
# need not follow the terms of the GNU General Public License when using
|
|
||||||
# or distributing such scripts, even though portions of the text of the
|
|
||||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
|
||||||
# all other use of the material that constitutes the Autoconf Macro.
|
|
||||||
#
|
|
||||||
# This special exception to the GPL applies to versions of the Autoconf
|
|
||||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
|
||||||
# modified version of the Autoconf Macro, you may extend this special
|
|
||||||
# exception to the GPL to apply to your modified version as well.
|
|
||||||
|
|
||||||
#serial 7
|
#serial 8
|
||||||
|
|
||||||
AC_DEFUN([AX_APPEND_FLAG],
|
AC_DEFUN([AX_APPEND_FLAG],
|
||||||
[dnl
|
[dnl
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
# modified version of the Autoconf Macro, you may extend this special
|
# modified version of the Autoconf Macro, you may extend this special
|
||||||
# exception to the GPL to apply to your modified version as well.
|
# exception to the GPL to apply to your modified version as well.
|
||||||
|
|
||||||
#serial 17
|
#serial 18
|
||||||
|
|
||||||
AC_DEFUN([AX_CC_MAXOPT],
|
AC_DEFUN([AX_CC_MAXOPT],
|
||||||
[
|
[
|
||||||
@@ -68,19 +68,18 @@ AC_ARG_ENABLE(portable-binary, [AS_HELP_STRING([--enable-portable-binary], [disa
|
|||||||
|
|
||||||
# Try to determine "good" native compiler flags if none specified via CFLAGS
|
# Try to determine "good" native compiler flags if none specified via CFLAGS
|
||||||
if test "$ac_test_CFLAGS" != "set"; then
|
if test "$ac_test_CFLAGS" != "set"; then
|
||||||
CFLAGS=""
|
|
||||||
case $ax_cv_c_compiler_vendor in
|
case $ax_cv_c_compiler_vendor in
|
||||||
dec) CFLAGS="-newc -w0 -O5 -ansi_alias -ansi_args -fp_reorder -tune host"
|
dec) CFLAGS="$CFLAGS -newc -w0 -O5 -ansi_alias -ansi_args -fp_reorder -tune host"
|
||||||
if test "x$acx_maxopt_portable" = xno; then
|
if test "x$acx_maxopt_portable" = xno; then
|
||||||
CFLAGS="$CFLAGS -arch host"
|
CFLAGS="$CFLAGS -arch host"
|
||||||
fi;;
|
fi;;
|
||||||
|
|
||||||
sun) CFLAGS="-native -fast -xO5 -dalign"
|
sun) CFLAGS="$CFLAGS -native -fast -xO5 -dalign"
|
||||||
if test "x$acx_maxopt_portable" = xyes; then
|
if test "x$acx_maxopt_portable" = xyes; then
|
||||||
CFLAGS="$CFLAGS -xarch=generic"
|
CFLAGS="$CFLAGS -xarch=generic"
|
||||||
fi;;
|
fi;;
|
||||||
|
|
||||||
hp) CFLAGS="+Oall +Optrs_ansi +DSnative"
|
hp) CFLAGS="$CFLAGS +Oall +Optrs_ansi +DSnative"
|
||||||
if test "x$acx_maxopt_portable" = xyes; then
|
if test "x$acx_maxopt_portable" = xyes; then
|
||||||
CFLAGS="$CFLAGS +DAportable"
|
CFLAGS="$CFLAGS +DAportable"
|
||||||
fi;;
|
fi;;
|
||||||
@@ -91,8 +90,8 @@ if test "$ac_test_CFLAGS" != "set"; then
|
|||||||
xlc_opt="-qtune=auto"
|
xlc_opt="-qtune=auto"
|
||||||
fi
|
fi
|
||||||
AX_CHECK_COMPILE_FLAG($xlc_opt,
|
AX_CHECK_COMPILE_FLAG($xlc_opt,
|
||||||
CFLAGS="-O3 -qansialias -w $xlc_opt",
|
CFLAGS="$CFLAGS -O3 -qansialias -w $xlc_opt",
|
||||||
[CFLAGS="-O3 -qansialias -w"
|
[CFLAGS="$CFLAGS -O3 -qansialias -w"
|
||||||
echo "******************************************************"
|
echo "******************************************************"
|
||||||
echo "* You seem to have the IBM C compiler. It is *"
|
echo "* You seem to have the IBM C compiler. It is *"
|
||||||
echo "* recommended for best performance that you use: *"
|
echo "* recommended for best performance that you use: *"
|
||||||
@@ -105,7 +104,7 @@ if test "$ac_test_CFLAGS" != "set"; then
|
|||||||
echo "******************************************************"])
|
echo "******************************************************"])
|
||||||
;;
|
;;
|
||||||
|
|
||||||
intel) CFLAGS="-O3 -ansi_alias"
|
intel) CFLAGS="$CFLAGS -O3 -ansi_alias"
|
||||||
if test "x$acx_maxopt_portable" = xno; then
|
if test "x$acx_maxopt_portable" = xno; then
|
||||||
icc_archflag=unknown
|
icc_archflag=unknown
|
||||||
icc_flags=""
|
icc_flags=""
|
||||||
@@ -146,7 +145,7 @@ if test "$ac_test_CFLAGS" != "set"; then
|
|||||||
|
|
||||||
gnu)
|
gnu)
|
||||||
# default optimization flags for gcc on all systems
|
# default optimization flags for gcc on all systems
|
||||||
CFLAGS="-O3 -fomit-frame-pointer"
|
CFLAGS="$CFLAGS -O3 -fomit-frame-pointer"
|
||||||
|
|
||||||
# -malign-double for x86 systems
|
# -malign-double for x86 systems
|
||||||
# libffi local change -- don't align double, as it changes the ABI
|
# libffi local change -- don't align double, as it changes the ABI
|
||||||
@@ -164,7 +163,7 @@ if test "$ac_test_CFLAGS" != "set"; then
|
|||||||
|
|
||||||
microsoft)
|
microsoft)
|
||||||
# default optimization flags for MSVC opt builds
|
# default optimization flags for MSVC opt builds
|
||||||
CFLAGS="-O2"
|
CFLAGS="$CFLAGS -O2"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -176,7 +175,7 @@ if test "$ac_test_CFLAGS" != "set"; then
|
|||||||
echo "* (otherwise, a default of CFLAGS=-O3 will be used) *"
|
echo "* (otherwise, a default of CFLAGS=-O3 will be used) *"
|
||||||
echo "********************************************************"
|
echo "********************************************************"
|
||||||
echo ""
|
echo ""
|
||||||
CFLAGS="-O3"
|
CFLAGS="$CFLAGS -O3"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AX_CHECK_COMPILE_FLAG($CFLAGS, [], [
|
AX_CHECK_COMPILE_FLAG($CFLAGS, [], [
|
||||||
@@ -187,7 +186,6 @@ if test "$ac_test_CFLAGS" != "set"; then
|
|||||||
echo "* Use ./configure CFLAGS=... to specify your own flags *"
|
echo "* Use ./configure CFLAGS=... to specify your own flags *"
|
||||||
echo "********************************************************"
|
echo "********************************************************"
|
||||||
echo ""
|
echo ""
|
||||||
CFLAGS=""
|
|
||||||
])
|
])
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -29,33 +29,12 @@
|
|||||||
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
||||||
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify it
|
# Copying and distribution of this file, with or without modification, are
|
||||||
# under the terms of the GNU General Public License as published by the
|
# permitted in any medium without royalty provided the copyright notice
|
||||||
# Free Software Foundation, either version 3 of the License, or (at your
|
# and this notice are preserved. This file is offered as-is, without any
|
||||||
# option) any later version.
|
# warranty.
|
||||||
#
|
|
||||||
# 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, the respective Autoconf Macro's copyright owner
|
|
||||||
# gives unlimited permission to copy, distribute and modify the configure
|
|
||||||
# scripts that are the output of Autoconf when processing the Macro. You
|
|
||||||
# need not follow the terms of the GNU General Public License when using
|
|
||||||
# or distributing such scripts, even though portions of the text of the
|
|
||||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
|
||||||
# all other use of the material that constitutes the Autoconf Macro.
|
|
||||||
#
|
|
||||||
# This special exception to the GPL applies to versions of the Autoconf
|
|
||||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
|
||||||
# modified version of the Autoconf Macro, you may extend this special
|
|
||||||
# exception to the GPL to apply to your modified version as well.
|
|
||||||
|
|
||||||
#serial 5
|
#serial 6
|
||||||
|
|
||||||
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
|
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
|
||||||
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
|
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
# modified version of the Autoconf Macro, you may extend this special
|
# modified version of the Autoconf Macro, you may extend this special
|
||||||
# exception to the GPL to apply to your modified version as well.
|
# exception to the GPL to apply to your modified version as well.
|
||||||
|
|
||||||
#serial 16
|
#serial 17
|
||||||
|
|
||||||
AC_DEFUN([AX_COMPILER_VENDOR],
|
AC_DEFUN([AX_COMPILER_VENDOR],
|
||||||
[AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,
|
[AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,
|
||||||
@@ -56,6 +56,7 @@ AC_DEFUN([AX_COMPILER_VENDOR],
|
|||||||
clang: __clang__
|
clang: __clang__
|
||||||
cray: _CRAYC
|
cray: _CRAYC
|
||||||
fujitsu: __FUJITSU
|
fujitsu: __FUJITSU
|
||||||
|
sdcc: SDCC, __SDCC
|
||||||
gnu: __GNUC__
|
gnu: __GNUC__
|
||||||
sun: __SUNPRO_C,__SUNPRO_CC
|
sun: __SUNPRO_C,__SUNPRO_CC
|
||||||
hp: __HP_cc,__HP_aCC
|
hp: __HP_cc,__HP_aCC
|
||||||
|
|||||||
@@ -31,33 +31,12 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify it
|
# Copying and distribution of this file, with or without modification, are
|
||||||
# under the terms of the GNU General Public License as published by the
|
# permitted in any medium without royalty provided the copyright notice
|
||||||
# Free Software Foundation; either version 3 of the License, or (at your
|
# and this notice are preserved. This file is offered as-is, without any
|
||||||
# option) any later version.
|
# warranty.
|
||||||
#
|
|
||||||
# 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, the respective Autoconf Macro's copyright owner
|
|
||||||
# gives unlimited permission to copy, distribute and modify the configure
|
|
||||||
# scripts that are the output of Autoconf when processing the Macro. You
|
|
||||||
# need not follow the terms of the GNU General Public License when using
|
|
||||||
# or distributing such scripts, even though portions of the text of the
|
|
||||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
|
||||||
# all other use of the material that constitutes the Autoconf Macro.
|
|
||||||
#
|
|
||||||
# This special exception to the GPL applies to versions of the Autoconf
|
|
||||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
|
||||||
# modified version of the Autoconf Macro, you may extend this special
|
|
||||||
# exception to the GPL to apply to your modified version as well.
|
|
||||||
|
|
||||||
#serial 13
|
#serial 14
|
||||||
|
|
||||||
AC_DEFUN([AX_CONFIGURE_ARGS],[
|
AC_DEFUN([AX_CONFIGURE_ARGS],[
|
||||||
# [$]@ is unusable in 2.60+ but earlier autoconf had no ac_configure_args
|
# [$]@ is unusable in 2.60+ but earlier autoconf had no ac_configure_args
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
|
# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
|
||||||
# Copyright (c) 2008 Matteo Frigo
|
# Copyright (c) 2008 Matteo Frigo
|
||||||
# Copyright (c) 2014 Tsukasa Oi
|
# Copyright (c) 2014 Tsukasa Oi
|
||||||
# Copyright (c) 2017 Alexey Kopytov
|
# Copyright (c) 2017-2018 Alexey Kopytov
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify it
|
# 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
|
# under the terms of the GNU General Public License as published by the
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
# modified version of the Autoconf Macro, you may extend this special
|
# modified version of the Autoconf Macro, you may extend this special
|
||||||
# exception to the GPL to apply to your modified version as well.
|
# exception to the GPL to apply to your modified version as well.
|
||||||
|
|
||||||
#serial 20
|
#serial 22
|
||||||
|
|
||||||
AC_DEFUN([AX_GCC_ARCHFLAG],
|
AC_DEFUN([AX_GCC_ARCHFLAG],
|
||||||
[AC_REQUIRE([AC_PROG_CC])
|
[AC_REQUIRE([AC_PROG_CC])
|
||||||
@@ -108,7 +108,7 @@ case $host_cpu in
|
|||||||
*2?6[[ad]]?:*:*:*) ax_gcc_arch="sandybridge corei7-avx corei7 core2 pentium-m pentium3 pentiumpro" ;;
|
*2?6[[ad]]?:*:*:*) ax_gcc_arch="sandybridge corei7-avx corei7 core2 pentium-m pentium3 pentiumpro" ;;
|
||||||
*3?6[[ae]]?:*:*:*) ax_gcc_arch="ivybridge core-avx-i corei7-avx corei7 core2 pentium-m pentium3 pentiumpro" ;;
|
*3?6[[ae]]?:*:*:*) ax_gcc_arch="ivybridge core-avx-i corei7-avx corei7 core2 pentium-m pentium3 pentiumpro" ;;
|
||||||
*3?6[[cf]]?:*:*:*|*4?6[[56]]?:*:*:*) ax_gcc_arch="haswell core-avx2 core-avx-i corei7-avx corei7 core2 pentium-m pentium3 pentiumpro" ;;
|
*3?6[[cf]]?:*:*:*|*4?6[[56]]?:*:*:*) ax_gcc_arch="haswell core-avx2 core-avx-i corei7-avx corei7 core2 pentium-m pentium3 pentiumpro" ;;
|
||||||
*3?6d?:*:*:*) ax_gcc_arch="broadwell core-avx2 core-avx-i corei7-avx corei7 core2 pentium-m pentium3 pentiumpro" ;;
|
*3?6d?:*:*:*|*4?6[[7f]]?:*:*:*|*5?66?:*:*:*) ax_gcc_arch="broadwell core-avx2 core-avx-i corei7-avx corei7 core2 pentium-m pentium3 pentiumpro" ;;
|
||||||
*1?6c?:*:*:*|*2?6[[67]]?:*:*:*|*3?6[[56]]?:*:*:*) ax_gcc_arch="bonnell atom core2 pentium-m pentium3 pentiumpro" ;;
|
*1?6c?:*:*:*|*2?6[[67]]?:*:*:*|*3?6[[56]]?:*:*:*) ax_gcc_arch="bonnell atom core2 pentium-m pentium3 pentiumpro" ;;
|
||||||
*3?67?:*:*:*|*[[45]]?6[[ad]]?:*:*:*) ax_gcc_arch="silvermont atom core2 pentium-m pentium3 pentiumpro" ;;
|
*3?67?:*:*:*|*[[45]]?6[[ad]]?:*:*:*) ax_gcc_arch="silvermont atom core2 pentium-m pentium3 pentiumpro" ;;
|
||||||
*000?f[[012]]?:*:*:*|?f[[012]]?:*:*:*|f[[012]]?:*:*:*) ax_gcc_arch="pentium4 pentiumpro" ;;
|
*000?f[[012]]?:*:*:*|?f[[012]]?:*:*:*|f[[012]]?:*:*:*) ax_gcc_arch="pentium4 pentiumpro" ;;
|
||||||
@@ -198,6 +198,10 @@ case $host_cpu in
|
|||||||
*POWER4*|*power4*|*gq*) ax_gcc_arch="power4 970";;
|
*POWER4*|*power4*|*gq*) ax_gcc_arch="power4 970";;
|
||||||
*POWER5*|*power5*|*gr*|*gs*) ax_gcc_arch="power5 power4 970";;
|
*POWER5*|*power5*|*gr*|*gs*) ax_gcc_arch="power5 power4 970";;
|
||||||
603ev|8240) ax_gcc_arch="$cputype 603e 603";;
|
603ev|8240) ax_gcc_arch="$cputype 603e 603";;
|
||||||
|
*POWER7*) ax_gcc_arch="power7";;
|
||||||
|
*POWER8*) ax_gcc_arch="power8";;
|
||||||
|
*POWER9*) ax_gcc_arch="power9";;
|
||||||
|
*POWER10*) ax_gcc_arch="power10";;
|
||||||
*) ax_gcc_arch=$cputype ;;
|
*) ax_gcc_arch=$cputype ;;
|
||||||
esac
|
esac
|
||||||
ax_gcc_arch="$ax_gcc_arch powerpc"
|
ax_gcc_arch="$ax_gcc_arch powerpc"
|
||||||
|
|||||||
8372
m4/libtool.m4
vendored
Normal file
8372
m4/libtool.m4
vendored
Normal file
File diff suppressed because it is too large
Load Diff
437
m4/ltoptions.m4
vendored
Normal file
437
m4/ltoptions.m4
vendored
Normal file
@@ -0,0 +1,437 @@
|
|||||||
|
# Helper functions for option handling. -*- Autoconf -*-
|
||||||
|
#
|
||||||
|
# Copyright (C) 2004-2005, 2007-2009, 2011-2015 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
m4/ltsugar.m4
vendored
Normal file
124
m4/ltsugar.m4
vendored
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
|
||||||
|
#
|
||||||
|
# Copyright (C) 2004-2005, 2007-2008, 2011-2015 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
|
||||||
|
])
|
||||||
23
m4/ltversion.m4
vendored
Normal file
23
m4/ltversion.m4
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# ltversion.m4 -- version numbers -*- Autoconf -*-
|
||||||
|
#
|
||||||
|
# Copyright (C) 2004, 2011-2015 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 4179 ltversion.m4
|
||||||
|
# This file is part of GNU Libtool
|
||||||
|
|
||||||
|
m4_define([LT_PACKAGE_VERSION], [2.4.6])
|
||||||
|
m4_define([LT_PACKAGE_REVISION], [2.4.6])
|
||||||
|
|
||||||
|
AC_DEFUN([LTVERSION_VERSION],
|
||||||
|
[macro_version='2.4.6'
|
||||||
|
macro_revision='2.4.6'
|
||||||
|
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
|
||||||
|
_LT_DECL(, macro_revision, 0)
|
||||||
|
])
|
||||||
99
m4/lt~obsolete.m4
vendored
Normal file
99
m4/lt~obsolete.m4
vendored
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
|
||||||
|
#
|
||||||
|
# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 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])])
|
||||||
333
make_sunver.pl
Normal file
333
make_sunver.pl
Normal file
@@ -0,0 +1,333 @@
|
|||||||
|
#!/usr/bin/perl -w
|
||||||
|
|
||||||
|
# make_sunver.pl
|
||||||
|
#
|
||||||
|
# This script takes at least two arguments, a GNU style version script and
|
||||||
|
# a list of object and archive files, and generates a corresponding Sun
|
||||||
|
# style version script as follows:
|
||||||
|
#
|
||||||
|
# Each glob pattern, C++ mangled pattern or literal in the input script is
|
||||||
|
# matched against all global symbols in the input objects, emitting those
|
||||||
|
# that matched (or nothing if no match was found).
|
||||||
|
# A comment with the original pattern and its type is left in the output
|
||||||
|
# file to make it easy to understand the matches.
|
||||||
|
#
|
||||||
|
# It uses elfdump when present (native), GNU readelf otherwise.
|
||||||
|
# It depends on the GNU version of c++filt, since it must understand the
|
||||||
|
# GNU mangling style.
|
||||||
|
|
||||||
|
use FileHandle;
|
||||||
|
use IPC::Open2;
|
||||||
|
|
||||||
|
# Enforce C locale.
|
||||||
|
$ENV{'LC_ALL'} = "C";
|
||||||
|
$ENV{'LANG'} = "C";
|
||||||
|
|
||||||
|
# Input version script, GNU style.
|
||||||
|
my $symvers = shift;
|
||||||
|
|
||||||
|
##########
|
||||||
|
# Get all the symbols from the library, match them, and add them to a hash.
|
||||||
|
|
||||||
|
my %sym_hash = ();
|
||||||
|
|
||||||
|
# List of objects and archives to process.
|
||||||
|
my @OBJECTS = ();
|
||||||
|
|
||||||
|
# List of shared objects to omit from processing.
|
||||||
|
my @SHAREDOBJS = ();
|
||||||
|
|
||||||
|
# Filter out those input archives that have corresponding shared objects to
|
||||||
|
# avoid adding all symbols matched in the archive to the output map.
|
||||||
|
foreach $file (@ARGV) {
|
||||||
|
if (($so = $file) =~ s/\.a$/.so/ && -e $so) {
|
||||||
|
printf STDERR "omitted $file -> $so\n";
|
||||||
|
push (@SHAREDOBJS, $so);
|
||||||
|
} else {
|
||||||
|
push (@OBJECTS, $file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# We need to detect and ignore hidden symbols. Solaris nm can only detect
|
||||||
|
# this in the harder to parse default output format, and GNU nm not at all,
|
||||||
|
# so use elfdump -s in the native case and GNU readelf -s otherwise.
|
||||||
|
# GNU objdump -t cannot be used since it produces a variable number of
|
||||||
|
# columns.
|
||||||
|
|
||||||
|
# The path to elfdump.
|
||||||
|
my $elfdump = "/usr/ccs/bin/elfdump";
|
||||||
|
|
||||||
|
if (-f $elfdump) {
|
||||||
|
open ELFDUMP,$elfdump.' -s '.(join ' ',@OBJECTS).'|' or die $!;
|
||||||
|
my $skip_arsym = 0;
|
||||||
|
|
||||||
|
while (<ELFDUMP>) {
|
||||||
|
chomp;
|
||||||
|
|
||||||
|
# Ignore empty lines.
|
||||||
|
if (/^$/) {
|
||||||
|
# End of archive symbol table, stop skipping.
|
||||||
|
$skip_arsym = 0 if $skip_arsym;
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Keep skipping until end of archive symbol table.
|
||||||
|
next if ($skip_arsym);
|
||||||
|
|
||||||
|
# Ignore object name header for individual objects and archives.
|
||||||
|
next if (/:$/);
|
||||||
|
|
||||||
|
# Ignore table header lines.
|
||||||
|
next if (/^Symbol Table Section:/);
|
||||||
|
next if (/index.*value.*size/);
|
||||||
|
|
||||||
|
# Start of archive symbol table: start skipping.
|
||||||
|
if (/^Symbol Table: \(archive/) {
|
||||||
|
$skip_arsym = 1;
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Split table.
|
||||||
|
(undef, undef, undef, undef, $bind, $oth, undef, $shndx, $name) = split;
|
||||||
|
|
||||||
|
# Error out for unknown input.
|
||||||
|
die "unknown input line:\n$_" unless defined($bind);
|
||||||
|
|
||||||
|
# Ignore local symbols.
|
||||||
|
next if ($bind eq "LOCL");
|
||||||
|
# Ignore hidden symbols.
|
||||||
|
next if ($oth eq "H");
|
||||||
|
# Ignore undefined symbols.
|
||||||
|
next if ($shndx eq "UNDEF");
|
||||||
|
# Error out for unhandled cases.
|
||||||
|
if ($bind !~ /^(GLOB|WEAK)/ or $oth ne "D") {
|
||||||
|
die "unhandled symbol:\n$_";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Remember symbol.
|
||||||
|
$sym_hash{$name}++;
|
||||||
|
}
|
||||||
|
close ELFDUMP or die "$elfdump error";
|
||||||
|
} else {
|
||||||
|
open READELF, 'readelf -s -W '.(join ' ',@OBJECTS).'|' or die $!;
|
||||||
|
# Process each symbol.
|
||||||
|
while (<READELF>) {
|
||||||
|
chomp;
|
||||||
|
|
||||||
|
# Ignore empty lines.
|
||||||
|
next if (/^$/);
|
||||||
|
|
||||||
|
# Ignore object name header.
|
||||||
|
next if (/^File: .*$/);
|
||||||
|
|
||||||
|
# Ignore table header lines.
|
||||||
|
next if (/^Symbol table.*contains.*:/);
|
||||||
|
next if (/Num:.*Value.*Size/);
|
||||||
|
|
||||||
|
# Split table.
|
||||||
|
(undef, undef, undef, undef, $bind, $vis, $ndx, $name) = split;
|
||||||
|
|
||||||
|
# Error out for unknown input.
|
||||||
|
die "unknown input line:\n$_" unless defined($bind);
|
||||||
|
|
||||||
|
# Ignore local symbols.
|
||||||
|
next if ($bind eq "LOCAL");
|
||||||
|
# Ignore hidden symbols.
|
||||||
|
next if ($vis eq "HIDDEN");
|
||||||
|
# Ignore undefined symbols.
|
||||||
|
next if ($ndx eq "UND");
|
||||||
|
# Error out for unhandled cases.
|
||||||
|
if ($bind !~ /^(GLOBAL|WEAK)/ or $vis ne "DEFAULT") {
|
||||||
|
die "unhandled symbol:\n$_";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Remember symbol.
|
||||||
|
$sym_hash{$name}++;
|
||||||
|
}
|
||||||
|
close READELF or die "readelf error";
|
||||||
|
}
|
||||||
|
|
||||||
|
##########
|
||||||
|
# The various types of glob patterns.
|
||||||
|
#
|
||||||
|
# A glob pattern that is to be applied to the demangled name: 'cxx'.
|
||||||
|
# A glob patterns that applies directly to the name in the .o files: 'glob'.
|
||||||
|
# This pattern is ignored; used for local variables (usually just '*'): 'ign'.
|
||||||
|
|
||||||
|
# The type of the current pattern.
|
||||||
|
my $glob = 'glob';
|
||||||
|
|
||||||
|
# We're currently inside `extern "C++"', which Sun ld doesn't understand.
|
||||||
|
my $in_extern = 0;
|
||||||
|
|
||||||
|
# The c++filt command to use. This *must* be GNU c++filt; the Sun Studio
|
||||||
|
# c++filt doesn't handle the GNU mangling style.
|
||||||
|
my $cxxfilt = $ENV{'CXXFILT'} || "c++filt";
|
||||||
|
|
||||||
|
# The current version name.
|
||||||
|
my $current_version = "";
|
||||||
|
|
||||||
|
# Was there any attempt to match a symbol to this version?
|
||||||
|
my $matches_attempted;
|
||||||
|
|
||||||
|
# The number of versions which matched this symbol.
|
||||||
|
my $matched_symbols;
|
||||||
|
|
||||||
|
open F,$symvers or die $!;
|
||||||
|
|
||||||
|
# Print information about generating this file
|
||||||
|
print "# This file was generated by make_sunver.pl. DO NOT EDIT!\n";
|
||||||
|
print "# It was generated by:\n";
|
||||||
|
printf "# %s %s %s\n", $0, $symvers, (join ' ',@ARGV);
|
||||||
|
printf "# Omitted archives with corresponding shared libraries: %s\n",
|
||||||
|
(join ' ', @SHAREDOBJS) if $#SHAREDOBJS >= 0;
|
||||||
|
print "#\n\n";
|
||||||
|
|
||||||
|
while (<F>) {
|
||||||
|
# Lines of the form '};'
|
||||||
|
if (/^([ \t]*)(\}[ \t]*;[ \t]*)$/) {
|
||||||
|
$glob = 'glob';
|
||||||
|
if ($in_extern) {
|
||||||
|
$in_extern--;
|
||||||
|
print "$1##$2\n";
|
||||||
|
} else {
|
||||||
|
print;
|
||||||
|
}
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Lines of the form '} SOME_VERSION_NAME_1.0;'
|
||||||
|
if (/^[ \t]*\}[ \tA-Z0-9_.a-z]+;[ \t]*$/) {
|
||||||
|
$glob = 'glob';
|
||||||
|
# We tried to match symbols agains this version, but none matched.
|
||||||
|
# Emit dummy hidden symbol to avoid marking this version WEAK.
|
||||||
|
if ($matches_attempted && $matched_symbols == 0) {
|
||||||
|
print " hidden:\n";
|
||||||
|
print " .force_WEAK_off_$current_version = DATA S0x0 V0x0;\n";
|
||||||
|
}
|
||||||
|
print; next;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Comment and blank lines
|
||||||
|
if (/^[ \t]*\#/) { print; next; }
|
||||||
|
if (/^[ \t]*$/) { print; next; }
|
||||||
|
|
||||||
|
# Lines of the form '{'
|
||||||
|
if (/^([ \t]*){$/) {
|
||||||
|
if ($in_extern) {
|
||||||
|
print "$1##{\n";
|
||||||
|
} else {
|
||||||
|
print;
|
||||||
|
}
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Lines of the form 'SOME_VERSION_NAME_1.1 {'
|
||||||
|
if (/^([A-Z0-9_.]+)[ \t]+{$/) {
|
||||||
|
# Record version name.
|
||||||
|
$current_version = $1;
|
||||||
|
# Reset match attempts, #matched symbols for this version.
|
||||||
|
$matches_attempted = 0;
|
||||||
|
$matched_symbols = 0;
|
||||||
|
print;
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Ignore 'global:'
|
||||||
|
if (/^[ \t]*global:$/) { print; next; }
|
||||||
|
|
||||||
|
# After 'local:', globs should be ignored, they won't be exported.
|
||||||
|
if (/^[ \t]*local:$/) {
|
||||||
|
$glob = 'ign';
|
||||||
|
print;
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
|
# After 'extern "C++"', globs are C++ patterns
|
||||||
|
if (/^([ \t]*)(extern \"C\+\+\"[ \t]*)$/) {
|
||||||
|
$in_extern++;
|
||||||
|
$glob = 'cxx';
|
||||||
|
# Need to comment, Sun ld cannot handle this.
|
||||||
|
print "$1##$2\n"; next;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Chomp newline now we're done with passing through the input file.
|
||||||
|
chomp;
|
||||||
|
|
||||||
|
# Catch globs. Note that '{}' is not allowed in globs by this script,
|
||||||
|
# so only '*' and '[]' are available.
|
||||||
|
if (/^([ \t]*)([^ \t;{}#]+);?[ \t]*$/) {
|
||||||
|
my $ws = $1;
|
||||||
|
my $ptn = $2;
|
||||||
|
# Turn the glob into a regex by replacing '*' with '.*', '?' with '.'.
|
||||||
|
# Keep $ptn so we can still print the original form.
|
||||||
|
($pattern = $ptn) =~ s/\*/\.\*/g;
|
||||||
|
$pattern =~ s/\?/\./g;
|
||||||
|
|
||||||
|
if ($glob eq 'ign') {
|
||||||
|
# We're in a local: * section; just continue.
|
||||||
|
print "$_\n";
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Print the glob commented for human readers.
|
||||||
|
print "$ws##$ptn ($glob)\n";
|
||||||
|
# We tried to match a symbol to this version.
|
||||||
|
$matches_attempted++;
|
||||||
|
|
||||||
|
if ($glob eq 'glob') {
|
||||||
|
my %ptn_syms = ();
|
||||||
|
|
||||||
|
# Match ptn against symbols in %sym_hash.
|
||||||
|
foreach my $sym (keys %sym_hash) {
|
||||||
|
# Maybe it matches one of the patterns based on the symbol in
|
||||||
|
# the .o file.
|
||||||
|
$ptn_syms{$sym}++ if ($sym =~ /^$pattern$/);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach my $sym (sort keys(%ptn_syms)) {
|
||||||
|
$matched_symbols++;
|
||||||
|
print "$ws$sym;\n";
|
||||||
|
}
|
||||||
|
} elsif ($glob eq 'cxx') {
|
||||||
|
my %dem_syms = ();
|
||||||
|
|
||||||
|
# Verify that we're actually using GNU c++filt. Other versions
|
||||||
|
# most likely cannot handle GNU style symbol mangling.
|
||||||
|
my $cxxout = `$cxxfilt --version 2>&1`;
|
||||||
|
$cxxout =~ m/GNU/ or die "$0 requires GNU c++filt to function";
|
||||||
|
|
||||||
|
# Talk to c++filt through a pair of file descriptors.
|
||||||
|
# Need to start a fresh instance per pattern, otherwise the
|
||||||
|
# process grows to 500+ MB.
|
||||||
|
my $pid = open2(*FILTIN, *FILTOUT, $cxxfilt) or die $!;
|
||||||
|
|
||||||
|
# Match ptn against symbols in %sym_hash.
|
||||||
|
foreach my $sym (keys %sym_hash) {
|
||||||
|
# No? Well, maybe its demangled form matches one of those
|
||||||
|
# patterns.
|
||||||
|
printf FILTOUT "%s\n",$sym;
|
||||||
|
my $dem = <FILTIN>;
|
||||||
|
chomp $dem;
|
||||||
|
$dem_syms{$sym}++ if ($dem =~ /^$pattern$/);
|
||||||
|
}
|
||||||
|
|
||||||
|
close FILTOUT or die "c++filt error";
|
||||||
|
close FILTIN or die "c++filt error";
|
||||||
|
# Need to wait for the c++filt process to avoid lots of zombies.
|
||||||
|
waitpid $pid, 0;
|
||||||
|
|
||||||
|
foreach my $sym (sort keys(%dem_syms)) {
|
||||||
|
$matched_symbols++;
|
||||||
|
print "$ws$sym;\n";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
# No? Well, then ignore it.
|
||||||
|
}
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
# Important sanity check. This script can't handle lots of formats
|
||||||
|
# that GNU ld can, so be sure to error out if one is seen!
|
||||||
|
die "strange line `$_'";
|
||||||
|
}
|
||||||
|
close F;
|
||||||
563
man/Makefile.in
Normal file
563
man/Makefile.in
Normal file
@@ -0,0 +1,563 @@
|
|||||||
|
# Makefile.in generated by automake 1.16.2 from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
|
# Copyright (C) 1994-2020 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_append_flag.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_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@
|
||||||
|
ALLOCA = @ALLOCA@
|
||||||
|
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@
|
||||||
|
CPP = @CPP@
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
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@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
FFI_EXEC_TRAMPOLINE_TABLE = @FFI_EXEC_TRAMPOLINE_TABLE@
|
||||||
|
FGREP = @FGREP@
|
||||||
|
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@
|
||||||
|
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@
|
||||||
|
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@
|
||||||
|
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
missing
Normal file
215
missing
Normal file
@@ -0,0 +1,215 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# Common wrapper for a few potentially missing GNU programs.
|
||||||
|
|
||||||
|
scriptversion=2018-03-07.03; # UTC
|
||||||
|
|
||||||
|
# Copyright (C) 1996-2020 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:
|
||||||
33
msvc_build/aarch64/Ffi_staticLib.sln
Normal file
33
msvc_build/aarch64/Ffi_staticLib.sln
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 15
|
||||||
|
VisualStudioVersion = 15.0.28302.56
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Ffi_staticLib_arm64", "Ffi_staticLib.vcxproj", "{115502C0-BE05-4767-BF19-5C87D805FAD6}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|ARM64 = Debug|ARM64
|
||||||
|
Debug|x64 = Debug|x64
|
||||||
|
Debug|x86 = Debug|x86
|
||||||
|
Release|ARM64 = Release|ARM64
|
||||||
|
Release|x64 = Release|x64
|
||||||
|
Release|x86 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{115502C0-BE05-4767-BF19-5C87D805FAD6}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||||
|
{115502C0-BE05-4767-BF19-5C87D805FAD6}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||||
|
{115502C0-BE05-4767-BF19-5C87D805FAD6}.Debug|x64.ActiveCfg = Debug|ARM64
|
||||||
|
{115502C0-BE05-4767-BF19-5C87D805FAD6}.Debug|x86.ActiveCfg = Debug|ARM64
|
||||||
|
{115502C0-BE05-4767-BF19-5C87D805FAD6}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||||
|
{115502C0-BE05-4767-BF19-5C87D805FAD6}.Release|ARM64.Build.0 = Release|ARM64
|
||||||
|
{115502C0-BE05-4767-BF19-5C87D805FAD6}.Release|x64.ActiveCfg = Release|ARM64
|
||||||
|
{115502C0-BE05-4767-BF19-5C87D805FAD6}.Release|x86.ActiveCfg = Release|ARM64
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {241C54C7-20DD-4897-9376-E6B6D1B43BD5}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
130
msvc_build/aarch64/Ffi_staticLib.vcxproj
Normal file
130
msvc_build/aarch64/Ffi_staticLib.vcxproj
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|ARM64">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>ARM64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|ARM64">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>ARM64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<VCProjectVersion>15.0</VCProjectVersion>
|
||||||
|
<ProjectGuid>{115502C0-BE05-4767-BF19-5C87D805FAD6}</ProjectGuid>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<RootNamespace>FfistaticLib</RootNamespace>
|
||||||
|
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
||||||
|
<ProjectName>Ffi_staticLib_arm64</ProjectName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="Shared">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<PreprocessorDefinitions>FFI_BUILDING_DLL;_DEBUG;_LIB;USE_DL_PREFIX;ARM64;_M_ARM64;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<ConformanceMode>true</ConformanceMode>
|
||||||
|
<AdditionalIncludeDirectories>..\..\include;.\aarch64_include;..\..\src\aarch64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<IgnoreStandardIncludePath>false</IgnoreStandardIncludePath>
|
||||||
|
<BrowseInformation>true</BrowseInformation>
|
||||||
|
<OmitFramePointers>
|
||||||
|
</OmitFramePointers>
|
||||||
|
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<PreprocessorDefinitions>FFI_BUILDING_DLL;USE_DL_PREFIX;ARM64;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<ConformanceMode>true</ConformanceMode>
|
||||||
|
<AdditionalIncludeDirectories>..\..\include;.\aarch64_include;..\..\src\aarch64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
|
||||||
|
<AdditionalUsingDirectories>..\..\src;..\..\src\aarch64;%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
</Link>
|
||||||
|
<ProjectReference>
|
||||||
|
<LinkLibraryDependencies>true</LinkLibraryDependencies>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include=".\aarch64_include\ffi.h" />
|
||||||
|
<ClInclude Include=".\aarch64_include\fficonfig.h" />
|
||||||
|
<ClInclude Include="..\..\src\aarch64\ffitarget.h" />
|
||||||
|
<ClInclude Include="..\include\ffi_cfi.h" />
|
||||||
|
<ClInclude Include="..\include\ffi_common.h" />
|
||||||
|
<ClInclude Include="..\..\src\aarch64\internal.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\..\src\closures.c" />
|
||||||
|
<ClCompile Include="..\..\src\dlmalloc.c" />
|
||||||
|
<ClCompile Include="..\..\src\aarch64\ffi.c" />
|
||||||
|
<ClCompile Include="..\..\src\prep_cif.c" />
|
||||||
|
<ClCompile Include="..\..\src\types.c" />
|
||||||
|
</ItemGroup>
|
||||||
|
<!--ItemGroup>
|
||||||
|
<Object Include="..\..\..\..\Downloads\libffi-master-win64\src\aarch64\win64_armasm.obj" />
|
||||||
|
</ItemGroup-->
|
||||||
|
<ItemGroup>
|
||||||
|
<CustomBuild Include="..\..\src\aarch64\win64_armasm.S">
|
||||||
|
<!--ExcludedFromBuild Condition="'$(Platform)'!='ARM64'">true</ExcludedFromBuild -->
|
||||||
|
<Command>
|
||||||
|
cl /FA /EP /nologo /I"..\..\include" /I".\aarch64_include" /I"..\..\src\aarch64" "%(FullPath)" > $(IntDir)win64_armasm.i
|
||||||
|
armasm64 $(IntDir)win64_armasm.i /I"src\" /I"..\..\include" /I"..\..\src\aarch64" -o "$(IntDir)win64_armasm.obj"
|
||||||
|
</Command>
|
||||||
|
<Outputs>win64_armasm.obj;%(Outputs)</Outputs>
|
||||||
|
</CustomBuild>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
||||||
57
msvc_build/aarch64/Ffi_staticLib.vcxproj.filters
Normal file
57
msvc_build/aarch64/Ffi_staticLib.vcxproj.filters
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Header Files">
|
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Resource Files">
|
||||||
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\include\ffi.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\include\ffi_cfi.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\include\ffi_common.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\include\fficonfig.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\include\ffitarget.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\include\internal.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="src\closures.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\dlmalloc.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\ffi.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\prep_cif.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\types.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<CustomBuild Include="src\win64_armasm.S" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
4
msvc_build/aarch64/Ffi_staticLib.vcxproj.user
Normal file
4
msvc_build/aarch64/Ffi_staticLib.vcxproj.user
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup />
|
||||||
|
</Project>
|
||||||
@@ -49,26 +49,9 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Specify which architecture libffi is configured for. */
|
/* Specify which architecture libffi is configured for. */
|
||||||
/* --- Begin CPython patch ---
|
#ifndef AARCH64
|
||||||
ZCW: This is patched by us to avoid having to keep two mostly-identical files.
|
#define AARCH64
|
||||||
#ifndef X86_WIN32
|
|
||||||
#define X86_WIN32
|
|
||||||
#endif
|
#endif
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#ifdef _WIN64
|
|
||||||
# ifndef X86_WIN64
|
|
||||||
# define X86_WIN64
|
|
||||||
# endif
|
|
||||||
#else
|
|
||||||
# ifndef X86_WIN32
|
|
||||||
# define X86_WIN32
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
#endif /* _MSC_VER */
|
|
||||||
|
|
||||||
/* --- End CPython patch --- */
|
|
||||||
|
|
||||||
/* ---- System configuration information --------------------------------- */
|
/* ---- System configuration information --------------------------------- */
|
||||||
|
|
||||||
@@ -134,10 +117,8 @@ typedef struct _ffi_type
|
|||||||
#if defined _MSC_VER
|
#if defined _MSC_VER
|
||||||
# if defined FFI_BUILDING_DLL /* Building libffi.DLL with msvcc.sh */
|
# if defined FFI_BUILDING_DLL /* Building libffi.DLL with msvcc.sh */
|
||||||
# define FFI_API __declspec(dllexport)
|
# define FFI_API __declspec(dllexport)
|
||||||
#error FFI_BUILDING_DLL should not be defined
|
|
||||||
# elif !defined FFI_BUILDING /* Importing libffi.DLL */
|
# elif !defined FFI_BUILDING /* Importing libffi.DLL */
|
||||||
# define FFI_API __declspec(dllimport)
|
# define FFI_API __declspec(dllimport)
|
||||||
#error FFI_BUILDING should be defined
|
|
||||||
# else /* Building/linking static library */
|
# else /* Building/linking static library */
|
||||||
# define FFI_API
|
# define FFI_API
|
||||||
# endif
|
# endif
|
||||||
@@ -216,7 +197,7 @@ FFI_EXTERN ffi_type ffi_type_float;
|
|||||||
FFI_EXTERN ffi_type ffi_type_double;
|
FFI_EXTERN ffi_type ffi_type_double;
|
||||||
FFI_EXTERN ffi_type ffi_type_pointer;
|
FFI_EXTERN ffi_type ffi_type_pointer;
|
||||||
|
|
||||||
#if 1
|
#ifndef _M_ARM64
|
||||||
FFI_EXTERN ffi_type ffi_type_longdouble;
|
FFI_EXTERN ffi_type ffi_type_longdouble;
|
||||||
#else
|
#else
|
||||||
#define ffi_type_longdouble ffi_type_double
|
#define ffi_type_longdouble ffi_type_double
|
||||||
@@ -503,7 +484,7 @@ ffi_status ffi_get_struct_offsets (ffi_abi abi, ffi_type *struct_type,
|
|||||||
#define FFI_TYPE_INT 1
|
#define FFI_TYPE_INT 1
|
||||||
#define FFI_TYPE_FLOAT 2
|
#define FFI_TYPE_FLOAT 2
|
||||||
#define FFI_TYPE_DOUBLE 3
|
#define FFI_TYPE_DOUBLE 3
|
||||||
#if 1
|
#ifndef _M_ARM64
|
||||||
#define FFI_TYPE_LONGDOUBLE 4
|
#define FFI_TYPE_LONGDOUBLE 4
|
||||||
#else
|
#else
|
||||||
#define FFI_TYPE_LONGDOUBLE FFI_TYPE_DOUBLE
|
#define FFI_TYPE_LONGDOUBLE FFI_TYPE_DOUBLE
|
||||||
@@ -519,9 +500,9 @@ ffi_status ffi_get_struct_offsets (ffi_abi abi, ffi_type *struct_type,
|
|||||||
#define FFI_TYPE_STRUCT 13
|
#define FFI_TYPE_STRUCT 13
|
||||||
#define FFI_TYPE_POINTER 14
|
#define FFI_TYPE_POINTER 14
|
||||||
#define FFI_TYPE_COMPLEX 15
|
#define FFI_TYPE_COMPLEX 15
|
||||||
|
|
||||||
/* This should always refer to the last type code (for sanity checks). */
|
/* 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_COMPLEX
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
@@ -1,14 +1,6 @@
|
|||||||
/* fficonfig.h. Originally created by configure, now hand_maintained for MSVC. */
|
|
||||||
|
|
||||||
/* fficonfig.h. Generated from fficonfig.h.in by configure. */
|
/* fficonfig.h. Generated from fficonfig.h.in by configure. */
|
||||||
/* fficonfig.h.in. Generated from configure.ac by autoheader. */
|
/* fficonfig.h.in. Generated from configure.ac by autoheader. */
|
||||||
|
|
||||||
/* Define this for MSVC, but not for mingw32! */
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define __attribute__(x) /* */
|
|
||||||
#endif
|
|
||||||
#define alloca _alloca
|
|
||||||
|
|
||||||
/* Define if building universal (internal helper macro) */
|
/* Define if building universal (internal helper macro) */
|
||||||
/* #undef AC_APPLE_UNIVERSAL_BUILD */
|
/* #undef AC_APPLE_UNIVERSAL_BUILD */
|
||||||
|
|
||||||
@@ -21,10 +13,7 @@
|
|||||||
/* #undef C_ALLOCA */
|
/* #undef C_ALLOCA */
|
||||||
|
|
||||||
/* Define to the flags needed for the .section .eh_frame directive. */
|
/* Define to the flags needed for the .section .eh_frame directive. */
|
||||||
/* #undef EH_FRAME_FLAGS */
|
#define EH_FRAME_FLAGS "a"
|
||||||
|
|
||||||
/* using static library */
|
|
||||||
#define FFI_BUILDING 1
|
|
||||||
|
|
||||||
/* Define this if you want extra debugging. */
|
/* Define this if you want extra debugging. */
|
||||||
/* #undef FFI_DEBUG */
|
/* #undef FFI_DEBUG */
|
||||||
@@ -49,10 +38,10 @@
|
|||||||
|
|
||||||
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
||||||
*/
|
*/
|
||||||
/* #undef HAVE_ALLOCA_H */
|
/*#define HAVE_ALLOCA_H 1 */
|
||||||
|
|
||||||
/* Define if your assembler supports .cfi_* directives. */
|
/* Define if your assembler supports .cfi_* directives. */
|
||||||
/* #undef HAVE_AS_CFI_PSEUDO_OP */
|
#define HAVE_AS_CFI_PSEUDO_OP 1
|
||||||
|
|
||||||
/* Define if your assembler supports .register. */
|
/* Define if your assembler supports .register. */
|
||||||
/* #undef HAVE_AS_REGISTER_PSEUDO_OP */
|
/* #undef HAVE_AS_REGISTER_PSEUDO_OP */
|
||||||
@@ -68,26 +57,23 @@
|
|||||||
/* #undef HAVE_AS_X86_64_UNWIND_SECTION_TYPE */
|
/* #undef HAVE_AS_X86_64_UNWIND_SECTION_TYPE */
|
||||||
|
|
||||||
/* Define if your assembler supports PC relative relocs. */
|
/* Define if your assembler supports PC relative relocs. */
|
||||||
#define HAVE_AS_X86_PCREL 1
|
/* #undef HAVE_AS_X86_PCREL */
|
||||||
|
|
||||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||||
/* #undef HAVE_DLFCN_H */
|
#define HAVE_DLFCN_H 1
|
||||||
|
|
||||||
/* Define if __attribute__((visibility("hidden"))) is supported. */
|
/* Define if __attribute__((visibility("hidden"))) is supported. */
|
||||||
/* #undef HAVE_HIDDEN_VISIBILITY_ATTRIBUTE */
|
#define HAVE_HIDDEN_VISIBILITY_ATTRIBUTE 1
|
||||||
|
|
||||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||||
#define HAVE_INTTYPES_H 1
|
#define HAVE_INTTYPES_H 1
|
||||||
|
|
||||||
/* Define if you have the long double type and it is bigger than a double */
|
/* Define if you have the long double type and it is bigger than a double */
|
||||||
/* #undef HAVE_LONG_DOUBLE */
|
#define HAVE_LONG_DOUBLE 1
|
||||||
|
|
||||||
/* Define if you support more than one size of the long double type */
|
/* Define if you support more than one size of the long double type */
|
||||||
/* #undef HAVE_LONG_DOUBLE_VARIANT */
|
/* #undef HAVE_LONG_DOUBLE_VARIANT */
|
||||||
|
|
||||||
/* Define if you have the ANSI C header files. */
|
|
||||||
#define STDC_HEADERS 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `memcpy' function. */
|
/* Define to 1 if you have the `memcpy' function. */
|
||||||
#define HAVE_MEMCPY 1
|
#define HAVE_MEMCPY 1
|
||||||
|
|
||||||
@@ -95,37 +81,37 @@
|
|||||||
#define HAVE_MEMORY_H 1
|
#define HAVE_MEMORY_H 1
|
||||||
|
|
||||||
/* Define to 1 if you have the `mkostemp' function. */
|
/* Define to 1 if you have the `mkostemp' function. */
|
||||||
/* #undef HAVE_MKOSTEMP */
|
#define HAVE_MKOSTEMP 1
|
||||||
|
|
||||||
/* Define to 1 if you have the `mmap' function. */
|
/* Define to 1 if you have the `mmap' function. */
|
||||||
/* #undef HAVE_MMAP */
|
#define HAVE_MMAP 1
|
||||||
|
|
||||||
/* Define if mmap with MAP_ANON(YMOUS) works. */
|
/* Define if mmap with MAP_ANON(YMOUS) works. */
|
||||||
/* #undef HAVE_MMAP_ANON */
|
#define HAVE_MMAP_ANON 1
|
||||||
|
|
||||||
/* Define if mmap of /dev/zero works. */
|
/* Define if mmap of /dev/zero works. */
|
||||||
/* #undef HAVE_MMAP_DEV_ZERO */
|
#define HAVE_MMAP_DEV_ZERO 1
|
||||||
|
|
||||||
/* Define if read-only mmap of a plain file works. */
|
/* Define if read-only mmap of a plain file works. */
|
||||||
/* #undef HAVE_MMAP_FILE */
|
#define HAVE_MMAP_FILE 1
|
||||||
|
|
||||||
/* Define if .eh_frame sections should be read-only. */
|
/* Define if .eh_frame sections should be read-only. */
|
||||||
/* #undef HAVE_RO_EH_FRAME */
|
#define HAVE_RO_EH_FRAME 1
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdint.h> header file. */
|
/* Define to 1 if you have the <stdint.h> header file. */
|
||||||
#define HAVE_STDINT_H 1
|
#define HAVE_STDINT_H 1
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||||
#define HAVE_STDLIB_H 1
|
//#define HAVE_STDLIB_H 0
|
||||||
|
#define LACKS_STDLIB_H 1
|
||||||
/* Define to 1 if you have the <strings.h> header file. */
|
/* Define to 1 if you have the <strings.h> header file. */
|
||||||
/* #undef HAVE_STRINGS_H */
|
#define HAVE_STRINGS_H 1
|
||||||
|
|
||||||
/* Define to 1 if you have the <string.h> header file. */
|
/* Define to 1 if you have the <string.h> header file. */
|
||||||
#define HAVE_STRING_H 1
|
#define HAVE_STRING_H 1
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/mman.h> header file. */
|
/* Define to 1 if you have the <sys/mman.h> header file. */
|
||||||
/* #undef HAVE_SYS_MMAN_H */
|
#define HAVE_SYS_MMAN_H 1
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||||
#define HAVE_SYS_STAT_H 1
|
#define HAVE_SYS_STAT_H 1
|
||||||
@@ -134,14 +120,18 @@
|
|||||||
#define HAVE_SYS_TYPES_H 1
|
#define HAVE_SYS_TYPES_H 1
|
||||||
|
|
||||||
/* Define to 1 if you have the <unistd.h> header file. */
|
/* Define to 1 if you have the <unistd.h> header file. */
|
||||||
/* #undef HAVE_UNISTD_H */
|
#define HAVE_UNISTD_H 1
|
||||||
|
|
||||||
/* Define to 1 if GNU symbol versioning is used for libatomic. */
|
/* Define to 1 if GNU symbol versioning is used for libatomic. */
|
||||||
/* #undef LIBFFI_GNU_SYMBOL_VERSIONING */
|
#define LIBFFI_GNU_SYMBOL_VERSIONING 1
|
||||||
|
|
||||||
/* Define to the sub-directory where libtool stores uninstalled libraries. */
|
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||||
|
*/
|
||||||
#define LT_OBJDIR ".libs/"
|
#define LT_OBJDIR ".libs/"
|
||||||
|
|
||||||
|
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
|
||||||
|
/* #undef NO_MINUS_C_MINUS_O */
|
||||||
|
|
||||||
/* Name of package */
|
/* Name of package */
|
||||||
#define PACKAGE "libffi"
|
#define PACKAGE "libffi"
|
||||||
|
|
||||||
@@ -167,10 +157,7 @@
|
|||||||
#define SIZEOF_DOUBLE 8
|
#define SIZEOF_DOUBLE 8
|
||||||
|
|
||||||
/* The size of `long double', as computed by sizeof. */
|
/* The size of `long double', as computed by sizeof. */
|
||||||
#define SIZEOF_LONG_DOUBLE 12
|
#define SIZEOF_LONG_DOUBLE 8
|
||||||
|
|
||||||
/* Define if you have the long double type and it is bigger than a double */
|
|
||||||
#define HAVE_LONG_DOUBLE 1
|
|
||||||
|
|
||||||
/* The size of `size_t', as computed by sizeof. */
|
/* The size of `size_t', as computed by sizeof. */
|
||||||
#define SIZEOF_SIZE_T 8
|
#define SIZEOF_SIZE_T 8
|
||||||
53
msvcc.sh
53
msvcc.sh
@@ -52,7 +52,7 @@ ml="ml"
|
|||||||
safeseh="-safeseh"
|
safeseh="-safeseh"
|
||||||
output=
|
output=
|
||||||
libpaths=
|
libpaths=
|
||||||
libversion=7
|
libversion=8
|
||||||
verbose=
|
verbose=
|
||||||
|
|
||||||
while [ $# -gt 0 ]
|
while [ $# -gt 0 ]
|
||||||
@@ -60,7 +60,7 @@ do
|
|||||||
case $1
|
case $1
|
||||||
in
|
in
|
||||||
--verbose)
|
--verbose)
|
||||||
$verbose=1
|
verbose=1
|
||||||
shift 1
|
shift 1
|
||||||
;;
|
;;
|
||||||
--version)
|
--version)
|
||||||
@@ -80,6 +80,16 @@ do
|
|||||||
safeseh=
|
safeseh=
|
||||||
shift 1
|
shift 1
|
||||||
;;
|
;;
|
||||||
|
-marm)
|
||||||
|
ml='armasm'
|
||||||
|
safeseh=
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
-marm64)
|
||||||
|
ml='armasm64'
|
||||||
|
safeseh=
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
-clang-cl)
|
-clang-cl)
|
||||||
cl="clang-cl"
|
cl="clang-cl"
|
||||||
shift 1
|
shift 1
|
||||||
@@ -155,24 +165,24 @@ do
|
|||||||
shift 1
|
shift 1
|
||||||
;;
|
;;
|
||||||
-I)
|
-I)
|
||||||
p=$(cygpath -m $2)
|
p=$(cygpath -ma "$2")
|
||||||
args="$args -I$p"
|
args="$args -I\"$p\""
|
||||||
includes="$includes -I$p"
|
includes="$includes -I\"$p\""
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
-I*)
|
-I*)
|
||||||
p=$(cygpath -m ${1#-I})
|
p=$(cygpath -ma "${1#-I}")
|
||||||
args="$args -I$p"
|
args="$args -I\"$p\""
|
||||||
includes="$includes -I$p"
|
includes="$includes -I\"$p\""
|
||||||
shift 1
|
shift 1
|
||||||
;;
|
;;
|
||||||
-L)
|
-L)
|
||||||
p=$(cygpath -m $2)
|
p=$(cygpath -ma $2)
|
||||||
linkargs="$linkargs -LIBPATH:$p"
|
linkargs="$linkargs -LIBPATH:$p"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
-L*)
|
-L*)
|
||||||
p=$(cygpath -m ${1#-L})
|
p=$(cygpath -ma ${1#-L})
|
||||||
linkargs="$linkargs -LIBPATH:$p"
|
linkargs="$linkargs -LIBPATH:$p"
|
||||||
shift 1
|
shift 1
|
||||||
;;
|
;;
|
||||||
@@ -237,6 +247,7 @@ do
|
|||||||
else
|
else
|
||||||
output="-Fe$2"
|
output="-Fe$2"
|
||||||
fi
|
fi
|
||||||
|
armasm_output="-o $2"
|
||||||
if [ -n "$assembly" ]; then
|
if [ -n "$assembly" ]; then
|
||||||
args="$args $output"
|
args="$args $output"
|
||||||
else
|
else
|
||||||
@@ -245,12 +256,12 @@ do
|
|||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
*.S)
|
*.S)
|
||||||
src=$1
|
src="$(cygpath -ma $1)"
|
||||||
assembly="true"
|
assembly="true"
|
||||||
shift 1
|
shift 1
|
||||||
;;
|
;;
|
||||||
*.c)
|
*.c)
|
||||||
args="$args $1"
|
args="$args $(cygpath -ma $1)"
|
||||||
shift 1
|
shift 1
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@@ -289,13 +300,27 @@ if [ -n "$assembly" ]; then
|
|||||||
fi
|
fi
|
||||||
ppsrc="$outdir/$(basename $src|sed 's/.S$/.asm/g')"
|
ppsrc="$outdir/$(basename $src|sed 's/.S$/.asm/g')"
|
||||||
|
|
||||||
|
if [ $ml = "armasm" ]; then
|
||||||
|
defines="$defines -D_M_ARM"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $ml = "armasm64" ]; then
|
||||||
|
defines="$defines -D_M_ARM64"
|
||||||
|
fi
|
||||||
|
|
||||||
if test -n "$verbose"; then
|
if test -n "$verbose"; then
|
||||||
echo "$cl -nologo -EP $includes $defines $src > $ppsrc"
|
echo "$cl -nologo -EP $includes $defines $src > $ppsrc"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"$cl" -nologo -EP $includes $defines $src > $ppsrc || exit $?
|
eval "\"$cl\" -nologo -EP $includes $defines $src" > $ppsrc || exit $?
|
||||||
output="$(echo $output | sed 's%/F[dpa][^ ]*%%g')"
|
output="$(echo $output | sed 's%/F[dpa][^ ]*%%g')"
|
||||||
args="-nologo $safeseh $single $output $ppsrc"
|
if [ $ml = "armasm" ]; then
|
||||||
|
args="-nologo -g -oldit $armasm_output $ppsrc -errorReport:prompt"
|
||||||
|
elif [ $ml = "armasm64" ]; then
|
||||||
|
args="-nologo -g $armasm_output $ppsrc -errorReport:prompt"
|
||||||
|
else
|
||||||
|
args="-nologo $safeseh $single $output $ppsrc"
|
||||||
|
fi
|
||||||
|
|
||||||
if test -n "$verbose"; then
|
if test -n "$verbose"; then
|
||||||
echo "$ml $args"
|
echo "$ml $args"
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|||||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
|
|
||||||
|
#if defined(__aarch64__) || defined(__arm64__)|| defined (_M_ARM64)
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@@ -26,6 +27,10 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
|||||||
#include <ffi.h>
|
#include <ffi.h>
|
||||||
#include <ffi_common.h>
|
#include <ffi_common.h>
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include <windows.h> /* FlushInstructionCache */
|
||||||
|
#endif
|
||||||
|
#include <tramp.h>
|
||||||
|
|
||||||
/* Force FFI_TYPE_LONGDOUBLE to be different than FFI_TYPE_DOUBLE;
|
/* Force FFI_TYPE_LONGDOUBLE to be different than FFI_TYPE_DOUBLE;
|
||||||
all further uses in this file will refer to the 128-bit type. */
|
all further uses in this file will refer to the 128-bit type. */
|
||||||
@@ -58,6 +63,9 @@ struct call_context
|
|||||||
#if FFI_EXEC_TRAMPOLINE_TABLE
|
#if FFI_EXEC_TRAMPOLINE_TABLE
|
||||||
|
|
||||||
#ifdef __MACH__
|
#ifdef __MACH__
|
||||||
|
#ifdef HAVE_PTRAUTH
|
||||||
|
#include <ptrauth.h>
|
||||||
|
#endif
|
||||||
#include <mach/vm_param.h>
|
#include <mach/vm_param.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -74,6 +82,8 @@ ffi_clear_cache (void *start, void *end)
|
|||||||
sys_icache_invalidate (start, (char *)end - (char *)start);
|
sys_icache_invalidate (start, (char *)end - (char *)start);
|
||||||
#elif defined (__GNUC__)
|
#elif defined (__GNUC__)
|
||||||
__builtin___clear_cache (start, end);
|
__builtin___clear_cache (start, end);
|
||||||
|
#elif defined (_WIN32)
|
||||||
|
FlushInstructionCache(GetCurrentProcess(), start, (char*)end - (char*)start);
|
||||||
#else
|
#else
|
||||||
#error "Missing builtin to flush instruction cache"
|
#error "Missing builtin to flush instruction cache"
|
||||||
#endif
|
#endif
|
||||||
@@ -315,6 +325,9 @@ extend_integer_type (void *source, int type)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
void extend_hfa_type (void *dest, void *src, int h);
|
||||||
|
#else
|
||||||
static void
|
static void
|
||||||
extend_hfa_type (void *dest, void *src, int h)
|
extend_hfa_type (void *dest, void *src, int h)
|
||||||
{
|
{
|
||||||
@@ -368,7 +381,11 @@ extend_hfa_type (void *dest, void *src, int h)
|
|||||||
: "r"(f * 12), "r"(dest), "r"(src)
|
: "r"(f * 12), "r"(dest), "r"(src)
|
||||||
: "memory", "v16", "v17", "v18", "v19");
|
: "memory", "v16", "v17", "v18", "v19");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
void* compress_hfa_type (void *dest, void *src, int h);
|
||||||
|
#else
|
||||||
static void *
|
static void *
|
||||||
compress_hfa_type (void *dest, void *reg, int h)
|
compress_hfa_type (void *dest, void *reg, int h)
|
||||||
{
|
{
|
||||||
@@ -437,6 +454,7 @@ compress_hfa_type (void *dest, void *reg, int h)
|
|||||||
}
|
}
|
||||||
return dest;
|
return dest;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Either allocate an appropriate register for the argument type, or if
|
/* Either allocate an appropriate register for the argument type, or if
|
||||||
none are available, allocate a stack slot and return a pointer
|
none are available, allocate a stack slot and return a pointer
|
||||||
@@ -454,7 +472,7 @@ allocate_int_to_reg_or_stack (struct call_context *context,
|
|||||||
return allocate_to_stack (state, stack, size, size);
|
return allocate_to_stack (state, stack, size, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
ffi_status
|
ffi_status FFI_HIDDEN
|
||||||
ffi_prep_cif_machdep (ffi_cif *cif)
|
ffi_prep_cif_machdep (ffi_cif *cif)
|
||||||
{
|
{
|
||||||
ffi_type *rtype = cif->rtype;
|
ffi_type *rtype = cif->rtype;
|
||||||
@@ -539,14 +557,22 @@ ffi_prep_cif_machdep (ffi_cif *cif)
|
|||||||
|
|
||||||
#if defined (__APPLE__)
|
#if defined (__APPLE__)
|
||||||
/* Perform Apple-specific cif processing for variadic calls */
|
/* Perform Apple-specific cif processing for variadic calls */
|
||||||
ffi_status ffi_prep_cif_machdep_var(ffi_cif *cif,
|
ffi_status FFI_HIDDEN
|
||||||
unsigned int nfixedargs,
|
ffi_prep_cif_machdep_var(ffi_cif *cif, unsigned int nfixedargs,
|
||||||
unsigned int ntotalargs)
|
unsigned int ntotalargs)
|
||||||
{
|
{
|
||||||
ffi_status status = ffi_prep_cif_machdep (cif);
|
ffi_status status = ffi_prep_cif_machdep (cif);
|
||||||
cif->aarch64_nfixedargs = nfixedargs;
|
cif->aarch64_nfixedargs = nfixedargs;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
ffi_status FFI_HIDDEN
|
||||||
|
ffi_prep_cif_machdep_var(ffi_cif *cif, unsigned int nfixedargs, unsigned int ntotalargs)
|
||||||
|
{
|
||||||
|
ffi_status status = ffi_prep_cif_machdep (cif);
|
||||||
|
cif->flags |= AARCH64_FLAG_VARARG;
|
||||||
|
return status;
|
||||||
|
}
|
||||||
#endif /* __APPLE__ */
|
#endif /* __APPLE__ */
|
||||||
|
|
||||||
extern void ffi_call_SYSV (struct call_context *context, void *frame,
|
extern void ffi_call_SYSV (struct call_context *context, void *frame,
|
||||||
@@ -563,7 +589,7 @@ ffi_call_int (ffi_cif *cif, void (*fn)(void), void *orig_rvalue,
|
|||||||
void *stack, *frame, *rvalue;
|
void *stack, *frame, *rvalue;
|
||||||
struct arg_state state;
|
struct arg_state state;
|
||||||
size_t stack_bytes, rtype_size, rsize;
|
size_t stack_bytes, rtype_size, rsize;
|
||||||
int i, nargs, flags;
|
int i, nargs, flags, isvariadic = 0;
|
||||||
ffi_type *rtype;
|
ffi_type *rtype;
|
||||||
|
|
||||||
flags = cif->flags;
|
flags = cif->flags;
|
||||||
@@ -571,6 +597,12 @@ ffi_call_int (ffi_cif *cif, void (*fn)(void), void *orig_rvalue,
|
|||||||
rtype_size = rtype->size;
|
rtype_size = rtype->size;
|
||||||
stack_bytes = cif->bytes;
|
stack_bytes = cif->bytes;
|
||||||
|
|
||||||
|
if (flags & AARCH64_FLAG_VARARG)
|
||||||
|
{
|
||||||
|
isvariadic = 1;
|
||||||
|
flags &= ~AARCH64_FLAG_VARARG;
|
||||||
|
}
|
||||||
|
|
||||||
/* If the target function returns a structure via hidden pointer,
|
/* If the target function returns a structure via hidden pointer,
|
||||||
then we cannot allow a null rvalue. Otherwise, mash a null
|
then we cannot allow a null rvalue. Otherwise, mash a null
|
||||||
rvalue to void return type. */
|
rvalue to void return type. */
|
||||||
@@ -585,11 +617,12 @@ ffi_call_int (ffi_cif *cif, void (*fn)(void), void *orig_rvalue,
|
|||||||
else if (flags & AARCH64_RET_NEED_COPY)
|
else if (flags & AARCH64_RET_NEED_COPY)
|
||||||
rsize = 16;
|
rsize = 16;
|
||||||
|
|
||||||
/* Allocate consectutive stack for everything we'll need. */
|
/* Allocate consectutive stack for everything we'll need.
|
||||||
context = alloca (sizeof(struct call_context) + stack_bytes + 32 + rsize);
|
The frame uses 40 bytes for: lr, fp, rvalue, flags, sp */
|
||||||
|
context = alloca (sizeof(struct call_context) + stack_bytes + 40 + rsize);
|
||||||
stack = context + 1;
|
stack = context + 1;
|
||||||
frame = stack + stack_bytes;
|
frame = (void*)((uintptr_t)stack + (uintptr_t)stack_bytes);
|
||||||
rvalue = (rsize ? frame + 32 : orig_rvalue);
|
rvalue = (rsize ? (void*)((uintptr_t)frame + 40) : orig_rvalue);
|
||||||
|
|
||||||
arg_init (&state);
|
arg_init (&state);
|
||||||
for (i = 0, nargs = cif->nargs; i < nargs; i++)
|
for (i = 0, nargs = cif->nargs; i < nargs; i++)
|
||||||
@@ -650,16 +683,31 @@ ffi_call_int (ffi_cif *cif, void (*fn)(void), void *orig_rvalue,
|
|||||||
h = is_vfp_type (ty);
|
h = is_vfp_type (ty);
|
||||||
if (h)
|
if (h)
|
||||||
{
|
{
|
||||||
int elems = 4 - (h & 3);
|
int elems = 4 - (h & 3);
|
||||||
if (state.nsrn + elems <= N_V_ARG_REG)
|
if (cif->abi == FFI_WIN64 && isvariadic)
|
||||||
{
|
{
|
||||||
dest = &context->v[state.nsrn];
|
if (state.ngrn + elems <= N_X_ARG_REG)
|
||||||
state.nsrn += elems;
|
{
|
||||||
extend_hfa_type (dest, a, h);
|
dest = &context->x[state.ngrn];
|
||||||
break;
|
state.ngrn += elems;
|
||||||
}
|
extend_hfa_type(dest, a, h);
|
||||||
state.nsrn = N_V_ARG_REG;
|
break;
|
||||||
dest = allocate_to_stack (&state, stack, ty->alignment, s);
|
}
|
||||||
|
state.nsrn = N_X_ARG_REG;
|
||||||
|
dest = allocate_to_stack(&state, stack, ty->alignment, s);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (state.nsrn + elems <= N_V_ARG_REG)
|
||||||
|
{
|
||||||
|
dest = &context->v[state.nsrn];
|
||||||
|
state.nsrn += elems;
|
||||||
|
extend_hfa_type (dest, a, h);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
state.nsrn = N_V_ARG_REG;
|
||||||
|
dest = allocate_to_stack (&state, stack, ty->alignment, s);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (s > 16)
|
else if (s > 16)
|
||||||
{
|
{
|
||||||
@@ -681,7 +729,7 @@ ffi_call_int (ffi_cif *cif, void (*fn)(void), void *orig_rvalue,
|
|||||||
X registers, then the argument is copied into
|
X registers, then the argument is copied into
|
||||||
consecutive X registers. */
|
consecutive X registers. */
|
||||||
dest = &context->x[state.ngrn];
|
dest = &context->x[state.ngrn];
|
||||||
state.ngrn += n;
|
state.ngrn += (unsigned int)n;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -723,6 +771,8 @@ ffi_call (ffi_cif *cif, void (*fn) (void), void *rvalue, void **avalue)
|
|||||||
ffi_call_int (cif, fn, rvalue, avalue, NULL);
|
ffi_call_int (cif, fn, rvalue, avalue, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if FFI_CLOSURES
|
||||||
|
|
||||||
#ifdef FFI_GO_CLOSURES
|
#ifdef FFI_GO_CLOSURES
|
||||||
void
|
void
|
||||||
ffi_call_go (ffi_cif *cif, void (*fn) (void), void *rvalue,
|
ffi_call_go (ffi_cif *cif, void (*fn) (void), void *rvalue,
|
||||||
@@ -736,6 +786,10 @@ ffi_call_go (ffi_cif *cif, void (*fn) (void), void *rvalue,
|
|||||||
|
|
||||||
extern void ffi_closure_SYSV (void) FFI_HIDDEN;
|
extern void ffi_closure_SYSV (void) FFI_HIDDEN;
|
||||||
extern void ffi_closure_SYSV_V (void) FFI_HIDDEN;
|
extern void ffi_closure_SYSV_V (void) FFI_HIDDEN;
|
||||||
|
#if defined(FFI_EXEC_STATIC_TRAMP)
|
||||||
|
extern void ffi_closure_SYSV_alt (void) FFI_HIDDEN;
|
||||||
|
extern void ffi_closure_SYSV_V_alt (void) FFI_HIDDEN;
|
||||||
|
#endif
|
||||||
|
|
||||||
ffi_status
|
ffi_status
|
||||||
ffi_prep_closure_loc (ffi_closure *closure,
|
ffi_prep_closure_loc (ffi_closure *closure,
|
||||||
@@ -744,7 +798,7 @@ ffi_prep_closure_loc (ffi_closure *closure,
|
|||||||
void *user_data,
|
void *user_data,
|
||||||
void *codeloc)
|
void *codeloc)
|
||||||
{
|
{
|
||||||
if (cif->abi != FFI_SYSV)
|
if (cif->abi != FFI_SYSV && cif->abi != FFI_WIN64)
|
||||||
return FFI_BAD_ABI;
|
return FFI_BAD_ABI;
|
||||||
|
|
||||||
void (*start)(void);
|
void (*start)(void);
|
||||||
@@ -756,6 +810,9 @@ ffi_prep_closure_loc (ffi_closure *closure,
|
|||||||
|
|
||||||
#if FFI_EXEC_TRAMPOLINE_TABLE
|
#if FFI_EXEC_TRAMPOLINE_TABLE
|
||||||
#ifdef __MACH__
|
#ifdef __MACH__
|
||||||
|
#ifdef HAVE_PTRAUTH
|
||||||
|
codeloc = ptrauth_auth_data(codeloc, ptrauth_key_function_pointer, 0);
|
||||||
|
#endif
|
||||||
void **config = (void **)((uint8_t *)codeloc - PAGE_MAX_SIZE);
|
void **config = (void **)((uint8_t *)codeloc - PAGE_MAX_SIZE);
|
||||||
config[0] = closure;
|
config[0] = closure;
|
||||||
config[1] = start;
|
config[1] = start;
|
||||||
@@ -767,12 +824,37 @@ ffi_prep_closure_loc (ffi_closure *closure,
|
|||||||
0x00, 0x02, 0x1f, 0xd6 /* br x16 */
|
0x00, 0x02, 0x1f, 0xd6 /* br x16 */
|
||||||
};
|
};
|
||||||
char *tramp = closure->tramp;
|
char *tramp = closure->tramp;
|
||||||
|
|
||||||
|
#if defined(FFI_EXEC_STATIC_TRAMP)
|
||||||
|
if (ffi_tramp_is_present(closure))
|
||||||
|
{
|
||||||
|
/* Initialize the static trampoline's parameters. */
|
||||||
|
if (start == ffi_closure_SYSV_V)
|
||||||
|
start = ffi_closure_SYSV_V_alt;
|
||||||
|
else
|
||||||
|
start = ffi_closure_SYSV_alt;
|
||||||
|
ffi_tramp_set_parms (closure->ftramp, start, closure);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Initialize the dynamic trampoline. */
|
||||||
memcpy (tramp, trampoline, sizeof(trampoline));
|
memcpy (tramp, trampoline, sizeof(trampoline));
|
||||||
|
|
||||||
*(UINT64 *)(tramp + 16) = (uintptr_t)start;
|
*(UINT64 *)(tramp + 16) = (uintptr_t)start;
|
||||||
|
|
||||||
ffi_clear_cache(tramp, tramp + FFI_TRAMPOLINE_SIZE);
|
ffi_clear_cache(tramp, tramp + FFI_TRAMPOLINE_SIZE);
|
||||||
|
|
||||||
|
/* Also flush the cache for code mapping. */
|
||||||
|
#ifdef _WIN32
|
||||||
|
// Not using dlmalloc.c for Windows ARM64 builds
|
||||||
|
// so calling ffi_data_to_code_pointer() isn't necessary
|
||||||
|
unsigned char *tramp_code = tramp;
|
||||||
|
#else
|
||||||
|
unsigned char *tramp_code = ffi_data_to_code_pointer (tramp);
|
||||||
|
#endif
|
||||||
|
ffi_clear_cache (tramp_code, tramp_code + FFI_TRAMPOLINE_SIZE);
|
||||||
|
out:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
closure->cif = cif;
|
closure->cif = cif;
|
||||||
@@ -792,7 +874,7 @@ ffi_prep_go_closure (ffi_go_closure *closure, ffi_cif* cif,
|
|||||||
{
|
{
|
||||||
void (*start)(void);
|
void (*start)(void);
|
||||||
|
|
||||||
if (cif->abi != FFI_SYSV)
|
if (cif->abi != FFI_SYSV && cif->abi != FFI_WIN64)
|
||||||
return FFI_BAD_ABI;
|
return FFI_BAD_ABI;
|
||||||
|
|
||||||
if (cif->flags & AARCH64_FLAG_ARG_V)
|
if (cif->flags & AARCH64_FLAG_ARG_V)
|
||||||
@@ -832,11 +914,18 @@ ffi_closure_SYSV_inner (ffi_cif *cif,
|
|||||||
void *stack, void *rvalue, void *struct_rvalue)
|
void *stack, void *rvalue, void *struct_rvalue)
|
||||||
{
|
{
|
||||||
void **avalue = (void**) alloca (cif->nargs * sizeof (void*));
|
void **avalue = (void**) alloca (cif->nargs * sizeof (void*));
|
||||||
int i, h, nargs, flags;
|
int i, h, nargs, flags, isvariadic = 0;
|
||||||
struct arg_state state;
|
struct arg_state state;
|
||||||
|
|
||||||
arg_init (&state);
|
arg_init (&state);
|
||||||
|
|
||||||
|
flags = cif->flags;
|
||||||
|
if (flags & AARCH64_FLAG_VARARG)
|
||||||
|
{
|
||||||
|
isvariadic = 1;
|
||||||
|
flags &= ~AARCH64_FLAG_VARARG;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0, nargs = cif->nargs; i < nargs; i++)
|
for (i = 0, nargs = cif->nargs; i < nargs; i++)
|
||||||
{
|
{
|
||||||
ffi_type *ty = cif->arg_types[i];
|
ffi_type *ty = cif->arg_types[i];
|
||||||
@@ -871,55 +960,74 @@ ffi_closure_SYSV_inner (ffi_cif *cif,
|
|||||||
if (h)
|
if (h)
|
||||||
{
|
{
|
||||||
n = 4 - (h & 3);
|
n = 4 - (h & 3);
|
||||||
if (state.nsrn + n <= N_V_ARG_REG)
|
if (cif->abi == FFI_WIN64 && isvariadic)
|
||||||
{
|
{
|
||||||
void *reg = &context->v[state.nsrn];
|
if (state.ngrn + n <= N_X_ARG_REG)
|
||||||
state.nsrn += n;
|
{
|
||||||
|
void *reg = &context->x[state.ngrn];
|
||||||
|
state.ngrn += (unsigned int)n;
|
||||||
|
|
||||||
|
/* Eeek! We need a pointer to the structure, however the
|
||||||
|
homogeneous float elements are being passed in individual
|
||||||
|
registers, therefore for float and double the structure
|
||||||
|
is not represented as a contiguous sequence of bytes in
|
||||||
|
our saved register context. We don't need the original
|
||||||
|
contents of the register storage, so we reformat the
|
||||||
|
structure into the same memory. */
|
||||||
|
avalue[i] = compress_hfa_type(reg, reg, h);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
state.ngrn = N_X_ARG_REG;
|
||||||
|
state.nsrn = N_V_ARG_REG;
|
||||||
|
avalue[i] = allocate_to_stack(&state, stack,
|
||||||
|
ty->alignment, s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (state.nsrn + n <= N_V_ARG_REG)
|
||||||
|
{
|
||||||
|
void *reg = &context->v[state.nsrn];
|
||||||
|
state.nsrn += (unsigned int)n;
|
||||||
|
avalue[i] = compress_hfa_type(reg, reg, h);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
state.nsrn = N_V_ARG_REG;
|
||||||
|
avalue[i] = allocate_to_stack(&state, stack,
|
||||||
|
ty->alignment, s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (s > 16)
|
||||||
|
{
|
||||||
|
/* Replace Composite type of size greater than 16 with a
|
||||||
|
pointer. */
|
||||||
|
avalue[i] = *(void **)
|
||||||
|
allocate_int_to_reg_or_stack (context, &state, stack,
|
||||||
|
sizeof (void *));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
n = (s + 7) / 8;
|
||||||
|
if (state.ngrn + n <= N_X_ARG_REG)
|
||||||
|
{
|
||||||
|
avalue[i] = &context->x[state.ngrn];
|
||||||
|
state.ngrn += (unsigned int)n;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
state.ngrn = N_X_ARG_REG;
|
||||||
|
avalue[i] = allocate_to_stack(&state, stack,
|
||||||
|
ty->alignment, s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
/* Eeek! We need a pointer to the structure, however the
|
default:
|
||||||
homogeneous float elements are being passed in individual
|
abort();
|
||||||
registers, therefore for float and double the structure
|
}
|
||||||
is not represented as a contiguous sequence of bytes in
|
|
||||||
our saved register context. We don't need the original
|
|
||||||
contents of the register storage, so we reformat the
|
|
||||||
structure into the same memory. */
|
|
||||||
avalue[i] = compress_hfa_type (reg, reg, h);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
state.nsrn = N_V_ARG_REG;
|
|
||||||
avalue[i] = allocate_to_stack (&state, stack,
|
|
||||||
ty->alignment, s);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (s > 16)
|
|
||||||
{
|
|
||||||
/* Replace Composite type of size greater than 16 with a
|
|
||||||
pointer. */
|
|
||||||
avalue[i] = *(void **)
|
|
||||||
allocate_int_to_reg_or_stack (context, &state, stack,
|
|
||||||
sizeof (void *));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
n = (s + 7) / 8;
|
|
||||||
if (state.ngrn + n <= N_X_ARG_REG)
|
|
||||||
{
|
|
||||||
avalue[i] = &context->x[state.ngrn];
|
|
||||||
state.ngrn += n;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
state.ngrn = N_X_ARG_REG;
|
|
||||||
avalue[i] = allocate_to_stack (&state, stack,
|
|
||||||
ty->alignment, s);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
abort();
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined (__APPLE__)
|
#if defined (__APPLE__)
|
||||||
if (i + 1 == cif->aarch64_nfixedargs)
|
if (i + 1 == cif->aarch64_nfixedargs)
|
||||||
@@ -931,7 +1039,6 @@ ffi_closure_SYSV_inner (ffi_cif *cif,
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
flags = cif->flags;
|
|
||||||
if (flags & AARCH64_RET_IN_MEM)
|
if (flags & AARCH64_RET_IN_MEM)
|
||||||
rvalue = struct_rvalue;
|
rvalue = struct_rvalue;
|
||||||
|
|
||||||
@@ -939,3 +1046,19 @@ ffi_closure_SYSV_inner (ffi_cif *cif,
|
|||||||
|
|
||||||
return flags;
|
return flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(FFI_EXEC_STATIC_TRAMP)
|
||||||
|
void *
|
||||||
|
ffi_tramp_arch (size_t *tramp_size, size_t *map_size)
|
||||||
|
{
|
||||||
|
extern void *trampoline_code_table;
|
||||||
|
|
||||||
|
*tramp_size = AARCH64_TRAMP_SIZE;
|
||||||
|
*map_size = AARCH64_TRAMP_MAP_SIZE;
|
||||||
|
return &trampoline_code_table;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* FFI_CLOSURES */
|
||||||
|
|
||||||
|
#endif /* (__aarch64__) || defined(__arm64__)|| defined (_M_ARM64)*/
|
||||||
|
|||||||
@@ -32,6 +32,10 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
|||||||
#define FFI_SIZEOF_JAVA_RAW 4
|
#define FFI_SIZEOF_JAVA_RAW 4
|
||||||
typedef unsigned long long ffi_arg;
|
typedef unsigned long long ffi_arg;
|
||||||
typedef signed long long ffi_sarg;
|
typedef signed long long ffi_sarg;
|
||||||
|
#elif defined(_WIN32)
|
||||||
|
#define FFI_SIZEOF_ARG 8
|
||||||
|
typedef unsigned long long ffi_arg;
|
||||||
|
typedef signed long long ffi_sarg;
|
||||||
#else
|
#else
|
||||||
typedef unsigned long ffi_arg;
|
typedef unsigned long ffi_arg;
|
||||||
typedef signed long ffi_sarg;
|
typedef signed long ffi_sarg;
|
||||||
@@ -41,8 +45,13 @@ typedef enum ffi_abi
|
|||||||
{
|
{
|
||||||
FFI_FIRST_ABI = 0,
|
FFI_FIRST_ABI = 0,
|
||||||
FFI_SYSV,
|
FFI_SYSV,
|
||||||
|
FFI_WIN64,
|
||||||
FFI_LAST_ABI,
|
FFI_LAST_ABI,
|
||||||
|
#if defined(_WIN32)
|
||||||
|
FFI_DEFAULT_ABI = FFI_WIN64
|
||||||
|
#else
|
||||||
FFI_DEFAULT_ABI = FFI_SYSV
|
FFI_DEFAULT_ABI = FFI_SYSV
|
||||||
|
#endif
|
||||||
} ffi_abi;
|
} ffi_abi;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -65,17 +74,24 @@ typedef enum ffi_abi
|
|||||||
#define FFI_TRAMPOLINE_CLOSURE_OFFSET FFI_TRAMPOLINE_SIZE
|
#define FFI_TRAMPOLINE_CLOSURE_OFFSET FFI_TRAMPOLINE_SIZE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#define FFI_EXTRA_CIF_FIELDS unsigned is_variadic
|
||||||
|
#endif
|
||||||
|
#define FFI_TARGET_SPECIFIC_VARIADIC
|
||||||
|
|
||||||
/* ---- Internal ---- */
|
/* ---- Internal ---- */
|
||||||
|
|
||||||
#if defined (__APPLE__)
|
#if defined (__APPLE__)
|
||||||
#define FFI_TARGET_SPECIFIC_VARIADIC
|
|
||||||
#define FFI_EXTRA_CIF_FIELDS unsigned aarch64_nfixedargs
|
#define FFI_EXTRA_CIF_FIELDS unsigned aarch64_nfixedargs
|
||||||
#else
|
#elif !defined(_WIN32)
|
||||||
/* iOS reserves x18 for the system. Disable Go closures until
|
/* iOS and Windows reserve x18 for the system. Disable Go closures until
|
||||||
a new static chain is chosen. */
|
a new static chain is chosen. */
|
||||||
#define FFI_GO_CLOSURES 1
|
#define FFI_GO_CLOSURES 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef _WIN32
|
||||||
|
/* No complex type on Windows */
|
||||||
#define FFI_TARGET_HAS_COMPLEX_TYPE
|
#define FFI_TARGET_HAS_COMPLEX_TYPE
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -61,7 +61,40 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
|||||||
|
|
||||||
#define AARCH64_FLAG_ARG_V_BIT 7
|
#define AARCH64_FLAG_ARG_V_BIT 7
|
||||||
#define AARCH64_FLAG_ARG_V (1 << AARCH64_FLAG_ARG_V_BIT)
|
#define AARCH64_FLAG_ARG_V (1 << AARCH64_FLAG_ARG_V_BIT)
|
||||||
|
#define AARCH64_FLAG_VARARG (1 << 8)
|
||||||
|
|
||||||
#define N_X_ARG_REG 8
|
#define N_X_ARG_REG 8
|
||||||
#define N_V_ARG_REG 8
|
#define N_V_ARG_REG 8
|
||||||
#define CALL_CONTEXT_SIZE (N_V_ARG_REG * 16 + N_X_ARG_REG * 8)
|
#define CALL_CONTEXT_SIZE (N_V_ARG_REG * 16 + N_X_ARG_REG * 8)
|
||||||
|
|
||||||
|
#if defined(FFI_EXEC_STATIC_TRAMP)
|
||||||
|
/*
|
||||||
|
* For the trampoline code table mapping, a mapping size of 16K is chosen to
|
||||||
|
* cover the base page sizes of 4K and 16K.
|
||||||
|
*/
|
||||||
|
#define AARCH64_TRAMP_MAP_SHIFT 14
|
||||||
|
#define AARCH64_TRAMP_MAP_SIZE (1 << AARCH64_TRAMP_MAP_SHIFT)
|
||||||
|
#define AARCH64_TRAMP_SIZE 32
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Helpers for writing assembly compatible with arm ptr auth */
|
||||||
|
#ifdef LIBFFI_ASM
|
||||||
|
|
||||||
|
#ifdef HAVE_PTRAUTH
|
||||||
|
#define SIGN_LR pacibsp
|
||||||
|
#define SIGN_LR_WITH_REG(x) pacib lr, x
|
||||||
|
#define AUTH_LR_AND_RET retab
|
||||||
|
#define AUTH_LR_WITH_REG(x) autib lr, x
|
||||||
|
#define BRANCH_AND_LINK_TO_REG blraaz
|
||||||
|
#define BRANCH_TO_REG braaz
|
||||||
|
#else
|
||||||
|
#define SIGN_LR
|
||||||
|
#define SIGN_LR_WITH_REG(x)
|
||||||
|
#define AUTH_LR_AND_RET ret
|
||||||
|
#define AUTH_LR_WITH_REG(x)
|
||||||
|
#define BRANCH_AND_LINK_TO_REG blr
|
||||||
|
#define BRANCH_TO_REG br
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|||||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
|
|
||||||
|
#if defined(__aarch64__) || defined(__arm64__)
|
||||||
#define LIBFFI_ASM
|
#define LIBFFI_ASM
|
||||||
#include <fficonfig.h>
|
#include <fficonfig.h>
|
||||||
#include <ffi.h>
|
#include <ffi.h>
|
||||||
@@ -77,9 +78,22 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
|||||||
|
|
||||||
cfi_startproc
|
cfi_startproc
|
||||||
CNAME(ffi_call_SYSV):
|
CNAME(ffi_call_SYSV):
|
||||||
|
/* Sign the lr with x1 since that is where it will be stored */
|
||||||
|
SIGN_LR_WITH_REG(x1)
|
||||||
|
|
||||||
/* Use a stack frame allocated by our caller. */
|
/* Use a stack frame allocated by our caller. */
|
||||||
cfi_def_cfa(x1, 32);
|
#if defined(HAVE_PTRAUTH) && defined(__APPLE__)
|
||||||
|
/* darwin's libunwind assumes that the cfa is the sp and that's the data
|
||||||
|
* used to sign the lr. In order to allow unwinding through this
|
||||||
|
* function it is necessary to point the cfa at the signing register.
|
||||||
|
*/
|
||||||
|
cfi_def_cfa(x1, 0);
|
||||||
|
#else
|
||||||
|
cfi_def_cfa(x1, 40);
|
||||||
|
#endif
|
||||||
stp x29, x30, [x1]
|
stp x29, x30, [x1]
|
||||||
|
mov x9, sp
|
||||||
|
str x9, [x1, #32]
|
||||||
mov x29, x1
|
mov x29, x1
|
||||||
mov sp, x0
|
mov sp, x0
|
||||||
cfi_def_cfa_register(x29)
|
cfi_def_cfa_register(x29)
|
||||||
@@ -110,13 +124,15 @@ CNAME(ffi_call_SYSV):
|
|||||||
/* Deallocate the context, leaving the stacked arguments. */
|
/* Deallocate the context, leaving the stacked arguments. */
|
||||||
add sp, sp, #CALL_CONTEXT_SIZE
|
add sp, sp, #CALL_CONTEXT_SIZE
|
||||||
|
|
||||||
blr x9 /* call fn */
|
BRANCH_AND_LINK_TO_REG x9 /* call fn */
|
||||||
|
|
||||||
ldp x3, x4, [x29, #16] /* reload rvalue and flags */
|
ldp x3, x4, [x29, #16] /* reload rvalue and flags */
|
||||||
|
|
||||||
/* Partially deconstruct the stack frame. */
|
/* Partially deconstruct the stack frame. */
|
||||||
mov sp, x29
|
ldr x9, [x29, #32]
|
||||||
|
mov sp, x9
|
||||||
cfi_def_cfa_register (sp)
|
cfi_def_cfa_register (sp)
|
||||||
|
mov x2, x29 /* Preserve for auth */
|
||||||
ldp x29, x30, [x29]
|
ldp x29, x30, [x29]
|
||||||
|
|
||||||
/* Save the return value as directed. */
|
/* Save the return value as directed. */
|
||||||
@@ -130,80 +146,87 @@ CNAME(ffi_call_SYSV):
|
|||||||
and therefore we want to extend to 64 bits; these types
|
and therefore we want to extend to 64 bits; these types
|
||||||
have two consecutive entries allocated for them. */
|
have two consecutive entries allocated for them. */
|
||||||
.align 4
|
.align 4
|
||||||
0: ret /* VOID */
|
0: b 99f /* VOID */
|
||||||
nop
|
nop
|
||||||
1: str x0, [x3] /* INT64 */
|
1: str x0, [x3] /* INT64 */
|
||||||
ret
|
b 99f
|
||||||
2: stp x0, x1, [x3] /* INT128 */
|
2: stp x0, x1, [x3] /* INT128 */
|
||||||
ret
|
b 99f
|
||||||
3: brk #1000 /* UNUSED */
|
3: brk #1000 /* UNUSED */
|
||||||
ret
|
b 99f
|
||||||
4: brk #1000 /* UNUSED */
|
4: brk #1000 /* UNUSED */
|
||||||
ret
|
b 99f
|
||||||
5: brk #1000 /* UNUSED */
|
5: brk #1000 /* UNUSED */
|
||||||
ret
|
b 99f
|
||||||
6: brk #1000 /* UNUSED */
|
6: brk #1000 /* UNUSED */
|
||||||
ret
|
b 99f
|
||||||
7: brk #1000 /* UNUSED */
|
7: brk #1000 /* UNUSED */
|
||||||
ret
|
b 99f
|
||||||
8: st4 { v0.s, v1.s, v2.s, v3.s }[0], [x3] /* S4 */
|
8: st4 { v0.s, v1.s, v2.s, v3.s }[0], [x3] /* S4 */
|
||||||
ret
|
b 99f
|
||||||
9: st3 { v0.s, v1.s, v2.s }[0], [x3] /* S3 */
|
9: st3 { v0.s, v1.s, v2.s }[0], [x3] /* S3 */
|
||||||
ret
|
b 99f
|
||||||
10: stp s0, s1, [x3] /* S2 */
|
10: stp s0, s1, [x3] /* S2 */
|
||||||
ret
|
b 99f
|
||||||
11: str s0, [x3] /* S1 */
|
11: str s0, [x3] /* S1 */
|
||||||
ret
|
b 99f
|
||||||
12: st4 { v0.d, v1.d, v2.d, v3.d }[0], [x3] /* D4 */
|
12: st4 { v0.d, v1.d, v2.d, v3.d }[0], [x3] /* D4 */
|
||||||
ret
|
b 99f
|
||||||
13: st3 { v0.d, v1.d, v2.d }[0], [x3] /* D3 */
|
13: st3 { v0.d, v1.d, v2.d }[0], [x3] /* D3 */
|
||||||
ret
|
b 99f
|
||||||
14: stp d0, d1, [x3] /* D2 */
|
14: stp d0, d1, [x3] /* D2 */
|
||||||
ret
|
b 99f
|
||||||
15: str d0, [x3] /* D1 */
|
15: str d0, [x3] /* D1 */
|
||||||
ret
|
b 99f
|
||||||
16: str q3, [x3, #48] /* Q4 */
|
16: str q3, [x3, #48] /* Q4 */
|
||||||
nop
|
nop
|
||||||
17: str q2, [x3, #32] /* Q3 */
|
17: str q2, [x3, #32] /* Q3 */
|
||||||
nop
|
nop
|
||||||
18: stp q0, q1, [x3] /* Q2 */
|
18: stp q0, q1, [x3] /* Q2 */
|
||||||
ret
|
b 99f
|
||||||
19: str q0, [x3] /* Q1 */
|
19: str q0, [x3] /* Q1 */
|
||||||
ret
|
b 99f
|
||||||
20: uxtb w0, w0 /* UINT8 */
|
20: uxtb w0, w0 /* UINT8 */
|
||||||
str x0, [x3]
|
str x0, [x3]
|
||||||
21: ret /* reserved */
|
21: b 99f /* reserved */
|
||||||
nop
|
nop
|
||||||
22: uxth w0, w0 /* UINT16 */
|
22: uxth w0, w0 /* UINT16 */
|
||||||
str x0, [x3]
|
str x0, [x3]
|
||||||
23: ret /* reserved */
|
23: b 99f /* reserved */
|
||||||
nop
|
nop
|
||||||
24: mov w0, w0 /* UINT32 */
|
24: mov w0, w0 /* UINT32 */
|
||||||
str x0, [x3]
|
str x0, [x3]
|
||||||
25: ret /* reserved */
|
25: b 99f /* reserved */
|
||||||
nop
|
nop
|
||||||
26: sxtb x0, w0 /* SINT8 */
|
26: sxtb x0, w0 /* SINT8 */
|
||||||
str x0, [x3]
|
str x0, [x3]
|
||||||
27: ret /* reserved */
|
27: b 99f /* reserved */
|
||||||
nop
|
nop
|
||||||
28: sxth x0, w0 /* SINT16 */
|
28: sxth x0, w0 /* SINT16 */
|
||||||
str x0, [x3]
|
str x0, [x3]
|
||||||
29: ret /* reserved */
|
29: b 99f /* reserved */
|
||||||
nop
|
nop
|
||||||
30: sxtw x0, w0 /* SINT32 */
|
30: sxtw x0, w0 /* SINT32 */
|
||||||
str x0, [x3]
|
str x0, [x3]
|
||||||
31: ret /* reserved */
|
31: b 99f /* reserved */
|
||||||
nop
|
nop
|
||||||
|
|
||||||
|
/* Return now that result has been populated. */
|
||||||
|
99:
|
||||||
|
AUTH_LR_WITH_REG(x2)
|
||||||
|
ret
|
||||||
|
|
||||||
cfi_endproc
|
cfi_endproc
|
||||||
|
|
||||||
.globl CNAME(ffi_call_SYSV)
|
.globl CNAME(ffi_call_SYSV)
|
||||||
|
FFI_HIDDEN(CNAME(ffi_call_SYSV))
|
||||||
#ifdef __ELF__
|
#ifdef __ELF__
|
||||||
.type CNAME(ffi_call_SYSV), #function
|
.type CNAME(ffi_call_SYSV), #function
|
||||||
.hidden CNAME(ffi_call_SYSV)
|
|
||||||
.size CNAME(ffi_call_SYSV), .-CNAME(ffi_call_SYSV)
|
.size CNAME(ffi_call_SYSV), .-CNAME(ffi_call_SYSV)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if FFI_CLOSURES
|
||||||
|
|
||||||
/* ffi_closure_SYSV
|
/* ffi_closure_SYSV
|
||||||
|
|
||||||
Closure invocation glue. This is the low level code invoked directly by
|
Closure invocation glue. This is the low level code invoked directly by
|
||||||
@@ -223,6 +246,7 @@ CNAME(ffi_call_SYSV):
|
|||||||
.align 4
|
.align 4
|
||||||
CNAME(ffi_closure_SYSV_V):
|
CNAME(ffi_closure_SYSV_V):
|
||||||
cfi_startproc
|
cfi_startproc
|
||||||
|
SIGN_LR
|
||||||
stp x29, x30, [sp, #-ffi_closure_SYSV_FS]!
|
stp x29, x30, [sp, #-ffi_closure_SYSV_FS]!
|
||||||
cfi_adjust_cfa_offset (ffi_closure_SYSV_FS)
|
cfi_adjust_cfa_offset (ffi_closure_SYSV_FS)
|
||||||
cfi_rel_offset (x29, 0)
|
cfi_rel_offset (x29, 0)
|
||||||
@@ -237,15 +261,16 @@ CNAME(ffi_closure_SYSV_V):
|
|||||||
cfi_endproc
|
cfi_endproc
|
||||||
|
|
||||||
.globl CNAME(ffi_closure_SYSV_V)
|
.globl CNAME(ffi_closure_SYSV_V)
|
||||||
|
FFI_HIDDEN(CNAME(ffi_closure_SYSV_V))
|
||||||
#ifdef __ELF__
|
#ifdef __ELF__
|
||||||
.type CNAME(ffi_closure_SYSV_V), #function
|
.type CNAME(ffi_closure_SYSV_V), #function
|
||||||
.hidden CNAME(ffi_closure_SYSV_V)
|
|
||||||
.size CNAME(ffi_closure_SYSV_V), . - CNAME(ffi_closure_SYSV_V)
|
.size CNAME(ffi_closure_SYSV_V), . - CNAME(ffi_closure_SYSV_V)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
.align 4
|
.align 4
|
||||||
cfi_startproc
|
cfi_startproc
|
||||||
CNAME(ffi_closure_SYSV):
|
CNAME(ffi_closure_SYSV):
|
||||||
|
SIGN_LR
|
||||||
stp x29, x30, [sp, #-ffi_closure_SYSV_FS]!
|
stp x29, x30, [sp, #-ffi_closure_SYSV_FS]!
|
||||||
cfi_adjust_cfa_offset (ffi_closure_SYSV_FS)
|
cfi_adjust_cfa_offset (ffi_closure_SYSV_FS)
|
||||||
cfi_rel_offset (x29, 0)
|
cfi_rel_offset (x29, 0)
|
||||||
@@ -262,7 +287,9 @@ CNAME(ffi_closure_SYSV):
|
|||||||
/* Load ffi_closure_inner arguments. */
|
/* Load ffi_closure_inner arguments. */
|
||||||
ldp PTR_REG(0), PTR_REG(1), [x17, #FFI_TRAMPOLINE_CLOSURE_OFFSET] /* load cif, fn */
|
ldp PTR_REG(0), PTR_REG(1), [x17, #FFI_TRAMPOLINE_CLOSURE_OFFSET] /* load cif, fn */
|
||||||
ldr PTR_REG(2), [x17, #FFI_TRAMPOLINE_CLOSURE_OFFSET+PTR_SIZE*2] /* load user_data */
|
ldr PTR_REG(2), [x17, #FFI_TRAMPOLINE_CLOSURE_OFFSET+PTR_SIZE*2] /* load user_data */
|
||||||
|
#ifdef FFI_GO_CLOSURES
|
||||||
.Ldo_closure:
|
.Ldo_closure:
|
||||||
|
#endif
|
||||||
add x3, sp, #16 /* load context */
|
add x3, sp, #16 /* load context */
|
||||||
add x4, sp, #ffi_closure_SYSV_FS /* load stack */
|
add x4, sp, #ffi_closure_SYSV_FS /* load stack */
|
||||||
add x5, sp, #16+CALL_CONTEXT_SIZE /* load rvalue */
|
add x5, sp, #16+CALL_CONTEXT_SIZE /* load rvalue */
|
||||||
@@ -345,16 +372,86 @@ CNAME(ffi_closure_SYSV):
|
|||||||
cfi_adjust_cfa_offset (-ffi_closure_SYSV_FS)
|
cfi_adjust_cfa_offset (-ffi_closure_SYSV_FS)
|
||||||
cfi_restore (x29)
|
cfi_restore (x29)
|
||||||
cfi_restore (x30)
|
cfi_restore (x30)
|
||||||
ret
|
AUTH_LR_AND_RET
|
||||||
cfi_endproc
|
cfi_endproc
|
||||||
|
|
||||||
.globl CNAME(ffi_closure_SYSV)
|
.globl CNAME(ffi_closure_SYSV)
|
||||||
|
FFI_HIDDEN(CNAME(ffi_closure_SYSV))
|
||||||
#ifdef __ELF__
|
#ifdef __ELF__
|
||||||
.type CNAME(ffi_closure_SYSV), #function
|
.type CNAME(ffi_closure_SYSV), #function
|
||||||
.hidden CNAME(ffi_closure_SYSV)
|
|
||||||
.size CNAME(ffi_closure_SYSV), . - CNAME(ffi_closure_SYSV)
|
.size CNAME(ffi_closure_SYSV), . - CNAME(ffi_closure_SYSV)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(FFI_EXEC_STATIC_TRAMP)
|
||||||
|
.align 4
|
||||||
|
CNAME(ffi_closure_SYSV_V_alt):
|
||||||
|
/* See the comments above trampoline_code_table. */
|
||||||
|
ldr x17, [sp, #8] /* Load closure in x17 */
|
||||||
|
add sp, sp, #16 /* Restore the stack */
|
||||||
|
b CNAME(ffi_closure_SYSV_V)
|
||||||
|
|
||||||
|
.globl CNAME(ffi_closure_SYSV_V_alt)
|
||||||
|
FFI_HIDDEN(CNAME(ffi_closure_SYSV_V_alt))
|
||||||
|
#ifdef __ELF__
|
||||||
|
.type CNAME(ffi_closure_SYSV_V_alt), #function
|
||||||
|
.size CNAME(ffi_closure_SYSV_V_alt), . - CNAME(ffi_closure_SYSV_V_alt)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
.align 4
|
||||||
|
CNAME(ffi_closure_SYSV_alt):
|
||||||
|
/* See the comments above trampoline_code_table. */
|
||||||
|
ldr x17, [sp, #8] /* Load closure in x17 */
|
||||||
|
add sp, sp, #16 /* Restore the stack */
|
||||||
|
b CNAME(ffi_closure_SYSV)
|
||||||
|
|
||||||
|
.globl CNAME(ffi_closure_SYSV_alt)
|
||||||
|
FFI_HIDDEN(CNAME(ffi_closure_SYSV_alt))
|
||||||
|
#ifdef __ELF__
|
||||||
|
.type CNAME(ffi_closure_SYSV_alt), #function
|
||||||
|
.size CNAME(ffi_closure_SYSV_alt), . - CNAME(ffi_closure_SYSV_alt)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Below is the definition of the trampoline code table. Each element in
|
||||||
|
* the code table is a trampoline.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* The trampoline uses register x17. It saves the original value of x17 on
|
||||||
|
* the stack.
|
||||||
|
*
|
||||||
|
* The trampoline has two parameters - target code to jump to and data for
|
||||||
|
* the target code. The trampoline extracts the parameters from its parameter
|
||||||
|
* block (see tramp_table_map()). The trampoline saves the data address on
|
||||||
|
* the stack. Finally, it jumps to the target code.
|
||||||
|
*
|
||||||
|
* The target code can choose to:
|
||||||
|
*
|
||||||
|
* - restore the value of x17
|
||||||
|
* - load the data address in a register
|
||||||
|
* - restore the stack pointer to what it was when the trampoline was invoked.
|
||||||
|
*/
|
||||||
|
.align AARCH64_TRAMP_MAP_SHIFT
|
||||||
|
CNAME(trampoline_code_table):
|
||||||
|
.rept AARCH64_TRAMP_MAP_SIZE / AARCH64_TRAMP_SIZE
|
||||||
|
sub sp, sp, #16 /* Make space on the stack */
|
||||||
|
str x17, [sp] /* Save x17 on stack */
|
||||||
|
adr x17, #16376 /* Get data address */
|
||||||
|
ldr x17, [x17] /* Copy data into x17 */
|
||||||
|
str x17, [sp, #8] /* Save data on stack */
|
||||||
|
adr x17, #16372 /* Get code address */
|
||||||
|
ldr x17, [x17] /* Load code address into x17 */
|
||||||
|
br x17 /* Jump to code */
|
||||||
|
.endr
|
||||||
|
|
||||||
|
.globl CNAME(trampoline_code_table)
|
||||||
|
FFI_HIDDEN(CNAME(trampoline_code_table))
|
||||||
|
#ifdef __ELF__
|
||||||
|
.type CNAME(trampoline_code_table), #function
|
||||||
|
.size CNAME(trampoline_code_table), . - CNAME(trampoline_code_table)
|
||||||
|
#endif
|
||||||
|
.align AARCH64_TRAMP_MAP_SHIFT
|
||||||
|
#endif /* FFI_EXEC_STATIC_TRAMP */
|
||||||
|
|
||||||
#if FFI_EXEC_TRAMPOLINE_TABLE
|
#if FFI_EXEC_TRAMPOLINE_TABLE
|
||||||
|
|
||||||
#ifdef __MACH__
|
#ifdef __MACH__
|
||||||
@@ -365,13 +462,13 @@ CNAME(ffi_closure_trampoline_table_page):
|
|||||||
adr x16, -PAGE_MAX_SIZE
|
adr x16, -PAGE_MAX_SIZE
|
||||||
ldp x17, x16, [x16]
|
ldp x17, x16, [x16]
|
||||||
br x16
|
br x16
|
||||||
nop /* each entry in the trampoline config page is 2*sizeof(void*) so the trampoline itself cannot be smaller that 16 bytes */
|
nop /* each entry in the trampoline config page is 2*sizeof(void*) so the trampoline itself cannot be smaller than 16 bytes */
|
||||||
.endr
|
.endr
|
||||||
|
|
||||||
.globl CNAME(ffi_closure_trampoline_table_page)
|
.globl CNAME(ffi_closure_trampoline_table_page)
|
||||||
|
FFI_HIDDEN(CNAME(ffi_closure_trampoline_table_page))
|
||||||
#ifdef __ELF__
|
#ifdef __ELF__
|
||||||
.type CNAME(ffi_closure_trampoline_table_page), #function
|
.type CNAME(ffi_closure_trampoline_table_page), #function
|
||||||
.hidden CNAME(ffi_closure_trampoline_table_page)
|
|
||||||
.size CNAME(ffi_closure_trampoline_table_page), . - CNAME(ffi_closure_trampoline_table_page)
|
.size CNAME(ffi_closure_trampoline_table_page), . - CNAME(ffi_closure_trampoline_table_page)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -396,9 +493,9 @@ CNAME(ffi_go_closure_SYSV_V):
|
|||||||
cfi_endproc
|
cfi_endproc
|
||||||
|
|
||||||
.globl CNAME(ffi_go_closure_SYSV_V)
|
.globl CNAME(ffi_go_closure_SYSV_V)
|
||||||
|
FFI_HIDDEN(CNAME(ffi_go_closure_SYSV_V))
|
||||||
#ifdef __ELF__
|
#ifdef __ELF__
|
||||||
.type CNAME(ffi_go_closure_SYSV_V), #function
|
.type CNAME(ffi_go_closure_SYSV_V), #function
|
||||||
.hidden CNAME(ffi_go_closure_SYSV_V)
|
|
||||||
.size CNAME(ffi_go_closure_SYSV_V), . - CNAME(ffi_go_closure_SYSV_V)
|
.size CNAME(ffi_go_closure_SYSV_V), . - CNAME(ffi_go_closure_SYSV_V)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -425,12 +522,14 @@ CNAME(ffi_go_closure_SYSV):
|
|||||||
cfi_endproc
|
cfi_endproc
|
||||||
|
|
||||||
.globl CNAME(ffi_go_closure_SYSV)
|
.globl CNAME(ffi_go_closure_SYSV)
|
||||||
|
FFI_HIDDEN(CNAME(ffi_go_closure_SYSV))
|
||||||
#ifdef __ELF__
|
#ifdef __ELF__
|
||||||
.type CNAME(ffi_go_closure_SYSV), #function
|
.type CNAME(ffi_go_closure_SYSV), #function
|
||||||
.hidden CNAME(ffi_go_closure_SYSV)
|
|
||||||
.size CNAME(ffi_go_closure_SYSV), . - CNAME(ffi_go_closure_SYSV)
|
.size CNAME(ffi_go_closure_SYSV), . - CNAME(ffi_go_closure_SYSV)
|
||||||
#endif
|
#endif
|
||||||
#endif /* FFI_GO_CLOSURES */
|
#endif /* FFI_GO_CLOSURES */
|
||||||
|
#endif /* FFI_CLOSURES */
|
||||||
|
#endif /* __arm64__ */
|
||||||
|
|
||||||
#if defined __ELF__ && defined __linux__
|
#if defined __ELF__ && defined __linux__
|
||||||
.section .note.GNU-stack,"",%progbits
|
.section .note.GNU-stack,"",%progbits
|
||||||
|
|||||||
506
src/aarch64/win64_armasm.S
Normal file
506
src/aarch64/win64_armasm.S
Normal file
@@ -0,0 +1,506 @@
|
|||||||
|
/* Copyright (c) 2009, 2010, 2011, 2012 ARM Ltd.
|
||||||
|
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. */
|
||||||
|
|
||||||
|
#define LIBFFI_ASM
|
||||||
|
#include <fficonfig.h>
|
||||||
|
#include <ffi.h>
|
||||||
|
#include <ffi_cfi.h>
|
||||||
|
#include "internal.h"
|
||||||
|
|
||||||
|
OPT 2 /*disable listing */
|
||||||
|
/* For some macros to add unwind information */
|
||||||
|
#include "ksarm64.h"
|
||||||
|
OPT 1 /*re-enable listing */
|
||||||
|
|
||||||
|
#define BE(X) 0
|
||||||
|
#define PTR_REG(n) x##n
|
||||||
|
#define PTR_SIZE 8
|
||||||
|
|
||||||
|
IMPORT ffi_closure_SYSV_inner
|
||||||
|
EXPORT ffi_call_SYSV
|
||||||
|
EXPORT ffi_closure_SYSV_V
|
||||||
|
EXPORT ffi_closure_SYSV
|
||||||
|
EXPORT extend_hfa_type
|
||||||
|
EXPORT compress_hfa_type
|
||||||
|
#ifdef FFI_GO_CLOSURES
|
||||||
|
EXPORT ffi_go_closure_SYSV_V
|
||||||
|
EXPORT ffi_go_closure_SYSV
|
||||||
|
#endif
|
||||||
|
|
||||||
|
TEXTAREA, ALIGN=8
|
||||||
|
|
||||||
|
/* ffi_call_SYSV
|
||||||
|
extern void ffi_call_SYSV (void *stack, void *frame,
|
||||||
|
void (*fn)(void), void *rvalue,
|
||||||
|
int flags, void *closure);
|
||||||
|
Therefore on entry we have:
|
||||||
|
x0 stack
|
||||||
|
x1 frame
|
||||||
|
x2 fn
|
||||||
|
x3 rvalue
|
||||||
|
x4 flags
|
||||||
|
x5 closure
|
||||||
|
*/
|
||||||
|
|
||||||
|
NESTED_ENTRY ffi_call_SYSV_fake
|
||||||
|
|
||||||
|
/* For unwind information, Windows has to store fp and lr */
|
||||||
|
PROLOG_SAVE_REG_PAIR x29, x30, #-32!
|
||||||
|
|
||||||
|
ALTERNATE_ENTRY ffi_call_SYSV
|
||||||
|
/* Use a stack frame allocated by our caller. */
|
||||||
|
stp x29, x30, [x1]
|
||||||
|
mov x29, x1
|
||||||
|
mov sp, x0
|
||||||
|
|
||||||
|
mov x9, x2 /* save fn */
|
||||||
|
mov x8, x3 /* install structure return */
|
||||||
|
#ifdef FFI_GO_CLOSURES
|
||||||
|
/*mov x18, x5 install static chain */
|
||||||
|
#endif
|
||||||
|
stp x3, x4, [x29, #16] /* save rvalue and flags */
|
||||||
|
|
||||||
|
/* Load the vector argument passing registers, if necessary. */
|
||||||
|
tbz x4, #AARCH64_FLAG_ARG_V_BIT, ffi_call_SYSV_L1
|
||||||
|
ldp q0, q1, [sp, #0]
|
||||||
|
ldp q2, q3, [sp, #32]
|
||||||
|
ldp q4, q5, [sp, #64]
|
||||||
|
ldp q6, q7, [sp, #96]
|
||||||
|
|
||||||
|
ffi_call_SYSV_L1
|
||||||
|
/* Load the core argument passing registers, including
|
||||||
|
the structure return pointer. */
|
||||||
|
ldp x0, x1, [sp, #16*N_V_ARG_REG + 0]
|
||||||
|
ldp x2, x3, [sp, #16*N_V_ARG_REG + 16]
|
||||||
|
ldp x4, x5, [sp, #16*N_V_ARG_REG + 32]
|
||||||
|
ldp x6, x7, [sp, #16*N_V_ARG_REG + 48]
|
||||||
|
|
||||||
|
/* Deallocate the context, leaving the stacked arguments. */
|
||||||
|
add sp, sp, #CALL_CONTEXT_SIZE
|
||||||
|
|
||||||
|
blr x9 /* call fn */
|
||||||
|
|
||||||
|
ldp x3, x4, [x29, #16] /* reload rvalue and flags */
|
||||||
|
|
||||||
|
/* Partially deconstruct the stack frame. */
|
||||||
|
mov sp, x29
|
||||||
|
ldp x29, x30, [x29]
|
||||||
|
|
||||||
|
/* Save the return value as directed. */
|
||||||
|
adr x5, ffi_call_SYSV_return
|
||||||
|
and w4, w4, #AARCH64_RET_MASK
|
||||||
|
add x5, x5, x4, lsl #3
|
||||||
|
br x5
|
||||||
|
|
||||||
|
/* Note that each table entry is 2 insns, and thus 8 bytes.
|
||||||
|
For integer data, note that we're storing into ffi_arg
|
||||||
|
and therefore we want to extend to 64 bits; these types
|
||||||
|
have two consecutive entries allocated for them. */
|
||||||
|
ALIGN 4
|
||||||
|
ffi_call_SYSV_return
|
||||||
|
ret /* VOID */
|
||||||
|
nop
|
||||||
|
str x0, [x3] /* INT64 */
|
||||||
|
ret
|
||||||
|
stp x0, x1, [x3] /* INT128 */
|
||||||
|
ret
|
||||||
|
brk #1000 /* UNUSED */
|
||||||
|
ret
|
||||||
|
brk #1000 /* UNUSED */
|
||||||
|
ret
|
||||||
|
brk #1000 /* UNUSED */
|
||||||
|
ret
|
||||||
|
brk #1000 /* UNUSED */
|
||||||
|
ret
|
||||||
|
brk #1000 /* UNUSED */
|
||||||
|
ret
|
||||||
|
st4 { v0.s, v1.s, v2.s, v3.s }[0], [x3] /* S4 */
|
||||||
|
ret
|
||||||
|
st3 { v0.s, v1.s, v2.s }[0], [x3] /* S3 */
|
||||||
|
ret
|
||||||
|
stp s0, s1, [x3] /* S2 */
|
||||||
|
ret
|
||||||
|
str s0, [x3] /* S1 */
|
||||||
|
ret
|
||||||
|
st4 { v0.d, v1.d, v2.d, v3.d }[0], [x3] /* D4 */
|
||||||
|
ret
|
||||||
|
st3 { v0.d, v1.d, v2.d }[0], [x3] /* D3 */
|
||||||
|
ret
|
||||||
|
stp d0, d1, [x3] /* D2 */
|
||||||
|
ret
|
||||||
|
str d0, [x3] /* D1 */
|
||||||
|
ret
|
||||||
|
str q3, [x3, #48] /* Q4 */
|
||||||
|
nop
|
||||||
|
str q2, [x3, #32] /* Q3 */
|
||||||
|
nop
|
||||||
|
stp q0, q1, [x3] /* Q2 */
|
||||||
|
ret
|
||||||
|
str q0, [x3] /* Q1 */
|
||||||
|
ret
|
||||||
|
uxtb w0, w0 /* UINT8 */
|
||||||
|
str x0, [x3]
|
||||||
|
ret /* reserved */
|
||||||
|
nop
|
||||||
|
uxth w0, w0 /* UINT16 */
|
||||||
|
str x0, [x3]
|
||||||
|
ret /* reserved */
|
||||||
|
nop
|
||||||
|
mov w0, w0 /* UINT32 */
|
||||||
|
str x0, [x3]
|
||||||
|
ret /* reserved */
|
||||||
|
nop
|
||||||
|
sxtb x0, w0 /* SINT8 */
|
||||||
|
str x0, [x3]
|
||||||
|
ret /* reserved */
|
||||||
|
nop
|
||||||
|
sxth x0, w0 /* SINT16 */
|
||||||
|
str x0, [x3]
|
||||||
|
ret /* reserved */
|
||||||
|
nop
|
||||||
|
sxtw x0, w0 /* SINT32 */
|
||||||
|
str x0, [x3]
|
||||||
|
ret /* reserved */
|
||||||
|
nop
|
||||||
|
|
||||||
|
|
||||||
|
NESTED_END ffi_call_SYSV_fake
|
||||||
|
|
||||||
|
|
||||||
|
/* ffi_closure_SYSV
|
||||||
|
Closure invocation glue. This is the low level code invoked directly by
|
||||||
|
the closure trampoline to setup and call a closure.
|
||||||
|
On entry x17 points to a struct ffi_closure, x16 has been clobbered
|
||||||
|
all other registers are preserved.
|
||||||
|
We allocate a call context and save the argument passing registers,
|
||||||
|
then invoked the generic C ffi_closure_SYSV_inner() function to do all
|
||||||
|
the real work, on return we load the result passing registers back from
|
||||||
|
the call context.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define ffi_closure_SYSV_FS (8*2 + CALL_CONTEXT_SIZE + 64)
|
||||||
|
|
||||||
|
NESTED_ENTRY ffi_closure_SYSV_V
|
||||||
|
PROLOG_SAVE_REG_PAIR x29, x30, #-ffi_closure_SYSV_FS!
|
||||||
|
|
||||||
|
/* Save the argument passing vector registers. */
|
||||||
|
stp q0, q1, [sp, #16 + 0]
|
||||||
|
stp q2, q3, [sp, #16 + 32]
|
||||||
|
stp q4, q5, [sp, #16 + 64]
|
||||||
|
stp q6, q7, [sp, #16 + 96]
|
||||||
|
|
||||||
|
b ffi_closure_SYSV_save_argument
|
||||||
|
NESTED_END ffi_closure_SYSV_V
|
||||||
|
|
||||||
|
NESTED_ENTRY ffi_closure_SYSV
|
||||||
|
PROLOG_SAVE_REG_PAIR x29, x30, #-ffi_closure_SYSV_FS!
|
||||||
|
|
||||||
|
ffi_closure_SYSV_save_argument
|
||||||
|
/* Save the argument passing core registers. */
|
||||||
|
stp x0, x1, [sp, #16 + 16*N_V_ARG_REG + 0]
|
||||||
|
stp x2, x3, [sp, #16 + 16*N_V_ARG_REG + 16]
|
||||||
|
stp x4, x5, [sp, #16 + 16*N_V_ARG_REG + 32]
|
||||||
|
stp x6, x7, [sp, #16 + 16*N_V_ARG_REG + 48]
|
||||||
|
|
||||||
|
/* Load ffi_closure_inner arguments. */
|
||||||
|
ldp PTR_REG(0), PTR_REG(1), [x17, #FFI_TRAMPOLINE_CLOSURE_OFFSET] /* load cif, fn */
|
||||||
|
ldr PTR_REG(2), [x17, #FFI_TRAMPOLINE_CLOSURE_OFFSET+PTR_SIZE*2] /* load user_data */
|
||||||
|
|
||||||
|
do_closure
|
||||||
|
add x3, sp, #16 /* load context */
|
||||||
|
add x4, sp, #ffi_closure_SYSV_FS /* load stack */
|
||||||
|
add x5, sp, #16+CALL_CONTEXT_SIZE /* load rvalue */
|
||||||
|
mov x6, x8 /* load struct_rval */
|
||||||
|
|
||||||
|
bl ffi_closure_SYSV_inner
|
||||||
|
|
||||||
|
/* Load the return value as directed. */
|
||||||
|
adr x1, ffi_closure_SYSV_return_base
|
||||||
|
and w0, w0, #AARCH64_RET_MASK
|
||||||
|
add x1, x1, x0, lsl #3
|
||||||
|
add x3, sp, #16+CALL_CONTEXT_SIZE
|
||||||
|
br x1
|
||||||
|
|
||||||
|
/* Note that each table entry is 2 insns, and thus 8 bytes. */
|
||||||
|
ALIGN 8
|
||||||
|
ffi_closure_SYSV_return_base
|
||||||
|
b ffi_closure_SYSV_epilog /* VOID */
|
||||||
|
nop
|
||||||
|
ldr x0, [x3] /* INT64 */
|
||||||
|
b ffi_closure_SYSV_epilog
|
||||||
|
ldp x0, x1, [x3] /* INT128 */
|
||||||
|
b ffi_closure_SYSV_epilog
|
||||||
|
brk #1000 /* UNUSED */
|
||||||
|
nop
|
||||||
|
brk #1000 /* UNUSED */
|
||||||
|
nop
|
||||||
|
brk #1000 /* UNUSED */
|
||||||
|
nop
|
||||||
|
brk #1000 /* UNUSED */
|
||||||
|
nop
|
||||||
|
brk #1000 /* UNUSED */
|
||||||
|
nop
|
||||||
|
ldr s3, [x3, #12] /* S4 */
|
||||||
|
nop
|
||||||
|
ldr s2, [x3, #8] /* S3 */
|
||||||
|
nop
|
||||||
|
ldp s0, s1, [x3] /* S2 */
|
||||||
|
b ffi_closure_SYSV_epilog
|
||||||
|
ldr s0, [x3] /* S1 */
|
||||||
|
b ffi_closure_SYSV_epilog
|
||||||
|
ldr d3, [x3, #24] /* D4 */
|
||||||
|
nop
|
||||||
|
ldr d2, [x3, #16] /* D3 */
|
||||||
|
nop
|
||||||
|
ldp d0, d1, [x3] /* D2 */
|
||||||
|
b ffi_closure_SYSV_epilog
|
||||||
|
ldr d0, [x3] /* D1 */
|
||||||
|
b ffi_closure_SYSV_epilog
|
||||||
|
ldr q3, [x3, #48] /* Q4 */
|
||||||
|
nop
|
||||||
|
ldr q2, [x3, #32] /* Q3 */
|
||||||
|
nop
|
||||||
|
ldp q0, q1, [x3] /* Q2 */
|
||||||
|
b ffi_closure_SYSV_epilog
|
||||||
|
ldr q0, [x3] /* Q1 */
|
||||||
|
b ffi_closure_SYSV_epilog
|
||||||
|
ldrb w0, [x3, #BE(7)] /* UINT8 */
|
||||||
|
b ffi_closure_SYSV_epilog
|
||||||
|
brk #1000 /* reserved */
|
||||||
|
nop
|
||||||
|
ldrh w0, [x3, #BE(6)] /* UINT16 */
|
||||||
|
b ffi_closure_SYSV_epilog
|
||||||
|
brk #1000 /* reserved */
|
||||||
|
nop
|
||||||
|
ldr w0, [x3, #BE(4)] /* UINT32 */
|
||||||
|
b ffi_closure_SYSV_epilog
|
||||||
|
brk #1000 /* reserved */
|
||||||
|
nop
|
||||||
|
ldrsb x0, [x3, #BE(7)] /* SINT8 */
|
||||||
|
b ffi_closure_SYSV_epilog
|
||||||
|
brk #1000 /* reserved */
|
||||||
|
nop
|
||||||
|
ldrsh x0, [x3, #BE(6)] /* SINT16 */
|
||||||
|
b ffi_closure_SYSV_epilog
|
||||||
|
brk #1000 /* reserved */
|
||||||
|
nop
|
||||||
|
ldrsw x0, [x3, #BE(4)] /* SINT32 */
|
||||||
|
nop
|
||||||
|
/* reserved */
|
||||||
|
|
||||||
|
ffi_closure_SYSV_epilog
|
||||||
|
EPILOG_RESTORE_REG_PAIR x29, x30, #ffi_closure_SYSV_FS!
|
||||||
|
EPILOG_RETURN
|
||||||
|
NESTED_END ffi_closure_SYSV
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef FFI_GO_CLOSURES
|
||||||
|
NESTED_ENTRY ffi_go_closure_SYSV_V
|
||||||
|
PROLOG_SAVE_REG_PAIR x29, x30, #-ffi_closure_SYSV_FS!
|
||||||
|
|
||||||
|
/* Save the argument passing vector registers. */
|
||||||
|
stp q0, q1, [sp, #16 + 0]
|
||||||
|
stp q2, q3, [sp, #16 + 32]
|
||||||
|
stp q4, q5, [sp, #16 + 64]
|
||||||
|
stp q6, q7, [sp, #16 + 96]
|
||||||
|
b ffi_go_closure_SYSV_save_argument
|
||||||
|
NESTED_END ffi_go_closure_SYSV_V
|
||||||
|
|
||||||
|
NESTED_ENTRY ffi_go_closure_SYSV
|
||||||
|
PROLOG_SAVE_REG_PAIR x29, x30, #-ffi_closure_SYSV_FS!
|
||||||
|
|
||||||
|
ffi_go_closure_SYSV_save_argument
|
||||||
|
/* Save the argument passing core registers. */
|
||||||
|
stp x0, x1, [sp, #16 + 16*N_V_ARG_REG + 0]
|
||||||
|
stp x2, x3, [sp, #16 + 16*N_V_ARG_REG + 16]
|
||||||
|
stp x4, x5, [sp, #16 + 16*N_V_ARG_REG + 32]
|
||||||
|
stp x6, x7, [sp, #16 + 16*N_V_ARG_REG + 48]
|
||||||
|
|
||||||
|
/* Load ffi_closure_inner arguments. */
|
||||||
|
ldp PTR_REG(0), PTR_REG(1), [x18, #PTR_SIZE]/* load cif, fn */
|
||||||
|
mov x2, x18 /* load user_data */
|
||||||
|
b do_closure
|
||||||
|
NESTED_END ffi_go_closure_SYSV
|
||||||
|
|
||||||
|
#endif /* FFI_GO_CLOSURES */
|
||||||
|
|
||||||
|
|
||||||
|
/* void extend_hfa_type (void *dest, void *src, int h) */
|
||||||
|
|
||||||
|
LEAF_ENTRY extend_hfa_type
|
||||||
|
|
||||||
|
adr x3, extend_hfa_type_jump_base
|
||||||
|
and w2, w2, #AARCH64_RET_MASK
|
||||||
|
sub x2, x2, #AARCH64_RET_S4
|
||||||
|
add x3, x3, x2, lsl #4
|
||||||
|
br x3
|
||||||
|
|
||||||
|
ALIGN 4
|
||||||
|
extend_hfa_type_jump_base
|
||||||
|
ldp s16, s17, [x1] /* S4 */
|
||||||
|
ldp s18, s19, [x1, #8]
|
||||||
|
b extend_hfa_type_store_4
|
||||||
|
nop
|
||||||
|
|
||||||
|
ldp s16, s17, [x1] /* S3 */
|
||||||
|
ldr s18, [x1, #8]
|
||||||
|
b extend_hfa_type_store_3
|
||||||
|
nop
|
||||||
|
|
||||||
|
ldp s16, s17, [x1] /* S2 */
|
||||||
|
b extend_hfa_type_store_2
|
||||||
|
nop
|
||||||
|
nop
|
||||||
|
|
||||||
|
ldr s16, [x1] /* S1 */
|
||||||
|
b extend_hfa_type_store_1
|
||||||
|
nop
|
||||||
|
nop
|
||||||
|
|
||||||
|
ldp d16, d17, [x1] /* D4 */
|
||||||
|
ldp d18, d19, [x1, #16]
|
||||||
|
b extend_hfa_type_store_4
|
||||||
|
nop
|
||||||
|
|
||||||
|
ldp d16, d17, [x1] /* D3 */
|
||||||
|
ldr d18, [x1, #16]
|
||||||
|
b extend_hfa_type_store_3
|
||||||
|
nop
|
||||||
|
|
||||||
|
ldp d16, d17, [x1] /* D2 */
|
||||||
|
b extend_hfa_type_store_2
|
||||||
|
nop
|
||||||
|
nop
|
||||||
|
|
||||||
|
ldr d16, [x1] /* D1 */
|
||||||
|
b extend_hfa_type_store_1
|
||||||
|
nop
|
||||||
|
nop
|
||||||
|
|
||||||
|
ldp q16, q17, [x1] /* Q4 */
|
||||||
|
ldp q18, q19, [x1, #16]
|
||||||
|
b extend_hfa_type_store_4
|
||||||
|
nop
|
||||||
|
|
||||||
|
ldp q16, q17, [x1] /* Q3 */
|
||||||
|
ldr q18, [x1, #16]
|
||||||
|
b extend_hfa_type_store_3
|
||||||
|
nop
|
||||||
|
|
||||||
|
ldp q16, q17, [x1] /* Q2 */
|
||||||
|
b extend_hfa_type_store_2
|
||||||
|
nop
|
||||||
|
nop
|
||||||
|
|
||||||
|
ldr q16, [x1] /* Q1 */
|
||||||
|
b extend_hfa_type_store_1
|
||||||
|
|
||||||
|
extend_hfa_type_store_4
|
||||||
|
str q19, [x0, #48]
|
||||||
|
extend_hfa_type_store_3
|
||||||
|
str q18, [x0, #32]
|
||||||
|
extend_hfa_type_store_2
|
||||||
|
str q17, [x0, #16]
|
||||||
|
extend_hfa_type_store_1
|
||||||
|
str q16, [x0]
|
||||||
|
ret
|
||||||
|
|
||||||
|
LEAF_END extend_hfa_type
|
||||||
|
|
||||||
|
|
||||||
|
/* void compress_hfa_type (void *dest, void *reg, int h) */
|
||||||
|
|
||||||
|
LEAF_ENTRY compress_hfa_type
|
||||||
|
|
||||||
|
adr x3, compress_hfa_type_jump_base
|
||||||
|
and w2, w2, #AARCH64_RET_MASK
|
||||||
|
sub x2, x2, #AARCH64_RET_S4
|
||||||
|
add x3, x3, x2, lsl #4
|
||||||
|
br x3
|
||||||
|
|
||||||
|
ALIGN 4
|
||||||
|
compress_hfa_type_jump_base
|
||||||
|
ldp q16, q17, [x1] /* S4 */
|
||||||
|
ldp q18, q19, [x1, #32]
|
||||||
|
st4 { v16.s, v17.s, v18.s, v19.s }[0], [x0]
|
||||||
|
ret
|
||||||
|
|
||||||
|
ldp q16, q17, [x1] /* S3 */
|
||||||
|
ldr q18, [x1, #32]
|
||||||
|
st3 { v16.s, v17.s, v18.s }[0], [x0]
|
||||||
|
ret
|
||||||
|
|
||||||
|
ldp q16, q17, [x1] /* S2 */
|
||||||
|
st2 { v16.s, v17.s }[0], [x0]
|
||||||
|
ret
|
||||||
|
nop
|
||||||
|
|
||||||
|
ldr q16, [x1] /* S1 */
|
||||||
|
st1 { v16.s }[0], [x0]
|
||||||
|
ret
|
||||||
|
nop
|
||||||
|
|
||||||
|
ldp q16, q17, [x1] /* D4 */
|
||||||
|
ldp q18, q19, [x1, #32]
|
||||||
|
st4 { v16.d, v17.d, v18.d, v19.d }[0], [x0]
|
||||||
|
ret
|
||||||
|
|
||||||
|
ldp q16, q17, [x1] /* D3 */
|
||||||
|
ldr q18, [x1, #32]
|
||||||
|
st3 { v16.d, v17.d, v18.d }[0], [x0]
|
||||||
|
ret
|
||||||
|
|
||||||
|
ldp q16, q17, [x1] /* D2 */
|
||||||
|
st2 { v16.d, v17.d }[0], [x0]
|
||||||
|
ret
|
||||||
|
nop
|
||||||
|
|
||||||
|
ldr q16, [x1] /* D1 */
|
||||||
|
st1 { v16.d }[0], [x0]
|
||||||
|
ret
|
||||||
|
nop
|
||||||
|
|
||||||
|
ldp q16, q17, [x1] /* Q4 */
|
||||||
|
ldp q18, q19, [x1, #32]
|
||||||
|
b compress_hfa_type_store_q4
|
||||||
|
nop
|
||||||
|
|
||||||
|
ldp q16, q17, [x1] /* Q3 */
|
||||||
|
ldr q18, [x1, #32]
|
||||||
|
b compress_hfa_type_store_q3
|
||||||
|
nop
|
||||||
|
|
||||||
|
ldp q16, q17, [x1] /* Q2 */
|
||||||
|
stp q16, q17, [x0]
|
||||||
|
ret
|
||||||
|
nop
|
||||||
|
|
||||||
|
ldr q16, [x1] /* Q1 */
|
||||||
|
str q16, [x0]
|
||||||
|
ret
|
||||||
|
|
||||||
|
compress_hfa_type_store_q4
|
||||||
|
str q19, [x0, #48]
|
||||||
|
compress_hfa_type_store_q3
|
||||||
|
str q18, [x0, #32]
|
||||||
|
stp q16, q17, [x0]
|
||||||
|
ret
|
||||||
|
|
||||||
|
LEAF_END compress_hfa_type
|
||||||
|
|
||||||
|
END
|
||||||
106
src/arm/ffi.c
106
src/arm/ffi.c
@@ -28,13 +28,20 @@
|
|||||||
DEALINGS IN THE SOFTWARE.
|
DEALINGS IN THE SOFTWARE.
|
||||||
----------------------------------------------------------------------- */
|
----------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
#if defined(__arm__) || defined(_M_ARM)
|
||||||
#include <fficonfig.h>
|
#include <fficonfig.h>
|
||||||
#include <ffi.h>
|
#include <ffi.h>
|
||||||
#include <ffi_common.h>
|
#include <ffi_common.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <tramp.h>
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
|
|
||||||
|
#if defined(_WIN32)
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if FFI_EXEC_TRAMPOLINE_TABLE
|
#if FFI_EXEC_TRAMPOLINE_TABLE
|
||||||
|
|
||||||
#ifdef __MACH__
|
#ifdef __MACH__
|
||||||
@@ -42,7 +49,19 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
#ifndef _WIN32
|
||||||
extern unsigned int ffi_arm_trampoline[2] FFI_HIDDEN;
|
extern unsigned int ffi_arm_trampoline[2] FFI_HIDDEN;
|
||||||
|
#else
|
||||||
|
// Declare this as an array of char, instead of array of int,
|
||||||
|
// otherwise Clang optimizes out the "& 0xFFFFFFFE" for clearing
|
||||||
|
// the thumb bit.
|
||||||
|
extern unsigned char ffi_arm_trampoline[12] FFI_HIDDEN;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(__FreeBSD__) && defined(__arm__)
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <machine/sysarch.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Forward declares. */
|
/* Forward declares. */
|
||||||
@@ -88,10 +107,20 @@ ffi_put_arg (ffi_type *ty, void *src, void *dst)
|
|||||||
case FFI_TYPE_SINT32:
|
case FFI_TYPE_SINT32:
|
||||||
case FFI_TYPE_UINT32:
|
case FFI_TYPE_UINT32:
|
||||||
case FFI_TYPE_POINTER:
|
case FFI_TYPE_POINTER:
|
||||||
|
#ifndef _WIN32
|
||||||
case FFI_TYPE_FLOAT:
|
case FFI_TYPE_FLOAT:
|
||||||
|
#endif
|
||||||
*(UINT32 *)dst = *(UINT32 *)src;
|
*(UINT32 *)dst = *(UINT32 *)src;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
// casting a float* to a UINT32* doesn't work on Windows
|
||||||
|
case FFI_TYPE_FLOAT:
|
||||||
|
*(uintptr_t *)dst = 0;
|
||||||
|
*(float *)dst = *(float *)src;
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
case FFI_TYPE_SINT64:
|
case FFI_TYPE_SINT64:
|
||||||
case FFI_TYPE_UINT64:
|
case FFI_TYPE_UINT64:
|
||||||
case FFI_TYPE_DOUBLE:
|
case FFI_TYPE_DOUBLE:
|
||||||
@@ -210,7 +239,7 @@ ffi_prep_args_VFP (ffi_cif *cif, int flags, void *rvalue,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Perform machine dependent cif processing */
|
/* Perform machine dependent cif processing */
|
||||||
ffi_status
|
ffi_status FFI_HIDDEN
|
||||||
ffi_prep_cif_machdep (ffi_cif *cif)
|
ffi_prep_cif_machdep (ffi_cif *cif)
|
||||||
{
|
{
|
||||||
int flags = 0, cabi = cif->abi;
|
int flags = 0, cabi = cif->abi;
|
||||||
@@ -301,7 +330,7 @@ ffi_prep_cif_machdep (ffi_cif *cif)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Perform machine dependent cif processing for variadic calls */
|
/* Perform machine dependent cif processing for variadic calls */
|
||||||
ffi_status
|
ffi_status FFI_HIDDEN
|
||||||
ffi_prep_cif_machdep_var (ffi_cif * cif,
|
ffi_prep_cif_machdep_var (ffi_cif * cif,
|
||||||
unsigned int nfixedargs, unsigned int ntotalargs)
|
unsigned int nfixedargs, unsigned int ntotalargs)
|
||||||
{
|
{
|
||||||
@@ -401,12 +430,14 @@ ffi_call (ffi_cif *cif, void (*fn) (void), void *rvalue, void **avalue)
|
|||||||
ffi_call_int (cif, fn, rvalue, avalue, NULL);
|
ffi_call_int (cif, fn, rvalue, avalue, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef FFI_GO_CLOSURES
|
||||||
void
|
void
|
||||||
ffi_call_go (ffi_cif *cif, void (*fn) (void), void *rvalue,
|
ffi_call_go (ffi_cif *cif, void (*fn) (void), void *rvalue,
|
||||||
void **avalue, void *closure)
|
void **avalue, void *closure)
|
||||||
{
|
{
|
||||||
ffi_call_int (cif, fn, rvalue, avalue, closure);
|
ffi_call_int (cif, fn, rvalue, avalue, closure);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
ffi_prep_incoming_args_SYSV (ffi_cif *cif, void *rvalue,
|
ffi_prep_incoming_args_SYSV (ffi_cif *cif, void *rvalue,
|
||||||
@@ -509,6 +540,8 @@ ffi_prep_incoming_args_VFP (ffi_cif *cif, void *rvalue, char *stack,
|
|||||||
return rvalue;
|
return rvalue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if FFI_CLOSURES
|
||||||
|
|
||||||
struct closure_frame
|
struct closure_frame
|
||||||
{
|
{
|
||||||
char vfp_space[8*8] __attribute__((aligned(8)));
|
char vfp_space[8*8] __attribute__((aligned(8)));
|
||||||
@@ -544,11 +577,28 @@ ffi_closure_inner_VFP (ffi_cif *cif,
|
|||||||
|
|
||||||
void ffi_closure_SYSV (void) FFI_HIDDEN;
|
void ffi_closure_SYSV (void) FFI_HIDDEN;
|
||||||
void ffi_closure_VFP (void) FFI_HIDDEN;
|
void ffi_closure_VFP (void) FFI_HIDDEN;
|
||||||
|
#if defined(FFI_EXEC_STATIC_TRAMP)
|
||||||
|
void ffi_closure_SYSV_alt (void) FFI_HIDDEN;
|
||||||
|
void ffi_closure_VFP_alt (void) FFI_HIDDEN;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef FFI_GO_CLOSURES
|
||||||
void ffi_go_closure_SYSV (void) FFI_HIDDEN;
|
void ffi_go_closure_SYSV (void) FFI_HIDDEN;
|
||||||
void ffi_go_closure_VFP (void) FFI_HIDDEN;
|
void ffi_go_closure_VFP (void) FFI_HIDDEN;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* the cif must already be prep'ed */
|
/* the cif must already be prep'ed */
|
||||||
|
|
||||||
|
#if defined(__FreeBSD__) && defined(__arm__)
|
||||||
|
#define __clear_cache(start, end) do { \
|
||||||
|
struct arm_sync_icache_args ua; \
|
||||||
|
\
|
||||||
|
ua.addr = (uintptr_t)(start); \
|
||||||
|
ua.len = (char *)(end) - (char *)start; \
|
||||||
|
sysarch(ARM_SYNC_ICACHE, &ua); \
|
||||||
|
} while (0);
|
||||||
|
#endif
|
||||||
|
|
||||||
ffi_status
|
ffi_status
|
||||||
ffi_prep_closure_loc (ffi_closure * closure,
|
ffi_prep_closure_loc (ffi_closure * closure,
|
||||||
ffi_cif * cif,
|
ffi_cif * cif,
|
||||||
@@ -571,15 +621,43 @@ ffi_prep_closure_loc (ffi_closure * closure,
|
|||||||
config[0] = closure;
|
config[0] = closure;
|
||||||
config[1] = closure_func;
|
config[1] = closure_func;
|
||||||
#else
|
#else
|
||||||
memcpy (closure->tramp, ffi_arm_trampoline, 8);
|
|
||||||
|
#if defined(FFI_EXEC_STATIC_TRAMP)
|
||||||
|
if (ffi_tramp_is_present(closure))
|
||||||
|
{
|
||||||
|
/* Initialize the static trampoline's parameters. */
|
||||||
|
if (closure_func == ffi_closure_SYSV)
|
||||||
|
closure_func = ffi_closure_SYSV_alt;
|
||||||
|
else
|
||||||
|
closure_func = ffi_closure_VFP_alt;
|
||||||
|
ffi_tramp_set_parms (closure->ftramp, closure_func, closure);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Initialize the dynamic trampoline. */
|
||||||
|
#ifndef _WIN32
|
||||||
|
memcpy(closure->tramp, ffi_arm_trampoline, 8);
|
||||||
|
#else
|
||||||
|
// cast away function type so MSVC doesn't set the lower bit of the function pointer
|
||||||
|
memcpy(closure->tramp, (void*)((uintptr_t)ffi_arm_trampoline & 0xFFFFFFFE), FFI_TRAMPOLINE_CLOSURE_OFFSET);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined (__QNX__)
|
#if defined (__QNX__)
|
||||||
msync(closure->tramp, 8, 0x1000000); /* clear data map */
|
msync(closure->tramp, 8, 0x1000000); /* clear data map */
|
||||||
msync(codeloc, 8, 0x1000000); /* clear insn map */
|
msync(codeloc, 8, 0x1000000); /* clear insn map */
|
||||||
|
#elif defined(_WIN32)
|
||||||
|
FlushInstructionCache(GetCurrentProcess(), closure->tramp, FFI_TRAMPOLINE_SIZE);
|
||||||
#else
|
#else
|
||||||
__clear_cache(closure->tramp, closure->tramp + 8); /* clear data map */
|
__clear_cache(closure->tramp, closure->tramp + 8); /* clear data map */
|
||||||
__clear_cache(codeloc, codeloc + 8); /* clear insn map */
|
__clear_cache(codeloc, codeloc + 8); /* clear insn map */
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef _WIN32
|
||||||
|
*(void(**)(void))(closure->tramp + FFI_TRAMPOLINE_CLOSURE_FUNCTION) = closure_func;
|
||||||
|
#else
|
||||||
*(void (**)(void))(closure->tramp + 8) = closure_func;
|
*(void (**)(void))(closure->tramp + 8) = closure_func;
|
||||||
|
#endif
|
||||||
|
out:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
closure->cif = cif;
|
closure->cif = cif;
|
||||||
@@ -589,6 +667,7 @@ ffi_prep_closure_loc (ffi_closure * closure,
|
|||||||
return FFI_OK;
|
return FFI_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef FFI_GO_CLOSURES
|
||||||
ffi_status
|
ffi_status
|
||||||
ffi_prep_go_closure (ffi_go_closure *closure, ffi_cif *cif,
|
ffi_prep_go_closure (ffi_go_closure *closure, ffi_cif *cif,
|
||||||
void (*fun) (ffi_cif *, void *, void **, void *))
|
void (*fun) (ffi_cif *, void *, void **, void *))
|
||||||
@@ -610,6 +689,9 @@ ffi_prep_go_closure (ffi_go_closure *closure, ffi_cif *cif,
|
|||||||
|
|
||||||
return FFI_OK;
|
return FFI_OK;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* FFI_CLOSURES */
|
||||||
|
|
||||||
/* Below are routines for VFP hard-float support. */
|
/* Below are routines for VFP hard-float support. */
|
||||||
|
|
||||||
@@ -781,7 +863,7 @@ place_vfp_arg (ffi_cif *cif, int h)
|
|||||||
}
|
}
|
||||||
/* Found regs to allocate. */
|
/* Found regs to allocate. */
|
||||||
cif->vfp_used |= new_used;
|
cif->vfp_used |= new_used;
|
||||||
cif->vfp_args[cif->vfp_nargs++] = reg;
|
cif->vfp_args[cif->vfp_nargs++] = (signed char)reg;
|
||||||
|
|
||||||
/* Update vfp_reg_free. */
|
/* Update vfp_reg_free. */
|
||||||
if (cif->vfp_used & (1 << cif->vfp_reg_free))
|
if (cif->vfp_used & (1 << cif->vfp_reg_free))
|
||||||
@@ -803,7 +885,7 @@ place_vfp_arg (ffi_cif *cif, int h)
|
|||||||
static void
|
static void
|
||||||
layout_vfp_args (ffi_cif * cif)
|
layout_vfp_args (ffi_cif * cif)
|
||||||
{
|
{
|
||||||
int i;
|
unsigned int i;
|
||||||
/* Init VFP fields */
|
/* Init VFP fields */
|
||||||
cif->vfp_used = 0;
|
cif->vfp_used = 0;
|
||||||
cif->vfp_nargs = 0;
|
cif->vfp_nargs = 0;
|
||||||
@@ -817,3 +899,17 @@ layout_vfp_args (ffi_cif * cif)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(FFI_EXEC_STATIC_TRAMP)
|
||||||
|
void *
|
||||||
|
ffi_tramp_arch (size_t *tramp_size, size_t *map_size)
|
||||||
|
{
|
||||||
|
extern void *trampoline_code_table;
|
||||||
|
|
||||||
|
*tramp_size = ARM_TRAMP_SIZE;
|
||||||
|
*map_size = ARM_TRAMP_MAP_SIZE;
|
||||||
|
return &trampoline_code_table;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __arm__ or _M_ARM */
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ typedef enum ffi_abi {
|
|||||||
FFI_SYSV,
|
FFI_SYSV,
|
||||||
FFI_VFP,
|
FFI_VFP,
|
||||||
FFI_LAST_ABI,
|
FFI_LAST_ABI,
|
||||||
#ifdef __ARM_PCS_VFP
|
#if defined(__ARM_PCS_VFP) || defined(_WIN32)
|
||||||
FFI_DEFAULT_ABI = FFI_VFP,
|
FFI_DEFAULT_ABI = FFI_VFP,
|
||||||
#else
|
#else
|
||||||
FFI_DEFAULT_ABI = FFI_SYSV,
|
FFI_DEFAULT_ABI = FFI_SYSV,
|
||||||
@@ -57,7 +57,9 @@ typedef enum ffi_abi {
|
|||||||
signed char vfp_args[16] \
|
signed char vfp_args[16] \
|
||||||
|
|
||||||
#define FFI_TARGET_SPECIFIC_VARIADIC
|
#define FFI_TARGET_SPECIFIC_VARIADIC
|
||||||
|
#ifndef _WIN32
|
||||||
#define FFI_TARGET_HAS_COMPLEX_TYPE
|
#define FFI_TARGET_HAS_COMPLEX_TYPE
|
||||||
|
#endif
|
||||||
|
|
||||||
/* ---- Definitions for closures ----------------------------------------- */
|
/* ---- Definitions for closures ----------------------------------------- */
|
||||||
|
|
||||||
@@ -74,8 +76,13 @@ typedef enum ffi_abi {
|
|||||||
#error "No trampoline table implementation"
|
#error "No trampoline table implementation"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#else
|
||||||
|
#ifdef _WIN32
|
||||||
|
#define FFI_TRAMPOLINE_SIZE 16
|
||||||
|
#define FFI_TRAMPOLINE_CLOSURE_FUNCTION 12
|
||||||
#else
|
#else
|
||||||
#define FFI_TRAMPOLINE_SIZE 12
|
#define FFI_TRAMPOLINE_SIZE 12
|
||||||
|
#endif
|
||||||
#define FFI_TRAMPOLINE_CLOSURE_OFFSET FFI_TRAMPOLINE_SIZE
|
#define FFI_TRAMPOLINE_CLOSURE_OFFSET FFI_TRAMPOLINE_SIZE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -5,3 +5,13 @@
|
|||||||
#define ARM_TYPE_INT 4
|
#define ARM_TYPE_INT 4
|
||||||
#define ARM_TYPE_VOID 5
|
#define ARM_TYPE_VOID 5
|
||||||
#define ARM_TYPE_STRUCT 6
|
#define ARM_TYPE_STRUCT 6
|
||||||
|
|
||||||
|
#if defined(FFI_EXEC_STATIC_TRAMP)
|
||||||
|
/*
|
||||||
|
* For the trampoline table mapping, a mapping size of 4K (base page size)
|
||||||
|
* is chosen.
|
||||||
|
*/
|
||||||
|
#define ARM_TRAMP_MAP_SHIFT 12
|
||||||
|
#define ARM_TRAMP_MAP_SIZE (1 << ARM_TRAMP_MAP_SHIFT)
|
||||||
|
#define ARM_TRAMP_SIZE 20
|
||||||
|
#endif
|
||||||
|
|||||||
132
src/arm/sysv.S
132
src/arm/sysv.S
@@ -25,6 +25,7 @@
|
|||||||
DEALINGS IN THE SOFTWARE.
|
DEALINGS IN THE SOFTWARE.
|
||||||
----------------------------------------------------------------------- */
|
----------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
#ifdef __arm__
|
||||||
#define LIBFFI_ASM
|
#define LIBFFI_ASM
|
||||||
#include <fficonfig.h>
|
#include <fficonfig.h>
|
||||||
#include <ffi.h>
|
#include <ffi.h>
|
||||||
@@ -91,9 +92,25 @@
|
|||||||
#define ARM_FUNC_END(name) \
|
#define ARM_FUNC_END(name) \
|
||||||
SIZE(name)
|
SIZE(name)
|
||||||
|
|
||||||
|
.text
|
||||||
|
.syntax unified
|
||||||
|
#if defined(_WIN32)
|
||||||
|
/* Windows on ARM is thumb-only */
|
||||||
|
.thumb
|
||||||
|
#else
|
||||||
|
/* Keep the assembly in ARM mode in other cases, for simplicity
|
||||||
|
* (to avoid interworking issues). */
|
||||||
|
#undef __thumb__
|
||||||
|
.arm
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Aid in defining a jump table with 8 bytes between entries. */
|
/* Aid in defining a jump table with 8 bytes between entries. */
|
||||||
|
#ifdef __thumb__
|
||||||
|
/* In thumb mode, instructions can be shorter than expected in arm mode, so
|
||||||
|
* we need to align the start of each case. */
|
||||||
|
# define E(index) .align 3
|
||||||
|
#elif defined(__clang__)
|
||||||
/* ??? The clang assembler doesn't handle .if with symbolic expressions. */
|
/* ??? The clang assembler doesn't handle .if with symbolic expressions. */
|
||||||
#ifdef __clang__
|
|
||||||
# define E(index)
|
# define E(index)
|
||||||
#else
|
#else
|
||||||
# define E(index) \
|
# define E(index) \
|
||||||
@@ -102,9 +119,6 @@
|
|||||||
.endif
|
.endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
.text
|
|
||||||
.syntax unified
|
|
||||||
.arm
|
|
||||||
|
|
||||||
#ifndef __clang__
|
#ifndef __clang__
|
||||||
/* We require interworking on LDM, which implies ARMv5T,
|
/* We require interworking on LDM, which implies ARMv5T,
|
||||||
@@ -127,12 +141,13 @@ ARM_FUNC_START(ffi_call_VFP)
|
|||||||
cfi_startproc
|
cfi_startproc
|
||||||
|
|
||||||
cmp r3, #3 @ load only d0 if possible
|
cmp r3, #3 @ load only d0 if possible
|
||||||
|
ite le
|
||||||
#ifdef __clang__
|
#ifdef __clang__
|
||||||
vldrle d0, [sp]
|
vldrle d0, [r0]
|
||||||
vldmgt sp, {d0-d7}
|
vldmgt r0, {d0-d7}
|
||||||
#else
|
#else
|
||||||
ldcle p11, cr0, [r0] @ vldrle d0, [sp]
|
ldcle p11, cr0, [r0] @ vldrle d0, [r0]
|
||||||
ldcgt p11, cr0, [r0], {16} @ vldmgt sp, {d0-d7}
|
ldcgt p11, cr0, [r0], {16} @ vldmgt r0, {d0-d7}
|
||||||
#endif
|
#endif
|
||||||
add r0, r0, #64 @ discard the vfp register args
|
add r0, r0, #64 @ discard the vfp register args
|
||||||
/* FALLTHRU */
|
/* FALLTHRU */
|
||||||
@@ -166,9 +181,16 @@ ARM_FUNC_START(ffi_call_SYSV)
|
|||||||
cfi_def_cfa_register(sp)
|
cfi_def_cfa_register(sp)
|
||||||
|
|
||||||
@ Store values stored in registers.
|
@ Store values stored in registers.
|
||||||
|
#ifndef __thumb__
|
||||||
.align 3
|
.align 3
|
||||||
add pc, pc, r3, lsl #3
|
add pc, pc, r3, lsl #3
|
||||||
nop
|
nop
|
||||||
|
#else
|
||||||
|
adr ip, 0f
|
||||||
|
add ip, ip, r3, lsl #3
|
||||||
|
mov pc, ip
|
||||||
|
.align 3
|
||||||
|
#endif
|
||||||
0:
|
0:
|
||||||
E(ARM_TYPE_VFP_S)
|
E(ARM_TYPE_VFP_S)
|
||||||
#ifdef __clang__
|
#ifdef __clang__
|
||||||
@@ -207,6 +229,7 @@ E(ARM_TYPE_STRUCT)
|
|||||||
UNWIND(.fnend)
|
UNWIND(.fnend)
|
||||||
ARM_FUNC_END(ffi_call_SYSV)
|
ARM_FUNC_END(ffi_call_SYSV)
|
||||||
|
|
||||||
|
#if FFI_CLOSURES
|
||||||
|
|
||||||
/*
|
/*
|
||||||
int ffi_closure_inner_* (cif, fun, user_data, frame)
|
int ffi_closure_inner_* (cif, fun, user_data, frame)
|
||||||
@@ -226,6 +249,9 @@ ARM_FUNC_END(ffi_go_closure_SYSV)
|
|||||||
ARM_FUNC_START(ffi_closure_SYSV)
|
ARM_FUNC_START(ffi_closure_SYSV)
|
||||||
UNWIND(.fnstart)
|
UNWIND(.fnstart)
|
||||||
cfi_startproc
|
cfi_startproc
|
||||||
|
#ifdef _WIN32
|
||||||
|
ldmfd sp!, {r0, ip} @ restore fp (r0 is used for stack alignment)
|
||||||
|
#endif
|
||||||
stmdb sp!, {r0-r3} @ save argument regs
|
stmdb sp!, {r0-r3} @ save argument regs
|
||||||
cfi_adjust_cfa_offset(16)
|
cfi_adjust_cfa_offset(16)
|
||||||
|
|
||||||
@@ -254,7 +280,12 @@ ARM_FUNC_START(ffi_closure_SYSV)
|
|||||||
@ Load values returned in registers.
|
@ Load values returned in registers.
|
||||||
add r2, sp, #8+64 @ load result
|
add r2, sp, #8+64 @ load result
|
||||||
adr r3, CNAME(ffi_closure_ret)
|
adr r3, CNAME(ffi_closure_ret)
|
||||||
|
#ifndef __thumb__
|
||||||
add pc, r3, r0, lsl #3
|
add pc, r3, r0, lsl #3
|
||||||
|
#else
|
||||||
|
add r3, r3, r0, lsl #3
|
||||||
|
mov pc, r3
|
||||||
|
#endif
|
||||||
cfi_endproc
|
cfi_endproc
|
||||||
UNWIND(.fnend)
|
UNWIND(.fnend)
|
||||||
ARM_FUNC_END(ffi_closure_SYSV)
|
ARM_FUNC_END(ffi_closure_SYSV)
|
||||||
@@ -273,6 +304,9 @@ ARM_FUNC_END(ffi_go_closure_VFP)
|
|||||||
ARM_FUNC_START(ffi_closure_VFP)
|
ARM_FUNC_START(ffi_closure_VFP)
|
||||||
UNWIND(.fnstart)
|
UNWIND(.fnstart)
|
||||||
cfi_startproc
|
cfi_startproc
|
||||||
|
#ifdef _WIN32
|
||||||
|
ldmfd sp!, {r0, ip} @ restore fp (r0 is used for stack alignment)
|
||||||
|
#endif
|
||||||
stmdb sp!, {r0-r3} @ save argument regs
|
stmdb sp!, {r0-r3} @ save argument regs
|
||||||
cfi_adjust_cfa_offset(16)
|
cfi_adjust_cfa_offset(16)
|
||||||
|
|
||||||
@@ -304,7 +338,12 @@ ARM_FUNC_START(ffi_closure_VFP)
|
|||||||
@ Load values returned in registers.
|
@ Load values returned in registers.
|
||||||
add r2, sp, #8+64 @ load result
|
add r2, sp, #8+64 @ load result
|
||||||
adr r3, CNAME(ffi_closure_ret)
|
adr r3, CNAME(ffi_closure_ret)
|
||||||
|
#ifndef __thumb__
|
||||||
add pc, r3, r0, lsl #3
|
add pc, r3, r0, lsl #3
|
||||||
|
#else
|
||||||
|
add r3, r3, r0, lsl #3
|
||||||
|
mov pc, r3
|
||||||
|
#endif
|
||||||
cfi_endproc
|
cfi_endproc
|
||||||
UNWIND(.fnend)
|
UNWIND(.fnend)
|
||||||
ARM_FUNC_END(ffi_closure_VFP)
|
ARM_FUNC_END(ffi_closure_VFP)
|
||||||
@@ -324,35 +363,92 @@ E(ARM_TYPE_VFP_S)
|
|||||||
#else
|
#else
|
||||||
ldc p10, cr0, [r2] @ vldr s0, [r2]
|
ldc p10, cr0, [r2] @ vldr s0, [r2]
|
||||||
#endif
|
#endif
|
||||||
ldm sp, {sp,pc}
|
b call_epilogue
|
||||||
E(ARM_TYPE_VFP_D)
|
E(ARM_TYPE_VFP_D)
|
||||||
#ifdef __clang__
|
#ifdef __clang__
|
||||||
vldr d0, [r2]
|
vldr d0, [r2]
|
||||||
#else
|
#else
|
||||||
ldc p11, cr0, [r2] @ vldr d0, [r2]
|
ldc p11, cr0, [r2] @ vldr d0, [r2]
|
||||||
#endif
|
#endif
|
||||||
ldm sp, {sp,pc}
|
b call_epilogue
|
||||||
E(ARM_TYPE_VFP_N)
|
E(ARM_TYPE_VFP_N)
|
||||||
#ifdef __clang__
|
#ifdef __clang__
|
||||||
vldm r2, {d0-d3}
|
vldm r2, {d0-d3}
|
||||||
#else
|
#else
|
||||||
ldc p11, cr0, [r2], {8} @ vldm r2, {d0-d3}
|
ldc p11, cr0, [r2], {8} @ vldm r2, {d0-d3}
|
||||||
#endif
|
#endif
|
||||||
ldm sp, {sp,pc}
|
b call_epilogue
|
||||||
E(ARM_TYPE_INT64)
|
E(ARM_TYPE_INT64)
|
||||||
ldr r1, [r2, #4]
|
ldr r1, [r2, #4]
|
||||||
nop
|
nop
|
||||||
E(ARM_TYPE_INT)
|
E(ARM_TYPE_INT)
|
||||||
ldr r0, [r2]
|
ldr r0, [r2]
|
||||||
ldm sp, {sp,pc}
|
b call_epilogue
|
||||||
E(ARM_TYPE_VOID)
|
E(ARM_TYPE_VOID)
|
||||||
ldm sp, {sp,pc}
|
b call_epilogue
|
||||||
nop
|
nop
|
||||||
E(ARM_TYPE_STRUCT)
|
E(ARM_TYPE_STRUCT)
|
||||||
|
b call_epilogue
|
||||||
|
call_epilogue:
|
||||||
|
#ifndef __thumb__
|
||||||
ldm sp, {sp,pc}
|
ldm sp, {sp,pc}
|
||||||
|
#else
|
||||||
|
ldm sp, {ip,lr}
|
||||||
|
mov sp, ip
|
||||||
|
bx lr
|
||||||
|
#endif
|
||||||
cfi_endproc
|
cfi_endproc
|
||||||
ARM_FUNC_END(ffi_closure_ret)
|
ARM_FUNC_END(ffi_closure_ret)
|
||||||
|
|
||||||
|
#if defined(FFI_EXEC_STATIC_TRAMP)
|
||||||
|
ARM_FUNC_START(ffi_closure_SYSV_alt)
|
||||||
|
/* See the comments above trampoline_code_table. */
|
||||||
|
ldr ip, [sp, #4] /* Load closure in ip */
|
||||||
|
add sp, sp, 8 /* Restore the stack */
|
||||||
|
b CNAME(ffi_closure_SYSV)
|
||||||
|
ARM_FUNC_END(ffi_closure_SYSV_alt)
|
||||||
|
|
||||||
|
ARM_FUNC_START(ffi_closure_VFP_alt)
|
||||||
|
/* See the comments above trampoline_code_table. */
|
||||||
|
ldr ip, [sp, #4] /* Load closure in ip */
|
||||||
|
add sp, sp, 8 /* Restore the stack */
|
||||||
|
b CNAME(ffi_closure_VFP)
|
||||||
|
ARM_FUNC_END(ffi_closure_VFP_alt)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Below is the definition of the trampoline code table. Each element in
|
||||||
|
* the code table is a trampoline.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* The trampoline uses register ip (r12). It saves the original value of ip
|
||||||
|
* on the stack.
|
||||||
|
*
|
||||||
|
* The trampoline has two parameters - target code to jump to and data for
|
||||||
|
* the target code. The trampoline extracts the parameters from its parameter
|
||||||
|
* block (see tramp_table_map()). The trampoline saves the data address on
|
||||||
|
* the stack. Finally, it jumps to the target code.
|
||||||
|
*
|
||||||
|
* The target code can choose to:
|
||||||
|
*
|
||||||
|
* - restore the value of ip
|
||||||
|
* - load the data address in a register
|
||||||
|
* - restore the stack pointer to what it was when the trampoline was invoked.
|
||||||
|
*/
|
||||||
|
.align ARM_TRAMP_MAP_SHIFT
|
||||||
|
ARM_FUNC_START(trampoline_code_table)
|
||||||
|
.rept ARM_TRAMP_MAP_SIZE / ARM_TRAMP_SIZE
|
||||||
|
sub sp, sp, #8 /* Make space on the stack */
|
||||||
|
str ip, [sp] /* Save ip on stack */
|
||||||
|
ldr ip, [pc, #4080] /* Copy data into ip */
|
||||||
|
str ip, [sp, #4] /* Save data on stack */
|
||||||
|
ldr pc, [pc, #4076] /* Copy code into PC */
|
||||||
|
.endr
|
||||||
|
ARM_FUNC_END(trampoline_code_table)
|
||||||
|
.align ARM_TRAMP_MAP_SHIFT
|
||||||
|
#endif /* FFI_EXEC_STATIC_TRAMP */
|
||||||
|
|
||||||
|
#endif /* FFI_CLOSURES */
|
||||||
|
|
||||||
#if FFI_EXEC_TRAMPOLINE_TABLE
|
#if FFI_EXEC_TRAMPOLINE_TABLE
|
||||||
|
|
||||||
#ifdef __MACH__
|
#ifdef __MACH__
|
||||||
@@ -368,6 +464,15 @@ ARM_FUNC_START(ffi_closure_trampoline_table_page)
|
|||||||
ARM_FUNC_END(ffi_closure_trampoline_table_page)
|
ARM_FUNC_END(ffi_closure_trampoline_table_page)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#elif defined(_WIN32)
|
||||||
|
|
||||||
|
ARM_FUNC_START(ffi_arm_trampoline)
|
||||||
|
0: adr ip, 0b
|
||||||
|
stmdb sp!, {r0, ip}
|
||||||
|
ldr pc, 1f
|
||||||
|
1: .long 0
|
||||||
|
ARM_FUNC_END(ffi_arm_trampoline)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
ARM_FUNC_START(ffi_arm_trampoline)
|
ARM_FUNC_START(ffi_arm_trampoline)
|
||||||
@@ -377,6 +482,7 @@ ARM_FUNC_START(ffi_arm_trampoline)
|
|||||||
ARM_FUNC_END(ffi_arm_trampoline)
|
ARM_FUNC_END(ffi_arm_trampoline)
|
||||||
|
|
||||||
#endif /* FFI_EXEC_TRAMPOLINE_TABLE */
|
#endif /* FFI_EXEC_TRAMPOLINE_TABLE */
|
||||||
|
#endif /* __arm__ */
|
||||||
|
|
||||||
#if defined __ELF__ && defined __linux__
|
#if defined __ELF__ && defined __linux__
|
||||||
.section .note.GNU-stack,"",%progbits
|
.section .note.GNU-stack,"",%progbits
|
||||||
|
|||||||
311
src/arm/sysv_msvc_arm32.S
Normal file
311
src/arm/sysv_msvc_arm32.S
Normal file
@@ -0,0 +1,311 @@
|
|||||||
|
/* -----------------------------------------------------------------------
|
||||||
|
sysv.S - Copyright (c) 1998, 2008, 2011 Red Hat, Inc.
|
||||||
|
Copyright (c) 2011 Plausible Labs Cooperative, Inc.
|
||||||
|
Copyright (c) 2019 Microsoft Corporation.
|
||||||
|
|
||||||
|
ARM Foreign Function Interface
|
||||||
|
|
||||||
|
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.
|
||||||
|
----------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
#define LIBFFI_ASM
|
||||||
|
#include <fficonfig.h>
|
||||||
|
#include <ffi.h>
|
||||||
|
#include <ffi_cfi.h>
|
||||||
|
#include "internal.h"
|
||||||
|
#include "ksarm.h"
|
||||||
|
|
||||||
|
|
||||||
|
; 8 byte aligned AREA to support 8 byte aligned jump tables
|
||||||
|
MACRO
|
||||||
|
NESTED_ENTRY_FFI $FuncName, $AreaName, $ExceptHandler
|
||||||
|
|
||||||
|
; compute the function's labels
|
||||||
|
__DeriveFunctionLabels $FuncName
|
||||||
|
|
||||||
|
; determine the area we will put the function into
|
||||||
|
__FuncArea SETS "|.text|"
|
||||||
|
IF "$AreaName" != ""
|
||||||
|
__FuncArea SETS "$AreaName"
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
; set up the exception handler itself
|
||||||
|
__FuncExceptionHandler SETS ""
|
||||||
|
IF "$ExceptHandler" != ""
|
||||||
|
__FuncExceptionHandler SETS "|$ExceptHandler|"
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
; switch to the specified area, jump tables require 8 byte alignment
|
||||||
|
AREA $__FuncArea,CODE,CODEALIGN,ALIGN=3,READONLY
|
||||||
|
|
||||||
|
; export the function name
|
||||||
|
__ExportProc $FuncName
|
||||||
|
|
||||||
|
; flush any pending literal pool stuff
|
||||||
|
ROUT
|
||||||
|
|
||||||
|
; reset the state of the unwind code tracking
|
||||||
|
__ResetUnwindState
|
||||||
|
|
||||||
|
MEND
|
||||||
|
|
||||||
|
; MACRO
|
||||||
|
; TABLE_ENTRY $Type, $Table
|
||||||
|
;$Type_$Table
|
||||||
|
; MEND
|
||||||
|
|
||||||
|
#define E(index,table) return_##index##_##table
|
||||||
|
|
||||||
|
; r0: stack
|
||||||
|
; r1: frame
|
||||||
|
; r2: fn
|
||||||
|
; r3: vfp_used
|
||||||
|
|
||||||
|
; fake entry point exists only to generate exists only to
|
||||||
|
; generate .pdata for exception unwinding
|
||||||
|
NESTED_ENTRY_FFI ffi_call_VFP_fake
|
||||||
|
PROLOG_PUSH {r11, lr} ; save fp and lr for unwind
|
||||||
|
|
||||||
|
ALTERNATE_ENTRY ffi_call_VFP
|
||||||
|
cmp r3, #3 ; load only d0 if possible
|
||||||
|
vldrle d0, [r0]
|
||||||
|
vldmgt r0, {d0-d7}
|
||||||
|
add r0, r0, #64 ; discard the vfp register args
|
||||||
|
b ffi_call_SYSV
|
||||||
|
NESTED_END ffi_call_VFP_fake
|
||||||
|
|
||||||
|
; fake entry point exists only to generate exists only to
|
||||||
|
; generate .pdata for exception unwinding
|
||||||
|
NESTED_ENTRY_FFI ffi_call_SYSV_fake
|
||||||
|
PROLOG_PUSH {r11, lr} ; save fp and lr for unwind
|
||||||
|
|
||||||
|
ALTERNATE_ENTRY ffi_call_SYSV
|
||||||
|
stm r1, {fp, lr}
|
||||||
|
mov fp, r1
|
||||||
|
|
||||||
|
mov sp, r0 ; install the stack pointer
|
||||||
|
mov lr, r2 ; move the fn pointer out of the way
|
||||||
|
ldr ip, [fp, #16] ; install the static chain
|
||||||
|
ldmia sp!, {r0-r3} ; move first 4 parameters in registers.
|
||||||
|
blx lr ; call fn
|
||||||
|
|
||||||
|
; Load r2 with the pointer to storage for the return value
|
||||||
|
; Load r3 with the return type code
|
||||||
|
ldr r2, [fp, #8]
|
||||||
|
ldr r3, [fp, #12]
|
||||||
|
|
||||||
|
; Deallocate the stack with the arguments.
|
||||||
|
mov sp, fp
|
||||||
|
|
||||||
|
; Store values stored in registers.
|
||||||
|
ALIGN 8
|
||||||
|
lsl r3, #3
|
||||||
|
add r3, r3, pc
|
||||||
|
add r3, #8
|
||||||
|
mov pc, r3
|
||||||
|
|
||||||
|
|
||||||
|
E(ARM_TYPE_VFP_S, ffi_call)
|
||||||
|
ALIGN 8
|
||||||
|
vstr s0, [r2]
|
||||||
|
pop {fp,pc}
|
||||||
|
E(ARM_TYPE_VFP_D, ffi_call)
|
||||||
|
ALIGN 8
|
||||||
|
vstr d0, [r2]
|
||||||
|
pop {fp,pc}
|
||||||
|
E(ARM_TYPE_VFP_N, ffi_call)
|
||||||
|
ALIGN 8
|
||||||
|
vstm r2, {d0-d3}
|
||||||
|
pop {fp,pc}
|
||||||
|
E(ARM_TYPE_INT64, ffi_call)
|
||||||
|
ALIGN 8
|
||||||
|
str r1, [r2, #4]
|
||||||
|
nop
|
||||||
|
E(ARM_TYPE_INT, ffi_call)
|
||||||
|
ALIGN 8
|
||||||
|
str r0, [r2]
|
||||||
|
pop {fp,pc}
|
||||||
|
E(ARM_TYPE_VOID, ffi_call)
|
||||||
|
ALIGN 8
|
||||||
|
pop {fp,pc}
|
||||||
|
nop
|
||||||
|
E(ARM_TYPE_STRUCT, ffi_call)
|
||||||
|
ALIGN 8
|
||||||
|
cmp r3, #ARM_TYPE_STRUCT
|
||||||
|
pop {fp,pc}
|
||||||
|
NESTED_END ffi_call_SYSV_fake
|
||||||
|
|
||||||
|
IMPORT |ffi_closure_inner_SYSV|
|
||||||
|
/*
|
||||||
|
int ffi_closure_inner_SYSV
|
||||||
|
(
|
||||||
|
cif, ; r0
|
||||||
|
fun, ; r1
|
||||||
|
user_data, ; r2
|
||||||
|
frame ; r3
|
||||||
|
)
|
||||||
|
*/
|
||||||
|
|
||||||
|
NESTED_ENTRY_FFI ffi_go_closure_SYSV
|
||||||
|
stmdb sp!, {r0-r3} ; save argument regs
|
||||||
|
ldr r0, [ip, #4] ; load cif
|
||||||
|
ldr r1, [ip, #8] ; load fun
|
||||||
|
mov r2, ip ; load user_data
|
||||||
|
b ffi_go_closure_SYSV_0
|
||||||
|
NESTED_END ffi_go_closure_SYSV
|
||||||
|
|
||||||
|
; r3: ffi_closure
|
||||||
|
|
||||||
|
; fake entry point exists only to generate exists only to
|
||||||
|
; generate .pdata for exception unwinding
|
||||||
|
NESTED_ENTRY_FFI ffi_closure_SYSV_fake
|
||||||
|
PROLOG_PUSH {r11, lr} ; save fp and lr for unwind
|
||||||
|
ALTERNATE_ENTRY ffi_closure_SYSV
|
||||||
|
ldmfd sp!, {ip,r0} ; restore fp (r0 is used for stack alignment)
|
||||||
|
stmdb sp!, {r0-r3} ; save argument regs
|
||||||
|
|
||||||
|
ldr r0, [ip, #FFI_TRAMPOLINE_CLOSURE_OFFSET] ; ffi_closure->cif
|
||||||
|
ldr r1, [ip, #FFI_TRAMPOLINE_CLOSURE_OFFSET+4] ; ffi_closure->fun
|
||||||
|
ldr r2, [ip, #FFI_TRAMPOLINE_CLOSURE_OFFSET+8] ; ffi_closure->user_data
|
||||||
|
|
||||||
|
ALTERNATE_ENTRY ffi_go_closure_SYSV_0
|
||||||
|
add ip, sp, #16 ; compute entry sp
|
||||||
|
|
||||||
|
sub sp, sp, #64+32 ; allocate frame parameter (sizeof(vfp_space) = 64, sizeof(result) = 32)
|
||||||
|
mov r3, sp ; set frame parameter
|
||||||
|
stmdb sp!, {ip,lr}
|
||||||
|
|
||||||
|
bl ffi_closure_inner_SYSV ; call the Python closure
|
||||||
|
|
||||||
|
; Load values returned in registers.
|
||||||
|
add r2, sp, #64+8 ; address of closure_frame->result
|
||||||
|
bl ffi_closure_ret ; move result to correct register or memory for type
|
||||||
|
|
||||||
|
ldmfd sp!, {ip,lr}
|
||||||
|
mov sp, ip ; restore stack pointer
|
||||||
|
mov pc, lr
|
||||||
|
NESTED_END ffi_closure_SYSV_fake
|
||||||
|
|
||||||
|
IMPORT |ffi_closure_inner_VFP|
|
||||||
|
/*
|
||||||
|
int ffi_closure_inner_VFP
|
||||||
|
(
|
||||||
|
cif, ; r0
|
||||||
|
fun, ; r1
|
||||||
|
user_data, ; r2
|
||||||
|
frame ; r3
|
||||||
|
)
|
||||||
|
*/
|
||||||
|
|
||||||
|
NESTED_ENTRY_FFI ffi_go_closure_VFP
|
||||||
|
stmdb sp!, {r0-r3} ; save argument regs
|
||||||
|
ldr r0, [ip, #4] ; load cif
|
||||||
|
ldr r1, [ip, #8] ; load fun
|
||||||
|
mov r2, ip ; load user_data
|
||||||
|
b ffi_go_closure_VFP_0
|
||||||
|
NESTED_END ffi_go_closure_VFP
|
||||||
|
|
||||||
|
; fake entry point exists only to generate exists only to
|
||||||
|
; generate .pdata for exception unwinding
|
||||||
|
; r3: closure
|
||||||
|
NESTED_ENTRY_FFI ffi_closure_VFP_fake
|
||||||
|
PROLOG_PUSH {r11, lr} ; save fp and lr for unwind
|
||||||
|
|
||||||
|
ALTERNATE_ENTRY ffi_closure_VFP
|
||||||
|
ldmfd sp!, {ip,r0} ; restore fp (r0 is used for stack alignment)
|
||||||
|
stmdb sp!, {r0-r3} ; save argument regs
|
||||||
|
|
||||||
|
ldr r0, [ip, #FFI_TRAMPOLINE_CLOSURE_OFFSET] ; load cif
|
||||||
|
ldr r1, [ip, #FFI_TRAMPOLINE_CLOSURE_OFFSET+4] ; load fun
|
||||||
|
ldr r2, [ip, #FFI_TRAMPOLINE_CLOSURE_OFFSET+8] ; load user_data
|
||||||
|
|
||||||
|
ALTERNATE_ENTRY ffi_go_closure_VFP_0
|
||||||
|
add ip, sp, #16 ; compute entry sp
|
||||||
|
sub sp, sp, #32 ; save space for closure_frame->result
|
||||||
|
vstmdb sp!, {d0-d7} ; push closure_frame->vfp_space
|
||||||
|
|
||||||
|
mov r3, sp ; save closure_frame
|
||||||
|
stmdb sp!, {ip,lr}
|
||||||
|
|
||||||
|
bl ffi_closure_inner_VFP
|
||||||
|
|
||||||
|
; Load values returned in registers.
|
||||||
|
add r2, sp, #64+8 ; load result
|
||||||
|
bl ffi_closure_ret
|
||||||
|
ldmfd sp!, {ip,lr}
|
||||||
|
mov sp, ip ; restore stack pointer
|
||||||
|
mov pc, lr
|
||||||
|
NESTED_END ffi_closure_VFP_fake
|
||||||
|
|
||||||
|
/* Load values returned in registers for both closure entry points.
|
||||||
|
Note that we use LDM with SP in the register set. This is deprecated
|
||||||
|
by ARM, but not yet unpredictable. */
|
||||||
|
|
||||||
|
NESTED_ENTRY_FFI ffi_closure_ret
|
||||||
|
stmdb sp!, {fp,lr}
|
||||||
|
|
||||||
|
ALIGN 8
|
||||||
|
lsl r0, #3
|
||||||
|
add r0, r0, pc
|
||||||
|
add r0, #8
|
||||||
|
mov pc, r0
|
||||||
|
|
||||||
|
E(ARM_TYPE_VFP_S, ffi_closure)
|
||||||
|
ALIGN 8
|
||||||
|
vldr s0, [r2]
|
||||||
|
b call_epilogue
|
||||||
|
E(ARM_TYPE_VFP_D, ffi_closure)
|
||||||
|
ALIGN 8
|
||||||
|
vldr d0, [r2]
|
||||||
|
b call_epilogue
|
||||||
|
E(ARM_TYPE_VFP_N, ffi_closure)
|
||||||
|
ALIGN 8
|
||||||
|
vldm r2, {d0-d3}
|
||||||
|
b call_epilogue
|
||||||
|
E(ARM_TYPE_INT64, ffi_closure)
|
||||||
|
ALIGN 8
|
||||||
|
ldr r1, [r2, #4]
|
||||||
|
nop
|
||||||
|
E(ARM_TYPE_INT, ffi_closure)
|
||||||
|
ALIGN 8
|
||||||
|
ldr r0, [r2]
|
||||||
|
b call_epilogue
|
||||||
|
E(ARM_TYPE_VOID, ffi_closure)
|
||||||
|
ALIGN 8
|
||||||
|
b call_epilogue
|
||||||
|
nop
|
||||||
|
E(ARM_TYPE_STRUCT, ffi_closure)
|
||||||
|
ALIGN 8
|
||||||
|
b call_epilogue
|
||||||
|
call_epilogue
|
||||||
|
ldmfd sp!, {fp,pc}
|
||||||
|
NESTED_END ffi_closure_ret
|
||||||
|
|
||||||
|
AREA |.trampoline|, DATA, THUMB, READONLY
|
||||||
|
EXPORT |ffi_arm_trampoline|
|
||||||
|
|ffi_arm_trampoline| DATA
|
||||||
|
thisproc adr ip, thisproc
|
||||||
|
stmdb sp!, {ip, r0}
|
||||||
|
ldr pc, [pc, #0]
|
||||||
|
DCD 0
|
||||||
|
;ENDP
|
||||||
|
|
||||||
|
END
|
||||||
141
src/closures.c
141
src/closures.c
@@ -1,5 +1,6 @@
|
|||||||
/* -----------------------------------------------------------------------
|
/* -----------------------------------------------------------------------
|
||||||
closures.c - Copyright (c) 2007, 2009, 2010 Red Hat, Inc.
|
closures.c - Copyright (c) 2019 Anthony Green
|
||||||
|
Copyright (c) 2007, 2009, 2010 Red Hat, Inc.
|
||||||
Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc
|
Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc
|
||||||
Copyright (c) 2011 Plausible Labs Cooperative, Inc.
|
Copyright (c) 2011 Plausible Labs Cooperative, Inc.
|
||||||
|
|
||||||
@@ -33,6 +34,7 @@
|
|||||||
#include <fficonfig.h>
|
#include <fficonfig.h>
|
||||||
#include <ffi.h>
|
#include <ffi.h>
|
||||||
#include <ffi_common.h>
|
#include <ffi_common.h>
|
||||||
|
#include <tramp.h>
|
||||||
|
|
||||||
#ifdef __NetBSD__
|
#ifdef __NetBSD__
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@@ -44,6 +46,9 @@
|
|||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#ifdef HAVE_SYS_MEMFD_H
|
||||||
|
#include <sys/memfd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
static const size_t overhead =
|
static const size_t overhead =
|
||||||
(sizeof(max_align_t) > sizeof(void *) + sizeof(size_t)) ?
|
(sizeof(max_align_t) > sizeof(void *) + sizeof(size_t)) ?
|
||||||
@@ -108,6 +113,12 @@ ffi_closure_free (void *ptr)
|
|||||||
munmap(dataseg, rounded_size);
|
munmap(dataseg, rounded_size);
|
||||||
munmap(codeseg, rounded_size);
|
munmap(codeseg, rounded_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
ffi_tramp_is_present (__attribute__((unused)) void *ptr)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
#else /* !NetBSD with PROT_MPROTECT */
|
#else /* !NetBSD with PROT_MPROTECT */
|
||||||
|
|
||||||
#if !FFI_MMAP_EXEC_WRIT && !FFI_EXEC_TRAMPOLINE_TABLE
|
#if !FFI_MMAP_EXEC_WRIT && !FFI_EXEC_TRAMPOLINE_TABLE
|
||||||
@@ -122,7 +133,7 @@ ffi_closure_free (void *ptr)
|
|||||||
# define FFI_MMAP_EXEC_WRIT 1
|
# define FFI_MMAP_EXEC_WRIT 1
|
||||||
# define HAVE_MNTENT 1
|
# define HAVE_MNTENT 1
|
||||||
# endif
|
# endif
|
||||||
# if defined(X86_WIN32) || defined(X86_WIN64) || defined(__OS2__)
|
# if defined(_WIN32) || defined(__OS2__)
|
||||||
/* Windows systems may have Data Execution Protection (DEP) enabled,
|
/* Windows systems may have Data Execution Protection (DEP) enabled,
|
||||||
which requires the use of VirtualMalloc/VirtualFree to alloc/free
|
which requires the use of VirtualMalloc/VirtualFree to alloc/free
|
||||||
executable memory. */
|
executable memory. */
|
||||||
@@ -147,6 +158,9 @@ ffi_closure_free (void *ptr)
|
|||||||
|
|
||||||
#include <mach/mach.h>
|
#include <mach/mach.h>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
#ifdef HAVE_PTRAUTH
|
||||||
|
#include <ptrauth.h>
|
||||||
|
#endif
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
@@ -159,7 +173,6 @@ struct ffi_trampoline_table
|
|||||||
{
|
{
|
||||||
/* contiguous writable and executable pages */
|
/* contiguous writable and executable pages */
|
||||||
vm_address_t config_page;
|
vm_address_t config_page;
|
||||||
vm_address_t trampoline_page;
|
|
||||||
|
|
||||||
/* free list tracking */
|
/* free list tracking */
|
||||||
uint16_t free_count;
|
uint16_t free_count;
|
||||||
@@ -172,7 +185,7 @@ struct ffi_trampoline_table
|
|||||||
|
|
||||||
struct ffi_trampoline_table_entry
|
struct ffi_trampoline_table_entry
|
||||||
{
|
{
|
||||||
void *(*trampoline) ();
|
void *(*trampoline) (void);
|
||||||
ffi_trampoline_table_entry *next;
|
ffi_trampoline_table_entry *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -203,7 +216,13 @@ ffi_trampoline_table_alloc (void)
|
|||||||
|
|
||||||
/* Remap the trampoline table on top of the placeholder page */
|
/* Remap the trampoline table on top of the placeholder page */
|
||||||
trampoline_page = config_page + PAGE_MAX_SIZE;
|
trampoline_page = config_page + PAGE_MAX_SIZE;
|
||||||
|
|
||||||
|
#ifdef HAVE_PTRAUTH
|
||||||
|
trampoline_page_template = (vm_address_t)(uintptr_t)ptrauth_auth_data((void *)&ffi_closure_trampoline_table_page, ptrauth_key_function_pointer, 0);
|
||||||
|
#else
|
||||||
trampoline_page_template = (vm_address_t)&ffi_closure_trampoline_table_page;
|
trampoline_page_template = (vm_address_t)&ffi_closure_trampoline_table_page;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __arm__
|
#ifdef __arm__
|
||||||
/* ffi_closure_trampoline_table_page can be thumb-biased on some ARM archs */
|
/* ffi_closure_trampoline_table_page can be thumb-biased on some ARM archs */
|
||||||
trampoline_page_template &= ~1UL;
|
trampoline_page_template &= ~1UL;
|
||||||
@@ -211,7 +230,7 @@ ffi_trampoline_table_alloc (void)
|
|||||||
kt = vm_remap (mach_task_self (), &trampoline_page, PAGE_MAX_SIZE, 0x0,
|
kt = vm_remap (mach_task_self (), &trampoline_page, PAGE_MAX_SIZE, 0x0,
|
||||||
VM_FLAGS_OVERWRITE, mach_task_self (), trampoline_page_template,
|
VM_FLAGS_OVERWRITE, mach_task_self (), trampoline_page_template,
|
||||||
FALSE, &cur_prot, &max_prot, VM_INHERIT_SHARE);
|
FALSE, &cur_prot, &max_prot, VM_INHERIT_SHARE);
|
||||||
if (kt != KERN_SUCCESS)
|
if (kt != KERN_SUCCESS || !(cur_prot & VM_PROT_EXECUTE))
|
||||||
{
|
{
|
||||||
vm_deallocate (mach_task_self (), config_page, PAGE_MAX_SIZE * 2);
|
vm_deallocate (mach_task_self (), config_page, PAGE_MAX_SIZE * 2);
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -221,7 +240,6 @@ ffi_trampoline_table_alloc (void)
|
|||||||
table = calloc (1, sizeof (ffi_trampoline_table));
|
table = calloc (1, sizeof (ffi_trampoline_table));
|
||||||
table->free_count = FFI_TRAMPOLINE_COUNT;
|
table->free_count = FFI_TRAMPOLINE_COUNT;
|
||||||
table->config_page = config_page;
|
table->config_page = config_page;
|
||||||
table->trampoline_page = trampoline_page;
|
|
||||||
|
|
||||||
/* Create and initialize the free list */
|
/* Create and initialize the free list */
|
||||||
table->free_list_pool =
|
table->free_list_pool =
|
||||||
@@ -231,7 +249,10 @@ ffi_trampoline_table_alloc (void)
|
|||||||
{
|
{
|
||||||
ffi_trampoline_table_entry *entry = &table->free_list_pool[i];
|
ffi_trampoline_table_entry *entry = &table->free_list_pool[i];
|
||||||
entry->trampoline =
|
entry->trampoline =
|
||||||
(void *) (table->trampoline_page + (i * FFI_TRAMPOLINE_SIZE));
|
(void *) (trampoline_page + (i * FFI_TRAMPOLINE_SIZE));
|
||||||
|
#ifdef HAVE_PTRAUTH
|
||||||
|
entry->trampoline = ptrauth_sign_unauthenticated(entry->trampoline, ptrauth_key_function_pointer, 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (i < table->free_count - 1)
|
if (i < table->free_count - 1)
|
||||||
entry->next = &table->free_list_pool[i + 1];
|
entry->next = &table->free_list_pool[i + 1];
|
||||||
@@ -385,7 +406,7 @@ ffi_closure_free (void *ptr)
|
|||||||
#endif
|
#endif
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#if !defined(X86_WIN32) && !defined(X86_WIN64)
|
#if !defined(_WIN32)
|
||||||
#ifdef HAVE_MNTENT
|
#ifdef HAVE_MNTENT
|
||||||
#include <mntent.h>
|
#include <mntent.h>
|
||||||
#endif /* HAVE_MNTENT */
|
#endif /* HAVE_MNTENT */
|
||||||
@@ -511,11 +532,11 @@ static int dlmalloc_trim(size_t) MAYBE_UNUSED;
|
|||||||
static size_t dlmalloc_usable_size(void*) MAYBE_UNUSED;
|
static size_t dlmalloc_usable_size(void*) MAYBE_UNUSED;
|
||||||
static void dlmalloc_stats(void) MAYBE_UNUSED;
|
static void dlmalloc_stats(void) MAYBE_UNUSED;
|
||||||
|
|
||||||
#if !(defined(X86_WIN32) || defined(X86_WIN64) || defined(__OS2__)) || defined (__CYGWIN__) || defined(__INTERIX)
|
#if !(defined(_WIN32) || defined(__OS2__)) || defined (__CYGWIN__) || defined(__INTERIX)
|
||||||
/* Use these for mmap and munmap within dlmalloc.c. */
|
/* Use these for mmap and munmap within dlmalloc.c. */
|
||||||
static void *dlmmap(void *, size_t, int, int, int, off_t);
|
static void *dlmmap(void *, size_t, int, int, int, off_t);
|
||||||
static int dlmunmap(void *, size_t);
|
static int dlmunmap(void *, size_t);
|
||||||
#endif /* !(defined(X86_WIN32) || defined(X86_WIN64) || defined(__OS2__)) || defined (__CYGWIN__) || defined(__INTERIX) */
|
#endif /* !(defined(_WIN32) || defined(__OS2__)) || defined (__CYGWIN__) || defined(__INTERIX) */
|
||||||
|
|
||||||
#define mmap dlmmap
|
#define mmap dlmmap
|
||||||
#define munmap dlmunmap
|
#define munmap dlmunmap
|
||||||
@@ -525,7 +546,7 @@ static int dlmunmap(void *, size_t);
|
|||||||
#undef mmap
|
#undef mmap
|
||||||
#undef munmap
|
#undef munmap
|
||||||
|
|
||||||
#if !(defined(X86_WIN32) || defined(X86_WIN64) || defined(__OS2__)) || defined (__CYGWIN__) || defined(__INTERIX)
|
#if !(defined(_WIN32) || defined(__OS2__)) || defined (__CYGWIN__) || defined(__INTERIX)
|
||||||
|
|
||||||
/* A mutex used to synchronize access to *exec* variables in this file. */
|
/* A mutex used to synchronize access to *exec* variables in this file. */
|
||||||
static pthread_mutex_t open_temp_exec_file_mutex = PTHREAD_MUTEX_INITIALIZER;
|
static pthread_mutex_t open_temp_exec_file_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||||
@@ -537,6 +558,17 @@ static int execfd = -1;
|
|||||||
/* The amount of space already allocated from the temporary file. */
|
/* The amount of space already allocated from the temporary file. */
|
||||||
static size_t execsize = 0;
|
static size_t execsize = 0;
|
||||||
|
|
||||||
|
#ifdef HAVE_MEMFD_CREATE
|
||||||
|
/* Open a temporary file name, and immediately unlink it. */
|
||||||
|
static int
|
||||||
|
open_temp_exec_file_memfd (const char *name)
|
||||||
|
{
|
||||||
|
int fd;
|
||||||
|
fd = memfd_create (name, MFD_CLOEXEC);
|
||||||
|
return fd;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Open a temporary file name, and immediately unlink it. */
|
/* Open a temporary file name, and immediately unlink it. */
|
||||||
static int
|
static int
|
||||||
open_temp_exec_file_name (char *name, int flags)
|
open_temp_exec_file_name (char *name, int flags)
|
||||||
@@ -664,6 +696,10 @@ static struct
|
|||||||
const char *arg;
|
const char *arg;
|
||||||
int repeat;
|
int repeat;
|
||||||
} open_temp_exec_file_opts[] = {
|
} open_temp_exec_file_opts[] = {
|
||||||
|
#ifdef HAVE_MEMFD_CREATE
|
||||||
|
{ open_temp_exec_file_memfd, "libffi", 0 },
|
||||||
|
#endif
|
||||||
|
{ open_temp_exec_file_env, "LIBFFI_TMPDIR", 0 },
|
||||||
{ open_temp_exec_file_env, "TMPDIR", 0 },
|
{ open_temp_exec_file_env, "TMPDIR", 0 },
|
||||||
{ open_temp_exec_file_dir, "/tmp", 0 },
|
{ open_temp_exec_file_dir, "/tmp", 0 },
|
||||||
{ open_temp_exec_file_dir, "/var/tmp", 0 },
|
{ open_temp_exec_file_dir, "/var/tmp", 0 },
|
||||||
@@ -789,7 +825,13 @@ dlmmap_locked (void *start, size_t length, int prot, int flags, off_t offset)
|
|||||||
close (execfd);
|
close (execfd);
|
||||||
goto retry_open;
|
goto retry_open;
|
||||||
}
|
}
|
||||||
ftruncate (execfd, offset);
|
if (ftruncate (execfd, offset) != 0)
|
||||||
|
{
|
||||||
|
/* Fixme : Error logs can be added here. Returning an error for
|
||||||
|
* ftruncte() will not add any advantage as it is being
|
||||||
|
* validating in the error case. */
|
||||||
|
}
|
||||||
|
|
||||||
return MFAIL;
|
return MFAIL;
|
||||||
}
|
}
|
||||||
else if (!offset
|
else if (!offset
|
||||||
@@ -801,7 +843,12 @@ dlmmap_locked (void *start, size_t length, int prot, int flags, off_t offset)
|
|||||||
if (start == MFAIL)
|
if (start == MFAIL)
|
||||||
{
|
{
|
||||||
munmap (ptr, length);
|
munmap (ptr, length);
|
||||||
ftruncate (execfd, offset);
|
if (ftruncate (execfd, offset) != 0)
|
||||||
|
{
|
||||||
|
/* Fixme : Error logs can be added here. Returning an error for
|
||||||
|
* ftruncte() will not add any advantage as it is being
|
||||||
|
* validating in the error case. */
|
||||||
|
}
|
||||||
return start;
|
return start;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -825,6 +872,12 @@ dlmmap (void *start, size_t length, int prot,
|
|||||||
&& flags == (MAP_PRIVATE | MAP_ANONYMOUS)
|
&& flags == (MAP_PRIVATE | MAP_ANONYMOUS)
|
||||||
&& fd == -1 && offset == 0);
|
&& fd == -1 && offset == 0);
|
||||||
|
|
||||||
|
if (execfd == -1 && ffi_tramp_is_supported ())
|
||||||
|
{
|
||||||
|
ptr = mmap (start, length, prot & ~PROT_EXEC, flags, fd, offset);
|
||||||
|
return ptr;
|
||||||
|
}
|
||||||
|
|
||||||
if (execfd == -1 && is_emutramp_enabled ())
|
if (execfd == -1 && is_emutramp_enabled ())
|
||||||
{
|
{
|
||||||
ptr = mmap (start, length, prot & ~PROT_EXEC, flags, fd, offset);
|
ptr = mmap (start, length, prot & ~PROT_EXEC, flags, fd, offset);
|
||||||
@@ -896,7 +949,7 @@ segment_holding_code (mstate m, char* addr)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* !(defined(X86_WIN32) || defined(X86_WIN64) || defined(__OS2__)) || defined (__CYGWIN__) || defined(__INTERIX) */
|
#endif /* !(defined(_WIN32) || defined(__OS2__)) || defined (__CYGWIN__) || defined(__INTERIX) */
|
||||||
|
|
||||||
/* Allocate a chunk of memory with the given size. Returns a pointer
|
/* Allocate a chunk of memory with the given size. Returns a pointer
|
||||||
to the writable address, and sets *CODE to the executable
|
to the writable address, and sets *CODE to the executable
|
||||||
@@ -904,23 +957,52 @@ segment_holding_code (mstate m, char* addr)
|
|||||||
void *
|
void *
|
||||||
ffi_closure_alloc (size_t size, void **code)
|
ffi_closure_alloc (size_t size, void **code)
|
||||||
{
|
{
|
||||||
void *ptr;
|
void *ptr, *ftramp;
|
||||||
|
|
||||||
if (!code)
|
if (!code)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
ptr = dlmalloc (size);
|
ptr = FFI_CLOSURE_PTR (dlmalloc (size));
|
||||||
|
|
||||||
if (ptr)
|
if (ptr)
|
||||||
{
|
{
|
||||||
msegmentptr seg = segment_holding (gm, ptr);
|
msegmentptr seg = segment_holding (gm, ptr);
|
||||||
|
|
||||||
*code = add_segment_exec_offset (ptr, seg);
|
*code = add_segment_exec_offset (ptr, seg);
|
||||||
|
if (!ffi_tramp_is_supported ())
|
||||||
|
return ptr;
|
||||||
|
|
||||||
|
ftramp = ffi_tramp_alloc (0);
|
||||||
|
if (ftramp == NULL)
|
||||||
|
{
|
||||||
|
dlfree (FFI_RESTORE_PTR (ptr));
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
*code = ffi_tramp_get_addr (ftramp);
|
||||||
|
((ffi_closure *) ptr)->ftramp = ftramp;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void *
|
||||||
|
ffi_data_to_code_pointer (void *data)
|
||||||
|
{
|
||||||
|
msegmentptr seg = segment_holding (gm, data);
|
||||||
|
/* We expect closures to be allocated with ffi_closure_alloc(), in
|
||||||
|
which case seg will be non-NULL. However, some users take on the
|
||||||
|
burden of managing this memory themselves, in which case this
|
||||||
|
we'll just return data. */
|
||||||
|
if (seg)
|
||||||
|
{
|
||||||
|
if (!ffi_tramp_is_supported ())
|
||||||
|
return add_segment_exec_offset (data, seg);
|
||||||
|
return ffi_tramp_get_addr (((ffi_closure *) data)->ftramp);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
/* Release a chunk of memory allocated with ffi_closure_alloc. If
|
/* Release a chunk of memory allocated with ffi_closure_alloc. If
|
||||||
FFI_CLOSURE_FREE_CODE is nonzero, the given address can be the
|
FFI_CLOSURE_FREE_CODE is nonzero, the given address can be the
|
||||||
writable or the executable address given. Otherwise, only the
|
writable or the executable address given. Otherwise, only the
|
||||||
@@ -934,8 +1016,17 @@ ffi_closure_free (void *ptr)
|
|||||||
if (seg)
|
if (seg)
|
||||||
ptr = sub_segment_exec_offset (ptr, seg);
|
ptr = sub_segment_exec_offset (ptr, seg);
|
||||||
#endif
|
#endif
|
||||||
|
if (ffi_tramp_is_supported ())
|
||||||
|
ffi_tramp_free (((ffi_closure *) ptr)->ftramp);
|
||||||
|
|
||||||
dlfree (ptr);
|
dlfree (FFI_RESTORE_PTR (ptr));
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
ffi_tramp_is_present (void *ptr)
|
||||||
|
{
|
||||||
|
msegmentptr seg = segment_holding (gm, ptr);
|
||||||
|
return seg != NULL && ffi_tramp_is_supported();
|
||||||
}
|
}
|
||||||
|
|
||||||
# else /* ! FFI_MMAP_EXEC_WRIT */
|
# else /* ! FFI_MMAP_EXEC_WRIT */
|
||||||
@@ -951,13 +1042,25 @@ ffi_closure_alloc (size_t size, void **code)
|
|||||||
if (!code)
|
if (!code)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
return *code = malloc (size);
|
return *code = FFI_CLOSURE_PTR (malloc (size));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ffi_closure_free (void *ptr)
|
ffi_closure_free (void *ptr)
|
||||||
{
|
{
|
||||||
free (ptr);
|
free (FFI_RESTORE_PTR (ptr));
|
||||||
|
}
|
||||||
|
|
||||||
|
void *
|
||||||
|
ffi_data_to_code_pointer (void *data)
|
||||||
|
{
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
ffi_tramp_is_present (__attribute__((unused)) void *ptr)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
# endif /* ! FFI_MMAP_EXEC_WRIT */
|
# endif /* ! FFI_MMAP_EXEC_WRIT */
|
||||||
|
|||||||
395
src/csky/ffi.c
Normal file
395
src/csky/ffi.c
Normal file
@@ -0,0 +1,395 @@
|
|||||||
|
/* -----------------------------------------------------------------------
|
||||||
|
ffi.c
|
||||||
|
|
||||||
|
CSKY Foreign Function Interface
|
||||||
|
|
||||||
|
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>
|
||||||
|
|
||||||
|
/* ffi_prep_args is called by the assembly routine once stack space
|
||||||
|
has been allocated for the function's arguments
|
||||||
|
*/
|
||||||
|
void ffi_prep_args(char *stack, extended_cif *ecif)
|
||||||
|
{
|
||||||
|
register unsigned int i;
|
||||||
|
register void **p_argv;
|
||||||
|
register char *argp;
|
||||||
|
register ffi_type **p_arg;
|
||||||
|
|
||||||
|
argp = stack;
|
||||||
|
|
||||||
|
if ( ecif->cif->flags == FFI_TYPE_STRUCT ) {
|
||||||
|
*(void **) argp = ecif->rvalue;
|
||||||
|
argp += 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
p_argv = ecif->avalue;
|
||||||
|
|
||||||
|
for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types;
|
||||||
|
(i != 0);
|
||||||
|
i--, p_arg++)
|
||||||
|
{
|
||||||
|
size_t z;
|
||||||
|
size_t alignment;
|
||||||
|
|
||||||
|
/* Align if necessary */
|
||||||
|
alignment = (*p_arg)->alignment;
|
||||||
|
#ifdef __CSKYABIV1__
|
||||||
|
/*
|
||||||
|
* Adapt ABIV1 bug.
|
||||||
|
* If struct's size is larger than 8 bytes, then it always alignment as 4 bytes.
|
||||||
|
*/
|
||||||
|
if (((*p_arg)->type == FFI_TYPE_STRUCT) && ((*p_arg)->size > 8) && (alignment == 8)) {
|
||||||
|
alignment = 4;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if ((alignment - 1) & (unsigned) argp) {
|
||||||
|
argp = (char *) FFI_ALIGN(argp, alignment);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((*p_arg)->type == FFI_TYPE_STRUCT)
|
||||||
|
argp = (char *) FFI_ALIGN(argp, 4);
|
||||||
|
|
||||||
|
z = (*p_arg)->size;
|
||||||
|
if (z < sizeof(int))
|
||||||
|
{
|
||||||
|
z = sizeof(int);
|
||||||
|
switch ((*p_arg)->type)
|
||||||
|
{
|
||||||
|
case FFI_TYPE_SINT8:
|
||||||
|
*(signed int *) argp = (signed int)*(SINT8 *)(* p_argv);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case FFI_TYPE_UINT8:
|
||||||
|
*(unsigned int *) argp = (unsigned int)*(UINT8 *)(* p_argv);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case FFI_TYPE_SINT16:
|
||||||
|
*(signed int *) argp = (signed int)*(SINT16 *)(* p_argv);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case FFI_TYPE_UINT16:
|
||||||
|
*(unsigned int *) argp = (unsigned int)*(UINT16 *)(* p_argv);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case FFI_TYPE_STRUCT:
|
||||||
|
#ifdef __CSKYBE__
|
||||||
|
memcpy((argp + 4 - (*p_arg)->size), *p_argv, (*p_arg)->size);
|
||||||
|
#else
|
||||||
|
memcpy(argp, *p_argv, (*p_arg)->size);
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
FFI_ASSERT(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (z == sizeof(int))
|
||||||
|
{
|
||||||
|
*(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
memcpy(argp, *p_argv, z);
|
||||||
|
}
|
||||||
|
p_argv++;
|
||||||
|
argp += z;
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Perform machine dependent cif processing */
|
||||||
|
ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
|
||||||
|
{
|
||||||
|
/* Round the stack up to a multiple of 8 bytes. This isn't needed
|
||||||
|
everywhere, but it is on some platforms, and it doesn't hcsky anything
|
||||||
|
when it isn't needed. */
|
||||||
|
cif->bytes = (cif->bytes + 7) & ~7;
|
||||||
|
|
||||||
|
/* Set the return type flag */
|
||||||
|
switch (cif->rtype->type)
|
||||||
|
{
|
||||||
|
|
||||||
|
case FFI_TYPE_DOUBLE:
|
||||||
|
case FFI_TYPE_SINT64:
|
||||||
|
case FFI_TYPE_UINT64:
|
||||||
|
cif->flags = (unsigned) FFI_TYPE_SINT64;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case FFI_TYPE_STRUCT:
|
||||||
|
if (cif->rtype->size <= 4)
|
||||||
|
/* A Composite Type not larger than 4 bytes is returned in r0. */
|
||||||
|
cif->flags = (unsigned)FFI_TYPE_INT;
|
||||||
|
else if (cif->rtype->size <= 8)
|
||||||
|
/* A Composite Type not larger than 8 bytes is returned in r0, r1. */
|
||||||
|
cif->flags = (unsigned)FFI_TYPE_SINT64;
|
||||||
|
else
|
||||||
|
/* A Composite Type larger than 8 bytes, or whose size cannot
|
||||||
|
be determined statically ... is stored in memory at an
|
||||||
|
address passed [in r0]. */
|
||||||
|
cif->flags = (unsigned)FFI_TYPE_STRUCT;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
cif->flags = FFI_TYPE_INT;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return FFI_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Perform machine dependent cif processing for variadic calls */
|
||||||
|
ffi_status ffi_prep_cif_machdep_var(ffi_cif *cif,
|
||||||
|
unsigned int nfixedargs,
|
||||||
|
unsigned int ntotalargs)
|
||||||
|
{
|
||||||
|
return ffi_prep_cif_machdep(cif);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Prototypes for assembly functions, in sysv.S */
|
||||||
|
extern void ffi_call_SYSV (void (*fn)(void), extended_cif *, unsigned, unsigned, unsigned *);
|
||||||
|
|
||||||
|
void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
|
||||||
|
{
|
||||||
|
extended_cif ecif;
|
||||||
|
|
||||||
|
int small_struct = (cif->flags == FFI_TYPE_INT
|
||||||
|
&& cif->rtype->type == FFI_TYPE_STRUCT);
|
||||||
|
|
||||||
|
ecif.cif = cif;
|
||||||
|
ecif.avalue = avalue;
|
||||||
|
|
||||||
|
unsigned int temp;
|
||||||
|
|
||||||
|
/* 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->flags == FFI_TYPE_STRUCT))
|
||||||
|
{
|
||||||
|
ecif.rvalue = alloca(cif->rtype->size);
|
||||||
|
}
|
||||||
|
else if (small_struct)
|
||||||
|
ecif.rvalue = &temp;
|
||||||
|
else
|
||||||
|
ecif.rvalue = rvalue;
|
||||||
|
|
||||||
|
switch (cif->abi)
|
||||||
|
{
|
||||||
|
case FFI_SYSV:
|
||||||
|
ffi_call_SYSV (fn, &ecif, cif->bytes, cif->flags, ecif.rvalue);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
FFI_ASSERT(0);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (small_struct)
|
||||||
|
#ifdef __CSKYBE__
|
||||||
|
memcpy (rvalue, ((unsigned char *)&temp + (4 - cif->rtype->size)), cif->rtype->size);
|
||||||
|
#else
|
||||||
|
memcpy (rvalue, &temp, cif->rtype->size);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/** private members **/
|
||||||
|
|
||||||
|
static void ffi_prep_incoming_args_SYSV (char *stack, void **ret,
|
||||||
|
void** args, ffi_cif* cif);
|
||||||
|
|
||||||
|
void ffi_closure_SYSV (ffi_closure *);
|
||||||
|
|
||||||
|
/* This function is jumped to by the trampoline */
|
||||||
|
|
||||||
|
unsigned int
|
||||||
|
ffi_closure_SYSV_inner (closure, respp, args)
|
||||||
|
ffi_closure *closure;
|
||||||
|
void **respp;
|
||||||
|
void *args;
|
||||||
|
{
|
||||||
|
// our various things...
|
||||||
|
ffi_cif *cif;
|
||||||
|
void **arg_area;
|
||||||
|
|
||||||
|
cif = closure->cif;
|
||||||
|
arg_area = (void**) alloca (cif->nargs * sizeof (void*));
|
||||||
|
|
||||||
|
/* this call will initialize ARG_AREA, such that each
|
||||||
|
* element in that array points to the corresponding
|
||||||
|
* value on the stack; and if the function returns
|
||||||
|
* a structure, it will re-set RESP to point to the
|
||||||
|
* structure return address. */
|
||||||
|
|
||||||
|
ffi_prep_incoming_args_SYSV(args, respp, arg_area, cif);
|
||||||
|
|
||||||
|
(closure->fun) (cif, *respp, arg_area, closure->user_data);
|
||||||
|
|
||||||
|
#ifdef __CSKYBE__
|
||||||
|
if (cif->flags == FFI_TYPE_INT && cif->rtype->type == FFI_TYPE_STRUCT) {
|
||||||
|
unsigned int tmp = 0;
|
||||||
|
tmp = *(unsigned int *)(*respp);
|
||||||
|
*(unsigned int *)(*respp) = (tmp >> ((4 - cif->rtype->size) * 8));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return cif->flags;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
ffi_prep_incoming_args_SYSV(char *stack, void **rvalue,
|
||||||
|
void **avalue, ffi_cif *cif)
|
||||||
|
{
|
||||||
|
register unsigned int i;
|
||||||
|
register void **p_argv;
|
||||||
|
register char *argp;
|
||||||
|
register ffi_type **p_arg;
|
||||||
|
|
||||||
|
argp = stack;
|
||||||
|
|
||||||
|
if ( cif->flags == FFI_TYPE_STRUCT ) {
|
||||||
|
*rvalue = *(void **) argp;
|
||||||
|
argp += 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
p_argv = avalue;
|
||||||
|
|
||||||
|
for (i = cif->nargs, p_arg = cif->arg_types; (i != 0); i--, p_arg++)
|
||||||
|
{
|
||||||
|
size_t z;
|
||||||
|
size_t alignment;
|
||||||
|
|
||||||
|
alignment = (*p_arg)->alignment;
|
||||||
|
if (alignment < 4)
|
||||||
|
alignment = 4;
|
||||||
|
|
||||||
|
#ifdef __CSKYABIV1__
|
||||||
|
/*
|
||||||
|
* Adapt ABIV1 bug.
|
||||||
|
* If struct's size is larger than 8 bytes, then it always alignment as 4 bytes.
|
||||||
|
*/
|
||||||
|
if (((*p_arg)->type == FFI_TYPE_STRUCT) && ((*p_arg)->size > 8) && (alignment == 8)) {
|
||||||
|
alignment = 4;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Align if necessary */
|
||||||
|
if ((alignment - 1) & (unsigned) argp) {
|
||||||
|
argp = (char *) FFI_ALIGN(argp, alignment);
|
||||||
|
}
|
||||||
|
|
||||||
|
z = (*p_arg)->size;
|
||||||
|
|
||||||
|
#ifdef __CSKYBE__
|
||||||
|
unsigned int tmp = 0;
|
||||||
|
if ((*p_arg)->size < 4) {
|
||||||
|
tmp = *(unsigned int *)argp;
|
||||||
|
memcpy(argp, ((unsigned char *)&tmp + (4 - (*p_arg)->size)), (*p_arg)->size);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
/* because we're little endian, this is what it turns into. */
|
||||||
|
#endif
|
||||||
|
*p_argv = (void*) argp;
|
||||||
|
|
||||||
|
p_argv++;
|
||||||
|
argp += z;
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* How to make a trampoline. */
|
||||||
|
|
||||||
|
extern unsigned char ffi_csky_trampoline[TRAMPOLINE_SIZE];
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Since there is no __clear_cache in libgcc in csky toolchain.
|
||||||
|
* define ffi_csky_cacheflush in sysv.S.
|
||||||
|
* void ffi_csky_cacheflush(uint32 start_addr, uint32 size, int cache)
|
||||||
|
*/
|
||||||
|
#define CACHEFLUSH_IN_FFI 1
|
||||||
|
#if CACHEFLUSH_IN_FFI
|
||||||
|
extern void ffi_csky_cacheflush(unsigned char *__tramp, unsigned int k,
|
||||||
|
int i);
|
||||||
|
#define FFI_INIT_TRAMPOLINE(TRAMP,FUN,CTX) \
|
||||||
|
({ unsigned char *__tramp = (unsigned char*)(TRAMP); \
|
||||||
|
unsigned int __fun = (unsigned int)(FUN); \
|
||||||
|
unsigned int __ctx = (unsigned int)(CTX); \
|
||||||
|
unsigned char *insns = (unsigned char *)(CTX); \
|
||||||
|
memcpy (__tramp, ffi_csky_trampoline, TRAMPOLINE_SIZE); \
|
||||||
|
*(unsigned int*) &__tramp[TRAMPOLINE_SIZE] = __ctx; \
|
||||||
|
*(unsigned int*) &__tramp[TRAMPOLINE_SIZE + 4] = __fun; \
|
||||||
|
ffi_csky_cacheflush(&__tramp[0], TRAMPOLINE_SIZE, 3); /* Clear data mapping. */ \
|
||||||
|
ffi_csky_cacheflush(insns, TRAMPOLINE_SIZE, 3); \
|
||||||
|
/* Clear instruction \
|
||||||
|
mapping. */ \
|
||||||
|
})
|
||||||
|
#else
|
||||||
|
#define FFI_INIT_TRAMPOLINE(TRAMP,FUN,CTX) \
|
||||||
|
({ unsigned char *__tramp = (unsigned char*)(TRAMP); \
|
||||||
|
unsigned int __fun = (unsigned int)(FUN); \
|
||||||
|
unsigned int __ctx = (unsigned int)(CTX); \
|
||||||
|
unsigned char *insns = (unsigned char *)(CTX); \
|
||||||
|
memcpy (__tramp, ffi_csky_trampoline, TRAMPOLINE_SIZE); \
|
||||||
|
*(unsigned int*) &__tramp[TRAMPOLINE_SIZE] = __ctx; \
|
||||||
|
*(unsigned int*) &__tramp[TRAMPOLINE_SIZE + 4] = __fun; \
|
||||||
|
__clear_cache((&__tramp[0]), (&__tramp[TRAMPOLINE_SIZE-1])); /* Clear data mapping. */ \
|
||||||
|
__clear_cache(insns, insns + TRAMPOLINE_SIZE); \
|
||||||
|
/* Clear instruction \
|
||||||
|
mapping. */ \
|
||||||
|
})
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* the cif must already be prep'ed */
|
||||||
|
|
||||||
|
ffi_status
|
||||||
|
ffi_prep_closure_loc (ffi_closure* closure,
|
||||||
|
ffi_cif* cif,
|
||||||
|
void (*fun)(ffi_cif*,void*,void**,void*),
|
||||||
|
void *user_data,
|
||||||
|
void *codeloc)
|
||||||
|
{
|
||||||
|
void (*closure_func)(ffi_closure*) = NULL;
|
||||||
|
|
||||||
|
if (cif->abi == FFI_SYSV)
|
||||||
|
closure_func = &ffi_closure_SYSV;
|
||||||
|
else
|
||||||
|
return FFI_BAD_ABI;
|
||||||
|
|
||||||
|
FFI_INIT_TRAMPOLINE (&closure->tramp[0], \
|
||||||
|
closure_func, \
|
||||||
|
codeloc);
|
||||||
|
|
||||||
|
closure->cif = cif;
|
||||||
|
closure->user_data = user_data;
|
||||||
|
closure->fun = fun;
|
||||||
|
|
||||||
|
return FFI_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
63
src/csky/ffitarget.h
Normal file
63
src/csky/ffitarget.h
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
/* -----------------------------------------------------------------*-C-*-
|
||||||
|
ffitarget.h - Copyright (c) 2012 Anthony Green
|
||||||
|
Copyright (c) 2010 CodeSourcery
|
||||||
|
Copyright (c) 1996-2003 Red Hat, Inc.
|
||||||
|
|
||||||
|
Target configuration macros for CSKY.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
----------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
#ifndef LIBFFI_TARGET_H
|
||||||
|
#define LIBFFI_TARGET_H
|
||||||
|
|
||||||
|
#ifndef LIBFFI_H
|
||||||
|
#error "Please do not include ffitarget.h directly into your source. Use ffi.h instead."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef LIBFFI_ASM
|
||||||
|
typedef unsigned long ffi_arg;
|
||||||
|
typedef signed long ffi_sarg;
|
||||||
|
|
||||||
|
typedef enum ffi_abi {
|
||||||
|
FFI_FIRST_ABI = 0,
|
||||||
|
FFI_SYSV,
|
||||||
|
FFI_LAST_ABI,
|
||||||
|
FFI_DEFAULT_ABI = FFI_SYSV,
|
||||||
|
} ffi_abi;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __CSKYABIV2__
|
||||||
|
#define FFI_ASM_ARGREG_SIZE 16
|
||||||
|
#define TRAMPOLINE_SIZE 16
|
||||||
|
#define FFI_TRAMPOLINE_SIZE 24
|
||||||
|
#else
|
||||||
|
#define FFI_ASM_ARGREG_SIZE 24
|
||||||
|
#define TRAMPOLINE_SIZE 20
|
||||||
|
#define FFI_TRAMPOLINE_SIZE 28
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ---- Definitions for closures ----------------------------------------- */
|
||||||
|
|
||||||
|
#define FFI_CLOSURES 1
|
||||||
|
#define FFI_NATIVE_RAW_API 0
|
||||||
|
#endif
|
||||||
371
src/csky/sysv.S
Normal file
371
src/csky/sysv.S
Normal file
@@ -0,0 +1,371 @@
|
|||||||
|
/* -----------------------------------------------------------------------
|
||||||
|
sysv.S
|
||||||
|
|
||||||
|
CSKY Foreign Function Interface
|
||||||
|
|
||||||
|
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.
|
||||||
|
----------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
#define LIBFFI_ASM
|
||||||
|
#include <fficonfig.h>
|
||||||
|
#include <ffi.h>
|
||||||
|
|
||||||
|
.macro CSKY_FUNC_START name
|
||||||
|
.text
|
||||||
|
.align 2
|
||||||
|
.globl \name
|
||||||
|
.type \name, @function
|
||||||
|
\name:
|
||||||
|
.endm
|
||||||
|
|
||||||
|
#ifdef __CSKYABIV2__
|
||||||
|
|
||||||
|
/*
|
||||||
|
* a0: fn
|
||||||
|
* a1: &ecif
|
||||||
|
* a2: cif->bytes
|
||||||
|
* a3: fig->flags
|
||||||
|
* sp+0: ecif.rvalue
|
||||||
|
*/
|
||||||
|
CSKY_FUNC_START ffi_call_SYSV
|
||||||
|
/* Save registers */
|
||||||
|
.cfi_startproc
|
||||||
|
subi sp, 28
|
||||||
|
.cfi_def_cfa_offset 28
|
||||||
|
stw a0, (sp, 0x0)
|
||||||
|
.cfi_offset 0, -28
|
||||||
|
stw a1, (sp, 0x4)
|
||||||
|
.cfi_offset 1, -24
|
||||||
|
stw a2, (sp, 0x8)
|
||||||
|
.cfi_offset 2, -20
|
||||||
|
stw a3, (sp, 0xC)
|
||||||
|
.cfi_offset 3, -16
|
||||||
|
stw l0, (sp, 0x10)
|
||||||
|
.cfi_offset 4, -12
|
||||||
|
stw l1, (sp, 0x14)
|
||||||
|
.cfi_offset 5, -8
|
||||||
|
stw lr, (sp, 0x18)
|
||||||
|
.cfi_offset 15, -4
|
||||||
|
|
||||||
|
mov l0, sp
|
||||||
|
.cfi_def_cfa_register 4
|
||||||
|
|
||||||
|
/* Make room for all of the new args. */
|
||||||
|
subu sp, sp, a2
|
||||||
|
|
||||||
|
/* Place all of the ffi_prep_args in position */
|
||||||
|
mov a0, sp
|
||||||
|
/* a1 already set */
|
||||||
|
|
||||||
|
/* Call ffi_prep_args(stack, &ecif) */
|
||||||
|
jsri ffi_prep_args
|
||||||
|
|
||||||
|
/* move first 4 parameters in registers */
|
||||||
|
ldw a0, (sp, 0x0)
|
||||||
|
ldw a1, (sp, 0x4)
|
||||||
|
ldw a2, (sp, 0x8)
|
||||||
|
ldw a3, (sp, 0xC)
|
||||||
|
|
||||||
|
/* and adjust stack */
|
||||||
|
subu lr, l0, sp /* cif->bytes == l0 - sp */
|
||||||
|
cmphsi lr, 16
|
||||||
|
movi l1, 16
|
||||||
|
movt lr, l1
|
||||||
|
addu sp, sp, lr
|
||||||
|
|
||||||
|
ldw l1, (l0, 0) /* load fn() in advance */
|
||||||
|
|
||||||
|
/* call (fn) (...) */
|
||||||
|
jsr l1
|
||||||
|
|
||||||
|
/* Remove the space we pushed for the args */
|
||||||
|
mov sp, l0
|
||||||
|
|
||||||
|
/* Load r2 with the pointer to storage for the return value */
|
||||||
|
ldw a2, (sp, 0x1C)
|
||||||
|
|
||||||
|
/* Load r3 with the return type code */
|
||||||
|
ldw a3, (sp, 0xC)
|
||||||
|
|
||||||
|
/* If the return value pointer is NULL, assume no return value. */
|
||||||
|
cmpnei a2, 0
|
||||||
|
bf .Lepilogue
|
||||||
|
|
||||||
|
cmpnei a3, FFI_TYPE_STRUCT
|
||||||
|
bf .Lepilogue
|
||||||
|
|
||||||
|
/* return INT64 */
|
||||||
|
cmpnei a3, FFI_TYPE_SINT64
|
||||||
|
bt .Lretint
|
||||||
|
/* stw a0, (a2, 0x0) at .Lretint */
|
||||||
|
stw a1, (a2, 0x4)
|
||||||
|
|
||||||
|
.Lretint:
|
||||||
|
/* return INT */
|
||||||
|
stw a0, (a2, 0x0)
|
||||||
|
|
||||||
|
.Lepilogue:
|
||||||
|
ldw a0, (sp, 0x0)
|
||||||
|
ldw a1, (sp, 0x4)
|
||||||
|
ldw a2, (sp, 0x8)
|
||||||
|
ldw a3, (sp, 0xC)
|
||||||
|
ldw l0, (sp, 0x10)
|
||||||
|
ldw l1, (sp, 0x14)
|
||||||
|
ldw lr, (sp, 0x18)
|
||||||
|
addi sp, sp, 28
|
||||||
|
rts
|
||||||
|
.cfi_endproc
|
||||||
|
.size ffi_call_SYSV, .-ffi_call_SYSV
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* unsigned int FFI_HIDDEN
|
||||||
|
* ffi_closure_SYSV_inner (closure, respp, args)
|
||||||
|
* ffi_closure *closure;
|
||||||
|
* void **respp;
|
||||||
|
* void *args;
|
||||||
|
*/
|
||||||
|
CSKY_FUNC_START ffi_closure_SYSV
|
||||||
|
.cfi_startproc
|
||||||
|
mov a2, sp
|
||||||
|
addi a1, sp, 16
|
||||||
|
subi sp, sp, 24
|
||||||
|
.cfi_def_cfa_offset 40
|
||||||
|
stw a1, (sp, 0x10)
|
||||||
|
.cfi_offset 1, -24
|
||||||
|
stw lr, (sp, 0x14)
|
||||||
|
.cfi_offset 15, -20
|
||||||
|
stw sp, (sp, 0x8)
|
||||||
|
addi a1, sp, 8
|
||||||
|
jsri ffi_closure_SYSV_inner
|
||||||
|
ldw a0, (sp, 0x0)
|
||||||
|
/*
|
||||||
|
* if FFI_TYPE_SINT64, need a1.
|
||||||
|
* if FFI_TYPE_INT, ignore a1.
|
||||||
|
*/
|
||||||
|
ldw a1, (sp, 0x4)
|
||||||
|
|
||||||
|
ldw lr, (sp, 0x14)
|
||||||
|
addi sp, sp, 40
|
||||||
|
rts
|
||||||
|
.cfi_endproc
|
||||||
|
.size ffi_closure_SYSV, .-ffi_closure_SYSV
|
||||||
|
|
||||||
|
CSKY_FUNC_START ffi_csky_trampoline
|
||||||
|
subi sp, sp, 16
|
||||||
|
stw a0, (sp, 0x0)
|
||||||
|
stw a1, (sp, 0x4)
|
||||||
|
stw a2, (sp, 0x8)
|
||||||
|
stw a3, (sp, 0xC)
|
||||||
|
lrw a0, [.Lctx]
|
||||||
|
lrw a1, [.Lfun]
|
||||||
|
jmp a1
|
||||||
|
.Lctx:
|
||||||
|
mov a0, a0
|
||||||
|
mov a0, a0
|
||||||
|
.Lfun:
|
||||||
|
|
||||||
|
.size ffi_csky_trampoline, .-ffi_csky_trampoline
|
||||||
|
|
||||||
|
CSKY_FUNC_START ffi_csky_cacheflush
|
||||||
|
mov t0, r7
|
||||||
|
movi r7, 123
|
||||||
|
trap 0
|
||||||
|
mov r7, t0
|
||||||
|
rts
|
||||||
|
|
||||||
|
.size ffi_csky_cacheflush, .-ffi_csky_cacheflush
|
||||||
|
|
||||||
|
#else /* !__CSKYABIV2__ */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* a0: fn
|
||||||
|
* a1: &ecif
|
||||||
|
* a2: cif->bytes
|
||||||
|
* a3: fig->flags
|
||||||
|
* a4: ecif.rvalue
|
||||||
|
*/
|
||||||
|
CSKY_FUNC_START ffi_call_SYSV
|
||||||
|
/* Save registers */
|
||||||
|
.cfi_startproc
|
||||||
|
subi sp, 32
|
||||||
|
subi sp, 8
|
||||||
|
.cfi_def_cfa_offset 40
|
||||||
|
stw a0, (sp, 0x0)
|
||||||
|
.cfi_offset 2, -40
|
||||||
|
stw a1, (sp, 0x4)
|
||||||
|
.cfi_offset 3, -36
|
||||||
|
stw a2, (sp, 0x8)
|
||||||
|
.cfi_offset 4, -32
|
||||||
|
stw a3, (sp, 0xC)
|
||||||
|
.cfi_offset 5, -28
|
||||||
|
stw a4, (sp, 0x10)
|
||||||
|
.cfi_offset 6, -24
|
||||||
|
stw a5, (sp, 0x14)
|
||||||
|
.cfi_offset 7, -20
|
||||||
|
stw l0, (sp, 0x18)
|
||||||
|
.cfi_offset 8, -16
|
||||||
|
stw l1, (sp, 0x1C)
|
||||||
|
.cfi_offset 9, -12
|
||||||
|
stw lr, (sp, 0x20)
|
||||||
|
.cfi_offset 15, -8
|
||||||
|
|
||||||
|
mov l0, sp
|
||||||
|
.cfi_def_cfa_register 8
|
||||||
|
|
||||||
|
/* Make room for all of the new args. */
|
||||||
|
subu sp, sp, a2
|
||||||
|
|
||||||
|
/* Place all of the ffi_prep_args in position */
|
||||||
|
mov a0, sp
|
||||||
|
/* a1 already set */
|
||||||
|
|
||||||
|
/* Call ffi_prep_args(stack, &ecif) */
|
||||||
|
jsri ffi_prep_args
|
||||||
|
|
||||||
|
/* move first 4 parameters in registers */
|
||||||
|
ldw a0, (sp, 0x0)
|
||||||
|
ldw a1, (sp, 0x4)
|
||||||
|
ldw a2, (sp, 0x8)
|
||||||
|
ldw a3, (sp, 0xC)
|
||||||
|
ldw a4, (sp, 0x10)
|
||||||
|
ldw a5, (sp, 0x14)
|
||||||
|
|
||||||
|
/* and adjust stack */
|
||||||
|
mov lr, l0
|
||||||
|
subu lr, sp /* cif->bytes == l0 - sp */
|
||||||
|
movi l1, 24
|
||||||
|
cmphs lr, l1
|
||||||
|
movt lr, l1
|
||||||
|
addu sp, sp, lr
|
||||||
|
|
||||||
|
ldw l1, (l0, 0) /* load fn() in advance */
|
||||||
|
|
||||||
|
/* call (fn) (...) */
|
||||||
|
jsr l1
|
||||||
|
|
||||||
|
/* Remove the space we pushed for the args */
|
||||||
|
mov sp, l0
|
||||||
|
|
||||||
|
/* Load r2 with the pointer to storage for the return value */
|
||||||
|
ldw a2, (sp, 0x10)
|
||||||
|
|
||||||
|
/* Load r3 with the return type code */
|
||||||
|
ldw a3, (sp, 0xC)
|
||||||
|
|
||||||
|
/* If the return value pointer is NULL, assume no return value. */
|
||||||
|
cmpnei a2, 0
|
||||||
|
bf .Lepilogue
|
||||||
|
|
||||||
|
cmpnei a3, FFI_TYPE_STRUCT
|
||||||
|
bf .Lepilogue
|
||||||
|
|
||||||
|
/* return INT64 */
|
||||||
|
cmpnei a3, FFI_TYPE_SINT64
|
||||||
|
bt .Lretint
|
||||||
|
/* stw a0, (a2, 0x0) at .Lretint */
|
||||||
|
stw a1, (a2, 0x4)
|
||||||
|
|
||||||
|
.Lretint:
|
||||||
|
/* return INT */
|
||||||
|
stw a0, (a2, 0x0)
|
||||||
|
|
||||||
|
.Lepilogue:
|
||||||
|
ldw a0, (sp, 0x0)
|
||||||
|
ldw a1, (sp, 0x4)
|
||||||
|
ldw a2, (sp, 0x8)
|
||||||
|
ldw a3, (sp, 0xC)
|
||||||
|
ldw a4, (sp, 0x10)
|
||||||
|
ldw a5, (sp, 0x14)
|
||||||
|
ldw l0, (sp, 0x18)
|
||||||
|
ldw l1, (sp, 0x1C)
|
||||||
|
ldw lr, (sp, 0x20)
|
||||||
|
addi sp, sp, 32
|
||||||
|
addi sp, sp, 8
|
||||||
|
rts
|
||||||
|
.cfi_endproc
|
||||||
|
|
||||||
|
.size ffi_call_SYSV, .-ffi_call_SYSV
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* unsigned int FFI_HIDDEN
|
||||||
|
* ffi_closure_SYSV_inner (closure, respp, args)
|
||||||
|
* ffi_closure *closure;
|
||||||
|
* void **respp;
|
||||||
|
* void *args;
|
||||||
|
*/
|
||||||
|
CSKY_FUNC_START ffi_closure_SYSV
|
||||||
|
.cfi_startproc
|
||||||
|
mov a2, sp
|
||||||
|
mov a1, sp
|
||||||
|
addi a1, 24
|
||||||
|
subi sp, sp, 24
|
||||||
|
.cfi_def_cfa_offset 48
|
||||||
|
stw a1, (sp, 0x10)
|
||||||
|
.cfi_offset 3, -32
|
||||||
|
stw lr, (sp, 0x14)
|
||||||
|
.cfi_offset 15, -28
|
||||||
|
stw sp, (sp, 0x8)
|
||||||
|
mov a1, sp
|
||||||
|
addi a1, 8
|
||||||
|
jsri ffi_closure_SYSV_inner
|
||||||
|
ldw a0, (sp, 0x0)
|
||||||
|
/*
|
||||||
|
* if FFI_TYPE_SINT64, need a1.
|
||||||
|
* if FFI_TYPE_INT, ignore a1.
|
||||||
|
*/
|
||||||
|
ldw a1, (sp, 0x4)
|
||||||
|
|
||||||
|
ldw lr, (sp, 0x14)
|
||||||
|
addi sp, sp, 24
|
||||||
|
addi sp, sp, 24
|
||||||
|
rts
|
||||||
|
.cfi_endproc
|
||||||
|
|
||||||
|
.size ffi_closure_SYSV, .-ffi_closure_SYSV
|
||||||
|
|
||||||
|
CSKY_FUNC_START ffi_csky_trampoline
|
||||||
|
subi sp, 24
|
||||||
|
stw a0, (sp, 0x0)
|
||||||
|
stw a1, (sp, 0x4)
|
||||||
|
stw a2, (sp, 0x8)
|
||||||
|
stw a3, (sp, 0xC)
|
||||||
|
stw a4, (sp, 0x10)
|
||||||
|
stw a5, (sp, 0x14)
|
||||||
|
lrw a0, [.Lctx]
|
||||||
|
lrw a1, [.Lfun]
|
||||||
|
jmp a1
|
||||||
|
.Lctx:
|
||||||
|
mov a0, a0
|
||||||
|
mov a0, a0
|
||||||
|
.Lfun:
|
||||||
|
|
||||||
|
.size ffi_csky_trampoline, .-ffi_csky_trampoline
|
||||||
|
|
||||||
|
CSKY_FUNC_START ffi_csky_cacheflush
|
||||||
|
lrw r1, 123
|
||||||
|
trap 0
|
||||||
|
rts
|
||||||
|
|
||||||
|
.size ffi_csky_cacheflush, .-ffi_csky_cacheflush
|
||||||
|
|
||||||
|
#endif /* __CSKYABIV2__ */
|
||||||
@@ -2371,7 +2371,7 @@ static size_t traverse_and_check(mstate m);
|
|||||||
|
|
||||||
#else /* GNUC */
|
#else /* GNUC */
|
||||||
#if USE_BUILTIN_FFS
|
#if USE_BUILTIN_FFS
|
||||||
#define compute_bit2idx(X, I) I = ffs(X)-1
|
#define compute_bit2idx(X, I) I = __builtin_ffs(X)-1
|
||||||
|
|
||||||
#else /* USE_BUILTIN_FFS */
|
#else /* USE_BUILTIN_FFS */
|
||||||
#define compute_bit2idx(X, I)\
|
#define compute_bit2idx(X, I)\
|
||||||
|
|||||||
273
src/kvx/ffi.c
Normal file
273
src/kvx/ffi.c
Normal file
@@ -0,0 +1,273 @@
|
|||||||
|
/* Copyright (c) 2020 Kalray
|
||||||
|
|
||||||
|
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. */
|
||||||
|
|
||||||
|
#if defined(__kvx__)
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <fficonfig.h>
|
||||||
|
#include <ffi.h>
|
||||||
|
#include "ffi_common.h"
|
||||||
|
#include "asm.h"
|
||||||
|
|
||||||
|
#define ALIGN(x, a) ALIGN_MASK(x, (typeof(x))(a) - 1)
|
||||||
|
#define ALIGN_MASK(x, mask) (((x) + (mask)) & ~(mask))
|
||||||
|
#define KVX_ABI_STACK_ALIGNMENT (32)
|
||||||
|
#define KVX_ABI_STACK_ARG_ALIGNMENT (8)
|
||||||
|
#define max(a,b) ((a) > (b) ? (a) : (b))
|
||||||
|
|
||||||
|
#ifdef FFI_DEBUG
|
||||||
|
#define DEBUG_PRINT(...) do{ fprintf( stderr, __VA_ARGS__ ); } while(0)
|
||||||
|
#else
|
||||||
|
#define DEBUG_PRINT(...)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
struct ret_value {
|
||||||
|
unsigned long int r0;
|
||||||
|
unsigned long int r1;
|
||||||
|
unsigned long int r2;
|
||||||
|
unsigned long int r3;
|
||||||
|
};
|
||||||
|
|
||||||
|
extern struct ret_value ffi_call_SYSV(unsigned total_size,
|
||||||
|
unsigned size,
|
||||||
|
extended_cif *ecif,
|
||||||
|
unsigned *rvalue_addr,
|
||||||
|
void *fn,
|
||||||
|
unsigned int_ext_method);
|
||||||
|
|
||||||
|
/* Perform machine dependent cif processing */
|
||||||
|
ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
|
||||||
|
{
|
||||||
|
cif->flags = cif->rtype->size;
|
||||||
|
return FFI_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ffi_prep_args is called by the assembly routine once stack space
|
||||||
|
has been allocated for the function's arguments */
|
||||||
|
|
||||||
|
void *ffi_prep_args(char *stack, unsigned int arg_slots_size, extended_cif *ecif)
|
||||||
|
{
|
||||||
|
char *stacktemp = stack;
|
||||||
|
char *current_arg_passed_by_value = stack + arg_slots_size;
|
||||||
|
int i, s;
|
||||||
|
ffi_type **arg;
|
||||||
|
int count = 0;
|
||||||
|
ffi_cif *cif = ecif->cif;
|
||||||
|
void **argv = ecif->avalue;
|
||||||
|
|
||||||
|
arg = cif->arg_types;
|
||||||
|
|
||||||
|
DEBUG_PRINT("stack: %p\n", stack);
|
||||||
|
DEBUG_PRINT("arg_slots_size: %u\n", arg_slots_size);
|
||||||
|
DEBUG_PRINT("current_arg_passed_by_value: %p\n", current_arg_passed_by_value);
|
||||||
|
DEBUG_PRINT("ecif: %p\n", ecif);
|
||||||
|
DEBUG_PRINT("ecif->avalue: %p\n", ecif->avalue);
|
||||||
|
|
||||||
|
for (i = 0; i < cif->nargs; i++) {
|
||||||
|
|
||||||
|
s = KVX_ABI_SLOT_SIZE;
|
||||||
|
switch((*arg)->type) {
|
||||||
|
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_FLOAT:
|
||||||
|
case FFI_TYPE_DOUBLE:
|
||||||
|
case FFI_TYPE_UINT64:
|
||||||
|
case FFI_TYPE_SINT64:
|
||||||
|
case FFI_TYPE_POINTER:
|
||||||
|
DEBUG_PRINT("INT64/32/16/8/FLOAT/DOUBLE or POINTER @%p\n", stack);
|
||||||
|
*(uint64_t *) stack = *(uint64_t *)(* argv);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case FFI_TYPE_COMPLEX:
|
||||||
|
if ((*arg)->size == 8)
|
||||||
|
*(_Complex float *) stack = *(_Complex float *)(* argv);
|
||||||
|
else if ((*arg)->size == 16) {
|
||||||
|
*(_Complex double *) stack = *(_Complex double *)(* argv);
|
||||||
|
s = 16;
|
||||||
|
} else
|
||||||
|
abort();
|
||||||
|
break;
|
||||||
|
case FFI_TYPE_STRUCT: {
|
||||||
|
char *value;
|
||||||
|
unsigned int written_size = 0;
|
||||||
|
DEBUG_PRINT("struct by value @%p\n", stack);
|
||||||
|
if ((*arg)->size > KVX_ABI_MAX_AGGREGATE_IN_REG_SIZE) {
|
||||||
|
DEBUG_PRINT("big struct\n");
|
||||||
|
*(uint64_t *) stack = (uintptr_t)current_arg_passed_by_value;
|
||||||
|
value = current_arg_passed_by_value;
|
||||||
|
current_arg_passed_by_value += (*arg)->size;
|
||||||
|
written_size = KVX_ABI_SLOT_SIZE;
|
||||||
|
} else {
|
||||||
|
value = stack;
|
||||||
|
written_size = (*arg)->size;
|
||||||
|
}
|
||||||
|
memcpy(value, *argv, (*arg)->size);
|
||||||
|
s = ALIGN(written_size, KVX_ABI_STACK_ARG_ALIGNMENT);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
printf("Error: unsupported arg type %d\n", (*arg)->type);
|
||||||
|
abort();
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
stack += s;
|
||||||
|
count += s;
|
||||||
|
argv++;
|
||||||
|
arg++;
|
||||||
|
}
|
||||||
|
#ifdef FFI_DEBUG
|
||||||
|
FFI_ASSERT(((intptr_t)(stacktemp + REG_ARGS_SIZE) & (KVX_ABI_STACK_ALIGNMENT-1)) == 0);
|
||||||
|
#endif
|
||||||
|
return stacktemp + REG_ARGS_SIZE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Perform machine dependent cif processing when we have a variadic function */
|
||||||
|
|
||||||
|
ffi_status ffi_prep_cif_machdep_var(ffi_cif *cif, unsigned int nfixedargs,
|
||||||
|
unsigned int ntotalargs)
|
||||||
|
{
|
||||||
|
cif->flags = cif->rtype->size;
|
||||||
|
return FFI_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
static unsigned long handle_small_int_ext(kvx_intext_method *int_ext_method,
|
||||||
|
const ffi_type *rtype)
|
||||||
|
{
|
||||||
|
switch (rtype->type) {
|
||||||
|
case FFI_TYPE_SINT8:
|
||||||
|
*int_ext_method = KVX_RET_SXBD;
|
||||||
|
return KVX_REGISTER_SIZE;
|
||||||
|
|
||||||
|
case FFI_TYPE_SINT16:
|
||||||
|
*int_ext_method = KVX_RET_SXHD;
|
||||||
|
return KVX_REGISTER_SIZE;
|
||||||
|
|
||||||
|
case FFI_TYPE_SINT32:
|
||||||
|
*int_ext_method = KVX_RET_SXWD;
|
||||||
|
return KVX_REGISTER_SIZE;
|
||||||
|
|
||||||
|
case FFI_TYPE_UINT8:
|
||||||
|
*int_ext_method = KVX_RET_ZXBD;
|
||||||
|
return KVX_REGISTER_SIZE;
|
||||||
|
|
||||||
|
case FFI_TYPE_UINT16:
|
||||||
|
*int_ext_method = KVX_RET_ZXHD;
|
||||||
|
return KVX_REGISTER_SIZE;
|
||||||
|
|
||||||
|
case FFI_TYPE_UINT32:
|
||||||
|
*int_ext_method = KVX_RET_ZXWD;
|
||||||
|
return KVX_REGISTER_SIZE;
|
||||||
|
|
||||||
|
default:
|
||||||
|
*int_ext_method = KVX_RET_NONE;
|
||||||
|
return rtype->size;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
unsigned long int slot_fitting_args_size = 0;
|
||||||
|
unsigned long int total_size = 0;
|
||||||
|
unsigned long int big_struct_size = 0;
|
||||||
|
kvx_intext_method int_extension_method;
|
||||||
|
ffi_type **arg;
|
||||||
|
struct ret_value local_rvalue = {0};
|
||||||
|
size_t wb_size;
|
||||||
|
|
||||||
|
|
||||||
|
/* Calculate size to allocate on stack */
|
||||||
|
for (i = 0, arg = cif->arg_types; i < cif->nargs; i++, arg++) {
|
||||||
|
DEBUG_PRINT("argument %d, type %d, size %lu\n", i, (*arg)->type, (*arg)->size);
|
||||||
|
if (((*arg)->type == FFI_TYPE_STRUCT) || ((*arg)->type == FFI_TYPE_COMPLEX)) {
|
||||||
|
if ((*arg)->size <= KVX_ABI_MAX_AGGREGATE_IN_REG_SIZE) {
|
||||||
|
slot_fitting_args_size += ALIGN((*arg)->size, KVX_ABI_SLOT_SIZE);
|
||||||
|
} else {
|
||||||
|
slot_fitting_args_size += KVX_ABI_SLOT_SIZE; /* aggregate passed by reference */
|
||||||
|
big_struct_size += ALIGN((*arg)->size, KVX_ABI_SLOT_SIZE);
|
||||||
|
}
|
||||||
|
} else if ((*arg)->size <= KVX_ABI_SLOT_SIZE) {
|
||||||
|
slot_fitting_args_size += KVX_ABI_SLOT_SIZE;
|
||||||
|
} else {
|
||||||
|
printf("Error: unsupported arg size %ld arg type %d\n", (*arg)->size, (*arg)->type);
|
||||||
|
abort(); /* should never happen? */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extended_cif ecif;
|
||||||
|
ecif.cif = cif;
|
||||||
|
ecif.avalue = avalue;
|
||||||
|
ecif.rvalue = rvalue;
|
||||||
|
|
||||||
|
/* This implementation allocates anyway for all register based args */
|
||||||
|
slot_fitting_args_size = max(slot_fitting_args_size, REG_ARGS_SIZE);
|
||||||
|
total_size = slot_fitting_args_size + big_struct_size;
|
||||||
|
total_size = ALIGN(total_size, KVX_ABI_STACK_ALIGNMENT);
|
||||||
|
|
||||||
|
/* wb_size: write back size, the size we will need to write back to user
|
||||||
|
* provided buffer. In theory it should always be cif->flags which is
|
||||||
|
* cif->rtype->size. But libffi API mandates that for integral types
|
||||||
|
* of size <= system register size, then we *MUST* write back
|
||||||
|
* the size of system register size.
|
||||||
|
* in our case, if size <= 8 bytes we must write back 8 bytes.
|
||||||
|
* floats, complex and structs are not affected, only integrals.
|
||||||
|
*/
|
||||||
|
wb_size = handle_small_int_ext(&int_extension_method, cif->rtype);
|
||||||
|
|
||||||
|
switch (cif->abi) {
|
||||||
|
case FFI_SYSV:
|
||||||
|
DEBUG_PRINT("total_size: %lu\n", total_size);
|
||||||
|
DEBUG_PRINT("slot fitting args size: %lu\n", slot_fitting_args_size);
|
||||||
|
DEBUG_PRINT("rvalue: %p\n", rvalue);
|
||||||
|
DEBUG_PRINT("fn: %p\n", fn);
|
||||||
|
DEBUG_PRINT("rsize: %u\n", cif->flags);
|
||||||
|
DEBUG_PRINT("wb_size: %u\n", wb_size);
|
||||||
|
DEBUG_PRINT("int_extension_method: %u\n", int_extension_method);
|
||||||
|
local_rvalue = ffi_call_SYSV(total_size, slot_fitting_args_size,
|
||||||
|
&ecif, rvalue, fn, int_extension_method);
|
||||||
|
if ((cif->flags <= KVX_ABI_MAX_AGGREGATE_IN_REG_SIZE)
|
||||||
|
&& (cif->rtype->type != FFI_TYPE_VOID))
|
||||||
|
memcpy(rvalue, &local_rvalue, wb_size);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
abort();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Closures not supported yet */
|
||||||
|
ffi_status
|
||||||
|
ffi_prep_closure_loc (ffi_closure* closure,
|
||||||
|
ffi_cif* cif,
|
||||||
|
void (*fun)(ffi_cif*,void*,void**,void*),
|
||||||
|
void *user_data,
|
||||||
|
void *codeloc)
|
||||||
|
{
|
||||||
|
return FFI_BAD_ABI;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* (__kvx__) */
|
||||||
75
src/kvx/ffitarget.h
Normal file
75
src/kvx/ffitarget.h
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
/* -----------------------------------------------------------------------
|
||||||
|
ffitarget.h - Copyright (c) 2020 Kalray
|
||||||
|
|
||||||
|
KVX Target configuration macros
|
||||||
|
|
||||||
|
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.
|
||||||
|
----------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
#ifndef LIBFFI_TARGET_H
|
||||||
|
#define LIBFFI_TARGET_H
|
||||||
|
|
||||||
|
#ifndef LIBFFI_H
|
||||||
|
#error "Please do not include ffitarget.h directly into your source. Use ffi.h instead."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ---- System specific configurations ----------------------------------- */
|
||||||
|
|
||||||
|
#ifndef LIBFFI_ASM
|
||||||
|
typedef unsigned long ffi_arg;
|
||||||
|
typedef signed long ffi_sarg;
|
||||||
|
|
||||||
|
typedef enum ffi_abi {
|
||||||
|
FFI_FIRST_ABI = 0,
|
||||||
|
FFI_SYSV,
|
||||||
|
FFI_LAST_ABI,
|
||||||
|
FFI_DEFAULT_ABI = FFI_SYSV
|
||||||
|
} ffi_abi;
|
||||||
|
|
||||||
|
/* Those values are set depending on return type
|
||||||
|
* they are used in the assembly code in sysv.S
|
||||||
|
*/
|
||||||
|
typedef enum kvx_intext_method {
|
||||||
|
KVX_RET_NONE = 0,
|
||||||
|
KVX_RET_SXBD = 1,
|
||||||
|
KVX_RET_SXHD = 2,
|
||||||
|
KVX_RET_SXWD = 3,
|
||||||
|
KVX_RET_ZXBD = 4,
|
||||||
|
KVX_RET_ZXHD = 5,
|
||||||
|
KVX_RET_ZXWD = 6
|
||||||
|
} kvx_intext_method;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ---- Definitions for closures ----------------------------------------- */
|
||||||
|
|
||||||
|
/* This is only to allow Python to compile
|
||||||
|
* but closures are not supported yet
|
||||||
|
*/
|
||||||
|
#define FFI_CLOSURES 1
|
||||||
|
#define FFI_TRAMPOLINE_SIZE 0
|
||||||
|
|
||||||
|
#define FFI_NATIVE_RAW_API 0
|
||||||
|
#define FFI_TARGET_SPECIFIC_VARIADIC 1
|
||||||
|
#define FFI_TARGET_HAS_COMPLEX_TYPE
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
127
src/kvx/sysv.S
Normal file
127
src/kvx/sysv.S
Normal file
@@ -0,0 +1,127 @@
|
|||||||
|
/* Copyright (c) 2020 Kalray
|
||||||
|
|
||||||
|
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. */
|
||||||
|
|
||||||
|
#if defined(__kvx__)
|
||||||
|
#define LIBFFI_ASM
|
||||||
|
#include <fficonfig.h>
|
||||||
|
#include <ffi.h>
|
||||||
|
#include <ffi_cfi.h>
|
||||||
|
#include <kvx/asm.h>
|
||||||
|
|
||||||
|
.text
|
||||||
|
.global ffi_call_SYSV
|
||||||
|
.type ffi_call_SYSV, @function
|
||||||
|
.type ffi_prep_args, @function
|
||||||
|
.align 8
|
||||||
|
|
||||||
|
/* ffi_call_SYSV
|
||||||
|
|
||||||
|
r0: total size to allocate on stack
|
||||||
|
r1: size of arg slots
|
||||||
|
r2: extended cif structure, DO NOT REMOVE: it is used by ffi_prep_args()
|
||||||
|
r3: return value address
|
||||||
|
r4: function to call
|
||||||
|
r5: integer sign extension method to be used
|
||||||
|
*/
|
||||||
|
ffi_call_SYSV:
|
||||||
|
addd $r12 = $r12, -64
|
||||||
|
so (-32)[$r12] = $r20r21r22r23
|
||||||
|
;;
|
||||||
|
sd (0)[$r12] = $r24
|
||||||
|
;;
|
||||||
|
get $r23 = $ra
|
||||||
|
copyd $r20 = $r12
|
||||||
|
sbfd $r12 = $r0, $r12
|
||||||
|
;;
|
||||||
|
copyd $r0 = $r12
|
||||||
|
copyd $r21 = $r3
|
||||||
|
copyd $r22 = $r4
|
||||||
|
copyd $r24 = $r5
|
||||||
|
call ffi_prep_args
|
||||||
|
;;
|
||||||
|
lo $r8r9r10r11 = (64)[$r12]
|
||||||
|
;;
|
||||||
|
lo $r4r5r6r7 = (32)[$r12]
|
||||||
|
;;
|
||||||
|
lo $r0r1r2r3 = (0)[$r12]
|
||||||
|
copyd $r12 = $r0
|
||||||
|
/* $r15 is the register used by the ABI to return big (>32 bytes)
|
||||||
|
* structs by value.
|
||||||
|
* It is also referred to as the "struct register" in the ABI.
|
||||||
|
*/
|
||||||
|
copyd $r15 = $r21
|
||||||
|
icall $r22
|
||||||
|
;;
|
||||||
|
pcrel $r4 = @pcrel(.Ltable)
|
||||||
|
cb.deqz $r24 ? .Lend
|
||||||
|
;;
|
||||||
|
addx8d $r24 = $r24, $r4
|
||||||
|
;;
|
||||||
|
igoto $r24
|
||||||
|
;;
|
||||||
|
.Ltable:
|
||||||
|
0: /* we should never arrive here */
|
||||||
|
goto .Lerror
|
||||||
|
nop
|
||||||
|
;;
|
||||||
|
1: /* Sign extend byte to double */
|
||||||
|
sxbd $r0 = $r0
|
||||||
|
goto .Lend
|
||||||
|
;;
|
||||||
|
2: /* Sign extend half to double */
|
||||||
|
sxhd $r0 = $r0
|
||||||
|
goto .Lend
|
||||||
|
;;
|
||||||
|
3: /* Sign extend word to double */
|
||||||
|
sxwd $r0 = $r0
|
||||||
|
goto .Lend
|
||||||
|
;;
|
||||||
|
4: /* Zero extend byte to double */
|
||||||
|
zxbd $r0 = $r0
|
||||||
|
goto .Lend
|
||||||
|
;;
|
||||||
|
5: /* Zero extend half to double */
|
||||||
|
zxhd $r0 = $r0
|
||||||
|
goto .Lend
|
||||||
|
;;
|
||||||
|
6: /* Zero extend word to double */
|
||||||
|
zxwd $r0 = $r0
|
||||||
|
/* Fallthrough to .Lend */
|
||||||
|
;;
|
||||||
|
.Lend:
|
||||||
|
ld $r24 = (0)[$r12]
|
||||||
|
;;
|
||||||
|
set $ra = $r23
|
||||||
|
lo $r20r21r22r23 = (32)[$r20]
|
||||||
|
addd $r12 = $r20, 64
|
||||||
|
;;
|
||||||
|
ret
|
||||||
|
;;
|
||||||
|
.Lerror:
|
||||||
|
errop
|
||||||
|
;;
|
||||||
|
|
||||||
|
#endif /* __kvx__ */
|
||||||
|
|
||||||
|
#if defined __ELF__ && defined __linux__
|
||||||
|
.section .note.GNU-stack,"",%progbits
|
||||||
|
#endif
|
||||||
|
|
||||||
@@ -39,7 +39,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef USE__BUILTIN___CLEAR_CACHE
|
#ifndef USE__BUILTIN___CLEAR_CACHE
|
||||||
# if defined(__OpenBSD__)
|
# if defined(__FreeBSD__)
|
||||||
|
# include <machine/sysarch.h>
|
||||||
|
# elif defined(__OpenBSD__)
|
||||||
# include <mips64/sysarch.h>
|
# include <mips64/sysarch.h>
|
||||||
# else
|
# else
|
||||||
# include <sys/cachectl.h>
|
# include <sys/cachectl.h>
|
||||||
@@ -777,11 +779,13 @@ ffi_prep_closure_loc (ffi_closure *closure,
|
|||||||
closure->fun = fun;
|
closure->fun = fun;
|
||||||
closure->user_data = user_data;
|
closure->user_data = user_data;
|
||||||
|
|
||||||
|
#if !defined(__FreeBSD__)
|
||||||
#ifdef USE__BUILTIN___CLEAR_CACHE
|
#ifdef USE__BUILTIN___CLEAR_CACHE
|
||||||
__builtin___clear_cache(clear_location, clear_location + FFI_TRAMPOLINE_SIZE);
|
__builtin___clear_cache(clear_location, clear_location + FFI_TRAMPOLINE_SIZE);
|
||||||
#else
|
#else
|
||||||
cacheflush (clear_location, FFI_TRAMPOLINE_SIZE, ICACHE);
|
cacheflush (clear_location, FFI_TRAMPOLINE_SIZE, ICACHE);
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* ! __FreeBSD__ */
|
||||||
return FFI_OK;
|
return FFI_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
#define _MIPS_SIM_ABI32 1
|
#define _MIPS_SIM_ABI32 1
|
||||||
#define _MIPS_SIM_NABI32 2
|
#define _MIPS_SIM_NABI32 2
|
||||||
#define _MIPS_SIM_ABI64 3
|
#define _MIPS_SIM_ABI64 3
|
||||||
#elif !defined(__OpenBSD__)
|
#elif !defined(__OpenBSD__) && !defined(__FreeBSD__)
|
||||||
# include <sgidefs.h>
|
# include <sgidefs.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -582,7 +582,7 @@ cls_epilogue:
|
|||||||
.end ffi_closure_N32
|
.end ffi_closure_N32
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
.section .eh_frame,"aw",@progbits
|
.section .eh_frame,EH_FRAME_FLAGS,@progbits
|
||||||
.Lframe1:
|
.Lframe1:
|
||||||
.4byte .LECIE1-.LSCIE1 # length
|
.4byte .LECIE1-.LSCIE1 # length
|
||||||
.LSCIE1:
|
.LSCIE1:
|
||||||
|
|||||||
@@ -282,9 +282,11 @@ $LCFI12:
|
|||||||
li $13, 1 # FFI_O32
|
li $13, 1 # FFI_O32
|
||||||
bne $16, $13, 1f # Skip fp save if FFI_O32_SOFT_FLOAT
|
bne $16, $13, 1f # Skip fp save if FFI_O32_SOFT_FLOAT
|
||||||
|
|
||||||
|
#ifndef __mips_soft_float
|
||||||
# Store all possible float/double registers.
|
# Store all possible float/double registers.
|
||||||
s.d $f12, FA_0_0_OFF2($fp)
|
s.d $f12, FA_0_0_OFF2($fp)
|
||||||
s.d $f14, FA_1_0_OFF2($fp)
|
s.d $f14, FA_1_0_OFF2($fp)
|
||||||
|
#endif
|
||||||
1:
|
1:
|
||||||
# prepare arguments for ffi_closure_mips_inner_O32
|
# prepare arguments for ffi_closure_mips_inner_O32
|
||||||
REG_L a0, 4($15) # cif
|
REG_L a0, 4($15) # cif
|
||||||
|
|||||||
137
src/pa/ffi.c
137
src/pa/ffi.c
@@ -421,12 +421,15 @@ ffi_status ffi_closure_inner_pa32(ffi_closure *closure, UINT32 *stack)
|
|||||||
ffi_cif *cif;
|
ffi_cif *cif;
|
||||||
void **avalue;
|
void **avalue;
|
||||||
void *rvalue;
|
void *rvalue;
|
||||||
UINT32 ret[2]; /* function can return up to 64-bits in registers */
|
/* Functions can return up to 64-bits in registers. Return address
|
||||||
|
must be double word aligned. */
|
||||||
|
union { double rd; UINT32 ret[2]; } u;
|
||||||
ffi_type **p_arg;
|
ffi_type **p_arg;
|
||||||
char *tmp;
|
char *tmp;
|
||||||
int i, avn;
|
int i, avn;
|
||||||
unsigned int slot = FIRST_ARG_SLOT;
|
unsigned int slot = FIRST_ARG_SLOT;
|
||||||
register UINT32 r28 asm("r28");
|
register UINT32 r28 asm("r28");
|
||||||
|
ffi_closure *c = (ffi_closure *)FFI_RESTORE_PTR (closure);
|
||||||
|
|
||||||
cif = closure->cif;
|
cif = closure->cif;
|
||||||
|
|
||||||
@@ -434,7 +437,7 @@ ffi_status ffi_closure_inner_pa32(ffi_closure *closure, UINT32 *stack)
|
|||||||
if (cif->flags == FFI_TYPE_STRUCT)
|
if (cif->flags == FFI_TYPE_STRUCT)
|
||||||
rvalue = (void *)r28;
|
rvalue = (void *)r28;
|
||||||
else
|
else
|
||||||
rvalue = &ret[0];
|
rvalue = &u;
|
||||||
|
|
||||||
avalue = (void **)alloca(cif->nargs * FFI_SIZEOF_ARG);
|
avalue = (void **)alloca(cif->nargs * FFI_SIZEOF_ARG);
|
||||||
avn = cif->nargs;
|
avn = cif->nargs;
|
||||||
@@ -529,35 +532,35 @@ ffi_status ffi_closure_inner_pa32(ffi_closure *closure, UINT32 *stack)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Invoke the closure. */
|
/* Invoke the closure. */
|
||||||
(closure->fun) (cif, rvalue, avalue, closure->user_data);
|
(c->fun) (cif, rvalue, avalue, c->user_data);
|
||||||
|
|
||||||
debug(3, "after calling function, ret[0] = %08x, ret[1] = %08x\n", ret[0],
|
debug(3, "after calling function, ret[0] = %08x, ret[1] = %08x\n", u.ret[0],
|
||||||
ret[1]);
|
u.ret[1]);
|
||||||
|
|
||||||
/* Store the result using the lower 2 bytes of the flags. */
|
/* Store the result using the lower 2 bytes of the flags. */
|
||||||
switch (cif->flags)
|
switch (cif->flags)
|
||||||
{
|
{
|
||||||
case FFI_TYPE_UINT8:
|
case FFI_TYPE_UINT8:
|
||||||
*(stack - FIRST_ARG_SLOT) = (UINT8)(ret[0] >> 24);
|
*(stack - FIRST_ARG_SLOT) = (UINT8)(u.ret[0] >> 24);
|
||||||
break;
|
break;
|
||||||
case FFI_TYPE_SINT8:
|
case FFI_TYPE_SINT8:
|
||||||
*(stack - FIRST_ARG_SLOT) = (SINT8)(ret[0] >> 24);
|
*(stack - FIRST_ARG_SLOT) = (SINT8)(u.ret[0] >> 24);
|
||||||
break;
|
break;
|
||||||
case FFI_TYPE_UINT16:
|
case FFI_TYPE_UINT16:
|
||||||
*(stack - FIRST_ARG_SLOT) = (UINT16)(ret[0] >> 16);
|
*(stack - FIRST_ARG_SLOT) = (UINT16)(u.ret[0] >> 16);
|
||||||
break;
|
break;
|
||||||
case FFI_TYPE_SINT16:
|
case FFI_TYPE_SINT16:
|
||||||
*(stack - FIRST_ARG_SLOT) = (SINT16)(ret[0] >> 16);
|
*(stack - FIRST_ARG_SLOT) = (SINT16)(u.ret[0] >> 16);
|
||||||
break;
|
break;
|
||||||
case FFI_TYPE_INT:
|
case FFI_TYPE_INT:
|
||||||
case FFI_TYPE_SINT32:
|
case FFI_TYPE_SINT32:
|
||||||
case FFI_TYPE_UINT32:
|
case FFI_TYPE_UINT32:
|
||||||
*(stack - FIRST_ARG_SLOT) = ret[0];
|
*(stack - FIRST_ARG_SLOT) = u.ret[0];
|
||||||
break;
|
break;
|
||||||
case FFI_TYPE_SINT64:
|
case FFI_TYPE_SINT64:
|
||||||
case FFI_TYPE_UINT64:
|
case FFI_TYPE_UINT64:
|
||||||
*(stack - FIRST_ARG_SLOT) = ret[0];
|
*(stack - FIRST_ARG_SLOT) = u.ret[0];
|
||||||
*(stack - FIRST_ARG_SLOT - 1) = ret[1];
|
*(stack - FIRST_ARG_SLOT - 1) = u.ret[1];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FFI_TYPE_DOUBLE:
|
case FFI_TYPE_DOUBLE:
|
||||||
@@ -577,7 +580,7 @@ ffi_status ffi_closure_inner_pa32(ffi_closure *closure, UINT32 *stack)
|
|||||||
case FFI_TYPE_SMALL_STRUCT4:
|
case FFI_TYPE_SMALL_STRUCT4:
|
||||||
tmp = (void*)(stack - FIRST_ARG_SLOT);
|
tmp = (void*)(stack - FIRST_ARG_SLOT);
|
||||||
tmp += 4 - cif->rtype->size;
|
tmp += 4 - cif->rtype->size;
|
||||||
memcpy((void*)tmp, &ret[0], cif->rtype->size);
|
memcpy((void*)tmp, &u, cif->rtype->size);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FFI_TYPE_SMALL_STRUCT5:
|
case FFI_TYPE_SMALL_STRUCT5:
|
||||||
@@ -598,7 +601,7 @@ ffi_status ffi_closure_inner_pa32(ffi_closure *closure, UINT32 *stack)
|
|||||||
}
|
}
|
||||||
|
|
||||||
memset (ret2, 0, sizeof (ret2));
|
memset (ret2, 0, sizeof (ret2));
|
||||||
memcpy ((char *)ret2 + off, ret, 8 - off);
|
memcpy ((char *)ret2 + off, &u, 8 - off);
|
||||||
|
|
||||||
*(stack - FIRST_ARG_SLOT) = ret2[0];
|
*(stack - FIRST_ARG_SLOT) = ret2[0];
|
||||||
*(stack - FIRST_ARG_SLOT - 1) = ret2[1];
|
*(stack - FIRST_ARG_SLOT - 1) = ret2[1];
|
||||||
@@ -630,89 +633,41 @@ ffi_prep_closure_loc (ffi_closure* closure,
|
|||||||
void *user_data,
|
void *user_data,
|
||||||
void *codeloc)
|
void *codeloc)
|
||||||
{
|
{
|
||||||
UINT32 *tramp = (UINT32 *)(closure->tramp);
|
ffi_closure *c = (ffi_closure *)FFI_RESTORE_PTR (closure);
|
||||||
#ifdef PA_HPUX
|
|
||||||
UINT32 *tmp;
|
/* The layout of a function descriptor. A function pointer with the PLABEL
|
||||||
#endif
|
bit set points to a function descriptor. */
|
||||||
|
struct pa32_fd
|
||||||
|
{
|
||||||
|
UINT32 code_pointer;
|
||||||
|
UINT32 gp;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct ffi_pa32_trampoline_struct
|
||||||
|
{
|
||||||
|
UINT32 code_pointer; /* Pointer to ffi_closure_unix. */
|
||||||
|
UINT32 fake_gp; /* Pointer to closure, installed as gp. */
|
||||||
|
UINT32 real_gp; /* Real gp value. */
|
||||||
|
};
|
||||||
|
|
||||||
|
struct ffi_pa32_trampoline_struct *tramp;
|
||||||
|
struct pa32_fd *fd;
|
||||||
|
|
||||||
if (cif->abi != FFI_PA32)
|
if (cif->abi != FFI_PA32)
|
||||||
return FFI_BAD_ABI;
|
return FFI_BAD_ABI;
|
||||||
|
|
||||||
/* Make a small trampoline that will branch to our
|
/* Get function descriptor address for ffi_closure_pa32. */
|
||||||
handler function. Use PC-relative addressing. */
|
fd = (struct pa32_fd *)((UINT32)ffi_closure_pa32 & ~3);
|
||||||
|
|
||||||
#ifdef PA_LINUX
|
/* Setup trampoline. */
|
||||||
tramp[0] = 0xeaa00000; /* b,l .+8,%r21 ; %r21 <- pc+8 */
|
tramp = (struct ffi_pa32_trampoline_struct *)c->tramp;
|
||||||
tramp[1] = 0xd6a01c1e; /* depi 0,31,2,%r21 ; mask priv bits */
|
tramp->code_pointer = fd->code_pointer;
|
||||||
tramp[2] = 0x4aa10028; /* ldw 20(%r21),%r1 ; load plabel */
|
tramp->fake_gp = (UINT32)codeloc & ~3;
|
||||||
tramp[3] = 0x36b53ff1; /* ldo -8(%r21),%r21 ; get closure addr */
|
tramp->real_gp = fd->gp;
|
||||||
tramp[4] = 0x0c201096; /* ldw 0(%r1),%r22 ; address of handler */
|
|
||||||
tramp[5] = 0xeac0c000; /* bv%r0(%r22) ; branch to handler */
|
|
||||||
tramp[6] = 0x0c281093; /* ldw 4(%r1),%r19 ; GP of handler */
|
|
||||||
tramp[7] = ((UINT32)(ffi_closure_pa32) & ~2);
|
|
||||||
|
|
||||||
/* Flush d/icache -- have to flush up 2 two lines because of
|
c->cif = cif;
|
||||||
alignment. */
|
c->user_data = user_data;
|
||||||
__asm__ volatile(
|
c->fun = fun;
|
||||||
"fdc 0(%0)\n\t"
|
|
||||||
"fdc %1(%0)\n\t"
|
|
||||||
"fic 0(%%sr4, %0)\n\t"
|
|
||||||
"fic %1(%%sr4, %0)\n\t"
|
|
||||||
"sync\n\t"
|
|
||||||
"nop\n\t"
|
|
||||||
"nop\n\t"
|
|
||||||
"nop\n\t"
|
|
||||||
"nop\n\t"
|
|
||||||
"nop\n\t"
|
|
||||||
"nop\n\t"
|
|
||||||
"nop\n"
|
|
||||||
:
|
|
||||||
: "r"((unsigned long)tramp & ~31),
|
|
||||||
"r"(32 /* stride */)
|
|
||||||
: "memory");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PA_HPUX
|
|
||||||
tramp[0] = 0xeaa00000; /* b,l .+8,%r21 ; %r21 <- pc+8 */
|
|
||||||
tramp[1] = 0xd6a01c1e; /* depi 0,31,2,%r21 ; mask priv bits */
|
|
||||||
tramp[2] = 0x4aa10038; /* ldw 28(%r21),%r1 ; load plabel */
|
|
||||||
tramp[3] = 0x36b53ff1; /* ldo -8(%r21),%r21 ; get closure addr */
|
|
||||||
tramp[4] = 0x0c201096; /* ldw 0(%r1),%r22 ; address of handler */
|
|
||||||
tramp[5] = 0x02c010b4; /* ldsid (%r22),%r20 ; load space id */
|
|
||||||
tramp[6] = 0x00141820; /* mtsp %r20,%sr0 ; into %sr0 */
|
|
||||||
tramp[7] = 0xe2c00000; /* be 0(%sr0,%r22) ; branch to handler */
|
|
||||||
tramp[8] = 0x0c281093; /* ldw 4(%r1),%r19 ; GP of handler */
|
|
||||||
tramp[9] = ((UINT32)(ffi_closure_pa32) & ~2);
|
|
||||||
|
|
||||||
/* Flush d/icache -- have to flush three lines because of alignment. */
|
|
||||||
__asm__ volatile(
|
|
||||||
"copy %1,%0\n\t"
|
|
||||||
"fdc,m %2(%0)\n\t"
|
|
||||||
"fdc,m %2(%0)\n\t"
|
|
||||||
"fdc,m %2(%0)\n\t"
|
|
||||||
"ldsid (%1),%0\n\t"
|
|
||||||
"mtsp %0,%%sr0\n\t"
|
|
||||||
"copy %1,%0\n\t"
|
|
||||||
"fic,m %2(%%sr0,%0)\n\t"
|
|
||||||
"fic,m %2(%%sr0,%0)\n\t"
|
|
||||||
"fic,m %2(%%sr0,%0)\n\t"
|
|
||||||
"sync\n\t"
|
|
||||||
"nop\n\t"
|
|
||||||
"nop\n\t"
|
|
||||||
"nop\n\t"
|
|
||||||
"nop\n\t"
|
|
||||||
"nop\n\t"
|
|
||||||
"nop\n\t"
|
|
||||||
"nop\n"
|
|
||||||
: "=&r" ((unsigned long)tmp)
|
|
||||||
: "r" ((unsigned long)tramp & ~31),
|
|
||||||
"r" (32/* stride */)
|
|
||||||
: "memory");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
closure->cif = cif;
|
|
||||||
closure->user_data = user_data;
|
|
||||||
closure->fun = fun;
|
|
||||||
|
|
||||||
return FFI_OK;
|
return FFI_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,12 +68,7 @@ typedef enum ffi_abi {
|
|||||||
|
|
||||||
#define FFI_CLOSURES 1
|
#define FFI_CLOSURES 1
|
||||||
#define FFI_NATIVE_RAW_API 0
|
#define FFI_NATIVE_RAW_API 0
|
||||||
|
#define FFI_TRAMPOLINE_SIZE 12
|
||||||
#ifdef PA_LINUX
|
|
||||||
#define FFI_TRAMPOLINE_SIZE 32
|
|
||||||
#else
|
|
||||||
#define FFI_TRAMPOLINE_SIZE 40
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define FFI_TYPE_SMALL_STRUCT2 -1
|
#define FFI_TYPE_SMALL_STRUCT2 -1
|
||||||
#define FFI_TYPE_SMALL_STRUCT3 -2
|
#define FFI_TYPE_SMALL_STRUCT3 -2
|
||||||
|
|||||||
@@ -259,7 +259,7 @@ L$done
|
|||||||
L$FE1
|
L$FE1
|
||||||
|
|
||||||
/* void ffi_closure_pa32(void);
|
/* void ffi_closure_pa32(void);
|
||||||
Called with closure argument in %r21 */
|
Called with closure argument in %r19 */
|
||||||
|
|
||||||
.SPACE $TEXT$
|
.SPACE $TEXT$
|
||||||
.SUBSPA $CODE$
|
.SUBSPA $CODE$
|
||||||
@@ -285,7 +285,9 @@ L$CFI22
|
|||||||
stw %arg2, -44(%r3)
|
stw %arg2, -44(%r3)
|
||||||
stw %arg3, -48(%r3)
|
stw %arg3, -48(%r3)
|
||||||
|
|
||||||
copy %r21, %arg0
|
/* Retrieve closure pointer and real gp. */
|
||||||
|
copy %r19, %arg0
|
||||||
|
ldw 8(%r19), %r19
|
||||||
bl ffi_closure_inner_pa32, %r2
|
bl ffi_closure_inner_pa32, %r2
|
||||||
copy %r3, %arg1
|
copy %r3, %arg1
|
||||||
ldwm -64(%sp), %r3
|
ldwm -64(%sp), %r3
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ ffi_call_pa32:
|
|||||||
.LFE1:
|
.LFE1:
|
||||||
|
|
||||||
/* void ffi_closure_pa32(void);
|
/* void ffi_closure_pa32(void);
|
||||||
Called with closure argument in %r21 */
|
Called with closure argument in %r19 */
|
||||||
.export ffi_closure_pa32,code
|
.export ffi_closure_pa32,code
|
||||||
.import ffi_closure_inner_pa32,code
|
.import ffi_closure_inner_pa32,code
|
||||||
|
|
||||||
@@ -277,7 +277,9 @@ ffi_closure_pa32:
|
|||||||
stw %arg2, -44(%r3)
|
stw %arg2, -44(%r3)
|
||||||
stw %arg3, -48(%r3)
|
stw %arg3, -48(%r3)
|
||||||
|
|
||||||
copy %r21, %arg0
|
/* Retrieve closure pointer and real gp. */
|
||||||
|
copy %r19, %arg0
|
||||||
|
ldw 8(%r19), %r19
|
||||||
bl ffi_closure_inner_pa32, %r2
|
bl ffi_closure_inner_pa32, %r2
|
||||||
copy %r3, %arg1
|
copy %r3, %arg1
|
||||||
|
|
||||||
@@ -297,10 +299,18 @@ ffi_closure_pa32:
|
|||||||
.LSCIE1:
|
.LSCIE1:
|
||||||
.word 0x0 ;# CIE Identifier Tag
|
.word 0x0 ;# CIE Identifier Tag
|
||||||
.byte 0x1 ;# CIE Version
|
.byte 0x1 ;# CIE Version
|
||||||
|
#ifdef __PIC__
|
||||||
|
.ascii "zR\0" ;# CIE Augmentation: 'z' - data, 'R' - DW_EH_PE_... data
|
||||||
|
#else
|
||||||
.ascii "\0" ;# CIE Augmentation
|
.ascii "\0" ;# CIE Augmentation
|
||||||
|
#endif
|
||||||
.uleb128 0x1 ;# CIE Code Alignment Factor
|
.uleb128 0x1 ;# CIE Code Alignment Factor
|
||||||
.sleb128 4 ;# CIE Data Alignment Factor
|
.sleb128 4 ;# CIE Data Alignment Factor
|
||||||
.byte 0x2 ;# CIE RA Column
|
.byte 0x2 ;# CIE RA Column
|
||||||
|
#ifdef __PIC__
|
||||||
|
.uleb128 0x1 ;# Augmentation size
|
||||||
|
.byte 0x1b ;# FDE Encoding (DW_EH_PE_pcrel|DW_EH_PE_sdata4)
|
||||||
|
#endif
|
||||||
.byte 0xc ;# DW_CFA_def_cfa
|
.byte 0xc ;# DW_CFA_def_cfa
|
||||||
.uleb128 0x1e
|
.uleb128 0x1e
|
||||||
.uleb128 0x0
|
.uleb128 0x0
|
||||||
@@ -310,9 +320,15 @@ ffi_closure_pa32:
|
|||||||
.word .LEFDE1-.LASFDE1 ;# FDE Length
|
.word .LEFDE1-.LASFDE1 ;# FDE Length
|
||||||
.LASFDE1:
|
.LASFDE1:
|
||||||
.word .LASFDE1-.Lframe1 ;# FDE CIE offset
|
.word .LASFDE1-.Lframe1 ;# FDE CIE offset
|
||||||
.word .LFB1 ;# FDE initial location
|
#ifdef __PIC__
|
||||||
|
.word .LFB1-. ;# FDE initial location
|
||||||
|
#else
|
||||||
|
.word .LFB1 ;# FDE initial location
|
||||||
|
#endif
|
||||||
.word .LFE1-.LFB1 ;# FDE address range
|
.word .LFE1-.LFB1 ;# FDE address range
|
||||||
|
#ifdef __PIC__
|
||||||
|
.uleb128 0x0 ;# Augmentation size: no data
|
||||||
|
#endif
|
||||||
.byte 0x4 ;# DW_CFA_advance_loc4
|
.byte 0x4 ;# DW_CFA_advance_loc4
|
||||||
.word .LCFI11-.LFB1
|
.word .LCFI11-.LFB1
|
||||||
.byte 0x83 ;# DW_CFA_offset, column 0x3
|
.byte 0x83 ;# DW_CFA_offset, column 0x3
|
||||||
@@ -338,8 +354,15 @@ ffi_closure_pa32:
|
|||||||
.word .LEFDE2-.LASFDE2 ;# FDE Length
|
.word .LEFDE2-.LASFDE2 ;# FDE Length
|
||||||
.LASFDE2:
|
.LASFDE2:
|
||||||
.word .LASFDE2-.Lframe1 ;# FDE CIE offset
|
.word .LASFDE2-.Lframe1 ;# FDE CIE offset
|
||||||
|
#ifdef __PIC__
|
||||||
|
.word .LFB2-. ;# FDE initial location
|
||||||
|
#else
|
||||||
.word .LFB2 ;# FDE initial location
|
.word .LFB2 ;# FDE initial location
|
||||||
|
#endif
|
||||||
.word .LFE2-.LFB2 ;# FDE address range
|
.word .LFE2-.LFB2 ;# FDE address range
|
||||||
|
#ifdef __PIC__
|
||||||
|
.uleb128 0x0 ;# Augmentation size: no data
|
||||||
|
#endif
|
||||||
.byte 0x4 ;# DW_CFA_advance_loc4
|
.byte 0x4 ;# DW_CFA_advance_loc4
|
||||||
.word .LCFI21-.LFB2
|
.word .LCFI21-.LFB2
|
||||||
.byte 0x83 ;# DW_CFA_offset, column 0x3
|
.byte 0x83 ;# DW_CFA_offset, column 0x3
|
||||||
|
|||||||
@@ -85,8 +85,9 @@ ffi_call_int (ffi_cif *cif,
|
|||||||
can write r3 and r4 to memory without worrying about struct size.
|
can write r3 and r4 to memory without worrying about struct size.
|
||||||
|
|
||||||
For ELFv2 ABI, use a bounce buffer for homogeneous structs too,
|
For ELFv2 ABI, use a bounce buffer for homogeneous structs too,
|
||||||
for similar reasons. */
|
for similar reasons. This bounce buffer must be aligned to 16
|
||||||
unsigned long smst_buffer[8];
|
bytes for use with homogeneous structs of vectors (float128). */
|
||||||
|
float128 smst_buffer[8];
|
||||||
extended_cif ecif;
|
extended_cif ecif;
|
||||||
|
|
||||||
ecif.cif = cif;
|
ecif.cif = cif;
|
||||||
@@ -121,8 +122,9 @@ ffi_call_int (ffi_cif *cif,
|
|||||||
# endif
|
# endif
|
||||||
/* The SYSV ABI returns a structure of up to 8 bytes in size
|
/* The SYSV ABI returns a structure of up to 8 bytes in size
|
||||||
left-padded in r3/r4, and the ELFv2 ABI similarly returns a
|
left-padded in r3/r4, and the ELFv2 ABI similarly returns a
|
||||||
structure of up to 8 bytes in size left-padded in r3. */
|
structure of up to 8 bytes in size left-padded in r3. But
|
||||||
if (rsize <= 8)
|
note that a structure of a single float is not paddded. */
|
||||||
|
if (rsize <= 8 && (cif->flags & FLAG_RETURNS_FP) == 0)
|
||||||
memcpy (rvalue, (char *) smst_buffer + 8 - rsize, rsize);
|
memcpy (rvalue, (char *) smst_buffer + 8 - rsize, rsize);
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -33,7 +33,10 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
extern void ffi_closure_ASM (void);
|
extern void ffi_closure_ASM (void);
|
||||||
|
|
||||||
|
#if defined (FFI_GO_CLOSURES)
|
||||||
extern void ffi_go_closure_ASM (void);
|
extern void ffi_go_closure_ASM (void);
|
||||||
|
#endif
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
/* The assembly depends on these exact flags.
|
/* The assembly depends on these exact flags.
|
||||||
@@ -909,8 +912,10 @@ ffi_prep_cif_machdep (ffi_cif *cif)
|
|||||||
extern void ffi_call_AIX(extended_cif *, long, unsigned, unsigned *,
|
extern void ffi_call_AIX(extended_cif *, long, unsigned, unsigned *,
|
||||||
void (*fn)(void), void (*fn2)(void));
|
void (*fn)(void), void (*fn2)(void));
|
||||||
|
|
||||||
|
#if defined (FFI_GO_CLOSURES)
|
||||||
extern void ffi_call_go_AIX(extended_cif *, long, unsigned, unsigned *,
|
extern void ffi_call_go_AIX(extended_cif *, long, unsigned, unsigned *,
|
||||||
void (*fn)(void), void (*fn2)(void), void *closure);
|
void (*fn)(void), void (*fn2)(void), void *closure);
|
||||||
|
#endif
|
||||||
|
|
||||||
extern void ffi_call_DARWIN(extended_cif *, long, unsigned, unsigned *,
|
extern void ffi_call_DARWIN(extended_cif *, long, unsigned, unsigned *,
|
||||||
void (*fn)(void), void (*fn2)(void), ffi_type*);
|
void (*fn)(void), void (*fn2)(void), ffi_type*);
|
||||||
@@ -950,6 +955,7 @@ ffi_call (ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined (FFI_GO_CLOSURES)
|
||||||
void
|
void
|
||||||
ffi_call_go (ffi_cif *cif, void (*fn) (void), void *rvalue, void **avalue,
|
ffi_call_go (ffi_cif *cif, void (*fn) (void), void *rvalue, void **avalue,
|
||||||
void *closure)
|
void *closure)
|
||||||
@@ -981,6 +987,7 @@ ffi_call_go (ffi_cif *cif, void (*fn) (void), void *rvalue, void **avalue,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void flush_icache(char *);
|
static void flush_icache(char *);
|
||||||
static void flush_range(char *, int);
|
static void flush_range(char *, int);
|
||||||
@@ -1110,6 +1117,7 @@ ffi_prep_closure_loc (ffi_closure* closure,
|
|||||||
return FFI_OK;
|
return FFI_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined (FFI_GO_CLOSURES)
|
||||||
ffi_status
|
ffi_status
|
||||||
ffi_prep_go_closure (ffi_go_closure* closure,
|
ffi_prep_go_closure (ffi_go_closure* closure,
|
||||||
ffi_cif* cif,
|
ffi_cif* cif,
|
||||||
@@ -1133,6 +1141,7 @@ ffi_prep_go_closure (ffi_go_closure* closure,
|
|||||||
}
|
}
|
||||||
return FFI_OK;
|
return FFI_OK;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
flush_icache(char *addr)
|
flush_icache(char *addr)
|
||||||
@@ -1168,9 +1177,11 @@ ffi_type *
|
|||||||
ffi_closure_helper_DARWIN (ffi_closure *, void *,
|
ffi_closure_helper_DARWIN (ffi_closure *, void *,
|
||||||
unsigned long *, ffi_dblfl *);
|
unsigned long *, ffi_dblfl *);
|
||||||
|
|
||||||
|
#if defined (FFI_GO_CLOSURES)
|
||||||
ffi_type *
|
ffi_type *
|
||||||
ffi_go_closure_helper_DARWIN (ffi_go_closure*, void *,
|
ffi_go_closure_helper_DARWIN (ffi_go_closure*, void *,
|
||||||
unsigned long *, ffi_dblfl *);
|
unsigned long *, ffi_dblfl *);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Basically the trampoline invokes ffi_closure_ASM, and on
|
/* Basically the trampoline invokes ffi_closure_ASM, and on
|
||||||
entry, r11 holds the address of the closure.
|
entry, r11 holds the address of the closure.
|
||||||
@@ -1430,6 +1441,7 @@ ffi_closure_helper_DARWIN (ffi_closure *closure, void *rvalue,
|
|||||||
closure->user_data, rvalue, pgr, pfr);
|
closure->user_data, rvalue, pgr, pfr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined (FFI_GO_CLOSURES)
|
||||||
ffi_type *
|
ffi_type *
|
||||||
ffi_go_closure_helper_DARWIN (ffi_go_closure *closure, void *rvalue,
|
ffi_go_closure_helper_DARWIN (ffi_go_closure *closure, void *rvalue,
|
||||||
unsigned long *pgr, ffi_dblfl *pfr)
|
unsigned long *pgr, ffi_dblfl *pfr)
|
||||||
@@ -1437,4 +1449,4 @@ ffi_go_closure_helper_DARWIN (ffi_go_closure *closure, void *rvalue,
|
|||||||
return ffi_closure_helper_common (closure->cif, closure->fun,
|
return ffi_closure_helper_common (closure->cif, closure->fun,
|
||||||
closure, rvalue, pgr, pfr);
|
closure, rvalue, pgr, pfr);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -38,7 +38,8 @@
|
|||||||
/* About the LINUX64 ABI. */
|
/* About the LINUX64 ABI. */
|
||||||
enum {
|
enum {
|
||||||
NUM_GPR_ARG_REGISTERS64 = 8,
|
NUM_GPR_ARG_REGISTERS64 = 8,
|
||||||
NUM_FPR_ARG_REGISTERS64 = 13
|
NUM_FPR_ARG_REGISTERS64 = 13,
|
||||||
|
NUM_VEC_ARG_REGISTERS64 = 12,
|
||||||
};
|
};
|
||||||
enum { ASM_NEEDS_REGISTERS64 = 4 };
|
enum { ASM_NEEDS_REGISTERS64 = 4 };
|
||||||
|
|
||||||
@@ -63,10 +64,31 @@ ffi_prep_types_linux64 (ffi_abi abi)
|
|||||||
|
|
||||||
|
|
||||||
static unsigned int
|
static unsigned int
|
||||||
discover_homogeneous_aggregate (const ffi_type *t, unsigned int *elnum)
|
discover_homogeneous_aggregate (ffi_abi abi,
|
||||||
|
const ffi_type *t,
|
||||||
|
unsigned int *elnum)
|
||||||
{
|
{
|
||||||
switch (t->type)
|
switch (t->type)
|
||||||
{
|
{
|
||||||
|
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
|
||||||
|
case FFI_TYPE_LONGDOUBLE:
|
||||||
|
/* 64-bit long doubles are equivalent to doubles. */
|
||||||
|
if ((abi & FFI_LINUX_LONG_DOUBLE_128) == 0)
|
||||||
|
{
|
||||||
|
*elnum = 1;
|
||||||
|
return FFI_TYPE_DOUBLE;
|
||||||
|
}
|
||||||
|
/* IBM extended precision values use unaligned pairs
|
||||||
|
of FPRs, but according to the ABI must be considered
|
||||||
|
distinct from doubles. They are also limited to a
|
||||||
|
maximum of four members in a homogeneous aggregate. */
|
||||||
|
else if ((abi & FFI_LINUX_LONG_DOUBLE_IEEE128) == 0)
|
||||||
|
{
|
||||||
|
*elnum = 2;
|
||||||
|
return FFI_TYPE_LONGDOUBLE;
|
||||||
|
}
|
||||||
|
/* Fall through. */
|
||||||
|
#endif
|
||||||
case FFI_TYPE_FLOAT:
|
case FFI_TYPE_FLOAT:
|
||||||
case FFI_TYPE_DOUBLE:
|
case FFI_TYPE_DOUBLE:
|
||||||
*elnum = 1;
|
*elnum = 1;
|
||||||
@@ -79,7 +101,7 @@ discover_homogeneous_aggregate (const ffi_type *t, unsigned int *elnum)
|
|||||||
while (*el)
|
while (*el)
|
||||||
{
|
{
|
||||||
unsigned int el_elt, el_elnum = 0;
|
unsigned int el_elt, el_elnum = 0;
|
||||||
el_elt = discover_homogeneous_aggregate (*el, &el_elnum);
|
el_elt = discover_homogeneous_aggregate (abi, *el, &el_elnum);
|
||||||
if (el_elt == 0
|
if (el_elt == 0
|
||||||
|| (base_elt && base_elt != el_elt))
|
|| (base_elt && base_elt != el_elt))
|
||||||
return 0;
|
return 0;
|
||||||
@@ -110,13 +132,23 @@ ffi_prep_cif_linux64_core (ffi_cif *cif)
|
|||||||
{
|
{
|
||||||
ffi_type **ptr;
|
ffi_type **ptr;
|
||||||
unsigned bytes;
|
unsigned bytes;
|
||||||
unsigned i, fparg_count = 0, intarg_count = 0;
|
unsigned i, fparg_count = 0, intarg_count = 0, vecarg_count = 0;
|
||||||
unsigned flags = cif->flags;
|
unsigned flags = cif->flags;
|
||||||
unsigned int elt, elnum;
|
unsigned elt, elnum, rtype;
|
||||||
|
|
||||||
#if FFI_TYPE_LONGDOUBLE == FFI_TYPE_DOUBLE
|
#if FFI_TYPE_LONGDOUBLE == FFI_TYPE_DOUBLE
|
||||||
/* If compiled without long double support.. */
|
/* If compiled without long double support... */
|
||||||
if ((cif->abi & FFI_LINUX_LONG_DOUBLE_128) != 0)
|
if ((cif->abi & FFI_LINUX_LONG_DOUBLE_128) != 0 ||
|
||||||
|
(cif->abi & FFI_LINUX_LONG_DOUBLE_IEEE128) != 0)
|
||||||
|
return FFI_BAD_ABI;
|
||||||
|
#elif !defined(__VEC__)
|
||||||
|
/* If compiled without vector register support (used by assembly)... */
|
||||||
|
if ((cif->abi & FFI_LINUX_LONG_DOUBLE_IEEE128) != 0)
|
||||||
|
return FFI_BAD_ABI;
|
||||||
|
#else
|
||||||
|
/* If the IEEE128 flag is set, but long double is only 64 bits wide... */
|
||||||
|
if ((cif->abi & FFI_LINUX_LONG_DOUBLE_128) == 0 &&
|
||||||
|
(cif->abi & FFI_LINUX_LONG_DOUBLE_IEEE128) != 0)
|
||||||
return FFI_BAD_ABI;
|
return FFI_BAD_ABI;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -138,10 +170,19 @@ ffi_prep_cif_linux64_core (ffi_cif *cif)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Return value handling. */
|
/* Return value handling. */
|
||||||
switch (cif->rtype->type)
|
rtype = cif->rtype->type;
|
||||||
|
#if _CALL_ELF == 2
|
||||||
|
homogeneous:
|
||||||
|
#endif
|
||||||
|
switch (rtype)
|
||||||
{
|
{
|
||||||
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
|
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
|
||||||
case FFI_TYPE_LONGDOUBLE:
|
case FFI_TYPE_LONGDOUBLE:
|
||||||
|
if ((cif->abi & FFI_LINUX_LONG_DOUBLE_IEEE128) != 0)
|
||||||
|
{
|
||||||
|
flags |= FLAG_RETURNS_VEC;
|
||||||
|
break;
|
||||||
|
}
|
||||||
if ((cif->abi & FFI_LINUX_LONG_DOUBLE_128) != 0)
|
if ((cif->abi & FFI_LINUX_LONG_DOUBLE_128) != 0)
|
||||||
flags |= FLAG_RETURNS_128BITS;
|
flags |= FLAG_RETURNS_128BITS;
|
||||||
/* Fall through. */
|
/* Fall through. */
|
||||||
@@ -164,19 +205,18 @@ ffi_prep_cif_linux64_core (ffi_cif *cif)
|
|||||||
|
|
||||||
case FFI_TYPE_STRUCT:
|
case FFI_TYPE_STRUCT:
|
||||||
#if _CALL_ELF == 2
|
#if _CALL_ELF == 2
|
||||||
elt = discover_homogeneous_aggregate (cif->rtype, &elnum);
|
elt = discover_homogeneous_aggregate (cif->abi, cif->rtype, &elnum);
|
||||||
if (elt)
|
if (elt)
|
||||||
{
|
{
|
||||||
if (elt == FFI_TYPE_DOUBLE)
|
flags |= FLAG_RETURNS_SMST;
|
||||||
flags |= FLAG_RETURNS_64BITS;
|
rtype = elt;
|
||||||
flags |= FLAG_RETURNS_FP | FLAG_RETURNS_SMST;
|
goto homogeneous;
|
||||||
break;
|
}
|
||||||
}
|
|
||||||
if (cif->rtype->size <= 16)
|
if (cif->rtype->size <= 16)
|
||||||
{
|
{
|
||||||
flags |= FLAG_RETURNS_SMST;
|
flags |= FLAG_RETURNS_SMST;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
intarg_count++;
|
intarg_count++;
|
||||||
flags |= FLAG_RETVAL_REFERENCE;
|
flags |= FLAG_RETVAL_REFERENCE;
|
||||||
@@ -198,6 +238,15 @@ ffi_prep_cif_linux64_core (ffi_cif *cif)
|
|||||||
{
|
{
|
||||||
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
|
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
|
||||||
case FFI_TYPE_LONGDOUBLE:
|
case FFI_TYPE_LONGDOUBLE:
|
||||||
|
if ((cif->abi & FFI_LINUX_LONG_DOUBLE_IEEE128) != 0)
|
||||||
|
{
|
||||||
|
vecarg_count++;
|
||||||
|
/* Align to 16 bytes, plus the 16-byte argument. */
|
||||||
|
intarg_count = (intarg_count + 3) & ~0x1;
|
||||||
|
if (vecarg_count > NUM_VEC_ARG_REGISTERS64)
|
||||||
|
flags |= FLAG_ARG_NEEDS_PSAVE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
if ((cif->abi & FFI_LINUX_LONG_DOUBLE_128) != 0)
|
if ((cif->abi & FFI_LINUX_LONG_DOUBLE_128) != 0)
|
||||||
{
|
{
|
||||||
fparg_count++;
|
fparg_count++;
|
||||||
@@ -224,7 +273,18 @@ ffi_prep_cif_linux64_core (ffi_cif *cif)
|
|||||||
intarg_count = FFI_ALIGN (intarg_count, align);
|
intarg_count = FFI_ALIGN (intarg_count, align);
|
||||||
}
|
}
|
||||||
intarg_count += ((*ptr)->size + 7) / 8;
|
intarg_count += ((*ptr)->size + 7) / 8;
|
||||||
elt = discover_homogeneous_aggregate (*ptr, &elnum);
|
elt = discover_homogeneous_aggregate (cif->abi, *ptr, &elnum);
|
||||||
|
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
|
||||||
|
if (elt == FFI_TYPE_LONGDOUBLE &&
|
||||||
|
(cif->abi & FFI_LINUX_LONG_DOUBLE_IEEE128) != 0)
|
||||||
|
{
|
||||||
|
vecarg_count += elnum;
|
||||||
|
if (vecarg_count > NUM_VEC_ARG_REGISTERS64)
|
||||||
|
flags |= FLAG_ARG_NEEDS_PSAVE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
if (elt)
|
if (elt)
|
||||||
{
|
{
|
||||||
fparg_count += elnum;
|
fparg_count += elnum;
|
||||||
@@ -263,10 +323,17 @@ ffi_prep_cif_linux64_core (ffi_cif *cif)
|
|||||||
flags |= FLAG_FP_ARGUMENTS;
|
flags |= FLAG_FP_ARGUMENTS;
|
||||||
if (intarg_count > 4)
|
if (intarg_count > 4)
|
||||||
flags |= FLAG_4_GPR_ARGUMENTS;
|
flags |= FLAG_4_GPR_ARGUMENTS;
|
||||||
|
if (vecarg_count != 0)
|
||||||
|
flags |= FLAG_VEC_ARGUMENTS;
|
||||||
|
|
||||||
/* Space for the FPR registers, if needed. */
|
/* Space for the FPR registers, if needed. */
|
||||||
if (fparg_count != 0)
|
if (fparg_count != 0)
|
||||||
bytes += NUM_FPR_ARG_REGISTERS64 * sizeof (double);
|
bytes += NUM_FPR_ARG_REGISTERS64 * sizeof (double);
|
||||||
|
/* Space for the vector registers, if needed, aligned to 16 bytes. */
|
||||||
|
if (vecarg_count != 0) {
|
||||||
|
bytes = (bytes + 15) & ~0xF;
|
||||||
|
bytes += NUM_VEC_ARG_REGISTERS64 * sizeof (float128);
|
||||||
|
}
|
||||||
|
|
||||||
/* Stack space. */
|
/* Stack space. */
|
||||||
#if _CALL_ELF == 2
|
#if _CALL_ELF == 2
|
||||||
@@ -349,6 +416,8 @@ ffi_prep_cif_linux64_var (ffi_cif *cif,
|
|||||||
|--------------------------------------------| |
|
|--------------------------------------------| |
|
||||||
| FPR registers f1-f13 (optional) 13*8 | |
|
| FPR registers f1-f13 (optional) 13*8 | |
|
||||||
|--------------------------------------------| |
|
|--------------------------------------------| |
|
||||||
|
| VEC registers v2-v13 (optional) 12*16 | |
|
||||||
|
|--------------------------------------------| |
|
||||||
| Parameter save area | |
|
| Parameter save area | |
|
||||||
|--------------------------------------------| |
|
|--------------------------------------------| |
|
||||||
| TOC save area 8 | |
|
| TOC save area 8 | |
|
||||||
@@ -378,6 +447,7 @@ ffi_prep_args64 (extended_cif *ecif, unsigned long *const stack)
|
|||||||
unsigned long *ul;
|
unsigned long *ul;
|
||||||
float *f;
|
float *f;
|
||||||
double *d;
|
double *d;
|
||||||
|
float128 *f128;
|
||||||
size_t p;
|
size_t p;
|
||||||
} valp;
|
} valp;
|
||||||
|
|
||||||
@@ -391,11 +461,16 @@ ffi_prep_args64 (extended_cif *ecif, unsigned long *const stack)
|
|||||||
valp rest;
|
valp rest;
|
||||||
valp next_arg;
|
valp next_arg;
|
||||||
|
|
||||||
/* 'fpr_base' points at the space for fpr3, and grows upwards as
|
/* 'fpr_base' points at the space for f1, and grows upwards as
|
||||||
we use FPR registers. */
|
we use FPR registers. */
|
||||||
valp fpr_base;
|
valp fpr_base;
|
||||||
unsigned int fparg_count;
|
unsigned int fparg_count;
|
||||||
|
|
||||||
|
/* 'vec_base' points at the space for v2, and grows upwards as
|
||||||
|
we use vector registers. */
|
||||||
|
valp vec_base;
|
||||||
|
unsigned int vecarg_count;
|
||||||
|
|
||||||
unsigned int i, words, nargs, nfixedargs;
|
unsigned int i, words, nargs, nfixedargs;
|
||||||
ffi_type **ptr;
|
ffi_type **ptr;
|
||||||
double double_tmp;
|
double double_tmp;
|
||||||
@@ -412,6 +487,7 @@ ffi_prep_args64 (extended_cif *ecif, unsigned long *const stack)
|
|||||||
unsigned long **ul;
|
unsigned long **ul;
|
||||||
float **f;
|
float **f;
|
||||||
double **d;
|
double **d;
|
||||||
|
float128 **f128;
|
||||||
} p_argv;
|
} p_argv;
|
||||||
unsigned long gprvalue;
|
unsigned long gprvalue;
|
||||||
unsigned long align;
|
unsigned long align;
|
||||||
@@ -426,11 +502,21 @@ ffi_prep_args64 (extended_cif *ecif, unsigned long *const stack)
|
|||||||
#endif
|
#endif
|
||||||
fpr_base.d = gpr_base.d - NUM_FPR_ARG_REGISTERS64;
|
fpr_base.d = gpr_base.d - NUM_FPR_ARG_REGISTERS64;
|
||||||
fparg_count = 0;
|
fparg_count = 0;
|
||||||
|
/* Place the vector args below the FPRs, if used, else the GPRs. */
|
||||||
|
if (ecif->cif->flags & FLAG_FP_ARGUMENTS)
|
||||||
|
vec_base.p = fpr_base.p & ~0xF;
|
||||||
|
else
|
||||||
|
vec_base.p = gpr_base.p;
|
||||||
|
vec_base.f128 -= NUM_VEC_ARG_REGISTERS64;
|
||||||
|
vecarg_count = 0;
|
||||||
next_arg.ul = gpr_base.ul;
|
next_arg.ul = gpr_base.ul;
|
||||||
|
|
||||||
/* Check that everything starts aligned properly. */
|
/* Check that everything starts aligned properly. */
|
||||||
FFI_ASSERT (((unsigned long) (char *) stack & 0xF) == 0);
|
FFI_ASSERT (((unsigned long) (char *) stack & 0xF) == 0);
|
||||||
FFI_ASSERT (((unsigned long) stacktop.c & 0xF) == 0);
|
FFI_ASSERT (((unsigned long) stacktop.c & 0xF) == 0);
|
||||||
|
FFI_ASSERT (((unsigned long) gpr_base.c & 0xF) == 0);
|
||||||
|
FFI_ASSERT (((unsigned long) gpr_end.c & 0xF) == 0);
|
||||||
|
FFI_ASSERT (((unsigned long) vec_base.c & 0xF) == 0);
|
||||||
FFI_ASSERT ((bytes & 0xF) == 0);
|
FFI_ASSERT ((bytes & 0xF) == 0);
|
||||||
|
|
||||||
/* Deal with return values that are actually pass-by-reference. */
|
/* Deal with return values that are actually pass-by-reference. */
|
||||||
@@ -455,6 +541,22 @@ ffi_prep_args64 (extended_cif *ecif, unsigned long *const stack)
|
|||||||
{
|
{
|
||||||
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
|
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
|
||||||
case FFI_TYPE_LONGDOUBLE:
|
case FFI_TYPE_LONGDOUBLE:
|
||||||
|
if ((ecif->cif->abi & FFI_LINUX_LONG_DOUBLE_IEEE128) != 0)
|
||||||
|
{
|
||||||
|
next_arg.p = FFI_ALIGN (next_arg.p, 16);
|
||||||
|
if (next_arg.ul == gpr_end.ul)
|
||||||
|
next_arg.ul = rest.ul;
|
||||||
|
if (vecarg_count < NUM_VEC_ARG_REGISTERS64 && i < nfixedargs)
|
||||||
|
memcpy (vec_base.f128++, *p_argv.f128, sizeof (float128));
|
||||||
|
else
|
||||||
|
memcpy (next_arg.f128, *p_argv.f128, sizeof (float128));
|
||||||
|
if (++next_arg.f128 == gpr_end.f128)
|
||||||
|
next_arg.f128 = rest.f128;
|
||||||
|
vecarg_count++;
|
||||||
|
FFI_ASSERT (__LDBL_MANT_DIG__ == 113);
|
||||||
|
FFI_ASSERT (flags & FLAG_VEC_ARGUMENTS);
|
||||||
|
break;
|
||||||
|
}
|
||||||
if ((ecif->cif->abi & FFI_LINUX_LONG_DOUBLE_128) != 0)
|
if ((ecif->cif->abi & FFI_LINUX_LONG_DOUBLE_128) != 0)
|
||||||
{
|
{
|
||||||
double_tmp = (*p_argv.d)[0];
|
double_tmp = (*p_argv.d)[0];
|
||||||
@@ -492,7 +594,9 @@ ffi_prep_args64 (extended_cif *ecif, unsigned long *const stack)
|
|||||||
/* Fall through. */
|
/* Fall through. */
|
||||||
#endif
|
#endif
|
||||||
case FFI_TYPE_DOUBLE:
|
case FFI_TYPE_DOUBLE:
|
||||||
|
#if _CALL_ELF != 2
|
||||||
do_double:
|
do_double:
|
||||||
|
#endif
|
||||||
double_tmp = **p_argv.d;
|
double_tmp = **p_argv.d;
|
||||||
if (fparg_count < NUM_FPR_ARG_REGISTERS64 && i < nfixedargs)
|
if (fparg_count < NUM_FPR_ARG_REGISTERS64 && i < nfixedargs)
|
||||||
{
|
{
|
||||||
@@ -511,7 +615,9 @@ ffi_prep_args64 (extended_cif *ecif, unsigned long *const stack)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case FFI_TYPE_FLOAT:
|
case FFI_TYPE_FLOAT:
|
||||||
|
#if _CALL_ELF != 2
|
||||||
do_float:
|
do_float:
|
||||||
|
#endif
|
||||||
double_tmp = **p_argv.f;
|
double_tmp = **p_argv.f;
|
||||||
if (fparg_count < NUM_FPR_ARG_REGISTERS64 && i < nfixedargs)
|
if (fparg_count < NUM_FPR_ARG_REGISTERS64 && i < nfixedargs)
|
||||||
{
|
{
|
||||||
@@ -548,9 +654,13 @@ ffi_prep_args64 (extended_cif *ecif, unsigned long *const stack)
|
|||||||
if (align > 16)
|
if (align > 16)
|
||||||
align = 16;
|
align = 16;
|
||||||
if (align > 1)
|
if (align > 1)
|
||||||
next_arg.p = FFI_ALIGN (next_arg.p, align);
|
{
|
||||||
|
next_arg.p = FFI_ALIGN (next_arg.p, align);
|
||||||
|
if (next_arg.ul == gpr_end.ul)
|
||||||
|
next_arg.ul = rest.ul;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
elt = discover_homogeneous_aggregate (*ptr, &elnum);
|
elt = discover_homogeneous_aggregate (ecif->cif->abi, *ptr, &elnum);
|
||||||
if (elt)
|
if (elt)
|
||||||
{
|
{
|
||||||
#if _CALL_ELF == 2
|
#if _CALL_ELF == 2
|
||||||
@@ -558,9 +668,29 @@ ffi_prep_args64 (extended_cif *ecif, unsigned long *const stack)
|
|||||||
void *v;
|
void *v;
|
||||||
float *f;
|
float *f;
|
||||||
double *d;
|
double *d;
|
||||||
|
float128 *f128;
|
||||||
} arg;
|
} arg;
|
||||||
|
|
||||||
arg.v = *p_argv.v;
|
arg.v = *p_argv.v;
|
||||||
|
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
|
||||||
|
if (elt == FFI_TYPE_LONGDOUBLE &&
|
||||||
|
(ecif->cif->abi & FFI_LINUX_LONG_DOUBLE_IEEE128) != 0)
|
||||||
|
{
|
||||||
|
do
|
||||||
|
{
|
||||||
|
if (vecarg_count < NUM_VEC_ARG_REGISTERS64
|
||||||
|
&& i < nfixedargs)
|
||||||
|
memcpy (vec_base.f128++, arg.f128, sizeof (float128));
|
||||||
|
else
|
||||||
|
memcpy (next_arg.f128, arg.f128++, sizeof (float128));
|
||||||
|
if (++next_arg.f128 == gpr_end.f128)
|
||||||
|
next_arg.f128 = rest.f128;
|
||||||
|
vecarg_count++;
|
||||||
|
}
|
||||||
|
while (--elnum != 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
if (elt == FFI_TYPE_FLOAT)
|
if (elt == FFI_TYPE_FLOAT)
|
||||||
{
|
{
|
||||||
do
|
do
|
||||||
@@ -576,11 +706,9 @@ ffi_prep_args64 (extended_cif *ecif, unsigned long *const stack)
|
|||||||
fparg_count++;
|
fparg_count++;
|
||||||
}
|
}
|
||||||
while (--elnum != 0);
|
while (--elnum != 0);
|
||||||
if ((next_arg.p & 3) != 0)
|
if ((next_arg.p & 7) != 0)
|
||||||
{
|
if (++next_arg.f == gpr_end.f)
|
||||||
if (++next_arg.f == gpr_end.f)
|
next_arg.f = rest.f;
|
||||||
next_arg.f = rest.f;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
do
|
do
|
||||||
@@ -733,17 +861,20 @@ ffi_closure_helper_LINUX64 (ffi_cif *cif,
|
|||||||
void *user_data,
|
void *user_data,
|
||||||
void *rvalue,
|
void *rvalue,
|
||||||
unsigned long *pst,
|
unsigned long *pst,
|
||||||
ffi_dblfl *pfr)
|
ffi_dblfl *pfr,
|
||||||
|
float128 *pvec)
|
||||||
{
|
{
|
||||||
/* rvalue is the pointer to space for return value in closure assembly */
|
/* rvalue is the pointer to space for return value in closure assembly */
|
||||||
/* pst is the pointer to parameter save area
|
/* pst is the pointer to parameter save area
|
||||||
(r3-r10 are stored into its first 8 slots by ffi_closure_LINUX64) */
|
(r3-r10 are stored into its first 8 slots by ffi_closure_LINUX64) */
|
||||||
/* pfr is the pointer to where f1-f13 are stored in ffi_closure_LINUX64 */
|
/* pfr is the pointer to where f1-f13 are stored in ffi_closure_LINUX64 */
|
||||||
|
/* pvec is the pointer to where v2-v13 are stored in ffi_closure_LINUX64 */
|
||||||
|
|
||||||
void **avalue;
|
void **avalue;
|
||||||
ffi_type **arg_types;
|
ffi_type **arg_types;
|
||||||
unsigned long i, avn, nfixedargs;
|
unsigned long i, avn, nfixedargs;
|
||||||
ffi_dblfl *end_pfr = pfr + NUM_FPR_ARG_REGISTERS64;
|
ffi_dblfl *end_pfr = pfr + NUM_FPR_ARG_REGISTERS64;
|
||||||
|
float128 *end_pvec = pvec + NUM_VEC_ARG_REGISTERS64;
|
||||||
unsigned long align;
|
unsigned long align;
|
||||||
|
|
||||||
avalue = alloca (cif->nargs * sizeof (void *));
|
avalue = alloca (cif->nargs * sizeof (void *));
|
||||||
@@ -813,7 +944,7 @@ ffi_closure_helper_LINUX64 (ffi_cif *cif,
|
|||||||
if (align > 1)
|
if (align > 1)
|
||||||
pst = (unsigned long *) FFI_ALIGN ((size_t) pst, align);
|
pst = (unsigned long *) FFI_ALIGN ((size_t) pst, align);
|
||||||
}
|
}
|
||||||
elt = discover_homogeneous_aggregate (arg_types[i], &elnum);
|
elt = discover_homogeneous_aggregate (cif->abi, arg_types[i], &elnum);
|
||||||
if (elt)
|
if (elt)
|
||||||
{
|
{
|
||||||
#if _CALL_ELF == 2
|
#if _CALL_ELF == 2
|
||||||
@@ -822,6 +953,7 @@ ffi_closure_helper_LINUX64 (ffi_cif *cif,
|
|||||||
unsigned long *ul;
|
unsigned long *ul;
|
||||||
float *f;
|
float *f;
|
||||||
double *d;
|
double *d;
|
||||||
|
float128 *f128;
|
||||||
size_t p;
|
size_t p;
|
||||||
} to, from;
|
} to, from;
|
||||||
|
|
||||||
@@ -829,6 +961,17 @@ ffi_closure_helper_LINUX64 (ffi_cif *cif,
|
|||||||
aggregate size is not greater than the space taken by
|
aggregate size is not greater than the space taken by
|
||||||
the registers so store back to the register/parameter
|
the registers so store back to the register/parameter
|
||||||
save arrays. */
|
save arrays. */
|
||||||
|
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
|
||||||
|
if (elt == FFI_TYPE_LONGDOUBLE &&
|
||||||
|
(cif->abi & FFI_LINUX_LONG_DOUBLE_IEEE128) != 0)
|
||||||
|
{
|
||||||
|
if (pvec + elnum <= end_pvec)
|
||||||
|
to.v = pvec;
|
||||||
|
else
|
||||||
|
to.v = pst;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
if (pfr + elnum <= end_pfr)
|
if (pfr + elnum <= end_pfr)
|
||||||
to.v = pfr;
|
to.v = pfr;
|
||||||
else
|
else
|
||||||
@@ -836,6 +979,23 @@ ffi_closure_helper_LINUX64 (ffi_cif *cif,
|
|||||||
|
|
||||||
avalue[i] = to.v;
|
avalue[i] = to.v;
|
||||||
from.ul = pst;
|
from.ul = pst;
|
||||||
|
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
|
||||||
|
if (elt == FFI_TYPE_LONGDOUBLE &&
|
||||||
|
(cif->abi & FFI_LINUX_LONG_DOUBLE_IEEE128) != 0)
|
||||||
|
{
|
||||||
|
do
|
||||||
|
{
|
||||||
|
if (pvec < end_pvec && i < nfixedargs)
|
||||||
|
memcpy (to.f128, pvec++, sizeof (float128));
|
||||||
|
else
|
||||||
|
memcpy (to.f128, from.f128, sizeof (float128));
|
||||||
|
to.f128++;
|
||||||
|
from.f128++;
|
||||||
|
}
|
||||||
|
while (--elnum != 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
if (elt == FFI_TYPE_FLOAT)
|
if (elt == FFI_TYPE_FLOAT)
|
||||||
{
|
{
|
||||||
do
|
do
|
||||||
@@ -891,7 +1051,18 @@ ffi_closure_helper_LINUX64 (ffi_cif *cif,
|
|||||||
|
|
||||||
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
|
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
|
||||||
case FFI_TYPE_LONGDOUBLE:
|
case FFI_TYPE_LONGDOUBLE:
|
||||||
if ((cif->abi & FFI_LINUX_LONG_DOUBLE_128) != 0)
|
if ((cif->abi & FFI_LINUX_LONG_DOUBLE_IEEE128) != 0)
|
||||||
|
{
|
||||||
|
if (((unsigned long) pst & 0xF) != 0)
|
||||||
|
++pst;
|
||||||
|
if (pvec < end_pvec && i < nfixedargs)
|
||||||
|
avalue[i] = pvec++;
|
||||||
|
else
|
||||||
|
avalue[i] = pst;
|
||||||
|
pst += 2;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if ((cif->abi & FFI_LINUX_LONG_DOUBLE_128) != 0)
|
||||||
{
|
{
|
||||||
if (pfr + 1 < end_pfr && i + 1 < nfixedargs)
|
if (pfr + 1 < end_pfr && i + 1 < nfixedargs)
|
||||||
{
|
{
|
||||||
@@ -915,7 +1086,9 @@ ffi_closure_helper_LINUX64 (ffi_cif *cif,
|
|||||||
/* Fall through. */
|
/* Fall through. */
|
||||||
#endif
|
#endif
|
||||||
case FFI_TYPE_DOUBLE:
|
case FFI_TYPE_DOUBLE:
|
||||||
|
#if _CALL_ELF != 2
|
||||||
do_double:
|
do_double:
|
||||||
|
#endif
|
||||||
/* On the outgoing stack all values are aligned to 8 */
|
/* On the outgoing stack all values are aligned to 8 */
|
||||||
/* there are 13 64bit floating point registers */
|
/* there are 13 64bit floating point registers */
|
||||||
|
|
||||||
@@ -930,7 +1103,9 @@ ffi_closure_helper_LINUX64 (ffi_cif *cif,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case FFI_TYPE_FLOAT:
|
case FFI_TYPE_FLOAT:
|
||||||
|
#if _CALL_ELF != 2
|
||||||
do_float:
|
do_float:
|
||||||
|
#endif
|
||||||
if (pfr < end_pfr && i < nfixedargs)
|
if (pfr < end_pfr && i < nfixedargs)
|
||||||
{
|
{
|
||||||
/* Float values are stored as doubles in the
|
/* Float values are stored as doubles in the
|
||||||
@@ -962,13 +1137,17 @@ ffi_closure_helper_LINUX64 (ffi_cif *cif,
|
|||||||
/* Tell ffi_closure_LINUX64 how to perform return type promotions. */
|
/* Tell ffi_closure_LINUX64 how to perform return type promotions. */
|
||||||
if ((cif->flags & FLAG_RETURNS_SMST) != 0)
|
if ((cif->flags & FLAG_RETURNS_SMST) != 0)
|
||||||
{
|
{
|
||||||
if ((cif->flags & FLAG_RETURNS_FP) == 0)
|
if ((cif->flags & (FLAG_RETURNS_FP | FLAG_RETURNS_VEC)) == 0)
|
||||||
return FFI_V2_TYPE_SMALL_STRUCT + cif->rtype->size - 1;
|
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)
|
else if ((cif->flags & FLAG_RETURNS_64BITS) != 0)
|
||||||
return FFI_V2_TYPE_DOUBLE_HOMOG;
|
return FFI_V2_TYPE_DOUBLE_HOMOG;
|
||||||
else
|
else
|
||||||
return FFI_V2_TYPE_FLOAT_HOMOG;
|
return FFI_V2_TYPE_FLOAT_HOMOG;
|
||||||
}
|
}
|
||||||
|
if ((cif->flags & FLAG_RETURNS_VEC) != 0)
|
||||||
|
return FFI_V2_TYPE_VECTOR;
|
||||||
return cif->rtype->type;
|
return cif->rtype->type;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user