[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] [PATCH 7/7] tcc -E: Let output_default be <file>.o instea
From: |
Kirill Smelkov |
Subject: |
[Tinycc-devel] [PATCH 7/7] tcc -E: Let output_default be <file>.o instead of a.out |
Date: |
Thu, 17 Jun 2010 00:38:50 +0400 |
This affectes where `tcc -E -MD file.c` will place generated dependency
information -- previously, for `tcc -E` output_default was a.out, and so
deps were put into a.d .
Avoid this behaviour, by treating `tcc -E` as `tcc -c` with respect to
output_default computation.
This will not hurt anything else (preprocessor outputs to either stdout,
or to explicitely given (-o <file>) destination, so no default filename
is used here), and on the other hand `tcc -E -MD file.c` now puts
dependencies into file.d (the same behaviour as for gcc -E).
---
tcc.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/tcc.c b/tcc.c
index a4b610d..2526d9d 100644
--- a/tcc.c
+++ b/tcc.c
@@ -467,7 +467,9 @@ int main(int argc, char **argv)
strcpy(ext, ".exe");
else
#endif
- if (output_type == TCC_OUTPUT_OBJ && !reloc_output && *ext)
+ if ((output_type == TCC_OUTPUT_OBJ ||
+ output_type == TCC_OUTPUT_PREPROCESS)
+ && !reloc_output && *ext)
strcpy(ext, ".o");
else
pstrcpy(outfile_default, sizeof(outfile_default), "a.out");
--
1.7.1.334.gebb7bc.dirty
[Tinycc-devel] [PATCH 5/7] tcc: Always compute default outfile name, Kirill Smelkov, 2010/06/16
[Tinycc-devel] [PATCH 3/7] chmod a-x i386-gen.c, Kirill Smelkov, 2010/06/16
[Tinycc-devel] [PATCH 1/7] .cvsignore -> .gitignore, Kirill Smelkov, 2010/06/16
[Tinycc-devel] [PATCH 6/7] tcc: Draft suppoprt for -MD/-MF options, Kirill Smelkov, 2010/06/16
[Tinycc-devel] [PATCH 4/7] tcc: Fix typo in error (it's '%s', not '%s), Kirill Smelkov, 2010/06/16