diff --git a/compiler/aggas.pas b/compiler/aggas.pas index 6633b8d75a..447c039492 100644 --- a/compiler/aggas.pas +++ b/compiler/aggas.pas @@ -257,7 +257,8 @@ implementation case target_info.system of system_i386_OS2, system_i386_EMX : ; - system_powerpc_darwin : + system_powerpc_darwin, + system_i386_darwin: begin if atype=sec_stub then AsmWrite('.section '); @@ -272,7 +273,7 @@ implementation AsmWrite(', "a", @progbits'); sec_stub : begin - if target_info.system=system_powerpc_darwin then + if (target_info.system in [system_powerpc_darwin,system_i386_darwin]) then AsmWrite(',__symbol_stub1,symbol_stubs,pure_instructions,16'); end; end; @@ -473,7 +474,7 @@ implementation begin if tai_align(hp).aligntype>1 then begin - if target_info.system <> system_powerpc_darwin then + if not(target_info.system in [system_powerpc_darwin,system_i386_darwin]) then begin AsmWrite(#9'.balign '+tostr(tai_align(hp).aligntype)); if tai_align(hp).use_op then @@ -506,7 +507,7 @@ implementation ait_datablock : begin - if target_info.system=system_powerpc_darwin then + if target_info.system in [system_powerpc_darwin,system_i386_darwin] then begin {On Mac OS X you can't have common symbols in a shared library, since those are in the TEXT section and the text section is diff --git a/compiler/ncgutil.pas b/compiler/ncgutil.pas index 86b6d5d6a0..000bc881e0 100644 --- a/compiler/ncgutil.pas +++ b/compiler/ncgutil.pas @@ -1690,8 +1690,7 @@ implementation { call startup helpers from main program } if (current_procinfo.procdef.proctypeoption=potype_proginit) then begin - if ((target_info.system = system_powerpc_darwin) or - (target_info.system = system_powerpc_macos)) and + if (target_info.system in [system_powerpc_darwin,system_i386_darwin,system_powerpc_macos]) and not(current_module.islibrary) then begin { the parameters are already in the right registers } diff --git a/compiler/parser.pas b/compiler/parser.pas index 6e714bdaa4..218b99982d 100644 --- a/compiler/parser.pas +++ b/compiler/parser.pas @@ -253,10 +253,8 @@ implementation asmlist[i]:=Taasmoutput.create; { PIC data } -{$ifdef powerpc} - if target_info.system=system_powerpc_darwin then + if (target_info.system in [system_powerpc_darwin,system_i386_darwin]) then asmlist[al_picdata].concat(tai_directive.create(asd_non_lazy_symbol_pointer,'')); -{$endif powerpc} { Resource strings } cresstr.resourcestrings:=Tresourcestrings.Create; diff --git a/compiler/pdecvar.pas b/compiler/pdecvar.pas index e2862a87f7..5ead4794ca 100644 --- a/compiler/pdecvar.pas +++ b/compiler/pdecvar.pas @@ -942,7 +942,7 @@ implementation include(vs.varoptions,vo_is_C_var); if (is_dll) and - (target_info.system = system_powerpc_darwin) then + (target_info.system in [system_powerpc_darwin,system_i386_darwin]) then C_Name := target_info.Cprefix+C_Name; if export_var then