diff options
author | midipix <writeonce@midipix.org> | 2024-03-03 05:31:21 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2024-03-03 07:56:23 +0000 |
commit | abb1bf44beb99a03a6197742fd0c50d48a644f38 (patch) | |
tree | 23e200b62ff1fa7ededcf8d292be272253982fdb /src/logic/linkcmd/slbt_linkcmd_argv.c | |
parent | 25a7d0ed20e14cb983f758c6f54f8c418d27021b (diff) | |
download | slibtool-abb1bf44beb99a03a6197742fd0c50d48a644f38.tar.bz2 slibtool-abb1bf44beb99a03a6197742fd0c50d48a644f38.tar.xz |
slbt_exec_link_finalize_argument_vector(): allow ar(1) driven invocations.
Diffstat (limited to 'src/logic/linkcmd/slbt_linkcmd_argv.c')
-rw-r--r-- | src/logic/linkcmd/slbt_linkcmd_argv.c | 10 |
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 */ |