diff options
author | midipix <writeonce@midipix.org> | 2024-02-14 01:46:59 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2024-02-14 01:57:27 +0000 |
commit | b4058c47a4dbd27e8012d13697aaf30c447effbd (patch) | |
tree | c6956fc05c9f4b1024d50c59b91e48501b134a2c /src/internal | |
parent | 6bc1706e77c607947ac30f96ec0bce3e056b3026 (diff) | |
download | slibtool-b4058c47a4dbd27e8012d13697aaf30c447effbd.tar.bz2 slibtool-b4058c47a4dbd27e8012d13697aaf30c447effbd.tar.xz |
driver: rlibtool mode: also derive AS 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 | 11 |
2 files changed, 12 insertions, 0 deletions
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)) { |