diff options
author | midipix <writeonce@midipix.org> | 2018-11-10 15:23:57 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2018-11-10 17:35:29 -0500 |
commit | 08f5f92f68aa6f198d401229061b39a4f9602769 (patch) | |
tree | 8ec8bd17bf8019dd8ebb9e0da14cdaae088e8370 /src/logic/slbt_exec_ctx.c | |
parent | c0ac19b78e85f4b4e7e8fbf90daacf0c2267c657 (diff) | |
download | slibtool-08f5f92f68aa6f198d401229061b39a4f9602769.tar.bz2 slibtool-08f5f92f68aa6f198d401229061b39a4f9602769.tar.xz |
link mode: host flavors: properly support suffixed suffixes.
Diffstat (limited to 'src/logic/slbt_exec_ctx.c')
-rw-r--r-- | src/logic/slbt_exec_ctx.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/src/logic/slbt_exec_ctx.c b/src/logic/slbt_exec_ctx.c index 256e941..d10d880 100644 --- a/src/logic/slbt_exec_ctx.c +++ b/src/logic/slbt_exec_ctx.c @@ -78,9 +78,12 @@ static struct slbt_exec_ctx_impl * slbt_exec_ctx_alloc( /* buffer size (ldirname, lbasename, lobjname, aobjname, etc.) */ if (dctx->cctx->output) - size += 8*strlen(dctx->cctx->output); + size += 9*strlen(dctx->cctx->output); else if ((csrc = slbt_source_file(dctx->cctx->cargv))) - size += 8*strlen(csrc); + size += 9*strlen(csrc); + + /* pessimistic: long dso suffix, long x.y.z version */ + size += 9 * (16 + 16 + 16 + 16); /* pessimistic argc: .libs/libfoo.so --> -L.libs -lfoo */ argc *= 2; @@ -306,7 +309,7 @@ int slbt_get_exec_ctx( + 1; } - /* linking: arfilename, lafilename, laifilename, dsofilename */ + /* linking: arfilename, lafilename, laifilename, dsobasename, dsofilename */ if (dctx->cctx->mode == SLBT_MODE_LINK && dctx->cctx->libname) { /* arprefix, dsoprefix */ if (dctx->cctx->drvflags & SLBT_DRIVER_MODULE) { @@ -350,6 +353,14 @@ int slbt_get_exec_ctx( ch++; + /* dsobasename */ + ictx->ctx.dsobasename = ch; + ch += sprintf(ch,"%s%s%s", + ictx->ctx.ldirname, + dsoprefix, + dctx->cctx->libname); + ch++; + /* dsofilename */ ictx->ctx.dsofilename = ch; ch += sprintf(ch,"%s%s%s%s", @@ -413,15 +424,16 @@ int slbt_get_exec_ctx( if (dctx->cctx->release) { ictx->ctx.relfilename = ch; ch += dctx->cctx->verinfo.verinfo - ? sprintf(ch,"%s%s%s-%s%s.%d.%d.%d", + ? sprintf(ch,"%s%s%s-%s%s.%d.%d.%d%s", ictx->ctx.ldirname, dsoprefix, dctx->cctx->libname, dctx->cctx->release, - dctx->cctx->settings.dsosuffix, + dctx->cctx->settings.osdsuffix, dctx->cctx->verinfo.major, dctx->cctx->verinfo.minor, - dctx->cctx->verinfo.revision) + dctx->cctx->verinfo.revision, + dctx->cctx->settings.osdfussix) : sprintf(ch,"%s%s%s-%s%s", ictx->ctx.ldirname, dsoprefix, |