summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2012-03-27 15:31:27 +1030
committerRusty Russell <rusty@rustcorp.com.au>2012-03-27 15:31:27 +1030
commit6acab66f8474a45dd37ae6a0f54d088448076ac7 (patch)
tree5eada0115685f8e68bcbd19c35f54d59bc59e4fc
parentd194919a1de953ee587952804b424e6ed722efdb (diff)
ccanlint: module_links test must link with module.
Gcc doesn't include unused inline functions, even without -O, but Solaris CC does, so fails to link block_pool where one inline function refers to a non-inline function.
-rw-r--r--tools/ccanlint/tests/module_links.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/ccanlint/tests/module_links.c b/tools/ccanlint/tests/module_links.c
index 66f8954f..2dda6429 100644
--- a/tools/ccanlint/tests/module_links.c
+++ b/tools/ccanlint/tests/module_links.c
@@ -23,13 +23,18 @@ static const char *can_build(struct manifest *m)
static char *obj_list(const struct manifest *m)
{
- char *list = talloc_strdup(m, "");
+ char *list;
struct manifest *i;
+ if (m->compiled[COMPILE_NORMAL])
+ list = talloc_strdup(m, m->compiled[COMPILE_NORMAL]);
+ else
+ list = talloc_strdup(m, "");
+
/* Other CCAN deps. */
list_for_each(&m->deps, i, list) {
if (i->compiled[COMPILE_NORMAL])
- list = talloc_asprintf_append(list, "%s ",
+ list = talloc_asprintf_append(list, " %s",
i->compiled
[COMPILE_NORMAL]);
}