From 708aaa7b97f598f0c378578e491a6e16f5a4bda7 Mon Sep 17 00:00:00 2001 From: florian Date: Thu, 2 Mar 2023 22:56:23 +0100 Subject: [PATCH] * fix (hopefully) build without an ld.bfd variant --- compiler/link.pas | 6 +++--- compiler/systems/t_android.pas | 2 +- compiler/systems/t_linux.pas | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/compiler/link.pas b/compiler/link.pas index 95a4a927d4..23ac646e58 100644 --- a/compiler/link.pas +++ b/compiler/link.pas @@ -88,7 +88,7 @@ interface Info : TLinkerInfo; Constructor Create;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 DoExec(const command:TCmdStr; para:TCmdStr;showinfo,useshell:boolean):boolean; procedure SetDefaultInfo;virtual; @@ -812,7 +812,7 @@ Implementation end; - Function TExternalLinker.FindUtil(const s:TCmdStr):TCmdStr; + Function TExternalLinker.FindUtil(const s:TCmdStr;throwerror: boolean=true):TCmdStr; var Found : boolean; FoundBin : TCmdStr; @@ -841,7 +841,7 @@ Implementation Found:=FindFile(utilexe,utilsdirectory,false,Foundbin); if (not Found) then 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 Message1(exec_e_util_not_found,utilexe); current_settings.globalswitches:=current_settings.globalswitches+[cs_link_nolink]; diff --git a/compiler/systems/t_android.pas b/compiler/systems/t_android.pas index f6535a5807..4552ae3003 100644 --- a/compiler/systems/t_android.pas +++ b/compiler/systems/t_android.pas @@ -440,7 +440,7 @@ begin s:=utilsprefix+binstr+'.bfd'; if (source_info.exeext<>'') then s:=s+source_info.exeext; - s:=FindUtil(s); + s:=FindUtil(s,false); if FileExists(s, True) then binstr:=s else diff --git a/compiler/systems/t_linux.pas b/compiler/systems/t_linux.pas index c65278e47f..06d5d7a77a 100644 --- a/compiler/systems/t_linux.pas +++ b/compiler/systems/t_linux.pas @@ -832,7 +832,7 @@ begin if cs_large in current_settings.globalswitches then cmdstr:=cmdstr+' --no-relax'; - s:=FindUtil(utilsprefix+BinStr+'.bfd'); + s:=FindUtil(utilsprefix+BinStr+'.bfd',false); if FileExists(s, True) then binstr:=s else