From 9d2e71ff699c447a2fc954ef15928f6697d60a8e Mon Sep 17 00:00:00 2001 From: florian Date: Sat, 12 Jun 2021 20:45:15 +0000 Subject: [PATCH] * patch by Alfred to use new linker names for Android NDK >=22, resolves #38987 git-svn-id: trunk@49498 - --- compiler/systems/t_android.pas | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/compiler/systems/t_android.pas b/compiler/systems/t_android.pas index 39da9c40f8..3ee4b66a5e 100644 --- a/compiler/systems/t_android.pas +++ b/compiler/systems/t_android.pas @@ -436,14 +436,16 @@ begin if IsSharedLib then Replace(cmdstr,'$SONAME',ExtractFileName(outname)); - binstr:=FindUtil(utilsprefix+BinStr); { We should use BFD version of LD, since GOLD version does not support INSERT command in linker scripts } - if binstr <> '' then begin - { Checking if ld.bfd exists } - s:=ChangeFileExt(binstr, '.bfd' + source_info.exeext); + s:=utilsprefix+binstr+'.bfd'; + if (source_info.exeext<>'') then + s:=s+source_info.exeext; + s:=FindUtil(s); if FileExists(s, True) then - binstr:=s; - end; + binstr:=s + else + // fallback to ld for very old or custom binutils + binstr:=FindUtil(utilsprefix+BinStr); success:=DoExec(binstr,CmdStr,true,false);