Linker complaints if linked modules have conflicting options.
[fw/sdcc] / link / z80 / lklibr.c
index 94b54da551ddc6a8508b7f3b529d6c1ba30c8e09..832af6f56fcf901be7e665dcba0b438190175811 100644 (file)
@@ -175,16 +175,20 @@ addlib()
 
        unget(getnb());
 
-       if (lbphead == NULL) {
-               addfile(NULL,ip);
-               return;
-       }       
-       for (lbph=lbphead; lbph; lbph=lbph->next) {
-               foundcount+=addfile(lbph->path,ip);
+       if (lbphead == NULL)
+    {
+               foundcount=addfile(NULL, ip);
        }
-    if(foundcount==0)
+    else
+    {
+           for (lbph=lbphead; lbph; lbph=lbph->next)
+        {
+                   foundcount+=addfile(lbph->path, ip);
+           }
+    }
+    if(foundcount == 0)
     {
-        printf("?ASlink-Warning-Couldn't find library '%s'\n", ip);
+        printf("\n?ASlink-Warning-Couldn't find library '%s'", ip);
     }
 }