From 3f13e33872aeac7d1363ac9bd01baad9f8a80764 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Sun, 16 Jul 2017 21:03:25 +0200 Subject: [PATCH] Fix cross compilers Only native compilers support -run and hence the new -dT. --- tcc.c | 2 ++ tcctools.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tcc.c b/tcc.c index b502df1f..769501f8 100644 --- a/tcc.c +++ b/tcc.c @@ -282,8 +282,10 @@ redo: n = s->nb_files; if (n == 0) tcc_error("no input files\n"); +#ifdef TCC_IS_NATIVE if (s->do_test) tcc_tool_test(s, argc, argv); /* maybe never returns */ +#endif if (s->output_type == TCC_OUTPUT_PREPROCESS) { if (!s->outfile) { diff --git a/tcctools.c b/tcctools.c index 0e2755bf..cfcb03d2 100644 --- a/tcctools.c +++ b/tcctools.c @@ -543,6 +543,7 @@ ST_FUNC void gen_makedeps(TCCState *s, const char *target, const char *filename) fclose(depout); } +#ifdef TCC_IS_NATIVE /* -------------------------------------------------------------- */ /* run test snippets from file */ @@ -647,5 +648,6 @@ ST_FUNC int tcc_tool_test(TCCState *s, int argc, char **argv) tcc_free(buf); exit(0); } +#endif /* TCC_IS_NATIVE */ /* -------------------------------------------------------------- */