Browse Source

* only add .o extension if no extension is provided. fixes 8520

git-svn-id: trunk@7366 -
peter 18 years ago
parent
commit
377aae4ba0
1 changed files with 3 additions and 1 deletions
  1. 3 1
      compiler/scandir.pas

+ 3 - 1
compiler/scandir.pas

@@ -489,7 +489,9 @@ implementation
           end
         else
           s:= trimspace(current_scanner.readcomment);
-        s:=ChangeFileExt(FixFileName(s),target_info.objext);
+        s:=FixFileName(s);
+        if ExtractFileExt(s)='' then
+          s:=ChangeFileExt(s,target_info.objext);
         current_module.linkotherofiles.add(s,link_always);
       end;