diff options
Diffstat (limited to 'src/logic/linkcmd')
-rw-r--r-- | src/logic/linkcmd/slbt_linkcmd_argv.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/logic/linkcmd/slbt_linkcmd_argv.c b/src/logic/linkcmd/slbt_linkcmd_argv.c index a44fdb8..3999b29 100644 --- a/src/logic/linkcmd/slbt_linkcmd_argv.c +++ b/src/logic/linkcmd/slbt_linkcmd_argv.c @@ -861,7 +861,7 @@ slbt_hidden int slbt_exec_link_finalize_argument_vector( /* if all -l arguments following the previous */ /* occurence had already appeared before the */ /* previous argument, then the current */ - /* occurence is redundant. */ + /* occurence is (possibly) redundant. */ for (darg=&larg[1]; rarg && darg<aarg; darg++) { /* only test -l arguments */ @@ -872,6 +872,13 @@ slbt_hidden int slbt_exec_link_finalize_argument_vector( } } + /* any archive (.a) input arguments between the */ + /* current occurrence and the previous one? */ + for (darg=&larg[1]; rarg && darg<aarg; darg++) + if ((dot = strrchr(*darg,'.'))) + if (!(strcmp(dot,arsuffix))) + rarg = 0; + /* final verdict: repeated -l argument? */ if (rarg) { parg++; |