From 2330a5df5438784e4764f7ad0f08f78c8b1a89c4 Mon Sep 17 00:00:00 2001 From: midipix Date: Fri, 29 Apr 2016 12:03:05 -0400 Subject: execution context: added compatible -rpath support. --- src/logic/slbt_exec_ctx.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src') 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", -- cgit v1.2.3