2
0
Эх сурвалжийг харах

made target macpas compile again

git-svn-id: trunk@1077 -
olle 20 жил өмнө
parent
commit
32fac59ac5

+ 2 - 1
compiler/ncgutil.pas

@@ -1595,7 +1595,8 @@ implementation
         { call startup helpers from main program }
         { call startup helpers from main program }
         if (current_procinfo.procdef.proctypeoption=potype_proginit) then
         if (current_procinfo.procdef.proctypeoption=potype_proginit) then
          begin
          begin
-           if (target_info.system = system_powerpc_darwin) then
+           if (target_info.system = system_powerpc_darwin) or
+              (target_info.system = system_powerpc_macos) then
              begin
              begin
               { the parameters are already in the right registers }
               { the parameters are already in the right registers }
               cg.a_call_name(list,target_info.cprefix+'FPC_SYSTEMMAIN');
               cg.a_call_name(list,target_info.cprefix+'FPC_SYSTEMMAIN');

+ 2 - 0
compiler/parser.pas

@@ -35,7 +35,9 @@ interface
 implementation
 implementation
 
 
     uses
     uses
+{$IFNDEF MACOS_USE_FAKE_SYSUTILS}
       sysutils,
       sysutils,
+{$ENDIF MACOS_USE_FAKE_SYSUTILS}
       cutils,cclasses,
       cutils,cclasses,
       globtype,version,tokens,systems,globals,verbose,
       globtype,version,tokens,systems,globals,verbose,
       symbase,symtable,symsym,
       symbase,symtable,symsym,

+ 6 - 0
rtl/macos/system.pp

@@ -213,18 +213,24 @@ end;
                          SystemUnit Initialization
                          SystemUnit Initialization
 *****************************************************************************}
 *****************************************************************************}
 
 
+{$ifndef FPC_DARWIN_PASCALMAIN}
 procedure pascalmain; external name 'PASCALMAIN';
 procedure pascalmain; external name 'PASCALMAIN';
 
 
 {Main entry point in C style, needed to capture program parameters.
 {Main entry point in C style, needed to capture program parameters.
  For this to work, the system unit must be before the main program
  For this to work, the system unit must be before the main program
  in the linking order.}
  in the linking order.}
 procedure main(argcparam: Longint; argvparam: ppchar; envpparam: ppchar); cdecl; [public];
 procedure main(argcparam: Longint; argvparam: ppchar; envpparam: ppchar); cdecl; [public];
+{$else FPC_DARWIN_PASCALMAIN}
+procedure FPC_SYSTEMMAIN(argcparam: Longint; argvparam: ppchar; envpparam: ppchar); cdecl; [public];
+{$endif FPC_DARWIN_PASCALMAIN}
 
 
 begin
 begin
   argc:= argcparam;
   argc:= argcparam;
   argv:= argvparam;
   argv:= argvparam;
   envp:= envpparam;
   envp:= envpparam;
+{$ifndef FPC_DARWIN_PASCALMAIN}
   pascalmain;  {run the pascal main program}
   pascalmain;  {run the pascal main program}
+{$endif FPC_DARWIN_PASCALMAIN}
 end;
 end;
 
 
 procedure setup_arguments;
 procedure setup_arguments;