aboutsummaryrefslogtreecommitdiffhomepage
path: root/main.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2026-01-01 12:05:51 +0100
committerlemon <lsof@mailbox.org>2026-01-01 12:06:05 +0100
commitf82eb40dbb7cbeab60615d0bef1fd73aa02998af (patch)
tree3ade529b1bf183ed129a941d2981d2c4be7211d1 /main.c
parent93194ef8447718ae78b345ce0a920bb5e6fdc090 (diff)
driver: when linking, put libraries at the end of command
Diffstat (limited to 'main.c')
-rw-r--r--main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.c b/main.c
index a821baa..6a4385e 100644
--- a/main.c
+++ b/main.c
@@ -426,7 +426,6 @@ dolink(void)
} else if (task.outft == OFTexe) {
vpush(&cmd, ccopt.pie ? "-pie" : "-no-pie");
}
- vpushn(&cmd, task.linkargs.p, task.linkargs.n);
vpush(&cmd, "-o");
vpush(&cmd, task.out);
assert(task.ninf > 0);
@@ -440,6 +439,7 @@ dolink(void)
}
vpush(&cmd, o);
}
+ vpushn(&cmd, task.linkargs.p, task.linkargs.n);
if (task.verbose) {
efmt("> ");
for (int i = 0; i < cmd.n; ++i)