summaryrefslogtreecommitdiff
path: root/src/logic
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-04-29 12:03:05 -0400
committermidipix <writeonce@midipix.org>2016-04-29 19:22:30 -0400
commit2330a5df5438784e4764f7ad0f08f78c8b1a89c4 (patch)
treed9ff4bca2967eeb6dc9ba861648f4565a09a060c /src/logic
parentaf7db9ab05e0c5ffd09135467960721f06338a53 (diff)
downloadslibtool-2330a5df5438784e4764f7ad0f08f78c8b1a89c4.tar.bz2
slibtool-2330a5df5438784e4764f7ad0f08f78c8b1a89c4.tar.xz
execution context: added compatible -rpath support.
Diffstat (limited to 'src/logic')
-rw-r--r--src/logic/slbt_exec_ctx.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/logic/slbt_exec_ctx.c b/src/logic/slbt_exec_ctx.c
index e874ec6..e9e7340 100644
--- a/src/logic/slbt_exec_ctx.c
+++ b/src/logic/slbt_exec_ctx.c
@@ -72,7 +72,7 @@ static struct slbt_exec_ctx_impl * slbt_exec_ctx_alloc(
/* clerical [worst-case] buffer size (guard, .libs, version) */
size = strlen(".lo") + 1;
- size += 8 * (strlen(".libs/") + 1);
+ size += 12 * (strlen(".libs/") + 1);
size += 36 * (strlen(".0000") + 1);
/* buffer size (cargv, -Wc) */
@@ -237,6 +237,10 @@ int slbt_get_exec_ctx(
ictx->ctx.lout[0] = &ictx->ctx.argv[i++];
ictx->ctx.lout[1] = &ictx->ctx.argv[i++];
+
+ ictx->ctx.rpath[0] = &ictx->ctx.argv[i++];
+ ictx->ctx.rpath[1] = &ictx->ctx.argv[i++];
+
ictx->ctx.sentinel= &ictx->ctx.argv[i++];
slbt_reset_placeholders(&ictx->ctx);
@@ -326,6 +330,15 @@ int slbt_get_exec_ctx(
dctx->cctx->settings.dsosuffix);
ch++;
+ /* rpathfilename */
+ ictx->ctx.rpathfilename = ch;
+ ch += sprintf(ch,"%s%s%s%s.slibtool.rpath",
+ ictx->ctx.ldirname,
+ dsoprefix,
+ dctx->cctx->libname,
+ dctx->cctx->settings.dsosuffix);
+ ch++;
+
/* default implib file name */
ictx->ctx.dimpfilename = ch;
ch += sprintf(ch,"%s%s%s%s",