summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-02-04 03:11:56 +0000
committermidipix <writeonce@midipix.org>2024-02-04 03:15:58 +0000
commit80b4319d2e8453a90c2cecba3bfd43cf4dddbc0a (patch)
treeb398622d72e9b12ea3277a27c2fe701d1d878eee /src
parent63953420efc0b8f686bfba75572365be10bbaa1f (diff)
downloadslibtool-80b4319d2e8453a90c2cecba3bfd43cf4dddbc0a.tar.bz2
slibtool-80b4319d2e8453a90c2cecba3bfd43cf4dddbc0a.tar.xz
driver: accept ``target <target>'' as a synonym for ``--target=<target>''.
Diffstat (limited to 'src')
-rw-r--r--src/driver/slbt_driver_ctx.c7
-rw-r--r--src/skin/slbt_skin_default.c3
2 files changed, 9 insertions, 1 deletions
diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c
index c733bfc..fcac8a8 100644
--- a/src/driver/slbt_driver_ctx.c
+++ b/src/driver/slbt_driver_ctx.c
@@ -691,6 +691,13 @@ static int slbt_split_argv(
*cargv++ = argv[i];
*targv++ = argv[i];
+ } else if (!(strcmp("target",&argv[i][1]))) {
+ *cargv++ = argv[i];
+ *targv++ = argv[i++];
+
+ *cargv++ = argv[i];
+ *targv++ = argv[i];
+
} else if (!(strncmp("-sysroot=",&argv[i][1],9))) {
*cargv++ = argv[i];
*targv++ = argv[i];
diff --git a/src/skin/slbt_skin_default.c b/src/skin/slbt_skin_default.c
index 9dd372e..e904e84 100644
--- a/src/skin/slbt_skin_default.c
+++ b/src/skin/slbt_skin_default.c
@@ -139,7 +139,8 @@ const struct argv_option slbt_default_options[] = {
{"output", 'o',TAG_OUTPUT,ARGV_OPTARG_REQUIRED,0,0,"<file>",
"write output to %s"},
- {"target", 0,TAG_TARGET,ARGV_OPTARG_REQUIRED,0,0,"<target>",
+ {"target", 0,TAG_TARGET,ARGV_OPTARG_REQUIRED,
+ ARGV_OPTION_HYBRID_SPACE,0,"<target>",
"set an explicit (cross-)target, then pass it to "
"the compiler"},