]> git.gag.com Git - fw/sdcc/commitdiff
fixed Z80 port again: missing -k library paths in linker command line
authorborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 19 Jun 2003 21:22:06 +0000 (21:22 +0000)
committerborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 19 Jun 2003 21:22:06 +0000 (21:22 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2710 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
src/z80/main.c

index d7c61e410e88272a0a59dd5a779d6a52401942be..a7154e606dce94a0102e1bdaa68a2e9d43958d7f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2003-06-19  Borut Razem <borut.razem@siol.net>
+
+       * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
+
 2003-06-19  Borut Razem <borut.razem@siol.net>
 
        * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
index 6a715333d0665f76223869146be526e3f0dc4fbf..147dbbb45b3aedfd64fa5317523d565cc8585355 100644 (file)
@@ -27,6 +27,7 @@
 #include "MySystem.h"
 #include "BuildCmd.h"
 #include "SDCCutil.h"
+#include "dbuf.h"
 
 static char _z80_defaultRules[] =
 {
@@ -288,8 +289,20 @@ _setValues(void)
     {
       const char *s;
       char path[PATH_MAX];
+      struct dbuf_s dbuf;
 
-      setMainValue ("z80libspec", "-l\"{port}.lib\"");
+      dbuf_init(&dbuf, PATH_MAX);
+
+      for (s = setFirstItem(libDirsSet); s != NULL; s = setNextItem(libDirsSet))
+        {
+          buildCmdLine2(path, sizeof path, "-k\"%s" DIR_SEPARATOR_STRING "{port}\" ", s);
+          dbuf_append(&dbuf, path, strlen(path));
+        }
+      buildCmdLine2(path, sizeof path, "-l\"{port}.lib\"", s);
+      dbuf_append(&dbuf, path, strlen(path));
+
+      setMainValue ("z80libspec", dbuf_c_str(&dbuf));
+      dbuf_destroy(&dbuf);
 
       for (s = setFirstItem(libDirsSet); s != NULL; s = setNextItem(libDirsSet))
         {