From ba922898a1106882fa7f1228dd64c2d3587e0dc5 Mon Sep 17 00:00:00 2001 From: midipix Date: Fri, 16 Feb 2024 07:32:01 +0000 Subject: driver: host.as: added support for tool-specific argument vector. --- src/driver/slbt_driver_ctx.c | 3 +++ src/internal/slibtool_lconf_impl.c | 13 ++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c index bbc1dd9..50c1a9b 100644 --- a/src/driver/slbt_driver_ctx.c +++ b/src/driver/slbt_driver_ctx.c @@ -948,6 +948,9 @@ int slbt_get_driver_ctx( if (slbt_driver_parse_tool_argv(ctx->cctx.host.ranlib,&ctx->host.ranlib_argv) < 0) return slbt_get_driver_ctx_fail(&ctx->ctx,0); + if (slbt_driver_parse_tool_argv(ctx->cctx.host.as,&ctx->host.as_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 5daa2f4..93dc2d3 100644 --- a/src/internal/slibtool_lconf_impl.c +++ b/src/internal/slibtool_lconf_impl.c @@ -825,12 +825,15 @@ int slbt_get_lconf_flags( /* as tool (optional) */ if (!ctx->cctx.host.as) { - if (!slbt_get_lconf_var(addr,cap,"AS=",0,&val)) { - if (val[0] && !(ctx->host.as = strdup(val))) - return SLBT_SYSTEM_ERROR(dctx,0); + if (slbt_get_lconf_var(addr,cap,"AS=",0x20,&val) < 0) + return SLBT_CUSTOM_ERROR( + dctx,SLBT_ERR_LCONF_PARSE); - ctx->cctx.host.as = ctx->host.as; - } + if (val[0] && !(ctx->host.as = strdup(val))) + return SLBT_SYSTEM_ERROR(dctx,0); + + + ctx->cctx.host.as = ctx->host.as; } -- cgit v1.2.3