From 771899443dce44974234093859111570560ebddc Mon Sep 17 00:00:00 2001 From: midipix Date: Wed, 14 Feb 2024 02:25:39 +0000 Subject: driver: rlibtool mode: also derive from the located libtool script. --- src/internal/slibtool_lconf_impl.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/internal/slibtool_lconf_impl.c') 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) -- cgit v1.2.3