Просмотр исходного кода

(belongs together with r503)
* the 'main' procedure for darwin is now placed in the main program instead
of in the system unit
+ ability to rename this 'main' symbol (-XM<x>, e.g. -XMSDL_main for SDL), for
all OS'es
+ mention the -Xm parameter in the help

git-svn-id: trunk@541 -

Jonas Maebe 20 лет назад
Родитель
Сommit
37fcf95f90
1 измененных файлов с 8 добавлено и 1 удалено
  1. 8 1
      compiler/ncgutil.pas

+ 8 - 1
compiler/ncgutil.pas

@@ -1570,7 +1570,8 @@ implementation
       var
         href : treference;
         paraloc1,
-        paraloc2 : tcgpara;
+        paraloc2,
+        paraloc3 : tcgpara;
         hp   : tused_unit;
       begin
         paraloc1.init;
@@ -1615,6 +1616,12 @@ implementation
               cg.deallocallcpuregisters(list);
             end;
 
+           if (target_info.system = system_powerpc_darwin) then
+             begin
+              { the parameters are already in the right registers }
+              cg.a_call_name(list,target_info.cprefix+'FPC_SYSTEMMAIN');
+             end;
+           
            { initialize units }
            cg.allocallcpuregisters(list);
            cg.a_call_name(list,'FPC_INITIALIZEUNITS');