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

git-svn-id: trunk@2875 -
This commit is contained in:
Jonas Maebe 2006-03-11 22:31:56 +00:00
parent fad4e25b39
commit 638b2ecb2b
2 changed files with 11 additions and 6 deletions

View File

@ -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

View File

@ -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);