diff options
author | midipix <writeonce@midipix.org> | 2024-03-14 02:30:57 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2024-03-14 02:30:57 +0000 |
commit | 870bf7b79425d2d09fc95574e2d4eb161fc33823 (patch) | |
tree | 0a6ec8e6d401ab5a64ef5f2cea80b50dd95eeb8c /src/logic | |
parent | b48cb77c5fe44e3392ecb9f4335c6a9b7401c89d (diff) | |
download | slibtool-870bf7b79425d2d09fc95574e2d4eb161fc33823.tar.bz2 slibtool-870bf7b79425d2d09fc95574e2d4eb161fc33823.tar.xz |
compile mode: avoid -I deduplication with project specific drivers.
Diffstat (limited to 'src/logic')
-rw-r--r-- | src/logic/slbt_exec_compile.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/logic/slbt_exec_compile.c b/src/logic/slbt_exec_compile.c index cddb057..75194a3 100644 --- a/src/logic/slbt_exec_compile.c +++ b/src/logic/slbt_exec_compile.c @@ -50,6 +50,7 @@ static int slbt_exec_compile_finalize_argument_vector( char ** dst; char ** cmp; char * ccwrap; + char * custom; /* vector size */ base = ectx->argv; @@ -75,6 +76,9 @@ static int slbt_exec_compile_finalize_argument_vector( /* (program name) */ parg = &base[1]; + /* avoid -I deduplication with project specific drivers */ + custom = strchr(ectx->program,'/'); + /* split object args from all other args, record output */ /* annotation, and remove redundant -l arguments */ for (; *parg; ) { @@ -109,7 +113,7 @@ static int slbt_exec_compile_finalize_argument_vector( cap = aarg; dst = &base[1]; - for (; src<cap; ) { + for (; !custom && src<cap; ) { if (((*src)[0] == '-') && ((*src)[1] == 'I')) { cmp = &base[1]; @@ -139,6 +143,9 @@ static int slbt_exec_compile_finalize_argument_vector( else if (((*src)[0] != '-') || ((*src)[1] != 'I')) *dst++ = *src; + else if (custom) + *dst++ = *src; + src++; } |