From b4058c47a4dbd27e8012d13697aaf30c447effbd Mon Sep 17 00:00:00 2001 From: midipix Date: Wed, 14 Feb 2024 01:46:59 +0000 Subject: driver: rlibtool mode: also derive AS from the located libtool script. --- src/internal/slibtool_driver_impl.h | 1 + src/internal/slibtool_lconf_impl.c | 11 +++++++++++ 2 files changed, 12 insertions(+) (limited to 'src/internal') diff --git a/src/internal/slibtool_driver_impl.h b/src/internal/slibtool_driver_impl.h index 34ab775..3f04b79 100644 --- a/src/internal/slibtool_driver_impl.h +++ b/src/internal/slibtool_driver_impl.h @@ -247,6 +247,7 @@ int slbt_init_host_params( struct slbt_host_params * host, struct slbt_host_params * cfgmeta, const char * cfgmeta_ar, + const char * cfgmeta_as, const char * cfgmeta_ranlib, const char * cfgmeta_dlltool); diff --git a/src/internal/slibtool_lconf_impl.c b/src/internal/slibtool_lconf_impl.c index 4956b24..f1747df 100644 --- a/src/internal/slibtool_lconf_impl.c +++ b/src/internal/slibtool_lconf_impl.c @@ -806,6 +806,17 @@ int slbt_get_lconf_flags( } + /* as tool (optional) */ + if (!ctx->cctx.host.as) { + if (!slbt_get_lconf_var(addr,cap,"AS=",&val)) { + if (val[0] && !(ctx->host.as = strdup(val))) + return SLBT_SYSTEM_ERROR(dctx,0); + + ctx->cctx.host.as = ctx->host.as; + } + } + + /* dlltool tool (optional) */ if (!ctx->cctx.host.dlltool) { if (!slbt_get_lconf_var(addr,cap,"DLLTOOL=",&val)) { -- cgit v1.2.3