mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 11:59:27 +02:00
+ support for -Xp to path the compiler executables to fpc
git-svn-id: trunk@5040 -
This commit is contained in:
parent
9c6c972509
commit
edf01e4460
@ -1258,6 +1258,7 @@ begin
|
|||||||
else
|
else
|
||||||
include(initglobalswitches,cs_link_map);
|
include(initglobalswitches,cs_link_map);
|
||||||
end;
|
end;
|
||||||
|
'p' : ; { Ignore used by fpc.pp }
|
||||||
'r' :
|
'r' :
|
||||||
begin
|
begin
|
||||||
rlinkpath:=Copy(more,2,length(More)-1);
|
rlinkpath:=Copy(more,2,length(More)-1);
|
||||||
|
@ -71,6 +71,9 @@ program fpc;
|
|||||||
findclose(Info);
|
findclose(Info);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
extrapath : ansistring;
|
||||||
|
|
||||||
function findexe(var ppcbin:string): boolean;
|
function findexe(var ppcbin:string): boolean;
|
||||||
var
|
var
|
||||||
path : string;
|
path : string;
|
||||||
@ -79,9 +82,16 @@ program fpc;
|
|||||||
findexe:=false;
|
findexe:=false;
|
||||||
ppcbin:=ppcbin+exeext;
|
ppcbin:=ppcbin+exeext;
|
||||||
|
|
||||||
|
if (extrapath<>'') and (extrapath[length(extrapath)]<>DirectorySeparator) then
|
||||||
|
extrapath:=extrapath+DirectorySeparator;
|
||||||
{ get path of fpc.exe }
|
{ get path of fpc.exe }
|
||||||
path:=splitpath(paramstr(0));
|
path:=splitpath(paramstr(0));
|
||||||
if FileExists(path+ppcbin) then
|
if FileExists(extrapath+ppcbin) then
|
||||||
|
begin
|
||||||
|
ppcbin:=extrapath+ppcbin;
|
||||||
|
findexe:=true;
|
||||||
|
end
|
||||||
|
else if FileExists(path+ppcbin) then
|
||||||
begin
|
begin
|
||||||
ppcbin:=path+ppcbin;
|
ppcbin:=path+ppcbin;
|
||||||
findexe:=true;
|
findexe:=true;
|
||||||
@ -111,6 +121,7 @@ program fpc;
|
|||||||
ppccommandline:='';
|
ppccommandline:='';
|
||||||
cpusuffix :=''; // if not empty, signals attempt at cross
|
cpusuffix :=''; // if not empty, signals attempt at cross
|
||||||
// compiler.
|
// compiler.
|
||||||
|
extrapath :='';
|
||||||
{$ifdef i386}
|
{$ifdef i386}
|
||||||
ppcbin:='ppc386';
|
ppcbin:='ppc386';
|
||||||
processorname:='i386';
|
processorname:='i386';
|
||||||
@ -204,6 +215,8 @@ program fpc;
|
|||||||
ppcbin:='ppcross'+cpusuffix;
|
ppcbin:='ppcross'+cpusuffix;
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
|
else if pos('-Xp',s)=1 then
|
||||||
|
extrapath:=copy(s,4,length(s)-3)
|
||||||
else
|
else
|
||||||
ppccommandline:=ppccommandline+s+' ';
|
ppccommandline:=ppccommandline+s+' ';
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user