Browse Source

Fix inclusion of PPUs that don't have a corresponding object file.

pkgutil.pas, RewritePPU:
  * don't abort if a unit does have the flag uf_no_link set
  * only abort if both uf_static_link and uf_no_link are not set

git-svn-id: branches/svenbarth/packages@32477 -
svenbarth 9 years ago
parent
commit
08329268a7
1 changed files with 2 additions and 9 deletions
  1. 2 9
      compiler/pkgutil.pas

+ 2 - 9
compiler/pkgutil.pas

@@ -258,13 +258,6 @@ implementation
          Comment(V_Error,'Wrong PPU Version '+tostr(ppuversion)+' in '+PPUFn);
          Exit;
        end;
-    { No .o file generated for this ppu, just skip }
-      if (inppu.header.common.flags and uf_no_link)<>0 then
-       begin
-         inppu.free;
-         Result:=true;
-         Exit;
-       end;
     { Already a lib? }
       if (inppu.header.common.flags and uf_in_library)<>0 then
        begin
@@ -272,8 +265,8 @@ implementation
          Comment(V_Error,'PPU is already in a library : '+PPUFn);
          Exit;
        end;
-    { We need a static linked unit }
-      if (inppu.header.common.flags and uf_static_linked)=0 then
+    { We need a static linked unit, but we also accept those without .o file }
+      if (inppu.header.common.flags and (uf_static_linked or uf_no_link))=0 then
        begin
          inppu.free;
          Comment(V_Error,'PPU is not static linked : '+PPUFn);