Bläddra i källkod

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

git-svn-id: trunk@2334 -

Jonas Maebe 19 år sedan
förälder
incheckning
46c0fc3e7c
1 ändrade filer med 4 tillägg och 4 borttagningar
  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');