mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-11 11:18:17 +02:00

Switch Mac OS X to indirect entry information. compiler/systems/t_bsd.pas, TLinkerBSD: + implement InitSysInitUnitName compiler/system.pas: * systems_internal_sysinit: add Darwin systems compiler/hlcgobj.pas, thlcgobj: * gen_proc_symbol_end: for Darwin systems don't directly call PascalMain for libraries, but FPC_LIBMAIN instead rtl/darwin: + add sysinit.pas unit which contains the executable and library entry points for Darwin rtl/darwin/Makefile.fpc: * add sysinit unit rtl/bsd/sysosh.inc: + add a Darwin specific TPlatformEntryInformation (could probably be used for all Unix systems...) rtl/bsd/system.pp: * define FPC_HAS_INDIRECT_MAIN_INFORMATION for Darwin systems once we're no longer bootstrapping with 2.6.x + add EntryInformation variable (this could maybe moved to system.inc...) + add new procedure SysEntry that is called from the entrypoint and which sets up necessary information required by other parts of the RTL * the old FPC_SYSTEMMAIN is still in place for bootstrapping rtl/inc/systemh.inc, TEntryInformation: * PascalMain is cdecl on non-Windows systems (ToDo: really?) rtl/inc/system.inc: * initialstklen is provided by the indirect entry information, so no external here ........ Fix bootstrapping. rtl/darwin/sysinit.pas: * enable the code only when no longer bootstrapping with 2.6.x ........ Fix bootstrapping. rtl/objpas/objpas.pp: * define FPC_HAS_INDIRECT_MAIN_INFORMATION for Darwin only while not bootstrapping with 2.6.x ........ rtl/darwin/sysinit.pas: * reference PASCALMAIN correctly (I wonder how this even worked previously :/ ) git-svn-id: trunk@33949 -
44 lines
1.2 KiB
PHP
44 lines
1.2 KiB
PHP
{
|
|
This file is part of the Free Pascal run time library.
|
|
Copyright (c) 2001 by Free Pascal development team
|
|
|
|
This file implements all the base types and limits required
|
|
for a minimal POSIX compliant subset required to port the compiler
|
|
to a new OS.
|
|
|
|
See the file COPYING.FPC, included in this distribution,
|
|
for details about the copyright.
|
|
|
|
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.
|
|
|
|
**********************************************************************}
|
|
|
|
{Platform specific information}
|
|
type
|
|
{ fd are int in C also for 64bit targets (x86_64) }
|
|
THandle = Longint;
|
|
TThreadRec = record end;
|
|
TThreadID = ^TThreadRec;
|
|
|
|
{ pthread_mutex_t }
|
|
PRTLCriticalSection = ^TRTLCriticalSection;
|
|
TRTLCriticalSection = {$i pmutext.inc}
|
|
|
|
{$ifdef darwin}
|
|
{$define HAS_ENTRYINFORMATION_OS}
|
|
TEntryInformationOS = record
|
|
argc: longint;
|
|
argv: ppchar;
|
|
envp: ppchar;
|
|
stklen: sizeuint;
|
|
end;
|
|
{$endif}
|
|
|
|
{$if defined(darwin) and defined(powerpc)}
|
|
{ for profiling support }
|
|
procedure mcount(p: pointer); compilerproc; cdecl; external;
|
|
{$endif}
|
|
|