diff options
author | midipix <writeonce@midipix.org> | 2018-10-21 21:31:46 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2018-10-21 21:49:54 -0400 |
commit | 85f619d7a434e9d72ad9efa622127a996546646b (patch) | |
tree | acd28adaf408dda3dd21c43d09cf86004e828079 /src/logic | |
parent | 8902815c5f5a9f16224140245c0b800d12455735 (diff) | |
download | slibtool-85f619d7a434e9d72ad9efa622127a996546646b.tar.bz2 slibtool-85f619d7a434e9d72ad9efa622127a996546646b.tar.xz |
slbt_exec_link_finalize_argument_vector(): remove redundant -L arguments.
Diffstat (limited to 'src/logic')
-rw-r--r-- | src/logic/slbt_exec_link.c | 14 |
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++; |