aboutsummaryrefslogtreecommitdiff
path: root/tcc.c
diff options
context:
space:
mode:
authorgrischka <grischka>2012-03-05 20:15:56 +0100
committergrischka <grischka>2012-03-05 20:15:56 +0100
commita35b3059bb0aaaa5965022ad317aaba27e22f148 (patch)
tree17df79be55c72aafe2d1856a20fc1c367c9e20e4 /tcc.c
parenta0db7162af0f694c25b278984ac66a46fa099000 (diff)
downloadtinycc-a35b3059bb0aaaa5965022ad317aaba27e22f148.tar.gz
tinycc-a35b3059bb0aaaa5965022ad317aaba27e22f148.tar.bz2
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)
Diffstat (limited to 'tcc.c')
-rw-r--r--tcc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tcc.c b/tcc.c
index 0c51451..0bcb029 100644
--- a/tcc.c
+++ b/tcc.c
@@ -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);