summaryrefslogtreecommitdiff
path: root/src/logic
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2021-03-21 20:34:06 +0000
committermidipix <writeonce@midipix.org>2021-03-21 20:34:06 +0000
commitd75902bb4dae7b130d97eadd4a152d73ef83d1d4 (patch)
tree3b138e082cfa17533eb60edd6182a00f196fd7ed /src/logic
parent5b72bd7702ac55bad44a12de400de6efc633479d (diff)
downloadslibtool-d75902bb4dae7b130d97eadd4a152d73ef83d1d4.tar.bz2
slibtool-d75902bb4dae7b130d97eadd4a152d73ef83d1d4.tar.xz
link mode: slbt_exec_link(): record the -shrext argument for the install step.
Diffstat (limited to 'src/logic')
-rw-r--r--src/logic/slbt_exec_link.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/logic/slbt_exec_link.c b/src/logic/slbt_exec_link.c
index bab2ad2..ff1d7df 100644
--- a/src/logic/slbt_exec_link.c
+++ b/src/logic/slbt_exec_link.c
@@ -1713,6 +1713,8 @@ int slbt_exec_link(
char soxyz [PATH_MAX];
char solnk [PATH_MAX];
char arname[PATH_MAX];
+ char target[PATH_MAX];
+ char lnkname[PATH_MAX];
/* dry run */
if (dctx->cctx->drvflags & SLBT_DRIVER_DRY_RUN)
@@ -1834,6 +1836,28 @@ int slbt_exec_link(
/* dynamic library */
if (dot && !strcmp(dot,".la") && dctx->cctx->rpath && !fstaticonly) {
+ /* -shrext support */
+ if (dctx->cctx->shrext) {
+ strcpy(target,ectx->lafilename);
+ sprintf(lnkname,"%s.shrext%s",ectx->lafilename,dctx->cctx->shrext);
+
+ if (slbt_create_symlink(
+ dctx,ectx,
+ target,lnkname,
+ false))
+ return SLBT_NESTED_ERROR(dctx);
+
+ strcpy(target,lnkname);
+ sprintf(lnkname,"%s.shrext",ectx->lafilename);
+
+ if (slbt_create_symlink(
+ dctx,ectx,
+ target,lnkname,
+ false))
+ return SLBT_NESTED_ERROR(dctx);
+ }
+
+
/* linking: libfoo.so.x.y.z */
if (slbt_exec_link_create_library(
dctx,ectx,