diff options
author | midipix <writeonce@midipix.org> | 2024-03-07 04:34:06 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2024-03-07 04:35:12 +0000 |
commit | 6b2fa6f84296ba76206459a8f6e380f7bd3f817f (patch) | |
tree | 3d1e040542c66ce67d8a0c02f7da3c45cdeca36b | |
parent | e9a1d648f14e93291917a41aba5b1373490fd6bb (diff) | |
download | slibtool-6b2fa6f84296ba76206459a8f6e380f7bd3f817f.tar.bz2 slibtool-6b2fa6f84296ba76206459a8f6e380f7bd3f817f.tar.xz |
link mode: dependency logic: limit the scope of -shrext to the current library.
-rw-r--r-- | src/host/slbt_host_flavor.c | 3 | ||||
-rw-r--r-- | src/logic/slbt_exec_ctx.c | 14 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/host/slbt_host_flavor.c b/src/host/slbt_host_flavor.c index 2372f38..07a3ae3 100644 --- a/src/host/slbt_host_flavor.c +++ b/src/host/slbt_host_flavor.c @@ -146,9 +146,6 @@ slbt_hidden void slbt_init_flavor_settings( } memcpy(psettings,settings,sizeof(*settings)); - - if (cctx->shrext) - psettings->dsosuffix = cctx->shrext; } 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++; } |