tcc.h: define TCC_IS_NATIVE

- disable tccrun feature for non-native (cross-) compilers
- define uplong for target adress size
- fix using -Wl,-Ttext=... for Win64 (tccpe: ADDR3264 imagebase)
This commit is contained in:
grischka
2012-03-05 20:15:56 +01:00
parent a0db7162af
commit a35b3059bb
4 changed files with 34 additions and 20 deletions

4
tcc.c
View File

@ -578,7 +578,11 @@ int main(int argc, char **argv)
tcc_print_stats(s, getclock_us() - start_time);
if (s->output_type == TCC_OUTPUT_MEMORY) {
#ifdef TCC_IS_NATIVE
ret = tcc_run(s, argc - optind, argv + optind);
#else
tcc_error_noabort("-run is not available in a cross compiler");
#endif
} else if (s->output_type == TCC_OUTPUT_PREPROCESS) {
if (s->outfile)
fclose(s->outfile);