瀏覽代碼

* fixed patch of r2313 (unit init code was not called anymore for
libraries)

git-svn-id: trunk@2334 -

Jonas Maebe 19 年之前
父節點
當前提交
46c0fc3e7c
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      compiler/ncgutil.pas

+ 4 - 4
compiler/ncgutil.pas

@@ -1703,11 +1703,11 @@ implementation
           end;
           end;
 
 
         { call startup helpers from main program }
         { call startup helpers from main program }
-        if (current_procinfo.procdef.proctypeoption=potype_proginit) and
-           not(current_module.islibrary) then
+        if (current_procinfo.procdef.proctypeoption=potype_proginit) then
          begin
          begin
-           if (target_info.system = system_powerpc_darwin) or
-              (target_info.system = system_powerpc_macos) then
+           if ((target_info.system = system_powerpc_darwin) or
+               (target_info.system = system_powerpc_macos)) and
+              not(current_module.islibrary) 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');