summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-02-16 08:06:11 +0000
committermidipix <writeonce@midipix.org>2024-02-16 08:06:11 +0000
commit94868fcfce9afea841d74c2f3a81ea9493aaac1b (patch)
tree33d76067936514818b2f3224b2b908e476acd8d3 /src
parent2b538bb2ffd5588f6c5c9d2f0b05ae6de6b4d7fb (diff)
downloadslibtool-94868fcfce9afea841d74c2f3a81ea9493aaac1b.tar.bz2
slibtool-94868fcfce9afea841d74c2f3a81ea9493aaac1b.tar.xz
driver: host.[mdso,dlltool]: added support for tool-specific argument vector.
Diffstat (limited to 'src')
-rw-r--r--src/driver/slbt_driver_ctx.c6
-rw-r--r--src/internal/slibtool_lconf_impl.c12
2 files changed, 13 insertions, 5 deletions
diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c
index 50c1a9b..c728570 100644
--- a/src/driver/slbt_driver_ctx.c
+++ b/src/driver/slbt_driver_ctx.c
@@ -951,6 +951,12 @@ int slbt_get_driver_ctx(
if (slbt_driver_parse_tool_argv(ctx->cctx.host.as,&ctx->host.as_argv) < 0)
return slbt_get_driver_ctx_fail(&ctx->ctx,0);
+ if (slbt_driver_parse_tool_argv(ctx->cctx.host.dlltool,&ctx->host.dlltool_argv) < 0)
+ return slbt_get_driver_ctx_fail(&ctx->ctx,0);
+
+ if (slbt_driver_parse_tool_argv(ctx->cctx.host.mdso,&ctx->host.mdso_argv) < 0)
+ return slbt_get_driver_ctx_fail(&ctx->ctx,0);
+
/* flavor settings */
slbt_init_flavor_settings(
&ctx->cctx,0,
diff --git a/src/internal/slibtool_lconf_impl.c b/src/internal/slibtool_lconf_impl.c
index 93dc2d3..102a2b6 100644
--- a/src/internal/slibtool_lconf_impl.c
+++ b/src/internal/slibtool_lconf_impl.c
@@ -839,12 +839,14 @@ int slbt_get_lconf_flags(
/* dlltool tool (optional) */
if (!ctx->cctx.host.dlltool) {
- if (!slbt_get_lconf_var(addr,cap,"DLLTOOL=",0,&val)) {
- if (val[0] && !(ctx->host.dlltool = strdup(val)))
- return SLBT_SYSTEM_ERROR(dctx,0);
+ if (slbt_get_lconf_var(addr,cap,"DLLTOOL=",0x20,&val) < 0)
+ return SLBT_CUSTOM_ERROR(
+ dctx,SLBT_ERR_LCONF_PARSE);
- ctx->cctx.host.dlltool = ctx->host.dlltool;
- }
+ if (val[0] && !(ctx->host.dlltool = strdup(val)))
+ return SLBT_SYSTEM_ERROR(dctx,0);
+
+ ctx->cctx.host.dlltool = ctx->host.dlltool;
}