summaryrefslogtreecommitdiffhomepage
path: root/src/logic/slbt_exec_link.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/logic/slbt_exec_link.c')
-rw-r--r--src/logic/slbt_exec_link.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/logic/slbt_exec_link.c b/src/logic/slbt_exec_link.c
index c8586c5..f61c5db 100644
--- a/src/logic/slbt_exec_link.c
+++ b/src/logic/slbt_exec_link.c
@@ -1935,6 +1935,36 @@ int slbt_exec_link(
return SLBT_NESTED_ERROR(dctx);
}
+ /* static-only libfoo.la */
+ if (fstaticonly && dot && !strcmp(dot,".la")) {
+ const struct slbt_flavor_settings * dflavor;
+
+ if (slbt_get_flavor_settings("default",&dflavor) < 0)
+ return SLBT_CUSTOM_ERROR(dctx,SLBT_ERR_LINK_FLOW);
+
+ if (strcmp(dctx->cctx->settings.dsosuffix,dflavor->dsosuffix)) {
+ strcpy(target,ectx->lafilename);
+ sprintf(lnkname,"%s.shrext%s",
+ ectx->lafilename,
+ dctx->cctx->settings.dsosuffix);
+
+ if (slbt_create_symlink(
+ dctx,ectx,
+ target,lnkname,
+ SLBT_SYMLINK_DEFAULT))
+ return SLBT_NESTED_ERROR(dctx);
+
+ strcpy(target,lnkname);
+ sprintf(lnkname,"%s.shrext",ectx->lafilename);
+
+ if (slbt_create_symlink(
+ dctx,ectx,
+ target,lnkname,
+ SLBT_SYMLINK_DEFAULT))
+ return SLBT_NESTED_ERROR(dctx);
+ }
+ }
+
/* -all-static library */
if (fstaticonly && dctx->cctx->libname)
if (slbt_create_symlink(