diff options
-rw-r--r-- | include/slibtool/slibtool.h | 2 | ||||
-rw-r--r-- | src/logic/slbt_exec_compile.c | 4 | ||||
-rw-r--r-- | src/logic/slbt_exec_ctx.c | 3 |
3 files changed, 8 insertions, 1 deletions
diff --git a/include/slibtool/slibtool.h b/include/slibtool/slibtool.h index c1aea06..a9dbf6e 100644 --- a/include/slibtool/slibtool.h +++ b/include/slibtool/slibtool.h @@ -83,6 +83,8 @@ struct slbt_input { struct slbt_exec_ctx { char * program; + char * compiler; + char ** cargv; char ** argv; char ** envp; char ** altv; diff --git a/src/logic/slbt_exec_compile.c b/src/logic/slbt_exec_compile.c index 728ff65..b88ea10 100644 --- a/src/logic/slbt_exec_compile.c +++ b/src/logic/slbt_exec_compile.c @@ -40,6 +40,10 @@ int slbt_exec_compile( } } + /* compile mode */ + ectx->program = ectx->compiler; + ectx->argv = ectx->cargv; + /* shared library object */ if (dctx->cctx->drvflags & SLBT_DRIVER_SHARED) { if (!(dctx->cctx->drvflags & SLBT_DRIVER_ANTI_PIC)) { diff --git a/src/logic/slbt_exec_ctx.c b/src/logic/slbt_exec_ctx.c index 0af29ca..b59ac88 100644 --- a/src/logic/slbt_exec_ctx.c +++ b/src/logic/slbt_exec_ctx.c @@ -139,7 +139,8 @@ int slbt_get_exec_ctx( ictx->ctx.altv = &ictx->buffer[ictx->argc + 1]; /* <compiler> */ - ictx->ctx.program = dctx->cctx->cargv[0]; + ictx->ctx.compiler = dctx->cctx->cargv[0]; + ictx->ctx.cargv = ictx->ctx.argv; /* ldirname, lbasename */ ref = (dctx->cctx->output) |