mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-27 20:11:02 +02:00
Enable libffi package on win32,win64 and BSD targets, remove CPU restriction
git-svn-id: trunk@43975 -
This commit is contained in:
parent
0176697483
commit
367eac9743
@ -3,7 +3,7 @@ program simple;
|
||||
uses
|
||||
ffi;
|
||||
|
||||
function WritePChar(s: PChar): LongInt; cdecl;
|
||||
function WritePChar(s: PChar): LongInt;{$ifdef windows}stdcall;{$else}cdecl;{$endif}
|
||||
begin
|
||||
Writeln(s);
|
||||
WritePChar := StrLen(s);
|
||||
|
@ -24,8 +24,7 @@ begin
|
||||
P.Email := 'libffi-discuss@sourceware.org';
|
||||
P.Description := 'Headers for the libFFI library (Foreign Function Interface)';
|
||||
P.NeedLibC:= true; // true for headers that indirectly link to libc?
|
||||
P.OSes := [linux];
|
||||
P.CPUs := [x86_64];
|
||||
P.OSes := [linux,win32,win64] + AllBSDOSes;
|
||||
P.Dependencies.Add('rtl-objpas');
|
||||
|
||||
P.SourcePath.Add('src');
|
||||
|
@ -184,7 +184,11 @@ const
|
||||
FFI_DEFAULT_ABI = ffi_abi(Ord(FFI_SYSV) {$ifdef FREEBSD}or FFI_SYSV_STRUCT_RET{$endif});
|
||||
{$endif}
|
||||
{$else}
|
||||
{$ifdef WIN32}
|
||||
FFI_DEFAULT_ABI = FFI_STDCALL;
|
||||
{$else}
|
||||
FFI_DEFAULT_ABI = FFI_SYSV;
|
||||
{$endif}
|
||||
{$endif}
|
||||
|
||||
const
|
||||
@ -216,7 +220,7 @@ const
|
||||
{$endif}
|
||||
|
||||
{$if defined(CPUARM)}
|
||||
{$if definde(DARWIN)}
|
||||
{$if defined(DARWIN)}
|
||||
FFI_TRAMPOLINE_SIZE = 12;
|
||||
FFI_TRAMPOLINE_CLOSURE_OFFSET = 8;
|
||||
{$elseif FFI_EXEC_TRAMPOLINE_TABLE}
|
||||
|
Loading…
Reference in New Issue
Block a user