summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/logic/slbt_exec_link.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/src/logic/slbt_exec_link.c b/src/logic/slbt_exec_link.c
index ff1d7df..11f1416 100644
--- a/src/logic/slbt_exec_link.c
+++ b/src/logic/slbt_exec_link.c
@@ -478,9 +478,9 @@ static int slbt_exec_link_adjust_argument_vector(
*slash = 0;
if (slbt_dprintf(fdwrap,
- "DL_PATH=\"$DL_PATH$COLON%s/%s\"\n"
+ "DL_PATH=\"$DL_PATH$COLON%s%s%s\"\n"
"COLON=':'\n\n",
- cwd,arg) < 0)
+ ((arg[0] == '/') ? "" : cwd),((arg[0] == '/') ? "" : "/"),arg) < 0)
return slbt_exec_link_exit(
depsmeta,
SLBT_SYSTEM_ERROR(dctx,0));
@@ -556,6 +556,26 @@ static int slbt_exec_link_adjust_argument_vector(
darg += strlen(darg);
darg++;
+
+ if ((fdwrap = slbt_exec_get_fdwrapper(ectx)) >= 0) {
+ if (slbt_dprintf(fdwrap,
+ "DL_PATH=\"$DL_PATH$COLON%s/%s\"\n"
+ "COLON=':'\n\n",
+ lib,depdir) < 0)
+ return slbt_exec_link_exit(
+ depsmeta,
+ SLBT_SYSTEM_ERROR(dctx,0));
+ }
+ } else if ((mark[0] == '-') && (mark[1] == 'L')) {
+ if ((fdwrap = slbt_exec_get_fdwrapper(ectx)) >= 0) {
+ if (slbt_dprintf(fdwrap,
+ "DL_PATH=\"$DL_PATH$COLON%s\"\n"
+ "COLON=':'\n\n",
+ &mark[2]) < 0)
+ return slbt_exec_link_exit(
+ depsmeta,
+ SLBT_SYSTEM_ERROR(dctx,0));
+ }
}
}
}