summaryrefslogtreecommitdiff
path: root/src/driver/slbt_driver_ctx.c
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-02-14 02:25:39 +0000
committermidipix <writeonce@midipix.org>2024-02-14 02:25:39 +0000
commit771899443dce44974234093859111570560ebddc (patch)
treea599678bd646c28aa3ff9bbe033b78aa7e894341 /src/driver/slbt_driver_ctx.c
parentb4058c47a4dbd27e8012d13697aaf30c447effbd (diff)
downloadslibtool-771899443dce44974234093859111570560ebddc.tar.bz2
slibtool-771899443dce44974234093859111570560ebddc.tar.xz
driver: rlibtool mode: also derive <host> from the located libtool script.
Diffstat (limited to 'src/driver/slbt_driver_ctx.c')
-rw-r--r--src/driver/slbt_driver_ctx.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c
index 15c2cf5..52aa0af 100644
--- a/src/driver/slbt_driver_ctx.c
+++ b/src/driver/slbt_driver_ctx.c
@@ -338,6 +338,7 @@ int slbt_get_driver_ctx(
const char * program;
const char * lconf;
uint64_t lflags;
+ const char * cfgmeta_host;
const char * cfgmeta_ar;
const char * cfgmeta_as;
const char * cfgmeta_ranlib;
@@ -395,6 +396,7 @@ int slbt_get_driver_ctx(
cmdnostatic = 0;
cmdnoshared = 0;
+ cfgmeta_host = 0;
cfgmeta_ar = 0;
cfgmeta_as = 0;
cfgmeta_ranlib = 0;
@@ -584,6 +586,7 @@ int slbt_get_driver_ctx(
case TAG_HOST:
cctx.host.host = entry->arg;
+ cfgmeta_host = cfgexplicit;
break;
case TAG_FLAVOR:
@@ -816,6 +819,9 @@ int slbt_get_driver_ctx(
if (slbt_get_lconf_flags(&ctx->ctx,lconf,&lflags) < 0)
return slbt_get_driver_ctx_fail(&ctx->ctx,0);
+ if (ctx->cctx.host.host && !cfgmeta_host)
+ cfgmeta_host = cfglconf;
+
if (ctx->cctx.host.ar && !cfgmeta_ar)
cfgmeta_ar = cfglconf;
@@ -867,6 +873,7 @@ int slbt_get_driver_ctx(
&ctx->host,
&ctx->cctx.host,
&ctx->cctx.cfgmeta,
+ cfgmeta_host,
cfgmeta_ar,
cfgmeta_as,
cfgmeta_ranlib,