[fpc-devel] [PATCH] fpcmmain.pp: fixed FPCDIR detection on x86_64
Florian Klaempfl
florian at freepascal.org
Wed Feb 7 22:40:49 CET 2007
Alexey Tourbin schrieb:
Shouldn't we simply change the ppc386 into fpc ?
> ---
> fpcmmain.pp | 15 +++++++++++----
> 1 files changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/fpcmmain.pp b/fpcmmain.pp
> index 9a1dd3a..a2a9a90 100644
> --- a/fpcmmain.pp
> +++ b/fpcmmain.pp
> @@ -1146,6 +1146,13 @@ implementation
>
>
> procedure TFPCMake.AddFPCDefaultVariables;
> + const
> + ppc =
> +{$ifdef cpux86_64}
> + 'ppcx64';
> +{$else}
> + 'ppc386';
> +{$endif}
> var
> hs,s : string;
> begin
> @@ -1182,9 +1189,9 @@ implementation
> begin
> {$ifdef UNIX}
> {$ifndef NO_UNIX_UNIT}
> - if FileExists('/usr/local/bin/ppc386') then
> + if FileExists('/usr/local/bin/'+ppc) then
> begin
> - s:=ExtractFilePath({$ifdef ver1_0}ReadLink{$else}fpReadlink{$endif}('/usr/local/bin/ppc386'));
> + s:=ExtractFilePath({$ifdef ver1_0}ReadLink{$else}fpReadlink{$endif}('/usr/local/bin/'+ppc));
> if s<>'' then
> begin
> if s[length(s)]='/' then
> @@ -1194,9 +1201,9 @@ implementation
> end;
> if hs='' then
> begin
> - if FileExists('/usr/bin/ppc386') then
> + if FileExists('/usr/bin/'+ppc) then
> begin
> - s:=ExtractFilePath({$ifdef ver1_0}ReadLink{$else}fpReadLink{$endif}('/usr/bin/ppc386'));
> + s:=ExtractFilePath({$ifdef ver1_0}ReadLink{$else}fpReadLink{$endif}('/usr/bin/'+ppc));
> if s<>'' then
> begin
> if s[length(s)]='/' then
More information about the fpc-devel
mailing list