From b4058c47a4dbd27e8012d13697aaf30c447effbd Mon Sep 17 00:00:00 2001 From: midipix Date: Wed, 14 Feb 2024 01:46:59 +0000 Subject: driver: rlibtool mode: also derive AS from the located libtool script. --- src/driver/slbt_driver_ctx.c | 7 +++++++ src/driver/slbt_host_params.c | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'src/driver') diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c index deb8cdc..15c2cf5 100644 --- a/src/driver/slbt_driver_ctx.c +++ b/src/driver/slbt_driver_ctx.c @@ -339,6 +339,7 @@ int slbt_get_driver_ctx( const char * lconf; uint64_t lflags; const char * cfgmeta_ar; + const char * cfgmeta_as; const char * cfgmeta_ranlib; const char * cfgmeta_dlltool; @@ -395,6 +396,7 @@ int slbt_get_driver_ctx( cmdnoshared = 0; cfgmeta_ar = 0; + cfgmeta_as = 0; cfgmeta_ranlib = 0; cfgmeta_dlltool = 0; @@ -595,6 +597,7 @@ int slbt_get_driver_ctx( case TAG_AS: cctx.host.as = entry->arg; + cfgmeta_as = cfgexplicit; break; case TAG_RANLIB: @@ -816,6 +819,9 @@ int slbt_get_driver_ctx( if (ctx->cctx.host.ar && !cfgmeta_ar) cfgmeta_ar = cfglconf; + if (ctx->cctx.host.as && !cfgmeta_as) + cfgmeta_as = cfglconf; + if (ctx->cctx.host.ranlib && !cfgmeta_ranlib) cfgmeta_ranlib = cfglconf; @@ -862,6 +868,7 @@ int slbt_get_driver_ctx( &ctx->cctx.host, &ctx->cctx.cfgmeta, cfgmeta_ar, + cfgmeta_as, cfgmeta_ranlib, cfgmeta_dlltool)) return slbt_get_driver_ctx_fail(&ctx->ctx,0); diff --git a/src/driver/slbt_host_params.c b/src/driver/slbt_host_params.c index 6414ec1..58e0612 100644 --- a/src/driver/slbt_host_params.c +++ b/src/driver/slbt_host_params.c @@ -137,6 +137,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) { @@ -371,7 +372,7 @@ int slbt_init_host_params( /* as */ if (host->as) - cfgmeta->as = cfgexplicit; + cfgmeta->as = cfgmeta_as ? cfgmeta_as : cfgexplicit; else { if (!(drvhost->as = calloc(1,toollen))) return -1; @@ -644,7 +645,7 @@ int slbt_set_alternate_host( &ictx->ctx.ahost, &ictx->ctx.cctx.ahost, &ictx->ctx.cctx.acfgmeta, - 0,0,0)) { + 0,0,0,0)) { slbt_free_host_params(&ictx->ctx.ahost); return SLBT_CUSTOM_ERROR(ctx,SLBT_ERR_HOST_INIT); } -- cgit v1.2.3