mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 17:39:20 +02:00
* fixed linker exit code detection in case of useshell
git-svn-id: trunk@5138 -
This commit is contained in:
parent
aab785d0fc
commit
0909d46626
@ -614,22 +614,23 @@ Implementation
|
|||||||
begin
|
begin
|
||||||
FlushOutput;
|
FlushOutput;
|
||||||
if useshell then
|
if useshell then
|
||||||
exitcode := shell(maybequoted(command)+' '+para)
|
exitcode:=shell(maybequoted(command)+' '+para)
|
||||||
else
|
else
|
||||||
try
|
try
|
||||||
if ExecuteProcess(command,para) <> 0
|
exitcode:=ExecuteProcess(command,para);
|
||||||
then begin
|
except on E:EOSError do
|
||||||
|
begin
|
||||||
|
Message(exec_e_cant_call_linker);
|
||||||
|
current_settings.globalswitches:=current_settings.globalswitches+[cs_link_nolink];
|
||||||
|
DoExec:=false;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if (exitcode<>0) then
|
||||||
|
begin
|
||||||
Message(exec_e_error_while_linking);
|
Message(exec_e_error_while_linking);
|
||||||
current_settings.globalswitches:=current_settings.globalswitches+[cs_link_nolink];
|
current_settings.globalswitches:=current_settings.globalswitches+[cs_link_nolink];
|
||||||
DoExec:=false;
|
DoExec:=false;
|
||||||
end;
|
end;
|
||||||
except on E:EOSError do
|
|
||||||
begin
|
|
||||||
Message(exec_e_cant_call_linker);
|
|
||||||
current_settings.globalswitches:=current_settings.globalswitches+[cs_link_nolink];
|
|
||||||
DoExec:=false;
|
|
||||||
end;
|
|
||||||
end
|
|
||||||
end;
|
end;
|
||||||
{ Update asmres when externmode is set }
|
{ Update asmres when externmode is set }
|
||||||
if cs_link_nolink in current_settings.globalswitches then
|
if cs_link_nolink in current_settings.globalswitches then
|
||||||
|
Loading…
Reference in New Issue
Block a user