Fix libtcc_test_mt with lib64
we need to pass NATIVE_DEFINES, and we need to actually parse and pass them into the state.
This commit is contained in:
parent
b3893baa45
commit
8b23662d53
2 changed files with 9 additions and 1 deletions
|
@ -77,7 +77,7 @@ hello-run: ../examples/ex1.c
|
||||||
|
|
||||||
libtes%: libtcc_tes%$(EXESUF)
|
libtes%: libtcc_tes%$(EXESUF)
|
||||||
@echo ------------ $@ ------------
|
@echo ------------ $@ ------------
|
||||||
./libtcc_tes$*$(EXESUF) $(TCCFLAGS)
|
./libtcc_tes$*$(EXESUF) $(TCCFLAGS) $(NATIVE_DEFINES)
|
||||||
|
|
||||||
libtcc_tes%$(EXESUF): libtcc_tes%.c $(LIBTCC)
|
libtcc_tes%$(EXESUF): libtcc_tes%.c $(LIBTCC)
|
||||||
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
|
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
|
||||||
|
|
|
@ -102,6 +102,14 @@ void parse_args(TCCState *s)
|
||||||
tcc_add_include_path(s, a+2);
|
tcc_add_include_path(s, a+2);
|
||||||
else if (a[1] == 'L')
|
else if (a[1] == 'L')
|
||||||
tcc_add_library_path(s, a+2);
|
tcc_add_library_path(s, a+2);
|
||||||
|
else if (a[1] == 'D') {
|
||||||
|
char *eq = strchr(a+2, '=');
|
||||||
|
if (eq) {
|
||||||
|
*eq = 0;
|
||||||
|
tcc_define_symbol(s, a+2, eq+1);
|
||||||
|
*eq = '=';
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue