summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorpierre <pierre@3ad0048d-3df7-0310-abae-a5850022a9f2>2020-11-20 15:14:14 +0000
committerpierre <pierre@3ad0048d-3df7-0310-abae-a5850022a9f2>2020-11-20 15:14:14 +0000
commit0b094cbdb6c51d7ab6c5eb95108eb79038de2c08 (patch)
tree0139944de10ad68e83d92b0619e34408fece6981 /compiler
parenta2d0b4f1211425d198562b57a5cf195e0d302765 (diff)
downloadfpc-0b094cbdb6c51d7ab6c5eb95108eb79038de2c08.tar.gz
In FindObjectFile check the assembly file if cs_assemble_on_target is in globlaswitches
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@47489 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler')
-rw-r--r--compiler/link.pas5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/link.pas b/compiler/link.pas
index 7930ddbda4..9d4d45c9bc 100644
--- a/compiler/link.pas
+++ b/compiler/link.pas
@@ -216,10 +216,11 @@ Implementation
exit;
{When linking on target, the units has not been assembled yet,
+ if assembling is also done on target,
so there is no object files to look for at
the host. Look for the corresponding assembler file instead,
because it will be assembled to object file on the target.}
- if isunit and (cs_link_on_target in current_settings.globalswitches) then
+ if isunit and (cs_assemble_on_target in current_settings.globalswitches) then
s:=ChangeFileExt(s,target_info.asmext);
{ when it does not belong to the unit then check if
@@ -266,7 +267,7 @@ Implementation
Message1(exec_w_objfile_not_found,s);
{Restore file extension}
- if isunit and (cs_link_on_target in current_settings.globalswitches) then
+ if isunit and (cs_assemble_on_target in current_settings.globalswitches) then
foundfile:= ChangeFileExt(foundfile,target_info.objext);
findobjectfile:=ScriptFixFileName(foundfile);