TCC tools don't run exec command.

meesbs
Marko Semet 2020-05-21 04:27:31 +02:00
parent d5bd2531b0
commit 785af9373a
1 changed files with 1 additions and 18 deletions

View File

@ -481,24 +481,7 @@ static int execvp_win32(const char *prog, char **argv)
ST_FUNC void tcc_tool_cross(TCCState *s, char **argv, int target)
{
char program[4096];
char *a0 = argv[0];
int prefix = tcc_basename(a0) - a0;
snprintf(program, sizeof program,
"%.*s%s"
#ifdef TCC_TARGET_PE
"-win32"
#endif
"-tcc"
#ifdef _WIN32
".exe"
#endif
, prefix, a0, target == 64 ? "x86_64" : "i386");
if (strcmp(a0, program))
execvp(argv[0] = program, argv);
tcc_error("could not run '%s'", program);
tcc_error("-m%d not implemented.", target);
}
#endif /* TCC_TARGET_I386 && TCC_TARGET_X86_64 */