mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-26 07:58:17 +02:00
* fix (hopefully) build without an ld.bfd variant
This commit is contained in:
parent
40f23030dc
commit
708aaa7b97
@ -88,7 +88,7 @@ interface
|
|||||||
Info : TLinkerInfo;
|
Info : TLinkerInfo;
|
||||||
Constructor Create;override;
|
Constructor Create;override;
|
||||||
Destructor Destroy;override;
|
Destructor Destroy;override;
|
||||||
Function FindUtil(const s:TCmdStr):TCmdStr;
|
Function FindUtil(const s:TCmdStr;throwerror: boolean=true):TCmdStr;
|
||||||
Function CatFileContent(para:TCmdStr):TCmdStr;
|
Function CatFileContent(para:TCmdStr):TCmdStr;
|
||||||
Function DoExec(const command:TCmdStr; para:TCmdStr;showinfo,useshell:boolean):boolean;
|
Function DoExec(const command:TCmdStr; para:TCmdStr;showinfo,useshell:boolean):boolean;
|
||||||
procedure SetDefaultInfo;virtual;
|
procedure SetDefaultInfo;virtual;
|
||||||
@ -812,7 +812,7 @@ Implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
Function TExternalLinker.FindUtil(const s:TCmdStr):TCmdStr;
|
Function TExternalLinker.FindUtil(const s:TCmdStr;throwerror: boolean=true):TCmdStr;
|
||||||
var
|
var
|
||||||
Found : boolean;
|
Found : boolean;
|
||||||
FoundBin : TCmdStr;
|
FoundBin : TCmdStr;
|
||||||
@ -841,7 +841,7 @@ Implementation
|
|||||||
Found:=FindFile(utilexe,utilsdirectory,false,Foundbin);
|
Found:=FindFile(utilexe,utilsdirectory,false,Foundbin);
|
||||||
if (not Found) then
|
if (not Found) then
|
||||||
Found:=FindExe(utilexe,false,Foundbin);
|
Found:=FindExe(utilexe,false,Foundbin);
|
||||||
if (not Found) and not(cs_link_nolink in current_settings.globalswitches) then
|
if throwerror and (not Found) and not(cs_link_nolink in current_settings.globalswitches) then
|
||||||
begin
|
begin
|
||||||
Message1(exec_e_util_not_found,utilexe);
|
Message1(exec_e_util_not_found,utilexe);
|
||||||
current_settings.globalswitches:=current_settings.globalswitches+[cs_link_nolink];
|
current_settings.globalswitches:=current_settings.globalswitches+[cs_link_nolink];
|
||||||
|
@ -440,7 +440,7 @@ begin
|
|||||||
s:=utilsprefix+binstr+'.bfd';
|
s:=utilsprefix+binstr+'.bfd';
|
||||||
if (source_info.exeext<>'') then
|
if (source_info.exeext<>'') then
|
||||||
s:=s+source_info.exeext;
|
s:=s+source_info.exeext;
|
||||||
s:=FindUtil(s);
|
s:=FindUtil(s,false);
|
||||||
if FileExists(s, True) then
|
if FileExists(s, True) then
|
||||||
binstr:=s
|
binstr:=s
|
||||||
else
|
else
|
||||||
|
@ -832,7 +832,7 @@ begin
|
|||||||
if cs_large in current_settings.globalswitches then
|
if cs_large in current_settings.globalswitches then
|
||||||
cmdstr:=cmdstr+' --no-relax';
|
cmdstr:=cmdstr+' --no-relax';
|
||||||
|
|
||||||
s:=FindUtil(utilsprefix+BinStr+'.bfd');
|
s:=FindUtil(utilsprefix+BinStr+'.bfd',false);
|
||||||
if FileExists(s, True) then
|
if FileExists(s, True) then
|
||||||
binstr:=s
|
binstr:=s
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user