瀏覽代碼

Merged revisions 2875 via svnmerge from
svn+ssh://[email protected]/FPC/svn/fpc/trunk

........
r2875 | jonas | 2006-03-11 23:31:56 +0100 (Sat, 11 Mar 2006) | 2 lines

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

........

git-svn-id: branches/fixes_2_0@2894 -

Jonas Maebe 19 年之前
父節點
當前提交
67f8957bff
共有 2 個文件被更改,包括 12 次插入7 次删除
  1. 4 2
      compiler/pmodules.pas
  2. 8 5
      compiler/systems/t_bsd.pas

+ 4 - 2
compiler/pmodules.pas

@@ -1512,8 +1512,10 @@ implementation
           begin
             pd:=create_main_proc(make_mangledname('',current_module.localsymtable,mainaliasname),potype_proginit,st);
             { Win32 startup code needs a single name }
-//            if (target_info.system in [system_i386_win32,system_i386_wdosx]) then
-            pd.aliasnames.insert('PASCALMAIN');
+            if not(target_info.system in [system_powerpc_darwin,system_i386_darwin]) then
+              pd.aliasnames.insert('PASCALMAIN')
+            else
+              pd.aliasnames.insert(target_info.Cprefix+'PASCALMAIN')
           end
          else if (target_info.system = system_i386_netware) or
                  (target_info.system = system_i386_netwlibc) then

+ 8 - 5
compiler/systems/t_bsd.pas

@@ -383,11 +383,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);