diff options
Diffstat (limited to 'src/host')
-rw-r--r-- | src/host/slbt_host_params.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/host/slbt_host_params.c b/src/host/slbt_host_params.c index cd9ad87..f9ef88c 100644 --- a/src/host/slbt_host_params.c +++ b/src/host/slbt_host_params.c @@ -251,6 +251,7 @@ slbt_hidden int slbt_init_host_params( /* toollen */ toollen = fnative ? 0 : strlen(host->host); toollen += strlen("-utility-name"); + toollen += host->ranlib ? strlen(host->ranlib) : 0; /* ar */ if (host->ar) @@ -406,6 +407,18 @@ slbt_hidden int slbt_init_host_params( cfgmeta->windres = cfghost; } + if ((mark = strrchr(host->ranlib,'/'))) { + if (strcmp(++mark,"ranlib")) + if ((mark = strrchr(mark,'-'))) + if (strcmp(++mark,"ranlib")) + mark = 0; + + if (mark) { + strcpy(drvhost->windres,host->ranlib); + strcpy(&drvhost->windres[mark-host->ranlib],"windres"); + } + } + host->windres = drvhost->windres; } @@ -432,6 +445,18 @@ slbt_hidden int slbt_init_host_params( cfgmeta->dlltool = cfghost; } + if ((mark = strrchr(host->ranlib,'/'))) { + if (strcmp(++mark,"ranlib")) + if ((mark = strrchr(mark,'-'))) + if (strcmp(++mark,"ranlib")) + mark = 0; + + if (mark) { + strcpy(drvhost->dlltool,host->ranlib); + strcpy(&drvhost->dlltool[mark-host->ranlib],"dlltool"); + } + } + host->dlltool = drvhost->dlltool; } |