summaryrefslogtreecommitdiffhomepage
path: root/src/driver
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2017-05-19 20:43:36 -0400
committermidipix <writeonce@midipix.org>2017-05-19 20:46:33 -0400
commit288d6286acf91b71c3510fca8553f502c6bdf239 (patch)
treeadc339aebcfb487bfd24090e1329a7f125f2f629 /src/driver
parente04ee339ac0f22634e455976f53b2213e7402f83 (diff)
downloadslibtool-288d6286acf91b71c3510fca8553f502c6bdf239.tar.bz2
slibtool-288d6286acf91b71c3510fca8553f502c6bdf239.tar.xz
driver: refine handling of --target.
* for a --target argument that precedes the compiler argument, as in: slibtool --target=xxx --mode=compile cc --> set an explicit (cross-)target, --> but do not pass the argument to the compiler. * for a --target argument that follows the compiler argument, as in: slibtool --mode=compile cc --target=xxx --> set an explicit (cross-)target, --> and also pass the argument to the compiler.
Diffstat (limited to 'src/driver')
-rw-r--r--src/driver/slbt_driver_ctx.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c
index 578a7c2..9b984e0 100644
--- a/src/driver/slbt_driver_ctx.c
+++ b/src/driver/slbt_driver_ctx.c
@@ -296,14 +296,7 @@ static int slbt_split_argv(
else if (!(strcmp("Xcompiler",&argv[i][1])))
*cargv++ = argv[++i];
- else if (!(strncmp("-target=",&argv[i][1],strlen("-target="))))
- *targv++ = argv[i];
-
- else if (!(strcmp("-target",&argv[i][1]))) {
- *targv++ = argv[i++];
- *targv++ = argv[i];
-
- } else if ((argv[i][1] == 'R') && (argv[i][2] == 0)) {
+ else if ((argv[i][1] == 'R') && (argv[i][2] == 0)) {
*targv++ = argv[i++];
*targv++ = argv[i];