summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2018-10-21 21:31:46 -0400
committermidipix <writeonce@midipix.org>2018-10-21 21:49:54 -0400
commit85f619d7a434e9d72ad9efa622127a996546646b (patch)
treeacd28adaf408dda3dd21c43d09cf86004e828079 /src
parent8902815c5f5a9f16224140245c0b800d12455735 (diff)
downloadslibtool-85f619d7a434e9d72ad9efa622127a996546646b.tar.bz2
slibtool-85f619d7a434e9d72ad9efa622127a996546646b.tar.xz
slbt_exec_link_finalize_argument_vector(): remove redundant -L arguments.
Diffstat (limited to 'src')
-rw-r--r--src/logic/slbt_exec_link.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/logic/slbt_exec_link.c b/src/logic/slbt_exec_link.c
index ed45d67..d5ebf71 100644
--- a/src/logic/slbt_exec_link.c
+++ b/src/logic/slbt_exec_link.c
@@ -693,6 +693,20 @@ static int slbt_exec_link_finalize_argument_vector(
}
}
+ /* -L argument? */
+ } else if ((parg[0][0] == '-') && (parg[0][1] == 'L')) {
+ /* find a previous occurence of this -L argument */
+ for (rarg=0, larg=aargv; !rarg && (larg<aarg); larg++)
+ if (!strcmp(*larg,*parg))
+ rarg = larg;
+
+ /* repeated -L argument? */
+ if (rarg) {
+ parg++;
+ } else {
+ *aarg++ = *parg++;
+ }
+
/* placeholder argument? */
} else if (!strncmp(*parg,"-USLIBTOOL_PLACEHOLDER_",23)) {
parg++;