summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-04-23 21:51:32 -0400
committermidipix <writeonce@midipix.org>2016-04-23 22:09:24 -0400
commit70c446d3551afa585977e4bf040b6cbef450597f (patch)
tree354ec64bb43010e92369ea2fdd8d8e75067f8bbe
parent663ef212c7bfaeb19d329af0195a26a48f30b4c9 (diff)
downloadslibtool-70c446d3551afa585977e4bf040b6cbef450597f.tar.bz2
slibtool-70c446d3551afa585977e4bf040b6cbef450597f.tar.xz
driver: support automake's reliance on unrecognized argument removal.
-rw-r--r--src/driver/slbt_driver_ctx.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c
index f65c633..ed9639a 100644
--- a/src/driver/slbt_driver_ctx.c
+++ b/src/driver/slbt_driver_ctx.c
@@ -208,10 +208,17 @@ static int slbt_split_argv(
cargv = sargv->cargv;
for (; i<argc; i++) {
- if (argv[i][0] != '-')
- *cargv++ = argv[i];
+ if (argv[i][0] != '-') {
+ if (argv[i+1] && (argv[i+1][0] == '+')
+ && (argv[i+1][1] == '=')
+ && (argv[i+1][2] == 0)
+ && !(strrchr(argv[i],'.')))
+ /* libfoo_la_LDFLAGS += -Wl,.... */
+ i++;
+ else
+ *cargv++ = argv[i];
- else if (argv[i][1] == 'o') {
+ } else if (argv[i][1] == 'o') {
*targv++ = argv[i];
if (argv[i][2] == 0)