Commit Graph

87 Commits

Author SHA1 Message Date
Anthony Green
8f47ec404f Don't set AM_MAKEFLAGS 2018-03-27 05:35:35 -04:00
Anthony Green
f3c2729ee4 Add libffi.map.in to extra dist files 2018-03-23 11:47:29 -04:00
Anthony Green
d1689dd3bf Fix travis badge. Add REAME.md to dist files 2018-03-13 09:24:37 -04:00
Stef O'Rear
3840d49aaa New RISC-V port (#281)
* Add RISC-V support

This patch adds support for the RISC-V architecture (https://riscv.org).

This patch has been tested using QEMU user-mode emulation and GCC 7.2.0
in the following configurations:

* -march=rv32imac -mabi=ilp32
* -march=rv32g -mabi=ilp32d
* -march=rv64imac -mabi=lp64
* -march=rv64g -mabi=lp64d

The ABI currently can be found at
https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md .

* Add RISC-V to README

* RISC-V: fix configure.host
2018-03-11 08:55:15 -04:00
Sergei Trofimovich
cd5e9f8b87 Makefile.am: add 'src/s390/internal.h' to source tarball
commit 2f530de168
("s390: Reorganize assembly") introduced new header
(similar to other arches) but did not add it to source
tarball.

As a result build from 'make dist' tarballs failed as:

```
../src/s390/ffi.c:34:10: fatal error: internal.h: No such file or directory
 #include "internal.h"
          ^~~~~~~~~~~~
```

To fix it the change adds file to 'Makefile.am'.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2017-11-05 13:56:42 +00:00
Tom Tromey
9f1f8741b2 Merge pull request #319 from angerman/patch-5
Adds `local.exp` to DISTCLEANFILES
2017-10-01 20:25:50 -06:00
Moritz Angermann
6cf0dea78a Change CLEANFILES to DISTCLEANFILES 2017-10-02 10:20:16 +08:00
Tom Tromey
dca078f468 Merge pull request #316 from angerman/patch-2
Add `configure.host` and `libtool-version` to the `EXTRA_DIST` files
2017-10-01 20:19:53 -06:00
Moritz Angermann
bccba9a34e Merged 2017-10-01 12:48:17 +08:00
Moritz Angermann
6b6df1a7bb Adds local.exp to CLEANFILES
With #315, #316, #317, #318 and this patch, running
```
AM_DISTCHECK_CONFIGURE_FLAGS=--disable-docs make distcheck
```
should complete successfully.
2017-10-01 12:37:53 +08:00
Moritz Angermann
59d65d74ae Include libtool-version in the EXTRA_DIST files. 2017-10-01 12:23:31 +08:00
Moritz Angermann
4c6aa78d75 Add src/x86/asmnames.h to noinst_HEADERS
In eaa59755fc, macros from `unix64.S` were extracted into `asmnames.h` to be used with `win64.S` as well. As such these are required by `unix64.S`, which fails to build without them.
2017-10-01 11:32:41 +08:00
Moritz Angermann
a1e6ccb67e Add configure.host to the EXTRA_DIST files
When running `make dist`, `configure.host` would not result in the distribution tarball, however `configure` would try to read it, and as such the tarball would not be buildable.
2017-10-01 11:28:40 +08:00
Richard Henderson
c02c341444 Use ELF symbol versioning
At the same time, we must bump the (major) ABI version.  This needed to be
done anyway due to ABI breakage in the AArch64 port (see 12cf89ee and the
corresponding GCC PR70024).
2016-05-04 06:49:50 -10:00
Tom Tromey
6dd5fd5a64 fix documentation building
An earlier patch added --disable-docs, but went too far, making it
impossible to build the docs.

It turns out that Automake seemingly has a bug preventing the
conditional build of an info file.  So, this patch works around the
bug by putting the info_TEXINFOS rule into a new doc/Makefile.am.

Tested by building with and without --disable-docs and looking for the
existence of doc/libffi.info.
2016-02-22 15:49:43 -07:00
Havard Graff
fa7a257113 Add configure-option to disable building docs 2015-05-12 10:45:13 +02:00
Richard Henderson
9f112619c1 x86: Best guess at update for Darwin 2015-01-05 10:01:37 -08:00
Richard Henderson
5d69d57a05 configure: Move target source selection into configure.host
This eliminates the AM_CONDITIONAL ugliness, which eliminates
just a bit of extra boilerplate for a new target.

At the same time, properly categorize the EXTRA_DIST files
into SOURCES and HEADERS, for the generation of ctags.
2014-11-14 13:06:12 +01:00
Richard Henderson
2b27890ba7 sparc: Rewrite everything
It's impossible to call between v8 and v9 ABIs, because of the stack bias
in the v9 ABI.  So let's not pretend it's just not implemented yet.  Split
the v9 code out to a separate file.

The register windows prevent ffi_call from setting up the entire stack
frame the assembly, but we needn't make an indirect call back to prep_args.
2014-11-12 09:35:21 +01:00
Richard Henderson
a4b785ea69 arm: Rewrite ffi_closure
Move the push of the argument registers into ffi_closure_SYSV,
reducing the size of the trampoline.
2014-11-12 09:32:13 +01:00
Richard Henderson
b21ec1ce78 x86: Rewrite closures
Move everything into sysv.S, removing win32.S and freebsd.S.
Handle all abis with a single ffi_closure_inner function.
Move complexity of the raw THISCALL trampoline into assembly
instead of the trampoline itself.
Only push the context for the REGISTER abi; let the rest
receive it in a register.
2014-11-12 09:15:54 +01:00
Richard Henderson
99db4d42ac win64: Rewrite
It's way too different from the 32-bit ABIs with which it is
currently associated. As seen from all of the existing XFAILs.
2014-11-12 09:15:35 +01:00
Sebastian Macke
0f316ab7c1 Add OpenRISC support
This patch adds support for the OpenRISC architecture.
(http://opencores.org/or1k/Main_Page)

This patch has been tested under Linux with QEMU-user emulation support.
- 32 Bit
- big endian
- delayed instructions
This is the only available configuration under Linux.

The description of the ABI can be found on the official website.

Is passes the testsuite except of the unwindtest_ffi_call.cc
testcase, which seems to be a problem of gcc and not libffi.
Some testcases of the gcc testsuite still fail.

Signed-off-by: Sebastian Macke <sebastian@macke.de>
2014-09-27 00:56:56 +00:00
Anthony Green
0c2251a42d Support versions of git older than 1.8.5 2014-05-11 10:22:30 -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
Ryan VanderMeulen
46c5d3c30f Change double quotes in Makefile.am to single quotes.
This was originally done in PR #84, except the change was made to Makefile.in instead of Makefile.am and was therefore reverted the next time the files were regenerated.
2014-03-16 21:16:08 -04:00
Anthony Green
d948d0a729 Merge pull request #98 from joshtriplett/unconfigure.host
Merge configure.host into configure.ac
2014-03-16 10:53:48 -04:00
Josh Triplett
a86bd318e2 Merge configure.host into configure.ac
configure.host only has a single entry, and shows no signs of needing
more added.
2014-03-16 07:05:28 -07:00
Josh Triplett
1c68c07217 Generate ChangeLog from git in make dist
Archive the existing ChangeLog to ChangeLog.libffi-3.1
2014-03-16 06:16:20 -07:00
Josh Triplett
e1911f78df Add support for stdcall, thiscall, and fastcall on non-Windows x86-32
Linux supports the stdcall calling convention, either via functions
explicitly declared with the stdcall attribute, or via code compiled
with -mrtd which effectively makes stdcall the default.

This introduces FFI_STDCALL, FFI_THISCALL, and FFI_FASTCALL on
non-Windows x86-32 platforms, as non-default calling conventions.
2014-03-16 05:05:06 -07:00
Anthony Green
634a475eaf Update Makefile for new darwin scripts 2014-03-01 18:37:29 -05:00
Anthony Green
a04e30ba3d Add missing -DFFI_DEBUG flag 2014-02-28 17:20:59 -05:00
Anthony Green
7ea677733b Remove build-ios from Makefile
Conflicts:
	ChangeLog
2014-02-05 14:28:59 -05:00
Anthony Green
3dc3f32c35 Undo iOS ARM64 changes. 2013-12-05 16:23:25 -05:00
Anthony Green
d4b931c1b8 Remove build-ios from Makefile 2013-11-30 20:58:31 -05:00
Alan Modra
ab79d6e219 This separates the 32-bit sysv/linux/bsd code from the 64-bit linux
code, and makes it possible to link code compiled with different
options to those used to compile libffi.  For example, a
-mlong-double-128 libffi can be used with -mlong-double-64 code.

Using the return value area as a place to pass parameters wasn't such
a good idea, causing a failure of cls_ulonglong.c.  I didn't see this
when running the mainline gcc libffi testsuite because that version of
the test is inferior to the upstreamm libffi test.

Using NUM_FPR_ARG_REGISTERS rather than NUM_FPR_ARG_REGISTERS64 meant
that a parameter save area could be allocated before it was strictly
necessary.  Wrong but harmless.  Found when splitting apart ffi.c
into 32-bit and 64-bit support.
2013-11-21 21:24:56 -05:00
Anthony Green
c2422174b3 Merge pull request #45 from foss-for-synopsys-dwc-arc-processors/arc_support
arc: Fix build error
2013-11-02 17:11:08 -04:00
Sandra Loosemore
16b93a211b Add nios2 port. 2013-10-15 15:33:59 -04:00
Anthony Green
d2fcbcdfbe Add m88k and VAX support. Update some configury bits. 2013-10-08 06:27:46 -04:00
Mischa Jonker
d918d47809 arc: Fix build error
One part of the patch for ARC support was missing in the upstreamed
version.

Signed-off-by: Mischa Jonker <mjonker@synopsys.com>
2013-07-08 15:51:36 +02:00
Anthony Green
f88118b345 Revert "Merge pull request #36 from abergmeier/emscripten_fix"
This reverts commit 6a4d901dde, reversing
changes made to b50a13b9c0.
2013-07-02 15:51:27 -04:00
Anthony Green
6a4d901dde Merge pull request #36 from abergmeier/emscripten_fix
Fixes for building with Emscripten
2013-07-02 12:12:34 -07:00
Mischa Jonker
b082e15091 Add ARC support
This adds support for the ARC architecture to libffi. DesignWare ARC
is a family of processors from Synopsys, Inc.

This patch has been tested on a little-endian system and passes
the testsuite.

Signed-off-by: Mischa Jonker <mjonker@synopsys.com>
2013-06-14 10:06:30 +02:00
Andreas Bergmeier
587002c092 Enable disabling of libtool on platforms where it does not work (e.g. LLVM).
Build libraries normally then.
2013-04-19 17:12:24 +02:00
Anthony Green
215763d012 Update configury. 2013-03-16 07:57:35 -04:00
Anthony Green
2fb527a017 Add Meta processor support 2013-03-16 07:46:38 -04:00
Anthony Green
f308faf1ea Add moxie support. Release 3.0.12. 2013-02-11 14:25:13 -05:00
Anthony Green
7aab825cf1 Add missing files to dist 2013-02-08 13:26:21 -05:00
Anthony Green
ed6ae9501b Add libtool-ldflags. Define toolexeclibdir for non-GCC builds. 2013-02-07 16:43:36 -05:00