diff options
author | midipix <writeonce@midipix.org> | 2024-02-14 02:25:39 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2024-02-14 02:25:39 +0000 |
commit | 771899443dce44974234093859111570560ebddc (patch) | |
tree | a599678bd646c28aa3ff9bbe033b78aa7e894341 /src/internal | |
parent | b4058c47a4dbd27e8012d13697aaf30c447effbd (diff) | |
download | slibtool-771899443dce44974234093859111570560ebddc.tar.bz2 slibtool-771899443dce44974234093859111570560ebddc.tar.xz |
driver: rlibtool mode: also derive <host> from the located libtool script.
Diffstat (limited to 'src/internal')
-rw-r--r-- | src/internal/slibtool_driver_impl.h | 1 | ||||
-rw-r--r-- | src/internal/slibtool_lconf_impl.c | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/internal/slibtool_driver_impl.h b/src/internal/slibtool_driver_impl.h index 3f04b79..2c5ea39 100644 --- a/src/internal/slibtool_driver_impl.h +++ b/src/internal/slibtool_driver_impl.h @@ -246,6 +246,7 @@ int slbt_init_host_params( struct slbt_host_strs * drvhost, struct slbt_host_params * host, struct slbt_host_params * cfgmeta, + const char * cfgmeta_host, const char * cfgmeta_ar, const char * cfgmeta_as, const char * cfgmeta_ranlib, 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) |