summaryrefslogtreecommitdiffhomepage
path: root/src/driver/slbt_split_argv.c
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-02-10 19:43:19 +0000
committermidipix <writeonce@midipix.org>2024-02-10 20:18:26 +0000
commite035ec7d042843bd0af392660a77b091cb80cc7c (patch)
tree4565b97115e50163fc5d5bdada6e654c853bd3c5 /src/driver/slbt_split_argv.c
parent49181b43bb45e5e10d0de0dbf7cfb9270374b8af (diff)
downloadslibtool-e035ec7d042843bd0af392660a77b091cb80cc7c.tar.bz2
slibtool-e035ec7d042843bd0af392660a77b091cb80cc7c.tar.xz
slbt_split_argv(): also normalize header search directory arguments (-I).
Diffstat (limited to 'src/driver/slbt_split_argv.c')
-rw-r--r--src/driver/slbt_split_argv.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/driver/slbt_split_argv.c b/src/driver/slbt_split_argv.c
index fa1fd83..2ad62ca 100644
--- a/src/driver/slbt_split_argv.c
+++ b/src/driver/slbt_split_argv.c
@@ -171,7 +171,7 @@ int slbt_split_argv(
return -1;
}
- /* clone and normalize the argv vector (-l, --library) */
+ /* clone and normalize the argv vector */
for (argc=0,size=0,dargv=argv; *dargv; argc++,dargv++)
size += strlen(*dargv) + 1;
@@ -199,6 +199,16 @@ int slbt_split_argv(
flast = true;
fcopy = true;
+ } else if (!strcmp(argv[i],"-I")) {
+ *dargv++ = dst;
+ *dst++ = '-';
+ *dst++ = 'I';
+ strcpy(dst,argv[++i]);
+ dst += strlen(dst)+1;
+
+ } else if (!strncmp(argv[i],"-I",2)) {
+ fcopy = true;
+
} else if (!strcmp(argv[i],"-l")) {
*dargv++ = dst;
*dst++ = '-';