From f020833322bbb1e3080d6ad1792e2040454a224e Mon Sep 17 00:00:00 2001 From: midipix Date: May 11 2021 01:51:04 +0000 Subject: link mode: PE targets: -release: fix names used for and in import libraries. --- diff --git a/src/logic/slbt_exec_ctx.c b/src/logic/slbt_exec_ctx.c index 82961b6..02682cd 100644 --- a/src/logic/slbt_exec_ctx.c +++ b/src/logic/slbt_exec_ctx.c @@ -404,20 +404,24 @@ int slbt_get_exec_ctx( /* primary implib file name */ ictx->ctx.pimpfilename = ch; - ch += sprintf(ch,"%s%s%s.%d%s", + ch += sprintf(ch,"%s%s%s%s%s.%d%s", ictx->ctx.ldirname, impprefix, dctx->cctx->libname, + dctx->cctx->release ? "-" : "", + dctx->cctx->release ? dctx->cctx->release : "", dctx->cctx->verinfo.major, dctx->cctx->settings.impsuffix); ch++; /* versioned implib file name */ ictx->ctx.vimpfilename = ch; - ch += sprintf(ch,"%s%s%s.%d.%d.%d%s", + ch += sprintf(ch,"%s%s%s%s%s.%d.%d.%d%s", ictx->ctx.ldirname, impprefix, dctx->cctx->libname, + dctx->cctx->release ? "-" : "", + dctx->cctx->release ? dctx->cctx->release : "", dctx->cctx->verinfo.major, dctx->cctx->verinfo.minor, dctx->cctx->verinfo.revision, diff --git a/src/logic/slbt_exec_link.c b/src/logic/slbt_exec_link.c index 6be924f..e11f0b7 100644 --- a/src/logic/slbt_exec_link.c +++ b/src/logic/slbt_exec_link.c @@ -1870,9 +1870,11 @@ int slbt_exec_link( actx = ectx; /* libfoo.so.x.y.z */ - if ((size_t)snprintf(soxyz,sizeof(soxyz),"%s%s%s.%d.%d.%d%s", + if ((size_t)snprintf(soxyz,sizeof(soxyz),"%s%s%s%s%s.%d.%d.%d%s", ectx->sonameprefix, dctx->cctx->libname, + dctx->cctx->release ? "-" : "", + dctx->cctx->release ? dctx->cctx->release : "", dctx->cctx->settings.osdsuffix, dctx->cctx->verinfo.major, dctx->cctx->verinfo.minor, @@ -1884,9 +1886,11 @@ int slbt_exec_link( } /* libfoo.so.x */ - sprintf(soname,"%s%s%s.%d%s", + sprintf(soname,"%s%s%s%s%s.%d%s", ectx->sonameprefix, dctx->cctx->libname, + dctx->cctx->release ? "-" : "", + dctx->cctx->release ? dctx->cctx->release : "", dctx->cctx->settings.osdsuffix, dctx->cctx->verinfo.major, dctx->cctx->settings.osdfussix);