summaryrefslogtreecommitdiffhomepage
path: root/src/logic
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-03-03 05:31:21 +0000
committermidipix <writeonce@midipix.org>2024-03-03 07:56:23 +0000
commitabb1bf44beb99a03a6197742fd0c50d48a644f38 (patch)
tree23e200b62ff1fa7ededcf8d292be272253982fdb /src/logic
parent25a7d0ed20e14cb983f758c6f54f8c418d27021b (diff)
downloadslibtool-abb1bf44beb99a03a6197742fd0c50d48a644f38.tar.bz2
slibtool-abb1bf44beb99a03a6197742fd0c50d48a644f38.tar.xz
slbt_exec_link_finalize_argument_vector(): allow ar(1) driven invocations.
Diffstat (limited to 'src/logic')
-rw-r--r--src/logic/linkcmd/slbt_linkcmd_argv.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/logic/linkcmd/slbt_linkcmd_argv.c b/src/logic/linkcmd/slbt_linkcmd_argv.c
index 403023f..409f0ee 100644
--- a/src/logic/linkcmd/slbt_linkcmd_argv.c
+++ b/src/logic/linkcmd/slbt_linkcmd_argv.c
@@ -746,6 +746,7 @@ slbt_hidden int slbt_exec_link_finalize_argument_vector(
char * arg;
char * dot;
char * ccwrap;
+ char * program;
const char * arsuffix;
/* vector size */
@@ -1014,8 +1015,12 @@ slbt_hidden int slbt_exec_link_finalize_argument_vector(
*dst++ = "-o";
*dst++ = ectx->dlopenobj;
+ *dst++ = 0;
+
/* nested compile step */
- ectx->argv = dlargv;
+ program = ectx->program;
+ ectx->argv = dlargv;
+ ectx->program = dlargv[0];
if (!(dctx->cctx->drvflags & SLBT_DRIVER_SILENT))
if (slbt_output_compile(ectx))
@@ -1029,7 +1034,8 @@ slbt_hidden int slbt_exec_link_finalize_argument_vector(
dctx,
SLBT_ERR_COMPILE_ERROR);
- ectx->argv = base;
+ ectx->argv = base;
+ ectx->program = program;
}
/* all done */