From 03b266bde49f24d0432335a30ecb20a913ae4295 Mon Sep 17 00:00:00 2001 From: turbocat Date: Sun, 19 Jun 2022 19:06:29 +0000 Subject: [PATCH] ktcc: fixed relocatable object generation bug (parameter -r). git-svn-id: svn://kolibrios.org@9845 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/develop/ktcc/trunk/source/tcc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/programs/develop/ktcc/trunk/source/tcc.c b/programs/develop/ktcc/trunk/source/tcc.c index 5d10a8085a..3e7f9eb449 100644 --- a/programs/develop/ktcc/trunk/source/tcc.c +++ b/programs/develop/ktcc/trunk/source/tcc.c @@ -331,7 +331,7 @@ int main(int argc, char **argv) if (tcc_add_file(s, filename, filetype) < 0) ret = 1; else - if (s->output_type == TCC_OUTPUT_OBJ) { + if (s->output_type == TCC_OUTPUT_OBJ && !s->option_r) { ret = !!tcc_output_file(s, s->outfile); if (s->gen_deps && !ret) gen_makedeps(s, s->outfile, s->deps_outfile); @@ -360,7 +360,8 @@ int main(int argc, char **argv) #endif } else if (s->output_type == TCC_OUTPUT_EXE || - s->output_type == TCC_OUTPUT_DLL) + s->output_type == TCC_OUTPUT_DLL || + (s->output_type == TCC_OUTPUT_OBJ && s->option_r)) { ret = !!tcc_output_file(s, s->outfile); if (s->gen_deps && !ret)