mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 13:29:19 +02:00
Call FindUtil for ld or nlmconv utils at linking stage, not before
This commit is contained in:
parent
45cb7d1eff
commit
429d2cdf12
@ -258,12 +258,12 @@ begin
|
|||||||
with Info do
|
with Info do
|
||||||
begin
|
begin
|
||||||
{$ifndef netware}
|
{$ifndef netware}
|
||||||
ExeCmd[1]:= FindUtil(utilsprefix+'ld') + ' -Ur -T $RES $STRIP -o $TMPOBJ';
|
ExeCmd[1]:= 'ld -Ur -T $RES $STRIP -o $TMPOBJ';
|
||||||
ExeCmd[2]:= FindUtil(utilsprefix+'nlmconv') + ' -T$RES';
|
ExeCmd[2]:= 'nlmconv -T$RES';
|
||||||
{$else}
|
{$else}
|
||||||
{for running on netware we need absolute pathes since ld has another working directory}
|
{for running on netware we need absolute pathes since ld has another working directory}
|
||||||
ExeCmd[1]:= FindUtil(utilsprefix+'ld') + ' -Ur -T '+FExpand(outputexedir+Info.ResName)+' $STRIP -o '+Fexpand(outputexedir+tmpLinkFileName);
|
ExeCmd[1]:= 'ld -Ur -T '+FExpand(outputexedir+Info.ResName)+' $STRIP -o '+Fexpand(outputexedir+tmpLinkFileName);
|
||||||
ExeCmd[2]:= FindUtil(utilsprefix+'nlmconv') + ' -T'+FExpand(outputexedir+'n'+Info.ResName);
|
ExeCmd[2]:= 'nlmconv -T'+FExpand(outputexedir+'n'+Info.ResName);
|
||||||
{$endif}
|
{$endif}
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -578,6 +578,7 @@ begin
|
|||||||
Replace(cmdstr,'$RES',maybequoted(outputexedir+Info.ResName));
|
Replace(cmdstr,'$RES',maybequoted(outputexedir+Info.ResName));
|
||||||
Replace(cmdstr,'$STRIP',StripStr);
|
Replace(cmdstr,'$STRIP',StripStr);
|
||||||
Replace(cmdstr,'$TMPOBJ',maybequoted(outputexedir+tmpLinkFileName));
|
Replace(cmdstr,'$TMPOBJ',maybequoted(outputexedir+tmpLinkFileName));
|
||||||
|
BinStr:=FindUtil(utilsprefix+BinStr);
|
||||||
Comment (v_debug,'Executing '+BinStr+' '+cmdstr);
|
Comment (v_debug,'Executing '+BinStr+' '+cmdstr);
|
||||||
success:=DoExec(BinStr,CmdStr,true,false);
|
success:=DoExec(BinStr,CmdStr,true,false);
|
||||||
|
|
||||||
@ -592,6 +593,7 @@ begin
|
|||||||
NLMConvLinkFile.Free;
|
NLMConvLinkFile.Free;
|
||||||
SplitBinCmd(Info.ExeCmd[2],binstr,cmdstr);
|
SplitBinCmd(Info.ExeCmd[2],binstr,cmdstr);
|
||||||
Replace(cmdstr,'$RES',maybequoted(outputexedir+'n'+Info.ResName));
|
Replace(cmdstr,'$RES',maybequoted(outputexedir+'n'+Info.ResName));
|
||||||
|
BinStr:=FindUtil(utilsprefix+BinStr);
|
||||||
Comment (v_debug,'Executing '+BinStr+' '+cmdstr);
|
Comment (v_debug,'Executing '+BinStr+' '+cmdstr);
|
||||||
success:=DoExec(BinStr,CmdStr,true,false);
|
success:=DoExec(BinStr,CmdStr,true,false);
|
||||||
if (success) and not(cs_link_nolink in current_settings.globalswitches) then
|
if (success) and not(cs_link_nolink in current_settings.globalswitches) then
|
||||||
|
@ -260,12 +260,12 @@ begin
|
|||||||
with Info do
|
with Info do
|
||||||
begin
|
begin
|
||||||
{$ifndef netware}
|
{$ifndef netware}
|
||||||
ExeCmd[1]:= FindUtil(utilsprefix+'ld') + ' -Ur -T $RES $STRIP -o $TMPOBJ';
|
ExeCmd[1]:= 'ld -Ur -T $RES $STRIP -o $TMPOBJ';
|
||||||
ExeCmd[2]:= FindUtil(utilsprefix+'nlmconv') + ' -T$RES';
|
ExeCmd[2]:= 'nlmconv -T$RES';
|
||||||
{$else}
|
{$else}
|
||||||
{for running on netware we need absolute pathes since ld has another working directory}
|
{for running on netware we need absolute pathes since ld has another working directory}
|
||||||
ExeCmd[1]:= FindUtil(utilsprefix+'ld') + ' -Ur -T '+FExpand(outputexedir+Info.ResName)+' $STRIP -o '+Fexpand(outputexedir+tmpLinkFileName);
|
ExeCmd[1]:= 'ld -Ur -T '+FExpand(outputexedir+Info.ResName)+' $STRIP -o '+Fexpand(outputexedir+tmpLinkFileName);
|
||||||
ExeCmd[2]:= FindUtil(utilsprefix+'nlmconv') + ' -T'+FExpand(outputexedir+'n'+Info.ResName);
|
ExeCmd[2]:= 'nlmconv -T'+FExpand(outputexedir+'n'+Info.ResName);
|
||||||
{$endif}
|
{$endif}
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -559,6 +559,7 @@ begin
|
|||||||
Replace(cmdstr,'$RES',maybequoted(outputexedir+Info.ResName));
|
Replace(cmdstr,'$RES',maybequoted(outputexedir+Info.ResName));
|
||||||
Replace(cmdstr,'$STRIP',StripStr);
|
Replace(cmdstr,'$STRIP',StripStr);
|
||||||
Replace(cmdstr,'$TMPOBJ',maybequoted(outputexedir+tmpLinkFileName));
|
Replace(cmdstr,'$TMPOBJ',maybequoted(outputexedir+tmpLinkFileName));
|
||||||
|
BinStr:=FindUtil(utilsprefix+BinStr);
|
||||||
Comment (v_debug,'Executing '+BinStr+' '+cmdstr);
|
Comment (v_debug,'Executing '+BinStr+' '+cmdstr);
|
||||||
success:=DoExec(BinStr,CmdStr,true,false);
|
success:=DoExec(BinStr,CmdStr,true,false);
|
||||||
|
|
||||||
@ -572,6 +573,7 @@ begin
|
|||||||
NLMConvLinkFile.writetodisk;
|
NLMConvLinkFile.writetodisk;
|
||||||
NLMConvLinkFile.Free;
|
NLMConvLinkFile.Free;
|
||||||
SplitBinCmd(Info.ExeCmd[2],binstr,cmdstr);
|
SplitBinCmd(Info.ExeCmd[2],binstr,cmdstr);
|
||||||
|
BinStr:=FindUtil(utilsprefix+BinStr);
|
||||||
Replace(cmdstr,'$RES',maybequoted(outputexedir+'n'+Info.ResName));
|
Replace(cmdstr,'$RES',maybequoted(outputexedir+'n'+Info.ResName));
|
||||||
Comment (v_debug,'Executing '+BinStr+' '+cmdstr);
|
Comment (v_debug,'Executing '+BinStr+' '+cmdstr);
|
||||||
success:=DoExec(BinStr,CmdStr,true,false);
|
success:=DoExec(BinStr,CmdStr,true,false);
|
||||||
|
Loading…
Reference in New Issue
Block a user