From fc58b6cbd7aa915a0a7f63739b3d3e1377412173 Mon Sep 17 00:00:00 2001 From: borutr Date: Thu, 19 Jun 2003 21:22:06 +0000 Subject: [PATCH] fixed Z80 port again: missing -k library paths in linker command line git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2710 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 4 ++++ src/z80/main.c | 15 ++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d7c61e41..a7154e60 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2003-06-19 Borut Razem + + * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line + 2003-06-19 Borut Razem * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c: diff --git a/src/z80/main.c b/src/z80/main.c index 6a715333..147dbbb4 100644 --- a/src/z80/main.c +++ b/src/z80/main.c @@ -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)) { -- 2.47.2