summaryrefslogtreecommitdiff
path: root/src/driver
diff options
context:
space:
mode:
Diffstat (limited to 'src/driver')
-rw-r--r--src/driver/slbt_driver_ctx.c9
-rw-r--r--src/driver/slbt_host_params.c7
2 files changed, 12 insertions, 4 deletions
diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c
index a6e93d0..6f96e42 100644
--- a/src/driver/slbt_driver_ctx.c
+++ b/src/driver/slbt_driver_ctx.c
@@ -340,6 +340,7 @@ int slbt_get_driver_ctx(
uint64_t lflags;
const char * cfgmeta_ar;
const char * cfgmeta_ranlib;
+ const char * cfgmeta_dlltool;
if (flags & SLBT_DRIVER_MODE_AR)
argv_optv_init(slbt_ar_options,optv);
@@ -395,6 +396,7 @@ int slbt_get_driver_ctx(
cfgmeta_ar = 0;
cfgmeta_ranlib = 0;
+ cfgmeta_dlltool = 0;
/* get options */
for (entry=meta->entries; entry->fopt || entry->arg; entry++) {
@@ -602,6 +604,7 @@ int slbt_get_driver_ctx(
case TAG_DLLTOOL:
cctx.host.dlltool = entry->arg;
+ cfgmeta_dlltool = cfgexplicit;
break;
case TAG_MDSO:
@@ -812,6 +815,9 @@ int slbt_get_driver_ctx(
if (ctx->cctx.host.ranlib && !cfgmeta_ranlib)
cfgmeta_ranlib = cfglconf;
+ if (ctx->cctx.host.dlltool && !cfgmeta_dlltool)
+ cfgmeta_dlltool = cfglconf;
+
if (cmdnoshared)
lflags &= ~(uint64_t)SLBT_DRIVER_DISABLE_STATIC;
@@ -852,7 +858,8 @@ int slbt_get_driver_ctx(
&ctx->cctx.host,
&ctx->cctx.cfgmeta,
cfgmeta_ar,
- cfgmeta_ranlib))
+ cfgmeta_ranlib,
+ cfgmeta_dlltool))
return slbt_get_driver_ctx_fail(&ctx->ctx,0);
/* flavor settings */
diff --git a/src/driver/slbt_host_params.c b/src/driver/slbt_host_params.c
index 5811e02..f63f9b3 100644
--- a/src/driver/slbt_host_params.c
+++ b/src/driver/slbt_host_params.c
@@ -137,7 +137,8 @@ int slbt_init_host_params(
struct slbt_host_params * host,
struct slbt_host_params * cfgmeta,
const char * cfgmeta_ar,
- const char * cfgmeta_ranlib)
+ const char * cfgmeta_ranlib,
+ const char * cfgmeta_dlltool)
{
int fdcwd;
int arprobe;
@@ -413,7 +414,7 @@ int slbt_init_host_params(
/* dlltool */
if (host->dlltool)
- cfgmeta->dlltool = cfgexplicit;
+ cfgmeta->dlltool = cfgmeta_dlltool ? cfgmeta_dlltool : cfgexplicit;
else if (strcmp(host->flavor,"cygwin")
&& strcmp(host->flavor,"midipix")
@@ -622,7 +623,7 @@ int slbt_set_alternate_host(
&ictx->ctx.ahost,
&ictx->ctx.cctx.ahost,
&ictx->ctx.cctx.acfgmeta,
- 0,0)) {
+ 0,0,0)) {
slbt_free_host_params(&ictx->ctx.ahost);
return SLBT_CUSTOM_ERROR(ctx,SLBT_ERR_HOST_INIT);
}