summaryrefslogtreecommitdiffhomepage
path: root/src/internal/slibtool_lconf_impl.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/internal/slibtool_lconf_impl.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/internal/slibtool_lconf_impl.c')
-rw-r--r--src/internal/slibtool_lconf_impl.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/internal/slibtool_lconf_impl.c b/src/internal/slibtool_lconf_impl.c
index f1747df..78b38a2 100644
--- a/src/internal/slibtool_lconf_impl.c
+++ b/src/internal/slibtool_lconf_impl.c
@@ -780,6 +780,19 @@ int slbt_get_lconf_flags(
*flags = optshared | optstatic;
+ /* host */
+ if (!ctx->cctx.host.host) {
+ if (slbt_get_lconf_var(addr,cap,"host=",&val) < 0)
+ return SLBT_CUSTOM_ERROR(
+ dctx,SLBT_ERR_LCONF_PARSE);
+
+ if (val[0] && !(ctx->host.host = strdup(val)))
+ return SLBT_SYSTEM_ERROR(dctx,0);
+
+ ctx->cctx.host.host = ctx->host.host;
+ }
+
+
/* ar tool */
if (!ctx->cctx.host.ar) {
if (slbt_get_lconf_var(addr,cap,"AR=",&val) < 0)