Explorar o código

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

git-svn-id: trunk@2334 -

Jonas Maebe %!s(int64=19) %!d(string=hai) anos
pai
achega
46c0fc3e7c
Modificáronse 1 ficheiros con 4 adicións e 4 borrados
  1. 4 4
      compiler/ncgutil.pas

+ 4 - 4
compiler/ncgutil.pas

@@ -1703,11 +1703,11 @@ implementation
           end;
 
         { 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
-           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
               { the parameters are already in the right registers }
               cg.a_call_name(list,target_info.cprefix+'FPC_SYSTEMMAIN');