From 2c10e841b982597a7d05c675d8149c71c439197f Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 19 Feb 2006 21:33:59 +0000 Subject: [PATCH] * ar patch from Yury git-svn-id: trunk@2638 - --- compiler/link.pas | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/compiler/link.pas b/compiler/link.pas index 3aeffceb6d..1bd58d9527 100644 --- a/compiler/link.pas +++ b/compiler/link.pas @@ -608,7 +608,7 @@ var end; var - binstr : string; + binstr : string; success : boolean; cmdstr, nextcmd : TCmdStr; current : TStringListItem; @@ -619,14 +619,15 @@ begin { Call AR } smartpath:=current_module.outputpath^+FixPath(lower(current_module.modulename^)+target_info.smartext,false); SplitBinCmd(target_ar.arcmd,binstr,cmdstr); + binstr := FindUtil(utilsprefix + binstr); Replace(cmdstr,'$LIB',maybequoted(current_module.staticlibfilename^)); { create AR commands } success := true; nextcmd := cmdstr; current := TStringListItem(SmartLinkOFiles.First); repeat - Replace(nextcmd,'$FILES',GetNextFiles(240 - length(nextcmd), current)); - success:=DoExec(FindUtil(binstr),nextcmd,false,true); + Replace(nextcmd,'$FILES',GetNextFiles(240 - length(nextcmd) + 6 - length(binstr) - 1, current)); + success:=DoExec(binstr,nextcmd,false,true); nextcmd := cmdstr; until (not assigned(current)) or (not success);