Commit Graph

853 Commits

Author SHA1 Message Date
Anthony Green
57465744b6 Update to version 3.1 2014-05-11 10:30:22 -04:00
Anthony Green
0c2251a42d Support versions of git older than 1.8.5 2014-05-11 10:22:30 -04:00
Anthony Green
70c303cb88 Fix testsuite for GCC 4.9.0 2014-05-11 09:56:40 -04:00
Magnus Granberg
52b3457093 Check /proc/self/status for PaX status. 2014-05-11 09:55:28 -04:00
Dominik Vogt
7ba4c5d72a Use to get correct dir 2014-05-11 09:52:47 -04:00
Anthony Green
31e0d4ecff Merge pull request #119 from joshtriplett/fastcall-fastball
src/x86/win32.S: Define ffi_closure_FASTCALL in the MASM section, too
2014-04-23 19:24:47 -04:00
Josh Triplett
99909eb618 src/x86/win32.S: Define ffi_closure_FASTCALL in the MASM section, too 2014-04-22 21:17:52 -07:00
Anthony Green
1c0e9a7297 Merge pull request #101 from joshtriplett/fastcall-closures
Support closures for fastcall
2014-04-21 12:41:56 -04:00
Josh Triplett
d36952273d Support fastcall closures
libffi on 32-bit x86 now supports closures for all supported ABIs.
Thus, rewrite the last remaining duplicated-by-ABI test (closure_stdcall
and closure_thiscall) to use the generic ABI_NUM/ABI_ATTR mechanism.
2014-04-20 17:08:37 -07:00
Anthony Green
93a24f216b Merge pull request #80 from ueno/devel
Fix typo in doc
2014-04-12 19:38:07 -04:00
Anthony Green
dd11a04061 Merge pull request #86 from joshtriplett/testsuite-CC-CXX
testsuite ignores CC parameter supplied to configure or make
2014-04-12 19:37:21 -04:00
Anthony Green
8fa2812355 Merge pull request #116 from frida/fix/darwin-aarch64-variadic
Fix handling of variadic calls on Darwin/AArch64
2014-04-12 19:32:08 -04:00
Anthony Green
8a58e6b780 Merge pull request #115 from frida/fix/darwin-aarch64-alignment
Fix alignment of AArch64 assembler functions
2014-04-12 19:30:18 -04:00
Anthony Green
30b77c56f9 Merge pull request #117 from frida/fix/windows-regression
Fix Windows regression
2014-04-12 19:29:13 -04:00
Ole André Vadla Ravnås
3e2b84d295 Fix Windows regression
Introduced by b5fed60194.
2014-04-12 01:06:09 +02:00
Ole André Vadla Ravnås
419503f409 Fix handling of variadic calls on Darwin/AArch64 2014-04-06 20:59:25 +02:00
Ole André Vadla Ravnås
a539f7ffd6 Fix alignment of AArch64 assembler functions 2014-04-06 20:57:32 +02:00
Anthony Green
dc33cb3c99 Merge pull request #114 from joshtriplett/bounce-on-a-tiny-trampoline
Fix ABI on 32-bit non-Windows x86: go back to trampoline size 10
2014-04-05 23:41:22 -04:00
Josh Triplett
b5fed60194 Fix ABI on 32-bit non-Windows x86: go back to trampoline size 10
The trampoline size is part of the ABI, so it cannot change.  Move the
logic from the stdcall and thiscall trampolines to the functions they
call, to reduce them both to 10 bytes.

This drops the previously added support for raw THISCALL closures on
non-Windows.  (Non-raw THISCALL closures still work.)
2014-04-05 17:33:42 -07:00
Josh Triplett
03ca880081 README: Note the testsuite changes to respect $CC and $CXX 2014-03-27 08:44:34 -07:00
Josh Triplett
d74df8c5d8 README: Update Windows example to set both CC and CXX 2014-03-27 00:44:12 -07:00
Josh Triplett
7d698125b1 Use the proper C++ compiler to run C++ tests
Running the C compiler with -shared-libgcc -lstdc++ does not work on
non-GCC compilers.
2014-03-27 00:40:27 -07:00
Josh Triplett
fa5e88f170 .travis.yml: Make the build command more readable by splitting at &&
"script" can contain multiple commands to run in sequence.
2014-03-27 00:38:53 -07:00
Josh Triplett
0c3824702d Always set CC_FOR_TARGET for dejagnu, to make the testsuite respect $CC
This fixes cross-compilation and compilation with CC="gcc -m32".
2014-03-26 23:31:02 -07:00
Josh Triplett
9946a92af3 Stop looking for expect and runtest above top_builddir
Users wishing to test hand-compiled versions of expect and runtest can
easily enough put them in their path or set EXPECT and RUNTEST
themselves.
2014-03-26 20:20:31 -07:00
Josh Triplett
acb2023252 Stop setting an empty AM_RUNTESTFLAGS 2014-03-26 20:20:31 -07:00
Anthony Green
c860a992fe Upgrade version to 3.1-rc1 2014-03-25 17:02:51 -04:00
Anthony Green
9837073e62 Update copyright date and clean up README notes. 2014-03-25 16:24:14 -04:00
Anthony Green
18d3baa9f5 Merge pull request #108 from joshtriplett/freebsd
[3.1 blocker] Fix FreeBSD support
2014-03-25 16:12:53 -04:00
Anthony Green
afee53738a Merge pull request #106 from joshtriplett/darwin-award
[3.1 blocker] Update OS X build system to include win32.S on 32-bit
2014-03-25 16:12:35 -04:00
Anthony Green
7d2478568e Merge pull request #110 from joshtriplett/w64
Fix 64-bit Windows support
2014-03-25 16:12:17 -04:00
Anthony Green
beab5f334d Merge pull request #105 from joshtriplett/win32-relocations
[3.1 blocker] win32.S needs to handle relocations/GOT
2014-03-25 16:07:47 -04:00
Josh Triplett
f0c8a31577 Compile win32.S on FreeBSD 2014-03-25 10:10:51 -07:00
Josh Triplett
b2d610e028 Compile win32.S on 32-bit Darwin as well 2014-03-24 21:45:47 -07:00
Josh Triplett
be50b87a49 Always use configure to detect whether global symbols need underscores
64-bit Windows already used this check; make it universal, and use it in
place of an ifdef on X86_WIN32, to handle non-Windows platforms that use
the underscore, such as Darwin.
2014-03-24 21:45:47 -07:00
Josh Triplett
56be47f876 Fix a warning on 64-bit Windows
When sizeof(size_t) != sizeof(unsigned), adding a size_t to cif->bytes
produces a "possible loss of data" warning.  However, the size_t in
question refers to the size of a single parameter.  Use a cast to avoid
the warning.
2014-03-24 21:24:53 -07:00
Josh Triplett
48a8eda74a Avoid referencing undefined ABIs on 64-bit Windows builds
64-bit Windows does not have FFI_STDCALL, FFI_THISCALL, or FFI_FASTCALL.
2014-03-24 21:21:12 -07:00
Josh Triplett
f0f4138f90 win32.S: Add handling for position-independent code on Darwin
Newer versions of Darwin generate the necessary stub functions
automatically and just need a call instruction, but accomodating older
versions as well requires adding the stub.
2014-03-22 10:04:11 -07:00
Josh Triplett
ef5890ebaf win32.S: Use shifting for multiplication rather than repeated addition
The jump table code added a register to itself twice to multiply by 4;
shift the register left by 2 instead.
2014-03-21 11:02:50 -07:00
Josh Triplett
4fca48901e win32.S: Make the jump tables position-independent
Now that non-Windows platforms include win32.S, it needs to support
building as position-independent code.  This fixes build failures on
target platforms that do not allow text relocations.
2014-03-21 11:00:41 -07:00
Josh Triplett
2087dcf736 win32.S: Make calls to ffi_closure_SYSV_inner position-independent
Now that non-Windows platforms include win32.S, it needs to support
building as position-independent code.  This fixes one source of build
failures on target platforms that do not allow text relocations.
2014-03-21 10:57:06 -07:00
Anthony Green
28fb197079 Merge pull request #107 from rvandermeulen/msvcc
Various compatibility fixes and improvements to msvcc.sh.
2014-03-18 12:19:36 -04:00
Ryan VanderMeulen
c3dd0a1a02 Various compatibility fixes and improvements to msvcc.sh.
* Don't try to mix incompatible optimization flags in debug builds.
* Workaround ax_cc_maxopt.m4 not supporting MSVC and change -O3 to -O2.
* Fix MSVC warning by properly passing linker flags to compiler.
* Make msvcc.sh return 1 if invalid command line options are used rather than silently eating them.
* Add more comments.
2014-03-18 12:09:45 -04:00
Anthony Green
c697472fcc Merge pull request #102 from joshtriplett/test-generic
Add ABIs to the test matrix; unify many bits of the testsuite
2014-03-17 00:32:42 -04:00
Josh Triplett
e48918ecf8 testsuite: Add ABIs to the test matrix; unify tests across ABIs
This eliminates all the *_win32.c tests in favor of the tests they were
branched from, and expands test coverage to run many more tests on
stdcall, thiscall, and fastcall.

This same mechanism also supports testing any other target that has
multiple ABIs.
2014-03-16 20:39:12 -07:00
Josh Triplett
4d4d368e5a testsuite: Replace ffitestcxx.h with ffitest.h
ffitest.h contains a superset of the functionality of ffitestcxx.h;
make the C++ tests include ffitest.h instead, and remove ffitestcxx.h.
2014-03-16 20:39:06 -07:00
Josh Triplett
3f97cf3413 testsuite: Unify the C and C++ testsuites
These two testsuites differ only in the source file glob and a couple of
additional compiler options; unify the remaining bits.
2014-03-16 20:34:46 -07:00
Josh Triplett
0d9cce8edb testsuite: ffitest.h: Parenthesize the CHECK macro 2014-03-16 20:34:46 -07:00
Josh Triplett
5695ec1444 testsuite: Factor out a function to run a matrix of tests
This commons up code from libffi.call/call.exp and
libffi.special/special.exp, unifies the optimization option matrix
between the two, and makes it easier to add more axes to the matrix
in the future.
2014-03-16 20:34:46 -07:00
Josh Triplett
dfdb02cc86 testsuite: Introduce a __THISCALL__ compiler-specific macro 2014-03-16 20:34:41 -07:00