summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-04-23 08:59:40 -0400
committermidipix <writeonce@midipix.org>2016-04-23 09:29:20 -0400
commit26ea30b3aa10c572acb726eff9b833e443eb46e2 (patch)
tree7f5f669afce7fd3fae22b6bdae544b5c84f438f6
parent4469ed8a0cdaf0e6f238415dc624e29f681baa5d (diff)
downloadslibtool-26ea30b3aa10c572acb726eff9b833e443eb46e2.tar.bz2
slibtool-26ea30b3aa10c572acb726eff9b833e443eb46e2.tar.xz
link mode: added .lai support via a symlink to the .la library wrapper.
-rw-r--r--include/slibtool/slibtool.h1
-rw-r--r--src/logic/slbt_exec_ctx.c11
-rw-r--r--src/logic/slbt_exec_link.c8
3 files changed, 19 insertions, 1 deletions
diff --git a/include/slibtool/slibtool.h b/include/slibtool/slibtool.h
index 091ec79..1430fdc 100644
--- a/include/slibtool/slibtool.h
+++ b/include/slibtool/slibtool.h
@@ -119,6 +119,7 @@ struct slbt_exec_ctx {
char * ltobjname;
char * arfilename;
char * lafilename;
+ char * laifilename;
char * dsofilename;
char * deffilename;
char * dimpfilename;
diff --git a/src/logic/slbt_exec_ctx.c b/src/logic/slbt_exec_ctx.c
index ad4ffa7..23cae68 100644
--- a/src/logic/slbt_exec_ctx.c
+++ b/src/logic/slbt_exec_ctx.c
@@ -268,7 +268,7 @@ int slbt_get_exec_ctx(
+ 1;
}
- /* linking: arfilename, lafilename, dsofilename */
+ /* linking: arfilename, lafilename, laifilename, dsofilename */
if (dctx->cctx->mode == SLBT_MODE_LINK && dctx->cctx->libname) {
/* arprefix, dsoprefix */
if (dctx->cctx->drvflags & SLBT_DRIVER_MODULE) {
@@ -299,6 +299,15 @@ int slbt_get_exec_ctx(
ch++;
+ /* laifilename */
+ ictx->ctx.laifilename = ch;
+ ch += sprintf(ch,"%s%s%s.lai",
+ ictx->ctx.ldirname,
+ dsoprefix,
+ dctx->cctx->libname);
+ ch++;
+
+
/* dsofilename */
ictx->ctx.dsofilename = ch;
ch += sprintf(ch,"%s%s%s%s",
diff --git a/src/logic/slbt_exec_link.c b/src/logic/slbt_exec_link.c
index 5a82b8c..793afc2 100644
--- a/src/logic/slbt_exec_link.c
+++ b/src/logic/slbt_exec_link.c
@@ -1126,6 +1126,14 @@ int slbt_exec_link(
ectx->lafilename,
true));
+ /* .lai wrapper symlink */
+ if (ret == 0)
+ ret = (slbt_create_symlink(
+ dctx,ectx,
+ output,
+ ectx->laifilename,
+ true));
+
/* all done */
fclose(fout);
slbt_free_exec_ctx(actx);