diff options
Diffstat (limited to 'src/logic/linkcmd/slbt_linkcmd_argv.c')
-rw-r--r-- | src/logic/linkcmd/slbt_linkcmd_argv.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/logic/linkcmd/slbt_linkcmd_argv.c b/src/logic/linkcmd/slbt_linkcmd_argv.c index a7c0777..71f4a00 100644 --- a/src/logic/linkcmd/slbt_linkcmd_argv.c +++ b/src/logic/linkcmd/slbt_linkcmd_argv.c @@ -516,7 +516,7 @@ slbt_hidden int slbt_exec_link_adjust_argument_vector( darg += dlen; darg[-1] = 0; - /* handle -L... as needed */ + /* handle -L... and ::... as needed */ if ((mark[0] == '-') && (mark[1] == 'L') && (mark[2] != '/')) { @@ -537,6 +537,22 @@ slbt_hidden int slbt_exec_link_adjust_argument_vector( "%s/%s",lib,depdir)) < 0) return ret; + } else if ((mark[0] == ':') && (mark[1] == ':')) { + if (strlen(mark) >= sizeof(depdir) - 1) + return slbt_linkcmd_exit( + depsmeta, + SLBT_BUFFER_ERROR(dctx)); + + darg = mark; + strcpy(depdir,&mark[2]); + + sprintf(darg,"%s/%s", + mark[2] == '/' ? "" : lib, + depdir); + + darg += strlen(darg); + darg++; + } else if ((mark[0] == '-') && (mark[1] == 'L')) { if ((ret = slbt_emit_fdwrap_amend_dl_path( dctx,ectx,depsmeta, |