summaryrefslogtreecommitdiff
path: root/src/logic/slbt_exec_ctx.c
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-03-07 04:34:06 +0000
committermidipix <writeonce@midipix.org>2024-03-07 04:35:12 +0000
commit6b2fa6f84296ba76206459a8f6e380f7bd3f817f (patch)
tree3d1e040542c66ce67d8a0c02f7da3c45cdeca36b /src/logic/slbt_exec_ctx.c
parente9a1d648f14e93291917a41aba5b1373490fd6bb (diff)
downloadslibtool-6b2fa6f84296ba76206459a8f6e380f7bd3f817f.tar.bz2
slibtool-6b2fa6f84296ba76206459a8f6e380f7bd3f817f.tar.xz
link mode: dependency logic: limit the scope of -shrext to the current library.
Diffstat (limited to 'src/logic/slbt_exec_ctx.c')
-rw-r--r--src/logic/slbt_exec_ctx.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/logic/slbt_exec_ctx.c b/src/logic/slbt_exec_ctx.c
index ea3f323..cfcfc2a 100644
--- a/src/logic/slbt_exec_ctx.c
+++ b/src/logic/slbt_exec_ctx.c
@@ -212,6 +212,7 @@ int slbt_ectx_get_exec_ctx(
char * ch;
char * mark;
const char * dmark;
+ const char * dsoext;
char * slash;
char * arname;
struct slbt_archive_ctx ** dlactxv;
@@ -381,6 +382,9 @@ int slbt_ectx_get_exec_ctx(
/* linking: arfilename, lafilename, laifilename, dsobasename, dsofilename, mapfilename */
if (dctx->cctx->mode == SLBT_MODE_LINK && dctx->cctx->libname) {
+ if (!(dsoext = dctx->cctx->shrext))
+ dsoext = dctx->cctx->settings.dsosuffix;
+
/* arprefix, dsoprefix */
if (dctx->cctx->drvflags & SLBT_DRIVER_MODULE) {
ictx->ctx.sonameprefix = "";
@@ -437,7 +441,7 @@ int slbt_ectx_get_exec_ctx(
ictx->ctx.ldirname,
dsoprefix,
dctx->cctx->libname,
- dctx->cctx->settings.dsosuffix);
+ dsoext);
ch++;
/* mapfilename */
@@ -459,7 +463,7 @@ int slbt_ectx_get_exec_ctx(
dctx->cctx->libname,
dctx->cctx->release ? "-" : "",
dctx->cctx->release ? dctx->cctx->release : "",
- dctx->cctx->settings.dsosuffix);
+ dsoext);
ch++;
/* rpathfilename */
@@ -468,7 +472,7 @@ int slbt_ectx_get_exec_ctx(
ictx->ctx.ldirname,
dsoprefix,
dctx->cctx->libname,
- dctx->cctx->settings.dsosuffix);
+ dsoext);
ch++;
/* default implib file name */
@@ -526,7 +530,7 @@ int slbt_ectx_get_exec_ctx(
dsoprefix,
dctx->cctx->libname,
dctx->cctx->release,
- dctx->cctx->settings.dsosuffix);
+ dsoext);
ch++;
}
@@ -538,7 +542,7 @@ int slbt_ectx_get_exec_ctx(
dsoprefix,
dctx->cctx->libname,
dctx->cctx->release,
- dctx->cctx->settings.dsosuffix);
+ dsoext);
ch++;
}