aboutsummaryrefslogtreecommitdiff
path: root/tccelf.c
diff options
context:
space:
mode:
authorseyko <seyko2@gmail.com>2015-04-12 15:35:37 +0300
committerseyko <seyko2@gmail.com>2015-04-12 15:35:37 +0300
commit05364072042ff37904a7b0b14cdd85a1ea1ca11d (patch)
tree49d2eb6f0133f3d59b2de06de4887c99786c6cf9 /tccelf.c
parentdcb36587b5950b000f536e374eeed3787937db27 (diff)
downloadtinycc-05364072042ff37904a7b0b14cdd85a1ea1ca11d.tar.gz
tinycc-05364072042ff37904a7b0b14cdd85a1ea1ca11d.tar.bz2
ability to specify a type of the input file with the -x switch
Usage example: tcc -xc ex5.cgi From a gcc docs: You can specify the input language explicitly with the -x option: -x language Specify explicitly the language for the following input files (rather than letting the compiler choose a default based on the file name suffix). This option applies to all following input files until the next -x option. Possible values for language are: c c-header c-cpp-output c++ c++-header c++-cpp-output objective-c objective-c-header objective-c-cpp-output objective-c++ objective-c++-header objective-c++-cpp-output assembler assembler-with-cpp ada f77 f77-cpp-input f95 f95-cpp-input java -x none Turn off any specification of a language, so that subsequent files are handled according to their file name suffixes (as they are if -x has not been used at all)
Diffstat (limited to 'tccelf.c')
-rw-r--r--tccelf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tccelf.c b/tccelf.c
index b9ca8b7..db81201 100644
--- a/tccelf.c
+++ b/tccelf.c
@@ -1562,7 +1562,7 @@ static int tcc_add_support(TCCState *s1, const char *filename)
#endif
,filename);
- return tcc_add_file(s1, buf);
+ return tcc_add_file(s1, buf, TCC_FILETYPE_BINARY);
}
ST_FUNC void tcc_add_bcheck(TCCState *s1)
@@ -1610,7 +1610,7 @@ ST_FUNC void tcc_add_runtime(TCCState *s1)
tcc_add_library(s1, "c");
#ifdef CONFIG_USE_LIBGCC
if (!s1->static_link) {
- tcc_add_file(s1, TCC_LIBGCC);
+ tcc_add_file(s1, TCC_LIBGCC, TCC_FILETYPE_BINARY);
}
#endif
tcc_add_support(s1, "libtcc1.a");
@@ -3366,7 +3366,7 @@ static int ld_add_file(TCCState *s1, const char filename[])
{
int ret;
- ret = tcc_add_file_internal(s1, filename, 0);
+ ret = tcc_add_file_internal(s1, filename, 0, TCC_FILETYPE_BINARY);
if (ret)
ret = tcc_add_dll(s1, filename, 0);
return ret;