mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 11:30:31 +02:00
* Delegate darwin ifdef out of program flow, towards const, for clarity
This commit is contained in:
parent
c0893e5c16
commit
babcb631f8
@ -44,6 +44,18 @@ program fpc;
|
|||||||
{$endif HASAMIGA}
|
{$endif HASAMIGA}
|
||||||
{$endif UNIX}
|
{$endif UNIX}
|
||||||
|
|
||||||
|
Const
|
||||||
|
{$ifdef darwin}
|
||||||
|
{ the mach-o format supports "fat" binaries whereby }
|
||||||
|
{ a single executable contains machine code for }
|
||||||
|
{ several architectures -> it is counter-intuitive }
|
||||||
|
{ and non-standard to use different binary names }
|
||||||
|
{ for cross-compilers vs. native compilers }
|
||||||
|
CrossSuffix = '';
|
||||||
|
{$else not darwin}
|
||||||
|
CrossSuffix = 'ross';
|
||||||
|
{$endif not darwin}
|
||||||
|
|
||||||
|
|
||||||
procedure error(const s : string);
|
procedure error(const s : string);
|
||||||
|
|
||||||
@ -295,17 +307,7 @@ program fpc;
|
|||||||
if TargetCPU <> SourceCPU then
|
if TargetCPU <> SourceCPU then
|
||||||
begin
|
begin
|
||||||
cpusuffix:=processortosuffix(TargetCPU);
|
cpusuffix:=processortosuffix(TargetCPU);
|
||||||
|
ppcbin:='ppc'+crosssuffix+cpusuffix;
|
||||||
{$ifndef darwin}
|
|
||||||
ppcbin:='ppcross'+cpusuffix;
|
|
||||||
{$else not darwin}
|
|
||||||
{ the mach-o format supports "fat" binaries whereby }
|
|
||||||
{ a single executable contains machine code for }
|
|
||||||
{ several architectures -> it is counter-intuitive }
|
|
||||||
{ and non-standard to use different binary names }
|
|
||||||
{ for cross-compilers vs. native compilers }
|
|
||||||
ppcbin:='ppc'+cpusuffix;
|
|
||||||
{$endif not darwin}
|
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else if pos('-Xp',s)=1 then
|
else if pos('-Xp',s)=1 then
|
||||||
|
Loading…
Reference in New Issue
Block a user