diff options
author | midipix <writeonce@midipix.org> | 2024-03-29 03:29:56 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2024-03-29 03:29:56 +0000 |
commit | 6aa833daed98ec60e8e95efe35d5ecd33b8b02f9 (patch) | |
tree | 66fbebe7646945a562bab220c67e415935f8d5e8 /src/host | |
parent | 2f0fd7a8edda316d64ccfccb721bff6bda216392 (diff) | |
download | slibtool-6aa833daed98ec60e8e95efe35d5ecd33b8b02f9.tar.bz2 slibtool-6aa833daed98ec60e8e95efe35d5ecd33b8b02f9.tar.xz |
slbt_init_host_params(): derive as from ranlib as needed.
Diffstat (limited to 'src/host')
-rw-r--r-- | src/host/slbt_host_params.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/host/slbt_host_params.c b/src/host/slbt_host_params.c index f9ef88c..39272ef 100644 --- a/src/host/slbt_host_params.c +++ b/src/host/slbt_host_params.c @@ -345,6 +345,18 @@ slbt_hidden int slbt_init_host_params( cfgmeta->as = cfghost; } + if (host->ranlib && (mark = strrchr(host->ranlib,'/'))) { + if (strcmp(++mark,"ranlib")) + if ((mark = strrchr(mark,'-'))) + if (strcmp(++mark,"ranlib")) + mark = 0; + + if (mark) { + strcpy(drvhost->as,host->ranlib); + strcpy(&drvhost->as[mark-host->ranlib],"as"); + } + } + host->as = drvhost->as; } |