Преглед изворни кода

* fix dynamic library compilation on darwin (both i386 and ppc)

git-svn-id: trunk@2875 -
Jonas Maebe пре 19 година
родитељ
комит
638b2ecb2b
2 измењених фајлова са 11 додато и 6 уклоњено
  1. 3 1
      compiler/pmodules.pas
  2. 8 5
      compiler/systems/t_bsd.pas

+ 3 - 1
compiler/pmodules.pas

@@ -1291,7 +1291,9 @@ implementation
             pd:=create_main_proc(make_mangledname('',current_module.localsymtable,mainaliasname),potype_proginit,current_module.localsymtable);
             { Win32 startup code needs a single name }
             if not(target_info.system in [system_powerpc_darwin,system_i386_darwin]) then
-              pd.aliasnames.insert('PASCALMAIN');
+              pd.aliasnames.insert('PASCALMAIN')
+            else
+              pd.aliasnames.insert(target_info.Cprefix+'PASCALMAIN')
           end
          else if (target_info.system in [system_i386_netware,system_i386_netwlibc,system_powerpc_macos,system_powerpc_darwin,system_i386_darwin]) then
            begin

+ 8 - 5
compiler/systems/t_bsd.pas

@@ -390,11 +390,14 @@ begin
   { Open link.res file }
   LinkRes:=TLinkRes.Create(outputexedir+Info.ResName);
 
-  case target_info.system of
-    system_powerpc_darwin:
-      LinkRes.Add('-arch ppc');
-    system_i386_darwin:
-      LinkRes.Add('-arch i386');
+  if (not isdll) then
+    begin
+      case target_info.system of
+        system_powerpc_darwin:
+           LinkRes.Add('-arch ppc');
+        system_i386_darwin:
+           LinkRes.Add('-arch i386');
+      end;
   end;
   { Write path to search libraries }
   HPath:=TStringListItem(current_module.locallibrarysearchpath.First);