summaryrefslogtreecommitdiff
path: root/src/logic
diff options
context:
space:
mode:
Diffstat (limited to 'src/logic')
-rw-r--r--src/logic/slbt_exec_compile.c9
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++;
}