summaryrefslogtreecommitdiffhomepage
path: root/src/logic/linkcmd/slbt_linkcmd_argv.c
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-03-13 05:00:06 +0000
committermidipix <writeonce@midipix.org>2024-03-13 21:34:36 +0000
commit198205f4097928184ed5bfa288bb4dfbba1e2b5f (patch)
tree2dbe1fef9d8e404bccbce3e490d96a7b11e036bc /src/logic/linkcmd/slbt_linkcmd_argv.c
parentc5ee865ab8df8672b287fd8bd033bd1bb0309a3f (diff)
downloadslibtool-198205f4097928184ed5bfa288bb4dfbba1e2b5f.tar.bz2
slibtool-198205f4097928184ed5bfa288bb4dfbba1e2b5f.tar.xz
link mode: properly support dependency derivation in static-only build projects.
Diffstat (limited to 'src/logic/linkcmd/slbt_linkcmd_argv.c')
-rw-r--r--src/logic/linkcmd/slbt_linkcmd_argv.c18
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,